@readmagic/workmate 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (552) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-BSLHrjbt.js +1 -0
  2. package/dist/chunks/App-DY5O6IKw.js +1 -0
  3. package/dist/chunks/ApproveApiKey-BEzfC6r3.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DfAPwDix.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-Ce3PraaD.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-Dvhcgahe.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-B68V1bCq.js +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-CTWhpIm8.js +1 -0
  10. package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +1 -0
  11. package/dist/chunks/DesktopHandoff-BRbU4is4.js +1 -0
  12. package/dist/chunks/Dialog-vfLXEPed.js +1 -0
  13. package/dist/chunks/DiffDialog-CBluIK-x.js +6 -0
  14. package/dist/chunks/Doctor-B0CRtxi2.js +1 -0
  15. package/dist/chunks/Doctor-WxNv49HC.js +3 -0
  16. package/dist/chunks/ExitFlow-CRPgptCN.js +2 -0
  17. package/dist/chunks/Feedback-CEtzaLr3.js +2 -0
  18. package/dist/chunks/Grove--kttLxvs.js +11 -0
  19. package/dist/chunks/Grove-CelgLWH4.js +1 -0
  20. package/dist/chunks/HybridTransport-BgV5_7Az.js +4 -0
  21. package/dist/chunks/InvalidConfigDialog-DCGwXW_p.js +1 -0
  22. package/dist/chunks/InvalidSettingsDialog-jTwsdXWr.js +1 -0
  23. package/dist/chunks/ListItem-vfLXEPed.js +1 -0
  24. package/dist/chunks/MCPConnectionManager-BX0LMz9J.js +1 -0
  25. package/dist/chunks/McpParsingWarnings-WQrWJeWP.js +1 -0
  26. package/dist/chunks/MessageSelector-_UZB8cGb.js +3 -0
  27. package/dist/chunks/Messages-jCoW_1Rr.js +11 -0
  28. package/dist/chunks/Onboarding-BoIVNCgc.js +1 -0
  29. package/dist/chunks/OverageCreditUpsell-1FCN8bH3.js +1 -0
  30. package/dist/chunks/PermissionDialog-0ya1CU5k.js +1 -0
  31. package/dist/chunks/PluginSettings-BD9JLV9-.js +17 -0
  32. package/dist/chunks/PressEnterToContinue-Dl9Hg9Mf.js +1 -0
  33. package/dist/chunks/PromptInputFooterSuggestions-CrGST0Cq.js +1 -0
  34. package/dist/chunks/PromptInputHelpMenu-B2TDpbpw.js +1 -0
  35. package/dist/chunks/QueryEngine-D2HUnwmU.js +1 -0
  36. package/dist/chunks/REPL-BV4WyYMg.js +142 -0
  37. package/dist/chunks/REPL-DcpN3MRC.js +1 -0
  38. package/dist/chunks/RemoteCallout-DS_EV6Fh.js +1 -0
  39. package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +2 -0
  40. package/dist/chunks/ResumeConversation-Cw3vP4G8.js +1 -0
  41. package/dist/chunks/SSETransport-BXiEBMpb.js +4 -0
  42. package/dist/chunks/SearchBox-vfLXEPed.js +1 -0
  43. package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +1 -0
  44. package/dist/chunks/Settings-ns6mRsDc.js +2 -0
  45. package/dist/chunks/TeleportProgress-CcDzMC5L.js +1 -0
  46. package/dist/chunks/TeleportRepoMismatchDialog-DZbxl4sD.js +1 -0
  47. package/dist/chunks/TeleportResumeWrapper-EowJO5nm.js +1 -0
  48. package/dist/chunks/ThemePicker-BYbChJpu.js +1 -0
  49. package/dist/chunks/TrustDialog-DA3YTk_k.js +1 -0
  50. package/dist/chunks/TungstenTool-Cb7gJvq4.js +1 -0
  51. package/dist/chunks/TungstenTool-CxMQVCuF.js +1 -0
  52. package/dist/chunks/ValidationErrorsList-Cx-hoRwG.js +2 -0
  53. package/dist/chunks/WelcomeV2-BTfttGcv.js +1 -0
  54. package/dist/chunks/add-dir-CWt69NAZ.js +1 -0
  55. package/dist/chunks/agentDisplay-CQ4mZWFH.js +1 -0
  56. package/dist/chunks/agents-C6jzKOit.js +2 -0
  57. package/dist/chunks/agents-D4clhuCl.js +103 -0
  58. package/dist/chunks/ajv-5vMo9UcX.js +8 -0
  59. package/dist/chunks/allErrors-HMPqE0jK.js +1 -0
  60. package/dist/chunks/analytics-BotDBGh0.js +1 -0
  61. package/dist/chunks/ant-9Z5bppVC.js +1 -0
  62. package/dist/chunks/api-L2IgleTV.js +1 -0
  63. package/dist/chunks/api-TgV7fl9V.js +1 -0
  64. package/dist/chunks/asciicast-DYbkzGCN.js +1 -0
  65. package/dist/chunks/asciicast-n-BBfgDq.js +4 -0
  66. package/dist/chunks/assistant-BA9_Mo9U.js +1 -0
  67. package/dist/chunks/assistant-BiNOSla3.js +1 -0
  68. package/dist/chunks/assistant-YvbVKjVh.js +1 -0
  69. package/dist/chunks/attributionHooks-CUAoGkU6.js +1 -0
  70. package/dist/chunks/attributionTrailer-oKKrF3z8.js +1 -0
  71. package/dist/chunks/auth-CEig4Gxp.js +1 -0
  72. package/dist/chunks/auth-CbGDlhyO.js +1 -0
  73. package/dist/chunks/auth-DHyCIxCk.js +15 -0
  74. package/dist/chunks/autoMode-Db4QrgFr.js +45 -0
  75. package/dist/chunks/autoModeDenials-BxNzGJdR.js +1 -0
  76. package/dist/chunks/autonomy-BkAMA7du.js +1 -0
  77. package/dist/chunks/autonomy-D4Vy-RPQ.js +15 -0
  78. package/dist/chunks/autonomyPanel-EjfO8jvg.js +1 -0
  79. package/dist/chunks/axios-BHBm_hhU.js +1 -0
  80. package/dist/chunks/axios-DaWTGg7G.js +16 -0
  81. package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +1 -0
  82. package/dist/chunks/backgroundHousekeeping-hDDE8mJC.js +17 -0
  83. package/dist/chunks/banner-hD6wZygx.js +2 -0
  84. package/dist/chunks/base64-js-0wLHn8zB.js +1 -0
  85. package/dist/chunks/bedrockClient-DxE_mHFI.js +15 -0
  86. package/dist/chunks/bg-BzG63WOm.js +1 -0
  87. package/dist/chunks/bg-DQ0Q3Qv-.js +9 -0
  88. package/dist/chunks/branch-CeQ9IyZk.js +3 -0
  89. package/dist/chunks/break-cache-Bd0clV2N.js +8 -0
  90. package/dist/chunks/bridge-yerAiaK2.js +2 -0
  91. package/dist/chunks/bridgeConfig-CCtXe8ak.js +1 -0
  92. package/dist/chunks/bridgeConfig-D5dB38xD.js +1 -0
  93. package/dist/chunks/bridgeEnabled--F-6TUi4.js +1 -0
  94. package/dist/chunks/bridgeEnabled-DKX8-T_H.js +1 -0
  95. package/dist/chunks/bridgeMain--R1HFbOv.js +68 -0
  96. package/dist/chunks/bridgeMain-d06JByZn.js +1 -0
  97. package/dist/chunks/bridgeMessaging-CqbLTDcx.js +1 -0
  98. package/dist/chunks/bridgePointer-W_jdQ8zf.js +1 -0
  99. package/dist/chunks/browser-Bd7GeBH1.js +1 -0
  100. package/dist/chunks/btw-CVGRmL9a.js +1 -0
  101. package/dist/chunks/bundledMode--fG1S62b.js +1 -0
  102. package/dist/chunks/caches-BtmAri4e.js +3 -0
  103. package/dist/chunks/caches-BuTIAOtY.js +1 -0
  104. package/dist/chunks/capacityWake-CV_x9H8j.js +1 -0
  105. package/dist/chunks/ccrClient-HqMi5Kfu.js +1 -0
  106. package/dist/chunks/checksum-DgbnMdM-.js +1 -0
  107. package/dist/chunks/classPrivateFieldSet2-D4U5K-I3.js +1 -0
  108. package/dist/chunks/classPrivateMethodInitSpec-BXQD0Vh4.js +1 -0
  109. package/dist/chunks/claudeDesktop-aUMx06RK.js +1 -0
  110. package/dist/chunks/clear-C6nRzIQE.js +1 -0
  111. package/dist/chunks/cliLaunch-2AUoMnqx.js +1 -0
  112. package/dist/chunks/client-BeET1hnC.js +1 -0
  113. package/dist/chunks/client-DchQnIJD.js +36 -0
  114. package/dist/chunks/client-DvAL7lY8.js +8 -0
  115. package/dist/chunks/color-DXI_4ibU.js +1 -0
  116. package/dist/chunks/color-convert-p91EwGT7.js +1 -0
  117. package/dist/chunks/commands-VjcG4qFq.js +1 -0
  118. package/dist/chunks/commitAttribution-Cm40fdNU.js +2 -0
  119. package/dist/chunks/commitAttribution-Lb3qUlAR.js +1 -0
  120. package/dist/chunks/compact-DPTVpJ4D.js +2 -0
  121. package/dist/chunks/completionCache-BQaLkB4d.js +4 -0
  122. package/dist/chunks/completionCache-CW8lKIgy.js +1 -0
  123. package/dist/chunks/config-0cRberzR.js +1 -0
  124. package/dist/chunks/config-BSXLgwpD.js +1 -0
  125. package/dist/chunks/config-BrxKpHpR.js +1 -0
  126. package/dist/chunks/config-C7YHKCPV.js +3 -0
  127. package/dist/chunks/config-CLmFk-5V.js +1 -0
  128. package/dist/chunks/connectHeadless-CqRoEtrg.js +1 -0
  129. package/dist/chunks/context-C_cKrBUn.js +1 -0
  130. package/dist/chunks/context-noninteractive-DnH6Q9Lu.js +54 -0
  131. package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +1 -0
  132. package/dist/chunks/controlMessageCompat-IFu4Gc1y.js +1 -0
  133. package/dist/chunks/conversation-GJxfkr6M.js +1 -0
  134. package/dist/chunks/conversation-oK3aFzqO.js +1 -0
  135. package/dist/chunks/createSSHSession--bWmmIk9.js +6 -0
  136. package/dist/chunks/createSession-DIr4sUp6.js +1 -0
  137. package/dist/chunks/createSession-DM4acqaC.js +1 -0
  138. package/dist/chunks/cron-3LntnnhJ.js +1 -0
  139. package/dist/chunks/crossProjectResume-DKrtjTpm.js +40 -0
  140. package/dist/chunks/cwd-BuJhkTrc.js +1 -0
  141. package/dist/chunks/cwd-D-tY2NKc.js +1 -0
  142. package/dist/chunks/daemon-B9lBPdBJ.js +2 -0
  143. package/dist/chunks/dangerousBackend-DwcP0P08.js +1 -0
  144. package/dist/chunks/datadog-ByS7LGGa.js +1 -0
  145. package/dist/chunks/datadog-DNCsyfSO.js +1 -0
  146. package/dist/chunks/debug-DzZUT2Wv.js +1 -0
  147. package/dist/chunks/debug-IKW-jE7K.js +39 -0
  148. package/dist/chunks/debugUtils-D2981c0Z.js +1 -0
  149. package/dist/chunks/defineProperty-C-QyHrDq.js +1 -0
  150. package/dist/chunks/desktop-B5cvrcOQ.js +1 -0
  151. package/dist/chunks/detached-rfIUyc-B.js +5 -0
  152. package/dist/chunks/detect-libc-CxbBtWJu.js +1 -0
  153. package/dist/chunks/detectRepository-6nw-Aw3v.js +1 -0
  154. package/dist/chunks/detectRepository-ReZ0Fz8Z.js +1 -0
  155. package/dist/chunks/diff-cXAp9cNN.js +1 -0
  156. package/dist/chunks/directoryCompletion-DBM2o5kx.js +1 -0
  157. package/dist/chunks/dist-CXlEpGqr.js +20 -0
  158. package/dist/chunks/dist-DESLAofA.js +1 -0
  159. package/dist/chunks/dist-DIee4wq1.js +29 -0
  160. package/dist/chunks/dist-Dopnn8wS.js +5 -0
  161. package/dist/chunks/dist-es-5t7v8oaj.js +1 -0
  162. package/dist/chunks/dist-es-BF6bR-Ik.js +2 -0
  163. package/dist/chunks/dist-es-BIjDeceU.js +1 -0
  164. package/dist/chunks/dist-es-BOPBJQo3.js +1 -0
  165. package/dist/chunks/dist-es-Bfr4TzQe.js +3 -0
  166. package/dist/chunks/dist-es-Byxccz_-.js +1 -0
  167. package/dist/chunks/dist-es-C-OjW2Ao.js +1 -0
  168. package/dist/chunks/dist-es-C3reqy7X.js +1 -0
  169. package/dist/chunks/dist-es-C7vygWzp.js +1 -0
  170. package/dist/chunks/dist-es-CEk66gUu.js +1 -0
  171. package/dist/chunks/dist-es-CIULjvtA2.js +1 -0
  172. package/dist/chunks/dist-es-CMtO44xC.js +1 -0
  173. package/dist/chunks/dist-es-CQMt6zRM.js +1 -0
  174. package/dist/chunks/dist-es-CYPVg66r.js +9 -0
  175. package/dist/chunks/dist-es-Cd_AeqMK.js +6 -0
  176. package/dist/chunks/dist-es-Cgsa8pb82.js +1 -0
  177. package/dist/chunks/dist-es-Cwru7c2B2.js +1 -0
  178. package/dist/chunks/dist-es-D1Y8zSMI.js +1 -0
  179. package/dist/chunks/dist-es-D1wHe_zh.js +1 -0
  180. package/dist/chunks/dist-es-DKFm0FJ7.js +1 -0
  181. package/dist/chunks/dist-es-DKIwwJME.js +1 -0
  182. package/dist/chunks/dist-es-DNFTCbrP.js +1 -0
  183. package/dist/chunks/dist-es-DXIR5NLi2.js +1 -0
  184. package/dist/chunks/dist-es-DelBIxNM.js +1 -0
  185. package/dist/chunks/dist-es-DmdZmEJ-.js +1 -0
  186. package/dist/chunks/dist-es-Gt_DpXlP.js +1 -0
  187. package/dist/chunks/dist-es-gUzZ_7Vf.js +1 -0
  188. package/dist/chunks/dist-es-kj-F5A132.js +1 -0
  189. package/dist/chunks/dist-es-yHGBqhBe.js +1 -0
  190. package/dist/chunks/doctor-CTMHXZvQ.js +1 -0
  191. package/dist/chunks/earlyInput-BTC_Wucv.js +2 -0
  192. package/dist/chunks/earlyInput-xcoTbKQn.js +1 -0
  193. package/dist/chunks/effort-Br8KKHdx.js +9 -0
  194. package/dist/chunks/entry-4lIRMrLI.js +14 -0
  195. package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +1 -0
  196. package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +1 -0
  197. package/dist/chunks/envUtils-DSxRz_kt.js +1 -0
  198. package/dist/chunks/esm-BYnFh4pG.js +1 -0
  199. package/dist/chunks/esm-Bx6rTxIs.js +1 -0
  200. package/dist/chunks/esm-C367Cyo-.js +1 -0
  201. package/dist/chunks/esm-C8Zkk1Ux.js +1 -0
  202. package/dist/chunks/esm-CGx9qY3q.js +56 -0
  203. package/dist/chunks/esm-CXM9jqO_.js +1 -0
  204. package/dist/chunks/esm-CXczu_-W.js +1 -0
  205. package/dist/chunks/esm-CXt5K8Xt.js +1 -0
  206. package/dist/chunks/esm-Cb-L4oAk.js +1 -0
  207. package/dist/chunks/esm-D6ZZCdtk.js +1 -0
  208. package/dist/chunks/esm-DhRjocaU.js +1 -0
  209. package/dist/chunks/esm-DklLYEuz.js +1 -0
  210. package/dist/chunks/esm-IYgGg4wR.js +1 -0
  211. package/dist/chunks/esm-lWlUmoUA.js +1 -0
  212. package/dist/chunks/esm-lyfry1WB.js +10 -0
  213. package/dist/chunks/esm-wGnzjq4Z.js +1 -0
  214. package/dist/chunks/event-streams-C0Zy0Uqv.js +1 -0
  215. package/dist/chunks/event-streams-DoqJmjFN.js +1 -0
  216. package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +1 -0
  217. package/dist/chunks/execAsync-Bv2yxuGe.js +1 -0
  218. package/dist/chunks/execFileNoThrow-COKYqVQj.js +34 -0
  219. package/dist/chunks/execSyncWrapper-DZJ3tNWF.js +1 -0
  220. package/dist/chunks/exit-BOhGfSlm.js +2 -0
  221. package/dist/chunks/exit-Z9oWrqE4.js +1 -0
  222. package/dist/chunks/extra-usage-BS4aVOt5.js +1 -0
  223. package/dist/chunks/extra-usage-DtAIhW74.js +1 -0
  224. package/dist/chunks/extra-usage-core-CdL1ltqq.js +1 -0
  225. package/dist/chunks/extra-usage-noninteractive-DxxRI0Yx.js +1 -0
  226. package/dist/chunks/extraUsage-BYZdi44Y.js +1 -0
  227. package/dist/chunks/extractMemories-C4f9JWuI.js +1 -0
  228. package/dist/chunks/fast-B0OB4x7K.js +1 -0
  229. package/dist/chunks/fast-DKqiojzf.js +1 -0
  230. package/dist/chunks/featureCheck-CrJeuheQ.js +1 -0
  231. package/dist/chunks/featureCheck-HslM03dr.js +1 -0
  232. package/dist/chunks/feedback-yB19xph5.js +1 -0
  233. package/dist/chunks/figures-5ThXQEtq.js +1 -0
  234. package/dist/chunks/file-D1cN3LMK.js +12 -0
  235. package/dist/chunks/fileStateCache-DDW5toIs.js +1 -0
  236. package/dist/chunks/files-DAzGtmzz.js +2 -0
  237. package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +1 -0
  238. package/dist/chunks/firstPartyEventLogger-hU-LPkje.js +5 -0
  239. package/dist/chunks/flushGate-ZFr8yv7F.js +1 -0
  240. package/dist/chunks/foundry-sdk-BdeF2aBu.js +1 -0
  241. package/dist/chunks/fpsMetrics-Cf_hdtiJ.js +1 -0
  242. package/dist/chunks/from-CgDRRLiX.js +4 -0
  243. package/dist/chunks/gemini-DqAv8_GY.js +1 -0
  244. package/dist/chunks/generateRecap-lO2PDlx8.js +1 -0
  245. package/dist/chunks/generateSessionName-48veu5dv.js +1 -0
  246. package/dist/chunks/genericProcessUtils-F1Qcb1sO.js +23 -0
  247. package/dist/chunks/getMachineId-bsd-Cut1kHoA.js +1 -0
  248. package/dist/chunks/getMachineId-darwin-CsRhaP3y.js +2 -0
  249. package/dist/chunks/getMachineId-linux-Bd7UBNRQ.js +1 -0
  250. package/dist/chunks/getMachineId-unsupported-vFGP8E_8.js +1 -0
  251. package/dist/chunks/getMachineId-win-DamF2CH_.js +1 -0
  252. package/dist/chunks/git-BE_FiJZp.js +1 -0
  253. package/dist/chunks/git-tyaWOgRL.js +6 -0
  254. package/dist/chunks/githubRepoPathMapping-BlR0BphY.js +1 -0
  255. package/dist/chunks/goal-Bn8Kz2Dp.js +3 -0
  256. package/dist/chunks/graceful-fs-DDVg0cja.js +2 -0
  257. package/dist/chunks/grok-DhnO_KDC.js +1 -0
  258. package/dist/chunks/grove-DotW04-v.js +7 -0
  259. package/dist/chunks/hash-Tu-My5Vp.js +1 -0
  260. package/dist/chunks/heapdump-DkZSKNbp.js +5 -0
  261. package/dist/chunks/help-DU_BcZtU.js +1 -0
  262. package/dist/chunks/hooks-BTMWE5Qx.js +79 -0
  263. package/dist/chunks/hooks-DONAb_nq.js +1 -0
  264. package/dist/chunks/hostGuard-Dh296c6q.js +1 -0
  265. package/dist/chunks/inboundAttachments-BcEgi49j.js +1 -0
  266. package/dist/chunks/inboundAttachments-DVs3_m48.js +1 -0
  267. package/dist/chunks/index.min-D75yiGLN.js +1 -0
  268. package/dist/chunks/initReplBridge-D0Xec8S-.js +1 -0
  269. package/dist/chunks/install-BkfXeXpv.js +1 -0
  270. package/dist/chunks/instinctParser-Dt-lqnDe.js +1 -0
  271. package/dist/chunks/instrumentation-H0XRS1yG.js +21 -0
  272. package/dist/chunks/intl-cKc-V6Mq.js +1 -0
  273. package/dist/chunks/isObject-C6qM3WEW.js +1 -0
  274. package/dist/chunks/isSymbol-BO6cdPI7.js +1 -0
  275. package/dist/chunks/job-DKtLkF8V.js +2 -0
  276. package/dist/chunks/json-bigint-bonnP-Hz.js +8 -0
  277. package/dist/chunks/jsx-runtime-Bb4Xn-E0.js +1 -0
  278. package/dist/chunks/jws-BscXOT9I.js +3 -0
  279. package/dist/chunks/jwtUtils-C-ojmb8W.js +1 -0
  280. package/dist/chunks/keybindings-ez51eHHp.js +2 -0
  281. package/dist/chunks/language-BuRSO2sR.js +1 -0
  282. package/dist/chunks/language-Da4KNbjm.js +1 -0
  283. package/dist/chunks/launchAgentsPlatform-BQyPdrHp.js +1 -0
  284. package/dist/chunks/launchCommand-1qkTCKpf.js +1 -0
  285. package/dist/chunks/launchLocalMemory-CWHAj7CX.js +3 -0
  286. package/dist/chunks/launchLocalVault-D8iJdtsP.js +3 -0
  287. package/dist/chunks/launchMemoryStores-W7jWG2uH.js +1 -0
  288. package/dist/chunks/launchOnboarding-q__LaLy1.js +8 -0
  289. package/dist/chunks/launchSchedule-BWi9F5vh.js +1 -0
  290. package/dist/chunks/launchSkillStore-4wd4MQBc.js +1 -0
  291. package/dist/chunks/launchTeleport-BlCf2QM_.js +3 -0
  292. package/dist/chunks/launchVault-C7u7LZV7.js +1 -0
  293. package/dist/chunks/lazySchema-uxlVVNM1.js +1 -0
  294. package/dist/chunks/lib-BSzUGQb_.js +2 -0
  295. package/dist/chunks/lib-BlVGipXx.js +14 -0
  296. package/dist/chunks/lib-rQZENxQg.js +8 -0
  297. package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +1 -0
  298. package/dist/chunks/loadAgentsDir-nzr38hai.js +3990 -0
  299. package/dist/chunks/loadPluginHooks-z1-zvBLw.js +1 -0
  300. package/dist/chunks/loadSso-DSxfVpgX.js +1 -0
  301. package/dist/chunks/localSearch-B-L_ldos.js +1 -0
  302. package/dist/chunks/localSearch-D-FprOMr.js +1 -0
  303. package/dist/chunks/lockfile-D5-j7HOZ.js +1 -0
  304. package/dist/chunks/log-B3eB4EFv.js +1 -0
  305. package/dist/chunks/logoV2Utils-RQ160dI2.js +1 -0
  306. package/dist/chunks/magicDocs-BqZ0GewA.js +57 -0
  307. package/dist/chunks/main-DeFMhaFE.js +31 -0
  308. package/dist/chunks/main-y7LJ5qUc.js +1243 -0
  309. package/dist/chunks/mappers-CWykjGfP.js +1 -0
  310. package/dist/chunks/mcp-CSFPAfaW.js +2 -0
  311. package/dist/chunks/mcp-DBwT4pa9.js +6 -0
  312. package/dist/chunks/mcp-DvZTaHZE.js +1 -0
  313. package/dist/chunks/memoize-BK3gG5ob.js +1 -0
  314. package/dist/chunks/memoize-BO31Ws9Q.js +1 -0
  315. package/dist/chunks/memory-DcpPpYN0.js +1 -0
  316. package/dist/chunks/metadata-BRLJvh61.js +1 -0
  317. package/dist/chunks/modalContext-DFjKLCB6.js +1 -0
  318. package/dist/chunks/mode-BkViT_0o.js +2 -0
  319. package/dist/chunks/model--z4Di9QO.js +1 -0
  320. package/dist/chunks/model-CZktWw6o.js +1 -0
  321. package/dist/chunks/model-DfFA3qMO.js +1 -0
  322. package/dist/chunks/multipart-parser-DDLYsngd.js +2 -0
  323. package/dist/chunks/nativeInstaller-GcIk7G2Y.js +1 -0
  324. package/dist/chunks/oauth-BqJqV-2M.js +1 -0
  325. package/dist/chunks/oauth-C8X_p8Gc.js +1 -0
  326. package/dist/chunks/observationStore-DzCdXq8U.js +4 -0
  327. package/dist/chunks/onChangeAppState-DwGVi-BC.js +1 -0
  328. package/dist/chunks/open-BtQHzzL9.js +1 -0
  329. package/dist/chunks/openai-B2wxZDQx.js +10 -0
  330. package/dist/chunks/openaiShared-G2-w4gJt.js +1 -0
  331. package/dist/chunks/output-style-BM3qAHLA.js +1 -0
  332. package/dist/chunks/overageCreditGrant-CjK49axw.js +1 -0
  333. package/dist/chunks/p-map-B1EeBuI8.js +1 -0
  334. package/dist/chunks/p-map-HKDr3iDo.js +1 -0
  335. package/dist/chunks/package-BC0bllK8.js +1 -0
  336. package/dist/chunks/panel-B-nrcHpm.js +1 -0
  337. package/dist/chunks/panel-R4ue6pSW.js +1 -0
  338. package/dist/chunks/panelCall-I_fbgub5.js +1 -0
  339. package/dist/chunks/parseConnectUrl-BiyKR5-x.js +1 -0
  340. package/dist/chunks/parser-BlM_Fk4J.js +1 -0
  341. package/dist/chunks/parser-CQrasoUB.js +1 -0
  342. package/dist/chunks/partition-CxRF7T-f.js +1 -0
  343. package/dist/chunks/passes-U_h-hNu-.js +1 -0
  344. package/dist/chunks/path-BCSE0S-c.js +1 -0
  345. package/dist/chunks/permissions-B8epy16o.js +3 -0
  346. package/dist/chunks/permissions-CeYKbtSC.js +1 -0
  347. package/dist/chunks/permissions-Cn_6f8CB.js +1 -0
  348. package/dist/chunks/pidLock-CBJDnBG_.js +3 -0
  349. package/dist/chunks/pipeTransport-D3Qx9v1V.js +1 -0
  350. package/dist/chunks/plan-BAhStVci.js +1 -0
  351. package/dist/chunks/platform-EtecGacO.js +2 -0
  352. package/dist/chunks/plist-Bzo2VMe9.js +6 -0
  353. package/dist/chunks/plugin-D9huNnv6.js +1 -0
  354. package/dist/chunks/pluginAutoupdate-BfmyxR5g.js +1 -0
  355. package/dist/chunks/pluginBlocklist-03sZaZa6.js +1 -0
  356. package/dist/chunks/pluginCliCommands-P2Ndi1r1.js +1 -0
  357. package/dist/chunks/pluginFlagging-BVy7Xv_0.js +1 -0
  358. package/dist/chunks/pluginOperations-Cz37qcjF.js +2 -0
  359. package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +1 -0
  360. package/dist/chunks/pluginStartupCheck-w24D-wwk.js +1 -0
  361. package/dist/chunks/plugins-B0hiIN4q.js +4 -0
  362. package/dist/chunks/policyLimits-Dem-XJ_h.js +1 -0
  363. package/dist/chunks/pollConfig-C2Ac8WMU.js +1 -0
  364. package/dist/chunks/poller-CpLBoB-N.js +1 -0
  365. package/dist/chunks/poor-CfbMKZNJ.js +1 -0
  366. package/dist/chunks/poorMode-Bsw2V-V_.js +1 -0
  367. package/dist/chunks/poorMode-jvImnkty.js +1 -0
  368. package/dist/chunks/postCommitAttribution-DoSP9wZD.js +1 -0
  369. package/dist/chunks/print-ozjC0Mhg.js +23 -0
  370. package/dist/chunks/privacy-settings-DeGoBRrZ.js +1 -0
  371. package/dist/chunks/process-CNfq37LF.js +1 -0
  372. package/dist/chunks/process-gEbdy6uY.js +1 -0
  373. package/dist/chunks/processBashCommand-loWZ8MSE.js +1 -0
  374. package/dist/chunks/processSlashCommand-BdouajZb.js +5 -0
  375. package/dist/chunks/projectContext-BaDZBAoK.js +1 -0
  376. package/dist/chunks/projectContext-D9MDwJUF.js +1 -0
  377. package/dist/chunks/prompt-Bef63FhB.js +132 -0
  378. package/dist/chunks/prompt-C7wd1H_i.js +1 -0
  379. package/dist/chunks/prompt-DIoNqZvO.js +1 -0
  380. package/dist/chunks/promptEditor-foiayhdY.js +4 -0
  381. package/dist/chunks/protocolHandler-BsiB1oW_.js +13 -0
  382. package/dist/chunks/protocols-CCsohXid.js +18 -0
  383. package/dist/chunks/protocols-CnYQjBlj.js +2 -0
  384. package/dist/chunks/proxy-Cn2YwITp.js +99 -0
  385. package/dist/chunks/rate-limit-options-DTJPDcTr.js +1 -0
  386. package/dist/chunks/rcDebugLog-BUuD-X1D.js +11 -0
  387. package/dist/chunks/reconciler-DqXTmV3J.js +4 -0
  388. package/dist/chunks/referral-DP_GshTS.js +1 -0
  389. package/dist/chunks/refresh-CNzXPAFw.js +1 -0
  390. package/dist/chunks/registerProtocol-CjxlFsKw.js +36 -0
  391. package/dist/chunks/release-notes-BxgK8zWO.js +4 -0
  392. package/dist/chunks/releaseNotes-CbSktIJW.js +2 -0
  393. package/dist/chunks/reload-plugins-CDu6yU5-.js +1 -0
  394. package/dist/chunks/remote-env-B4HnhISc.js +1 -0
  395. package/dist/chunks/remoteBridgeCore-D-wG5jau.js +1 -0
  396. package/dist/chunks/remoteManagedSettings-B7gt0VAX.js +1 -0
  397. package/dist/chunks/rename-DlbMb24l.js +1 -0
  398. package/dist/chunks/renderOptions-5kWQpVr2.js +1 -0
  399. package/dist/chunks/resume-BB5iBogS.js +2 -0
  400. package/dist/chunks/rewind-D12hCfZD.js +1 -0
  401. package/dist/chunks/ripgrep-BQgJ02F9.js +1 -0
  402. package/dist/chunks/ripgrep-BvDwiKJ3.js +5 -0
  403. package/dist/chunks/rollback-BPWRKlIZ.js +11 -0
  404. package/dist/chunks/rolldown-runtime-DaDcL9Zw.js +1 -0
  405. package/dist/chunks/runtimeObserver-BNH2WGE3.js +1 -0
  406. package/dist/chunks/runtimeObserver-Ci-5gvYg.js +10 -0
  407. package/dist/chunks/sandbox-adapter-Coe1GDAE.js +1 -0
  408. package/dist/chunks/sandbox-toggle-B2Yk4y2V.js +1 -0
  409. package/dist/chunks/sanitization-DV-94a9Z.js +1 -0
  410. package/dist/chunks/satisfies-DQJHNtpQ.js +1 -0
  411. package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +1 -0
  412. package/dist/chunks/searchExtraTools-BnWZ9roi.js +1 -0
  413. package/dist/chunks/semver-BMRJYn3q.js +1 -0
  414. package/dist/chunks/semver-DQo45qGo.js +1 -0
  415. package/dist/chunks/serde-f76bObzR.js +4 -0
  416. package/dist/chunks/server-LdbAb0sV.js +1 -0
  417. package/dist/chunks/serverBanner-BdExKFHT.js +1 -0
  418. package/dist/chunks/serverLog-BFmvyJ93.js +1 -0
  419. package/dist/chunks/session-Bmx7L3Mt.js +2 -0
  420. package/dist/chunks/sessionDataUploader-CaCjwsA2.js +1 -0
  421. package/dist/chunks/sessionDiscovery-DcEAr5vJ.js +1 -0
  422. package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +1 -0
  423. package/dist/chunks/sessionManager-CPa049BO.js +1 -0
  424. package/dist/chunks/sessionMemory-Bsg2unYX.js +1 -0
  425. package/dist/chunks/sessionMemory-CIbCojm-.js +1 -0
  426. package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +1 -0
  427. package/dist/chunks/sessionObserver-CRU1qWnP.js +1 -0
  428. package/dist/chunks/sessionObserver-DQwHsDrM.js +20 -0
  429. package/dist/chunks/sessionStorage-BxDN8qRc.js +1 -0
  430. package/dist/chunks/sessionStoragePortable-Cx6JQ5Ye.js +3 -0
  431. package/dist/chunks/sessionTitle-B8jcexkQ.js +14 -0
  432. package/dist/chunks/sessionTracing-BuLsL6qA.js +11 -0
  433. package/dist/chunks/settings-5PQdphqC.js +19 -0
  434. package/dist/chunks/settingsSync-BDeuErb5.js +1 -0
  435. package/dist/chunks/setup-BKEnSLR9.js +3 -0
  436. package/dist/chunks/shadowedRuleDetection-7Z8ezTKF.js +1 -0
  437. package/dist/chunks/shellQuote-fB02N16J.js +4 -0
  438. package/dist/chunks/sideQuestion-CYdNATPW.js +20 -0
  439. package/dist/chunks/signin-CPaEtsnK.js +1 -0
  440. package/dist/chunks/sink-DjKoYMsA.js +1 -0
  441. package/dist/chunks/sink-iYxWapbU.js +1 -0
  442. package/dist/chunks/sinks-GryGVRT8.js +2 -0
  443. package/dist/chunks/sinks-jfaIjsRJ.js +1 -0
  444. package/dist/chunks/skill-learning-E8tQed-Q.js +5 -0
  445. package/dist/chunks/skillChangeDetector-A8SAuyo9.js +1 -0
  446. package/dist/chunks/skillGapStore-B5rl12bV.js +1 -0
  447. package/dist/chunks/skillGapStore-CjJrxxjk.js +5 -0
  448. package/dist/chunks/skillGenerator-BDR_z3-X.js +8 -0
  449. package/dist/chunks/skillLearning-BQtfFE0g.js +1 -0
  450. package/dist/chunks/skillLearning-C8ihdryM.js +1 -0
  451. package/dist/chunks/skillPanel-yR8Oi-mO.js +28 -0
  452. package/dist/chunks/skillSearchPanel-DUQQUCUS.js +21 -0
  453. package/dist/chunks/skills-NAZQ3j-t.js +1 -0
  454. package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +1 -0
  455. package/dist/chunks/src-CDCSSo0U2.js +53 -0
  456. package/dist/chunks/src-CHw1lvBc.js +3 -0
  457. package/dist/chunks/src-CST_jFnT.js +1 -0
  458. package/dist/chunks/src-CgZmCiiH.js +2 -0
  459. package/dist/chunks/src-CiJCsqUl.js +9 -0
  460. package/dist/chunks/src-D06Xyj4g.js +2 -0
  461. package/dist/chunks/src-DCUgdrYl.js +5 -0
  462. package/dist/chunks/src-DLz3FZm1.js +1 -0
  463. package/dist/chunks/src-DPUAq5Ty.js +1 -0
  464. package/dist/chunks/src-DQOX_xI1.js +1 -0
  465. package/dist/chunks/src-Dt5IJd3C.js +1 -0
  466. package/dist/chunks/src-Dvp6-vB7.js +19 -0
  467. package/dist/chunks/src-PM8NIIu_.js +1 -0
  468. package/dist/chunks/src-l6_O0K-a.js +1 -0
  469. package/dist/chunks/src-xRRBgNzF.js +25 -0
  470. package/dist/chunks/sso-oidc-DFJ7SBvI.js +1 -0
  471. package/dist/chunks/startupProfiler-B0m6crkd.js +1 -0
  472. package/dist/chunks/startupProfiler-DxRQteII.js +3 -0
  473. package/dist/chunks/state-4KQ3kaqz.js +1 -0
  474. package/dist/chunks/state-53JDbNQM.js +1 -0
  475. package/dist/chunks/state-Cn_m2NOf.js +1 -0
  476. package/dist/chunks/staticRender-BIxpgNUq.js +1 -0
  477. package/dist/chunks/stats-h4yu84Q-.js +1 -0
  478. package/dist/chunks/status-BbdeubJG.js +1 -0
  479. package/dist/chunks/status-is_Bg_IB.js +2 -0
  480. package/dist/chunks/statusNoticeHelpers-CQ7CUugR.js +1 -0
  481. package/dist/chunks/stdio-4S7b8Uhx.js +1 -0
  482. package/dist/chunks/stdio-W_Kokrkh.js +3 -0
  483. package/dist/chunks/stickers-qJoNhPk4.js +1 -0
  484. package/dist/chunks/store-Z8rTjDHe.js +1 -0
  485. package/dist/chunks/stringUtils-CvXbHQRH.js +4 -0
  486. package/dist/chunks/sts-C2Gf2WYN.js +1 -0
  487. package/dist/chunks/subprocessEnv-BSQSomcK.js +1 -0
  488. package/dist/chunks/subprocessEnv-vrwzMgKn.js +1 -0
  489. package/dist/chunks/supports-color-uJ1LqA-P.js +1 -0
  490. package/dist/chunks/systemPromptSections-CgpggIYX.js +1 -0
  491. package/dist/chunks/systemPromptSections-IePG5K8r.js +1 -0
  492. package/dist/chunks/systemTheme-Ceakddth.js +1 -0
  493. package/dist/chunks/tag-i3HZ4lhj.js +11 -0
  494. package/dist/chunks/tasks-HzsYNTZ1.js +1 -0
  495. package/dist/chunks/teleport-hN3cAbYC.js +1 -0
  496. package/dist/chunks/templateJobs-CIv_ysje.js +12 -0
  497. package/dist/chunks/terminalSetup-C0PF87iu.js +33 -0
  498. package/dist/chunks/terminalSetup-CxniwSF-.js +1 -0
  499. package/dist/chunks/theme-BKIHX_Dx.js +1 -0
  500. package/dist/chunks/thinkback-BA4cMz4D.js +1 -0
  501. package/dist/chunks/thinkback-mT-8FIT-.js +1 -0
  502. package/dist/chunks/thinkback-play-Cfk49mvF.js +1 -0
  503. package/dist/chunks/tmux-CbsW-VDJ.js +1 -0
  504. package/dist/chunks/toolEventObserver-8FQtxeVv.js +1 -0
  505. package/dist/chunks/toolEventObserver-B1xvyKdE.js +1 -0
  506. package/dist/chunks/toolPool-CHVDZqh7.js +1 -0
  507. package/dist/chunks/trustedDevice-BYCh1ff7.js +1 -0
  508. package/dist/chunks/trustedDevice-DnIWErCt.js +1 -0
  509. package/dist/chunks/tui-fTa_pzdA.js +6 -0
  510. package/dist/chunks/types-BUyOCzUt.js +1 -0
  511. package/dist/chunks/types-Czs-_G1S.js +3 -0
  512. package/dist/chunks/types-a7X-tJpJ.js +17 -0
  513. package/dist/chunks/udsClient-Cg9bBD0p.js +1 -0
  514. package/dist/chunks/ultrareviewCommand-DCFRZsKp.js +3 -0
  515. package/dist/chunks/undercover-B-kKUWtK.js +1 -0
  516. package/dist/chunks/undercover-CsLPQb-a.js +31 -0
  517. package/dist/chunks/up-dO5BcPaq.js +12 -0
  518. package/dist/chunks/updateCCB-CfUnkOLT.js +11 -0
  519. package/dist/chunks/upgrade-CngUwvY4.js +1 -0
  520. package/dist/chunks/upgrade-kpttjebY.js +1 -0
  521. package/dist/chunks/upload-DDhQqV8n.js +1 -0
  522. package/dist/chunks/upstreamproxy-CvcjNY7J.js +11 -0
  523. package/dist/chunks/usage-CJ5w0907.js +1 -0
  524. package/dist/chunks/usage-eZRwLa77.js +1 -0
  525. package/dist/chunks/useExitOnCtrlCDWithKeybindings-yAroCqu4.js +1 -0
  526. package/dist/chunks/useMainLoopModel-BNFW-g8E.js +1 -0
  527. package/dist/chunks/useManagePlugins-CTtPaQRP.js +1 -0
  528. package/dist/chunks/useMergedTools-CZJffsmf.js +1 -0
  529. package/dist/chunks/useSearchInput-C-CqUK6w.js +1 -0
  530. package/dist/chunks/useSettingsErrors-BWlJCgYF.js +1 -0
  531. package/dist/chunks/util-DJV0joAW.js +1 -0
  532. package/dist/chunks/v4-jw6qOKwQ.js +65 -0
  533. package/dist/chunks/validatePlugin-CRmpIGLV.js +1 -0
  534. package/dist/chunks/vertex-sdk-DjXcZ2J7.js +9 -0
  535. package/dist/chunks/vim-n8-UT5w-.js +1 -0
  536. package/dist/chunks/which-BBCjXfI2.js +1 -0
  537. package/dist/chunks/windowsPaths-D6T_3XaU.js +1 -0
  538. package/dist/chunks/windowsPaths-DUKTzBck.js +1 -0
  539. package/dist/chunks/workSecret-C_lv0dRh.js +1 -0
  540. package/dist/chunks/workerRegistry-BdHi7_sN.js +1 -0
  541. package/dist/chunks/worktree-YDeHMlHZ.js +1 -0
  542. package/dist/chunks/worktreeModeEnabled-BFOYTTTr.js +1 -0
  543. package/dist/chunks/worktreeModeEnabled-D68iEHpC.js +1 -0
  544. package/dist/chunks/wrapper-K8ZapJVu.js +6 -0
  545. package/dist/chunks/xdg-DcF9ejUM.js +1 -0
  546. package/dist/chunks/zod-CuNujUwx.js +1 -0
  547. package/dist/cli-bun.js +2 -0
  548. package/dist/cli-node.js +2 -0
  549. package/dist/cli.js +2 -0
  550. package/dist/vendor/ripgrep/x64-linux/rg +0 -0
  551. package/package.json +218 -0
  552. package/scripts/postinstall.cjs +389 -0
