@socketsecurity/lib 0.0.0 → 1.0.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 (555) hide show
  1. package/CHANGELOG.md +276 -0
  2. package/LICENSE +21 -0
  3. package/README.md +80 -2
  4. package/data/extensions.json +28 -0
  5. package/dist/abort.d.ts +11 -0
  6. package/dist/abort.js +62 -0
  7. package/dist/abort.js.map +7 -0
  8. package/dist/agent.d.ts +102 -0
  9. package/dist/agent.js +288 -0
  10. package/dist/agent.js.map +7 -0
  11. package/dist/ansi.d.ts +29 -0
  12. package/dist/ansi.js +62 -0
  13. package/dist/ansi.js.map +7 -0
  14. package/dist/argv/flags.d.ts +199 -0
  15. package/dist/argv/flags.js +284 -0
  16. package/dist/argv/flags.js.map +7 -0
  17. package/dist/argv/parse.d.ts +76 -0
  18. package/dist/argv/parse.js +173 -0
  19. package/dist/argv/parse.js.map +7 -0
  20. package/dist/arrays.d.ts +29 -0
  21. package/dist/arrays.js +87 -0
  22. package/dist/arrays.js.map +7 -0
  23. package/dist/bin.d.ts +50 -0
  24. package/dist/bin.js +405 -0
  25. package/dist/bin.js.map +7 -0
  26. package/dist/cacache.d.ts +86 -0
  27. package/dist/cacache.js +140 -0
  28. package/dist/cacache.js.map +7 -0
  29. package/dist/cache-with-ttl.d.ts +133 -0
  30. package/dist/cache-with-ttl.js +225 -0
  31. package/dist/cache-with-ttl.js.map +7 -0
  32. package/dist/constants/agents.d.ts +37 -0
  33. package/dist/constants/agents.js +128 -0
  34. package/dist/constants/agents.js.map +7 -0
  35. package/dist/constants/core.d.ts +22 -0
  36. package/dist/constants/core.js +59 -0
  37. package/dist/constants/core.js.map +7 -0
  38. package/dist/constants/encoding.d.ts +13 -0
  39. package/dist/constants/encoding.js +50 -0
  40. package/dist/constants/encoding.js.map +7 -0
  41. package/dist/constants/github.d.ts +7 -0
  42. package/dist/constants/github.js +32 -0
  43. package/dist/constants/github.js.map +7 -0
  44. package/dist/constants/licenses.d.ts +8 -0
  45. package/dist/constants/licenses.js +68 -0
  46. package/dist/constants/licenses.js.map +7 -0
  47. package/dist/constants/node.d.ts +29 -0
  48. package/dist/constants/node.js +173 -0
  49. package/dist/constants/node.js.map +7 -0
  50. package/dist/constants/packages.d.ts +19 -0
  51. package/dist/constants/packages.js +130 -0
  52. package/dist/constants/packages.js.map +7 -0
  53. package/dist/constants/paths.d.ts +51 -0
  54. package/dist/constants/paths.js +152 -0
  55. package/dist/constants/paths.js.map +7 -0
  56. package/dist/constants/platform.d.ts +6 -0
  57. package/dist/constants/platform.js +43 -0
  58. package/dist/constants/platform.js.map +7 -0
  59. package/dist/constants/process.d.ts +7 -0
  60. package/dist/constants/process.js +54 -0
  61. package/dist/constants/process.js.map +7 -0
  62. package/dist/constants/socket.d.ts +29 -0
  63. package/dist/constants/socket.js +83 -0
  64. package/dist/constants/socket.js.map +7 -0
  65. package/dist/constants/testing.d.ts +9 -0
  66. package/dist/constants/testing.js +38 -0
  67. package/dist/constants/testing.js.map +7 -0
  68. package/dist/constants/time.d.ts +11 -0
  69. package/dist/constants/time.js +41 -0
  70. package/dist/constants/time.js.map +7 -0
  71. package/dist/constants/typescript.d.ts +6 -0
  72. package/dist/constants/typescript.js +56 -0
  73. package/dist/constants/typescript.js.map +7 -0
  74. package/dist/cover/code.d.ts +8 -0
  75. package/dist/cover/code.js +137 -0
  76. package/dist/cover/code.js.map +7 -0
  77. package/dist/cover/formatters.d.ts +9 -0
  78. package/dist/cover/formatters.js +103 -0
  79. package/dist/cover/formatters.js.map +7 -0
  80. package/dist/cover/type.d.ts +7 -0
  81. package/dist/cover/type.js +65 -0
  82. package/dist/cover/type.js.map +7 -0
  83. package/dist/cover/types.d.ts +70 -0
  84. package/dist/cover/types.js +17 -0
  85. package/dist/cover/types.js.map +7 -0
  86. package/dist/debug.d.ts +99 -0
  87. package/dist/debug.js +345 -0
  88. package/dist/debug.js.map +7 -0
  89. package/dist/dlx-binary.d.ts +49 -0
  90. package/dist/dlx-binary.js +261 -0
  91. package/dist/dlx-binary.js.map +7 -0
  92. package/dist/dlx.d.ts +64 -0
  93. package/dist/dlx.js +168 -0
  94. package/dist/dlx.js.map +7 -0
  95. package/dist/download-lock.d.ts +48 -0
  96. package/dist/download-lock.js +139 -0
  97. package/dist/download-lock.js.map +7 -0
  98. package/dist/effects/pulse-frames.d.ts +23 -0
  99. package/dist/effects/pulse-frames.js +66 -0
  100. package/dist/effects/pulse-frames.js.map +7 -0
  101. package/dist/effects/text-shimmer.d.ts +37 -0
  102. package/dist/effects/text-shimmer.js +175 -0
  103. package/dist/effects/text-shimmer.js.map +7 -0
  104. package/dist/effects/types.d.ts +41 -0
  105. package/dist/effects/types.js +17 -0
  106. package/dist/effects/types.js.map +7 -0
  107. package/dist/effects/ultra.d.ts +16 -0
  108. package/dist/effects/ultra.js +63 -0
  109. package/dist/effects/ultra.js.map +7 -0
  110. package/dist/env/appdata.d.ts +1 -0
  111. package/dist/env/appdata.js +30 -0
  112. package/dist/env/appdata.js.map +7 -0
  113. package/dist/env/ci.d.ts +1 -0
  114. package/dist/env/ci.js +31 -0
  115. package/dist/env/ci.js.map +7 -0
  116. package/dist/env/comspec.d.ts +1 -0
  117. package/dist/env/comspec.js +30 -0
  118. package/dist/env/comspec.js.map +7 -0
  119. package/dist/env/debug.d.ts +1 -0
  120. package/dist/env/debug.js +30 -0
  121. package/dist/env/debug.js.map +7 -0
  122. package/dist/env/getters.d.ts +40 -0
  123. package/dist/env/getters.js +283 -0
  124. package/dist/env/getters.js.map +7 -0
  125. package/dist/env/github-api-url.d.ts +1 -0
  126. package/dist/env/github-api-url.js +30 -0
  127. package/dist/env/github-api-url.js.map +7 -0
  128. package/dist/env/github-base-ref.d.ts +1 -0
  129. package/dist/env/github-base-ref.js +30 -0
  130. package/dist/env/github-base-ref.js.map +7 -0
  131. package/dist/env/github-ref-name.d.ts +1 -0
  132. package/dist/env/github-ref-name.js +30 -0
  133. package/dist/env/github-ref-name.js.map +7 -0
  134. package/dist/env/github-ref-type.d.ts +1 -0
  135. package/dist/env/github-ref-type.js +30 -0
  136. package/dist/env/github-ref-type.js.map +7 -0
  137. package/dist/env/github-repository.d.ts +1 -0
  138. package/dist/env/github-repository.js +30 -0
  139. package/dist/env/github-repository.js.map +7 -0
  140. package/dist/env/github-server-url.d.ts +1 -0
  141. package/dist/env/github-server-url.js +30 -0
  142. package/dist/env/github-server-url.js.map +7 -0
  143. package/dist/env/github-token.d.ts +1 -0
  144. package/dist/env/github-token.js +30 -0
  145. package/dist/env/github-token.js.map +7 -0
  146. package/dist/env/helpers.d.ts +6 -0
  147. package/dist/env/helpers.js +49 -0
  148. package/dist/env/helpers.js.map +7 -0
  149. package/dist/env/home.d.ts +1 -0
  150. package/dist/env/home.js +30 -0
  151. package/dist/env/home.js.map +7 -0
  152. package/dist/env/jest-worker-id.d.ts +1 -0
  153. package/dist/env/jest-worker-id.js +30 -0
  154. package/dist/env/jest-worker-id.js.map +7 -0
  155. package/dist/env/lang.d.ts +1 -0
  156. package/dist/env/lang.js +30 -0
  157. package/dist/env/lang.js.map +7 -0
  158. package/dist/env/lc-all.d.ts +1 -0
  159. package/dist/env/lc-all.js +30 -0
  160. package/dist/env/lc-all.js.map +7 -0
  161. package/dist/env/lc-messages.d.ts +1 -0
  162. package/dist/env/lc-messages.js +30 -0
  163. package/dist/env/lc-messages.js.map +7 -0
  164. package/dist/env/localappdata.d.ts +1 -0
  165. package/dist/env/localappdata.js +30 -0
  166. package/dist/env/localappdata.js.map +7 -0
  167. package/dist/env/node-auth-token.d.ts +1 -0
  168. package/dist/env/node-auth-token.js +30 -0
  169. package/dist/env/node-auth-token.js.map +7 -0
  170. package/dist/env/node-env.d.ts +1 -0
  171. package/dist/env/node-env.js +30 -0
  172. package/dist/env/node-env.js.map +7 -0
  173. package/dist/env/npm-config-registry.d.ts +1 -0
  174. package/dist/env/npm-config-registry.js +30 -0
  175. package/dist/env/npm-config-registry.js.map +7 -0
  176. package/dist/env/npm-config-user-agent.d.ts +1 -0
  177. package/dist/env/npm-config-user-agent.js +30 -0
  178. package/dist/env/npm-config-user-agent.js.map +7 -0
  179. package/dist/env/npm-lifecycle-event.d.ts +1 -0
  180. package/dist/env/npm-lifecycle-event.js +30 -0
  181. package/dist/env/npm-lifecycle-event.js.map +7 -0
  182. package/dist/env/npm-registry.d.ts +1 -0
  183. package/dist/env/npm-registry.js +30 -0
  184. package/dist/env/npm-registry.js.map +7 -0
  185. package/dist/env/npm-token.d.ts +1 -0
  186. package/dist/env/npm-token.js +30 -0
  187. package/dist/env/npm-token.js.map +7 -0
  188. package/dist/env/path.d.ts +1 -0
  189. package/dist/env/path.js +30 -0
  190. package/dist/env/path.js.map +7 -0
  191. package/dist/env/pre-commit.d.ts +1 -0
  192. package/dist/env/pre-commit.js +31 -0
  193. package/dist/env/pre-commit.js.map +7 -0
  194. package/dist/env/shell.d.ts +1 -0
  195. package/dist/env/shell.js +30 -0
  196. package/dist/env/shell.js.map +7 -0
  197. package/dist/env/socket-accept-risks.d.ts +1 -0
  198. package/dist/env/socket-accept-risks.js +31 -0
  199. package/dist/env/socket-accept-risks.js.map +7 -0
  200. package/dist/env/socket-api-base-url.d.ts +1 -0
  201. package/dist/env/socket-api-base-url.js +30 -0
  202. package/dist/env/socket-api-base-url.js.map +7 -0
  203. package/dist/env/socket-api-proxy.d.ts +1 -0
  204. package/dist/env/socket-api-proxy.js +30 -0
  205. package/dist/env/socket-api-proxy.js.map +7 -0
  206. package/dist/env/socket-api-timeout.d.ts +1 -0
  207. package/dist/env/socket-api-timeout.js +31 -0
  208. package/dist/env/socket-api-timeout.js.map +7 -0
  209. package/dist/env/socket-api-token.d.ts +1 -0
  210. package/dist/env/socket-api-token.js +30 -0
  211. package/dist/env/socket-api-token.js.map +7 -0
  212. package/dist/env/socket-cacache-dir.d.ts +1 -0
  213. package/dist/env/socket-cacache-dir.js +30 -0
  214. package/dist/env/socket-cacache-dir.js.map +7 -0
  215. package/dist/env/socket-cli-accept-risks.d.ts +1 -0
  216. package/dist/env/socket-cli-accept-risks.js +33 -0
  217. package/dist/env/socket-cli-accept-risks.js.map +7 -0
  218. package/dist/env/socket-cli-api-base-url.d.ts +1 -0
  219. package/dist/env/socket-cli-api-base-url.js +30 -0
  220. package/dist/env/socket-cli-api-base-url.js.map +7 -0
  221. package/dist/env/socket-cli-api-proxy.d.ts +1 -0
  222. package/dist/env/socket-cli-api-proxy.js +30 -0
  223. package/dist/env/socket-cli-api-proxy.js.map +7 -0
  224. package/dist/env/socket-cli-api-timeout.d.ts +1 -0
  225. package/dist/env/socket-cli-api-timeout.js +31 -0
  226. package/dist/env/socket-cli-api-timeout.js.map +7 -0
  227. package/dist/env/socket-cli-api-token.d.ts +1 -0
  228. package/dist/env/socket-cli-api-token.js +30 -0
  229. package/dist/env/socket-cli-api-token.js.map +7 -0
  230. package/dist/env/socket-cli-config.d.ts +1 -0
  231. package/dist/env/socket-cli-config.js +30 -0
  232. package/dist/env/socket-cli-config.js.map +7 -0
  233. package/dist/env/socket-cli-fix.d.ts +1 -0
  234. package/dist/env/socket-cli-fix.js +30 -0
  235. package/dist/env/socket-cli-fix.js.map +7 -0
  236. package/dist/env/socket-cli-no-api-token.d.ts +1 -0
  237. package/dist/env/socket-cli-no-api-token.js +33 -0
  238. package/dist/env/socket-cli-no-api-token.js.map +7 -0
  239. package/dist/env/socket-cli-optimize.d.ts +1 -0
  240. package/dist/env/socket-cli-optimize.js +31 -0
  241. package/dist/env/socket-cli-optimize.js.map +7 -0
  242. package/dist/env/socket-cli-org-slug.d.ts +1 -0
  243. package/dist/env/socket-cli-org-slug.js +30 -0
  244. package/dist/env/socket-cli-org-slug.js.map +7 -0
  245. package/dist/env/socket-cli-shadow-accept-risks.d.ts +1 -0
  246. package/dist/env/socket-cli-shadow-accept-risks.js +33 -0
  247. package/dist/env/socket-cli-shadow-accept-risks.js.map +7 -0
  248. package/dist/env/socket-cli-shadow-api-token.d.ts +1 -0
  249. package/dist/env/socket-cli-shadow-api-token.js +30 -0
  250. package/dist/env/socket-cli-shadow-api-token.js.map +7 -0
  251. package/dist/env/socket-cli-shadow-bin.d.ts +1 -0
  252. package/dist/env/socket-cli-shadow-bin.js +30 -0
  253. package/dist/env/socket-cli-shadow-bin.js.map +7 -0
  254. package/dist/env/socket-cli-shadow-progress.d.ts +1 -0
  255. package/dist/env/socket-cli-shadow-progress.js +33 -0
  256. package/dist/env/socket-cli-shadow-progress.js.map +7 -0
  257. package/dist/env/socket-cli-shadow-silent.d.ts +1 -0
  258. package/dist/env/socket-cli-shadow-silent.js +33 -0
  259. package/dist/env/socket-cli-shadow-silent.js.map +7 -0
  260. package/dist/env/socket-cli-view-all-risks.d.ts +1 -0
  261. package/dist/env/socket-cli-view-all-risks.js +33 -0
  262. package/dist/env/socket-cli-view-all-risks.js.map +7 -0
  263. package/dist/env/socket-config.d.ts +1 -0
  264. package/dist/env/socket-config.js +30 -0
  265. package/dist/env/socket-config.js.map +7 -0
  266. package/dist/env/socket-debug.d.ts +1 -0
  267. package/dist/env/socket-debug.js +30 -0
  268. package/dist/env/socket-debug.js.map +7 -0
  269. package/dist/env/socket-home.d.ts +1 -0
  270. package/dist/env/socket-home.js +30 -0
  271. package/dist/env/socket-home.js.map +7 -0
  272. package/dist/env/socket-no-api-token.d.ts +1 -0
  273. package/dist/env/socket-no-api-token.js +31 -0
  274. package/dist/env/socket-no-api-token.js.map +7 -0
  275. package/dist/env/socket-npm-registry.d.ts +1 -0
  276. package/dist/env/socket-npm-registry.js +30 -0
  277. package/dist/env/socket-npm-registry.js.map +7 -0
  278. package/dist/env/socket-org-slug.d.ts +1 -0
  279. package/dist/env/socket-org-slug.js +30 -0
  280. package/dist/env/socket-org-slug.js.map +7 -0
  281. package/dist/env/socket-registry-url.d.ts +1 -0
  282. package/dist/env/socket-registry-url.js +30 -0
  283. package/dist/env/socket-registry-url.js.map +7 -0
  284. package/dist/env/socket-view-all-risks.d.ts +1 -0
  285. package/dist/env/socket-view-all-risks.js +31 -0
  286. package/dist/env/socket-view-all-risks.js.map +7 -0
  287. package/dist/env/temp.d.ts +1 -0
  288. package/dist/env/temp.js +30 -0
  289. package/dist/env/temp.js.map +7 -0
  290. package/dist/env/term.d.ts +1 -0
  291. package/dist/env/term.js +30 -0
  292. package/dist/env/term.js.map +7 -0
  293. package/dist/env/tmp.d.ts +1 -0
  294. package/dist/env/tmp.js +30 -0
  295. package/dist/env/tmp.js.map +7 -0
  296. package/dist/env/tmpdir.d.ts +1 -0
  297. package/dist/env/tmpdir.js +30 -0
  298. package/dist/env/tmpdir.js.map +7 -0
  299. package/dist/env/userprofile.d.ts +1 -0
  300. package/dist/env/userprofile.js +30 -0
  301. package/dist/env/userprofile.js.map +7 -0
  302. package/dist/env/vitest.d.ts +1 -0
  303. package/dist/env/vitest.js +31 -0
  304. package/dist/env/vitest.js.map +7 -0
  305. package/dist/env/xdg-cache-home.d.ts +1 -0
  306. package/dist/env/xdg-cache-home.js +30 -0
  307. package/dist/env/xdg-cache-home.js.map +7 -0
  308. package/dist/env/xdg-config-home.d.ts +1 -0
  309. package/dist/env/xdg-config-home.js +30 -0
  310. package/dist/env/xdg-config-home.js.map +7 -0
  311. package/dist/env/xdg-data-home.d.ts +1 -0
  312. package/dist/env/xdg-data-home.js +30 -0
  313. package/dist/env/xdg-data-home.js.map +7 -0
  314. package/dist/env.d.ts +15 -0
  315. package/dist/env.js +63 -0
  316. package/dist/env.js.map +7 -0
  317. package/dist/external/@inquirer/checkbox.js +4 -0
  318. package/dist/external/@inquirer/confirm.js +22 -0
  319. package/dist/external/@inquirer/core.js +4 -0
  320. package/dist/external/@inquirer/input.js +1 -0
  321. package/dist/external/@inquirer/password.js +1 -0
  322. package/dist/external/@inquirer/prompts.js +4 -0
  323. package/dist/external/@inquirer/search.js +1 -0
  324. package/dist/external/@inquirer/select.js +25 -0
  325. package/dist/external/@npmcli/package-json/index.js +1 -0
  326. package/dist/external/@npmcli/package-json/lib/read-package.js +1 -0
  327. package/dist/external/@npmcli/package-json/lib/sort.js +1 -0
  328. package/dist/external/@npmcli/promise-spawn.js +5 -0
  329. package/dist/external/@socketregistry/is-unicode-supported.d.ts +2 -0
  330. package/dist/external/@socketregistry/is-unicode-supported.js +5 -0
  331. package/dist/external/@socketregistry/packageurl-js.js +34 -0
  332. package/dist/external/@socketregistry/yocto-spinner.d.ts +12 -0
  333. package/dist/external/@socketregistry/yocto-spinner.js +8 -0
  334. package/dist/external/@yarnpkg/extensions.d.ts +5 -0
  335. package/dist/external/@yarnpkg/extensions.js +5 -0
  336. package/dist/external/cacache.d.ts +93 -0
  337. package/dist/external/cacache.js +32 -0
  338. package/dist/external/debug.d.ts +25 -0
  339. package/dist/external/debug.js +9 -0
  340. package/dist/external/del.d.ts +1 -0
  341. package/dist/external/del.js +54 -0
  342. package/dist/external/fast-glob.js +54 -0
  343. package/dist/external/fast-sort.d.ts +4 -0
  344. package/dist/external/fast-sort.js +5 -0
  345. package/dist/external/get-east-asian-width.d.ts +5 -0
  346. package/dist/external/get-east-asian-width.js +5 -0
  347. package/dist/external/libnpmpack.d.ts +3 -0
  348. package/dist/external/libnpmpack.js +225 -0
  349. package/dist/external/make-fetch-happen.d.ts +16 -0
  350. package/dist/external/make-fetch-happen.js +69 -0
  351. package/dist/external/normalize-package-data.js +6 -0
  352. package/dist/external/npm-package-arg.js +6 -0
  353. package/dist/external/pacote.d.ts +19 -0
  354. package/dist/external/pacote.js +105 -0
  355. package/dist/external/picomatch.js +5 -0
  356. package/dist/external/semver.d.ts +3 -0
  357. package/dist/external/semver.js +5 -0
  358. package/dist/external/spdx-correct.js +5 -0
  359. package/dist/external/spdx-expression-parse.js +5 -0
  360. package/dist/external/streaming-iterables.js +5 -0
  361. package/dist/external/validate-npm-package-name.js +5 -0
  362. package/dist/external/which.js +5 -0
  363. package/dist/external/yargs-parser.d.ts +3 -0
  364. package/dist/external/yargs-parser.js +26 -0
  365. package/dist/external/yoctocolors-cjs.d.ts +38 -0
  366. package/dist/external/yoctocolors-cjs.js +5 -0
  367. package/dist/external/zod.d.ts +1 -0
  368. package/dist/external/zod.js +27 -0
  369. package/dist/fs.d.ts +184 -0
  370. package/dist/fs.js +610 -0
  371. package/dist/fs.js.map +7 -0
  372. package/dist/functions.d.ts +27 -0
  373. package/dist/functions.js +70 -0
  374. package/dist/functions.js.map +7 -0
  375. package/dist/git.d.ts +93 -0
  376. package/dist/git.js +321 -0
  377. package/dist/git.js.map +7 -0
  378. package/dist/github.d.ts +121 -0
  379. package/dist/github.js +203 -0
  380. package/dist/github.js.map +7 -0
  381. package/dist/globs.d.ts +46 -0
  382. package/dist/globs.js +154 -0
  383. package/dist/globs.js.map +7 -0
  384. package/dist/http-request.d.ts +53 -0
  385. package/dist/http-request.js +315 -0
  386. package/dist/http-request.js.map +7 -0
  387. package/dist/index.d.ts +13 -0
  388. package/dist/index.js +64 -0
  389. package/dist/index.js.map +7 -0
  390. package/dist/ipc.d.ts +366 -0
  391. package/dist/ipc.js +234 -0
  392. package/dist/ipc.js.map +7 -0
  393. package/dist/json.d.ts +23 -0
  394. package/dist/json.js +75 -0
  395. package/dist/json.js.map +7 -0
  396. package/dist/logger.d.ts +183 -0
  397. package/dist/logger.js +653 -0
  398. package/dist/logger.js.map +7 -0
  399. package/dist/maintained-node-versions.d.ts +7 -0
  400. package/dist/maintained-node-versions.js +37 -0
  401. package/dist/maintained-node-versions.js.map +7 -0
  402. package/dist/memoization.d.ts +142 -0
  403. package/dist/memoization.js +212 -0
  404. package/dist/memoization.js.map +7 -0
  405. package/dist/objects.d.ts +146 -0
  406. package/dist/objects.js +321 -0
  407. package/dist/objects.js.map +7 -0
  408. package/dist/packages/editable.d.ts +107 -0
  409. package/dist/packages/editable.js +358 -0
  410. package/dist/packages/editable.js.map +7 -0
  411. package/dist/packages/exports.d.ts +30 -0
  412. package/dist/packages/exports.js +164 -0
  413. package/dist/packages/exports.js.map +7 -0
  414. package/dist/packages/isolation.d.ts +22 -0
  415. package/dist/packages/isolation.js +197 -0
  416. package/dist/packages/isolation.js.map +7 -0
  417. package/dist/packages/licenses.d.ts +68 -0
  418. package/dist/packages/licenses.js +216 -0
  419. package/dist/packages/licenses.js.map +7 -0
  420. package/dist/packages/manifest.d.ts +16 -0
  421. package/dist/packages/manifest.js +192 -0
  422. package/dist/packages/manifest.js.map +7 -0
  423. package/dist/packages/normalize.d.ts +21 -0
  424. package/dist/packages/normalize.js +122 -0
  425. package/dist/packages/normalize.js.map +7 -0
  426. package/dist/packages/operations.d.ts +54 -0
  427. package/dist/packages/operations.js +306 -0
  428. package/dist/packages/operations.js.map +7 -0
  429. package/dist/packages/paths.d.ts +10 -0
  430. package/dist/packages/paths.js +55 -0
  431. package/dist/packages/paths.js.map +7 -0
  432. package/dist/packages/provenance.d.ts +10 -0
  433. package/dist/packages/provenance.js +180 -0
  434. package/dist/packages/provenance.js.map +7 -0
  435. package/dist/packages/registry.d.ts +8 -0
  436. package/dist/packages/registry.js +30 -0
  437. package/dist/packages/registry.js.map +7 -0
  438. package/dist/packages/specs.d.ts +28 -0
  439. package/dist/packages/specs.js +85 -0
  440. package/dist/packages/specs.js.map +7 -0
  441. package/dist/packages/validation.d.ts +15 -0
  442. package/dist/packages/validation.js +53 -0
  443. package/dist/packages/validation.js.map +7 -0
  444. package/dist/packages.d.ts +154 -0
  445. package/dist/packages.js +131 -0
  446. package/dist/packages.js.map +7 -0
  447. package/dist/path.d.ts +74 -0
  448. package/dist/path.js +442 -0
  449. package/dist/path.js.map +7 -0
  450. package/dist/paths.d.ts +42 -0
  451. package/dist/paths.js +145 -0
  452. package/dist/paths.js.map +7 -0
  453. package/dist/performance.d.ts +178 -0
  454. package/dist/performance.js +219 -0
  455. package/dist/performance.js.map +7 -0
  456. package/dist/promise-queue.d.ts +35 -0
  457. package/dist/promise-queue.js +111 -0
  458. package/dist/promise-queue.js.map +7 -0
  459. package/dist/promises.d.ts +67 -0
  460. package/dist/promises.js +268 -0
  461. package/dist/promises.js.map +7 -0
  462. package/dist/prompts.d.ts +27 -0
  463. package/dist/prompts.js +60 -0
  464. package/dist/prompts.js.map +7 -0
  465. package/dist/regexps.d.ts +13 -0
  466. package/dist/regexps.js +32 -0
  467. package/dist/regexps.js.map +7 -0
  468. package/dist/sea.d.ts +10 -0
  469. package/dist/sea.js +46 -0
  470. package/dist/sea.js.map +7 -0
  471. package/dist/shadow.d.ts +17 -0
  472. package/dist/shadow.js +60 -0
  473. package/dist/shadow.js.map +7 -0
  474. package/dist/signal-exit.d.ts +23 -0
  475. package/dist/signal-exit.js +250 -0
  476. package/dist/signal-exit.js.map +7 -0
  477. package/dist/sorts.d.ts +28 -0
  478. package/dist/sorts.js +96 -0
  479. package/dist/sorts.js.map +7 -0
  480. package/dist/spawn.d.ts +207 -0
  481. package/dist/spawn.js +201 -0
  482. package/dist/spawn.js.map +7 -0
  483. package/dist/spinner.d.ts +208 -0
  484. package/dist/spinner.js +729 -0
  485. package/dist/spinner.js.map +7 -0
  486. package/dist/ssri.d.ts +95 -0
  487. package/dist/ssri.js +73 -0
  488. package/dist/ssri.js.map +7 -0
  489. package/dist/stdio/clear.d.ts +40 -0
  490. package/dist/stdio/clear.js +84 -0
  491. package/dist/stdio/clear.js.map +7 -0
  492. package/dist/stdio/divider.d.ts +48 -0
  493. package/dist/stdio/divider.js +81 -0
  494. package/dist/stdio/divider.js.map +7 -0
  495. package/dist/stdio/footer.d.ts +25 -0
  496. package/dist/stdio/footer.js +96 -0
  497. package/dist/stdio/footer.js.map +7 -0
  498. package/dist/stdio/header.d.ts +25 -0
  499. package/dist/stdio/header.js +102 -0
  500. package/dist/stdio/header.js.map +7 -0
  501. package/dist/stdio/mask.d.ts +72 -0
  502. package/dist/stdio/mask.js +187 -0
  503. package/dist/stdio/mask.js.map +7 -0
  504. package/dist/stdio/progress.d.ts +51 -0
  505. package/dist/stdio/progress.js +171 -0
  506. package/dist/stdio/progress.js.map +7 -0
  507. package/dist/stdio/prompts.d.ts +46 -0
  508. package/dist/stdio/prompts.js +90 -0
  509. package/dist/stdio/prompts.js.map +7 -0
  510. package/dist/stdio/stderr.d.ts +48 -0
  511. package/dist/stdio/stderr.js +91 -0
  512. package/dist/stdio/stderr.js.map +7 -0
  513. package/dist/stdio/stdout.d.ts +48 -0
  514. package/dist/stdio/stdout.js +105 -0
  515. package/dist/stdio/stdout.js.map +7 -0
  516. package/dist/streams.d.ts +20 -0
  517. package/dist/streams.js +80 -0
  518. package/dist/streams.js.map +7 -0
  519. package/dist/strings.d.ts +139 -0
  520. package/dist/strings.js +253 -0
  521. package/dist/strings.js.map +7 -0
  522. package/dist/suppress-warnings.d.ts +66 -0
  523. package/dist/suppress-warnings.js +100 -0
  524. package/dist/suppress-warnings.js.map +7 -0
  525. package/dist/tables.d.ts +69 -0
  526. package/dist/tables.js +130 -0
  527. package/dist/tables.js.map +7 -0
  528. package/dist/temporary-executor.d.ts +9 -0
  529. package/dist/temporary-executor.js +54 -0
  530. package/dist/temporary-executor.js.map +7 -0
  531. package/dist/types.d.ts +65 -0
  532. package/dist/types.js +74 -0
  533. package/dist/types.js.map +7 -0
  534. package/dist/url.d.ts +60 -0
  535. package/dist/url.js +144 -0
  536. package/dist/url.js.map +7 -0
  537. package/dist/utils/get-ipc.d.ts +16 -0
  538. package/dist/utils/get-ipc.js +60 -0
  539. package/dist/utils/get-ipc.js.map +7 -0
  540. package/dist/validation/json-parser.d.ts +10 -0
  541. package/dist/validation/json-parser.js +129 -0
  542. package/dist/validation/json-parser.js.map +7 -0
  543. package/dist/validation/types.d.ts +40 -0
  544. package/dist/validation/types.js +17 -0
  545. package/dist/validation/types.js.map +7 -0
  546. package/dist/versions.d.ts +87 -0
  547. package/dist/versions.js +155 -0
  548. package/dist/versions.js.map +7 -0
  549. package/dist/words.d.ts +22 -0
  550. package/dist/words.js +52 -0
  551. package/dist/words.js.map +7 -0
  552. package/dist/zod.d.ts +5 -0
  553. package/dist/zod.js +29 -0
  554. package/dist/zod.js.map +7 -0
  555. package/package.json +856 -7
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Bundled from make-fetch-happen
3
+ * This is a zero-dependency bundle created by esbuild.
4
+ */
5
+ var Ch=Object.defineProperty;var o=(s,e)=>Ch(s,"name",{value:e,configurable:!0});var Ry=(s,e)=>()=>(s&&(e=s(s=0)),e);var m=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Oy=(s,e)=>{for(var t in e)Ch(s,t,{get:e[t],enumerable:!0})};var ee=m(oe=>{"use strict";var vy=oe&&oe.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(oe,"__esModule",{value:!0});oe.Minipass=oe.isWritable=oe.isReadable=oe.isStream=void 0;var Ah=typeof process=="object"&&process?process:{stdout:null,stderr:null},oo=require("node:events"),Ph=vy(require("node:stream")),Iy=require("node:string_decoder"),Ty=o(s=>!!s&&typeof s=="object"&&(s instanceof Qr||s instanceof Ph.default||(0,oe.isReadable)(s)||(0,oe.isWritable)(s)),"isStream");oe.isStream=Ty;var Cy=o(s=>!!s&&typeof s=="object"&&s instanceof oo.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==Ph.default.Writable.prototype.pipe,"isReadable");oe.isReadable=Cy;var Ay=o(s=>!!s&&typeof s=="object"&&s instanceof oo.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function","isWritable");oe.isWritable=Ay;var st=Symbol("EOF"),rt=Symbol("maybeEmitEnd"),_t=Symbol("emittedEnd"),Wr=Symbol("emittingEnd"),js=Symbol("emittedError"),Zr=Symbol("closed"),xh=Symbol("read"),Kr=Symbol("flush"),Bh=Symbol("flushChunk"),ke=Symbol("encoding"),os=Symbol("decoder"),G=Symbol("flowing"),Hs=Symbol("paused"),as=Symbol("resume"),V=Symbol("buffer"),ne=Symbol("pipes"),W=Symbol("bufferLength"),eo=Symbol("bufferPush"),Yr=Symbol("bufferShift"),Q=Symbol("objectMode"),j=Symbol("destroyed"),to=Symbol("error"),so=Symbol("emitData"),Nh=Symbol("emitEnd"),ro=Symbol("emitEnd2"),qe=Symbol("async"),io=Symbol("abort"),Xr=Symbol("aborted"),zs=Symbol("signal"),Lt=Symbol("dataListeners"),Ee=Symbol("discarded"),Gs=o(s=>Promise.resolve().then(s),"defer"),xy=o(s=>s(),"nodefer"),By=o(s=>s==="end"||s==="finish"||s==="prefinish","isEndish"),Ny=o(s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,"isArrayBufferLike"),Py=o(s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),"isArrayBufferView"),Jr=class{static{o(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[as](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},no=class extends Jr{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}},Ly=o(s=>!!s.objectMode,"isObjectModeOptions"),ky=o(s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer","isEncodingOptions"),Qr=class extends oo.EventEmitter{static{o(this,"Minipass")}[G]=!1;[Hs]=!1;[ne]=[];[V]=[];[Q];[ke];[qe];[os];[st]=!1;[_t]=!1;[Wr]=!1;[Zr]=!1;[js]=null;[W]=0;[j]=!1;[zs];[Xr]=!1;[Lt]=0;[Ee]=!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");Ly(t)?(this[Q]=!0,this[ke]=null):ky(t)?(this[ke]=t.encoding,this[Q]=!1):(this[Q]=!1,this[ke]=null),this[qe]=!!t.async,this[os]=this[ke]?new Iy.StringDecoder(this[ke]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:o(()=>this[V],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:o(()=>this[ne],"get")});let{signal:r}=t;r&&(this[zs]=r,r.aborted?this[io]():r.addEventListener("abort",()=>this[io]()))}get bufferLength(){return this[W]}get encoding(){return this[ke]}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[Q]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[qe]}set async(e){this[qe]=this[qe]||!!e}[io](){this[Xr]=!0,this.emit("abort",this[zs]?.reason),this.destroy(this[zs]?.reason)}get aborted(){return this[Xr]}set aborted(e){}write(e,t,r){if(this[Xr])return!1;if(this[st])throw new Error("write after end");if(this[j])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[qe]?Gs:xy;if(!this[Q]&&!Buffer.isBuffer(e)){if(Py(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Ny(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Q]?(this[G]&&this[W]!==0&&this[Kr](!0),this[G]?this.emit("data",e):this[eo](e),this[W]!==0&&this.emit("readable"),r&&i(r),this[G]):e.length?(typeof e=="string"&&!(t===this[ke]&&!this[os]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ke]&&(e=this[os].write(e)),this[G]&&this[W]!==0&&this[Kr](!0),this[G]?this.emit("data",e):this[eo](e),this[W]!==0&&this.emit("readable"),r&&i(r),this[G]):(this[W]!==0&&this.emit("readable"),r&&i(r),this[G])}read(e){if(this[j])return null;if(this[Ee]=!1,this[W]===0||e===0||e&&e>this[W])return this[rt](),null;this[Q]&&(e=null),this[V].length>1&&!this[Q]&&(this[V]=[this[ke]?this[V].join(""):Buffer.concat(this[V],this[W])]);let t=this[xh](e||null,this[V][0]);return this[rt](),t}[xh](e,t){if(this[Q])this[Yr]();else{let r=t;e===r.length||e===null?this[Yr]():typeof r=="string"?(this[V][0]=r.slice(e),t=r.slice(0,e),this[W]-=e):(this[V][0]=r.subarray(e),t=r.subarray(0,e),this[W]-=e)}return this.emit("data",t),!this[V].length&&!this[st]&&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[st]=!0,this.writable=!1,(this[G]||!this[Hs])&&this[rt](),this}[as](){this[j]||(!this[Lt]&&!this[ne].length&&(this[Ee]=!0),this[Hs]=!1,this[G]=!0,this.emit("resume"),this[V].length?this[Kr]():this[st]?this[rt]():this.emit("drain"))}resume(){return this[as]()}pause(){this[G]=!1,this[Hs]=!0,this[Ee]=!1}get destroyed(){return this[j]}get flowing(){return this[G]}get paused(){return this[Hs]}[eo](e){this[Q]?this[W]+=1:this[W]+=e.length,this[V].push(e)}[Yr](){return this[Q]?this[W]-=1:this[W]-=this[V][0].length,this[V].shift()}[Kr](e=!1){do;while(this[Bh](this[Yr]())&&this[V].length);!e&&!this[V].length&&!this[st]&&this.emit("drain")}[Bh](e){return this.emit("data",e),this[G]}pipe(e,t){if(this[j])return e;this[Ee]=!1;let r=this[_t];return t=t||{},e===Ah.stdout||e===Ah.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[ne].push(t.proxyErrors?new no(this,e,t):new Jr(this,e,t)),this[qe]?Gs(()=>this[as]()):this[as]()),e}unpipe(e){let t=this[ne].find(r=>r.dest===e);t&&(this[ne].length===1?(this[G]&&this[Lt]===0&&(this[G]=!1),this[ne]=[]):this[ne].splice(this[ne].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[Ee]=!1,this[Lt]++,!this[ne].length&&!this[G]&&this[as]();else if(e==="readable"&&this[W]!==0)super.emit("readable");else if(By(e)&&this[_t])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[js]){let i=t;this[qe]?Gs(()=>i.call(this,this[js])):i.call(this,this[js])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){let r=super.off(e,t);return e==="data"&&(this[Lt]=this.listeners("data").length,this[Lt]===0&&!this[Ee]&&!this[ne].length&&(this[G]=!1)),r}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Lt]=0,!this[Ee]&&!this[ne].length&&(this[G]=!1)),t}get emittedEnd(){return this[_t]}[rt](){!this[Wr]&&!this[_t]&&!this[j]&&this[V].length===0&&this[st]&&(this[Wr]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Zr]&&this.emit("close"),this[Wr]=!1)}emit(e,...t){let r=t[0];if(e!=="error"&&e!=="close"&&e!==j&&this[j])return!1;if(e==="data")return!this[Q]&&!r?!1:this[qe]?(Gs(()=>this[so](r)),!0):this[so](r);if(e==="end")return this[Nh]();if(e==="close"){if(this[Zr]=!0,!this[_t]&&!this[j])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[js]=r,super.emit(to,r);let n=!this[zs]||this.listeners("error").length?super.emit("error",r):!1;return this[rt](),n}else if(e==="resume"){let n=super.emit("resume");return this[rt](),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[rt](),i}[so](e){for(let r of this[ne])r.dest.write(e)===!1&&this.pause();let t=this[Ee]?!1:super.emit("data",e);return this[rt](),t}[Nh](){return this[_t]?!1:(this[_t]=!0,this.readable=!1,this[qe]?(Gs(()=>this[ro]()),!0):this[ro]())}[ro](){if(this[os]){let t=this[os].end();if(t){for(let r of this[ne])r.dest.write(t);this[Ee]||super.emit("data",t)}}for(let t of this[ne])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Q]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[Q]||(e.dataLength+=r.length)}),await t,e}async concat(){if(this[Q])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[ke]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(j,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ee]=!1;let e=!1,t=o(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:o(()=>{if(e)return t();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[st])return t();let n,a,c=o(f=>{this.off("data",h),this.off("end",u),this.off(j,l),t(),a(f)},"onerr"),h=o(f=>{this.off("error",c),this.off("end",u),this.off(j,l),this.pause(),n({value:f,done:!!this[st]})},"ondata"),u=o(()=>{this.off("error",c),this.off("data",h),this.off(j,l),t(),n({done:!0,value:void 0})},"onend"),l=o(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((f,d)=>{a=d,n=f,this.once(j,l),this.once("error",c),this.once("end",u),this.once("data",h)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ee]=!1;let e=!1,t=o(()=>(this.pause(),this.off(to,t),this.off(j,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),r=o(()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}},"next");return this.once("end",t),this.once(to,t),this.once(j,t),{next:r,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[j])return e?this.emit("error",e):this.emit(j),this;this[j]=!0,this[Ee]=!0,this[V].length=0,this[W]=0;let t=this;return typeof t.close=="function"&&!this[Zr]&&t.close(),e?this.emit("error",e):this.emit(j),this}static get isStream(){return oe.isStream}};oe.Minipass=Qr});var ao=m(cs=>{"use strict";var Dy=cs&&cs.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(cs,"__esModule",{value:!0});cs.constants=void 0;var Fy=Dy(require("zlib")),My=Fy.default.constants||{ZLIB_VERNUM:4736};cs.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},My))});var Dh=m(B=>{"use strict";var $y=B&&B.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),qy=B&&B.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Uy=B&&B.__importStar||(function(){var s=o(function(e){return s=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},s(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=s(e),i=0;i<r.length;i++)r[i]!=="default"&&$y(t,e,r[i]);return qy(t,e),t}})(),jy=B&&B.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(B,"__esModule",{value:!0});B.ZstdDecompress=B.ZstdCompress=B.BrotliDecompress=B.BrotliCompress=B.Unzip=B.InflateRaw=B.DeflateRaw=B.Gunzip=B.Gzip=B.Inflate=B.Deflate=B.Zlib=B.ZlibError=B.constants=void 0;var uo=jy(require("assert")),kt=require("buffer"),Hy=ee(),Lh=Uy(require("zlib")),Ue=ao(),zy=ao();Object.defineProperty(B,"constants",{enumerable:!0,get:o(function(){return zy.constants},"get")});var Gy=kt.Buffer.concat,kh=Object.getOwnPropertyDescriptor(kt.Buffer,"concat"),Vy=o(s=>s,"noop"),co=kh?.writable===!0||kh?.set!==void 0?s=>{kt.Buffer.concat=s?Vy:Gy}:s=>{},Dt=Symbol("_superWrite"),Ft=class extends Error{static{o(this,"ZlibError")}code;errno;constructor(e,t){super("zlib: "+e.message,{cause:e}),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,t??this.constructor)}get name(){return"ZlibError"}};B.ZlibError=Ft;var ho=Symbol("flushFlag"),Vs=class extends Hy.Minipass{static{o(this,"ZlibBase")}#e=!1;#t=!1;#s;#r;#i;#a;#l;get sawError(){return this.#e}get handle(){return this.#a}get flushFlag(){return this.#s}constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(e),this.#s=e.flush??0,this.#r=e.finishFlush??0,this.#i=e.fullFlushFlag??0,typeof Lh[t]!="function")throw new TypeError("Compression method not supported: "+t);try{this.#a=new Lh[t](e)}catch(r){throw new Ft(r,this.constructor)}this.#l=r=>{this.#e||(this.#e=!0,this.close(),this.emit("error",r))},this.#a?.on("error",r=>this.#l(new Ft(r))),this.once("end",()=>this.close)}close(){this.#a&&(this.#a.close(),this.#a=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,uo.default)(this.#a,"zlib binding closed"),this.#a.reset?.()}flush(e){this.ended||(typeof e!="number"&&(e=this.#i),this.write(Object.assign(kt.Buffer.alloc(0),{[ho]:e})))}end(e,t,r){return typeof e=="function"&&(r=e,t=void 0,e=void 0),typeof t=="function"&&(r=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#r),this.#t=!0,super.end(r)}get ended(){return this.#t}[Dt](e){return super.write(e)}write(e,t,r){if(typeof t=="function"&&(r=t,t="utf8"),typeof e=="string"&&(e=kt.Buffer.from(e,t)),this.#e)return;(0,uo.default)(this.#a,"zlib binding closed");let i=this.#a._handle,n=i.close;i.close=()=>{};let a=this.#a.close;this.#a.close=()=>{},co(!0);let c;try{let u=typeof e[ho]=="number"?e[ho]:this.#s;c=this.#a._processChunk(e,u),co(!1)}catch(u){co(!1),this.#l(new Ft(u,this.write))}finally{this.#a&&(this.#a._handle=i,i.close=n,this.#a.close=a,this.#a.removeAllListeners("error"))}this.#a&&this.#a.on("error",u=>this.#l(new Ft(u,this.write)));let h;if(c)if(Array.isArray(c)&&c.length>0){let u=c[0];h=this[Dt](kt.Buffer.from(u));for(let l=1;l<c.length;l++)h=this[Dt](c[l])}else h=this[Dt](kt.Buffer.from(c));return r&&r(),h}},je=class extends Vs{static{o(this,"Zlib")}#e;#t;constructor(e,t){e=e||{},e.flush=e.flush||Ue.constants.Z_NO_FLUSH,e.finishFlush=e.finishFlush||Ue.constants.Z_FINISH,e.fullFlushFlag=Ue.constants.Z_FULL_FLUSH,super(e,t),this.#e=e.level,this.#t=e.strategy}params(e,t){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#e!==e||this.#t!==t){this.flush(Ue.constants.Z_SYNC_FLUSH),(0,uo.default)(this.handle,"zlib binding closed");let r=this.handle.flush;this.handle.flush=(i,n)=>{typeof i=="function"&&(n=i,i=this.flushFlag),this.flush(i),n?.()};try{this.handle.params(e,t)}finally{this.handle.flush=r}this.handle&&(this.#e=e,this.#t=t)}}}};B.Zlib=je;var lo=class extends je{static{o(this,"Deflate")}constructor(e){super(e,"Deflate")}};B.Deflate=lo;var fo=class extends je{static{o(this,"Inflate")}constructor(e){super(e,"Inflate")}};B.Inflate=fo;var po=class extends je{static{o(this,"Gzip")}#e;constructor(e){super(e,"Gzip"),this.#e=e&&!!e.portable}[Dt](e){return this.#e?(this.#e=!1,e[9]=255,super[Dt](e)):super[Dt](e)}};B.Gzip=po;var mo=class extends je{static{o(this,"Gunzip")}constructor(e){super(e,"Gunzip")}};B.Gunzip=mo;var go=class extends je{static{o(this,"DeflateRaw")}constructor(e){super(e,"DeflateRaw")}};B.DeflateRaw=go;var yo=class extends je{static{o(this,"InflateRaw")}constructor(e){super(e,"InflateRaw")}};B.InflateRaw=yo;var Eo=class extends je{static{o(this,"Unzip")}constructor(e){super(e,"Unzip")}};B.Unzip=Eo;var ei=class extends Vs{static{o(this,"Brotli")}constructor(e,t){e=e||{},e.flush=e.flush||Ue.constants.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Ue.constants.BROTLI_OPERATION_FINISH,e.fullFlushFlag=Ue.constants.BROTLI_OPERATION_FLUSH,super(e,t)}},wo=class extends ei{static{o(this,"BrotliCompress")}constructor(e){super(e,"BrotliCompress")}};B.BrotliCompress=wo;var So=class extends ei{static{o(this,"BrotliDecompress")}constructor(e){super(e,"BrotliDecompress")}};B.BrotliDecompress=So;var ti=class extends Vs{static{o(this,"Zstd")}constructor(e,t){e=e||{},e.flush=e.flush||Ue.constants.ZSTD_e_continue,e.finishFlush=e.finishFlush||Ue.constants.ZSTD_e_end,e.fullFlushFlag=Ue.constants.ZSTD_e_flush,super(e,t)}},_o=class extends ti{static{o(this,"ZstdCompress")}constructor(e){super(e,"ZstdCompress")}};B.ZstdCompress=_o;var bo=class extends ti{static{o(this,"ZstdDecompress")}constructor(e){super(e,"ZstdDecompress")}};B.ZstdDecompress=bo});var ai=m((qA,Gh)=>{"use strict";var Fh=typeof process=="object"&&process?process:{stdout:null,stderr:null},Wy=require("events"),Mh=require("stream"),$h=require("string_decoder").StringDecoder,it=Symbol("EOF"),nt=Symbol("maybeEmitEnd"),bt=Symbol("emittedEnd"),si=Symbol("emittingEnd"),Ws=Symbol("emittedError"),ri=Symbol("closed"),qh=Symbol("read"),ii=Symbol("flush"),Uh=Symbol("flushChunk"),le=Symbol("encoding"),ot=Symbol("decoder"),ni=Symbol("flowing"),Zs=Symbol("paused"),hs=Symbol("resume"),Z=Symbol("bufferLength"),Ro=Symbol("bufferPush"),Oo=Symbol("bufferShift"),te=Symbol("objectMode"),se=Symbol("destroyed"),vo=Symbol("emitData"),jh=Symbol("emitEnd"),Io=Symbol("emitEnd2"),at=Symbol("async"),Ks=o(s=>Promise.resolve().then(s),"defer"),Hh=global._MP_NO_ITERATOR_SYMBOLS_!=="1",Zy=Hh&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Ky=Hh&&Symbol.iterator||Symbol("iterator not implemented"),Yy=o(s=>s==="end"||s==="finish"||s==="prefinish","isEndish"),Xy=o(s=>s instanceof ArrayBuffer||typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,"isArrayBuffer"),Jy=o(s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),"isArrayBufferView"),oi=class{static{o(this,"Pipe")}constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[hs](),t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},To=class extends oi{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}};Gh.exports=class zh extends Mh{static{o(this,"Minipass")}constructor(e){super(),this[ni]=!1,this[Zs]=!1,this.pipes=[],this.buffer=[],this[te]=e&&e.objectMode||!1,this[te]?this[le]=null:this[le]=e&&e.encoding||null,this[le]==="buffer"&&(this[le]=null),this[at]=e&&!!e.async||!1,this[ot]=this[le]?new $h(this[le]):null,this[it]=!1,this[bt]=!1,this[si]=!1,this[ri]=!1,this[Ws]=null,this.writable=!0,this.readable=!0,this[Z]=0,this[se]=!1}get bufferLength(){return this[Z]}get encoding(){return this[le]}set encoding(e){if(this[te])throw new Error("cannot set encoding in objectMode");if(this[le]&&e!==this[le]&&(this[ot]&&this[ot].lastNeed||this[Z]))throw new Error("cannot change encoding");this[le]!==e&&(this[ot]=e?new $h(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[ot].write(t)))),this[le]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[te]}set objectMode(e){this[te]=this[te]||!!e}get async(){return this[at]}set async(e){this[at]=this[at]||!!e}write(e,t,r){if(this[it])throw new Error("write after end");if(this[se])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[at]?Ks:n=>n();return!this[te]&&!Buffer.isBuffer(e)&&(Jy(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):Xy(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[te]?(this.flowing&&this[Z]!==0&&this[ii](!0),this.flowing?this.emit("data",e):this[Ro](e),this[Z]!==0&&this.emit("readable"),r&&i(r),this.flowing):e.length?(typeof e=="string"&&!(t===this[le]&&!this[ot].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[le]&&(e=this[ot].write(e)),this.flowing&&this[Z]!==0&&this[ii](!0),this.flowing?this.emit("data",e):this[Ro](e),this[Z]!==0&&this.emit("readable"),r&&i(r),this.flowing):(this[Z]!==0&&this.emit("readable"),r&&i(r),this.flowing)}read(e){if(this[se])return null;if(this[Z]===0||e===0||e>this[Z])return this[nt](),null;this[te]&&(e=null),this.buffer.length>1&&!this[te]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Z])]);let t=this[qh](e||null,this.buffer[0]);return this[nt](),t}[qh](e,t){return e===t.length||e===null?this[Oo]():(this.buffer[0]=t.slice(e),t=t.slice(0,e),this[Z]-=e),this.emit("data",t),!this.buffer.length&&!this[it]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t),r&&this.once("end",r),this[it]=!0,this.writable=!1,(this.flowing||!this[Zs])&&this[nt](),this}[hs](){this[se]||(this[Zs]=!1,this[ni]=!0,this.emit("resume"),this.buffer.length?this[ii]():this[it]?this[nt]():this.emit("drain"))}resume(){return this[hs]()}pause(){this[ni]=!1,this[Zs]=!0}get destroyed(){return this[se]}get flowing(){return this[ni]}get paused(){return this[Zs]}[Ro](e){this[te]?this[Z]+=1:this[Z]+=e.length,this.buffer.push(e)}[Oo](){return this.buffer.length&&(this[te]?this[Z]-=1:this[Z]-=this.buffer[0].length),this.buffer.shift()}[ii](e){do;while(this[Uh](this[Oo]()));!e&&!this.buffer.length&&!this[it]&&this.emit("drain")}[Uh](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[se])return;let r=this[bt];return t=t||{},e===Fh.stdout||e===Fh.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this.pipes.push(t.proxyErrors?new To(this,e,t):new oi(this,e,t)),this[at]?Ks(()=>this[hs]()):this[hs]()),e}unpipe(e){let t=this.pipes.find(r=>r.dest===e);t&&(this.pipes.splice(this.pipes.indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);return e==="data"&&!this.pipes.length&&!this.flowing?this[hs]():e==="readable"&&this[Z]!==0?super.emit("readable"):Yy(e)&&this[bt]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Ws]&&(this[at]?Ks(()=>t.call(this,this[Ws])):t.call(this,this[Ws])),r}get emittedEnd(){return this[bt]}[nt](){!this[si]&&!this[bt]&&!this[se]&&this.buffer.length===0&&this[it]&&(this[si]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ri]&&this.emit("close"),this[si]=!1)}emit(e,t,...r){if(e!=="error"&&e!=="close"&&e!==se&&this[se])return;if(e==="data")return t?this[at]?Ks(()=>this[vo](t)):this[vo](t):!1;if(e==="end")return this[jh]();if(e==="close"){if(this[ri]=!0,!this[bt]&&!this[se])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Ws]=t;let n=super.emit("error",t);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,...r);return this[nt](),i}[vo](e){for(let r of this.pipes)r.dest.write(e)===!1&&this.pause();let t=super.emit("data",e);return this[nt](),t}[jh](){this[bt]||(this[bt]=!0,this.readable=!1,this[at]?Ks(()=>this[Io]()):this[Io]())}[Io](){if(this[ot]){let t=this[ot].end();if(t){for(let r of this.pipes)r.dest.write(t);super.emit("data",t)}}for(let t of this.pipes)t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[te]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[te]||(e.dataLength+=r.length)}),t.then(()=>e)}concat(){return this[te]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[te]?Promise.reject(new Error("cannot concat in objectMode")):this[le]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(se,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Zy](){return{next:o(()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[it])return Promise.resolve({done:!0});let r=null,i=null,n=o(u=>{this.removeListener("data",a),this.removeListener("end",c),i(u)},"onerr"),a=o(u=>{this.removeListener("error",n),this.removeListener("end",c),this.pause(),r({value:u,done:!!this[it]})},"ondata"),c=o(()=>{this.removeListener("error",n),this.removeListener("data",a),r({done:!0})},"onend"),h=o(()=>n(new Error("stream destroyed")),"ondestroy");return new Promise((u,l)=>{i=l,r=u,this.once(se,h),this.once("error",n),this.once("end",c),this.once("data",a)})},"next")}}[Ky](){return{next:o(()=>{let t=this.read();return{value:t,done:t===null}},"next")}}destroy(e){return this[se]?(e?this.emit("error",e):this.emit(se),this):(this[se]=!0,this.buffer.length=0,this[Z]=0,typeof this.close=="function"&&!this[ri]&&this.close(),e?this.emit("error",e):this.emit(se),this)}static isStream(e){return!!e&&(e instanceof zh||e instanceof Mh||e instanceof Wy&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Wh=m((jA,Vh)=>{var Qy=ai(),Ys=class extends Error{static{o(this,"SizeError")}constructor(e,t){super(`Bad data size: expected ${t} bytes, but got ${e}`),this.expect=t,this.found=e,this.code="EBADSIZE",Error.captureStackTrace(this,this.constructor)}get name(){return"SizeError"}},ci=class extends Qy{static{o(this,"MinipassSized")}constructor(e={}){if(super(e),e.objectMode)throw new TypeError(`${this.constructor.name} streams only work with string and buffer data`);if(this.found=0,this.expect=e.size,typeof this.expect!="number"||this.expect>Number.MAX_SAFE_INTEGER||isNaN(this.expect)||this.expect<0||!isFinite(this.expect)||this.expect!==Math.floor(this.expect))throw new Error("invalid expected size: "+this.expect)}write(e,t,r){let i=Buffer.isBuffer(e)?e:typeof e=="string"?Buffer.from(e,typeof t=="string"?t:"utf8"):e;return Buffer.isBuffer(i)?(this.found+=i.length,this.found>this.expect&&this.emit("error",new Ys(this.found,this.expect)),super.write(e,t,r)):(this.emit("error",new TypeError(`${this.constructor.name} streams only work with string and buffer data`)),!1)}emit(e,...t){return e==="end"&&this.found!==this.expect&&this.emit("error",new Ys(this.found,this.expect)),super.emit(e,...t)}};ci.SizeError=Ys;Vh.exports=ci});var Kh=m((zA,Zh)=>{"use strict";var{Minipass:eE}=ee(),Co=Symbol("type"),ct=Symbol("buffer"),hi=class s{static{o(this,"Blob")}constructor(e,t){this[Co]="";let r=[],i=0;if(e){let a=e,c=Number(a.length);for(let h=0;h<c;h++){let u=a[h],l=u instanceof Buffer?u:ArrayBuffer.isView(u)?Buffer.from(u.buffer,u.byteOffset,u.byteLength):u instanceof ArrayBuffer?Buffer.from(u):u instanceof s?u[ct]:typeof u=="string"?Buffer.from(u):Buffer.from(String(u));i+=l.length,r.push(l)}}this[ct]=Buffer.concat(r,i);let n=t&&t.type!==void 0&&String(t.type).toLowerCase();n&&!/[^\u0020-\u007E]/.test(n)&&(this[Co]=n)}get size(){return this[ct].length}get type(){return this[Co]}text(){return Promise.resolve(this[ct].toString())}arrayBuffer(){let e=this[ct],t=e.byteOffset,r=e.byteLength,i=e.buffer.slice(t,t+r);return Promise.resolve(i)}stream(){return new eE().end(this[ct])}slice(e,t,r){let i=this.size,n=e===void 0?0:e<0?Math.max(i+e,0):Math.min(e,i),a=t===void 0?i:t<0?Math.max(i+t,0):Math.min(t,i),c=Math.max(a-n,0),u=this[ct].slice(n,n+c),l=new s([],{type:r});return l[ct]=u,l}get[Symbol.toStringTag](){return"Blob"}static get BUFFER(){return ct}};Object.defineProperties(hi.prototype,{size:{enumerable:!0},type:{enumerable:!0}});Zh.exports=hi});var xo=m((VA,Yh)=>{"use strict";var Ao=class extends Error{static{o(this,"FetchError")}constructor(e,t,r){super(e),this.code="FETCH_ERROR",r&&Object.assign(this,r),this.errno=this.code,this.type=this.code==="EBADSIZE"&&this.found>this.expect?"max-size":t,this.message=e,Error.captureStackTrace(this,this.constructor)}get name(){return"FetchError"}set name(e){}get[Symbol.toStringTag](){return"FetchError"}};Yh.exports=Ao});var Jh=m((ZA,Xh)=>{Xh.exports={}});var li=m((KA,tu)=>{"use strict";var{Minipass:He}=ee(),Bo=Wh(),eu=Kh(),{BUFFER:tE}=eu,Xs=xo(),No;try{No=Jh().convert}catch{}var ht=Symbol("Body internals"),Mt=Symbol("consumeBody"),ui=class{static{o(this,"Body")}constructor(e,t={}){let{size:r=0,timeout:i=0}=t,n=e==null?null:Qh(e)?Buffer.from(e.toString()):Js(e)||Buffer.isBuffer(e)?e:Object.prototype.toString.call(e)==="[object ArrayBuffer]"?Buffer.from(e):ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength):He.isStream(e)?e:Buffer.from(String(e));this[ht]={body:n,disturbed:!1,error:null},this.size=r,this.timeout=i,He.isStream(n)&&n.on("error",a=>{let c=a.name==="AbortError"?a:new Xs(`Invalid response while trying to fetch ${this.url}: ${a.message}`,"system",a);this[ht].error=c})}get body(){return this[ht].body}get bodyUsed(){return this[ht].disturbed}arrayBuffer(){return this[Mt]().then(e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}blob(){let e=this.headers&&this.headers.get("content-type")||"";return this[Mt]().then(t=>Object.assign(new eu([],{type:e.toLowerCase()}),{[tE]:t}))}async json(){let e=await this[Mt]();try{return JSON.parse(e.toString())}catch(t){throw new Xs(`invalid json response body at ${this.url} reason: ${t.message}`,"invalid-json")}}text(){return this[Mt]().then(e=>e.toString())}buffer(){return this[Mt]()}textConverted(){return this[Mt]().then(e=>sE(e,this.headers))}[Mt](){if(this[ht].disturbed)return Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[ht].disturbed=!0,this[ht].error)return Promise.reject(this[ht].error);if(this.body===null)return Promise.resolve(Buffer.alloc(0));if(Buffer.isBuffer(this.body))return Promise.resolve(this.body);let e=Js(this.body)?this.body.stream():this.body;if(!He.isStream(e))return Promise.resolve(Buffer.alloc(0));let t=this.size&&e instanceof Bo||!this.size&&e instanceof He&&!(e instanceof Bo)?e:this.size?new Bo({size:this.size}):new He,r=this.timeout&&t.writable?setTimeout(()=>{t.emit("error",new Xs(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`,"body-timeout"))},this.timeout):null;return r&&r.unref&&r.unref(),new Promise(i=>{t!==e&&(e.on("error",n=>t.emit("error",n)),e.pipe(t)),i()}).then(()=>t.concat()).then(i=>(clearTimeout(r),i)).catch(i=>{throw clearTimeout(r),i.name==="AbortError"||i.name==="FetchError"?i:i.name==="RangeError"?new Xs(`Could not create Buffer from response body for ${this.url}: ${i.message}`,"system",i):new Xs(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i)})}static clone(e){if(e.bodyUsed)throw new Error("cannot clone body after it is used");let t=e.body;if(He.isStream(t)&&typeof t.getBoundary!="function"){let r=new He,i=new He,n=new He;return r.on("error",a=>{i.emit("error",a),n.emit("error",a)}),t.on("error",a=>r.emit("error",a)),r.pipe(i),r.pipe(n),t.pipe(r),e[ht].body=i,n}else return e.body}static extractContentType(e){return e==null?null:typeof e=="string"?"text/plain;charset=UTF-8":Qh(e)?"application/x-www-form-urlencoded;charset=UTF-8":Js(e)?e.type||null:Buffer.isBuffer(e)||Object.prototype.toString.call(e)==="[object ArrayBuffer]"||ArrayBuffer.isView(e)?null:typeof e.getBoundary=="function"?`multipart/form-data;boundary=${e.getBoundary()}`:He.isStream(e)?null:"text/plain;charset=UTF-8"}static getTotalBytes(e){let{body:t}=e;return t==null?0:Js(t)?t.size:Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&(t._lengthRetrievers&&t._lengthRetrievers.length===0||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}static writeToStream(e,t){let{body:r}=t;return r==null?e.end():Buffer.isBuffer(r)||typeof r=="string"?e.end(r):(Js(r)?r.stream():r).on("error",n=>e.emit("error",n)).pipe(e),e}};Object.defineProperties(ui.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var Qh=o(s=>typeof s!="object"||typeof s.append!="function"||typeof s.delete!="function"||typeof s.get!="function"||typeof s.getAll!="function"||typeof s.has!="function"||typeof s.set!="function"?!1:s.constructor.name==="URLSearchParams"||Object.prototype.toString.call(s)==="[object URLSearchParams]"||typeof s.sort=="function","isURLSearchParams"),Js=o(s=>typeof s=="object"&&typeof s.arrayBuffer=="function"&&typeof s.type=="string"&&typeof s.stream=="function"&&typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&/^(Blob|File)$/.test(s.constructor.name)&&/^(Blob|File)$/.test(s[Symbol.toStringTag]),"isBlob"),sE=o((s,e)=>{if(typeof No!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let t=e&&e.get("content-type"),r="utf-8",i;t&&(i=/charset=([^;]*)/i.exec(t));let n=s.slice(0,1024).toString();return!i&&n&&(i=/<meta.+?charset=(['"])(.+?)\1/i.exec(n)),!i&&n&&(i=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(n),i||(i=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(n),i&&i.pop()),i&&(i=/charset=(.*)/i.exec(i.pop()))),!i&&n&&(i=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(n)),i&&(r=i.pop(),(r==="gb2312"||r==="gbk")&&(r="gb18030")),No(s,"UTF-8",r).toString()},"convertBody");tu.exports=ui});var di=m((XA,iu)=>{"use strict";var ru=/[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Lo=/[^\t\x20-\x7e\x80-\xff]/,Qs=o(s=>{if(s=`${s}`,ru.test(s)||s==="")throw new TypeError(`${s} is not a legal HTTP header name`)},"validateName"),su=o(s=>{if(s=`${s}`,Lo.test(s))throw new TypeError(`${s} is not a legal HTTP header value`)},"validateValue"),us=o((s,e)=>{e=e.toLowerCase();for(let t in s)if(t.toLowerCase()===e)return t},"find"),H=Symbol("map"),fi=class s{static{o(this,"Headers")}constructor(e=void 0){if(this[H]=Object.create(null),e instanceof s){let t=e.raw(),r=Object.keys(t);for(let i of r)for(let n of t[i])this.append(i,n);return}if(e!=null)if(typeof e=="object"){let t=e[Symbol.iterator];if(t!=null){if(typeof t!="function")throw new TypeError("Header pairs must be iterable");let r=[];for(let i of e){if(typeof i!="object"||typeof i[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");let n=Array.from(i);if(n.length!==2)throw new TypeError("Each header pair must be a name/value tuple");r.push(n)}for(let i of r)this.append(i[0],i[1])}else for(let r of Object.keys(e))this.append(r,e[r])}else throw new TypeError("Provided initializer must be an object")}get(e){e=`${e}`,Qs(e);let t=us(this[H],e);return t===void 0?null:this[H][t].join(", ")}forEach(e,t=void 0){let r=ko(this);for(let i=0;i<r.length;i++){let[n,a]=r[i];e.call(t,a,n,this),r=ko(this)}}set(e,t){e=`${e}`,t=`${t}`,Qs(e),su(t);let r=us(this[H],e);this[H][r!==void 0?r:e]=[t]}append(e,t){e=`${e}`,t=`${t}`,Qs(e),su(t);let r=us(this[H],e);r!==void 0?this[H][r].push(t):this[H][e]=[t]}has(e){return e=`${e}`,Qs(e),us(this[H],e)!==void 0}delete(e){e=`${e}`,Qs(e);let t=us(this[H],e);t!==void 0&&delete this[H][t]}raw(){return this[H]}keys(){return new $t(this,"key")}values(){return new $t(this,"value")}[Symbol.iterator](){return new $t(this,"key+value")}entries(){return new $t(this,"key+value")}get[Symbol.toStringTag](){return"Headers"}static exportNodeCompatibleHeaders(e){let t=Object.assign(Object.create(null),e[H]),r=us(e[H],"Host");return r!==void 0&&(t[r]=t[r][0]),t}static createHeadersLenient(e){let t=new s;for(let r of Object.keys(e))if(!ru.test(r))if(Array.isArray(e[r]))for(let i of e[r])Lo.test(i)||(t[H][r]===void 0?t[H][r]=[i]:t[H][r].push(i));else Lo.test(e[r])||(t[H][r]=[e[r]]);return t}};Object.defineProperties(fi.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});var ko=o((s,e="key+value")=>Object.keys(s[H]).sort().map(e==="key"?t=>t.toLowerCase():e==="value"?t=>s[H][t].join(", "):t=>[t.toLowerCase(),s[H][t].join(", ")]),"getHeaders"),Po=Symbol("internal"),$t=class s{static{o(this,"HeadersIterator")}constructor(e,t){this[Po]={target:e,kind:t,index:0}}get[Symbol.toStringTag](){return"HeadersIterator"}next(){if(!this||Object.getPrototypeOf(this)!==s.prototype)throw new TypeError("Value of `this` is not a HeadersIterator");let{target:e,kind:t,index:r}=this[Po],i=ko(e,t),n=i.length;return r>=n?{value:void 0,done:!0}:(this[Po].index++,{value:i[r],done:!1})}};Object.setPrototypeOf($t.prototype,Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));iu.exports=fi});var cu=m((QA,au)=>{"use strict";var rE=require("http"),{STATUS_CODES:iE}=rE,nu=di(),ou=li(),{clone:nE,extractContentType:oE}=ou,ut=Symbol("Response internals"),pi=class s extends ou{static{o(this,"Response")}constructor(e=null,t={}){super(e,t);let r=t.status||200,i=new nu(t.headers);if(e!=null&&!i.has("Content-Type")){let n=oE(e);n&&i.append("Content-Type",n)}this[ut]={url:t.url,status:r,statusText:t.statusText||iE[r],headers:i,counter:t.counter,trailer:Promise.resolve(t.trailer||new nu)}}get trailer(){return this[ut].trailer}get url(){return this[ut].url||""}get status(){return this[ut].status}get ok(){return this[ut].status>=200&&this[ut].status<300}get redirected(){return this[ut].counter>0}get statusText(){return this[ut].statusText}get headers(){return this[ut].headers}clone(){return new s(nE(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,trailer:this.trailer})}get[Symbol.toStringTag](){return"Response"}};au.exports=pi;Object.defineProperties(pi.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var hu=m((tx,aE)=>{aE.exports={name:"minipass-fetch",version:"4.0.1",description:"An implementation of window.fetch in Node.js using Minipass streams",license:"MIT",main:"lib/index.js",scripts:{"test:tls-fixtures":"./test/fixtures/tls/setup.sh",test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{"coverage-map":"map.js","check-coverage":!0,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","@ungap/url-search-params":"^0.2.2","abort-controller":"^3.0.0","abortcontroller-polyfill":"~1.7.3",encoding:"^0.1.13","form-data":"^4.0.0",nock:"^13.2.4",parted:"^0.1.1","string-to-arraybuffer":"^1.0.2",tap:"^16.0.0"},dependencies:{minipass:"^7.0.3","minipass-sized":"^1.0.3",minizlib:"^3.0.1"},optionalDependencies:{encoding:"^0.1.13"},repository:{type:"git",url:"git+https://github.com/npm/minipass-fetch.git"},keywords:["fetch","minipass","node-fetch","window.fetch"],files:["bin/","lib/"],engines:{node:"^18.17.0 || >=20.5.0"},author:"GitHub Inc.",templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.3",publish:"true"}}});var fu=m((sx,lu)=>{"use strict";var{URL:Do}=require("url"),{Minipass:cE}=ee(),Fo=di(),{exportNodeCompatibleHeaders:hE}=Fo,uu=li(),{clone:uE,extractContentType:lE,getTotalBytes:fE}=uu,dE=hu().version,pE=`minipass-fetch/${dE} (+https://github.com/isaacs/minipass-fetch)`,De=Symbol("Request internals"),mi=o(s=>typeof s=="object"&&typeof s[De]=="object","isRequest"),mE=o(s=>{let e=s&&typeof s=="object"&&Object.getPrototypeOf(s);return!!(e&&e.constructor.name==="AbortSignal")},"isAbortSignal"),gi=class s extends uu{static{o(this,"Request")}constructor(e,t={}){let r=mi(e)?new Do(e.url):e&&e.href?new Do(e.href):new Do(`${e}`);mi(e)?t={...e[De],...t}:(!e||typeof e=="string")&&(e={});let i=(t.method||e.method||"GET").toUpperCase(),n=i==="GET"||i==="HEAD";if((t.body!==null&&t.body!==void 0||mi(e)&&e.body!==null)&&n)throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body!==null&&t.body!==void 0?t.body:mi(e)&&e.body!==null?uE(e):null;super(a,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});let c=new Fo(t.headers||e.headers||{});if(a!=null&&!c.has("Content-Type")){let tt=lE(a);tt&&c.append("Content-Type",tt)}let h="signal"in t?t.signal:null;if(h!=null&&!mE(h))throw new TypeError("Expected signal must be an instanceof AbortSignal");let{ca:u,cert:l,ciphers:f,clientCertEngine:d,crl:p,dhparam:y,ecdhCurve:g,family:w,honorCipherOrder:S,key:I,passphrase:T,pfx:_,rejectUnauthorized:O=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0",secureOptions:A,secureProtocol:P,servername:z,sessionIdContext:ue}=t;this[De]={method:i,redirect:t.redirect||e.redirect||"follow",headers:c,parsedURL:r,signal:h,ca:u,cert:l,ciphers:f,clientCertEngine:d,crl:p,dhparam:y,ecdhCurve:g,family:w,honorCipherOrder:S,key:I,passphrase:T,pfx:_,rejectUnauthorized:O,secureOptions:A,secureProtocol:P,servername:z,sessionIdContext:ue},this.follow=t.follow!==void 0?t.follow:e.follow!==void 0?e.follow:20,this.compress=t.compress!==void 0?t.compress:e.compress!==void 0?e.compress:!0,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent}get method(){return this[De].method}get url(){return this[De].parsedURL.toString()}get headers(){return this[De].headers}get redirect(){return this[De].redirect}get signal(){return this[De].signal}clone(){return new s(this)}get[Symbol.toStringTag](){return"Request"}static getNodeRequestOptions(e){let t=e[De].parsedURL,r=new Fo(e[De].headers);if(r.has("Accept")||r.set("Accept","*/*"),!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&cE.isStream(e.body)&&typeof e.body.destroy!="function")throw new Error("Cancellation of streamed requests with AbortSignal is not supported");let i=(e.body===null||e.body===void 0)&&/^(POST|PUT)$/i.test(e.method)?"0":e.body!==null&&e.body!==void 0?fE(e):null;i&&r.set("Content-Length",i+""),r.has("User-Agent")||r.set("User-Agent",pE),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let n=typeof e.agent=="function"?e.agent(t):e.agent;!r.has("Connection")&&!n&&r.set("Connection","close");let{ca:a,cert:c,ciphers:h,clientCertEngine:u,crl:l,dhparam:f,ecdhCurve:d,family:p,honorCipherOrder:y,key:g,passphrase:w,pfx:S,rejectUnauthorized:I,secureOptions:T,secureProtocol:_,servername:O,sessionIdContext:A}=e[De];return{...{auth:t.username||t.password?`${t.username}:${t.password}`:"",host:t.host,hostname:t.hostname,path:`${t.pathname}${t.search}`,port:t.port,protocol:t.protocol},method:e.method,headers:hE(r),agent:n,ca:a,cert:c,ciphers:h,clientCertEngine:u,crl:l,dhparam:f,ecdhCurve:d,family:p,honorCipherOrder:y,key:g,passphrase:w,pfx:S,rejectUnauthorized:I,secureOptions:T,secureProtocol:_,servername:O,sessionIdContext:A,timeout:e.timeout}}};lu.exports=gi;Object.defineProperties(gi.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}})});var pu=m((ix,du)=>{"use strict";var Mo=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.code="FETCH_ABORTED",this.type="aborted",Error.captureStackTrace(this,this.constructor)}get name(){return"AbortError"}set name(e){}};du.exports=Mo});var sr=m((ox,yu)=>{"use strict";var{URL:er}=require("url"),gE=require("http"),yE=require("https"),ls=Dh(),{Minipass:mu}=ee(),EE=li(),{writeToStream:wE,getTotalBytes:SE}=EE,qt=cu(),qo=di(),{createHeadersLenient:gu}=qo,tr=fu(),{getNodeRequestOptions:_E}=tr,Rt=xo(),$o=pu(),lt=o(async(s,e)=>{if(/^data:/.test(s)){let t=new tr(s,e);return Promise.resolve().then(()=>new Promise((r,i)=>{let n,a;try{let{pathname:u,search:l}=new er(s),f=u.split(",");if(f.length<2)throw new Error("invalid data: URI");let d=f.shift(),p=/;base64$/.test(d);n=p?d.slice(0,-7):d;let y=decodeURIComponent(f.join(",")+l);a=p?Buffer.from(y,"base64"):Buffer.from(y)}catch(u){return i(new Rt(`[${t.method}] ${t.url} invalid URL, ${u.message}`,"system",u))}let{signal:c}=t;if(c&&c.aborted)return i(new $o("The user aborted a request."));let h={"Content-Length":a.length};return n&&(h["Content-Type"]=n),r(new qt(a,{headers:h}))}))}return new Promise((t,r)=>{let i=new tr(s,e),n;try{n=_E(i)}catch(y){return r(y)}let a=(n.protocol==="https:"?yE:gE).request,{signal:c}=i,h=null,u=o(()=>{let y=new $o("The user aborted a request.");r(y),mu.isStream(i.body)&&typeof i.body.destroy=="function"&&i.body.destroy(y),h&&h.body&&h.body.emit("error",y)},"abort");if(c&&c.aborted)return u();let l=o(()=>{u(),f()},"abortAndFinalize"),f=o(()=>{d.abort(),c&&c.removeEventListener("abort",l),clearTimeout(p)},"finalize"),d=a(n);c&&c.addEventListener("abort",l);let p=null;i.timeout&&d.once("socket",()=>{p=setTimeout(()=>{r(new Rt(`network timeout at: ${i.url}`,"request-timeout")),f()},i.timeout)}),d.on("error",y=>{d.res&&d.res.emit("error",y),r(new Rt(`request to ${i.url} failed, reason: ${y.message}`,"system",y)),f()}),d.on("response",y=>{clearTimeout(p);let g=gu(y.headers);if(lt.isRedirect(y.statusCode)){let O=g.get("Location"),A=null;try{A=O===null?null:new er(O,i.url).toString()}catch{if(i.redirect!=="manual"){r(new Rt(`uri requested responds with an invalid redirect URL: ${O}`,"invalid-redirect")),f();return}}if(i.redirect==="error"){r(new Rt(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),f();return}else if(i.redirect==="manual"){if(A!==null)try{g.set("Location",A)}catch(P){r(P)}}else if(i.redirect==="follow"&&A!==null){if(i.counter>=i.follow){r(new Rt(`maximum redirect reached at: ${i.url}`,"max-redirect")),f();return}if(y.statusCode!==303&&i.body&&SE(i)===null){r(new Rt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),f();return}i.headers.set("host",new er(A).host);let P={headers:new qo(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout},z=new er(i.url),ue=new er(A);z.hostname!==ue.hostname&&(P.headers.delete("authorization"),P.headers.delete("cookie")),(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&i.method==="POST")&&(P.method="GET",P.body=void 0,P.headers.delete("content-length")),t(lt(new tr(A,P))),f();return}}y.once("end",()=>c&&c.removeEventListener("abort",l));let w=new mu;w.on("error",f),y.on("error",O=>w.emit("error",O)),y.on("data",O=>w.write(O)),y.on("end",()=>w.end());let S={url:i.url,status:y.statusCode,statusText:y.statusMessage,headers:g,size:i.size,timeout:i.timeout,counter:i.counter,trailer:new Promise(O=>y.on("end",()=>O(gu(y.trailers))))},I=g.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||I===null||y.statusCode===204||y.statusCode===304){h=new qt(w,S),t(h);return}let T={flush:ls.constants.Z_SYNC_FLUSH,finishFlush:ls.constants.Z_SYNC_FLUSH};if(I==="gzip"||I==="x-gzip"){let O=new ls.Gunzip(T);h=new qt(w.on("error",A=>O.emit("error",A)).pipe(O),S),t(h);return}if(I==="deflate"||I==="x-deflate"){y.once("data",O=>{let A=(O[0]&15)===8?new ls.Inflate:new ls.InflateRaw;w.on("error",P=>A.emit("error",P)).pipe(A),h=new qt(A,S),t(h)});return}if(I==="br"){try{var _=new ls.BrotliDecompress}catch(O){r(O),f();return}w.on("error",O=>_.emit("error",O)).pipe(_),h=new qt(_,S),t(h);return}h=new qt(w,S),t(h)}),wE(d,i)})},"fetch");yu.exports=lt;lt.isRedirect=s=>s===301||s===302||s===303||s===307||s===308;lt.Headers=qo;lt.Request=tr;lt.Response=qt;lt.FetchError=Rt;lt.AbortError=$o});var wu=m((cx,Eu)=>{var bE=require("dns"),RE=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],OE=o(s=>{let{strictSSL:e,...t}={...s};if(t.method=t.method?t.method.toUpperCase():"GET",e==null?t.rejectUnauthorized=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0":t.rejectUnauthorized=e!==!1,!t.retry)t.retry={retries:0};else if(typeof t.retry=="string"){let r=parseInt(t.retry,10);isFinite(r)?t.retry={retries:r}:t.retry={retries:0}}else typeof t.retry=="number"?t.retry={retries:t.retry}:t.retry={retries:0,...t.retry};return t.dns={ttl:300*1e3,lookup:bE.lookup,...t.dns},t.cache=t.cache||"default",t.cache==="default"&&Object.keys(t.headers||{}).some(i=>RE.includes(i.toLowerCase()))&&(t.cache="no-store"),t.cacheAdditionalHeaders=t.cacheAdditionalHeaders||[],t.cacheManager&&!t.cachePath&&(t.cachePath=t.cacheManager),t},"configureOptions");Eu.exports=OE});var _u=m((lx,Su)=>{"use strict";var vE=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),IE=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),TE=new Set([500,502,503,504]),CE={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},AE={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function ft(s){let e=parseInt(s,10);return isFinite(e)?e:0}o(ft,"toNumberOrZero");function xE(s){return s?TE.has(s.status):!0}o(xE,"isErrorResponse");function Uo(s){let e={};if(!s)return e;let t=s.trim().split(/,/);for(let r of t){let[i,n]=r.split(/=/,2);e[i.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"")}return e}o(Uo,"parseCacheControl");function BE(s){let e=[];for(let t in s){let r=s[t];e.push(r===!0?t:t+"="+r)}if(e.length)return e.join(", ")}o(BE,"formatCacheControl");Su.exports=class{static{o(this,"CachePolicy")}constructor(e,t,{shared:r,cacheHeuristic:i,immutableMinTimeToLive:n,ignoreCargoCult:a,_fromObject:c}={}){if(c){this._fromObject(c);return}if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=r!==!1,this._ignoreCargoCult=!!a,this._cacheHeuristic=i!==void 0?i:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=Uo(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=Uo(e.headers["cache-control"]),this._ignoreCargoCult&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":BE(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&IE.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||vE.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires)}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){return!this.evaluateRequest(e).revalidation}_evaluateRequestHitResult(e){return{response:{headers:this.responseHeaders()},revalidation:e}}_evaluateRequestRevalidation(e,t){return{synchronous:t,headers:this.revalidationHeaders(e)}}_evaluateRequestMissResult(e){return{response:void 0,revalidation:this._evaluateRequestRevalidation(e,!0)}}evaluateRequest(e){if(this._assertRequestHasHeaders(e),this._rescc["must-revalidate"])return this._evaluateRequestMissResult(e);if(!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);let t=Uo(e.headers["cache-control"]);return t["no-cache"]||/no-cache/.test(e.headers.pragma)?this._evaluateRequestMissResult(e):t["max-age"]&&this.age()>ft(t["max-age"])?this._evaluateRequestMissResult(e):t["min-fresh"]&&this.maxAge()-this.age()<ft(t["min-fresh"])?this._evaluateRequestMissResult(e):this.stale()?"max-stale"in t&&(t["max-stale"]===!0||t["max-stale"]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(e,!1)):this._evaluateRequestMissResult(e):this._evaluateRequestHitResult(void 0)}_requestMatches(e,t){return!!((!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&e.method==="HEAD")&&this._varyMatches(e))}_allowsStoringAuthenticated(){return!!(this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"])}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){let t={};for(let r in e)CE[r]||(t[r]=e[r]);if(e.connection){let r=e.connection.trim().split(/\s*,\s*/);for(let i of r)delete t[i]}if(t.warning){let r=t.warning.split(/,/).filter(i=>!/^\s*1[0-9][0-9]/.test(i));r.length?t.warning=r.join(",").trim():delete t.warning}return t}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return ft(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return ft(this._rescc["s-maxage"])}if(this._rescc["max-age"])return ft(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){let r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||r<t?0:Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){let r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),t=e+ft(this._rescc["stale-if-error"]),r=e+ft(this._rescc["stale-while-revalidate"]);return Math.round(Math.max(0,e,t,r)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+ft(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){let e=ft(this._rescc["stale-while-revalidate"]);return e>0&&this.maxAge()+e>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._ignoreCargoCult=!!e.icc,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;if(this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete t["if-modified-since"],t["if-none-match"]){let i=t["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));i.length?t["if-none-match"]=i.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&xE(t))return{policy:this,modified:!1,matches:!0};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;t.status!==void 0&&t.status!=304?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]&&(r=!0);let i={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!r)return{policy:new this.constructor(e,t,i),modified:t.status!=304,matches:!1};let n={};for(let c in this._resHeaders)n[c]=c in t.headers&&!AE[c]?t.headers[c]:this._resHeaders[c];let a=Object.assign({},t,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,a,i),modified:!1,matches:!0}}}});var vu=m((dx,jo)=>{"use strict";jo.exports=Ou;jo.exports.preferredCharsets=Ou;var NE=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function PE(s){for(var e=s.split(","),t=0,r=0;t<e.length;t++){var i=LE(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(PE,"parseAcceptCharset");function LE(s,e){var t=NE.exec(s);if(!t)return null;var r=t[1],i=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){i=parseFloat(c[1]);break}}return{charset:r,q:i,i:e}}o(LE,"parseCharset");function kE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=DE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(kE,"getCharsetPriority");function DE(s,e,t){var r=0;if(e.charset.toLowerCase()===s.toLowerCase())r|=1;else if(e.charset!=="*")return null;return{i:t,o:e.i,q:e.q,s:r}}o(DE,"specify");function Ou(s,e){var t=PE(s===void 0?"*":s||"");if(!e)return t.filter(Ru).sort(bu).map(FE);var r=e.map(o(function(n,a){return kE(n,t,a)},"getPriority"));return r.filter(Ru).sort(bu).map(o(function(n){return e[r.indexOf(n)]},"getCharset"))}o(Ou,"preferredCharsets");function bu(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(bu,"compareSpecs");function FE(s){return s.charset}o(FE,"getFullCharset");function Ru(s){return s.q>0}o(Ru,"isQuality")});var Au=m((mx,Ho)=>{"use strict";Ho.exports=Cu;Ho.exports.preferredEncodings=Cu;var ME=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function $E(s){for(var e=s.split(","),t=!1,r=1,i=0,n=0;i<e.length;i++){var a=qE(e[i].trim(),i);a&&(e[n++]=a,t=t||Tu("identity",a),r=Math.min(r,a.q||1))}return t||(e[n++]={encoding:"identity",q:r,i}),e.length=n,e}o($E,"parseAcceptEncoding");function qE(s,e){var t=ME.exec(s);if(!t)return null;var r=t[1],i=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){i=parseFloat(c[1]);break}}return{encoding:r,q:i,i:e}}o(qE,"parseEncoding");function UE(s,e,t){for(var r={encoding:s,o:-1,q:0,s:0},i=0;i<e.length;i++){var n=Tu(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(UE,"getEncodingPriority");function Tu(s,e,t){var r=0;if(e.encoding.toLowerCase()===s.toLowerCase())r|=1;else if(e.encoding!=="*")return null;return{encoding:s,i:t,o:e.i,q:e.q,s:r}}o(Tu,"specify");function Cu(s,e,t){var r=$E(s||""),i=t?o(function(c,h){if(c.q!==h.q)return h.q-c.q;var u=t.indexOf(c.encoding),l=t.indexOf(h.encoding);return u===-1&&l===-1?h.s-c.s||c.o-h.o||c.i-h.i:u!==-1&&l!==-1?u-l:u===-1?1:-1},"comparator"):jE;if(!e)return r.filter(Iu).sort(i).map(HE);var n=e.map(o(function(c,h){return UE(c,r,h)},"getPriority"));return n.filter(Iu).sort(i).map(o(function(c){return e[n.indexOf(c)]},"getEncoding"))}o(Cu,"preferredEncodings");function jE(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i}o(jE,"compareSpecs");function HE(s){return s.encoding}o(HE,"getFullEncoding");function Iu(s){return s.q>0}o(Iu,"isQuality")});var Lu=m((yx,zo)=>{"use strict";zo.exports=Pu;zo.exports.preferredLanguages=Pu;var zE=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function GE(s){for(var e=s.split(","),t=0,r=0;t<e.length;t++){var i=Nu(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(GE,"parseAcceptLanguage");function Nu(s,e){var t=zE.exec(s);if(!t)return null;var r=t[1],i=t[2],n=r;i&&(n+="-"+i);var a=1;if(t[3])for(var c=t[3].split(";"),h=0;h<c.length;h++){var u=c[h].split("=");u[0]==="q"&&(a=parseFloat(u[1]))}return{prefix:r,suffix:i,q:a,i:e,full:n}}o(Nu,"parseLanguage");function VE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=WE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(VE,"getLanguagePriority");function WE(s,e,t){var r=Nu(s);if(!r)return null;var i=0;if(e.full.toLowerCase()===r.full.toLowerCase())i|=4;else if(e.prefix.toLowerCase()===r.full.toLowerCase())i|=2;else if(e.full.toLowerCase()===r.prefix.toLowerCase())i|=1;else if(e.full!=="*")return null;return{i:t,o:e.i,q:e.q,s:i}}o(WE,"specify");function Pu(s,e){var t=GE(s===void 0?"*":s||"");if(!e)return t.filter(Bu).sort(xu).map(ZE);var r=e.map(o(function(n,a){return VE(n,t,a)},"getPriority"));return r.filter(Bu).sort(xu).map(o(function(n){return e[r.indexOf(n)]},"getLanguage"))}o(Pu,"preferredLanguages");function xu(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(xu,"compareSpecs");function ZE(s){return s.full}o(ZE,"getFullLanguage");function Bu(s){return s.q>0}o(Bu,"isQuality")});var qu=m((wx,Go)=>{"use strict";Go.exports=Mu;Go.exports.preferredMediaTypes=Mu;var KE=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function YE(s){for(var e=tw(s),t=0,r=0;t<e.length;t++){var i=Fu(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(YE,"parseAccept");function Fu(s,e){var t=KE.exec(s);if(!t)return null;var r=Object.create(null),i=1,n=t[2],a=t[1];if(t[3])for(var c=sw(t[3]).map(ew),h=0;h<c.length;h++){var u=c[h],l=u[0].toLowerCase(),f=u[1],d=f&&f[0]==='"'&&f[f.length-1]==='"'?f.slice(1,-1):f;if(l==="q"){i=parseFloat(d);break}r[l]=d}return{type:a,subtype:n,params:r,q:i,i:e}}o(Fu,"parseMediaType");function XE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=JE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(XE,"getMediaTypePriority");function JE(s,e,t){var r=Fu(s),i=0;if(!r)return null;if(e.type.toLowerCase()==r.type.toLowerCase())i|=4;else if(e.type!="*")return null;if(e.subtype.toLowerCase()==r.subtype.toLowerCase())i|=2;else if(e.subtype!="*")return null;var n=Object.keys(e.params);if(n.length>0)if(n.every(function(a){return e.params[a]=="*"||(e.params[a]||"").toLowerCase()==(r.params[a]||"").toLowerCase()}))i|=1;else return null;return{i:t,o:e.i,q:e.q,s:i}}o(JE,"specify");function Mu(s,e){var t=YE(s===void 0?"*/*":s||"");if(!e)return t.filter(Du).sort(ku).map(QE);var r=e.map(o(function(n,a){return XE(n,t,a)},"getPriority"));return r.filter(Du).sort(ku).map(o(function(n){return e[r.indexOf(n)]},"getType"))}o(Mu,"preferredMediaTypes");function ku(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(ku,"compareSpecs");function QE(s){return s.type+"/"+s.subtype}o(QE,"getFullType");function Du(s){return s.q>0}o(Du,"isQuality");function $u(s){for(var e=0,t=0;(t=s.indexOf('"',t))!==-1;)e++,t++;return e}o($u,"quoteCount");function ew(s){var e=s.indexOf("="),t,r;return e===-1?t=s:(t=s.slice(0,e),r=s.slice(e+1)),[t,r]}o(ew,"splitKeyValuePair");function tw(s){for(var e=s.split(","),t=1,r=0;t<e.length;t++)$u(e[r])%2==0?e[++r]=e[t]:e[r]+=","+e[t];return e.length=r+1,e}o(tw,"splitMediaTypes");function sw(s){for(var e=s.split(";"),t=1,r=0;t<e.length;t++)$u(e[r])%2==0?e[++r]=e[t]:e[r]+=";"+e[t];e.length=r+1;for(var t=0;t<e.length;t++)e[t]=e[t].trim();return e}o(sw,"splitParameters")});var Uu=m((_x,Vo)=>{"use strict";var rw=vu(),iw=Au(),nw=Lu(),ow=qu();Vo.exports=k;Vo.exports.Negotiator=k;function k(s){if(!(this instanceof k))return new k(s);this.request=s}o(k,"Negotiator");k.prototype.charset=o(function(e){var t=this.charsets(e);return t&&t[0]},"charset");k.prototype.charsets=o(function(e){return rw(this.request.headers["accept-charset"],e)},"charsets");k.prototype.encoding=o(function(e,t){var r=this.encodings(e,t);return r&&r[0]},"encoding");k.prototype.encodings=o(function(e,t){var r=t||{};return iw(this.request.headers["accept-encoding"],e,r.preferred)},"encodings");k.prototype.language=o(function(e){var t=this.languages(e);return t&&t[0]},"language");k.prototype.languages=o(function(e){return nw(this.request.headers["accept-language"],e)},"languages");k.prototype.mediaType=o(function(e){var t=this.mediaTypes(e);return t&&t[0]},"mediaType");k.prototype.mediaTypes=o(function(e){return ow(this.request.headers.accept,e)},"mediaTypes");k.prototype.preferredCharset=k.prototype.charset;k.prototype.preferredCharsets=k.prototype.charsets;k.prototype.preferredEncoding=k.prototype.encoding;k.prototype.preferredEncodings=k.prototype.encodings;k.prototype.preferredLanguage=k.prototype.language;k.prototype.preferredLanguages=k.prototype.languages;k.prototype.preferredMediaType=k.prototype.mediaType;k.prototype.preferredMediaTypes=k.prototype.mediaTypes});var Ot=m((Rx,ze)=>{"use strict";var ir=require("crypto"),{Minipass:aw}=ee(),Zo=["sha512","sha384","sha256"],Yo=["sha512"],cw=/^[a-z0-9+/]+(?:=?=?)$/i,hw=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,uw=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,lw=/^[\x21-\x7E]+$/,nr=o(s=>s?.length?`?${s.join("?")}`:"","getOptString"),Ko=class extends aw{static{o(this,"IntegrityStream")}#e;#t;#s;constructor(e){super(),this.size=0,this.opts=e,this.#r(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...Yo],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(ir.createHash)}#r(){this.sri=this.opts?.integrity?we(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=nr(this.opts?.options)}on(e,t){return e==="size"&&this.#t?t(this.#t):e==="integrity"&&this.#e?t(this.#e):e==="verified"&&this.#s?t(this.#s):super.on(e,t)}emit(e,t){return e==="end"&&this.#i(),super.emit(e,t)}write(e){return this.size+=e.length,this.hashes.forEach(t=>t.update(e)),super.write(e)}#i(){this.goodSri||this.#r();let e=we(this.hashes.map((r,i)=>`${this.algorithms[i]}-${r.digest("base64")}${this.optString}`).join(" "),this.opts),t=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let r=new Error(`stream size mismatch when checking ${this.sri}.
6
+ Wanted: ${this.expectedSize}
7
+ Found: ${this.size}`);r.code="EBADSIZE",r.found=this.size,r.expected=this.expectedSize,r.sri=this.sri,this.emit("error",r)}else if(this.sri&&!t){let r=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);r.code="EINTEGRITY",r.found=e,r.expected=this.digests,r.algorithm=this.algorithm,r.sri=this.sri,this.emit("error",r)}else this.#t=this.size,this.emit("size",this.size),this.#e=e,this.emit("integrity",e),t&&(this.#s=t,this.emit("verified",t))}},dt=class{static{o(this,"Hash")}get isHash(){return!0}constructor(e,t){let r=t?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let i=this.source.match(r?uw:hw);if(!i||r&&!Zo.includes(i[1]))return;this.algorithm=i[1],this.digest=i[2];let n=i[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,t){let r=we(e,t);if(!r)return!1;if(r.isIntegrity){let i=r.pickAlgorithm(t,[this.algorithm]);if(!i)return!1;let n=r[i].find(a=>a.digest===this.digest);return n||!1}return r.digest===this.digest?r:!1}toString(e){return e?.strict&&!(Zo.includes(this.algorithm)&&this.digest.match(cw)&&this.options.every(t=>t.match(lw)))?"":`${this.algorithm}-${this.digest}${nr(this.options)}`}};function ju(s,e,t,r){let i=s!=="",n=!1,a="",c=r.length-1;for(let u=0;u<c;u++){let l=dt.prototype.toString.call(r[u],t);l&&(n=!0,a+=l,a+=e)}let h=dt.prototype.toString.call(r[c],t);return h&&(n=!0,a+=h),i&&n?s+e+a:s+a}o(ju,"integrityHashToString");var Ut=class{static{o(this,"Integrity")}get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let t=e?.sep||" ",r="";if(e?.strict){t=t.replace(/\S+/g," ");for(let i of Zo)this[i]&&(r=ju(r,t,e,this[i]))}else for(let i of Object.keys(this))r=ju(r,t,e,this[i]);return r}concat(e,t){let r=typeof e=="string"?e:rr(e,t);return we(`${this.toString(t)} ${r}`,t)}hexDigest(){return we(this,{single:!0}).hexDigest()}merge(e,t){let r=we(e,t);for(let i in r)if(this[i]){if(!this[i].find(n=>r[i].find(a=>n.digest===a.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[i]=r[i]}match(e,t){let r=we(e,t);if(!r)return!1;let i=r.pickAlgorithm(t,Object.keys(this));return!!i&&this[i]&&r[i]&&this[i].find(n=>r[i].find(a=>n.digest===a.digest))||!1}pickAlgorithm(e,t){let r=e?.pickAlgorithm||ww,i=Object.keys(this).filter(n=>t?.length?t.includes(n):!0);return i.length?i.reduce((n,a)=>r(n,a)||n):null}};ze.exports.parse=we;function we(s,e){if(!s)return null;if(typeof s=="string")return Wo(s,e);if(s.algorithm&&s.digest){let t=new Ut;return t[s.algorithm]=[s],Wo(rr(t,e),e)}else return Wo(rr(s,e),e)}o(we,"parse");function Wo(s,e){if(e?.single)return new dt(s,e);let t=s.trim().split(/\s+/).reduce((r,i)=>{let n=new dt(i,e);if(n.algorithm&&n.digest){let a=n.algorithm;r[a]||(r[a]=[]),r[a].push(n)}return r},new Ut);return t.isEmpty()?null:t}o(Wo,"_parse");ze.exports.stringify=rr;function rr(s,e){return s.algorithm&&s.digest?dt.prototype.toString.call(s,e):typeof s=="string"?rr(we(s,e),e):Ut.prototype.toString.call(s,e)}o(rr,"stringify");ze.exports.fromHex=fw;function fw(s,e,t){let r=nr(t?.options);return we(`${e}-${Buffer.from(s,"hex").toString("base64")}${r}`,t)}o(fw,"fromHex");ze.exports.fromData=dw;function dw(s,e){let t=e?.algorithms||[...Yo],r=nr(e?.options);return t.reduce((i,n)=>{let a=ir.createHash(n).update(s).digest("base64"),c=new dt(`${n}-${a}${r}`,e);if(c.algorithm&&c.digest){let h=c.algorithm;i[h]||(i[h]=[]),i[h].push(c)}return i},new Ut)}o(dw,"fromData");ze.exports.fromStream=pw;function pw(s,e){let t=Xo(e);return new Promise((r,i)=>{s.pipe(t),s.on("error",i),t.on("error",i);let n;t.on("integrity",a=>{n=a}),t.on("end",()=>r(n)),t.resume()})}o(pw,"fromStream");ze.exports.checkData=mw;function mw(s,e,t){if(e=we(e,t),!e||!Object.keys(e).length){if(t?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let r=e.pickAlgorithm(t),i=ir.createHash(r).update(s).digest("base64"),n=we({algorithm:r,digest:i}),a=n.match(e,t);if(t=t||{},a||!t.error)return a;if(typeof t.size=="number"&&s.length!==t.size){let c=new Error(`data size mismatch when checking ${e}.
8
+ Wanted: ${t.size}
9
+ Found: ${s.length}`);throw c.code="EBADSIZE",c.found=s.length,c.expected=t.size,c.sri=e,c}else{let c=new Error(`Integrity checksum failed when using ${r}: Wanted ${e}, but got ${n}. (${s.length} bytes)`);throw c.code="EINTEGRITY",c.found=n,c.expected=e,c.algorithm=r,c.sri=e,c}}o(mw,"checkData");ze.exports.checkStream=gw;function gw(s,e,t){if(t=t||Object.create(null),t.integrity=e,e=we(e,t),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let r=Xo(t);return new Promise((i,n)=>{s.pipe(r),s.on("error",n),r.on("error",n);let a;r.on("verified",c=>{a=c}),r.on("end",()=>i(a)),r.resume()})}o(gw,"checkStream");ze.exports.integrityStream=Xo;function Xo(s=Object.create(null)){return new Ko(s)}o(Xo,"integrityStream");ze.exports.create=yw;function yw(s){let e=s?.algorithms||[...Yo],t=nr(s?.options),r=e.map(ir.createHash);return{update:o(function(i,n){return r.forEach(a=>a.update(i,n)),this},"update"),digest:o(function(){return e.reduce((n,a)=>{let c=r.shift().digest("base64"),h=new dt(`${a}-${c}${t}`,s);if(h.algorithm&&h.digest){let u=h.algorithm;n[u]||(n[u]=[]),n[u].push(h)}return n},new Ut)},"digest")}}o(yw,"createIntegrity");var Ew=ir.getHashes(),Hu=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(s=>Ew.includes(s));function ww(s,e){return Hu.indexOf(s.toLowerCase())>=Hu.indexOf(e.toLowerCase())?s:e}o(ww,"getPrioritizedHash")});var Qo=m((vx,Zu)=>{var zu=_u(),Gu=Uu(),Sw=Ot(),Vu={shared:!1,ignoreCargoCult:!0},_w={status:200,headers:{}},fs=o(s=>{let e={method:s.method,url:s.url,headers:{},compress:s.compress};return s.headers.forEach((t,r)=>{e.headers[r]=t}),e},"requestObject"),Wu=o(s=>{let e={status:s.status,headers:{}};return s.headers.forEach((t,r)=>{e.headers[r]=t}),e},"responseObject"),Jo=class{static{o(this,"CachePolicy")}constructor({entry:e,request:t,response:r,options:i}){this.entry=e,this.request=fs(t),this.response=Wu(r),this.options=i,this.policy=new zu(this.request,this.response,Vu),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(e,t){return!t.cachePath||t.cache==="no-store"||!["GET","HEAD"].includes(e.method)?!1:new zu(fs(e),_w,Vu).storable()}satisfies(e){let t=fs(e);if(this.request.headers.host!==t.headers.host||this.request.compress!==t.compress)return!1;let r=new Gu(this.request),i=new Gu(t);return JSON.stringify(r.mediaTypes())!==JSON.stringify(i.mediaTypes())||JSON.stringify(r.languages())!==JSON.stringify(i.languages())||JSON.stringify(r.encodings())!==JSON.stringify(i.encodings())?!1:this.options.integrity?Sw.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(e){let t=fs(e);return t.method="GET",!this.policy.satisfiesWithoutRevalidation(t)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let t=fs(e);return this.policy.revalidationHeaders(t)}revalidated(e,t){let r=fs(e),i=Wu(t);return!this.policy.revalidatedPolicy(r,i).modified}};Zu.exports=Jo});var Yu=m((Tx,Ku)=>{var ea=class extends Error{static{o(this,"NotCachedError")}constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};Ku.exports={NotCachedError:ea}});var yi=m((Ax,el)=>{var bw=ai(),Xu=Symbol("_flush"),Ju=Symbol("_flushed"),Qu=Symbol("_flushing"),ta=class extends bw{static{o(this,"Flush")}constructor(e={}){if(typeof e=="function"&&(e={flush:e}),super(e),typeof e.flush!="function"&&typeof this.flush!="function")throw new TypeError("must provide flush function in options");this[Xu]=e.flush||this.flush}emit(e,...t){if(e!=="end"&&e!=="finish"||this[Ju])return super.emit(e,...t);if(this[Qu])return;this[Qu]=!0;let r=o(n=>{this[Ju]=!0,n?super.emit("error",n):super.emit("end")},"afterFlush"),i=this[Xu](r);i&&i.then&&i.then(()=>r(),n=>r(n))}};el.exports=ta});var na=m((Bx,ia)=>{var{Minipass:tl}=ee(),ds=Symbol("_data"),ps=Symbol("_length"),sa=class extends tl{static{o(this,"Collect")}constructor(e){super(e),this[ds]=[],this[ps]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[ds].push(i),this[ps]+=i.length,r&&r(),!0}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let i=Buffer.concat(this[ds],this[ps]);return super.write(i),super.end(r)}};ia.exports=sa;var ra=class extends tl{static{o(this,"CollectPassThrough")}constructor(e){super(e),this[ds]=[],this[ps]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[ds].push(i),this[ps]+=i.length,super.write(e,t,r)}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let i=Buffer.concat(this[ds],this[ps]);return this.emit("collect",i),super.end(r)}};ia.exports.PassThrough=ra});var ms=m((Px,nl)=>{var Rw=ai(),Ow=require("events"),vw=o(s=>s&&s instanceof Ow&&(typeof s.pipe=="function"||typeof s.write=="function"&&typeof s.end=="function"),"isStream"),jt=Symbol("_head"),Se=Symbol("_tail"),oa=Symbol("_linkStreams"),aa=Symbol("_setHead"),ca=Symbol("_setTail"),sl=Symbol("_onError"),rl=Symbol("_onData"),ha=Symbol("_onEnd"),il=Symbol("_onDrain"),Ei=Symbol("_streams"),ua=class extends Rw{static{o(this,"Pipeline")}constructor(e,...t){vw(e)&&(t.unshift(e),e={}),super(e),this[Ei]=[],t.length&&this.push(...t)}[oa](e){return e.reduce((t,r)=>(t.on("error",i=>r.emit("error",i)),t.pipe(r),r))}push(...e){this[Ei].push(...e),this[Se]&&e.unshift(this[Se]);let t=this[oa](e);this[ca](t),this[jt]||this[aa](e[0])}unshift(...e){this[Ei].unshift(...e),this[jt]&&e.push(this[jt]);let t=this[oa](e);this[aa](e[0]),this[Se]||this[ca](t)}destroy(e){return this[Ei].forEach(t=>typeof t.destroy=="function"&&t.destroy()),super.destroy(e)}[ca](e){this[Se]=e,e.on("error",t=>this[sl](e,t)),e.on("data",t=>this[rl](e,t)),e.on("end",()=>this[ha](e)),e.on("finish",()=>this[ha](e))}[sl](e,t){e===this[Se]&&this.emit("error",t)}[rl](e,t){e===this[Se]&&super.write(t)}[ha](e){e===this[Se]&&super.end()}pause(){return super.pause(),this[Se]&&this[Se].pause&&this[Se].pause()}emit(e,...t){return e==="resume"&&this[Se]&&this[Se].resume&&this[Se].resume(),super.emit(e,...t)}[aa](e){this[jt]=e,e.on("drain",()=>this[il](e))}[il](e){e===this[jt]&&this.emit("drain")}write(e,t,r){return this[jt].write(e,t,r)&&(this.flowing||this.buffer.length===0)}end(e,t,r){return this[jt].end(e,t,r),this}};nl.exports=ua});var ol=m((kx,la)=>{(function(){var s;function e(t,r){var i=this instanceof e?this:s;if(i.reset(r),typeof t=="string"&&t.length>0&&i.hash(t),i!==this)return i}o(e,"MurmurHash3"),e.prototype.hash=function(t){var r,i,n,a,c;switch(c=t.length,this.len+=c,i=this.k1,n=0,this.rem){case 0:i^=c>n?t.charCodeAt(n++)&65535:0;case 1:i^=c>n?(t.charCodeAt(n++)&65535)<<8:0;case 2:i^=c>n?(t.charCodeAt(n++)&65535)<<16:0;case 3:i^=c>n?(t.charCodeAt(n)&255)<<24:0,i^=c>n?(t.charCodeAt(n++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(r=this.h1;i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,r^=i,r=r<<13|r>>>19,r=r*5+3864292196&4294967295,!(n>=c);)i=t.charCodeAt(n++)&65535^(t.charCodeAt(n++)&65535)<<8^(t.charCodeAt(n++)&65535)<<16,a=t.charCodeAt(n++),i^=(a&255)<<24^(a&65280)>>8;switch(i=0,this.rem){case 3:i^=(t.charCodeAt(n+2)&65535)<<16;case 2:i^=(t.charCodeAt(n+1)&65535)<<8;case 1:i^=t.charCodeAt(n)&65535}this.h1=r}return this.k1=i,this},e.prototype.result=function(){var t,r;return t=this.k1,r=this.h1,t>0&&(t=t*11601+(t&65535)*3432906752&4294967295,t=t<<15|t>>>17,t=t*13715+(t&65535)*461832192&4294967295,r^=t),r^=this.len,r^=r>>>16,r=r*51819+(r&65535)*2246770688&4294967295,r^=r>>>13,r=r*44597+(r&65535)*3266445312&4294967295,r^=r>>>16,r>>>0},e.prototype.reset=function(t){return this.h1=typeof t=="number"?t:0,this.rem=this.k1=this.len=0,this},s=new e,typeof la<"u"?la.exports=e:this.MurmurHash3=e})()});var cl=m((Fx,al)=>{"use strict";var Iw=ol();al.exports=function(s){if(s){var e=new Iw(s);return("00000000"+e.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}});var fa=m((Mx,hl)=>{var Tw=require("path"),Cw=cl();hl.exports=function(s,e,t){return Tw.join(s,(e?e+"-":"")+Cw(t))}});var da=m(($x,Aw)=>{Aw.exports={name:"cacache",version:"20.0.1","cache-version":{content:"2",index:"5"},description:"Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",snap:"tap",coverage:"tap","test-docker":'docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test',lint:"npm run eslint",npmclilint:"npmcli-lint",lintfix:"npm run eslint -- --fix",postsnap:"npm run lintfix --",postlint:"template-oss-check",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},repository:{type:"git",url:"git+https://github.com/npm/cacache.git"},keywords:["cache","caching","content-addressable","sri","sri hash","subresource integrity","cache","storage","store","file store","filesystem","disk cache","disk storage"],license:"ISC",dependencies:{"@npmcli/fs":"^4.0.0","fs-minipass":"^3.0.0",glob:"^11.0.3","lru-cache":"^11.1.0",minipass:"^7.0.3","minipass-collect":"^2.0.1","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4","p-map":"^7.0.2",ssri:"^12.0.0","unique-filename":"^4.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",windowsCI:!1,version:"4.25.0",publish:"true"},author:"GitHub Inc.",tap:{"nyc-arg":["--exclude","tap-snapshots/**"]}}});var pa=m((qx,ul)=>{"use strict";ul.exports=xw;function xw(s){return[s.slice(0,2),s.slice(2,4),s.slice(4)]}o(xw,"hashToSegments")});var gs=m((jx,ma)=>{"use strict";var Bw=da()["cache-version"].content,Nw=pa(),ll=require("path"),Pw=Ot();ma.exports=Lw;function Lw(s,e){let t=Pw.parse(e,{single:!0});return ll.join(fl(s),t.algorithm,...Nw(t.hexDigest()))}o(Lw,"contentPath");ma.exports.contentDir=fl;function fl(s){return ll.join(s,`content-v${Bw}`)}o(fl,"contentDir")});var ga=m((zx,dl)=>{var kw=o((s,{copy:e,wrap:t})=>{let r={};if(s&&typeof s=="object")for(let i of e)s[i]!==void 0&&(r[i]=s[i]);else r[t]=s;return r},"getOptions");dl.exports=kw});var or=m((Vx,pl)=>{"use strict";var Dw="2.0.0",Fw=Number.MAX_SAFE_INTEGER||9007199254740991,Mw=16,$w=250,qw=["major","premajor","minor","preminor","patch","prepatch","prerelease"];pl.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Mw,MAX_SAFE_BUILD_LENGTH:$w,MAX_SAFE_INTEGER:Fw,RELEASE_TYPES:qw,SEMVER_SPEC_VERSION:Dw,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var ar=m((Wx,ml)=>{"use strict";var Uw=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...s)=>{}:()=>{};ml.exports=Uw});var ys=m((Ge,gl)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ya,MAX_SAFE_BUILD_LENGTH:jw,MAX_LENGTH:Hw}=or(),zw=ar();Ge=gl.exports={};var Gw=Ge.re=[],Vw=Ge.safeRe=[],b=Ge.src=[],Ww=Ge.safeSrc=[],R=Ge.t={},Zw=0,Ea="[a-zA-Z0-9-]",Kw=[["\\s",1],["\\d",Hw],[Ea,jw]],Yw=o(s=>{for(let[e,t]of Kw)s=s.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return s},"makeSafeRegex"),C=o((s,e,t)=>{let r=Yw(e),i=Zw++;zw(s,i,e),R[s]=i,b[i]=e,Ww[i]=r,Gw[i]=new RegExp(e,t?"g":void 0),Vw[i]=new RegExp(r,t?"g":void 0)},"createToken");C("NUMERICIDENTIFIER","0|[1-9]\\d*");C("NUMERICIDENTIFIERLOOSE","\\d+");C("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ea}*`);C("MAINVERSION",`(${b[R.NUMERICIDENTIFIER]})\\.(${b[R.NUMERICIDENTIFIER]})\\.(${b[R.NUMERICIDENTIFIER]})`);C("MAINVERSIONLOOSE",`(${b[R.NUMERICIDENTIFIERLOOSE]})\\.(${b[R.NUMERICIDENTIFIERLOOSE]})\\.(${b[R.NUMERICIDENTIFIERLOOSE]})`);C("PRERELEASEIDENTIFIER",`(?:${b[R.NONNUMERICIDENTIFIER]}|${b[R.NUMERICIDENTIFIER]})`);C("PRERELEASEIDENTIFIERLOOSE",`(?:${b[R.NONNUMERICIDENTIFIER]}|${b[R.NUMERICIDENTIFIERLOOSE]})`);C("PRERELEASE",`(?:-(${b[R.PRERELEASEIDENTIFIER]}(?:\\.${b[R.PRERELEASEIDENTIFIER]})*))`);C("PRERELEASELOOSE",`(?:-?(${b[R.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${b[R.PRERELEASEIDENTIFIERLOOSE]})*))`);C("BUILDIDENTIFIER",`${Ea}+`);C("BUILD",`(?:\\+(${b[R.BUILDIDENTIFIER]}(?:\\.${b[R.BUILDIDENTIFIER]})*))`);C("FULLPLAIN",`v?${b[R.MAINVERSION]}${b[R.PRERELEASE]}?${b[R.BUILD]}?`);C("FULL",`^${b[R.FULLPLAIN]}$`);C("LOOSEPLAIN",`[v=\\s]*${b[R.MAINVERSIONLOOSE]}${b[R.PRERELEASELOOSE]}?${b[R.BUILD]}?`);C("LOOSE",`^${b[R.LOOSEPLAIN]}$`);C("GTLT","((?:<|>)?=?)");C("XRANGEIDENTIFIERLOOSE",`${b[R.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);C("XRANGEIDENTIFIER",`${b[R.NUMERICIDENTIFIER]}|x|X|\\*`);C("XRANGEPLAIN",`[v=\\s]*(${b[R.XRANGEIDENTIFIER]})(?:\\.(${b[R.XRANGEIDENTIFIER]})(?:\\.(${b[R.XRANGEIDENTIFIER]})(?:${b[R.PRERELEASE]})?${b[R.BUILD]}?)?)?`);C("XRANGEPLAINLOOSE",`[v=\\s]*(${b[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[R.XRANGEIDENTIFIERLOOSE]})(?:\\.(${b[R.XRANGEIDENTIFIERLOOSE]})(?:${b[R.PRERELEASELOOSE]})?${b[R.BUILD]}?)?)?`);C("XRANGE",`^${b[R.GTLT]}\\s*${b[R.XRANGEPLAIN]}$`);C("XRANGELOOSE",`^${b[R.GTLT]}\\s*${b[R.XRANGEPLAINLOOSE]}$`);C("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ya}})(?:\\.(\\d{1,${ya}}))?(?:\\.(\\d{1,${ya}}))?`);C("COERCE",`${b[R.COERCEPLAIN]}(?:$|[^\\d])`);C("COERCEFULL",b[R.COERCEPLAIN]+`(?:${b[R.PRERELEASE]})?(?:${b[R.BUILD]})?(?:$|[^\\d])`);C("COERCERTL",b[R.COERCE],!0);C("COERCERTLFULL",b[R.COERCEFULL],!0);C("LONETILDE","(?:~>?)");C("TILDETRIM",`(\\s*)${b[R.LONETILDE]}\\s+`,!0);Ge.tildeTrimReplace="$1~";C("TILDE",`^${b[R.LONETILDE]}${b[R.XRANGEPLAIN]}$`);C("TILDELOOSE",`^${b[R.LONETILDE]}${b[R.XRANGEPLAINLOOSE]}$`);C("LONECARET","(?:\\^)");C("CARETTRIM",`(\\s*)${b[R.LONECARET]}\\s+`,!0);Ge.caretTrimReplace="$1^";C("CARET",`^${b[R.LONECARET]}${b[R.XRANGEPLAIN]}$`);C("CARETLOOSE",`^${b[R.LONECARET]}${b[R.XRANGEPLAINLOOSE]}$`);C("COMPARATORLOOSE",`^${b[R.GTLT]}\\s*(${b[R.LOOSEPLAIN]})$|^$`);C("COMPARATOR",`^${b[R.GTLT]}\\s*(${b[R.FULLPLAIN]})$|^$`);C("COMPARATORTRIM",`(\\s*)${b[R.GTLT]}\\s*(${b[R.LOOSEPLAIN]}|${b[R.XRANGEPLAIN]})`,!0);Ge.comparatorTrimReplace="$1$2$3";C("HYPHENRANGE",`^\\s*(${b[R.XRANGEPLAIN]})\\s+-\\s+(${b[R.XRANGEPLAIN]})\\s*$`);C("HYPHENRANGELOOSE",`^\\s*(${b[R.XRANGEPLAINLOOSE]})\\s+-\\s+(${b[R.XRANGEPLAINLOOSE]})\\s*$`);C("STAR","(<|>)?=?\\s*\\*");C("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");C("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var wi=m((Kx,yl)=>{"use strict";var Xw=Object.freeze({loose:!0}),Jw=Object.freeze({}),Qw=o(s=>s?typeof s!="object"?Xw:s:Jw,"parseOptions");yl.exports=Qw});var wa=m((Xx,Sl)=>{"use strict";var El=/^[0-9]+$/,wl=o((s,e)=>{let t=El.test(s),r=El.test(e);return t&&r&&(s=+s,e=+e),s===e?0:t&&!r?-1:r&&!t?1:s<e?-1:1},"compareIdentifiers"),eS=o((s,e)=>wl(e,s),"rcompareIdentifiers");Sl.exports={compareIdentifiers:wl,rcompareIdentifiers:eS}});var re=m((Qx,bl)=>{"use strict";var Si=ar(),{MAX_LENGTH:_l,MAX_SAFE_INTEGER:_i}=or(),{safeRe:bi,t:Ri}=ys(),tS=wi(),{compareIdentifiers:Es}=wa(),Sa=class s{static{o(this,"SemVer")}constructor(e,t){if(t=tS(t),e instanceof s){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>_l)throw new TypeError(`version is longer than ${_l} characters`);Si("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?bi[Ri.LOOSE]:bi[Ri.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>_i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<_i)return n}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Si("SemVer.compare",this.version,this.options,e),!(e instanceof s)){if(typeof e=="string"&&e===this.version)return 0;e=new s(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),Es(this.major,e.major)||Es(this.minor,e.minor)||Es(this.patch,e.patch)}comparePre(e){if(e instanceof s||(e=new s(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(Si("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Es(r,i)}while(++t)}compareBuild(e){e instanceof s||(e=new s(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(Si("build compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Es(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?bi[Ri.PRERELEASELOOSE]:bi[Ri.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let n=[t,i];r===!1&&(n=[t]),Es(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};bl.exports=Sa});var Ht=m((t1,Ol)=>{"use strict";var Rl=re(),sS=o((s,e,t=!1)=>{if(s instanceof Rl)return s;try{return new Rl(s,e)}catch(r){if(!t)return null;throw r}},"parse");Ol.exports=sS});var Il=m((r1,vl)=>{"use strict";var rS=Ht(),iS=o((s,e)=>{let t=rS(s,e);return t?t.version:null},"valid");vl.exports=iS});var Cl=m((n1,Tl)=>{"use strict";var nS=Ht(),oS=o((s,e)=>{let t=nS(s.trim().replace(/^[=v]+/,""),e);return t?t.version:null},"clean");Tl.exports=oS});var Bl=m((a1,xl)=>{"use strict";var Al=re(),aS=o((s,e,t,r,i)=>{typeof t=="string"&&(i=r,r=t,t=void 0);try{return new Al(s instanceof Al?s.version:s,t).inc(e,r,i).version}catch{return null}},"inc");xl.exports=aS});var Ll=m((h1,Pl)=>{"use strict";var Nl=Ht(),cS=o((s,e)=>{let t=Nl(s,null,!0),r=Nl(e,null,!0),i=t.compare(r);if(i===0)return null;let n=i>0,a=n?t:r,c=n?r:t,h=!!a.prerelease.length;if(!!c.prerelease.length&&!h){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let l=h?"pre":"";return t.major!==r.major?l+"major":t.minor!==r.minor?l+"minor":t.patch!==r.patch?l+"patch":"prerelease"},"diff");Pl.exports=cS});var Dl=m((l1,kl)=>{"use strict";var hS=re(),uS=o((s,e)=>new hS(s,e).major,"major");kl.exports=uS});var Ml=m((d1,Fl)=>{"use strict";var lS=re(),fS=o((s,e)=>new lS(s,e).minor,"minor");Fl.exports=fS});var ql=m((m1,$l)=>{"use strict";var dS=re(),pS=o((s,e)=>new dS(s,e).patch,"patch");$l.exports=pS});var jl=m((y1,Ul)=>{"use strict";var mS=Ht(),gS=o((s,e)=>{let t=mS(s,e);return t&&t.prerelease.length?t.prerelease:null},"prerelease");Ul.exports=gS});var Oe=m((w1,zl)=>{"use strict";var Hl=re(),yS=o((s,e,t)=>new Hl(s,t).compare(new Hl(e,t)),"compare");zl.exports=yS});var Vl=m((_1,Gl)=>{"use strict";var ES=Oe(),wS=o((s,e,t)=>ES(e,s,t),"rcompare");Gl.exports=wS});var Zl=m((R1,Wl)=>{"use strict";var SS=Oe(),_S=o((s,e)=>SS(s,e,!0),"compareLoose");Wl.exports=_S});var Oi=m((v1,Yl)=>{"use strict";var Kl=re(),bS=o((s,e,t)=>{let r=new Kl(s,t),i=new Kl(e,t);return r.compare(i)||r.compareBuild(i)},"compareBuild");Yl.exports=bS});var Jl=m((T1,Xl)=>{"use strict";var RS=Oi(),OS=o((s,e)=>s.sort((t,r)=>RS(t,r,e)),"sort");Xl.exports=OS});var ef=m((A1,Ql)=>{"use strict";var vS=Oi(),IS=o((s,e)=>s.sort((t,r)=>vS(r,t,e)),"rsort");Ql.exports=IS});var cr=m((B1,tf)=>{"use strict";var TS=Oe(),CS=o((s,e,t)=>TS(s,e,t)>0,"gt");tf.exports=CS});var vi=m((P1,sf)=>{"use strict";var AS=Oe(),xS=o((s,e,t)=>AS(s,e,t)<0,"lt");sf.exports=xS});var _a=m((k1,rf)=>{"use strict";var BS=Oe(),NS=o((s,e,t)=>BS(s,e,t)===0,"eq");rf.exports=NS});var ba=m((F1,nf)=>{"use strict";var PS=Oe(),LS=o((s,e,t)=>PS(s,e,t)!==0,"neq");nf.exports=LS});var Ii=m(($1,of)=>{"use strict";var kS=Oe(),DS=o((s,e,t)=>kS(s,e,t)>=0,"gte");of.exports=DS});var Ti=m((U1,af)=>{"use strict";var FS=Oe(),MS=o((s,e,t)=>FS(s,e,t)<=0,"lte");af.exports=MS});var Ra=m((H1,cf)=>{"use strict";var $S=_a(),qS=ba(),US=cr(),jS=Ii(),HS=vi(),zS=Ti(),GS=o((s,e,t,r)=>{switch(e){case"===":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s===t;case"!==":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s!==t;case"":case"=":case"==":return $S(s,t,r);case"!=":return qS(s,t,r);case">":return US(s,t,r);case">=":return jS(s,t,r);case"<":return HS(s,t,r);case"<=":return zS(s,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");cf.exports=GS});var uf=m((G1,hf)=>{"use strict";var VS=re(),WS=Ht(),{safeRe:Ci,t:Ai}=ys(),ZS=o((s,e)=>{if(s instanceof VS)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;e=e||{};let t=null;if(!e.rtl)t=s.match(e.includePrerelease?Ci[Ai.COERCEFULL]:Ci[Ai.COERCE]);else{let h=e.includePrerelease?Ci[Ai.COERCERTLFULL]:Ci[Ai.COERCERTL],u;for(;(u=h.exec(s))&&(!t||t.index+t[0].length!==s.length);)(!t||u.index+u[0].length!==t.index+t[0].length)&&(t=u),h.lastIndex=u.index+u[1].length+u[2].length;h.lastIndex=-1}if(t===null)return null;let r=t[2],i=t[3]||"0",n=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return WS(`${r}.${i}.${n}${a}${c}`,e)},"coerce");hf.exports=ZS});var ff=m((W1,lf)=>{"use strict";var Oa=class{static{o(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};lf.exports=Oa});var ve=m((K1,gf)=>{"use strict";var KS=/\s+/g,va=class s{static{o(this,"Range")}constructor(e,t){if(t=XS(t),e instanceof s)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new s(e.raw,t);if(e instanceof Ia)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(KS," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!pf(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&i_(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r<t.length;r++)r>0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&s_)|(this.options.loose&&r_))+":"+e,i=df.get(r);if(i)return i;let n=this.options.loose,a=n?fe[ae.HYPHENRANGELOOSE]:fe[ae.HYPHENRANGE];e=e.replace(a,p_(this.options.includePrerelease)),q("hyphen replace",e),e=e.replace(fe[ae.COMPARATORTRIM],QS),q("comparator trim",e),e=e.replace(fe[ae.TILDETRIM],e_),q("tilde trim",e),e=e.replace(fe[ae.CARETTRIM],t_),q("caret trim",e);let c=e.split(" ").map(f=>n_(f,this.options)).join(" ").split(/\s+/).map(f=>d_(f,this.options));n&&(c=c.filter(f=>(q("loose invalid filter",f,this.options),!!f.match(fe[ae.COMPARATORLOOSE])))),q("range list",c);let h=new Map,u=c.map(f=>new Ia(f,this.options));for(let f of u){if(pf(f))return[f];h.set(f.value,f)}h.size>1&&h.has("")&&h.delete("");let l=[...h.values()];return df.set(r,l),l}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Range is required");return this.set.some(r=>mf(r,t)&&e.set.some(i=>mf(i,t)&&r.every(n=>i.every(a=>n.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new JS(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(m_(this.set[t],e,this.options))return!0;return!1}};gf.exports=va;var YS=ff(),df=new YS,XS=wi(),Ia=hr(),q=ar(),JS=re(),{safeRe:fe,t:ae,comparatorTrimReplace:QS,tildeTrimReplace:e_,caretTrimReplace:t_}=ys(),{FLAG_INCLUDE_PRERELEASE:s_,FLAG_LOOSE:r_}=or(),pf=o(s=>s.value==="<0.0.0-0","isNullSet"),i_=o(s=>s.value==="","isAny"),mf=o((s,e)=>{let t=!0,r=s.slice(),i=r.pop();for(;t&&r.length;)t=r.every(n=>i.intersects(n,e)),i=r.pop();return t},"isSatisfiable"),n_=o((s,e)=>(q("comp",s,e),s=c_(s,e),q("caret",s),s=o_(s,e),q("tildes",s),s=u_(s,e),q("xrange",s),s=f_(s,e),q("stars",s),s),"parseComparator"),ce=o(s=>!s||s.toLowerCase()==="x"||s==="*","isX"),o_=o((s,e)=>s.trim().split(/\s+/).map(t=>a_(t,e)).join(" "),"replaceTildes"),a_=o((s,e)=>{let t=e.loose?fe[ae.TILDELOOSE]:fe[ae.TILDE];return s.replace(t,(r,i,n,a,c)=>{q("tilde",s,r,i,n,a,c);let h;return ce(i)?h="":ce(n)?h=`>=${i}.0.0 <${+i+1}.0.0-0`:ce(a)?h=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:c?(q("replaceTilde pr",c),h=`>=${i}.${n}.${a}-${c} <${i}.${+n+1}.0-0`):h=`>=${i}.${n}.${a} <${i}.${+n+1}.0-0`,q("tilde return",h),h})},"replaceTilde"),c_=o((s,e)=>s.trim().split(/\s+/).map(t=>h_(t,e)).join(" "),"replaceCarets"),h_=o((s,e)=>{q("caret",s,e);let t=e.loose?fe[ae.CARETLOOSE]:fe[ae.CARET],r=e.includePrerelease?"-0":"";return s.replace(t,(i,n,a,c,h)=>{q("caret",s,i,n,a,c,h);let u;return ce(n)?u="":ce(a)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:ce(c)?n==="0"?u=`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:h?(q("replaceCaret pr",h),n==="0"?a==="0"?u=`>=${n}.${a}.${c}-${h} <${n}.${a}.${+c+1}-0`:u=`>=${n}.${a}.${c}-${h} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.${c}-${h} <${+n+1}.0.0-0`):(q("no pr"),n==="0"?a==="0"?u=`>=${n}.${a}.${c}${r} <${n}.${a}.${+c+1}-0`:u=`>=${n}.${a}.${c}${r} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.${c} <${+n+1}.0.0-0`),q("caret return",u),u})},"replaceCaret"),u_=o((s,e)=>(q("replaceXRanges",s,e),s.split(/\s+/).map(t=>l_(t,e)).join(" ")),"replaceXRanges"),l_=o((s,e)=>{s=s.trim();let t=e.loose?fe[ae.XRANGELOOSE]:fe[ae.XRANGE];return s.replace(t,(r,i,n,a,c,h)=>{q("xRange",s,r,i,n,a,c,h);let u=ce(n),l=u||ce(a),f=l||ce(c),d=f;return i==="="&&d&&(i=""),h=e.includePrerelease?"-0":"",u?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&d?(l&&(a=0),c=0,i===">"?(i=">=",l?(n=+n+1,a=0,c=0):(a=+a+1,c=0)):i==="<="&&(i="<",l?n=+n+1:a=+a+1),i==="<"&&(h="-0"),r=`${i+n}.${a}.${c}${h}`):l?r=`>=${n}.0.0${h} <${+n+1}.0.0-0`:f&&(r=`>=${n}.${a}.0${h} <${n}.${+a+1}.0-0`),q("xRange return",r),r})},"replaceXRange"),f_=o((s,e)=>(q("replaceStars",s,e),s.trim().replace(fe[ae.STAR],"")),"replaceStars"),d_=o((s,e)=>(q("replaceGTE0",s,e),s.trim().replace(fe[e.includePrerelease?ae.GTE0PRE:ae.GTE0],"")),"replaceGTE0"),p_=o(s=>(e,t,r,i,n,a,c,h,u,l,f,d)=>(ce(r)?t="":ce(i)?t=`>=${r}.0.0${s?"-0":""}`:ce(n)?t=`>=${r}.${i}.0${s?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${s?"-0":""}`,ce(u)?h="":ce(l)?h=`<${+u+1}.0.0-0`:ce(f)?h=`<${u}.${+l+1}.0-0`:d?h=`<=${u}.${l}.${f}-${d}`:s?h=`<${u}.${l}.${+f+1}-0`:h=`<=${h}`,`${t} ${h}`.trim()),"hyphenReplace"),m_=o((s,e,t)=>{for(let r=0;r<s.length;r++)if(!s[r].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let r=0;r<s.length;r++)if(q(s[r].semver),s[r].semver!==Ia.ANY&&s[r].semver.prerelease.length>0){let i=s[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},"testSet")});var hr=m((X1,bf)=>{"use strict";var ur=Symbol("SemVer ANY"),Aa=class s{static{o(this,"Comparator")}static get ANY(){return ur}constructor(e,t){if(t=yf(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Ca("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ur?this.value="":this.value=this.operator+this.semver.version,Ca("comp",this)}parse(e){let t=this.options.loose?Ef[wf.COMPARATORLOOSE]:Ef[wf.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new Sf(r[2],this.options.loose):this.semver=ur}toString(){return this.value}test(e){if(Ca("Comparator.test",e,this.options.loose),this.semver===ur||e===ur)return!0;if(typeof e=="string")try{e=new Sf(e,this.options)}catch{return!1}return Ta(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new _f(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new _f(this.value,t).test(e.semver):(t=yf(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Ta(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Ta(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};bf.exports=Aa;var yf=wi(),{safeRe:Ef,t:wf}=ys(),Ta=Ra(),Ca=ar(),Sf=re(),_f=ve()});var lr=m((Q1,Rf)=>{"use strict";var g_=ve(),y_=o((s,e,t)=>{try{e=new g_(e,t)}catch{return!1}return e.test(s)},"satisfies");Rf.exports=y_});var vf=m((tB,Of)=>{"use strict";var E_=ve(),w_=o((s,e)=>new E_(s,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");Of.exports=w_});var Tf=m((rB,If)=>{"use strict";var S_=re(),__=ve(),b_=o((s,e,t)=>{let r=null,i=null,n=null;try{n=new __(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!r||i.compare(a)===-1)&&(r=a,i=new S_(r,t))}),r},"maxSatisfying");If.exports=b_});var Af=m((nB,Cf)=>{"use strict";var R_=re(),O_=ve(),v_=o((s,e,t)=>{let r=null,i=null,n=null;try{n=new O_(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!r||i.compare(a)===1)&&(r=a,i=new R_(r,t))}),r},"minSatisfying");Cf.exports=v_});var Nf=m((aB,Bf)=>{"use strict";var xa=re(),I_=ve(),xf=cr(),T_=o((s,e)=>{s=new I_(s,e);let t=new xa("0.0.0");if(s.test(t)||(t=new xa("0.0.0-0"),s.test(t)))return t;t=null;for(let r=0;r<s.set.length;++r){let i=s.set[r],n=null;i.forEach(a=>{let c=new xa(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!n||xf(c,n))&&(n=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),n&&(!t||xf(t,n))&&(t=n)}return t&&s.test(t)?t:null},"minVersion");Bf.exports=T_});var Lf=m((hB,Pf)=>{"use strict";var C_=ve(),A_=o((s,e)=>{try{return new C_(s,e).range||"*"}catch{return null}},"validRange");Pf.exports=A_});var xi=m((lB,Mf)=>{"use strict";var x_=re(),Ff=hr(),{ANY:B_}=Ff,N_=ve(),P_=lr(),kf=cr(),Df=vi(),L_=Ti(),k_=Ii(),D_=o((s,e,t,r)=>{s=new x_(s,r),e=new N_(e,r);let i,n,a,c,h;switch(t){case">":i=kf,n=L_,a=Df,c=">",h=">=";break;case"<":i=Df,n=k_,a=kf,c="<",h="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(P_(s,e,r))return!1;for(let u=0;u<e.set.length;++u){let l=e.set[u],f=null,d=null;if(l.forEach(p=>{p.semver===B_&&(p=new Ff(">=0.0.0")),f=f||p,d=d||p,i(p.semver,f.semver,r)?f=p:a(p.semver,d.semver,r)&&(d=p)}),f.operator===c||f.operator===h||(!d.operator||d.operator===c)&&n(s,d.semver))return!1;if(d.operator===h&&a(s,d.semver))return!1}return!0},"outside");Mf.exports=D_});var qf=m((dB,$f)=>{"use strict";var F_=xi(),M_=o((s,e,t)=>F_(s,e,">",t),"gtr");$f.exports=M_});var jf=m((mB,Uf)=>{"use strict";var $_=xi(),q_=o((s,e,t)=>$_(s,e,"<",t),"ltr");Uf.exports=q_});var Gf=m((yB,zf)=>{"use strict";var Hf=ve(),U_=o((s,e,t)=>(s=new Hf(s,t),e=new Hf(e,t),s.intersects(e,t)),"intersects");zf.exports=U_});var Wf=m((wB,Vf)=>{"use strict";var j_=lr(),H_=Oe();Vf.exports=(s,e,t)=>{let r=[],i=null,n=null,a=s.sort((l,f)=>H_(l,f,t));for(let l of a)j_(l,e,t)?(n=l,i||(i=l)):(n&&r.push([i,n]),n=null,i=null);i&&r.push([i,null]);let c=[];for(let[l,f]of r)l===f?c.push(l):!f&&l===a[0]?c.push("*"):f?l===a[0]?c.push(`<=${f}`):c.push(`${l} - ${f}`):c.push(`>=${l}`);let h=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return h.length<u.length?h:e}});var Qf=m((SB,Jf)=>{"use strict";var Zf=ve(),Na=hr(),{ANY:Ba}=Na,fr=lr(),Pa=Oe(),z_=o((s,e,t={})=>{if(s===e)return!0;s=new Zf(s,t),e=new Zf(e,t);let r=!1;e:for(let i of s.set){for(let n of e.set){let a=V_(i,n,t);if(r=r||a!==null,a)continue e}if(r)return!1}return!0},"subset"),G_=[new Na(">=0.0.0-0")],Kf=[new Na(">=0.0.0")],V_=o((s,e,t)=>{if(s===e)return!0;if(s.length===1&&s[0].semver===Ba){if(e.length===1&&e[0].semver===Ba)return!0;t.includePrerelease?s=G_:s=Kf}if(e.length===1&&e[0].semver===Ba){if(t.includePrerelease)return!0;e=Kf}let r=new Set,i,n;for(let p of s)p.operator===">"||p.operator===">="?i=Yf(i,p,t):p.operator==="<"||p.operator==="<="?n=Xf(n,p,t):r.add(p.semver);if(r.size>1)return null;let a;if(i&&n){if(a=Pa(i.semver,n.semver,t),a>0)return null;if(a===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of r){if(i&&!fr(p,String(i),t)||n&&!fr(p,String(n),t))return null;for(let y of e)if(!fr(p,String(y),t))return!1;return!0}let c,h,u,l,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,d=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of e){if(l=l||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(c=Yf(i,p,t),c===p&&c!==i)return!1}else if(i.operator===">="&&!fr(i.semver,String(p),t))return!1}if(n){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(h=Xf(n,p,t),h===p&&h!==n)return!1}else if(n.operator==="<="&&!fr(n.semver,String(p),t))return!1}if(!p.operator&&(n||i)&&a!==0)return!1}return!(i&&u&&!n&&a!==0||n&&l&&!i&&a!==0||d||f)},"simpleSubset"),Yf=o((s,e,t)=>{if(!s)return e;let r=Pa(s.semver,e.semver,t);return r>0?s:r<0||e.operator===">"&&s.operator===">="?e:s},"higherGT"),Xf=o((s,e,t)=>{if(!s)return e;let r=Pa(s.semver,e.semver,t);return r<0?s:r>0||e.operator==="<"&&s.operator==="<="?e:s},"lowerLT");Jf.exports=z_});var rd=m((bB,sd)=>{"use strict";var La=ys(),ed=or(),W_=re(),td=wa(),Z_=Ht(),K_=Il(),Y_=Cl(),X_=Bl(),J_=Ll(),Q_=Dl(),e0=Ml(),t0=ql(),s0=jl(),r0=Oe(),i0=Vl(),n0=Zl(),o0=Oi(),a0=Jl(),c0=ef(),h0=cr(),u0=vi(),l0=_a(),f0=ba(),d0=Ii(),p0=Ti(),m0=Ra(),g0=uf(),y0=hr(),E0=ve(),w0=lr(),S0=vf(),_0=Tf(),b0=Af(),R0=Nf(),O0=Lf(),v0=xi(),I0=qf(),T0=jf(),C0=Gf(),A0=Wf(),x0=Qf();sd.exports={parse:Z_,valid:K_,clean:Y_,inc:X_,diff:J_,major:Q_,minor:e0,patch:t0,prerelease:s0,compare:r0,rcompare:i0,compareLoose:n0,compareBuild:o0,sort:a0,rsort:c0,gt:h0,lt:u0,eq:l0,neq:f0,gte:d0,lte:p0,cmp:m0,coerce:g0,Comparator:y0,Range:E0,satisfies:w0,toComparators:S0,maxSatisfying:_0,minSatisfying:b0,minVersion:R0,validRange:O0,outside:v0,gtr:I0,ltr:T0,intersects:C0,simplifyRange:A0,subset:x0,SemVer:W_,re:La.re,src:La.src,tokens:La.t,SEMVER_SPEC_VERSION:ed.SEMVER_SPEC_VERSION,RELEASE_TYPES:ed.RELEASE_TYPES,compareIdentifiers:td.compareIdentifiers,rcompareIdentifiers:td.rcompareIdentifiers}});var nd=m((RB,id)=>{var B0=rd(),N0=o(s=>B0.satisfies(process.version,s,{includePrerelease:!0}),"satisfies");id.exports={satisfies:N0}});var od=m((TB,Da)=>{"use strict";var{inspect:P0}=require("util"),ka=class{static{o(this,"SystemError")}constructor(e,t,r){let i=`${t}: ${r.syscall} returned ${r.code} (${r.message})`;r.path!==void 0&&(i+=` ${r.path}`),r.dest!==void 0&&(i+=` => ${r.dest}`),this.code=e,Object.defineProperties(this,{name:{value:"SystemError",enumerable:!1,writable:!0,configurable:!0},message:{value:i,enumerable:!1,writable:!0,configurable:!0},info:{value:r,enumerable:!0,configurable:!0,writable:!1},errno:{get(){return r.errno},set(n){r.errno=n},enumerable:!0,configurable:!0},syscall:{get(){return r.syscall},set(n){r.syscall=n},enumerable:!0,configurable:!0}}),r.path!==void 0&&Object.defineProperty(this,"path",{get(){return r.path},set(n){r.path=n},enumerable:!0,configurable:!0}),r.dest!==void 0&&Object.defineProperty(this,"dest",{get(){return r.dest},set(n){r.dest=n},enumerable:!0,configurable:!0})}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return P0(this,{...t,getters:!0,customInspect:!1})}};function pt(s,e){Da.exports[s]=class extends ka{static{o(this,"NodeError")}constructor(r){super(s,e,r)}}}o(pt,"E");pt("ERR_FS_CP_DIR_TO_NON_DIR","Cannot overwrite directory with non-directory");pt("ERR_FS_CP_EEXIST","Target already exists");pt("ERR_FS_CP_EINVAL","Invalid src or dest");pt("ERR_FS_CP_FIFO_PIPE","Cannot copy a FIFO pipe");pt("ERR_FS_CP_NON_DIR_TO_DIR","Cannot overwrite non-directory with directory");pt("ERR_FS_CP_SOCKET","Cannot copy a socket file");pt("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY","Cannot overwrite symlink in subdirectory of self");pt("ERR_FS_CP_UNKNOWN","Cannot copy an unknown file type");pt("ERR_FS_EISDIR","Path is a directory");Da.exports.ERR_INVALID_ARG_TYPE=class extends Error{static{o(this,"ERR_INVALID_ARG_TYPE")}constructor(e,t,r){super(),this.code="ERR_INVALID_ARG_TYPE",this.message=`The ${e} argument must be ${t}. Received ${typeof r}`}}});var vd=m((AB,Od)=>{"use strict";var{ERR_FS_CP_DIR_TO_NON_DIR:L0,ERR_FS_CP_EEXIST:k0,ERR_FS_CP_EINVAL:Bi,ERR_FS_CP_FIFO_PIPE:D0,ERR_FS_CP_NON_DIR_TO_DIR:F0,ERR_FS_CP_SOCKET:M0,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:$0,ERR_FS_CP_UNKNOWN:q0,ERR_FS_EISDIR:U0,ERR_INVALID_ARG_TYPE:j0}=od(),{constants:{errno:{EEXIST:H0,EISDIR:z0,EINVAL:mt,ENOTDIR:G0}}}=require("os"),{chmod:V0,copyFile:W0,lstat:md,mkdir:gd,readdir:Z0,readlink:ad,stat:ws,symlink:Fa,unlink:yd,utimes:K0}=require("fs/promises"),{dirname:dr,isAbsolute:cd,join:hd,parse:Y0,resolve:pr,sep:X0,toNamespacedPath:ud}=require("path"),{fileURLToPath:J0}=require("url"),Q0={dereference:!1,errorOnExist:!1,filter:void 0,force:!0,preserveTimestamps:!1,recursive:!1};async function eb(s,e,t){if(t!=null&&typeof t!="object")throw new j0("options",["Object"],t);return tb(ud(ld(s)),ud(ld(e)),{...Q0,...t})}o(eb,"cp");function ld(s){return s!=null&&s.href&&s.origin?J0(s):s}o(ld,"getValidatedPath");async function tb(s,e,t){t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended","TimestampPrecisionWarning");let r=await Ed(s,e,t),{srcStat:i,destStat:n}=r;return await Sd(s,i,e),t.filter?_d(fd,n,s,e,t):fd(n,s,e,t)}o(tb,"cpFn");async function Ed(s,e,t){let{0:r,1:i}=await sb(s,e,t);if(i){if(wd(r,i))throw new Bi({message:"src and dest cannot be the same",path:e,syscall:"cp",errno:mt});if(r.isDirectory()&&!i.isDirectory())throw new L0({message:`cannot overwrite directory ${s} with non-directory ${e}`,path:e,syscall:"cp",errno:z0});if(!r.isDirectory()&&i.isDirectory())throw new F0({message:`cannot overwrite non-directory ${s} with directory ${e}`,path:e,syscall:"cp",errno:G0})}if(r.isDirectory()&&Ma(s,e))throw new Bi({message:`cannot copy ${s} to a subdirectory of self ${e}`,path:e,syscall:"cp",errno:mt});return{srcStat:r,destStat:i}}o(Ed,"checkPaths");function wd(s,e){return e.ino&&e.dev&&e.ino===s.ino&&e.dev===s.dev}o(wd,"areIdentical");function sb(s,e,t){let r=t.dereference?i=>ws(i,{bigint:!0}):i=>md(i,{bigint:!0});return Promise.all([r(s),r(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})])}o(sb,"getStats");async function fd(s,e,t,r){let i=dr(t);return await rb(i)||await gd(i,{recursive:!0}),Ni(s,e,t,r)}o(fd,"checkParentDir");function rb(s){return ws(s).then(()=>!0,e=>e.code==="ENOENT"?!1:Promise.reject(e))}o(rb,"pathExists");async function Sd(s,e,t){let r=pr(dr(s)),i=pr(dr(t));if(i===r||i===Y0(i).root)return;let n;try{n=await ws(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(wd(e,n))throw new Bi({message:`cannot copy ${s} to a subdirectory of self ${t}`,path:t,syscall:"cp",errno:mt});return Sd(s,e,i)}o(Sd,"checkParentPaths");var dd=o(s=>pr(s).split(X0).filter(Boolean),"normalizePathToArray");function Ma(s,e){let t=dd(s),r=dd(e);return t.every((i,n)=>r[n]===i)}o(Ma,"isSrcSubdir");async function _d(s,e,t,r,i,n){if(await i.filter(t,r))return s(e,t,r,i,n)}o(_d,"handleFilter");function ib(s,e,t,r){return r.filter?_d(Ni,s,e,t,r):Ni(s,e,t,r)}o(ib,"startCopy");async function Ni(s,e,t,r){let n=await(r.dereference?ws:md)(e);if(n.isDirectory()&&r.recursive)return lb(n,s,e,t,r);if(n.isDirectory())throw new U0({message:`${e} is a directory (not copied)`,path:e,syscall:"cp",errno:mt});if(n.isFile()||n.isCharacterDevice()||n.isBlockDevice())return nb(n,s,e,t,r);if(n.isSymbolicLink())return db(s,e,t);throw n.isSocket()?new M0({message:`cannot copy a socket file: ${t}`,path:t,syscall:"cp",errno:mt}):n.isFIFO()?new D0({message:`cannot copy a FIFO pipe: ${t}`,path:t,syscall:"cp",errno:mt}):new q0({message:`cannot copy an unknown file type: ${t}`,path:t,syscall:"cp",errno:mt})}o(Ni,"getStatsForCopy");function nb(s,e,t,r,i){return e?ob(s,t,r,i):bd(s,t,r,i)}o(nb,"onFile");async function ob(s,e,t,r){if(r.force)return await yd(t),bd(s,e,t,r);if(r.errorOnExist)throw new k0({message:`${t} already exists`,path:t,syscall:"cp",errno:H0})}o(ob,"mayCopyFile");async function bd(s,e,t,r){return await W0(e,t),r.preserveTimestamps?ab(s.mode,e,t):Pi(t,s.mode)}o(bd,"_copyFile");async function ab(s,e,t){return cb(s)&&await hb(t,s),pd(s,e,t)}o(ab,"handleTimestampsAndMode");function cb(s){return(s&128)===0}o(cb,"fileIsNotWritable");function hb(s,e){return Pi(s,e|128)}o(hb,"makeFileWritable");async function pd(s,e,t){return await ub(e,t),Pi(t,s)}o(pd,"setDestTimestampsAndMode");function Pi(s,e){return V0(s,e)}o(Pi,"setDestMode");async function ub(s,e){let t=await ws(s);return K0(e,t.atime,t.mtime)}o(ub,"setDestTimestamps");function lb(s,e,t,r,i){return e?Rd(t,r,i):fb(s.mode,t,r,i)}o(lb,"onDir");async function fb(s,e,t,r){return await gd(t),await Rd(e,t,r),Pi(t,s)}o(fb,"mkDirAndCopy");async function Rd(s,e,t){let r=await Z0(s);for(let i=0;i<r.length;i++){let n=r[i],a=hd(s,n),c=hd(e,n),{destStat:h}=await Ed(a,c,t);await ib(h,a,c,t)}}o(Rd,"copyDir");async function db(s,e,t){let r=await ad(e);if(cd(r)||(r=pr(dr(e),r)),!s)return Fa(r,t);let i;try{i=await ad(t)}catch(a){if(a.code==="EINVAL"||a.code==="UNKNOWN")return Fa(r,t);throw a}if(cd(i)||(i=pr(dr(t),i)),Ma(r,i))throw new Bi({message:`cannot copy ${r} to a subdirectory of self ${i}`,path:t,syscall:"cp",errno:mt});if((await ws(e)).isDirectory()&&Ma(i,r))throw new $0({message:`cannot overwrite ${i} with ${r}`,path:t,syscall:"cp",errno:mt});return pb(r,t)}o(db,"onLink");async function pb(s,e){return await yd(e),Fa(s,e)}o(pb,"copyLink");Od.exports=eb});var Td=m((BB,Id)=>{var mb=require("fs/promises"),gb=ga(),yb=nd(),Eb=vd(),wb=yb.satisfies(">=16.7.0"),Sb=o(async(s,e,t)=>{let r=gb(t,{copy:["dereference","errorOnExist","filter","force","preserveTimestamps","recursive"]});return wb?mb.cp(s,e,r):Eb(s,e,r)},"cp");Id.exports=Sb});var Ad=m((PB,Cd)=>{var{join:_b,sep:bb}=require("path"),Rb=ga(),{mkdir:Ob,mkdtemp:vb,rm:Ib}=require("fs/promises"),Tb=o(async(s,e,t)=>{let r=Rb(t,{copy:["tmpPrefix"]});await Ob(s,{recursive:!0});let i=await vb(_b(`${s}${bb}`,r.tmpPrefix||"")),n,a;try{a=await e(i)}catch(c){n=c}try{await Ib(i,{force:!0,recursive:!0})}catch{}if(n)throw n;return a},"withTempDir");Cd.exports=Tb});var Pd=m((kB,Nd)=>{var{readdir:xd}=require("fs/promises"),{join:Bd}=require("path"),Cb=o(async s=>{let e=[];for(let t of await xd(s))if(t.startsWith("@"))for(let r of await xd(Bd(s,t)))e.push(Bd(t,r));else e.push(t);return e},"readdirScoped");Nd.exports=Cb});var $d=m((FB,Md)=>{var{dirname:Ld,join:kd,resolve:Dd,relative:Ab,isAbsolute:xb}=require("path"),Ve=require("fs/promises"),Bb=o(async s=>{try{return await Ve.access(s),!0}catch(e){return e.code!=="ENOENT"}},"pathExists"),Fd=o(async(s,e,t={},r=!0,i=[])=>{if(!s||!e)throw new TypeError("`source` and `destination` file required");if(t={overwrite:!0,...t},!t.overwrite&&await Bb(e))throw new Error(`The destination file exists: ${e}`);await Ve.mkdir(Ld(e),{recursive:!0});try{await Ve.rename(s,e)}catch(n){if(n.code==="EXDEV"||n.code==="EPERM"){let a=await Ve.lstat(s);if(a.isDirectory()){let c=await Ve.readdir(s);await Promise.all(c.map(h=>Fd(kd(s,h),kd(e,h),t,!1,i)))}else a.isSymbolicLink()?i.push({source:s,destination:e}):await Ve.copyFile(s,e)}else throw n}r&&(await Promise.all(i.map(async({source:n,destination:a})=>{let c=await Ve.readlink(n);xb(c)&&(c=Dd(a,Ab(n,c)));let h="file";try{h=await Ve.stat(Dd(Ld(n),c)),h.isDirectory()&&(h="junction")}catch{}await Ve.symlink(c,a,h)})),await Ve.rm(s,{recursive:!0,force:!0}))},"moveFile");Md.exports=Fd});var Li=m(($B,qd)=>{"use strict";var Nb=Td(),Pb=Ad(),Lb=Pd(),kb=$d();qd.exports={cp:Nb,withTempDir:Pb,readdirScoped:Lb,moveFile:kb}});var ki={};Oy(ki,{default:()=>Ud,pMapIterable:()=>Db,pMapSkip:()=>mr});async function Ud(s,e,{concurrency:t=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:i}={}){return new Promise((n,a)=>{if(s[Symbol.iterator]===void 0&&s[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof s})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);let c=[],h=[],u=new Map,l=!1,f=!1,d=!1,p=0,y=0,g=s[Symbol.iterator]===void 0?s[Symbol.asyncIterator]():s[Symbol.iterator](),w=o(()=>{T(i.reason)},"signalListener"),S=o(()=>{i?.removeEventListener("abort",w)},"cleanup"),I=o(O=>{n(O),S()},"resolve"),T=o(O=>{l=!0,f=!0,a(O),S()},"reject");i&&(i.aborted&&T(i.reason),i.addEventListener("abort",w,{once:!0}));let _=o(async()=>{if(f)return;let O=await g.next(),A=y;if(y++,O.done){if(d=!0,p===0&&!f){if(!r&&h.length>0){T(new AggregateError(h));return}if(f=!0,u.size===0){I(c);return}let P=[];for(let[z,ue]of c.entries())u.get(z)!==mr&&P.push(ue);I(P)}return}p++,(async()=>{try{let P=await O.value;if(f)return;let z=await e(P,A);z===mr&&u.set(A,z),c[A]=z,p--,await _()}catch(P){if(r)T(P);else{h.push(P),p--;try{await _()}catch(z){T(z)}}}})()},"next");(async()=>{for(let O=0;O<t;O++){try{await _()}catch(A){T(A);break}if(d||l)break}})()})}function Db(s,e,{concurrency:t=Number.POSITIVE_INFINITY,backpressure:r=t}={}){if(s[Symbol.iterator]===void 0&&s[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof s})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);if(!(Number.isSafeInteger(r)&&r>=t||r===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${t}) and up or \`Infinity\`, got \`${r}\` (${typeof r})`);return{async*[Symbol.asyncIterator](){let i=s[Symbol.asyncIterator]===void 0?s[Symbol.iterator]():s[Symbol.asyncIterator](),n=[],a=0,c=!1,h=0;function u(){if(c||!(a<t&&n.length<r))return;let l=(async()=>{let{done:f,value:d}=await i.next();if(f)return{done:!0};a++,u();try{let p=await e(await d,h++);if(a--,p===mr){let y=n.indexOf(l);y>0&&n.splice(y,1)}return u(),{done:!1,value:p}}catch(p){return c=!0,{error:p}}})();n.push(l)}for(o(u,"trySpawn"),u();n.length>0;){let{error:l,done:f,value:d}=await n[0];if(n.shift(),l)throw l;if(f)return;u(),d!==mr&&(yield d)}}}}var mr,Di=Ry(()=>{o(Ud,"pMap");o(Db,"pMapIterable");mr=Symbol("skip")});var Ss=m((jB,_e)=>{"use strict";var Fb=require("crypto"),{appendFile:Mb,mkdir:Ua,readFile:$b,readdir:qb,rm:jd,writeFile:Ub}=require("fs/promises"),{Minipass:jb}=ee(),We=require("path"),Hb=Ot(),zb=fa(),Gb=gs(),Vb=pa(),Wb=da()["cache-version"].index,{moveFile:Zb}=Li(),$a=5;_e.exports.NotFoundError=class extends Error{static{o(this,"NotFoundError")}constructor(e,t){super(`No cache entry for ${t} found in ${e}`),this.code="ENOENT",this.cache=e,this.key=t}};_e.exports.compact=Kb;async function Kb(s,e,t,r={}){let i=gr(s,e),n=await Fi(i),a=[];for(let d=n.length-1;d>=0;--d){let p=n[d];if(p.integrity===null&&!r.validateEntry)break;(!r.validateEntry||r.validateEntry(p)===!0)&&(a.length===0||!a.find(y=>t(y,p)))&&a.unshift(p)}let c=`
10
+ `+a.map(d=>{let p=JSON.stringify(d);return`${Mi(p)} ${p}`}).join(`
11
+ `),h=o(async()=>{let d=zb(We.join(s,"tmp"),r.tmpPrefix);return await Ua(We.dirname(d),{recursive:!0}),{target:d,moved:!1}},"setup"),u=o(async d=>{if(!d.moved)return jd(d.target,{recursive:!0,force:!0})},"teardown"),l=o(async d=>{await Ub(d.target,c,{flag:"wx"}),await Ua(We.dirname(i),{recursive:!0}),await Zb(d.target,i),d.moved=!0},"write"),f=await h();try{await l(f)}finally{await u(f)}return a.reverse().map(d=>$i(s,d,!0))}o(Kb,"compact");_e.exports.insert=Hd;async function Hd(s,e,t,r={}){let{metadata:i,size:n,time:a}=r,c=gr(s,e),h={key:e,integrity:t&&Hb.stringify(t),time:a||Date.now(),size:n,metadata:i};try{await Ua(We.dirname(c),{recursive:!0});let u=JSON.stringify(h);await Mb(c,`
12
+ ${Mi(u)} ${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return $i(s,h)}o(Hd,"insert");_e.exports.find=Yb;async function Yb(s,e){let t=gr(s,e);try{return(await Fi(t)).reduce((i,n)=>n&&n.key===e?$i(s,n):i,null)}catch(r){if(r.code==="ENOENT")return null;throw r}}o(Yb,"find");_e.exports.delete=Xb;function Xb(s,e,t={}){if(!t.removeFully)return Hd(s,e,null,t);let r=gr(s,e);return jd(r,{recursive:!0,force:!0})}o(Xb,"del");_e.exports.lsStream=zd;function zd(s){let e=ja(s),t=new jb({objectMode:!0});return Promise.resolve().then(async()=>{let{default:r}=await Promise.resolve().then(()=>(Di(),ki)),i=await qa(e);return await r(i,async n=>{let a=We.join(e,n),c=await qa(a);await r(c,async h=>{let u=We.join(a,h),l=await qa(u);await r(l,async f=>{let d=We.join(u,f);try{let y=(await Fi(d)).reduce((g,w)=>(g.set(w.key,w),g),new Map);for(let g of y.values()){let w=$i(s,g);w&&t.write(w)}}catch(p){if(p.code==="ENOENT")return;throw p}},{concurrency:$a})},{concurrency:$a})},{concurrency:$a}),t.end(),t}).catch(r=>t.emit("error",r)),t}o(zd,"lsStream");_e.exports.ls=Jb;async function Jb(s){return(await zd(s).collect()).reduce((t,r)=>(t[r.key]=r,t),{})}o(Jb,"ls");_e.exports.bucketEntries=Fi;async function Fi(s,e){let t=await $b(s,"utf8");return Qb(t,e)}o(Fi,"bucketEntries");function Qb(s){let e=[];return s.split(`
13
+ `).forEach(t=>{if(!t)return;let r=t.split(" ");if(!r[1]||Mi(r[1])!==r[0])return;let i;try{i=JSON.parse(r[1])}catch{}i&&e.push(i)}),e}o(Qb,"_bucketEntries");_e.exports.bucketDir=ja;function ja(s){return We.join(s,`index-v${Wb}`)}o(ja,"bucketDir");_e.exports.bucketPath=gr;function gr(s,e){let t=Gd(e);return We.join.apply(We,[ja(s)].concat(Vb(t)))}o(gr,"bucketPath");_e.exports.hashKey=Gd;function Gd(s){return Vd(s,"sha256")}o(Gd,"hashKey");_e.exports.hashEntry=Mi;function Mi(s){return Vd(s,"sha1")}o(Mi,"hashEntry");function Vd(s,e){return Fb.createHash(e).update(s).digest("hex")}o(Vd,"hash");function $i(s,e,t){return!e.integrity&&!t?null:{key:e.key,integrity:e.integrity,path:e.integrity?Gb(s,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o($i,"formatEntry");function qa(s){return qb(s).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(qa,"readdirOrEmpty")});var bs=m(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.LRUCache=void 0;var eR=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Zd=new Set,Ha=typeof process=="object"&&process?process:{},Kd=o((s,e,t,r)=>{typeof Ha.emitWarning=="function"&&Ha.emitWarning(s,e,t,r)},"emitWarning"),qi=globalThis.AbortController,Wd=globalThis.AbortSignal;if(typeof qi>"u"){Wd=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(r,i){this._onabort.push(i)}},qi=class{static{o(this,"AbortController")}constructor(){e()}signal=new Wd;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 s=Ha.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{s&&(s=!1,Kd("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))},"warnACPolyfill")}var tR=o(s=>!Zd.has(s),"shouldWarn"),VB=Symbol("type"),vt=o(s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),"isPosInt"),Yd=o(s=>vt(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?_s:null:null,"getUintArray"),_s=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},za=class s{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let t=Yd(e);if(!t)return[];s.#e=!0;let r=new s(e,t);return s.#e=!1,r}constructor(e,t){if(!s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Ga=class s{static{o(this,"LRUCache")}#e;#t;#s;#r;#i;#a;#l;#f;get perf(){return this.#f}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#p;#d;#h;#n;#g;#_;#S;#y;#C;#E;#R;#I;#w;#b;#T;#m;#o;static unsafeExposeInternals(e){return{starts:e.#I,ttls:e.#w,sizes:e.#R,keyMap:e.#d,keyList:e.#h,valList:e.#n,next:e.#g,prev:e.#_,get head(){return e.#S},get tail(){return e.#y},free:e.#C,isBackgroundFetch:o(t=>e.#u(t),"isBackgroundFetch"),backgroundFetch:o((t,r,i,n)=>e.#H(t,r,i,n),"backgroundFetch"),moveToTail:o(t=>e.#F(t),"moveToTail"),indexes:o(t=>e.#x(t),"indexes"),rindexes:o(t=>e.#N(t),"rindexes"),isStale:o(t=>e.#v(t),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#p}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#l}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:h,dispose:u,onInsert:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:p,maxSize:y=0,maxEntrySize:g=0,sizeCalculation:w,fetchMethod:S,memoMethod:I,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:A,ignoreFetchAbort:P,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??eR,t!==0&&!vt(t))throw new TypeError("max option must be a nonnegative integer");let ue=t?Yd(t):Array;if(!ue)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=y,this.maxEntrySize=g||this.#t,this.sizeCalculation=w,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(I!==void 0&&typeof I!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#l=I,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=S,this.#T=!!S,this.#d=new Map,this.#h=new Array(t).fill(void 0),this.#n=new Array(t).fill(void 0),this.#g=new ue(t),this.#_=new ue(t),this.#S=0,this.#y=0,this.#C=za.create(t),this.#c=0,this.#p=0,typeof u=="function"&&(this.#s=u),typeof l=="function"&&(this.#r=l),typeof f=="function"?(this.#i=f,this.#E=[]):(this.#i=void 0,this.#E=void 0),this.#b=!!this.#s,this.#o=!!this.#r,this.#m=!!this.#i,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#t!==0&&!vt(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!vt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#M()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!c,this.ttlResolution=vt(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=r||0,this.ttl){if(!vt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}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 tt="LRU_CACHE_UNBOUNDED";tR(tt)&&(Zd.add(tt),Kd("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",tt,s))}}getRemainingTTL(e){return this.#d.has(e)?1/0:0}#P(){let e=new _s(this.#e),t=new _s(this.#e);this.#w=e,this.#I=t,this.#U=(n,a,c=this.#f.now())=>{if(t[n]=a!==0?c:0,e[n]=a,a!==0&&this.ttlAutopurge){let h=setTimeout(()=>{this.#v(n)&&this.#B(this.#h[n],"expire")},a+1);h.unref&&h.unref()}},this.#A=n=>{t[n]=e[n]!==0?this.#f.now():0},this.#O=(n,a)=>{if(e[a]){let c=e[a],h=t[a];if(!c||!h)return;n.ttl=c,n.start=h,n.now=r||i();let u=n.now-h;n.remainingTTL=c-u}};let r=0,i=o(()=>{let n=this.#f.now();if(this.ttlResolution>0){r=n;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return n},"getNow");this.getRemainingTTL=n=>{let a=this.#d.get(n);if(a===void 0)return 0;let c=e[a],h=t[a];if(!c||!h)return 1/0;let u=(r||i())-h;return c-u},this.#v=n=>{let a=t[n],c=e[n];return!!c&&!!a&&(r||i())-a>c}}#A=o(()=>{},"#updateItemAge");#O=o(()=>{},"#statusTTL");#U=o(()=>{},"#setItemTTL");#v=o(()=>!1,"#isStale");#M(){let e=new _s(this.#e);this.#p=0,this.#R=e,this.#L=t=>{this.#p-=e[t],e[t]=0},this.#k=(t,r,i,n)=>{if(this.#u(r))return 0;if(!vt(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(r,t),!vt(i))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 i},this.#$=(t,r,i)=>{if(e[t]=r,this.#t){let n=this.#t-e[t];for(;this.#p>n;)this.#D(!0)}this.#p+=e[t],i&&(i.entrySize=r,i.totalCalculatedSize=this.#p)}}#L=o(e=>{},"#removeItemSize");#$=o((e,t,r)=>{},"#addItemSize");#k=o((e,t,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#x({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#y;!(!this.#j(t)||((e||!this.#v(t))&&(yield t),t===this.#S));)t=this.#_[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#S;!(!this.#j(t)||((e||!this.#v(t))&&(yield t),t===this.#y));)t=this.#g[t]}#j(e){return e!==void 0&&this.#d.get(this.#h[e])===e}*entries(){for(let e of this.#x())this.#n[e]!==void 0&&this.#h[e]!==void 0&&!this.#u(this.#n[e])&&(yield[this.#h[e],this.#n[e]])}*rentries(){for(let e of this.#N())this.#n[e]!==void 0&&this.#h[e]!==void 0&&!this.#u(this.#n[e])&&(yield[this.#h[e],this.#n[e]])}*keys(){for(let e of this.#x()){let t=this.#h[e];t!==void 0&&!this.#u(this.#n[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#h[e];t!==void 0&&!this.#u(this.#n[e])&&(yield t)}}*values(){for(let e of this.#x())this.#n[e]!==void 0&&!this.#u(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#N())this.#n[e]!==void 0&&!this.#u(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let r of this.#x()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#h[r],this))return this.get(this.#h[r],t)}}forEach(e,t=this){for(let r of this.#x()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(t,n,this.#h[r],this)}}rforEach(e,t=this){for(let r of this.#N()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(t,n,this.#h[r],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#v(t)&&(this.#B(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#d.get(e);if(t===void 0)return;let r=this.#n[t],i=this.#u(r)?r.__staleWhileFetching:r;if(i===void 0)return;let n={value:i};if(this.#w&&this.#I){let a=this.#w[t],c=this.#I[t];if(a&&c){let h=a-(this.#f.now()-c);n.ttl=h,n.start=Date.now()}}return this.#R&&(n.size=this.#R[t]),n}dump(){let e=[];for(let t of this.#x({allowStale:!0})){let r=this.#h[t],i=this.#n[t],n=this.#u(i)?i.__staleWhileFetching:i;if(n===void 0||r===void 0)continue;let a={value:n};if(this.#w&&this.#I){a.ttl=this.#w[t];let c=this.#f.now()-this.#I[t];a.start=Math.floor(Date.now()-c)}this.#R&&(a.size=this.#R[t]),e.unshift([r,a])}return e}load(e){this.clear();for(let[t,r]of e){if(r.start){let i=Date.now()-r.start;r.start=this.#f.now()-i}this.set(t,r.value,r)}}set(e,t,r={}){if(t===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:h}=r,{noUpdateTTL:u=this.noUpdateTTL}=r,l=this.#k(e,t,r.size||0,c);if(this.maxEntrySize&&l>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.#B(e,"set"),this;let f=this.#c===0?void 0:this.#d.get(e);if(f===void 0)f=this.#c===0?this.#y:this.#C.length!==0?this.#C.pop():this.#c===this.#e?this.#D(!1):this.#c,this.#h[f]=e,this.#n[f]=t,this.#d.set(e,f),this.#g[this.#y]=f,this.#_[f]=this.#y,this.#y=f,this.#c++,this.#$(f,l,h),h&&(h.set="add"),u=!1,this.#o&&this.#r?.(t,e,"add");else{this.#F(f);let d=this.#n[f];if(t!==d){if(this.#T&&this.#u(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;p!==void 0&&!a&&(this.#b&&this.#s?.(p,e,"set"),this.#m&&this.#E?.push([p,e,"set"]))}else a||(this.#b&&this.#s?.(d,e,"set"),this.#m&&this.#E?.push([d,e,"set"]));if(this.#L(f),this.#$(f,l,h),this.#n[f]=t,h){h.set="replace";let p=d&&this.#u(d)?d.__staleWhileFetching:d;p!==void 0&&(h.oldValue=p)}}else h&&(h.set="update");this.#o&&this.onInsert?.(t,e,t===d?"update":"replace")}if(i!==0&&!this.#w&&this.#P(),this.#w&&(u||this.#U(f,i,n),h&&this.#O(h,f)),!a&&this.#m&&this.#E){let d=this.#E,p;for(;p=d?.shift();)this.#i?.(...p)}return this}pop(){try{for(;this.#c;){let e=this.#n[this.#S];if(this.#D(!0),this.#u(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#m&&this.#E){let e=this.#E,t;for(;t=e?.shift();)this.#i?.(...t)}}}#D(e){let t=this.#S,r=this.#h[t],i=this.#n[t];return this.#T&&this.#u(i)?i.__abortController.abort(new Error("evicted")):(this.#b||this.#m)&&(this.#b&&this.#s?.(i,r,"evict"),this.#m&&this.#E?.push([i,r,"evict"])),this.#L(t),e&&(this.#h[t]=void 0,this.#n[t]=void 0,this.#C.push(t)),this.#c===1?(this.#S=this.#y=0,this.#C.length=0):this.#S=this.#g[t],this.#d.delete(r),this.#c--,t}has(e,t={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,n=this.#d.get(e);if(n!==void 0){let a=this.#n[n];if(this.#u(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#v(n))i&&(i.has="stale",this.#O(i,n));else return r&&this.#A(n),i&&(i.has="hit",this.#O(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{allowStale:r=this.allowStale}=t,i=this.#d.get(e);if(i===void 0||!r&&this.#v(i))return;let n=this.#n[i];return this.#u(n)?n.__staleWhileFetching:n}#H(e,t,r,i){let n=t===void 0?void 0:this.#n[t];if(this.#u(n))return n;let a=new qi,{signal:c}=r;c?.addEventListener("abort",()=>a.abort(c.reason),{signal:a.signal});let h={signal:a.signal,options:r,context:i},u=o((g,w=!1)=>{let{aborted:S}=a.signal,I=r.ignoreFetchAbort&&g!==void 0;if(r.status&&(S&&!w?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,I&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),S&&!I&&!w)return f(a.signal.reason);let T=p,_=this.#n[t];return(_===p||I&&w&&_===void 0)&&(g===void 0?T.__staleWhileFetching!==void 0?this.#n[t]=T.__staleWhileFetching:this.#B(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,g,h.options))),g},"cb"),l=o(g=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=g),f(g)),"eb"),f=o(g=>{let{aborted:w}=a.signal,S=w&&r.allowStaleOnFetchAbort,I=S||r.allowStaleOnFetchRejection,T=I||r.noDeleteOnFetchRejection,_=p;if(this.#n[t]===p&&(!T||_.__staleWhileFetching===void 0?this.#B(e,"fetch"):S||(this.#n[t]=_.__staleWhileFetching)),I)return r.status&&_.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),_.__staleWhileFetching;if(_.__returned===_)throw g},"fetchFail"),d=o((g,w)=>{let S=this.#a?.(e,n,h);S&&S instanceof Promise&&S.then(I=>g(I===void 0?void 0:I),w),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(g(void 0),r.allowStaleOnFetchAbort&&(g=o(I=>u(I,!0),"res")))})},"pcall");r.status&&(r.status.fetchDispatched=!0);let p=new Promise(d).then(u,l),y=Object.assign(p,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,y,{...h.options,status:void 0}),t=this.#d.get(e)):this.#n[t]=y,y}#u(e){if(!this.#T)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof qi}async fetch(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:h=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:g,forceRefresh:w=!1,status:S,signal:I}=t;if(!this.#T)return S&&(S.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:S});let T={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:c,size:h,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:y,ignoreFetchAbort:p,status:S,signal:I},_=this.#d.get(e);if(_===void 0){S&&(S.fetch="miss");let O=this.#H(e,_,T,g);return O.__returned=O}else{let O=this.#n[_];if(this.#u(O)){let tt=r&&O.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",tt&&(S.returnedStale=!0)),tt?O.__staleWhileFetching:O.__returned=O}let A=this.#v(_);if(!w&&!A)return S&&(S.fetch="hit"),this.#F(_),i&&this.#A(_),S&&this.#O(S,_),O;let P=this.#H(e,_,T,g),ue=P.__staleWhileFetching!==void 0&&r;return S&&(S.fetch=A?"stale":"refresh",ue&&A&&(S.returnedStale=!0)),ue?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,t={}){let r=await this.fetch(e,t);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(e,t={}){let r=this.#l;if(!r)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:n,...a}=t,c=this.get(e,a);if(!n&&c!==void 0)return c;let h=r(e,c,{options:a,context:i});return this.set(e,h,a),h}get(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,c=this.#d.get(e);if(c!==void 0){let h=this.#n[c],u=this.#u(h);return a&&this.#O(a,c),this.#v(c)?(a&&(a.get="stale"),u?(a&&r&&h.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?h.__staleWhileFetching:void 0):(n||this.#B(e,"expire"),a&&r&&(a.returnedStale=!0),r?h:void 0)):(a&&(a.get="hit"),u?h.__staleWhileFetching:(this.#F(c),i&&this.#A(c),h))}else a&&(a.get="miss")}#z(e,t){this.#_[t]=e,this.#g[e]=t}#F(e){e!==this.#y&&(e===this.#S?this.#S=this.#g[e]:this.#z(this.#_[e],this.#g[e]),this.#z(this.#y,e),this.#y=e)}delete(e){return this.#B(e,"delete")}#B(e,t){let r=!1;if(this.#c!==0){let i=this.#d.get(e);if(i!==void 0)if(r=!0,this.#c===1)this.#q(t);else{this.#L(i);let n=this.#n[i];if(this.#u(n)?n.__abortController.abort(new Error("deleted")):(this.#b||this.#m)&&(this.#b&&this.#s?.(n,e,t),this.#m&&this.#E?.push([n,e,t])),this.#d.delete(e),this.#h[i]=void 0,this.#n[i]=void 0,i===this.#y)this.#y=this.#_[i];else if(i===this.#S)this.#S=this.#g[i];else{let a=this.#_[i];this.#g[a]=this.#g[i];let c=this.#g[i];this.#_[c]=this.#_[i]}this.#c--,this.#C.push(i)}}if(this.#m&&this.#E?.length){let i=this.#E,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){return this.#q("delete")}#q(e){for(let t of this.#N({allowStale:!0})){let r=this.#n[t];if(this.#u(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#h[t];this.#b&&this.#s?.(r,i,e),this.#m&&this.#E?.push([r,i,e])}}if(this.#d.clear(),this.#n.fill(void 0),this.#h.fill(void 0),this.#w&&this.#I&&(this.#w.fill(0),this.#I.fill(0)),this.#R&&this.#R.fill(0),this.#S=0,this.#y=0,this.#C.length=0,this.#p=0,this.#c=0,this.#m&&this.#E){let t=this.#E,r;for(;r=t?.shift();)this.#i?.(...r)}}};Ui.LRUCache=Ga});var yr=m((KB,Rs)=>{"use strict";var{LRUCache:sR}=bs(),ji=new sR({max:500,maxSize:50*1024*1024,ttl:180*1e3,sizeCalculation:o((s,e)=>e.startsWith("key:")?s.data.length:s.length,"sizeCalculation")});Rs.exports.clearMemoized=rR;function rR(){let s={};return ji.forEach((e,t)=>{s[t]=e}),ji.clear(),s}o(rR,"clearMemoized");Rs.exports.put=iR;function iR(s,e,t,r){Hi(r).set(`key:${s}:${e.key}`,{entry:e,data:t}),Xd(s,e.integrity,t,r)}o(iR,"put");Rs.exports.put.byDigest=Xd;function Xd(s,e,t,r){Hi(r).set(`digest:${s}:${e}`,t)}o(Xd,"putDigest");Rs.exports.get=nR;function nR(s,e,t){return Hi(t).get(`key:${s}:${e}`)}o(nR,"get");Rs.exports.get.byDigest=oR;function oR(s,e,t){return Hi(t).get(`digest:${s}:${e}`)}o(oR,"getDigest");var Va=class{static{o(this,"ObjProxy")}constructor(e){this.obj=e}get(e){return this.obj[e]}set(e,t){this.obj[e]=t}};function Hi(s){return!s||!s.memoize?ji:s.memoize.get&&s.memoize.set?s.memoize:typeof s.memoize=="object"?new Va(s.memoize):ji}o(Hi,"pickMem")});var Xi=m(wr=>{"use strict";var{Minipass:aR}=ee(),cR=require("events").EventEmitter,de=require("fs"),hR=de.writev,Cs=Symbol("_autoClose"),Fe=Symbol("_close"),Er=Symbol("_ended"),D=Symbol("_fd"),Jd=Symbol("_finished"),Tt=Symbol("_flags"),Wa=Symbol("_flush"),Ka=Symbol("_handleChunk"),Ya=Symbol("_makeBuf"),Zi=Symbol("_mode"),zi=Symbol("_needDrain"),Is=Symbol("_onerror"),As=Symbol("_onopen"),Za=Symbol("_onread"),Os=Symbol("_onwrite"),Ct=Symbol("_open"),gt=Symbol("_path"),Gt=Symbol("_pos"),Ze=Symbol("_queue"),vs=Symbol("_read"),Qd=Symbol("_readSize"),It=Symbol("_reading"),Gi=Symbol("_remain"),ep=Symbol("_size"),Vi=Symbol("_write"),zt=Symbol("_writing"),Wi=Symbol("_defaultFlag"),Ts=Symbol("_errored"),Ki=class extends aR{static{o(this,"ReadStream")}constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Ts]=!1,this[D]=typeof t.fd=="number"?t.fd:null,this[gt]=e,this[Qd]=t.readSize||16*1024*1024,this[It]=!1,this[ep]=typeof t.size=="number"?t.size:1/0,this[Gi]=this[ep],this[Cs]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[D]=="number"?this[vs]():this[Ct]()}get fd(){return this[D]}get path(){return this[gt]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Ct](){de.open(this[gt],"r",(e,t)=>this[As](e,t))}[As](e,t){e?this[Is](e):(this[D]=t,this.emit("open",t),this[vs]())}[Ya](){return Buffer.allocUnsafe(Math.min(this[Qd],this[Gi]))}[vs](){if(!this[It]){this[It]=!0;let e=this[Ya]();if(e.length===0)return process.nextTick(()=>this[Za](null,0,e));de.read(this[D],e,0,e.length,null,(t,r,i)=>this[Za](t,r,i))}}[Za](e,t,r){this[It]=!1,e?this[Is](e):this[Ka](t,r)&&this[vs]()}[Fe](){if(this[Cs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,de.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[Is](e){this[It]=!0,this[Fe](),this.emit("error",e)}[Ka](e,t){let r=!1;return this[Gi]-=e,e>0&&(r=super.write(e<t.length?t.slice(0,e):t)),(e===0||this[Gi]<=0)&&(r=!1,this[Fe](),super.end()),r}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[D]=="number"&&this[vs]();break;case"error":return this[Ts]?void 0:(this[Ts]=!0,super.emit(e,t));default:return super.emit(e,t)}}},Xa=class extends Ki{static{o(this,"ReadStreamSync")}[Ct](){let e=!0;try{this[As](null,de.openSync(this[gt],"r")),e=!1}finally{e&&this[Fe]()}}[vs](){let e=!0;try{if(!this[It]){this[It]=!0;do{let t=this[Ya](),r=t.length===0?0:de.readSync(this[D],t,0,t.length,null);if(!this[Ka](r,t))break}while(!0);this[It]=!1}e=!1}finally{e&&this[Fe]()}}[Fe](){if(this[Cs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,de.closeSync(e),this.emit("close")}}},Yi=class extends cR{static{o(this,"WriteStream")}constructor(e,t){t=t||{},super(t),this.readable=!1,this.writable=!0,this[Ts]=!1,this[zt]=!1,this[Er]=!1,this[zi]=!1,this[Ze]=[],this[gt]=e,this[D]=typeof t.fd=="number"?t.fd:null,this[Zi]=t.mode===void 0?438:t.mode,this[Gt]=typeof t.start=="number"?t.start:null,this[Cs]=typeof t.autoClose=="boolean"?t.autoClose:!0;let r=this[Gt]!==null?"r+":"w";this[Wi]=t.flags===void 0,this[Tt]=this[Wi]?r:t.flags,this[D]===null&&this[Ct]()}emit(e,t){if(e==="error"){if(this[Ts])return;this[Ts]=!0}return super.emit(e,t)}get fd(){return this[D]}get path(){return this[gt]}[Is](e){this[Fe](),this[zt]=!0,this.emit("error",e)}[Ct](){de.open(this[gt],this[Tt],this[Zi],(e,t)=>this[As](e,t))}[As](e,t){this[Wi]&&this[Tt]==="r+"&&e&&e.code==="ENOENT"?(this[Tt]="w",this[Ct]()):e?this[Is](e):(this[D]=t,this.emit("open",t),this[zt]||this[Wa]())}end(e,t){return e&&this.write(e,t),this[Er]=!0,!this[zt]&&!this[Ze].length&&typeof this[D]=="number"&&this[Os](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[Er]?(this.emit("error",new Error("write() after end()")),!1):this[D]===null||this[zt]||this[Ze].length?(this[Ze].push(e),this[zi]=!0,!1):(this[zt]=!0,this[Vi](e),!0)}[Vi](e){de.write(this[D],e,0,e.length,this[Gt],(t,r)=>this[Os](t,r))}[Os](e,t){e?this[Is](e):(this[Gt]!==null&&(this[Gt]+=t),this[Ze].length?this[Wa]():(this[zt]=!1,this[Er]&&!this[Jd]?(this[Jd]=!0,this[Fe](),this.emit("finish")):this[zi]&&(this[zi]=!1,this.emit("drain"))))}[Wa](){if(this[Ze].length===0)this[Er]&&this[Os](null,0);else if(this[Ze].length===1)this[Vi](this[Ze].pop());else{let e=this[Ze];this[Ze]=[],hR(this[D],e,this[Gt],(t,r)=>this[Os](t,r))}}[Fe](){if(this[Cs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,de.close(e,t=>t?this.emit("error",t):this.emit("close"))}}},Ja=class extends Yi{static{o(this,"WriteStreamSync")}[Ct](){let e;if(this[Wi]&&this[Tt]==="r+")try{e=de.openSync(this[gt],this[Tt],this[Zi])}catch(t){if(t.code==="ENOENT")return this[Tt]="w",this[Ct]();throw t}else e=de.openSync(this[gt],this[Tt],this[Zi]);this[As](null,e)}[Fe](){if(this[Cs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,de.closeSync(e),this.emit("close")}}[Vi](e){let t=!0;try{this[Os](null,de.writeSync(this[D],e,0,e.length,this[Gt])),t=!1}finally{if(t)try{this[Fe]()}catch{}}}};wr.ReadStream=Ki;wr.ReadStreamSync=Xa;wr.WriteStream=Yi;wr.WriteStreamSync=Ja});var ec=m((QB,xs)=>{"use strict";var Sr=require("fs/promises"),uR=Xi(),Qa=Ot(),lR=gs(),tp=ms();xs.exports=fR;var sp=64*1024*1024;async function fR(s,e,t={}){let{size:r}=t,{stat:i,cpath:n,sri:a}=await _r(s,e,async(h,u)=>({stat:r?{size:r}:await Sr.stat(h),cpath:h,sri:u}));if(i.size>sp)return rp(n,i.size,a,new tp).concat();let c=await Sr.readFile(n,{encoding:null});if(i.size!==c.length)throw mR(i.size,c.length);if(!Qa.checkData(c,a))throw gR(a,n);return c}o(fR,"read");var rp=o((s,e,t,r)=>(r.push(new uR.ReadStream(s,{size:e,readSize:sp}),Qa.integrityStream({integrity:t,size:e})),r),"readPipeline");xs.exports.stream=ip;xs.exports.readStream=ip;function ip(s,e,t={}){let{size:r}=t,i=new tp;return Promise.resolve().then(async()=>{let{stat:n,cpath:a,sri:c}=await _r(s,e,async(h,u)=>({stat:r?{size:r}:await Sr.stat(h),cpath:h,sri:u}));return rp(a,n.size,c,i)}).catch(n=>i.emit("error",n)),i}o(ip,"readStream");xs.exports.copy=dR;function dR(s,e,t){return _r(s,e,r=>Sr.copyFile(r,t))}o(dR,"copy");xs.exports.hasContent=pR;async function pR(s,e){if(!e)return!1;try{return await _r(s,e,async(t,r)=>{let i=await Sr.stat(t);return{size:i.size,sri:r,stat:i}})}catch(t){if(t.code==="ENOENT")return!1;if(t.code==="EPERM"){if(process.platform!=="win32")throw t;return!1}}}o(pR,"hasContent");async function _r(s,e,t){let r=Qa.parse(e),i=r.pickAlgorithm(),n=r[i];if(n.length<=1){let a=lR(s,n[0]);return t(a,n[0])}else{let a=await Promise.all(n.map(async u=>{try{return await _r(s,u,t)}catch(l){return l.code==="ENOENT"?Object.assign(new Error("No matching content found for "+r.toString()),{code:"ENOENT"}):l}})),c=a.find(u=>!(u instanceof Error));if(c)return c;let h=a.find(u=>u.code==="ENOENT");throw h||a.find(u=>u instanceof Error)}}o(_r,"withContentSri");function mR(s,e){let t=new Error(`Bad data size: expected inserted data to be ${s} bytes, but got ${e} instead`);return t.expected=s,t.found=e,t.code="EBADSIZE",t}o(mR,"sizeError");function gR(s,e){let t=new Error(`Integrity verification failed for ${s} (${e})`);return t.code="EINTEGRITY",t.sri=s,t.path=e,t}o(gR,"integrityError")});var cp=m((tN,Et)=>{"use strict";var np=na(),{Minipass:op}=ee(),ap=ms(),Vt=Ss(),yt=yr(),Wt=ec();async function yR(s,e,t={}){let{integrity:r,memoize:i,size:n}=t,a=yt.get(s,e,t);if(a&&i!==!1)return{metadata:a.entry.metadata,data:a.data,integrity:a.entry.integrity,size:a.entry.size};let c=await Vt.find(s,e,t);if(!c)throw new Vt.NotFoundError(s,e);let h=await Wt(s,c.integrity,{integrity:r,size:n});return i&&yt.put(s,c,h,t),{data:h,metadata:c.metadata,size:c.size,integrity:c.integrity}}o(yR,"getData");Et.exports=yR;async function ER(s,e,t={}){let{integrity:r,memoize:i,size:n}=t,a=yt.get.byDigest(s,e,t);if(a&&i!==!1)return a;let c=await Wt(s,e,{integrity:r,size:n});return i&&yt.put.byDigest(s,e,c,t),c}o(ER,"getDataByDigest");Et.exports.byDigest=ER;var wR=o(s=>{let e=new op;return e.on("newListener",function(t,r){t==="metadata"&&r(s.entry.metadata),t==="integrity"&&r(s.entry.integrity),t==="size"&&r(s.entry.size)}),e.end(s.data),e},"getMemoizedStream");function SR(s,e,t={}){let{memoize:r,size:i}=t,n=yt.get(s,e,t);if(n&&r!==!1)return wR(n);let a=new ap;return Promise.resolve().then(async()=>{let c=await Vt.find(s,e);if(!c)throw new Vt.NotFoundError(s,e);a.emit("metadata",c.metadata),a.emit("integrity",c.integrity),a.emit("size",c.size),a.on("newListener",function(u,l){u==="metadata"&&l(c.metadata),u==="integrity"&&l(c.integrity),u==="size"&&l(c.size)});let h=Wt.readStream(s,c.integrity,{...t,size:typeof i!="number"?c.size:i});if(r){let u=new np.PassThrough;u.on("collect",l=>yt.put(s,c,l,t)),a.unshift(u)}return a.unshift(h),a}).catch(c=>a.emit("error",c)),a}o(SR,"getStream");Et.exports.stream=SR;function _R(s,e,t={}){let{memoize:r}=t,i=yt.get.byDigest(s,e,t);if(i&&r!==!1){let n=new op;return n.end(i),n}else{let n=Wt.readStream(s,e,t);if(!r)return n;let a=new np.PassThrough;return a.on("collect",c=>yt.put.byDigest(s,e,c,t)),new ap(n,a)}}o(_R,"getStreamDigest");Et.exports.stream.byDigest=_R;function bR(s,e,t={}){let{memoize:r}=t,i=yt.get(s,e,t);return i&&r!==!1?Promise.resolve(i.entry):Vt.find(s,e)}o(bR,"info");Et.exports.info=bR;async function RR(s,e,t,r={}){let i=await Vt.find(s,e,r);if(!i)throw new Vt.NotFoundError(s,e);return await Wt.copy(s,i.integrity,t,r),{metadata:i.metadata,size:i.size,integrity:i.integrity}}o(RR,"copy");Et.exports.copy=RR;async function OR(s,e,t,r={}){return await Wt.copy(s,e,t,r),e}o(OR,"copyByDigest");Et.exports.copy.byDigest=OR;Et.exports.hasContent=Wt.hasContent});var dp=m((rN,ic)=>{"use strict";var hp=require("events"),vR=gs(),Rr=require("fs/promises"),{moveFile:IR}=Li(),{Minipass:TR}=ee(),up=ms(),CR=yi(),tc=require("path"),sc=Ot(),AR=fa(),xR=Xi();ic.exports=BR;var br=new Map;async function BR(s,e,t={}){let{algorithms:r,size:i,integrity:n}=t;if(typeof i=="number"&&e.length!==i)throw kR(i,e.length);let a=sc.fromData(e,r?{algorithms:r}:{});if(n&&!sc.checkData(e,n,t))throw DR(n,a);for(let c in a){let h=await lp(s,t),u=a[c].toString();try{await Rr.writeFile(h.target,e,{flag:"wx"}),await fp(h,s,u,t)}finally{h.moved||await Rr.rm(h.target,{recursive:!0,force:!0})}}return{integrity:a,size:e.length}}o(BR,"write");ic.exports.stream=NR;var rc=class extends CR{static{o(this,"CacacheWriteStream")}constructor(e,t){super(),this.opts=t,this.cache=e,this.inputStream=new TR,this.inputStream.on("error",r=>this.emit("error",r)),this.inputStream.on("drain",()=>this.emit("drain")),this.handleContentP=null}write(e,t,r){return this.handleContentP||(this.handleContentP=PR(this.inputStream,this.cache,this.opts),this.handleContentP.catch(i=>this.emit("error",i))),this.inputStream.write(e,t,r)}flush(e){this.inputStream.end(()=>{if(!this.handleContentP){let t=new Error("Cache input stream was empty");return t.code="ENODATA",Promise.reject(t).catch(e)}this.handleContentP.then(t=>{t.integrity&&this.emit("integrity",t.integrity),t.size!==null&&this.emit("size",t.size),e()},t=>e(t))})}};function NR(s,e={}){return new rc(s,e)}o(NR,"writeStream");async function PR(s,e,t){let r=await lp(e,t);try{let i=await LR(s,e,r.target,t);return await fp(r,e,i.integrity,t),i}finally{r.moved||await Rr.rm(r.target,{recursive:!0,force:!0})}}o(PR,"handleContent");async function LR(s,e,t,r){let i=new xR.WriteStream(t,{flags:"wx"});if(r.integrityEmitter){let[u,l]=await Promise.all([hp.once(r.integrityEmitter,"integrity").then(f=>f[0]),hp.once(r.integrityEmitter,"size").then(f=>f[0]),new up(s,i).promise()]);return{integrity:u,size:l}}let n,a,c=sc.integrityStream({integrity:r.integrity,algorithms:r.algorithms,size:r.size});return c.on("integrity",u=>{n=u}),c.on("size",u=>{a=u}),await new up(s,c,i).promise(),{integrity:n,size:a}}o(LR,"pipeToTmp");async function lp(s,e){let t=AR(tc.join(s,"tmp"),e.tmpPrefix);return await Rr.mkdir(tc.dirname(t),{recursive:!0}),{target:t,moved:!1}}o(lp,"makeTmp");async function fp(s,e,t){let r=vR(e,t),i=tc.dirname(r);return br.has(r)||br.set(r,Rr.mkdir(i,{recursive:!0}).then(async()=>(await IR(s.target,r,{overwrite:!1}),s.moved=!0,s.moved)).catch(n=>{if(!n.message.startsWith("The destination file exists"))throw Object.assign(n,{code:"EEXIST"})}).finally(()=>{br.delete(r)})),br.get(r)}o(fp,"moveToDestination");function kR(s,e){let t=new Error(`Bad data size: expected inserted data to be ${s} bytes, but got ${e} instead`);return t.expected=s,t.found=e,t.code="EBADSIZE",t}o(kR,"sizeError");function DR(s,e){let t=new Error(`Integrity check failed:
14
+ Wanted: ${s}
15
+ Found: ${e}`);return t.code="EINTEGRITY",t.expected=s,t.found=e,t}o(DR,"checksumError")});var Ep=m((nN,nc)=>{"use strict";var pp=Ss(),mp=yr(),gp=dp(),FR=yi(),{PassThrough:MR}=na(),$R=ms(),yp=o(s=>({algorithms:["sha512"],...s}),"putOpts");nc.exports=qR;async function qR(s,e,t,r={}){let{memoize:i}=r;r=yp(r);let n=await gp(s,t,r),a=await pp.insert(s,e,n.integrity,{...r,size:n.size});return i&&mp.put(s,a,t,r),n.integrity}o(qR,"putData");nc.exports.stream=UR;function UR(s,e,t={}){let{memoize:r}=t;t=yp(t);let i,n,a,c,h=new $R;if(r){let l=new MR().on("collect",f=>{c=f});h.push(l)}let u=gp.stream(s,t).on("integrity",l=>{i=l}).on("size",l=>{n=l}).on("error",l=>{a=l});return h.push(u),h.push(new FR({async flush(){if(!a){let l=await pp.insert(s,e,i,{...t,size:n});r&&c&&mp.put(s,l,c,t),h.emit("integrity",i),h.emit("size",n)}}})),h}o(UR,"putStream")});var Sp=m(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.range=Zt.balanced=void 0;var jR=o((s,e,t)=>{let r=s instanceof RegExp?wp(s,t):s,i=e instanceof RegExp?wp(e,t):e,n=r!==null&&i!=null&&(0,Zt.range)(r,i,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+r.length,n[1]),post:t.slice(n[1]+i.length)}},"balanced");Zt.balanced=jR;var wp=o((s,e)=>{let t=e.match(s);return t?t[0]:null},"maybeMatch"),HR=o((s,e,t)=>{let r,i,n,a,c,h=t.indexOf(s),u=t.indexOf(e,h+1),l=h;if(h>=0&&u>0){if(s===e)return[h,u];for(r=[],n=t.length;l>=0&&!c;){if(l===h)r.push(l),h=t.indexOf(s,l+1);else if(r.length===1){let f=r.pop();f!==void 0&&(c=[f,u])}else i=r.pop(),i!==void 0&&i<n&&(n=i,a=u),u=t.indexOf(e,l+1);l=h<u&&h>=0?h:u}r.length&&a!==void 0&&(c=[n,a])}return c},"range");Zt.range=HR});var Tp=m(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.expand=sO;var _p=Sp(),bp="\0SLASH"+Math.random()+"\0",Rp="\0OPEN"+Math.random()+"\0",ac="\0CLOSE"+Math.random()+"\0",Op="\0COMMA"+Math.random()+"\0",vp="\0PERIOD"+Math.random()+"\0",zR=new RegExp(bp,"g"),GR=new RegExp(Rp,"g"),VR=new RegExp(ac,"g"),WR=new RegExp(Op,"g"),ZR=new RegExp(vp,"g"),KR=/\\\\/g,YR=/\\{/g,XR=/\\}/g,JR=/\\,/g,QR=/\\./g;function oc(s){return isNaN(s)?s.charCodeAt(0):parseInt(s,10)}o(oc,"numeric");function eO(s){return s.replace(KR,bp).replace(YR,Rp).replace(XR,ac).replace(JR,Op).replace(QR,vp)}o(eO,"escapeBraces");function tO(s){return s.replace(zR,"\\").replace(GR,"{").replace(VR,"}").replace(WR,",").replace(ZR,".")}o(tO,"unescapeBraces");function Ip(s){if(!s)return[""];let e=[],t=(0,_p.balanced)("{","}",s);if(!t)return s.split(",");let{pre:r,body:i,post:n}=t,a=r.split(",");a[a.length-1]+="{"+i+"}";let c=Ip(n);return n.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}o(Ip,"parseCommaParts");function sO(s){return s?(s.slice(0,2)==="{}"&&(s="\\{\\}"+s.slice(2)),Or(eO(s),!0).map(tO)):[]}o(sO,"expand");function rO(s){return"{"+s+"}"}o(rO,"embrace");function iO(s){return/^-?0\d/.test(s)}o(iO,"isPadded");function nO(s,e){return s<=e}o(nO,"lte");function oO(s,e){return s>=e}o(oO,"gte");function Or(s,e){let t=[],r=(0,_p.balanced)("{","}",s);if(!r)return[s];let i=r.pre,n=r.post.length?Or(r.post,!1):[""];if(/\$$/.test(r.pre))for(let a=0;a<n.length;a++){let c=i+"{"+r.body+"}"+n[a];t.push(c)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),h=a||c,u=r.body.indexOf(",")>=0;if(!h&&!u)return r.post.match(/,(?!,).*\}/)?(s=r.pre+"{"+r.body+ac+r.post,Or(s)):[s];let l;if(h)l=r.body.split(/\.\./);else if(l=Ip(r.body),l.length===1&&l[0]!==void 0&&(l=Or(l[0],!1).map(rO),l.length===1))return n.map(d=>r.pre+l[0]+d);let f;if(h&&l[0]!==void 0&&l[1]!==void 0){let d=oc(l[0]),p=oc(l[1]),y=Math.max(l[0].length,l[1].length),g=l.length===3&&l[2]!==void 0?Math.abs(oc(l[2])):1,w=nO;p<d&&(g*=-1,w=oO);let I=l.some(iO);f=[];for(let T=d;w(T,p);T+=g){let _;if(c)_=String.fromCharCode(T),_==="\\"&&(_="");else if(_=String(T),I){let O=y-_.length;if(O>0){let A=new Array(O+1).join("0");T<0?_="-"+A+_.slice(1):_=A+_}}f.push(_)}}else{f=[];for(let d=0;d<l.length;d++)f.push.apply(f,Or(l[d],!1))}for(let d=0;d<f.length;d++)for(let p=0;p<n.length;p++){let y=i+f[d]+n[p];(!e||h||y)&&t.push(y)}}return t}o(Or,"expand_")});var Cp=m(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.assertValidPattern=void 0;var aO=1024*64,cO=o(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>aO)throw new TypeError("pattern is too long")},"assertValidPattern");Ji.assertValidPattern=cO});var xp=m(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.parseClass=void 0;var hO={"[: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]},vr=o(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),uO=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Ap=o(s=>s.join(""),"rangesToString"),lO=o((s,e)=>{let t=e;if(s.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],n=t+1,a=!1,c=!1,h=!1,u=!1,l=t,f="";e:for(;n<s.length;){let g=s.charAt(n);if((g==="!"||g==="^")&&n===t+1){u=!0,n++;continue}if(g==="]"&&a&&!h){l=n+1;break}if(a=!0,g==="\\"&&!h){h=!0,n++;continue}if(g==="["&&!h){for(let[w,[S,I,T]]of Object.entries(hO))if(s.startsWith(w,n)){if(f)return["$.",!1,s.length-t,!0];n+=w.length,T?i.push(S):r.push(S),c=c||I;continue e}}if(h=!1,f){g>f?r.push(vr(f)+"-"+vr(g)):g===f&&r.push(vr(g)),f="",n++;continue}if(s.startsWith("-]",n+1)){r.push(vr(g+"-")),n+=2;continue}if(s.startsWith("-",n+1)){f=g,n+=2;continue}r.push(vr(g)),n++}if(l<n)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,s.length-t,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let g=r[0].length===2?r[0].slice(-1):r[0];return[uO(g),!1,l-t,!1]}let d="["+(u?"^":"")+Ap(r)+"]",p="["+(u?"":"^")+Ap(i)+"]";return[r.length&&i.length?"("+d+"|"+p+")":r.length?d:p,c,l-t,!0]},"parseClass");Qi.parseClass=lO});var tn=m(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.unescape=void 0;var fO=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");en.unescape=fO});var lc=m(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.AST=void 0;var dO=xp(),sn=tn(),pO=new Set(["!","?","+","*","@"]),Bp=o(s=>pO.has(s),"isExtglobType"),mO="(?!(?:^|/)\\.\\.?(?:$|/))",rn="(?!\\.)",gO=new Set(["[","."]),yO=new Set(["..","."]),EO=new Set("().*{}+?[]^$\\!"),wO=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),uc="[^/]",Np=uc+"*?",Pp=uc+"+?",hc=class s{static{o(this,"AST")}type;#e;#t;#s=!1;#r=[];#i;#a;#l;#f=!1;#c;#p;#d=!1;constructor(e,t,r={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?r:this.#e.#c,this.#l=this.#e===this?[]:this.#e.#l,e==="!"&&!this.#e.#f&&this.#l.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#p=this.#r.map(e=>String(e)).join("")}#h(){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.#l.pop();){if(e.type!=="!")continue;let t=e,r=t.#i;for(;r;){for(let i=t.#a+1;!r.type&&i<r.#r.length;i++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(r.#r[i])}t=r,r=t.#i}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof s&&t.#i===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#r.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let r=e.#r[t];if(!(r instanceof s&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new s(this.type,e);for(let r of this.#r)t.copyIn(r);return t}static#n(e,t,r,i){let n=!1,a=!1,c=-1,h=!1;if(t.type===null){let p=r,y="";for(;p<e.length;){let g=e.charAt(p++);if(n||g==="\\"){n=!n,y+=g;continue}if(a){p===c+1?(g==="^"||g==="!")&&(h=!0):g==="]"&&!(p===c+2&&h)&&(a=!1),y+=g;continue}else if(g==="["){a=!0,c=p,h=!1,y+=g;continue}if(!i.noext&&Bp(g)&&e.charAt(p)==="("){t.push(y),y="";let w=new s(g,t);p=s.#n(e,w,p,i),t.push(w);continue}y+=g}return t.push(y),p}let u=r+1,l=new s(null,t),f=[],d="";for(;u<e.length;){let p=e.charAt(u++);if(n||p==="\\"){n=!n,d+=p;continue}if(a){u===c+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(u===c+2&&h)&&(a=!1),d+=p;continue}else if(p==="["){a=!0,c=u,h=!1,d+=p;continue}if(Bp(p)&&e.charAt(u)==="("){l.push(d),d="";let y=new s(p,l);l.push(y),u=s.#n(e,y,u,i);continue}if(p==="|"){l.push(d),d="",f.push(l),l=new s(null,t);continue}if(p===")")return d===""&&t.#r.length===0&&(t.#d=!0),l.push(d),d="",t.push(...f,l),u;d+=p}return t.type=null,t.#t=void 0,t.#r=[e.substring(r-1)],u}static fromGlob(e,t={}){let r=new s(null,void 0,t);return s.#n(e,r,0,t),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,r,i,n]=this.toRegExpSource();if(!(i||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let c=(this.#c.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&this.#h(),!this.type){let h=this.isStart()&&this.isEnd(),u=this.#r.map(p=>{let[y,g,w,S]=typeof p=="string"?s.#_(p,this.#t,h):p.toRegExpSource(e);return this.#t=this.#t||w,this.#s=this.#s||S,y}).join(""),l="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&yO.has(this.#r[0]))){let y=gO,g=t&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),w=!t&&!e&&y.has(u.charAt(0));l=g?mO:w?rn:""}let f="";return this.isEnd()&&this.#e.#f&&this.#i?.type==="!"&&(f="(?:$|\\/)"),[l+u+f,(0,sn.unescape)(u),this.#t=!!this.#t,this.#s]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#g(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let h=this.toString();return this.#r=[h],this.type=null,this.#t=void 0,[h,(0,sn.unescape)(this.toString()),!1,!1]}let a=!r||e||t||!rn?"":this.#g(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);let c="";if(this.type==="!"&&this.#d)c=(this.isStart()&&!t?rn:"")+Pp;else{let h=this.type==="!"?"))"+(this.isStart()&&!t&&!e?rn:"")+Np+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=i+n+h}return[c,(0,sn.unescape)(n),this.#t=!!this.#t,this.#s]}#g(e){return this.#r.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,n,a]=t.toRegExpSource(e);return this.#s=this.#s||a,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#_(e,t,r=!1){let i=!1,n="",a=!1;for(let c=0;c<e.length;c++){let h=e.charAt(c);if(i){i=!1,n+=(EO.has(h)?"\\":"")+h;continue}if(h==="\\"){c===e.length-1?n+="\\\\":i=!0;continue}if(h==="["){let[u,l,f,d]=(0,dO.parseClass)(e,c);if(f){n+=u,a=a||l,c+=f-1,t=t||d;continue}}if(h==="*"){r&&e==="*"?n+=Pp:n+=Np,t=!0;continue}if(h==="?"){n+=uc,t=!0;continue}n+=wO(h)}return[n,(0,sn.unescape)(e),!!t,a]}};nn.AST=hc});var fc=m(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.escape=void 0;var SO=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");on.escape=SO});var At=m(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.unescape=v.escape=v.AST=v.Minimatch=v.match=v.makeRe=v.braceExpand=v.defaults=v.filter=v.GLOBSTAR=v.sep=v.minimatch=void 0;var _O=Tp(),an=Cp(),Dp=lc(),bO=fc(),RO=tn(),OO=o((s,e,t={})=>((0,an.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Kt(e,t).match(s)),"minimatch");v.minimatch=OO;var vO=/^\*+([^+@!?\*\[\(]*)$/,IO=o(s=>e=>!e.startsWith(".")&&e.endsWith(s),"starDotExtTest"),TO=o(s=>e=>e.endsWith(s),"starDotExtTestDot"),CO=o(s=>(s=s.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(s)),"starDotExtTestNocase"),AO=o(s=>(s=s.toLowerCase(),e=>e.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),xO=/^\*+\.\*+$/,BO=o(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),NO=o(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),PO=/^\.\*+$/,LO=o(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),kO=/^\*+$/,DO=o(s=>s.length!==0&&!s.startsWith("."),"starTest"),FO=o(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),MO=/^\?+([^+@!?\*\[\(]*)?$/,$O=o(([s,e=""])=>{let t=Fp([s]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),qO=o(([s,e=""])=>{let t=Mp([s]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),UO=o(([s,e=""])=>{let t=Mp([s]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTestDot"),jO=o(([s,e=""])=>{let t=Fp([s]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTest"),Fp=o(([s])=>{let e=s.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),Mp=o(([s])=>{let e=s.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),$p=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Lp={win32:{sep:"\\"},posix:{sep:"/"}};v.sep=$p==="win32"?Lp.win32.sep:Lp.posix.sep;v.minimatch.sep=v.sep;v.GLOBSTAR=Symbol("globstar **");v.minimatch.GLOBSTAR=v.GLOBSTAR;var HO="[^/]",zO=HO+"*?",GO="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",VO="(?:(?!(?:\\/|^)\\.).)*?",WO=o((s,e={})=>t=>(0,v.minimatch)(t,s,e),"filter");v.filter=WO;v.minimatch.filter=v.filter;var Ie=o((s,e={})=>Object.assign({},s,e),"ext"),ZO=o(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return v.minimatch;let e=v.minimatch;return Object.assign(o((r,i,n={})=>e(r,i,Ie(s,n)),"m"),{Minimatch:class extends e.Minimatch{static{o(this,"Minimatch")}constructor(i,n={}){super(i,Ie(s,n))}static defaults(i){return e.defaults(Ie(s,i)).Minimatch}},AST:class extends e.AST{static{o(this,"AST")}constructor(i,n,a={}){super(i,n,Ie(s,a))}static fromGlob(i,n={}){return e.AST.fromGlob(i,Ie(s,n))}},unescape:o((r,i={})=>e.unescape(r,Ie(s,i)),"unescape"),escape:o((r,i={})=>e.escape(r,Ie(s,i)),"escape"),filter:o((r,i={})=>e.filter(r,Ie(s,i)),"filter"),defaults:o(r=>e.defaults(Ie(s,r)),"defaults"),makeRe:o((r,i={})=>e.makeRe(r,Ie(s,i)),"makeRe"),braceExpand:o((r,i={})=>e.braceExpand(r,Ie(s,i)),"braceExpand"),match:o((r,i,n={})=>e.match(r,i,Ie(s,n)),"match"),sep:e.sep,GLOBSTAR:v.GLOBSTAR})},"defaults");v.defaults=ZO;v.minimatch.defaults=v.defaults;var KO=o((s,e={})=>((0,an.assertValidPattern)(s),e.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:(0,_O.expand)(s)),"braceExpand");v.braceExpand=KO;v.minimatch.braceExpand=v.braceExpand;var YO=o((s,e={})=>new Kt(s,e).makeRe(),"makeRe");v.makeRe=YO;v.minimatch.makeRe=v.makeRe;var XO=o((s,e,t={})=>{let r=new Kt(e,t);return s=s.filter(i=>r.match(i)),r.options.nonull&&!s.length&&s.push(e),s},"match");v.match=XO;v.minimatch.match=v.match;var kp=/[?*]|[+@!]\(.*?\)|\[|\]/,JO=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Kt=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,an.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||$p,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!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)=>{}),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,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=n[0]===""&&n[1]===""&&(n[2]==="?"||!kp.test(n[2]))&&!kp.test(n[3]),u=/^[a-z]:/i.test(n[0]);if(h)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(u)return[n[0],...n.slice(1).map(l=>this.parse(l))]}return n.map(h=>this.parse(h))});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 a=this.set[n];a[0]===""&&a[1]===""&&this.globParts[n][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let 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 a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let c=r[i+1],h=r[i+2],u=r[i+3];if(c!==".."||!h||h==="."||h===".."||!u||u==="."||u==="..")continue;t=!0,r.splice(i,1);let l=r.slice(0);l[i]="**",e.push(l),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(t=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let n=0;for(;(n=r.indexOf("..",n+1))!==-1;){let a=r[n-1];if(a&&a!=="."&&a!==".."&&a!=="**"){t=!0;let h=n===1&&r[n+1]==="**"?["."]:[];r.splice(n-1,2,...h),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,a=[],c="";for(;i<e.length&&n<t.length;)if(e[i]===t[n])a.push(c==="b"?t[n]:e[i]),i++,n++;else if(r&&e[i]==="**"&&t[n]===e[i+1])a.push(e[i]),i++;else if(r&&t[n]==="**"&&e[i]===t[n+1])a.push(t[n]),n++;else if(e[i]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="b")return!1;c="a",a.push(e[i]),i++,n++}else if(t[n]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="a")return!1;c="b",a.push(t[n]),i++,n++}else return!1;return e.length===t.length&&a}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 g=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),w=!g&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),S=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),I=!S&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),T=w?3:g?0:void 0,_=I?3:S?0:void 0;if(typeof T=="number"&&typeof _=="number"){let[O,A]=[e[T],t[_]];O.toLowerCase()===A.toLowerCase()&&(t[_]=O,_>T?t=t.slice(_):T>_&&(e=e.slice(T)))}}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 a=0,c=0,h=e.length,u=t.length;a<h&&c<u;a++,c++){this.debug("matchOne loop");var l=t[c],f=e[a];if(this.debug(t,l,f),l===!1)return!1;if(l===v.GLOBSTAR){this.debug("GLOBSTAR",[t,l,f]);var d=a,p=c+1;if(p===u){for(this.debug("** at the end");a<h;a++)if(e[a]==="."||e[a]===".."||!i.dot&&e[a].charAt(0)===".")return!1;return!0}for(;d<h;){var y=e[d];if(this.debug(`
16
+ globstar while`,e,d,t,p,y),this.matchOne(e.slice(d),t.slice(p),r))return this.debug("globstar found match!",d,h,y),!0;if(y==="."||y===".."||!i.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(r&&(this.debug(`
17
+ >>> no match, partial?`,e,d,t,p),d===h))}let g;if(typeof l=="string"?(g=f===l,this.debug("string match",l,f,g)):(g=l.test(f),this.debug("pattern match",l,f,g)),!g)return!1}if(a===h&&c===u)return!0;if(a===h)return r;if(c===u)return a===h-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,v.braceExpand)(this.pattern,this.options)}parse(e){(0,an.assertValidPattern)(e);let t=this.options;if(e==="**")return v.GLOBSTAR;if(e==="")return"";let r,i=null;(r=e.match(kO))?i=t.dot?FO:DO:(r=e.match(vO))?i=(t.nocase?t.dot?AO:CO:t.dot?TO:IO)(r[1]):(r=e.match(MO))?i=(t.nocase?t.dot?qO:$O:t.dot?UO:jO)(r):(r=e.match(xO))?i=t.dot?NO:BO:(r=e.match(PO))&&(i=LO);let n=Dp.AST.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?zO:t.dot?GO:VO,i=new Set(t.nocase?["i"]:[]),n=e.map(h=>{let u=h.map(l=>{if(l instanceof RegExp)for(let f of l.flags.split(""))i.add(f);return typeof l=="string"?JO(l):l===v.GLOBSTAR?v.GLOBSTAR:l._src});return u.forEach((l,f)=>{let d=u[f+1],p=u[f-1];l!==v.GLOBSTAR||p===v.GLOBSTAR||(p===void 0?d!==void 0&&d!==v.GLOBSTAR?u[f+1]="(?:\\/|"+r+"\\/)?"+d:u[f]=r:d===void 0?u[f-1]=p+"(?:\\/|"+r+")?":d!==v.GLOBSTAR&&(u[f-1]=p+"(?:\\/|\\/"+r+"\\/)"+d,u[f+1]=v.GLOBSTAR))}),u.filter(l=>l!==v.GLOBSTAR).join("/")}).join("|"),[a,c]=e.length>1?["(?:",")"]:["",""];n="^"+a+n+c+"$",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 a=i[i.length-1];if(!a)for(let c=i.length-2;!a&&c>=0;c--)a=i[c];for(let c=0;c<n.length;c++){let h=n[c],u=i;if(r.matchBase&&h.length===1&&(u=[a]),this.matchOne(u,h,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return v.minimatch.defaults(e).Minimatch}};v.Minimatch=Kt;var QO=lc();Object.defineProperty(v,"AST",{enumerable:!0,get:o(function(){return QO.AST},"get")});var ev=fc();Object.defineProperty(v,"escape",{enumerable:!0,get:o(function(){return ev.escape},"get")});var tv=tn();Object.defineProperty(v,"unescape",{enumerable:!0,get:o(function(){return tv.unescape},"get")});v.minimatch.AST=Dp.AST;v.minimatch.Minimatch=Kt;v.minimatch.escape=bO.escape;v.minimatch.unescape=RO.unescape});var em=m(L=>{"use strict";var sv=L&&L.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),rv=L&&L.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),iv=L&&L.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&sv(e,s,t);return rv(e,s),e};Object.defineProperty(L,"__esModule",{value:!0});L.PathScurry=L.Path=L.PathScurryDarwin=L.PathScurryPosix=L.PathScurryWin32=L.PathScurryBase=L.PathPosix=L.PathWin32=L.PathBase=L.ChildrenCache=L.ResolveCache=void 0;var Gp=bs(),fn=require("node:path"),nv=require("node:url"),Tr=require("fs"),ov=iv(require("node:fs")),av=Tr.realpathSync.native,cn=require("node:fs/promises"),qp=ee(),Cr={lstatSync:Tr.lstatSync,readdir:Tr.readdir,readdirSync:Tr.readdirSync,readlinkSync:Tr.readlinkSync,realpathSync:av,promises:{lstat:cn.lstat,readdir:cn.readdir,readlink:cn.readlink,realpath:cn.realpath}},Vp=o(s=>!s||s===Cr||s===ov?Cr:{...Cr,...s,promises:{...Cr.promises,...s.promises||{}}},"fsFromOption"),Wp=/^\\\\\?\\([a-z]:)\\?$/i,cv=o(s=>s.replace(/\//g,"\\").replace(Wp,"$1\\"),"uncToDrive"),hv=/[\\\/]/,Ce=0,Zp=1,Kp=2,Ke=4,Yp=6,Xp=8,Yt=10,Jp=12,Te=15,Ir=~Te,dc=16,Up=32,Ar=64,Me=128,hn=256,ln=512,jp=Ar|Me|ln,uv=1023,pc=o(s=>s.isFile()?Xp:s.isDirectory()?Ke:s.isSymbolicLink()?Yt:s.isCharacterDevice()?Kp:s.isBlockDevice()?Yp:s.isSocket()?Jp:s.isFIFO()?Zp:Ce,"entToType"),Hp=new Map,xr=o(s=>{let e=Hp.get(s);if(e)return e;let t=s.normalize("NFKD");return Hp.set(s,t),t},"normalize"),zp=new Map,un=o(s=>{let e=zp.get(s);if(e)return e;let t=xr(s.toLowerCase());return zp.set(s,t),t},"normalizeNocase"),Br=class extends Gp.LRUCache{static{o(this,"ResolveCache")}constructor(){super({max:256})}};L.ResolveCache=Br;var dn=class extends Gp.LRUCache{static{o(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:o(t=>t.length+1,"sizeCalculation")})}};L.ChildrenCache=dn;var Qp=Symbol("PathScurry setAsCwd"),J=class{static{o(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#l;get rdev(){return this.#l}#f;get blksize(){return this.#f}#c;get ino(){return this.#c}#p;get size(){return this.#p}#d;get blocks(){return this.#d}#h;get atimeMs(){return this.#h}#n;get mtimeMs(){return this.#n}#g;get ctimeMs(){return this.#g}#_;get birthtimeMs(){return this.#_}#S;get atime(){return this.#S}#y;get mtime(){return this.#y}#C;get ctime(){return this.#C}#E;get birthtime(){return this.#E}#R;#I;#w;#b;#T;#m;#o;#P;#A;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ce,r,i,n,a,c){this.name=e,this.#R=n?un(e):xr(e),this.#o=t&uv,this.nocase=n,this.roots=i,this.root=r||this,this.#P=a,this.#w=c.fullpath,this.#T=c.relative,this.#m=c.relativePosix,this.parent=c.parent,this.parent?this.#e=this.parent.#e:this.#e=Vp(c.fs)}depth(){return this.#I!==void 0?this.#I:this.parent?this.#I=this.parent.depth()+1:this.#I=0}childrenCache(){return this.#P}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#U(i):this.#U(i)}#U(e){let t=this;for(let r of e)t=t.child(r);return t}children(){let e=this.#P.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#P.set(this,t),this.#o&=~dc,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let r=this.children(),i=this.nocase?un(e):xr(e);for(let h of r)if(h.#R===i)return h;let n=this.parent?this.sep:"",a=this.#w?this.#w+n+e:void 0,c=this.newChild(e,Ce,{...t,parent:this,fullpath:a});return this.canReaddir()||(c.#o|=Me),r.push(c),c}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=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.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#w=i}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.#o&Te)===Ce}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.#o&Te)===Xp}isDirectory(){return(this.#o&Te)===Ke}isCharacterDevice(){return(this.#o&Te)===Kp}isBlockDevice(){return(this.#o&Te)===Yp}isFIFO(){return(this.#o&Te)===Zp}isSocket(){return(this.#o&Te)===Jp}isSymbolicLink(){return(this.#o&Yt)===Yt}lstatCached(){return this.#o&Up?this:void 0}readlinkCached(){return this.#A}realpathCached(){return this.#O}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.#o&Te;return!(e!==Ce&&e!==Yt||this.#o&hn||this.#o&Me)}calledReaddir(){return!!(this.#o&dc)}isENOENT(){return!!(this.#o&Me)}isNamed(e){return this.nocase?this.#R===un(e):this.#R===xr(e)}async readlink(){let e=this.#A;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.#A=r}catch(t){this.#j(t.code);return}}readlinkSync(){let e=this.#A;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.#A=r}catch(t){this.#j(t.code);return}}#v(e){this.#o|=dc;for(let t=e.provisional;t<e.length;t++){let r=e[t];r&&r.#M()}}#M(){this.#o&Me||(this.#o=(this.#o|Me)&Ir,this.#L())}#L(){let e=this.children();e.provisional=0;for(let t of e)t.#M()}#$(){this.#o|=ln,this.#k()}#k(){if(this.#o&Ar)return;let e=this.#o;(e&Te)===Ke&&(e&=Ir),this.#o=e|Ar,this.#L()}#x(e=""){e==="ENOTDIR"||e==="EPERM"?this.#k():e==="ENOENT"?this.#M():this.children().provisional=0}#N(e=""){e==="ENOTDIR"?this.parent.#k():e==="ENOENT"&&this.#M()}#j(e=""){let t=this.#o;t|=hn,e==="ENOENT"&&(t|=Me),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Ir),this.#o=t,e==="ENOTDIR"&&this.parent&&this.parent.#k()}#D(e,t){return this.#u(e,t)||this.#H(e,t)}#H(e,t){let r=pc(e),i=this.newChild(e.name,r,{parent:this}),n=i.#o&Te;return n!==Ke&&n!==Yt&&n!==Ce&&(i.#o|=Ar),t.unshift(i),t.provisional++,i}#u(e,t){for(let r=t.provisional;r<t.length;r++){let i=t[r];if((this.nocase?un(e.name):xr(e.name))===i.#R)return this.#z(e,i,r,t)}}#z(e,t,r,i){let n=t.name;return t.#o=t.#o&Ir|pc(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.#o&Me)===0)try{return this.#F(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#N(e.code)}}lstatSync(){if((this.#o&Me)===0)try{return this.#F(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#N(e.code)}}#F(e){let{atime:t,atimeMs:r,birthtime:i,birthtimeMs:n,blksize:a,blocks:c,ctime:h,ctimeMs:u,dev:l,gid:f,ino:d,mode:p,mtime:y,mtimeMs:g,nlink:w,rdev:S,size:I,uid:T}=e;this.#S=t,this.#h=r,this.#E=i,this.#_=n,this.#f=a,this.#d=c,this.#C=h,this.#g=u,this.#t=l,this.#a=f,this.#c=d,this.#s=p,this.#y=y,this.#n=g,this.#r=w,this.#l=S,this.#p=I,this.#i=T;let _=pc(e);this.#o=this.#o&Ir|_|Up,_!==Ce&&_!==Ke&&_!==Yt&&(this.#o|=Ar)}#B=[];#q=!1;#V(e){this.#q=!1;let t=this.#B.slice();this.#B.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.#B.push(e),this.#q)return;this.#q=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(n,a)=>{if(n)this.#x(n.code),r.provisional=0;else{for(let c of a)this.#D(c,r);this.#v(r)}this.#V(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=o(()=>{},"resolve");this.#G=new Promise(i=>r=i);try{for(let i of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#D(i,e);this.#v(e)}catch(i){this.#x(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.#D(r,e);this.#v(e)}catch(r){this.#x(r.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#o&jp)return!1;let e=Te&this.#o;return e===Ce||e===Ke||e===Yt}shouldWalk(e,t){return(this.#o&Ke)===Ke&&!(this.#o&jp)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!((ln|hn|Me)&this.#o))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#$()}}realpathSync(){if(this.#O)return this.#O;if(!((ln|hn|Me)&this.#o))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#$()}}[Qp](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.#T=r.join(this.sep),i.#m=r.join("/"),i=i.parent,r.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#T=void 0,i.#m=void 0,i=i.parent}};L.PathBase=J;var Nr=class s extends J{static{o(this,"PathWin32")}sep="\\";splitSep=hv;constructor(e,t=Ce,r,i,n,a,c){super(e,t,r,i,n,a,c)}newChild(e,t=Ce,r={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return fn.win32.parse(e).root}getRoot(e){if(e=cv(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,r]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=r;return this.roots[e]=new kr(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Wp,"$1\\"),e===t}};L.PathWin32=Nr;var Pr=class s extends J{static{o(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=Ce,r,i,n,a,c){super(e,t,r,i,n,a,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ce,r={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}};L.PathPosix=Pr;var Lr=class{static{o(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#s;nocase;#r;constructor(e=process.cwd(),t,r,{nocase:i,childrenCacheSize:n=16*1024,fs:a=Cr}={}){this.#r=Vp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,nv.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#e=new Br,this.#t=new Br,this.#s=new dn(n);let h=c.substring(this.rootPath.length).split(r);if(h.length===1&&!h[0]&&h.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let u=this.root,l=h.length-1,f=t.sep,d=this.rootPath,p=!1;for(let y of h){let g=l--;u=u.child(y,{relative:new Array(g).fill("..").join(f),relativePosix:new Array(g).fill("..").join("/"),fullpath:d+=(p?"":f)+y}),p=!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 t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))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 a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let r=this.#t.get(t);if(r!==void 0)return r;let i=this.cwd.resolve(t).fullpathPosix();return this.#t.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 J||(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 J||(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 J||(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 J||(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 J||(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 J||(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 J||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let h=new Set,u=o((f,d)=>{h.add(f),f.readdirCB((p,y)=>{if(p)return d(p);let g=y.length;if(!g)return d();let w=o(()=>{--g===0&&d()},"next");for(let S of y)(!n||n(S))&&c.push(r?S:S.fullpath()),i&&S.isSymbolicLink()?S.realpath().then(I=>I?.isUnknown()?I.lstat():I).then(I=>I?.shouldWalk(h,a)?u(I,w):w()):S.shouldWalk(h,a)?u(S,w):w()},!0)},"walk"),l=e;return new Promise((f,d)=>{u(l,p=>{if(p)return d(p);f(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof J||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let h=new Set([e]);for(let u of h){let l=u.readdirSync();for(let f of l){(!n||n(f))&&c.push(r?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(h,a)&&h.add(d)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof J||(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 J||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t;(!n||n(e))&&(yield r?e:e.fullpath());let c=new Set([e]);for(let h of c){let u=h.readdirSync();for(let l of u){(!n||n(l))&&(yield r?l:l.fullpath());let f=l;if(l.isSymbolicLink()){if(!(i&&(f=l.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(c,a)&&c.add(f)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof J||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=new qp.Minipass({objectMode:!0});(!n||n(e))&&c.write(r?e:e.fullpath());let h=new Set,u=[e],l=0,f=o(()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&c.end();return}l++,h.add(p);let y=o((w,S,I=!1)=>{if(w)return c.emit("error",w);if(i&&!I){let T=[];for(let _ of S)_.isSymbolicLink()&&T.push(_.realpath().then(O=>O?.isUnknown()?O.lstat():O));if(T.length){Promise.all(T).then(()=>y(null,S,!0));return}}for(let T of S)T&&(!n||n(T))&&(c.write(r?T:T.fullpath())||(d=!0));l--;for(let T of S){let _=T.realpathCached()||T;_.shouldWalk(h,a)&&u.push(_)}d&&!c.flowing?c.once("drain",f):g||f()},"onReaddir"),g=!0;p.readdirCB(y,!0),g=!1}},"process");return f(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof J||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=new qp.Minipass({objectMode:!0}),h=new Set;(!n||n(e))&&c.write(r?e:e.fullpath());let u=[e],l=0,f=o(()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&c.end();return}l++,h.add(p);let y=p.readdirSync();for(let g of y)(!n||n(g))&&(c.write(r?g:g.fullpath())||(d=!0));l--;for(let g of y){let w=g;if(g.isSymbolicLink()){if(!(i&&(w=g.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(h,a)&&u.push(w)}}d&&!c.flowing&&c.once("drain",f)},"process");return f(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Qp](t)}};L.PathScurryBase=Lr;var kr=class extends Lr{static{o(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,fn.win32,"\\",{...t,nocase:r}),this.nocase=r;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return fn.win32.parse(e).root.toUpperCase()}newRoot(e){return new Nr(this.rootPath,Ke,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};L.PathScurryWin32=kr;var Dr=class extends Lr{static{o(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:r=!1}=t;super(e,fn.posix,"/",{...t,nocase:r}),this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new Pr(this.rootPath,Ke,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};L.PathScurryPosix=Dr;var pn=class extends Dr{static{o(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,{...t,nocase:r})}};L.PathScurryDarwin=pn;L.Path=process.platform==="win32"?Nr:Pr;L.PathScurry=process.platform==="win32"?kr:process.platform==="darwin"?pn:Dr});var gc=m(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.Pattern=void 0;var lv=At(),fv=o(s=>s.length>=1,"isPatternList"),dv=o(s=>s.length>=1,"isGlobList"),mc=class s{static{o(this,"Pattern")}#e;#t;#s;length;#r;#i;#a;#l;#f;#c;#p=!0;constructor(e,t,r,i){if(!fv(e))throw new TypeError("empty pattern list");if(!dv(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,r<0||r>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#s=r,this.#r=i,this.#s===0){if(this.isUNC()){let[n,a,c,h,...u]=this.#e,[l,f,d,p,...y]=this.#t;u[0]===""&&(u.shift(),y.shift());let g=[n,a,c,h,""].join("/"),w=[l,f,d,p,""].join("/");this.#e=[g,...u],this.#t=[w,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...a]=this.#e,[c,...h]=this.#t;a[0]===""&&(a.shift(),h.shift());let u=n+"/",l=c+"/";this.#e=[u,...a],this.#t=[l,...h],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]===lv.GLOBSTAR}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#a=this.#a||(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.#i!==void 0?this.#i:this.hasMore()?(this.#i=new s(this.#e,this.#t,this.#s+1,this.#r),this.#i.#c=this.#c,this.#i.#f=this.#f,this.#i.#l=this.#l,this.#i):this.#i=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#r==="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.#l!==void 0?this.#l:this.#l=this.#r==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=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.#p)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#p?!1:(this.#p=!1,!0)}};mn.Pattern=mc});var Ec=m(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.Ignore=void 0;var tm=At(),pv=gc(),mv=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",yc=class{static{o(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:i,noglobstar:n,platform:a=mv}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:t,nocase:r,noext:i,noglobstar:n,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new tm.Minimatch(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 a=new pv.Pattern(i,n,0,this.platform),c=new tm.Minimatch(a.globString(),this.mmopts),h=n[n.length-1]==="**",u=a.isAbsolute();u?this.absolute.push(c):this.relative.push(c),h&&(u?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),r=`${t}/`,i=e.relative()||".",n=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(n))return!0;for(let a of this.absolute)if(a.match(t)||a.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}};gn.Ignore=yc});var rm=m(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Processor=Ye.SubWalks=Ye.MatchRecord=Ye.HasWalkedCache=void 0;var sm=At(),yn=class s{static{o(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new s(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let r=e.fullpath(),i=this.store.get(r);i?i.add(t.globString()):this.store.set(r,new Set([t.globString()]))}};Ye.HasWalkedCache=yn;var En=class{static{o(this,"MatchRecord")}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)])}};Ye.MatchRecord=En;var wn=class{static{o(this,"SubWalks")}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())}};Ye.SubWalks=wn;var wc=class s{static{o(this,"Processor")}hasWalkedCache;matches=new En;subwalks=new wn;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new yn}processPatterns(e,t){this.patterns=t;let r=t.map(i=>[e,i]);for(let[i,n]of r){this.hasWalkedCache.storeWalked(i,n);let a=n.root(),c=n.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let f=n.rest();if(f)n=f;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let h,u,l=!1;for(;typeof(h=n.pattern())=="string"&&(u=n.rest());)i=i.resolve(h),n=u,l=!0;if(h=n.pattern(),u=n.rest(),l){if(this.hasWalkedCache.hasWalked(i,n))continue;this.hasWalkedCache.storeWalked(i,n)}if(typeof h=="string"){let f=h===".."||h===""||h===".";this.matches.add(i.resolve(h),c,f);continue}else if(h===sm.GLOBSTAR){(!i.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(i,n);let f=u?.pattern(),d=u?.rest();if(!u||(f===""||f===".")&&!d)this.matches.add(i,c,f===""||f===".");else if(f===".."){let p=i.parent||i;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,c,!0)}}else h instanceof RegExp&&this.subwalks.add(i,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new s(this.opts,this.hasWalkedCache)}filterEntries(e,t){let r=this.subwalks.get(e),i=this.child();for(let n of t)for(let a of r){let c=a.isAbsolute(),h=a.pattern(),u=a.rest();h===sm.GLOBSTAR?i.testGlobstar(n,a,u,c):h instanceof RegExp?i.testRegExp(n,h,u,c):i.testString(n,h,u,c)}return i}testGlobstar(e,t,r,i){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){let n=r.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,r.rest(),i);else if(n===".."){let a=e.parent||e;this.subwalks.add(a,r)}else n instanceof RegExp&&this.testRegExp(e,n,r.rest(),i)}}testRegExp(e,t,r,i){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,i,!1))}testString(e,t,r,i){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,i,!1))}};Ye.Processor=wc});var om=m(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.GlobStream=xt.GlobWalker=xt.GlobUtil=void 0;var gv=ee(),im=Ec(),nm=rm(),yv=o((s,e)=>typeof s=="string"?new im.Ignore([s],e):Array.isArray(s)?new im.Ignore(s,e):s,"makeIgnore"),Fr=class{static{o(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#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.#t=yv(r.ignore??[],r),!this.includeChildMatches&&typeof this.#t.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}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(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,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 n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=await n.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(n,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.#r(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 n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=n.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let n=`${e.relativePosix()}/**`;this.#t.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(),a=this.opts.dotRelative&&!n.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(n?a+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 nm.Processor(this.opts),r)}walkCB2(e,t,r,i){if(this.#i(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,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||(n++,this.match(c,h,u).then(()=>a()));for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let h=c.readdirCached();c.calledReaddir()?this.walkCB3(c,h,r,a):c.readdirCB((u,l)=>this.walkCB3(c,l,r,a),!0)}a()}walkCB3(e,t,r,i){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||(n++,this.match(c,h,u).then(()=>a()));for(let[c,h]of r.subwalks.entries())n++,this.walkCB2(c,h,r.child(),a);a()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new nm.Processor(this.opts),r)}walkCB2Sync(e,t,r,i){if(this.#i(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,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||this.matchSync(c,h,u);for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let h=c.readdirSync();this.walkCB3Sync(c,h,r,a)}a()}walkCB3Sync(e,t,r,i){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||this.matchSync(c,h,u);for(let[c,h]of r.subwalks.entries())n++,this.walkCB2Sync(c,h,r.child(),a);a()}};xt.GlobUtil=Fr;var Sc=class extends Fr{static{o(this,"GlobWalker")}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}};xt.GlobWalker=Sc;var _c=class extends Fr{static{o(this,"GlobStream")}results;constructor(e,t,r){super(e,t,r),this.results=new gv.Minipass({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}};xt.GlobStream=_c});var Rc=m(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.Glob=void 0;var Ev=At(),wv=require("node:url"),Sn=em(),Sv=gc(),_n=om(),_v=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",bc=class{static{o(this,"Glob")}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=(0,wv.fileURLToPath)(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(h=>h.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(h=>h.includes("/")?h:`./**/${h}`)}if(this.pattern=e,this.platform=t.platform||_v,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 h=t.platform==="win32"?Sn.PathScurryWin32:t.platform==="darwin"?Sn.PathScurryDarwin:t.platform?Sn.PathScurryPosix:Sn.PathScurry;this.scurry=new h(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let r=this.platform==="darwin"||this.platform==="win32",i={...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(h=>new Ev.Minimatch(h,i)),[a,c]=n.reduce((h,u)=>(h[0].push(...u.set),h[1].push(...u.globParts),h),[[],[]]);this.patterns=a.map((h,u)=>{let l=c[u];if(!l)throw new Error("invalid pattern object");return new Sv.Pattern(h,l,0,this.platform)})}async walk(){return[...await new _n.GlobWalker(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 _n.GlobWalker(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 _n.GlobStream(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 _n.GlobStream(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()}};bn.Glob=bc});var Oc=m(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.hasMagic=void 0;var bv=At(),Rv=o((s,e={})=>{Array.isArray(s)||(s=[s]);for(let t of s)if(new bv.Minimatch(t,e).hasMagic())return!0;return!1},"hasMagic");Rn.hasMagic=Rv});var um=m(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.glob=N.sync=N.iterate=N.iterateSync=N.stream=N.streamSync=N.Ignore=N.hasMagic=N.Glob=N.unescape=N.escape=void 0;N.globStreamSync=Mr;N.globStream=vc;N.globSync=Ic;N.globIterateSync=$r;N.globIterate=Tc;var am=At(),Xt=Rc(),Ov=Oc(),hm=At();Object.defineProperty(N,"escape",{enumerable:!0,get:o(function(){return hm.escape},"get")});Object.defineProperty(N,"unescape",{enumerable:!0,get:o(function(){return hm.unescape},"get")});var vv=Rc();Object.defineProperty(N,"Glob",{enumerable:!0,get:o(function(){return vv.Glob},"get")});var Iv=Oc();Object.defineProperty(N,"hasMagic",{enumerable:!0,get:o(function(){return Iv.hasMagic},"get")});var Tv=Ec();Object.defineProperty(N,"Ignore",{enumerable:!0,get:o(function(){return Tv.Ignore},"get")});function Mr(s,e={}){return new Xt.Glob(s,e).streamSync()}o(Mr,"globStreamSync");function vc(s,e={}){return new Xt.Glob(s,e).stream()}o(vc,"globStream");function Ic(s,e={}){return new Xt.Glob(s,e).walkSync()}o(Ic,"globSync");async function cm(s,e={}){return new Xt.Glob(s,e).walk()}o(cm,"glob_");function $r(s,e={}){return new Xt.Glob(s,e).iterateSync()}o($r,"globIterateSync");function Tc(s,e={}){return new Xt.Glob(s,e).iterate()}o(Tc,"globIterate");N.streamSync=Mr;N.stream=Object.assign(vc,{sync:Mr});N.iterateSync=$r;N.iterate=Object.assign(Tc,{sync:$r});N.sync=Object.assign(Ic,{stream:Mr,iterate:$r});N.glob=Object.assign(cm,{glob:cm,globSync:Ic,sync:N.sync,globStream:vc,stream:N.stream,globStreamSync:Mr,streamSync:N.streamSync,globIterate:Tc,iterate:N.iterate,globIterateSync:$r,iterateSync:N.iterateSync,Glob:Xt.Glob,hasMagic:Ov.hasMagic,escape:am.escape,unescape:am.unescape});N.glob.glob=N.glob});var Cc=m((UN,fm)=>{"use strict";var{glob:Cv}=um(),lm=require("path"),Av=o(s=>s.split(lm.win32.sep).join(lm.posix.sep),"globify");fm.exports=(s,e)=>Cv(Av(s),e)});var pm=m((HN,dm)=>{"use strict";var xv=require("fs/promises"),Bv=gs(),{hasContent:Nv}=ec();dm.exports=Pv;async function Pv(s,e){let t=await Nv(s,e);return t&&t.sri?(await xv.rm(Bv(s,t.sri),{recursive:!0,force:!0}),!0):!1}o(Pv,"rm")});var gm=m((GN,qr)=>{"use strict";var{rm:Lv}=require("fs/promises"),kv=Cc(),Dv=Ss(),Ac=yr(),Fv=require("path"),Mv=pm();qr.exports=mm;qr.exports.entry=mm;function mm(s,e,t){return Ac.clearMemoized(),Dv.delete(s,e,t)}o(mm,"entry");qr.exports.content=$v;function $v(s,e){return Ac.clearMemoized(),Mv(s,e)}o($v,"content");qr.exports.all=qv;async function qv(s){Ac.clearMemoized();let e=await kv(Fv.join(s,"*(content-*|index-*)"),{silent:!0,nosort:!0});return Promise.all(e.map(t=>Lv(t,{recursive:!0,force:!0})))}o(qv,"all")});var Em=m((WN,Pc)=>{"use strict";var{mkdir:Uv,readFile:jv,rm:Bc,stat:Nc,truncate:Hv,writeFile:zv}=require("fs/promises"),ym=gs(),Gv=Xi(),Vv=Cc(),Bs=Ss(),On=require("path"),xc=Ot(),Wv=o((s,e)=>Object.prototype.hasOwnProperty.call(s,e),"hasOwnProperty"),Zv=o(s=>({concurrency:20,log:{silly(){}},...s}),"verifyOpts");Pc.exports=Kv;async function Kv(s,e){e=Zv(e),e.log.silly("verify","verifying cache at",s);let t=[Yv,Jv,Qv,tI,rI,iI,Xv],r={};for(let i of t){let n=i.name,a=new Date,c=await i(s,e);c&&Object.keys(c).forEach(u=>{r[u]=c[u]});let h=new Date;r.runTime||(r.runTime={}),r.runTime[n]=h-a}return r.runTime.total=r.endTime-r.startTime,e.log.silly("verify","verification finished for",s,"in",`${r.runTime.total}ms`),r}o(Kv,"verify");async function Yv(){return{startTime:new Date}}o(Yv,"markStartTime");async function Xv(){return{endTime:new Date}}o(Xv,"markEndTime");async function Jv(s,e){return e.log.silly("verify","fixing cache permissions"),await Uv(s,{recursive:!0}),null}o(Jv,"fixPerms");async function Qv(s,e){e.log.silly("verify","garbage collecting content");let{default:t}=await Promise.resolve().then(()=>(Di(),ki)),r=Bs.lsStream(s),i=new Set;r.on("data",h=>{if(e.filter&&!e.filter(h))return;let u=xc.parse(h.integrity);for(let l in u)i.add(u[l].toString())}),await new Promise((h,u)=>{r.on("end",h).on("error",u)});let n=ym.contentDir(s),a=await Vv(On.join(n,"**"),{follow:!1,nodir:!0,nosort:!0}),c={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};return await t(a,async h=>{let u=h.split(/[/\\]/),l=u.slice(u.length-3).join(""),f=u[u.length-4],d=xc.fromHex(l,f);if(i.has(d.toString())){let p=await eI(h,d);p.valid?(c.verifiedContent++,c.keptSize+=p.size):(c.reclaimedCount++,c.badContentCount++,c.reclaimedSize+=p.size)}else{c.reclaimedCount++;let p=await Nc(h);await Bc(h,{recursive:!0,force:!0}),c.reclaimedSize+=p.size}return c},{concurrency:e.concurrency}),c}o(Qv,"garbageCollect");async function eI(s,e){let t={};try{let{size:r}=await Nc(s);t.size=r,t.valid=!0,await xc.checkStream(new Gv.ReadStream(s),e)}catch(r){if(r.code==="ENOENT")return{size:0,valid:!1};if(r.code!=="EINTEGRITY")throw r;await Bc(s,{recursive:!0,force:!0}),t.valid=!1}return t}o(eI,"verifyContent");async function tI(s,e){e.log.silly("verify","rebuilding index");let{default:t}=await Promise.resolve().then(()=>(Di(),ki)),r=await Bs.ls(s),i={missingContent:0,rejectedEntries:0,totalEntries:0},n={};for(let a in r)if(Wv(r,a)){let c=Bs.hashKey(a),h=r[a],u=e.filter&&!e.filter(h);u&&i.rejectedEntries++,n[c]&&!u?n[c].push(h):n[c]&&u||(u?(n[c]=[],n[c]._path=Bs.bucketPath(s,a)):(n[c]=[h],n[c]._path=Bs.bucketPath(s,a)))}return await t(Object.keys(n),a=>sI(s,n[a],i,e),{concurrency:e.concurrency}),i}o(tI,"rebuildIndex");async function sI(s,e,t){await Hv(e._path);for(let r of e){let i=ym(s,r.integrity);try{await Nc(i),await Bs.insert(s,r.key,r.integrity,{metadata:r.metadata,size:r.size,time:r.time}),t.totalEntries++}catch(n){if(n.code==="ENOENT")t.rejectedEntries++,t.missingContent++;else throw n}}}o(sI,"rebuildBucket");function rI(s,e){return e.log.silly("verify","cleaning tmp directory"),Bc(On.join(s,"tmp"),{recursive:!0,force:!0})}o(rI,"cleanTmp");async function iI(s,e){let t=On.join(s,"_lastverified");return e.log.silly("verify","writing verifile to "+t),zv(t,`${Date.now()}`)}o(iI,"writeVerifile");Pc.exports.lastRun=nI;async function nI(s){let e=await jv(On.join(s,"_lastverified"),{encoding:"utf8"});return new Date(+e)}o(nI,"lastRun")});var Sm=m((KN,kc)=>{"use strict";var{withTempDir:oI}=Li(),wm=require("fs/promises"),Lc=require("path");kc.exports.mkdir=aI;async function aI(s,e={}){let{tmpPrefix:t}=e,r=Lc.join(s,"tmp");await wm.mkdir(r,{recursive:!0,owner:"inherit"});let i=`${r}${Lc.sep}${t||""}`;return wm.mkdtemp(i,{owner:"inherit"})}o(aI,"mktmpdir");kc.exports.withTmp=cI;function cI(s,e,t){return t||(t=e,e={}),oI(Lc.join(s,"tmp"),t,e)}o(cI,"withTmp")});var Om=m((XN,F)=>{"use strict";var Bt=cp(),_m=Ep(),Dc=gm(),bm=Em(),{clearMemoized:hI}=yr(),Rm=Sm(),vn=Ss();F.exports.index={};F.exports.index.compact=vn.compact;F.exports.index.insert=vn.insert;F.exports.ls=vn.ls;F.exports.ls.stream=vn.lsStream;F.exports.get=Bt;F.exports.get.byDigest=Bt.byDigest;F.exports.get.stream=Bt.stream;F.exports.get.stream.byDigest=Bt.stream.byDigest;F.exports.get.copy=Bt.copy;F.exports.get.copy.byDigest=Bt.copy.byDigest;F.exports.get.info=Bt.info;F.exports.get.hasContent=Bt.hasContent;F.exports.put=_m;F.exports.put.stream=_m.stream;F.exports.rm=Dc.entry;F.exports.rm.all=Dc.all;F.exports.rm.entry=F.exports.rm;F.exports.rm.content=Dc.content;F.exports.clearMemoized=hI;F.exports.tmp={};F.exports.tmp.mkdir=Rm.mkdir;F.exports.tmp.withTmp=Rm.withTmp;F.exports.verify=bm;F.exports.verify.lastRun=bm.lastRun});var Mc=m((JN,vm)=>{"use strict";var uI=ms(),Fc=class extends uI{static{o(this,"CachingMinipassPipeline")}#e=[];#t=new Map;constructor(e,...t){super(),this.#e=e.events,t.length&&this.push(...t)}on(e,t){return this.#e.includes(e)&&this.#t.has(e)?t(...this.#t.get(e)):super.on(e,t)}emit(e,...t){return this.#e.includes(e)&&this.#t.set(e,t),super.emit(e,...t)}};vm.exports=Fc});var Tm=m((eP,Im)=>{var{URL:lI,format:fI}=require("url"),dI={auth:!1,fragment:!1,search:!0,unicode:!1},pI=o(s=>{let e=new lI(s.url);return`make-fetch-happen:request-cache:${fI(e,dI)}`},"cacheKey");Im.exports=pI});var xm=m((sP,Am)=>{"use strict";function Cm(s,e){for(let t in e)Object.defineProperty(s,t,{value:e[t],enumerable:!0,configurable:!0});return s}o(Cm,"assign");function mI(s,e,t){if(!s||typeof s=="string")throw new TypeError("Please pass an Error to err-code");t||(t={}),typeof e=="object"&&(t=e,e=void 0),e!=null&&(t.code=e);try{return Cm(s,t)}catch{t.message=s.message,t.stack=s.stack;let i=o(function(){},"ErrClass");return i.prototype=Object.create(Object.getPrototypeOf(s)),Cm(new i,t)}}o(mI,"createError");Am.exports=mI});var Nm=m((iP,Bm)=>{function Ae(s,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(s)),this._timeouts=s,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}o(Ae,"RetryOperation");Bm.exports=Ae;Ae.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Ae.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};Ae.prototype.retry=function(s){if(this._timeout&&clearTimeout(this._timeout),!s)return!1;var e=new Date().getTime();if(s&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(s);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var r=this,i=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t);return this._options.unref&&i.unref(),!0};Ae.prototype.attempt=function(s,e){this._fn=s,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Ae.prototype.try=function(s){this.attempt(s)};Ae.prototype.start=function(s){this.attempt(s)};Ae.prototype.start=Ae.prototype.try;Ae.prototype.errors=function(){return this._errors};Ae.prototype.attempts=function(){return this._attempts};Ae.prototype.mainError=function(){if(this._errors.length===0)return null;for(var s={},e=null,t=0,r=0;r<this._errors.length;r++){var i=this._errors[r],n=i.message,a=(s[n]||0)+1;s[n]=a,a>=t&&(e=i,t=a)}return e}});var Pm=m(Jt=>{var gI=Nm();Jt.operation=function(s){var e=Jt.timeouts(s);return new gI(e,{forever:s&&s.forever,unref:s&&s.unref,maxRetryTime:s&&s.maxRetryTime})};Jt.timeouts=function(s){if(s instanceof Array)return[].concat(s);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in s)e[t]=s[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<e.retries;i++)r.push(this.createTimeout(i,e));return s&&s.forever&&!r.length&&r.push(this.createTimeout(i,e)),r.sort(function(n,a){return n-a}),r};Jt.createTimeout=function(s,e){var t=e.randomize?Math.random()+1:1,r=Math.round(t*e.minTimeout*Math.pow(e.factor,s));return r=Math.min(r,e.maxTimeout),r};Jt.wrap=function(s,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var r in s)typeof s[r]=="function"&&t.push(r)}for(var i=0;i<t.length;i++){var n=t[i],a=s[n];s[n]=o(function(h){var u=Jt.operation(e),l=Array.prototype.slice.call(arguments,1),f=l.pop();l.push(function(d){u.retry(d)||(d&&(arguments[0]=u.mainError()),f.apply(this,arguments))}),u.attempt(function(){h.apply(s,l)})},"retryWrapper").bind(s,a),s[n].options=e}}});var km=m((cP,Lm)=>{Lm.exports=Pm()});var Mm=m((hP,Fm)=>{"use strict";var yI=xm(),EI=km(),wI=Object.prototype.hasOwnProperty;function Dm(s){return s&&s.code==="EPROMISERETRY"&&wI.call(s,"retried")}o(Dm,"isRetryError");function SI(s,e){var t,r;return typeof s=="object"&&typeof e=="function"&&(t=e,e=s,s=t),r=EI.operation(e),new Promise(function(i,n){r.attempt(function(a){Promise.resolve().then(function(){return s(function(c){throw Dm(c)&&(c=c.retried),yI(new Error("Retrying"),"EPROMISERETRY",{retried:c})},a)}).then(i,function(c){Dm(c)&&(c=c.retried,r.retry(c||new Error))||n(c)})})})}o(SI,"promiseRetry");Fm.exports=SI});var qm=m((lP,$m)=>{var _I=Symbol("proc-log.meta");$m.exports={META:_I,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:o(function(...s){return process.emit("output","standard",...s)},"standard"),error:o(function(...s){return process.emit("output","error",...s)},"error"),buffer:o(function(...s){return process.emit("output","buffer",...s)},"buffer"),flush:o(function(...s){return process.emit("output","flush",...s)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:o(function(...s){return process.emit("log","error",...s)},"error"),notice:o(function(...s){return process.emit("log","notice",...s)},"notice"),warn:o(function(...s){return process.emit("log","warn",...s)},"warn"),info:o(function(...s){return process.emit("log","info",...s)},"info"),verbose:o(function(...s){return process.emit("log","verbose",...s)},"verbose"),http:o(function(...s){return process.emit("log","http",...s)},"http"),silly:o(function(...s){return process.emit("log","silly",...s)},"silly"),timing:o(function(...s){return process.emit("log","timing",...s)},"timing"),pause:o(function(){return process.emit("log","pause")},"pause"),resume:o(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:o(function(s,e){process.emit("time","start",s);function t(){return process.emit("time","end",s)}if(o(t,"end"),typeof e=="function"){let r=e();return r&&r.finally?r.finally(t):(t(),r)}return t},"start"),end:o(function(s){return process.emit("time","end",s)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:o(function(s){process.emit("input","start");function e(){return process.emit("input","end")}if(o(e,"end"),typeof s=="function"){let t=s();return t&&t.finally?t.finally(e):(e(),t)}return e},"start"),end:o(function(){return process.emit("input","end")},"end"),read:o(function(...s){let e,t,r=new Promise((i,n)=>{e=i,t=n});return process.emit("input","read",e,t,...s),r},"read")}}});var $c=m((dP,jm)=>{"use strict";var{LRUCache:bI}=bs(),Um=require("dns"),In=new bI({max:50}),RI=o(({family:s=0,hints:e=Um.ADDRCONFIG,all:t=!1,verbatim:r=void 0,ttl:i=300*1e3,lookup:n=Um.lookup})=>({hints:e,lookup:o((a,...c)=>{let h=c.pop(),u=c[0]??{},l={family:s,hints:e,all:t,verbatim:r,...typeof u=="number"?{family:u}:u},f=JSON.stringify({hostname:a,...l});if(In.has(f)){let d=In.get(f);return process.nextTick(h,null,...d)}n(a,l,(d,...p)=>d?h(d):(In.set(f,p,{ttl:i}),h(null,...p)))},"lookup")}),"getOptions");jm.exports={cache:In,getOptions:RI}});var qc=m((mP,zm)=>{"use strict";var OI=$c(),vI=o(s=>{let e=parseInt(s.family??"0",10),t=s.keepAlive??!0,r={keepAliveMsecs:t?1e3:void 0,maxSockets:s.maxSockets??15,maxTotalSockets:1/0,maxFreeSockets:t?256:void 0,scheduling:"fifo",...s,family:e,keepAlive:t,timeouts:{idle:s.timeout??0,connection:0,response:0,transfer:0,...s.timeouts},...OI.getOptions({family:e,...s.dns})};return delete r.timeout,r},"normalizeOptions"),Hm=o(s=>{let e="",t=Object.entries(s).sort((r,i)=>r[0]-i[0]);for(let[r,i]of t)i==null?i="null":i instanceof URL?i=i.toString():typeof i=="object"&&(i=Hm(i)),e+=`${r}:${i}:`;return e},"createKey"),II=o(({secureEndpoint:s,...e})=>Hm({secureEndpoint:!!s,family:e.family,hints:e.hints,localAddress:e.localAddress,strictSsl:s?!!e.rejectUnauthorized:!1,ca:s?e.ca:null,cert:s?e.cert:null,key:s?e.key:null,keepAlive:e.keepAlive,keepAliveMsecs:e.keepAliveMsecs,maxSockets:e.maxSockets,maxTotalSockets:e.maxTotalSockets,maxFreeSockets:e.maxFreeSockets,scheduling:e.scheduling,timeouts:e.timeouts,proxy:e.proxy}),"cacheOptions");zm.exports={normalizeOptions:vI,cacheOptions:II}});var Vm=m((yP,Gm)=>{var Ns=1e3,Ps=Ns*60,Ls=Ps*60,Qt=Ls*24,TI=Qt*7,CI=Qt*365.25;Gm.exports=function(s,e){e=e||{};var t=typeof s;if(t==="string"&&s.length>0)return AI(s);if(t==="number"&&isFinite(s))return e.long?BI(s):xI(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};function AI(s){if(s=String(s),!(s.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(s);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*CI;case"weeks":case"week":case"w":return t*TI;case"days":case"day":case"d":return t*Qt;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Ls;case"minutes":case"minute":case"mins":case"min":case"m":return t*Ps;case"seconds":case"second":case"secs":case"sec":case"s":return t*Ns;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}o(AI,"parse");function xI(s){var e=Math.abs(s);return e>=Qt?Math.round(s/Qt)+"d":e>=Ls?Math.round(s/Ls)+"h":e>=Ps?Math.round(s/Ps)+"m":e>=Ns?Math.round(s/Ns)+"s":s+"ms"}o(xI,"fmtShort");function BI(s){var e=Math.abs(s);return e>=Qt?Tn(s,e,Qt,"day"):e>=Ls?Tn(s,e,Ls,"hour"):e>=Ps?Tn(s,e,Ps,"minute"):e>=Ns?Tn(s,e,Ns,"second"):s+" ms"}o(BI,"fmtLong");function Tn(s,e,t,r){var i=e>=t*1.5;return Math.round(s/t)+" "+r+(i?"s":"")}o(Tn,"plural")});var Uc=m((wP,Wm)=>{function NI(s){t.debug=t,t.default=t,t.coerce=h,t.disable=a,t.enable=i,t.enabled=c,t.humanize=Vm(),t.destroy=u,Object.keys(s).forEach(l=>{t[l]=s[l]}),t.names=[],t.skips=[],t.formatters={};function e(l){let f=0;for(let d=0;d<l.length;d++)f=(f<<5)-f+l.charCodeAt(d),f|=0;return t.colors[Math.abs(f)%t.colors.length]}o(e,"selectColor"),t.selectColor=e;function t(l){let f,d=null,p,y;function g(...w){if(!g.enabled)return;let S=g,I=Number(new Date),T=I-(f||I);S.diff=T,S.prev=f,S.curr=I,f=I,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let _=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(A,P)=>{if(A==="%%")return"%";_++;let z=t.formatters[P];if(typeof z=="function"){let ue=w[_];A=z.call(S,ue),w.splice(_,1),_--}return A}),t.formatArgs.call(S,w),(S.log||t.log).apply(S,w)}return o(g,"debug"),g.namespace=l,g.useColors=t.useColors(),g.color=t.selectColor(l),g.extend=r,g.destroy=t.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:o(()=>d!==null?d:(p!==t.namespaces&&(p=t.namespaces,y=t.enabled(l)),y),"get"),set:o(w=>{d=w},"set")}),typeof t.init=="function"&&t.init(g),g}o(t,"createDebug");function r(l,f){let d=t(this.namespace+(typeof f>"u"?":":f)+l);return d.log=this.log,d}o(r,"extend");function i(l){t.save(l),t.namespaces=l,t.names=[],t.skips=[];let f=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?t.skips.push(d.slice(1)):t.names.push(d)}o(i,"enable");function n(l,f){let d=0,p=0,y=-1,g=0;for(;d<l.length;)if(p<f.length&&(f[p]===l[d]||f[p]==="*"))f[p]==="*"?(y=p,g=d,p++):(d++,p++);else if(y!==-1)p=y+1,g++,d=g;else return!1;for(;p<f.length&&f[p]==="*";)p++;return p===f.length}o(n,"matchesTemplate");function a(){let l=[...t.names,...t.skips.map(f=>"-"+f)].join(",");return t.enable(""),l}o(a,"disable");function c(l){for(let f of t.skips)if(n(l,f))return!1;for(let f of t.names)if(n(l,f))return!0;return!1}o(c,"enabled");function h(l){return l instanceof Error?l.stack||l.message:l}o(h,"coerce");function u(){}return o(u,"destroy"),t.enable(t.load()),t}o(NI,"setup");Wm.exports=NI});var Zm=m((pe,Cn)=>{pe.formatArgs=LI;pe.save=kI;pe.load=DI;pe.useColors=PI;pe.storage=FI();pe.destroy=(()=>{let s=!1;return()=>{s||(s=!0)}})();pe.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function PI(){let s;return!1}o(PI,"useColors");function LI(s){if(s[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+s[0]+(this.useColors?"%c ":" ")+"+"+Cn.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;s.splice(1,0,e,"color: inherit");let t=0,r=0;s[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(t++,i==="%c"&&(r=t))}),s.splice(r,0,e)}o(LI,"formatArgs");pe.log=console.debug||console.log||(()=>{});function kI(s){try{s?pe.storage.setItem("debug",s):pe.storage.removeItem("debug")}catch{}}o(kI,"save");function DI(){let s;try{s=pe.storage.getItem("debug")||pe.storage.getItem("DEBUG")}catch{}return!s&&typeof process<"u"&&"env"in process&&(s=void 0),s}o(DI,"load");function FI(){try{return}catch{}}o(FI,"localstorage");Cn.exports=Uc()(pe);var{formatters:MI}=Cn.exports;MI.j=function(s){try{return JSON.stringify(s)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Ym=m((bP,Km)=>{"use strict";Km.exports=(s,e=process.argv)=>{let t=s.startsWith("-")?"":s.length===1?"-":"--",r=e.indexOf(t+s),i=e.indexOf("--");return r!==-1&&(i===-1||r<i)}});var Qm=m((RP,Jm)=>{"use strict";var $I=require("os"),Xm=require("tty"),xe=Ym(),{env:K}=process,Nt;xe("no-color")||xe("no-colors")||xe("color=false")||xe("color=never")?Nt=0:(xe("color")||xe("colors")||xe("color=true")||xe("color=always"))&&(Nt=1);"FORCE_COLOR"in K&&(K.FORCE_COLOR==="true"?Nt=1:K.FORCE_COLOR==="false"?Nt=0:Nt=K.FORCE_COLOR.length===0?1:Math.min(parseInt(K.FORCE_COLOR,10),3));function jc(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}o(jc,"translateLevel");function Hc(s,e){if(Nt===0)return 0;if(xe("color=16m")||xe("color=full")||xe("color=truecolor"))return 3;if(xe("color=256"))return 2;if(s&&!e&&Nt===void 0)return 0;let t=Nt||0;if(K.TERM==="dumb")return t;if(process.platform==="win32"){let r=$I.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in K)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in K)||K.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in K){let r=parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(K.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM)||"COLORTERM"in K?1:t}o(Hc,"supportsColor");function qI(s){let e=Hc(s,s&&s.isTTY);return jc(e)}o(qI,"getSupportLevel");Jm.exports={supportsColor:qI,stdout:jc(Hc(!0,Xm.isatty(1))),stderr:jc(Hc(!0,Xm.isatty(2)))}});var tg=m((Y,xn)=>{var UI=require("tty"),An=require("util");Y.init=ZI;Y.log=GI;Y.formatArgs=HI;Y.save=VI;Y.load=WI;Y.useColors=jI;Y.destroy=An.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Y.colors=[6,2,3,4,5,1];try{let s=Qm();s&&(s.stderr||s).level>=2&&(Y.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Y.inspectOpts=Object.keys(process.env).filter(s=>/^debug_/i.test(s)).reduce((s,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,n)=>n.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),s[t]=r,s},{});function jI(){return"colors"in Y.inspectOpts?!!Y.inspectOpts.colors:UI.isatty(process.stderr.fd)}o(jI,"useColors");function HI(s){let{namespace:e,useColors:t}=this;if(t){let r=this.color,i="\x1B[3"+(r<8?r:"8;5;"+r),n=` ${i};1m${e} \x1B[0m`;s[0]=n+s[0].split(`
18
+ `).join(`
19
+ `+n),s.push(i+"m+"+xn.exports.humanize(this.diff)+"\x1B[0m")}else s[0]=zI()+e+" "+s[0]}o(HI,"formatArgs");function zI(){return Y.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(zI,"getDate");function GI(...s){return process.stderr.write(An.formatWithOptions(Y.inspectOpts,...s)+`
20
+ `)}o(GI,"log");function VI(s){s?process.env.DEBUG=s:delete void 0}o(VI,"save");function WI(){}o(WI,"load");function ZI(s){s.inspectOpts={};let e=Object.keys(Y.inspectOpts);for(let t=0;t<e.length;t++)s.inspectOpts[e[t]]=Y.inspectOpts[e[t]]}o(ZI,"init");xn.exports=Uc()(Y);var{formatters:eg}=xn.exports;eg.o=function(s){return this.inspectOpts.colors=this.useColors,An.inspect(s,this.inspectOpts).split(`
21
+ `).map(e=>e.trim()).join(" ")};eg.O=function(s){return this.inspectOpts.colors=this.useColors,An.inspect(s,this.inspectOpts)}});var Ur=m((IP,zc)=>{typeof process>"u"||process.type==="renderer"||process.__nwjs?zc.exports=Zm():zc.exports=tg()});var ig=m(me=>{"use strict";var KI=me&&me.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),YI=me&&me.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),sg=me&&me.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&KI(e,s,t);return YI(e,s),e};Object.defineProperty(me,"__esModule",{value:!0});me.req=me.json=me.toBuffer=void 0;var XI=sg(require("http")),JI=sg(require("https"));async function rg(s){let e=0,t=[];for await(let r of s)e+=r.length,t.push(r);return Buffer.concat(t,e)}o(rg,"toBuffer");me.toBuffer=rg;async function QI(s){let t=(await rg(s)).toString("utf8");try{return JSON.parse(t)}catch(r){let i=r;throw i.message+=` (input: ${t})`,i}}o(QI,"json");me.json=QI;function eT(s,e={}){let r=((typeof s=="string"?s:s.href).startsWith("https:")?JI:XI).request(s,e),i=new Promise((n,a)=>{r.once("response",n).once("error",a).end()});return r.then=i.then.bind(i),r}o(eT,"req");me.req=eT});var jr=m(be=>{"use strict";var og=be&&be.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),tT=be&&be.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),ag=be&&be.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&og(e,s,t);return tT(e,s),e},sT=be&&be.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&og(e,s,t)};Object.defineProperty(be,"__esModule",{value:!0});be.Agent=void 0;var rT=ag(require("net")),ng=ag(require("http")),iT=require("https");sT(ig(),be);var Xe=Symbol("AgentBaseInternalState"),Gc=class extends ng.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Xe]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
22
+ `).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new rT.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let r=this.sockets[e],i=r.indexOf(t);i!==-1&&(r.splice(i,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?iT.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){let i={...t,secureEndpoint:this.isSecureEndpoint(t)},n=this.getName(i),a=this.incrementSockets(n);Promise.resolve().then(()=>this.connect(e,i)).then(c=>{if(this.decrementSockets(n,a),c instanceof ng.Agent)try{return c.addRequest(e,i)}catch(h){return r(h)}this[Xe].currentSocket=c,super.createSocket(e,t,r)},c=>{this.decrementSockets(n,a),r(c)})}createConnection(){let e=this[Xe].currentSocket;if(this[Xe].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Xe].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Xe]&&(this[Xe].defaultPort=e)}get protocol(){return this[Xe].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Xe]&&(this[Xe].protocol=e)}};be.Agent=Gc});var ug=m(Be=>{"use strict";var nT=Be&&Be.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),oT=Be&&Be.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),hg=Be&&Be.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&nT(e,s,t);return oT(e,s),e},aT=Be&&Be.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Be,"__esModule",{value:!0});Be.HttpProxyAgent=void 0;var cT=hg(require("net")),hT=hg(require("tls")),uT=aT(Ur()),lT=require("events"),fT=jr(),cg=require("url"),ks=(0,uT.default)("http-proxy-agent"),Bn=class extends fT.Agent{static{o(this,"HttpProxyAgent")}constructor(e,t){super(t),this.proxy=typeof e=="string"?new cg.URL(e):e,this.proxyHeaders=t?.headers??{},ks("Creating new HttpProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...t?dT(t,"headers"):null,host:r,port:i}}addRequest(e,t){e._header=null,this.setRequestProps(e,t),super.addRequest(e,t)}setRequestProps(e,t){let{proxy:r}=this,i=t.secureEndpoint?"https:":"http:",n=e.getHeader("host")||"localhost",a=`${i}//${n}`,c=new cg.URL(e.path,a);t.port!==80&&(c.port=String(t.port)),e.path=String(c);let h=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(r.username||r.password){let u=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;h["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}h["Proxy-Connection"]||(h["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(h)){let l=h[u];l&&e.setHeader(u,l)}}async connect(e,t){e._header=null,e.path.includes("://")||this.setRequestProps(e,t);let r,i;ks("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(ks("Patching connection write() output buffer with updated header"),r=e.outputData[0].data,i=r.indexOf(`\r
23
+ \r
24
+ `)+4,e.outputData[0].data=e._header+r.substring(i),ks("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(ks("Creating `tls.Socket`: %o",this.connectOpts),n=hT.connect(this.connectOpts)):(ks("Creating `net.Socket`: %o",this.connectOpts),n=cT.connect(this.connectOpts)),await(0,lT.once)(n,"connect"),n}};Bn.protocols=["http","https"];Be.HttpProxyAgent=Bn;function dT(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(dT,"omit")});var lg=m(Ds=>{"use strict";var pT=Ds&&Ds.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ds,"__esModule",{value:!0});Ds.parseProxyResponse=void 0;var mT=pT(Ur()),Nn=(0,mT.default)("https-proxy-agent:parse-proxy-response");function gT(s){return new Promise((e,t)=>{let r=0,i=[];function n(){let l=s.read();l?u(l):s.once("readable",n)}o(n,"read");function a(){s.removeListener("end",c),s.removeListener("error",h),s.removeListener("readable",n)}o(a,"cleanup");function c(){a(),Nn("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function h(l){a(),Nn("onerror %o",l),t(l)}o(h,"onerror");function u(l){i.push(l),r+=l.length;let f=Buffer.concat(i,r),d=f.indexOf(`\r
25
+ \r
26
+ `);if(d===-1){Nn("have not received end of HTTP headers yet..."),n();return}let p=f.slice(0,d).toString("ascii").split(`\r
27
+ `),y=p.shift();if(!y)return s.destroy(),t(new Error("No header received from proxy CONNECT response"));let g=y.split(" "),w=+g[1],S=g.slice(2).join(" "),I={};for(let T of p){if(!T)continue;let _=T.indexOf(":");if(_===-1)return s.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${T}"`));let O=T.slice(0,_).toLowerCase(),A=T.slice(_+1).trimStart(),P=I[O];typeof P=="string"?I[O]=[P,A]:Array.isArray(P)?P.push(A):I[O]=A}Nn("got proxy server response: %o %o",y,I),a(),e({connect:{statusCode:w,statusText:S,headers:I},buffered:f})}o(u,"ondata"),s.on("error",h),s.on("end",c),n()})}o(gT,"parseProxyResponse");Ds.parseProxyResponse=gT});var yg=m(Ne=>{"use strict";var yT=Ne&&Ne.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),ET=Ne&&Ne.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),mg=Ne&&Ne.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&yT(e,s,t);return ET(e,s),e},gg=Ne&&Ne.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.HttpsProxyAgent=void 0;var Pn=mg(require("net")),fg=mg(require("tls")),wT=gg(require("assert")),ST=gg(Ur()),_T=jr(),bT=require("url"),RT=lg(),Hr=(0,ST.default)("https-proxy-agent"),dg=o(s=>s.servername===void 0&&s.host&&!Pn.isIP(s.host)?{...s,servername:s.host}:s,"setServernameFromNonIpHost"),Ln=class extends _T.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new bT.URL(e):e,this.proxyHeaders=t?.headers??{},Hr("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?pg(t,"headers"):null,host:r,port:i}}async connect(e,t){let{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let i;r.protocol==="https:"?(Hr("Creating `tls.Socket`: %o",this.connectOpts),i=fg.connect(dg(this.connectOpts))):(Hr("Creating `net.Socket`: %o",this.connectOpts),i=Pn.connect(this.connectOpts));let n=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=Pn.isIPv6(t.host)?`[${t.host}]`:t.host,c=`CONNECT ${a}:${t.port} HTTP/1.1\r
28
+ `;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;n["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}n.Host=`${a}:${t.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(n))c+=`${d}: ${n[d]}\r
29
+ `;let h=(0,RT.parseProxyResponse)(i);i.write(`${c}\r
30
+ `);let{connect:u,buffered:l}=await h;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",OT),t.secureEndpoint?(Hr("Upgrading socket connection to TLS"),fg.connect({...pg(dg(t),"host","path","port"),socket:i})):i;i.destroy();let f=new Pn.Socket({writable:!1});return f.readable=!0,e.once("socket",d=>{Hr("Replaying proxy buffer for failed request"),(0,wT.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),f}};Ln.protocols=["http","https"];Ne.HttpsProxyAgent=Ln;function OT(s){s.resume()}o(OT,"resume");function pg(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(pg,"omit")});var _g=m(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});var Eg=require("buffer"),es={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};wt.ERRORS=es;function vT(s){if(!Eg.Buffer.isEncoding(s))throw new Error(es.INVALID_ENCODING)}o(vT,"checkEncoding");wt.checkEncoding=vT;function wg(s){return typeof s=="number"&&isFinite(s)&&AT(s)}o(wg,"isFiniteInteger");wt.isFiniteInteger=wg;function Sg(s,e){if(typeof s=="number"){if(!wg(s)||s<0)throw new Error(e?es.INVALID_OFFSET:es.INVALID_LENGTH)}else throw new Error(e?es.INVALID_OFFSET_NON_NUMBER:es.INVALID_LENGTH_NON_NUMBER)}o(Sg,"checkOffsetOrLengthValue");function IT(s){Sg(s,!1)}o(IT,"checkLengthValue");wt.checkLengthValue=IT;function TT(s){Sg(s,!0)}o(TT,"checkOffsetValue");wt.checkOffsetValue=TT;function CT(s,e){if(s<0||s>e.length)throw new Error(es.INVALID_TARGET_OFFSET)}o(CT,"checkTargetOffset");wt.checkTargetOffset=CT;function AT(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}o(AT,"isInteger");function xT(s){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof Eg.Buffer.prototype[s]>"u")throw new Error(`Platform does not support Buffer.prototype.${s}.`)}o(xT,"bigIntAndBufferInt64Check");wt.bigIntAndBufferInt64Check=xT});var Rg=m(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var x=_g(),bg=4096,BT="utf8",Vc=class s{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=BT,this._writeOffset=0,this._readOffset=0,s.isSmartBufferOptions(e))if(e.encoding&&(x.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(x.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(x.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(x.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(bg);else{if(typeof e<"u")throw new Error(x.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(bg)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return x.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return x.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return x.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return x.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;typeof e=="number"?(x.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),typeof t<"u"&&x.checkEncoding(t);let i=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,i}insertString(e,t,r){return x.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){typeof e<"u"&&x.checkEncoding(e);let t=this.length;for(let i=this._readOffset;i<this.length;i++)if(this._buff[i]===0){t=i;break}let r=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,r.toString(e||this._encoding)}insertStringNT(e,t,r){return x.checkOffsetValue(t),this.insertString(e,t,r),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e<"u"&&x.checkLengthValue(e);let t=typeof e=="number"?e:this.length,r=Math.min(this.length,this._readOffset+t),i=this._buff.slice(this._readOffset,r);return this._readOffset=r,i}insertBuffer(e,t){return x.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r<this.length;r++)if(this._buff[r]===0){e=r;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return x.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t<"u"&&x.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){x.checkOffsetValue(e),x.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){x.checkOffsetValue(e),x.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){x.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return x.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,r,i){let n=this._writeOffset,a=this._encoding;typeof r=="number"?n=r:typeof r=="string"&&(x.checkEncoding(r),a=r),typeof i=="string"&&(x.checkEncoding(i),a=i);let c=Buffer.byteLength(e,a);return t?this.ensureInsertable(c,n):this._ensureWriteable(c,n),this._buff.write(e,n,c,a),t?this._writeOffset+=c:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,n+c):this._writeOffset+=c,this}_handleBuffer(e,t,r){let i=typeof r=="number"?r:this._writeOffset;return t?this.ensureInsertable(e.length,i):this._ensureWriteable(e.length,i),e.copy(this._buff,i),t?this._writeOffset+=e.length:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,i+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let r=this._readOffset;if(typeof t<"u"&&(x.checkOffsetValue(t),r=t),r<0||r+e>this.length)throw new Error(x.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){x.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let r=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let r=this._buff,i=t*3/2+1;i<e&&(i=e),this._buff=Buffer.allocUnsafe(i),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);let i=e.call(this._buff,typeof r=="number"?r:this._readOffset);return typeof r>"u"&&(this._readOffset+=t),i}_insertNumberValue(e,t,r,i){return x.checkOffsetValue(i),this.ensureInsertable(t,i),e.call(this._buff,r,i),this._writeOffset+=t,this}_writeNumberValue(e,t,r,i){if(typeof i=="number"){if(i<0)throw new Error(x.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);x.checkOffsetValue(i)}let n=typeof i=="number"?i:this._writeOffset;return this._ensureWriteable(t,n),e.call(this._buff,r,n),typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,n+t):this._writeOffset+=t,this}};Wc.SmartBuffer=Vc});var Zc=m(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.SOCKS5_NO_ACCEPTABLE_AUTH=M.SOCKS5_CUSTOM_AUTH_END=M.SOCKS5_CUSTOM_AUTH_START=M.SOCKS_INCOMING_PACKET_SIZES=M.SocksClientState=M.Socks5Response=M.Socks5HostType=M.Socks5Auth=M.Socks4Response=M.SocksCommand=M.ERRORS=M.DEFAULT_TIMEOUT=void 0;var NT=3e4;M.DEFAULT_TIMEOUT=NT;var PT={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};M.ERRORS=PT;var LT={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:o(s=>s+7,"Socks5ResponseHostname"),Socks4Response:8};M.SOCKS_INCOMING_PACKET_SIZES=LT;var Og;(function(s){s[s.connect=1]="connect",s[s.bind=2]="bind",s[s.associate=3]="associate"})(Og||(M.SocksCommand=Og={}));var vg;(function(s){s[s.Granted=90]="Granted",s[s.Failed=91]="Failed",s[s.Rejected=92]="Rejected",s[s.RejectedIdent=93]="RejectedIdent"})(vg||(M.Socks4Response=vg={}));var Ig;(function(s){s[s.NoAuth=0]="NoAuth",s[s.GSSApi=1]="GSSApi",s[s.UserPass=2]="UserPass"})(Ig||(M.Socks5Auth=Ig={}));var kT=128;M.SOCKS5_CUSTOM_AUTH_START=kT;var DT=254;M.SOCKS5_CUSTOM_AUTH_END=DT;var FT=255;M.SOCKS5_NO_ACCEPTABLE_AUTH=FT;var Tg;(function(s){s[s.Granted=0]="Granted",s[s.Failure=1]="Failure",s[s.NotAllowed=2]="NotAllowed",s[s.NetworkUnreachable=3]="NetworkUnreachable",s[s.HostUnreachable=4]="HostUnreachable",s[s.ConnectionRefused=5]="ConnectionRefused",s[s.TTLExpired=6]="TTLExpired",s[s.CommandNotSupported=7]="CommandNotSupported",s[s.AddressNotSupported=8]="AddressNotSupported"})(Tg||(M.Socks5Response=Tg={}));var Cg;(function(s){s[s.IPv4=1]="IPv4",s[s.Hostname=3]="Hostname",s[s.IPv6=4]="IPv6"})(Cg||(M.Socks5HostType=Cg={}));var Ag;(function(s){s[s.Created=0]="Created",s[s.Connecting=1]="Connecting",s[s.Connected=2]="Connected",s[s.SentInitialHandshake=3]="SentInitialHandshake",s[s.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",s[s.SentAuthentication=5]="SentAuthentication",s[s.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",s[s.SentFinalHandshake=7]="SentFinalHandshake",s[s.ReceivedFinalResponse=8]="ReceivedFinalResponse",s[s.BoundWaitingForConnection=9]="BoundWaitingForConnection",s[s.Established=10]="Established",s[s.Disconnected=11]="Disconnected",s[s.Error=99]="Error"})(Ag||(M.SocksClientState=Ag={}))});var Yc=m(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.shuffleArray=Fs.SocksClientError=void 0;var Kc=class extends Error{static{o(this,"SocksClientError")}constructor(e,t){super(e),this.options=t}};Fs.SocksClientError=Kc;function MT(s){for(let e=s.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[s[e],s[t]]=[s[t],s[e]]}}o(MT,"shuffleArray");Fs.shuffleArray=MT});var kn=m(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.isInSubnet=$T;ts.isCorrect=qT;ts.numberToPaddedHex=xg;ts.stringToPaddedHex=UT;ts.testBit=jT;function $T(s){return this.subnetMask<s.subnetMask?!1:this.mask(s.subnetMask)===s.mask()}o($T,"isInSubnet");function qT(s){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===s&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}o(qT,"isCorrect");function xg(s){return s.toString(16).padStart(2,"0")}o(xg,"numberToPaddedHex");function UT(s){return xg(parseInt(s,10))}o(UT,"stringToPaddedHex");function jT(s,e){let{length:t}=s;if(e>t)return!1;let r=t-e;return s.substring(r,r+1)==="1"}o(jT,"testBit")});var Xc=m(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.RE_SUBNET_STRING=Je.RE_ADDRESS=Je.GROUPS=Je.BITS=void 0;Je.BITS=32;Je.GROUPS=4;Je.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Je.RE_SUBNET_STRING=/\/\d{1,2}$/});var Fn=m(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.AddressError=void 0;var Jc=class extends Error{static{o(this,"AddressError")}constructor(e,t){super(e),this.name="AddressError",this.parseMessage=t}};Dn.AddressError=Jc});var eh=m(Qe=>{"use strict";var HT=Qe&&Qe.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),zT=Qe&&Qe.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Ng=Qe&&Qe.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&HT(e,s,t);return zT(e,s),e};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.Address4=void 0;var Ms=Ng(kn()),$e=Ng(Xc()),Bg=Fn(),Qc=class s{static{o(this,"Address4")}constructor(e){this.groups=$e.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=Ms.isCorrect($e.BITS),this.isInSubnet=Ms.isInSubnet,this.address=e;let t=$e.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>$e.BITS)throw new Bg.AddressError("Invalid subnet mask.");e=e.replace($e.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new s(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(!e.match($e.RE_ADDRESS))throw new Bg.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromHex(e){let t=e.replace(/:/g,"").padStart(8,"0"),r=[],i;for(i=0;i<8;i+=2){let n=t.slice(i,i+2);r.push(parseInt(n,16))}return new s(r.join("."))}static fromInteger(e){return s.fromHex(e.toString(16))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new s(r)}toHex(){return this.parsedAddress.map(e=>Ms.stringToPaddedHex(e)).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<$e.GROUPS;t+=2)e.push(`${Ms.stringToPaddedHex(this.parsedAddress[t])}${Ms.stringToPaddedHex(this.parsedAddress[t+1])}`);return e.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(e=>Ms.stringToPaddedHex(e)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat($e.BITS-this.subnetMask)}`)}startAddress(){return s.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat($e.BITS-this.subnetMask)}`)}endAddress(){return s.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._endAddress()-e)}static fromBigInt(e){return s.fromHex(e.toString(16))}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:`${t}.in-addr.arpa.`}isMulticast(){return this.isInSubnet(new s("224.0.0.0/4"))}binaryZeroPad(){return this.bigInt().toString(2).padStart($e.BITS,"0")}groupForV6(){let e=this.parsedAddress;return this.address.replace($e.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${e.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${e.slice(2,4).join(".")}</span>`)}};Qe.Address4=Qc});var th=m(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.RE_URL_WITH_PORT=U.RE_URL=U.RE_ZONE_STRING=U.RE_SUBNET_STRING=U.RE_BAD_ADDRESS=U.RE_BAD_CHARACTERS=U.TYPES=U.SCOPES=U.GROUPS=U.BITS=void 0;U.BITS=128;U.GROUPS=8;U.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};U.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};U.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;U.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;U.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;U.RE_ZONE_STRING=/%.*$/;U.RE_URL=/^\[{0,1}([0-9a-f:]+)\]{0,1}/;U.RE_URL_WITH_PORT=/\[([0-9a-f:]+)\]:([0-9]{1,5})/});var sh=m($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.spanAllZeroes=Pg;$s.spanAll=GT;$s.spanLeadingZeroes=VT;$s.simpleGroup=WT;function Pg(s){return s.replace(/(0+)/g,'<span class="zero">$1</span>')}o(Pg,"spanAllZeroes");function GT(s,e=0){return s.split("").map((r,i)=>`<span class="digit value-${r} position-${i+e}">${Pg(r)}</span>`).join("")}o(GT,"spanAll");function Lg(s){return s.replace(/^(0+)/,'<span class="zero">$1</span>')}o(Lg,"spanLeadingZeroesSimple");function VT(s){return s.split(":").map(t=>Lg(t)).join(":")}o(VT,"spanLeadingZeroes");function WT(s,e=0){return s.split(":").map((r,i)=>/group-v4/.test(r)?r:`<span class="hover-group group-${i+e}">${Lg(r)}</span>`)}o(WT,"simpleGroup")});var kg=m(ge=>{"use strict";var ZT=ge&&ge.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),KT=ge&&ge.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),YT=ge&&ge.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&ZT(e,s,t);return KT(e,s),e};Object.defineProperty(ge,"__esModule",{value:!0});ge.ADDRESS_BOUNDARY=void 0;ge.groupPossibilities=$n;ge.padGroup=Mn;ge.simpleRegularExpression=JT;ge.possibleElisions=QT;var XT=YT(th());function $n(s){return`(${s.join("|")})`}o($n,"groupPossibilities");function Mn(s){return s.length<4?`0{0,${4-s.length}}${s}`:s}o(Mn,"padGroup");ge.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function JT(s){let e=[];s.forEach((r,i)=>{parseInt(r,16)===0&&e.push(i)});let t=e.map(r=>s.map((i,n)=>{if(n===r){let a=n===0||n===XT.GROUPS-1?":":"";return $n([Mn(i),a])}return Mn(i)}).join(":"));return t.push(s.map(Mn).join(":")),$n(t)}o(JT,"simpleRegularExpression");function QT(s,e,t){let r=e?"":":",i=t?"":":",n=[];!e&&!t&&n.push("::"),e&&t&&n.push(""),(t&&!e||!t&&e)&&n.push(":"),n.push(`${r}(:0{1,4}){1,${s-1}}`),n.push(`(0{1,4}:){1,${s-1}}${i}`),n.push(`(0{1,4}:){${s-1}}0{1,4}`);for(let a=1;a<s-1;a++)for(let c=1;c<s-a;c++)n.push(`(0{1,4}:){${c}}:(0{1,4}:){${s-c-a-1}}0{1,4}`);return $n(n)}o(QT,"possibleElisions")});var $g=m(et=>{"use strict";var eC=et&&et.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),tC=et&&et.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),jn=et&&et.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&eC(e,s,t);return tC(e,s),e};Object.defineProperty(et,"__esModule",{value:!0});et.Address6=void 0;var Dg=jn(kn()),rh=jn(Xc()),$=jn(th()),ih=jn(sh()),ss=eh(),rs=kg(),St=Fn(),qn=kn();function Un(s){if(!s)throw new Error("Assertion failed.")}o(Un,"assert");function sC(s){let e=/(\d+)(\d{3})/;for(;e.test(s);)s=s.replace(e,"$1,$2");return s}o(sC,"addCommas");function rC(s){return s=s.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),s=s.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),s}o(rC,"spanLeadingZeroes4");function iC(s,e){let t=[],r=[],i;for(i=0;i<s.length;i++)i<e[0]?t.push(s[i]):i>e[1]&&r.push(s[i]);return t.concat(["compact"]).concat(r)}o(iC,"compact");function Fg(s){return parseInt(s,16).toString(16).padStart(4,"0")}o(Fg,"paddedHex");function Mg(s){return s&255}o(Mg,"unsignByte");var nh=class s{static{o(this,"Address6")}constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=Dg.isInSubnet,this.isCorrect=Dg.isCorrect($.BITS),t===void 0?this.groups=$.GROUPS:this.groups=t,this.address=e;let r=$.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>$.BITS)throw new St.AddressError("Invalid subnet mask.");e=e.replace($.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new St.AddressError("Invalid subnet mask.");let i=$.RE_ZONE_STRING.exec(e);i&&(this.zone=i[0],e=e.replace($.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new s(e),!0}catch{return!1}}static fromBigInt(e){let t=e.toString(16).padStart(32,"0"),r=[],i;for(i=0;i<$.GROUPS;i++)r.push(t.slice(i*4,(i+1)*4));return new s(r.join(":"))}static fromURL(e){let t,r=null,i;if(e.indexOf("[")!==-1&&e.indexOf("]:")!==-1){if(i=$.RE_URL_WITH_PORT.exec(e),i===null)return{error:"failed to parse address with port",address:null,port:null};t=i[1],r=i[2]}else if(e.indexOf("/")!==-1){if(e=e.replace(/^[a-z0-9]+:\/\//,""),i=$.RE_URL.exec(e),i===null)return{error:"failed to parse address from URL",address:null,port:null};t=i[1]}else t=e;return r?(r=parseInt(r,10),(r<0||r>65536)&&(r=null)):r=null,{address:new s(t),port:r}}static fromAddress4(e){let t=new ss.Address4(e),r=$.BITS-(rh.BITS-t.subnetMask);return new s(`::ffff:${t.correctForm()}/${r}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(t.length!==63)throw new St.AddressError("Invalid 'ip6.arpa' form.");let i=t.split(".").reverse();for(let n=r;n>0;n--){let a=n*4;i.splice(a,0,":")}return t=i.join(""),new s(t)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=$.BITS-this.subnetMask,r=Math.abs(e-$.BITS),i=t-r;return i<0?"0":sC((BigInt("2")**BigInt(i)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat($.BITS-this.subnetMask)}`)}startAddress(){return s.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat($.BITS-this.subnetMask)}`)}endAddress(){return s.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._endAddress()-e)}getScope(){let e=$.SCOPES[parseInt(this.getBits(12,16).toString(10),10)];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys($.TYPES))if(this.isInSubnet(new s(e)))return $.TYPES[e];return"Global unicast"}getBits(e,t){return BigInt(`0b${this.getBitsBase2(e,t)}`)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,$.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:`${r}.ip6.arpa.`:e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],r=0,i=[];for(e=0;e<this.parsedAddress.length;e++){let c=parseInt(this.parsedAddress[e],16);c===0&&r++,c!==0&&r>0&&(r>1&&i.push([e-r,e-1]),r=0)}r>1&&i.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let n=i.map(c=>c[1]-c[0]+1);if(i.length>0){let c=n.indexOf(Math.max(...n));t=iC(this.parsedAddress,i[c])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let a=t.join(":");return a=a.replace(/^compact$/,"::"),a=a.replace(/(^compact)|(compact$)/,":"),a=a.replace(/compact/,""),a}binaryZeroPad(){return this.bigInt().toString(2).padStart($.BITS,"0")}parse4in6(e){let t=e.split(":"),i=t.slice(-1)[0].match(rh.RE_ADDRESS);if(i){this.parsedAddress4=i[0],this.address4=new ss.Address4(this.parsedAddress4);for(let n=0;n<this.address4.groups;n++)if(/^0[0-9]+/.test(this.address4.parsedAddress[n]))throw new St.AddressError("IPv4 addresses can't have leading zeroes.",e.replace(rh.RE_ADDRESS,this.address4.parsedAddress.map(rC).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match($.RE_BAD_CHARACTERS);if(t)throw new St.AddressError(`Bad character${t.length>1?"s":""} detected in address: ${t.join("")}`,e.replace($.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let r=e.match($.RE_BAD_ADDRESS);if(r)throw new St.AddressError(`Address failed regex: ${r.join("")}`,e.replace($.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let i=[],n=e.split("::");if(n.length===2){let a=n[0].split(":"),c=n[1].split(":");a.length===1&&a[0]===""&&(a=[]),c.length===1&&c[0]===""&&(c=[]);let h=this.groups-(a.length+c.length);if(!h)throw new St.AddressError("Error parsing groups");this.elidedGroups=h,this.elisionBegin=a.length,this.elisionEnd=a.length+this.elidedGroups,i=i.concat(a);for(let u=0;u<h;u++)i.push("0");i=i.concat(c)}else if(n.length===1)i=e.split(":"),this.elidedGroups=0;else throw new St.AddressError("Too many :: groups found");if(i=i.map(a=>parseInt(a,16).toString(16)),i.length!==this.groups)throw new St.AddressError("Incorrect number of groups found");return i}canonicalForm(){return this.parsedAddress.map(Fg).join(":")}decimal(){return this.parsedAddress.map(e=>parseInt(e,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(Fg).join("")}`)}to4(){let e=this.binaryZeroPad().split("");return ss.Address4.fromHex(BigInt(`0b${e.slice(96,128).join("")}`).toString(16))}to4in6(){let e=this.to4(),r=new s(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),i="";return/:$/.test(r)||(i=":"),r+i+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),r=(this.getBits(80,96)^BigInt("0xffff")).toString(),i=ss.Address4.fromHex(this.getBitsBase16(32,64)),n=this.getBits(96,128),a=ss.Address4.fromHex((n^BigInt("0xffffffff")).toString(16)),c=this.getBitsBase2(64,80),h=(0,qn.testBit)(c,15),u=(0,qn.testBit)(c,14),l=(0,qn.testBit)(c,8),f=(0,qn.testBit)(c,9),d=BigInt(`0b${c.slice(2,6)+c.slice(8,16)}`).toString(10);return{prefix:`${e.slice(0,4)}:${e.slice(4,8)}`,server4:i.address,client4:a.address,flags:c,coneNat:h,microsoft:{reserved:u,universalLocal:f,groupIndividual:l,nonce:d},udpPort:r}}inspect6to4(){let e=this.getBitsBase16(0,16),t=ss.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:e.slice(0,4),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new s(e)}toByteArray(){let e=this.bigInt().toString(16),r=`${"0".repeat(e.length%2)}${e}`,i=[];for(let n=0,a=r.length;n<a;n+=2)i.push(parseInt(r.substring(n,n+2),16));return i}toUnsignedByteArray(){return this.toByteArray().map(Mg)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(Mg))}static fromUnsignedByteArray(e){let t=BigInt("256"),r=BigInt("0"),i=BigInt("1");for(let n=e.length-1;n>=0;n--)r+=i*BigInt(e[n].toString(10)),i*=t;return s.fromBigInt(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new s("2001::/32"))}is6to4(){return this.isInSubnet(new s("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=`:${e}`,`http://[${this.correctForm()}]${e}/`}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;e.v4&&(t=this.to4in6);let r=t.call(this);return e.className?`<a href="${e.prefix}${r}" class="${e.className}">${r}</a>`:`<a href="${e.prefix}${r}">${r}</a>`}group(){if(this.elidedGroups===0)return ih.simpleGroup(this.address).join(":");Un(typeof this.elidedGroups=="number"),Un(typeof this.elisionBegin=="number");let e=[],[t,r]=this.address.split("::");t.length?e.push(...ih.simpleGroup(t)):e.push("");let i=["hover-group"];for(let n=this.elisionBegin;n<this.elisionBegin+this.elidedGroups;n++)i.push(`group-${n}`);return e.push(`<span class="${i.join(" ")}"></span>`),r.length?e.push(...ih.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(Un(this.address4 instanceof ss.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],r=new s(this.correctForm());if(r.elidedGroups===0)t.push((0,rs.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===$.GROUPS)t.push((0,rs.possibleElisions)($.GROUPS));else{let i=r.address.split("::");i[0].length&&t.push((0,rs.simpleRegularExpression)(i[0].split(":"))),Un(typeof r.elidedGroups=="number"),t.push((0,rs.possibleElisions)(r.elidedGroups,i[0].length!==0,i[1].length!==0)),i[1].length&&t.push((0,rs.simpleRegularExpression)(i[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",rs.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",rs.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};et.Address6=nh});var oh=m(ie=>{"use strict";var nC=ie&&ie.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),oC=ie&&ie.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),aC=ie&&ie.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&nC(e,s,t);return oC(e,s),e};Object.defineProperty(ie,"__esModule",{value:!0});ie.v6=ie.AddressError=ie.Address6=ie.Address4=void 0;var cC=eh();Object.defineProperty(ie,"Address4",{enumerable:!0,get:o(function(){return cC.Address4},"get")});var hC=$g();Object.defineProperty(ie,"Address6",{enumerable:!0,get:o(function(){return hC.Address6},"get")});var uC=Fn();Object.defineProperty(ie,"AddressError",{enumerable:!0,get:o(function(){return uC.AddressError},"get")});var lC=aC(sh());ie.v6={helpers:lC}});var Gg=m(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.ipToBuffer=Pe.int32ToIpv4=Pe.ipv4ToInt32=Pe.validateSocksClientChainOptions=Pe.validateSocksClientOptions=void 0;var he=Yc(),X=Zc(),fC=require("stream"),ah=oh(),qg=require("net");function dC(s,e=["connect","bind","associate"]){if(!X.SocksCommand[s.command])throw new he.SocksClientError(X.ERRORS.InvalidSocksCommand,s);if(e.indexOf(s.command)===-1)throw new he.SocksClientError(X.ERRORS.InvalidSocksCommandForOperation,s);if(!jg(s.destination))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsDestination,s);if(!Hg(s.proxy))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsProxy,s);if(Ug(s.proxy,s),s.timeout&&!zg(s.timeout))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsTimeout,s);if(s.existing_socket&&!(s.existing_socket instanceof fC.Duplex))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsExistingSocket,s)}o(dC,"validateSocksClientOptions");Pe.validateSocksClientOptions=dC;function pC(s){if(s.command!=="connect")throw new he.SocksClientError(X.ERRORS.InvalidSocksCommandChain,s);if(!jg(s.destination))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsDestination,s);if(!(s.proxies&&Array.isArray(s.proxies)&&s.proxies.length>=2))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsProxiesLength,s);if(s.proxies.forEach(e=>{if(!Hg(e))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsProxy,s);Ug(e,s)}),s.timeout&&!zg(s.timeout))throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsTimeout,s)}o(pC,"validateSocksClientChainOptions");Pe.validateSocksClientChainOptions=pC;function Ug(s,e){if(s.custom_auth_method!==void 0){if(s.custom_auth_method<X.SOCKS5_CUSTOM_AUTH_START||s.custom_auth_method>X.SOCKS5_CUSTOM_AUTH_END)throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(s.custom_auth_request_handler===void 0||typeof s.custom_auth_request_handler!="function")throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(s.custom_auth_response_size===void 0)throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(s.custom_auth_response_handler===void 0||typeof s.custom_auth_response_handler!="function")throw new he.SocksClientError(X.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}o(Ug,"validateCustomProxyAuth");function jg(s){return s&&typeof s.host=="string"&&Buffer.byteLength(s.host)<256&&typeof s.port=="number"&&s.port>=0&&s.port<=65535}o(jg,"isValidSocksRemoteHost");function Hg(s){return s&&(typeof s.host=="string"||typeof s.ipaddress=="string")&&typeof s.port=="number"&&s.port>=0&&s.port<=65535&&(s.type===4||s.type===5)}o(Hg,"isValidSocksProxy");function zg(s){return typeof s=="number"&&s>0}o(zg,"isValidTimeoutValue");function mC(s){return new ah.Address4(s).toArray().reduce((t,r)=>(t<<8)+r,0)>>>0}o(mC,"ipv4ToInt32");Pe.ipv4ToInt32=mC;function gC(s){let e=s>>>24&255,t=s>>>16&255,r=s>>>8&255,i=s&255;return[e,t,r,i].join(".")}o(gC,"int32ToIpv4");Pe.int32ToIpv4=gC;function yC(s){if(qg.isIPv4(s)){let e=new ah.Address4(s);return Buffer.from(e.toArray())}else if(qg.isIPv6(s)){let e=new ah.Address6(s);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}o(yC,"ipToBuffer");Pe.ipToBuffer=yC});var Vg=m(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.ReceiveBuffer=void 0;var ch=class{static{o(this,"ReceiveBuffer")}constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};Hn.ReceiveBuffer=ch});var Wg=m(Pt=>{"use strict";var qs=Pt&&Pt.__awaiter||function(s,e,t,r){function i(n){return n instanceof t?n:new t(function(a){a(n)})}return o(i,"adopt"),new(t||(t=Promise))(function(n,a){function c(l){try{u(r.next(l))}catch(f){a(f)}}o(c,"fulfilled");function h(l){try{u(r.throw(l))}catch(f){a(f)}}o(h,"rejected");function u(l){l.done?n(l.value):i(l.value).then(c,h)}o(u,"step"),u((r=r.apply(s,e||[])).next())})};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.SocksClientError=Pt.SocksClient=void 0;var EC=require("events"),Us=require("net"),ye=Rg(),E=Zc(),Re=Gg(),wC=Vg(),uh=Yc();Object.defineProperty(Pt,"SocksClientError",{enumerable:!0,get:o(function(){return uh.SocksClientError},"get")});var hh=oh(),lh=class s extends EC.EventEmitter{static{o(this,"SocksClient")}constructor(e){super(),this.options=Object.assign({},e),(0,Re.validateSocksClientOptions)(e),this.setState(E.SocksClientState.Created)}static createConnection(e,t){return new Promise((r,i)=>{try{(0,Re.validateSocksClientOptions)(e,["connect"])}catch(a){return typeof t=="function"?(t(a),r(a)):i(a)}let n=new s(e);n.connect(e.existing_socket),n.once("established",a=>{n.removeAllListeners(),typeof t=="function"&&t(null,a),r(a)}),n.once("error",a=>{n.removeAllListeners(),typeof t=="function"?(t(a),r(a)):i(a)})})}static createConnectionChain(e,t){return new Promise((r,i)=>qs(this,void 0,void 0,function*(){try{(0,Re.validateSocksClientChainOptions)(e)}catch(n){return typeof t=="function"?(t(n),r(n)):i(n)}e.randomizeChain&&(0,uh.shuffleArray)(e.proxies);try{let n;for(let a=0;a<e.proxies.length;a++){let c=e.proxies[a],h=a===e.proxies.length-1?e.destination:{host:e.proxies[a+1].host||e.proxies[a+1].ipaddress,port:e.proxies[a+1].port},u=yield s.createConnection({command:"connect",proxy:c,destination:h,existing_socket:n});n=n||u.socket}typeof t=="function"?(t(null,{socket:n}),r({socket:n})):r({socket:n})}catch(n){typeof t=="function"?(t(n),r(n)):i(n)}}))}static createUDPFrame(e){let t=new ye.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),Us.isIPv4(e.remoteHost.host)?(t.writeUInt8(E.Socks5HostType.IPv4),t.writeUInt32BE((0,Re.ipv4ToInt32)(e.remoteHost.host))):Us.isIPv6(e.remoteHost.host)?(t.writeUInt8(E.Socks5HostType.IPv6),t.writeBuffer((0,Re.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(E.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=ye.SmartBuffer.fromBuffer(e);t.readOffset=2;let r=t.readUInt8(),i=t.readUInt8(),n;i===E.Socks5HostType.IPv4?n=(0,Re.int32ToIpv4)(t.readUInt32BE()):i===E.Socks5HostType.IPv6?n=hh.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():n=t.readString(t.readUInt8());let a=t.readUInt16BE();return{frameNumber:r,remoteHost:{host:n,port:a},data:t.readBuffer()}}setState(e){this.state!==E.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=r=>this.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||E.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new Us.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(E.SocksClientState.Connecting),this.receiveBuffer=new wC.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let i=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",i)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==E.SocksClientState.Established&&this.state!==E.SocksClientState.BoundWaitingForConnection&&this.closeSocket(E.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(E.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(E.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==E.SocksClientState.Established&&this.state!==E.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===E.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===E.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===E.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===E.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(E.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(E.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==E.SocksClientState.Error&&(this.setState(E.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new uh.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new ye.SmartBuffer;t.writeUInt8(4),t.writeUInt8(E.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),Us.isIPv4(this.options.destination.host)?(t.writeBuffer((0,Re.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==E.Socks4Response.Granted)this.closeSocket(`${E.ERRORS.Socks4ProxyRejectedConnection} - (${E.Socks4Response[e[1]]})`);else if(E.SocksCommand[this.options.command]===E.SocksCommand.bind){let t=ye.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,Re.int32ToIpv4)(t.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(E.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==E.Socks4Response.Granted)this.closeSocket(`${E.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${E.Socks4Response[e[1]]})`);else{let t=ye.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,Re.int32ToIpv4)(t.readUInt32BE())};this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new ye.SmartBuffer,t=[E.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(E.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(E.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(E.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===E.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(E.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===E.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=E.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===E.Socks5Auth.UserPass?(this.socks5ChosenAuthType=E.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(E.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",r=new ye.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(E.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return qs(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(E.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return qs(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return qs(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return qs(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return qs(this,void 0,void 0,function*(){this.setState(E.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===E.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===E.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(E.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new ye.SmartBuffer;e.writeUInt8(5),e.writeUInt8(E.SocksCommand[this.options.command]),e.writeUInt8(0),Us.isIPv4(this.options.destination.host)?(e.writeUInt8(E.Socks5HostType.IPv4),e.writeBuffer((0,Re.ipToBuffer)(this.options.destination.host))):Us.isIPv6(this.options.destination.host)?(e.writeUInt8(E.Socks5HostType.IPv6),e.writeBuffer((0,Re.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(E.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(E.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==E.Socks5Response.Granted)this.closeSocket(`${E.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${E.Socks5Response[e[1]]}`);else{let t=e[3],r,i;if(t===E.Socks5HostType.IPv4){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=ye.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,Re.int32ToIpv4)(i.readUInt32BE()),port:i.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===E.Socks5HostType.Hostname){let n=e[4],a=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}i=ye.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:i.readString(n),port:i.readUInt16BE()}}else if(t===E.Socks5HostType.IPv6){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=ye.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:hh.Address6.fromByteArray(Array.from(i.readBuffer(16))).canonicalForm(),port:i.readUInt16BE()}}this.setState(E.SocksClientState.ReceivedFinalResponse),E.SocksCommand[this.options.command]===E.SocksCommand.connect?(this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})):E.SocksCommand[this.options.command]===E.SocksCommand.bind?(this.setState(E.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:r,socket:this.socket})):E.SocksCommand[this.options.command]===E.SocksCommand.associate&&(this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==E.Socks5Response.Granted)this.closeSocket(`${E.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${E.Socks5Response[e[1]]}`);else{let t=e[3],r,i;if(t===E.Socks5HostType.IPv4){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=ye.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,Re.int32ToIpv4)(i.readUInt32BE()),port:i.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===E.Socks5HostType.Hostname){let n=e[4],a=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}i=ye.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:i.readString(n),port:i.readUInt16BE()}}else if(t===E.Socks5HostType.IPv6){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=ye.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:hh.Address6.fromByteArray(Array.from(i.readBuffer(16))).canonicalForm(),port:i.readUInt16BE()}}this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};Pt.SocksClient=lh});var Zg=m(is=>{"use strict";var SC=is&&is.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),_C=is&&is.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&SC(e,s,t)};Object.defineProperty(is,"__esModule",{value:!0});_C(Wg(),is)});var Kg=m(Le=>{"use strict";var bC=Le&&Le.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),RC=Le&&Le.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),fh=Le&&Le.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&bC(e,s,t);return RC(e,s),e},OC=Le&&Le.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Le,"__esModule",{value:!0});Le.SocksProxyAgent=void 0;var vC=Zg(),IC=jr(),TC=OC(Ur()),CC=fh(require("dns")),AC=fh(require("net")),xC=fh(require("tls")),BC=require("url"),zn=(0,TC.default)("socks-proxy-agent"),NC=o(s=>s.servername===void 0&&s.host&&!AC.isIP(s.host)?{...s,servername:s.host}:s,"setServernameFromNonIpHost");function PC(s){let e=!1,t=5,r=s.hostname,i=parseInt(s.port,10)||1080;switch(s.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(s.protocol)}`)}let n={host:r,port:i,type:t};return s.username&&Object.defineProperty(n,"userId",{value:decodeURIComponent(s.username),enumerable:!1}),s.password!=null&&Object.defineProperty(n,"password",{value:decodeURIComponent(s.password),enumerable:!1}),{lookup:e,proxy:n}}o(PC,"parseSocksURL");var Gn=class extends IC.Agent{static{o(this,"SocksProxyAgent")}constructor(e,t){super(t);let r=typeof e=="string"?new BC.URL(e):e,{proxy:i,lookup:n}=PC(r);this.shouldLookup=n,this.proxy=i,this.timeout=t?.timeout??null,this.socketOptions=t?.socketOptions??null}async connect(e,t){let{shouldLookup:r,proxy:i,timeout:n}=this;if(!t.host)throw new Error("No `host` defined!");let{host:a}=t,{port:c,lookup:h=CC.lookup}=t;r&&(a=await new Promise((d,p)=>{h(a,{},(y,g)=>{y?p(y):d(g)})}));let u={proxy:i,destination:{host:a,port:typeof c=="number"?c:parseInt(c,10)},command:"connect",timeout:n??void 0,socket_options:this.socketOptions??void 0},l=o(d=>{e.destroy(),f.destroy(),d&&d.destroy()},"cleanup");zn("Creating socks proxy connection: %o",u);let{socket:f}=await vC.SocksClient.createConnection(u);if(zn("Successfully created socks proxy connection"),n!==null&&(f.setTimeout(n),f.on("timeout",()=>l())),t.secureEndpoint){zn("Upgrading socket connection to TLS");let d=xC.connect({...LC(NC(t),"host","path","port"),socket:f});return d.once("error",p=>{zn("Socket TLS error",p.message),l(d)}),d}return f}};Gn.protocols=["socks","socks4","socks4a","socks5","socks5h"];Le.SocksProxyAgent=Gn;function LC(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(LC,"omit")});var Eh=m((yL,Yg)=>{"use strict";var dh=class extends Error{static{o(this,"InvalidProxyProtocolError")}constructor(e){super(`Invalid protocol \`${e.protocol}\` connecting to proxy \`${e.host}\``),this.code="EINVALIDPROXY",this.proxy=e}},ph=class extends Error{static{o(this,"ConnectionTimeoutError")}constructor(e){super(`Timeout connecting to host \`${e}\``),this.code="ECONNECTIONTIMEOUT",this.host=e}},mh=class extends Error{static{o(this,"IdleTimeoutError")}constructor(e){super(`Idle timeout reached for host \`${e}\``),this.code="EIDLETIMEOUT",this.host=e}},gh=class extends Error{static{o(this,"ResponseTimeoutError")}constructor(e,t){let r="Response timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`connecting to host \`${e.host}\``,super(r),this.code="ERESPONSETIMEOUT",this.proxy=t,this.request=e}},yh=class extends Error{static{o(this,"TransferTimeoutError")}constructor(e,t){let r="Transfer timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`for \`${e.host}\``,super(r),this.code="ETRANSFERTIMEOUT",this.proxy=t,this.request=e}};Yg.exports={InvalidProxyProtocolError:dh,ConnectionTimeoutError:ph,IdleTimeoutError:mh,ResponseTimeoutError:gh,TransferTimeoutError:yh}});var wh=m((wL,Jg)=>{"use strict";var{HttpProxyAgent:kC}=ug(),{HttpsProxyAgent:DC}=yg(),{SocksProxyAgent:Xg}=Kg(),{LRUCache:FC}=bs(),{InvalidProxyProtocolError:MC}=Eh(),$C=new FC({max:20}),qC=new Set(Xg.protocols),UC=new Set(["https_proxy","http_proxy","proxy","no_proxy"]),zr=Object.entries(process.env).reduce((s,[e,t])=>(e=e.toLowerCase(),UC.has(e)&&(s[e]=t),s),{}),jC=o(s=>{s=new URL(s);let e=s.protocol.slice(0,-1);if(qC.has(e))return Xg;if(e==="https"||e==="http")return[kC,DC];throw new MC(s)},"getProxyAgent"),HC=o((s,e)=>{if(typeof e=="string"&&(e=e.split(",").map(r=>r.trim()).filter(Boolean)),!e||!e.length)return!1;let t=s.hostname.split(".").reverse();return e.some(r=>{let i=r.split(".").filter(Boolean).reverse();if(!i.length)return!1;for(let n=0;n<i.length;n++)if(t[n]!==i[n])return!1;return!0})},"isNoProxy"),zC=o((s,{proxy:e,noProxy:t})=>(s=new URL(s),e||(e=s.protocol==="https:"?zr.https_proxy:zr.https_proxy||zr.http_proxy||zr.proxy),t||(t=zr.no_proxy),!e||HC(s,t)?null:new URL(e)),"getProxy");Jg.exports={getProxyAgent:jC,getProxy:zC,proxyCache:$C}});var ty=m((bL,ey)=>{"use strict";var GC=require("net"),VC=require("tls"),{once:Qg}=require("events"),WC=require("timers/promises"),{normalizeOptions:ZC,cacheOptions:KC}=qc(),{getProxy:YC,getProxyAgent:XC,proxyCache:Sh}=wh(),Vn=Eh(),{Agent:JC}=jr();ey.exports=class extends JC{static{o(this,"Agent")}#e;#t;#s;#r;#i;constructor(e={}){let{timeouts:t,proxy:r,noProxy:i,...n}=ZC(e);super(n),this.#e=n,this.#t=t,r&&(this.#s=new URL(r),this.#r=i,this.#i=XC(r))}get proxy(){return this.#s?{url:this.#s}:{}}#a(e){if(!this.#s)return;let t=YC(`${e.protocol}//${e.host}:${e.port}`,{proxy:this.#s,noProxy:this.#r});if(!t)return;let r=KC({...e,...this.#e,timeouts:this.#t,proxy:t});if(Sh.has(r))return Sh.get(r);let i=this.#i;Array.isArray(i)&&(i=this.isSecureEndpoint(e)?i[1]:i[0]);let n=new i(t,{...this.#e,socketOptions:{family:this.#e.family}});return Sh.set(r,n),n}async#l({promises:e,options:t,timeout:r},i=new AbortController){if(r){let a=WC.setTimeout(r,null,{signal:i.signal}).then(()=>{throw new Vn.ConnectionTimeoutError(`${t.host}:${t.port}`)}).catch(c=>{if(c.name!=="AbortError")throw c});e.push(a)}let n;try{n=await Promise.race(e),i.abort()}catch(a){throw i.abort(),a}return n}async connect(e,t){t.lookup??=this.#e.lookup;let r,i=this.#t.connection,n=this.isSecureEndpoint(t),a=this.#a(t);if(a){let l=Date.now();r=await this.#l({options:t,timeout:i,promises:[a.connect(e,t)]}),i&&(i=i-(Date.now()-l))}else r=(n?VC:GC).connect(t);r.setKeepAlive(this.keepAlive,this.keepAliveMsecs),r.setNoDelay(this.keepAlive);let c=new AbortController,{signal:h}=c,u=r[n?"secureConnecting":"connecting"]?Qg(r,n?"secureConnect":"connect",{signal:h}):Promise.resolve();return await this.#l({options:t,timeout:i,promises:[u,Qg(r,"error",{signal:h}).then(l=>{throw l[0]})]},c),this.#t.idle&&r.setTimeout(this.#t.idle,()=>{r.destroy(new Vn.IdleTimeoutError(`${t.host}:${t.port}`))}),r}addRequest(e,t){let r=this.#a(t);if(r?.setRequestProps&&r.setRequestProps(e,t),e.setHeader("connection",this.keepAlive?"keep-alive":"close"),this.#t.response){let i;e.once("finish",()=>{setTimeout(()=>{e.destroy(new Vn.ResponseTimeoutError(e,this.#s))},this.#t.response)}),e.once("response",()=>{clearTimeout(i)})}if(this.#t.transfer){let i;e.once("response",n=>{setTimeout(()=>{n.destroy(new Vn.TransferTimeoutError(e,this.#s))},this.#t.transfer),n.once("close",()=>{clearTimeout(i)})})}return super.addRequest(e,t)}}});var ny=m((OL,iy)=>{"use strict";var{LRUCache:QC}=bs(),{normalizeOptions:eA,cacheOptions:tA}=qc(),{getProxy:sA,proxyCache:sy}=wh(),ry=$c(),Wn=ty(),Gr=new QC({max:20}),rA=o((s,{agent:e,proxy:t,noProxy:r,...i}={})=>{if(e!=null)return e;s=new URL(s);let n=sA(s,{proxy:t,noProxy:r}),a={...eA(i),proxy:n},c=tA({...a,secureEndpoint:s.protocol==="https:"});if(Gr.has(c))return Gr.get(c);let h=new Wn(a);return Gr.set(c,h),h},"getAgent");iy.exports={getAgent:rA,Agent:Wn,HttpAgent:Wn,HttpsAgent:Wn,cache:{proxy:sy,agent:Gr,dns:ry.cache,clear:o(()=>{sy.clear(),Gr.clear(),ry.cache.clear()},"clear")}}});var oy=m((IL,iA)=>{iA.exports={name:"make-fetch-happen",version:"15.0.2",description:"Opinionated, caching, retrying fetch client",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",posttest:"npm run lint",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/make-fetch-happen.git"},keywords:["http","request","fetch","mean girls","caching","cache","subresource integrity"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/agent":"^4.0.0",cacache:"^20.0.1","http-cache-semantics":"^4.1.1",minipass:"^7.0.2","minipass-fetch":"^4.0.0","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4",negotiator:"^1.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",ssri:"^12.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",nock:"^13.2.4","safe-buffer":"^5.2.1","standard-version":"^9.3.2",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},tap:{color:1,files:"test/*.js","check-coverage":!0,timeout:60,"nyc-arg":["--exclude","tap-snapshots/**"]},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}});var Kn=m((TL,cy)=>{var{Minipass:nA}=ee(),Zn=sr(),oA=Mm(),aA=Ot(),{log:ay}=qm(),cA=Mc(),{getAgent:hA}=ny(),_h=oy(),uA=`${_h.name}/${_h.version} (+https://npm.im/${_h.name})`,lA=["ECONNRESET","ECONNREFUSED","EADDRINUSE","ETIMEDOUT","ECONNECTIONTIMEOUT","EIDLETIMEOUT","ERESPONSETIMEOUT","ETRANSFERTIMEOUT"],fA=["request-timeout"],dA=o((s,e)=>{let t=hA(s.url,{...e,signal:void 0});s.headers.has("connection")||s.headers.set("connection",t?"keep-alive":"close"),s.headers.has("user-agent")||s.headers.set("user-agent",uA);let r={...e,agent:t,redirect:"manual"};return oA(async(i,n)=>{let a=new Zn.Request(s,r);try{let c=await Zn(a,r);if(r.integrity&&c.status===200){let l=aA.integrityStream({algorithms:r.algorithms,integrity:r.integrity,size:r.size}),f=new cA({events:["integrity","size"]},c.body,l);l.on("integrity",d=>f.emit("integrity",d)),l.on("size",d=>f.emit("size",d)),c=new Zn.Response(f,c),c.body.hasIntegrityEmitter=!0}c.headers.set("x-fetch-attempts",n);let h=nA.isStream(a.body);return a.method!=="POST"&&!h&&([408,420,429].includes(c.status)||c.status>=500)?(typeof e.onRetry=="function"&&e.onRetry(c),ay.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.status}`),i(c)):c}catch(c){let h=c.code==="EPROMISERETRY"?c.retried.code:c.code,u=c.retried instanceof Zn.Response||lA.includes(h)&&fA.includes(c.type);if(a.method==="POST"||u)throw c;return typeof e.onRetry=="function"&&e.onRetry(c),ay.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.code}`),i(c)}},e.retry).catch(i=>{if(i.status>=400&&i.type!=="system")return i;throw i})},"remoteFetch");cy.exports=dA});var py=m((AL,dy)=>{var{Request:hy,Response:bh}=sr(),{Minipass:uy}=ee(),pA=yi(),ns=Om(),mA=require("url"),gA=Mc(),yA=Qo(),Rh=Tm(),EA=Kn(),Vr=o((s,e)=>Object.prototype.hasOwnProperty.call(s,e),"hasOwnProperty"),wA=["accept-charset","accept-encoding","accept-language","accept","cache-control"],fy=["cache-control","content-encoding","content-language","content-type","date","etag","expires","last-modified","link","location","pragma","vary"],ly=o((s,e,t)=>{let r={time:Date.now(),url:s.url,reqHeaders:{},resHeaders:{},options:{compress:t.compress!=null?t.compress:s.compress}};e.status!==200&&e.status!==304&&(r.status=e.status);for(let a of wA)s.headers.has(a)&&(r.reqHeaders[a]=s.headers.get(a));let i=s.headers.get("host"),n=new mA.URL(s.url);if(i&&n.host!==i&&(r.reqHeaders.host=i),e.headers.has("vary")){let a=e.headers.get("vary");if(a!=="*"){let c=a.trim().toLowerCase().split(/\s*,\s*/);for(let h of c)s.headers.has(h)&&(r.reqHeaders[h]=s.headers.get(h))}}for(let a of fy)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));for(let a of t.cacheAdditionalHeaders)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));return r},"getMetadata"),Yn=Symbol("request"),Xn=Symbol("response"),Jn=Symbol("policy"),Oh=class s{static{o(this,"CacheEntry")}constructor({entry:e,request:t,response:r,options:i}){e?(this.key=e.key,this.entry=e,this.entry.metadata.time=this.entry.metadata.time||this.entry.time):this.key=Rh(t),this.options=i,this[Yn]=t,this[Xn]=r,this[Jn]=null}static async find(e,t){try{var r=await ns.index.compact(t.cachePath,Rh(e),(n,a)=>{let c=new s({entry:n,options:t}),h=new s({entry:a,options:t});return c.policy.satisfies(h.request)},{validateEntry:o(n=>n.metadata&&n.metadata.resHeaders&&n.metadata.resHeaders["content-encoding"]===null?!1:n.integrity===null?!!(n.metadata&&n.metadata.status):!0,"validateEntry")})}catch{return}if(t.cache==="reload")return;let i;for(let n of r){let a=new s({entry:n,options:t});if(a.policy.satisfies(e)){i=a;break}}return i}static async invalidate(e,t){let r=Rh(e);try{await ns.rm.entry(t.cachePath,r,{removeFully:!0})}catch{}}get request(){return this[Yn]||(this[Yn]=new hy(this.entry.metadata.url,{method:"GET",headers:this.entry.metadata.reqHeaders,...this.entry.metadata.options})),this[Yn]}get response(){return this[Xn]||(this[Xn]=new bh(null,{url:this.entry.metadata.url,counter:this.options.counter,status:this.entry.metadata.status||200,headers:{...this.entry.metadata.resHeaders,"content-length":this.entry.size}})),this[Xn]}get policy(){return this[Jn]||(this[Jn]=new yA({entry:this.entry,request:this.request,response:this.response,options:this.options})),this[Jn]}async store(e){if(this.request.method!=="GET"||![200,301,308].includes(this.response.status)||!this.policy.storable())return this.response.headers.set("x-local-cache-status","skip"),this.response;let t=this.response.headers.get("content-length"),r={algorithms:this.options.algorithms,metadata:ly(this.request,this.response,this.options),size:t,integrity:this.options.integrity,integrityEmitter:this.response.body.hasIntegrityEmitter&&this.response.body},i=null;if(this.response.status===200){let a,c,h=new Promise((l,f)=>{a=l,c=f}).catch(l=>{i.emit("error",l)});i=new gA({events:["integrity","size"]},new pA({flush(){return h}})),i.hasIntegrityEmitter=!0;let u=o(()=>{let l=new uy,f=ns.put.stream(this.options.cachePath,this.key,r);f.on("integrity",d=>i.emit("integrity",d)),f.on("size",d=>i.emit("size",d)),l.pipe(f),f.promise().then(a,c),i.unshift(l),i.unshift(this.response.body)},"onResume");i.once("resume",u),i.once("end",()=>i.removeListener("resume",u))}else await ns.index.insert(this.options.cachePath,this.key,null,r);return this.response.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),this.response.headers.set("x-local-cache-key",encodeURIComponent(this.key)),this.response.headers.set("x-local-cache-mode","stream"),this.response.headers.set("x-local-cache-status",e),this.response.headers.set("x-local-cache-time",new Date().toISOString()),new bh(i,{url:this.response.url,status:this.response.status,headers:this.response.headers,counter:this.options.counter})}async respond(e,t,r){let i;if(e==="HEAD"||[301,308].includes(this.response.status))i=this.response;else{let n=new uy,a={...this.policy.responseHeaders()},c=o(()=>{let h=ns.get.stream.byDigest(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize});h.on("error",async u=>{h.pause(),u.code==="EINTEGRITY"&&await ns.rm.content(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize}),(u.code==="ENOENT"||u.code==="EINTEGRITY")&&await s.invalidate(this.request,this.options),n.emit("error",u),h.resume()}),n.emit("integrity",this.entry.integrity),n.emit("size",Number(a["content-length"])),h.pipe(n)},"onResume");n.once("resume",c),n.once("end",()=>n.removeListener("resume",c)),i=new bh(n,{url:this.entry.metadata.url,counter:t.counter,status:200,headers:a})}return i.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),i.headers.set("x-local-cache-hash",encodeURIComponent(this.entry.integrity)),i.headers.set("x-local-cache-key",encodeURIComponent(this.key)),i.headers.set("x-local-cache-mode","stream"),i.headers.set("x-local-cache-status",r),i.headers.set("x-local-cache-time",new Date(this.entry.metadata.time).toUTCString()),i}async revalidate(e,t){let r=new hy(e,{headers:this.policy.revalidationHeaders(e)});try{var i=await EA(r,{...t,headers:void 0})}catch(a){if(!this.policy.mustRevalidate)return this.respond(e.method,t,"stale");throw a}if(this.policy.revalidated(r,i)){let a=ly(e,i,t);for(let c of fy)!Vr(a.resHeaders,c)&&Vr(this.entry.metadata.resHeaders,c)&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]);for(let c of t.cacheAdditionalHeaders){let h=Vr(a.resHeaders,c),u=Vr(this.entry.metadata.resHeaders,c),l=Vr(this.policy.response.headers,c);!h&&u&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]),!l&&h&&(this.policy.response.headers[c]=a.resHeaders[c])}try{await ns.index.insert(t.cachePath,this.key,this.entry.integrity,{size:this.entry.size,metadata:a})}catch{}return this.respond(e.method,t,"revalidated")}return new s({request:e,response:i,options:t}).store("updated")}};dy.exports=Oh});var yy=m((BL,gy)=>{var{NotCachedError:SA}=Yu(),vh=py(),_A=Kn(),my=o(async(s,e)=>{let t=await vh.find(s,e);if(!t){if(e.cache==="only-if-cached")throw new SA(s.url);let i=await _A(s,e);return new vh({request:s,response:i,options:e}).store("miss")}if(e.cache==="no-cache")return t.revalidate(s,e);let r=t.policy.needsRevalidation(s);return e.cache==="force-cache"||e.cache==="only-if-cached"||!r?t.respond(s.method,e,r?"stale":"hit"):t.revalidate(s,e)},"cacheFetch");my.invalidate=async(s,e)=>{if(e.cachePath)return vh.invalidate(s,e)};gy.exports=my});var _y=m((PL,Sy)=>{"use strict";var{FetchError:Ih,Request:bA,isRedirect:RA}=sr(),Th=require("url"),OA=Qo(),Ey=yy(),vA=Kn(),IA=o((s,e,t)=>{if(!RA(e.status)||t.redirect==="manual")return!1;if(t.redirect==="error")throw new Ih(`redirect mode is set to error: ${s.url}`,"no-redirect",{code:"ENOREDIRECT"});if(!e.headers.has("location"))throw new Ih(`redirect location header missing for: ${s.url}`,"no-location",{code:"EINVALIDREDIRECT"});if(s.counter>=s.follow)throw new Ih(`maximum redirect reached at: ${s.url}`,"max-redirect",{code:"EMAXREDIRECT"});return!0},"canFollowRedirect"),TA=o((s,e,t)=>{let r={...t},i=e.headers.get("location"),n=new Th.URL(i,/^https?:/.test(i)?void 0:s.url);return new Th.URL(s.url).hostname!==n.hostname&&(s.headers.delete("authorization"),s.headers.delete("cookie")),(e.status===303||s.method==="POST"&&[301,302].includes(e.status))&&(r.method="GET",r.body=null,s.headers.delete("content-length")),r.headers={},s.headers.forEach((c,h)=>{r.headers[h]=c}),r.counter=++s.counter,{request:new bA(Th.format(n),r),options:r}},"getRedirect"),wy=o(async(s,e)=>{let t=OA.storable(s,e)?await Ey(s,e):await vA(s,e);if(!["GET","HEAD"].includes(s.method)&&t.status>=200&&t.status<=399&&await Ey.invalidate(s,e),!IA(s,t,e))return t;let r=TA(s,t,e);return wy(r.request,r.options)},"fetch");Sy.exports=wy});var{FetchError:CA,Headers:AA,Request:by,Response:xA}=sr(),BA=wu(),NA=_y(),Qn=o((s,e)=>{let t=BA(e),r=new by(s,t);return NA(r,t)},"makeFetchHappen");Qn.defaults=(s,e={},t=Qn)=>{typeof s=="object"&&(e=s,s=null);let r=o((i,n={})=>{let a=i||s,c={...e,...n,headers:{...e.headers,...n.headers}};return t(a,c)},"defaultedFetch");return r.defaults=(i,n={})=>Qn.defaults(i,n,r),r};module.exports=Qn;module.exports.FetchError=CA;module.exports.Headers=AA;module.exports.Request=by;module.exports.Response=xA;
31
+ /*! Bundled license information:
32
+
33
+ negotiator/index.js:
34
+ (*!
35
+ * negotiator
36
+ * Copyright(c) 2012 Federico Romero
37
+ * Copyright(c) 2012-2014 Isaac Z. Schlueter
38
+ * Copyright(c) 2015 Douglas Christopher Wilson
39
+ * MIT Licensed
40
+ *)
41
+
42
+ imurmurhash/imurmurhash.js:
43
+ (**
44
+ * @preserve
45
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
46
+ *
47
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
48
+ * @see http://github.com/homebrewing/brauhaus-diff
49
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
50
+ * @see http://github.com/garycourt/murmurhash-js
51
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
52
+ * @see http://sites.google.com/site/murmurhash/
53
+ *)
54
+
55
+ make-fetch-happen/lib/fetch.js:
56
+ (**
57
+ * @license
58
+ * Copyright (c) 2010-2012 Mikeal Rogers
59
+ * Licensed under the Apache License, Version 2.0 (the "License");
60
+ * you may not use this file except in compliance with the License.
61
+ * You may obtain a copy of the License at
62
+ * http://www.apache.org/licenses/LICENSE-2.0
63
+ * Unless required by applicable law or agreed to in writing,
64
+ * software distributed under the License is distributed on an "AS
65
+ * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
66
+ * express or implied. See the License for the specific language
67
+ * governing permissions and limitations under the License.
68
+ *)
69
+ */