@synergenius/flow-weaver 0.33.1 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (922) hide show
  1. package/LICENSE +201 -226
  2. package/NOTICE +13 -0
  3. package/README.md +152 -244
  4. package/dist/agent/agent-loop.d.ts +4 -2
  5. package/dist/agent/cli-session.d.ts +3 -3
  6. package/dist/agent/cli-session.js +511 -438
  7. package/dist/agent/cli-spawn-config.d.ts +4 -4
  8. package/dist/agent/gate.d.ts +164 -0
  9. package/dist/agent/index.d.ts +4 -4
  10. package/dist/agent/index.js +174 -28
  11. package/dist/agent/mcp-bridge.d.ts +1 -1
  12. package/dist/agent/mcp-bridge.js +114 -128
  13. package/dist/agent/mcp-tool-server.d.ts +2 -2
  14. package/dist/agent/mcp-tool-server.js +147 -189
  15. package/dist/agent/profiles.d.ts +69 -0
  16. package/dist/agent/providers/anthropic.d.ts +2 -4
  17. package/dist/agent/providers/claude-cli.d.ts +4 -5
  18. package/dist/agent/providers/openai-compat.d.ts +8 -1
  19. package/dist/agent/streaming.d.ts +2 -2
  20. package/dist/agent/types.d.ts +16 -10
  21. package/dist/api/builder.d.ts +3 -3
  22. package/dist/api/compile.d.ts +9 -4
  23. package/dist/api/durable-validation.d.ts +15 -0
  24. package/dist/api/generate-in-place.d.ts +21 -19
  25. package/dist/api/generate.d.ts +21 -16
  26. package/dist/api/generated-module/local-node-functions.d.ts +24 -0
  27. package/dist/api/generated-module/module-format.d.ts +23 -0
  28. package/dist/api/generated-module/module-writer.d.ts +34 -0
  29. package/dist/api/generated-module/node-type-imports.d.ts +39 -0
  30. package/dist/api/generated-module/preamble.d.ts +16 -0
  31. package/dist/api/generated-module/workflow-functions.d.ts +29 -0
  32. package/dist/api/graph-identity.d.ts +39 -0
  33. package/dist/api/helpers.d.ts +4 -60
  34. package/dist/api/in-place/built-in-nodes.d.ts +18 -0
  35. package/dist/api/in-place/function-body.d.ts +21 -0
  36. package/dist/api/in-place/fw-imports.d.ts +30 -0
  37. package/dist/api/in-place/macro-coverage.d.ts +14 -0
  38. package/dist/api/in-place/node-type-functions.d.ts +18 -0
  39. package/dist/api/in-place/node-type-jsdoc.d.ts +20 -0
  40. package/dist/api/in-place/orphaned-node-types.d.ts +16 -0
  41. package/dist/api/in-place/runtime-section.d.ts +16 -0
  42. package/dist/api/in-place/signature.d.ts +47 -0
  43. package/dist/api/in-place/source-file.d.ts +19 -0
  44. package/dist/api/in-place/workflow-jsdoc.d.ts +19 -0
  45. package/dist/api/index.d.ts +18 -21
  46. package/dist/api/index.js +259 -53
  47. package/dist/api/inline-engine.generated.d.ts +3 -0
  48. package/dist/api/inline-runtime.d.ts +10 -2
  49. package/dist/api/manipulation/connections.d.ts +1 -1
  50. package/dist/api/manipulation/index.d.ts +8 -8
  51. package/dist/api/manipulation/node-types.d.ts +1 -1
  52. package/dist/api/manipulation/nodes.d.ts +3 -13
  53. package/dist/api/manipulation/ports.d.ts +1 -1
  54. package/dist/api/manipulation/scopes.d.ts +1 -1
  55. package/dist/api/manipulation/workflow.d.ts +1 -1
  56. package/dist/api/modify-operation.d.ts +0 -2
  57. package/dist/api/parse.d.ts +22 -1
  58. package/dist/api/port-references.d.ts +66 -0
  59. package/dist/api/query.d.ts +18 -2
  60. package/dist/api/templates.d.ts +1 -1
  61. package/dist/api/transform.d.ts +1 -1
  62. package/dist/api/validate.d.ts +1 -1
  63. package/dist/api/validation-registry.d.ts +2 -2
  64. package/dist/artifacts/brief.d.ts +43 -0
  65. package/dist/artifacts/index.d.ts +31 -0
  66. package/dist/artifacts/pdf.d.ts +19 -0
  67. package/dist/ast/builder.d.ts +3 -3
  68. package/dist/ast/index.d.ts +4 -4
  69. package/dist/ast/index.js +60 -5
  70. package/dist/ast/serialization-node.d.ts +1 -1
  71. package/dist/ast/serialization.d.ts +1 -1
  72. package/dist/ast/types.d.ts +82 -291
  73. package/dist/ast/workflow-utils.d.ts +4 -4
  74. package/dist/built-in-nodes/coercion-types.d.ts +1 -1
  75. package/dist/built-in-nodes/delay.d.ts +3 -1
  76. package/dist/built-in-nodes/generated-registry.d.ts +1 -1
  77. package/dist/built-in-nodes/index.d.ts +6 -5
  78. package/dist/built-in-nodes/index.js +79 -5
  79. package/dist/built-in-nodes/invoke-workflow.d.ts +2 -1
  80. package/dist/built-in-nodes/mock-types.d.ts +45 -14
  81. package/dist/built-in-nodes/sleep.d.ts +12 -0
  82. package/dist/built-in-nodes/wait-for-agent.d.ts +2 -1
  83. package/dist/built-in-nodes/wait-for-event.d.ts +2 -1
  84. package/dist/chevrotain-parser/coerce-parser.d.ts +1 -1
  85. package/dist/chevrotain-parser/connect-parser.d.ts +1 -1
  86. package/dist/chevrotain-parser/grammar-diagrams.d.ts +1 -1
  87. package/dist/chevrotain-parser/index.d.ts +20 -23
  88. package/dist/chevrotain-parser/node-parser.d.ts +7 -8
  89. package/dist/chevrotain-parser/parse-line.d.ts +54 -0
  90. package/dist/chevrotain-parser/tokens.d.ts +0 -17
  91. package/dist/chevrotain-parser/trigger-cancel-parser.d.ts +6 -1
  92. package/dist/chunks/chunk-4EUSHAY6.js +298 -0
  93. package/dist/chunks/chunk-4KDUEOFD.js +197 -0
  94. package/dist/chunks/chunk-5Y3AIUWY.js +911 -0
  95. package/dist/chunks/chunk-6KMVP6AU.js +20 -0
  96. package/dist/chunks/chunk-6PNJORFL.js +128 -0
  97. package/dist/chunks/chunk-7AAQNGRH.js +2001 -0
  98. package/dist/chunks/chunk-7YYKTPJ5.js +22705 -0
  99. package/dist/chunks/chunk-A5MBOFVY.js +33 -0
  100. package/dist/chunks/chunk-AXNQRVJB.js +18 -0
  101. package/dist/chunks/chunk-B6HQ6YS5.js +572 -0
  102. package/dist/chunks/chunk-CY3RNVML.js +296 -0
  103. package/dist/chunks/chunk-CYHYDLV4.js +653 -0
  104. package/dist/chunks/chunk-CZBCCK4Y.js +82 -0
  105. package/dist/chunks/chunk-DCMGQP5V.js +505 -0
  106. package/dist/chunks/chunk-DIAA66GL.js +72 -0
  107. package/dist/chunks/chunk-DUO6H5PR.js +20 -0
  108. package/dist/chunks/chunk-E5WN7IGO.js +125 -0
  109. package/dist/chunks/chunk-EFGFXXQF.js +184 -0
  110. package/dist/chunks/chunk-F3RTZV2A.js +2811 -0
  111. package/dist/chunks/chunk-FMTLP5ZX.js +1397 -0
  112. package/dist/chunks/chunk-HKZLQJDV.js +79 -0
  113. package/dist/chunks/chunk-INDEVYEC.js +146 -0
  114. package/dist/chunks/chunk-JQTF4R5L.js +390 -0
  115. package/dist/chunks/chunk-KMCAYNUM.js +331 -0
  116. package/dist/chunks/chunk-KMWCCOUJ.js +1444 -0
  117. package/dist/chunks/chunk-KU3CLJI2.js +338 -0
  118. package/dist/chunks/chunk-NDSTGMKR.js +3300 -0
  119. package/dist/chunks/chunk-NQNLUAPO.js +505 -0
  120. package/dist/chunks/chunk-O2U2LO57.js +466 -0
  121. package/dist/chunks/chunk-OOQG7UPP.js +457 -0
  122. package/dist/chunks/chunk-OZQAW5ZG.js +112 -0
  123. package/dist/chunks/chunk-P2CVDGHR.js +487 -0
  124. package/dist/chunks/chunk-P44RIZ7C.js +592 -0
  125. package/dist/chunks/chunk-PEZCT37T.js +1475 -0
  126. package/dist/chunks/chunk-PKWSAW6O.js +152 -0
  127. package/dist/chunks/chunk-Q6MDDZMT.js +4373 -0
  128. package/dist/chunks/chunk-QDE4Z7KW.js +6 -0
  129. package/dist/chunks/chunk-QJDAVSNY.js +8 -0
  130. package/dist/chunks/chunk-QYPORSLO.js +7552 -0
  131. package/dist/chunks/chunk-R4QGNK34.js +183 -0
  132. package/dist/chunks/chunk-REEYC73I.js +3002 -0
  133. package/dist/chunks/chunk-SEWDMQ6Q.js +46 -0
  134. package/dist/chunks/chunk-TAIUWKZB.js +3057 -0
  135. package/dist/chunks/chunk-TN4YZ3O7.js +196 -0
  136. package/dist/chunks/chunk-TRMFB43C.js +143 -0
  137. package/dist/chunks/chunk-VO4QXG2X.js +1016 -0
  138. package/dist/chunks/chunk-VP2P3BPA.js +1002 -0
  139. package/dist/chunks/chunk-VQ7H33J4.js +2176 -0
  140. package/dist/chunks/chunk-VWA7MCV2.js +105 -0
  141. package/dist/chunks/chunk-XAV22WD7.js +253 -0
  142. package/dist/chunks/chunk-YSPBPZDV.js +148 -0
  143. package/dist/chunks/chunk-ZKEGXO73.js +282 -0
  144. package/dist/chunks/chunk-ZMGN6F3S.js +4256 -0
  145. package/dist/chunks/grammar-diagrams-AI7VDXOM.js +14 -0
  146. package/dist/chunks/index.min-ECJD6GZC.js +37 -0
  147. package/dist/chunks/manifest-EPTR5MYH.js +21 -0
  148. package/dist/chunks/openapi-document-6TCGVDUW.js +69 -0
  149. package/dist/chunks/registry-K2U5KUTY.js +23 -0
  150. package/dist/chunks/serialization-node-UGY6CFH6.js +38 -0
  151. package/dist/chunks/validate-GEKSZPIN.js +24 -0
  152. package/dist/chunks/validation-registry-IQZX3UE3.js +7 -0
  153. package/dist/chunks/validator-VXFHLPDW.js +26 -0
  154. package/dist/chunks/workflow-executor-KBGFKHNR.js +36 -0
  155. package/dist/cli/commands/agents.d.ts +16 -0
  156. package/dist/cli/commands/artifact.d.ts +10 -0
  157. package/dist/cli/commands/compile.d.ts +0 -30
  158. package/dist/cli/commands/console.d.ts +32 -0
  159. package/dist/cli/commands/context.d.ts +0 -3
  160. package/dist/cli/commands/describe.js +386 -352
  161. package/dist/cli/commands/dev.d.ts +9 -4
  162. package/dist/cli/commands/diagram.d.ts +3 -5
  163. package/dist/cli/commands/doctor.d.ts +27 -4
  164. package/dist/cli/commands/doctor.js +3307 -633
  165. package/dist/cli/commands/export.d.ts +6 -4
  166. package/dist/cli/commands/grammar.d.ts +0 -3
  167. package/dist/cli/commands/implement.d.ts +1 -1
  168. package/dist/cli/commands/init/agent-handoff.d.ts +28 -0
  169. package/dist/cli/commands/init/config.d.ts +3 -0
  170. package/dist/cli/commands/init/files.d.ts +12 -0
  171. package/dist/cli/commands/init/naming.d.ts +13 -0
  172. package/dist/cli/commands/init/output.d.ts +12 -0
  173. package/dist/cli/commands/init/setup.d.ts +21 -0
  174. package/dist/cli/commands/init/types.d.ts +53 -0
  175. package/dist/cli/commands/init-personas.d.ts +9 -1
  176. package/dist/cli/commands/init.d.ts +24 -88
  177. package/dist/cli/commands/market.d.ts +1 -1
  178. package/dist/cli/commands/mcp-setup.d.ts +1 -4
  179. package/dist/cli/commands/modify.d.ts +0 -5
  180. package/dist/cli/commands/openapi.d.ts +9 -11
  181. package/dist/cli/commands/run.d.ts +0 -4
  182. package/dist/cli/commands/serve.d.ts +24 -26
  183. package/dist/cli/commands/status.d.ts +1 -1
  184. package/dist/cli/exports.d.ts +3 -4
  185. package/dist/cli/exports.js +124 -23
  186. package/dist/cli/flow-weaver-agents-H653446S.mjs +81 -0
  187. package/dist/cli/flow-weaver-artifact-WBFYTW76.mjs +58 -0
  188. package/dist/cli/flow-weaver-chunk-265CEK74.mjs +2 -0
  189. package/dist/cli/flow-weaver-chunk-2C7PZCV5.mjs +186 -0
  190. package/dist/cli/flow-weaver-chunk-3BSYCWPL.mjs +3109 -0
  191. package/dist/cli/flow-weaver-chunk-3MKUQP3D.mjs +547 -0
  192. package/dist/cli/flow-weaver-chunk-3ZLMPQTH.mjs +27 -0
  193. package/dist/cli/flow-weaver-chunk-4DVY73ML.mjs +280 -0
  194. package/dist/cli/flow-weaver-chunk-54M4KNEL.mjs +200 -0
  195. package/dist/cli/flow-weaver-chunk-55QMUZIA.mjs +256 -0
  196. package/dist/cli/flow-weaver-chunk-6ZUJ7LMX.mjs +2003 -0
  197. package/dist/cli/flow-weaver-chunk-7ET6N32V.mjs +419 -0
  198. package/dist/cli/flow-weaver-chunk-7G63RR4K.mjs +8880 -0
  199. package/dist/cli/flow-weaver-chunk-A6M5K3W7.mjs +4418 -0
  200. package/dist/cli/flow-weaver-chunk-AA3NATMX.mjs +154 -0
  201. package/dist/cli/flow-weaver-chunk-APX6MQ5A.mjs +5652 -0
  202. package/dist/cli/flow-weaver-chunk-BHCC5FE5.mjs +17 -0
  203. package/dist/cli/flow-weaver-chunk-DM4BBRRU.mjs +35 -0
  204. package/dist/cli/flow-weaver-chunk-DRN7KPWY.mjs +168 -0
  205. package/dist/cli/flow-weaver-chunk-EKWF27G6.mjs +23 -0
  206. package/dist/cli/flow-weaver-chunk-EM5HWQ4R.mjs +338 -0
  207. package/dist/cli/flow-weaver-chunk-FPPPU2DG.mjs +226 -0
  208. package/dist/cli/flow-weaver-chunk-GAQXZHNO.mjs +3005 -0
  209. package/dist/cli/flow-weaver-chunk-GBUNNP33.mjs +1329 -0
  210. package/dist/cli/flow-weaver-chunk-HMAKDE55.mjs +636 -0
  211. package/dist/cli/flow-weaver-chunk-HQ3ZAN44.mjs +367 -0
  212. package/dist/cli/flow-weaver-chunk-I4APCXYN.mjs +21442 -0
  213. package/dist/cli/flow-weaver-chunk-IJJ4JXTL.mjs +2297 -0
  214. package/dist/cli/flow-weaver-chunk-J7EPZW2I.mjs +33 -0
  215. package/dist/cli/flow-weaver-chunk-KOEMJHLG.mjs +83 -0
  216. package/dist/cli/flow-weaver-chunk-M6CBWQKJ.mjs +271 -0
  217. package/dist/cli/flow-weaver-chunk-MHJ4N652.mjs +1580 -0
  218. package/dist/cli/flow-weaver-chunk-MKAFQWLP.mjs +202 -0
  219. package/dist/cli/flow-weaver-chunk-MMV2XGD3.mjs +3291 -0
  220. package/dist/cli/flow-weaver-chunk-MSI2UJES.mjs +125 -0
  221. package/dist/cli/flow-weaver-chunk-N767YRAI.mjs +48 -0
  222. package/dist/cli/flow-weaver-chunk-NQKKWDGF.mjs +56 -0
  223. package/dist/cli/flow-weaver-chunk-NYZDQYFU.mjs +45 -0
  224. package/dist/cli/flow-weaver-chunk-OMVWSNHJ.mjs +14 -0
  225. package/dist/cli/flow-weaver-chunk-PUWZ47H5.mjs +2188 -0
  226. package/dist/cli/flow-weaver-chunk-QOPRVDES.mjs +46 -0
  227. package/dist/cli/flow-weaver-chunk-RIWE7YTR.mjs +216 -0
  228. package/dist/cli/flow-weaver-chunk-S63Q3JIU.mjs +789 -0
  229. package/dist/cli/flow-weaver-chunk-T7X5A23H.mjs +558 -0
  230. package/dist/cli/flow-weaver-chunk-TLV3VZUN.mjs +2 -0
  231. package/dist/cli/flow-weaver-chunk-TS5P3PIN.mjs +194 -0
  232. package/dist/cli/flow-weaver-chunk-U3EO3X4B.mjs +649 -0
  233. package/dist/cli/flow-weaver-chunk-UNFS3NQP.mjs +34 -0
  234. package/dist/cli/flow-weaver-chunk-V6DHWFQG.mjs +2811 -0
  235. package/dist/cli/flow-weaver-chunk-VXWNLYQU.mjs +9 -0
  236. package/dist/cli/flow-weaver-chunk-W3YNK26P.mjs +149 -0
  237. package/dist/cli/flow-weaver-chunk-XG2WKXYZ.mjs +324 -0
  238. package/dist/cli/flow-weaver-chunk-YLSRZWFK.mjs +2219 -0
  239. package/dist/cli/flow-weaver-chunk-YVPURWS6.mjs +40 -0
  240. package/dist/cli/flow-weaver-chunk-Z44JK332.mjs +582 -0
  241. package/dist/cli/flow-weaver-chunk-Z5ZJPNSY.mjs +517 -0
  242. package/dist/cli/flow-weaver-chunk-ZQALO25T.mjs +594 -0
  243. package/dist/cli/flow-weaver-compile-A2CABDSB.mjs +37 -0
  244. package/dist/cli/flow-weaver-console-6EBHDBTN.mjs +71 -0
  245. package/dist/cli/flow-weaver-context-ECLYANFF.mjs +17 -0
  246. package/dist/cli/flow-weaver-context-ZRUMW2KE.mjs +69 -0
  247. package/dist/cli/flow-weaver-create-WIP4EFNP.mjs +124 -0
  248. package/dist/cli/flow-weaver-deployment-WJJRK7NO.mjs +14 -0
  249. package/dist/cli/flow-weaver-describe-XDIFF5LI.mjs +41 -0
  250. package/dist/cli/flow-weaver-dev-LG2NSQAU.mjs +196 -0
  251. package/dist/cli/flow-weaver-diagram-3EVQARQE.mjs +52 -0
  252. package/dist/cli/flow-weaver-diagram-7LR7O4M2.mjs +44 -0
  253. package/dist/cli/flow-weaver-diff-USF7DJLU.mjs +85 -0
  254. package/dist/cli/flow-weaver-docs-QU2ZOXKH.mjs +96 -0
  255. package/dist/cli/flow-weaver-doctor-K447YWHR.mjs +43 -0
  256. package/dist/cli/flow-weaver-export-LAS6N56Y.mjs +140 -0
  257. package/dist/cli/flow-weaver-grammar-RIRUS3Q6.mjs +49 -0
  258. package/dist/cli/flow-weaver-grammar-diagrams-WXRTW5SK.mjs +15 -0
  259. package/dist/cli/flow-weaver-implement-5JG6BCFZ.mjs +114 -0
  260. package/dist/cli/flow-weaver-index.min-OR5SIHXD.mjs +39 -0
  261. package/dist/cli/flow-weaver-init-34YZNPQX.mjs +972 -0
  262. package/dist/cli/flow-weaver-init-personas-NOGZTQQ2.mjs +48 -0
  263. package/dist/cli/flow-weaver-manifest-4JNUSEB3.mjs +18 -0
  264. package/dist/cli/flow-weaver-market-WA4CKHKV.mjs +444 -0
  265. package/dist/cli/flow-weaver-mcp-setup-O26MGXSD.mjs +22 -0
  266. package/dist/cli/flow-weaver-migrate-VFVEUTPH.mjs +119 -0
  267. package/dist/cli/flow-weaver-modify-VM3JP5K6.mjs +97 -0
  268. package/dist/cli/flow-weaver-openapi-IRBWI3HM.mjs +71 -0
  269. package/dist/cli/flow-weaver-openapi-document-7N6YMPG3.mjs +30 -0
  270. package/dist/cli/flow-weaver-pack-commands-OS2QRXAK.mjs +146 -0
  271. package/dist/cli/flow-weaver-registry-5MLFRPPT.mjs +25 -0
  272. package/dist/cli/flow-weaver-run-DSTLSTHR.mjs +555 -0
  273. package/dist/cli/flow-weaver-serialization-node-LE6PCG4M.mjs +50 -0
  274. package/dist/cli/flow-weaver-serve-NVLCLSOW.mjs +192 -0
  275. package/dist/cli/flow-weaver-server-7IERLVXE.mjs +2925 -0
  276. package/dist/cli/flow-weaver-server-KWF4PXYC.mjs +19112 -0
  277. package/dist/cli/flow-weaver-status-75W2S3YB.mjs +138 -0
  278. package/dist/cli/flow-weaver-strip-AZPXUYVA.mjs +79 -0
  279. package/dist/cli/flow-weaver-templates-DSNMB6K7.mjs +72 -0
  280. package/dist/cli/flow-weaver-validate-A4UWDQN6.mjs +19 -0
  281. package/dist/cli/flow-weaver-validate-GRBZ5W4C.mjs +296 -0
  282. package/dist/cli/flow-weaver-validation-registry-BINGUNXX.mjs +9 -0
  283. package/dist/cli/flow-weaver-validator-TY56CI42.mjs +21 -0
  284. package/dist/cli/flow-weaver-watch-OPPERXL6.mjs +114 -0
  285. package/dist/cli/flow-weaver-workflow-executor-6AHYPXAN.mjs +26 -0
  286. package/dist/cli/flow-weaver.mjs +3557 -89498
  287. package/dist/cli/index.d.ts +5 -2
  288. package/dist/cli/pack-commands-needed.d.ts +12 -0
  289. package/dist/cli/program.d.ts +14 -0
  290. package/dist/cli/templates/ai/mock-provider.d.ts +1 -1
  291. package/dist/cli/templates/index.d.ts +1 -8
  292. package/dist/cli/templates/nodes/agent-router.d.ts +1 -1
  293. package/dist/cli/templates/nodes/aggregator.d.ts +1 -1
  294. package/dist/cli/templates/nodes/conversation-memory.d.ts +1 -1
  295. package/dist/cli/templates/nodes/http.d.ts +1 -1
  296. package/dist/cli/templates/nodes/human-approval.d.ts +1 -1
  297. package/dist/cli/templates/nodes/json-extractor.d.ts +1 -1
  298. package/dist/cli/templates/nodes/llm-call.d.ts +1 -1
  299. package/dist/cli/templates/nodes/prompt-template.d.ts +1 -1
  300. package/dist/cli/templates/nodes/rag-retriever.d.ts +1 -1
  301. package/dist/cli/templates/nodes/tool-executor.d.ts +1 -1
  302. package/dist/cli/templates/nodes/transformer.d.ts +1 -1
  303. package/dist/cli/templates/nodes/validator.d.ts +1 -1
  304. package/dist/cli/templates/shared/approval-types.d.ts +1 -1
  305. package/dist/cli/templates/shared/case.d.ts +14 -0
  306. package/dist/cli/templates/shared/llm-types.d.ts +4 -4
  307. package/dist/cli/templates/workflows/aggregator.d.ts +1 -1
  308. package/dist/cli/templates/workflows/ai-agent.d.ts +1 -1
  309. package/dist/cli/templates/workflows/ai-chat.d.ts +1 -1
  310. package/dist/cli/templates/workflows/ai-rag.d.ts +1 -1
  311. package/dist/cli/templates/workflows/ai-react.d.ts +1 -1
  312. package/dist/cli/templates/workflows/approval.d.ts +10 -0
  313. package/dist/cli/templates/workflows/conditional.d.ts +2 -2
  314. package/dist/cli/templates/workflows/error-handler.d.ts +2 -2
  315. package/dist/cli/templates/workflows/foreach.d.ts +1 -1
  316. package/dist/cli/templates/workflows/sequential.d.ts +1 -1
  317. package/dist/cli/templates/workflows/webhook.d.ts +1 -1
  318. package/dist/cli/utils/interactive.d.ts +6 -0
  319. package/dist/cli/utils/json-option.d.ts +8 -0
  320. package/dist/cli/utils/logger.d.ts +2 -0
  321. package/dist/compiler/durable-source-proof.d.ts +23 -0
  322. package/dist/compiler/executable-artifact.d.ts +29 -0
  323. package/dist/compiler/index.d.ts +4 -0
  324. package/dist/compiler/index.js +36 -0
  325. package/dist/console/app.js +106 -0
  326. package/dist/console/assets/synergenius.svg +18 -0
  327. package/dist/console/author.d.ts +32 -0
  328. package/dist/console/cli-catalog.d.ts +21 -0
  329. package/dist/console/cli-run.d.ts +35 -0
  330. package/dist/console/cli-run.js +46 -0
  331. package/dist/console/debug.d.ts +67 -0
  332. package/dist/console/diff-view.d.ts +96 -0
  333. package/dist/console/export.d.ts +36 -0
  334. package/dist/console/git.d.ts +27 -0
  335. package/dist/console/index.d.ts +4 -0
  336. package/dist/console/index.html +16 -0
  337. package/dist/console/index.js +203 -0
  338. package/dist/console/packs.d.ts +100 -0
  339. package/dist/console/request-guard.d.ts +10 -0
  340. package/dist/console/respond.d.ts +16 -0
  341. package/dist/console/router.d.ts +64 -0
  342. package/dist/console/routes-agents.d.ts +14 -0
  343. package/dist/console/routes-project.d.ts +3 -0
  344. package/dist/console/routes-runs.d.ts +3 -0
  345. package/dist/console/routes-services.d.ts +7 -0
  346. package/dist/console/routes-tools.d.ts +3 -0
  347. package/dist/console/runs.d.ts +69 -0
  348. package/dist/console/scan.d.ts +49 -0
  349. package/dist/console/schema.d.ts +74 -0
  350. package/dist/console/server.d.ts +34 -0
  351. package/dist/console/server.js +43264 -0
  352. package/dist/console/services.d.ts +119 -0
  353. package/dist/console/source.d.ts +23 -0
  354. package/dist/console/status.d.ts +68 -0
  355. package/dist/console/styles.css +1023 -0
  356. package/dist/console/terminals.d.ts +22 -0
  357. package/dist/console/workflow-view.d.ts +153 -0
  358. package/dist/constants.d.ts +5 -1
  359. package/dist/constants.js +56 -167
  360. package/dist/context/index.d.ts +10 -0
  361. package/dist/context/index.js +14 -191
  362. package/dist/coordinator/agent-gate.d.ts +107 -0
  363. package/dist/coordinator/bundle-digest.d.ts +20 -0
  364. package/dist/coordinator/clock-tick.d.ts +4 -0
  365. package/dist/coordinator/effect-receipts.d.ts +10 -0
  366. package/dist/coordinator/errors.d.ts +31 -0
  367. package/dist/coordinator/file-store.d.ts +3 -0
  368. package/dist/coordinator/gate-labeling.d.ts +33 -0
  369. package/dist/coordinator/gate-resolution.d.ts +28 -0
  370. package/dist/coordinator/index.d.ts +12 -0
  371. package/dist/coordinator/index.js +107 -0
  372. package/dist/coordinator/memory-store.d.ts +3 -0
  373. package/dist/coordinator/params.d.ts +18 -0
  374. package/dist/coordinator/run-annotations.d.ts +6 -0
  375. package/dist/coordinator/run-context.d.ts +11 -0
  376. package/dist/coordinator/run-ending.d.ts +5 -0
  377. package/dist/coordinator/run-outcome.d.ts +31 -0
  378. package/dist/coordinator/run-resume.d.ts +6 -0
  379. package/dist/coordinator/run-start.d.ts +4 -0
  380. package/dist/coordinator/run-store.d.ts +275 -0
  381. package/dist/coordinator/run-trace.d.ts +41 -0
  382. package/dist/coordinator/run-views.d.ts +12 -0
  383. package/dist/coordinator/runs-dir.d.ts +26 -0
  384. package/dist/coordinator/store.d.ts +67 -0
  385. package/dist/coordinator/time.d.ts +39 -0
  386. package/dist/coordinator/workflow-selection.d.ts +6 -0
  387. package/dist/deployment/index.d.ts +11 -16
  388. package/dist/deployment/index.js +541 -50
  389. package/dist/deployment/targets/base.d.ts +11 -13
  390. package/dist/deployment/targets/openapi-parts.d.ts +92 -0
  391. package/dist/diagram/arms.d.ts +70 -0
  392. package/dist/diagram/ascii-renderer.d.ts +1 -1
  393. package/dist/diagram/geometry.d.ts +22 -29
  394. package/dist/diagram/graph/bounds.d.ts +30 -0
  395. package/dist/diagram/graph/metrics.d.ts +21 -0
  396. package/dist/diagram/graph/nodes.d.ts +33 -0
  397. package/dist/diagram/graph/placement.d.ts +22 -0
  398. package/dist/diagram/graph/ports.d.ts +23 -0
  399. package/dist/diagram/graph/routing.d.ts +40 -0
  400. package/dist/diagram/graph/scopes.d.ts +30 -0
  401. package/dist/diagram/index.d.ts +15 -23
  402. package/dist/diagram/index.js +632 -111
  403. package/dist/diagram/labels.d.ts +12 -0
  404. package/dist/diagram/lanes.d.ts +93 -0
  405. package/dist/diagram/layout.d.ts +1 -1
  406. package/dist/diagram/material-symbols.d.ts +7 -0
  407. package/dist/diagram/orthogonal-router.d.ts +15 -51
  408. package/dist/diagram/process-view.d.ts +79 -0
  409. package/dist/diagram/spine.d.ts +25 -0
  410. package/dist/diagram/theme.d.ts +3 -5
  411. package/dist/diagram/types.d.ts +6 -20
  412. package/dist/diff/index.js +53 -9
  413. package/dist/diff/types.d.ts +1 -5
  414. package/dist/doc-metadata/extractors/annotations.d.ts +0 -4
  415. package/dist/doc-metadata/extractors/cli-commands.d.ts +2 -1
  416. package/dist/doc-metadata/extractors/core-metadata.d.ts +19 -4
  417. package/dist/doc-metadata/extractors/error-codes.d.ts +1 -1
  418. package/dist/doc-metadata/extractors/mcp-tools.d.ts +7 -3
  419. package/dist/doc-metadata/index.d.ts +1 -2
  420. package/dist/doc-metadata/index.js +2368 -9
  421. package/dist/doc-metadata/types.d.ts +7 -24
  422. package/dist/docs/guide.d.ts +33 -0
  423. package/dist/docs/index.d.ts +7 -4
  424. package/dist/docs/index.js +298 -298
  425. package/dist/docs/pack-topics.d.ts +18 -0
  426. package/dist/editor-completions/annotationValues.d.ts +1 -1
  427. package/dist/editor-completions/contextParser.d.ts +3 -2
  428. package/dist/editor-completions/dataTypes.d.ts +1 -1
  429. package/dist/editor-completions/goToDefinition.d.ts +1 -1
  430. package/dist/editor-completions/index.d.ts +8 -8
  431. package/dist/editor-completions/index.js +1244 -175
  432. package/dist/editor-completions/jsDocAnnotations.d.ts +1 -1
  433. package/dist/editor-completions/modifierCompletions.d.ts +1 -1
  434. package/dist/export/index.d.ts +7 -1
  435. package/dist/generated-branding.js +8 -21
  436. package/dist/generated-version.d.ts +1 -1
  437. package/dist/generated-version.js +7 -3
  438. package/dist/generator/annotation-generator.d.ts +84 -0
  439. package/dist/generator/async-detection.d.ts +1 -1
  440. package/dist/{body-generator.d.ts → generator/body-generator.d.ts} +7 -3
  441. package/dist/generator/code-utils.d.ts +15 -60
  442. package/dist/generator/connection-reads.d.ts +94 -0
  443. package/dist/generator/control-flow-plan.d.ts +74 -0
  444. package/dist/generator/control-flow.d.ts +1 -1
  445. package/dist/generator/exit-assembly.d.ts +11 -0
  446. package/dist/generator/index.d.ts +4 -5
  447. package/dist/generator/index.js +34 -11
  448. package/dist/generator/input-port-values.d.ts +22 -0
  449. package/dist/generator/{scope-function-generator.d.ts → node-arguments.d.ts} +76 -1
  450. package/dist/generator/node-invocation.d.ts +74 -0
  451. package/dist/{node-types-generator.d.ts → generator/node-types-generator.d.ts} +3 -2
  452. package/dist/generator/scope-closure.d.ts +23 -0
  453. package/dist/generator/scoped-child.d.ts +49 -0
  454. package/dist/{sugar-optimizer.d.ts → generator/sugar-optimizer.d.ts} +1 -1
  455. package/dist/generator/unified.d.ts +14 -2
  456. package/dist/generator/workflow-generator.d.ts +37 -0
  457. package/dist/index.d.ts +29 -26
  458. package/dist/index.js +1322 -92
  459. package/dist/jsdoc-port-sync/apply-diff.d.ts +15 -0
  460. package/dist/jsdoc-port-sync/callback-signature.d.ts +17 -0
  461. package/dist/jsdoc-port-sync/diff.d.ts +5 -7
  462. package/dist/jsdoc-port-sync/incomplete-lines.d.ts +41 -0
  463. package/dist/jsdoc-port-sync/index.d.ts +11 -11
  464. package/dist/jsdoc-port-sync/index.js +88 -45
  465. package/dist/jsdoc-port-sync/jsdoc-to-signature.d.ts +66 -0
  466. package/dist/jsdoc-port-sync/port-parser.d.ts +6 -24
  467. package/dist/jsdoc-port-sync/port-tag-placement.d.ts +55 -0
  468. package/dist/jsdoc-port-sync/scoped-ports.d.ts +21 -0
  469. package/dist/jsdoc-port-sync/signature-parser.d.ts +8 -1
  470. package/dist/jsdoc-port-sync/signature-to-jsdoc.d.ts +77 -0
  471. package/dist/jsdoc-port-sync/sync.d.ts +4 -1
  472. package/dist/marketplace/index.d.ts +5 -3
  473. package/dist/marketplace/index.js +62 -10
  474. package/dist/marketplace/install.d.ts +24 -0
  475. package/dist/marketplace/manifest.d.ts +1 -1
  476. package/dist/marketplace/npmrc.d.ts +24 -0
  477. package/dist/marketplace/registry.d.ts +46 -11
  478. package/dist/marketplace/types.d.ts +41 -24
  479. package/dist/marketplace/validator.d.ts +1 -1
  480. package/dist/mcp/debug-session.d.ts +2 -4
  481. package/dist/mcp/dist-imports.d.ts +12 -0
  482. package/dist/mcp/response-utils.d.ts +11 -9
  483. package/dist/mcp/server.d.ts +0 -1
  484. package/dist/mcp/tools-context.d.ts +11 -0
  485. package/dist/mcp/tools-diagram.d.ts +1 -2
  486. package/dist/mcp/tools-export.d.ts +2 -2
  487. package/dist/mcp/tools-marketplace.d.ts +1 -1
  488. package/dist/mcp/tools-run.d.ts +17 -0
  489. package/dist/mcp/tools-workflow.d.ts +3 -0
  490. package/dist/mcp/types.d.ts +4 -14
  491. package/dist/mcp/workflow-executor.d.ts +57 -19
  492. package/dist/npm-packages.d.ts +1 -1
  493. package/dist/npm-packages.js +10 -473
  494. package/dist/parser/annotation-parser.d.ts +88 -0
  495. package/dist/parser/annotation-suggestion.d.ts +23 -0
  496. package/dist/parser/durable-effect-contract.d.ts +10 -0
  497. package/dist/parser/expression-references.d.ts +101 -0
  498. package/dist/parser/external-node-types.d.ts +69 -0
  499. package/dist/{function-like.d.ts → parser/function-like.d.ts} +10 -3
  500. package/dist/parser/generated-sections.d.ts +25 -0
  501. package/dist/parser/import-resolution.d.ts +67 -0
  502. package/dist/parser/import-stub.d.ts +29 -0
  503. package/dist/parser/jsdoc/config-types.d.ts +209 -0
  504. package/dist/parser/jsdoc/graph-tags.d.ts +54 -0
  505. package/dist/parser/jsdoc/node-type-block.d.ts +23 -0
  506. package/dist/parser/jsdoc/parse-line-once.d.ts +11 -0
  507. package/dist/parser/jsdoc/port-tags.d.ts +42 -0
  508. package/dist/parser/jsdoc/runtime-tags.d.ts +65 -0
  509. package/dist/parser/jsdoc/signature-types.d.ts +52 -0
  510. package/dist/parser/jsdoc/workflow-block.d.ts +22 -0
  511. package/dist/parser/jsdoc-parser.d.ts +23 -0
  512. package/dist/parser/macro-expansion.d.ts +80 -0
  513. package/dist/parser/module-resolution.d.ts +38 -0
  514. package/dist/parser/node-inference.d.ts +39 -0
  515. package/dist/parser/npm-node-types.d.ts +24 -0
  516. package/dist/parser/pack-handlers.d.ts +12 -0
  517. package/dist/parser/path-data-resolution.d.ts +75 -0
  518. package/dist/parser/port-inference.d.ts +15 -0
  519. package/dist/{resolve-package-types.d.ts → parser/resolve-package-types.d.ts} +4 -0
  520. package/dist/parser/serialize-deploy-annotations.d.ts +19 -0
  521. package/dist/parser/tag-registry.d.ts +22 -0
  522. package/dist/parser/workflow-extraction.d.ts +39 -0
  523. package/dist/runtime/ExecutionContext.d.ts +87 -99
  524. package/dist/runtime/continuation-core.d.ts +147 -0
  525. package/dist/runtime/continuation.d.ts +48 -0
  526. package/dist/runtime/debug-controller.d.ts +7 -22
  527. package/dist/runtime/durable-execution.d.ts +176 -0
  528. package/dist/runtime/events.d.ts +16 -1
  529. package/dist/runtime/executable-module-contract.d.ts +16 -0
  530. package/dist/runtime/index.d.ts +13 -10
  531. package/dist/runtime/index.js +947 -9
  532. package/dist/runtime/strict-json.d.ts +15 -0
  533. package/dist/server/access.d.ts +12 -0
  534. package/dist/server/api.d.ts +126 -0
  535. package/dist/server/callback-delivery.d.ts +62 -0
  536. package/dist/server/callback-url.d.ts +44 -0
  537. package/dist/server/context.d.ts +35 -0
  538. package/dist/server/http-error.d.ts +10 -0
  539. package/dist/server/index.d.ts +7 -1
  540. package/dist/server/index.js +125 -6
  541. package/dist/server/openapi-document.d.ts +33 -0
  542. package/dist/server/openapi.d.ts +32 -0
  543. package/dist/server/respond.d.ts +35 -0
  544. package/dist/server/route-params.d.ts +17 -0
  545. package/dist/server/route-plan.d.ts +41 -0
  546. package/dist/server/routes-catalog.d.ts +5 -0
  547. package/dist/server/routes-declared.d.ts +12 -0
  548. package/dist/server/routes-runs.d.ts +8 -0
  549. package/dist/server/run-driver.d.ts +58 -0
  550. package/dist/server/run-view.d.ts +26 -0
  551. package/dist/server/transport.d.ts +35 -0
  552. package/dist/server/types.d.ts +143 -52
  553. package/dist/server/webhook-server.d.ts +12 -38
  554. package/dist/server/workflow-registry.d.ts +7 -4
  555. package/dist/service-registry.d.ts +49 -0
  556. package/dist/service-registry.js +123 -0
  557. package/dist/testing/assertions.d.ts +2 -2
  558. package/dist/testing/index.d.ts +14 -13
  559. package/dist/testing/index.js +582 -24
  560. package/dist/testing/mock-approval.d.ts +3 -5
  561. package/dist/testing/mock-llm.d.ts +2 -3
  562. package/dist/testing/recorder.d.ts +5 -6
  563. package/dist/testing/replayer.d.ts +6 -7
  564. package/dist/testing/run-store-check.d.ts +3 -0
  565. package/dist/testing/token-tracker.d.ts +2 -2
  566. package/dist/{type-mappings.d.ts → types/type-mappings.d.ts} +13 -1
  567. package/dist/utils/error-utils.d.ts +4 -2
  568. package/dist/utils/port-ordering.d.ts +2 -2
  569. package/dist/utils/port-tag-utils.d.ts +1 -1
  570. package/dist/validation/agent-detection.d.ts +17 -5
  571. package/dist/validation/agent-rules.d.ts +6 -7
  572. package/dist/validation/core-rules.d.ts +49 -0
  573. package/dist/validation/design-rules.d.ts +9 -3
  574. package/dist/validation/rule-registry.d.ts +3 -3
  575. package/dist/validation/rules/connections.d.ts +27 -0
  576. package/dist/validation/rules/context.d.ts +11 -0
  577. package/dist/validation/rules/cycles.d.ts +17 -0
  578. package/dist/validation/rules/data-flow.d.ts +19 -0
  579. package/dist/validation/rules/scope-topology.d.ts +35 -0
  580. package/dist/validation/rules/type-compatibility.d.ts +30 -0
  581. package/dist/validation/type-checker.d.ts +39 -0
  582. package/dist/validation/validator-helpers.d.ts +31 -0
  583. package/dist/validation/validator.d.ts +30 -0
  584. package/docs/reference/advanced-annotations.md +277 -60
  585. package/docs/reference/built-in-nodes.md +164 -94
  586. package/docs/reference/cancellation.md +44 -0
  587. package/docs/reference/cli-reference.md +252 -234
  588. package/docs/reference/compilation.md +36 -109
  589. package/docs/reference/concepts.md +80 -63
  590. package/docs/reference/console.md +169 -0
  591. package/docs/reference/debugging.md +26 -57
  592. package/docs/reference/deployment.md +217 -143
  593. package/docs/reference/durable-gates.md +445 -0
  594. package/docs/reference/error-codes.md +90 -43
  595. package/docs/reference/export-interface.md +91 -26
  596. package/docs/reference/iterative-development.md +50 -28
  597. package/docs/reference/jsdoc-grammar.md +66 -311
  598. package/docs/reference/library.md +250 -0
  599. package/docs/reference/marketplace.md +301 -152
  600. package/docs/reference/mcp-tools.md +102 -0
  601. package/docs/reference/node-conversion.md +84 -59
  602. package/docs/reference/orientation.md +68 -0
  603. package/docs/reference/scaffold.md +5 -4
  604. package/docs/reference/tutorial.md +106 -166
  605. package/docs/reference/visual-reference.md +1 -1
  606. package/package.json +85 -50
  607. package/dist/agent/agent-loop.js +0 -156
  608. package/dist/agent/cli-spawn-config.js +0 -65
  609. package/dist/agent/device-connection.d.ts +0 -79
  610. package/dist/agent/device-connection.js +0 -184
  611. package/dist/agent/env-allowlist.js +0 -60
  612. package/dist/agent/providers/anthropic.js +0 -198
  613. package/dist/agent/providers/claude-cli.js +0 -161
  614. package/dist/agent/providers/openai-compat.js +0 -205
  615. package/dist/agent/providers/platform.d.ts +0 -23
  616. package/dist/agent/providers/platform.js +0 -132
  617. package/dist/agent/streaming.js +0 -186
  618. package/dist/agent/types.js +0 -20
  619. package/dist/annotation-generator.d.ts +0 -50
  620. package/dist/annotation-generator.js +0 -743
  621. package/dist/api/builder.js +0 -345
  622. package/dist/api/command-runner.js +0 -787
  623. package/dist/api/compile.js +0 -148
  624. package/dist/api/extract-types.js +0 -57
  625. package/dist/api/generate-in-place.js +0 -1477
  626. package/dist/api/generate.js +0 -514
  627. package/dist/api/helpers.js +0 -285
  628. package/dist/api/inline-runtime.js +0 -526
  629. package/dist/api/manipulation/connections.js +0 -151
  630. package/dist/api/manipulation/index.js +0 -41
  631. package/dist/api/manipulation/node-types.js +0 -200
  632. package/dist/api/manipulation/nodes.js +0 -355
  633. package/dist/api/manipulation/ports.js +0 -228
  634. package/dist/api/manipulation/scopes.js +0 -156
  635. package/dist/api/manipulation/workflow.js +0 -116
  636. package/dist/api/modify-operation.js +0 -177
  637. package/dist/api/parse.js +0 -115
  638. package/dist/api/patterns.d.ts +0 -112
  639. package/dist/api/patterns.js +0 -303
  640. package/dist/api/query.js +0 -840
  641. package/dist/api/templates.js +0 -117
  642. package/dist/api/transform.js +0 -40
  643. package/dist/api/validate.js +0 -64
  644. package/dist/api/validation-registry.js +0 -10
  645. package/dist/api/workflow-file-operations.js +0 -180
  646. package/dist/ast/builder.js +0 -395
  647. package/dist/ast/serialization-node.js +0 -30
  648. package/dist/ast/serialization.js +0 -134
  649. package/dist/ast/types.js +0 -2
  650. package/dist/ast/workflow-utils.js +0 -114
  651. package/dist/body-generator.js +0 -35
  652. package/dist/built-in-nodes/coercion-types.js +0 -61
  653. package/dist/built-in-nodes/delay.js +0 -29
  654. package/dist/built-in-nodes/generated-registry.js +0 -299
  655. package/dist/built-in-nodes/invoke-workflow.js +0 -36
  656. package/dist/built-in-nodes/mock-types.js +0 -42
  657. package/dist/built-in-nodes/wait-for-agent.js +0 -31
  658. package/dist/built-in-nodes/wait-for-event.js +0 -25
  659. package/dist/chevrotain-parser/coerce-parser.js +0 -103
  660. package/dist/chevrotain-parser/connect-parser.js +0 -136
  661. package/dist/chevrotain-parser/fan-parser.js +0 -149
  662. package/dist/chevrotain-parser/grammar-diagrams.js +0 -273
  663. package/dist/chevrotain-parser/index.js +0 -31
  664. package/dist/chevrotain-parser/map-parser.js +0 -130
  665. package/dist/chevrotain-parser/node-parser.js +0 -558
  666. package/dist/chevrotain-parser/path-parser.js +0 -140
  667. package/dist/chevrotain-parser/port-parser.js +0 -519
  668. package/dist/chevrotain-parser/position-parser.d.ts +0 -20
  669. package/dist/chevrotain-parser/position-parser.js +0 -83
  670. package/dist/chevrotain-parser/scope-parser.js +0 -104
  671. package/dist/chevrotain-parser/tokens.js +0 -429
  672. package/dist/chevrotain-parser/trigger-cancel-parser.js +0 -291
  673. package/dist/cli/commands/account.d.ts +0 -4
  674. package/dist/cli/commands/account.js +0 -50
  675. package/dist/cli/commands/ai-credentials.d.ts +0 -12
  676. package/dist/cli/commands/ai-credentials.js +0 -95
  677. package/dist/cli/commands/apikey.d.ts +0 -4
  678. package/dist/cli/commands/apikey.js +0 -64
  679. package/dist/cli/commands/auth.d.ts +0 -9
  680. package/dist/cli/commands/auth.js +0 -255
  681. package/dist/cli/commands/compile.js +0 -331
  682. package/dist/cli/commands/connect.d.ts +0 -4
  683. package/dist/cli/commands/connect.js +0 -163
  684. package/dist/cli/commands/context.js +0 -51
  685. package/dist/cli/commands/create.js +0 -139
  686. package/dist/cli/commands/deploy.d.ts +0 -6
  687. package/dist/cli/commands/deploy.js +0 -74
  688. package/dist/cli/commands/dev.js +0 -227
  689. package/dist/cli/commands/diagram.js +0 -39
  690. package/dist/cli/commands/diff.js +0 -57
  691. package/dist/cli/commands/docs.js +0 -74
  692. package/dist/cli/commands/export.js +0 -153
  693. package/dist/cli/commands/grammar.js +0 -40
  694. package/dist/cli/commands/implement.js +0 -91
  695. package/dist/cli/commands/init-personas.js +0 -541
  696. package/dist/cli/commands/init.js +0 -797
  697. package/dist/cli/commands/market.js +0 -440
  698. package/dist/cli/commands/mcp-setup.js +0 -433
  699. package/dist/cli/commands/migrate.js +0 -91
  700. package/dist/cli/commands/modify.js +0 -58
  701. package/dist/cli/commands/openapi.js +0 -71
  702. package/dist/cli/commands/org.d.ts +0 -8
  703. package/dist/cli/commands/org.js +0 -136
  704. package/dist/cli/commands/pattern.d.ts +0 -34
  705. package/dist/cli/commands/pattern.js +0 -186
  706. package/dist/cli/commands/plugin.d.ts +0 -16
  707. package/dist/cli/commands/plugin.js +0 -176
  708. package/dist/cli/commands/run.js +0 -742
  709. package/dist/cli/commands/serve.js +0 -93
  710. package/dist/cli/commands/status.js +0 -123
  711. package/dist/cli/commands/strip.js +0 -61
  712. package/dist/cli/commands/templates.js +0 -58
  713. package/dist/cli/commands/validate.js +0 -267
  714. package/dist/cli/commands/watch.js +0 -71
  715. package/dist/cli/config/credentials.d.ts +0 -15
  716. package/dist/cli/config/credentials.js +0 -43
  717. package/dist/cli/config/platform-client.d.ts +0 -123
  718. package/dist/cli/config/platform-client.js +0 -248
  719. package/dist/cli/env-setup.js +0 -12
  720. package/dist/cli/index.js +0 -850
  721. package/dist/cli/pack-commands.js +0 -122
  722. package/dist/cli/postinstall.d.ts +0 -16
  723. package/dist/cli/postinstall.js +0 -119
  724. package/dist/cli/templates/ai/mock-provider.js +0 -64
  725. package/dist/cli/templates/ai/types.js +0 -5
  726. package/dist/cli/templates/approvals/index.d.ts +0 -15
  727. package/dist/cli/templates/approvals/index.js +0 -241
  728. package/dist/cli/templates/index.js +0 -123
  729. package/dist/cli/templates/nodes/agent-router.js +0 -114
  730. package/dist/cli/templates/nodes/aggregator.js +0 -63
  731. package/dist/cli/templates/nodes/conversation-memory.js +0 -85
  732. package/dist/cli/templates/nodes/http.js +0 -80
  733. package/dist/cli/templates/nodes/human-approval.js +0 -109
  734. package/dist/cli/templates/nodes/json-extractor.js +0 -119
  735. package/dist/cli/templates/nodes/llm-call.js +0 -106
  736. package/dist/cli/templates/nodes/prompt-template.js +0 -52
  737. package/dist/cli/templates/nodes/rag-retriever.js +0 -128
  738. package/dist/cli/templates/nodes/tool-executor.js +0 -108
  739. package/dist/cli/templates/nodes/transformer.js +0 -68
  740. package/dist/cli/templates/nodes/validator.js +0 -62
  741. package/dist/cli/templates/pack-loader.js +0 -58
  742. package/dist/cli/templates/providers/index.js +0 -239
  743. package/dist/cli/templates/shared/approval-types.js +0 -31
  744. package/dist/cli/templates/shared/llm-types.js +0 -109
  745. package/dist/cli/templates/workflows/aggregator.js +0 -101
  746. package/dist/cli/templates/workflows/ai-agent.js +0 -326
  747. package/dist/cli/templates/workflows/ai-chat.js +0 -167
  748. package/dist/cli/templates/workflows/ai-rag.js +0 -184
  749. package/dist/cli/templates/workflows/ai-react.js +0 -293
  750. package/dist/cli/templates/workflows/conditional.js +0 -139
  751. package/dist/cli/templates/workflows/error-handler.js +0 -145
  752. package/dist/cli/templates/workflows/foreach.js +0 -140
  753. package/dist/cli/templates/workflows/sequential.js +0 -200
  754. package/dist/cli/templates/workflows/webhook.js +0 -158
  755. package/dist/cli/utils/cli-helpers.d.ts +0 -44
  756. package/dist/cli/utils/cli-helpers.js +0 -99
  757. package/dist/cli/utils/logger.js +0 -126
  758. package/dist/cli/utils/parse-int-strict.js +0 -17
  759. package/dist/cli/utils/safe-write.js +0 -54
  760. package/dist/deployment/config/defaults.d.ts +0 -29
  761. package/dist/deployment/config/defaults.js +0 -98
  762. package/dist/deployment/config/loader.d.ts +0 -24
  763. package/dist/deployment/config/loader.js +0 -237
  764. package/dist/deployment/config/types.d.ts +0 -117
  765. package/dist/deployment/config/types.js +0 -5
  766. package/dist/deployment/core/adapters.d.ts +0 -66
  767. package/dist/deployment/core/adapters.js +0 -156
  768. package/dist/deployment/core/executor.d.ts +0 -62
  769. package/dist/deployment/core/executor.js +0 -197
  770. package/dist/deployment/core/formatters.d.ts +0 -42
  771. package/dist/deployment/core/formatters.js +0 -146
  772. package/dist/deployment/openapi/generator.d.ts +0 -146
  773. package/dist/deployment/openapi/generator.js +0 -347
  774. package/dist/deployment/openapi/schema-converter.d.ts +0 -49
  775. package/dist/deployment/openapi/schema-converter.js +0 -192
  776. package/dist/deployment/targets/base.js +0 -855
  777. package/dist/deployment/types.d.ts +0 -140
  778. package/dist/deployment/types.js +0 -8
  779. package/dist/diagram/ascii-renderer.js +0 -528
  780. package/dist/diagram/geometry.js +0 -1267
  781. package/dist/diagram/html-viewer.d.ts +0 -21
  782. package/dist/diagram/html-viewer.js +0 -1689
  783. package/dist/diagram/layout.js +0 -143
  784. package/dist/diagram/orthogonal-router.js +0 -568
  785. package/dist/diagram/renderer.d.ts +0 -3
  786. package/dist/diagram/renderer.js +0 -266
  787. package/dist/diagram/theme.js +0 -282
  788. package/dist/diagram/types.js +0 -2
  789. package/dist/diff/WorkflowDiffer.js +0 -429
  790. package/dist/diff/formatDiff.js +0 -239
  791. package/dist/diff/impact.js +0 -119
  792. package/dist/diff/types.js +0 -35
  793. package/dist/doc-metadata/extractors/annotations.js +0 -638
  794. package/dist/doc-metadata/extractors/cli-commands.js +0 -326
  795. package/dist/doc-metadata/extractors/core-metadata.js +0 -61
  796. package/dist/doc-metadata/extractors/error-codes.js +0 -372
  797. package/dist/doc-metadata/extractors/grammar-rules.js +0 -51
  798. package/dist/doc-metadata/extractors/mcp-tools.js +0 -705
  799. package/dist/doc-metadata/extractors/plugin-api.d.ts +0 -19
  800. package/dist/doc-metadata/extractors/plugin-api.js +0 -279
  801. package/dist/doc-metadata/types.js +0 -5
  802. package/dist/editor-completions/annotationValues.js +0 -146
  803. package/dist/editor-completions/contextParser.js +0 -410
  804. package/dist/editor-completions/dataTypes.js +0 -95
  805. package/dist/editor-completions/goToDefinition.js +0 -112
  806. package/dist/editor-completions/jsDocAnnotations.js +0 -359
  807. package/dist/editor-completions/modifierCompletions.js +0 -197
  808. package/dist/editor-completions/types.js +0 -8
  809. package/dist/export/index.js +0 -212
  810. package/dist/extensions/index.d.ts +0 -16
  811. package/dist/extensions/index.js +0 -17
  812. package/dist/friendly-errors.js +0 -761
  813. package/dist/function-like.js +0 -84
  814. package/dist/generator/async-detection.js +0 -56
  815. package/dist/generator/code-utils.js +0 -551
  816. package/dist/generator/compile-target-registry.d.ts +0 -20
  817. package/dist/generator/compile-target-registry.js +0 -20
  818. package/dist/generator/control-flow.js +0 -358
  819. package/dist/generator/dev-mode-registry.d.ts +0 -27
  820. package/dist/generator/dev-mode-registry.js +0 -20
  821. package/dist/generator/scope-function-generator.js +0 -397
  822. package/dist/generator/unified.js +0 -1831
  823. package/dist/generator.d.ts +0 -54
  824. package/dist/generator.js +0 -101
  825. package/dist/jsdoc-parser.d.ts +0 -377
  826. package/dist/jsdoc-parser.js +0 -1189
  827. package/dist/jsdoc-port-sync/constants.js +0 -103
  828. package/dist/jsdoc-port-sync/diff.js +0 -319
  829. package/dist/jsdoc-port-sync/port-parser.js +0 -579
  830. package/dist/jsdoc-port-sync/rename.js +0 -256
  831. package/dist/jsdoc-port-sync/signature-parser.js +0 -559
  832. package/dist/jsdoc-port-sync/sync.js +0 -653
  833. package/dist/marketplace/manifest.js +0 -194
  834. package/dist/marketplace/registry.js +0 -198
  835. package/dist/marketplace/types.js +0 -9
  836. package/dist/marketplace/validator.js +0 -150
  837. package/dist/mcp/agent-channel.d.ts +0 -35
  838. package/dist/mcp/agent-channel.js +0 -61
  839. package/dist/mcp/auto-registration.d.ts +0 -3
  840. package/dist/mcp/auto-registration.js +0 -62
  841. package/dist/mcp/debug-session.js +0 -25
  842. package/dist/mcp/index.d.ts +0 -11
  843. package/dist/mcp/index.js +0 -10
  844. package/dist/mcp/pack-tools.js +0 -59
  845. package/dist/mcp/prompts.js +0 -68
  846. package/dist/mcp/response-utils.js +0 -97
  847. package/dist/mcp/run-registry.d.ts +0 -29
  848. package/dist/mcp/run-registry.js +0 -24
  849. package/dist/mcp/server.js +0 -63
  850. package/dist/mcp/tools-context.js +0 -51
  851. package/dist/mcp/tools-debug.js +0 -451
  852. package/dist/mcp/tools-diagram.js +0 -97
  853. package/dist/mcp/tools-docs.js +0 -62
  854. package/dist/mcp/tools-export.js +0 -222
  855. package/dist/mcp/tools-marketplace.js +0 -132
  856. package/dist/mcp/tools-model.d.ts +0 -3
  857. package/dist/mcp/tools-model.js +0 -279
  858. package/dist/mcp/tools-pattern.d.ts +0 -3
  859. package/dist/mcp/tools-pattern.js +0 -604
  860. package/dist/mcp/tools-query.js +0 -377
  861. package/dist/mcp/tools-resources.js +0 -41
  862. package/dist/mcp/tools-template.js +0 -119
  863. package/dist/mcp/tools-workflow-run.d.ts +0 -40
  864. package/dist/mcp/tools-workflow-run.js +0 -150
  865. package/dist/mcp/types.js +0 -2
  866. package/dist/mcp/workflow-executor.js +0 -242
  867. package/dist/migration/registry.js +0 -29
  868. package/dist/node-types-generator.js +0 -139
  869. package/dist/parser/tag-registry.js +0 -57
  870. package/dist/parser.d.ts +0 -232
  871. package/dist/parser.js +0 -2500
  872. package/dist/plugin/PluginPanel.d.ts +0 -12
  873. package/dist/plugin/PluginPanel.js +0 -5
  874. package/dist/plugin/index.d.ts +0 -13
  875. package/dist/plugin/index.js +0 -14
  876. package/dist/plugin/types.d.ts +0 -75
  877. package/dist/plugin/types.js +0 -8
  878. package/dist/resolve-package-types.js +0 -123
  879. package/dist/runtime/CancellationError.js +0 -20
  880. package/dist/runtime/ExecutionContext.js +0 -280
  881. package/dist/runtime/builtin-functions.js +0 -549
  882. package/dist/runtime/checkpoint.d.ts +0 -84
  883. package/dist/runtime/checkpoint.js +0 -225
  884. package/dist/runtime/debug-controller.js +0 -247
  885. package/dist/runtime/events.js +0 -2
  886. package/dist/runtime/function-registry.js +0 -66
  887. package/dist/runtime/parameter-resolver.js +0 -113
  888. package/dist/server/types.js +0 -5
  889. package/dist/server/webhook-server.js +0 -269
  890. package/dist/server/workflow-registry.js +0 -202
  891. package/dist/shared-project.js +0 -28
  892. package/dist/sugar-optimizer.js +0 -498
  893. package/dist/testing/assertions.js +0 -127
  894. package/dist/testing/mock-approval.js +0 -98
  895. package/dist/testing/mock-llm.js +0 -119
  896. package/dist/testing/recorder.js +0 -70
  897. package/dist/testing/replayer.js +0 -143
  898. package/dist/testing/token-tracker.js +0 -94
  899. package/dist/type-checker.d.ts +0 -42
  900. package/dist/type-checker.js +0 -190
  901. package/dist/type-mappings.js +0 -131
  902. package/dist/types/branded-ports.d.ts +0 -151
  903. package/dist/types/branded-ports.js +0 -121
  904. package/dist/types/index.d.ts +0 -5
  905. package/dist/types/index.js +0 -5
  906. package/dist/types.d.ts +0 -139
  907. package/dist/types.js +0 -15
  908. package/dist/utils/error-utils.js +0 -27
  909. package/dist/utils/lru-cache.js +0 -40
  910. package/dist/utils/port-ordering.js +0 -81
  911. package/dist/utils/port-tag-utils.js +0 -41
  912. package/dist/utils/string-distance.js +0 -56
  913. package/dist/validation/agent-detection.js +0 -115
  914. package/dist/validation/agent-rules.js +0 -262
  915. package/dist/validation/design-rules.js +0 -377
  916. package/dist/validation/rule-registry.js +0 -37
  917. package/dist/validator.d.ts +0 -113
  918. package/dist/validator.js +0 -1631
  919. package/docs/reference/patterns.md +0 -159
  920. package/scripts/postinstall.cjs +0 -86
  921. /package/dist/{shared-project.d.ts → parser/shared-project.d.ts} +0 -0
  922. /package/dist/{friendly-errors.d.ts → validation/friendly-errors.d.ts} +0 -0