@@ -0,0 +1,34 @@
1
+ import{i as e,n as t,o as n,t as r}from"./rolldown-runtime-DaDcL9Zw.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{a as o,c as s,i as c,n as l,o as u,r as d,s as f,t as p}from"./classPrivateFieldSet2-D4U5K-I3.js";import{n as m,t as h}from"./classPrivateMethodInitSpec-BXQD0Vh4.js";import{i as g,n as _,r as v,t as y}from"./figures-5ThXQEtq.js";import{n as b,t as x}from"./cwd-BuJhkTrc.js";import{E as ee,k as te}from"./debug-IKW-jE7K.js";import{o as ne,s as re}from"./log-B3eB4EFv.js";import{aborted as ie,callbackify as S,debuglog as ae,inspect as oe,promisify as se,stripVTControlCharacters as ce}from"node:util";import C,{execArgv as le,execPath as ue,hrtime as de,platform as fe}from"node:process";import w from"node:path";import{ChildProcess as pe,execFile as me,spawn as he,spawnSync as ge}from"node:child_process";import{appendFileSync as _e,createReadStream as ve,createWriteStream as ye,readFileSync as be,statSync as xe,writeFileSync as Se}from"node:fs";import{constants as T}from"node:os";import Ce from"node:tty";import{EventEmitter as we,addAbortListener as Te,on as Ee,once as E,setMaxListeners as De}from"node:events";import{Duplex as Oe,PassThrough as ke,Readable as D,Transform as Ae,Writable as je,getDefaultHighWaterMark as Me}from"node:stream";import{StringDecoder as Ne}from"node:string_decoder";import{fileURLToPath as Pe}from"node:url";import{Buffer as Fe}from"node:buffer";import{scheduler as Ie,setImmediate as Le,setTimeout as Re}from"node:timers/promises";import{serialize as ze}from"node:v8";import{finished as O}from"node:stream/promises";function k(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var A=t((()=>{})),Be,Ve,He,Ue,We=t((()=>{Be=(e,t)=>{let n=Ue(Ve(e));if(typeof n!=`string`)throw TypeError(`${t} must be a string or a file URL: ${n}.`);return n},Ve=e=>He(e)?e.toString():e,He=e=>typeof e!=`string`&&e&&Object.getPrototypeOf(e)===String.prototype,Ue=e=>e instanceof URL?Pe(e):e})),Ge,Ke=t((()=>{A(),We(),Ge=(e,t=[],n={})=>{let r=Be(e,`First argument`),[i,a]=k(t)?[[],t]:[t,n];if(!Array.isArray(i))throw TypeError(`Second argument must be either an array of arguments or an options object: ${i}`);if(i.some(e=>typeof e==`object`&&!!e))throw TypeError(`Second argument must be an array of strings: ${i}`);let o=i.map(String),s=o.find(e=>e.includes(`\0`));if(s!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${s}`);if(!k(a))throw TypeError(`Last argument must be an options object: ${a}`);return[r,o,a]}})),qe,Je,j,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,M=t((()=>{({toString:qe}=Object.prototype),Je=e=>qe.call(e)===`[object ArrayBuffer]`,j=e=>qe.call(e)===`[object Uint8Array]`,Ye=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Xe=new TextEncoder,Ze=e=>Xe.encode(e),Qe=new TextDecoder,$e=e=>Qe.decode(e),et=(e,t)=>tt(e,t).join(``),tt=(e,t)=>{if(t===`utf8`&&e.every(e=>typeof e==`string`))return e;let n=new Ne(t),r=e.map(e=>typeof e==`string`?Ze(e):e).map(e=>n.write(e)),i=n.end();return i===``?r:[...r,i]},nt=e=>e.length===1&&j(e[0])?e[0]:it(rt(e)),rt=e=>e.map(e=>typeof e==`string`?Ze(e):e),it=e=>{let t=new Uint8Array(at(e)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t},at=e=>{let t=0;for(let n of e)t+=n.length;return t}})),ot,st,ct,lt,ut,dt,ft,pt,mt,ht=t((()=>{A(),M(),ot=e=>Array.isArray(e)&&Array.isArray(e.raw),st=(e,t)=>{let n=[];for(let[r,i]of e.entries())n=ct({templates:e,expressions:t,tokens:n,index:r,template:i});if(n.length===0)throw TypeError(`Template script must not be empty`);let[r,...i]=n;return[r,i,{}]},ct=({templates:e,expressions:t,tokens:n,index:r,template:i})=>{if(i===void 0)throw TypeError(`Invalid backslash sequence: ${e.raw[r]}`);let{nextTokens:a,leadingWhitespaces:o,trailingWhitespaces:s}=lt(i,e.raw[r]),c=ft(n,a,o);if(r===t.length)return c;let l=t[r],u=Array.isArray(l)?l.map(e=>pt(e)):[pt(l)];return ft(c,u,s)},lt=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let n=[],r=0,i=ut.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let o=t[a];if(ut.has(o))r!==i&&n.push(e.slice(r,i)),r=i+1;else if(o===`\\`){let e=t[a+1];e===`
2
+ `?(--i,a+=1):e===`u`&&t[a+2]===`{`?a=t.indexOf(`}`,a+3):a+=dt[e]??1}}let a=r===e.length;return a||n.push(e.slice(r)),{nextTokens:n,leadingWhitespaces:i,trailingWhitespaces:a}},ut=new Set([` `,` `,`\r`,`
3
+ `]),dt={x:3,u:5},ft=(e,t,n)=>n||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],pt=e=>{let t=typeof e;if(t===`string`)return e;if(t===`number`)return String(e);if(k(e)&&(`stdout`in e||`isMaxBuffer`in e))return mt(e);throw e instanceof pe||Object.prototype.toString.call(e)===`[object Promise]`?TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):TypeError(`Unexpected "${t}" in template expression`)},mt=({stdout:e})=>{if(typeof e==`string`)return e;if(j(e))return $e(e);throw TypeError(e===void 0?`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`:`Unexpected "${typeof e}" stdout in template expression`)}})),N,gt,P,_t,F=t((()=>{N=e=>gt.includes(e),gt=[C.stdin,C.stdout,C.stderr],P=[`stdin`,`stdout`,`stderr`],_t=e=>P[e]??`stdio[${e}]`})),vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,I=t((()=>{A(),F(),vt=e=>{let t={...e};for(let n of At)t[n]=yt(e,n);return t},yt=(e,t)=>{let n=Array.from({length:bt(e)+1}),r=xt(e[t],n,t);return Ot(r,t)},bt=({stdio:e})=>Array.isArray(e)?Math.max(e.length,P.length):P.length,xt=(e,t,n)=>k(e)?St(e,t,n):t.fill(e),St=(e,t,n)=>{for(let r of Object.keys(e).sort(Ct))for(let i of Tt(r,n,t))t[i]=e[r];return t},Ct=(e,t)=>wt(e)<wt(t)?1:-1,wt=e=>e===`stdout`||e===`stderr`?0:e===`all`?2:1,Tt=(e,t,n)=>{if(e===`ipc`)return[n.length-1];let r=Et(e);if(r===void 0||r===0)throw TypeError(`"${t}.${e}" is invalid.
4
+ It must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(r>=n.length)throw TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.
5
+ Please set the "stdio" option to ensure that file descriptor exists.`);return r===`all`?[1,2]:[r]},Et=e=>{if(e===`all`)return e;if(P.includes(e))return P.indexOf(e);let t=Dt.exec(e);if(t!==null)return Number(t[1])},Dt=/^fd(\d+)$/,Ot=(e,t)=>e.map(e=>e===void 0?kt[t]:e),kt={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:ae(`execa`).enabled?`full`:`none`,stripFinalNewline:!0},At=[`lines`,`buffer`,`maxBuffer`,`verbose`,`stripFinalNewline`],jt=(e,t)=>t===`ipc`?e.at(-1):e[t]})),Mt,Nt,Pt,Ft,It,Lt,Rt,L=t((()=>{I(),Mt=({verbose:e},t)=>Ft(e,t)!==`none`,Nt=({verbose:e},t)=>![`none`,`short`].includes(Ft(e,t)),Pt=({verbose:e},t)=>{let n=Ft(e,t);return Lt(n)?n:void 0},Ft=(e,t)=>t===void 0?It(e):jt(e,t),It=e=>e.find(e=>Lt(e))??Rt.findLast(t=>e.includes(t)),Lt=e=>typeof e==`function`,Rt=[`none`,`short`,`full`]})),zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt=t((()=>{zt=(e,t)=>{let n=[e,...t];return{command:n.join(` `),escapedCommand:n.map(e=>qt(Vt(e))).join(` `)}},Bt=e=>ce(e).split(`
6
+ `).map(e=>Vt(e)).join(`
7
+ `),Vt=e=>e.replaceAll(Wt,e=>Ht(e)),Ht=e=>{let t=Gt[e];if(t!==void 0)return t;let n=e.codePointAt(0),r=n.toString(16);return n<=Kt?`\\u${r.padStart(4,`0`)}`:`\\U${r}`},Ut=()=>{try{return RegExp(`\\p{Separator}|\\p{Other}`,`gu`)}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},Wt=Ut(),Gt={" ":` `,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`},Kt=65535,qt=e=>Jt.test(e)?e:fe===`win32`?`"${e.replaceAll(`"`,`""`)}"`:`'${e.replaceAll(`'`,`'\\''`)}'`,Jt=/^[\w./-]+$/})),Xt,R,Zt,Qt,$t,en,tn=t((()=>{Xt=Ce?.WriteStream?.prototype?.hasColors?.()??!1,R=(e,t)=>{if(!Xt)return e=>e;let n=`\u001B[${e}m`,r=`\u001B[${t}m`;return e=>{let i=e+``,a=i.indexOf(r);if(a===-1)return n+i+r;let o=n,s=0,c=(t===22?r:``)+n;for(;a!==-1;)o+=i.slice(s,a)+c,s=a+r.length,a=i.indexOf(r,s);return o+=i.slice(s)+r,o}},R(0,0),Zt=R(1,22),R(2,22),R(3,23),R(4,24),R(53,55),R(7,27),R(8,28),R(9,29),R(30,39),R(31,39),R(32,39),R(33,39),R(34,39),R(35,39),R(36,39),R(37,39),Qt=R(90,39),R(40,49),R(41,49),R(42,49),R(43,49),R(44,49),R(45,49),R(46,49),R(47,49),R(100,49),$t=R(91,39),R(92,39),en=R(93,39),R(94,39),R(95,39),R(96,39),R(97,39),R(101,49),R(102,49),R(103,49),R(104,49),R(105,49),R(106,49),R(107,49)})),nn=t((()=>{tn(),tn()})),rn,an,on,sn,cn,ln,un,dn=t((()=>{_(),nn(),rn=({type:e,message:t,timestamp:n,piped:r,commandId:i,result:{failed:a=!1}={},options:{reject:o=!0}})=>{let s=an(n),c=cn[e]({failed:a,reject:o,piped:r}),l=un[e]({reject:o});return`${Qt(`[${s}]`)} ${Qt(`[${i}]`)} ${l(c)} ${l(t)}`},an=e=>`${on(e.getHours(),2)}:${on(e.getMinutes(),2)}:${on(e.getSeconds(),2)}.${on(e.getMilliseconds(),3)}`,on=(e,t)=>String(e).padStart(t,`0`),sn=({failed:e,reject:t})=>e?t?y.cross:y.warning:y.tick,cn={command:({piped:e})=>e?`|`:`$`,output:()=>` `,ipc:()=>`*`,error:sn,duration:sn},ln=e=>e,un={command:()=>Zt,output:()=>ln,ipc:()=>ln,error:({reject:e})=>e?$t:en,duration:()=>Qt}})),fn,pn,mn,hn=t((()=>{L(),fn=(e,t,n)=>{let r=Pt(t,n);return e.map(({verboseLine:e,verboseObject:t})=>pn(e,t,r)).filter(e=>e!==void 0).map(e=>mn(e)).join(``)},pn=(e,t,n)=>{if(n===void 0)return e;let r=n(e,t);if(typeof r==`string`)return r},mn=e=>e.endsWith(`
8
+ `)?e:`${e}\n`})),gn,_n,vn,yn,bn,xn,Sn=t((()=>{Yt(),dn(),hn(),gn=({type:e,verboseMessage:t,fdNumber:n,verboseInfo:r,result:i})=>{let a=_n({type:e,result:i,verboseInfo:r}),o=fn(vn(t,a),r,n);o!==``&&console.warn(o.slice(0,-1))},_n=({type:e,result:t,verboseInfo:{escapedCommand:n,commandId:r,rawOptions:{piped:i=!1,...a}}})=>({type:e,escapedCommand:n,commandId:`${r}`,timestamp:new Date,piped:i,result:t,options:a}),vn=(e,t)=>e.split(`
9
+ `).map(e=>yn({...t,message:e})),yn=e=>({verboseLine:rn(e),verboseObject:e}),bn=e=>Bt(typeof e==`string`?e:oe(e)).replaceAll(` `,` `.repeat(xn)),xn=2})),Cn,wn=t((()=>{L(),Sn(),Cn=(e,t)=>{Mt(t)&&gn({type:`command`,verboseMessage:e,verboseInfo:t})}})),Tn,En,Dn,On,kn=t((()=>{L(),Tn=(e,t,n)=>(On(e),{verbose:e,escapedCommand:t,commandId:En(e),rawOptions:n}),En=e=>Mt({verbose:e})?Dn++:void 0,Dn=0n,On=e=>{for(let t of e){if(t===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(t===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!Rt.includes(t)&&!Lt(t)){let e=Rt.map(e=>`'${e}'`).join(`, `);throw TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}}})),An,jn,Mn=t((()=>{An=()=>de.bigint(),jn=e=>Number(de.bigint()-e)/1e6})),Nn,Pn=t((()=>{wn(),kn(),Mn(),Yt(),I(),Nn=(e,t,n)=>{let r=An(),{command:i,escapedCommand:a}=zt(e,t),o=Tn(yt(n,`verbose`),a,{...n});return Cn(a,o),{command:i,escapedCommand:a,startTime:r,verboseInfo:o}}})),Fn=r(((t,n)=>{n.exports=o,o.sync=s;var r=e(`fs`);function i(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function a(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:i(t,n)}function o(e,t,n){r.stat(e,function(r,i){n(r,!r&&a(i,e,t))})}function s(e,t){return a(r.statSync(e),e,t)}})),In=r(((t,n)=>{n.exports=i,i.sync=a;var r=e(`fs`);function i(e,t,n){r.stat(e,function(e,r){n(e,!e&&o(r,t))})}function a(e,t){return o(r.statSync(e),t)}function o(e,t){return e.isFile()&&s(e,t)}function s(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}})),Ln=r(((t,n)=>{e(`fs`);var r=process.platform===`win32`||global.TESTING_WINDOWS?Fn():In();n.exports=i,i.sync=a;function i(e,t,n){if(typeof t==`function`&&(n=t,t={}),!n){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,r){i(e,t||{},function(e,t){e?r(e):n(t)})})}r(e,t||{},function(e,r){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function a(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}})),Rn=r(((t,n)=>{var r=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,i=e(`path`),a=r?`;`:`:`,o=Ln(),s=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),c=(e,t)=>{let n=t.colon||a,i=e.match(/\//)||r&&e.match(/\\/)?[``]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(n)],o=r?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=r?o.split(n):[``];return r&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:i,pathExt:s,pathExtExe:o}},l=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:a,pathExtExe:l}=c(e,t),u=[],d=n=>new Promise((a,o)=>{if(n===r.length)return t.all&&u.length?a(u):o(s(e));let c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;a(f(p,n,0))}),f=(e,n,r)=>new Promise((i,s)=>{if(r===a.length)return i(d(n+1));let c=a[r];o(e+c,{pathExt:l},(a,o)=>{if(!a&&o)if(t.all)u.push(e+c);else return i(e+c);return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};n.exports=l,l.sync=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:a}=c(e,t),l=[];for(let s=0;s<n.length;s++){let c=n[s],u=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<r.length;e++){let n=f+r[e];try{if(o.sync(n,{pathExt:a}))if(t.all)l.push(n);else return n}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw s(e)}})),zn=r(((e,t)=>{var n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n})),Bn=r(((t,n)=>{var r=e(`path`),i=Rn(),a=zn();function o(e,t){let n=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=i.sync(e.command,{path:n[a({env:n})],pathExt:t?r.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&(l=r.resolve(s?e.options.cwd:``,l)),l}function s(e){return o(e)||o(e,!0)}n.exports=s})),Vn=r(((e,t)=>{var n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),Hn=r(((e,t)=>{t.exports=/^#!(.*)/})),Un=r(((e,t)=>{var n=Hn();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}})),Wn=r(((t,n)=>{var r=e(`fs`),i=Un();function a(e){let t=Buffer.alloc(150),n;try{n=r.openSync(e,`r`),r.readSync(n,t,0,150,0),r.closeSync(n)}catch{}return i(t.toString())}n.exports=a})),Gn=r(((t,n)=>{var r=e(`path`),i=Bn(),a=Vn(),o=Wn(),s=process.platform===`win32`,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){e.file=i(e);let t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}function d(e){if(!s)return e;let t=u(e),n=!c.test(t);if(e.options.forceShell||n){let n=l.test(t);e.command=r.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,n)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function f(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:d(r)}n.exports=f})),Kn=r(((e,t)=>{var n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),qn=r(((t,n)=>{var r=e(`child_process`),i=Gn(),a=Kn();function o(e,t,n){let o=i(e,t,n),s=r.spawn(o.command,o.args,o.options);return a.hookChildProcess(s,o),s}function s(e,t,n){let o=i(e,t,n),s=r.spawnSync(o.command,o.args,o.options);return s.error=s.error||a.verifyENOENTSync(s.status,o),s}n.exports=o,n.exports.spawn=o,n.exports.sync=s,n.exports._parse=i,n.exports._enoent=a}));function Jn(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`}var Yn=t((()=>{})),Xn=t((()=>{}));function Zn(e){return e instanceof URL?Pe(e):e}function Qn(e){return{*[Symbol.iterator](){let t=w.resolve(Zn(e)),n;for(;n!==t;)yield t,n=t,t=w.resolve(t,`..`)}}}var $n=t((()=>{Xn(),se(me)})),er,tr,nr,rr,ir=t((()=>{Yn(),$n(),er=({cwd:e=C.cwd(),path:t=C.env[Jn()],preferLocal:n=!0,execPath:r=C.execPath,addExecPath:i=!0}={})=>{let a=w.resolve(Zn(e)),o=[],s=t.split(w.delimiter);return n&&tr(o,s,a),i&&nr(o,s,r,a),t===``||t===w.delimiter?`${o.join(w.delimiter)}${t}`:[...o,t].join(w.delimiter)},tr=(e,t,n)=>{for(let r of Qn(n)){let n=w.join(r,`node_modules/.bin`);t.includes(n)||e.push(n)}},nr=(e,t,n,r)=>{let i=w.resolve(r,Zn(n),`..`);t.includes(i)||e.push(i)},rr=({env:e=C.env,...t}={})=>{e={...e};let n=Jn({env:e});return t.path=e[n],e[n]=er(t),e}})),ar,or,sr,cr,lr,ur,dr,fr,z=t((()=>{ar=(e,t,n)=>new(n?fr:dr)(t,e instanceof or?{}:{cause:e}),or=class extends Error{},sr=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,lr,{value:!0,writable:!1,enumerable:!1,configurable:!1})},cr=e=>ur(e)&&lr in e,lr=Symbol(`isExecaError`),ur=e=>Object.prototype.toString.call(e)===`[object Error]`,dr=class extends Error{},sr(dr,dr.name),fr=class extends Error{},sr(fr,fr.name)})),pr,mr,hr,gr=t((()=>{pr=()=>{let e=64-hr+1;return Array.from({length:e},mr)},mr=(e,t)=>({name:`SIGRT${t+1}`,number:hr+t,action:`terminate`,description:`Application-specific signal (realtime)`,standard:`posix`}),hr=34})),_r,vr=t((()=>{_r=[{name:`SIGHUP`,number:1,action:`terminate`,description:`Terminal closed`,standard:`posix`},{name:`SIGINT`,number:2,action:`terminate`,description:`User interruption with CTRL-C`,standard:`ansi`},{name:`SIGQUIT`,number:3,action:`core`,description:`User interruption with CTRL-\\`,standard:`posix`},{name:`SIGILL`,number:4,action:`core`,description:`Invalid machine instruction`,standard:`ansi`},{name:`SIGTRAP`,number:5,action:`core`,description:`Debugger breakpoint`,standard:`posix`},{name:`SIGABRT`,number:6,action:`core`,description:`Aborted`,standard:`ansi`},{name:`SIGIOT`,number:6,action:`core`,description:`Aborted`,standard:`bsd`},{name:`SIGBUS`,number:7,action:`core`,description:`Bus error due to misaligned, non-existing address or paging error`,standard:`bsd`},{name:`SIGEMT`,number:7,action:`terminate`,description:`Command should be emulated but is not implemented`,standard:`other`},{name:`SIGFPE`,number:8,action:`core`,description:`Floating point arithmetic error`,standard:`ansi`},{name:`SIGKILL`,number:9,action:`terminate`,description:`Forced termination`,standard:`posix`,forced:!0},{name:`SIGUSR1`,number:10,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGSEGV`,number:11,action:`core`,description:`Segmentation fault`,standard:`ansi`},{name:`SIGUSR2`,number:12,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGPIPE`,number:13,action:`terminate`,description:`Broken pipe or socket`,standard:`posix`},{name:`SIGALRM`,number:14,action:`terminate`,description:`Timeout or timer`,standard:`posix`},{name:`SIGTERM`,number:15,action:`terminate`,description:`Termination`,standard:`ansi`},{name:`SIGSTKFLT`,number:16,action:`terminate`,description:`Stack is empty or overflowed`,standard:`other`},{name:`SIGCHLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`posix`},{name:`SIGCLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`other`},{name:`SIGCONT`,number:18,action:`unpause`,description:`Unpaused`,standard:`posix`,forced:!0},{name:`SIGSTOP`,number:19,action:`pause`,description:`Paused`,standard:`posix`,forced:!0},{name:`SIGTSTP`,number:20,action:`pause`,description:`Paused using CTRL-Z or "suspend"`,standard:`posix`},{name:`SIGTTIN`,number:21,action:`pause`,description:`Background process cannot read terminal input`,standard:`posix`},{name:`SIGBREAK`,number:21,action:`terminate`,description:`User interruption with CTRL-BREAK`,standard:`other`},{name:`SIGTTOU`,number:22,action:`pause`,description:`Background process cannot write to terminal output`,standard:`posix`},{name:`SIGURG`,number:23,action:`ignore`,description:`Socket received out-of-band data`,standard:`bsd`},{name:`SIGXCPU`,number:24,action:`core`,description:`Process timed out`,standard:`bsd`},{name:`SIGXFSZ`,number:25,action:`core`,description:`File too big`,standard:`bsd`},{name:`SIGVTALRM`,number:26,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGPROF`,number:27,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGWINCH`,number:28,action:`ignore`,description:`Terminal window size changed`,standard:`bsd`},{name:`SIGIO`,number:29,action:`terminate`,description:`I/O is available`,standard:`other`},{name:`SIGPOLL`,number:29,action:`terminate`,description:`Watched event`,standard:`other`},{name:`SIGINFO`,number:29,action:`ignore`,description:`Request for process information`,standard:`other`},{name:`SIGPWR`,number:30,action:`terminate`,description:`Device running out of power`,standard:`systemv`},{name:`SIGSYS`,number:31,action:`core`,description:`Invalid system call`,standard:`other`},{name:`SIGUNUSED`,number:31,action:`terminate`,description:`Invalid system call`,standard:`other`}]})),yr,br,xr=t((()=>{vr(),gr(),yr=()=>{let e=pr();return[..._r,...e].map(br)},br=({name:e,number:t,description:n,action:r,forced:i=!1,standard:a})=>{let{signals:{[e]:o}}=T,s=o!==void 0;return{name:e,number:s?o:t,description:n,supported:s,action:r,forced:i,standard:a}}})),Sr,Cr,wr,Tr,Er,Dr,Or=t((()=>{gr(),xr(),Sr=()=>{let e=yr();return Object.fromEntries(e.map(Cr))},Cr=({name:e,number:t,description:n,supported:r,action:i,forced:a,standard:o})=>[e,{name:e,number:t,description:n,supported:r,action:i,forced:a,standard:o}],wr=Sr(),Tr=()=>{let e=yr(),t=Array.from({length:65},(t,n)=>Er(n,e));return Object.assign({},...t)},Er=(e,t)=>{let n=Dr(e,t);if(n===void 0)return{};let{name:r,description:i,supported:a,action:o,forced:s,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:a,action:o,forced:s,standard:c}}},Dr=(e,t)=>{let n=t.find(({name:t})=>T.signals[t]===e);return n===void 0?t.find(t=>t.number===e):n},Tr()})),kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br=t((()=>{Or(),kr=e=>{let t="option `killSignal`";if(e===0)throw TypeError(`Invalid ${t}: 0 cannot be used.`);return jr(e,t)},Ar=e=>e===0?e:jr(e,"`subprocess.kill()`'s argument"),jr=(e,t)=>{if(Number.isInteger(e))return Mr(e,t);if(typeof e==`string`)return Fr(e,t);throw TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${Ir()}`)},Mr=(e,t)=>{if(Pr.has(e))return Pr.get(e);throw TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${Ir()}`)},Nr=()=>new Map(Object.entries(T.signals).reverse().map(([e,t])=>[t,e])),Pr=Nr(),Fr=(e,t)=>{if(e in T.signals)return e;throw e.toUpperCase()in T.signals?TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`):TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${Ir()}`)},Ir=()=>`Available signal names: ${Lr()}.
10
+ Available signal numbers: ${Rr()}.`,Lr=()=>Object.keys(T.signals).sort().map(e=>`'${e}'`).join(`, `),Rr=()=>[...new Set(Object.values(T.signals).sort((e,t)=>e-t))].join(`, `),zr=e=>wr[e].description})),Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr=t((()=>{z(),Br(),Vr=e=>{if(e===!1)return e;if(e===!0)return Hr;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Hr=1e3*5,Ur=({kill:e,options:{forceKillAfterDelay:t,killSignal:n},onInternalError:r,context:i,controller:a},o,s)=>{let{signal:c,error:l}=Wr(o,s,n);Gr(l,r);let u=e(c);return Kr({kill:e,signal:c,forceKillAfterDelay:t,killSignal:n,killResult:u,context:i,controller:a}),u},Wr=(e,t,n)=>{let[r=n,i]=ur(e)?[void 0,e]:[e,t];if(typeof r!=`string`&&!Number.isInteger(r))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(r)}`);if(i!==void 0&&!ur(i))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${i}`);return{signal:Ar(r),error:i}},Gr=(e,t)=>{e!==void 0&&t.reject(e)},Kr=async({kill:e,signal:t,forceKillAfterDelay:n,killSignal:r,killResult:i,context:a,controller:o})=>{t===r&&i&&qr({kill:e,forceKillAfterDelay:n,context:a,controllerSignal:o.signal})},qr=async({kill:e,forceKillAfterDelay:t,context:n,controllerSignal:r})=>{if(t!==!1)try{await Re(t,void 0,{signal:r}),e(`SIGKILL`)&&(n.isForcefullyTerminated??(n.isForcefullyTerminated=!0))}catch{}}})),Yr,Xr=t((()=>{Yr=async(e,t)=>{e.aborted||await E(e,`abort`,{signal:t})}})),Zr,Qr,$r,ei=t((()=>{Xr(),Zr=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!==`[object AbortSignal]`)throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},Qr=({subprocess:e,cancelSignal:t,gracefulCancel:n,context:r,controller:i})=>t===void 0||n?[]:[$r(e,t,r,i)],$r=async(e,t,n,{signal:r})=>{throw await Yr(t,r),n.terminationReason??(n.terminationReason=`cancel`),e.kill(),t.reason}})),ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,B,gi,V,_i,vi=t((()=>{ti=({methodName:e,isSubprocess:t,ipc:n,isConnected:r})=>{ni(e,t,n),ri(e,t,r)},ni=(e,t,n)=>{if(!n)throw Error(`${B(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},ri=(e,t,n)=>{if(!n)throw Error(`${B(e,t)} cannot be used: the ${V(t)} has already exited or disconnected.`)},ii=e=>{throw Error(`${B(`getOneMessage`,e)} could not complete: the ${V(e)} exited or disconnected.`)},ai=e=>{throw Error(`${B(`sendMessage`,e)} failed: the ${V(e)} is sending a message too, instead of listening to incoming messages.
11
+ This can be fixed by both sending a message and listening to incoming messages at the same time:
12
+
13
+ const [receivedMessage] = await Promise.all([
14
+ ${B(`getOneMessage`,e)},
15
+ ${B(`sendMessage`,e,`message, {strict: true}`)},
16
+ ]);`)},oi=(e,t)=>Error(`${B(`sendMessage`,t)} failed when sending an acknowledgment response to the ${V(t)}.`,{cause:e}),si=e=>{throw Error(`${B(`sendMessage`,e)} failed: the ${V(e)} is not listening to incoming messages.`)},ci=e=>{throw Error(`${B(`sendMessage`,e)} failed: the ${V(e)} exited without listening to incoming messages.`)},li=()=>Error(`\`cancelSignal\` aborted: the ${V(!0)} disconnected.`),ui=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},di=({error:e,methodName:t,isSubprocess:n})=>{if(e.code===`EPIPE`)throw Error(`${B(t,n)} cannot be used: the ${V(n)} is disconnecting.`,{cause:e})},fi=({error:e,methodName:t,isSubprocess:n,message:r})=>{if(pi(e))throw Error(`${B(t,n)}'s argument type is invalid: the message cannot be serialized: ${String(r)}.`,{cause:e})},pi=({code:e,message:t})=>mi.has(e)||hi.some(e=>t.includes(e)),mi=new Set([`ERR_MISSING_ARGS`,`ERR_INVALID_ARG_TYPE`]),hi=[`could not be cloned`,`circular structure`,`call stack size exceeded`],B=(e,t,n=``)=>e===`cancelSignal`?"`cancelSignal`'s `controller.abort()`":`${gi(t)}${e}(${n})`,gi=e=>e?``:`subprocess.`,V=e=>e?`parent process`:`subprocess`,_i=e=>{e.connected&&e.disconnect()}})),yi,bi=t((()=>{yi=()=>{let e={},t=new Promise((t,n)=>{Object.assign(e,{resolve:t,reject:n})});return Object.assign(t,e)}})),xi,Si,H,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji=t((()=>{I(),xi=(e,t=`stdin`)=>{let{options:n,fileDescriptors:r}=H.get(e),i=Ci(r,t,!0),a=e.stdio[i];if(a===null)throw TypeError(Ei(i,t,n,!0));return a},Si=(e,t=`stdout`)=>{let{options:n,fileDescriptors:r}=H.get(e),i=Ci(r,t,!1),a=i===`all`?e.all:e.stdio[i];if(a==null)throw TypeError(Ei(i,t,n,!1));return a},H=new WeakMap,Ci=(e,t,n)=>{let r=wi(t,n);return Ti(r,t,n,e),r},wi=(e,t)=>{let n=Et(e);if(n!==void 0)return n;let{validOptions:r,defaultValue:i}=t?{validOptions:`"stdin"`,defaultValue:`stdin`}:{validOptions:`"stdout", "stderr", "all"`,defaultValue:`stdout`};throw TypeError(`"${ki(t)}" must not be "${e}".
17
+ It must be ${r} or "fd3", "fd4" (and so on).
18
+ It is optional and defaults to "${i}".`)},Ti=(e,t,n,r)=>{let i=r[Oi(e)];if(i===void 0)throw TypeError(`"${ki(n)}" must not be ${t}. That file descriptor does not exist.
19
+ Please set the "stdio" option to ensure that file descriptor exists.`);if(i.direction===`input`&&!n)throw TypeError(`"${ki(n)}" must not be ${t}. It must be a readable stream, not writable.`);if(i.direction!==`input`&&n)throw TypeError(`"${ki(n)}" must not be ${t}. It must be a writable stream, not readable.`)},Ei=(e,t,n,r)=>{if(e===`all`&&!n.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:i,optionValue:a}=Di(e,n);return`The "${i}: ${Ai(a)}" option is incompatible with using "${ki(r)}: ${Ai(t)}".
20
+ Please set this option with "pipe" instead.`},Di=(e,{stdin:t,stdout:n,stderr:r,stdio:i})=>{let a=Oi(e);return a===0&&t!==void 0?{optionName:`stdin`,optionValue:t}:a===1&&n!==void 0?{optionName:`stdout`,optionValue:n}:a===2&&r!==void 0?{optionName:`stderr`,optionValue:r}:{optionName:`stdio[${a}]`,optionValue:i[a]}},Oi=e=>e===`all`?1:e,ki=e=>e?`to`:`from`,Ai=e=>typeof e==`string`?`'${e}'`:typeof e==`number`?`${e}`:`Stream`})),Mi,Ni=t((()=>{Mi=(e,t,n)=>{let r=e.getMaxListeners();r===0||r===1/0||(e.setMaxListeners(r+t),Te(n,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))}})),Pi,Fi,Ii,Li,Ri,zi,Bi=t((()=>{Pi=(e,t)=>{t&&Fi(e)},Fi=e=>{e.refCounted()},Ii=(e,t)=>{t&&Li(e)},Li=e=>{e.unrefCounted()},Ri=(e,t)=>{t&&(Li(e),Li(e))},zi=(e,t)=>{t&&(Fi(e),Fi(e))}})),Vi,Hi,Ui,Wi=t((()=>{pa(),Bi(),oa(),Oa(),Vi=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r},i)=>{if(ea(i)||wa(i))return;Ui.has(e)||Ui.set(e,[]);let a=Ui.get(e);if(a.push(i),!(a.length>1))for(;a.length>0;){await la(e,r,i),await Ie.yield();let o=await $i({wrappedMessage:a[0],anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r});a.shift(),r.emit(`message`,o),r.emit(`message:done`)}},Hi=async({anyProcess:e,channel:t,isSubprocess:n,ipcEmitter:r,boundOnMessage:i})=>{Ea();let a=Ui.get(e);for(;a?.length>0;)await E(r,`message:done`);e.removeListener(`message`,i),zi(t,n),r.connected=!1,r.emit(`disconnect`)},Ui=new WeakMap})),Gi,Ki,qi,Ji,Yi=t((()=>{Wi(),Bi(),Gi=(e,t,n)=>{if(Ki.has(e))return Ki.get(e);let r=new we;return r.connected=!0,Ki.set(e,r),qi({ipcEmitter:r,anyProcess:e,channel:t,isSubprocess:n}),r},Ki=new WeakMap,qi=({ipcEmitter:e,anyProcess:t,channel:n,isSubprocess:r})=>{let i=Vi.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e});t.on(`message`,i),t.once(`disconnect`,Hi.bind(void 0,{anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:e,boundOnMessage:i})),Ri(n,r)},Ji=e=>{let t=Ki.get(e);return t===void 0?e.channel!==null:t.connected}})),Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa=t((()=>{bi(),Ni(),ya(),vi(),Yi(),pa(),Xi=({anyProcess:e,channel:t,isSubprocess:n,message:r,strict:i})=>{if(!i)return r;let a=da(e,Gi(e,t,n));return{id:Zi++,type:ia,message:r,hasListeners:a}},Zi=0n,Qi=(e,t)=>{if(!(t?.type!==ia||t.hasListeners))for(let{id:t}of e)t!==void 0&&na[t].resolve({isDeadlock:!0,hasListeners:!1})},$i=async({wrappedMessage:e,anyProcess:t,channel:n,isSubprocess:r,ipcEmitter:i})=>{if(e?.type!==ia||!t.connected)return e;let{id:a,message:o}=e,s={id:a,type:aa,message:da(t,i)};try{await ma({anyProcess:t,channel:n,isSubprocess:r,ipc:!0},s)}catch(e){i.emit(`strict:error`,e)}return o},ea=e=>{if(e?.type!==aa)return!1;let{id:t,message:n}=e;return na[t]?.resolve({isDeadlock:!1,hasListeners:n}),!0},ta=async(e,t,n)=>{if(e?.type!==ia)return;let r=yi();na[e.id]=r;let i=new AbortController;try{let{isDeadlock:e,hasListeners:a}=await Promise.race([r,ra(t,n,i)]);e&&ai(n),a||si(n)}finally{i.abort(),delete na[e.id]}},na={},ra=async(e,t,{signal:n})=>{Mi(e,1,n),await E(e,`disconnect`,{signal:n}),ci(t)},ia=`execa:ipc:request`,aa=`execa:ipc:response`})),sa,ca,la,ua,da,fa,pa=t((()=>{bi(),I(),ji(),oa(),sa=(e,t,n)=>{ua.has(e)||ua.set(e,new Set);let r=ua.get(e),i={onMessageSent:yi(),id:n?t.id:void 0};return r.add(i),{outgoingMessages:r,outgoingMessage:i}},ca=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},la=async(e,t,n)=>{for(;!da(e,t)&&ua.get(e)?.size>0;){let t=[...ua.get(e)];Qi(t,n),await Promise.all(t.map(({onMessageSent:e})=>e))}},ua=new WeakMap,da=(e,t)=>t.listenerCount(`message`)>fa(e),fa=e=>H.has(e)&&!jt(H.get(e).options.buffer,`ipc`)?1:0})),ma,ha,ga,_a,va,ya=t((()=>{vi(),pa(),oa(),ma=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},i,{strict:a=!1}={})=>{let o=`sendMessage`;return ti({methodName:o,isSubprocess:n,ipc:r,isConnected:e.connected}),ha({anyProcess:e,channel:t,methodName:o,isSubprocess:n,message:i,strict:a})},ha=async({anyProcess:e,channel:t,methodName:n,isSubprocess:r,message:i,strict:a})=>{let o=Xi({anyProcess:e,channel:t,isSubprocess:r,message:i,strict:a}),s=sa(e,o,a);try{await ga({anyProcess:e,methodName:n,isSubprocess:r,wrappedMessage:o,message:i})}catch(t){throw _i(e),t}finally{ca(s)}},ga=async({anyProcess:e,methodName:t,isSubprocess:n,wrappedMessage:r,message:i})=>{let a=_a(e);try{await Promise.all([ta(r,e,n),a(r)])}catch(e){throw di({error:e,methodName:t,isSubprocess:n}),fi({error:e,methodName:t,isSubprocess:n,message:i}),e}},_a=e=>{if(va.has(e))return va.get(e);let t=se(e.send.bind(e));return va.set(e,t),t},va=new WeakMap})),ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa=t((()=>{ya(),Yi(),vi(),ba=(e,t)=>{let n=`cancelSignal`;return ri(n,!1,e.connected),ga({anyProcess:e,methodName:n,isSubprocess:!1,wrappedMessage:{type:Ta,message:t},message:t})},xa=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>(await Sa({anyProcess:e,channel:t,isSubprocess:n,ipc:r}),Da.signal),Sa=async({anyProcess:e,channel:t,isSubprocess:n,ipc:r})=>{if(!Ca){if(Ca=!0,!r){ui();return}if(t===null){Ea();return}Gi(e,t,n),await Ie.yield()}},Ca=!1,wa=e=>e?.type===Ta?(Da.abort(e.message),!0):!1,Ta=`execa:ipc:cancel`,Ea=()=>{Da.abort(li())},Da=new AbortController})),ka,Aa,ja,Ma,Na=t((()=>{Xr(),Oa(),Jr(),ka=({gracefulCancel:e,cancelSignal:t,ipc:n,serialization:r})=>{if(e){if(t===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!n)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(r===`json`)throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},Aa=({subprocess:e,cancelSignal:t,gracefulCancel:n,forceKillAfterDelay:r,context:i,controller:a})=>n?[ja({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:i,controller:a})]:[],ja=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:r,controller:{signal:i}})=>{throw await Yr(t,i),await ba(e,Ma(t)),qr({kill:e.kill,forceKillAfterDelay:n,context:r,controllerSignal:i}),r.terminationReason??(r.terminationReason=`gracefulCancel`),t.reason},Ma=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t}})),Pa,Fa,Ia,La=t((()=>{z(),Pa=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Fa=(e,t,n,r)=>t===0||t===void 0?[]:[Ia(e,t,n,r)],Ia=async(e,t,n,{signal:r})=>{throw await Re(t,void 0,{signal:r}),n.terminationReason??(n.terminationReason=`timeout`),e.kill(),new or}})),Ra,za,Ba=t((()=>{We(),Ra=({options:e})=>{if(e.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},za=(e,t,{node:n=!1,nodePath:r=ue,nodeOptions:i=le.filter(e=>!e.startsWith(`--inspect`)),cwd:a,execPath:o,...s})=>{if(o!==void 0)throw TypeError(`The "execPath" option has been removed. Please use the "nodePath" option instead.`);let c=Be(r,`The "nodePath" option`),l=w.resolve(a,c),u={...s,nodePath:l,node:n,cwd:a};if(!n)return[e,t,u];if(w.basename(e,`.exe`)===`node`)throw TypeError(`When the "node" option is true, the first argument does not need to be "node".`);return[l,[...i,e,...t],{ipc:!0,...u,shell:!1}]}})),Va,Ha,Ua,Wa,Ga,Ka=t((()=>{Va=({ipcInput:e,ipc:t,serialization:n})=>{if(e!==void 0){if(!t)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Wa[n](e)}},Ha=e=>{try{ze(e)}catch(e){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},Ua=e=>{try{JSON.stringify(e)}catch(e){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}},Wa={advanced:Ha,json:Ua},Ga=async(e,t)=>{t!==void 0&&await e.sendMessage(t)}})),qa,Ja,U,Ya,Xa,Za,Qa,$a=t((()=>{qa=({encoding:e})=>{if(Ya.has(e))return;let t=Xa(e);if(t!==void 0)throw TypeError(`Invalid option \`encoding: ${Qa(e)}\`.
21
+ Please rename it to ${Qa(t)}.`);let n=[...Ya].map(e=>Qa(e)).join(`, `);throw TypeError(`Invalid option \`encoding: ${Qa(e)}\`.
22
+ Please rename it to one of: ${n}.`)},Ja=new Set([`utf8`,`utf16le`]),U=new Set([`buffer`,`hex`,`base64`,`base64url`,`latin1`,`ascii`]),Ya=new Set([...Ja,...U]),Xa=e=>{if(e===null)return`buffer`;if(typeof e!=`string`)return;let t=e.toLowerCase();if(t in Za)return Za[t];if(Ya.has(t))return t},Za={"utf-8":`utf8`,"utf-16le":`utf16le`,"ucs-2":`utf16le`,ucs2:`utf16le`,binary:`latin1`},Qa=e=>typeof e==`string`?`"${e}"`:String(e)})),eo,to,no,ro=t((()=>{We(),eo=(e=to())=>{let t=Be(e,`The "cwd" option`);return w.resolve(t)},to=()=>{try{return C.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},no=(e,t)=>{if(t===to())return e;let n;try{n=xe(t)}catch(n){return`The "cwd" option is invalid: ${t}.\n${n.message}\n${e}`}return n.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`}})),io,ao,oo,so,co=t((()=>{io=n(qn(),1),ir(),Jr(),Br(),ei(),Na(),La(),Ba(),Ka(),$a(),ro(),We(),I(),ao=(e,t,n)=>{n.cwd=eo(n.cwd);let[r,i,a]=za(e,t,n),{command:o,args:s,options:c}=io.default._parse(r,i,a),l=vt(c),u=oo(l);return Pa(u),qa(u),Va(u),Zr(u),ka(u),u.shell=Ue(u.shell),u.env=so(u),u.killSignal=kr(u.killSignal),u.forceKillAfterDelay=Vr(u.forceKillAfterDelay),u.lines=u.lines.map((e,t)=>e&&!U.has(u.encoding)&&u.buffer[t]),C.platform===`win32`&&w.basename(o,`.exe`)===`cmd`&&s.unshift(`/q`),{file:o,commandArguments:s,options:u}},oo=({extendEnv:e=!0,preferLocal:t=!1,cwd:n,localDir:r=n,encoding:i=`utf8`,reject:a=!0,cleanup:o=!0,all:s=!1,windowsHide:c=!0,killSignal:l=`SIGTERM`,forceKillAfterDelay:u=!0,gracefulCancel:d=!1,ipcInput:f,ipc:p=f!==void 0||d,serialization:m=`advanced`,...h})=>({...h,extendEnv:e,preferLocal:t,cwd:n,localDirectory:r,encoding:i,reject:a,cleanup:o,all:s,windowsHide:c,killSignal:l,forceKillAfterDelay:u,gracefulCancel:d,ipcInput:f,ipc:p,serialization:m}),so=({env:e,extendEnv:t,preferLocal:n,node:r,localDirectory:i,nodePath:a})=>{let o=t?{...C.env,...e}:e;return n||r?rr({env:o,cwd:i,execPath:a,preferLocal:n,addExecPath:r}):o}})),lo,uo=t((()=>{lo=(e,t,n)=>n.shell&&t.length>0?[[e,...t].join(` `),[],n]:[e,t,n]}));function fo(e){if(typeof e==`string`)return po(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw Error(`Input must be a string or a Uint8Array`);return mo(e)}var po,mo,ho,go,_o,vo,yo=t((()=>{po=e=>e.at(-1)===ho?e.slice(0,e.at(-2)===_o?-2:-1):e,mo=e=>e.at(-1)===go?e.subarray(0,e.at(-2)===vo?-2:-1):e,ho=`
23
+ `,go=ho.codePointAt(0),_o=`\r`,vo=_o.codePointAt(0)}));function W(e,{checkOpen:t=!0}={}){return typeof e==`object`&&!!e&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe==`function`}function bo(e,{checkOpen:t=!0}={}){return W(e,{checkOpen:t})&&(e.writable||!t)&&typeof e.write==`function`&&typeof e.end==`function`&&typeof e.writable==`boolean`&&typeof e.writableObjectMode==`boolean`&&typeof e.destroy==`function`&&typeof e.destroyed==`boolean`}function xo(e,{checkOpen:t=!0}={}){return W(e,{checkOpen:t})&&(e.readable||!t)&&typeof e.read==`function`&&typeof e.readable==`boolean`&&typeof e.readableObjectMode==`boolean`&&typeof e.destroy==`function`&&typeof e.destroyed==`boolean`}function So(e,t){return bo(e,t)&&xo(e,t)}var Co=t((()=>{}));async function wo(){if(d(K,this))return{done:!0,value:void 0};let e;try{e=await d(G,this).read()}catch(e){throw p(q,this,void 0),p(K,this,!0),d(G,this).releaseLock(),e}return e.done&&(p(q,this,void 0),p(K,this,!0),d(G,this).releaseLock()),e}async function To(e){if(d(K,this))return{done:!0,value:e};if(p(K,this,!0),!d(Ao,this)){let t=d(G,this).cancel(e);return d(G,this).releaseLock(),await t,{done:!0,value:e}}return d(G,this).releaseLock(),{done:!0,value:e}}function Eo(){return this[No].next()}function Do(e){return this[No].return(e)}function Oo({preventCancel:e=!1}={}){let t=this.getReader(),n=new Mo(t,e),r=Object.create(Po);return r[No]=n,r}var ko,G,Ao,K,q,jo,Mo,No,Po,Fo=t((()=>{m(),s(),l(),u(),c(),ko=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),G=new WeakMap,Ao=new WeakMap,K=new WeakMap,q=new WeakMap,jo=new WeakSet,Mo=class{constructor(e,t){h(this,jo),f(this,G,void 0),f(this,Ao,void 0),f(this,K,!1),f(this,q,void 0),p(G,this,e),p(Ao,this,t)}next(){let e=()=>o(jo,this,wo).call(this);return p(q,this,d(q,this)?d(q,this).then(e,e):e()),d(q,this)}return(e){let t=()=>o(jo,this,To).call(this,e);return d(q,this)?d(q,this).then(t,t):t()}},No=Symbol(),Object.defineProperty(Eo,"name",{value:`next`}),Object.defineProperty(Do,"name",{value:`return`}),Po=Object.create(ko,{next:{enumerable:!0,configurable:!0,writable:!0,value:Eo},return:{enumerable:!0,configurable:!0,writable:!0,value:Do}})})),Io=t((()=>{Fo()})),Lo,Ro,zo,Bo,Vo,Ho=t((()=>{Co(),Io(),Lo=e=>{if(xo(e,{checkOpen:!1})&&Vo.on!==void 0)return zo(e);if(typeof e?.[Symbol.asyncIterator]==`function`)return e;if(Ro.call(e)===`[object ReadableStream]`)return Oo.call(e);throw TypeError(`The first argument must be a Readable, a ReadableStream, or an async iterable.`)},{toString:Ro}=Object.prototype,zo=async function*(e){let t=new AbortController,n={};Bo(e,t,n);try{for await(let[n]of Vo.on(e,`data`,{signal:t.signal}))yield n}catch(e){if(n.error!==void 0)throw n.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},Bo=async(e,t,n)=>{try{await Vo.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){n.error=e}finally{t.abort()}},Vo={}})),Uo,Wo,Go,Ko,qo,Jo,Yo,Xo=t((()=>{Ho(),i(),Uo=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:i,addChunk:a,getFinalChunk:o,finalize:s},{maxBuffer:c=1/0}={})=>{let l=Lo(e),u=t();u.length=0;try{for await(let e of l){let t=n[qo(e)](e,u);Go({convertedChunk:t,state:u,getSize:r,truncateChunk:i,addChunk:a,maxBuffer:c})}return Wo({state:u,convertChunk:n,getSize:r,truncateChunk:i,addChunk:a,getFinalChunk:o,maxBuffer:c}),s(u)}catch(e){let t=typeof e==`object`&&e?e:Error(e);throw t.bufferedData=s(u),t}},Wo=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:i,maxBuffer:a})=>{let o=i(e);o!==void 0&&Go({convertedChunk:o,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:a})},Go=({convertedChunk:e,state:t,getSize:n,truncateChunk:r,addChunk:i,maxBuffer:a})=>{let o=n(e),s=t.length+o;if(s<=a){Ko(e,t,i,s);return}let c=r(e,a-t.length);throw c!==void 0&&Ko(c,t,i,a),new Yo},Ko=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},qo=e=>{let t=typeof e;if(t===`string`)return`string`;if(t!==`object`||e===null)return`others`;if(globalThis.Buffer?.isBuffer(e))return`buffer`;let n=Jo.call(e);return n===`[object ArrayBuffer]`?`arrayBuffer`:n===`[object DataView]`?`dataView`:Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&Jo.call(e.buffer)===`[object ArrayBuffer]`?`typedArray`:`others`},{toString:Jo}=Object.prototype,Yo=class extends Error{constructor(){super(`maxBuffer exceeded`),a(this,`name`,`MaxBufferError`)}}})),J,Zo,Qo,$o,es,ts=t((()=>{J=e=>e,Zo=()=>void 0,Qo=({contents:e})=>e,$o=e=>{throw Error(`Streams in object mode are not supported: ${String(e)}`)},es=e=>e.length}));async function ns(e,t){return Uo(e,os,t)}var rs,is,as,os,ss=t((()=>{Xo(),ts(),rs=()=>({contents:[]}),is=()=>1,as=(e,{contents:t})=>(t.push(e),t),os={init:rs,convertChunk:{string:J,buffer:J,arrayBuffer:J,dataView:J,typedArray:J,others:J},getSize:is,truncateChunk:Zo,addChunk:as,getFinalChunk:Zo,finalize:Qo}}));async function cs(e,t){return Uo(e,Ss,t)}var ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs=t((()=>{Xo(),ts(),ls=()=>({contents:new ArrayBuffer(0)}),us=e=>ds.encode(e),ds=new TextEncoder,fs=e=>new Uint8Array(e),ps=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),ms=(e,t)=>e.slice(0,t),hs=(e,{contents:t,length:n},r)=>{let i=xs()?_s(t,r):gs(t,r);return new Uint8Array(i).set(e,n),i},gs=(e,t)=>{if(t<=e.byteLength)return e;let n=new ArrayBuffer(vs(t));return new Uint8Array(n).set(new Uint8Array(e),0),n},_s=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let n=new ArrayBuffer(t,{maxByteLength:vs(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n},vs=e=>ys**Math.ceil(Math.log(e)/Math.log(ys)),ys=2,bs=({contents:e,length:t})=>xs()?e:e.slice(0,t),xs=()=>`resize`in ArrayBuffer.prototype,Ss={init:ls,convertChunk:{string:us,buffer:fs,arrayBuffer:fs,dataView:ps,typedArray:ps,others:$o},getSize:es,truncateChunk:ms,addChunk:hs,getFinalChunk:Zo,finalize:bs}}));async function ws(e,t){return Uo(e,As,t)}var Ts,Es,Ds,Os,ks,As,js=t((()=>{Xo(),ts(),Ts=()=>({contents:``,textDecoder:new TextDecoder}),Es=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Ds=(e,{contents:t})=>t+e,Os=(e,t)=>e.slice(0,t),ks=({textDecoder:e})=>{let t=e.decode();return t===``?void 0:t},As={init:Ts,convertChunk:{string:J,buffer:Es,arrayBuffer:Es,dataView:Es,typedArray:Es,others:$o},getSize:es,truncateChunk:Os,addChunk:Ds,getFinalChunk:ks,finalize:Qo}})),Ms=t((()=>{ss(),Cs(),js(),Xo()})),Ns=t((()=>{Ms()})),Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs=t((()=>{Ns(),F(),I(),Ps=({error:e,stream:t,readableObjectMode:n,lines:r,encoding:i,fdNumber:a})=>{if(!(e instanceof Yo))throw e;if(a===`all`)return e;throw e.maxBufferInfo={fdNumber:a,unit:Fs(n,r,i)},t.destroy(),e},Fs=(e,t,n)=>e?`objects`:t?`lines`:n===`buffer`?`bytes`:`characters`,Is=(e,t,n)=>{if(t.length!==n)return;let r=new Yo;throw r.maxBufferInfo={fdNumber:`ipc`},r},Ls=(e,t)=>{let{streamName:n,threshold:r,unit:i}=Rs(e,t);return`Command's ${n} was larger than ${r} ${i}`},Rs=(e,t)=>{if(e?.maxBufferInfo===void 0)return{streamName:`output`,threshold:t[1],unit:`bytes`};let{maxBufferInfo:{fdNumber:n,unit:r}}=e;delete e.maxBufferInfo;let i=jt(t,n);return n===`ipc`?{streamName:`IPC output`,threshold:i,unit:`messages`}:{streamName:_t(n),threshold:i,unit:r}},zs=(e,t,n)=>e?.code===`ENOBUFS`&&t!==null&&t.some(e=>e!==null&&e.length>Vs(n)),Bs=(e,t,n)=>{if(!t)return e;let r=Vs(n);return e.length>r?e.slice(0,r):e},Vs=([,e])=>e})),Us,Ws,Gs,Ks,qs,Js,Ys,Xs=t((()=>{yo(),M(),ro(),Yt(),Hs(),Br(),z(),Us=({stdio:e,all:t,ipcOutput:n,originalError:r,signal:i,signalDescription:a,exitCode:o,escapedCommand:s,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:d,isForcefullyTerminated:f,forceKillAfterDelay:p,killSignal:m,maxBuffer:h,timeout:g,cwd:_})=>{let v=r?.code,y=Ws({originalError:r,timedOut:c,timeout:g,isMaxBuffer:d,maxBuffer:h,errorCode:v,signal:i,signalDescription:a,exitCode:o,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:f,forceKillAfterDelay:p,killSignal:m}),b=Ks(r,_),x=`${y}: ${s}${b===void 0?``:`\n${b}`}`;return{originalMessage:b,shortMessage:x,message:[x,...t===void 0?[e[2],e[1]]:[t],...e.slice(3),n.map(e=>qs(e)).join(`
24
+ `)].map(e=>Bt(fo(Js(e)))).filter(Boolean).join(`
25
+
26
+ `)}},Ws=({originalError:e,timedOut:t,timeout:n,isMaxBuffer:r,maxBuffer:i,errorCode:a,signal:o,signalDescription:s,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:d,forceKillAfterDelay:f,killSignal:p})=>{let m=Gs(d,f);return t?`Command timed out after ${n} milliseconds${m}`:u?o===void 0?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${m}`:`Command was gracefully canceled with ${o} (${s})`:l?`Command was canceled${m}`:r?`${Ls(e,i)}${m}`:a===void 0?d?`Command was killed with ${p} (${zr(p)})${m}`:o===void 0?c===void 0?`Command failed`:`Command failed with exit code ${c}`:`Command was killed with ${o} (${s})`:`Command failed with ${a}${m}`},Gs=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:``,Ks=(e,t)=>{if(e instanceof or)return;let n=Bt(no(cr(e)?e.originalMessage:String(e?.message??e),t));return n===``?void 0:n},qs=e=>typeof e==`string`?e:oe(e),Js=e=>Array.isArray(e)?e.map(e=>fo(Ys(e))).filter(Boolean).join(`
27
+ `):Ys(e),Ys=e=>typeof e==`string`?e:j(e)?$e(e):``})),Zs,Qs,$s,ec,tc,nc,rc=t((()=>{Br(),Mn(),z(),Xs(),Zs=({command:e,escapedCommand:t,stdio:n,all:r,ipcOutput:i,options:{cwd:a},startTime:o})=>tc({command:e,escapedCommand:t,cwd:a,durationMs:jn(o),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:n[1],stderr:n[2],all:r,stdio:n,ipcOutput:i,pipedFrom:[]}),Qs=({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:i,startTime:a,isSync:o})=>$s({error:e,command:t,escapedCommand:n,startTime:a,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:r.length}),ipcOutput:[],options:i,isSync:o}),$s=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:i,isCanceled:a,isGracefullyCanceled:o,isMaxBuffer:s,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:d,all:f,ipcOutput:p,options:{timeoutDuration:m,timeout:h=m,forceKillAfterDelay:g,killSignal:_,cwd:v,maxBuffer:y},isSync:b})=>{let{exitCode:x,signal:ee,signalDescription:te}=nc(l,u),{originalMessage:ne,shortMessage:re,message:ie}=Us({stdio:d,all:f,ipcOutput:p,originalError:e,signal:ee,signalDescription:te,exitCode:x,escapedCommand:n,timedOut:i,isCanceled:a,isGracefullyCanceled:o,isMaxBuffer:s,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:_,maxBuffer:y,timeout:h,cwd:v}),S=ar(e,ie,b);return Object.assign(S,ec({error:S,command:t,escapedCommand:n,startTime:r,timedOut:i,isCanceled:a,isGracefullyCanceled:o,isMaxBuffer:s,isForcefullyTerminated:c,exitCode:x,signal:ee,signalDescription:te,stdio:d,all:f,ipcOutput:p,cwd:v,originalMessage:ne,shortMessage:re})),S},ec=({error:e,command:t,escapedCommand:n,startTime:r,timedOut:i,isCanceled:a,isGracefullyCanceled:o,isMaxBuffer:s,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,stdio:f,all:p,ipcOutput:m,cwd:h,originalMessage:g,shortMessage:_})=>tc({shortMessage:_,originalMessage:g,command:t,escapedCommand:n,cwd:h,durationMs:jn(r),failed:!0,timedOut:i,isCanceled:a,isGracefullyCanceled:o,isTerminated:u!==void 0,isMaxBuffer:s,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:d,code:e.cause?.code,stdout:f[1],stderr:f[2],all:p,stdio:f,ipcOutput:m,pipedFrom:[]}),tc=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)),nc=(e,t)=>{let n=e===null?void 0:e,r=t===null?void 0:t;return{exitCode:n,signal:r,signalDescription:r===void 0?void 0:zr(t)}}}));function ic(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(sc(e*1e3)%1e3),nanoseconds:Math.trunc(sc(e*1e6)%1e3)}}function ac(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function oc(e){switch(typeof e){case`number`:if(Number.isFinite(e))return ic(e);break;case`bigint`:return ac(e)}throw TypeError(`Expected a finite number or bigint`)}var sc,cc=t((()=>{sc=e=>Number.isFinite(e)?e:0}));function lc(e,t){let n=typeof e==`bigint`;if(!n&&!Number.isFinite(e))throw TypeError(`Expected a finite number or bigint`);t={...t};let r=e<0?`-`:``;e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let i=[],a=(e,t)=>{let n=Math.floor(e*10**t+fc);return(Math.round(n)/10**t).toFixed(t)},o=(e,n,r,a)=>{if(!((i.length===0||!t.colonNotation)&&uc(e)&&!(t.colonNotation&&r===`m`))){if(a??(a=String(e)),t.colonNotation){let e=a.includes(`.`)?a.split(`.`)[0].length:a.length,t=i.length>0?2:1;a=`0`.repeat(Math.max(0,t-e))+a}else a+=t.verbose?` `+dc(n,e):r;i.push(a)}},s=oc(e),c=BigInt(s.days);if(t.hideYearAndDays?o(BigInt(c)*24n+BigInt(s.hours),`hour`,`h`):(t.hideYear?o(c,`day`,`d`):(o(c/365n,`year`,`y`),o(c%365n,`day`,`d`)),o(Number(s.hours),`hour`,`h`)),o(Number(s.minutes),`minute`,`m`),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){let e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),i=Number(s.nanoseconds);if(o(e,`second`,`s`),t.formatSubMilliseconds)o(n,`millisecond`,`ms`),o(r,`microsecond`,`µs`),o(i,`nanosecond`,`ns`);else{let e=n+r/1e3+i/1e6,a=typeof t.millisecondsDecimalDigits==`number`?t.millisecondsDecimalDigits:0,s=a?e.toFixed(a):e>=1?Math.round(e):Math.ceil(e);o(Number.parseFloat(s),`millisecond`,`ms`,s)}}else{let r=a((n?Number(e%pc):e)/1e3%60,typeof t.secondsDecimalDigits==`number`?t.secondsDecimalDigits:1),i=t.keepDecimalsOnWholeSeconds?r:r.replace(/\.0+$/,``);o(Number.parseFloat(i),`second`,`s`,i)}if(i.length===0)return r+`0`+(t.verbose?` milliseconds`:`ms`);let l=t.colonNotation?`:`:` `;return typeof t.unitCount==`number`&&(i=i.slice(0,Math.max(t.unitCount,1))),r+i.join(l)}var uc,dc,fc,pc,mc=t((()=>{cc(),uc=e=>e===0||e===0n,dc=(e,t)=>t===1||t===1n?e:`${e}s`,fc=1e-7,pc=24n*60n*60n*1000n})),hc,gc=t((()=>{Sn(),hc=(e,t)=>{e.failed&&gn({type:`error`,verboseMessage:e.shortMessage,verboseInfo:t,result:e})}})),_c,vc,yc=t((()=>{mc(),L(),Sn(),gc(),_c=(e,t)=>{Mt(t)&&(hc(e,t),vc(e,t))},vc=(e,t)=>{gn({type:`duration`,verboseMessage:`(done in ${lc(e.durationMs)})`,verboseInfo:t,result:e})}})),bc,xc=t((()=>{yc(),bc=(e,t,{reject:n})=>{if(_c(e,t),e.failed&&n)throw e;return e}})),Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,Y,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,X,qc,Jc,Yc,Xc,Zc,Z=t((()=>{Co(),A(),M(),Sc=(e,t)=>Y(e)?`asyncGenerator`:jc(e)?`generator`:Nc(e)?`fileUrl`:Fc(e)?`filePath`:Hc(e)?`webStream`:W(e,{checkOpen:!1})?`native`:j(e)?`uint8Array`:Wc(e)?`asyncIterable`:Gc(e)?`iterable`:Uc(e)?Tc({transform:e},t):Mc(e)?Cc(e,t):`native`,Cc=(e,t)=>So(e.transform,{checkOpen:!1})?wc(e,t):Uc(e.transform)?Tc(e,t):Oc(e,t),wc=(e,t)=>(Ec(e,t,`Duplex stream`),`duplex`),Tc=(e,t)=>(Ec(e,t,`web TransformStream`),`webTransform`),Ec=({final:e,binary:t,objectMode:n},r,i)=>{Dc(e,`${r}.final`,i),Dc(t,`${r}.binary`,i),kc(n,`${r}.objectMode`)},Dc=(e,t,n)=>{if(e!==void 0)throw TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${n}.`)},Oc=({transform:e,final:t,binary:n,objectMode:r},i)=>{if(e!==void 0&&!Ac(e))throw TypeError(`The \`${i}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(So(t,{checkOpen:!1}))throw TypeError(`The \`${i}.final\` option must not be a Duplex stream.`);if(Uc(t))throw TypeError(`The \`${i}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!Ac(t))throw TypeError(`The \`${i}.final\` option must be a generator.`);return kc(n,`${i}.binary`),kc(r,`${i}.objectMode`),Y(e)||Y(t)?`asyncGenerator`:`generator`},kc=(e,t)=>{if(e!==void 0&&typeof e!=`boolean`)throw TypeError(`The \`${t}\` option must use a boolean.`)},Ac=e=>Y(e)||jc(e),Y=e=>Object.prototype.toString.call(e)===`[object AsyncGeneratorFunction]`,jc=e=>Object.prototype.toString.call(e)===`[object GeneratorFunction]`,Mc=e=>k(e)&&(e.transform!==void 0||e.final!==void 0),Nc=e=>Object.prototype.toString.call(e)===`[object URL]`,Pc=e=>Nc(e)&&e.protocol!==`file:`,Fc=e=>k(e)&&Object.keys(e).length>0&&Object.keys(e).every(e=>Ic.has(e))&&Lc(e.file),Ic=new Set([`file`,`append`]),Lc=e=>typeof e==`string`,Rc=(e,t)=>e===`native`&&typeof t==`string`&&!zc.has(t),zc=new Set([`ipc`,`ignore`,`inherit`,`overlapped`,`pipe`]),Bc=e=>Object.prototype.toString.call(e)===`[object ReadableStream]`,Vc=e=>Object.prototype.toString.call(e)===`[object WritableStream]`,Hc=e=>Bc(e)||Vc(e),Uc=e=>Bc(e?.readable)&&Vc(e?.writable),Wc=e=>Kc(e)&&typeof e[Symbol.asyncIterator]==`function`,Gc=e=>Kc(e)&&typeof e[Symbol.iterator]==`function`,Kc=e=>typeof e==`object`&&!!e,X=new Set([`generator`,`asyncGenerator`,`duplex`,`webTransform`]),qc=new Set([`fileUrl`,`filePath`,`fileNumber`]),Jc=new Set([`fileUrl`,`filePath`]),Yc=new Set([...Jc,`webStream`,`nodeStream`]),Xc=new Set([`webTransform`,`duplex`]),Zc={generator:`a generator`,asyncGenerator:`an async generator`,fileUrl:`a file URL`,filePath:`a file path string`,fileNumber:`a file descriptor number`,webStream:`a web stream`,nodeStream:`a Node.js stream`,webTransform:`a web TransformStream`,duplex:`a Duplex stream`,native:`any value`,iterable:`an iterable`,asyncIterable:`an async iterable`,string:`a string`,uint8Array:`a Uint8Array`}})),Qc,$c,el,tl,nl=t((()=>{Z(),Qc=(e,t,n,r)=>r===`output`?$c(e,t,n):el(e,t,n),$c=(e,t,n)=>{let r=t!==0&&n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:e??r}},el=(e,t,n)=>{let r=t===0?e===!0:n[t-1].value.readableObjectMode;return{writableObjectMode:r,readableObjectMode:t!==n.length-1&&(e??r)}},tl=(e,t)=>{let n=e.findLast(({type:e})=>X.has(e));return n===void 0?!1:t===`input`?n.value.writableObjectMode:n.value.readableObjectMode}})),rl,il,al,ol,sl,cl,ll,ul=t((()=>{A(),$a(),Z(),nl(),rl=(e,t,n,r)=>[...e.filter(({type:e})=>!X.has(e)),...il(e,t,n,r)],il=(e,t,n,{encoding:r})=>{let i=e.filter(({type:e})=>X.has(e)),a=Array.from({length:i.length});for(let[e,o]of Object.entries(i))a[e]=al({stdioItem:o,index:Number(e),newTransforms:a,optionName:t,direction:n,encoding:r});return ll(a,n)},al=({stdioItem:e,stdioItem:{type:t},index:n,newTransforms:r,optionName:i,direction:a,encoding:o})=>t===`duplex`?ol({stdioItem:e,optionName:i}):t===`webTransform`?sl({stdioItem:e,index:n,newTransforms:r,direction:a}):cl({stdioItem:e,index:n,newTransforms:r,direction:a,encoding:o}),ol=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:n,readableObjectMode:r},objectMode:i=r}},optionName:a})=>{if(i&&!r)throw TypeError(`The \`${a}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!i&&r)throw TypeError(`The \`${a}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:n,readableObjectMode:r}}},sl=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:r,direction:i})=>{let{transform:a,objectMode:o}=k(t)?t:{transform:t},{writableObjectMode:s,readableObjectMode:c}=Qc(o,n,r,i);return{...e,value:{transform:a,writableObjectMode:s,readableObjectMode:c}}},cl=({stdioItem:e,stdioItem:{value:t},index:n,newTransforms:r,direction:i,encoding:a})=>{let{transform:o,final:s,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=k(t)?t:{transform:t},d=c||U.has(a),{writableObjectMode:f,readableObjectMode:p}=Qc(u,n,r,i);return{...e,value:{transform:o,final:s,binary:d,preserveNewlines:l,writableObjectMode:f,readableObjectMode:p}}},ll=(e,t)=>t===`input`?e.reverse():e})),dl,fl,pl,ml,hl,gl,_l,vl,yl=t((()=>{Co(),Z(),dl=(e,t,n)=>{let r=e.map(e=>fl(e,t));if(r.includes(`input`)&&r.includes(`output`))throw TypeError(`The \`${n}\` option must not be an array of both readable and writable values.`);return r.find(Boolean)??vl},fl=({type:e,value:t},n)=>pl[n]??gl[e](t),pl=[`input`,`output`,`output`],ml=()=>void 0,hl=()=>`input`,gl={generator:ml,asyncGenerator:ml,fileUrl:ml,filePath:ml,iterable:hl,asyncIterable:hl,uint8Array:hl,webStream:e=>Vc(e)?`output`:`input`,nodeStream(e){return xo(e,{checkOpen:!1})?bo(e,{checkOpen:!1})?void 0:`input`:`output`},webTransform:ml,duplex:ml,native(e){let t=_l(e);if(t!==void 0)return t;if(W(e,{checkOpen:!1}))return gl.nodeStream(e)}},_l=e=>{if([0,C.stdin].includes(e))return`input`;if([1,2,C.stdout,C.stderr].includes(e))return`output`},vl=`output`})),bl,xl=t((()=>{bl=(e,t)=>t&&!e.includes(`ipc`)?[...e,`ipc`]:e})),Sl,Cl,wl,Tl,El,Dl,Ol=t((()=>{F(),xl(),L(),Sl=({stdio:e,ipc:t,buffer:n,...r},i,a)=>{let o=Cl(e,r).map((e,t)=>Tl(e,t));return a?El(o,n,i):bl(o,t)},Cl=(e,t)=>{if(e===void 0)return P.map(e=>t[e]);if(wl(t))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${P.map(e=>`\`${e}\``).join(`, `)}`);if(typeof e==`string`)return[e,e,e];if(!Array.isArray(e))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let n=Math.max(e.length,P.length);return Array.from({length:n},(t,n)=>e[n])},wl=e=>P.some(t=>e[t]!==void 0),Tl=(e,t)=>Array.isArray(e)?e.map(e=>Tl(e,t)):e??(t>=P.length?`ignore`:`pipe`),El=(e,t,n)=>e.map((e,r)=>!t[r]&&r!==0&&!Nt(n,r)&&Dl(e)?`ignore`:e),Dl=e=>e===`pipe`||Array.isArray(e)&&e.every(e=>e===`pipe`)})),kl,Al,jl,Ml,Nl,Pl,Fl=t((()=>{Co(),F(),M(),ji(),kl=({stdioItem:e,stdioItem:{type:t},isStdioArray:n,fdNumber:r,direction:i,isSync:a})=>!n||t!==`native`?e:a?Al({stdioItem:e,fdNumber:r,direction:i}):Nl({stdioItem:e,fdNumber:r}),Al=({stdioItem:e,stdioItem:{value:t,optionName:n},fdNumber:r,direction:i})=>{let a=jl({value:t,optionName:n,fdNumber:r,direction:i});if(a!==void 0)return a;if(W(t,{checkOpen:!1}))throw TypeError(`The \`${n}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},jl=({value:e,optionName:t,fdNumber:n,direction:r})=>{let i=Ml(e,n);if(i!==void 0){if(r===`output`)return{type:`fileNumber`,value:i,optionName:t};if(Ce.isatty(i))throw TypeError(`The \`${t}: ${Ai(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:`uint8Array`,value:Ye(be(i)),optionName:t}}},Ml=(e,t)=>{if(e===`inherit`)return t;if(typeof e==`number`)return e;let n=gt.indexOf(e);if(n!==-1)return n},Nl=({stdioItem:e,stdioItem:{value:t,optionName:n},fdNumber:r})=>t===`inherit`?{type:`nodeStream`,value:Pl(r,t,n),optionName:n}:typeof t==`number`?{type:`nodeStream`,value:Pl(t,t,n),optionName:n}:W(t,{checkOpen:!1})?{type:`nodeStream`,value:t,optionName:n}:e,Pl=(e,t,n)=>{let r=gt[e];if(r===void 0)throw TypeError(`The \`${n}: ${t}\` option is invalid: no such standard stream.`);return r}})),Il,Ll,Rl,zl,Bl,Vl=t((()=>{Co(),M(),Z(),Il=({input:e,inputFile:t},n)=>n===0?[...Ll(e),...zl(t)]:[],Ll=e=>e===void 0?[]:[{type:Rl(e),value:e,optionName:`input`}],Rl=e=>{if(xo(e,{checkOpen:!1}))return`nodeStream`;if(typeof e==`string`)return`string`;if(j(e))return`uint8Array`;throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},zl=e=>e===void 0?[]:[{...Bl(e),optionName:`inputFile`}],Bl=e=>{if(Nc(e))return{type:`fileUrl`,value:e};if(Lc(e))return{type:`filePath`,value:{file:e}};throw Error("The `inputFile` option must be a file path string or a file URL.")}})),Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl=t((()=>{Z(),Hl=e=>e.filter((t,n)=>e.every((e,r)=>t.value!==e.value||n>=r||t.type===`generator`||t.type===`asyncGenerator`)),Ul=({stdioItem:{type:e,value:t,optionName:n},direction:r,fileDescriptors:i,isSync:a})=>{let o=Wl(i,e);if(o.length!==0){if(a){Gl({otherStdioItems:o,type:e,value:t,optionName:n,direction:r});return}if(Yc.has(e))return Kl({otherStdioItems:o,type:e,value:t,optionName:n,direction:r});Xc.has(e)&&Jl({otherStdioItems:o,type:e,value:t,optionName:n})}},Wl=(e,t)=>e.flatMap(({direction:e,stdioItems:n})=>n.filter(e=>e.type===t).map((t=>({...t,direction:e})))),Gl=({otherStdioItems:e,type:t,value:n,optionName:r,direction:i})=>{Jc.has(t)&&Kl({otherStdioItems:e,type:t,value:n,optionName:r,direction:i})},Kl=({otherStdioItems:e,type:t,value:n,optionName:r,direction:i})=>{let a=e.filter(e=>ql(e,n));if(a.length===0)return;let o=a.find(e=>e.direction!==i);return Yl(o,r,t),i===`output`?a[0].stream:void 0},ql=({type:e,value:t},n)=>e===`filePath`?t.file===n.file:e===`fileUrl`?t.href===n.href:t===n,Jl=({otherStdioItems:e,type:t,value:n,optionName:r})=>{let i=e.find(({value:{transform:e}})=>e===n.transform);Yl(i,r,t)},Yl=(e,t,n)=>{if(e!==void 0)throw TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${Zc[n]} that is the same.`)}})),Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du=t((()=>{F(),ul(),nl(),Z(),yl(),Ol(),Fl(),Vl(),Xl(),Zl=(e,t,n,r)=>{let i=Sl(t,n,r).map((e,n)=>Ql({stdioOption:e,fdNumber:n,options:t,isSync:r})),a=ou({initialFileDescriptors:i,addProperties:e,options:t,isSync:r});return t.stdio=a.map(({stdioItems:e})=>uu(e)),a},Ql=({stdioOption:e,fdNumber:t,options:n,isSync:r})=>{let i=_t(t),{stdioItems:a,isStdioArray:o}=$l({stdioOption:e,fdNumber:t,options:n,optionName:i}),s=dl(a,t,i),c=rl(a.map(e=>kl({stdioItem:e,isStdioArray:o,fdNumber:t,direction:s,isSync:r})),i,s,n),l=tl(c,s);return au(c,l),{direction:s,objectMode:l,stdioItems:c}},$l=({stdioOption:e,fdNumber:t,options:n,optionName:r})=>{let i=Hl([...(Array.isArray(e)?e:[e]).map(e=>eu(e,r)),...Il(n,t)]),a=i.length>1;return tu(i,a,r),ru(i),{stdioItems:i,isStdioArray:a}},eu=(e,t)=>({type:Sc(e,t),value:e,optionName:t}),tu=(e,t,n)=>{if(e.length===0)throw TypeError(`The \`${n}\` option must not be an empty array.`);if(t){for(let{value:t,optionName:n}of e)if(nu.has(t))throw Error(`The \`${n}\` option must not include \`${t}\`.`)}},nu=new Set([`ignore`,`ipc`]),ru=e=>{for(let t of e)iu(t)},iu=({type:e,value:t,optionName:n})=>{if(Pc(t))throw TypeError(`The \`${n}: URL\` option must use the \`file:\` scheme.
28
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(Rc(e,t))throw TypeError(`The \`${n}: { file: '...' }\` option must be used instead of \`${n}: '...'\`.`)},au=(e,t)=>{if(!t)return;let n=e.find(({type:e})=>qc.has(e));if(n!==void 0)throw TypeError(`The \`${n.optionName}\` option cannot use both files and transforms in objectMode.`)},ou=({initialFileDescriptors:e,addProperties:t,options:n,isSync:r})=>{let i=[];try{for(let a of e)i.push(su({fileDescriptor:a,fileDescriptors:i,addProperties:t,options:n,isSync:r}));return i}catch(e){throw lu(i),e}},su=({fileDescriptor:{direction:e,objectMode:t,stdioItems:n},fileDescriptors:r,addProperties:i,options:a,isSync:o})=>({direction:e,objectMode:t,stdioItems:n.map(t=>cu({stdioItem:t,addProperties:i,direction:e,options:a,fileDescriptors:r,isSync:o}))}),cu=({stdioItem:e,addProperties:t,direction:n,options:r,fileDescriptors:i,isSync:a})=>{let o=Ul({stdioItem:e,direction:n,fileDescriptors:i,isSync:a});return o===void 0?{...e,...t[n][e.type](e,r)}:{...e,stream:o}},lu=e=>{for(let{stdioItems:t}of e)for(let{stream:e}of t)e!==void 0&&!N(e)&&e.destroy()},uu=e=>{if(e.length>1)return e.some(({value:e})=>e===`overlapped`)?`overlapped`:`pipe`;let[{type:t,value:n}]=e;return t===`native`?n:`pipe`}})),fu,Q,pu,mu,hu,gu,_u=t((()=>{M(),du(),Z(),fu=(e,t)=>Zl(gu,e,t,!0),Q=({type:e,optionName:t})=>{mu(t,Zc[e])},pu=({optionName:e,value:t})=>((t===`ipc`||t===`overlapped`)&&mu(e,`"${t}"`),{}),mu=(e,t)=>{throw TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},hu={generator(){},asyncGenerator:Q,webStream:Q,nodeStream:Q,webTransform:Q,duplex:Q,asyncIterable:Q,native:pu},gu={input:{...hu,fileUrl:({value:e})=>({contents:[Ye(be(e))]}),filePath:({value:{file:e}})=>({contents:[Ye(be(e))]}),fileNumber:Q,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...hu,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:Q,string:Q,uint8Array:Q}}})),vu,yu,bu=t((()=>{yo(),vu=(e,{stripFinalNewline:t},n)=>yu(t,n)&&e!==void 0&&!Array.isArray(e)?fo(e):e,yu=(e,t)=>t===`all`?e[1]||e[2]:e[t]})),xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu=t((()=>{xu=(e,t,n,r)=>e||n?void 0:wu(t,r),Su=(e,t,n)=>n?e.flatMap(e=>Cu(e,t)):Cu(e,t),Cu=(e,t)=>{let{transform:n,final:r}=wu(t,{});return[...n(e),...r()]},wu=(e,t)=>(t.previousChunks=``,{transform:Tu.bind(void 0,t,e),final:Du.bind(void 0,t)}),Tu=function*(e,t,n){if(typeof n!=`string`){yield n;return}let{previousChunks:r}=e,i=-1;for(let a=0;a<n.length;a+=1)if(n[a]===`
29
+ `){let o=Eu(n,a,t,e),s=n.slice(i+1,a+1-o);r.length>0&&(s=Au(r,s),r=``),yield s,i=a}i!==n.length-1&&(r=Au(r,n.slice(i+1))),e.previousChunks=r},Eu=(e,t,n,r)=>n?0:(r.isWindowsNewline=t!==0&&e[t-1]===`\r`,r.isWindowsNewline?2:1),Du=function*({previousChunks:e}){e.length>0&&(yield e)},Ou=({binary:e,preserveNewlines:t,readableObjectMode:n,state:r})=>e||t||n?void 0:{transform:ku.bind(void 0,r)},ku=function*({isWindowsNewline:e=!1},t){let{unixNewline:n,windowsNewline:r,LF:i,concatBytes:a}=typeof t==`string`?ju:Nu;if(t.at(-1)===i){yield t;return}yield a(t,e?r:n)},Au=(e,t)=>`${e}${t}`,ju={windowsNewline:`\r
30
+ `,unixNewline:`
31
+ `,LF:`
32
+ `,concatBytes:Au},Mu=(e,t)=>{let n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n},Nu={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:Mu}})),Fu,Iu,Lu,Ru,zu,Bu,Vu=t((()=>{M(),Fu=(e,t)=>e?void 0:Iu.bind(void 0,t),Iu=function*(e,t){if(typeof t!=`string`&&!j(t)&&!Fe.isBuffer(t))throw TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},Lu=(e,t)=>e?Ru.bind(void 0,t):zu.bind(void 0,t),Ru=function*(e,t){Bu(e,t),yield t},zu=function*(e,t){if(Bu(e,t),typeof t!=`string`&&!j(t))throw TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Bu=(e,t)=>{if(t==null)throw TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
33
+ Instead, \`yield\` should either be called with a value, or not be called at all. For example:
34
+ if (condition) { yield value; }`)}})),Hu,Uu,Wu,Gu,Ku=t((()=>{M(),Hu=(e,t,n)=>{if(n)return;if(e)return{transform:Uu.bind(void 0,new TextEncoder)};let r=new Ne(t);return{transform:Wu.bind(void 0,r),final:Gu.bind(void 0,r)}},Uu=function*(e,t){Fe.isBuffer(t)?yield Ye(t):typeof t==`string`?yield e.encode(t):yield t},Wu=function*(e,t){yield j(t)?e.write(t):t},Gu=function*(e){let t=e.end();t!==``&&(yield t)}})),qu,Ju,Yu,Xu,Zu,Qu,$u=t((()=>{qu=S(async(e,t,n,r)=>{t.currentIterable=e(...n);try{for await(let e of t.currentIterable)r.push(e)}finally{delete t.currentIterable}}),Ju=async function*(e,t,n){if(n===t.length){yield e;return}let{transform:r=Qu}=t[n];for await(let i of r(e))yield*Ju(i,t,n+1)},Yu=async function*(e){for(let[t,{final:n}]of Object.entries(e))yield*Xu(n,Number(t),e)},Xu=async function*(e,t,n){if(e!==void 0)for await(let r of e())yield*Ju(r,n,t+1)},Zu=S(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),Qu=function*(e){yield e}})),ed,td,nd,rd,id,ad,od=t((()=>{ed=(e,t,n,r)=>{try{for(let r of e(...t))n.push(r);r()}catch(e){r(e)}},td=(e,t)=>[...t.flatMap(t=>[...nd(t,e,0)]),...rd(e)],nd=function*(e,t,n){if(n===t.length){yield e;return}let{transform:r=ad}=t[n];for(let i of r(e))yield*nd(i,t,n+1)},rd=function*(e){for(let[t,{final:n}]of Object.entries(e))yield*id(n,Number(t),e)},id=function*(e,t,n){if(e!==void 0)for(let r of e())yield*nd(r,n,t+1)},ad=function*(e){yield e}})),sd,cd,ld,ud=t((()=>{Z(),Pu(),Vu(),Ku(),$u(),od(),sd=({value:e,value:{transform:t,final:n,writableObjectMode:r,readableObjectMode:i},optionName:a},{encoding:o})=>{let s={},c=ld(e,o,a),l=Y(t),u=Y(n),d=l?qu.bind(void 0,Ju,s):ed.bind(void 0,nd),f=l||u?qu.bind(void 0,Yu,s):ed.bind(void 0,rd),p=l||u?Zu.bind(void 0,s):void 0;return{stream:new Ae({writableObjectMode:r,writableHighWaterMark:Me(r),readableObjectMode:i,readableHighWaterMark:Me(i),transform(e,t,n){d([e,c,0],this,n)},flush(e){f([c],this,e)},destroy:p})}},cd=(e,t,n,r)=>{let i=t.filter(({type:e})=>e===`generator`),a=r?i.reverse():i;for(let{value:t,optionName:r}of a)e=td(ld(t,n,r),e);return e},ld=({transform:e,final:t,binary:n,writableObjectMode:r,readableObjectMode:i,preserveNewlines:a},o,s)=>{let c={};return[{transform:Fu(r,s)},Hu(n,o,r),xu(n,a,r,c),{transform:e,final:t},{transform:Lu(i,s)},Ou({binary:n,preserveNewlines:a,readableObjectMode:i,state:c})].filter(Boolean)}})),dd,fd,pd,md,hd,gd=t((()=>{ud(),M(),Z(),dd=(e,t)=>{for(let n of fd(e))pd(e,n,t)},fd=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>e===`input`).map(([e])=>Number(e))),pd=(e,t,n)=>{let{stdioItems:r}=e[t],i=r.filter(({contents:e})=>e!==void 0);if(i.length!==0){if(t!==0){let[{type:e,optionName:t}]=i;throw TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${Zc[e]} with synchronous methods.`)}n.input=nt(i.map(({contents:e})=>e).map(e=>md(e,r)))}},md=(e,t)=>{let n=cd(e,t,`utf8`,!0);return hd(n),nt(n)},hd=e=>{let t=e.find(e=>typeof e!=`string`&&!j(e));if(t!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)}})),_d,vd,yd,bd,xd,Sd,Cd,wd=t((()=>{$a(),Z(),Sn(),L(),_d=({stdioItems:e,encoding:t,verboseInfo:n,fdNumber:r})=>r!==`all`&&Nt(n,r)&&!U.has(t)&&vd(r)&&(e.some(({type:e,value:t})=>e===`native`&&yd.has(t))||e.every(({type:e})=>X.has(e))),vd=e=>e===1||e===2,yd=new Set([`pipe`,`overlapped`]),bd=async(e,t,n,r)=>{for await(let i of e)Sd(t)||Cd(i,n,r)},xd=(e,t,n)=>{for(let r of e)Cd(r,t,n)},Sd=e=>e._readableState.pipes.length>0,Cd=(e,t,n)=>{gn({type:`output`,verboseMessage:bn(e),fdNumber:t,verboseInfo:n})}})),Td,Ed,Dd,Od,kd,Ad,jd=t((()=>{wd(),ud(),Pu(),M(),Z(),Hs(),Td=({fileDescriptors:e,syncResult:{output:t},options:n,isMaxBuffer:r,verboseInfo:i})=>{if(t===null)return{output:Array.from({length:3})};let a={},o=new Set([]);return{output:t.map((t,s)=>Ed({result:t,fileDescriptors:e,fdNumber:s,state:a,outputFiles:o,isMaxBuffer:r,verboseInfo:i},n)),...a}},Ed=({result:e,fileDescriptors:t,fdNumber:n,state:r,outputFiles:i,isMaxBuffer:a,verboseInfo:o},{buffer:s,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:d})=>{if(e===null)return;let f=Ye(Bs(e,a,d)),{stdioItems:p,objectMode:m}=t[n],h=Dd([f],p,c,r),{serializedResult:g,finalResult:_=g}=Od({chunks:h,objectMode:m,encoding:c,lines:l,stripFinalNewline:u,fdNumber:n});kd({serializedResult:g,fdNumber:n,state:r,verboseInfo:o,encoding:c,stdioItems:p,objectMode:m});let v=s[n]?_:void 0;try{return r.error===void 0&&Ad(g,p,i),v}catch(e){return r.error=e,v}},Dd=(e,t,n,r)=>{try{return cd(e,t,n,!1)}catch(t){return r.error=t,e}},Od=({chunks:e,objectMode:t,encoding:n,lines:r,stripFinalNewline:i,fdNumber:a})=>{if(t)return{serializedResult:e};if(n===`buffer`)return{serializedResult:nt(e)};let o=et(e,n);return r[a]?{serializedResult:o,finalResult:Su(o,!i[a],t)}:{serializedResult:o}},kd=({serializedResult:e,fdNumber:t,state:n,verboseInfo:r,encoding:i,stdioItems:a,objectMode:o})=>{if(!_d({stdioItems:a,encoding:i,verboseInfo:r,fdNumber:t}))return;let s=Su(e,!1,o);try{xd(s,t,r)}catch(e){n.error??(n.error=e)}},Ad=(e,t,n)=>{for(let{path:r,append:i}of t.filter(({type:e})=>qc.has(e))){let t=typeof r==`string`?r:r.toString();i||n.has(t)?_e(r,e):(n.add(t),Se(r,e))}}})),Md,Nd=t((()=>{M(),bu(),Md=([,e,t],n)=>{if(n.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,vu(t,n,`all`)]:Array.isArray(t)?[vu(e,n,`all`),...t]:j(e)&&j(t)?it([e,t]):`${e}${t}`}})),Pd,Fd,Id,Ld,Rd,zd,Bd=t((()=>{z(),Pd=async(e,t)=>{let[n,r]=await Fd(e);return t.isForcefullyTerminated??(t.isForcefullyTerminated=!1),[n,r]},Fd=async e=>{let[t,n]=await Promise.allSettled([E(e,`spawn`),E(e,`exit`)]);return t.status===`rejected`?[]:n.status===`rejected`?Id(e):n.value},Id=async e=>{try{return await E(e,`exit`)}catch{return Id(e)}},Ld=async e=>{let[t,n]=await e;if(!Rd(t,n)&&zd(t,n))throw new or;return[t,n]},Rd=(e,t)=>e===void 0&&t===void 0,zd=(e,t)=>e!==0||t!==null})),Vd,Hd,Ud=t((()=>{z(),Hs(),Bd(),Vd=({error:e,status:t,signal:n,output:r},{maxBuffer:i})=>{let a=Hd(e,t,n);return{resultError:a,exitCode:t,signal:n,timedOut:a?.code===`ETIMEDOUT`,isMaxBuffer:zs(a,r,i)}},Hd=(e,t,n)=>e===void 0?zd(t,n)?new or:void 0:e})),Wd,Gd,Kd,qd,Jd,Yd,Xd,Zd,Qd,$d=t((()=>{Pn(),co(),uo(),rc(),xc(),_u(),bu(),gd(),jd(),Hs(),Nd(),Ud(),Wd=(e,t,n)=>{let{file:r,commandArguments:i,command:a,escapedCommand:o,startTime:s,verboseInfo:c,options:l,fileDescriptors:u}=Gd(e,t,n);return bc(Yd({file:r,commandArguments:i,options:l,command:a,escapedCommand:o,verboseInfo:c,fileDescriptors:u,startTime:s}),c,l)},Gd=(e,t,n)=>{let{command:r,escapedCommand:i,startTime:a,verboseInfo:o}=Nn(e,t,n),{file:s,commandArguments:c,options:l}=ao(e,t,Kd(n));return qd(l),{file:s,commandArguments:c,command:r,escapedCommand:i,startTime:a,verboseInfo:o,options:l,fileDescriptors:fu(l,o)}},Kd=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,qd=({ipc:e,ipcInput:t,detached:n,cancelSignal:r})=>{t&&Jd(`ipcInput`),e&&Jd(`ipc: true`),n&&Jd(`detached: true`),r&&Jd(`cancelSignal`)},Jd=e=>{throw TypeError(`The "${e}" option cannot be used with synchronous methods.`)},Yd=({file:e,commandArguments:t,options:n,command:r,escapedCommand:i,verboseInfo:a,fileDescriptors:o,startTime:s})=>{let c=Xd({file:e,commandArguments:t,options:n,command:r,escapedCommand:i,fileDescriptors:o,startTime:s});if(c.failed)return c;let{resultError:l,exitCode:u,signal:d,timedOut:f,isMaxBuffer:p}=Vd(c,n),{output:m,error:h=l}=Td({fileDescriptors:o,syncResult:c,options:n,isMaxBuffer:p,verboseInfo:a}),g=m.map((e,t)=>vu(e,n,t)),_=vu(Md(m,n),n,`all`);return Qd({error:h,exitCode:u,signal:d,timedOut:f,isMaxBuffer:p,stdio:g,all:_,options:n,command:r,escapedCommand:i,startTime:s})},Xd=({file:e,commandArguments:t,options:n,command:r,escapedCommand:i,fileDescriptors:a,startTime:o})=>{try{return dd(a,n),ge(...lo(e,t,Zd(n)))}catch(e){return Qs({error:e,command:r,escapedCommand:i,fileDescriptors:a,options:n,startTime:o,isSync:!0})}},Zd=({encoding:e,maxBuffer:t,...n})=>({...n,encoding:`buffer`,maxBuffer:Vs(t)}),Qd=({error:e,exitCode:t,signal:n,timedOut:r,isMaxBuffer:i,stdio:a,all:o,options:s,command:c,escapedCommand:l,startTime:u})=>e===void 0?Zs({command:c,escapedCommand:l,stdio:a,all:o,ipcOutput:[],options:s,startTime:u}):$s({error:e,command:c,escapedCommand:l,timedOut:r,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:i,isForcefullyTerminated:!1,exitCode:t,signal:n,stdio:a,all:o,ipcOutput:[],options:s,startTime:u,isSync:!0})})),ef,tf,nf,rf,af,of=t((()=>{vi(),Yi(),Bi(),ef=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:i=!0,filter:a}={})=>(ti({methodName:`getOneMessage`,isSubprocess:n,ipc:r,isConnected:Ji(e)}),tf({anyProcess:e,channel:t,isSubprocess:n,filter:a,reference:i})),tf=async({anyProcess:e,channel:t,isSubprocess:n,filter:r,reference:i})=>{Pi(t,i);let a=Gi(e,t,n),o=new AbortController;try{return await Promise.race([nf(a,r,o),rf(a,n,o),af(a,n,o)])}catch(t){throw _i(e),t}finally{o.abort(),Ii(t,i)}},nf=async(e,t,{signal:n})=>{if(t===void 0){let[t]=await E(e,`message`,{signal:n});return t}for await(let[r]of Ee(e,`message`,{signal:n}))if(t(r))return r},rf=async(e,t,{signal:n})=>{await E(e,`disconnect`,{signal:n}),ii(t)},af=async(e,t,{signal:n})=>{let[r]=await E(e,`strict:error`,{signal:n});throw oi(r,t)}})),sf,cf,lf,uf,df,ff,pf=t((()=>{vi(),Yi(),Bi(),sf=({anyProcess:e,channel:t,isSubprocess:n,ipc:r},{reference:i=!0}={})=>cf({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:!n,reference:i}),cf=({anyProcess:e,channel:t,isSubprocess:n,ipc:r,shouldAwait:i,reference:a})=>{ti({methodName:`getEachMessage`,isSubprocess:n,ipc:r,isConnected:Ji(e)}),Pi(t,a);let o=Gi(e,t,n),s=new AbortController,c={};return lf(e,o,s),uf({ipcEmitter:o,isSubprocess:n,controller:s,state:c}),df({anyProcess:e,channel:t,ipcEmitter:o,isSubprocess:n,shouldAwait:i,controller:s,state:c,reference:a})},lf=async(e,t,n)=>{try{await E(t,`disconnect`,{signal:n.signal}),n.abort()}catch{}},uf=async({ipcEmitter:e,isSubprocess:t,controller:n,state:r})=>{try{let[i]=await E(e,`strict:error`,{signal:n.signal});r.error=oi(i,t),n.abort()}catch{}},df=async function*({anyProcess:e,channel:t,ipcEmitter:n,isSubprocess:r,shouldAwait:i,controller:a,state:o,reference:s}){try{for await(let[e]of Ee(n,`message`,{signal:a.signal}))ff(o),yield e}catch{ff(o)}finally{a.abort(),Ii(t,s),r||_i(e),i&&await e}},ff=({error:e})=>{if(e)throw e}})),mf,hf,gf,_f=t((()=>{ya(),of(),pf(),Oa(),mf=(e,{ipc:t})=>{Object.assign(e,gf(e,!1,t))},hf=()=>{let e=C,t=C.channel!==void 0;return{...gf(e,!0,t),getCancelSignal:xa.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:!0,ipc:t})}},gf=(e,t,n)=>({sendMessage:ma.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getOneMessage:ef.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n}),getEachMessage:sf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:n})})})),vf,yf,bf,xf,Sf,Cf,wf,Tf=t((()=>{du(),rc(),xc(),vf=({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:i,startTime:a,verboseInfo:o})=>{lu(r);let s=new pe;yf(s,r),Object.assign(s,{readable:xf,writable:Sf,duplex:Cf});let c=Qs({error:e,command:t,escapedCommand:n,fileDescriptors:r,options:i,startTime:a,isSync:!1});return{subprocess:s,promise:wf(c,o,i)}},yf=(e,t)=>{let n=bf(),r=bf(),i=bf(),a=Array.from({length:t.length-3},bf),o=bf(),s=[n,r,i,...a];Object.assign(e,{stdin:n,stdout:r,stderr:i,all:o,stdio:s})},bf=()=>{let e=new ke;return e.end(),e},xf=()=>new D({read(){}}),Sf=()=>new je({write(){}}),Cf=()=>new Oe({read(){},write(){}}),wf=async(e,t,n)=>bc(e,t,n)})),Ef,Df,Of,kf,Af=t((()=>{ud(),du(),Z(),Ef=(e,t)=>Zl(kf,e,t,!1),Df=({type:e,optionName:t})=>{throw TypeError(`The \`${t}\` option cannot be ${Zc[e]}.`)},Of={fileNumber:Df,generator:sd,asyncGenerator:sd,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:n}}){let r=t||n;return{stream:Oe.fromWeb(e,{objectMode:r})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},kf={input:{...Of,fileUrl:({value:e})=>({stream:ve(e)}),filePath:({value:{file:e}})=>({stream:ve(e)}),webStream:({value:e})=>({stream:D.fromWeb(e)}),iterable:({value:e})=>({stream:D.from(e)}),asyncIterable:({value:e})=>({stream:D.from(e)}),string:({value:e})=>({stream:D.from(e)}),uint8Array:({value:e})=>({stream:D.from(Fe.from(e))})},output:{...Of,fileUrl:({value:e})=>({stream:ye(e)}),filePath:({value:{file:e,append:t}})=>({stream:ye(e,t?{flags:`a`}:{})}),webStream:({value:e})=>({stream:je.fromWeb(e)}),iterable:Df,asyncIterable:Df,string:Df,uint8Array:Df}}}));function jf(e){if(!Array.isArray(e))throw TypeError(`Expected an array, got \`${typeof e}\`.`);for(let t of e)Uf(t);let t=e.some(({readableObjectMode:e})=>e),n=Mf(e,t),r=new zf({objectMode:t,writableHighWaterMark:n,readableHighWaterMark:n});for(let t of e)r.add(t);return r}var Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp=t((()=>{s(),c(),l(),Mf=(e,t)=>{if(e.length===0)return Me(t);let n=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...n)},Nf=new WeakMap,Pf=new WeakMap,Ff=new WeakMap,If=new WeakMap,Lf=new WeakMap,Rf=new WeakMap,zf=class extends ke{constructor(...e){super(...e),f(this,Nf,new Set([])),f(this,Pf,new Set([])),f(this,Ff,new Set([])),f(this,If,void 0),f(this,Lf,Symbol(`unpipe`)),f(this,Rf,new WeakMap)}add(e){if(Uf(e),d(Nf,this).has(e))return;d(Nf,this).add(e),d(If,this)??p(If,this,Bf(this,d(Nf,this),d(Lf,this)));let t=Wf({passThroughStream:this,stream:e,streams:d(Nf,this),ended:d(Pf,this),aborted:d(Ff,this),onFinished:d(If,this),unpipeEvent:d(Lf,this)});d(Rf,this).set(e,t),e.pipe(this,{end:!1})}async remove(e){if(Uf(e),!d(Nf,this).has(e))return!1;let t=d(Rf,this).get(e);return t===void 0?!1:(d(Rf,this).delete(e),e.unpipe(this),await t,!0)}},Bf=async(e,t,n)=>{ep(e,tp);let r=new AbortController;try{await Promise.race([Vf(e,r),Hf(e,t,n,r)])}finally{r.abort(),ep(e,-tp)}},Vf=async(e,{signal:t})=>{try{await O(e,{signal:t,cleanup:!0})}catch(t){throw Yf(e,t),t}},Hf=async(e,t,n,{signal:r})=>{for await(let[i]of Ee(e,`unpipe`,{signal:r}))t.has(i)&&i.emit(n)},Uf=e=>{if(typeof e?.pipe!=`function`)throw TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Wf=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:i,onFinished:a,unpipeEvent:o})=>{ep(e,np);let s=new AbortController;try{await Promise.race([Gf(a,t,s),Kf({passThroughStream:e,stream:t,streams:n,ended:r,aborted:i,controller:s}),qf({stream:t,streams:n,ended:r,aborted:i,unpipeEvent:o,controller:s})])}finally{s.abort(),ep(e,-np)}n.size>0&&n.size===r.size+i.size&&(r.size===0&&i.size>0?Zf(e):Jf(e))},Gf=async(e,t,{signal:n})=>{try{await e,n.aborted||Zf(t)}catch(e){n.aborted||Yf(t,e)}},Kf=async({passThroughStream:e,stream:t,streams:n,ended:r,aborted:i,controller:{signal:a}})=>{try{await O(t,{signal:a,cleanup:!0,readable:!0,writable:!1}),n.has(t)&&r.add(t)}catch(r){if(a.aborted||!n.has(t))return;Xf(r)?i.add(t):Qf(e,r)}},qf=async({stream:e,streams:t,ended:n,aborted:r,unpipeEvent:i,controller:{signal:a}})=>{if(await E(e,i,{signal:a}),!e.readable)return E(a,`abort`,{signal:a});t.delete(e),n.delete(e),r.delete(e)},Jf=e=>{e.writable&&e.end()},Yf=(e,t)=>{Xf(t)?Zf(e):Qf(e,t)},Xf=e=>e?.code===`ERR_STREAM_PREMATURE_CLOSE`,Zf=e=>{(e.readable||e.writable)&&e.destroy()},Qf=(e,t)=>{e.destroyed||(e.once(`error`,$f),e.destroy(t))},$f=()=>{},ep=(e,t)=>{let n=e.getMaxListeners();n!==0&&n!==1/0&&e.setMaxListeners(n+t)},tp=2,np=1})),ip,ap,op,sp,cp,lp=t((()=>{F(),ip=(e,t)=>{e.pipe(t),ap(e,t),sp(e,t)},ap=async(e,t)=>{if(!(N(e)||N(t))){try{await O(e,{cleanup:!0,readable:!0,writable:!1})}catch{}op(t)}},op=e=>{e.writable&&e.end()},sp=async(e,t)=>{if(!(N(e)||N(t))){try{await O(t,{cleanup:!0,readable:!1,writable:!0})}catch{}cp(e)}},cp=e=>{e.readable&&e.destroy()}})),up,dp,fp,pp,mp,hp,gp=t((()=>{rp(),F(),Ni(),Z(),lp(),up=(e,t,n)=>{let r=new Map;for(let[i,{stdioItems:a,direction:o}]of Object.entries(t)){for(let{stream:t}of a.filter(({type:e})=>X.has(e)))dp(e,t,o,i);for(let{stream:t}of a.filter(({type:e})=>!X.has(e)))pp({subprocess:e,stream:t,direction:o,fdNumber:i,pipeGroups:r,controller:n})}for(let[e,t]of r.entries())ip(t.length===1?t[0]:jf(t),e)},dp=(e,t,n,r)=>{n===`output`?ip(e.stdio[r],t):ip(t,e.stdio[r]);let i=fp[r];i!==void 0&&(e[i]=t),e.stdio[r]=t},fp=[`stdin`,`stdout`,`stderr`],pp=({subprocess:e,stream:t,direction:n,fdNumber:r,pipeGroups:i,controller:a})=>{if(t===void 0)return;mp(t,a);let[o,s]=n===`output`?[t,e.stdio[r]]:[e.stdio[r],t],c=i.get(o)??[];i.set(o,[...c,s])},mp=(e,{signal:t})=>{N(e)&&Mi(e,hp,t)},hp=2})),_p,vp=t((()=>{v(),_p=(e,{cleanup:t,detached:n},{signal:r})=>{if(!t||n)return;let i=g(()=>{e.kill()});Te(r,()=>{i()})}})),yp,bp,xp,Sp,Cp,wp=t((()=>{Ke(),Mn(),ji(),We(),yp=({source:e,sourcePromise:t,boundOptions:n,createNested:r},...i)=>{let a=An(),{destination:o,destinationStream:s,destinationError:c,from:l,unpipeSignal:u}=bp(n,r,i),{sourceStream:d,sourceError:f}=Cp(e,l),{options:p,fileDescriptors:m}=H.get(e);return{sourcePromise:t,sourceStream:d,sourceOptions:p,sourceError:f,destination:o,destinationStream:s,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:a}},bp=(e,t,n)=>{try{let{destination:r,pipeOptions:{from:i,to:a,unpipeSignal:o}={}}=xp(e,t,...n);return{destination:r,destinationStream:xi(r,a),from:i,unpipeSignal:o}}catch(e){return{destinationError:e}}},xp=(e,t,n,...r)=>{if(Array.isArray(n))return{destination:t(Sp,e)(n,...r),pipeOptions:e};if(typeof n==`string`||n instanceof URL||He(n)){if(Object.keys(e).length>0)throw TypeError(`Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).`);let[i,a,o]=Ge(n,...r);return{destination:t(Sp)(i,a,o),pipeOptions:o}}if(H.has(n)){if(Object.keys(e).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:n,pipeOptions:r[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${n}`)},Sp=({options:e})=>({options:{...e,stdin:`pipe`,piped:!0}}),Cp=(e,t)=>{try{return{sourceStream:Si(e,t)}}catch(e){return{sourceError:e}}}})),Tp,Ep,Dp,Op,kp=t((()=>{rc(),lp(),Tp=({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r,fileDescriptors:i,sourceOptions:a,startTime:o})=>{let s=Ep({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r});if(s!==void 0)throw Dp({error:s,fileDescriptors:i,sourceOptions:a,startTime:o})},Ep=({sourceStream:e,sourceError:t,destinationStream:n,destinationError:r})=>{if(t!==void 0&&r!==void 0)return r;if(r!==void 0)return cp(e),r;if(t!==void 0)return op(n),t},Dp=({error:e,fileDescriptors:t,sourceOptions:n,startTime:r})=>Qs({error:e,command:Op,escapedCommand:Op,fileDescriptors:t,options:n,startTime:r,isSync:!1}),Op=`source.pipe(destination)`})),Ap,jp=t((()=>{Ap=async e=>{let[{status:t,reason:n,value:r=n},{status:i,reason:a,value:o=a}]=await e;if(o.pipedFrom.includes(r)||o.pipedFrom.push(r),i===`rejected`)throw o;if(t===`rejected`)throw r;return o}})),Mp,Np,Pp,Fp,Ip,Lp,Rp,zp=t((()=>{rp(),Ni(),lp(),Mp=(e,t,n)=>{let r=Ip.has(t)?Pp(e,t):Np(e,t);return Mi(e,Lp,n.signal),Mi(t,Rp,n.signal),Fp(t),r},Np=(e,t)=>{let n=jf([e]);return ip(n,t),Ip.set(t,n),n},Pp=(e,t)=>{let n=Ip.get(t);return n.add(e),n},Fp=async e=>{try{await O(e,{cleanup:!0,readable:!1,writable:!0})}catch{}Ip.delete(e)},Ip=new WeakMap,Lp=2,Rp=1})),Bp,Vp,Hp=t((()=>{kp(),Bp=(e,t)=>e===void 0?[]:[Vp(e,t)],Vp=async(e,{sourceStream:t,mergedStream:n,fileDescriptors:r,sourceOptions:i,startTime:a})=>{throw await ie(e,t),await n.remove(t),Dp({error:Error("Pipe canceled by `unpipeSignal` option."),fileDescriptors:r,sourceOptions:i,startTime:a})}})),Up,Wp,Gp,Kp=t((()=>{A(),wp(),kp(),jp(),zp(),Hp(),Up=(e,...t)=>{if(k(t[0]))return Up.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:n,...r}=yp(e,...t),i=Wp({...r,destination:n});return i.pipe=Up.bind(void 0,{...e,source:n,sourcePromise:i,boundOptions:{}}),i},Wp=async({sourcePromise:e,sourceStream:t,sourceOptions:n,sourceError:r,destination:i,destinationStream:a,destinationError:o,unpipeSignal:s,fileDescriptors:c,startTime:l})=>{let u=Gp(e,i);Tp({sourceStream:t,sourceError:r,destinationStream:a,destinationError:o,fileDescriptors:c,sourceOptions:n,startTime:l});let d=new AbortController;try{let e=Mp(t,a,d);return await Promise.race([Ap(u),...Bp(s,{sourceStream:t,mergedStream:e,sourceOptions:n,fileDescriptors:c,startTime:l})])}finally{d.abort()}},Gp=(e,t)=>Promise.allSettled([e,t])})),qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm=t((()=>{Ku(),Pu(),od(),qp=({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:r,encoding:i,preserveNewlines:a})=>{let o=new AbortController;return Jp(t,o),Zp({stream:e,controller:o,binary:n,shouldEncode:!e.readableObjectMode&&r,encoding:i,shouldSplit:!e.readableObjectMode,preserveNewlines:a})},Jp=async(e,t)=>{try{await e}catch{}finally{t.abort()}},Yp=({stream:e,onStreamEnd:t,lines:n,encoding:r,stripFinalNewline:i,allMixed:a})=>{let o=new AbortController;Xp(t,o,e);let s=e.readableObjectMode&&!a;return Zp({stream:e,controller:o,binary:r===`buffer`,shouldEncode:!s,encoding:r,shouldSplit:!s&&n,preserveNewlines:!i})},Xp=async(e,t,n)=>{try{await e}catch{n.destroy()}finally{t.abort()}},Zp=({stream:e,controller:t,binary:n,shouldEncode:r,encoding:i,shouldSplit:a,preserveNewlines:o})=>{let s=Ee(e,`data`,{signal:t.signal,highWaterMark:$p,highWatermark:$p});return em({onStdoutChunk:s,controller:t,binary:n,shouldEncode:r,encoding:i,shouldSplit:a,preserveNewlines:o})},Qp=Me(!0),$p=Qp,em=async function*({onStdoutChunk:e,controller:t,binary:n,shouldEncode:r,encoding:i,shouldSplit:a,preserveNewlines:o}){let s=tm({binary:n,shouldEncode:r,encoding:i,shouldSplit:a,preserveNewlines:o});try{for await(let[t]of e)yield*nd(t,s,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*rd(s)}},tm=({binary:e,shouldEncode:t,encoding:n,shouldSplit:r,preserveNewlines:i})=>[Hu(e,n,!t),xu(e,i,!r,{})].filter(Boolean)})),rm,im,am,om,sm,cm,lm=t((()=>{Ns(),M(),wd(),nm(),Hs(),bu(),rm=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,buffer:i,maxBuffer:a,lines:o,allMixed:s,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{let d=im({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:s,verboseInfo:l,streamInfo:u});if(!i){await Promise.all([am(e),d]);return}let f=Yp({stream:e,onStreamEnd:t,lines:o,encoding:r,stripFinalNewline:yu(c,n),allMixed:s}),[p]=await Promise.all([om({stream:e,iterable:f,fdNumber:n,encoding:r,maxBuffer:a,lines:o}),d]);return p},im=async({stream:e,onStreamEnd:t,fdNumber:n,encoding:r,allMixed:i,verboseInfo:a,streamInfo:{fileDescriptors:o}})=>{_d({stdioItems:o[n]?.stdioItems,encoding:r,verboseInfo:a,fdNumber:n})&&await bd(Yp({stream:e,onStreamEnd:t,lines:!0,encoding:r,stripFinalNewline:!0,allMixed:i}),e,n,a)},am=async e=>{await Le(),e.readableFlowing===null&&e.resume()},om=async({stream:e,stream:{readableObjectMode:t},iterable:n,fdNumber:r,encoding:i,maxBuffer:a,lines:o})=>{try{return t||o?await ns(n,{maxBuffer:a}):i===`buffer`?new Uint8Array(await cs(n,{maxBuffer:a})):await ws(n,{maxBuffer:a})}catch(n){return cm(Ps({error:n,stream:e,readableObjectMode:t,lines:o,encoding:i,fdNumber:r}))}},sm=async e=>{try{return await e}catch(e){return cm(e)}},cm=({bufferedData:e})=>Je(e)?new Uint8Array(e):e})),um,dm,fm,pm,mm,hm,gm,_m,vm,ym=t((()=>{um=async(e,t,n,{isSameDirection:r,stopOnExit:i=!1}={})=>{let a=dm(e,n),o=new AbortController;try{await Promise.race([...i?[n.exitPromise]:[],O(e,{cleanup:!0,signal:o.signal})])}catch(e){a.stdinCleanedUp||mm(e,t,n,r)}finally{o.abort()}},dm=(e,{originalStreams:[t],subprocess:n})=>{let r={stdinCleanedUp:!1};return e===t&&fm(e,n,r),r},fm=(e,t,n)=>{let{_destroy:r}=e;e._destroy=(...i)=>{pm(t,n),r.call(e,...i)}},pm=({exitCode:e,signalCode:t},n)=>{(e!==null||t!==null)&&(n.stdinCleanedUp=!0)},mm=(e,t,n,r)=>{if(!hm(e,t,n,r))throw e},hm=(e,t,n,r=!0)=>n.propagating?vm(e)||_m(e):(n.propagating=!0,gm(n,t)===r?vm(e):_m(e)),gm=({fileDescriptors:e},t)=>t!==`all`&&e[t].direction===`input`,_m=e=>e?.code===`ERR_STREAM_PREMATURE_CLOSE`,vm=e=>e?.code===`EPIPE`})),bm,xm,Sm=t((()=>{lm(),ym(),bm=({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:i,stripFinalNewline:a,verboseInfo:o,streamInfo:s})=>e.stdio.map((e,c)=>xm({stream:e,fdNumber:c,encoding:t,buffer:n[c],maxBuffer:r[c],lines:i[c],allMixed:!1,stripFinalNewline:a,verboseInfo:o,streamInfo:s})),xm=async({stream:e,fdNumber:t,encoding:n,buffer:r,maxBuffer:i,lines:a,allMixed:o,stripFinalNewline:s,verboseInfo:c,streamInfo:l})=>{if(!e)return;let u=um(e,t,l);if(gm(l,t)){await u;return}let[d]=await Promise.all([rm({stream:e,onStreamEnd:u,fdNumber:t,encoding:n,buffer:r,maxBuffer:i,lines:a,allMixed:o,stripFinalNewline:s,verboseInfo:c,streamInfo:l}),u]);return d}})),Cm,wm,Tm,Em,Dm=t((()=>{rp(),Sm(),Cm=({stdout:e,stderr:t},{all:n})=>n&&(e||t)?jf([e,t].filter(Boolean)):void 0,wm=({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:i,stripFinalNewline:a,verboseInfo:o,streamInfo:s})=>xm({...Tm(e,n),fdNumber:`all`,encoding:t,maxBuffer:r[1]+r[2],lines:i[1]||i[2],allMixed:Em(e),stripFinalNewline:a,verboseInfo:o,streamInfo:s}),Tm=({stdout:e,stderr:t,all:n},[,r,i])=>{let a=r||i;return a?r?i?{stream:n,buffer:a}:{stream:e,buffer:a}:{stream:t,buffer:a}:{stream:n,buffer:a}},Em=({all:e,stdout:t,stderr:n})=>e&&t&&n&&t.readableObjectMode!==n.readableObjectMode})),Om,km,Am=t((()=>{Sn(),L(),Om=e=>Nt(e,`ipc`),km=(e,t)=>{gn({type:`ipc`,verboseMessage:bn(e),fdNumber:`ipc`,verboseInfo:t})}})),jm,Mm,Nm=t((()=>{Hs(),Am(),I(),pf(),jm=async({subprocess:e,buffer:t,maxBuffer:n,ipc:r,ipcOutput:i,verboseInfo:a})=>{if(!r)return i;let o=Om(a),s=jt(t,`ipc`),c=jt(n,`ipc`);for await(let t of cf({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:r,shouldAwait:!1,reference:!0}))s&&(Is(e,i,c),i.push(t)),o&&km(t,a);return i},Mm=async(e,t)=>(await Promise.allSettled([e]),t)})),Pm,Fm,Im,Lm,Rm=t((()=>{Co(),La(),ei(),Na(),F(),Z(),lm(),Nm(),Ka(),Dm(),Sm(),Bd(),ym(),Pm=async({subprocess:e,options:{encoding:t,buffer:n,maxBuffer:r,lines:i,timeoutDuration:a,cancelSignal:o,gracefulCancel:s,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:d},context:f,verboseInfo:p,fileDescriptors:m,originalStreams:h,onInternalError:g,controller:_})=>{let v=Pd(e,f),y={originalStreams:h,fileDescriptors:m,subprocess:e,exitPromise:v,propagating:!1},b=bm({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:i,stripFinalNewline:l,verboseInfo:p,streamInfo:y}),x=wm({subprocess:e,encoding:t,buffer:n,maxBuffer:r,lines:i,stripFinalNewline:l,verboseInfo:p,streamInfo:y}),ee=[],te=jm({subprocess:e,buffer:n,maxBuffer:r,ipc:u,ipcOutput:ee,verboseInfo:p}),ne=Fm(h,e,y),re=Im(m,y);try{return await Promise.race([Promise.all([{},Ld(v),Promise.all(b),x,te,Ga(e,d),...ne,...re]),g,Lm(e,_),...Fa(e,a,f,_),...Qr({subprocess:e,cancelSignal:o,gracefulCancel:s,context:f,controller:_}),...Aa({subprocess:e,cancelSignal:o,gracefulCancel:s,forceKillAfterDelay:c,context:f,controller:_})])}catch(e){return f.terminationReason??(f.terminationReason=`other`),Promise.all([{error:e},v,Promise.all(b.map(e=>sm(e))),sm(x),Mm(te,ee),Promise.allSettled(ne),Promise.allSettled(re)])}},Fm=(e,t,n)=>e.map((e,r)=>e===t.stdio[r]?void 0:um(e,r,n)),Im=(e,t)=>e.flatMap(({stdioItems:e},n)=>e.filter(({value:e,stream:t=e})=>W(t,{checkOpen:!1})&&!N(t)).map(({type:e,value:r,stream:i=r})=>um(i,n,t,{isSameDirection:X.has(e),stopOnExit:e===`native`}))),Lm=async(e,{signal:t})=>{let[n]=await E(e,`error`,{signal:t});throw n}})),zm,Bm,Vm,Hm=t((()=>{bi(),zm=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Bm=(e,t,n)=>{let r=e[n];r.has(t)||r.set(t,[]);let i=r.get(t),a=yi();return i.push(a),{resolve:a.resolve.bind(a),promises:i}},Vm=async({resolve:e,promises:t},n)=>{e();let[r]=await Promise.race([Promise.allSettled([!0,n]),Promise.all([!1,...t])]);return!r}})),Um,Wm,Gm,Km,qm,Jm,Ym=t((()=>{ym(),Um=async e=>{if(e!==void 0)try{await Gm(e)}catch{}},Wm=async e=>{if(e!==void 0)try{await Km(e)}catch{}},Gm=async e=>{await O(e,{cleanup:!0,readable:!1,writable:!0})},Km=async e=>{await O(e,{cleanup:!0,readable:!0,writable:!1})},qm=async(e,t)=>{if(await e,t)throw t},Jm=(e,t,n)=>{n&&!_m(n)?e.destroy(n):t&&e.destroy()}})),Xm,Zm,Qm,$m,eh,th,nh,rh,ih=t((()=>{$a(),ji(),nm(),bi(),Hm(),Ym(),Xm=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,binary:i=!0,preserveNewlines:a=!0}={})=>{let o=i||U.has(n),{subprocessStdout:s,waitReadableDestroy:c}=Zm(e,r,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:d}=Qm(s,o),{read:f,onStdoutDataDone:p}=$m({subprocessStdout:s,subprocess:e,binary:o,encoding:n,preserveNewlines:a}),m=new D({read:f,destroy:S(nh.bind(void 0,{subprocessStdout:s,subprocess:e,waitReadableDestroy:c})),highWaterMark:d,objectMode:u,encoding:l});return th({subprocessStdout:s,onStdoutDataDone:p,readable:m,subprocess:e}),m},Zm=(e,t,n)=>{let r=Si(e,t);return{subprocessStdout:r,waitReadableDestroy:Bm(n,r,`readableDestroy`)}},Qm=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n},r)=>r?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:n}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:Qp},$m=({subprocessStdout:e,subprocess:t,binary:n,encoding:r,preserveNewlines:i})=>{let a=yi(),o=qp({subprocessStdout:e,subprocess:t,binary:n,shouldEncode:!n,encoding:r,preserveNewlines:i});return{read(){eh(this,o,a)},onStdoutDataDone:a}},eh=async(e,t,n)=>{try{let{value:r,done:i}=await t.next();i?n.resolve():e.push(r)}catch{}},th=async({subprocessStdout:e,onStdoutDataDone:t,readable:n,subprocess:r,subprocessStdin:i})=>{try{await Km(e),await r,await Um(i),await t,n.readable&&n.push(null)}catch(e){await Um(i),rh(n,e)}},nh=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:n},r)=>{await Vm(n,t)&&(rh(e,r),await qm(t,r))},rh=(e,t)=>{Jm(e,e.readable,t)}})),ah,oh,sh,ch,lh,uh,dh,fh,ph=t((()=>{ji(),Hm(),Ym(),ah=({subprocess:e,concurrentStreams:t},{to:n}={})=>{let{subprocessStdin:r,waitWritableFinal:i,waitWritableDestroy:a}=oh(e,n,t),o=new je({...sh(r,e,i),destroy:S(dh.bind(void 0,{subprocessStdin:r,subprocess:e,waitWritableFinal:i,waitWritableDestroy:a})),highWaterMark:r.writableHighWaterMark,objectMode:r.writableObjectMode});return uh(r,o),o},oh=(e,t,n)=>{let r=xi(e,t);return{subprocessStdin:r,waitWritableFinal:Bm(n,r,`writableFinal`),waitWritableDestroy:Bm(n,r,`writableDestroy`)}},sh=(e,t,n)=>({write:ch.bind(void 0,e),final:S(lh.bind(void 0,e,t,n))}),ch=(e,t,n,r)=>{e.write(t,n)?r():e.once(`drain`,r)},lh=async(e,t,n)=>{await Vm(n,t)&&(e.writable&&e.end(),await t)},uh=async(e,t,n)=>{try{await Gm(e),t.writable&&t.end()}catch(e){await Wm(n),fh(t,e)}},dh=async({subprocessStdin:e,subprocess:t,waitWritableFinal:n,waitWritableDestroy:r},i)=>{await Vm(n,t),await Vm(r,t)&&(fh(e,i),await qm(t,i))},fh=(e,t)=>{Jm(e,e.writable,t)}})),mh,hh,gh=t((()=>{$a(),ih(),ph(),mh=({subprocess:e,concurrentStreams:t,encoding:n},{from:r,to:i,binary:a=!0,preserveNewlines:o=!0}={})=>{let s=a||U.has(n),{subprocessStdout:c,waitReadableDestroy:l}=Zm(e,r,t),{subprocessStdin:u,waitWritableFinal:d,waitWritableDestroy:f}=oh(e,i,t),{readableEncoding:p,readableObjectMode:m,readableHighWaterMark:h}=Qm(c,s),{read:g,onStdoutDataDone:_}=$m({subprocessStdout:c,subprocess:e,binary:s,encoding:n,preserveNewlines:o}),v=new Oe({read:g,...sh(u,e,d),destroy:S(hh.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:d,waitWritableDestroy:f})),readableHighWaterMark:h,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:p});return th({subprocessStdout:c,onStdoutDataDone:_,readable:v,subprocess:e,subprocessStdin:u}),uh(u,v,c),v},hh=async({subprocessStdout:e,subprocessStdin:t,subprocess:n,waitReadableDestroy:r,waitWritableFinal:i,waitWritableDestroy:a},o)=>{await Promise.all([nh({subprocessStdout:e,subprocess:n,waitReadableDestroy:r},o),dh({subprocessStdin:t,subprocess:n,waitWritableFinal:i,waitWritableDestroy:a},o)])}})),_h,vh,yh=t((()=>{$a(),ji(),nm(),_h=(e,t,{from:n,binary:r=!1,preserveNewlines:i=!1}={})=>{let a=r||U.has(t),o=Si(e,n),s=qp({subprocessStdout:o,subprocess:e,binary:a,shouldEncode:!0,encoding:t,preserveNewlines:i});return vh(s,o,e)},vh=async function*(e,t,n){try{yield*e}finally{t.readable&&t.destroy(),await n}}})),bh,xh=t((()=>{Hm(),ih(),ph(),gh(),yh(),bh=(e,{encoding:t})=>{let n=zm();e.readable=Xm.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.writable=ah.bind(void 0,{subprocess:e,concurrentStreams:n}),e.duplex=mh.bind(void 0,{subprocess:e,concurrentStreams:n,encoding:t}),e.iterable=_h.bind(void 0,e,t),e[Symbol.asyncIterator]=_h.bind(void 0,e,t,{})}})),Sh,Ch,wh,Th=t((()=>{Sh=(e,t)=>{for(let[n,r]of wh){let i=r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}},Ch=(async()=>{})().constructor.prototype,wh=[`then`,`catch`,`finally`].map(e=>[e,Reflect.getOwnPropertyDescriptor(Ch,e)])})),Eh,Dh,Oh,kh,Ah,jh,Mh=t((()=>{Ns(),Pn(),co(),ji(),uo(),_f(),rc(),xc(),Tf(),Af(),bu(),gp(),Jr(),vp(),Kp(),Dm(),Rm(),xh(),bi(),Th(),Eh=(e,t,n,r)=>{let{file:i,commandArguments:a,command:o,escapedCommand:s,startTime:c,verboseInfo:l,options:u,fileDescriptors:d}=Dh(e,t,n),{subprocess:f,promise:p}=kh({file:i,commandArguments:a,options:u,startTime:c,verboseInfo:l,command:o,escapedCommand:s,fileDescriptors:d});return f.pipe=Up.bind(void 0,{source:f,sourcePromise:p,boundOptions:{},createNested:r}),Sh(f,p),H.set(f,{options:u,fileDescriptors:d}),f},Dh=(e,t,n)=>{let{command:r,escapedCommand:i,startTime:a,verboseInfo:o}=Nn(e,t,n),{file:s,commandArguments:c,options:l}=ao(e,t,n),u=Oh(l);return{file:s,commandArguments:c,command:r,escapedCommand:i,startTime:a,verboseInfo:o,options:u,fileDescriptors:Ef(u,o)}},Oh=({timeout:e,signal:t,...n})=>{if(t!==void 0)throw TypeError(`The "signal" option has been renamed to "cancelSignal" instead.`);return{...n,timeoutDuration:e}},kh=({file:e,commandArguments:t,options:n,startTime:r,verboseInfo:i,command:a,escapedCommand:o,fileDescriptors:s})=>{let c;try{c=he(...lo(e,t,n))}catch(e){return vf({error:e,command:a,escapedCommand:o,fileDescriptors:s,options:n,startTime:r,verboseInfo:i})}let l=new AbortController;De(1/0,l.signal);let u=[...c.stdio];up(c,s,l),_p(c,n,l);let d={},f=yi();c.kill=Ur.bind(void 0,{kill:c.kill.bind(c),options:n,onInternalError:f,context:d,controller:l}),c.all=Cm(c,n),bh(c,n),mf(c,n);let p=Ah({subprocess:c,options:n,startTime:r,verboseInfo:i,fileDescriptors:s,originalStreams:u,command:a,escapedCommand:o,context:d,onInternalError:f,controller:l});return{subprocess:c,promise:p}},Ah=async({subprocess:e,options:t,startTime:n,verboseInfo:r,fileDescriptors:i,originalStreams:a,command:o,escapedCommand:s,context:c,onInternalError:l,controller:u})=>{let[d,[f,p],m,h,g]=await Pm({subprocess:e,options:t,context:c,verboseInfo:r,fileDescriptors:i,originalStreams:a,onInternalError:l,controller:u});u.abort(),l.resolve();let _=m.map((e,n)=>vu(e,t,n)),v=vu(h,t,`all`);return bc(jh({errorInfo:d,exitCode:f,signal:p,stdio:_,all:v,ipcOutput:g,context:c,options:t,command:o,escapedCommand:s,startTime:n}),r,t)},jh=({errorInfo:e,exitCode:t,signal:n,stdio:r,all:i,ipcOutput:a,context:o,options:s,command:c,escapedCommand:l,startTime:u})=>`error`in e?$s({error:e.error,command:c,escapedCommand:l,timedOut:o.terminationReason===`timeout`,isCanceled:o.terminationReason===`cancel`||o.terminationReason===`gracefulCancel`,isGracefullyCanceled:o.terminationReason===`gracefulCancel`,isMaxBuffer:e.error instanceof Yo,isForcefullyTerminated:o.isForcefullyTerminated,exitCode:t,signal:n,stdio:r,all:i,ipcOutput:a,options:s,startTime:u,isSync:!1}):Zs({command:c,escapedCommand:l,stdio:r,all:i,ipcOutput:a,options:s,startTime:u})})),Nh,Ph,Fh,Ih=t((()=>{A(),I(),Nh=(e,t)=>{let n=Object.fromEntries(Object.entries(t).map(([t,n])=>[t,Ph(t,e[t],n)]));return{...e,...n}},Ph=(e,t,n)=>Fh.has(e)&&k(t)&&k(n)?{...t,...n}:n,Fh=new Set([`env`,...At])})),$,Lh,Rh,zh=t((()=>{A(),Ke(),ht(),$d(),Mh(),Ih(),$=(e,t,n,r)=>{let i=(e,t,r)=>$(e,t,n,r),a=(...a)=>Lh({mapArguments:e,deepOptions:n,boundOptions:t,setBoundExeca:r,createNested:i},...a);return r!==void 0&&r(a,i,t),a},Lh=({mapArguments:e,deepOptions:t={},boundOptions:n={},setBoundExeca:r,createNested:i},a,...o)=>{if(k(a))return i(e,Nh(n,a),r);let{file:s,commandArguments:c,options:l,isSync:u}=Rh({mapArguments:e,firstArgument:a,nextArguments:o,deepOptions:t,boundOptions:n});return u?Wd(s,c,l):Eh(s,c,l,i)},Rh=({mapArguments:e,firstArgument:t,nextArguments:n,deepOptions:r,boundOptions:i})=>{let[a,o,s]=Ge(...ot(t)?st(t,n):[t,...n]),c=Nh(Nh(r,i),s),{file:l=a,commandArguments:u=o,options:d=c,isSync:f=!1}=e({file:a,commandArguments:o,options:c});return{file:l,commandArguments:u,options:d,isSync:f}}})),Bh,Vh,Hh,Uh,Wh,Gh=t((()=>{Bh=({file:e,commandArguments:t})=>Hh(e,t),Vh=({file:e,commandArguments:t})=>({...Hh(e,t),isSync:!0}),Hh=(e,t)=>{if(t.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[n,...r]=Uh(e);return{file:n,commandArguments:r}},Uh=e=>{if(typeof e!=`string`)throw TypeError(`The command must be a string: ${String(e)}.`);let t=e.trim();if(t===``)return[];let n=[];for(let e of t.split(Wh)){let t=n.at(-1);t&&t.endsWith(`\\`)?n[n.length-1]=`${t.slice(0,-1)} ${e}`:n.push(e)}return n},Wh=/ +/g})),Kh,qh,Jh,Yh,Xh,Zh,Qh=t((()=>{Kh=(e,t,n)=>{e.sync=t(Jh,n),e.s=e.sync},qh=({options:e})=>Yh(e),Jh=({options:e})=>({...Yh(e),isSync:!0}),Yh=e=>({options:{...Xh(e),...e}}),Xh=({input:e,inputFile:t,stdio:n})=>e===void 0&&t===void 0&&n===void 0?{stdin:`inherit`}:{},Zh={preferLocal:!0}})),$h,eg,tg,ng,rg,ig,ag=t((()=>{zh(),Gh(),Ba(),Qh(),_f(),z(),$h=$(()=>({})),eg=$(()=>({isSync:!0})),$(Bh),$(Vh),$(Ra),$(qh,{},Zh,Kh),{sendMessage:tg,getOneMessage:ng,getEachMessage:rg,getCancelSignal:ig}=hf()}));function og(e,t,n=10*cg*sg){let r;r=t===void 0?{}:t instanceof AbortSignal?{abortSignal:t,timeout:n}:t;let{abortSignal:i,timeout:a=10*cg*sg,input:o,stdio:s=[`ignore`,`pipe`,`pipe`]}=r;i?.throwIfAborted(),te`exec: ${e.slice(0,200)}`;try{let t=eg(e,{env:process.env,maxBuffer:1e6,timeout:a,cwd:x(),stdio:s,shell:!0,reject:!1,input:o});return t.stdout&&t.stdout.trim()||null}catch{return null}}var sg,cg,lg=t((()=>{ag(),b(),ee(),sg=1e3,cg=60}));function ug(e,t,n={timeout:10*mg*pg,preserveOutputOnError:!0,useCwd:!0}){return fg(e,t,{abortSignal:n.abortSignal,timeout:n.timeout,preserveOutputOnError:n.preserveOutputOnError,cwd:n.useCwd?x():void 0,env:n.env,stdin:n.stdin,input:n.input})}function dg(e,t){return e.shortMessage?e.shortMessage:typeof e.signal==`string`?e.signal:String(t)}function fg(e,t,{abortSignal:n,timeout:r=10*mg*pg,preserveOutputOnError:i=!0,cwd:a,env:o,maxBuffer:s,shell:c,stdin:l,input:u}={timeout:10*mg*pg,preserveOutputOnError:!0,maxBuffer:1e6}){return new Promise(d=>{$h(e,t,{maxBuffer:s,cancelSignal:n,timeout:r,cwd:a,env:o,shell:c,stdin:l,input:u,reject:!1}).then(e=>{if(e.failed)if(i){let t=e.exitCode??1;d({stdout:e.stdout||``,stderr:e.stderr||``,code:t,error:dg(e,t)})}else d({stdout:``,stderr:``,code:e.exitCode??1});else d({stdout:e.stdout,stderr:e.stderr,code:0})}).catch(e=>{re(e),d({stdout:``,stderr:``,code:1})})})}var pg,mg,hg=t((()=>{ag(),b(),ne(),lg(),pg=1e3,mg=60}));export{lg as a,ag as c,og as i,qn as l,fg as n,$h as o,hg as r,eg as s,ug as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{E as t,k as n}from"./debug-IKW-jE7K.js";import{execSync as r}from"child_process";function i(e,t){return n`execSync: ${e.slice(0,100)}`,r(e,t)}var a=e((()=>{t()}));export{a as n,i as t};
@@ -0,0 +1,2 @@
1
+ function e(e){e&&console.error(e),process.exit(1)}function t(e){e&&process.stdout.write(e+`
2
+ `),process.exit(0)}export{t as n,e as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{Ct as r,ES as i,Et as a,Il as o,Ll as s,OS as c,XE as l,YE as u}from"./loadAgentsDir-nzr38hai.js";import{n as d,t as f}from"./ExitFlow-CRPgptCN.js";import{spawnSync as p}from"child_process";function m(){return l(_)??`Goodbye!`}async function h(e){if(s())return e(),p(`tmux`,[`detach-client`],{stdio:`ignore`}),null;let t=r()!==null;return t?(0,g.jsx)(f,{showWorktree:t,onDone:e,onCancel:()=>e()}):(e(m()),await i(0,`prompt_input_exit`),null)}var g,_;e((()=>{u(),t(),d(),o(),c(),a(),g=n(),_=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}))();export{h as call};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./extra-usage-DtAIhW74.js";e();export{t as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{$b as r,Qb as i}from"./loadAgentsDir-nzr38hai.js";import{n as a,t as o}from"./extra-usage-core-CdL1ltqq.js";async function s(e,t){let n=await a();return n.type===`message`?(e(n.value),null):(0,c.jsx)(i,{onDone:()=>{t.onChangeAPIKey(),e(`Login successful`)}})}var c,l=e((()=>{t(),r(),o(),c=n()}));export{l as n,s as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./axios-DaWTGg7G.js";import{b as r,c as i,g as a}from"./config-C7YHKCPV.js";import{o,s}from"./log-B3eB4EFv.js";import{l as c,u as l}from"./oauth-BqJqV-2M.js";import{It as u,Vt as d,ci as f,oi as p}from"./model-DfFA3qMO.js";import{a as m,l as h,o as g}from"./api-TgV7fl9V.js";import{n as _,t as v}from"./browser-Bd7GeBH1.js";import{n as y,t as b}from"./usage-CJ5w0907.js";import{i as x,r as S}from"./overageCreditGrant-CjK49axw.js";async function C(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${c().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests`;return(await t.post(a,e,{headers:i})).data}async function w(e,n){let{accessToken:r,orgUUID:i}=await h(),a={...m(r),"x-organization-uuid":i},o=`${c().BASE_API_URL}/api/oauth/organizations/${i}/admin_requests/me?request_type=${e}`;for(let e of n)o+=`&statuses=${e}`;return(await t.get(o,{headers:a})).data}async function T(e){let{accessToken:n,orgUUID:r}=await h(),i={...m(n),"x-organization-uuid":r},a=`${c().BASE_API_URL}/api/oauth/organizations/${r}/admin_requests/eligibility?request_type=${e}`;return(await t.get(a,{headers:i})).data}var E=e((()=>{n(),l(),g()}));async function D(){i().hasVisitedExtraUsage||r(e=>({...e,hasVisitedExtraUsage:!0})),x();let e=u(),t=e===`team`||e===`enterprise`;if(!p()&&t){let e;try{e=(await b())?.extra_usage}catch(e){s(e)}if(e?.is_enabled&&e.monthly_limit===null)return{type:`message`,value:`Your organization already has unlimited extra usage. No request needed.`};try{if((await T(`limit_increase`))?.is_allowed===!1)return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}catch(e){s(e)}try{let e=await w(`limit_increase`,[`pending`,`dismissed`]);if(e&&e.length>0)return{type:`message`,value:`You have already submitted a request for extra usage to your admin.`}}catch(e){s(e)}try{return await C({request_type:`limit_increase`,details:null}),{type:`message`,value:e?.is_enabled?`Request sent to your admin to increase extra usage.`:`Request sent to your admin to enable extra usage.`}}catch(e){s(e)}return{type:`message`,value:`Please contact your admin to manage extra usage settings.`}}let n=t?`https://claude.ai/admin-settings/usage`:`https://claude.ai/settings/usage`;try{return{type:`browser-opened`,url:n,opened:await _(n)}}catch(e){return s(e),{type:`message`,value:`Failed to open browser. Please visit ${n} to manage extra usage.`}}}var O=e((()=>{E(),S(),y(),d(),f(),v(),a(),o()}));export{D as n,O as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./extra-usage-core-CdL1ltqq.js";async function r(){let e=await t();return e.type===`message`?{type:`text`,value:e.value}:{type:`text`,value:e.opened?`Browser opened to manage extra usage. If it didn't open, visit: ${e.url}`:`Please visit ${e.url} to manage extra usage.`}}e((()=>{n()}))();export{r as call};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{D as n,Gt as r,I as i,P as a,T as o,fi as s,t as c,x as ee}from"./src-CDCSSo0U2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{$D as te,HD as u,Hb as d,Mb as f,Md as p,Nb as ne,QD as re,UD as m,VD as h,Vb as ie,YD as g,ZD as _,fS as ae,iD as v,jd as oe,lS as y,nO as se,rD as ce,rO as le,uS as b}from"./loadAgentsDir-nzr38hai.js";import{Kt as x,c as ue,g as S,y as de}from"./settings-5PQdphqC.js";import{n as C,r as fe}from"./analytics-BotDBGh0.js";import{C as w,K as T,Kn as E,Kt as D,Vt as O,_ as k,it as A,nt as pe,o as j,qn as M,rt as me,tt as N,x as P}from"./model-DfFA3qMO.js";import{u as F}from"./referral-DP_GshTS.js";import{n as he,t as I}from"./useExitOnCtrlCDWithKeybindings-yAroCqu4.js";function L(e,t){if(!_(t))return;let n=m(t,e);return`${R(n)} ${n} · /effort`}function R(e){switch(e){case`low`:return`○`;case`medium`:return`◐`;case`high`:return`●`;case`xhigh`:return`⦿`;case`max`:return`◉`;default:return`●`}}var z=e((()=>{x(),g()}));function B({initial:e,sessionModel:t,onSelect:s,onCancel:c,isStandaloneCommand:l,showFastModeNotice:u,headerText:d,skipSettingsWrite:f}){let p=ae(),m=he(),g=e===null?K:e,[v,y]=(0,W.useState)(g),x=b(e=>A()?e.fastMode:!1),[S,C]=(0,W.useState)(()=>new Set(E(g)?[g.replace(/\[1m\]/i,``)]:[])),w=(0,W.useCallback)(()=>{if(!v||v===K)return;let e=v.replace(/\[1m\]/i,``);C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[v]),[D,O]=(0,W.useState)(!1),k=b(e=>e.effortValue),[j,M]=(0,W.useState)(k===void 0?void 0:h(k)),N=(0,W.useMemo)(()=>oe(x??!1),[x]),F=(0,W.useMemo)(()=>e!==null&&!N.some(t=>t.value===e)?[...N,{value:e,label:P(e),description:`Current model`}]:N,[N,e]),I=(0,W.useMemo)(()=>F.map(e=>({...e,value:e.value===null?K:e.value})),[F]),L=(0,W.useMemo)(()=>I.some(e=>e.value===g)?g:I[0]?.value??void 0,[I,g]),R=Math.min(10,I.length),z=Math.max(0,I.length-R),B=I.find(e=>e.value===v)?.label,q=V(v),J=v!==void 0&&v!==K&&S.has(v.replace(/\[1m\]/i,``)),Y=q?_(q):!1,X=q?te(q):!1,Z=q?re(q):!1,Q=U(v),$=j===`max`&&!Z?X?`xhigh`:`high`:j===`xhigh`&&!X?`high`:j,_e=(0,W.useCallback)(e=>{y(e),!D&&k===void 0&&M(U(e))},[D,k]),ve=(0,W.useCallback)(e=>{Y&&(M(t=>ge(t??Q,e,X,Z)),O(!0))},[Y,X,Z,Q]);r({"modelPicker:decreaseEffort":()=>ve(`left`),"modelPicker:increaseEffort":()=>ve(`right`),"modelPicker:toggle1M":()=>w()},{context:`ModelPicker`});function ye(e){if(fe(`tengu_model_command_menu_effort`,{effort:j}),!f){let t=se(j,U(e),ue(`userSettings`)?.effortLevel,D),n=le(t);n!==void 0&&de(`userSettings`,{effortLevel:n}),p(e=>({...e,effortValue:t}))}let t=V(e),n=D&&t&&_(t)?j:void 0;if(e===K){s(null,n);return}let r=e.replace(/\[1m\]/i,``);s(S.has(r)?`${r}[1m]`:r,n)}let be=(0,G.jsxs)(i,{flexDirection:`column`,children:[(0,G.jsxs)(i,{flexDirection:`column`,children:[(0,G.jsxs)(i,{marginBottom:1,flexDirection:`column`,children:[(0,G.jsx)(a,{color:`remember`,bold:!0,children:`Select model`}),(0,G.jsx)(a,{dimColor:!0,children:d??`Choose a model for this and future sessions. Use ← → to adjust effort, Space to toggle 1M context.`}),t&&(0,G.jsxs)(a,{dimColor:!0,children:[`Currently using `,P(t),` for this session (set by plan mode). Selecting a model will undo this.`]})]}),(0,G.jsxs)(i,{flexDirection:`column`,marginBottom:1,children:[(0,G.jsx)(i,{flexDirection:`column`,children:(0,G.jsx)(ne,{defaultValue:g,defaultFocusValue:L,options:I,onChange:ye,onFocus:_e,onCancel:c??(()=>{}),visibleOptionCount:R})}),z>0&&(0,G.jsx)(i,{paddingLeft:3,children:(0,G.jsxs)(a,{dimColor:!0,children:[`and `,z,` more…`]})})]}),(0,G.jsxs)(i,{marginBottom:1,flexDirection:`column`,children:[Y?(0,G.jsxs)(a,{dimColor:!0,children:[(0,G.jsx)(H,{effort:$}),` `,ce($),` effort`,$===Q?` (default)`:``,` `,(0,G.jsx)(a,{color:`subtle`,children:`← → to adjust`})]}):(0,G.jsxs)(a,{color:`subtle`,children:[(0,G.jsx)(H,{effort:void 0}),` Effort not supported`,B?` for ${B}`:``]}),J?(0,G.jsxs)(a,{dimColor:!0,children:[(0,G.jsx)(H,{effort:`high`}),` 1M context on`,(0,G.jsx)(a,{color:`subtle`,children:` · Space to toggle`})]}):(0,G.jsxs)(a,{color:`subtle`,children:[(0,G.jsx)(H,{effort:void 0}),` 1M context off`,B?` for ${B}`:``,(0,G.jsx)(a,{color:`subtle`,children:` · Space to toggle`})]})]}),A()?u?(0,G.jsx)(i,{marginBottom:1,children:(0,G.jsxs)(a,{dimColor:!0,children:[`Fast mode is `,(0,G.jsx)(a,{bold:!0,children:`ON`}),` and available with `,T,` only (/fast). Switching to other models turn off fast mode.`]})}):pe()&&!me()?(0,G.jsx)(i,{marginBottom:1,children:(0,G.jsxs)(a,{dimColor:!0,children:[`Use `,(0,G.jsx)(a,{bold:!0,children:`/fast`}),` to turn on Fast mode (`,T,` only).`]})}):null:null]}),l&&(0,G.jsx)(a,{dimColor:!0,italic:!0,children:m.pending?(0,G.jsxs)(G.Fragment,{children:[`Press `,m.keyName,` again to exit`]}):(0,G.jsxs)(o,{children:[(0,G.jsx)(n,{shortcut:`Enter`,action:`confirm`}),(0,G.jsx)(ie,{action:`select:cancel`,context:`Select`,fallback:`Esc`,description:`exit`})]})})]});return l?(0,G.jsx)(ee,{color:`permission`,children:be}):be}function V(e){if(e)return e===K?j():w(e)}function H({effort:e}){return(0,G.jsx)(a,{color:e?`claude`:`subtle`,children:R(e??`low`)})}function ge(e,t,n,r){let i=[`low`,`medium`,`high`,...n?[`xhigh`]:[],...r?[`max`]:[]],a=i.indexOf(e),o=a===-1?i.indexOf(`high`):a;return t===`right`?i[(o+1)%i.length]:i[(o-1+i.length)%i.length]}function U(e){let t=u(V(e)??j());return t===void 0?`high`:h(t)}var W,G,K,q=e((()=>{v(),s(),W=t(s(),1),M(),I(),C(),N(),c(),F(),y(),g(),k(),p(),S(),d(),f(),z(),G=l(),K=`__NO_PREFERENCE__`}));function J(e,t,n){if(!D())return!1;if(t)return!0;if(e===null||!E(e))return!1;let r=e.toLowerCase().replace(/\[1m\]$/,``).trim(),i=r===`opus`||r.includes(`opus-4-6`)||r.includes(`opus-4-7`),a=r===`sonnet`||r.includes(`sonnet-4-6`);return i&&n?!1:i||a}var Y=e((()=>{O(),M()}));export{R as a,q as i,J as n,L as o,B as r,z as s,Y as t};
@@ -0,0 +1 @@
1
+ import{eu as e,nu as t,ru as n,tu as r}from"./loadAgentsDir-nzr38hai.js";n();export{e as drainPendingExtraction,r as executeExtractMemories,t as initExtractMemories};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./fast-DKqiojzf.js";t();export{n as FastModePicker,e as call};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as n,I as r,Lt as i,P as a,di as o,fi as s,j as c,t as l,ui as u,y as d}from"./src-CDCSSo0U2.js";import{t as f}from"./jsx-runtime-Bb4Xn-E0.js";import{fS as p,lS as m,uS as h}from"./loadAgentsDir-nzr38hai.js";import{Kt as g,g as _,y as v}from"./settings-5PQdphqC.js";import{c as y,g as b}from"./config-C7YHKCPV.js";import{n as x,r as S}from"./analytics-BotDBGh0.js";import{b as C,u as w}from"./startupProfiler-DxRQteII.js";import{G as T,J as E,K as D,U as O,W as k,Y as A,Z as j,at as M,it as N,q as P,tt as F,ut as I}from"./model-DfFA3qMO.js";import{u as L}from"./referral-DP_GshTS.js";import{n as R,t as z}from"./systemTheme-Ceakddth.js";function B({cooldown:e}){return e?(0,H.jsx)(a,{color:`promptBorder`,dimColor:!0,children:`↯`}):(0,H.jsx)(a,{color:`fastMode`,children:`↯`})}function V(e=!0,t=!1){if(!e)return`↯`;let n=R(y().theme);return t?u.dim(c(`promptBorder`,n)(`↯`)):c(`fastMode`,n)(`↯`)}var H,U=e((()=>{o(),s(),g(),l(),b(),z(),H=f()}));function W(e,t){P(),v(`userSettings`,{fastMode:e?!0:void 0}),t(e?e=>{let t=!M(e.mainLoopModel);return{...e,...t?{mainLoopModel:E(),mainLoopModelForSession:null}:{},fastMode:!0}}:e=>({...e,fastMode:!1}))}function G({onDone:e,unavailableReason:t}){let o=h(e=>e.mainLoopModel),s=h(e=>e.fastMode),c=p(),[l,u]=(0,J.useState)(s??!1),f=A(),m=f.status===`cooldown`,g=t!==null,_=O(k(!0));function v(){g||(W(l,c),S(`tengu_fast_mode_toggled`,{enabled:l,source:`picker`}),l?e(`${V(l)} Fast mode ON${M(o)?``:` · model set to ${D}`} · ${_}`):(c(e=>({...e,fastMode:!1})),e(`Fast mode OFF`)))}function y(){if(g){s&&W(!1,c),e(`Fast mode OFF`,{display:`system`});return}e(s?`${V()} Kept Fast mode ON`:`Kept Fast mode OFF`,{display:`system`})}function b(){g||u(e=>!e)}return n({"confirm:yes":v,"confirm:nextField":b,"confirm:next":b,"confirm:previous":b,"confirm:cycleMode":b,"confirm:toggle":b},{context:`Confirmation`}),(0,Y.jsxs)(d,{title:(0,Y.jsxs)(a,{children:[(0,Y.jsx)(B,{cooldown:m}),` Fast mode (research preview)`]}),subtitle:`High-speed mode for ${D}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:y,color:`fastMode`,inputGuide:e=>e.pending?(0,Y.jsxs)(a,{children:[`Press `,e.keyName,` again to exit`]}):g?(0,Y.jsx)(a,{children:`Esc to cancel`}):(0,Y.jsx)(a,{children:`Tab to toggle · Enter to confirm · Esc to cancel`}),children:[t?(0,Y.jsx)(r,{marginLeft:2,children:(0,Y.jsx)(a,{color:`error`,children:t})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(r,{flexDirection:`column`,gap:0,marginLeft:2,children:(0,Y.jsxs)(r,{flexDirection:`row`,gap:2,children:[(0,Y.jsx)(a,{bold:!0,children:`Fast mode`}),(0,Y.jsx)(a,{color:l?`fastMode`:void 0,bold:l,children:l?`ON `:`OFF`}),(0,Y.jsx)(a,{dimColor:!0,children:_})]})}),m&&f.status===`cooldown`&&(0,Y.jsx)(r,{marginLeft:2,children:(0,Y.jsxs)(a,{color:`warning`,children:[f.reason===`overloaded`?`Fast mode overloaded and is temporarily unavailable`:`You've hit your fast limit`,` · resets in `,w(f.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),(0,Y.jsxs)(a,{dimColor:!0,children:[`Learn more:`,` `,(0,Y.jsx)(i,{url:`https://code.claude.com/docs/en/fast-mode`,children:`https://code.claude.com/docs/en/fast-mode`})]})]})}async function K(e,t,n){let r=j();if(r)return`Fast mode unavailable: ${r}`;let{mainLoopModel:i}=t();return W(e,n),S(`tengu_fast_mode_toggled`,{enabled:e,source:`shortcut`}),e?`${V(!0)} Fast mode ON${M(i)?``:` · model set to ${D}`} · ${O(k(!0))}`:`Fast mode OFF`}async function q(e,t,n){if(!N())return null;await I();let r=n?.trim().toLowerCase();if(r===`on`||r===`off`)return e(await K(r===`on`,t.getAppState,t.setAppState)),null;let i=j();return S(`tengu_fast_mode_picker_shown`,{unavailable_reason:i??``}),(0,Y.jsx)(G,{onDone:e,unavailableReason:i})}var J,Y,X=e((()=>{s(),J=t(s(),1),l(),U(),L(),x(),m(),F(),C(),T(),_(),Y=f()}));export{U as a,V as i,q as n,X as r,G as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,t as n}from"./featureCheck-HslM03dr.js";n();export{e as isSkillLearningCompiledIn,t as isSkillLearningEnabled};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";function t(){return!1}function n(){return process.env.SKILL_LEARNING_ENABLED===`1`||process.env.FEATURE_SKILL_LEARNING===`1`}var r=e((()=>{}));export{t as n,n as r,r as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./Feedback-CEtzaLr3.js";function a(e,t,n,r=``,a={}){return(0,s.jsx)(i,{abortSignal:t,messages:n,initialDescription:r,onDone:e,backgroundTasks:a})}async function o(e,t,n){let r=n||``;return a(e,t.abortController.signal,t.messages,r)}var s;e((()=>{t(),r(),s=n()}))();export{o as call,a as renderFeedbackComponent};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./classPrivateFieldSet2-D4U5K-I3.js";import{n as d,t as f}from"./classPrivateMethodInitSpec-BXQD0Vh4.js";import p from"node:process";var m,h=e((()=>{m=[],m.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&m.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&m.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`)}));function g(e){return v(c(O,this))?(c(O,this).exitCode=e||0,c(D,this).emit(`exit`,c(O,this).exitCode,null),c(A,this).call(c(O,this),c(O,this).exitCode)):0}function _(e,...t){let n=c(k,this);if(e===`exit`&&v(c(O,this))){typeof t[0]==`number`&&(c(O,this).exitCode=t[0]);let r=n.call(c(O,this),e,...t);return c(D,this).emit(`exit`,c(O,this).exitCode,null),r}else return n.call(c(O,this),e,...t)}var v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z=e((()=>{h(),t(),d(),i(),o(),a(),s(),v=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,y=Symbol.for(`signal-exit emitter`),b=globalThis,x=Object.defineProperty.bind(Object),S=class{constructor(){if(n(this,`emitted`,{afterExit:!1,exit:!1}),n(this,`listeners`,{afterExit:[],exit:[]}),n(this,`count`,0),n(this,`id`,Math.random()),b[y])return b[y];x(b,y,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},C=class{},w=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),T=class extends C{onExit(){return()=>{}}load(){}unload(){}},E=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakSet,P=class extends C{constructor(e){super(),f(this,N),l(this,E,F.platform===`win32`?`SIGINT`:`SIGHUP`),l(this,D,new S),l(this,O,void 0),l(this,k,void 0),l(this,A,void 0),l(this,j,{}),l(this,M,!1),u(O,this,e),u(j,this,{});for(let t of m)c(j,this)[t]=()=>{let n=c(O,this).listeners(t),{count:r}=c(D,this),i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=c(D,this).emit(`exit`,null,t),r=t===`SIGHUP`?c(E,this):t;n||e.kill(e.pid,r)}};u(A,this,e.reallyExit),u(k,this,e.emit)}onExit(e,t){if(!v(c(O,this)))return()=>{};c(M,this)===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return c(D,this).on(n,e),()=>{c(D,this).removeListener(n,e),c(D,this).listeners.exit.length===0&&c(D,this).listeners.afterExit.length===0&&this.unload()}}load(){if(!c(M,this)){u(M,this,!0),c(D,this).count+=1;for(let e of m)try{let t=c(j,this)[e];t&&c(O,this).on(e,t)}catch{}c(O,this).emit=(e,...t)=>r(N,this,_).call(this,e,...t),c(O,this).reallyExit=e=>r(N,this,g).call(this,e)}}unload(){c(M,this)&&(u(M,this,!1),m.forEach(e=>{let t=c(j,this)[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{c(O,this).removeListener(e,t)}catch{}}),c(O,this).emit=c(k,this),c(O,this).reallyExit=c(A,this),--c(D,this).count)}},F=globalThis.process,{onExit:I,load:L,unload:R}=w(v(F)?new P(F):new T)}));function B(){let{env:e}=p,{TERM:t,TERM_PROGRAM:n}=e;return p.platform===`win32`?!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask===`{cmd::Cmder}`||n===`Terminus-Sublime`||n===`vscode`||t===`xterm-256color`||t===`alacritty`||t===`rxvt-unicode`||t===`rxvt-unicode-256color`||e.TERMINAL_EMULATOR===`JetBrains-JediTerm`:t!==`linux`}var V=e((()=>{})),H,U,W,G,K,q,J,Y=e((()=>{V(),H={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},U={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},W={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},G={...H,...U},K={...H,...W},q=B(),J=q?G:K,Object.entries(U)}));export{I as i,Y as n,z as r,J as t};
@@ -0,0 +1,12 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{n as r,t as i}from"./cwd-BuJhkTrc.js";import{G as a,K as o,U as s,_ as c,h as l,l as u,p as d,x as f}from"./debug-IKW-jE7K.js";import{o as p,s as m}from"./log-B3eB4EFv.js";import{i as h,o as ee}from"./platform-EtecGacO.js";import{i as te,n as ne}from"./path-BCSE0S-c.js";import{n as re,r as ie}from"./analytics-BotDBGh0.js";import{homedir as g}from"os";import{basename as _,dirname as v,extname as y,isAbsolute as b,join as x,normalize as S,relative as C,resolve as ae,sep as w}from"path";import{chmodSync as T,writeFileSync as E}from"fs";import{realpath as D,stat as O}from"fs/promises";function k(e){let{buffer:t,bytesRead:n}=l().readSync(e,{length:4096});return n===0?`utf8`:n>=2&&t[0]===255&&t[1]===254?`utf16le`:(n>=3&&t[0]===239&&t[1]===187&&t[2],`utf8`)}function A(e){let t=0,n=0;for(let r=0;r<e.length;r++)e[r]===`
2
+ `&&(r>0&&e[r-1]===`\r`?t++:n++);return t>n?`CRLF`:`LF`}function j(e){let t=l(),{resolvedPath:n,isSymlink:r}=f(t,e);r&&d(`Reading through symlink: ${e} -> ${n}`);let i=k(n),a=t.readFileSync(n,{encoding:i}),o=A(a.slice(0,4096));return{content:a.replaceAll(`\r
3
+ `,`
4
+ `),encoding:i,lineEndings:o}}function M(e){return j(e).content}var N=e((()=>{u(),c()})),P,F,I=e((()=>{$(),c(),t(),P=class{constructor(){n(this,`cache`,new Map),n(this,`maxCacheSize`,1e3)}readFile(e){let t=l(),n;try{n=t.statSync(e)}catch(t){throw this.cache.delete(e),t}let r=e,i=this.cache.get(r);if(i&&i.mtime===n.mtimeMs)return{content:i.content,encoding:i.encoding};let a=H(e),o=t.readFileSync(e,{encoding:a}).replaceAll(`\r
5
+ `,`
6
+ `);if(this.cache.set(r,{content:o,encoding:a,mtime:n.mtimeMs}),this.cache.size>this.maxCacheSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}return{content:o,encoding:a}}clear(){this.cache.clear()}invalidate(e){this.cache.delete(e)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}},F=new P}));async function L(e){try{return await O(e),!0}catch{return!1}}function R(e){try{return l().readFileSync(e,{encoding:`utf8`})}catch(e){return m(e),null}}function z(e){let t=l();return Math.floor(t.statSync(e).mtimeMs)}async function B(e){let t=await l().stat(e);return Math.floor(t.mtimeMs)}function V(e,t,n,r){let i=t;r===`CRLF`&&(i=t.replaceAll(`\r
7
+ `,`
8
+ `).split(`
9
+ `).join(`\r
10
+ `)),Y(e,i,{encoding:n})}function H(e){try{let{resolvedPath:t}=f(l(),e);return k(t)}catch(e){return o(e)?d(`detectFileEncoding failed for expected reason: ${e.code}`,{level:`debug`}):m(e),`utf8`}}function U(e,t=`utf8`){try{let n=l(),{resolvedPath:r}=f(n,e),{buffer:i,bytesRead:a}=n.readSync(r,{length:4096});return A(i.toString(t,0,a))}catch(e){return m(e),`LF`}}function W(e){return e.includes(` `)?e.replace(/^\t+/gm,e=>` `.repeat(e.length)):e}function G(e){let t=e?ne(e):void 0;return{absolutePath:t,relativePath:t?C(i(),t):void 0}}function K(e){let{relativePath:t}=G(e);if(t&&!t.startsWith(`..`))return t;let n=g();return e.startsWith(n+w)?`~`+e.slice(n.length):e}function q(e){let t=l();try{let n=v(e),r=_(e,y(e)),i=t.readdirSync(n).filter(t=>_(t.name,y(t.name))===r&&x(n,t.name)!==e)[0];return i?i.name:void 0}catch(e){a(e)||m(e);return}}async function oe(e){let t=i(),n=v(t),r=e;try{r=x(await D(v(e)),_(e))}catch{}let a=n===w?w:n+w;if(!r.startsWith(a)||r.startsWith(t+w)||r===t)return;let o=x(t,C(n,r));try{return await O(o),o}catch{return}}function J(){return!0}function se({content:e,startLine:t}){if(!e)return``;let n=e.split(/\r?\n/);return J()?n.map((e,n)=>`${n+t}\t${e}`).join(`
11
+ `):n.map((e,n)=>{let r=String(n+t);return r.length>=6?`${r}→${e}`:`${r.padStart(6,` `)}→${e}`}).join(`
12
+ `)}function ce(e){return e.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??e}function le(e){try{return l().isDirEmptySync(e)}catch(e){return a(e)}}function ue(e){let{content:t}=F.readFile(e);return t}function Y(e,t,n={encoding:`utf-8`}){let r=l(),i=e;try{let t=r.readlinkSync(e);i=b(t)?t:ae(v(e),t),d(`Writing through symlink: ${e} -> ${i}`)}catch{}let o=`${i}.tmp.${process.pid}.${Date.now()}`,s,c=!1;try{s=r.statSync(i).mode,c=!0,d(`Preserving file permissions: ${s.toString(8)}`)}catch(e){if(!a(e))throw e;n.mode!==void 0&&(s=n.mode,d(`Setting permissions for new file: ${s.toString(8)}`))}try{d(`Writing to temp file: ${o}`);let e={encoding:n.encoding,flush:!0};!c&&n.mode!==void 0&&(e.mode=n.mode),E(o,t,e),d(`Temp file written successfully, size: ${t.length} bytes`),c&&s!==void 0&&(T(o,s),d(`Applied original permissions to temp file`)),d(`Renaming ${o} to ${i}`),r.renameSync(o,i),d(`File ${i} written atomically`)}catch(e){d(`Failed to write file atomically: ${e}`,{level:`error`}),ie(`tengu_atomic_write_error`,{});try{d(`Cleaning up temp file: ${o}`),r.unlinkSync(o)}catch(e){d(`Failed to clean up temp file: ${e}`)}d(`Falling back to non-atomic write for ${i}`);try{let e={encoding:n.encoding,flush:!0};!c&&n.mode!==void 0&&(e.mode=n.mode),E(i,t,e),d(`File ${i} written successfully with non-atomic fallback`)}catch(e){throw d(`Non-atomic write also failed: ${e}`),e}}}function de(){let e=h(),t=g();if(e===`macos`)return x(t,`Desktop`);if(e===`windows`){let e=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,`/`):null;if(e){let t=`/mnt/c${e.replace(/^[A-Z]:/,``)}/Desktop`;if(l().existsSync(t))return t}try{let e=`/mnt/c/Users`,t=l().readdirSync(e);for(let n of t){if(n.name===`Public`||n.name===`Default`||n.name===`Default User`||n.name===`All Users`)continue;let t=x(e,n.name,`Desktop`);if(l().existsSync(t))return t}}catch(e){m(e)}}let n=x(t,`Desktop`);return l().existsSync(n)?n:t}function fe(e,t=Z){try{return l().statSync(e).size<=t}catch{return!1}}function X(e){let t=S(e);return t=t.replace(/\\/g,`/`),h()===`windows`&&(t=t.toLowerCase()),t}function pe(e,t){return X(e)===X(t)}var Z,Q,$=e((()=>{re(),r(),u(),s(),N(),I(),c(),p(),te(),ee(),Z=.25*1024*1024,Q=`Note: your current working directory is`}));export{Y as C,M as D,N as E,j as O,oe as S,k as T,L as _,H as a,ue as b,de as c,B as d,$ as f,X as g,fe as h,W as i,K as l,le as m,Z as n,U as o,J as p,se as r,q as s,Q as t,z as u,pe as v,V as w,ce as x,R as y};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{n as r,t as i}from"./index.min-D75yiGLN.js";import{normalize as a}from"path";function o(e,t=d){return new f(e,t)}function s(e){return Object.fromEntries(e.entries())}function c(e){return Array.from(e.keys())}function l(e){let t=o(e.max,e.maxSize);return t.load(e.dump()),t}function u(e,t){let n=l(e);for(let[e,r]of t.entries()){let t=n.get(e);(!t||r.timestamp>t.timestamp)&&n.set(e,r)}return n}var d,f,p=e((()=>{r(),t(),d=25*1024*1024,f=class{constructor(e,t){n(this,`cache`,void 0),this.cache=new i({max:e,maxSize:t,sizeCalculation:e=>{let t=e.content,n=typeof t==`string`?t:t==null?``:typeof t==`object`?JSON.stringify(t):String(t);return Math.max(1,Buffer.byteLength(n,`utf8`))}})}get(e){return this.cache.get(a(e))}set(e,t){return this.cache.set(a(e),t),this}has(e){return this.cache.has(a(e))}delete(e){return this.cache.delete(a(e))}clear(){this.cache.clear()}get size(){return this.cache.size}get max(){return this.cache.max}get maxSize(){return this.cache.maxSize}get calculatedSize(){return this.cache.calculatedSize}keys(){return this.cache.keys()}entries(){return this.cache.entries()}dump(){return this.cache.dump()}load(e){this.cache.load(e)}}}));export{o as a,l as i,c as n,p as o,s as r,u as s,f as t};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./cwd-BuJhkTrc.js";import{n as r,o as i}from"./fileStateCache-DDW5toIs.js";import{relative as a}from"path";async function o(e,t){let i=t.readFileState?r(t.readFileState):[];return i.length===0?{type:`text`,value:`No files in context`}:{type:`text`,value:`Files in context:\n${i.map(e=>a(n(),e)).join(`
2
+ `)}`}}e((()=>{t(),i()}))();export{o as call};
@@ -0,0 +1 @@
1
+ import{n as e,r as t,s as n}from"./firstPartyEventLogger-hU-LPkje.js";e();export{t as initialize1PEventLogging,n as shutdown1PEventLogging};
@@ -0,0 +1,5 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{l as r,n as i,o as a}from"./envUtils-DSxRz_kt.js";import{n as o,t as s}from"./defineProperty-C-QyHrDq.js";import{T as c,w as l,y as u}from"./esm-Cb-L4oAk.js";import{n as d,t as f}from"./axios-DaWTGg7G.js";import{en as p,ht as m,z as ee}from"./state-4KQ3kaqz.js";import{n as te,t as ne}from"./cwd-BuJhkTrc.js";import{E as h,J as re,K as ie,O as g,U as ae,l as _,p as v,z as y}from"./debug-IKW-jE7K.js";import{Xt as oe,Zt as se}from"./settings-5PQdphqC.js";import{c as ce,f as le,g as b,n as ue}from"./config-C7YHKCPV.js";import{c as de,o as fe}from"./execFileNoThrow-COKYqVQj.js";import{o as pe,s as x}from"./log-B3eB4EFv.js";import{a as me,i as he,o as ge}from"./platform-EtecGacO.js";import{l as _e,s as ve}from"./types-a7X-tJpJ.js";import{a as ye,n as be}from"./analytics-BotDBGh0.js";import{i as S,n as xe}from"./startupProfiler-DxRQteII.js";import{Bt as Se,It as Ce,Kt as we,Mt as C,Pt as Te,Ur as Ee,Vt as w,Wr as De,er as Oe,ir as ke,kt as Ae,lr as je,ur as Me,vn as Ne,yn as Pe}from"./model-DfFA3qMO.js";import{d as Fe,i as Ie,s as T}from"./metadata-BRLJvh61.js";import{n as Le,t as Re}from"./config-CLmFk-5V.js";import{_ as ze,c as Be,n as Ve,o as He,t as Ue,v as We,w as E}from"./esm-C8Zkk1Ux.js";import*as D from"path";import{randomUUID as O}from"crypto";import{appendFile as Ge,mkdir as k,readdir as Ke,unlink as A,writeFile as qe}from"fs/promises";async function Je(){j===null&&!M&&(M=Ze(),j=await M,M=null,N.cache.clear?.())}function Ye(){j=null,M=null,N.cache.clear?.(),P.cache.clear?.()}function Xe(){if(j!==null)return j;let e=C();if(e?.emailAddress)return e.emailAddress;if(process.env.USER_TYPE===`ant`&&process.env.COO_CREATOR)return`${process.env.COO_CREATOR}@anthropic.com`}async function Ze(){let e=C();if(e?.emailAddress)return e.emailAddress;if(process.env.USER_TYPE===`ant`)return process.env.COO_CREATOR?`${process.env.COO_CREATOR}@anthropic.com`:P()}var j,M,N,P,F=e((()=>{de(),n(),p(),w(),b(),te(),se(),a(),j=null,M=null,N=t(e=>{let t=le(),n=ce(),i,a,o;if(e&&(i=Ce()??void 0,a=Te()??void 0,i&&n.claudeCodeFirstTokenDate)){let e=new Date(n.claudeCodeFirstTokenDate).getTime();isNaN(e)||(o=e)}let s=C(),c=s?.organizationUuid,l=s?.accountUuid;return{deviceId:t,sessionId:m(),email:Xe(),appVersion:`0.0.1`,platform:oe(),organizationUuid:c,accountUuid:l,userType:process.env.USER_TYPE,subscriptionType:i,rateLimitTier:a,firstTokenTime:o,...r(process.env.GITHUB_ACTIONS)&&{githubActionsMetadata:{actor:process.env.GITHUB_ACTOR,actorId:process.env.GITHUB_ACTOR_ID,repository:process.env.GITHUB_REPOSITORY,repositoryId:process.env.GITHUB_REPOSITORY_ID,repositoryOwner:process.env.GITHUB_REPOSITORY_OWNER,repositoryOwnerId:process.env.GITHUB_REPOSITORY_OWNER_ID}}}}),P=t(async()=>{let e=await fe(`git config --get user.email`,{shell:!0,reject:!1,cwd:ne()});return e.exitCode===0&&e.stdout?e.stdout.trim():void 0})}));function Qe(){return{seconds:0,nanos:0}}function I(e){return e!=null}var L,$e=e((()=>{L={fromJSON(e){return{seconds:I(e.seconds)?globalThis.Number(e.seconds):0,nanos:I(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==void 0&&(t.seconds=Math.round(e.seconds)),e.nanos!==void 0&&(t.nanos=Math.round(e.nanos)),t},create(e){return L.fromPartial(e??{})},fromPartial(e){let t=Qe();return t.seconds=e.seconds??0,t.nanos=e.nanos??0,t}}}));function et(){return{account_id:0,organization_uuid:``,account_uuid:``}}function R(e){return e!=null}var z,tt=e((()=>{z={fromJSON(e){return{account_id:R(e.account_id)?globalThis.Number(e.account_id):0,organization_uuid:R(e.organization_uuid)?globalThis.String(e.organization_uuid):``,account_uuid:R(e.account_uuid)?globalThis.String(e.account_uuid):``}},toJSON(e){let t={};return e.account_id!==void 0&&(t.account_id=Math.round(e.account_id)),e.organization_uuid!==void 0&&(t.organization_uuid=e.organization_uuid),e.account_uuid!==void 0&&(t.account_uuid=e.account_uuid),t},create(e){return z.fromPartial(e??{})},fromPartial(e){let t=et();return t.account_id=e.account_id??0,t.organization_uuid=e.organization_uuid??``,t.account_uuid=e.account_uuid??``,t}}}));function nt(){return{actor_id:``,repository_id:``,repository_owner_id:``}}function rt(){return{platform:``,node_version:``,terminal:``,package_managers:``,runtimes:``,is_running_with_bun:!1,is_ci:!1,is_claubbit:!1,is_github_action:!1,is_claude_code_action:!1,is_claude_ai_auth:!1,version:``,github_event_name:``,github_actions_runner_environment:``,github_actions_runner_os:``,github_action_ref:``,wsl_version:``,github_actions_metadata:void 0,arch:``,is_claude_code_remote:!1,remote_environment_type:``,claude_code_container_id:``,claude_code_remote_session_id:``,tags:[],deployment_environment:``,is_conductor:!1,version_base:``,coworker_type:``,build_time:``,is_local_agent_mode:!1,linux_distro_id:``,linux_distro_version:``,linux_kernel:``,vcs:``,platform_raw:``}}function it(){return{slack_team_id:``,is_enterprise_install:!1,trigger:``,creation_method:``}}function at(){return{event_name:``,client_timestamp:void 0,model:``,session_id:``,user_type:``,betas:``,env:void 0,entrypoint:``,agent_sdk_version:``,is_interactive:!1,client_type:``,process:``,additional_metadata:``,auth:void 0,server_timestamp:void 0,event_id:``,device_id:``,swe_bench_run_id:``,swe_bench_instance_id:``,swe_bench_task_id:``,email:``,agent_id:``,parent_session_id:``,agent_type:``,slack:void 0,team_name:``,skill_name:``,plugin_name:``,marketplace_name:``}}function ot(e){let t=(e.seconds||0)*1e3;return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function B(e){return e instanceof globalThis.Date?e:typeof e==`string`?new globalThis.Date(e):ot(L.fromJSON(e))}function V(e){return e!=null}var H,U,W,G,st=e((()=>{$e(),tt(),H={fromJSON(e){return{actor_id:V(e.actor_id)?globalThis.String(e.actor_id):``,repository_id:V(e.repository_id)?globalThis.String(e.repository_id):``,repository_owner_id:V(e.repository_owner_id)?globalThis.String(e.repository_owner_id):``}},toJSON(e){let t={};return e.actor_id!==void 0&&(t.actor_id=e.actor_id),e.repository_id!==void 0&&(t.repository_id=e.repository_id),e.repository_owner_id!==void 0&&(t.repository_owner_id=e.repository_owner_id),t},create(e){return H.fromPartial(e??{})},fromPartial(e){let t=nt();return t.actor_id=e.actor_id??``,t.repository_id=e.repository_id??``,t.repository_owner_id=e.repository_owner_id??``,t}},U={fromJSON(e){return{platform:V(e.platform)?globalThis.String(e.platform):``,node_version:V(e.node_version)?globalThis.String(e.node_version):``,terminal:V(e.terminal)?globalThis.String(e.terminal):``,package_managers:V(e.package_managers)?globalThis.String(e.package_managers):``,runtimes:V(e.runtimes)?globalThis.String(e.runtimes):``,is_running_with_bun:V(e.is_running_with_bun)?globalThis.Boolean(e.is_running_with_bun):!1,is_ci:V(e.is_ci)?globalThis.Boolean(e.is_ci):!1,is_claubbit:V(e.is_claubbit)?globalThis.Boolean(e.is_claubbit):!1,is_github_action:V(e.is_github_action)?globalThis.Boolean(e.is_github_action):!1,is_claude_code_action:V(e.is_claude_code_action)?globalThis.Boolean(e.is_claude_code_action):!1,is_claude_ai_auth:V(e.is_claude_ai_auth)?globalThis.Boolean(e.is_claude_ai_auth):!1,version:V(e.version)?globalThis.String(e.version):``,github_event_name:V(e.github_event_name)?globalThis.String(e.github_event_name):``,github_actions_runner_environment:V(e.github_actions_runner_environment)?globalThis.String(e.github_actions_runner_environment):``,github_actions_runner_os:V(e.github_actions_runner_os)?globalThis.String(e.github_actions_runner_os):``,github_action_ref:V(e.github_action_ref)?globalThis.String(e.github_action_ref):``,wsl_version:V(e.wsl_version)?globalThis.String(e.wsl_version):``,github_actions_metadata:V(e.github_actions_metadata)?H.fromJSON(e.github_actions_metadata):void 0,arch:V(e.arch)?globalThis.String(e.arch):``,is_claude_code_remote:V(e.is_claude_code_remote)?globalThis.Boolean(e.is_claude_code_remote):!1,remote_environment_type:V(e.remote_environment_type)?globalThis.String(e.remote_environment_type):``,claude_code_container_id:V(e.claude_code_container_id)?globalThis.String(e.claude_code_container_id):``,claude_code_remote_session_id:V(e.claude_code_remote_session_id)?globalThis.String(e.claude_code_remote_session_id):``,tags:globalThis.Array.isArray(e?.tags)?e.tags.map(e=>globalThis.String(e)):[],deployment_environment:V(e.deployment_environment)?globalThis.String(e.deployment_environment):``,is_conductor:V(e.is_conductor)?globalThis.Boolean(e.is_conductor):!1,version_base:V(e.version_base)?globalThis.String(e.version_base):``,coworker_type:V(e.coworker_type)?globalThis.String(e.coworker_type):``,build_time:V(e.build_time)?globalThis.String(e.build_time):``,is_local_agent_mode:V(e.is_local_agent_mode)?globalThis.Boolean(e.is_local_agent_mode):!1,linux_distro_id:V(e.linux_distro_id)?globalThis.String(e.linux_distro_id):``,linux_distro_version:V(e.linux_distro_version)?globalThis.String(e.linux_distro_version):``,linux_kernel:V(e.linux_kernel)?globalThis.String(e.linux_kernel):``,vcs:V(e.vcs)?globalThis.String(e.vcs):``,platform_raw:V(e.platform_raw)?globalThis.String(e.platform_raw):``}},toJSON(e){let t={};return e.platform!==void 0&&(t.platform=e.platform),e.node_version!==void 0&&(t.node_version=e.node_version),e.terminal!==void 0&&(t.terminal=e.terminal),e.package_managers!==void 0&&(t.package_managers=e.package_managers),e.runtimes!==void 0&&(t.runtimes=e.runtimes),e.is_running_with_bun!==void 0&&(t.is_running_with_bun=e.is_running_with_bun),e.is_ci!==void 0&&(t.is_ci=e.is_ci),e.is_claubbit!==void 0&&(t.is_claubbit=e.is_claubbit),e.is_github_action!==void 0&&(t.is_github_action=e.is_github_action),e.is_claude_code_action!==void 0&&(t.is_claude_code_action=e.is_claude_code_action),e.is_claude_ai_auth!==void 0&&(t.is_claude_ai_auth=e.is_claude_ai_auth),e.version!==void 0&&(t.version=e.version),e.github_event_name!==void 0&&(t.github_event_name=e.github_event_name),e.github_actions_runner_environment!==void 0&&(t.github_actions_runner_environment=e.github_actions_runner_environment),e.github_actions_runner_os!==void 0&&(t.github_actions_runner_os=e.github_actions_runner_os),e.github_action_ref!==void 0&&(t.github_action_ref=e.github_action_ref),e.wsl_version!==void 0&&(t.wsl_version=e.wsl_version),e.github_actions_metadata!==void 0&&(t.github_actions_metadata=H.toJSON(e.github_actions_metadata)),e.arch!==void 0&&(t.arch=e.arch),e.is_claude_code_remote!==void 0&&(t.is_claude_code_remote=e.is_claude_code_remote),e.remote_environment_type!==void 0&&(t.remote_environment_type=e.remote_environment_type),e.claude_code_container_id!==void 0&&(t.claude_code_container_id=e.claude_code_container_id),e.claude_code_remote_session_id!==void 0&&(t.claude_code_remote_session_id=e.claude_code_remote_session_id),e.tags?.length&&(t.tags=e.tags),e.deployment_environment!==void 0&&(t.deployment_environment=e.deployment_environment),e.is_conductor!==void 0&&(t.is_conductor=e.is_conductor),e.version_base!==void 0&&(t.version_base=e.version_base),e.coworker_type!==void 0&&(t.coworker_type=e.coworker_type),e.build_time!==void 0&&(t.build_time=e.build_time),e.is_local_agent_mode!==void 0&&(t.is_local_agent_mode=e.is_local_agent_mode),e.linux_distro_id!==void 0&&(t.linux_distro_id=e.linux_distro_id),e.linux_distro_version!==void 0&&(t.linux_distro_version=e.linux_distro_version),e.linux_kernel!==void 0&&(t.linux_kernel=e.linux_kernel),e.vcs!==void 0&&(t.vcs=e.vcs),e.platform_raw!==void 0&&(t.platform_raw=e.platform_raw),t},create(e){return U.fromPartial(e??{})},fromPartial(e){let t=rt();return t.platform=e.platform??``,t.node_version=e.node_version??``,t.terminal=e.terminal??``,t.package_managers=e.package_managers??``,t.runtimes=e.runtimes??``,t.is_running_with_bun=e.is_running_with_bun??!1,t.is_ci=e.is_ci??!1,t.is_claubbit=e.is_claubbit??!1,t.is_github_action=e.is_github_action??!1,t.is_claude_code_action=e.is_claude_code_action??!1,t.is_claude_ai_auth=e.is_claude_ai_auth??!1,t.version=e.version??``,t.github_event_name=e.github_event_name??``,t.github_actions_runner_environment=e.github_actions_runner_environment??``,t.github_actions_runner_os=e.github_actions_runner_os??``,t.github_action_ref=e.github_action_ref??``,t.wsl_version=e.wsl_version??``,t.github_actions_metadata=e.github_actions_metadata!==void 0&&e.github_actions_metadata!==null?H.fromPartial(e.github_actions_metadata):void 0,t.arch=e.arch??``,t.is_claude_code_remote=e.is_claude_code_remote??!1,t.remote_environment_type=e.remote_environment_type??``,t.claude_code_container_id=e.claude_code_container_id??``,t.claude_code_remote_session_id=e.claude_code_remote_session_id??``,t.tags=e.tags?.map(e=>e)||[],t.deployment_environment=e.deployment_environment??``,t.is_conductor=e.is_conductor??!1,t.version_base=e.version_base??``,t.coworker_type=e.coworker_type??``,t.build_time=e.build_time??``,t.is_local_agent_mode=e.is_local_agent_mode??!1,t.linux_distro_id=e.linux_distro_id??``,t.linux_distro_version=e.linux_distro_version??``,t.linux_kernel=e.linux_kernel??``,t.vcs=e.vcs??``,t.platform_raw=e.platform_raw??``,t}},W={fromJSON(e){return{slack_team_id:V(e.slack_team_id)?globalThis.String(e.slack_team_id):``,is_enterprise_install:V(e.is_enterprise_install)?globalThis.Boolean(e.is_enterprise_install):!1,trigger:V(e.trigger)?globalThis.String(e.trigger):``,creation_method:V(e.creation_method)?globalThis.String(e.creation_method):``}},toJSON(e){let t={};return e.slack_team_id!==void 0&&(t.slack_team_id=e.slack_team_id),e.is_enterprise_install!==void 0&&(t.is_enterprise_install=e.is_enterprise_install),e.trigger!==void 0&&(t.trigger=e.trigger),e.creation_method!==void 0&&(t.creation_method=e.creation_method),t},create(e){return W.fromPartial(e??{})},fromPartial(e){let t=it();return t.slack_team_id=e.slack_team_id??``,t.is_enterprise_install=e.is_enterprise_install??!1,t.trigger=e.trigger??``,t.creation_method=e.creation_method??``,t}},G={fromJSON(e){return{event_name:V(e.event_name)?globalThis.String(e.event_name):``,client_timestamp:V(e.client_timestamp)?B(e.client_timestamp):void 0,model:V(e.model)?globalThis.String(e.model):``,session_id:V(e.session_id)?globalThis.String(e.session_id):``,user_type:V(e.user_type)?globalThis.String(e.user_type):``,betas:V(e.betas)?globalThis.String(e.betas):``,env:V(e.env)?U.fromJSON(e.env):void 0,entrypoint:V(e.entrypoint)?globalThis.String(e.entrypoint):``,agent_sdk_version:V(e.agent_sdk_version)?globalThis.String(e.agent_sdk_version):``,is_interactive:V(e.is_interactive)?globalThis.Boolean(e.is_interactive):!1,client_type:V(e.client_type)?globalThis.String(e.client_type):``,process:V(e.process)?globalThis.String(e.process):``,additional_metadata:V(e.additional_metadata)?globalThis.String(e.additional_metadata):``,auth:V(e.auth)?z.fromJSON(e.auth):void 0,server_timestamp:V(e.server_timestamp)?B(e.server_timestamp):void 0,event_id:V(e.event_id)?globalThis.String(e.event_id):``,device_id:V(e.device_id)?globalThis.String(e.device_id):``,swe_bench_run_id:V(e.swe_bench_run_id)?globalThis.String(e.swe_bench_run_id):``,swe_bench_instance_id:V(e.swe_bench_instance_id)?globalThis.String(e.swe_bench_instance_id):``,swe_bench_task_id:V(e.swe_bench_task_id)?globalThis.String(e.swe_bench_task_id):``,email:V(e.email)?globalThis.String(e.email):``,agent_id:V(e.agent_id)?globalThis.String(e.agent_id):``,parent_session_id:V(e.parent_session_id)?globalThis.String(e.parent_session_id):``,agent_type:V(e.agent_type)?globalThis.String(e.agent_type):``,slack:V(e.slack)?W.fromJSON(e.slack):void 0,team_name:V(e.team_name)?globalThis.String(e.team_name):``,skill_name:V(e.skill_name)?globalThis.String(e.skill_name):``,plugin_name:V(e.plugin_name)?globalThis.String(e.plugin_name):``,marketplace_name:V(e.marketplace_name)?globalThis.String(e.marketplace_name):``}},toJSON(e){let t={};return e.event_name!==void 0&&(t.event_name=e.event_name),e.client_timestamp!==void 0&&(t.client_timestamp=e.client_timestamp.toISOString()),e.model!==void 0&&(t.model=e.model),e.session_id!==void 0&&(t.session_id=e.session_id),e.user_type!==void 0&&(t.user_type=e.user_type),e.betas!==void 0&&(t.betas=e.betas),e.env!==void 0&&(t.env=U.toJSON(e.env)),e.entrypoint!==void 0&&(t.entrypoint=e.entrypoint),e.agent_sdk_version!==void 0&&(t.agent_sdk_version=e.agent_sdk_version),e.is_interactive!==void 0&&(t.is_interactive=e.is_interactive),e.client_type!==void 0&&(t.client_type=e.client_type),e.process!==void 0&&(t.process=e.process),e.additional_metadata!==void 0&&(t.additional_metadata=e.additional_metadata),e.auth!==void 0&&(t.auth=z.toJSON(e.auth)),e.server_timestamp!==void 0&&(t.server_timestamp=e.server_timestamp.toISOString()),e.event_id!==void 0&&(t.event_id=e.event_id),e.device_id!==void 0&&(t.device_id=e.device_id),e.swe_bench_run_id!==void 0&&(t.swe_bench_run_id=e.swe_bench_run_id),e.swe_bench_instance_id!==void 0&&(t.swe_bench_instance_id=e.swe_bench_instance_id),e.swe_bench_task_id!==void 0&&(t.swe_bench_task_id=e.swe_bench_task_id),e.email!==void 0&&(t.email=e.email),e.agent_id!==void 0&&(t.agent_id=e.agent_id),e.parent_session_id!==void 0&&(t.parent_session_id=e.parent_session_id),e.agent_type!==void 0&&(t.agent_type=e.agent_type),e.slack!==void 0&&(t.slack=W.toJSON(e.slack)),e.team_name!==void 0&&(t.team_name=e.team_name),e.skill_name!==void 0&&(t.skill_name=e.skill_name),e.plugin_name!==void 0&&(t.plugin_name=e.plugin_name),e.marketplace_name!==void 0&&(t.marketplace_name=e.marketplace_name),t},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=at();return t.event_name=e.event_name??``,t.client_timestamp=e.client_timestamp??void 0,t.model=e.model??``,t.session_id=e.session_id??``,t.user_type=e.user_type??``,t.betas=e.betas??``,t.env=e.env!==void 0&&e.env!==null?U.fromPartial(e.env):void 0,t.entrypoint=e.entrypoint??``,t.agent_sdk_version=e.agent_sdk_version??``,t.is_interactive=e.is_interactive??!1,t.client_type=e.client_type??``,t.process=e.process??``,t.additional_metadata=e.additional_metadata??``,t.auth=e.auth!==void 0&&e.auth!==null?z.fromPartial(e.auth):void 0,t.server_timestamp=e.server_timestamp??void 0,t.event_id=e.event_id??``,t.device_id=e.device_id??``,t.swe_bench_run_id=e.swe_bench_run_id??``,t.swe_bench_instance_id=e.swe_bench_instance_id??``,t.swe_bench_task_id=e.swe_bench_task_id??``,t.email=e.email??``,t.agent_id=e.agent_id??``,t.parent_session_id=e.parent_session_id??``,t.agent_type=e.agent_type??``,t.slack=e.slack!==void 0&&e.slack!==null?W.fromPartial(e.slack):void 0,t.team_name=e.team_name??``,t.skill_name=e.skill_name??``,t.plugin_name=e.plugin_name??``,t.marketplace_name=e.marketplace_name??``,t}}}));function K(){return D.join(i(),`telemetry`)}function ct(e){if(!d.isAxiosError(e))return y(e);let t=[],n=e.response?.headers?.[`request-id`];return n&&t.push(`request-id=${n}`),e.response?.status&&t.push(`status=${e.response.status}`),e.code&&t.push(`code=${e.code}`),e.message&&t.push(e.message),t.join(`, `)}var q,J,Y,lt=e((()=>{We(),f(),p(),st(),w(),b(),_(),a(),ae(),ke(),ve(),pe(),Ne(),h(),Me(),Ee(),be(),T(),o(),q=O(),J=`1p_failed_events.`,Y=class{constructor(e={}){s(this,`endpoint`,void 0),s(this,`timeout`,void 0),s(this,`maxBatchSize`,void 0),s(this,`skipAuth`,void 0),s(this,`batchDelayMs`,void 0),s(this,`baseBackoffDelayMs`,void 0),s(this,`maxBackoffDelayMs`,void 0),s(this,`maxAttempts`,void 0),s(this,`isKilled`,void 0),s(this,`pendingExports`,[]),s(this,`isShutdown`,!1),s(this,`schedule`,void 0),s(this,`cancelBackoff`,null),s(this,`attempts`,0),s(this,`isRetrying`,!1),s(this,`lastExportErrorContext`,void 0);let t=e.baseUrl||(process.env.ANTHROPIC_BASE_URL===`https://api-staging.anthropic.com`?`https://api-staging.anthropic.com`:`https://api.anthropic.com`);this.endpoint=`${t}${e.path||`/api/event_logging/batch`}`,this.timeout=e.timeout||1e4,this.maxBatchSize=e.maxBatchSize||200,this.skipAuth=e.skipAuth??!1,this.batchDelayMs=e.batchDelayMs||100,this.baseBackoffDelayMs=e.baseBackoffDelayMs||500,this.maxBackoffDelayMs=e.maxBackoffDelayMs||3e4,this.maxAttempts=e.maxAttempts??8,this.isKilled=e.isKilled??(()=>!1),this.schedule=e.schedule??((e,t)=>{let n=setTimeout(e,t);return()=>clearTimeout(n)}),this.retryPreviousBatches()}async getQueuedEventCount(){return(await this.loadEventsFromCurrentBatch()).length}getCurrentBatchFilePath(){return D.join(K(),`${J}${m()}.${q}.json`)}async loadEventsFromFile(e){try{return await _e(e)}catch{return[]}}async loadEventsFromCurrentBatch(){return this.loadEventsFromFile(this.getCurrentBatchFilePath())}async saveEventsToFile(e,t){try{if(t.length===0)try{await A(e)}catch{}else await k(K(),{recursive:!0}),await qe(e,t.map(e=>g(e)).join(`
2
+ `)+`
3
+ `,`utf8`)}catch(e){x(e)}}async appendEventsToFile(e,t){if(t.length!==0)try{await k(K(),{recursive:!0}),await Ge(e,t.map(e=>g(e)).join(`
4
+ `)+`
5
+ `,`utf8`)}catch(e){x(e)}}async deleteFile(e){try{await A(e)}catch{}}async retryPreviousBatches(){try{let e=`${J}${m()}.`,t;try{t=(await Ke(K())).filter(t=>t.startsWith(e)&&t.endsWith(`.json`)).filter(e=>!e.includes(q))}catch(e){if(ie(e))return;throw e}for(let e of t){let t=D.join(K(),e);this.retryFileInBackground(t)}}catch(e){x(e)}}async retryFileInBackground(e){if(this.attempts>=this.maxAttempts){await this.deleteFile(e);return}let t=await this.loadEventsFromFile(e);if(t.length===0){await this.deleteFile(e);return}process.env.USER_TYPE===`ant`&&v(`1P event logging: retrying ${t.length} events from previous batch`);let n=await this.sendEventsInBatches(t);n.length===0?(await this.deleteFile(e),process.env.USER_TYPE===`ant`&&v(`1P event logging: previous batch retry succeeded`)):(await this.saveEventsToFile(e,n),process.env.USER_TYPE===`ant`&&v(`1P event logging: previous batch retry failed, ${n.length} events remain`))}async export(e,t){if(this.isShutdown){process.env.USER_TYPE===`ant`&&v(`1P event logging export failed: Exporter has been shutdown`),t({code:E.FAILED,error:Error(`Exporter has been shutdown`)});return}let n=this.doExport(e,t);this.pendingExports.push(n),n.finally(()=>{let e=this.pendingExports.indexOf(n);e>-1&&this.pendingExports.splice(e,1)})}async doExport(e,t){try{let n=e.filter(e=>e.instrumentationScope?.name===`com.anthropic.claude_code.events`);if(n.length===0){t({code:E.SUCCESS});return}let r=this.transformLogsToEvents(n).events;if(r.length===0){t({code:E.SUCCESS});return}if(this.attempts>=this.maxAttempts){t({code:E.FAILED,error:Error(`Dropped ${r.length} events: max attempts (${this.maxAttempts}) reached`)});return}let i=await this.sendEventsInBatches(r);if(this.attempts++,i.length>0){await this.queueFailedEvents(i),this.scheduleBackoffRetry();let e=this.lastExportErrorContext?` (${this.lastExportErrorContext})`:``;t({code:E.FAILED,error:Error(`Failed to export ${i.length} events${e}`)});return}this.resetBackoff(),await this.getQueuedEventCount()>0&&!this.isRetrying&&this.retryFailedEvents(),t({code:E.SUCCESS})}catch(e){process.env.USER_TYPE===`ant`&&v(`1P event logging export failed: ${y(e)}`),x(e),t({code:E.FAILED,error:re(e)})}}async sendEventsInBatches(e){let t=[];for(let n=0;n<e.length;n+=this.maxBatchSize)t.push(e.slice(n,n+this.maxBatchSize));process.env.USER_TYPE===`ant`&&v(`1P event logging: exporting ${e.length} events in ${t.length} batch(es)`);let n=[],r;for(let e=0;e<t.length;e++){let i=t[e];try{await this.sendBatchWithRetry({events:i})}catch(i){r=ct(i);for(let r=e;r<t.length;r++)n.push(...t[r]);if(process.env.USER_TYPE===`ant`){let n=t.length-1-e;v(`1P event logging: batch ${e+1}/${t.length} failed (${r}); short-circuiting ${n} remaining batch(es)`)}break}e<t.length-1&&this.batchDelayMs>0&&await Pe(this.batchDelayMs)}return n.length>0&&r&&(this.lastExportErrorContext=r),n}async queueFailedEvents(e){let t=this.getCurrentBatchFilePath();await this.appendEventsToFile(t,e);let n=this.lastExportErrorContext?` (${this.lastExportErrorContext})`:``,r=`1P event logging: ${e.length} events failed to export${n}`;x(Error(r))}scheduleBackoffRetry(){if(this.cancelBackoff||this.isRetrying||this.isShutdown)return;let e=Math.min(this.baseBackoffDelayMs*this.attempts*this.attempts,this.maxBackoffDelayMs);process.env.USER_TYPE===`ant`&&v(`1P event logging: scheduling backoff retry in ${e}ms (attempt ${this.attempts})`),this.cancelBackoff=this.schedule(async()=>{this.cancelBackoff=null,await this.retryFailedEvents()},e)}async retryFailedEvents(){let e=this.getCurrentBatchFilePath();for(;!this.isShutdown;){let t=await this.loadEventsFromFile(e);if(t.length===0)break;if(this.attempts>=this.maxAttempts){process.env.USER_TYPE===`ant`&&v(`1P event logging: max attempts (${this.maxAttempts}) reached, dropping ${t.length} events`),await this.deleteFile(e),this.resetBackoff();return}this.isRetrying=!0,await this.deleteFile(e),process.env.USER_TYPE===`ant`&&v(`1P event logging: retrying ${t.length} failed events (attempt ${this.attempts+1})`);let n=await this.sendEventsInBatches(t);if(this.attempts++,this.isRetrying=!1,n.length>0){await this.saveEventsToFile(e,n),this.scheduleBackoffRetry();return}this.resetBackoff(),process.env.USER_TYPE===`ant`&&v(`1P event logging: backoff retry succeeded`)}}resetBackoff(){this.attempts=0,this.cancelBackoff&&(this.cancelBackoff(),this.cancelBackoff=null)}async sendBatchWithRetry(e){if(this.isKilled())throw Error(`firstParty sink killswitch active`);let t={"Content-Type":`application/json`,"User-Agent":je(),"x-service-name":`claude-code`},n=ue()||ee();process.env.USER_TYPE===`ant`&&!n&&v(`1P event logging: Trust not accepted`);let r=this.skipAuth||!n;if(!r&&we()){let e=Ae();Se()?e&&De(e.expiresAt)&&(r=!0,process.env.USER_TYPE===`ant`&&v(`1P event logging: OAuth token expired, skipping auth to avoid 401`)):r=!0}let i=r?{headers:{},error:`trust not established or Oauth token expired`}:Oe(),a=!i.error;!a&&process.env.USER_TYPE===`ant`&&v(`1P event logging: auth not available, sending without auth`);let o=a?{...t,...i.headers}:t;try{let t=await d.post(this.endpoint,e,{timeout:this.timeout,headers:o});this.logSuccess(e.events.length,a,t.data);return}catch(n){if(a&&d.isAxiosError(n)&&n.response?.status===401){process.env.USER_TYPE===`ant`&&v(`1P event logging: 401 auth error, retrying without auth`);let n=await d.post(this.endpoint,e,{timeout:this.timeout,headers:t});this.logSuccess(e.events.length,!1,n.data);return}throw n}}logSuccess(e,t,n){process.env.USER_TYPE===`ant`&&(v(`1P event logging: ${e} events exported successfully${t?` (with auth)`:` (without auth)`}`),v(`API Response: ${g(n,null,2)}`))}hrTimeToDate(e){let[t,n]=e;return new Date(t*1e3+n/1e6)}transformLogsToEvents(e){let t=[];for(let n of e){let e=n.attributes||{},r=e.event_name||n.body||`unknown`,i=e.core_metadata,a=e.user_metadata,o=e.event_metadata||{};if(!i){process.env.USER_TYPE===`ant`&&v(`1P event logging: core_metadata missing for event ${r}`),t.push({event_type:`ClaudeCodeInternalEvent`,event_data:G.toJSON({event_id:e.event_id,event_name:r,client_timestamp:this.hrTimeToDate(n.hrTime),session_id:m(),additional_metadata:Buffer.from(g({transform_error:`core_metadata attribute is missing`})).toString(`base64`)})});continue}let s=Fe(i,a,o),{_PROTO_skill_name:c,_PROTO_plugin_name:l,_PROTO_marketplace_name:u,...d}=s.additional,f=ye(d);t.push({event_type:`ClaudeCodeInternalEvent`,event_data:G.toJSON({event_id:e.event_id,event_name:r,client_timestamp:this.hrTimeToDate(n.hrTime),device_id:e.user_id,email:a?.email,auth:s.auth,...s.core,env:s.env,process:s.process,skill_name:typeof c==`string`?c:void 0,plugin_name:typeof l==`string`?l:void 0,marketplace_name:typeof u==`string`?u:void 0,additional_metadata:Object.keys(f).length>0?Buffer.from(g(f)).toString(`base64`):void 0})})}return{events:t}}async shutdown(){this.isShutdown=!0,this.resetBackoff(),await this.forceFlush(),process.env.USER_TYPE===`ant`&&v(`1P event logging exporter shutdown complete`)}async forceFlush(){await Promise.all(this.pendingExports),process.env.USER_TYPE===`ant`&&v(`1P event logging exporter flush complete`)}}}));function ut(e){return!1}var dt=e((()=>{}));function ft(){return{}}function pt(e){let t=ft()[e];if(!t)return null;let n=t.sample_rate;return typeof n!=`number`||n<0||n>1||n>=1?null:n<=0?0:Math.random()<n?n:0}async function mt(){if($)try{await $.shutdown(),process.env.USER_TYPE===`ant`&&v(`1P event logging: final shutdown complete`)}catch{}}function X(){return!Le()}async function ht(e,t,n={}){try{let r=await Ie({model:n.model,betas:n.betas}),i={event_name:t,event_id:O(),core_metadata:r,user_metadata:N(!0),event_metadata:n},a=le();a&&(i.user_id=a),process.env.USER_TYPE===`ant`&&v(`[ANT-ONLY] 1P event: ${t} ${g(n,null,0)}`),e.emit({body:t,attributes:i})}catch(e){process.env.USER_TYPE===`ant`&&x(e)}}function gt(e,t={}){X()&&(!Q||ut(`firstParty`)||ht(Q,e,t))}function _t(){if(S(`1p_event_logging_start`),!X()){process.env.USER_TYPE===`ant`&&v(`1P event logging not enabled`);return}S(`1p_event_after_config`);let e=parseInt(process.env.OTEL_LOGS_EXPORT_INTERVAL||vt.toString(),10),t=yt,n=Z,r=he(),i={[l]:`claude-code`,[c]:`0.0.1`};if(r===`wsl`){let e=me();e&&(i[`wsl.version`]=e)}$=new He({resource:ze(i),processors:[new Ve(new Y({maxBatchSize:t,isKilled:()=>ut(`firstParty`)}),{scheduledDelayMillis:e,maxExportBatchSize:t,maxQueueSize:n})]}),Q=$.getLogger(`com.anthropic.claude_code.events`,`0.0.1`)}var vt,yt,Z,Q,$,bt=e((()=>{Be(),Ue(),u(),b(),_(),pe(),ge(),h(),xe(),F(),Re(),lt(),T(),dt(),vt=1e4,yt=200,Z=8192,Q=null,$=null}));export{gt as a,P as c,Ye as d,X as i,Je as l,bt as n,pt as o,_t as r,mt as s,ft as t,F as u};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./defineProperty-C-QyHrDq.js";import{U as n,l as r,p as i,z as a}from"./debug-IKW-jE7K.js";import{O as o,k as s}from"./rcDebugLog-BUuD-X1D.js";import{i as c}from"./workSecret-C_lv0dRh.js";import{t as l}from"./ccrClient-HqMi5Kfu.js";import{n as u,t as d}from"./SSETransport-BXiEBMpb.js";u(),r(),n(),o();function f(e){return{write:t=>e.write(t),writeBatch:t=>e.writeBatch(t),close:()=>e.close(),isConnectedStatus:()=>e.isConnectedStatus(),getStateLabel:()=>e.getStateLabel(),setOnData:t=>e.setOnData(t),setOnClose:t=>e.setOnClose(t),setOnConnect:t=>e.setOnConnect(t),connect:()=>void e.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return e.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function p(e){let{sessionUrl:t,ingressToken:n,sessionId:r,initialSequenceNum:o,getAuthToken:u}=e,f;u?f=()=>{let e=u();return e?{Authorization:`Bearer ${e}`}:{}}:s(n);let p=e.epoch??await c(t,n);i(`[bridge:repl] CCR v2: worker sessionId=${r} epoch=${p}${e.epoch===void 0?` (via registerWorker)`:` (from /bridge)`}`);let m=new URL(t);m.pathname=m.pathname.replace(/\/$/,``)+`/worker/events/stream`;let h=new d(m,{},r,void 0,o,f),g,_=new l(h,new URL(t),{getAuthHeaders:f,heartbeatIntervalMs:e.heartbeatIntervalMs,heartbeatJitterFraction:e.heartbeatJitterFraction,onEpochMismatch:()=>{i(`[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery`);try{_.close(),h.close(),g?.(4090)}catch(e){i(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${a(e)}`,{level:`error`})}throw Error(`epoch superseded`)}});h.setOnEvent(e=>{_.reportDelivery(e.event_id,`received`),_.reportDelivery(e.event_id,`processed`)});let v,y=!1,b=!1;return{write(e){return _.writeEvent(e)},async writeBatch(e){for(let t of e){if(b)break;await _.writeEvent(t)}},close(){b=!0,_.close(),h.close()},isConnectedStatus(){return y},getStateLabel(){return h.isClosedStatus()?`closed`:h.isConnectedStatus()?y?`connected`:`init`:`connecting`},setOnData(e){h.setOnData(e)},setOnClose(e){g=e,h.setOnClose(t=>{_.close(),e(t??4092)})},setOnConnect(e){v=e},getLastSequenceNum(){return h.getLastSequenceNum()},droppedBatchCount:0,reportState(e){_.reportState(e)},reportMetadata(e){_.reportMetadata(e)},reportDelivery(e,t){_.reportDelivery(e,t)},flush(){return _.flush()},connect(){e.outboundOnly||h.connect(),_.initialize(p).then(()=>{y=!0,i(`[bridge:repl] v2 transport ready for writes (epoch=${p}, sse=${h.isConnectedStatus()?`open`:`opening`})`),v?.()},e=>{i(`[bridge:repl] CCR v2 initialize failed: ${a(e)}`,{level:`error`}),_.close(),h.close(),g?.(4091)})}}}e();var m=class{constructor(){t(this,`_active`,!1),t(this,`_pending`,[])}get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...e){return this._active?(this._pending.push(...e),!0):!1}drop(){this._active=!1;let e=this._pending.length;return this._pending.length=0,e}deactivate(){this._active=!1}};export{f as n,p as r,m as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{a as t,i as n,l as r,r as i,t as a,v as o,y as s}from"./client-DchQnIJD.js";var c=e((()=>{s()})),l,u,d=e((()=>{c(),l=e=>(l=Array.isArray,l(e)),u=l}));function*f(e){if(!e)return;if(p in e){let{values:t,nulls:n}=e;yield*t.entries();for(let e of n)yield[e,null];return}let t=!1,n;e instanceof Headers?n=e.entries():u(e)?n=e:(t=!0,n=Object.entries(e??{}));for(let e of n){let n=e[0];if(typeof n!=`string`)throw TypeError(`expected header name to be a string`);let r=u(e[1])?e[1]:[e[1]],i=!1;for(let e of r)e!==void 0&&(t&&!i&&(i=!0,yield[n,null]),yield[n,e])}}var p,m,h=e((()=>{d(),p=Symbol.for(`brand.privateNullableHeaders`),m=e=>{let t=new Headers,n=new Set;for(let r of e){let e=new Set;for(let[i,a]of f(r)){let r=i.toLowerCase();e.has(r)||(t.delete(i),e.add(r)),a===null?(t.delete(i),n.add(r)):(t.append(i,a),n.delete(r))}}return{[p]:!0,values:t,nulls:n}}})),g=e((()=>{c()})),_,v=e((()=>{_=e=>{if(globalThis.process!==void 0)return globalThis.process.env?.[e]?.trim()||void 0;if(globalThis.Deno!==void 0)return globalThis.Deno.env?.get?.(e)?.trim()||void 0}})),y=e((()=>{d()})),b=e((()=>{})),x=e((()=>{})),S=e((()=>{d()})),C=e((()=>{S(),d()})),w=e((()=>{C()})),T=e((()=>{d(),g(),v(),y(),b(),x(),w()}));function E(e){let n=new t(e);return delete n.batches,n}function D(e){let t=new r(e);return delete t.messages.batches,t}var O,k=e((()=>{h(),c(),T(),i(),n(),O=class extends a{constructor({baseURL:e=_(`ANTHROPIC_FOUNDRY_BASE_URL`),apiKey:t=_(`ANTHROPIC_FOUNDRY_API_KEY`),resource:n=_(`ANTHROPIC_FOUNDRY_RESOURCE`),azureADTokenProvider:r,dangerouslyAllowBrowser:i,...a}={}){if(typeof r==`function`&&(i=!0),!r&&!t)throw new o("Missing credentials. Please pass one of `apiKey` and `azureTokenProvider`, or set the `ANTHROPIC_FOUNDRY_API_KEY` environment variable.");if(r&&t)throw new o("The `apiKey` and `azureADTokenProvider` arguments are mutually exclusive; only one can be passed at a time.");if(!e){if(!n)throw new o("Must provide one of the `baseURL` or `resource` arguments, or the `ANTHROPIC_FOUNDRY_RESOURCE` environment variable");e=`https://${n}.services.ai.azure.com/anthropic/`}else if(n)throw new o(`baseURL and resource are mutually exclusive`);super({apiKey:r??t,baseURL:e,...a,...i===void 0?{}:{dangerouslyAllowBrowser:i}}),this.resource=null,this.messages=E(this),this.beta=D(this),this.models=void 0}async authHeaders(){if(typeof this._options.apiKey==`function`){let e;try{e=await this._options.apiKey()}catch(e){throw e instanceof o?e:new o(`Failed to get token from azureADTokenProvider: ${e.message}`,{cause:e})}if(typeof e!=`string`||!e)throw new o(`Expected azureADTokenProvider function argument to return a string but it returned ${e}`);return m([{Authorization:`Bearer ${e}`}])}if(typeof this._options.apiKey==`string`)return m([{"x-api-key":this.apiKey}])}validateHeaders(){}}}));e((()=>{k(),k()}))();export{O as AnthropicFoundry};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";var r=e(t(),1),i=n(),a=(0,r.createContext)(void 0);function o({getFpsMetrics:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s(){return(0,r.useContext)(a)}export{s as n,o as t};