@@ -0,0 +1,3005 @@
1
+ import { createRequire as __createRequire } from "module";
2
+ const require = __createRequire(import.meta.url);
3
+
4
+ // node_modules/glob/dist/esm/index.min.js
5
+ import { fileURLToPath as Wi } from "node:url";
6
+ import { posix as mi, win32 as re } from "node:path";
7
+ import { fileURLToPath as gi } from "node:url";
8
+ import { lstatSync as wi, readdir as yi, readdirSync as bi, readlinkSync as Si, realpathSync as Ei } from "fs";
9
+ import * as xi from "node:fs";
10
+ import { lstat as Ci, readdir as Ti, readlink as Ai, realpath as ki } from "node:fs/promises";
11
+ import { EventEmitter as ee } from "node:events";
12
+ import Pe from "node:stream";
13
+ import { StringDecoder as ni } from "node:string_decoder";
14
+ var Gt = (n7, t, e) => {
15
+ let s = n7 instanceof RegExp ? ce(n7, e) : n7, i = t instanceof RegExp ? ce(t, e) : t, r = s !== null && i != null && ss(s, i, e);
16
+ return r && { start: r[0], end: r[1], pre: e.slice(0, r[0]), body: e.slice(r[0] + s.length, r[1]), post: e.slice(r[1] + i.length) };
17
+ };
18
+ var ce = (n7, t) => {
19
+ let e = t.match(n7);
20
+ return e ? e[0] : null;
21
+ };
22
+ var ss = (n7, t, e) => {
23
+ let s, i, r, o, h, a = e.indexOf(n7), l = e.indexOf(t, a + 1), u = a;
24
+ if (a >= 0 && l > 0) {
25
+ if (n7 === t) return [a, l];
26
+ for (s = [], r = e.length; u >= 0 && !h; ) {
27
+ if (u === a) s.push(u), a = e.indexOf(n7, u + 1);
28
+ else if (s.length === 1) {
29
+ let c = s.pop();
30
+ c !== void 0 && (h = [c, l]);
31
+ } else i = s.pop(), i !== void 0 && i < r && (r = i, o = l), l = e.indexOf(t, u + 1);
32
+ u = a < l && a >= 0 ? a : l;
33
+ }
34
+ s.length && o !== void 0 && (h = [r, o]);
35
+ }
36
+ return h;
37
+ };
38
+ var fe = "\0SLASH" + Math.random() + "\0";
39
+ var ue = "\0OPEN" + Math.random() + "\0";
40
+ var qt = "\0CLOSE" + Math.random() + "\0";
41
+ var de = "\0COMMA" + Math.random() + "\0";
42
+ var pe = "\0PERIOD" + Math.random() + "\0";
43
+ var is = new RegExp(fe, "g");
44
+ var rs = new RegExp(ue, "g");
45
+ var ns = new RegExp(qt, "g");
46
+ var os = new RegExp(de, "g");
47
+ var hs = new RegExp(pe, "g");
48
+ var as = /\\\\/g;
49
+ var ls = /\\{/g;
50
+ var cs = /\\}/g;
51
+ var fs = /\\,/g;
52
+ var us = /\\./g;
53
+ var ds = 1e5;
54
+ function Ht(n7) {
55
+ return isNaN(n7) ? n7.charCodeAt(0) : parseInt(n7, 10);
56
+ }
57
+ function ps(n7) {
58
+ return n7.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs, de).replace(us, pe);
59
+ }
60
+ function ms(n7) {
61
+ return n7.replace(is, "\\").replace(rs, "{").replace(ns, "}").replace(os, ",").replace(hs, ".");
62
+ }
63
+ function me(n7) {
64
+ if (!n7) return [""];
65
+ let t = [], e = Gt("{", "}", n7);
66
+ if (!e) return n7.split(",");
67
+ let { pre: s, body: i, post: r } = e, o = s.split(",");
68
+ o[o.length - 1] += "{" + i + "}";
69
+ let h = me(r);
70
+ return r.length && (o[o.length - 1] += h.shift(), o.push.apply(o, h)), t.push.apply(t, o), t;
71
+ }
72
+ function ge(n7, t = {}) {
73
+ if (!n7) return [];
74
+ let { max: e = ds } = t;
75
+ return n7.slice(0, 2) === "{}" && (n7 = "\\{\\}" + n7.slice(2)), ht(ps(n7), e, true).map(ms);
76
+ }
77
+ function gs(n7) {
78
+ return "{" + n7 + "}";
79
+ }
80
+ function ws(n7) {
81
+ return /^-?0\d/.test(n7);
82
+ }
83
+ function ys(n7, t) {
84
+ return n7 <= t;
85
+ }
86
+ function bs(n7, t) {
87
+ return n7 >= t;
88
+ }
89
+ function ht(n7, t, e) {
90
+ let s = [], i = Gt("{", "}", n7);
91
+ if (!i) return [n7];
92
+ let r = i.pre, o = i.post.length ? ht(i.post, t, false) : [""];
93
+ if (/\$$/.test(i.pre)) for (let h = 0; h < o.length && h < t; h++) {
94
+ let a = r + "{" + i.body + "}" + o[h];
95
+ s.push(a);
96
+ }
97
+ else {
98
+ let h = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), a = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), l = h || a, u = i.body.indexOf(",") >= 0;
99
+ if (!l && !u) return i.post.match(/,(?!,).*\}/) ? (n7 = i.pre + "{" + i.body + qt + i.post, ht(n7, t, true)) : [n7];
100
+ let c;
101
+ if (l) c = i.body.split(/\.\./);
102
+ else if (c = me(i.body), c.length === 1 && c[0] !== void 0 && (c = ht(c[0], t, false).map(gs), c.length === 1)) return o.map((f) => i.pre + c[0] + f);
103
+ let d;
104
+ if (l && c[0] !== void 0 && c[1] !== void 0) {
105
+ let f = Ht(c[0]), m = Ht(c[1]), p = Math.max(c[0].length, c[1].length), w = c.length === 3 && c[2] !== void 0 ? Math.abs(Ht(c[2])) : 1, g = ys;
106
+ m < f && (w *= -1, g = bs);
107
+ let E = c.some(ws);
108
+ d = [];
109
+ for (let y = f; g(y, m); y += w) {
110
+ let b;
111
+ if (a) b = String.fromCharCode(y), b === "\\" && (b = "");
112
+ else if (b = String(y), E) {
113
+ let z = p - b.length;
114
+ if (z > 0) {
115
+ let $ = new Array(z + 1).join("0");
116
+ y < 0 ? b = "-" + $ + b.slice(1) : b = $ + b;
117
+ }
118
+ }
119
+ d.push(b);
120
+ }
121
+ } else {
122
+ d = [];
123
+ for (let f = 0; f < c.length; f++) d.push.apply(d, ht(c[f], t, false));
124
+ }
125
+ for (let f = 0; f < d.length; f++) for (let m = 0; m < o.length && s.length < t; m++) {
126
+ let p = r + d[f] + o[m];
127
+ (!e || l || p) && s.push(p);
128
+ }
129
+ }
130
+ return s;
131
+ }
132
+ var at = (n7) => {
133
+ if (typeof n7 != "string") throw new TypeError("invalid pattern");
134
+ if (n7.length > 65536) throw new TypeError("pattern is too long");
135
+ };
136
+ var Ss = { "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true], "[:alpha:]": ["\\p{L}\\p{Nl}", true], "[:ascii:]": ["\\x00-\\x7f", false], "[:blank:]": ["\\p{Zs}\\t", true], "[:cntrl:]": ["\\p{Cc}", true], "[:digit:]": ["\\p{Nd}", true], "[:graph:]": ["\\p{Z}\\p{C}", true, true], "[:lower:]": ["\\p{Ll}", true], "[:print:]": ["\\p{C}", true], "[:punct:]": ["\\p{P}", true], "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true], "[:upper:]": ["\\p{Lu}", true], "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true], "[:xdigit:]": ["A-Fa-f0-9", false] };
137
+ var lt = (n7) => n7.replace(/[[\]\\-]/g, "\\$&");
138
+ var Es = (n7) => n7.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
139
+ var we = (n7) => n7.join("");
140
+ var ye = (n7, t) => {
141
+ let e = t;
142
+ if (n7.charAt(e) !== "[") throw new Error("not in a brace expression");
143
+ let s = [], i = [], r = e + 1, o = false, h = false, a = false, l = false, u = e, c = "";
144
+ t: for (; r < n7.length; ) {
145
+ let p = n7.charAt(r);
146
+ if ((p === "!" || p === "^") && r === e + 1) {
147
+ l = true, r++;
148
+ continue;
149
+ }
150
+ if (p === "]" && o && !a) {
151
+ u = r + 1;
152
+ break;
153
+ }
154
+ if (o = true, p === "\\" && !a) {
155
+ a = true, r++;
156
+ continue;
157
+ }
158
+ if (p === "[" && !a) {
159
+ for (let [w, [g, S, E]] of Object.entries(Ss)) if (n7.startsWith(w, r)) {
160
+ if (c) return ["$.", false, n7.length - e, true];
161
+ r += w.length, E ? i.push(g) : s.push(g), h = h || S;
162
+ continue t;
163
+ }
164
+ }
165
+ if (a = false, c) {
166
+ p > c ? s.push(lt(c) + "-" + lt(p)) : p === c && s.push(lt(p)), c = "", r++;
167
+ continue;
168
+ }
169
+ if (n7.startsWith("-]", r + 1)) {
170
+ s.push(lt(p + "-")), r += 2;
171
+ continue;
172
+ }
173
+ if (n7.startsWith("-", r + 1)) {
174
+ c = p, r += 2;
175
+ continue;
176
+ }
177
+ s.push(lt(p)), r++;
178
+ }
179
+ if (u < r) return ["", false, 0, false];
180
+ if (!s.length && !i.length) return ["$.", false, n7.length - e, true];
181
+ if (i.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !l) {
182
+ let p = s[0].length === 2 ? s[0].slice(-1) : s[0];
183
+ return [Es(p), false, u - e, false];
184
+ }
185
+ let d = "[" + (l ? "^" : "") + we(s) + "]", f = "[" + (l ? "" : "^") + we(i) + "]";
186
+ return [s.length && i.length ? "(" + d + "|" + f + ")" : s.length ? d : f, h, u - e, true];
187
+ };
188
+ var W = (n7, { windowsPathsNoEscape: t = false, magicalBraces: e = true } = {}) => e ? t ? n7.replace(/\[([^\/\\])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t ? n7.replace(/\[([^\/\\{}])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
189
+ var xs = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
190
+ var be = (n7) => xs.has(n7);
191
+ var vs = "(?!(?:^|/)\\.\\.?(?:$|/))";
192
+ var Ct = "(?!\\.)";
193
+ var Cs = /* @__PURE__ */ new Set(["[", "."]);
194
+ var Ts = /* @__PURE__ */ new Set(["..", "."]);
195
+ var As = new Set("().*{}+?[]^$\\!");
196
+ var ks = (n7) => n7.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
197
+ var Kt = "[^/]";
198
+ var Se = Kt + "*?";
199
+ var Ee = Kt + "+?";
200
+ var Q = class n {
201
+ type;
202
+ #t;
203
+ #s;
204
+ #n = false;
205
+ #r = [];
206
+ #o;
207
+ #S;
208
+ #w;
209
+ #c = false;
210
+ #h;
211
+ #u;
212
+ #f = false;
213
+ constructor(t, e, s = {}) {
214
+ this.type = t, t && (this.#s = true), this.#o = e, this.#t = this.#o ? this.#o.#t : this, this.#h = this.#t === this ? s : this.#t.#h, this.#w = this.#t === this ? [] : this.#t.#w, t === "!" && !this.#t.#c && this.#w.push(this), this.#S = this.#o ? this.#o.#r.length : 0;
215
+ }
216
+ get hasMagic() {
217
+ if (this.#s !== void 0) return this.#s;
218
+ for (let t of this.#r) if (typeof t != "string" && (t.type || t.hasMagic)) return this.#s = true;
219
+ return this.#s;
220
+ }
221
+ toString() {
222
+ return this.#u !== void 0 ? this.#u : this.type ? this.#u = this.type + "(" + this.#r.map((t) => String(t)).join("|") + ")" : this.#u = this.#r.map((t) => String(t)).join("");
223
+ }
224
+ #a() {
225
+ if (this !== this.#t) throw new Error("should only call on root");
226
+ if (this.#c) return this;
227
+ this.toString(), this.#c = true;
228
+ let t;
229
+ for (; t = this.#w.pop(); ) {
230
+ if (t.type !== "!") continue;
231
+ let e = t, s = e.#o;
232
+ for (; s; ) {
233
+ for (let i = e.#S + 1; !s.type && i < s.#r.length; i++) for (let r of t.#r) {
234
+ if (typeof r == "string") throw new Error("string part in extglob AST??");
235
+ r.copyIn(s.#r[i]);
236
+ }
237
+ e = s, s = e.#o;
238
+ }
239
+ }
240
+ return this;
241
+ }
242
+ push(...t) {
243
+ for (let e of t) if (e !== "") {
244
+ if (typeof e != "string" && !(e instanceof n && e.#o === this)) throw new Error("invalid part: " + e);
245
+ this.#r.push(e);
246
+ }
247
+ }
248
+ toJSON() {
249
+ let t = this.type === null ? this.#r.slice().map((e) => typeof e == "string" ? e : e.toJSON()) : [this.type, ...this.#r.map((e) => e.toJSON())];
250
+ return this.isStart() && !this.type && t.unshift([]), this.isEnd() && (this === this.#t || this.#t.#c && this.#o?.type === "!") && t.push({}), t;
251
+ }
252
+ isStart() {
253
+ if (this.#t === this) return true;
254
+ if (!this.#o?.isStart()) return false;
255
+ if (this.#S === 0) return true;
256
+ let t = this.#o;
257
+ for (let e = 0; e < this.#S; e++) {
258
+ let s = t.#r[e];
259
+ if (!(s instanceof n && s.type === "!")) return false;
260
+ }
261
+ return true;
262
+ }
263
+ isEnd() {
264
+ if (this.#t === this || this.#o?.type === "!") return true;
265
+ if (!this.#o?.isEnd()) return false;
266
+ if (!this.type) return this.#o?.isEnd();
267
+ let t = this.#o ? this.#o.#r.length : 0;
268
+ return this.#S === t - 1;
269
+ }
270
+ copyIn(t) {
271
+ typeof t == "string" ? this.push(t) : this.push(t.clone(this));
272
+ }
273
+ clone(t) {
274
+ let e = new n(this.type, t);
275
+ for (let s of this.#r) e.copyIn(s);
276
+ return e;
277
+ }
278
+ static #i(t, e, s, i) {
279
+ let r = false, o = false, h = -1, a = false;
280
+ if (e.type === null) {
281
+ let f = s, m = "";
282
+ for (; f < t.length; ) {
283
+ let p = t.charAt(f++);
284
+ if (r || p === "\\") {
285
+ r = !r, m += p;
286
+ continue;
287
+ }
288
+ if (o) {
289
+ f === h + 1 ? (p === "^" || p === "!") && (a = true) : p === "]" && !(f === h + 2 && a) && (o = false), m += p;
290
+ continue;
291
+ } else if (p === "[") {
292
+ o = true, h = f, a = false, m += p;
293
+ continue;
294
+ }
295
+ if (!i.noext && be(p) && t.charAt(f) === "(") {
296
+ e.push(m), m = "";
297
+ let w = new n(p, e);
298
+ f = n.#i(t, w, f, i), e.push(w);
299
+ continue;
300
+ }
301
+ m += p;
302
+ }
303
+ return e.push(m), f;
304
+ }
305
+ let l = s + 1, u = new n(null, e), c = [], d = "";
306
+ for (; l < t.length; ) {
307
+ let f = t.charAt(l++);
308
+ if (r || f === "\\") {
309
+ r = !r, d += f;
310
+ continue;
311
+ }
312
+ if (o) {
313
+ l === h + 1 ? (f === "^" || f === "!") && (a = true) : f === "]" && !(l === h + 2 && a) && (o = false), d += f;
314
+ continue;
315
+ } else if (f === "[") {
316
+ o = true, h = l, a = false, d += f;
317
+ continue;
318
+ }
319
+ if (be(f) && t.charAt(l) === "(") {
320
+ u.push(d), d = "";
321
+ let m = new n(f, u);
322
+ u.push(m), l = n.#i(t, m, l, i);
323
+ continue;
324
+ }
325
+ if (f === "|") {
326
+ u.push(d), d = "", c.push(u), u = new n(null, e);
327
+ continue;
328
+ }
329
+ if (f === ")") return d === "" && e.#r.length === 0 && (e.#f = true), u.push(d), d = "", e.push(...c, u), l;
330
+ d += f;
331
+ }
332
+ return e.type = null, e.#s = void 0, e.#r = [t.substring(s - 1)], l;
333
+ }
334
+ static fromGlob(t, e = {}) {
335
+ let s = new n(null, void 0, e);
336
+ return n.#i(t, s, 0, e), s;
337
+ }
338
+ toMMPattern() {
339
+ if (this !== this.#t) return this.#t.toMMPattern();
340
+ let t = this.toString(), [e, s, i, r] = this.toRegExpSource();
341
+ if (!(i || this.#s || this.#h.nocase && !this.#h.nocaseMagicOnly && t.toUpperCase() !== t.toLowerCase())) return s;
342
+ let h = (this.#h.nocase ? "i" : "") + (r ? "u" : "");
343
+ return Object.assign(new RegExp(`^${e}$`, h), { _src: e, _glob: t });
344
+ }
345
+ get options() {
346
+ return this.#h;
347
+ }
348
+ toRegExpSource(t) {
349
+ let e = t ?? !!this.#h.dot;
350
+ if (this.#t === this && this.#a(), !this.type) {
351
+ let a = this.isStart() && this.isEnd() && !this.#r.some((f) => typeof f != "string"), l = this.#r.map((f) => {
352
+ let [m, p, w, g] = typeof f == "string" ? n.#E(f, this.#s, a) : f.toRegExpSource(t);
353
+ return this.#s = this.#s || w, this.#n = this.#n || g, m;
354
+ }).join(""), u = "";
355
+ if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && Ts.has(this.#r[0]))) {
356
+ let m = Cs, p = e && m.has(l.charAt(0)) || l.startsWith("\\.") && m.has(l.charAt(2)) || l.startsWith("\\.\\.") && m.has(l.charAt(4)), w = !e && !t && m.has(l.charAt(0));
357
+ u = p ? vs : w ? Ct : "";
358
+ }
359
+ let c = "";
360
+ return this.isEnd() && this.#t.#c && this.#o?.type === "!" && (c = "(?:$|\\/)"), [u + l + c, W(l), this.#s = !!this.#s, this.#n];
361
+ }
362
+ let s = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:", r = this.#d(e);
363
+ if (this.isStart() && this.isEnd() && !r && this.type !== "!") {
364
+ let a = this.toString();
365
+ return this.#r = [a], this.type = null, this.#s = void 0, [a, W(this.toString()), false, false];
366
+ }
367
+ let o = !s || t || e || !Ct ? "" : this.#d(true);
368
+ o === r && (o = ""), o && (r = `(?:${r})(?:${o})*?`);
369
+ let h = "";
370
+ if (this.type === "!" && this.#f) h = (this.isStart() && !e ? Ct : "") + Ee;
371
+ else {
372
+ let a = this.type === "!" ? "))" + (this.isStart() && !e && !t ? Ct : "") + Se + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`;
373
+ h = i + r + a;
374
+ }
375
+ return [h, W(r), this.#s = !!this.#s, this.#n];
376
+ }
377
+ #d(t) {
378
+ return this.#r.map((e) => {
379
+ if (typeof e == "string") throw new Error("string type in extglob ast??");
380
+ let [s, i, r, o] = e.toRegExpSource(t);
381
+ return this.#n = this.#n || o, s;
382
+ }).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
383
+ }
384
+ static #E(t, e, s = false) {
385
+ let i = false, r = "", o = false, h = false;
386
+ for (let a = 0; a < t.length; a++) {
387
+ let l = t.charAt(a);
388
+ if (i) {
389
+ i = false, r += (As.has(l) ? "\\" : "") + l;
390
+ continue;
391
+ }
392
+ if (l === "*") {
393
+ if (h) continue;
394
+ h = true, r += s && /^[*]+$/.test(t) ? Ee : Se, e = true;
395
+ continue;
396
+ } else h = false;
397
+ if (l === "\\") {
398
+ a === t.length - 1 ? r += "\\\\" : i = true;
399
+ continue;
400
+ }
401
+ if (l === "[") {
402
+ let [u, c, d, f] = ye(t, a);
403
+ if (d) {
404
+ r += u, o = o || c, a += d - 1, e = e || f;
405
+ continue;
406
+ }
407
+ }
408
+ if (l === "?") {
409
+ r += Kt, e = true;
410
+ continue;
411
+ }
412
+ r += ks(l);
413
+ }
414
+ return [r, W(t), !!e, o];
415
+ }
416
+ };
417
+ var tt = (n7, { windowsPathsNoEscape: t = false, magicalBraces: e = false } = {}) => e ? t ? n7.replace(/[?*()[\]{}]/g, "[$&]") : n7.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n7.replace(/[?*()[\]]/g, "[$&]") : n7.replace(/[?*()[\]\\]/g, "\\$&");
418
+ var O = (n7, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? false : new D(t, e).match(n7));
419
+ var Rs = /^\*+([^+@!?\*\[\(]*)$/;
420
+ var Os = (n7) => (t) => !t.startsWith(".") && t.endsWith(n7);
421
+ var Fs = (n7) => (t) => t.endsWith(n7);
422
+ var Ds = (n7) => (n7 = n7.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n7));
423
+ var Ms = (n7) => (n7 = n7.toLowerCase(), (t) => t.toLowerCase().endsWith(n7));
424
+ var Ns = /^\*+\.\*+$/;
425
+ var _s = (n7) => !n7.startsWith(".") && n7.includes(".");
426
+ var Ls = (n7) => n7 !== "." && n7 !== ".." && n7.includes(".");
427
+ var Ws = /^\.\*+$/;
428
+ var Ps = (n7) => n7 !== "." && n7 !== ".." && n7.startsWith(".");
429
+ var js = /^\*+$/;
430
+ var Is = (n7) => n7.length !== 0 && !n7.startsWith(".");
431
+ var zs = (n7) => n7.length !== 0 && n7 !== "." && n7 !== "..";
432
+ var Bs = /^\?+([^+@!?\*\[\(]*)?$/;
433
+ var Us = ([n7, t = ""]) => {
434
+ let e = Ce([n7]);
435
+ return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
436
+ };
437
+ var $s = ([n7, t = ""]) => {
438
+ let e = Te([n7]);
439
+ return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
440
+ };
441
+ var Gs = ([n7, t = ""]) => {
442
+ let e = Te([n7]);
443
+ return t ? (s) => e(s) && s.endsWith(t) : e;
444
+ };
445
+ var Hs = ([n7, t = ""]) => {
446
+ let e = Ce([n7]);
447
+ return t ? (s) => e(s) && s.endsWith(t) : e;
448
+ };
449
+ var Ce = ([n7]) => {
450
+ let t = n7.length;
451
+ return (e) => e.length === t && !e.startsWith(".");
452
+ };
453
+ var Te = ([n7]) => {
454
+ let t = n7.length;
455
+ return (e) => e.length === t && e !== "." && e !== "..";
456
+ };
457
+ var Ae = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
458
+ var xe = { win32: { sep: "\\" }, posix: { sep: "/" } };
459
+ var qs = Ae === "win32" ? xe.win32.sep : xe.posix.sep;
460
+ O.sep = qs;
461
+ var A = /* @__PURE__ */ Symbol("globstar **");
462
+ O.GLOBSTAR = A;
463
+ var Ks = "[^/]";
464
+ var Vs = Ks + "*?";
465
+ var Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
466
+ var Xs = "(?:(?!(?:\\/|^)\\.).)*?";
467
+ var Js = (n7, t = {}) => (e) => O(e, n7, t);
468
+ O.filter = Js;
469
+ var N = (n7, t = {}) => Object.assign({}, n7, t);
470
+ var Zs = (n7) => {
471
+ if (!n7 || typeof n7 != "object" || !Object.keys(n7).length) return O;
472
+ let t = O;
473
+ return Object.assign((s, i, r = {}) => t(s, i, N(n7, r)), { Minimatch: class extends t.Minimatch {
474
+ constructor(i, r = {}) {
475
+ super(i, N(n7, r));
476
+ }
477
+ static defaults(i) {
478
+ return t.defaults(N(n7, i)).Minimatch;
479
+ }
480
+ }, AST: class extends t.AST {
481
+ constructor(i, r, o = {}) {
482
+ super(i, r, N(n7, o));
483
+ }
484
+ static fromGlob(i, r = {}) {
485
+ return t.AST.fromGlob(i, N(n7, r));
486
+ }
487
+ }, unescape: (s, i = {}) => t.unescape(s, N(n7, i)), escape: (s, i = {}) => t.escape(s, N(n7, i)), filter: (s, i = {}) => t.filter(s, N(n7, i)), defaults: (s) => t.defaults(N(n7, s)), makeRe: (s, i = {}) => t.makeRe(s, N(n7, i)), braceExpand: (s, i = {}) => t.braceExpand(s, N(n7, i)), match: (s, i, r = {}) => t.match(s, i, N(n7, r)), sep: t.sep, GLOBSTAR: A });
488
+ };
489
+ O.defaults = Zs;
490
+ var ke = (n7, t = {}) => (at(n7), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n7) ? [n7] : ge(n7, { max: t.braceExpandMax }));
491
+ O.braceExpand = ke;
492
+ var Qs = (n7, t = {}) => new D(n7, t).makeRe();
493
+ O.makeRe = Qs;
494
+ var ti = (n7, t, e = {}) => {
495
+ let s = new D(t, e);
496
+ return n7 = n7.filter((i) => s.match(i)), s.options.nonull && !n7.length && n7.push(t), n7;
497
+ };
498
+ O.match = ti;
499
+ var ve = /[?*]|[+@!]\(.*?\)|\[|\]/;
500
+ var ei = (n7) => n7.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
501
+ var D = class {
502
+ options;
503
+ set;
504
+ pattern;
505
+ windowsPathsNoEscape;
506
+ nonegate;
507
+ negate;
508
+ comment;
509
+ empty;
510
+ preserveMultipleSlashes;
511
+ partial;
512
+ globSet;
513
+ globParts;
514
+ nocase;
515
+ isWindows;
516
+ platform;
517
+ windowsNoMagicRoot;
518
+ regexp;
519
+ constructor(t, e = {}) {
520
+ at(t), e = e || {}, this.options = e, this.pattern = t, this.platform = e.platform || Ae, this.isWindows = this.platform === "win32";
521
+ let s = "allowWindowsEscape";
522
+ this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e[s] === false, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e.preserveMultipleSlashes, this.regexp = null, this.negate = false, this.nonegate = !!e.nonegate, this.comment = false, this.empty = false, this.partial = !!e.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e.windowsNoMagicRoot !== void 0 ? e.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
523
+ }
524
+ hasMagic() {
525
+ if (this.options.magicalBraces && this.set.length > 1) return true;
526
+ for (let t of this.set) for (let e of t) if (typeof e != "string") return true;
527
+ return false;
528
+ }
529
+ debug(...t) {
530
+ }
531
+ make() {
532
+ let t = this.pattern, e = this.options;
533
+ if (!e.nocomment && t.charAt(0) === "#") {
534
+ this.comment = true;
535
+ return;
536
+ }
537
+ if (!t) {
538
+ this.empty = true;
539
+ return;
540
+ }
541
+ this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], e.debug && (this.debug = (...r) => console.error(...r)), this.debug(this.pattern, this.globSet);
542
+ let s = this.globSet.map((r) => this.slashSplit(r));
543
+ this.globParts = this.preprocess(s), this.debug(this.pattern, this.globParts);
544
+ let i = this.globParts.map((r, o, h) => {
545
+ if (this.isWindows && this.windowsNoMagicRoot) {
546
+ let a = r[0] === "" && r[1] === "" && (r[2] === "?" || !ve.test(r[2])) && !ve.test(r[3]), l = /^[a-z]:/i.test(r[0]);
547
+ if (a) return [...r.slice(0, 4), ...r.slice(4).map((u) => this.parse(u))];
548
+ if (l) return [r[0], ...r.slice(1).map((u) => this.parse(u))];
549
+ }
550
+ return r.map((a) => this.parse(a));
551
+ });
552
+ if (this.debug(this.pattern, i), this.set = i.filter((r) => r.indexOf(false) === -1), this.isWindows) for (let r = 0; r < this.set.length; r++) {
553
+ let o = this.set[r];
554
+ o[0] === "" && o[1] === "" && this.globParts[r][2] === "?" && typeof o[3] == "string" && /^[a-z]:$/i.test(o[3]) && (o[2] = "?");
555
+ }
556
+ this.debug(this.pattern, this.set);
557
+ }
558
+ preprocess(t) {
559
+ if (this.options.noglobstar) for (let s = 0; s < t.length; s++) for (let i = 0; i < t[s].length; i++) t[s][i] === "**" && (t[s][i] = "*");
560
+ let { optimizationLevel: e = 1 } = this.options;
561
+ return e >= 2 ? (t = this.firstPhasePreProcess(t), t = this.secondPhasePreProcess(t)) : e >= 1 ? t = this.levelOneOptimize(t) : t = this.adjascentGlobstarOptimize(t), t;
562
+ }
563
+ adjascentGlobstarOptimize(t) {
564
+ return t.map((e) => {
565
+ let s = -1;
566
+ for (; (s = e.indexOf("**", s + 1)) !== -1; ) {
567
+ let i = s;
568
+ for (; e[i + 1] === "**"; ) i++;
569
+ i !== s && e.splice(s, i - s);
570
+ }
571
+ return e;
572
+ });
573
+ }
574
+ levelOneOptimize(t) {
575
+ return t.map((e) => (e = e.reduce((s, i) => {
576
+ let r = s[s.length - 1];
577
+ return i === "**" && r === "**" ? s : i === ".." && r && r !== ".." && r !== "." && r !== "**" ? (s.pop(), s) : (s.push(i), s);
578
+ }, []), e.length === 0 ? [""] : e));
579
+ }
580
+ levelTwoFileOptimize(t) {
581
+ Array.isArray(t) || (t = this.slashSplit(t));
582
+ let e = false;
583
+ do {
584
+ if (e = false, !this.preserveMultipleSlashes) {
585
+ for (let i = 1; i < t.length - 1; i++) {
586
+ let r = t[i];
587
+ i === 1 && r === "" && t[0] === "" || (r === "." || r === "") && (e = true, t.splice(i, 1), i--);
588
+ }
589
+ t[0] === "." && t.length === 2 && (t[1] === "." || t[1] === "") && (e = true, t.pop());
590
+ }
591
+ let s = 0;
592
+ for (; (s = t.indexOf("..", s + 1)) !== -1; ) {
593
+ let i = t[s - 1];
594
+ i && i !== "." && i !== ".." && i !== "**" && (e = true, t.splice(s - 1, 2), s -= 2);
595
+ }
596
+ } while (e);
597
+ return t.length === 0 ? [""] : t;
598
+ }
599
+ firstPhasePreProcess(t) {
600
+ let e = false;
601
+ do {
602
+ e = false;
603
+ for (let s of t) {
604
+ let i = -1;
605
+ for (; (i = s.indexOf("**", i + 1)) !== -1; ) {
606
+ let o = i;
607
+ for (; s[o + 1] === "**"; ) o++;
608
+ o > i && s.splice(i + 1, o - i);
609
+ let h = s[i + 1], a = s[i + 2], l = s[i + 3];
610
+ if (h !== ".." || !a || a === "." || a === ".." || !l || l === "." || l === "..") continue;
611
+ e = true, s.splice(i, 1);
612
+ let u = s.slice(0);
613
+ u[i] = "**", t.push(u), i--;
614
+ }
615
+ if (!this.preserveMultipleSlashes) {
616
+ for (let o = 1; o < s.length - 1; o++) {
617
+ let h = s[o];
618
+ o === 1 && h === "" && s[0] === "" || (h === "." || h === "") && (e = true, s.splice(o, 1), o--);
619
+ }
620
+ s[0] === "." && s.length === 2 && (s[1] === "." || s[1] === "") && (e = true, s.pop());
621
+ }
622
+ let r = 0;
623
+ for (; (r = s.indexOf("..", r + 1)) !== -1; ) {
624
+ let o = s[r - 1];
625
+ if (o && o !== "." && o !== ".." && o !== "**") {
626
+ e = true;
627
+ let a = r === 1 && s[r + 1] === "**" ? ["."] : [];
628
+ s.splice(r - 1, 2, ...a), s.length === 0 && s.push(""), r -= 2;
629
+ }
630
+ }
631
+ }
632
+ } while (e);
633
+ return t;
634
+ }
635
+ secondPhasePreProcess(t) {
636
+ for (let e = 0; e < t.length - 1; e++) for (let s = e + 1; s < t.length; s++) {
637
+ let i = this.partsMatch(t[e], t[s], !this.preserveMultipleSlashes);
638
+ if (i) {
639
+ t[e] = [], t[s] = i;
640
+ break;
641
+ }
642
+ }
643
+ return t.filter((e) => e.length);
644
+ }
645
+ partsMatch(t, e, s = false) {
646
+ let i = 0, r = 0, o = [], h = "";
647
+ for (; i < t.length && r < e.length; ) if (t[i] === e[r]) o.push(h === "b" ? e[r] : t[i]), i++, r++;
648
+ else if (s && t[i] === "**" && e[r] === t[i + 1]) o.push(t[i]), i++;
649
+ else if (s && e[r] === "**" && t[i] === e[r + 1]) o.push(e[r]), r++;
650
+ else if (t[i] === "*" && e[r] && (this.options.dot || !e[r].startsWith(".")) && e[r] !== "**") {
651
+ if (h === "b") return false;
652
+ h = "a", o.push(t[i]), i++, r++;
653
+ } else if (e[r] === "*" && t[i] && (this.options.dot || !t[i].startsWith(".")) && t[i] !== "**") {
654
+ if (h === "a") return false;
655
+ h = "b", o.push(e[r]), i++, r++;
656
+ } else return false;
657
+ return t.length === e.length && o;
658
+ }
659
+ parseNegate() {
660
+ if (this.nonegate) return;
661
+ let t = this.pattern, e = false, s = 0;
662
+ for (let i = 0; i < t.length && t.charAt(i) === "!"; i++) e = !e, s++;
663
+ s && (this.pattern = t.slice(s)), this.negate = e;
664
+ }
665
+ matchOne(t, e, s = false) {
666
+ let i = this.options;
667
+ if (this.isWindows) {
668
+ let p = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), w = !p && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), g = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), S = !g && e[0] === "" && e[1] === "" && e[2] === "?" && typeof e[3] == "string" && /^[a-z]:$/i.test(e[3]), E = w ? 3 : p ? 0 : void 0, y = S ? 3 : g ? 0 : void 0;
669
+ if (typeof E == "number" && typeof y == "number") {
670
+ let [b, z] = [t[E], e[y]];
671
+ b.toLowerCase() === z.toLowerCase() && (e[y] = b, y > E ? e = e.slice(y) : E > y && (t = t.slice(E)));
672
+ }
673
+ }
674
+ let { optimizationLevel: r = 1 } = this.options;
675
+ r >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, { file: t, pattern: e }), this.debug("matchOne", t.length, e.length);
676
+ for (var o = 0, h = 0, a = t.length, l = e.length; o < a && h < l; o++, h++) {
677
+ this.debug("matchOne loop");
678
+ var u = e[h], c = t[o];
679
+ if (this.debug(e, u, c), u === false) return false;
680
+ if (u === A) {
681
+ this.debug("GLOBSTAR", [e, u, c]);
682
+ var d = o, f = h + 1;
683
+ if (f === l) {
684
+ for (this.debug("** at the end"); o < a; o++) if (t[o] === "." || t[o] === ".." || !i.dot && t[o].charAt(0) === ".") return false;
685
+ return true;
686
+ }
687
+ for (; d < a; ) {
688
+ var m = t[d];
689
+ if (this.debug(`
690
+ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) return this.debug("globstar found match!", d, a, m), true;
691
+ if (m === "." || m === ".." || !i.dot && m.charAt(0) === ".") {
692
+ this.debug("dot detected!", t, d, e, f);
693
+ break;
694
+ }
695
+ this.debug("globstar swallow a segment, and continue"), d++;
696
+ }
697
+ return !!(s && (this.debug(`
698
+ >>> no match, partial?`, t, d, e, f), d === a));
699
+ }
700
+ let p;
701
+ if (typeof u == "string" ? (p = c === u, this.debug("string match", u, c, p)) : (p = u.test(c), this.debug("pattern match", u, c, p)), !p) return false;
702
+ }
703
+ if (o === a && h === l) return true;
704
+ if (o === a) return s;
705
+ if (h === l) return o === a - 1 && t[o] === "";
706
+ throw new Error("wtf?");
707
+ }
708
+ braceExpand() {
709
+ return ke(this.pattern, this.options);
710
+ }
711
+ parse(t) {
712
+ at(t);
713
+ let e = this.options;
714
+ if (t === "**") return A;
715
+ if (t === "") return "";
716
+ let s, i = null;
717
+ (s = t.match(js)) ? i = e.dot ? zs : Is : (s = t.match(Rs)) ? i = (e.nocase ? e.dot ? Ms : Ds : e.dot ? Fs : Os)(s[1]) : (s = t.match(Bs)) ? i = (e.nocase ? e.dot ? $s : Us : e.dot ? Gs : Hs)(s) : (s = t.match(Ns)) ? i = e.dot ? Ls : _s : (s = t.match(Ws)) && (i = Ps);
718
+ let r = Q.fromGlob(t, this.options).toMMPattern();
719
+ return i && typeof r == "object" && Reflect.defineProperty(r, "test", { value: i }), r;
720
+ }
721
+ makeRe() {
722
+ if (this.regexp || this.regexp === false) return this.regexp;
723
+ let t = this.set;
724
+ if (!t.length) return this.regexp = false, this.regexp;
725
+ let e = this.options, s = e.noglobstar ? Vs : e.dot ? Ys : Xs, i = new Set(e.nocase ? ["i"] : []), r = t.map((a) => {
726
+ let l = a.map((c) => {
727
+ if (c instanceof RegExp) for (let d of c.flags.split("")) i.add(d);
728
+ return typeof c == "string" ? ei(c) : c === A ? A : c._src;
729
+ });
730
+ l.forEach((c, d) => {
731
+ let f = l[d + 1], m = l[d - 1];
732
+ c !== A || m === A || (m === void 0 ? f !== void 0 && f !== A ? l[d + 1] = "(?:\\/|" + s + "\\/)?" + f : l[d] = s : f === void 0 ? l[d - 1] = m + "(?:\\/|\\/" + s + ")?" : f !== A && (l[d - 1] = m + "(?:\\/|\\/" + s + "\\/)" + f, l[d + 1] = A));
733
+ });
734
+ let u = l.filter((c) => c !== A);
735
+ if (this.partial && u.length >= 1) {
736
+ let c = [];
737
+ for (let d = 1; d <= u.length; d++) c.push(u.slice(0, d).join("/"));
738
+ return "(?:" + c.join("|") + ")";
739
+ }
740
+ return u.join("/");
741
+ }).join("|"), [o, h] = t.length > 1 ? ["(?:", ")"] : ["", ""];
742
+ r = "^" + o + r + h + "$", this.partial && (r = "^(?:\\/|" + o + r.slice(1, -1) + h + ")$"), this.negate && (r = "^(?!" + r + ").+$");
743
+ try {
744
+ this.regexp = new RegExp(r, [...i].join(""));
745
+ } catch {
746
+ this.regexp = false;
747
+ }
748
+ return this.regexp;
749
+ }
750
+ slashSplit(t) {
751
+ return this.preserveMultipleSlashes ? t.split("/") : this.isWindows && /^\/\/[^\/]+/.test(t) ? ["", ...t.split(/\/+/)] : t.split(/\/+/);
752
+ }
753
+ match(t, e = this.partial) {
754
+ if (this.debug("match", t, this.pattern), this.comment) return false;
755
+ if (this.empty) return t === "";
756
+ if (t === "/" && e) return true;
757
+ let s = this.options;
758
+ this.isWindows && (t = t.split("\\").join("/"));
759
+ let i = this.slashSplit(t);
760
+ this.debug(this.pattern, "split", i);
761
+ let r = this.set;
762
+ this.debug(this.pattern, "set", r);
763
+ let o = i[i.length - 1];
764
+ if (!o) for (let h = i.length - 2; !o && h >= 0; h--) o = i[h];
765
+ for (let h = 0; h < r.length; h++) {
766
+ let a = r[h], l = i;
767
+ if (s.matchBase && a.length === 1 && (l = [o]), this.matchOne(l, a, e)) return s.flipNegate ? true : !this.negate;
768
+ }
769
+ return s.flipNegate ? false : this.negate;
770
+ }
771
+ static defaults(t) {
772
+ return O.defaults(t).Minimatch;
773
+ }
774
+ };
775
+ O.AST = Q;
776
+ O.Minimatch = D;
777
+ O.escape = tt;
778
+ O.unescape = W;
779
+ var si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
780
+ var Oe = /* @__PURE__ */ new Set();
781
+ var Vt = typeof process == "object" && process ? process : {};
782
+ var Fe = (n7, t, e, s) => {
783
+ typeof Vt.emitWarning == "function" ? Vt.emitWarning(n7, t, e, s) : console.error(`[${e}] ${t}: ${n7}`);
784
+ };
785
+ var At = globalThis.AbortController;
786
+ var Re = globalThis.AbortSignal;
787
+ if (typeof At > "u") {
788
+ Re = class {
789
+ onabort;
790
+ _onabort = [];
791
+ reason;
792
+ aborted = false;
793
+ addEventListener(e, s) {
794
+ this._onabort.push(s);
795
+ }
796
+ }, At = class {
797
+ constructor() {
798
+ t();
799
+ }
800
+ signal = new Re();
801
+ abort(e) {
802
+ if (!this.signal.aborted) {
803
+ this.signal.reason = e, this.signal.aborted = true;
804
+ for (let s of this.signal._onabort) s(e);
805
+ this.signal.onabort?.(e);
806
+ }
807
+ }
808
+ };
809
+ let n7 = Vt.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
810
+ n7 && (n7 = false, Fe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
811
+ };
812
+ }
813
+ var ii = (n7) => !Oe.has(n7);
814
+ var q = (n7) => n7 && n7 === Math.floor(n7) && n7 > 0 && isFinite(n7);
815
+ var De = (n7) => q(n7) ? n7 <= Math.pow(2, 8) ? Uint8Array : n7 <= Math.pow(2, 16) ? Uint16Array : n7 <= Math.pow(2, 32) ? Uint32Array : n7 <= Number.MAX_SAFE_INTEGER ? Tt : null : null;
816
+ var Tt = class extends Array {
817
+ constructor(n7) {
818
+ super(n7), this.fill(0);
819
+ }
820
+ };
821
+ var ri = class ct {
822
+ heap;
823
+ length;
824
+ static #t = false;
825
+ static create(t) {
826
+ let e = De(t);
827
+ if (!e) return [];
828
+ ct.#t = true;
829
+ let s = new ct(t, e);
830
+ return ct.#t = false, s;
831
+ }
832
+ constructor(t, e) {
833
+ if (!ct.#t) throw new TypeError("instantiate Stack using Stack.create(n)");
834
+ this.heap = new e(t), this.length = 0;
835
+ }
836
+ push(t) {
837
+ this.heap[this.length++] = t;
838
+ }
839
+ pop() {
840
+ return this.heap[--this.length];
841
+ }
842
+ };
843
+ var ft = class Me {
844
+ #t;
845
+ #s;
846
+ #n;
847
+ #r;
848
+ #o;
849
+ #S;
850
+ #w;
851
+ #c;
852
+ get perf() {
853
+ return this.#c;
854
+ }
855
+ ttl;
856
+ ttlResolution;
857
+ ttlAutopurge;
858
+ updateAgeOnGet;
859
+ updateAgeOnHas;
860
+ allowStale;
861
+ noDisposeOnSet;
862
+ noUpdateTTL;
863
+ maxEntrySize;
864
+ sizeCalculation;
865
+ noDeleteOnFetchRejection;
866
+ noDeleteOnStaleGet;
867
+ allowStaleOnFetchAbort;
868
+ allowStaleOnFetchRejection;
869
+ ignoreFetchAbort;
870
+ #h;
871
+ #u;
872
+ #f;
873
+ #a;
874
+ #i;
875
+ #d;
876
+ #E;
877
+ #b;
878
+ #p;
879
+ #R;
880
+ #m;
881
+ #C;
882
+ #T;
883
+ #g;
884
+ #y;
885
+ #x;
886
+ #A;
887
+ #e;
888
+ #_;
889
+ static unsafeExposeInternals(t) {
890
+ return { starts: t.#T, ttls: t.#g, autopurgeTimers: t.#y, sizes: t.#C, keyMap: t.#f, keyList: t.#a, valList: t.#i, next: t.#d, prev: t.#E, get head() {
891
+ return t.#b;
892
+ }, get tail() {
893
+ return t.#p;
894
+ }, free: t.#R, isBackgroundFetch: (e) => t.#l(e), backgroundFetch: (e, s, i, r) => t.#U(e, s, i, r), moveToTail: (e) => t.#W(e), indexes: (e) => t.#F(e), rindexes: (e) => t.#D(e), isStale: (e) => t.#v(e) };
895
+ }
896
+ get max() {
897
+ return this.#t;
898
+ }
899
+ get maxSize() {
900
+ return this.#s;
901
+ }
902
+ get calculatedSize() {
903
+ return this.#u;
904
+ }
905
+ get size() {
906
+ return this.#h;
907
+ }
908
+ get fetchMethod() {
909
+ return this.#S;
910
+ }
911
+ get memoMethod() {
912
+ return this.#w;
913
+ }
914
+ get dispose() {
915
+ return this.#n;
916
+ }
917
+ get onInsert() {
918
+ return this.#r;
919
+ }
920
+ get disposeAfter() {
921
+ return this.#o;
922
+ }
923
+ constructor(t) {
924
+ let { max: e = 0, ttl: s, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: a, dispose: l, onInsert: u, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: f, maxSize: m = 0, maxEntrySize: p = 0, sizeCalculation: w, fetchMethod: g, memoMethod: S, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: y, allowStaleOnFetchRejection: b, allowStaleOnFetchAbort: z, ignoreFetchAbort: $, perf: J } = t;
925
+ if (J !== void 0 && typeof J?.now != "function") throw new TypeError("perf option must have a now() method if specified");
926
+ if (this.#c = J ?? si, e !== 0 && !q(e)) throw new TypeError("max option must be a nonnegative integer");
927
+ let Z = e ? De(e) : Array;
928
+ if (!Z) throw new Error("invalid max value: " + e);
929
+ if (this.#t = e, this.#s = m, this.maxEntrySize = p || this.#s, this.sizeCalculation = w, this.sizeCalculation) {
930
+ if (!this.#s && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
931
+ if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
932
+ }
933
+ if (S !== void 0 && typeof S != "function") throw new TypeError("memoMethod must be a function if defined");
934
+ if (this.#w = S, g !== void 0 && typeof g != "function") throw new TypeError("fetchMethod must be a function if specified");
935
+ if (this.#S = g, this.#A = !!g, this.#f = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new Z(e), this.#E = new Z(e), this.#b = 0, this.#p = 0, this.#R = ri.create(e), this.#h = 0, this.#u = 0, typeof l == "function" && (this.#n = l), typeof u == "function" && (this.#r = u), typeof c == "function" ? (this.#o = c, this.#m = []) : (this.#o = void 0, this.#m = void 0), this.#x = !!this.#n, this.#_ = !!this.#r, this.#e = !!this.#o, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!f, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!b, this.allowStaleOnFetchAbort = !!z, this.ignoreFetchAbort = !!$, this.maxEntrySize !== 0) {
936
+ if (this.#s !== 0 && !q(this.#s)) throw new TypeError("maxSize must be a positive integer if specified");
937
+ if (!q(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
938
+ this.#G();
939
+ }
940
+ if (this.allowStale = !!a, this.noDeleteOnStaleGet = !!y, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!h, this.ttlResolution = q(i) || i === 0 ? i : 1, this.ttlAutopurge = !!r, this.ttl = s || 0, this.ttl) {
941
+ if (!q(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
942
+ this.#M();
943
+ }
944
+ if (this.#t === 0 && this.ttl === 0 && this.#s === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
945
+ if (!this.ttlAutopurge && !this.#t && !this.#s) {
946
+ let $t = "LRU_CACHE_UNBOUNDED";
947
+ ii($t) && (Oe.add($t), Fe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", $t, Me));
948
+ }
949
+ }
950
+ getRemainingTTL(t) {
951
+ return this.#f.has(t) ? 1 / 0 : 0;
952
+ }
953
+ #M() {
954
+ let t = new Tt(this.#t), e = new Tt(this.#t);
955
+ this.#g = t, this.#T = e;
956
+ let s = this.ttlAutopurge ? new Array(this.#t) : void 0;
957
+ this.#y = s, this.#j = (o, h, a = this.#c.now()) => {
958
+ if (e[o] = h !== 0 ? a : 0, t[o] = h, s?.[o] && (clearTimeout(s[o]), s[o] = void 0), h !== 0 && s) {
959
+ let l = setTimeout(() => {
960
+ this.#v(o) && this.#O(this.#a[o], "expire");
961
+ }, h + 1);
962
+ l.unref && l.unref(), s[o] = l;
963
+ }
964
+ }, this.#k = (o) => {
965
+ e[o] = t[o] !== 0 ? this.#c.now() : 0;
966
+ }, this.#N = (o, h) => {
967
+ if (t[h]) {
968
+ let a = t[h], l = e[h];
969
+ if (!a || !l) return;
970
+ o.ttl = a, o.start = l, o.now = i || r();
971
+ let u = o.now - l;
972
+ o.remainingTTL = a - u;
973
+ }
974
+ };
975
+ let i = 0, r = () => {
976
+ let o = this.#c.now();
977
+ if (this.ttlResolution > 0) {
978
+ i = o;
979
+ let h = setTimeout(() => i = 0, this.ttlResolution);
980
+ h.unref && h.unref();
981
+ }
982
+ return o;
983
+ };
984
+ this.getRemainingTTL = (o) => {
985
+ let h = this.#f.get(o);
986
+ if (h === void 0) return 0;
987
+ let a = t[h], l = e[h];
988
+ if (!a || !l) return 1 / 0;
989
+ let u = (i || r()) - l;
990
+ return a - u;
991
+ }, this.#v = (o) => {
992
+ let h = e[o], a = t[o];
993
+ return !!a && !!h && (i || r()) - h > a;
994
+ };
995
+ }
996
+ #k = () => {
997
+ };
998
+ #N = () => {
999
+ };
1000
+ #j = () => {
1001
+ };
1002
+ #v = () => false;
1003
+ #G() {
1004
+ let t = new Tt(this.#t);
1005
+ this.#u = 0, this.#C = t, this.#P = (e) => {
1006
+ this.#u -= t[e], t[e] = 0;
1007
+ }, this.#I = (e, s, i, r) => {
1008
+ if (this.#l(s)) return 0;
1009
+ if (!q(i)) if (r) {
1010
+ if (typeof r != "function") throw new TypeError("sizeCalculation must be a function");
1011
+ if (i = r(s, e), !q(i)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
1012
+ } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
1013
+ return i;
1014
+ }, this.#L = (e, s, i) => {
1015
+ if (t[e] = s, this.#s) {
1016
+ let r = this.#s - t[e];
1017
+ for (; this.#u > r; ) this.#B(true);
1018
+ }
1019
+ this.#u += t[e], i && (i.entrySize = s, i.totalCalculatedSize = this.#u);
1020
+ };
1021
+ }
1022
+ #P = (t) => {
1023
+ };
1024
+ #L = (t, e, s) => {
1025
+ };
1026
+ #I = (t, e, s, i) => {
1027
+ if (s || i) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
1028
+ return 0;
1029
+ };
1030
+ *#F({ allowStale: t = this.allowStale } = {}) {
1031
+ if (this.#h) for (let e = this.#p; !(!this.#z(e) || ((t || !this.#v(e)) && (yield e), e === this.#b)); ) e = this.#E[e];
1032
+ }
1033
+ *#D({ allowStale: t = this.allowStale } = {}) {
1034
+ if (this.#h) for (let e = this.#b; !(!this.#z(e) || ((t || !this.#v(e)) && (yield e), e === this.#p)); ) e = this.#d[e];
1035
+ }
1036
+ #z(t) {
1037
+ return t !== void 0 && this.#f.get(this.#a[t]) === t;
1038
+ }
1039
+ *entries() {
1040
+ for (let t of this.#F()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]);
1041
+ }
1042
+ *rentries() {
1043
+ for (let t of this.#D()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]);
1044
+ }
1045
+ *keys() {
1046
+ for (let t of this.#F()) {
1047
+ let e = this.#a[t];
1048
+ e !== void 0 && !this.#l(this.#i[t]) && (yield e);
1049
+ }
1050
+ }
1051
+ *rkeys() {
1052
+ for (let t of this.#D()) {
1053
+ let e = this.#a[t];
1054
+ e !== void 0 && !this.#l(this.#i[t]) && (yield e);
1055
+ }
1056
+ }
1057
+ *values() {
1058
+ for (let t of this.#F()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
1059
+ }
1060
+ *rvalues() {
1061
+ for (let t of this.#D()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
1062
+ }
1063
+ [Symbol.iterator]() {
1064
+ return this.entries();
1065
+ }
1066
+ [Symbol.toStringTag] = "LRUCache";
1067
+ find(t, e = {}) {
1068
+ for (let s of this.#F()) {
1069
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
1070
+ if (r !== void 0 && t(r, this.#a[s], this)) return this.get(this.#a[s], e);
1071
+ }
1072
+ }
1073
+ forEach(t, e = this) {
1074
+ for (let s of this.#F()) {
1075
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
1076
+ r !== void 0 && t.call(e, r, this.#a[s], this);
1077
+ }
1078
+ }
1079
+ rforEach(t, e = this) {
1080
+ for (let s of this.#D()) {
1081
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
1082
+ r !== void 0 && t.call(e, r, this.#a[s], this);
1083
+ }
1084
+ }
1085
+ purgeStale() {
1086
+ let t = false;
1087
+ for (let e of this.#D({ allowStale: true })) this.#v(e) && (this.#O(this.#a[e], "expire"), t = true);
1088
+ return t;
1089
+ }
1090
+ info(t) {
1091
+ let e = this.#f.get(t);
1092
+ if (e === void 0) return;
1093
+ let s = this.#i[e], i = this.#l(s) ? s.__staleWhileFetching : s;
1094
+ if (i === void 0) return;
1095
+ let r = { value: i };
1096
+ if (this.#g && this.#T) {
1097
+ let o = this.#g[e], h = this.#T[e];
1098
+ if (o && h) {
1099
+ let a = o - (this.#c.now() - h);
1100
+ r.ttl = a, r.start = Date.now();
1101
+ }
1102
+ }
1103
+ return this.#C && (r.size = this.#C[e]), r;
1104
+ }
1105
+ dump() {
1106
+ let t = [];
1107
+ for (let e of this.#F({ allowStale: true })) {
1108
+ let s = this.#a[e], i = this.#i[e], r = this.#l(i) ? i.__staleWhileFetching : i;
1109
+ if (r === void 0 || s === void 0) continue;
1110
+ let o = { value: r };
1111
+ if (this.#g && this.#T) {
1112
+ o.ttl = this.#g[e];
1113
+ let h = this.#c.now() - this.#T[e];
1114
+ o.start = Math.floor(Date.now() - h);
1115
+ }
1116
+ this.#C && (o.size = this.#C[e]), t.unshift([s, o]);
1117
+ }
1118
+ return t;
1119
+ }
1120
+ load(t) {
1121
+ this.clear();
1122
+ for (let [e, s] of t) {
1123
+ if (s.start) {
1124
+ let i = Date.now() - s.start;
1125
+ s.start = this.#c.now() - i;
1126
+ }
1127
+ this.set(e, s.value, s);
1128
+ }
1129
+ }
1130
+ set(t, e, s = {}) {
1131
+ if (e === void 0) return this.delete(t), this;
1132
+ let { ttl: i = this.ttl, start: r, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a } = s, { noUpdateTTL: l = this.noUpdateTTL } = s, u = this.#I(t, e, s.size || 0, h);
1133
+ if (this.maxEntrySize && u > this.maxEntrySize) return a && (a.set = "miss", a.maxEntrySizeExceeded = true), this.#O(t, "set"), this;
1134
+ let c = this.#h === 0 ? void 0 : this.#f.get(t);
1135
+ if (c === void 0) c = this.#h === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#h === this.#t ? this.#B(false) : this.#h, this.#a[c] = t, this.#i[c] = e, this.#f.set(t, c), this.#d[this.#p] = c, this.#E[c] = this.#p, this.#p = c, this.#h++, this.#L(c, u, a), a && (a.set = "add"), l = false, this.#_ && this.#r?.(e, t, "add");
1136
+ else {
1137
+ this.#W(c);
1138
+ let d = this.#i[c];
1139
+ if (e !== d) {
1140
+ if (this.#A && this.#l(d)) {
1141
+ d.__abortController.abort(new Error("replaced"));
1142
+ let { __staleWhileFetching: f } = d;
1143
+ f !== void 0 && !o && (this.#x && this.#n?.(f, t, "set"), this.#e && this.#m?.push([f, t, "set"]));
1144
+ } else o || (this.#x && this.#n?.(d, t, "set"), this.#e && this.#m?.push([d, t, "set"]));
1145
+ if (this.#P(c), this.#L(c, u, a), this.#i[c] = e, a) {
1146
+ a.set = "replace";
1147
+ let f = d && this.#l(d) ? d.__staleWhileFetching : d;
1148
+ f !== void 0 && (a.oldValue = f);
1149
+ }
1150
+ } else a && (a.set = "update");
1151
+ this.#_ && this.onInsert?.(e, t, e === d ? "update" : "replace");
1152
+ }
1153
+ if (i !== 0 && !this.#g && this.#M(), this.#g && (l || this.#j(c, i, r), a && this.#N(a, c)), !o && this.#e && this.#m) {
1154
+ let d = this.#m, f;
1155
+ for (; f = d?.shift(); ) this.#o?.(...f);
1156
+ }
1157
+ return this;
1158
+ }
1159
+ pop() {
1160
+ try {
1161
+ for (; this.#h; ) {
1162
+ let t = this.#i[this.#b];
1163
+ if (this.#B(true), this.#l(t)) {
1164
+ if (t.__staleWhileFetching) return t.__staleWhileFetching;
1165
+ } else if (t !== void 0) return t;
1166
+ }
1167
+ } finally {
1168
+ if (this.#e && this.#m) {
1169
+ let t = this.#m, e;
1170
+ for (; e = t?.shift(); ) this.#o?.(...e);
1171
+ }
1172
+ }
1173
+ }
1174
+ #B(t) {
1175
+ let e = this.#b, s = this.#a[e], i = this.#i[e];
1176
+ return this.#A && this.#l(i) ? i.__abortController.abort(new Error("evicted")) : (this.#x || this.#e) && (this.#x && this.#n?.(i, s, "evict"), this.#e && this.#m?.push([i, s, "evict"])), this.#P(e), this.#y?.[e] && (clearTimeout(this.#y[e]), this.#y[e] = void 0), t && (this.#a[e] = void 0, this.#i[e] = void 0, this.#R.push(e)), this.#h === 1 ? (this.#b = this.#p = 0, this.#R.length = 0) : this.#b = this.#d[e], this.#f.delete(s), this.#h--, e;
1177
+ }
1178
+ has(t, e = {}) {
1179
+ let { updateAgeOnHas: s = this.updateAgeOnHas, status: i } = e, r = this.#f.get(t);
1180
+ if (r !== void 0) {
1181
+ let o = this.#i[r];
1182
+ if (this.#l(o) && o.__staleWhileFetching === void 0) return false;
1183
+ if (this.#v(r)) i && (i.has = "stale", this.#N(i, r));
1184
+ else return s && this.#k(r), i && (i.has = "hit", this.#N(i, r)), true;
1185
+ } else i && (i.has = "miss");
1186
+ return false;
1187
+ }
1188
+ peek(t, e = {}) {
1189
+ let { allowStale: s = this.allowStale } = e, i = this.#f.get(t);
1190
+ if (i === void 0 || !s && this.#v(i)) return;
1191
+ let r = this.#i[i];
1192
+ return this.#l(r) ? r.__staleWhileFetching : r;
1193
+ }
1194
+ #U(t, e, s, i) {
1195
+ let r = e === void 0 ? void 0 : this.#i[e];
1196
+ if (this.#l(r)) return r;
1197
+ let o = new At(), { signal: h } = s;
1198
+ h?.addEventListener("abort", () => o.abort(h.reason), { signal: o.signal });
1199
+ let a = { signal: o.signal, options: s, context: i }, l = (p, w = false) => {
1200
+ let { aborted: g } = o.signal, S = s.ignoreFetchAbort && p !== void 0, E = s.ignoreFetchAbort || !!(s.allowStaleOnFetchAbort && p !== void 0);
1201
+ if (s.status && (g && !w ? (s.status.fetchAborted = true, s.status.fetchError = o.signal.reason, S && (s.status.fetchAbortIgnored = true)) : s.status.fetchResolved = true), g && !S && !w) return c(o.signal.reason, E);
1202
+ let y = f, b = this.#i[e];
1203
+ return (b === f || S && w && b === void 0) && (p === void 0 ? y.__staleWhileFetching !== void 0 ? this.#i[e] = y.__staleWhileFetching : this.#O(t, "fetch") : (s.status && (s.status.fetchUpdated = true), this.set(t, p, a.options))), p;
1204
+ }, u = (p) => (s.status && (s.status.fetchRejected = true, s.status.fetchError = p), c(p, false)), c = (p, w) => {
1205
+ let { aborted: g } = o.signal, S = g && s.allowStaleOnFetchAbort, E = S || s.allowStaleOnFetchRejection, y = E || s.noDeleteOnFetchRejection, b = f;
1206
+ if (this.#i[e] === f && (!y || !w && b.__staleWhileFetching === void 0 ? this.#O(t, "fetch") : S || (this.#i[e] = b.__staleWhileFetching)), E) return s.status && b.__staleWhileFetching !== void 0 && (s.status.returnedStale = true), b.__staleWhileFetching;
1207
+ if (b.__returned === b) throw p;
1208
+ }, d = (p, w) => {
1209
+ let g = this.#S?.(t, r, a);
1210
+ g && g instanceof Promise && g.then((S) => p(S === void 0 ? void 0 : S), w), o.signal.addEventListener("abort", () => {
1211
+ (!s.ignoreFetchAbort || s.allowStaleOnFetchAbort) && (p(void 0), s.allowStaleOnFetchAbort && (p = (S) => l(S, true)));
1212
+ });
1213
+ };
1214
+ s.status && (s.status.fetchDispatched = true);
1215
+ let f = new Promise(d).then(l, u), m = Object.assign(f, { __abortController: o, __staleWhileFetching: r, __returned: void 0 });
1216
+ return e === void 0 ? (this.set(t, m, { ...a.options, status: void 0 }), e = this.#f.get(t)) : this.#i[e] = m, m;
1217
+ }
1218
+ #l(t) {
1219
+ if (!this.#A) return false;
1220
+ let e = t;
1221
+ return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof At;
1222
+ }
1223
+ async fetch(t, e = {}) {
1224
+ let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: u = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: m = this.allowStaleOnFetchAbort, context: p, forceRefresh: w = false, status: g, signal: S } = e;
1225
+ if (!this.#A) return g && (g.fetch = "get"), this.get(t, { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, status: g });
1226
+ let E = { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: h, size: a, sizeCalculation: l, noUpdateTTL: u, noDeleteOnFetchRejection: c, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: m, ignoreFetchAbort: f, status: g, signal: S }, y = this.#f.get(t);
1227
+ if (y === void 0) {
1228
+ g && (g.fetch = "miss");
1229
+ let b = this.#U(t, y, E, p);
1230
+ return b.__returned = b;
1231
+ } else {
1232
+ let b = this.#i[y];
1233
+ if (this.#l(b)) {
1234
+ let Z = s && b.__staleWhileFetching !== void 0;
1235
+ return g && (g.fetch = "inflight", Z && (g.returnedStale = true)), Z ? b.__staleWhileFetching : b.__returned = b;
1236
+ }
1237
+ let z = this.#v(y);
1238
+ if (!w && !z) return g && (g.fetch = "hit"), this.#W(y), i && this.#k(y), g && this.#N(g, y), b;
1239
+ let $ = this.#U(t, y, E, p), J = $.__staleWhileFetching !== void 0 && s;
1240
+ return g && (g.fetch = z ? "stale" : "refresh", J && z && (g.returnedStale = true)), J ? $.__staleWhileFetching : $.__returned = $;
1241
+ }
1242
+ }
1243
+ async forceFetch(t, e = {}) {
1244
+ let s = await this.fetch(t, e);
1245
+ if (s === void 0) throw new Error("fetch() returned undefined");
1246
+ return s;
1247
+ }
1248
+ memo(t, e = {}) {
1249
+ let s = this.#w;
1250
+ if (!s) throw new Error("no memoMethod provided to constructor");
1251
+ let { context: i, forceRefresh: r, ...o } = e, h = this.get(t, o);
1252
+ if (!r && h !== void 0) return h;
1253
+ let a = s(t, h, { options: o, context: i });
1254
+ return this.set(t, a, o), a;
1255
+ }
1256
+ get(t, e = {}) {
1257
+ let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, status: o } = e, h = this.#f.get(t);
1258
+ if (h !== void 0) {
1259
+ let a = this.#i[h], l = this.#l(a);
1260
+ return o && this.#N(o, h), this.#v(h) ? (o && (o.get = "stale"), l ? (o && s && a.__staleWhileFetching !== void 0 && (o.returnedStale = true), s ? a.__staleWhileFetching : void 0) : (r || this.#O(t, "expire"), o && s && (o.returnedStale = true), s ? a : void 0)) : (o && (o.get = "hit"), l ? a.__staleWhileFetching : (this.#W(h), i && this.#k(h), a));
1261
+ } else o && (o.get = "miss");
1262
+ }
1263
+ #$(t, e) {
1264
+ this.#E[e] = t, this.#d[t] = e;
1265
+ }
1266
+ #W(t) {
1267
+ t !== this.#p && (t === this.#b ? this.#b = this.#d[t] : this.#$(this.#E[t], this.#d[t]), this.#$(this.#p, t), this.#p = t);
1268
+ }
1269
+ delete(t) {
1270
+ return this.#O(t, "delete");
1271
+ }
1272
+ #O(t, e) {
1273
+ let s = false;
1274
+ if (this.#h !== 0) {
1275
+ let i = this.#f.get(t);
1276
+ if (i !== void 0) if (this.#y?.[i] && (clearTimeout(this.#y?.[i]), this.#y[i] = void 0), s = true, this.#h === 1) this.#H(e);
1277
+ else {
1278
+ this.#P(i);
1279
+ let r = this.#i[i];
1280
+ if (this.#l(r) ? r.__abortController.abort(new Error("deleted")) : (this.#x || this.#e) && (this.#x && this.#n?.(r, t, e), this.#e && this.#m?.push([r, t, e])), this.#f.delete(t), this.#a[i] = void 0, this.#i[i] = void 0, i === this.#p) this.#p = this.#E[i];
1281
+ else if (i === this.#b) this.#b = this.#d[i];
1282
+ else {
1283
+ let o = this.#E[i];
1284
+ this.#d[o] = this.#d[i];
1285
+ let h = this.#d[i];
1286
+ this.#E[h] = this.#E[i];
1287
+ }
1288
+ this.#h--, this.#R.push(i);
1289
+ }
1290
+ }
1291
+ if (this.#e && this.#m?.length) {
1292
+ let i = this.#m, r;
1293
+ for (; r = i?.shift(); ) this.#o?.(...r);
1294
+ }
1295
+ return s;
1296
+ }
1297
+ clear() {
1298
+ return this.#H("delete");
1299
+ }
1300
+ #H(t) {
1301
+ for (let e of this.#D({ allowStale: true })) {
1302
+ let s = this.#i[e];
1303
+ if (this.#l(s)) s.__abortController.abort(new Error("deleted"));
1304
+ else {
1305
+ let i = this.#a[e];
1306
+ this.#x && this.#n?.(s, i, t), this.#e && this.#m?.push([s, i, t]);
1307
+ }
1308
+ }
1309
+ if (this.#f.clear(), this.#i.fill(void 0), this.#a.fill(void 0), this.#g && this.#T) {
1310
+ this.#g.fill(0), this.#T.fill(0);
1311
+ for (let e of this.#y ?? []) e !== void 0 && clearTimeout(e);
1312
+ this.#y?.fill(void 0);
1313
+ }
1314
+ if (this.#C && this.#C.fill(0), this.#b = 0, this.#p = 0, this.#R.length = 0, this.#u = 0, this.#h = 0, this.#e && this.#m) {
1315
+ let e = this.#m, s;
1316
+ for (; s = e?.shift(); ) this.#o?.(...s);
1317
+ }
1318
+ }
1319
+ };
1320
+ var Ne = typeof process == "object" && process ? process : { stdout: null, stderr: null };
1321
+ var oi = (n7) => !!n7 && typeof n7 == "object" && (n7 instanceof V || n7 instanceof Pe || hi(n7) || ai(n7));
1322
+ var hi = (n7) => !!n7 && typeof n7 == "object" && n7 instanceof ee && typeof n7.pipe == "function" && n7.pipe !== Pe.Writable.prototype.pipe;
1323
+ var ai = (n7) => !!n7 && typeof n7 == "object" && n7 instanceof ee && typeof n7.write == "function" && typeof n7.end == "function";
1324
+ var G = /* @__PURE__ */ Symbol("EOF");
1325
+ var H = /* @__PURE__ */ Symbol("maybeEmitEnd");
1326
+ var K = /* @__PURE__ */ Symbol("emittedEnd");
1327
+ var kt = /* @__PURE__ */ Symbol("emittingEnd");
1328
+ var ut = /* @__PURE__ */ Symbol("emittedError");
1329
+ var Rt = /* @__PURE__ */ Symbol("closed");
1330
+ var _e = /* @__PURE__ */ Symbol("read");
1331
+ var Ot = /* @__PURE__ */ Symbol("flush");
1332
+ var Le = /* @__PURE__ */ Symbol("flushChunk");
1333
+ var P = /* @__PURE__ */ Symbol("encoding");
1334
+ var et = /* @__PURE__ */ Symbol("decoder");
1335
+ var v = /* @__PURE__ */ Symbol("flowing");
1336
+ var dt = /* @__PURE__ */ Symbol("paused");
1337
+ var st = /* @__PURE__ */ Symbol("resume");
1338
+ var C = /* @__PURE__ */ Symbol("buffer");
1339
+ var F = /* @__PURE__ */ Symbol("pipes");
1340
+ var T = /* @__PURE__ */ Symbol("bufferLength");
1341
+ var Yt = /* @__PURE__ */ Symbol("bufferPush");
1342
+ var Ft = /* @__PURE__ */ Symbol("bufferShift");
1343
+ var k = /* @__PURE__ */ Symbol("objectMode");
1344
+ var x = /* @__PURE__ */ Symbol("destroyed");
1345
+ var Xt = /* @__PURE__ */ Symbol("error");
1346
+ var Jt = /* @__PURE__ */ Symbol("emitData");
1347
+ var We = /* @__PURE__ */ Symbol("emitEnd");
1348
+ var Zt = /* @__PURE__ */ Symbol("emitEnd2");
1349
+ var B = /* @__PURE__ */ Symbol("async");
1350
+ var Qt = /* @__PURE__ */ Symbol("abort");
1351
+ var Dt = /* @__PURE__ */ Symbol("aborted");
1352
+ var pt = /* @__PURE__ */ Symbol("signal");
1353
+ var Y = /* @__PURE__ */ Symbol("dataListeners");
1354
+ var M = /* @__PURE__ */ Symbol("discarded");
1355
+ var mt = (n7) => Promise.resolve().then(n7);
1356
+ var li = (n7) => n7();
1357
+ var ci = (n7) => n7 === "end" || n7 === "finish" || n7 === "prefinish";
1358
+ var fi = (n7) => n7 instanceof ArrayBuffer || !!n7 && typeof n7 == "object" && n7.constructor && n7.constructor.name === "ArrayBuffer" && n7.byteLength >= 0;
1359
+ var ui = (n7) => !Buffer.isBuffer(n7) && ArrayBuffer.isView(n7);
1360
+ var Mt = class {
1361
+ src;
1362
+ dest;
1363
+ opts;
1364
+ ondrain;
1365
+ constructor(t, e, s) {
1366
+ this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[st](), this.dest.on("drain", this.ondrain);
1367
+ }
1368
+ unpipe() {
1369
+ this.dest.removeListener("drain", this.ondrain);
1370
+ }
1371
+ proxyErrors(t) {
1372
+ }
1373
+ end() {
1374
+ this.unpipe(), this.opts.end && this.dest.end();
1375
+ }
1376
+ };
1377
+ var te = class extends Mt {
1378
+ unpipe() {
1379
+ this.src.removeListener("error", this.proxyErrors), super.unpipe();
1380
+ }
1381
+ constructor(t, e, s) {
1382
+ super(t, e, s), this.proxyErrors = (i) => this.dest.emit("error", i), t.on("error", this.proxyErrors);
1383
+ }
1384
+ };
1385
+ var di = (n7) => !!n7.objectMode;
1386
+ var pi = (n7) => !n7.objectMode && !!n7.encoding && n7.encoding !== "buffer";
1387
+ var V = class extends ee {
1388
+ [v] = false;
1389
+ [dt] = false;
1390
+ [F] = [];
1391
+ [C] = [];
1392
+ [k];
1393
+ [P];
1394
+ [B];
1395
+ [et];
1396
+ [G] = false;
1397
+ [K] = false;
1398
+ [kt] = false;
1399
+ [Rt] = false;
1400
+ [ut] = null;
1401
+ [T] = 0;
1402
+ [x] = false;
1403
+ [pt];
1404
+ [Dt] = false;
1405
+ [Y] = 0;
1406
+ [M] = false;
1407
+ writable = true;
1408
+ readable = true;
1409
+ constructor(...t) {
1410
+ let e = t[0] || {};
1411
+ if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
1412
+ di(e) ? (this[k] = true, this[P] = null) : pi(e) ? (this[P] = e.encoding, this[k] = false) : (this[k] = false, this[P] = null), this[B] = !!e.async, this[et] = this[P] ? new ni(this[P]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[C] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[F] });
1413
+ let { signal: s } = e;
1414
+ s && (this[pt] = s, s.aborted ? this[Qt]() : s.addEventListener("abort", () => this[Qt]()));
1415
+ }
1416
+ get bufferLength() {
1417
+ return this[T];
1418
+ }
1419
+ get encoding() {
1420
+ return this[P];
1421
+ }
1422
+ set encoding(t) {
1423
+ throw new Error("Encoding must be set at instantiation time");
1424
+ }
1425
+ setEncoding(t) {
1426
+ throw new Error("Encoding must be set at instantiation time");
1427
+ }
1428
+ get objectMode() {
1429
+ return this[k];
1430
+ }
1431
+ set objectMode(t) {
1432
+ throw new Error("objectMode must be set at instantiation time");
1433
+ }
1434
+ get async() {
1435
+ return this[B];
1436
+ }
1437
+ set async(t) {
1438
+ this[B] = this[B] || !!t;
1439
+ }
1440
+ [Qt]() {
1441
+ this[Dt] = true, this.emit("abort", this[pt]?.reason), this.destroy(this[pt]?.reason);
1442
+ }
1443
+ get aborted() {
1444
+ return this[Dt];
1445
+ }
1446
+ set aborted(t) {
1447
+ }
1448
+ write(t, e, s) {
1449
+ if (this[Dt]) return false;
1450
+ if (this[G]) throw new Error("write after end");
1451
+ if (this[x]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
1452
+ typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
1453
+ let i = this[B] ? mt : li;
1454
+ if (!this[k] && !Buffer.isBuffer(t)) {
1455
+ if (ui(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
1456
+ else if (fi(t)) t = Buffer.from(t);
1457
+ else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
1458
+ }
1459
+ return this[k] ? (this[v] && this[T] !== 0 && this[Ot](true), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : t.length ? (typeof t == "string" && !(e === this[P] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P] && (t = this[et].write(t)), this[v] && this[T] !== 0 && this[Ot](true), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : (this[T] !== 0 && this.emit("readable"), s && i(s), this[v]);
1460
+ }
1461
+ read(t) {
1462
+ if (this[x]) return null;
1463
+ if (this[M] = false, this[T] === 0 || t === 0 || t && t > this[T]) return this[H](), null;
1464
+ this[k] && (t = null), this[C].length > 1 && !this[k] && (this[C] = [this[P] ? this[C].join("") : Buffer.concat(this[C], this[T])]);
1465
+ let e = this[_e](t || null, this[C][0]);
1466
+ return this[H](), e;
1467
+ }
1468
+ [_e](t, e) {
1469
+ if (this[k]) this[Ft]();
1470
+ else {
1471
+ let s = e;
1472
+ t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C][0] = s.slice(t), e = s.slice(0, t), this[T] -= t) : (this[C][0] = s.subarray(t), e = s.subarray(0, t), this[T] -= t);
1473
+ }
1474
+ return this.emit("data", e), !this[C].length && !this[G] && this.emit("drain"), e;
1475
+ }
1476
+ end(t, e, s) {
1477
+ return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[G] = true, this.writable = false, (this[v] || !this[dt]) && this[H](), this;
1478
+ }
1479
+ [st]() {
1480
+ this[x] || (!this[Y] && !this[F].length && (this[M] = true), this[dt] = false, this[v] = true, this.emit("resume"), this[C].length ? this[Ot]() : this[G] ? this[H]() : this.emit("drain"));
1481
+ }
1482
+ resume() {
1483
+ return this[st]();
1484
+ }
1485
+ pause() {
1486
+ this[v] = false, this[dt] = true, this[M] = false;
1487
+ }
1488
+ get destroyed() {
1489
+ return this[x];
1490
+ }
1491
+ get flowing() {
1492
+ return this[v];
1493
+ }
1494
+ get paused() {
1495
+ return this[dt];
1496
+ }
1497
+ [Yt](t) {
1498
+ this[k] ? this[T] += 1 : this[T] += t.length, this[C].push(t);
1499
+ }
1500
+ [Ft]() {
1501
+ return this[k] ? this[T] -= 1 : this[T] -= this[C][0].length, this[C].shift();
1502
+ }
1503
+ [Ot](t = false) {
1504
+ do
1505
+ ;
1506
+ while (this[Le](this[Ft]()) && this[C].length);
1507
+ !t && !this[C].length && !this[G] && this.emit("drain");
1508
+ }
1509
+ [Le](t) {
1510
+ return this.emit("data", t), this[v];
1511
+ }
1512
+ pipe(t, e) {
1513
+ if (this[x]) return t;
1514
+ this[M] = false;
1515
+ let s = this[K];
1516
+ return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F].push(e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e)), this[B] ? mt(() => this[st]()) : this[st]()), t;
1517
+ }
1518
+ unpipe(t) {
1519
+ let e = this[F].find((s) => s.dest === t);
1520
+ e && (this[F].length === 1 ? (this[v] && this[Y] === 0 && (this[v] = false), this[F] = []) : this[F].splice(this[F].indexOf(e), 1), e.unpipe());
1521
+ }
1522
+ addListener(t, e) {
1523
+ return this.on(t, e);
1524
+ }
1525
+ on(t, e) {
1526
+ let s = super.on(t, e);
1527
+ if (t === "data") this[M] = false, this[Y]++, !this[F].length && !this[v] && this[st]();
1528
+ else if (t === "readable" && this[T] !== 0) super.emit("readable");
1529
+ else if (ci(t) && this[K]) super.emit(t), this.removeAllListeners(t);
1530
+ else if (t === "error" && this[ut]) {
1531
+ let i = e;
1532
+ this[B] ? mt(() => i.call(this, this[ut])) : i.call(this, this[ut]);
1533
+ }
1534
+ return s;
1535
+ }
1536
+ removeListener(t, e) {
1537
+ return this.off(t, e);
1538
+ }
1539
+ off(t, e) {
1540
+ let s = super.off(t, e);
1541
+ return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M] && !this[F].length && (this[v] = false)), s;
1542
+ }
1543
+ removeAllListeners(t) {
1544
+ let e = super.removeAllListeners(t);
1545
+ return (t === "data" || t === void 0) && (this[Y] = 0, !this[M] && !this[F].length && (this[v] = false)), e;
1546
+ }
1547
+ get emittedEnd() {
1548
+ return this[K];
1549
+ }
1550
+ [H]() {
1551
+ !this[kt] && !this[K] && !this[x] && this[C].length === 0 && this[G] && (this[kt] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt] && this.emit("close"), this[kt] = false);
1552
+ }
1553
+ emit(t, ...e) {
1554
+ let s = e[0];
1555
+ if (t !== "error" && t !== "close" && t !== x && this[x]) return false;
1556
+ if (t === "data") return !this[k] && !s ? false : this[B] ? (mt(() => this[Jt](s)), true) : this[Jt](s);
1557
+ if (t === "end") return this[We]();
1558
+ if (t === "close") {
1559
+ if (this[Rt] = true, !this[K] && !this[x]) return false;
1560
+ let r = super.emit("close");
1561
+ return this.removeAllListeners("close"), r;
1562
+ } else if (t === "error") {
1563
+ this[ut] = s, super.emit(Xt, s);
1564
+ let r = !this[pt] || this.listeners("error").length ? super.emit("error", s) : false;
1565
+ return this[H](), r;
1566
+ } else if (t === "resume") {
1567
+ let r = super.emit("resume");
1568
+ return this[H](), r;
1569
+ } else if (t === "finish" || t === "prefinish") {
1570
+ let r = super.emit(t);
1571
+ return this.removeAllListeners(t), r;
1572
+ }
1573
+ let i = super.emit(t, ...e);
1574
+ return this[H](), i;
1575
+ }
1576
+ [Jt](t) {
1577
+ for (let s of this[F]) s.dest.write(t) === false && this.pause();
1578
+ let e = this[M] ? false : super.emit("data", t);
1579
+ return this[H](), e;
1580
+ }
1581
+ [We]() {
1582
+ return this[K] ? false : (this[K] = true, this.readable = false, this[B] ? (mt(() => this[Zt]()), true) : this[Zt]());
1583
+ }
1584
+ [Zt]() {
1585
+ if (this[et]) {
1586
+ let e = this[et].end();
1587
+ if (e) {
1588
+ for (let s of this[F]) s.dest.write(e);
1589
+ this[M] || super.emit("data", e);
1590
+ }
1591
+ }
1592
+ for (let e of this[F]) e.end();
1593
+ let t = super.emit("end");
1594
+ return this.removeAllListeners("end"), t;
1595
+ }
1596
+ async collect() {
1597
+ let t = Object.assign([], { dataLength: 0 });
1598
+ this[k] || (t.dataLength = 0);
1599
+ let e = this.promise();
1600
+ return this.on("data", (s) => {
1601
+ t.push(s), this[k] || (t.dataLength += s.length);
1602
+ }), await e, t;
1603
+ }
1604
+ async concat() {
1605
+ if (this[k]) throw new Error("cannot concat in objectMode");
1606
+ let t = await this.collect();
1607
+ return this[P] ? t.join("") : Buffer.concat(t, t.dataLength);
1608
+ }
1609
+ async promise() {
1610
+ return new Promise((t, e) => {
1611
+ this.on(x, () => e(new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
1612
+ });
1613
+ }
1614
+ [Symbol.asyncIterator]() {
1615
+ this[M] = false;
1616
+ let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
1617
+ return { next: () => {
1618
+ if (t) return e();
1619
+ let i = this.read();
1620
+ if (i !== null) return Promise.resolve({ done: false, value: i });
1621
+ if (this[G]) return e();
1622
+ let r, o, h = (c) => {
1623
+ this.off("data", a), this.off("end", l), this.off(x, u), e(), o(c);
1624
+ }, a = (c) => {
1625
+ this.off("error", h), this.off("end", l), this.off(x, u), this.pause(), r({ value: c, done: !!this[G] });
1626
+ }, l = () => {
1627
+ this.off("error", h), this.off("data", a), this.off(x, u), e(), r({ done: true, value: void 0 });
1628
+ }, u = () => h(new Error("stream destroyed"));
1629
+ return new Promise((c, d) => {
1630
+ o = d, r = c, this.once(x, u), this.once("error", h), this.once("end", l), this.once("data", a);
1631
+ });
1632
+ }, throw: e, return: e, [Symbol.asyncIterator]() {
1633
+ return this;
1634
+ }, [Symbol.asyncDispose]: async () => {
1635
+ } };
1636
+ }
1637
+ [Symbol.iterator]() {
1638
+ this[M] = false;
1639
+ let t = false, e = () => (this.pause(), this.off(Xt, e), this.off(x, e), this.off("end", e), t = true, { done: true, value: void 0 }), s = () => {
1640
+ if (t) return e();
1641
+ let i = this.read();
1642
+ return i === null ? e() : { done: false, value: i };
1643
+ };
1644
+ return this.once("end", e), this.once(Xt, e), this.once(x, e), { next: s, throw: e, return: e, [Symbol.iterator]() {
1645
+ return this;
1646
+ }, [Symbol.dispose]: () => {
1647
+ } };
1648
+ }
1649
+ destroy(t) {
1650
+ if (this[x]) return t ? this.emit("error", t) : this.emit(x), this;
1651
+ this[x] = true, this[M] = true, this[C].length = 0, this[T] = 0;
1652
+ let e = this;
1653
+ return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x), this;
1654
+ }
1655
+ static get isStream() {
1656
+ return oi;
1657
+ }
1658
+ };
1659
+ var vi = Ei.native;
1660
+ var wt = { lstatSync: wi, readdir: yi, readdirSync: bi, readlinkSync: Si, realpathSync: vi, promises: { lstat: Ci, readdir: Ti, readlink: Ai, realpath: ki } };
1661
+ var Ue = (n7) => !n7 || n7 === wt || n7 === xi ? wt : { ...wt, ...n7, promises: { ...wt.promises, ...n7.promises || {} } };
1662
+ var $e = /^\\\\\?\\([a-z]:)\\?$/i;
1663
+ var Ri = (n7) => n7.replace(/\//g, "\\").replace($e, "$1\\");
1664
+ var Oi = /[\\\/]/;
1665
+ var L = 0;
1666
+ var Ge = 1;
1667
+ var He = 2;
1668
+ var U = 4;
1669
+ var qe = 6;
1670
+ var Ke = 8;
1671
+ var X = 10;
1672
+ var Ve = 12;
1673
+ var _ = 15;
1674
+ var gt = ~_;
1675
+ var se = 16;
1676
+ var je = 32;
1677
+ var yt = 64;
1678
+ var j = 128;
1679
+ var Nt = 256;
1680
+ var Lt = 512;
1681
+ var Ie = yt | j | Lt;
1682
+ var Fi = 1023;
1683
+ var ie = (n7) => n7.isFile() ? Ke : n7.isDirectory() ? U : n7.isSymbolicLink() ? X : n7.isCharacterDevice() ? He : n7.isBlockDevice() ? qe : n7.isSocket() ? Ve : n7.isFIFO() ? Ge : L;
1684
+ var ze = new ft({ max: 2 ** 12 });
1685
+ var bt = (n7) => {
1686
+ let t = ze.get(n7);
1687
+ if (t) return t;
1688
+ let e = n7.normalize("NFKD");
1689
+ return ze.set(n7, e), e;
1690
+ };
1691
+ var Be = new ft({ max: 2 ** 12 });
1692
+ var _t = (n7) => {
1693
+ let t = Be.get(n7);
1694
+ if (t) return t;
1695
+ let e = bt(n7.toLowerCase());
1696
+ return Be.set(n7, e), e;
1697
+ };
1698
+ var Wt = class extends ft {
1699
+ constructor() {
1700
+ super({ max: 256 });
1701
+ }
1702
+ };
1703
+ var ne = class extends ft {
1704
+ constructor(t = 16 * 1024) {
1705
+ super({ maxSize: t, sizeCalculation: (e) => e.length + 1 });
1706
+ }
1707
+ };
1708
+ var Ye = /* @__PURE__ */ Symbol("PathScurry setAsCwd");
1709
+ var R = class {
1710
+ name;
1711
+ root;
1712
+ roots;
1713
+ parent;
1714
+ nocase;
1715
+ isCWD = false;
1716
+ #t;
1717
+ #s;
1718
+ get dev() {
1719
+ return this.#s;
1720
+ }
1721
+ #n;
1722
+ get mode() {
1723
+ return this.#n;
1724
+ }
1725
+ #r;
1726
+ get nlink() {
1727
+ return this.#r;
1728
+ }
1729
+ #o;
1730
+ get uid() {
1731
+ return this.#o;
1732
+ }
1733
+ #S;
1734
+ get gid() {
1735
+ return this.#S;
1736
+ }
1737
+ #w;
1738
+ get rdev() {
1739
+ return this.#w;
1740
+ }
1741
+ #c;
1742
+ get blksize() {
1743
+ return this.#c;
1744
+ }
1745
+ #h;
1746
+ get ino() {
1747
+ return this.#h;
1748
+ }
1749
+ #u;
1750
+ get size() {
1751
+ return this.#u;
1752
+ }
1753
+ #f;
1754
+ get blocks() {
1755
+ return this.#f;
1756
+ }
1757
+ #a;
1758
+ get atimeMs() {
1759
+ return this.#a;
1760
+ }
1761
+ #i;
1762
+ get mtimeMs() {
1763
+ return this.#i;
1764
+ }
1765
+ #d;
1766
+ get ctimeMs() {
1767
+ return this.#d;
1768
+ }
1769
+ #E;
1770
+ get birthtimeMs() {
1771
+ return this.#E;
1772
+ }
1773
+ #b;
1774
+ get atime() {
1775
+ return this.#b;
1776
+ }
1777
+ #p;
1778
+ get mtime() {
1779
+ return this.#p;
1780
+ }
1781
+ #R;
1782
+ get ctime() {
1783
+ return this.#R;
1784
+ }
1785
+ #m;
1786
+ get birthtime() {
1787
+ return this.#m;
1788
+ }
1789
+ #C;
1790
+ #T;
1791
+ #g;
1792
+ #y;
1793
+ #x;
1794
+ #A;
1795
+ #e;
1796
+ #_;
1797
+ #M;
1798
+ #k;
1799
+ get parentPath() {
1800
+ return (this.parent || this).fullpath();
1801
+ }
1802
+ get path() {
1803
+ return this.parentPath;
1804
+ }
1805
+ constructor(t, e = L, s, i, r, o, h) {
1806
+ this.name = t, this.#C = r ? _t(t) : bt(t), this.#e = e & Fi, this.nocase = r, this.roots = i, this.root = s || this, this.#_ = o, this.#g = h.fullpath, this.#x = h.relative, this.#A = h.relativePosix, this.parent = h.parent, this.parent ? this.#t = this.parent.#t : this.#t = Ue(h.fs);
1807
+ }
1808
+ depth() {
1809
+ return this.#T !== void 0 ? this.#T : this.parent ? this.#T = this.parent.depth() + 1 : this.#T = 0;
1810
+ }
1811
+ childrenCache() {
1812
+ return this.#_;
1813
+ }
1814
+ resolve(t) {
1815
+ if (!t) return this;
1816
+ let e = this.getRootString(t), i = t.substring(e.length).split(this.splitSep);
1817
+ return e ? this.getRoot(e).#N(i) : this.#N(i);
1818
+ }
1819
+ #N(t) {
1820
+ let e = this;
1821
+ for (let s of t) e = e.child(s);
1822
+ return e;
1823
+ }
1824
+ children() {
1825
+ let t = this.#_.get(this);
1826
+ if (t) return t;
1827
+ let e = Object.assign([], { provisional: 0 });
1828
+ return this.#_.set(this, e), this.#e &= ~se, e;
1829
+ }
1830
+ child(t, e) {
1831
+ if (t === "" || t === ".") return this;
1832
+ if (t === "..") return this.parent || this;
1833
+ let s = this.children(), i = this.nocase ? _t(t) : bt(t);
1834
+ for (let a of s) if (a.#C === i) return a;
1835
+ let r = this.parent ? this.sep : "", o = this.#g ? this.#g + r + t : void 0, h = this.newChild(t, L, { ...e, parent: this, fullpath: o });
1836
+ return this.canReaddir() || (h.#e |= j), s.push(h), h;
1837
+ }
1838
+ relative() {
1839
+ if (this.isCWD) return "";
1840
+ if (this.#x !== void 0) return this.#x;
1841
+ let t = this.name, e = this.parent;
1842
+ if (!e) return this.#x = this.name;
1843
+ let s = e.relative();
1844
+ return s + (!s || !e.parent ? "" : this.sep) + t;
1845
+ }
1846
+ relativePosix() {
1847
+ if (this.sep === "/") return this.relative();
1848
+ if (this.isCWD) return "";
1849
+ if (this.#A !== void 0) return this.#A;
1850
+ let t = this.name, e = this.parent;
1851
+ if (!e) return this.#A = this.fullpathPosix();
1852
+ let s = e.relativePosix();
1853
+ return s + (!s || !e.parent ? "" : "/") + t;
1854
+ }
1855
+ fullpath() {
1856
+ if (this.#g !== void 0) return this.#g;
1857
+ let t = this.name, e = this.parent;
1858
+ if (!e) return this.#g = this.name;
1859
+ let i = e.fullpath() + (e.parent ? this.sep : "") + t;
1860
+ return this.#g = i;
1861
+ }
1862
+ fullpathPosix() {
1863
+ if (this.#y !== void 0) return this.#y;
1864
+ if (this.sep === "/") return this.#y = this.fullpath();
1865
+ if (!this.parent) {
1866
+ let i = this.fullpath().replace(/\\/g, "/");
1867
+ return /^[a-z]:\//i.test(i) ? this.#y = `//?/${i}` : this.#y = i;
1868
+ }
1869
+ let t = this.parent, e = t.fullpathPosix(), s = e + (!e || !t.parent ? "" : "/") + this.name;
1870
+ return this.#y = s;
1871
+ }
1872
+ isUnknown() {
1873
+ return (this.#e & _) === L;
1874
+ }
1875
+ isType(t) {
1876
+ return this[`is${t}`]();
1877
+ }
1878
+ getType() {
1879
+ 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";
1880
+ }
1881
+ isFile() {
1882
+ return (this.#e & _) === Ke;
1883
+ }
1884
+ isDirectory() {
1885
+ return (this.#e & _) === U;
1886
+ }
1887
+ isCharacterDevice() {
1888
+ return (this.#e & _) === He;
1889
+ }
1890
+ isBlockDevice() {
1891
+ return (this.#e & _) === qe;
1892
+ }
1893
+ isFIFO() {
1894
+ return (this.#e & _) === Ge;
1895
+ }
1896
+ isSocket() {
1897
+ return (this.#e & _) === Ve;
1898
+ }
1899
+ isSymbolicLink() {
1900
+ return (this.#e & X) === X;
1901
+ }
1902
+ lstatCached() {
1903
+ return this.#e & je ? this : void 0;
1904
+ }
1905
+ readlinkCached() {
1906
+ return this.#M;
1907
+ }
1908
+ realpathCached() {
1909
+ return this.#k;
1910
+ }
1911
+ readdirCached() {
1912
+ let t = this.children();
1913
+ return t.slice(0, t.provisional);
1914
+ }
1915
+ canReadlink() {
1916
+ if (this.#M) return true;
1917
+ if (!this.parent) return false;
1918
+ let t = this.#e & _;
1919
+ return !(t !== L && t !== X || this.#e & Nt || this.#e & j);
1920
+ }
1921
+ calledReaddir() {
1922
+ return !!(this.#e & se);
1923
+ }
1924
+ isENOENT() {
1925
+ return !!(this.#e & j);
1926
+ }
1927
+ isNamed(t) {
1928
+ return this.nocase ? this.#C === _t(t) : this.#C === bt(t);
1929
+ }
1930
+ async readlink() {
1931
+ let t = this.#M;
1932
+ if (t) return t;
1933
+ if (this.canReadlink() && this.parent) try {
1934
+ let e = await this.#t.promises.readlink(this.fullpath()), s = (await this.parent.realpath())?.resolve(e);
1935
+ if (s) return this.#M = s;
1936
+ } catch (e) {
1937
+ this.#D(e.code);
1938
+ return;
1939
+ }
1940
+ }
1941
+ readlinkSync() {
1942
+ let t = this.#M;
1943
+ if (t) return t;
1944
+ if (this.canReadlink() && this.parent) try {
1945
+ let e = this.#t.readlinkSync(this.fullpath()), s = this.parent.realpathSync()?.resolve(e);
1946
+ if (s) return this.#M = s;
1947
+ } catch (e) {
1948
+ this.#D(e.code);
1949
+ return;
1950
+ }
1951
+ }
1952
+ #j(t) {
1953
+ this.#e |= se;
1954
+ for (let e = t.provisional; e < t.length; e++) {
1955
+ let s = t[e];
1956
+ s && s.#v();
1957
+ }
1958
+ }
1959
+ #v() {
1960
+ this.#e & j || (this.#e = (this.#e | j) & gt, this.#G());
1961
+ }
1962
+ #G() {
1963
+ let t = this.children();
1964
+ t.provisional = 0;
1965
+ for (let e of t) e.#v();
1966
+ }
1967
+ #P() {
1968
+ this.#e |= Lt, this.#L();
1969
+ }
1970
+ #L() {
1971
+ if (this.#e & yt) return;
1972
+ let t = this.#e;
1973
+ (t & _) === U && (t &= gt), this.#e = t | yt, this.#G();
1974
+ }
1975
+ #I(t = "") {
1976
+ t === "ENOTDIR" || t === "EPERM" ? this.#L() : t === "ENOENT" ? this.#v() : this.children().provisional = 0;
1977
+ }
1978
+ #F(t = "") {
1979
+ t === "ENOTDIR" ? this.parent.#L() : t === "ENOENT" && this.#v();
1980
+ }
1981
+ #D(t = "") {
1982
+ let e = this.#e;
1983
+ e |= Nt, t === "ENOENT" && (e |= j), (t === "EINVAL" || t === "UNKNOWN") && (e &= gt), this.#e = e, t === "ENOTDIR" && this.parent && this.parent.#L();
1984
+ }
1985
+ #z(t, e) {
1986
+ return this.#U(t, e) || this.#B(t, e);
1987
+ }
1988
+ #B(t, e) {
1989
+ let s = ie(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & _;
1990
+ return r !== U && r !== X && r !== L && (i.#e |= yt), e.unshift(i), e.provisional++, i;
1991
+ }
1992
+ #U(t, e) {
1993
+ for (let s = e.provisional; s < e.length; s++) {
1994
+ let i = e[s];
1995
+ if ((this.nocase ? _t(t.name) : bt(t.name)) === i.#C) return this.#l(t, i, s, e);
1996
+ }
1997
+ }
1998
+ #l(t, e, s, i) {
1999
+ let r = e.name;
2000
+ return e.#e = e.#e & gt | ie(t), r !== t.name && (e.name = t.name), s !== i.provisional && (s === i.length - 1 ? i.pop() : i.splice(s, 1), i.unshift(e)), i.provisional++, e;
2001
+ }
2002
+ async lstat() {
2003
+ if ((this.#e & j) === 0) try {
2004
+ return this.#$(await this.#t.promises.lstat(this.fullpath())), this;
2005
+ } catch (t) {
2006
+ this.#F(t.code);
2007
+ }
2008
+ }
2009
+ lstatSync() {
2010
+ if ((this.#e & j) === 0) try {
2011
+ return this.#$(this.#t.lstatSync(this.fullpath())), this;
2012
+ } catch (t) {
2013
+ this.#F(t.code);
2014
+ }
2015
+ }
2016
+ #$(t) {
2017
+ let { atime: e, atimeMs: s, birthtime: i, birthtimeMs: r, blksize: o, blocks: h, ctime: a, ctimeMs: l, dev: u, gid: c, ino: d, mode: f, mtime: m, mtimeMs: p, nlink: w, rdev: g, size: S, uid: E } = t;
2018
+ this.#b = e, this.#a = s, this.#m = i, this.#E = r, this.#c = o, this.#f = h, this.#R = a, this.#d = l, this.#s = u, this.#S = c, this.#h = d, this.#n = f, this.#p = m, this.#i = p, this.#r = w, this.#w = g, this.#u = S, this.#o = E;
2019
+ let y = ie(t);
2020
+ this.#e = this.#e & gt | y | je, y !== L && y !== U && y !== X && (this.#e |= yt);
2021
+ }
2022
+ #W = [];
2023
+ #O = false;
2024
+ #H(t) {
2025
+ this.#O = false;
2026
+ let e = this.#W.slice();
2027
+ this.#W.length = 0, e.forEach((s) => s(null, t));
2028
+ }
2029
+ readdirCB(t, e = false) {
2030
+ if (!this.canReaddir()) {
2031
+ e ? t(null, []) : queueMicrotask(() => t(null, []));
2032
+ return;
2033
+ }
2034
+ let s = this.children();
2035
+ if (this.calledReaddir()) {
2036
+ let r = s.slice(0, s.provisional);
2037
+ e ? t(null, r) : queueMicrotask(() => t(null, r));
2038
+ return;
2039
+ }
2040
+ if (this.#W.push(t), this.#O) return;
2041
+ this.#O = true;
2042
+ let i = this.fullpath();
2043
+ this.#t.readdir(i, { withFileTypes: true }, (r, o) => {
2044
+ if (r) this.#I(r.code), s.provisional = 0;
2045
+ else {
2046
+ for (let h of o) this.#z(h, s);
2047
+ this.#j(s);
2048
+ }
2049
+ this.#H(s.slice(0, s.provisional));
2050
+ });
2051
+ }
2052
+ #q;
2053
+ async readdir() {
2054
+ if (!this.canReaddir()) return [];
2055
+ let t = this.children();
2056
+ if (this.calledReaddir()) return t.slice(0, t.provisional);
2057
+ let e = this.fullpath();
2058
+ if (this.#q) await this.#q;
2059
+ else {
2060
+ let s = () => {
2061
+ };
2062
+ this.#q = new Promise((i) => s = i);
2063
+ try {
2064
+ for (let i of await this.#t.promises.readdir(e, { withFileTypes: true })) this.#z(i, t);
2065
+ this.#j(t);
2066
+ } catch (i) {
2067
+ this.#I(i.code), t.provisional = 0;
2068
+ }
2069
+ this.#q = void 0, s();
2070
+ }
2071
+ return t.slice(0, t.provisional);
2072
+ }
2073
+ readdirSync() {
2074
+ if (!this.canReaddir()) return [];
2075
+ let t = this.children();
2076
+ if (this.calledReaddir()) return t.slice(0, t.provisional);
2077
+ let e = this.fullpath();
2078
+ try {
2079
+ for (let s of this.#t.readdirSync(e, { withFileTypes: true })) this.#z(s, t);
2080
+ this.#j(t);
2081
+ } catch (s) {
2082
+ this.#I(s.code), t.provisional = 0;
2083
+ }
2084
+ return t.slice(0, t.provisional);
2085
+ }
2086
+ canReaddir() {
2087
+ if (this.#e & Ie) return false;
2088
+ let t = _ & this.#e;
2089
+ return t === L || t === U || t === X;
2090
+ }
2091
+ shouldWalk(t, e) {
2092
+ return (this.#e & U) === U && !(this.#e & Ie) && !t.has(this) && (!e || e(this));
2093
+ }
2094
+ async realpath() {
2095
+ if (this.#k) return this.#k;
2096
+ if (!((Lt | Nt | j) & this.#e)) try {
2097
+ let t = await this.#t.promises.realpath(this.fullpath());
2098
+ return this.#k = this.resolve(t);
2099
+ } catch {
2100
+ this.#P();
2101
+ }
2102
+ }
2103
+ realpathSync() {
2104
+ if (this.#k) return this.#k;
2105
+ if (!((Lt | Nt | j) & this.#e)) try {
2106
+ let t = this.#t.realpathSync(this.fullpath());
2107
+ return this.#k = this.resolve(t);
2108
+ } catch {
2109
+ this.#P();
2110
+ }
2111
+ }
2112
+ [Ye](t) {
2113
+ if (t === this) return;
2114
+ t.isCWD = false, this.isCWD = true;
2115
+ let e = /* @__PURE__ */ new Set([]), s = [], i = this;
2116
+ for (; i && i.parent; ) e.add(i), i.#x = s.join(this.sep), i.#A = s.join("/"), i = i.parent, s.push("..");
2117
+ for (i = t; i && i.parent && !e.has(i); ) i.#x = void 0, i.#A = void 0, i = i.parent;
2118
+ }
2119
+ };
2120
+ var Pt = class n2 extends R {
2121
+ sep = "\\";
2122
+ splitSep = Oi;
2123
+ constructor(t, e = L, s, i, r, o, h) {
2124
+ super(t, e, s, i, r, o, h);
2125
+ }
2126
+ newChild(t, e = L, s = {}) {
2127
+ return new n2(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
2128
+ }
2129
+ getRootString(t) {
2130
+ return re.parse(t).root;
2131
+ }
2132
+ getRoot(t) {
2133
+ if (t = Ri(t.toUpperCase()), t === this.root.name) return this.root;
2134
+ for (let [e, s] of Object.entries(this.roots)) if (this.sameRoot(t, e)) return this.roots[t] = s;
2135
+ return this.roots[t] = new it(t, this).root;
2136
+ }
2137
+ sameRoot(t, e = this.root.name) {
2138
+ return t = t.toUpperCase().replace(/\//g, "\\").replace($e, "$1\\"), t === e;
2139
+ }
2140
+ };
2141
+ var jt = class n3 extends R {
2142
+ splitSep = "/";
2143
+ sep = "/";
2144
+ constructor(t, e = L, s, i, r, o, h) {
2145
+ super(t, e, s, i, r, o, h);
2146
+ }
2147
+ getRootString(t) {
2148
+ return t.startsWith("/") ? "/" : "";
2149
+ }
2150
+ getRoot(t) {
2151
+ return this.root;
2152
+ }
2153
+ newChild(t, e = L, s = {}) {
2154
+ return new n3(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
2155
+ }
2156
+ };
2157
+ var It = class {
2158
+ root;
2159
+ rootPath;
2160
+ roots;
2161
+ cwd;
2162
+ #t;
2163
+ #s;
2164
+ #n;
2165
+ nocase;
2166
+ #r;
2167
+ constructor(t = process.cwd(), e, s, { nocase: i, childrenCacheSize: r = 16 * 1024, fs: o = wt } = {}) {
2168
+ this.#r = Ue(o), (t instanceof URL || t.startsWith("file://")) && (t = gi(t));
2169
+ let h = e.resolve(t);
2170
+ this.roots = /* @__PURE__ */ Object.create(null), this.rootPath = this.parseRootPath(h), this.#t = new Wt(), this.#s = new Wt(), this.#n = new ne(r);
2171
+ let a = h.substring(this.rootPath.length).split(s);
2172
+ if (a.length === 1 && !a[0] && a.pop(), i === void 0) throw new TypeError("must provide nocase setting to PathScurryBase ctor");
2173
+ this.nocase = i, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root;
2174
+ let l = this.root, u = a.length - 1, c = e.sep, d = this.rootPath, f = false;
2175
+ for (let m of a) {
2176
+ let p = u--;
2177
+ l = l.child(m, { relative: new Array(p).fill("..").join(c), relativePosix: new Array(p).fill("..").join("/"), fullpath: d += (f ? "" : c) + m }), f = true;
2178
+ }
2179
+ this.cwd = l;
2180
+ }
2181
+ depth(t = this.cwd) {
2182
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.depth();
2183
+ }
2184
+ childrenCache() {
2185
+ return this.#n;
2186
+ }
2187
+ resolve(...t) {
2188
+ let e = "";
2189
+ for (let r = t.length - 1; r >= 0; r--) {
2190
+ let o = t[r];
2191
+ if (!(!o || o === ".") && (e = e ? `${o}/${e}` : o, this.isAbsolute(o))) break;
2192
+ }
2193
+ let s = this.#t.get(e);
2194
+ if (s !== void 0) return s;
2195
+ let i = this.cwd.resolve(e).fullpath();
2196
+ return this.#t.set(e, i), i;
2197
+ }
2198
+ resolvePosix(...t) {
2199
+ let e = "";
2200
+ for (let r = t.length - 1; r >= 0; r--) {
2201
+ let o = t[r];
2202
+ if (!(!o || o === ".") && (e = e ? `${o}/${e}` : o, this.isAbsolute(o))) break;
2203
+ }
2204
+ let s = this.#s.get(e);
2205
+ if (s !== void 0) return s;
2206
+ let i = this.cwd.resolve(e).fullpathPosix();
2207
+ return this.#s.set(e, i), i;
2208
+ }
2209
+ relative(t = this.cwd) {
2210
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.relative();
2211
+ }
2212
+ relativePosix(t = this.cwd) {
2213
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.relativePosix();
2214
+ }
2215
+ basename(t = this.cwd) {
2216
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.name;
2217
+ }
2218
+ dirname(t = this.cwd) {
2219
+ return typeof t == "string" && (t = this.cwd.resolve(t)), (t.parent || t).fullpath();
2220
+ }
2221
+ async readdir(t = this.cwd, e = { withFileTypes: true }) {
2222
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2223
+ let { withFileTypes: s } = e;
2224
+ if (t.canReaddir()) {
2225
+ let i = await t.readdir();
2226
+ return s ? i : i.map((r) => r.name);
2227
+ } else return [];
2228
+ }
2229
+ readdirSync(t = this.cwd, e = { withFileTypes: true }) {
2230
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2231
+ let { withFileTypes: s = true } = e;
2232
+ return t.canReaddir() ? s ? t.readdirSync() : t.readdirSync().map((i) => i.name) : [];
2233
+ }
2234
+ async lstat(t = this.cwd) {
2235
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstat();
2236
+ }
2237
+ lstatSync(t = this.cwd) {
2238
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstatSync();
2239
+ }
2240
+ async readlink(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2241
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2242
+ let s = await t.readlink();
2243
+ return e ? s : s?.fullpath();
2244
+ }
2245
+ readlinkSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2246
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2247
+ let s = t.readlinkSync();
2248
+ return e ? s : s?.fullpath();
2249
+ }
2250
+ async realpath(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2251
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2252
+ let s = await t.realpath();
2253
+ return e ? s : s?.fullpath();
2254
+ }
2255
+ realpathSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2256
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2257
+ let s = t.realpathSync();
2258
+ return e ? s : s?.fullpath();
2259
+ }
2260
+ async walk(t = this.cwd, e = {}) {
2261
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2262
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = [];
2263
+ (!r || r(t)) && h.push(s ? t : t.fullpath());
2264
+ let a = /* @__PURE__ */ new Set(), l = (c, d) => {
2265
+ a.add(c), c.readdirCB((f, m) => {
2266
+ if (f) return d(f);
2267
+ let p = m.length;
2268
+ if (!p) return d();
2269
+ let w = () => {
2270
+ --p === 0 && d();
2271
+ };
2272
+ for (let g of m) (!r || r(g)) && h.push(s ? g : g.fullpath()), i && g.isSymbolicLink() ? g.realpath().then((S) => S?.isUnknown() ? S.lstat() : S).then((S) => S?.shouldWalk(a, o) ? l(S, w) : w()) : g.shouldWalk(a, o) ? l(g, w) : w();
2273
+ }, true);
2274
+ }, u = t;
2275
+ return new Promise((c, d) => {
2276
+ l(u, (f) => {
2277
+ if (f) return d(f);
2278
+ c(h);
2279
+ });
2280
+ });
2281
+ }
2282
+ walkSync(t = this.cwd, e = {}) {
2283
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2284
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = [];
2285
+ (!r || r(t)) && h.push(s ? t : t.fullpath());
2286
+ let a = /* @__PURE__ */ new Set([t]);
2287
+ for (let l of a) {
2288
+ let u = l.readdirSync();
2289
+ for (let c of u) {
2290
+ (!r || r(c)) && h.push(s ? c : c.fullpath());
2291
+ let d = c;
2292
+ if (c.isSymbolicLink()) {
2293
+ if (!(i && (d = c.realpathSync()))) continue;
2294
+ d.isUnknown() && d.lstatSync();
2295
+ }
2296
+ d.shouldWalk(a, o) && a.add(d);
2297
+ }
2298
+ }
2299
+ return h;
2300
+ }
2301
+ [Symbol.asyncIterator]() {
2302
+ return this.iterate();
2303
+ }
2304
+ iterate(t = this.cwd, e = {}) {
2305
+ return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd), this.stream(t, e)[Symbol.asyncIterator]();
2306
+ }
2307
+ [Symbol.iterator]() {
2308
+ return this.iterateSync();
2309
+ }
2310
+ *iterateSync(t = this.cwd, e = {}) {
2311
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2312
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e;
2313
+ (!r || r(t)) && (yield s ? t : t.fullpath());
2314
+ let h = /* @__PURE__ */ new Set([t]);
2315
+ for (let a of h) {
2316
+ let l = a.readdirSync();
2317
+ for (let u of l) {
2318
+ (!r || r(u)) && (yield s ? u : u.fullpath());
2319
+ let c = u;
2320
+ if (u.isSymbolicLink()) {
2321
+ if (!(i && (c = u.realpathSync()))) continue;
2322
+ c.isUnknown() && c.lstatSync();
2323
+ }
2324
+ c.shouldWalk(h, o) && h.add(c);
2325
+ }
2326
+ }
2327
+ }
2328
+ stream(t = this.cwd, e = {}) {
2329
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2330
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true });
2331
+ (!r || r(t)) && h.write(s ? t : t.fullpath());
2332
+ let a = /* @__PURE__ */ new Set(), l = [t], u = 0, c = () => {
2333
+ let d = false;
2334
+ for (; !d; ) {
2335
+ let f = l.shift();
2336
+ if (!f) {
2337
+ u === 0 && h.end();
2338
+ return;
2339
+ }
2340
+ u++, a.add(f);
2341
+ let m = (w, g, S = false) => {
2342
+ if (w) return h.emit("error", w);
2343
+ if (i && !S) {
2344
+ let E = [];
2345
+ for (let y of g) y.isSymbolicLink() && E.push(y.realpath().then((b) => b?.isUnknown() ? b.lstat() : b));
2346
+ if (E.length) {
2347
+ Promise.all(E).then(() => m(null, g, true));
2348
+ return;
2349
+ }
2350
+ }
2351
+ for (let E of g) E && (!r || r(E)) && (h.write(s ? E : E.fullpath()) || (d = true));
2352
+ u--;
2353
+ for (let E of g) {
2354
+ let y = E.realpathCached() || E;
2355
+ y.shouldWalk(a, o) && l.push(y);
2356
+ }
2357
+ d && !h.flowing ? h.once("drain", c) : p || c();
2358
+ }, p = true;
2359
+ f.readdirCB(m, true), p = false;
2360
+ }
2361
+ };
2362
+ return c(), h;
2363
+ }
2364
+ streamSync(t = this.cwd, e = {}) {
2365
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2366
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true }), a = /* @__PURE__ */ new Set();
2367
+ (!r || r(t)) && h.write(s ? t : t.fullpath());
2368
+ let l = [t], u = 0, c = () => {
2369
+ let d = false;
2370
+ for (; !d; ) {
2371
+ let f = l.shift();
2372
+ if (!f) {
2373
+ u === 0 && h.end();
2374
+ return;
2375
+ }
2376
+ u++, a.add(f);
2377
+ let m = f.readdirSync();
2378
+ for (let p of m) (!r || r(p)) && (h.write(s ? p : p.fullpath()) || (d = true));
2379
+ u--;
2380
+ for (let p of m) {
2381
+ let w = p;
2382
+ if (p.isSymbolicLink()) {
2383
+ if (!(i && (w = p.realpathSync()))) continue;
2384
+ w.isUnknown() && w.lstatSync();
2385
+ }
2386
+ w.shouldWalk(a, o) && l.push(w);
2387
+ }
2388
+ }
2389
+ d && !h.flowing && h.once("drain", c);
2390
+ };
2391
+ return c(), h;
2392
+ }
2393
+ chdir(t = this.cwd) {
2394
+ let e = this.cwd;
2395
+ this.cwd = typeof t == "string" ? this.cwd.resolve(t) : t, this.cwd[Ye](e);
2396
+ }
2397
+ };
2398
+ var it = class extends It {
2399
+ sep = "\\";
2400
+ constructor(t = process.cwd(), e = {}) {
2401
+ let { nocase: s = true } = e;
2402
+ super(t, re, "\\", { ...e, nocase: s }), this.nocase = s;
2403
+ for (let i = this.cwd; i; i = i.parent) i.nocase = this.nocase;
2404
+ }
2405
+ parseRootPath(t) {
2406
+ return re.parse(t).root.toUpperCase();
2407
+ }
2408
+ newRoot(t) {
2409
+ return new Pt(this.rootPath, U, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
2410
+ }
2411
+ isAbsolute(t) {
2412
+ return t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t);
2413
+ }
2414
+ };
2415
+ var rt = class extends It {
2416
+ sep = "/";
2417
+ constructor(t = process.cwd(), e = {}) {
2418
+ let { nocase: s = false } = e;
2419
+ super(t, mi, "/", { ...e, nocase: s }), this.nocase = s;
2420
+ }
2421
+ parseRootPath(t) {
2422
+ return "/";
2423
+ }
2424
+ newRoot(t) {
2425
+ return new jt(this.rootPath, U, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
2426
+ }
2427
+ isAbsolute(t) {
2428
+ return t.startsWith("/");
2429
+ }
2430
+ };
2431
+ var St = class extends rt {
2432
+ constructor(t = process.cwd(), e = {}) {
2433
+ let { nocase: s = true } = e;
2434
+ super(t, { ...e, nocase: s });
2435
+ }
2436
+ };
2437
+ var Cr = process.platform === "win32" ? Pt : jt;
2438
+ var Xe = process.platform === "win32" ? it : process.platform === "darwin" ? St : rt;
2439
+ var Di = (n7) => n7.length >= 1;
2440
+ var Mi = (n7) => n7.length >= 1;
2441
+ var Ni = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
2442
+ var nt = class n4 {
2443
+ #t;
2444
+ #s;
2445
+ #n;
2446
+ length;
2447
+ #r;
2448
+ #o;
2449
+ #S;
2450
+ #w;
2451
+ #c;
2452
+ #h;
2453
+ #u = true;
2454
+ constructor(t, e, s, i) {
2455
+ if (!Di(t)) throw new TypeError("empty pattern list");
2456
+ if (!Mi(e)) throw new TypeError("empty glob list");
2457
+ if (e.length !== t.length) throw new TypeError("mismatched pattern list and glob list lengths");
2458
+ if (this.length = t.length, s < 0 || s >= this.length) throw new TypeError("index out of range");
2459
+ if (this.#t = t, this.#s = e, this.#n = s, this.#r = i, this.#n === 0) {
2460
+ if (this.isUNC()) {
2461
+ let [r, o, h, a, ...l] = this.#t, [u, c, d, f, ...m] = this.#s;
2462
+ l[0] === "" && (l.shift(), m.shift());
2463
+ let p = [r, o, h, a, ""].join("/"), w = [u, c, d, f, ""].join("/");
2464
+ this.#t = [p, ...l], this.#s = [w, ...m], this.length = this.#t.length;
2465
+ } else if (this.isDrive() || this.isAbsolute()) {
2466
+ let [r, ...o] = this.#t, [h, ...a] = this.#s;
2467
+ o[0] === "" && (o.shift(), a.shift());
2468
+ let l = r + "/", u = h + "/";
2469
+ this.#t = [l, ...o], this.#s = [u, ...a], this.length = this.#t.length;
2470
+ }
2471
+ }
2472
+ }
2473
+ [Ni]() {
2474
+ return "Pattern <" + this.#s.slice(this.#n).join("/") + ">";
2475
+ }
2476
+ pattern() {
2477
+ return this.#t[this.#n];
2478
+ }
2479
+ isString() {
2480
+ return typeof this.#t[this.#n] == "string";
2481
+ }
2482
+ isGlobstar() {
2483
+ return this.#t[this.#n] === A;
2484
+ }
2485
+ isRegExp() {
2486
+ return this.#t[this.#n] instanceof RegExp;
2487
+ }
2488
+ globString() {
2489
+ return this.#S = this.#S || (this.#n === 0 ? this.isAbsolute() ? this.#s[0] + this.#s.slice(1).join("/") : this.#s.join("/") : this.#s.slice(this.#n).join("/"));
2490
+ }
2491
+ hasMore() {
2492
+ return this.length > this.#n + 1;
2493
+ }
2494
+ rest() {
2495
+ return this.#o !== void 0 ? this.#o : this.hasMore() ? (this.#o = new n4(this.#t, this.#s, this.#n + 1, this.#r), this.#o.#h = this.#h, this.#o.#c = this.#c, this.#o.#w = this.#w, this.#o) : this.#o = null;
2496
+ }
2497
+ isUNC() {
2498
+ let t = this.#t;
2499
+ return this.#c !== void 0 ? this.#c : this.#c = this.#r === "win32" && this.#n === 0 && t[0] === "" && t[1] === "" && typeof t[2] == "string" && !!t[2] && typeof t[3] == "string" && !!t[3];
2500
+ }
2501
+ isDrive() {
2502
+ let t = this.#t;
2503
+ return this.#w !== void 0 ? this.#w : this.#w = this.#r === "win32" && this.#n === 0 && this.length > 1 && typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]);
2504
+ }
2505
+ isAbsolute() {
2506
+ let t = this.#t;
2507
+ return this.#h !== void 0 ? this.#h : this.#h = t[0] === "" && t.length > 1 || this.isDrive() || this.isUNC();
2508
+ }
2509
+ root() {
2510
+ let t = this.#t[0];
2511
+ return typeof t == "string" && this.isAbsolute() && this.#n === 0 ? t : "";
2512
+ }
2513
+ checkFollowGlobstar() {
2514
+ return !(this.#n === 0 || !this.isGlobstar() || !this.#u);
2515
+ }
2516
+ markFollowGlobstar() {
2517
+ return this.#n === 0 || !this.isGlobstar() || !this.#u ? false : (this.#u = false, true);
2518
+ }
2519
+ };
2520
+ var _i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
2521
+ var ot = class {
2522
+ relative;
2523
+ relativeChildren;
2524
+ absolute;
2525
+ absoluteChildren;
2526
+ platform;
2527
+ mmopts;
2528
+ constructor(t, { nobrace: e, nocase: s, noext: i, noglobstar: r, platform: o = _i }) {
2529
+ this.relative = [], this.absolute = [], this.relativeChildren = [], this.absoluteChildren = [], this.platform = o, this.mmopts = { dot: true, nobrace: e, nocase: s, noext: i, noglobstar: r, optimizationLevel: 2, platform: o, nocomment: true, nonegate: true };
2530
+ for (let h of t) this.add(h);
2531
+ }
2532
+ add(t) {
2533
+ let e = new D(t, this.mmopts);
2534
+ for (let s = 0; s < e.set.length; s++) {
2535
+ let i = e.set[s], r = e.globParts[s];
2536
+ if (!i || !r) throw new Error("invalid pattern object");
2537
+ for (; i[0] === "." && r[0] === "."; ) i.shift(), r.shift();
2538
+ let o = new nt(i, r, 0, this.platform), h = new D(o.globString(), this.mmopts), a = r[r.length - 1] === "**", l = o.isAbsolute();
2539
+ l ? this.absolute.push(h) : this.relative.push(h), a && (l ? this.absoluteChildren.push(h) : this.relativeChildren.push(h));
2540
+ }
2541
+ }
2542
+ ignored(t) {
2543
+ let e = t.fullpath(), s = `${e}/`, i = t.relative() || ".", r = `${i}/`;
2544
+ for (let o of this.relative) if (o.match(i) || o.match(r)) return true;
2545
+ for (let o of this.absolute) if (o.match(e) || o.match(s)) return true;
2546
+ return false;
2547
+ }
2548
+ childrenIgnored(t) {
2549
+ let e = t.fullpath() + "/", s = (t.relative() || ".") + "/";
2550
+ for (let i of this.relativeChildren) if (i.match(s)) return true;
2551
+ for (let i of this.absoluteChildren) if (i.match(e)) return true;
2552
+ return false;
2553
+ }
2554
+ };
2555
+ var oe = class n5 {
2556
+ store;
2557
+ constructor(t = /* @__PURE__ */ new Map()) {
2558
+ this.store = t;
2559
+ }
2560
+ copy() {
2561
+ return new n5(new Map(this.store));
2562
+ }
2563
+ hasWalked(t, e) {
2564
+ return this.store.get(t.fullpath())?.has(e.globString());
2565
+ }
2566
+ storeWalked(t, e) {
2567
+ let s = t.fullpath(), i = this.store.get(s);
2568
+ i ? i.add(e.globString()) : this.store.set(s, /* @__PURE__ */ new Set([e.globString()]));
2569
+ }
2570
+ };
2571
+ var he = class {
2572
+ store = /* @__PURE__ */ new Map();
2573
+ add(t, e, s) {
2574
+ let i = (e ? 2 : 0) | (s ? 1 : 0), r = this.store.get(t);
2575
+ this.store.set(t, r === void 0 ? i : i & r);
2576
+ }
2577
+ entries() {
2578
+ return [...this.store.entries()].map(([t, e]) => [t, !!(e & 2), !!(e & 1)]);
2579
+ }
2580
+ };
2581
+ var ae = class {
2582
+ store = /* @__PURE__ */ new Map();
2583
+ add(t, e) {
2584
+ if (!t.canReaddir()) return;
2585
+ let s = this.store.get(t);
2586
+ s ? s.find((i) => i.globString() === e.globString()) || s.push(e) : this.store.set(t, [e]);
2587
+ }
2588
+ get(t) {
2589
+ let e = this.store.get(t);
2590
+ if (!e) throw new Error("attempting to walk unknown path");
2591
+ return e;
2592
+ }
2593
+ entries() {
2594
+ return this.keys().map((t) => [t, this.store.get(t)]);
2595
+ }
2596
+ keys() {
2597
+ return [...this.store.keys()].filter((t) => t.canReaddir());
2598
+ }
2599
+ };
2600
+ var Et = class n6 {
2601
+ hasWalkedCache;
2602
+ matches = new he();
2603
+ subwalks = new ae();
2604
+ patterns;
2605
+ follow;
2606
+ dot;
2607
+ opts;
2608
+ constructor(t, e) {
2609
+ this.opts = t, this.follow = !!t.follow, this.dot = !!t.dot, this.hasWalkedCache = e ? e.copy() : new oe();
2610
+ }
2611
+ processPatterns(t, e) {
2612
+ this.patterns = e;
2613
+ let s = e.map((i) => [t, i]);
2614
+ for (let [i, r] of s) {
2615
+ this.hasWalkedCache.storeWalked(i, r);
2616
+ let o = r.root(), h = r.isAbsolute() && this.opts.absolute !== false;
2617
+ if (o) {
2618
+ i = i.resolve(o === "/" && this.opts.root !== void 0 ? this.opts.root : o);
2619
+ let c = r.rest();
2620
+ if (c) r = c;
2621
+ else {
2622
+ this.matches.add(i, true, false);
2623
+ continue;
2624
+ }
2625
+ }
2626
+ if (i.isENOENT()) continue;
2627
+ let a, l, u = false;
2628
+ for (; typeof (a = r.pattern()) == "string" && (l = r.rest()); ) i = i.resolve(a), r = l, u = true;
2629
+ if (a = r.pattern(), l = r.rest(), u) {
2630
+ if (this.hasWalkedCache.hasWalked(i, r)) continue;
2631
+ this.hasWalkedCache.storeWalked(i, r);
2632
+ }
2633
+ if (typeof a == "string") {
2634
+ let c = a === ".." || a === "" || a === ".";
2635
+ this.matches.add(i.resolve(a), h, c);
2636
+ continue;
2637
+ } else if (a === A) {
2638
+ (!i.isSymbolicLink() || this.follow || r.checkFollowGlobstar()) && this.subwalks.add(i, r);
2639
+ let c = l?.pattern(), d = l?.rest();
2640
+ if (!l || (c === "" || c === ".") && !d) this.matches.add(i, h, c === "" || c === ".");
2641
+ else if (c === "..") {
2642
+ let f = i.parent || i;
2643
+ d ? this.hasWalkedCache.hasWalked(f, d) || this.subwalks.add(f, d) : this.matches.add(f, h, true);
2644
+ }
2645
+ } else a instanceof RegExp && this.subwalks.add(i, r);
2646
+ }
2647
+ return this;
2648
+ }
2649
+ subwalkTargets() {
2650
+ return this.subwalks.keys();
2651
+ }
2652
+ child() {
2653
+ return new n6(this.opts, this.hasWalkedCache);
2654
+ }
2655
+ filterEntries(t, e) {
2656
+ let s = this.subwalks.get(t), i = this.child();
2657
+ for (let r of e) for (let o of s) {
2658
+ let h = o.isAbsolute(), a = o.pattern(), l = o.rest();
2659
+ a === A ? i.testGlobstar(r, o, l, h) : a instanceof RegExp ? i.testRegExp(r, a, l, h) : i.testString(r, a, l, h);
2660
+ }
2661
+ return i;
2662
+ }
2663
+ testGlobstar(t, e, s, i) {
2664
+ if ((this.dot || !t.name.startsWith(".")) && (e.hasMore() || this.matches.add(t, i, false), t.canReaddir() && (this.follow || !t.isSymbolicLink() ? this.subwalks.add(t, e) : t.isSymbolicLink() && (s && e.checkFollowGlobstar() ? this.subwalks.add(t, s) : e.markFollowGlobstar() && this.subwalks.add(t, e)))), s) {
2665
+ let r = s.pattern();
2666
+ if (typeof r == "string" && r !== ".." && r !== "" && r !== ".") this.testString(t, r, s.rest(), i);
2667
+ else if (r === "..") {
2668
+ let o = t.parent || t;
2669
+ this.subwalks.add(o, s);
2670
+ } else r instanceof RegExp && this.testRegExp(t, r, s.rest(), i);
2671
+ }
2672
+ }
2673
+ testRegExp(t, e, s, i) {
2674
+ e.test(t.name) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, false));
2675
+ }
2676
+ testString(t, e, s, i) {
2677
+ t.isNamed(e) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, false));
2678
+ }
2679
+ };
2680
+ var Li = (n7, t) => typeof n7 == "string" ? new ot([n7], t) : Array.isArray(n7) ? new ot(n7, t) : n7;
2681
+ var zt = class {
2682
+ path;
2683
+ patterns;
2684
+ opts;
2685
+ seen = /* @__PURE__ */ new Set();
2686
+ paused = false;
2687
+ aborted = false;
2688
+ #t = [];
2689
+ #s;
2690
+ #n;
2691
+ signal;
2692
+ maxDepth;
2693
+ includeChildMatches;
2694
+ constructor(t, e, s) {
2695
+ if (this.patterns = t, this.path = e, this.opts = s, this.#n = !s.posix && s.platform === "win32" ? "\\" : "/", this.includeChildMatches = s.includeChildMatches !== false, (s.ignore || !this.includeChildMatches) && (this.#s = Li(s.ignore ?? [], s), !this.includeChildMatches && typeof this.#s.add != "function")) {
2696
+ let i = "cannot ignore child matches, ignore lacks add() method.";
2697
+ throw new Error(i);
2698
+ }
2699
+ this.maxDepth = s.maxDepth || 1 / 0, s.signal && (this.signal = s.signal, this.signal.addEventListener("abort", () => {
2700
+ this.#t.length = 0;
2701
+ }));
2702
+ }
2703
+ #r(t) {
2704
+ return this.seen.has(t) || !!this.#s?.ignored?.(t);
2705
+ }
2706
+ #o(t) {
2707
+ return !!this.#s?.childrenIgnored?.(t);
2708
+ }
2709
+ pause() {
2710
+ this.paused = true;
2711
+ }
2712
+ resume() {
2713
+ if (this.signal?.aborted) return;
2714
+ this.paused = false;
2715
+ let t;
2716
+ for (; !this.paused && (t = this.#t.shift()); ) t();
2717
+ }
2718
+ onResume(t) {
2719
+ this.signal?.aborted || (this.paused ? this.#t.push(t) : t());
2720
+ }
2721
+ async matchCheck(t, e) {
2722
+ if (e && this.opts.nodir) return;
2723
+ let s;
2724
+ if (this.opts.realpath) {
2725
+ if (s = t.realpathCached() || await t.realpath(), !s) return;
2726
+ t = s;
2727
+ }
2728
+ let r = t.isUnknown() || this.opts.stat ? await t.lstat() : t;
2729
+ if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
2730
+ let o = await r.realpath();
2731
+ o && (o.isUnknown() || this.opts.stat) && await o.lstat();
2732
+ }
2733
+ return this.matchCheckTest(r, e);
2734
+ }
2735
+ matchCheckTest(t, e) {
2736
+ return t && (this.maxDepth === 1 / 0 || t.depth() <= this.maxDepth) && (!e || t.canReaddir()) && (!this.opts.nodir || !t.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !t.isSymbolicLink() || !t.realpathCached()?.isDirectory()) && !this.#r(t) ? t : void 0;
2737
+ }
2738
+ matchCheckSync(t, e) {
2739
+ if (e && this.opts.nodir) return;
2740
+ let s;
2741
+ if (this.opts.realpath) {
2742
+ if (s = t.realpathCached() || t.realpathSync(), !s) return;
2743
+ t = s;
2744
+ }
2745
+ let r = t.isUnknown() || this.opts.stat ? t.lstatSync() : t;
2746
+ if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
2747
+ let o = r.realpathSync();
2748
+ o && (o?.isUnknown() || this.opts.stat) && o.lstatSync();
2749
+ }
2750
+ return this.matchCheckTest(r, e);
2751
+ }
2752
+ matchFinish(t, e) {
2753
+ if (this.#r(t)) return;
2754
+ if (!this.includeChildMatches && this.#s?.add) {
2755
+ let r = `${t.relativePosix()}/**`;
2756
+ this.#s.add(r);
2757
+ }
2758
+ let s = this.opts.absolute === void 0 ? e : this.opts.absolute;
2759
+ this.seen.add(t);
2760
+ let i = this.opts.mark && t.isDirectory() ? this.#n : "";
2761
+ if (this.opts.withFileTypes) this.matchEmit(t);
2762
+ else if (s) {
2763
+ let r = this.opts.posix ? t.fullpathPosix() : t.fullpath();
2764
+ this.matchEmit(r + i);
2765
+ } else {
2766
+ let r = this.opts.posix ? t.relativePosix() : t.relative(), o = this.opts.dotRelative && !r.startsWith(".." + this.#n) ? "." + this.#n : "";
2767
+ this.matchEmit(r ? o + r + i : "." + i);
2768
+ }
2769
+ }
2770
+ async match(t, e, s) {
2771
+ let i = await this.matchCheck(t, s);
2772
+ i && this.matchFinish(i, e);
2773
+ }
2774
+ matchSync(t, e, s) {
2775
+ let i = this.matchCheckSync(t, s);
2776
+ i && this.matchFinish(i, e);
2777
+ }
2778
+ walkCB(t, e, s) {
2779
+ this.signal?.aborted && s(), this.walkCB2(t, e, new Et(this.opts), s);
2780
+ }
2781
+ walkCB2(t, e, s, i) {
2782
+ if (this.#o(t)) return i();
2783
+ if (this.signal?.aborted && i(), this.paused) {
2784
+ this.onResume(() => this.walkCB2(t, e, s, i));
2785
+ return;
2786
+ }
2787
+ s.processPatterns(t, e);
2788
+ let r = 1, o = () => {
2789
+ --r === 0 && i();
2790
+ };
2791
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || (r++, this.match(h, a, l).then(() => o()));
2792
+ for (let h of s.subwalkTargets()) {
2793
+ if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
2794
+ r++;
2795
+ let a = h.readdirCached();
2796
+ h.calledReaddir() ? this.walkCB3(h, a, s, o) : h.readdirCB((l, u) => this.walkCB3(h, u, s, o), true);
2797
+ }
2798
+ o();
2799
+ }
2800
+ walkCB3(t, e, s, i) {
2801
+ s = s.filterEntries(t, e);
2802
+ let r = 1, o = () => {
2803
+ --r === 0 && i();
2804
+ };
2805
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || (r++, this.match(h, a, l).then(() => o()));
2806
+ for (let [h, a] of s.subwalks.entries()) r++, this.walkCB2(h, a, s.child(), o);
2807
+ o();
2808
+ }
2809
+ walkCBSync(t, e, s) {
2810
+ this.signal?.aborted && s(), this.walkCB2Sync(t, e, new Et(this.opts), s);
2811
+ }
2812
+ walkCB2Sync(t, e, s, i) {
2813
+ if (this.#o(t)) return i();
2814
+ if (this.signal?.aborted && i(), this.paused) {
2815
+ this.onResume(() => this.walkCB2Sync(t, e, s, i));
2816
+ return;
2817
+ }
2818
+ s.processPatterns(t, e);
2819
+ let r = 1, o = () => {
2820
+ --r === 0 && i();
2821
+ };
2822
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || this.matchSync(h, a, l);
2823
+ for (let h of s.subwalkTargets()) {
2824
+ if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
2825
+ r++;
2826
+ let a = h.readdirSync();
2827
+ this.walkCB3Sync(h, a, s, o);
2828
+ }
2829
+ o();
2830
+ }
2831
+ walkCB3Sync(t, e, s, i) {
2832
+ s = s.filterEntries(t, e);
2833
+ let r = 1, o = () => {
2834
+ --r === 0 && i();
2835
+ };
2836
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || this.matchSync(h, a, l);
2837
+ for (let [h, a] of s.subwalks.entries()) r++, this.walkCB2Sync(h, a, s.child(), o);
2838
+ o();
2839
+ }
2840
+ };
2841
+ var xt = class extends zt {
2842
+ matches = /* @__PURE__ */ new Set();
2843
+ constructor(t, e, s) {
2844
+ super(t, e, s);
2845
+ }
2846
+ matchEmit(t) {
2847
+ this.matches.add(t);
2848
+ }
2849
+ async walk() {
2850
+ if (this.signal?.aborted) throw this.signal.reason;
2851
+ return this.path.isUnknown() && await this.path.lstat(), await new Promise((t, e) => {
2852
+ this.walkCB(this.path, this.patterns, () => {
2853
+ this.signal?.aborted ? e(this.signal.reason) : t(this.matches);
2854
+ });
2855
+ }), this.matches;
2856
+ }
2857
+ walkSync() {
2858
+ if (this.signal?.aborted) throw this.signal.reason;
2859
+ return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => {
2860
+ if (this.signal?.aborted) throw this.signal.reason;
2861
+ }), this.matches;
2862
+ }
2863
+ };
2864
+ var vt = class extends zt {
2865
+ results;
2866
+ constructor(t, e, s) {
2867
+ super(t, e, s), this.results = new V({ signal: this.signal, objectMode: true }), this.results.on("drain", () => this.resume()), this.results.on("resume", () => this.resume());
2868
+ }
2869
+ matchEmit(t) {
2870
+ this.results.write(t), this.results.flowing || this.pause();
2871
+ }
2872
+ stream() {
2873
+ let t = this.path;
2874
+ return t.isUnknown() ? t.lstat().then(() => {
2875
+ this.walkCB(t, this.patterns, () => this.results.end());
2876
+ }) : this.walkCB(t, this.patterns, () => this.results.end()), this.results;
2877
+ }
2878
+ streamSync() {
2879
+ return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
2880
+ }
2881
+ };
2882
+ var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
2883
+ var I = class {
2884
+ absolute;
2885
+ cwd;
2886
+ root;
2887
+ dot;
2888
+ dotRelative;
2889
+ follow;
2890
+ ignore;
2891
+ magicalBraces;
2892
+ mark;
2893
+ matchBase;
2894
+ maxDepth;
2895
+ nobrace;
2896
+ nocase;
2897
+ nodir;
2898
+ noext;
2899
+ noglobstar;
2900
+ pattern;
2901
+ platform;
2902
+ realpath;
2903
+ scurry;
2904
+ stat;
2905
+ signal;
2906
+ windowsPathsNoEscape;
2907
+ withFileTypes;
2908
+ includeChildMatches;
2909
+ opts;
2910
+ patterns;
2911
+ constructor(t, e) {
2912
+ if (!e) throw new TypeError("glob options required");
2913
+ if (this.withFileTypes = !!e.withFileTypes, this.signal = e.signal, this.follow = !!e.follow, this.dot = !!e.dot, this.dotRelative = !!e.dotRelative, this.nodir = !!e.nodir, this.mark = !!e.mark, e.cwd ? (e.cwd instanceof URL || e.cwd.startsWith("file://")) && (e.cwd = Wi(e.cwd)) : this.cwd = "", this.cwd = e.cwd || "", this.root = e.root, this.magicalBraces = !!e.magicalBraces, this.nobrace = !!e.nobrace, this.noext = !!e.noext, this.realpath = !!e.realpath, this.absolute = e.absolute, this.includeChildMatches = e.includeChildMatches !== false, this.noglobstar = !!e.noglobstar, this.matchBase = !!e.matchBase, this.maxDepth = typeof e.maxDepth == "number" ? e.maxDepth : 1 / 0, this.stat = !!e.stat, this.ignore = e.ignore, this.withFileTypes && this.absolute !== void 0) throw new Error("cannot set absolute and withFileTypes:true");
2914
+ if (typeof t == "string" && (t = [t]), this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e.allowWindowsEscape === false, this.windowsPathsNoEscape && (t = t.map((a) => a.replace(/\\/g, "/"))), this.matchBase) {
2915
+ if (e.noglobstar) throw new TypeError("base matching requires globstar");
2916
+ t = t.map((a) => a.includes("/") ? a : `./**/${a}`);
2917
+ }
2918
+ if (this.pattern = t, this.platform = e.platform || Pi, this.opts = { ...e, platform: this.platform }, e.scurry) {
2919
+ if (this.scurry = e.scurry, e.nocase !== void 0 && e.nocase !== e.scurry.nocase) throw new Error("nocase option contradicts provided scurry option");
2920
+ } else {
2921
+ let a = e.platform === "win32" ? it : e.platform === "darwin" ? St : e.platform ? rt : Xe;
2922
+ this.scurry = new a(this.cwd, { nocase: e.nocase, fs: e.fs });
2923
+ }
2924
+ this.nocase = this.scurry.nocase;
2925
+ let s = this.platform === "darwin" || this.platform === "win32", i = { braceExpandMax: 1e4, ...e, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r = this.pattern.map((a) => new D(a, i)), [o, h] = r.reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
2926
+ this.patterns = o.map((a, l) => {
2927
+ let u = h[l];
2928
+ if (!u) throw new Error("invalid pattern object");
2929
+ return new nt(a, u, 0, this.platform);
2930
+ });
2931
+ }
2932
+ async walk() {
2933
+ return [...await new xt(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()];
2934
+ }
2935
+ walkSync() {
2936
+ return [...new xt(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()];
2937
+ }
2938
+ stream() {
2939
+ return new vt(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();
2940
+ }
2941
+ streamSync() {
2942
+ return new vt(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();
2943
+ }
2944
+ iterateSync() {
2945
+ return this.streamSync()[Symbol.iterator]();
2946
+ }
2947
+ [Symbol.iterator]() {
2948
+ return this.iterateSync();
2949
+ }
2950
+ iterate() {
2951
+ return this.stream()[Symbol.asyncIterator]();
2952
+ }
2953
+ [Symbol.asyncIterator]() {
2954
+ return this.iterate();
2955
+ }
2956
+ };
2957
+ var le = (n7, t = {}) => {
2958
+ Array.isArray(n7) || (n7 = [n7]);
2959
+ for (let e of n7) if (new D(e, t).hasMagic()) return true;
2960
+ return false;
2961
+ };
2962
+ function Bt(n7, t = {}) {
2963
+ return new I(n7, t).streamSync();
2964
+ }
2965
+ function Qe(n7, t = {}) {
2966
+ return new I(n7, t).stream();
2967
+ }
2968
+ function ts(n7, t = {}) {
2969
+ return new I(n7, t).walkSync();
2970
+ }
2971
+ async function Je(n7, t = {}) {
2972
+ return new I(n7, t).walk();
2973
+ }
2974
+ function Ut(n7, t = {}) {
2975
+ return new I(n7, t).iterateSync();
2976
+ }
2977
+ function es(n7, t = {}) {
2978
+ return new I(n7, t).iterate();
2979
+ }
2980
+ var ji = Bt;
2981
+ var Ii = Object.assign(Qe, { sync: Bt });
2982
+ var zi = Ut;
2983
+ var Bi = Object.assign(es, { sync: Ut });
2984
+ var Ui = Object.assign(ts, { stream: Bt, iterate: Ut });
2985
+ var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync: Ui, globStream: Qe, stream: Ii, globStreamSync: Bt, streamSync: ji, globIterate: es, iterate: Bi, globIterateSync: Ut, iterateSync: zi, Glob: I, hasMagic: le, escape: tt, unescape: W });
2986
+ Ze.glob = Ze;
2987
+
2988
+ export {
2989
+ W,
2990
+ tt,
2991
+ ot,
2992
+ I,
2993
+ le,
2994
+ Bt,
2995
+ Qe,
2996
+ ts,
2997
+ Ut,
2998
+ es,
2999
+ ji,
3000
+ Ii,
3001
+ zi,
3002
+ Bi,
3003
+ Ui,
3004
+ Ze
3005
+ };