@claudiolabs/claudin 1.1.32 → 1.1.34

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 (836) hide show
  1. package/dist/chunks/App-1.1.34-5bkzspjw.mjs +1 -0
  2. package/dist/chunks/ApproveApiKey-1.1.34-v9m1h6yf.mjs +1 -0
  3. package/dist/chunks/AutoModeOptInDialog-1.1.34-s8q45b8r.mjs +1 -0
  4. package/dist/chunks/BypassPermissionsModeDialog-1.1.34-za20vma5.mjs +1 -0
  5. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.34-bfqcybrw.mjs +1 -0
  6. package/dist/chunks/ConsoleOAuthFlow-1.1.34-y3y8zaw0.mjs +1 -0
  7. package/dist/chunks/DiffDialog-1.1.34-2c48wrw2.mjs +6 -0
  8. package/dist/chunks/Doctor-1.1.34-5pfk2t4c.mjs +1 -0
  9. package/dist/chunks/ExplorerDialog-1.1.34-jhjx7d79.mjs +6 -0
  10. package/dist/chunks/ITermBackend-1.1.34-fdz2yay1.mjs +1 -0
  11. package/dist/chunks/InvalidConfigDialog-1.1.34-9kn20864.mjs +1 -0
  12. package/dist/chunks/InvalidSettingsDialog-1.1.34-rs0n3tbm.mjs +1 -0
  13. package/dist/chunks/MigrationDialog-1.1.34-mb74003t.mjs +1 -0
  14. package/dist/chunks/Onboarding-1.1.34-bfdfnz31.mjs +1 -0
  15. package/dist/chunks/ProviderManager-1.1.34-mxhsj5pz.mjs +1 -0
  16. package/dist/chunks/REPL-1.1.34-g9xtcxfm.mjs +1 -0
  17. package/dist/chunks/ResumeConversation-1.1.34-wjd1x7s6.mjs +1 -0
  18. package/dist/chunks/TeleportProgress-1.1.34-zpsemk3f.mjs +1 -0
  19. package/dist/chunks/TeleportRepoMismatchDialog-1.1.34-gse2x86w.mjs +1 -0
  20. package/dist/chunks/TeleportResumeWrapper-1.1.34-cp51s05w.mjs +1 -0
  21. package/dist/chunks/TmuxBackend-1.1.34-pcx5e2xc.mjs +9 -0
  22. package/dist/chunks/ToolSearchTool-1.1.34-s3tfzny5.mjs +1 -0
  23. package/dist/chunks/TrustDialog-1.1.34-g8hnps71.mjs +1 -0
  24. package/dist/chunks/activeProvider-1.1.34-a1bg24mk.mjs +1 -0
  25. package/dist/chunks/add-dir-1.1.34-fs7fa841.mjs +1 -0
  26. package/dist/chunks/agentTypes-1.1.34-ybf25dvm.mjs +1 -0
  27. package/dist/chunks/agents-1.1.34-6xhfrt25.mjs +3 -0
  28. package/dist/chunks/agents-1.1.34-wsjsbryq.mjs +110 -0
  29. package/dist/chunks/api-1.1.34-99hm00p0.mjs +1 -0
  30. package/dist/chunks/asciicast-1.1.34-qydk3ezz.mjs +1 -0
  31. package/dist/chunks/auth-1.1.34-32n80bwr.mjs +1 -0
  32. package/dist/chunks/auth-1.1.34-mhmakxvf.mjs +1 -0
  33. package/dist/chunks/autoMode-1.1.34-jyxbmbqd.mjs +52 -0
  34. package/dist/chunks/autoModeSetup-1.1.34-2b10v0j4.mjs +44 -0
  35. package/dist/chunks/autoUpdater-1.1.34-bd3mdsv9.mjs +1 -0
  36. package/dist/chunks/backgroundHousekeeping-1.1.34-v4c2njkh.mjs +1 -0
  37. package/dist/chunks/branch-1.1.34-949t9ara.mjs +4 -0
  38. package/dist/chunks/bridge-1.1.34-8jc0ek6w.mjs +2 -0
  39. package/dist/chunks/bridgeConfig-1.1.34-kgr2qvyz.mjs +1 -0
  40. package/dist/chunks/bridgeEnabled-1.1.34-ygna8r55.mjs +1 -0
  41. package/dist/chunks/bridgeMain-1.1.34-saff9rp6.mjs +88 -0
  42. package/dist/chunks/bridgePointer-1.1.34-5apzxa58.mjs +1 -0
  43. package/dist/chunks/btw-1.1.34-4246e84n.mjs +1 -0
  44. package/dist/chunks/buddy-1.1.34-kj9mygnh.mjs +3 -0
  45. package/dist/chunks/cache-probe-1.1.34-gyemr2df.mjs +21 -0
  46. package/dist/chunks/cacheStats-1.1.34-fqz6k1qv.mjs +4 -0
  47. package/dist/chunks/caches-1.1.34-ebn0bryh.mjs +1 -0
  48. package/dist/chunks/cd-1.1.34-6458ex95.mjs +3 -0
  49. package/dist/chunks/claudeDesktop-1.1.34-4jr3kmkg.mjs +1 -0
  50. package/dist/chunks/clear-1.1.34-da0gwb7n.mjs +1 -0
  51. package/dist/chunks/clearTerminal-1.1.34-410eb173.mjs +1 -0
  52. package/dist/chunks/cli-1.1.34-00hxx56p.mjs +2 -0
  53. package/dist/chunks/cli-1.1.34-0cmmxs6g.mjs +9 -0
  54. package/dist/chunks/cli-1.1.34-0f5qa0q0.mjs +2 -0
  55. package/dist/chunks/cli-1.1.34-0h4whfas.mjs +6 -0
  56. package/dist/chunks/cli-1.1.34-0kkae10p.mjs +2 -0
  57. package/dist/chunks/cli-1.1.34-0mjf3pve.mjs +2 -0
  58. package/dist/chunks/cli-1.1.34-0t1h2v5v.mjs +2 -0
  59. package/dist/chunks/cli-1.1.34-0zqthr52.mjs +2 -0
  60. package/dist/chunks/cli-1.1.34-1229x70a.mjs +2 -0
  61. package/dist/chunks/cli-1.1.34-1426jsf4.mjs +3 -0
  62. package/dist/chunks/cli-1.1.34-166q8s04.mjs +24 -0
  63. package/dist/chunks/cli-1.1.34-1a3s3rqs.mjs +3 -0
  64. package/dist/chunks/cli-1.1.34-1ategs07.mjs +2 -0
  65. package/dist/chunks/cli-1.1.34-1m5v3ffj.mjs +2 -0
  66. package/dist/chunks/cli-1.1.34-1nxczs7m.mjs +3 -0
  67. package/dist/chunks/cli-1.1.34-1xg52b7q.mjs +12 -0
  68. package/dist/chunks/cli-1.1.34-20femz8z.mjs +2 -0
  69. package/dist/chunks/cli-1.1.34-20p72tmb.mjs +20 -0
  70. package/dist/chunks/cli-1.1.34-21nzcpj6.mjs +5 -0
  71. package/dist/chunks/cli-1.1.34-24h4yeqf.mjs +2 -0
  72. package/dist/chunks/cli-1.1.34-2tf44a9a.mjs +2 -0
  73. package/dist/chunks/cli-1.1.34-33s2xs9e.mjs +2 -0
  74. package/dist/chunks/cli-1.1.34-372a0qyj.mjs +2 -0
  75. package/dist/chunks/cli-1.1.34-37g65vk7.mjs +2 -0
  76. package/dist/chunks/cli-1.1.34-37mgsk8w.mjs +2 -0
  77. package/dist/chunks/cli-1.1.34-3pr2wgys.mjs +2 -0
  78. package/dist/chunks/cli-1.1.34-3qpxmhy6.mjs +2 -0
  79. package/dist/chunks/cli-1.1.34-3rcacat5.mjs +3 -0
  80. package/dist/chunks/cli-1.1.34-4v8eanby.mjs +2 -0
  81. package/dist/chunks/cli-1.1.34-4x915j9t.mjs +2 -0
  82. package/dist/chunks/cli-1.1.34-4y5bvnfe.mjs +2 -0
  83. package/dist/chunks/cli-1.1.34-4zj4kbw4.mjs +2 -0
  84. package/dist/chunks/cli-1.1.34-58ergrxf.mjs +7 -0
  85. package/dist/chunks/cli-1.1.34-59csbz1a.mjs +60 -0
  86. package/dist/chunks/cli-1.1.34-5ec767fj.mjs +2 -0
  87. package/dist/chunks/cli-1.1.34-5ffnhvmt.mjs +3 -0
  88. package/dist/chunks/cli-1.1.34-5jdjfha3.mjs +2 -0
  89. package/dist/chunks/cli-1.1.34-5jnn83ne.mjs +2 -0
  90. package/dist/chunks/cli-1.1.34-5mg7y1hs.mjs +2 -0
  91. package/dist/chunks/cli-1.1.34-5qzy93s7.mjs +2 -0
  92. package/dist/chunks/cli-1.1.34-5t01yf6x.mjs +2 -0
  93. package/dist/chunks/cli-1.1.34-5vktvncs.mjs +2 -0
  94. package/dist/chunks/cli-1.1.34-5z4epq5b.mjs +4 -0
  95. package/dist/chunks/cli-1.1.34-643n510j.mjs +2 -0
  96. package/dist/chunks/cli-1.1.34-6jkjn6pd.mjs +2 -0
  97. package/dist/chunks/cli-1.1.34-6ndxsqp1.mjs +2 -0
  98. package/dist/chunks/cli-1.1.34-70pxm3rb.mjs +133 -0
  99. package/dist/chunks/cli-1.1.34-79mxk0bc.mjs +2 -0
  100. package/dist/chunks/cli-1.1.34-7ad0dt89.mjs +2 -0
  101. package/dist/chunks/cli-1.1.34-7bcbswdn.mjs +2 -0
  102. package/dist/chunks/cli-1.1.34-7bxexffs.mjs +6 -0
  103. package/dist/chunks/cli-1.1.34-7n5bvchq.mjs +2 -0
  104. package/dist/chunks/cli-1.1.34-7npd3as5.mjs +18 -0
  105. package/dist/chunks/cli-1.1.34-7rd2xv38.mjs +3 -0
  106. package/dist/chunks/cli-1.1.34-80nhtgdq.mjs +2 -0
  107. package/dist/chunks/cli-1.1.34-83s0mm9a.mjs +2 -0
  108. package/dist/chunks/cli-1.1.34-84707tma.mjs +5491 -0
  109. package/dist/chunks/cli-1.1.34-859ap6f7.mjs +2 -0
  110. package/dist/chunks/cli-1.1.34-8r5c91mz.mjs +2 -0
  111. package/dist/chunks/cli-1.1.34-8s2k8jnr.mjs +39 -0
  112. package/dist/chunks/cli-1.1.34-8vfey6b5.mjs +2 -0
  113. package/dist/chunks/cli-1.1.34-92kps6jn.mjs +63 -0
  114. package/dist/chunks/cli-1.1.34-9jn997h8.mjs +2 -0
  115. package/dist/chunks/cli-1.1.34-9tctqya9.mjs +6 -0
  116. package/dist/chunks/cli-1.1.34-9tze8t1x.mjs +2 -0
  117. package/dist/chunks/cli-1.1.34-9z887t80.mjs +2 -0
  118. package/dist/chunks/cli-1.1.34-a6gj1b3g.mjs +2 -0
  119. package/dist/chunks/cli-1.1.34-a7et4z4n.mjs +2 -0
  120. package/dist/chunks/cli-1.1.34-ajqsr81p.mjs +2 -0
  121. package/dist/chunks/cli-1.1.34-ak4sm3t1.mjs +2 -0
  122. package/dist/chunks/cli-1.1.34-axnnzxpw.mjs +2 -0
  123. package/dist/chunks/cli-1.1.34-b9j8be5k.mjs +2 -0
  124. package/dist/chunks/cli-1.1.34-bt9brnrs.mjs +2 -0
  125. package/dist/chunks/cli-1.1.34-c3w48hst.mjs +2 -0
  126. package/dist/chunks/cli-1.1.34-cp457g25.mjs +11 -0
  127. package/dist/chunks/cli-1.1.34-cptp243m.mjs +2 -0
  128. package/dist/chunks/cli-1.1.34-cqxr7fsq.mjs +2 -0
  129. package/dist/chunks/cli-1.1.34-ctjatnq8.mjs +2 -0
  130. package/dist/chunks/cli-1.1.34-czhcyzgw.mjs +2 -0
  131. package/dist/chunks/cli-1.1.34-d0sgyvr1.mjs +4 -0
  132. package/dist/chunks/cli-1.1.34-d5enzbca.mjs +2 -0
  133. package/dist/chunks/cli-1.1.34-d8bccy48.mjs +7 -0
  134. package/dist/chunks/cli-1.1.34-dceap5rk.mjs +4 -0
  135. package/dist/chunks/cli-1.1.34-dj3hwt6m.mjs +3 -0
  136. package/dist/chunks/cli-1.1.34-dvx08sv2.mjs +2 -0
  137. package/dist/chunks/cli-1.1.34-e1vkhvbm.mjs +2 -0
  138. package/dist/chunks/cli-1.1.34-e4f2qw6n.mjs +2 -0
  139. package/dist/chunks/cli-1.1.34-e7fd8zh6.mjs +2 -0
  140. package/dist/chunks/cli-1.1.34-e9rxgan0.mjs +2 -0
  141. package/dist/chunks/cli-1.1.34-ehad4d4f.mjs +2 -0
  142. package/dist/chunks/cli-1.1.34-ev8ffgr9.mjs +2 -0
  143. package/dist/chunks/cli-1.1.34-ew7p2ct8.mjs +2 -0
  144. package/dist/chunks/cli-1.1.34-exsrnr6k.mjs +2 -0
  145. package/dist/chunks/cli-1.1.34-f806gv2e.mjs +7 -0
  146. package/dist/chunks/cli-1.1.34-faavcjnj.mjs +2 -0
  147. package/dist/chunks/cli-1.1.34-fd3cb4wv.mjs +2 -0
  148. package/dist/chunks/cli-1.1.34-ff6hyf5n.mjs +2 -0
  149. package/dist/chunks/cli-1.1.34-ffs3510y.mjs +2 -0
  150. package/dist/chunks/cli-1.1.34-fgbv1rw4.mjs +17 -0
  151. package/dist/chunks/cli-1.1.34-fgx6ej2m.mjs +34 -0
  152. package/dist/chunks/cli-1.1.34-fm4a40ta.mjs +2 -0
  153. package/dist/chunks/cli-1.1.34-fnds3msv.mjs +6 -0
  154. package/dist/chunks/cli-1.1.34-ftd1h34q.mjs +2 -0
  155. package/dist/chunks/cli-1.1.34-g0sqgp9m.mjs +2 -0
  156. package/dist/chunks/cli-1.1.34-g6kkzzxg.mjs +2 -0
  157. package/dist/chunks/cli-1.1.34-g7q1qz3e.mjs +2 -0
  158. package/dist/chunks/cli-1.1.34-g888fgsj.mjs +4 -0
  159. package/dist/chunks/cli-1.1.34-ge8xp99z.mjs +2 -0
  160. package/dist/chunks/cli-1.1.34-gmaedxb1.mjs +26 -0
  161. package/dist/chunks/cli-1.1.34-gsrndv90.mjs +2 -0
  162. package/dist/chunks/cli-1.1.34-h3ysfavt.mjs +4 -0
  163. package/dist/chunks/cli-1.1.34-h7927ctg.mjs +2 -0
  164. package/dist/chunks/cli-1.1.34-h7bcvee5.mjs +2 -0
  165. package/dist/chunks/cli-1.1.34-h9h6119y.mjs +2 -0
  166. package/dist/chunks/cli-1.1.34-hdva7ptv.mjs +10 -0
  167. package/dist/chunks/cli-1.1.34-he92bjvt.mjs +2 -0
  168. package/dist/chunks/cli-1.1.34-hpn89fzn.mjs +2 -0
  169. package/dist/chunks/cli-1.1.34-hpt8kch4.mjs +2 -0
  170. package/dist/chunks/cli-1.1.34-hrw37per.mjs +8 -0
  171. package/dist/chunks/cli-1.1.34-hsngtgbm.mjs +24 -0
  172. package/dist/chunks/cli-1.1.34-hyya784q.mjs +2 -0
  173. package/dist/chunks/cli-1.1.34-j8ab267c.mjs +2 -0
  174. package/dist/chunks/cli-1.1.34-jkdgk3ns.mjs +2 -0
  175. package/dist/chunks/cli-1.1.34-jrxh48kf.mjs +4 -0
  176. package/dist/chunks/cli-1.1.34-jsp1hy0k.mjs +2 -0
  177. package/dist/chunks/cli-1.1.34-k4zd38bd.mjs +15 -0
  178. package/dist/chunks/cli-1.1.34-k761g5m2.mjs +2 -0
  179. package/dist/chunks/cli-1.1.34-k8gmdsqr.mjs +2 -0
  180. package/dist/chunks/cli-1.1.34-mbeaqq0q.mjs +6 -0
  181. package/dist/chunks/cli-1.1.34-mhjjf878.mjs +5 -0
  182. package/dist/chunks/cli-1.1.34-n5t6xk0e.mjs +2 -0
  183. package/dist/chunks/cli-1.1.34-n5zh4wyg.mjs +42 -0
  184. package/dist/chunks/cli-1.1.34-ncz9dava.mjs +2 -0
  185. package/dist/chunks/cli-1.1.34-nr50vg8g.mjs +25 -0
  186. package/dist/chunks/cli-1.1.34-nxeb9r8s.mjs +2 -0
  187. package/dist/chunks/cli-1.1.34-p5v4dwpg.mjs +4 -0
  188. package/dist/chunks/cli-1.1.34-p7yjh2wb.mjs +2 -0
  189. package/dist/chunks/cli-1.1.34-p9rd6dtm.mjs +2 -0
  190. package/dist/chunks/cli-1.1.34-q5stzg7k.mjs +2 -0
  191. package/dist/chunks/cli-1.1.34-q83yydqv.mjs +133 -0
  192. package/dist/chunks/cli-1.1.34-q8chhxkt.mjs +2 -0
  193. package/dist/chunks/cli-1.1.34-qc15bhsg.mjs +10 -0
  194. package/dist/chunks/cli-1.1.34-qef4zhc3.mjs +2 -0
  195. package/dist/chunks/cli-1.1.34-qs805z7n.mjs +9 -0
  196. package/dist/chunks/cli-1.1.34-qwd6k5t4.mjs +2 -0
  197. package/dist/chunks/cli-1.1.34-r222exkd.mjs +2 -0
  198. package/dist/chunks/cli-1.1.34-r3kdjy4e.mjs +2 -0
  199. package/dist/chunks/cli-1.1.34-r5dphbcm.mjs +2 -0
  200. package/dist/chunks/cli-1.1.34-rb7wdjza.mjs +45 -0
  201. package/dist/chunks/cli-1.1.34-rkx3x9f6.mjs +4 -0
  202. package/dist/chunks/cli-1.1.34-rqkzp4n2.mjs +2 -0
  203. package/dist/chunks/cli-1.1.34-rs4xg86x.mjs +2 -0
  204. package/dist/chunks/cli-1.1.34-s4gsmtx9.mjs +21 -0
  205. package/dist/chunks/cli-1.1.34-s8c2c7g3.mjs +3 -0
  206. package/dist/chunks/cli-1.1.34-s9g6mekb.mjs +2 -0
  207. package/dist/chunks/cli-1.1.34-sfxba1xz.mjs +3 -0
  208. package/dist/chunks/cli-1.1.34-shm51n5s.mjs +2 -0
  209. package/dist/chunks/cli-1.1.34-sj1pcnn3.mjs +2 -0
  210. package/dist/chunks/cli-1.1.34-sq51za8b.mjs +2 -0
  211. package/dist/chunks/cli-1.1.34-sxpgdyxm.mjs +2 -0
  212. package/dist/chunks/cli-1.1.34-syx85e6f.mjs +15 -0
  213. package/dist/chunks/cli-1.1.34-t4rp44p7.mjs +2 -0
  214. package/dist/chunks/cli-1.1.34-tj5mvsam.mjs +2 -0
  215. package/dist/chunks/cli-1.1.34-tmwcg7q1.mjs +2 -0
  216. package/dist/chunks/cli-1.1.34-ty06ehzt.mjs +3 -0
  217. package/dist/chunks/cli-1.1.34-v2gbtt59.mjs +50 -0
  218. package/dist/chunks/cli-1.1.34-vdk5kjz7.mjs +15 -0
  219. package/dist/chunks/cli-1.1.34-vdwfqapw.mjs +2 -0
  220. package/dist/chunks/cli-1.1.34-vmnqkma9.mjs +2 -0
  221. package/dist/chunks/cli-1.1.34-vpwwhg8z.mjs +2 -0
  222. package/dist/chunks/cli-1.1.34-vrsb0pea.mjs +2 -0
  223. package/dist/chunks/cli-1.1.34-vz14r55x.mjs +3 -0
  224. package/dist/chunks/cli-1.1.34-w7vjt3vm.mjs +2 -0
  225. package/dist/chunks/cli-1.1.34-w9ek3z9c.mjs +2 -0
  226. package/dist/chunks/cli-1.1.34-webjc1s3.mjs +2 -0
  227. package/dist/chunks/cli-1.1.34-wfb66gsv.mjs +2 -0
  228. package/dist/chunks/cli-1.1.34-wh74w227.mjs +2 -0
  229. package/dist/chunks/cli-1.1.34-whbj9gb8.mjs +24 -0
  230. package/dist/chunks/cli-1.1.34-wqkce8kj.mjs +2 -0
  231. package/dist/chunks/cli-1.1.34-wwjkncsv.mjs +203 -0
  232. package/dist/chunks/cli-1.1.34-wwvcrp2d.mjs +2 -0
  233. package/dist/chunks/cli-1.1.34-xptd4xtb.mjs +2 -0
  234. package/dist/chunks/cli-1.1.34-xwg0x7p4.mjs +5 -0
  235. package/dist/chunks/cli-1.1.34-xx555z7d.mjs +25 -0
  236. package/dist/chunks/cli-1.1.34-yfasvar9.mjs +2 -0
  237. package/dist/chunks/cli-1.1.34-yk56k2na.mjs +2 -0
  238. package/dist/chunks/cli-1.1.34-yqryw36t.mjs +2 -0
  239. package/dist/chunks/cli-1.1.34-yqyrt954.mjs +2 -0
  240. package/dist/chunks/cli-1.1.34-yrk4mxjw.mjs +16 -0
  241. package/dist/chunks/cli-1.1.34-z14xw89f.mjs +2 -0
  242. package/dist/chunks/cli-1.1.34-z1htezxg.mjs +2 -0
  243. package/dist/chunks/cli-1.1.34-z1tmh10g.mjs +2 -0
  244. package/dist/chunks/cli-1.1.34-z84fkt5q.mjs +2 -0
  245. package/dist/chunks/cli-1.1.34-zpsaqq15.mjs +17 -0
  246. package/dist/chunks/client-1.1.34-4exntck8.mjs +1 -0
  247. package/dist/chunks/color-1.1.34-d4199wch.mjs +1 -0
  248. package/dist/chunks/compact-1.1.34-jwr60dt0.mjs +2 -0
  249. package/dist/chunks/config-1.1.34-acewhfv4.mjs +1 -0
  250. package/dist/chunks/config-1.1.34-tqzmnvs7.mjs +1 -0
  251. package/dist/chunks/constants-1.1.34-s2nkrx7g.mjs +1 -0
  252. package/dist/chunks/context-1.1.34-wc822wp5.mjs +1 -0
  253. package/dist/chunks/context-noninteractive-1.1.34-59xb33ys.mjs +1 -0
  254. package/dist/chunks/conversation-1.1.34-5k03q5nt.mjs +1 -0
  255. package/dist/chunks/copilotHeaders-1.1.34-dkmsvh40.mjs +1 -0
  256. package/dist/chunks/copy-1.1.34-efb24nm3.mjs +9 -0
  257. package/dist/chunks/cost-1.1.34-nqqv2xjh.mjs +1 -0
  258. package/dist/chunks/createSession-1.1.34-69d3ep6s.mjs +1 -0
  259. package/dist/chunks/debug-1.1.34-k568mcye.mjs +1 -0
  260. package/dist/chunks/defaultActionDeps-1.1.34-16tn959k.mjs +1480 -0
  261. package/dist/chunks/desktop-1.1.34-p9x626qf.mjs +2 -0
  262. package/dist/chunks/detectRepository-1.1.34-rqyapz8m.mjs +1 -0
  263. package/dist/chunks/detection-1.1.34-5xfznq79.mjs +1 -0
  264. package/dist/chunks/diff-1.1.34-5ggzgzf5.mjs +1 -0
  265. package/dist/chunks/doctor-1.1.34-j6mbdd5g.mjs +1 -0
  266. package/dist/chunks/doctorDiagnostic-1.1.34-spmjpktf.mjs +1 -0
  267. package/dist/chunks/earlyInput-1.1.34-a0ptf6h4.mjs +1 -0
  268. package/dist/chunks/effort-1.1.34-9k8mc8ca.mjs +13 -0
  269. package/dist/chunks/engine-1.1.34-y28mg4na.mjs +1 -0
  270. package/dist/chunks/envLessBridgeConfig-1.1.34-wm7tybv6.mjs +1 -0
  271. package/dist/chunks/envUtils-1.1.34-rmsh5nt5.mjs +1 -0
  272. package/dist/chunks/errors-1.1.34-61fzsrh4.mjs +1 -0
  273. package/dist/chunks/exampleCommands-1.1.34-8x8b7p9t.mjs +1 -0
  274. package/dist/chunks/execFileNoThrow-1.1.34-zemxr8xw.mjs +1 -0
  275. package/dist/chunks/exit-1.1.34-sw6zmmgn.mjs +1 -0
  276. package/dist/chunks/explorer-1.1.34-3apnqz0a.mjs +1 -0
  277. package/dist/chunks/export-1.1.34-1hyv5efm.mjs +2 -0
  278. package/dist/chunks/fast-1.1.34-3d72mbz1.mjs +1 -0
  279. package/dist/chunks/feedback-1.1.34-k74bh5v8.mjs +16 -0
  280. package/dist/chunks/git-1.1.34-p3qv0ed3.mjs +1 -0
  281. package/dist/chunks/githubModelsCredentials-1.1.34-hmjt89m3.mjs +1 -0
  282. package/dist/chunks/goal-1.1.34-m6dge19b.mjs +4 -0
  283. package/dist/chunks/headless-1.1.34-hpaadbg6.mjs +2 -0
  284. package/dist/chunks/heapdump-1.1.34-zc52x1pc.mjs +6 -0
  285. package/dist/chunks/help-1.1.34-0sgw7jbh.mjs +1 -0
  286. package/dist/chunks/hooks-1.1.34-8s6pawxx.mjs +1 -0
  287. package/dist/chunks/hooks-1.1.34-vnm6rywf.mjs +79 -0
  288. package/dist/chunks/ide-1.1.34-jbcf8ma9.mjs +3 -0
  289. package/dist/chunks/image-processor-napi-1.1.34-zrk7wvw2.mjs +1 -0
  290. package/dist/chunks/import-1.1.34-4j35p307.mjs +261 -0
  291. package/dist/chunks/inboundAttachments-1.1.34-pk5t3y0v.mjs +1 -0
  292. package/dist/chunks/index-1.1.34-086aty1n.mjs +1 -0
  293. package/dist/chunks/index-1.1.34-0q46c1bj.mjs +1 -0
  294. package/dist/chunks/index-1.1.34-2j48ar1m.mjs +1 -0
  295. package/dist/chunks/index-1.1.34-427npr7a.mjs +1 -0
  296. package/dist/chunks/index-1.1.34-50d0rg8h.mjs +5 -0
  297. package/dist/chunks/index-1.1.34-50j6q6gr.mjs +1 -0
  298. package/dist/chunks/index-1.1.34-ehvgt047.mjs +1 -0
  299. package/dist/chunks/index-1.1.34-faq1af2v.mjs +1 -0
  300. package/dist/chunks/index-1.1.34-fvrswew9.mjs +2 -0
  301. package/dist/chunks/index-1.1.34-mx39dxjj.mjs +30 -0
  302. package/dist/chunks/index-1.1.34-mxpb8hvr.mjs +9 -0
  303. package/dist/chunks/index-1.1.34-nye63dch.mjs +1 -0
  304. package/dist/chunks/index-1.1.34-qmmg0npy.mjs +2 -0
  305. package/dist/chunks/index-1.1.34-qxa3e3cv.mjs +1 -0
  306. package/dist/chunks/index-1.1.34-snehdv50.mjs +1 -0
  307. package/dist/chunks/index-1.1.34-t7jsxdbk.mjs +1 -0
  308. package/dist/chunks/index-1.1.34-wgm8z1dz.mjs +1 -0
  309. package/dist/chunks/index-1.1.34-wz64a3d4.mjs +9 -0
  310. package/dist/chunks/index-1.1.34-x83gwj6g.mjs +23 -0
  311. package/dist/chunks/index-1.1.34-xa114b8t.mjs +1 -0
  312. package/dist/chunks/index-1.1.34-y10pcdv1.mjs +1 -0
  313. package/dist/chunks/index-1.1.34-yqzmcm9y.mjs +1 -0
  314. package/dist/chunks/index-1.1.34-yxzywg42.mjs +1 -0
  315. package/dist/chunks/init-1.1.34-jdhgqsrc.mjs +2 -0
  316. package/dist/chunks/initReplBridge-1.1.34-b0awafmd.mjs +1 -0
  317. package/dist/chunks/ink-1.1.34-yb3z87en.mjs +1 -0
  318. package/dist/chunks/insights-1.1.34-a321wxgf.mjs +870 -0
  319. package/dist/chunks/install-1.1.34-064wyxwb.mjs +1 -0
  320. package/dist/chunks/install-github-app-1.1.34-smwffy57.mjs +149 -0
  321. package/dist/chunks/install-slack-app-1.1.34-a5bwj8gk.mjs +1 -0
  322. package/dist/chunks/interactiveHelpers-1.1.34-pq1b6btm.mjs +1 -0
  323. package/dist/chunks/keybindings-1.1.34-rq312f3j.mjs +2 -0
  324. package/dist/chunks/latestVersionCache-1.1.34-x006sta9.mjs +1 -0
  325. package/dist/chunks/loadAgentsDir-1.1.34-2w0hm9wz.mjs +1 -0
  326. package/dist/chunks/loadPluginHooks-1.1.34-t9s8mknk.mjs +1 -0
  327. package/dist/chunks/log-1.1.34-n41t6etn.mjs +1 -0
  328. package/dist/chunks/main-1.1.34-gh9n8dgw.mjs +1 -0
  329. package/dist/chunks/managedEnv-1.1.34-qntg5ykr.mjs +1 -0
  330. package/dist/chunks/mcp-1.1.34-5mtgev8d.mjs +17 -0
  331. package/dist/chunks/mcp-1.1.34-61dcjzjk.mjs +4 -0
  332. package/dist/chunks/mcp-1.1.34-9d1py1ez.mjs +1 -0
  333. package/dist/chunks/mcpb-1.1.34-x9mxeryp.mjs +1 -0
  334. package/dist/chunks/memory-1.1.34-sys90hns.mjs +128 -0
  335. package/dist/chunks/model-1.1.34-v1r14fy7.mjs +1 -0
  336. package/dist/chunks/model-1.1.34-vks7w05g.mjs +2 -0
  337. package/dist/chunks/node-1.1.34-5b5b2m9b.mjs +1 -0
  338. package/dist/chunks/node-1.1.34-sdqnj3qm.mjs +15 -0
  339. package/dist/chunks/oauth-1.1.34-bbmwrswg.mjs +1 -0
  340. package/dist/chunks/openaiShim-1.1.34-kj2a4r19.mjs +14 -0
  341. package/dist/chunks/output-style-1.1.34-a4dykckn.mjs +1 -0
  342. package/dist/chunks/package-F6O7J2XI-1.1.34-291qk0fk.mjs +1 -0
  343. package/dist/chunks/permissions-1.1.34-bqhsed60.mjs +1 -0
  344. package/dist/chunks/permissions-1.1.34-xkrhteme.mjs +3 -0
  345. package/dist/chunks/plan-1.1.34-j7qcpv9s.mjs +1 -0
  346. package/dist/chunks/plist-1.1.34-ykta36sg.mjs +1 -0
  347. package/dist/chunks/plugin-1.1.34-vszmzh0r.mjs +29 -0
  348. package/dist/chunks/pluginStartupCheck-1.1.34-5xap799m.mjs +1 -0
  349. package/dist/chunks/plugins-1.1.34-6ea553qa.mjs +9 -0
  350. package/dist/chunks/preActionHook-1.1.34-xy1pecch.mjs +2 -0
  351. package/dist/chunks/print-1.1.34-2gdkw86g.mjs +57 -0
  352. package/dist/chunks/process-1.1.34-fms89mxv.mjs +1 -0
  353. package/dist/chunks/processBashCommand-1.1.34-gcydk2hd.mjs +1 -0
  354. package/dist/chunks/processSlashCommand-1.1.34-a3q257ff.mjs +9 -0
  355. package/dist/chunks/prompt-1.1.34-ctfxsw9h.mjs +1 -0
  356. package/dist/chunks/prompt-1.1.34-wp8mvh7t.mjs +1 -0
  357. package/dist/chunks/prompts-1.1.34-bmq3swzy.mjs +1 -0
  358. package/dist/chunks/provider-1.1.34-00xnjkhs.mjs +2 -0
  359. package/dist/chunks/providerProfiles-1.1.34-psred1pr.mjs +1 -0
  360. package/dist/chunks/providerValidation-1.1.34-0vamj708.mjs +6 -0
  361. package/dist/chunks/registerSubcommands-1.1.34-pmqr2nmf.mjs +26 -0
  362. package/dist/chunks/registry-1.1.34-sapmjhjz.mjs +1 -0
  363. package/dist/chunks/release-notes-1.1.34-p6wg8evp.mjs +5 -0
  364. package/dist/chunks/reload-plugins-1.1.34-cd8e00jp.mjs +2 -0
  365. package/dist/chunks/remote-env-1.1.34-fpepp6cm.mjs +1 -0
  366. package/dist/chunks/remoteBridgeCore-1.1.34-mmxz0ypj.mjs +1 -0
  367. package/dist/chunks/rename-1.1.34-gwdavcb8.mjs +1 -0
  368. package/dist/chunks/replLauncher-1.1.34-5yvyazea.mjs +1 -0
  369. package/dist/chunks/resume-1.1.34-9abwrf3b.mjs +2 -0
  370. package/dist/chunks/rewind-1.1.34-qf51de9x.mjs +1 -0
  371. package/dist/chunks/rootOptions-1.1.34-dkd3s4x5.mjs +1 -0
  372. package/dist/chunks/runWorkflowHeadless-1.1.34-c0j2ym4w.mjs +10 -0
  373. package/dist/chunks/sandbox-adapter-1.1.34-ad556paa.mjs +1 -0
  374. package/dist/chunks/sandbox-toggle-1.1.34-1x2ddxv2.mjs +1 -0
  375. package/dist/chunks/session-1.1.34-h46ywygv.mjs +2 -0
  376. package/dist/chunks/sessionStorage-1.1.34-tc7rwcvm.mjs +1 -0
  377. package/dist/chunks/settings-1.1.34-bk3tb34s.mjs +1 -0
  378. package/dist/chunks/setup-1.1.34-3ddxnk01.mjs +12 -0
  379. package/dist/chunks/sinks-1.1.34-ww0tcz6j.mjs +1 -0
  380. package/dist/chunks/skills-1.1.34-3ybbxgjn.mjs +1 -0
  381. package/dist/chunks/startupProfiler-1.1.34-7z13z7v7.mjs +1 -0
  382. package/dist/chunks/startupUpdateCheck-1.1.34-45fyr9wz.mjs +1 -0
  383. package/dist/chunks/state-1.1.34-pymefs1m.mjs +1 -0
  384. package/dist/chunks/stats-1.1.34-4jw41qjm.mjs +1 -0
  385. package/dist/chunks/status-1.1.34-r120pa8k.mjs +1 -0
  386. package/dist/chunks/stickers-1.1.34-5zsfjhdn.mjs +1 -0
  387. package/dist/chunks/subprocessEnv-1.1.34-44r7jf62.mjs +1 -0
  388. package/dist/chunks/tasks-1.1.34-1mhjk4hs.mjs +1 -0
  389. package/dist/chunks/teamHelpers-1.1.34-jfmrh1r7.mjs +1 -0
  390. package/dist/chunks/teammateModeSnapshot-1.1.34-m47hpvj2.mjs +1 -0
  391. package/dist/chunks/teleport-1.1.34-g7gk9g3q.mjs +1 -0
  392. package/dist/chunks/terminalSetup-1.1.34-8e12gzad.mjs +1 -0
  393. package/dist/chunks/theme-1.1.34-bvmx3zyc.mjs +1 -0
  394. package/dist/chunks/thinkback-1.1.34-bz9h3qn7.mjs +1 -0
  395. package/dist/chunks/thinkback-play-1.1.34-azysb61e.mjs +1 -0
  396. package/dist/chunks/toolPool-1.1.34-tewk9s1e.mjs +1 -0
  397. package/dist/chunks/toolSearch-1.1.34-70r6c6d3.mjs +1 -0
  398. package/dist/chunks/tools-1.1.34-a7jpjvb5.mjs +1 -0
  399. package/dist/chunks/trustedDevice-1.1.34-jhn5330j.mjs +1 -0
  400. package/dist/chunks/turndown.cjs-1.1.34-8ve160tv.mjs +69 -0
  401. package/dist/chunks/types-1.1.34-0as4p0wf.mjs +1 -0
  402. package/dist/chunks/ultrareviewCommand-1.1.34-b7bpj27y.mjs +4 -0
  403. package/dist/chunks/update-1.1.34-wnetpcv6.mjs +72 -0
  404. package/dist/chunks/upload-1.1.34-3cdkjhmm.mjs +7 -0
  405. package/dist/chunks/upstreamproxy-1.1.34-x376823n.mjs +14 -0
  406. package/dist/chunks/usage-1.1.34-h5bv8trt.mjs +1 -0
  407. package/dist/chunks/util-1.1.34-7ctz504f.mjs +1 -0
  408. package/dist/chunks/utils-1.1.34-h9r9ybtj.mjs +1 -0
  409. package/dist/chunks/vim-1.1.34-4y4504z8.mjs +1 -0
  410. package/dist/chunks/watchLoop-1.1.34-tnjnpc05.mjs +13 -0
  411. package/dist/chunks/wiki-1.1.34-53n04tv3.mjs +132 -0
  412. package/dist/chunks/workflows-1.1.34-zefy425g.mjs +1 -0
  413. package/dist/chunks/worktree-1.1.34-gzm7041w.mjs +1 -0
  414. package/dist/chunks/worktreeModeEnabled-1.1.34-x9qxm01a.mjs +1 -0
  415. package/dist/chunks/wrapper-1.1.34-jmcmxyrm.mjs +7 -0
  416. package/dist/cli.mjs +2 -2
  417. package/package.json +9 -9
  418. package/dist/chunks/App-1.1.32-x0g3m6v6.mjs +0 -1
  419. package/dist/chunks/ApproveApiKey-1.1.32-8x1yxm2f.mjs +0 -1
  420. package/dist/chunks/AutoModeOptInDialog-1.1.32-scm9btv0.mjs +0 -1
  421. package/dist/chunks/BypassPermissionsModeDialog-1.1.32-wtcy84rn.mjs +0 -1
  422. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.32-y88y88zt.mjs +0 -1
  423. package/dist/chunks/ConsoleOAuthFlow-1.1.32-kzv0tbna.mjs +0 -1
  424. package/dist/chunks/DiffDialog-1.1.32-4cm0cwer.mjs +0 -6
  425. package/dist/chunks/Doctor-1.1.32-289yb4jj.mjs +0 -1
  426. package/dist/chunks/ExplorerDialog-1.1.32-5gjqvpvs.mjs +0 -6
  427. package/dist/chunks/ITermBackend-1.1.32-a8pwddd1.mjs +0 -1
  428. package/dist/chunks/InvalidConfigDialog-1.1.32-6qdrtdpr.mjs +0 -1
  429. package/dist/chunks/InvalidSettingsDialog-1.1.32-hwzxtdsd.mjs +0 -1
  430. package/dist/chunks/MigrationDialog-1.1.32-yytrpays.mjs +0 -1
  431. package/dist/chunks/Onboarding-1.1.32-c5yyxz32.mjs +0 -1
  432. package/dist/chunks/ProviderManager-1.1.32-7q71086g.mjs +0 -1
  433. package/dist/chunks/REPL-1.1.32-yzppvfrk.mjs +0 -1
  434. package/dist/chunks/ResumeConversation-1.1.32-rv15raev.mjs +0 -1
  435. package/dist/chunks/TeleportProgress-1.1.32-n3bsegx5.mjs +0 -1
  436. package/dist/chunks/TeleportRepoMismatchDialog-1.1.32-68xgndte.mjs +0 -1
  437. package/dist/chunks/TeleportResumeWrapper-1.1.32-zb4vkx03.mjs +0 -1
  438. package/dist/chunks/TmuxBackend-1.1.32-q3c5nqks.mjs +0 -9
  439. package/dist/chunks/ToolSearchTool-1.1.32-3whrqawk.mjs +0 -1
  440. package/dist/chunks/TrustDialog-1.1.32-33mkg42t.mjs +0 -1
  441. package/dist/chunks/activeProvider-1.1.32-9brew90d.mjs +0 -1
  442. package/dist/chunks/add-dir-1.1.32-8hkh1hcx.mjs +0 -1
  443. package/dist/chunks/agentTypes-1.1.32-ph49ernt.mjs +0 -1
  444. package/dist/chunks/agents-1.1.32-6ajrxrdr.mjs +0 -110
  445. package/dist/chunks/agents-1.1.32-6gc09pk2.mjs +0 -3
  446. package/dist/chunks/api-1.1.32-8qx9q5eh.mjs +0 -1
  447. package/dist/chunks/asciicast-1.1.32-4knajfec.mjs +0 -1
  448. package/dist/chunks/auth-1.1.32-9xrd6x89.mjs +0 -1
  449. package/dist/chunks/auth-1.1.32-s83fshpf.mjs +0 -1
  450. package/dist/chunks/autoMode-1.1.32-e680w683.mjs +0 -52
  451. package/dist/chunks/autoModeSetup-1.1.32-7m1d4dy7.mjs +0 -44
  452. package/dist/chunks/autoUpdater-1.1.32-hhg3dezv.mjs +0 -1
  453. package/dist/chunks/backgroundHousekeeping-1.1.32-8ddhae4q.mjs +0 -1
  454. package/dist/chunks/branch-1.1.32-xaq3pb3p.mjs +0 -4
  455. package/dist/chunks/bridge-1.1.32-ec6fc8kh.mjs +0 -2
  456. package/dist/chunks/bridgeConfig-1.1.32-bse7ynz2.mjs +0 -1
  457. package/dist/chunks/bridgeEnabled-1.1.32-84ntyqxd.mjs +0 -1
  458. package/dist/chunks/bridgeMain-1.1.32-d20ebbde.mjs +0 -88
  459. package/dist/chunks/bridgePointer-1.1.32-40jwkts4.mjs +0 -1
  460. package/dist/chunks/btw-1.1.32-kg0w3tw2.mjs +0 -1
  461. package/dist/chunks/buddy-1.1.32-c53wp8x4.mjs +0 -3
  462. package/dist/chunks/cache-probe-1.1.32-a9jc0rn9.mjs +0 -21
  463. package/dist/chunks/cacheStats-1.1.32-bh9jpngp.mjs +0 -4
  464. package/dist/chunks/caches-1.1.32-va3h1efn.mjs +0 -1
  465. package/dist/chunks/cd-1.1.32-yar6t6sg.mjs +0 -3
  466. package/dist/chunks/claudeDesktop-1.1.32-xjcschxc.mjs +0 -1
  467. package/dist/chunks/claudemd-1.1.32-kb9tec8y.mjs +0 -1
  468. package/dist/chunks/clear-1.1.32-ywfd1kha.mjs +0 -1
  469. package/dist/chunks/clearTerminal-1.1.32-x7tbxm3w.mjs +0 -1
  470. package/dist/chunks/cli-1.1.32-06xv4rmw.mjs +0 -2
  471. package/dist/chunks/cli-1.1.32-0pmhmsew.mjs +0 -42
  472. package/dist/chunks/cli-1.1.32-1913x5jp.mjs +0 -15
  473. package/dist/chunks/cli-1.1.32-1c9z2mtv.mjs +0 -2
  474. package/dist/chunks/cli-1.1.32-1cp8vbtp.mjs +0 -9
  475. package/dist/chunks/cli-1.1.32-1rackf2c.mjs +0 -4
  476. package/dist/chunks/cli-1.1.32-1rprka6j.mjs +0 -2
  477. package/dist/chunks/cli-1.1.32-1t75hwdn.mjs +0 -2
  478. package/dist/chunks/cli-1.1.32-1yrmnphh.mjs +0 -2
  479. package/dist/chunks/cli-1.1.32-260jjrwt.mjs +0 -6
  480. package/dist/chunks/cli-1.1.32-26474ywa.mjs +0 -2
  481. package/dist/chunks/cli-1.1.32-28vx0a5m.mjs +0 -2
  482. package/dist/chunks/cli-1.1.32-28x0bz68.mjs +0 -2
  483. package/dist/chunks/cli-1.1.32-2k074m5f.mjs +0 -2
  484. package/dist/chunks/cli-1.1.32-2kd689v0.mjs +0 -2
  485. package/dist/chunks/cli-1.1.32-2m68a9w2.mjs +0 -2
  486. package/dist/chunks/cli-1.1.32-2tyhwqjh.mjs +0 -10
  487. package/dist/chunks/cli-1.1.32-2wcdy0zp.mjs +0 -17
  488. package/dist/chunks/cli-1.1.32-2x7x44mg.mjs +0 -2
  489. package/dist/chunks/cli-1.1.32-336t9pmv.mjs +0 -2
  490. package/dist/chunks/cli-1.1.32-33jnyekk.mjs +0 -2
  491. package/dist/chunks/cli-1.1.32-36t0985q.mjs +0 -21
  492. package/dist/chunks/cli-1.1.32-3gbh5q5w.mjs +0 -2
  493. package/dist/chunks/cli-1.1.32-3z4a0eqz.mjs +0 -3
  494. package/dist/chunks/cli-1.1.32-41xx49ta.mjs +0 -2
  495. package/dist/chunks/cli-1.1.32-46wadmxk.mjs +0 -2
  496. package/dist/chunks/cli-1.1.32-49sdmvtj.mjs +0 -25
  497. package/dist/chunks/cli-1.1.32-4ekmdczr.mjs +0 -25
  498. package/dist/chunks/cli-1.1.32-4ft4m446.mjs +0 -2
  499. package/dist/chunks/cli-1.1.32-4rsr6phf.mjs +0 -2
  500. package/dist/chunks/cli-1.1.32-4vdyqkkd.mjs +0 -2
  501. package/dist/chunks/cli-1.1.32-4yat84kg.mjs +0 -2
  502. package/dist/chunks/cli-1.1.32-5a158c45.mjs +0 -2
  503. package/dist/chunks/cli-1.1.32-5c5dcwk6.mjs +0 -2
  504. package/dist/chunks/cli-1.1.32-5cngr1kn.mjs +0 -2
  505. package/dist/chunks/cli-1.1.32-5dq711bj.mjs +0 -2
  506. package/dist/chunks/cli-1.1.32-5j5n166h.mjs +0 -2
  507. package/dist/chunks/cli-1.1.32-5qjjtpkh.mjs +0 -133
  508. package/dist/chunks/cli-1.1.32-5qwps3ts.mjs +0 -2
  509. package/dist/chunks/cli-1.1.32-5v0afeqw.mjs +0 -2
  510. package/dist/chunks/cli-1.1.32-5xmh2b7j.mjs +0 -2
  511. package/dist/chunks/cli-1.1.32-60pc6r2s.mjs +0 -2
  512. package/dist/chunks/cli-1.1.32-6317frxz.mjs +0 -2
  513. package/dist/chunks/cli-1.1.32-65c5zdmx.mjs +0 -2
  514. package/dist/chunks/cli-1.1.32-6f9r9qcb.mjs +0 -2
  515. package/dist/chunks/cli-1.1.32-6jbgafh2.mjs +0 -2
  516. package/dist/chunks/cli-1.1.32-6jhkp60n.mjs +0 -2
  517. package/dist/chunks/cli-1.1.32-6jxftegx.mjs +0 -6
  518. package/dist/chunks/cli-1.1.32-7566j53x.mjs +0 -2
  519. package/dist/chunks/cli-1.1.32-76wfpwbd.mjs +0 -2
  520. package/dist/chunks/cli-1.1.32-7zp3b6gq.mjs +0 -2
  521. package/dist/chunks/cli-1.1.32-8b5ej63w.mjs +0 -2
  522. package/dist/chunks/cli-1.1.32-8hsb6vgz.mjs +0 -2
  523. package/dist/chunks/cli-1.1.32-8jkgzjh4.mjs +0 -5
  524. package/dist/chunks/cli-1.1.32-8t8t42xx.mjs +0 -2
  525. package/dist/chunks/cli-1.1.32-8yc37yqa.mjs +0 -34
  526. package/dist/chunks/cli-1.1.32-97e0qadj.mjs +0 -2
  527. package/dist/chunks/cli-1.1.32-9c0an85r.mjs +0 -2
  528. package/dist/chunks/cli-1.1.32-9fe7efg9.mjs +0 -2
  529. package/dist/chunks/cli-1.1.32-9jxkev29.mjs +0 -2
  530. package/dist/chunks/cli-1.1.32-9wsnkggz.mjs +0 -11
  531. package/dist/chunks/cli-1.1.32-9yka8m9x.mjs +0 -5490
  532. package/dist/chunks/cli-1.1.32-a3dfp7ps.mjs +0 -12
  533. package/dist/chunks/cli-1.1.32-acgh1gj8.mjs +0 -2
  534. package/dist/chunks/cli-1.1.32-ajhvj43e.mjs +0 -2
  535. package/dist/chunks/cli-1.1.32-aqfcrtfz.mjs +0 -5
  536. package/dist/chunks/cli-1.1.32-aysp26sz.mjs +0 -45
  537. package/dist/chunks/cli-1.1.32-b1bbb8eb.mjs +0 -7
  538. package/dist/chunks/cli-1.1.32-b3hsysf6.mjs +0 -2
  539. package/dist/chunks/cli-1.1.32-b4dgaz0a.mjs +0 -2
  540. package/dist/chunks/cli-1.1.32-bce46tmm.mjs +0 -2
  541. package/dist/chunks/cli-1.1.32-bnam9df8.mjs +0 -2
  542. package/dist/chunks/cli-1.1.32-bt4yfsm7.mjs +0 -2
  543. package/dist/chunks/cli-1.1.32-c4v8081j.mjs +0 -2
  544. package/dist/chunks/cli-1.1.32-c6n1kre3.mjs +0 -2
  545. package/dist/chunks/cli-1.1.32-c7ypbb63.mjs +0 -2
  546. package/dist/chunks/cli-1.1.32-cpzgn83z.mjs +0 -2
  547. package/dist/chunks/cli-1.1.32-cx7ygksc.mjs +0 -2
  548. package/dist/chunks/cli-1.1.32-czrfbd3q.mjs +0 -2
  549. package/dist/chunks/cli-1.1.32-d47cvy98.mjs +0 -2
  550. package/dist/chunks/cli-1.1.32-dkyyv5mx.mjs +0 -2
  551. package/dist/chunks/cli-1.1.32-dp2kpscr.mjs +0 -2
  552. package/dist/chunks/cli-1.1.32-dtd3vpkv.mjs +0 -2
  553. package/dist/chunks/cli-1.1.32-e1btgk5y.mjs +0 -4
  554. package/dist/chunks/cli-1.1.32-e96q5k17.mjs +0 -2
  555. package/dist/chunks/cli-1.1.32-ebg7m8yz.mjs +0 -2
  556. package/dist/chunks/cli-1.1.32-ehg64cg0.mjs +0 -2
  557. package/dist/chunks/cli-1.1.32-erw03mnm.mjs +0 -2
  558. package/dist/chunks/cli-1.1.32-f3895pf8.mjs +0 -2
  559. package/dist/chunks/cli-1.1.32-fhzs65yw.mjs +0 -2
  560. package/dist/chunks/cli-1.1.32-fjz81t0j.mjs +0 -2
  561. package/dist/chunks/cli-1.1.32-fr30sgy9.mjs +0 -2
  562. package/dist/chunks/cli-1.1.32-fzepmkcj.mjs +0 -2
  563. package/dist/chunks/cli-1.1.32-g5dzf2w1.mjs +0 -24
  564. package/dist/chunks/cli-1.1.32-gg7yn5bt.mjs +0 -8
  565. package/dist/chunks/cli-1.1.32-gpq33yz0.mjs +0 -2
  566. package/dist/chunks/cli-1.1.32-gqbeasga.mjs +0 -2
  567. package/dist/chunks/cli-1.1.32-gvv8h6dg.mjs +0 -18
  568. package/dist/chunks/cli-1.1.32-gwf0a8ej.mjs +0 -2
  569. package/dist/chunks/cli-1.1.32-h23ch6fy.mjs +0 -2
  570. package/dist/chunks/cli-1.1.32-h4tpddgz.mjs +0 -4
  571. package/dist/chunks/cli-1.1.32-h7cb9f8y.mjs +0 -2
  572. package/dist/chunks/cli-1.1.32-hbwke9cs.mjs +0 -2
  573. package/dist/chunks/cli-1.1.32-hgjgfp8p.mjs +0 -60
  574. package/dist/chunks/cli-1.1.32-hhd65der.mjs +0 -2
  575. package/dist/chunks/cli-1.1.32-hzn2mba8.mjs +0 -3
  576. package/dist/chunks/cli-1.1.32-j31v1t7y.mjs +0 -15
  577. package/dist/chunks/cli-1.1.32-jatnsd1n.mjs +0 -2
  578. package/dist/chunks/cli-1.1.32-jjanec91.mjs +0 -2
  579. package/dist/chunks/cli-1.1.32-jnrsn4v0.mjs +0 -2
  580. package/dist/chunks/cli-1.1.32-jqhfcb0t.mjs +0 -2
  581. package/dist/chunks/cli-1.1.32-jt6w5mqv.mjs +0 -2
  582. package/dist/chunks/cli-1.1.32-k5d30qej.mjs +0 -3
  583. package/dist/chunks/cli-1.1.32-k9zkw4st.mjs +0 -2
  584. package/dist/chunks/cli-1.1.32-kn0zs89y.mjs +0 -63
  585. package/dist/chunks/cli-1.1.32-kqkbjp3x.mjs +0 -4
  586. package/dist/chunks/cli-1.1.32-m7dxkbpn.mjs +0 -2
  587. package/dist/chunks/cli-1.1.32-m9c0pceb.mjs +0 -3
  588. package/dist/chunks/cli-1.1.32-m9p4pd60.mjs +0 -2
  589. package/dist/chunks/cli-1.1.32-merqy9t2.mjs +0 -2
  590. package/dist/chunks/cli-1.1.32-mrftpsrs.mjs +0 -15
  591. package/dist/chunks/cli-1.1.32-n3smn7a4.mjs +0 -2
  592. package/dist/chunks/cli-1.1.32-n6rpvpf2.mjs +0 -2
  593. package/dist/chunks/cli-1.1.32-n7cyeje8.mjs +0 -2
  594. package/dist/chunks/cli-1.1.32-n9vdkdfk.mjs +0 -2
  595. package/dist/chunks/cli-1.1.32-nmcy47z7.mjs +0 -4
  596. package/dist/chunks/cli-1.1.32-nt9eqa35.mjs +0 -2
  597. package/dist/chunks/cli-1.1.32-p70gsyp3.mjs +0 -2
  598. package/dist/chunks/cli-1.1.32-pe6kmf9g.mjs +0 -3
  599. package/dist/chunks/cli-1.1.32-pfhbrjhs.mjs +0 -20
  600. package/dist/chunks/cli-1.1.32-pfwbgg79.mjs +0 -2
  601. package/dist/chunks/cli-1.1.32-pm7ctgdf.mjs +0 -7
  602. package/dist/chunks/cli-1.1.32-pve0ffcp.mjs +0 -203
  603. package/dist/chunks/cli-1.1.32-pwvfjtva.mjs +0 -2
  604. package/dist/chunks/cli-1.1.32-px6268dx.mjs +0 -2
  605. package/dist/chunks/cli-1.1.32-px93hhj4.mjs +0 -3
  606. package/dist/chunks/cli-1.1.32-qmgvm9rq.mjs +0 -2
  607. package/dist/chunks/cli-1.1.32-qvx7w9wm.mjs +0 -2
  608. package/dist/chunks/cli-1.1.32-qzjfn21e.mjs +0 -3
  609. package/dist/chunks/cli-1.1.32-r5ww85n4.mjs +0 -6
  610. package/dist/chunks/cli-1.1.32-r6g8b118.mjs +0 -5
  611. package/dist/chunks/cli-1.1.32-r7020tw8.mjs +0 -4
  612. package/dist/chunks/cli-1.1.32-rbvnjjkt.mjs +0 -2
  613. package/dist/chunks/cli-1.1.32-rmz4ezae.mjs +0 -3
  614. package/dist/chunks/cli-1.1.32-rswqkymv.mjs +0 -133
  615. package/dist/chunks/cli-1.1.32-s2kkv51h.mjs +0 -2
  616. package/dist/chunks/cli-1.1.32-s4betse1.mjs +0 -2
  617. package/dist/chunks/cli-1.1.32-sqsxnqqb.mjs +0 -2
  618. package/dist/chunks/cli-1.1.32-t1n0b84g.mjs +0 -2
  619. package/dist/chunks/cli-1.1.32-tgr1e1hd.mjs +0 -2
  620. package/dist/chunks/cli-1.1.32-th2r4378.mjs +0 -9
  621. package/dist/chunks/cli-1.1.32-thsw9p6n.mjs +0 -2
  622. package/dist/chunks/cli-1.1.32-tp4tyjy3.mjs +0 -2
  623. package/dist/chunks/cli-1.1.32-tq108hv4.mjs +0 -2
  624. package/dist/chunks/cli-1.1.32-tzn98f6r.mjs +0 -24
  625. package/dist/chunks/cli-1.1.32-v3cks7qj.mjs +0 -6
  626. package/dist/chunks/cli-1.1.32-v4chz2b0.mjs +0 -2
  627. package/dist/chunks/cli-1.1.32-vdezbpdh.mjs +0 -2
  628. package/dist/chunks/cli-1.1.32-vf3r8a91.mjs +0 -16
  629. package/dist/chunks/cli-1.1.32-vmr6f229.mjs +0 -2
  630. package/dist/chunks/cli-1.1.32-vnhzy4jx.mjs +0 -2
  631. package/dist/chunks/cli-1.1.32-vtzwmjs8.mjs +0 -3
  632. package/dist/chunks/cli-1.1.32-vy2ngm3p.mjs +0 -2
  633. package/dist/chunks/cli-1.1.32-w2b0neg3.mjs +0 -4
  634. package/dist/chunks/cli-1.1.32-wnhqapmf.mjs +0 -24
  635. package/dist/chunks/cli-1.1.32-wsqyehdw.mjs +0 -2
  636. package/dist/chunks/cli-1.1.32-wyv15h7a.mjs +0 -6
  637. package/dist/chunks/cli-1.1.32-x0crp5g9.mjs +0 -2
  638. package/dist/chunks/cli-1.1.32-x23z7923.mjs +0 -2
  639. package/dist/chunks/cli-1.1.32-x8j1spnv.mjs +0 -2
  640. package/dist/chunks/cli-1.1.32-xfhe1m2y.mjs +0 -2
  641. package/dist/chunks/cli-1.1.32-xj2e8mzf.mjs +0 -2
  642. package/dist/chunks/cli-1.1.32-xy1pvy12.mjs +0 -2
  643. package/dist/chunks/cli-1.1.32-y4agg2c2.mjs +0 -17
  644. package/dist/chunks/cli-1.1.32-ycyg88ky.mjs +0 -2
  645. package/dist/chunks/cli-1.1.32-ydbtpc9v.mjs +0 -12
  646. package/dist/chunks/cli-1.1.32-yfs9ppge.mjs +0 -2
  647. package/dist/chunks/cli-1.1.32-yhftam6y.mjs +0 -50
  648. package/dist/chunks/cli-1.1.32-yhzhm57s.mjs +0 -2
  649. package/dist/chunks/cli-1.1.32-yq68bsa5.mjs +0 -2
  650. package/dist/chunks/cli-1.1.32-yv0wyp2m.mjs +0 -2
  651. package/dist/chunks/cli-1.1.32-yv9hzzq7.mjs +0 -2
  652. package/dist/chunks/cli-1.1.32-yw64r19c.mjs +0 -2
  653. package/dist/chunks/cli-1.1.32-z7x4jfeb.mjs +0 -4
  654. package/dist/chunks/cli-1.1.32-zegecv6e.mjs +0 -2
  655. package/dist/chunks/cli-1.1.32-zeyasrw5.mjs +0 -2
  656. package/dist/chunks/cli-1.1.32-zfyd4kyq.mjs +0 -2
  657. package/dist/chunks/cli-1.1.32-zfzqc12y.mjs +0 -26
  658. package/dist/chunks/cli-1.1.32-zkq2v1fz.mjs +0 -2
  659. package/dist/chunks/cli-1.1.32-zqtqvc9y.mjs +0 -3
  660. package/dist/chunks/cli-1.1.32-zr4x17ne.mjs +0 -3
  661. package/dist/chunks/cli-1.1.32-zraeg1n2.mjs +0 -2
  662. package/dist/chunks/cli-1.1.32-zrxqe296.mjs +0 -7
  663. package/dist/chunks/cli-1.1.32-zv1p3q66.mjs +0 -2
  664. package/dist/chunks/cli-1.1.32-zwetcrr2.mjs +0 -39
  665. package/dist/chunks/client-1.1.32-y4ehgz03.mjs +0 -1
  666. package/dist/chunks/color-1.1.32-an3gq6pv.mjs +0 -1
  667. package/dist/chunks/compact-1.1.32-kp67c5pn.mjs +0 -2
  668. package/dist/chunks/config-1.1.32-9kqd30ca.mjs +0 -1
  669. package/dist/chunks/config-1.1.32-chryg3ab.mjs +0 -1
  670. package/dist/chunks/constants-1.1.32-azab2vra.mjs +0 -1
  671. package/dist/chunks/context-1.1.32-t6yf3tch.mjs +0 -1
  672. package/dist/chunks/context-noninteractive-1.1.32-tbes3yx4.mjs +0 -1
  673. package/dist/chunks/conversation-1.1.32-edtsb1fp.mjs +0 -1
  674. package/dist/chunks/copilotHeaders-1.1.32-cxjr3qqd.mjs +0 -1
  675. package/dist/chunks/copy-1.1.32-2yk1zben.mjs +0 -9
  676. package/dist/chunks/cost-1.1.32-ykkmca1s.mjs +0 -1
  677. package/dist/chunks/createSession-1.1.32-pky6wawr.mjs +0 -1
  678. package/dist/chunks/debug-1.1.32-f8fanjpw.mjs +0 -1
  679. package/dist/chunks/defaultActionDeps-1.1.32-nf0mf9nq.mjs +0 -1480
  680. package/dist/chunks/desktop-1.1.32-h4q834kk.mjs +0 -2
  681. package/dist/chunks/detectRepository-1.1.32-y3wjkn3b.mjs +0 -1
  682. package/dist/chunks/detection-1.1.32-13rzk2y0.mjs +0 -1
  683. package/dist/chunks/diff-1.1.32-tsgcxd5v.mjs +0 -1
  684. package/dist/chunks/doctor-1.1.32-dg4q70ty.mjs +0 -1
  685. package/dist/chunks/doctorDiagnostic-1.1.32-xpjhp8fe.mjs +0 -1
  686. package/dist/chunks/earlyInput-1.1.32-rzjwc8xb.mjs +0 -1
  687. package/dist/chunks/effort-1.1.32-76tc9ft4.mjs +0 -13
  688. package/dist/chunks/engine-1.1.32-qp8px0cr.mjs +0 -1
  689. package/dist/chunks/envLessBridgeConfig-1.1.32-mamfyksw.mjs +0 -1
  690. package/dist/chunks/envUtils-1.1.32-x5ddw5jb.mjs +0 -1
  691. package/dist/chunks/errors-1.1.32-pw0ngznd.mjs +0 -1
  692. package/dist/chunks/exampleCommands-1.1.32-j9bvstfq.mjs +0 -1
  693. package/dist/chunks/execFileNoThrow-1.1.32-ah9wga16.mjs +0 -1
  694. package/dist/chunks/exit-1.1.32-4j8q9ztw.mjs +0 -1
  695. package/dist/chunks/explorer-1.1.32-dabb8sse.mjs +0 -1
  696. package/dist/chunks/export-1.1.32-zt3yhqen.mjs +0 -2
  697. package/dist/chunks/fast-1.1.32-cms216af.mjs +0 -1
  698. package/dist/chunks/feedback-1.1.32-r94c0y57.mjs +0 -16
  699. package/dist/chunks/git-1.1.32-9xc0s3ry.mjs +0 -1
  700. package/dist/chunks/githubModelsCredentials-1.1.32-r5xq7s7y.mjs +0 -1
  701. package/dist/chunks/goal-1.1.32-bkjq4858.mjs +0 -4
  702. package/dist/chunks/headless-1.1.32-ae4d3qgy.mjs +0 -2
  703. package/dist/chunks/heapdump-1.1.32-jdrsrqfx.mjs +0 -6
  704. package/dist/chunks/help-1.1.32-5z54ce4t.mjs +0 -1
  705. package/dist/chunks/hooks-1.1.32-2mse496x.mjs +0 -1
  706. package/dist/chunks/hooks-1.1.32-jv66gnpt.mjs +0 -79
  707. package/dist/chunks/ide-1.1.32-tx45prsy.mjs +0 -3
  708. package/dist/chunks/image-processor-napi-1.1.32-bwdr4dza.mjs +0 -1
  709. package/dist/chunks/import-1.1.32-7w75n01b.mjs +0 -261
  710. package/dist/chunks/inboundAttachments-1.1.32-1vfz9rkn.mjs +0 -1
  711. package/dist/chunks/index-1.1.32-3wzxvtbf.mjs +0 -1
  712. package/dist/chunks/index-1.1.32-49p9ghn6.mjs +0 -1
  713. package/dist/chunks/index-1.1.32-7ttnyjb3.mjs +0 -2
  714. package/dist/chunks/index-1.1.32-aqkr7bx2.mjs +0 -9
  715. package/dist/chunks/index-1.1.32-az0sxjjn.mjs +0 -5
  716. package/dist/chunks/index-1.1.32-b4rwnxe8.mjs +0 -1
  717. package/dist/chunks/index-1.1.32-bpzdp87c.mjs +0 -23
  718. package/dist/chunks/index-1.1.32-c3gnrfg0.mjs +0 -1
  719. package/dist/chunks/index-1.1.32-cjq261cn.mjs +0 -9
  720. package/dist/chunks/index-1.1.32-crx2adff.mjs +0 -1
  721. package/dist/chunks/index-1.1.32-dn9thxs1.mjs +0 -30
  722. package/dist/chunks/index-1.1.32-fwm6yqt6.mjs +0 -1
  723. package/dist/chunks/index-1.1.32-g58gm84f.mjs +0 -1
  724. package/dist/chunks/index-1.1.32-g9e9ne9q.mjs +0 -1
  725. package/dist/chunks/index-1.1.32-m694vs1n.mjs +0 -1
  726. package/dist/chunks/index-1.1.32-rbv0wt7t.mjs +0 -1
  727. package/dist/chunks/index-1.1.32-revsqy4q.mjs +0 -1
  728. package/dist/chunks/index-1.1.32-t011v5cn.mjs +0 -1
  729. package/dist/chunks/index-1.1.32-tv85kbw0.mjs +0 -1
  730. package/dist/chunks/index-1.1.32-v09n34s4.mjs +0 -1
  731. package/dist/chunks/index-1.1.32-vaknvmtk.mjs +0 -2
  732. package/dist/chunks/index-1.1.32-vxn4pvkx.mjs +0 -1
  733. package/dist/chunks/index-1.1.32-zep1vry1.mjs +0 -1
  734. package/dist/chunks/init-1.1.32-xac664gq.mjs +0 -2
  735. package/dist/chunks/initReplBridge-1.1.32-d1g5bqts.mjs +0 -1
  736. package/dist/chunks/ink-1.1.32-brepbf1s.mjs +0 -1
  737. package/dist/chunks/insights-1.1.32-ccteb3zt.mjs +0 -870
  738. package/dist/chunks/install-1.1.32-xhcj1s97.mjs +0 -1
  739. package/dist/chunks/install-github-app-1.1.32-2rb2b8y2.mjs +0 -149
  740. package/dist/chunks/install-slack-app-1.1.32-7e22rmh8.mjs +0 -1
  741. package/dist/chunks/interactiveHelpers-1.1.32-tw81dggb.mjs +0 -1
  742. package/dist/chunks/keybindings-1.1.32-bsjftmx2.mjs +0 -2
  743. package/dist/chunks/latestVersionCache-1.1.32-ecgj54va.mjs +0 -1
  744. package/dist/chunks/loadAgentsDir-1.1.32-9c4e13wb.mjs +0 -1
  745. package/dist/chunks/loadPluginHooks-1.1.32-qb96n0p6.mjs +0 -1
  746. package/dist/chunks/log-1.1.32-0wdbtf8k.mjs +0 -1
  747. package/dist/chunks/main-1.1.32-9s7gbk2b.mjs +0 -1
  748. package/dist/chunks/managedEnv-1.1.32-8aapabn1.mjs +0 -1
  749. package/dist/chunks/mcp-1.1.32-2ct5ytwv.mjs +0 -1
  750. package/dist/chunks/mcp-1.1.32-42npdfwc.mjs +0 -17
  751. package/dist/chunks/mcp-1.1.32-8c3f7gfy.mjs +0 -4
  752. package/dist/chunks/mcpb-1.1.32-482tejv1.mjs +0 -1
  753. package/dist/chunks/memory-1.1.32-jrnzabfj.mjs +0 -77
  754. package/dist/chunks/model-1.1.32-wjtssjq7.mjs +0 -1
  755. package/dist/chunks/model-1.1.32-z7v5ah7s.mjs +0 -2
  756. package/dist/chunks/node-1.1.32-bgrnv9d0.mjs +0 -15
  757. package/dist/chunks/node-1.1.32-pek9xbcv.mjs +0 -1
  758. package/dist/chunks/oauth-1.1.32-b01rfrnw.mjs +0 -1
  759. package/dist/chunks/openaiShim-1.1.32-68nafznt.mjs +0 -14
  760. package/dist/chunks/output-style-1.1.32-se3pq9dn.mjs +0 -1
  761. package/dist/chunks/package-D2QZMRW7-1.1.32-jykb9rfa.mjs +0 -1
  762. package/dist/chunks/permissions-1.1.32-r62vjas0.mjs +0 -3
  763. package/dist/chunks/permissions-1.1.32-v83ds1fq.mjs +0 -1
  764. package/dist/chunks/plan-1.1.32-remxpgv3.mjs +0 -1
  765. package/dist/chunks/plist-1.1.32-y2bh274p.mjs +0 -1
  766. package/dist/chunks/plugin-1.1.32-h9pgs6zn.mjs +0 -29
  767. package/dist/chunks/pluginStartupCheck-1.1.32-vyn1sara.mjs +0 -1
  768. package/dist/chunks/plugins-1.1.32-wxz7p0xc.mjs +0 -9
  769. package/dist/chunks/preActionHook-1.1.32-259wvsmh.mjs +0 -2
  770. package/dist/chunks/print-1.1.32-k37wv4h9.mjs +0 -57
  771. package/dist/chunks/process-1.1.32-tya6ctch.mjs +0 -1
  772. package/dist/chunks/processBashCommand-1.1.32-hfk6nzmr.mjs +0 -1
  773. package/dist/chunks/processSlashCommand-1.1.32-ga3g4qev.mjs +0 -9
  774. package/dist/chunks/prompt-1.1.32-crsv325t.mjs +0 -1
  775. package/dist/chunks/prompt-1.1.32-jyfkevpw.mjs +0 -1
  776. package/dist/chunks/prompts-1.1.32-mythhsq2.mjs +0 -1
  777. package/dist/chunks/provider-1.1.32-c16c25q6.mjs +0 -2
  778. package/dist/chunks/providerProfiles-1.1.32-gv05d26p.mjs +0 -1
  779. package/dist/chunks/providerValidation-1.1.32-srfcyanm.mjs +0 -6
  780. package/dist/chunks/registerSubcommands-1.1.32-af1r42j6.mjs +0 -26
  781. package/dist/chunks/registry-1.1.32-nvr3xen5.mjs +0 -1
  782. package/dist/chunks/release-notes-1.1.32-gtntbc84.mjs +0 -5
  783. package/dist/chunks/reload-plugins-1.1.32-qmx4b0zf.mjs +0 -2
  784. package/dist/chunks/remote-env-1.1.32-srz0skx2.mjs +0 -1
  785. package/dist/chunks/remoteBridgeCore-1.1.32-17erfh69.mjs +0 -1
  786. package/dist/chunks/rename-1.1.32-yww8w15q.mjs +0 -1
  787. package/dist/chunks/replLauncher-1.1.32-carhn5x3.mjs +0 -1
  788. package/dist/chunks/resume-1.1.32-y7g779fj.mjs +0 -2
  789. package/dist/chunks/rewind-1.1.32-xktcmbbk.mjs +0 -1
  790. package/dist/chunks/rootOptions-1.1.32-q7914mqe.mjs +0 -1
  791. package/dist/chunks/runWorkflowHeadless-1.1.32-yr1peyj2.mjs +0 -10
  792. package/dist/chunks/sandbox-adapter-1.1.32-kct2shfd.mjs +0 -1
  793. package/dist/chunks/sandbox-toggle-1.1.32-wa7kgd6b.mjs +0 -1
  794. package/dist/chunks/session-1.1.32-07pqmcyz.mjs +0 -2
  795. package/dist/chunks/sessionFileAccessHooks-1.1.32-1ekf9af3.mjs +0 -1
  796. package/dist/chunks/sessionStorage-1.1.32-vcm53ywe.mjs +0 -1
  797. package/dist/chunks/settings-1.1.32-kwtz4r22.mjs +0 -1
  798. package/dist/chunks/setup-1.1.32-695k1eyn.mjs +0 -12
  799. package/dist/chunks/sinks-1.1.32-3eh8hb97.mjs +0 -1
  800. package/dist/chunks/skills-1.1.32-ymdek4dt.mjs +0 -1
  801. package/dist/chunks/startupProfiler-1.1.32-sxxmxavv.mjs +0 -1
  802. package/dist/chunks/startupUpdateCheck-1.1.32-25e14c0p.mjs +0 -1
  803. package/dist/chunks/state-1.1.32-q2y7dv84.mjs +0 -1
  804. package/dist/chunks/stats-1.1.32-p79st2jy.mjs +0 -1
  805. package/dist/chunks/status-1.1.32-wsaad3gy.mjs +0 -1
  806. package/dist/chunks/stickers-1.1.32-erbhpqdc.mjs +0 -1
  807. package/dist/chunks/subprocessEnv-1.1.32-29m5mf2s.mjs +0 -1
  808. package/dist/chunks/tasks-1.1.32-fv2ze8ev.mjs +0 -1
  809. package/dist/chunks/teamHelpers-1.1.32-b2x5nsht.mjs +0 -1
  810. package/dist/chunks/teammateModeSnapshot-1.1.32-w65af42z.mjs +0 -1
  811. package/dist/chunks/teleport-1.1.32-6d4336gw.mjs +0 -1
  812. package/dist/chunks/terminalSetup-1.1.32-t82mfgh5.mjs +0 -1
  813. package/dist/chunks/theme-1.1.32-7qn5nf2j.mjs +0 -1
  814. package/dist/chunks/thinkback-1.1.32-awsxj77a.mjs +0 -1
  815. package/dist/chunks/thinkback-play-1.1.32-jz9fjb47.mjs +0 -1
  816. package/dist/chunks/toolPool-1.1.32-fjydq0km.mjs +0 -1
  817. package/dist/chunks/toolSearch-1.1.32-y8vfsj9n.mjs +0 -1
  818. package/dist/chunks/tools-1.1.32-pd8bskwj.mjs +0 -1
  819. package/dist/chunks/trustedDevice-1.1.32-891wyppj.mjs +0 -1
  820. package/dist/chunks/turndown.cjs-1.1.32-nsrwegv6.mjs +0 -69
  821. package/dist/chunks/types-1.1.32-v6b8jgxx.mjs +0 -1
  822. package/dist/chunks/ultrareviewCommand-1.1.32-wkj4mpew.mjs +0 -4
  823. package/dist/chunks/update-1.1.32-zz1tgpba.mjs +0 -72
  824. package/dist/chunks/upload-1.1.32-43gcqyx2.mjs +0 -7
  825. package/dist/chunks/upstreamproxy-1.1.32-nqwkbma5.mjs +0 -14
  826. package/dist/chunks/usage-1.1.32-80bkg4qd.mjs +0 -1
  827. package/dist/chunks/util-1.1.32-c7zmr7sf.mjs +0 -1
  828. package/dist/chunks/utils-1.1.32-x2mf8n7e.mjs +0 -1
  829. package/dist/chunks/vim-1.1.32-mz41whem.mjs +0 -1
  830. package/dist/chunks/watchLoop-1.1.32-yftqp4h6.mjs +0 -13
  831. package/dist/chunks/watcher-1.1.32-jy13qnvt.mjs +0 -1
  832. package/dist/chunks/wiki-1.1.32-z6ngme51.mjs +0 -132
  833. package/dist/chunks/workflows-1.1.32-mpyvb578.mjs +0 -1
  834. package/dist/chunks/worktree-1.1.32-qxw9fxfk.mjs +0 -1
  835. package/dist/chunks/worktreeModeEnabled-1.1.32-w3d8pgmt.mjs +0 -1
  836. package/dist/chunks/wrapper-1.1.32-5xty3sv5.mjs +0 -7
@@ -1,203 +0,0 @@
1
- import{fha as G6,jha as NB}from"./cli-1.1.32-1rackf2c.mjs";import{rha as Vq,sha as $6,tha as zN}from"./cli-1.1.32-v4chz2b0.mjs";import{Dha as kX,Iha as zw,Jha as WB,Lha as K,Mha as r0,Nha as I,Oha as J2}from"./cli-1.1.32-kn0zs89y.mjs";import{Rha as r,Tha as U1,bia as Rz,tia as NE}from"./cli-1.1.32-m7dxkbpn.mjs";import{Cia as PL,Dia as cU,uia as dU}from"./cli-1.1.32-ajhvj43e.mjs";import{$ia as yW,Dja as P,Gia as $4,Gja as h0,Iia as iU,Jia as Yq,Kia as Ck,Lia as GW,Mia as $k,Nia as G$,Oia as X_,Pia as IW,Qia as Rk,Ria as G5,Sia as wW,Tia as EW,Uia as wk,Via as vW,Wia as Ok,Xia as DW,Yia as Gk,Zia as R$,_ia as H_,aja as kk,bja as CW,cja as Nk,fja as N7,gja as m,hja as q0,ija as Cq,jja as bL,lja as L0,mja as w1,pja as N,tja as z0}from"./cli-1.1.32-8jkgzjh4.mjs";import{Xja as s7,aka as Mz,cka as Y0,dka as o2,gka as KG,ika as j1}from"./cli-1.1.32-z7x4jfeb.mjs";import{lka as Z0,oka as e,pka as rB,qka as L6,wka as a0}from"./cli-1.1.32-7zp3b6gq.mjs";import{$na as sB,Ama as B$,Bma as Q_,Boa as BV,Cla as $q,Cma as W5,Cna as lG,Dla as Ak,Dma as aW,Ema as M$,Fma as Y_,Hoa as gB,Hpa as E1,Mla as K5,Moa as zz,Nla as zW,Ola as Jq,Ooa as _z,Pla as Tk,Qla as xW,Qna as vB,Rla as jk,Rna as yB,Sla as i4,Sna as CB,Tla as H$,Tna as SB,Una as bB,Vna as hB,Wna as j4,Xna as fB,Yla as PW,Zla as Ik,_na as KV,ema as U5,fma as _W,hpa as YW,ila as v1,jla as E4,qla as hW,rla as Pk,roa as Sq,sma as _$,tma as J_,toa as bq,wma as a4,xma as K$,yma as U$,zma as Z_}from"./cli-1.1.32-60pc6r2s.mjs";import{Ipa as H5,Jpa as UW,Spa as FW,Tpa as Uk,Upa as t0,Vpa as n4,Wpa as NW,Xpa as Dk,eqa as c,fqa as T1}from"./cli-1.1.32-hbwke9cs.mjs";import{Sqa as EE,Tqa as S4,Uqa as d,Vqa as Wq,Wqa as B,Xqa as $0,Yqa as z2,Zqa as _2}from"./cli-1.1.32-yw64r19c.mjs";var DQ=d((mE,FQ)=>{FQ.exports=RQ;RQ.sync=jz;var _Q=$0("fs");function Tz(Z,X){var q=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!q)return!0;if(q=q.split(";"),q.indexOf("")!==-1)return!0;for(var Q=0;Q<q.length;Q++){var $=q[Q].toLowerCase();if($&&Z.substr(-$.length).toLowerCase()===$)return!0}return!1}function MQ(Z,X,q){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return Tz(X,q)}function RQ(Z,X,q){_Q.stat(Z,function(Q,$){q(Q,Q?!1:MQ($,Z,X))})}function jz(Z,X){return MQ(_Q.statSync(Z),Z,X)}});var wQ=d((uE,IQ)=>{IQ.exports=TQ;TQ.sync=Iz;var AQ=$0("fs");function TQ(Z,X,q){AQ.stat(Z,function(Q,$){q(Q,Q?!1:jQ($,X))})}function Iz(Z,X){return jQ(AQ.statSync(Z),X)}function jQ(Z,X){return Z.isFile()&&wz(Z,X)}function wz(Z,X){var{mode:q,uid:Q,gid:$}=Z,J=X.uid!==void 0?X.uid:process.getuid&&process.getuid(),Y=X.gid!==void 0?X.gid:process.getgid&&process.getgid(),H=parseInt("100",8),U=parseInt("010",8),G=parseInt("001",8),W=H|U,V=q&G||q&U&&$===Y||q&H&&Q===J||q&W&&J===0;return V}});var kQ=d((dE,OQ)=>{var pE=$0("fs"),l4;if(process.platform==="win32"||global.TESTING_WINDOWS)l4=DQ();else l4=wQ();OQ.exports=o5;o5.sync=Oz;function o5(Z,X,q){if(typeof X==="function")q=X,X={};if(!q){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Q,$){o5(Z,X||{},function(J,Y){if(J)$(J);else Q(Y)})})}l4(Z,X||{},function(Q,$){if(Q){if(Q.code==="EACCES"||X&&X.ignoreErrors)Q=null,$=!1}q(Q,$)})}function Oz(Z,X){try{return l4.sync(Z,X||{})}catch(q){if(X&&X.ignoreErrors||q.code==="EACCES")return!1;else throw q}}});var CQ=d((cE,yQ)=>{var W2=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",NQ=$0("path"),kz=W2?";":":",xQ=kQ(),PQ=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),EQ=(Z,X)=>{let q=X.colon||kz,Q=Z.match(/\//)||W2&&Z.match(/\\/)?[""]:[...W2?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(q)],$=W2?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",J=W2?$.split(q):[""];if(W2){if(Z.indexOf(".")!==-1&&J[0]!=="")J.unshift("")}return{pathEnv:Q,pathExt:J,pathExtExe:$}},vQ=(Z,X,q)=>{if(typeof X==="function")q=X,X={};if(!X)X={};let{pathEnv:Q,pathExt:$,pathExtExe:J}=EQ(Z,X),Y=[],H=(G)=>new Promise((W,V)=>{if(G===Q.length)return X.all&&Y.length?W(Y):V(PQ(Z));let L=Q[G],z=/^".*"$/.test(L)?L.slice(1,-1):L,_=NQ.join(z,Z),M=!z&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+_:_;W(U(M,G,0))}),U=(G,W,V)=>new Promise((L,z)=>{if(V===$.length)return L(H(W+1));let _=$[V];xQ(G+_,{pathExt:J},(M,R)=>{if(!M&&R)if(X.all)Y.push(G+_);else return L(G+_);return L(U(G,W,V+1))})});return q?H(0).then((G)=>q(null,G),q):H(0)},Nz=(Z,X)=>{X=X||{};let{pathEnv:q,pathExt:Q,pathExtExe:$}=EQ(Z,X),J=[];for(let Y=0;Y<q.length;Y++){let H=q[Y],U=/^".*"$/.test(H)?H.slice(1,-1):H,G=NQ.join(U,Z),W=!U&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+G:G;for(let V=0;V<Q.length;V++){let L=W+Q[V];try{if(xQ.sync(L,{pathExt:$}))if(X.all)J.push(L);else return L}catch(z){}}}if(X.all&&J.length)return J;if(X.nothrow)return null;throw PQ(Z)};yQ.exports=vQ;vQ.sync=Nz});var bQ=d((lE,s5)=>{var SQ=(Z={})=>{let X=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"};s5.exports=SQ;s5.exports.default=SQ});var mQ=d((nE,gQ)=>{var hQ=$0("path"),xz=CQ(),Pz=bQ();function fQ(Z,X){let q=Z.options.env||process.env,Q=process.cwd(),$=Z.options.cwd!=null,J=$&&process.chdir!==void 0&&!process.chdir.disabled;if(J)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=xz.sync(Z.command,{path:q[Pz({env:q})],pathExt:X?hQ.delimiter:void 0})}catch(H){}finally{if(J)process.chdir(Q)}if(Y)Y=hQ.resolve($?Z.options.cwd:"",Y);return Y}function Ez(Z){return fQ(Z)||fQ(Z,!0)}gQ.exports=Ez});var uQ=d((Cz,t5)=>{var r5=/([()\][%!^"`<>&|;, *?])/g;function vz(Z){return Z=Z.replace(r5,"^$1"),Z}function yz(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(r5,"^$1"),X)Z=Z.replace(r5,"^$1");return Z}Cz.command=vz;Cz.argument=yz});var dQ=d((iE,pQ)=>{pQ.exports=/^#!(.*)/});var lQ=d((aE,cQ)=>{var hz=dQ();cQ.exports=(Z="")=>{let X=Z.match(hz);if(!X)return null;let[q,Q]=X[0].replace(/#! ?/,"").split(" "),$=q.split("/").pop();if($==="env")return Q;return Q?`${$} ${Q}`:$}});var iQ=d((oE,nQ)=>{var e5=$0("fs"),fz=lQ();function gz(Z){let q=Buffer.alloc(150),Q;try{Q=e5.openSync(Z,"r"),e5.readSync(Q,q,0,150,0),e5.closeSync(Q)}catch($){}return fz(q.toString())}nQ.exports=gz});var rQ=d((sE,sQ)=>{var mz=$0("path"),aQ=mQ(),oQ=uQ(),uz=iQ(),pz=process.platform==="win32",dz=/\.(?:com|exe)$/i,cz=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function lz(Z){Z.file=aQ(Z);let X=Z.file&&uz(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,aQ(Z);return Z.file}function nz(Z){if(!pz)return Z;let X=lz(Z),q=!dz.test(X);if(Z.options.forceShell||q){let Q=cz.test(X);Z.command=mz.normalize(Z.command),Z.command=oQ.command(Z.command),Z.args=Z.args.map((J)=>oQ.argument(J,Q));let $=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${$}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function iz(Z,X,q){if(X&&!Array.isArray(X))q=X,X=null;X=X?X.slice(0):[],q=Object.assign({},q);let Q={command:Z,args:X,options:q,file:void 0,original:{command:Z,args:X}};return q.shell?Q:nz(Q)}sQ.exports=iz});var Z$=d((rE,eQ)=>{var Z3=process.platform==="win32";function X3(Z,X){return Object.assign(Error(`${X} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${X} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function az(Z,X){if(!Z3)return;let q=Z.emit;Z.emit=function(Q,$){if(Q==="exit"){let J=tQ($,X);if(J)return q.call(Z,"error",J)}return q.apply(Z,arguments)}}function tQ(Z,X){if(Z3&&Z===1&&!X.file)return X3(X.original,"spawn");return null}function oz(Z,X){if(Z3&&Z===1&&!X.file)return X3(X.original,"spawnSync");return null}eQ.exports={hookChildProcess:az,verifyENOENT:tQ,verifyENOENTSync:oz,notFoundError:X3}});var Q$=d((tE,V2)=>{var X$=$0("child_process"),q3=rQ(),Q3=Z$();function q$(Z,X,q){let Q=q3(Z,X,q),$=X$.spawn(Q.command,Q.args,Q.options);return Q3.hookChildProcess($,Q),$}function sz(Z,X,q){let Q=q3(Z,X,q),$=X$.spawnSync(Q.command,Q.args,Q.options);return $.error=$.error||Q3.verifyENOENTSync($.status,Q),$}V2.exports=q$;V2.exports.spawn=q$;V2.exports.sync=sz;V2.exports._parse=q3;V2.exports._enoent=Q3});var rz;var $$=B(()=>{rz=["off","compact","full"]});function O0(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,collapseSubagentProgress:!0,summarizeSubagentResult:!1,thinkingHistoryRedactionEnabled:!0,narrationHistoryRedactionEnabled:!0,toolResultSummarizerEnabled:!0,showTurnDuration:!0,showCacheStats:"compact",hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:"auto",customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:60000,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},cachedGrowthBookFeatures:{},respectGitignore:!0,copyFullResponse:!1,providerProfiles:[],openaiAdditionalModelOptionsCacheByProfile:{},knowledgeGraphEnabled:!0,inlineImagesMode:"auto",autoBackgroundAgentsEnabled:!1,workflowsDefaultBackground:!1}}function tz(Z){return J$.includes(Z)}function ez(Z){return Y$.includes(Z)}var C1,S1,J$,Y$;var _6=B(()=>{C1={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1};S1=O0(),J$=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","narrationHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","copyFullResponse","copyOnSelect","flickerFreeMode","renderFrameRate","permissionExplainerEnabled","prStatusFooterEnabled","prStatusHosts","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","bashOutputFilterCapEnabled","autoBackgroundAgentsEnabled","repeatedFailureHintEnabled","workflowsDefaultBackground","oauthBrowser","inlineImagesMode"];Y$=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"]});function q_(Z,X,q,Q){if(!t0(Z))return Z;X=a4(X,Z);var $=-1,J=X.length,Y=J-1,H=Z;while(H!=null&&++$<J){var U=U$(X[$]),G=q;if(U==="__proto__"||U==="constructor"||U==="prototype")return Z;if($!=Y){var W=H[U];if(G=Q?Q(W,U,H):void 0,G===void 0)G=t0(W)?W:i4(X[$+1])?[]:{}}G$(H,U,G),H=H[U]}return Z}var W$;var V$=B(()=>{X_();K$();H$();n4();Z_();W$=q_});function $_(Z,X,q){var Q=-1,$=X.length,J={};while(++Q<$){var Y=X[Q],H=B$(Z,Y);if(q(H,Y))W$(J,a4(Y,Z),H)}return J}var L$;var z$=B(()=>{Q_();V$();K$();L$=$_});function K_(Z,X){if(Z==null)return{};var q=_$(R$(Z),function(Q){return[Q]});return X=M$(X),L$(Z,q,function(Q,$){return X(Q,$[0])})}var $3;var F$=B(()=>{J_();Y_();z$();H_();$3=K_});function R6(Z,X=!1){let q=Z.length,Q=0,$="",J=0,Y=16,H=0,U=0,G=0,W=0,V=0;function L(D,w){let T=0,j=0;while(T<D||!w){let A=Z.charCodeAt(Q);if(A>=48&&A<=57)j=j*16+A-48;else if(A>=65&&A<=70)j=j*16+A-65+10;else if(A>=97&&A<=102)j=j*16+A-97+10;else break;Q++,T++}if(T<D)j=-1;return j}function z(D){Q=D,$="",J=0,Y=16,V=0}function _(){let D=Q;if(Z.charCodeAt(Q)===48)Q++;else{Q++;while(Q<Z.length&&B2(Z.charCodeAt(Q)))Q++}if(Q<Z.length&&Z.charCodeAt(Q)===46)if(Q++,Q<Z.length&&B2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&B2(Z.charCodeAt(Q)))Q++}else return V=3,Z.substring(D,Q);let w=Q;if(Q<Z.length&&(Z.charCodeAt(Q)===69||Z.charCodeAt(Q)===101)){if(Q++,Q<Z.length&&Z.charCodeAt(Q)===43||Z.charCodeAt(Q)===45)Q++;if(Q<Z.length&&B2(Z.charCodeAt(Q))){Q++;while(Q<Z.length&&B2(Z.charCodeAt(Q)))Q++;w=Q}else V=3}return Z.substring(D,w)}function M(){let D="",w=Q;while(!0){if(Q>=q){D+=Z.substring(w,Q),V=2;break}let T=Z.charCodeAt(Q);if(T===34){D+=Z.substring(w,Q),Q++;break}if(T===92){if(D+=Z.substring(w,Q),Q++,Q>=q){V=2;break}switch(Z.charCodeAt(Q++)){case 34:D+='"';break;case 92:D+="\\";break;case 47:D+="/";break;case 98:D+="\b";break;case 102:D+="\f";break;case 110:D+=`
2
- `;break;case 114:D+="\r";break;case 116:D+="\t";break;case 117:let A=L(4,!0);if(A>=0)D+=String.fromCharCode(A);else V=4;break;default:V=5}w=Q;continue}if(T>=0&&T<=31)if(M6(T)){D+=Z.substring(w,Q),V=2;break}else V=6;Q++}return D}function R(){if($="",V=0,J=Q,U=H,W=G,Q>=q)return J=q,Y=17;let D=Z.charCodeAt(Q);if(J3(D)){do Q++,$+=String.fromCharCode(D),D=Z.charCodeAt(Q);while(J3(D));return Y=15}if(M6(D)){if(Q++,$+=String.fromCharCode(D),D===13&&Z.charCodeAt(Q)===10)Q++,$+=`
3
- `;return H++,G=Q,Y=14}switch(D){case 123:return Q++,Y=1;case 125:return Q++,Y=2;case 91:return Q++,Y=3;case 93:return Q++,Y=4;case 58:return Q++,Y=6;case 44:return Q++,Y=5;case 34:return Q++,$=M(),Y=10;case 47:let w=Q-1;if(Z.charCodeAt(Q+1)===47){Q+=2;while(Q<q){if(M6(Z.charCodeAt(Q)))break;Q++}return $=Z.substring(w,Q),Y=12}if(Z.charCodeAt(Q+1)===42){Q+=2;let T=q-1,j=!1;while(Q<T){let A=Z.charCodeAt(Q);if(A===42&&Z.charCodeAt(Q+1)===47){Q+=2,j=!0;break}if(Q++,M6(A)){if(A===13&&Z.charCodeAt(Q)===10)Q++;H++,G=Q}}if(!j)Q++,V=1;return $=Z.substring(w,Q),Y=13}return $+=String.fromCharCode(D),Q++,Y=16;case 45:if($+=String.fromCharCode(D),Q++,Q===q||!B2(Z.charCodeAt(Q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return $+=_(),Y=11;default:while(Q<q&&F(D))Q++,D=Z.charCodeAt(Q);if(J!==Q){switch($=Z.substring(J,Q),$){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return $+=String.fromCharCode(D),Q++,Y=16}}function F(D){if(J3(D)||M6(D))return!1;switch(D){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let D;do D=R();while(D>=12&&D<=15);return D}return{setPosition:z,getPosition:()=>Q,scan:X?k:R,getToken:()=>Y,getTokenValue:()=>$,getTokenOffset:()=>J,getTokenLength:()=>Q-J,getTokenStartLine:()=>U,getTokenStartCharacter:()=>J-W,getTokenError:()=>V}}function J3(Z){return Z===32||Z===9}function M6(Z){return Z===10||Z===13}function B2(Z){return Z>=48&&Z<=57}var D$;var o4=B(()=>{(function(Z){Z[Z.lineFeed=10]="lineFeed",Z[Z.carriageReturn=13]="carriageReturn",Z[Z.space=32]="space",Z[Z._0=48]="_0",Z[Z._1=49]="_1",Z[Z._2=50]="_2",Z[Z._3=51]="_3",Z[Z._4=52]="_4",Z[Z._5=53]="_5",Z[Z._6=54]="_6",Z[Z._7=55]="_7",Z[Z._8=56]="_8",Z[Z._9=57]="_9",Z[Z.a=97]="a",Z[Z.b=98]="b",Z[Z.c=99]="c",Z[Z.d=100]="d",Z[Z.e=101]="e",Z[Z.f=102]="f",Z[Z.g=103]="g",Z[Z.h=104]="h",Z[Z.i=105]="i",Z[Z.j=106]="j",Z[Z.k=107]="k",Z[Z.l=108]="l",Z[Z.m=109]="m",Z[Z.n=110]="n",Z[Z.o=111]="o",Z[Z.p=112]="p",Z[Z.q=113]="q",Z[Z.r=114]="r",Z[Z.s=115]="s",Z[Z.t=116]="t",Z[Z.u=117]="u",Z[Z.v=118]="v",Z[Z.w=119]="w",Z[Z.x=120]="x",Z[Z.y=121]="y",Z[Z.z=122]="z",Z[Z.A=65]="A",Z[Z.B=66]="B",Z[Z.C=67]="C",Z[Z.D=68]="D",Z[Z.E=69]="E",Z[Z.F=70]="F",Z[Z.G=71]="G",Z[Z.H=72]="H",Z[Z.I=73]="I",Z[Z.J=74]="J",Z[Z.K=75]="K",Z[Z.L=76]="L",Z[Z.M=77]="M",Z[Z.N=78]="N",Z[Z.O=79]="O",Z[Z.P=80]="P",Z[Z.Q=81]="Q",Z[Z.R=82]="R",Z[Z.S=83]="S",Z[Z.T=84]="T",Z[Z.U=85]="U",Z[Z.V=86]="V",Z[Z.W=87]="W",Z[Z.X=88]="X",Z[Z.Y=89]="Y",Z[Z.Z=90]="Z",Z[Z.asterisk=42]="asterisk",Z[Z.backslash=92]="backslash",Z[Z.closeBrace=125]="closeBrace",Z[Z.closeBracket=93]="closeBracket",Z[Z.colon=58]="colon",Z[Z.comma=44]="comma",Z[Z.dot=46]="dot",Z[Z.doubleQuote=34]="doubleQuote",Z[Z.minus=45]="minus",Z[Z.openBrace=123]="openBrace",Z[Z.openBracket=91]="openBracket",Z[Z.plus=43]="plus",Z[Z.slash=47]="slash",Z[Z.formFeed=12]="formFeed",Z[Z.tab=9]="tab"})(D$||(D$={}))});var M0,Y3,A$;var T$=B(()=>{M0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),Y3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
4
- `+" ".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+" ".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
5
- `+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
6
- `+"\t".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+"\t".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
7
- `+"\t".repeat(X)})}},A$=[`
8
- `,"\r",`\r
9
- `]});function H3(Z,X,q){let Q,$,J,Y,H;if(X){Y=X.offset,H=Y+X.length,J=Y;while(J>0&&!F6(Z,J-1))J--;let T=H;while(T<Z.length&&!F6(Z,T))T++;$=Z.substring(J,T),Q=G_($,q)}else $=Z,Q=0,J=0,Y=0,H=Z.length;let U=W_(q,Z),G=A$.includes(U),W=0,V=0,L;if(q.insertSpaces)L=M0[q.tabSize||4]??L2(M0[1],q.tabSize||4);else L="\t";let z=L==="\t"?"\t":" ",_=R6($,!1),M=!1;function R(){if(W>1)return L2(U,W)+L2(L,Q+V);let T=L.length*(Q+V);if(!G||T>Y3[z][U].length)return U+L2(L,Q+V);if(T<=0)return U;return Y3[z][U][T]}function F(){let T=_.scan();W=0;while(T===15||T===14){if(T===14&&q.keepLines)W+=1;else if(T===14)W=1;T=_.scan()}return M=T===16||_.getTokenError()!==0,T}let k=[];function D(T,j,A){if(!M&&(!X||j<H&&A>Y)&&Z.substring(j,A)!==T)k.push({offset:j,length:A-j,content:T})}let w=F();if(q.keepLines&&W>0)D(L2(U,W),0,0);if(w!==17){let T=_.getTokenOffset()+J,j=L.length*Q<20&&q.insertSpaces?M0[L.length*Q]:L2(L,Q);D(j,J,T)}while(w!==17){let T=_.getTokenOffset()+_.getTokenLength()+J,j=F(),A="",S=!1;while(W===0&&(j===12||j===13)){let x=_.getTokenOffset()+J;D(M0[1],T,x),T=_.getTokenOffset()+_.getTokenLength()+J,S=j===12,A=S?R():"",j=F()}if(j===2){if(w!==1)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==1)A=R();else if(q.keepLines)A=M0[1]}else if(j===4){if(w!==3)V--;if(q.keepLines&&W>0||!q.keepLines&&w!==3)A=R();else if(q.keepLines)A=M0[1]}else{switch(w){case 3:case 1:if(V++,q.keepLines&&W>0||!q.keepLines)A=R();else A=M0[1];break;case 5:if(q.keepLines&&W>0||!q.keepLines)A=R();else A=M0[1];break;case 12:A=R();break;case 13:if(W>0)A=R();else if(!S)A=M0[1];break;case 6:if(q.keepLines&&W>0)A=R();else if(!S)A=M0[1];break;case 10:if(q.keepLines&&W>0)A=R();else if(j===6&&!S)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(q.keepLines&&W>0)A=R();else if((j===12||j===13)&&!S)A=M0[1];else if(j!==5&&j!==17)M=!0;break;case 16:M=!0;break}if(W>0&&(j===12||j===13))A=R()}if(j===17)if(q.keepLines&&W>0)A=R();else A=q.insertFinalNewline?U:"";let O=_.getTokenOffset()+J;D(A,T,O),w=j}return k}function L2(Z,X){let q="";for(let Q=0;Q<X;Q++)q+=Z;return q}function G_(Z,X){let q=0,Q=0,$=X.tabSize||4;while(q<Z.length){let J=Z.charAt(q);if(J===M0[1])Q++;else if(J==="\t")Q+=$;else break;q++}return Math.floor(Q/$)}function W_(Z,X){for(let q=0;q<X.length;q++){let Q=X.charAt(q);if(Q==="\r"){if(q+1<X.length&&X.charAt(q+1)===`
10
- `)return`\r
11
- `;return"\r"}else if(Q===`
12
- `)return`
13
- `}return Z&&Z.eol||`
14
- `}function F6(Z,X){return`\r
15
- `.indexOf(Z.charAt(X))!==-1}var K3=B(()=>{o4();T$()});function j$(Z,X=[],q=D6.DEFAULT){let Q=null,$=[],J=[];function Y(U){if(Array.isArray($))$.push(U);else if(Q!==null)$[Q]=U}return G3(Z,{onObjectBegin:()=>{let U={};Y(U),J.push($),$=U,Q=null},onObjectProperty:(U)=>{Q=U},onObjectEnd:()=>{$=J.pop()},onArrayBegin:()=>{let U=[];Y(U),J.push($),$=U,Q=null},onArrayEnd:()=>{$=J.pop()},onLiteralValue:Y,onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q),$[0]}function U3(Z,X=[],q=D6.DEFAULT){let Q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function $(U){if(Q.type==="property")Q.length=U-Q.offset,Q=Q.parent}function J(U){return Q.children.push(U),U}G3(Z,{onObjectBegin:(U)=>{Q=J({type:"object",offset:U,length:-1,parent:Q,children:[]})},onObjectProperty:(U,G,W)=>{Q=J({type:"property",offset:G,length:-1,parent:Q,children:[]}),Q.children.push({type:"string",value:U,offset:G,length:W,parent:Q})},onObjectEnd:(U,G)=>{$(U+G),Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onArrayBegin:(U,G)=>{Q=J({type:"array",offset:U,length:-1,parent:Q,children:[]})},onArrayEnd:(U,G)=>{Q.length=U+G-Q.offset,Q=Q.parent,$(U+G)},onLiteralValue:(U,G,W)=>{J({type:B_(U),offset:G,length:W,parent:Q,value:U}),$(G+W)},onSeparator:(U,G,W)=>{if(Q.type==="property"){if(U===":")Q.colonOffset=G;else if(U===",")$(G)}},onError:(U,G,W)=>{X.push({error:U,offset:G,length:W})}},q);let H=Q.children[0];if(H)delete H.parent;return H}function s4(Z,X){if(!Z)return;let q=Z;for(let Q of X)if(typeof Q==="string"){if(q.type!=="object"||!Array.isArray(q.children))return;let $=!1;for(let J of q.children)if(Array.isArray(J.children)&&J.children[0].value===Q&&J.children.length===2){q=J.children[1],$=!0;break}if(!$)return}else{let $=Q;if(q.type!=="array"||$<0||!Array.isArray(q.children)||$>=q.children.length)return;q=q.children[$]}return q}function G3(Z,X,q=D6.DEFAULT){let Q=R6(Z,!1),$=[],J=0;function Y(v){return v?()=>J===0&&v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function H(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter()):()=>!0}function U(v){return v?(y)=>J===0&&v(y,Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice()):()=>!0}function G(v){return v?()=>{if(J>0)J++;else if(v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter(),()=>$.slice())===!1)J=1}:()=>!0}function W(v){return v?()=>{if(J>0)J--;if(J===0)v(Q.getTokenOffset(),Q.getTokenLength(),Q.getTokenStartLine(),Q.getTokenStartCharacter())}:()=>!0}let V=G(X.onObjectBegin),L=U(X.onObjectProperty),z=W(X.onObjectEnd),_=G(X.onArrayBegin),M=W(X.onArrayEnd),R=U(X.onLiteralValue),F=H(X.onSeparator),k=Y(X.onComment),D=H(X.onError),w=q&&q.disallowComments,T=q&&q.allowTrailingComma;function j(){while(!0){let v=Q.scan();switch(Q.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!w)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(v){case 12:case 13:if(w)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return v}}}function A(v,y=[],p=[]){if(D(v),y.length+p.length>0){let f=Q.getToken();while(f!==17){if(y.indexOf(f)!==-1){j();break}else if(p.indexOf(f)!==-1)break;f=j()}}}function S(v){let y=Q.getTokenValue();if(v)R(y);else L(y),$.push(y);return j(),!0}function O(){switch(Q.getToken()){case 11:let v=Q.getTokenValue(),y=Number(v);if(isNaN(y))A(2),y=0;R(y);break;case 7:R(null);break;case 8:R(!0);break;case 9:R(!1);break;default:return!1}return j(),!0}function x(){if(Q.getToken()!==10)return A(3,[],[2,5]),!1;if(S(!1),Q.getToken()===6){if(F(":"),j(),!i())A(4,[],[2,5])}else A(5,[],[2,5]);return $.pop(),!0}function E(){V(),j();let v=!1;while(Q.getToken()!==2&&Q.getToken()!==17){if(Q.getToken()===5){if(!v)A(4,[],[]);if(F(","),j(),Q.getToken()===2&&T)break}else if(v)A(6,[],[]);if(!x())A(4,[],[2,5]);v=!0}if(z(),Q.getToken()!==2)A(7,[2],[]);else j();return!0}function h(){_(),j();let v=!0,y=!1;while(Q.getToken()!==4&&Q.getToken()!==17){if(Q.getToken()===5){if(!y)A(4,[],[]);if(F(","),j(),Q.getToken()===4&&T)break}else if(y)A(6,[],[]);if(v)$.push(0),v=!1;else $[$.length-1]++;if(!i())A(4,[],[4,5]);y=!0}if(M(),!v)$.pop();if(Q.getToken()!==4)A(8,[4],[]);else j();return!0}function i(){switch(Q.getToken()){case 3:return h();case 1:return E();case 10:return S(!0);default:return O()}}if(j(),Q.getToken()===17){if(q.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!i())return A(4,[],[]),!1;if(Q.getToken()!==17)A(9,[],[]);return!0}function B_(Z){switch(typeof Z){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!Z)return"null";else if(Array.isArray(Z))return"array";return"object"}default:return"null"}}var D6;var W3=B(()=>{o4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(D6||(D6={}))});function I$(Z,X,q,Q){let $=X.slice(),Y=U3(Z,[]),H=void 0,U=void 0;while($.length>0)if(U=$.pop(),H=s4(Y,$),H===void 0&&q!==void 0)if(typeof U==="string")q={[U]:q};else q=[q];else break;if(!H){if(q===void 0)throw Error("Can not delete in empty document");return b1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(q)},Q)}else if(H.type==="object"&&typeof U==="string"&&Array.isArray(H.children)){let G=s4(H,[U]);if(G!==void 0)if(q===void 0){if(!G.parent)throw Error("Malformed AST");let W=H.children.indexOf(G.parent),V,L=G.parent.offset+G.parent.length;if(W>0){let z=H.children[W-1];V=z.offset+z.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return b1(Z,{offset:V,length:L-V,content:""},Q)}else return b1(Z,{offset:G.offset,length:G.length,content:JSON.stringify(q)},Q);else{if(q===void 0)return[];let W=`${JSON.stringify(U)}: ${JSON.stringify(q)}`,V=Q.getInsertionIndex?Q.getInsertionIndex(H.children.map((z)=>z.children[0].value)):H.children.length,L;if(V>0){let z=H.children[V-1];L={offset:z.offset+z.length,length:0,content:","+W}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:W};else L={offset:H.offset+1,length:0,content:W+","};return b1(Z,L,Q)}}else if(H.type==="array"&&typeof U==="number"&&Array.isArray(H.children)){let G=U;if(G===-1){let W=`${JSON.stringify(q)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:W};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+W}}return b1(Z,V,Q)}else if(q===void 0&&H.children.length>=0){let W=U,V=H.children[W],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===W){let z=H.children[W-1],_=z.offset+z.length,M=H.offset+H.length;L={offset:_,length:M-2-_,content:""}}else L={offset:V.offset,length:H.children[W+1].offset-V.offset,content:""};return b1(Z,L,Q)}else if(q!==void 0){let W,V=`${JSON.stringify(q)}`;if(!Q.isArrayInsertion&&H.children.length>U){let L=H.children[U];W={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||U===0)W={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=U>H.children.length?H.children.length:U,z=H.children[L-1];W={offset:z.offset+z.length,length:0,content:","+V}}return b1(Z,W,Q)}else throw Error(`Can not ${q===void 0?"remove":Q.isArrayInsertion?"insert":"modify"} Array index ${G} as length is not sufficient`)}else throw Error(`Can not add ${typeof U!=="number"?"index":"property"} to parent of type ${H.type}`)}function b1(Z,X,q){if(!q.formattingOptions)return[X];let Q=r4(Z,X),$=X.offset,J=X.offset+X.content.length;if(X.length===0||X.content.length===0){while($>0&&!F6(Q,$-1))$--;while(J<Q.length&&!F6(Q,J))J++}let Y=H3(Q,{offset:$,length:J-$},{...q.formattingOptions,keepLines:!1});for(let U=Y.length-1;U>=0;U--){let G=Y[U];Q=r4(Q,G),$=Math.min($,G.offset),J=Math.max(J,G.offset+G.length),J+=G.content.length-G.length}let H=Z.length-(Q.length-J)-$;return[{offset:$,length:H,content:Q.substring($,J)}]}function r4(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var w$=B(()=>{K3();W3()});function x$(Z,X,q,Q){return I$(Z,X,q,Q)}function P$(Z,X){let q=X.slice(0).sort(($,J)=>{let Y=$.offset-J.offset;if(Y===0)return $.length-J.length;return Y}),Q=Z.length;for(let $=q.length-1;$>=0;$--){let J=q[$];if(J.offset+J.length<=Q)Z=r4(Z,J);else throw Error("Overlapping edit");Q=J.offset}return Z}var O$,k$,V3,N$;var E$=B(()=>{K3();w$();o4();W3();(function(Z){Z[Z.None=0]="None",Z[Z.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=2]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=4]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=6]="InvalidCharacter"})(O$||(O$={}));(function(Z){Z[Z.OpenBraceToken=1]="OpenBraceToken",Z[Z.CloseBraceToken=2]="CloseBraceToken",Z[Z.OpenBracketToken=3]="OpenBracketToken",Z[Z.CloseBracketToken=4]="CloseBracketToken",Z[Z.CommaToken=5]="CommaToken",Z[Z.ColonToken=6]="ColonToken",Z[Z.NullKeyword=7]="NullKeyword",Z[Z.TrueKeyword=8]="TrueKeyword",Z[Z.FalseKeyword=9]="FalseKeyword",Z[Z.StringLiteral=10]="StringLiteral",Z[Z.NumericLiteral=11]="NumericLiteral",Z[Z.LineCommentTrivia=12]="LineCommentTrivia",Z[Z.BlockCommentTrivia=13]="BlockCommentTrivia",Z[Z.LineBreakTrivia=14]="LineBreakTrivia",Z[Z.Trivia=15]="Trivia",Z[Z.Unknown=16]="Unknown",Z[Z.EOF=17]="EOF"})(k$||(k$={}));V3=j$;(function(Z){Z[Z.InvalidSymbol=1]="InvalidSymbol",Z[Z.InvalidNumberFormat=2]="InvalidNumberFormat",Z[Z.PropertyNameExpected=3]="PropertyNameExpected",Z[Z.ValueExpected=4]="ValueExpected",Z[Z.ColonExpected=5]="ColonExpected",Z[Z.CommaExpected=6]="CommaExpected",Z[Z.CloseBraceExpected=7]="CloseBraceExpected",Z[Z.CloseBracketExpected=8]="CloseBracketExpected",Z[Z.EndOfFileExpected=9]="EndOfFileExpected",Z[Z.InvalidCommentToken=10]="InvalidCommentToken",Z[Z.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=12]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=14]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=16]="InvalidCharacter"})(N$||(N$={}))});function R0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var A6=()=>{};import{tracingChannel as __,channel as M_}from"node:diagnostics_channel";var U0,T6,R_,B3=()=>U0.hasSubscribers||T6.hasSubscribers,y$,v$,F_=(Z,X,q,Q)=>{typeof v$.emitWarning=="function"?v$.emitWarning(Z,X,q,Q):console.error(`[${q}] ${X}: ${Z}`)},D_=(Z)=>!y$.has(Z),z1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),C$=(Z)=>z1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?t4:null:null,t4,A_=class Z{heap;length;static#q=!1;static create(X){let q=C$(X);if(!q)return[];Z.#q=!0;let Q=new Z(X,q);return Z.#q=!1,Q}constructor(X,q){if(!Z.#q)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new q(X),this.length=0}push(X){this.heap[this.length++]=X}pop(){return this.heap[--this.length]}},S$;var b$=B(()=>{U0=M_("lru-cache:metrics"),T6=__("lru-cache"),R_=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,y$=new Set,v$=typeof process=="object"&&process?process:{},t4=class extends Array{constructor(Z){super(Z),this.fill(0)}},S$=class Z{#q;#Q;#X;#Y;#K;#V;#A;#_;get perf(){return this.#_}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#U;#J;#Z;#L;#M;#B;#G;#j;#W;#I;#w;#R;#F;#O;#h;#z;#v;static unsafeExposeInternals(X){return{starts:X.#w,ttls:X.#R,autopurgeTimers:X.#F,sizes:X.#I,keyMap:X.#U,keyList:X.#J,valList:X.#Z,next:X.#L,prev:X.#M,get head(){return X.#B},get tail(){return X.#G},free:X.#j,isBackgroundFetch:(q)=>X.#$(q),backgroundFetch:(q,Q,$,J)=>X.#m(q,Q,$,J),moveToTail:(q)=>X.#b(q),indexes:(q)=>X.#k(q),rindexes:(q)=>X.#N(q),isStale:(q)=>X.#D(q)}}get max(){return this.#q}get maxSize(){return this.#Q}get calculatedSize(){return this.#T}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#K}constructor(X){let{max:q=0,ttl:Q,ttlResolution:$=1,ttlAutopurge:J,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:U,dispose:G,onInsert:W,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:z,maxSize:_=0,maxEntrySize:M=0,sizeCalculation:R,fetchMethod:F,memoMethod:k,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:j,ignoreFetchAbort:A,backgroundFetchSize:S=1,perf:O}=X;if(this.backgroundFetchSize=S,O!==void 0&&typeof O?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#_=O??R_,q!==0&&!z1(q))throw TypeError("max option must be a nonnegative integer");let x=q?C$(q):Array;if(!x)throw Error("invalid max value: "+q);if(this.#q=q,this.#Q=_,this.maxEntrySize=M||this.#Q,this.sizeCalculation=R,this.sizeCalculation){if(!this.#Q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(k!==void 0&&typeof k!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=k,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#h=!!F,this.#U=new Map,this.#J=Array.from({length:q}).fill(void 0),this.#Z=Array.from({length:q}).fill(void 0),this.#L=new x(q),this.#M=new x(q),this.#B=0,this.#G=0,this.#j=A_.create(q),this.#H=0,this.#T=0,typeof G=="function"&&(this.#X=G),typeof W=="function"&&(this.#Y=W),typeof V=="function"?(this.#K=V,this.#W=[]):(this.#K=void 0,this.#W=void 0),this.#O=!!this.#X,this.#v=!!this.#Y,this.#z=!!this.#K,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!z,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!j,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#Q!==0&&!z1(this.#Q))throw TypeError("maxSize must be a positive integer if specified");if(!z1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!U,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=z1($)||$===0?$:1,this.ttlAutopurge=!!J,this.ttl=Q||0,this.ttl){if(!z1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#q===0&&this.ttl===0&&this.#Q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#q&&!this.#Q){let E="LRU_CACHE_UNBOUNDED";D_(E)&&(y$.add(E),F_("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,Z))}}getRemainingTTL(X){return this.#U.has(X)?1/0:0}#u(){let X=new t4(this.#q),q=new t4(this.#q);this.#R=X,this.#w=q;let Q=this.ttlAutopurge?Array.from({length:this.#q}):void 0;this.#F=Q,this.#p=(U,G,W=this.#_.now())=>{q[U]=G!==0?W:0,X[U]=G,$(U,G)},this.#y=(U)=>{q[U]=X[U]!==0?this.#_.now():0,$(U,X[U])};let $=this.ttlAutopurge?(U,G)=>{if(Q?.[U]&&(clearTimeout(Q[U]),Q[U]=void 0),G&&G!==0&&Q){let W=setTimeout(()=>{this.#D(U)?(this.#x(this.#J[U],"expire"),Q[U]=void 0):$(U,H(U))},G+1);W.unref&&W.unref(),Q[U]=W}}:()=>{};this.#P=(U,G)=>{if(X[G]){let W=X[G],V=q[G];if(!W||!V)return;U.ttl=W,U.start=V,U.now=J||Y();let L=U.now-V;U.remainingTTL=W-L}};let J=0,Y=()=>{let U=this.#_.now();if(this.ttlResolution>0){J=U;let G=setTimeout(()=>J=0,this.ttlResolution);G.unref&&G.unref()}return U};this.getRemainingTTL=(U)=>{let G=this.#U.get(U);return G===void 0?0:H(G)};let H=(U)=>{let G=X[U],W=q[U];if(!G||!W)return 1/0;let V=(J||Y())-W;return G-V};this.#D=(U)=>{let G=q[U],W=X[U];return!!W&&!!G&&(J||Y())-G>W}}#y=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let X=new t4(this.#q);this.#T=0,this.#I=X,this.#C=(q)=>{this.#T-=X[q],X[q]=0},this.#d=(q,Q,$,J)=>{if(!z1($)){if(this.#$(Q))return this.backgroundFetchSize;if(J){if(typeof J!="function")throw TypeError("sizeCalculation must be a function");if($=J(Q,q),!z1($))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return $},this.#f=(q,Q,$)=>{if(X[q]=Q,this.#Q){let J=this.#Q-X[q];for(;this.#T>J;)this.#g(!0)}this.#T+=X[q],$&&($.entrySize=Q,$.totalCalculatedSize=this.#T)}}#C=(X)=>{};#f=(X,q,Q)=>{};#d=(X,q,Q,$)=>{if(Q||$)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#G;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#B);)q=this.#M[q]}*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let q=this.#B;this.#c(q)&&((X||!this.#D(q))&&(yield q),q!==this.#G);)q=this.#L[q]}#c(X){return X!==void 0&&this.#U.get(this.#J[X])===X}*entries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*rentries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#J[X]!==void 0&&!this.#$(this.#Z[X])&&(yield[this.#J[X],this.#Z[X]])}*keys(){for(let X of this.#k()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*rkeys(){for(let X of this.#N()){let q=this.#J[X];q!==void 0&&!this.#$(this.#Z[X])&&(yield q)}}*values(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#$(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#$(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,q={}){for(let Q of this.#k()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;if(J!==void 0&&X(J,this.#J[Q],this))return this.#S(this.#J[Q],q)}}forEach(X,q=this){for(let Q of this.#k()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}rforEach(X,q=this){for(let Q of this.#N()){let $=this.#Z[Q],J=this.#$($)?$.__staleWhileFetching:$;J!==void 0&&X.call(q,J,this.#J[Q],this)}}purgeStale(){let X=!1;for(let q of this.#N({allowStale:!0}))this.#D(q)&&(this.#x(this.#J[q],"expire"),X=!0);return X}info(X){let q=this.#U.get(X);if(q===void 0)return;let Q=this.#Z[q],$=this.#$(Q)?Q.__staleWhileFetching:Q;if($===void 0)return;let J={value:$};if(this.#R&&this.#w){let Y=this.#R[q],H=this.#w[q];if(Y&&H){let U=Y-(this.#_.now()-H);J.ttl=U,J.start=Date.now()}}return this.#I&&(J.size=this.#I[q]),J}dump(){let X=[];for(let q of this.#k({allowStale:!0})){let Q=this.#J[q],$=this.#Z[q],J=this.#$($)?$.__staleWhileFetching:$;if(J===void 0||Q===void 0)continue;let Y={value:J};if(this.#R&&this.#w){Y.ttl=this.#R[q];let H=this.#_.now()-this.#w[q];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[q]),X.unshift([Q,Y])}return X}load(X){this.clear();for(let[q,Q]of X){if(Q.start){let $=Date.now()-Q.start;Q.start=this.#_.now()-$}this.#E(q,Q.value,Q)}}set(X,q,Q={}){let{status:$=U0.hasSubscribers?{}:void 0}=Q;Q.status=$,$&&($.op="set",$.key=X,q!==void 0&&($.value=q),$.cache=this);let J=this.#E(X,q,Q);return $&&U0.hasSubscribers&&U0.publish($),J}#E(X,q,Q,$){let{ttl:J=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:U=this.sizeCalculation,status:G}=Q,W=this.#$(q);if(q===void 0)return G&&(G.set="deleted"),this.delete(X),this;let{noUpdateTTL:V=this.noUpdateTTL}=Q;G&&!W&&(G.value=q);let L=this.#d(X,q,Q.size||0,U,G);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#x(X,"set"),G&&(G.set="miss",G.maxEntrySizeExceeded=!0),this;let z=this.#H===0?void 0:this.#U.get(X);if(z===void 0)z=this.#H===0?this.#G:this.#j.length!==0?this.#j.pop():this.#H===this.#q?this.#g(!1):this.#H,this.#J[z]=X,this.#Z[z]=q,this.#U.set(X,z),this.#L[this.#G]=z,this.#M[z]=this.#G,this.#G=z,this.#H++,this.#f(z,L,G),G&&(G.set="add"),V=!1,this.#v&&!W&&this.#Y?.(q,X,"add");else{this.#b(z);let _=this.#Z[z];if(q!==_){if(!H)if(this.#$(_)){_!==$&&_.__abortController.abort(Error("replaced"));let{__staleWhileFetching:M}=_;M!==void 0&&M!==q&&(this.#O&&this.#X?.(M,X,"set"),this.#z&&this.#W?.push([M,X,"set"]))}else this.#O&&this.#X?.(_,X,"set"),this.#z&&this.#W?.push([_,X,"set"]);if(this.#C(z),this.#f(z,L,G),this.#Z[z]=q,!W){let M=_&&this.#$(_)?_.__staleWhileFetching:_,R=M===void 0?"add":q!==M?"replace":"update";G&&(G.set=R,M!==void 0&&(G.oldValue=M)),this.#v&&this.onInsert?.(q,X,R)}}else W||(G&&(G.set="update"),this.#v&&this.onInsert?.(q,X,"update"))}if(J!==0&&!this.#R&&this.#u(),this.#R&&(V||this.#p(z,J,Y),G&&this.#P(G,z)),!H&&this.#z&&this.#W){let _=this.#W,M;for(;M=_?.shift();)this.#K?.(...M)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#g(!0),this.#$(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#z&&this.#W){let X=this.#W,q;for(;q=X?.shift();)this.#K?.(...q)}}}#g(X){let q=this.#B,Q=this.#J[q],$=this.#Z[q],J=this.#$($);J&&$.__abortController.abort(Error("evicted"));let Y=J?$.__staleWhileFetching:$;return(this.#O||this.#z)&&Y!==void 0&&(this.#O&&this.#X?.(Y,Q,"evict"),this.#z&&this.#W?.push([Y,Q,"evict"])),this.#C(q),this.#F?.[q]&&(clearTimeout(this.#F[q]),this.#F[q]=void 0),X&&(this.#J[q]=void 0,this.#Z[q]=void 0,this.#j.push(q)),this.#H===1?(this.#B=this.#G=0,this.#j.length=0):this.#B=this.#L[q],this.#U.delete(Q),this.#H--,q}has(X,q={}){let{status:Q=U0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="has",Q.key=X,Q.cache=this);let $=this.#o(X,q);return U0.hasSubscribers&&U0.publish(Q),$}#o(X,q={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:$}=q,J=this.#U.get(X);if(J!==void 0){let Y=this.#Z[J];if(this.#$(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D(J))$&&($.has="stale",this.#P($,J));else return Q&&this.#y(J),$&&($.has="hit",this.#P($,J)),!0}else $&&($.has="miss");return!1}peek(X,q={}){let{status:Q=B3()?{}:void 0}=q;Q&&(Q.op="peek",Q.key=X,Q.cache=this),q.status=Q;let $=this.#s(X,q);return U0.hasSubscribers&&U0.publish(Q),$}#s(X,q){let{status:Q,allowStale:$=this.allowStale}=q,J=this.#U.get(X);if(J===void 0||!$&&this.#D(J)){Q&&(Q.peek=J===void 0?"miss":"stale");return}let Y=this.#Z[J],H=this.#$(Y)?Y.__staleWhileFetching:Y;return Q&&(H!==void 0?(Q.peek="hit",Q.value=H):Q.peek="miss"),H}#m(X,q,Q,$){let J=q===void 0?void 0:this.#Z[q];if(this.#$(J))return J;let Y=new AbortController,{signal:H}=Q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let U={signal:Y.signal,options:Q,context:$},G=(M,R=!1)=>{let{aborted:F}=Y.signal,k=Q.ignoreFetchAbort&&M!==void 0,D=Q.ignoreFetchAbort||!!(Q.allowStaleOnFetchAbort&&M!==void 0);if(Q.status&&(F&&!R?(Q.status.fetchAborted=!0,Q.status.fetchError=Y.signal.reason,k&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),F&&!k&&!R)return V(Y.signal.reason,D);let w=z,T=this.#Z[q];return(T===z||T===void 0&&k&&R)&&(M===void 0?w.__staleWhileFetching!==void 0?this.#Z[q]=w.__staleWhileFetching:this.#x(X,"fetch"):(Q.status&&(Q.status.fetchUpdated=!0),this.#E(X,M,U.options,w))),M},W=(M)=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=M),V(M,!1)),V=(M,R)=>{let{aborted:F}=Y.signal,k=F&&Q.allowStaleOnFetchAbort,D=k||Q.allowStaleOnFetchRejection,w=D||Q.noDeleteOnFetchRejection,T=z;if(this.#Z[q]===z&&(!w||!R&&T.__staleWhileFetching===void 0?this.#x(X,"fetch"):k||(this.#Z[q]=T.__staleWhileFetching)),D)return Q.status&&T.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw M},L=(M,R)=>{let F=this.#V?.(X,J,U);Y.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(M(void 0),Q.allowStaleOnFetchAbort&&(M=(k)=>G(k,!0)))}),F&&F instanceof Promise?F.then((k)=>M(k===void 0?void 0:k),R):F!==void 0&&M(F)};Q.status&&(Q.status.fetchDispatched=!0);let z=new Promise(L).then(G,W),_=Object.assign(z,{__abortController:Y,__staleWhileFetching:J,__returned:void 0});return q===void 0?(this.#E(X,_,{...U.options,status:void 0}),q=this.#U.get(X)):this.#Z[q]=_,_}#$(X){if(!this.#h)return!1;let q=X;return!!q&&q instanceof Promise&&q.hasOwnProperty("__staleWhileFetching")&&q.__abortController instanceof AbortController}fetch(X,q={}){let Q=T6.hasSubscribers,{status:$=B3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#l(X,q);return $&&Q&&($.trace=!0,T6.tracePromise(()=>J,$).catch(()=>{})),J}async#l(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:U=0,sizeCalculation:G=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:z=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:M,forceRefresh:R=!1,status:F,signal:k}=q;if(F&&(F.op="fetch",F.key=X,R&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(X,{allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,status:F});let D={allowStale:Q,updateAgeOnGet:$,noDeleteOnStaleGet:J,ttl:Y,noDisposeOnSet:H,size:U,sizeCalculation:G,noUpdateTTL:W,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:_,ignoreFetchAbort:z,status:F,signal:k},w=this.#U.get(X);if(w===void 0){F&&(F.fetch="miss");let T=this.#m(X,w,D,M);return T.__returned=T}else{let T=this.#Z[w];if(this.#$(T)){let O=Q&&T.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",O&&(F.returnedStale=!0)),O?T.__staleWhileFetching:T.__returned=T}let j=this.#D(w);if(!R&&!j)return F&&(F.fetch="hit"),this.#b(w),$&&this.#y(w),F&&this.#P(F,w),T;let A=this.#m(X,w,D,M),S=A.__staleWhileFetching!==void 0&&Q;return F&&(F.fetch=j?"stale":"refresh",S&&j&&(F.returnedStale=!0)),S?A.__staleWhileFetching:A.__returned=A}}forceFetch(X,q={}){let Q=T6.hasSubscribers,{status:$=B3()?{}:void 0}=q;q.status=$,$&&q.context&&($.context=q.context);let J=this.#r(X,q);return $&&Q&&($.trace=!0,T6.tracePromise(()=>J,$).catch(()=>{})),J}async#r(X,q={}){let Q=await this.#l(X,q);if(Q===void 0)throw Error("fetch() returned undefined");return Q}memo(X,q={}){let{status:Q=U0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="memo",Q.key=X,q.context&&(Q.context=q.context),Q.cache=this);let $=this.#t(X,q);return Q&&(Q.value=$),U0.hasSubscribers&&U0.publish(Q),$}#t(X,q={}){let Q=this.#A;if(!Q)throw Error("no memoMethod provided to constructor");let{context:$,status:J,forceRefresh:Y,...H}=q;J&&Y&&(J.forceRefresh=!0);let U=this.#S(X,H),G=Y||U===void 0;if(J&&(J.memo=G?"miss":"hit",G||(J.value=U)),!G)return U;let W=Q(X,U,{options:H,context:$});return J&&(J.value=W),this.#E(X,W,H),W}get(X,q={}){let{status:Q=U0.hasSubscribers?{}:void 0}=q;q.status=Q,Q&&(Q.op="get",Q.key=X,Q.cache=this);let $=this.#S(X,q);return Q&&($!==void 0&&(Q.value=$),U0.hasSubscribers&&U0.publish(Q)),$}#S(X,q={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:$=this.updateAgeOnGet,noDeleteOnStaleGet:J=this.noDeleteOnStaleGet,status:Y}=q,H=this.#U.get(X);if(H===void 0){Y&&(Y.get="miss");return}let U=this.#Z[H],G=this.#$(U);return Y&&this.#P(Y,H),this.#D(H)?G?(Y&&(Y.get="stale-fetching"),Q&&U.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),U.__staleWhileFetching):void 0):(J||this.#x(X,"expire"),Y&&(Y.get="stale"),Q?(Y&&(Y.returnedStale=!0),U):void 0):(Y&&(Y.get=G?"fetching":"hit"),this.#b(H),$&&this.#y(H),G?U.__staleWhileFetching:U)}#n(X,q){this.#M[q]=X,this.#L[X]=q}#b(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#n(this.#M[X],this.#L[X]),this.#n(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,q){U0.hasSubscribers&&U0.publish({op:"delete",delete:q,key:X,cache:this});let Q=!1;if(this.#H!==0){let $=this.#U.get(X);if($!==void 0)if(this.#F?.[$]&&(clearTimeout(this.#F[$]),this.#F[$]=void 0),Q=!0,this.#H===1)this.#i(q);else{this.#C($);let J=this.#Z[$];if(this.#$(J)?J.__abortController.abort(Error("deleted")):(this.#O||this.#z)&&(this.#O&&this.#X?.(J,X,q),this.#z&&this.#W?.push([J,X,q])),this.#U.delete(X),this.#J[$]=void 0,this.#Z[$]=void 0,$===this.#G)this.#G=this.#M[$];else if($===this.#B)this.#B=this.#L[$];else{let Y=this.#M[$];this.#L[Y]=this.#L[$];let H=this.#L[$];this.#M[H]=this.#M[$]}this.#H--,this.#j.push($)}}if(this.#z&&this.#W?.length){let $=this.#W,J;for(;J=$?.shift();)this.#K?.(...J)}return Q}clear(){return this.#i("delete")}#i(X){for(let q of this.#N({allowStale:!0})){let Q=this.#Z[q];if(this.#$(Q))Q.__abortController.abort(Error("deleted"));else{let $=this.#J[q];this.#O&&this.#X?.(Q,$,X),this.#z&&this.#W?.push([Q,$,X])}}if(this.#U.clear(),this.#Z.fill(void 0),this.#J.fill(void 0),this.#R&&this.#w){this.#R.fill(0),this.#w.fill(0);for(let q of this.#F??[])q!==void 0&&clearTimeout(q);this.#F?.fill(void 0)}if(this.#I&&this.#I.fill(0),this.#B=0,this.#G=0,this.#j.length=0,this.#T=0,this.#H=0,this.#z&&this.#W){let q=this.#W,Q;for(;Q=q?.shift();)this.#K?.(...Q)}}}});function Sv(Z,X=300000){let q=new Map,Q=new Map,$=async(...J)=>{let Y=m(J),H=q.get(Y),U=Date.now();if(!H){let G=Q.get(Y);if(G)return G;let W=Z(...J);Q.set(Y,W);try{let V=await W;if(Q.get(Y)===W)q.set(Y,{value:V,timestamp:U,refreshing:!1});return V}finally{if(Q.get(Y)===W)Q.delete(Y)}}if(H&&U-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let G=H;return Z(...J).then((W)=>{if(q.get(Y)===G)q.set(Y,{value:W,timestamp:Date.now(),refreshing:!1})}).catch((W)=>{if(g(W),q.get(Y)===G)q.delete(Y)}),H.value}return q.get(Y).value};return $.cache={clear:()=>{q.clear(),Q.clear()}},$}function _1(Z,X,q=100){let Q=new S$({max:q}),$=(...J)=>{let Y=X(...J),H=Q.get(Y);if(H!==void 0)return H;let U=Z(...J);return Q.set(Y,U),U};return $.cache={clear:()=>Q.clear(),size:()=>Q.size,delete:(J)=>Q.delete(J),get:(J)=>Q.peek(J),has:(J)=>Q.has(J)},$}var e4=B(()=>{b$();y0();L0()});import{open as T_,readFile as j_,stat as I_}from"fs/promises";function f$(Z,X){try{return{ok:!0,value:JSON.parse(R0(Z))}}catch(q){if(X)g(q);return{ok:!1}}}function dv(Z){if(!Z)return null;try{return V3(R0(Z))}catch(X){return g(X),null}}function O_(Z){let X=g$,q=Z.length,Q=X(Z);if(!Q.error||Q.done||Q.read>=q)return Q.values;let{values:$,read:J}=Q;while(J<q){let Y=typeof Z==="string"?Z.indexOf(`
16
- `,J):Z.indexOf(10,J);if(Y===-1)break;J=Y+1;let H=X(Z,J);if(H.values.length>0)$=$.concat(H.values);if(!H.error||H.done||H.read>=q)break;J=H.read}return $}function k_(Z){let X=Z.length,q=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)q=3;let Q=[];while(q<X){let $=Z.indexOf(10,q);if($===-1)$=X;let J=Z.toString("utf8",q,$).trim();if(q=$+1,!J)continue;try{Q.push(JSON.parse(J))}catch{}}return Q}function N_(Z){let X=R0(Z),q=X.length,Q=0,$=[];while(Q<q){let J=X.indexOf(`
17
- `,Q);if(J===-1)J=q;let Y=X.substring(Q,J).trim();if(Q=J+1,!Y)continue;try{$.push(JSON.parse(Y))}catch{}}return $}function L3(Z){if(g$)return O_(Z);if(typeof Z==="string")return N_(Z);return k_(Z)}async function cv(Z){let H=[];try{let{size:X}=await I_(Z);if(X<=j6)return L3(await j_(Z));const q=z2(H,await T_(Z,"r"),1);let Q=Buffer.allocUnsafe(j6);let $=0;let J=X-j6;while($<j6){let{bytesRead:L}=await q.read(Q,$,j6-$,J+$);if(L===0)break;$+=L}let Y=Q.indexOf(10);if(Y!==-1&&Y<$-1)return L3(Q.subarray(Y+1,$));return L3(Q.subarray(0,$))}catch(U){var G=U,W=1}finally{var V=_2(H,G,W);V&&await V}}function lv(Z,X){try{if(!Z||Z.trim()==="")return m([X],null,4);let q=R0(Z),Q=V3(q);if(Array.isArray(Q)){let $=Q.length,H=x$(q,$===0?[0]:[$],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let U=[...Q,X];return m(U,null,4)}return P$(q,H)}else return m([X],null,4)}catch(q){return g(q),m([X],null,4)}}var w_=8192,h$,k0,g$,j6=104857600;var I6=B(()=>{E$();A6();y0();e4();L0();h$=_1(f$,(Z)=>Z,50),k0=Object.assign(function(X,q=!0){if(!X)return null;let Q=X.length>w_?f$(X,q):h$(X,q);return Q.ok?Q.value:null},{cache:h$.cache});g$=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});import{realpathSync as x_}from"fs";function m$(){return process.versions.bun!==void 0}function ov(){let Z=process.argv[1]||"";if(Z&&!P_.test(Z))return Z;let X=process.execPath||"";if(!X)return Z;try{return x_(X)}catch{return X}}function sv(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var P_;var u$=B(()=>{P_=/(^|[/\\])(\$bunfs|~BUN)[/\\]/i});function s(Z){if(typeof Z!=="object"||Z===null)return!1;let X=Object.getPrototypeOf(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var e0=()=>{};import{fileURLToPath as E_}from"node:url";var M2=(Z,X)=>{let q=_3(v_(Z));if(typeof q!=="string")throw TypeError(`${X} must be a string or a file URL: ${q}.`);return q},v_=(Z)=>z3(Z)?Z.toString():Z,z3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,_3=(Z)=>Z instanceof URL?E_(Z):Z;var R2=()=>{};var Z8=(Z,X=[],q={})=>{let Q=M2(Z,"First argument"),[$,J]=s(X)?[[],X]:[X,q];if(!Array.isArray($))throw TypeError(`Second argument must be either an array of arguments or an options object: ${$}`);if($.some((U)=>typeof U==="object"&&U!==null))throw TypeError(`Second argument must be an array of strings: ${$}`);let Y=$.map(String),H=Y.find((U)=>U.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!s(J))throw TypeError(`Last argument must be an options object: ${J}`);return[Q,Y,{__proto__:null,...J}]};var M3=B(()=>{e0();R2()});import{StringDecoder as y_}from"node:string_decoder";var p$,d$=(Z)=>p$.call(Z)==="[object ArrayBuffer]",t=(Z)=>p$.call(Z)==="[object Uint8Array]",Z1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),C_,c$=(Z)=>C_.encode(Z),S_,X8=(Z)=>S_.decode(Z),l$=(Z,X)=>{return b_(Z,X).join("")},b_=(Z,X)=>{if(X==="utf8"&&Z.every((J)=>typeof J==="string"))return Z;let q=new y_(X),Q=Z.map((J)=>typeof J==="string"?c$(J):J).map((J)=>q.write(J)),$=q.end();return $===""?Q:[...Q,$]},w6=(Z)=>{if(Z.length===1&&t(Z[0]))return Z[0];return R3(h_(Z))},h_=(Z)=>Z.map((X)=>typeof X==="string"?c$(X):X),R3=(Z)=>{let X=new Uint8Array(f_(Z)),q=0;for(let Q of Z)X.set(Q,q),q+=Q.length;return X},f_=(Z)=>{let X=0;for(let q of Z)X+=q.length;return X};var F0=B(()=>{({toString:p$}=Object.prototype),C_=new TextEncoder,S_=new TextDecoder});import{ChildProcess as g_}from"node:child_process";var o$=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),s$=(Z,X)=>{let q=[];for(let[J,Y]of Z.entries())q=m_({templates:Z,expressions:X,tokens:q,index:J,template:Y});if(q.length===0)throw TypeError("Template script must not be empty");let[Q,...$]=q;return[Q,$,{}]},m_=({templates:Z,expressions:X,tokens:q,index:Q,template:$})=>{if($===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[Q]}`);let{nextTokens:J,leadingWhitespaces:Y,trailingWhitespaces:H}=u_($,Z.raw[Q]),U=i$(q,J,Y);if(Q===X.length)return U;let G=X[Q],W=Array.isArray(G)?G.map((V)=>a$(V)):[a$(G)];return i$(U,W,H)},u_=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let q=[],Q=0,$=n$.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let U=X[H];if(n$.has(U)){if(Q!==Y)q.push(Z.slice(Q,Y));Q=Y+1}else if(U==="\\"){let G=X[H+1];if(G===`
18
- `)Y-=1,H+=1;else if(G==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=p_[G]??1}}let J=Q===Z.length;if(!J)q.push(Z.slice(Q));return{nextTokens:q,leadingWhitespaces:$,trailingWhitespaces:J}},n$,p_,i$=(Z,X,q)=>q||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],a$=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(s(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return d_(Z);if(Z instanceof g_||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${X}" in template expression`)},d_=({stdout:Z})=>{if(typeof Z==="string")return Z;if(t(Z))return X8(Z);if(Z===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof Z}" stdout in template expression`)};var r$=B(()=>{e0();F0();n$=new Set([" ","\t","\r",`
19
- `]),p_={x:3,u:5}});import F3 from"node:process";var C0=(Z)=>q8.includes(Z),q8,N0,Q8=(Z)=>N0[Z]??`stdio[${Z}]`;var X1=B(()=>{q8=[F3.stdin,F3.stdout,F3.stderr],N0=["stdin","stdout","stderr"]});import{debuglog as c_}from"node:util";var e$=(Z)=>{let X={...Z};for(let q of T3)X[q]=D3(Z,q);return X},D3=(Z,X)=>{let q=l_(Z),Q=Array.from({length:q+1}),$=n_(Z[X],Q,X,q);return r_($,X)},l_=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,N0.length):N0.length,n_=(Z,X,q,Q)=>s(Z)?i_(Z,X,q,Q):X.fill(Z),i_=(Z,X,q,Q)=>{for(let $ of Object.keys(Z).sort(a_))for(let J of o_($,q,Q))X[J]=Z[$];return X},a_=(Z,X)=>t$(Z)<t$(X)?1:-1,t$=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},o_=(Z,X,q)=>{if(Z==="ipc")return[q];let Q=A3(Z);if(Q===void 0||Q===0)throw TypeError(`"${X}.${Z}" is invalid.
20
- It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(Q!=="all"&&Q>=q)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
21
- Please set the "stdio" option to ensure that file descriptor exists.`);return Q==="all"?[1,2]:[Q]},A3=(Z)=>{if(Z==="all")return Z;if(N0.includes(Z))return N0.indexOf(Z);let X=s_.exec(Z);if(X!==null)return Number(X.groups.fdNumber)},s_,r_=(Z,X)=>Z.map((q)=>q===void 0?e_[X]:q),t_,e_,T3,q1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var Q1=B(()=>{e0();X1();s_=/^fd(?<fdNumber>\d+)$/,t_=c_("execa").enabled?"full":"none",e_={lines:!1,buffer:!0,maxBuffer:1e8,verbose:t_,stripFinalNewline:!0},T3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var F2=({verbose:Z},X)=>j3(Z,X)!=="none",D2=({verbose:Z},X)=>!["none","short"].includes(j3(Z,X)),ZJ=({verbose:Z},X)=>{let q=j3(Z,X);return $8(q)?q:void 0},j3=(Z,X)=>X===void 0?ZM(Z):q1(Z,X),ZM=(Z)=>Z.find((X)=>$8(X))??J8.findLast((X)=>Z.includes(X)),$8=(Z)=>typeof Z==="function",J8;var M1=B(()=>{Q1();J8=["none","short","full"]});import{platform as XM}from"node:process";import{stripVTControlCharacters as qM}from"node:util";var XJ=(Z,X)=>{let q=[Z,...X],Q=q.join(" "),$=q.map((J)=>KM(qJ(J))).join(" ");return{command:Q,escapedCommand:$}},O6=(Z)=>qM(Z).split(`
22
- `).map((X)=>qJ(X)).join(`
23
- `),qJ=(Z)=>Z.replaceAll(JM,(X)=>QM(X)),QM=(Z)=>{let X=YM[Z];if(X!==void 0)return X;let q=Z.codePointAt(0),Q=q.toString(16);return q<=HM?`\\u${Q.padStart(4,"0")}`:`\\U${Q}`},$M=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},JM,YM,HM=65535,KM=(Z)=>{if(UM.test(Z))return Z;return XM==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},UM;var Y8=B(()=>{JM=$M(),YM={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},UM=/^[\w\-./]+$/});import QJ from"node:process";function I3(){let{env:Z}=QJ,{TERM:X,TERM_PROGRAM:q}=Z;if(QJ.platform!=="win32")return X!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||q==="Terminus-Sublime"||q==="vscode"||X==="xterm-256color"||X==="alacritty"||X==="rxvt-unicode"||X==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var $J=()=>{};var JJ,YJ,GM,WM,VM,BM,LM,H8,Iy;var HJ=B(()=>{$J();JJ={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:"╱"},YJ={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:"⅒"},GM={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"},WM={...JJ,...YJ},VM={...JJ,...GM},BM=I3(),LM=BM?WM:VM,H8=LM,Iy=Object.entries(YJ)});import zM from"node:tty";var _M,C=(Z,X)=>{if(!_M)return($)=>$;let q=`\x1B[${Z}m`,Q=`\x1B[${X}m`;return($)=>{let J=$+"",Y=J.indexOf(Q);if(Y===-1)return q+J+Q;let H=q,U=0,W=(X===22?Q:"")+q;while(Y!==-1)H+=J.slice(U,Y)+W,U=Y+Q.length,Y=J.indexOf(Q,U);return H+=J.slice(U)+Q,H}},ky,KJ,Ny,xy,Py,Ey,vy,yy,Cy,Sy,by,hy,fy,gy,my,uy,py,K8,dy,cy,ly,ny,iy,ay,oy,sy,ry,UJ,ty,GJ,ey,ZC,XC,qC,QC,$C,JC,YC,HC,KC,UC;var WJ=B(()=>{_M=zM?.WriteStream?.prototype?.hasColors?.()??!1,ky=C(0,0),KJ=C(1,22),Ny=C(2,22),xy=C(3,23),Py=C(4,24),Ey=C(53,55),vy=C(7,27),yy=C(8,28),Cy=C(9,29),Sy=C(30,39),by=C(31,39),hy=C(32,39),fy=C(33,39),gy=C(34,39),my=C(35,39),uy=C(36,39),py=C(37,39),K8=C(90,39),dy=C(40,49),cy=C(41,49),ly=C(42,49),ny=C(43,49),iy=C(44,49),ay=C(45,49),oy=C(46,49),sy=C(47,49),ry=C(100,49),UJ=C(91,39),ty=C(92,39),GJ=C(93,39),ey=C(94,39),ZC=C(95,39),XC=C(96,39),qC=C(97,39),QC=C(101,49),$C=C(102,49),JC=C(103,49),YC=C(104,49),HC=C(105,49),KC=C(106,49),UC=C(107,49)});var VJ=B(()=>{WJ()});var zJ=({type:Z,message:X,timestamp:q,piped:Q,commandId:$,result:{failed:J=!1}={},options:{reject:Y=!0}})=>{let H=MM(q),U=RM[Z]({failed:J,reject:Y,piped:Q}),G=FM[Z]({reject:Y});return`${K8(`[${H}]`)} ${K8(`[${$}]`)} ${G(U)} ${G(X)}`},MM=(Z)=>`${U8(Z.getHours(),2)}:${U8(Z.getMinutes(),2)}:${U8(Z.getSeconds(),2)}.${U8(Z.getMilliseconds(),3)}`,U8=(Z,X)=>String(Z).padStart(X,"0"),BJ=({failed:Z,reject:X})=>{if(!Z)return H8.tick;return X?H8.cross:H8.warning},RM,LJ=(Z)=>Z,FM;var _J=B(()=>{HJ();VJ();RM={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:BJ,duration:BJ},FM={command:()=>KJ,output:()=>LJ,ipc:()=>LJ,error:({reject:Z})=>Z?UJ:GJ,duration:()=>K8}});var MJ=(Z,X,q)=>{let Q=ZJ(X,q);return Z.map(({verboseLine:$,verboseObject:J})=>DM($,J,Q)).filter(($)=>$!==void 0).map(($)=>AM($)).join("")},DM=(Z,X,q)=>{if(q===void 0)return Z;let Q=q(Z,X);if(typeof Q==="string")return Q},AM=(Z)=>Z.endsWith(`
24
- `)?Z:`${Z}
25
- `;var RJ=B(()=>{M1()});import{inspect as TM}from"node:util";var d0=({type:Z,verboseMessage:X,fdNumber:q,verboseInfo:Q,result:$})=>{let J=jM({type:Z,result:$,verboseInfo:Q}),Y=IM(X,J),H=MJ(Y,Q,q);if(H!=="")console.warn(H.slice(0,-1))},jM=({type:Z,result:X,verboseInfo:q})=>{let{escapedCommand:Q,commandId:$,rawOptions:J}=q,{piped:Y=!1,...H}=J;return{type:Z,escapedCommand:Q,commandId:`${$}`,timestamp:new Date,piped:Y,result:X,options:H}},IM=(Z,X)=>Z.split(`
26
- `).map((q)=>wM({...X,message:q})),wM=(Z)=>{return{verboseLine:zJ(Z),verboseObject:Z}},G8=(Z)=>{let X=typeof Z==="string"?Z:TM(Z);return O6(X).replaceAll("\t",()=>" ".repeat(OM))},OM=2;var A2=B(()=>{Y8();_J();RJ()});var FJ=(Z,X)=>{if(!F2(X))return;d0({type:"command",verboseMessage:Z,verboseInfo:X})};var DJ=B(()=>{M1();A2()});var AJ=(Z,X,q)=>{xM(Z);let Q=kM(Z);return{verbose:Z,escapedCommand:X,commandId:Q,rawOptions:q}},kM=(Z)=>F2({verbose:Z})?NM++:void 0,NM=0n,xM=(Z)=>{for(let X of Z){if(X===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(X===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!J8.includes(X)&&!$8(X)){let q=J8.map((Q)=>`'${Q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${q} or a function.`)}}};var TJ=B(()=>{M1()});import{hrtime as jJ}from"node:process";var W8=()=>jJ.bigint(),w3=(Z)=>Number(jJ.bigint()-Z)/1e6;var V8=()=>{};var B8=(Z,X,q)=>{let Q=W8(),{command:$,escapedCommand:J}=XJ(Z,X),Y=D3(q,"verbose"),H=AJ(Y,J,{...q});return FJ(J,H),{command:$,escapedCommand:J,startTime:Q,verboseInfo:H}};var O3=B(()=>{DJ();TJ();V8();Y8();Q1()});function L8(Z={}){let{env:X=process.env,platform:q=process.platform}=Z;if(q!=="win32")return"PATH";return Object.keys(X).reverse().find((Q)=>Q.toUpperCase()==="PATH")||"Path"}var IJ=()=>{};var wJ=()=>{};import{promisify as PM}from"node:util";import{execFile as EM,execFileSync as uC}from"node:child_process";import OJ from"node:path";import{fileURLToPath as vM}from"node:url";function z8(Z){return Z instanceof URL?vM(Z):Z}function kJ(Z){return{*[Symbol.iterator](){let X=OJ.resolve(z8(Z)),q;while(q!==X)yield X,q=X,X=OJ.resolve(X,"..")}}}var cC;var NJ=B(()=>{wJ();cC=PM(EM)});import _8 from"node:process";import h1 from"node:path";var yM=({cwd:Z=_8.cwd(),path:X=_8.env[L8()],preferLocal:q=!0,execPath:Q=_8.execPath,addExecPath:$=!0}={})=>{let J=h1.resolve(z8(Z)),Y=[],H=X.split(h1.delimiter);if(q)CM(Y,H,J);if($)SM(Y,H,Q,J);return X===""||X===h1.delimiter?`${Y.join(h1.delimiter)}${X}`:[...Y,X].join(h1.delimiter)},CM=(Z,X,q)=>{for(let Q of kJ(q)){let $=h1.join(Q,"node_modules/.bin");if(!X.includes($))Z.push($)}},SM=(Z,X,q,Q)=>{let $=h1.resolve(Q,z8(q),"..");if(!X.includes($))Z.push($)},xJ=({env:Z=_8.env,...X}={})=>{Z={...Z};let q=L8({env:Z});return X.path=Z[q],Z[q]=yM(X),Z};var PJ=B(()=>{IJ();NJ()});var EJ=(Z,X,q)=>{let Q=q?R8:M8,$=Z instanceof c0?{}:{cause:Z};return new Q(X,$)},c0,vJ=(Z,X)=>{Object.defineProperties(Z.prototype,{name:{value:X,writable:!0,enumerable:!1,configurable:!0},[CJ]:{value:!0,writable:!1,enumerable:!1,configurable:!1}})},yJ=(Z)=>F8(Z)&&(CJ in Z),CJ,F8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",M8,R8;var f1=B(()=>{c0=class c0 extends Error{};CJ=Symbol("isExecaError");M8=class M8 extends Error{};vJ(M8,M8.name);R8=class R8 extends Error{};vJ(R8,R8.name)});var SJ=()=>{let Z=k3-bJ+1;return Array.from({length:Z},bM)},bM=(Z,X)=>({name:`SIGRT${X+1}`,number:bJ+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),bJ=34,k3=64;var N3=()=>{};var hJ;var fJ=B(()=>{hJ=[{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"}]});import{constants as hM}from"node:os";var x3=()=>{let Z=SJ();return[...hJ,...Z].map(fM)},fM=({name:Z,number:X,description:q,action:Q,forced:$=!1,standard:J})=>{let{signals:{[Z]:Y}}=hM,H=Y!==void 0;return{name:Z,number:H?Y:X,description:q,supported:H,action:Q,forced:$,standard:J}};var gJ=B(()=>{fJ();N3()});import{constants as gM}from"node:os";var mM=()=>{let Z=x3();return Object.fromEntries(Z.map(uM))},uM=({name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y})=>[Z,{name:Z,number:X,description:q,supported:Q,action:$,forced:J,standard:Y}],mJ,pM=()=>{let Z=x3(),X=k3+1,q=Array.from({length:X},(Q,$)=>dM($,Z));return Object.assign({},...q)},dM=(Z,X)=>{let q=cM(Z,X);if(q===void 0)return{};let{name:Q,description:$,supported:J,action:Y,forced:H,standard:U}=q;return{[Z]:{name:Q,number:Z,description:$,supported:J,action:Y,forced:H,standard:U}}},cM=(Z,X)=>{let q=X.find(({name:Q})=>gM.signals[Q]===Z);if(q!==void 0)return q;return X.find((Q)=>Q.number===Z)},KS;var uJ=B(()=>{N3();gJ();mJ=mM(),KS=pM()});import{constants as k6}from"node:os";var dJ=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return lJ(Z,"option `killSignal`")},cJ=(Z)=>Z===0?Z:lJ(Z,"`subprocess.kill()`'s argument"),lJ=(Z,X)=>{if(Number.isInteger(Z))return lM(Z,X);if(typeof Z==="string")return iM(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
27
- ${P3()}`)},lM=(Z,X)=>{if(pJ.has(Z))return pJ.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
28
- ${P3()}`)},nM=()=>new Map(Object.entries(k6.signals).reverse().map(([Z,X])=>[X,Z])),pJ,iM=(Z,X)=>{if(Z in k6.signals)return Z;if(Z.toUpperCase()in k6.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
29
- ${P3()}`)},P3=()=>`Available signal names: ${aM()}.
30
- Available signal numbers: ${oM()}.`,aM=()=>Object.keys(k6.signals).sort().map((Z)=>`'${Z}'`).join(", "),oM=()=>[...new Set(Object.values(k6.signals).sort((Z,X)=>Z-X))].join(", "),D8=(Z)=>mJ[Z].description;var N6=B(()=>{uJ();pJ=nM()});import{setTimeout as sM}from"node:timers/promises";var nJ=(Z)=>{if(Z===!1)return Z;if(Z===!0)return rM;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},rM=5000,iJ=({kill:Z,options:{forceKillAfterDelay:X,killSignal:q},onInternalError:Q,context:$,controller:J},Y,H)=>{let{signal:U,error:G}=tM(Y,H,q);eM(G,Q);let W=Z(U);return ZR({kill:Z,signal:U,forceKillAfterDelay:X,killSignal:q,killResult:W,context:$,controller:J}),W},tM=(Z,X,q)=>{let[Q=q,$]=F8(Z)?[void 0,Z]:[Z,X];if(typeof Q!=="string"&&!Number.isInteger(Q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(Q)}`);if($!==void 0&&!F8($))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${$}`);return{signal:cJ(Q),error:$}},eM=(Z,X)=>{if(Z!==void 0)X.reject(Z)},ZR=async({kill:Z,signal:X,forceKillAfterDelay:q,killSignal:Q,killResult:$,context:J,controller:Y})=>{if(X===Q&&$)E3({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:Y.signal})},E3=async({kill:Z,forceKillAfterDelay:X,context:q,controllerSignal:Q})=>{if(X===!1)return;try{if(await sM(X,void 0,{signal:Q}),Z("SIGKILL"))q.isForcefullyTerminated??=!0}catch{}};var A8=B(()=>{f1();N6()});import{once as XR}from"node:events";var T8=async(Z,X)=>{if(!Z.aborted)await XR(Z,"abort",{signal:X})};var v3=()=>{};var aJ=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},oJ=({kill:Z,cancelSignal:X,gracefulCancel:q,context:Q,controller:$})=>X===void 0||q?[]:[qR(Z,X,Q,$)],qR=async(Z,X,q,{signal:Q})=>{throw await T8(X,Q),q.terminationReason??="cancel",Z(),X.reason};var y3=B(()=>{v3()});var T2=({methodName:Z,isSubprocess:X,ipc:q,isConnected:Q})=>{QR(Z,X,q),C3(Z,X,Q)},QR=(Z,X,q)=>{if(!q)throw Error(`${S0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},C3=(Z,X,q)=>{if(!q)throw Error(`${S0(Z,X)} cannot be used: the ${R1(X)} has already exited or disconnected.`)},sJ=(Z)=>{throw Error(`${S0("getOneMessage",Z)} could not complete: the ${R1(Z)} exited or disconnected.`)},rJ=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${R1(Z)} is sending a message too, instead of listening to incoming messages.
31
- This can be fixed by both sending a message and listening to incoming messages at the same time:
32
-
33
- const [receivedMessage] = await Promise.all([
34
- ${S0("getOneMessage",Z)},
35
- ${S0("sendMessage",Z,"message, {strict: true}")},
36
- ]);`)},j8=(Z,X)=>Error(`${S0("sendMessage",X)} failed when sending an acknowledgment response to the ${R1(X)}.`,{cause:Z}),tJ=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${R1(Z)} is not listening to incoming messages.`)},eJ=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${R1(Z)} exited without listening to incoming messages.`)},Z9=()=>Error(`\`cancelSignal\` aborted: the ${R1(!0)} disconnected.`),X9=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},q9=({error:Z,methodName:X,isSubprocess:q})=>{if(Z.code==="EPIPE")throw Error(`${S0(X,q)} cannot be used: the ${R1(q)} is disconnecting.`,{cause:Z})},Q9=({error:Z,methodName:X,isSubprocess:q,message:Q})=>{if($R(Z))throw Error(`${S0(X,q)}'s argument type is invalid: the message cannot be serialized: ${String(Q)}.`,{cause:Z})},$R=({code:Z,message:X})=>JR.has(Z)||YR.some((q)=>X.includes(q)),JR,YR,S0=(Z,X,q="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${HR(X)}${Z}(${q})`,HR=(Z)=>Z?"":"subprocess.",R1=(Z)=>Z?"parent process":"subprocess",j2=(Z)=>{if(Z.connected)Z.disconnect()};var I2=B(()=>{JR=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),YR=["could not be cloned","circular structure","call stack size exceeded"]});var l0=()=>{let Z={},X=new Promise((q,Q)=>{Object.assign(Z,{resolve:q,reject:Q})});return Object.assign(X,Z)};var w2=()=>{};import{addAbortListener as KR}from"node:events";var g1=(Z,X,q)=>{let Q=Z.getMaxListeners();if(Q===0||Q===1/0)return;Z.setMaxListeners(Q+X),KR(q,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var I8=()=>{};var w8=(Z,X)=>{if(X)S3(Z)},S3=(Z)=>{Z.refCounted()},O8=(Z,X)=>{if(X)b3(Z)},b3=(Z)=>{Z.unrefCounted()},$9=(Z,X)=>{if(!X)return;b3(Z),b3(Z)},J9=(Z,X)=>{if(!X)return;S3(Z),S3(Z)};var x6=()=>{};import{once as UR}from"node:events";import{scheduler as GR}from"node:timers/promises";var Y9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q},$)=>{if(G9($)||V9($))return;if(!k8.has(Z))k8.set(Z,[]);let J=k8.get(Z);if(J.push($),J.length>1)return;while(J.length>0){await W9(Z,Q,$),await GR.yield();let Y=await U9({wrappedMessage:J[0],anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q});J.shift(),Q.emit("message",Y),Q.emit("message:done")}},H9=async({anyProcess:Z,channel:X,isSubprocess:q,ipcEmitter:Q,boundOnMessage:$})=>{h3();let J=k8.get(Z);while(J?.length>0)await UR(Q,"message:done");Z.removeListener("message",$),J9(X,q),Q.connected=!1,Q.emit("disconnect")},k8;var K9=B(()=>{P6();x6();N8();x8();k8=new WeakMap});import{EventEmitter as WR}from"node:events";var F1=(Z,X,q)=>{if(P8.has(Z))return P8.get(Z);let Q=new WR;return Q.connected=!0,P8.set(Z,Q),VR({ipcEmitter:Q,anyProcess:Z,channel:X,isSubprocess:q}),Q},P8,VR=({ipcEmitter:Z,anyProcess:X,channel:q,isSubprocess:Q})=>{let $=Y9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z});X.on("message",$),X.once("disconnect",H9.bind(void 0,{anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:Z,boundOnMessage:$})),$9(q,Q)},E8=(Z)=>{let X=P8.get(Z);return X===void 0?Z.channel!==void 0&&Z.channel!==null:X.connected};var E6=B(()=>{K9();x6();P8=new WeakMap});import{once as BR}from"node:events";var B9=({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:$})=>{if(!$)return Q;let J=F1(Z,X,q),Y=C8(Z,J);return{id:LR++,type:y8,message:Q,hasListeners:Y}},LR=0n,L9=(Z,X)=>{if(X?.type!==y8||X.hasListeners)return;for(let{id:q}of Z)if(q!==void 0)v8[q].resolve({isDeadlock:!0,hasListeners:!1})},U9=async({wrappedMessage:Z,anyProcess:X,channel:q,isSubprocess:Q,ipcEmitter:$})=>{if(Z?.type!==y8||!X.connected)return Z;let{id:J,message:Y}=Z,H={id:J,type:_9,message:C8(X,$)};try{await O2({anyProcess:X,channel:q,isSubprocess:Q,ipc:!0},H)}catch(U){$.emit("strict:error",U)}return Y},G9=(Z)=>{if(Z?.type!==_9)return!1;let{id:X,message:q}=Z;return v8[X]?.resolve({isDeadlock:!1,hasListeners:q}),!0},z9=async(Z,X,q)=>{if(Z?.type!==y8)return;let Q=l0();v8[Z.id]=Q;let $=new AbortController;try{let{isDeadlock:J,hasListeners:Y}=await Promise.race([Q,zR(X,q,$)]);if(J)rJ(q);if(!Y)tJ(q)}finally{$.abort(),delete v8[Z.id]}},v8,zR=async(Z,X,{signal:q})=>{g1(Z,1,q),await BR(Z,"disconnect",{signal:q}),eJ(X)},y8="execa:ipc:request",_9="execa:ipc:response";var N8=B(()=>{w2();I8();v6();I2();E6();P6();v8={}});var R9=(Z,X,q)=>{if(!y6.has(Z))y6.set(Z,new Set);let Q=y6.get(Z),$=l0(),J=q?X.id:void 0,Y={onMessageSent:$,id:J};return Q.add(Y),{outgoingMessages:Q,outgoingMessage:Y}},F9=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},W9=async(Z,X,q)=>{while(!C8(Z,X)&&y6.get(Z)?.size>0){let Q=[...y6.get(Z)];L9(Q,q),await Promise.all(Q.map(({onMessageSent:$})=>$))}},y6,D9,A9=(Z,X)=>{D9.set(Z,X)},C8=(Z,X)=>X.listenerCount("message")>_R(Z),_R=(Z)=>M9(Z)!==void 0&&!q1(M9(Z).buffer,"ipc")?1:0,M9=(Z)=>D9.get(Z);var P6=B(()=>{w2();Q1();N8();y6=new WeakMap,D9=new WeakMap});import{promisify as MR}from"node:util";var O2=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$,{strict:J=!1}={})=>{return T2({methodName:"sendMessage",isSubprocess:q,ipc:Q,isConnected:Z.connected}),RR({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:q,message:$,strict:J})},RR=async({anyProcess:Z,channel:X,methodName:q,isSubprocess:Q,message:$,strict:J})=>{let Y=B9({anyProcess:Z,channel:X,isSubprocess:Q,message:$,strict:J}),H=R9(Z,Y,J);try{await g3({anyProcess:Z,methodName:q,isSubprocess:Q,wrappedMessage:Y,message:$})}catch(U){throw j2(Z),U}finally{F9(H)}},g3=async({anyProcess:Z,methodName:X,isSubprocess:q,wrappedMessage:Q,message:$})=>{let J=FR(Z);try{await Promise.all([z9(Q,Z,q),J(Q)])}catch(Y){throw q9({error:Y,methodName:X,isSubprocess:q}),Q9({error:Y,methodName:X,isSubprocess:q,message:$}),Y}},FR=(Z)=>{if(f3.has(Z))return f3.get(Z);let X=MR(Z.send.bind(Z));return f3.set(Z,X),X},f3;var v6=B(()=>{I2();P6();N8();f3=new WeakMap});import{scheduler as DR}from"node:timers/promises";var j9=(Z,X)=>{return C3("cancelSignal",!1,Z.connected),g3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:w9,message:X},message:X})},I9=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{return await AR({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q}),m3.signal},AR=async({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q})=>{if(T9)return;if(T9=!0,!Q){X9();return}if(X===null){h3();return}F1(Z,X,q),await DR.yield()},T9=!1,V9=(Z)=>{if(Z?.type!==w9)return!1;return m3.abort(Z.message),!0},w9="execa:ipc:cancel",h3=()=>{m3.abort(Z9())},m3;var x8=B(()=>{v6();E6();I2();m3=new AbortController});var O9=({gracefulCancel:Z,cancelSignal:X,ipc:q,serialization:Q})=>{if(!Z)return;if(X===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!q)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(Q==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},k9=({subprocess:Z,kill:X,cancelSignal:q,gracefulCancel:Q,forceKillAfterDelay:$,context:J,controller:Y})=>Q?[TR({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:$,context:J,controller:Y})]:[],TR=async({subprocess:Z,kill:X,cancelSignal:q,forceKillAfterDelay:Q,context:$,controller:{signal:J}})=>{await T8(q,J);let Y=jR(q);throw await j9(Z,Y),E3({kill:X,forceKillAfterDelay:Q,context:$,controllerSignal:J}),$.terminationReason??="gracefulCancel",q.reason},jR=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let X=Error(Z.message);return Object.defineProperty(X,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),X};var u3=B(()=>{v3();x8();A8()});import{setTimeout as IR}from"node:timers/promises";var N9=({timeout:Z})=>{if(Z!==void 0&&(!Number.isFinite(Z)||Z<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`)},x9=(Z,X,q,Q)=>X===0||X===void 0?[]:[wR(Z,X,q,Q)],wR=async(Z,X,q,{signal:Q})=>{throw await IR(X,void 0,{signal:Q}),q.terminationReason??="timeout",Z(),new c0};var p3=B(()=>{f1()});import{execPath as OR,execArgv as kR}from"node:process";import P9 from"node:path";var E9=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},v9=(Z,X,{node:q=!1,nodePath:Q=OR,nodeOptions:$=kR.filter((U)=>!U.startsWith("--inspect")),cwd:J,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let U=M2(Q,'The "nodePath" option'),G=P9.resolve(J,U),W={__proto__:null,shell:!1,...H,nodePath:G,node:q,cwd:J};if(!q)return[Z,X,W];if(P9.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[G,[...$,Z,...X],{__proto__:null,ipc:!0,...W,shell:!1}]};var d3=B(()=>{R2()});import{serialize as NR}from"node:v8";var y9=({ipcInput:Z,ipc:X,serialization:q})=>{if(Z===void 0)return;if(!X)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");ER[q](Z)},xR=(Z)=>{try{NR(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},PR=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},ER,C9=async(Z,X,q)=>{if(X===void 0)return;await O2({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q},X)};var c3=B(()=>{v6();ER={advanced:xR,json:PR}});var b9=({encoding:Z})=>{if(l3.has(Z))return;let X=yR(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${S8(Z)}\`.
37
- Please rename it to ${S8(X)}.`);let q=[...l3].map((Q)=>S8(Q)).join(", ");throw TypeError(`Invalid option \`encoding: ${S8(Z)}\`.
38
- Please rename it to one of: ${q}.`)},vR,D0,l3,yR=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in S9)return S9[X];if(l3.has(X))return X},S9,S8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var m1=B(()=>{vR=new Set(["utf8","utf16le"]),D0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),l3=vR.union(D0),S9={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import n3 from"node:fs";import S6 from"node:path";import C6 from"node:process";function bR(Z,X){if(typeof Z!=="string"||Z.length===0)throw TypeError("Expected a non-empty string.");let{cwd:q=C6.cwd(),path:Q=C6.env.PATH??(u1?C6.env.Path:void 0)??"",pathExt:$=C6.env.PATHEXT||SR}=X;return{cwd:q,searchPath:Q,pathExt:$}}function hR(Z,X){let q=X.split(S6.delimiter).filter(Boolean),Q=S6.extname(Z).toLowerCase();if(Q!==""&&q.some(($)=>$.toLowerCase()===Q))return["",...q];return q}function*fR(Z,{cwd:X,searchPath:q,pathExt:Q}){let $=u1?hR(Z,Q):[""];if(CR.test(Z)){let Y=S6.resolve(X,Z);for(let H of $)yield Y+H;return}let J=[...u1?[X]:[],...q.split(S6.delimiter)];for(let Y of J){let H=u1&&Y.length>1&&Y.startsWith('"')&&Y.endsWith('"')?Y.slice(1,-1):Y;if(H==="")continue;let U=S6.resolve(X,H,Z);for(let G of $)yield U+G}}function gR(Z){let X;try{X=n3.statSync(Z)}catch(q){return u1&&q.code==="EACCES"}if(!X.isFile())return!1;if(u1)return!0;try{return n3.accessSync(Z,n3.constants.X_OK),!0}catch{return!1}}function b8(Z,X={}){let q=bR(Z,X);for(let Q of fR(Z,q))if(gR(Q))return Q;return}var u1,CR,SR=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC";var h9=B(()=>{u1=C6.platform==="win32",CR=u1?/[\/\\]/v:/\//v});import{openSync as mR,readSync as uR,closeSync as pR}from"node:fs";import{Buffer as dR}from"node:buffer";import k2 from"node:path";import N2 from"node:process";var m9=(Z,X,q)=>{let Q={file:Z,commandArguments:[...X],options:q};if(q.shell||N2.platform!=="win32")return Q;return nR(Q)},cR,lR,nR=(Z)=>{let X=iR(Z);if(X!==void 0&&cR.test(X)){if(Z.options.argv0===void 0)Z.options.argv0=Z.file;return Z.file=X,Z}for(let Y of[Z.file,...Z.commandArguments])XF(Y);let q=X!==void 0&&lR.test(X),Q=i3(k2.normalize(X??Z.file)),$=Z.commandArguments.map((Y)=>$F(Y,q)),J=`"${[Q,...$].join(" ")}"`;return Z.options.windowsVerbatimArguments=!0,{file:N2.env.comspec||"cmd.exe",commandArguments:["/d","/s","/c",J],options:Z.options}},iR=(Z)=>{let X=f9(Z),q=X!==void 0&&rR(X);if(!q)return X;return Z.commandArguments.unshift(X),Z.file=q,f9(Z)},f9=(Z)=>{let X=Z.options.env||N2.env,q=Z.options.cwd??N2.cwd(),Q=b6(X,"PATHEXT"),$=k2.extname(Z.file),J=$===""?Q:`${$}${k2.delimiter}${Q??""}`;if(aR(Z.file))return b8(k2.resolve(q,Z.file),{cwd:q,pathExt:J});let Y=b6(X,"PATH")??b6(N2.env,"PATH")??"",H={cwd:q,path:Y,pathExt:J};return oR(X)?b8(Z.file,H):sR(Z.file,H)},aR=(Z)=>Z.includes("/")||Z.includes("\\")||Z.includes(":"),oR=(Z)=>b6(N2.env,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0&&b6(Z,"NODEFAULTCURRENTDIRECTORYINEXEPATH")===void 0,sR=(Z,{cwd:X,path:q,pathExt:Q})=>{for(let $ of q.split(k2.delimiter)){let J=$.length>1&&$.startsWith('"')&&$.endsWith('"')?$.slice(1,-1):$;if(J==="")continue;let Y=b8(k2.resolve(X,J,Z),{cwd:X,pathExt:Q});if(Y!==void 0)return Y}},b6=(Z,X)=>{let q=Object.keys(Z).sort().find((Q)=>Q.toUpperCase()===X);return q===void 0?void 0:Z[q]},g9=150,rR=(Z)=>{let X=dR.alloc(g9);try{let q=mR(Z,"r");try{uR(q,X,0,g9,0)}finally{pR(q)}}catch{return}return eR(X.toString())},tR,eR=(Z)=>{let X=Z.match(tR)?.groups.line.trim();if(!X)return;let[q,Q]=X.split(" "),$=q.split("/").at(-1);if($==="env")return Q;return Q?`${$} ${Q}`:$},ZF,XF=(Z)=>{if(ZF.test(Z))throw TypeError(`The command and its arguments cannot contain a line break on Windows without a shell.
39
- This would allow a command injection with \`cmd.exe\`.
40
- Invalid value: ${JSON.stringify(`${Z}`)}`)},qF,i3=(Z)=>Z.replaceAll(qF,"^$&"),QF,$F=(Z,X)=>{let q=`${Z}`.replaceAll(QF,($,J,Y)=>{let H=Y[J+$.length];return H==='"'||H===void 0?$.repeat(2):$}).replaceAll('"',"\\\""),Q=i3(`"${q}"`);return X?i3(Q):Q};var u9=B(()=>{h9();cR=/\.(?:com|exe)$/i,lR=/\.(?:bat|cmd)$/i,tR=/^#!(?<line>.*)/,ZF=/[\n\r]/,qF=/[()\][%!^"`<>&|;, *?]/g,QF=/\\+/g});import{statSync as JF}from"node:fs";import YF from"node:path";import HF from"node:process";var p9=(Z=d9())=>{let X=M2(Z,'The "cwd" option');return YF.resolve(X)},d9=()=>{try{return HF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
41
- ${Z.message}`,Z}},c9=(Z,X)=>{if(X===d9())return Z;let q;try{q=JF(X)}catch(Q){return`The "cwd" option is invalid: ${X}.
42
- ${Q.message}
43
- ${Z}`}if(!q.isDirectory())return`The "cwd" option is not a directory: ${X}.
44
- ${Z}`;return Z};var a3=B(()=>{R2()});import KF from"node:path";import l9 from"node:process";var UF,h8=(Z,X,q)=>{let Q={__proto__:null,...q};Q.cwd=p9(Q.cwd);let[$,J,Y]=v9(Z,X,Q),H=e$(Y),U=GF(H);U.env=WF(U);let{file:G,commandArguments:W}=m9($,J,U);if(N9(U),b9(U),y9(U),aJ(U),O9(U),U.shell=_3(U.shell),U.killSignal=dJ(U.killSignal),U.forceKillAfterDelay=nJ(U.forceKillAfterDelay),U.lines=U.lines.map((V,L)=>V&&!D0.has(U.encoding)&&U.buffer[L]),l9.platform==="win32"&&UF.test(KF.basename(G)))W.unshift("/q");return{file:G,commandArguments:W,options:U}},GF=({extendEnv:Z=!0,preferLocal:X=!1,cwd:q,localDir:Q=q,encoding:$="utf8",reject:J=!0,cleanup:Y=!0,killDescendants:H=!1,all:U=!1,windowsHide:G=!0,killSignal:W="SIGTERM",forceKillAfterDelay:V=!0,gracefulCancel:L=!1,ipcInput:z,ipc:_=z!==void 0||L,serialization:M="advanced",...R})=>({__proto__:null,...R,extendEnv:Z,preferLocal:X,cwd:q,localDirectory:Q,encoding:$,reject:J,cleanup:Y,killDescendants:H,all:U,windowsHide:G,killSignal:W,forceKillAfterDelay:V,gracefulCancel:L,ipcInput:z,ipc:_,serialization:M}),WF=({env:Z,extendEnv:X,preferLocal:q,node:Q,localDirectory:$,nodePath:J})=>{let Y=X?{...l9.env,...Z}:Z;if(q||Q)return xJ({env:Y,cwd:$,execPath:J,preferLocal:q,addExecPath:Q});return Y};var o3=B(()=>{PJ();A8();N6();y3();u3();p3();d3();c3();m1();u9();a3();R2();Q1();UF=/^cmd(?:\.exe)?$/i});var f8=(Z,X,q)=>q.shell&&X.length>0?[[Z,...X].join(" "),[],q]:[Z,X,q];var s3=()=>{};function x2(Z){if(typeof Z==="string")return VF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return BF(Z)}var VF=(Z)=>Z.at(-1)===n9?Z.slice(0,Z.at(-2)===i9?-2:-1):Z,BF=(Z)=>Z.at(-1)===LF?Z.subarray(0,Z.at(-2)===zF?-2:-1):Z,n9=`
45
- `,LF,i9="\r",zF;var r3=B(()=>{LF=n9.codePointAt(0),zF=i9.codePointAt(0)});function b0(Z,{checkOpen:X=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!X||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function t3(Z,{checkOpen:X=!0}={}){return b0(Z,{checkOpen:X})&&(Z.writable||!X)&&typeof Z.write==="function"&&typeof Z.end==="function"&&typeof Z.writable==="boolean"&&typeof Z.writableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function p1(Z,{checkOpen:X=!0}={}){return b0(Z,{checkOpen:X})&&(Z.readable||!X)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function e3(Z,X){return t3(Z,X)&&p1(Z,X)}var d1=()=>{};class a9{#q;#Q;#X=!1;#Y=void 0;constructor(Z,X){this.#q=Z,this.#Q=X}next(){let Z=()=>this.#K();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let X=()=>this.#V(Z);return this.#Y?this.#Y.then(X,X):X()}async#K(){if(this.#X)return{done:!0,value:void 0};let Z;try{Z=await this.#q.read()}catch(X){throw this.#Y=void 0,this.#X=!0,this.#q.releaseLock(),X}return Z.done&&(this.#Y=void 0,this.#X=!0,this.#q.releaseLock()),Z}async#V(Z){if(this.#X)return{done:!0,value:Z};if(this.#X=!0,!this.#Q){let X=this.#q.cancel(Z);return this.#q.releaseLock(),await X,{done:!0,value:Z}}return this.#q.releaseLock(),{done:!0,value:Z}}}function o9(){return this[ZZ].next()}function s9(Z){return this[ZZ].return(Z)}function XZ({preventCancel:Z=!1}={}){let X=this.getReader(),q=new a9(X,Z),Q=Object.create(MF);return Q[ZZ]=q,Q}var _F,ZZ,MF;var r9=B(()=>{_F=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);ZZ=Symbol();Object.defineProperty(o9,"name",{value:"next"});Object.defineProperty(s9,"name",{value:"return"});MF=Object.create(_F,{next:{enumerable:!0,configurable:!0,writable:!0,value:o9},return:{enumerable:!0,configurable:!0,writable:!0,value:s9}})});var t9=()=>{};var e9=B(()=>{r9();t9()});var ZY=(Z)=>{if(p1(Z,{checkOpen:!1})&&h6.on!==void 0)return FF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(RF.call(Z)==="[object ReadableStream]")return XZ.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},RF,FF=async function*(Z){let X=new AbortController,q={};DF(Z,X,q);try{for await(let[Q]of h6.on(Z,"data",{signal:X.signal}))yield Q}catch(Q){if(q.error!==void 0)throw q.error;else if(!X.signal.aborted)throw Q}finally{Z.destroy()}},DF=async(Z,X,q)=>{try{await h6.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(Q){q.error=Q}finally{X.abort()}},h6;var qZ=B(()=>{d1();e9();({toString:RF}=Object.prototype),h6={}});var P2=async(Z,{init:X,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,finalize:H},{maxBuffer:U=Number.POSITIVE_INFINITY}={})=>{let G=ZY(Z),W=X();W.length=0;try{for await(let V of G){let L=TF(V),z=q[L](V,W);QY({convertedChunk:z,state:W,getSize:Q,truncateChunk:$,addChunk:J,maxBuffer:U})}return AF({state:W,convertChunk:q,getSize:Q,truncateChunk:$,addChunk:J,getFinalChunk:Y,maxBuffer:U}),H(W)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(W),L}},AF=({state:Z,getSize:X,truncateChunk:q,addChunk:Q,getFinalChunk:$,maxBuffer:J})=>{let Y=$(Z);if(Y!==void 0)QY({convertedChunk:Y,state:Z,getSize:X,truncateChunk:q,addChunk:Q,maxBuffer:J})},QY=({convertedChunk:Z,state:X,getSize:q,truncateChunk:Q,addChunk:$,maxBuffer:J})=>{let Y=q(Z),H=X.length+Y;if(H<=J){XY(Z,X,$,H);return}let U=Q(Z,J-X.length);if(U!==void 0)XY(U,X,$,J);throw new $1},XY=(Z,X,q,Q)=>{X.contents=q(Z,X,Q),X.length=Q},TF=(Z)=>{let X=typeof Z;if(X==="string")return"string";if(X!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let q=qY.call(Z);if(q==="[object ArrayBuffer]")return"arrayBuffer";if(q==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&qY.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},qY,$1;var f6=B(()=>{qZ();({toString:qY}=Object.prototype);$1=class $1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var J1=(Z)=>Z,g6=()=>{return},g8=({contents:Z})=>Z,m8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},u8=(Z)=>Z.length;var p8=()=>{};async function d8(Z,X){return P2(Z,OF,X)}var jF=()=>({contents:[]}),IF=()=>1,wF=(Z,{contents:X})=>{return X.push(Z),X},OF;var $Y=B(()=>{f6();p8();OF={init:jF,convertChunk:{string:J1,buffer:J1,arrayBuffer:J1,dataView:J1,typedArray:J1,others:J1},getSize:IF,truncateChunk:g6,addChunk:wF,getFinalChunk:g6,finalize:g8}});async function c8(Z,X){return P2(Z,SF,X)}var kF=()=>({contents:new ArrayBuffer(0)}),NF=(Z)=>xF.encode(Z),xF,JY=(Z)=>new Uint8Array(Z),YY=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),PF=(Z,X)=>Z.slice(0,X),EF=(Z,{contents:X,length:q},Q)=>{let $=UY()?yF(X,Q):vF(X,Q);return new Uint8Array($).set(Z,q),$},vF=(Z,X)=>{if(X<=Z.byteLength)return Z;let q=new ArrayBuffer(KY(X));return new Uint8Array(q).set(new Uint8Array(Z),0),q},yF=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let q=new ArrayBuffer(X,{maxByteLength:KY(X)});return new Uint8Array(q).set(new Uint8Array(Z),0),q},KY=(Z)=>HY**Math.ceil(Math.log(Z)/Math.log(HY)),HY=2,CF=({contents:Z,length:X})=>UY()?Z:Z.slice(0,X),UY=()=>("resize"in ArrayBuffer.prototype),SF;var GY=B(()=>{f6();p8();xF=new TextEncoder,SF={init:kF,convertChunk:{string:NF,buffer:JY,arrayBuffer:JY,dataView:YY,typedArray:YY,others:m8},getSize:u8,truncateChunk:PF,addChunk:EF,getFinalChunk:g6,finalize:CF}});async function n8(Z,X){return P2(Z,mF,X)}var bF=()=>({contents:"",textDecoder:new TextDecoder}),l8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),hF=(Z,{contents:X})=>X+Z,fF=(Z,X)=>Z.slice(0,X),gF=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},mF;var WY=B(()=>{f6();p8();mF={init:bF,convertChunk:{string:J1,buffer:l8,arrayBuffer:l8,dataView:l8,typedArray:l8,others:m8},getSize:u8,truncateChunk:fF,addChunk:hF,getFinalChunk:gF,finalize:g8}});var VY=B(()=>{$Y();GY();WY();f6()});import{on as uF}from"node:events";import{finished as pF}from"node:stream/promises";var i8=B(()=>{qZ();VY();Object.assign(h6,{on:uF,finished:pF})});var BY=({error:Z,stream:X,readableObjectMode:q,lines:Q,encoding:$,fdNumber:J})=>{if(!(Z instanceof $1))throw Z;if(J==="all")return Z;let Y=dF(q,Q,$);throw Z.maxBufferInfo={fdNumber:J,unit:Y},X.destroy(),Z},dF=(Z,X,q)=>{if(Z)return"objects";if(X)return"lines";if(q==="buffer")return"bytes";return"characters"},LY=(Z,X,q)=>{if(X.length!==q)return;let Q=new $1;throw Q.maxBufferInfo={fdNumber:"ipc"},Q},zY=(Z,X)=>{let{streamName:q,threshold:Q,unit:$}=cF(Z,X);return`Command's ${q} was larger than ${Q} ${$}`},cF=(Z,X)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:X[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:q,unit:Q}}=Z;delete Z.maxBufferInfo;let $=q1(X,q);if(q==="ipc")return{streamName:"IPC output",threshold:$,unit:"messages"};return{streamName:Q8(q),threshold:$,unit:Q}},_Y=(Z,X,q)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((Q)=>Q!==null&&Q.length>a8(q)),MY=(Z,X,q)=>{if(!X)return Z;let Q=a8(q);return Z.length>Q?Z.slice(0,Q):Z},a8=([,Z])=>Z;var c1=B(()=>{i8();X1();Q1()});import{inspect as lF}from"node:util";var FY=({stdio:Z,all:X,ipcOutput:q,originalError:Q,signal:$,signalDescription:J,exitCode:Y,escapedCommand:H,timedOut:U,isCanceled:G,isGracefullyCanceled:W,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_,maxBuffer:M,timeout:R,cwd:F})=>{let k=Q?.code,D=nF({originalError:Q,timedOut:U,timeout:R,isMaxBuffer:V,maxBuffer:M,errorCode:k,signal:$,signalDescription:J,exitCode:Y,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:L,forceKillAfterDelay:z,killSignal:_}),w=aF(Q,F),T=w===void 0?"":`
46
- ${w}`,j=`${D}: ${H}${T}`,A=X===void 0?[Z[2],Z[1]]:[X],S=[j,...A,...Z.slice(3),q.map((O)=>oF(O)).join(`
47
- `)].map((O)=>O6(x2(sF(O)))).filter(Boolean).join(`
48
-
49
- `);return{originalMessage:w,shortMessage:j,message:S}},nF=({originalError:Z,timedOut:X,timeout:q,isMaxBuffer:Q,maxBuffer:$,errorCode:J,signal:Y,signalDescription:H,exitCode:U,isCanceled:G,isGracefullyCanceled:W,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:z})=>{let _=iF(V,L);if(X)return`Command timed out after ${q} milliseconds${_}`;if(W){if(Y===void 0)return`Command was gracefully canceled with exit code ${U}`;return V?`Command was gracefully canceled${_}`:`Command was gracefully canceled with ${Y} (${H})`}if(G)return`Command was canceled${_}`;if(Q)return`${zY(Z,$)}${_}`;if(J!==void 0)return`Command failed with ${J}${_}`;if(V)return`Command was killed with ${z} (${D8(z)})${_}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(U!==void 0)return`Command failed with exit code ${U}`;return"Command failed"},iF=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",aF=(Z,X)=>{if(Z instanceof c0)return;let q=yJ(Z)?Z.originalMessage:String(Z?.message??Z),Q=O6(c9(q,X));return Q===""?void 0:Q},oF=(Z)=>typeof Z==="string"?Z:lF(Z),sF=(Z)=>Array.isArray(Z)?Z.map((X)=>x2(RY(X))).filter(Boolean).join(`
50
- `):RY(Z),RY=(Z)=>{if(typeof Z==="string")return Z;if(t(Z))return X8(Z);return""};var DY=B(()=>{r3();F0();a3();Y8();c1();N6();f1()});var o8=({command:Z,escapedCommand:X,stdio:q,all:Q,ipcOutput:$,options:{cwd:J},startTime:Y})=>AY({command:Z,escapedCommand:X,cwd:J,durationMs:w3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:q[1],stderr:q[2],all:Q,stdio:q,ipcOutput:$,pipedFrom:[]}),E2=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:Y})=>m6({error:Z,command:X,escapedCommand:q,startTime:J,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:Q.length}),ipcOutput:[],options:$,isSync:Y}),m6=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,stdio:V,all:L,ipcOutput:z,options:{timeoutDuration:_,timeout:M=_,forceKillAfterDelay:R,killSignal:F,cwd:k,maxBuffer:D},isSync:w})=>{let{exitCode:T,signal:j,signalDescription:A}=tF(G,W),{originalMessage:S,shortMessage:O,message:x}=FY({stdio:V,all:L,ipcOutput:z,originalError:Z,signal:j,signalDescription:A,exitCode:T,escapedCommand:q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,forceKillAfterDelay:R,killSignal:F,maxBuffer:D,timeout:M,cwd:k}),E=EJ(Z,x,w);return Object.assign(E,rF({error:E,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:T,signal:j,signalDescription:A,stdio:V,all:L,ipcOutput:z,cwd:k,originalMessage:S,shortMessage:O})),E},rF=({error:Z,command:X,escapedCommand:q,startTime:Q,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,stdio:L,all:z,ipcOutput:_,cwd:M,originalMessage:R,shortMessage:F})=>AY({shortMessage:F,originalMessage:R,command:X,escapedCommand:q,cwd:M,durationMs:w3(Q),failed:!0,timedOut:$,isCanceled:J,isGracefullyCanceled:Y,isTerminated:W!==void 0,isMaxBuffer:H,isForcefullyTerminated:U,exitCode:G,signal:W,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:z,stdio:L,ipcOutput:_,pipedFrom:[]}),AY=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),tF=(Z,X)=>{let q=Z===null?void 0:Z,Q=X===null?void 0:X,$=Q===void 0?void 0:D8(X);return{exitCode:q,signal:Q,signalDescription:$}};var u6=B(()=>{N6();V8();f1();DY()});function eF(Z){return{days:Math.trunc(Z/86400000),hours:Math.trunc(Z/3600000%24),minutes:Math.trunc(Z/60000%60),seconds:Math.trunc(Z/1000%60),milliseconds:Math.trunc(Z%1000),microseconds:Math.trunc(TY(Z*1000)%1000),nanoseconds:Math.trunc(TY(Z*1e6)%1000)}}function ZD(Z){return{days:Z/86400000n,hours:Z/3600000n%24n,minutes:Z/60000n%60n,seconds:Z/1000n%60n,milliseconds:Z%1000n,microseconds:0n,nanoseconds:0n}}function QZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return eF(Z);break}case"bigint":return ZD(Z)}throw TypeError("Expected a finite number or bigint")}var TY=(Z)=>Number.isFinite(Z)?Z:0;var jY=()=>{};function $Z(Z,X){let q=typeof Z==="bigint";if(!q&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");X={...X};let Q=Z<0?"-":"";if(Z=Z<0?-Z:Z,X.colonNotation)X.compact=!1,X.formatSubMilliseconds=!1,X.separateMilliseconds=!1,X.verbose=!1;if(X.compact)X.unitCount=1,X.secondsDecimalDigits=0,X.millisecondsDecimalDigits=0;let $=[],J=(W,V)=>{let L=Math.floor(W*10**V+QD);return(Math.round(L)/10**V).toFixed(V)},Y=(W,V,L,z)=>{if(($.length===0||!X.colonNotation)&&XD(W)&&!(X.colonNotation&&L==="m"))return;if(z??=String(W),X.colonNotation){let _=z.includes(".")?z.split(".")[0].length:z.length,M=$.length>0?2:1;z="0".repeat(Math.max(0,M-_))+z}else z+=X.verbose?" "+qD(V,W):L;$.push(z)},H=QZ(Z),U=BigInt(H.days);if(X.hideYearAndDays)Y(BigInt(U)*24n+BigInt(H.hours),"hour","h");else{if(X.hideYear)Y(U,"day","d");else Y(U/365n,"year","y"),Y(U%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!X.hideSeconds)if(X.separateMilliseconds||X.formatSubMilliseconds||!X.colonNotation&&Z<1000&&!X.subSecondsAsDecimals){let W=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),z=Number(H.nanoseconds);if(Y(W,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(z,"nanosecond","ns");else{let _=V+L/1000+z/1e6,M=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,R=_>=1?Math.round(_):Math.ceil(_),F=M?_.toFixed(M):R;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let W=(q?Number(Z%$D):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,L=J(W,V),z=X.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(z),"second","s",z)}if($.length===0)return Q+"0"+(X.verbose?" milliseconds":"ms");let G=X.colonNotation?":":" ";if(typeof X.unitCount==="number")$=$.slice(0,Math.max(X.unitCount,1));return Q+$.join(G)}var XD=(Z)=>Z===0||Z===0n,qD=(Z,X)=>X===1||X===1n?Z:`${Z}s`,QD=0.0000001,$D;var IY=B(()=>{jY();$D=24n*60n*60n*1000n});var wY=(Z,X)=>{if(Z.failed)d0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var OY=B(()=>{A2()});var kY=(Z,X)=>{if(!F2(X))return;wY(Z,X),JD(Z,X)},JD=(Z,X)=>{let q=`(done in ${$Z(Z.durationMs)})`;d0({type:"duration",verboseMessage:q,verboseInfo:X,result:Z})};var NY=B(()=>{IY();M1();A2();OY()});var v2=(Z,X,{reject:q})=>{if(kY(Z,X),Z.failed&&q)throw Z;return Z};var s8=B(()=>{NY()});var JZ=(Z,X)=>{if(l1(Z))return"asyncGenerator";if(yY(Z))return"generator";if(r8(Z))return"fileUrl";if(GD(Z))return"filePath";if(LD(Z))return"webStream";if(b0(Z,{checkOpen:!1}))return"native";if(t(Z))return"uint8Array";if(zD(Z))return"asyncIterable";if(_D(Z))return"iterable";if(HZ(Z))return EY({transform:Z},X);if(UD(Z))return YD(Z,X);return"native"},YD=(Z,X)=>{if(e3(Z.transform,{checkOpen:!1}))return HD(Z,X);if(HZ(Z.transform))return EY(Z,X);return KD(Z,X)},HD=(Z,X)=>{return vY(Z,X,"Duplex stream"),"duplex"},EY=(Z,X)=>{return vY(Z,X,"web TransformStream"),"webTransform"},vY=({final:Z,binary:X,objectMode:q},Q,$)=>{xY(Z,`${Q}.final`,$),xY(X,`${Q}.binary`,$),p6(q,`${Q}.objectMode`)},xY=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${q}.`)},KD=({transform:Z,final:X,binary:q,objectMode:Q},$)=>{if(Z!==void 0&&!PY(Z))throw TypeError(`The \`${$}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(e3(X,{checkOpen:!1}))throw TypeError(`The \`${$}.final\` option must not be a Duplex stream.`);if(HZ(X))throw TypeError(`The \`${$}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!PY(X))throw TypeError(`The \`${$}.final\` option must be a generator.`);return p6(q,`${$}.binary`),p6(Q,`${$}.objectMode`),l1(Z)||l1(X)?"asyncGenerator":"generator"},p6=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},PY=(Z)=>l1(Z)||yY(Z),l1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",yY=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",UD=(Z)=>s(Z)&&(Z.transform!==void 0||Z.final!==void 0),r8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",CY=(Z)=>r8(Z)&&Z.protocol!=="file:",GD=(Z)=>s(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>WD.has(X))&&YZ(Z.file),WD,YZ=(Z)=>typeof Z==="string",d6=(Z)=>s(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>VD.has(X))&&("value"in Z),VD,SY=(Z,X)=>Z==="native"&&typeof X==="string"&&!BD.has(X),BD,bY=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",t8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",LD=(Z)=>bY(Z)||t8(Z),HZ=(Z)=>bY(Z?.readable)&&t8(Z?.writable),zD=(Z)=>hY(Z)&&typeof Z[Symbol.asyncIterator]==="function",_D=(Z)=>hY(Z)&&typeof Z[Symbol.iterator]==="function",hY=(Z)=>typeof Z==="object"&&Z!==null,x0,e8,KZ,fY,gY,D1;var V0=B(()=>{d1();e0();F0();WD=new Set(["file","append"]),VD=new Set(["value","input"]),BD=new Set(["ipc","ignore","inherit","overlapped","pipe"]),x0=new Set(["generator","asyncGenerator","duplex","webTransform"]),e8=new Set(["fileUrl","filePath","fileNumber"]),KZ=new Set(["fileUrl","filePath"]),fY=new Set([...KZ,"webStream","nodeStream"]),gY=new Set(["webTransform","duplex"]),D1={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"}});var UZ=(Z,X,q,Q)=>Q==="output"?MD(Z,X,q):RD(Z,X,q),MD=(Z,X,q)=>{let Q=X!==0&&q[X-1].value.readableObjectMode;return{writableObjectMode:Q,readableObjectMode:Z??Q}},RD=(Z,X,q)=>{let Q=X===0?Z===!0:q[X-1].value.readableObjectMode,$=X!==q.length-1&&(Z??Q);return{writableObjectMode:Q,readableObjectMode:$}},mY=(Z,X)=>{let q=Z.findLast(({type:Q})=>x0.has(Q));if(q===void 0)return!1;return X==="input"?q.value.writableObjectMode:q.value.readableObjectMode};var GZ=B(()=>{V0()});var uY=(Z,X,q,Q)=>[...Z.filter(({type:$})=>!x0.has($)),...FD(Z,X,q,Q)],FD=(Z,X,q,{encoding:Q})=>{let $=Z.filter(({type:Y})=>x0.has(Y)),J=Array.from({length:$.length});for(let[Y,H]of Object.entries($))J[Y]=DD({stdioItem:H,index:Number(Y),newTransforms:J,optionName:X,direction:q,encoding:Q});return ID(J,q)},DD=({stdioItem:Z,stdioItem:{type:X},index:q,newTransforms:Q,optionName:$,direction:J,encoding:Y})=>{if(X==="duplex")return AD({stdioItem:Z,optionName:$});if(X==="webTransform")return TD({stdioItem:Z,index:q,newTransforms:Q,direction:J});return jD({stdioItem:Z,index:q,newTransforms:Q,direction:J,encoding:Y})},AD=({stdioItem:Z,optionName:X})=>{let{value:q}=Z,{transform:Q}=q,{writableObjectMode:$,readableObjectMode:J}=Q,{objectMode:Y=J}=q;if(Y&&!J)throw TypeError(`The \`${X}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&J)throw TypeError(`The \`${X}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:Q,writableObjectMode:$,readableObjectMode:J}}},TD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$})=>{let{transform:J,objectMode:Y}=s(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:U}=UZ(Y,q,Q,$);return{...Z,value:{transform:J,writableObjectMode:H,readableObjectMode:U}}},jD=({stdioItem:Z,stdioItem:{value:X},index:q,newTransforms:Q,direction:$,encoding:J})=>{let{transform:Y,final:H,binary:U=!1,preserveNewlines:G=!1,objectMode:W}=s(X)?X:{transform:X},V=U||D0.has(J),{writableObjectMode:L,readableObjectMode:z}=UZ(W,q,Q,$);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:G,writableObjectMode:L,readableObjectMode:z}}},ID=(Z,X)=>X==="input"?Z.reverse():Z;var pY=B(()=>{e0();m1();V0();GZ()});import WZ from"node:process";var dY=(Z,X,q)=>{let Q=Z.map(($)=>wD($,X));if(Q.includes("input")&&Q.includes("output"))throw TypeError(`The \`${q}\` option must not be an array of both readable and writable values.`);return Q.find(Boolean)??xD},wD=(Z,X)=>kD[X]??OD(Z),OD=({type:Z,value:X,direction:q,optionName:Q})=>{let $=cY[Z](X);if(q==="input"&&$==="output")throw TypeError(`The \`${Q}\` option is invalid: \`input: true\` cannot be used with a writable value, which is always an output.`);return q??$},kD,y2=()=>{return},VZ=()=>"input",cY,ND=(Z)=>{if([0,WZ.stdin].includes(Z))return"input";if([1,2,WZ.stdout,WZ.stderr].includes(Z))return"output"},xD="output";var lY=B(()=>{d1();V0();kD=["input","output","output"],cY={generator:y2,asyncGenerator:y2,fileUrl:y2,filePath:y2,iterable:VZ,asyncIterable:VZ,uint8Array:VZ,webStream:(Z)=>t8(Z)?"output":"input",nodeStream(Z){if(!p1(Z,{checkOpen:!1}))return"output";return t3(Z,{checkOpen:!1})?void 0:"input"},webTransform:y2,duplex:y2,native(Z){let X=ND(Z);if(X!==void 0)return X;if(b0(Z,{checkOpen:!1}))return cY.nodeStream(Z)}}});var nY=(Z,X)=>X?[...Z,"ipc"]:Z;var iY=()=>{};var sY=({stdio:Z,ipc:X,buffer:q,...Q},$,J)=>{let Y=vD(Z,Q).map((H,U)=>rY(H,U));return PD(Y),J?CD(Y,q,$):nY(Y,X)},PD=(Z)=>{if(Z.some((X)=>ED(X)))throw Error("The `ipc: true` option must be used instead of `stdio: 'ipc'`.")},ED=(Z)=>{if(Array.isArray(Z))return Z.some((X)=>aY(X));return aY(Z)},aY=(Z)=>{if(d6(Z))return Z.value==="ipc";return Z==="ipc"},vD=(Z,X)=>{if(Z===void 0)return N0.map((Q)=>X[Q]);if(yD(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${N0.map((Q)=>`\`${Q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let q=Math.max(Z.length,N0.length);return Array.from({length:q},(Q,$)=>Z[$])},yD=(Z)=>N0.some((X)=>Z[X]!==void 0),rY=(Z,X)=>{if(Array.isArray(Z))return Z.map((q)=>rY(q,X));if(Z===null||Z===void 0)return X>=N0.length?"ignore":"pipe";return Z},CD=(Z,X,q)=>Z.map((Q,$)=>!X[$]&&$!==0&&!D2(q,$)&&SD(Q,$)?"ignore":Q),SD=(Z,X)=>oY(Z,X)||Array.isArray(Z)&&Z.every((q)=>oY(q,X)),oY=(Z,X)=>Z==="pipe"||bD(Z,X),bD=(Z,X)=>d6(Z)&&Z.value==="pipe"&&(Z.input===void 0||Z.input===!1||hD(X,Z.input)),hD=(Z,X)=>X===!0&&(Z===1||Z===2);var tY=B(()=>{X1();iY();M1();V0()});var X7=(Z,X="stdin")=>{let{options:Q,fileDescriptors:$}=n0.get(Z),J=eY($,X,!0),Y=Z.stdio[J];if(Y===null)throw TypeError(ZH(J,X,Q,!0));return Y},C2=(Z,X="stdout")=>{let{options:Q,fileDescriptors:$}=n0.get(Z),J=eY($,X,!1),Y=J==="all"?Z.all:Z.stdio[J];if(Y===null||Y===void 0)throw TypeError(ZH(J,X,Q,!1));return Y},n0,eY=(Z,X,q)=>{let Q=fD(X,q);return gD(Q,X,q,Z),Q},fD=(Z,X)=>{let q=A3(Z);if(q!==void 0)return q;let{validOptions:Q,defaultValue:$}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${c6(X)}" must not be "${Z}".
51
- It must be ${Q} or "fd3", "fd4" (and so on).
52
- It is optional and defaults to "${$}".`)},gD=(Z,X,q,Q)=>{let $=Q[XH(Z)];if($===void 0)throw TypeError(`"${c6(q)}" must not be ${X}. That file descriptor does not exist.
53
- Please set the "stdio" option to ensure that file descriptor exists.`);if($.direction==="input"&&!q)throw TypeError(`"${c6(q)}" must not be ${X}. It must be a readable stream, not writable.`);if($.direction!=="input"&&q)throw TypeError(`"${c6(q)}" must not be ${X}. It must be a writable stream, not readable.
54
- If you meant to use it as input, please set its "stdio" option to \`{value: 'pipe', input: true}\`.`)},ZH=(Z,X,q,Q)=>{if(Z==="all"&&!q.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:$,optionValue:J}=mD(Z,q);return`The "${$}: ${Z7(J)}" option is incompatible with using "${c6(Q)}: ${Z7(X)}".
55
- Please set this option with "pipe" instead.`},mD=(Z,{stdin:X,stdout:q,stderr:Q,stdio:$})=>{let J=XH(Z);if(J===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if(J===1&&q!==void 0)return{optionName:"stdout",optionValue:q};if(J===2&&Q!==void 0)return{optionName:"stderr",optionValue:Q};return{optionName:`stdio[${J}]`,optionValue:$[J]}},XH=(Z)=>Z==="all"?1:Z,c6=(Z)=>Z?"to":"from",Z7=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var A1=B(()=>{Q1();n0=new WeakMap});import{readFileSync as uD}from"node:fs";import pD from"node:tty";var QH=({stdioItem:Z,stdioItem:{type:X},isStdioArray:q,fdNumber:Q,direction:$,isSync:J})=>{if(!q||X!=="native")return Z;return J?dD({stdioItem:Z,fdNumber:Q,direction:$}):nD({stdioItem:Z,fdNumber:Q})},dD=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q,direction:$})=>{let J=cD({value:X,optionName:q,fdNumber:Q,direction:$});if(J!==void 0)return J;if(b0(X,{checkOpen:!1}))throw TypeError(`The \`${q}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},cD=({value:Z,optionName:X,fdNumber:q,direction:Q})=>{let $=lD(Z,q);if($===void 0)return;if(Q==="output")return{type:"fileNumber",value:$,optionName:X};if(pD.isatty($))throw TypeError(`The \`${X}: ${Z7(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Z1(uD($)),optionName:X}},lD=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let q=q8.indexOf(Z);if(q!==-1)return q},nD=({stdioItem:Z,stdioItem:{value:X,optionName:q},fdNumber:Q})=>{if(X==="inherit")return{type:"nodeStream",value:qH(Q,X,q),optionName:q};if(typeof X==="number")return{type:"nodeStream",value:qH(X,X,q),optionName:q};if(b0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:q};return Z},qH=(Z,X,q)=>{let Q=q8[Z];if(Q===void 0)throw TypeError(`The \`${q}: ${X}\` option is invalid: no such standard stream.`);return Q};var $H=B(()=>{d1();X1();F0();A1()});var JH=({input:Z,inputFile:X},q)=>q===0?[...iD(Z),...oD(X)]:[],iD=(Z)=>Z===void 0?[]:[{type:aD(Z),value:Z,optionName:"input"}],aD=(Z)=>{if(p1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(t(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},oD=(Z)=>Z===void 0?[]:[{...sD(Z),optionName:"inputFile"}],sD=(Z)=>{if(r8(Z))return{type:"fileUrl",value:Z};if(YZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var YH=B(()=>{d1();F0();V0()});var HH=(Z)=>Z.filter((X,q)=>Z.every((Q,$)=>!rD(X,Q)||q>=$||X.type==="generator"||X.type==="asyncGenerator")),rD=(Z,X)=>Z.value===X.value&&Z.direction===X.direction,KH=({stdioItem:{type:Z,value:X,optionName:q},direction:Q,fileDescriptors:$,isSync:J})=>{let Y=tD($,Z);if(Y.length===0)return;if(J){eD({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});return}if(fY.has(Z))return UH({otherStdioItems:Y,type:Z,value:X,optionName:q,direction:Q});if(gY.has(Z))XA({otherStdioItems:Y,type:Z,value:X,optionName:q})},tD=(Z,X)=>Z.flatMap(({direction:q,stdioItems:Q})=>Q.filter(($)=>$.type===X).map(($)=>({...$,direction:q}))),eD=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{if(KZ.has(X))UH({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})},UH=({otherStdioItems:Z,type:X,value:q,optionName:Q,direction:$})=>{let J=Z.filter((H)=>ZA(H,q));if(J.length===0)return;let Y=J.find((H)=>H.direction!==$);return GH(Y,Q,X),$==="output"?J[0].stream:void 0},ZA=({type:Z,value:X},q)=>{if(Z==="filePath")return X.file===q.file;if(Z==="fileUrl")return X.href===q.href;return X===q},XA=({otherStdioItems:Z,type:X,value:q,optionName:Q})=>{let $=Z.find(({value:{transform:J}})=>J===q.transform);GH($,Q,X)},GH=(Z,X,q)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${D1[q]} that is the same.`)};var WH=B(()=>{V0()});var q7=(Z,X,q,Q)=>{let J=sY(X,q,Q).map((H,U)=>qA({stdioOption:H,fdNumber:U,options:X,isSync:Q})),Y=BA({initialFileDescriptors:J,addProperties:Z,options:X,isSync:Q});return X.stdio=Y.map(({stdioItems:H})=>_A(H)),Y},qA=({stdioOption:Z,fdNumber:X,options:q,isSync:Q})=>{let $=Q8(X),{stdioItems:J,isStdioArray:Y}=QA({stdioOption:Z,fdNumber:X,options:q,optionName:$}),H=dY(J,X,$),U=J.map((V)=>QH({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:Q})),G=uY(U,$,H,q),W=mY(G,H);return VA(G,W),{direction:H,objectMode:W,stdioItems:G}},QA=({stdioOption:Z,fdNumber:X,options:q,optionName:Q})=>{let $=Array.isArray(Z)?Z:[Z],J=JH(q,X),Y=[...$A($.map((G)=>YA(G,Q)),J),...J],H=HH(Y),U=H.length>1;return KA(H,U,Q),GA(H),{stdioItems:H,isStdioArray:U}},$A=(Z,X)=>X.length>0&&JA(Z)?[]:Z,JA=(Z)=>Z.length===1&&Z[0].type==="native"&&Z[0].value==="inherit",YA=(Z,X)=>{if(d6(Z))return HA(Z,X);return{type:JZ(Z,X),value:Z,optionName:X}},HA=({value:Z,input:X},q)=>{return p6(X,`${q}.input`),{type:JZ(Z,q),value:Z,direction:X?"input":void 0,optionName:q}},KA=(Z,X,q)=>{if(Z.length===0)throw TypeError(`The \`${q}\` option must not be an empty array.`);if(!X)return;for(let{value:Q,optionName:$}of Z)if(UA.has(Q))throw Error(`The \`${$}\` option must not include \`${Q}\`.`)},UA,GA=(Z)=>{for(let X of Z)WA(X)},WA=({type:Z,value:X,optionName:q})=>{if(CY(X))throw TypeError(`The \`${q}: URL\` option must use the \`file:\` scheme.
56
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(SY(Z,X))throw TypeError(`The \`${q}: { file: '...' }\` option must be used instead of \`${q}: '...'\`.`)},VA=(Z,X)=>{if(!X)return;let q=Z.find(({type:Q})=>e8.has(Q));if(q!==void 0)throw TypeError(`The \`${q.optionName}\` option cannot use both files and transforms in objectMode.`)},BA=({initialFileDescriptors:Z,addProperties:X,options:q,isSync:Q})=>{let $=[];try{for(let J of Z)$.push(LA({fileDescriptor:J,fileDescriptors:$,addProperties:X,options:q,isSync:Q}));return $}catch(J){throw BZ($),J}},LA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:q},fileDescriptors:Q,addProperties:$,options:J,isSync:Y})=>{let H=q.map((U)=>zA({stdioItem:U,addProperties:$,direction:Z,options:J,fileDescriptors:Q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},zA=({stdioItem:Z,addProperties:X,direction:q,options:Q,fileDescriptors:$,isSync:J})=>{let Y=KH({stdioItem:Z,direction:q,fileDescriptors:$,isSync:J});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[q][Z.type](Z,Q)}},BZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:q}of X)if(q!==void 0&&!C0(q))q.destroy()},_A=(Z)=>{if(Z.length>1)return Z.some(({value:Q})=>Q==="overlapped")?"overlapped":"pipe";let[{type:X,value:q}]=Z;return X==="native"?q:"pipe"};var Q7=B(()=>{X1();pY();GZ();V0();lY();tY();$H();YH();WH();UA=new Set(["ignore"])});import{readFileSync as VH}from"node:fs";var LH=(Z,X)=>q7(RA,Z,X,!0),i0=({type:Z,optionName:X})=>{_H(X,D1[Z])},zH=({optionName:Z,value:X})=>{if(X==="overlapped")_H(Z,`"${X}"`);return{}},MA=(Z)=>{let{optionName:X,value:q}=Z;if(q==="pipe"&&X!=="stdin")throw TypeError(`Only the \`stdin\` option, not \`${X}\`, can be an input pipe with synchronous methods.`);return zH(Z)},_H=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},BH,RA;var MH=B(()=>{F0();Q7();V0();BH={generator(){},asyncGenerator:i0,webStream:i0,nodeStream:i0,webTransform:i0,duplex:i0,asyncIterable:i0,native:zH},RA={input:{...BH,native:MA,fileUrl:({value:Z})=>({contents:[Z1(VH(Z))]}),filePath:({value:{file:Z}})=>({contents:[Z1(VH(Z))]}),fileNumber:i0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...BH,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:i0,string:i0,uint8Array:i0}}});var Y1=(Z,{stripFinalNewline:X},q)=>LZ(X,q)&&Z!==void 0&&!Array.isArray(Z)?x2(Z):Z,LZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var l6=B(()=>{r3()});var $7=(Z,X,q,Q)=>Z||q?void 0:FH(X,Q),_Z=(Z,X,q)=>q?Z.flatMap((Q)=>RH(Q,X)):RH(Z,X),RH=(Z,X)=>{let{transform:q,final:Q}=FH(X,{});return[...q(Z),...Q()]},FH=(Z,X)=>{return X.previousChunks="",{transform:FA.bind(void 0,X,Z),final:AA.bind(void 0,X)}},FA=function*(Z,X,q){if(typeof q!=="string"){yield q;return}let{previousChunks:Q}=Z,$=-1;for(let J=0;J<q.length;J+=1){if(q[J]!==`
57
- `)continue;let Y=DA(q,J,X,Z),H=q.slice($+1,J+1-Y);if(Q.length>0)H=zZ(Q,H),Q="";yield H,$=J}if($!==q.length-1)Q=zZ(Q,q.slice($+1));Z.previousChunks=Q},DA=(Z,X,q,Q)=>{if(q)return 0;return Q.isWindowsNewline=X!==0&&Z[X-1]==="\r",Q.isWindowsNewline?2:1},AA=function*({previousChunks:Z}){if(Z.length>0)yield Z},DH=({binary:Z,preserveNewlines:X,readableObjectMode:q,state:Q})=>Z||X||q?void 0:{transform:TA.bind(void 0,Q)},TA=function*({isWindowsNewline:Z=!1},X){let{unixNewline:q,windowsNewline:Q,LF:$,concatBytes:J}=typeof X==="string"?jA:wA;if(X.at(-1)===$){yield X;return}yield J(X,Z?Q:q)},zZ=(Z,X)=>`${Z}${X}`,jA,IA=(Z,X)=>{let q=new Uint8Array(Z.length+X.length);return q.set(Z,0),q.set(X,Z.length),q},wA;var J7=B(()=>{jA={windowsNewline:`\r
58
- `,unixNewline:`
59
- `,LF:`
60
- `,concatBytes:zZ},wA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:IA}});import{Buffer as OA}from"node:buffer";var AH=(Z,X)=>Z?void 0:kA.bind(void 0,X),kA=function*(Z,X){if(typeof X!=="string"&&!t(X)&&!OA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},TH=(Z,X)=>Z?NA.bind(void 0,X):xA.bind(void 0,X),NA=function*(Z,X){jH(Z,X),yield X},xA=function*(Z,X){if(jH(Z,X),typeof X!=="string"&&!t(X))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof X}.`);yield X},jH=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
61
- Instead, \`yield\` should either be called with a value, or not be called at all. For example:
62
- if (condition) { yield value; }`)};var IH=B(()=>{F0()});import{Buffer as PA}from"node:buffer";import{StringDecoder as EA}from"node:string_decoder";var Y7=(Z,X,q)=>{if(q)return;if(Z)return{transform:vA.bind(void 0,new TextEncoder)};let Q=new EA(X);return{transform:yA.bind(void 0,Q),final:CA.bind(void 0,Q)}},vA=function*(Z,X){if(PA.isBuffer(X))yield Z1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},yA=function*(Z,X){yield t(X)?Z.write(X):X},CA=function*(Z){let X=Z.end();if(X!=="")yield X};var MZ=B(()=>{F0()});import{callbackify as wH}from"node:util";var RZ,H7=async function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=bA}=X[q];for await(let $ of Q(Z))yield*H7($,X,q+1)},OH=async function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*SA(q,Number(X),Z)},SA=async function*(Z,X,q){if(Z===void 0)return;for await(let Q of Z())yield*H7(Q,q,X+1)},kH,bA=function*(Z){yield Z};var NH=B(()=>{RZ=wH(async(Z,X,q,Q)=>{X.currentIterable=Z(...q);try{for await(let $ of X.currentIterable)Q.push($)}finally{delete X.currentIterable}}),kH=wH(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var FZ=(Z,X,q,Q)=>{try{for(let $ of Z(...X))q.push($);Q()}catch($){Q($)}},xH=(Z,X)=>[...X.flatMap((q)=>[...n1(q,Z,0)]),...n6(Z)],n1=function*(Z,X,q){if(q===X.length){yield Z;return}let{transform:Q=fA}=X[q];for(let $ of Q(Z))yield*n1($,X,q+1)},n6=function*(Z){for(let[X,{final:q}]of Object.entries(Z))yield*hA(q,Number(X),Z)},hA=function*(Z,X,q){if(Z===void 0)return;for(let Q of Z())yield*n1(Q,q,X+1)},fA=function*(Z){yield Z};var DZ=()=>{};import{Transform as gA,getDefaultHighWaterMark as PH}from"node:stream";var AZ=({value:Z,value:{transform:X,final:q,writableObjectMode:Q,readableObjectMode:$},optionName:J},{encoding:Y})=>{let H={},U=EH(Z,Y,J),G=l1(X),W=l1(q),V=G?RZ.bind(void 0,H7,H):FZ.bind(void 0,n1),L=G||W?RZ.bind(void 0,OH,H):FZ.bind(void 0,n6),z=G||W?kH.bind(void 0,H):void 0;return{stream:new gA({writableObjectMode:Q,writableHighWaterMark:PH(Q),readableObjectMode:$,readableHighWaterMark:PH($),transform(M,R,F){V([M,U,0],this,F)},flush(M){L([U],this,M)},destroy:z})}},K7=(Z,X,q,Q)=>{let $=X.filter(({type:Y})=>Y==="generator"),J=Q?$.reverse():$;for(let{value:Y,optionName:H}of J){let U=EH(Y,q,H);Z=xH(U,Z)}return Z},EH=({transform:Z,final:X,binary:q,writableObjectMode:Q,readableObjectMode:$,preserveNewlines:J},Y,H)=>{let U={};return[{transform:AH(Q,H)},Y7(q,Y,Q),$7(q,J,Q,U),{transform:Z,final:X},{transform:TH($,H)},DH({binary:q,preserveNewlines:J,readableObjectMode:$,state:U})].filter(Boolean)};var U7=B(()=>{V0();J7();IH();MZ();NH();DZ()});var vH=(Z,X)=>{for(let q of mA(Z))uA(Z,q,X)},mA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),uA=(Z,X,q)=>{let{stdioItems:Q}=Z[X],$=Q.filter(({contents:H})=>H!==void 0);if($.length===0)return;if(X!==0){let[{type:H,optionName:U}]=$;throw TypeError(`Only the \`stdin\` option, not \`${U}\`, can be ${D1[H]} with synchronous methods.`)}let Y=$.map(({contents:H})=>H).map((H)=>pA(H,Q));q.input=w6(Y)},pA=(Z,X)=>{let q=K7(Z,X,"utf8",!0);return dA(q),w6(q)},dA=(Z)=>{let X=Z.find((q)=>typeof q!=="string"&&!t(q));if(X!==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: ${X}.`)};var yH=B(()=>{U7();F0();V0()});var G7=({stdioItems:Z,encoding:X,verboseInfo:q,fdNumber:Q})=>Q!=="all"&&D2(q,Q)&&!D0.has(X)&&cA(Q)&&(Z.some(({type:$,value:J})=>$==="native"&&lA.has(J))||Z.every(({type:$})=>x0.has($))),cA=(Z)=>Z===1||Z===2,lA,CH=async(Z,X,q,Q)=>{for await(let $ of Z)if(!nA(X))bH($,q,Q)},SH=(Z,X,q)=>{for(let Q of Z)bH(Q,X,q)},nA=(Z)=>Z._readableState.pipes.length>0,bH=(Z,X,q)=>{let Q=G8(Z);d0({type:"output",verboseMessage:Q,fdNumber:X,verboseInfo:q})};var TZ=B(()=>{m1();V0();A2();M1();lA=new Set(["pipe","overlapped"])});import{writeFileSync as iA,appendFileSync as aA}from"node:fs";var hH=({fileDescriptors:Z,syncResult:{output:X},options:q,isMaxBuffer:Q,verboseInfo:$})=>{if(X===null)return{output:Array.from({length:3})};let J={},Y=new Set;return{output:X.map((U,G)=>oA({result:U,fileDescriptors:Z,fdNumber:G,state:J,outputFiles:Y,isMaxBuffer:Q,verboseInfo:$},q)),...J}},oA=({result:Z,fileDescriptors:X,fdNumber:q,state:Q,outputFiles:$,isMaxBuffer:J,verboseInfo:Y},{buffer:H,encoding:U,lines:G,stripFinalNewline:W,maxBuffer:V})=>{if(Z===null)return;let L=MY(Z,J,V),z=Z1(L),{stdioItems:_,objectMode:M}=X[q],R=sA([z],_,U,Q),{serializedResult:F,finalResult:k=F}=rA({chunks:R,objectMode:M,encoding:U,lines:G,stripFinalNewline:W,fdNumber:q});tA({serializedResult:F,fdNumber:q,state:Q,verboseInfo:Y,encoding:U,stdioItems:_,objectMode:M});let D=H[q]?k:void 0;try{if(Q.error===void 0)eA(F,_,$);return D}catch(w){return Q.error=w,D}},sA=(Z,X,q,Q)=>{try{return K7(Z,X,q,!1)}catch($){return Q.error=$,Z}},rA=({chunks:Z,objectMode:X,encoding:q,lines:Q,stripFinalNewline:$,fdNumber:J})=>{if(X)return{serializedResult:Z};if(q==="buffer")return{serializedResult:w6(Z)};let Y=l$(Z,q);if(Q[J])return{serializedResult:Y,finalResult:_Z(Y,!$[J],X)};return{serializedResult:Y}},tA=({serializedResult:Z,fdNumber:X,state:q,verboseInfo:Q,encoding:$,stdioItems:J,objectMode:Y})=>{if(!G7({stdioItems:J,encoding:$,verboseInfo:Q,fdNumber:X}))return;let H=_Z(Z,!1,Y);try{SH(H,X,Q)}catch(U){q.error??=U}},eA=(Z,X,q)=>{let Q=X.filter(({type:$})=>e8.has($));for(let{path:$,append:J}of Q){let Y=typeof $==="string"?$:$.toString();if(J||q.has(Y))aA($,Z);else q.add(Y),iA($,Z)}};var fH=B(()=>{TZ();U7();J7();F0();V0();c1()});var gH=([,Z,X],q)=>{if(!q.all)return;if(Z===void 0)return X;if(X===void 0)return Z;if(Array.isArray(Z))return Array.isArray(X)?[...Z,...X]:[...Z,Y1(X,q,"all")];if(Array.isArray(X))return[Y1(Z,q,"all"),...X];if(t(Z)&&t(X))return R3([Z,X]);return`${Z}${X}`};var mH=B(()=>{F0();l6()});import{once as jZ}from"node:events";var uH=async(Z,X)=>{let[q,Q]=await ZT(Z);return X.isForcefullyTerminated??=!1,[q,Q]},ZT=async(Z)=>{let[X,q]=await Promise.allSettled([jZ(Z,"spawn"),jZ(Z,"exit")]);if(X.status==="rejected")return[];return q.status==="rejected"?pH(Z):q.value},pH=async(Z)=>{try{return await jZ(Z,"exit")}catch{return pH(Z)}},dH=async(Z)=>{let[X,q]=await Z;if(!XT(X,q)&&IZ(X,q))throw new c0;return[X,q]},XT=(Z,X)=>Z===void 0&&X===void 0,IZ=(Z,X)=>Z!==0||X!==null;var wZ=B(()=>{f1()});var cH=({error:Z,status:X,signal:q,output:Q},{maxBuffer:$})=>{let J=qT(Z,X,q),Y=J?.code==="ETIMEDOUT",H=_Y(J,Q,$);return{resultError:J,exitCode:X,signal:q,timedOut:Y,isMaxBuffer:H}},qT=(Z,X,q)=>{if(Z!==void 0)return Z;return IZ(X,q)?new c0:void 0};var lH=B(()=>{f1();c1();wZ()});import{spawnSync as QT}from"node:child_process";var nH=(Z,X,q)=>{let{file:Q,commandArguments:$,command:J,escapedCommand:Y,startTime:H,verboseInfo:U,options:G,fileDescriptors:W}=$T(Z,X,q),V=HT({file:Q,commandArguments:$,options:G,command:J,escapedCommand:Y,verboseInfo:U,fileDescriptors:W,startTime:H});return v2(V,U,G)},$T=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=B8(Z,X,q),H=JT(q),{file:U,commandArguments:G,options:W}=h8(Z,X,H);YT(W);let V=LH(W,Y);return{file:U,commandArguments:G,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},JT=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,YT=({ipc:Z,ipcInput:X,detached:q,cancelSignal:Q,killDescendants:$})=>{if(X)i6("ipcInput");if(Z)i6("ipc: true");if(q)i6("detached: true");if($)i6("killDescendants: true");if(Q)i6("cancelSignal")},i6=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},HT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,verboseInfo:J,fileDescriptors:Y,startTime:H})=>{let U=KT({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:Y,startTime:H});if(U.failed)return U;let{resultError:G,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z}=cH(U,q),{output:_,error:M=G}=hH({fileDescriptors:Y,syncResult:U,options:q,isMaxBuffer:z,verboseInfo:J}),R=_.map((k,D)=>Y1(k,q,D)),F=Y1(gH(_,q),q,"all");return GT({error:M,exitCode:W,signal:V,timedOut:L,isMaxBuffer:z,stdio:R,all:F,options:q,command:Q,escapedCommand:$,startTime:H})},KT=({file:Z,commandArguments:X,options:q,command:Q,escapedCommand:$,fileDescriptors:J,startTime:Y})=>{try{vH(J,q);let H=UT(q);return QT(...f8(Z,X,H))}catch(H){return E2({error:H,command:Q,escapedCommand:$,fileDescriptors:J,options:q,startTime:Y,isSync:!0})}},UT=({encoding:Z,maxBuffer:X,...q})=>({...q,encoding:"buffer",maxBuffer:a8(X)}),GT=({error:Z,exitCode:X,signal:q,timedOut:Q,isMaxBuffer:$,stdio:J,all:Y,options:H,command:U,escapedCommand:G,startTime:W})=>Z===void 0?o8({command:U,escapedCommand:G,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W}):m6({error:Z,command:U,escapedCommand:G,timedOut:Q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:$,isForcefullyTerminated:!1,exitCode:X,signal:q,stdio:J,all:Y,ipcOutput:[],options:H,startTime:W,isSync:!0});var iH=B(()=>{O3();o3();s3();u6();s8();MH();l6();yH();fH();c1();mH();lH()});import{once as OZ,on as WT}from"node:events";var kZ,aH=({anyProcess:Z,channel:X,isSubprocess:q,ipc:Q},$={})=>{let{reference:J=!0,filter:Y}=$,{signal:H}=$[kZ]??{};return T2({methodName:"getOneMessage",isSubprocess:q,ipc:Q,isConnected:E8(Z)}),VT({anyProcess:Z,channel:X,isSubprocess:q,filter:Y,reference:J,signal:H})},VT=async({anyProcess:Z,channel:X,isSubprocess:q,filter:Q,reference:$,signal:J})=>{w8(X,$);let Y=F1(Z,X,q),H=new AbortController;BT(J,H);try{return await Promise.race([LT(Y,Q,H),zT(Y,q,H),_T(Y,q,H)])}catch(U){throw j2(Z),U}finally{H.abort(),O8(X,$)}},BT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},LT=async(Z,X,{signal:q})=>{if(X===void 0){let[Q]=await OZ(Z,"message",{signal:q});return Q}for await(let[Q]of WT(Z,"message",{signal:q}))if(X(Q))return Q},zT=async(Z,X,{signal:q})=>{await OZ(Z,"disconnect",{signal:q}),sJ(X)},_T=async(Z,X,{signal:q})=>{let[Q]=await OZ(Z,"strict:error",{signal:q});throw j8(Q,X)};var NZ=B(()=>{I2();E6();x6();kZ=Symbol("internalGetOneMessageOptions")});import{once as sH,on as MT}from"node:events";var xZ,rH=(Z,X={})=>{let{reference:q=!0}=X,{signal:Q,shouldAwait:$=!Z.isSubprocess}=X[xZ]??{};return PZ({...Z,shouldAwait:$,reference:q,signal:Q})},PZ=({anyProcess:Z,waitProcess:X=Z,channel:q,isSubprocess:Q,ipc:$,shouldAwait:J,reference:Y,signal:H})=>{T2({methodName:"getEachMessage",isSubprocess:Q,ipc:$,isConnected:E8(Z)}),w8(q,Y);let U=F1(Z,q,Q),G=new AbortController,W={};return RT(H,G),FT(Z,U,G),DT({ipcEmitter:U,isSubprocess:Q,controller:G,state:W}),AT({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:U,isSubprocess:Q,shouldAwait:J,controller:G,state:W,reference:Y})},RT=(Z,X)=>{if(Z===void 0)return;if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},FT=async(Z,X,q)=>{try{await sH(X,"disconnect",{signal:q.signal}),q.abort()}catch{}},DT=async({ipcEmitter:Z,isSubprocess:X,controller:q,state:Q})=>{try{let[$]=await sH(Z,"strict:error",{signal:q.signal});Q.error=j8($,X),q.abort()}catch{}},AT=async function*({anyProcess:Z,waitProcess:X,channel:q,ipcEmitter:Q,isSubprocess:$,shouldAwait:J,controller:Y,state:H,reference:U}){try{for await(let[G]of MT(Q,"message",{signal:Y.signal}))oH(H),yield G}catch{oH(H)}finally{if(Y.abort(),O8(q,U),!$)j2(Z);if(J)await X}},oH=({error:Z})=>{if(Z)throw Z};var W7=B(()=>{I2();E6();x6();xZ=Symbol("internalGetEachMessageOptions")});import tH from"node:process";var eH=(Z,X,{ipc:q})=>{Object.assign(Z,XK(X,!1,q,Z))},ZK=()=>{let Z=tH,X=!0,q=tH.channel!==void 0;return{...XK(Z,!0,q),getCancelSignal:I9.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:q})}},XK=(Z,X,q,Q=Z)=>({sendMessage:O2.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getOneMessage:aH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q}),getEachMessage:rH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:q,waitProcess:Q})});var EZ=B(()=>{v6();NZ();W7();x8()});import{ChildProcess as TT}from"node:child_process";import{PassThrough as jT,Readable as QK,Writable as $K,Duplex as JK}from"node:stream";var YK=({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,verboseInfo:Y})=>{BZ(Q);let H=new TT,U=IT(H,Q),G=E2({error:Z,command:X,escapedCommand:q,fileDescriptors:Q,options:$,startTime:J,isSync:!1}),W=NT(G,Y,$);return{subprocess:H,promise:W,all:$.all?U:void 0,convertedStreams:{readable:HK,writable:KK,duplex:UK,readableStream:wT,writableStream:OT,transformStream:kT,iterable:qK,[Symbol.asyncIterator]:qK}}},IT=(Z,X)=>{let q=a6(),Q=a6(),$=a6(),J=Array.from({length:X.length-3},a6),Y=a6(),H=[q,Q,$,...J];return Object.assign(Z,{stdin:q,stdout:Q,stderr:$,stdio:H}),Y},a6=()=>{let Z=new jT;return Z.end(),Z},HK=()=>new QK({read(){}}),KK=()=>new $K({write(){}}),UK=()=>new JK({read(){},write(){}}),wT=()=>QK.toWeb(HK()),OT=()=>$K.toWeb(KK()),kT=()=>JK.toWeb(UK()),qK=async function*(){},NT=async(Z,X,q)=>v2(Z,X,q);var GK=B(()=>{Q7();u6();s8()});import{createReadStream as WK,createWriteStream as VK}from"node:fs";import{Buffer as xT}from"node:buffer";import{Readable as o6,Writable as PT,Duplex as ET}from"node:stream";var LK=(Z,X)=>q7(vT,Z,X,!1),s6=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${D1[Z]}.`)},BK,vT;var zK=B(()=>{U7();Q7();V0();BK={fileNumber:s6,generator:AZ,asyncGenerator:AZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:q}}){let Q=X||q;return{stream:ET.fromWeb(Z,{objectMode:Q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},vT={input:{...BK,fileUrl:({value:Z})=>({stream:WK(Z)}),filePath:({value:{file:Z}})=>({stream:WK(Z)}),webStream:({value:Z})=>({stream:o6.fromWeb(Z)}),iterable:({value:Z})=>({stream:o6.from(Z)}),asyncIterable:({value:Z})=>({stream:o6.from(Z)}),string:({value:Z})=>({stream:o6.from(Z)}),uint8Array:({value:Z})=>({stream:o6.from(xT.from(Z))})},output:{...BK,fileUrl:({value:Z})=>({stream:VK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:VK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:PT.fromWeb(Z)}),iterable:s6,asyncIterable:s6,string:s6,uint8Array:s6}}});import{on as yT,once as _K}from"node:events";import{PassThrough as CT,getDefaultHighWaterMark as ST}from"node:stream";import{finished as FK}from"node:stream/promises";function i1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let $ of Z)vZ($);let X=Z.some(({readableObjectMode:$})=>$),q=bT(Z,X),Q=new DK({objectMode:X,writableHighWaterMark:q,readableHighWaterMark:q});for(let $ of Z)Q.add($);return Q}var bT=(Z,X)=>{if(Z.length===0)return ST(X);let q=Z.filter(({readableObjectMode:Q})=>Q===X).map(({readableHighWaterMark:Q})=>Q);return Math.max(...q)},DK,hT=async(Z,X,q)=>{V7(Z,MK);let Q=new AbortController;try{await Promise.race([fT(Z,Q),gT(Z,X,q,Q)])}finally{Q.abort(),V7(Z,-MK)}},fT=async(Z,{signal:X})=>{try{await FK(Z,{signal:X,cleanup:!0})}catch(q){throw AK(Z,q),q}},gT=async(Z,X,q,{signal:Q})=>{for await(let[$]of yT(Z,"unpipe",{signal:Q}))if(X.has($))$.emit(q)},vZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},mT=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,onFinished:J,unpipeEvent:Y})=>{V7(Z,RK);let H=new AbortController;try{await Promise.race([uT(J,X,H),pT({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:H}),dT({stream:X,streams:q,ended:Q,aborted:$,unpipeEvent:Y,controller:H})])}finally{H.abort(),V7(Z,-RK)}if(q.size>0&&q.size===Q.size+$.size)if(Q.size===0&&$.size>0)yZ(Z);else cT(Z)},uT=async(Z,X,{signal:q})=>{try{if(await Z,!q.aborted)yZ(X)}catch(Q){if(!q.aborted)AK(X,Q)}},pT=async({passThroughStream:Z,stream:X,streams:q,ended:Q,aborted:$,controller:{signal:J}})=>{try{if(await FK(X,{signal:J,cleanup:!0,readable:!0,writable:!1}),q.has(X))Q.add(X)}catch(Y){if(J.aborted||!q.has(X))return;if(TK(Y))$.add(X);else jK(Z,Y)}},dT=async({stream:Z,streams:X,ended:q,aborted:Q,unpipeEvent:$,controller:{signal:J}})=>{if(await _K(Z,$,{signal:J}),!Z.readable)return _K(J,"abort",{signal:J});X.delete(Z),q.delete(Z),Q.delete(Z)},cT=(Z)=>{if(Z.writable)Z.end()},AK=(Z,X)=>{if(TK(X))yZ(Z);else jK(Z,X)},TK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",yZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},jK=(Z,X)=>{if(!Z.destroyed)Z.once("error",lT),Z.destroy(X)},lT=()=>{},V7=(Z,X)=>{let q=Z.getMaxListeners();if(q!==0&&q!==Number.POSITIVE_INFINITY)Z.setMaxListeners(q+X)},MK=2,RK=1;var B7=B(()=>{DK=class DK extends CT{#q=new Set([]);#Q=new Set([]);#X=new Set([]);#Y;#K=Symbol("unpipe");#V=new WeakMap;add(Z){if(vZ(Z),this.#q.has(Z))return;this.#q.add(Z),this.#Y??=hT(this,this.#q,this.#K);let X=mT({passThroughStream:this,stream:Z,streams:this.#q,ended:this.#Q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#K});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(vZ(Z),!this.#q.has(Z))return!1;let X=this.#V.get(Z);if(X===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await X,!0}}});import{finished as IK}from"node:stream/promises";var S2=(Z,X)=>{Z.pipe(X),nT(Z,X),iT(Z,X)},nT=async(Z,X)=>{if(C0(Z)||C0(X))return;try{await IK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}CZ(X)},CZ=(Z)=>{if(Z.writable)Z.end()},iT=async(Z,X)=>{if(C0(Z)||C0(X))return;try{await IK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}SZ(Z)},SZ=(Z)=>{if(Z.readable)Z.destroy()};var L7=B(()=>{X1()});var wK=(Z,X,q)=>{let Q=new Map;for(let[$,{stdioItems:J,direction:Y}]of Object.entries(X)){let H=J.filter(({type:G})=>x0.has(G));for(let{stream:G}of H)aT(Z,G,Y,$);let U=J.filter(({type:G})=>!x0.has(G));for(let{stream:G}of U)sT({subprocess:Z,stream:G,direction:Y,fdNumber:$,pipeGroups:Q,controller:q})}for(let[$,J]of Q){let Y=J.length===1?J[0]:i1(J);S2(Y,$)}},aT=(Z,X,q,Q)=>{if(q==="output")S2(Z.stdio[Q],X);else S2(X,Z.stdio[Q]);let $=oT[Q];if($!==void 0)Z[$]=X;Z.stdio[Q]=X},oT,sT=({subprocess:Z,stream:X,direction:q,fdNumber:Q,pipeGroups:$,controller:J})=>{if(X===void 0)return;rT(X,J);let[Y,H]=q==="output"?[X,Z.stdio[Q]]:[Z.stdio[Q],X],U=$.get(Y)??[];$.set(Y,[...U,H])},rT=(Z,{signal:X})=>{if(C0(Z))g1(Z,tT,X)},tT=2;var OK=B(()=>{B7();X1();I8();V0();L7();oT=["stdin","stdout","stderr"]});import z7 from"node:process";import{execFile as eT}from"node:child_process";import kK from"node:path/win32";var NK,xK=(Z)=>Z.killDescendants&&!NK?{...Z,detached:!0}:Z,PK=(Z,{killDescendants:X})=>{if(!X)return Z.kill.bind(Z);return(NK?Xj:Zj).bind(void 0,Z)},Zj=(Z,X)=>{if(Z.pid===void 0)return!1;try{return z7.kill(-Z.pid,X)}catch{return Z.kill(X)}},Xj=(Z,X)=>{if(Z.pid===void 0)return!1;let q=qj();if(q===void 0)return Z.kill(X);return eT(q,["/pid",`${Z.pid}`,"/T","/F"],(Q)=>{if(Q)Z.kill(X)}),!0},qj=()=>{let Z=[z7.env.SystemRoot,z7.env.windir].find((X)=>X&&Qj(X));return Z===void 0?void 0:kK.join(Z,"System32","taskkill.exe")},Qj=(Z)=>{let{root:X}=kK.parse(Z);return/^[a-z]:[/\\]/i.test(X)};var EK=B(()=>{NK=z7.platform==="win32"});var a1;var vK=B(()=>{a1=[];a1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")a1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")a1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class yK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(hZ[bZ])return hZ[bZ];$j(hZ,bZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let q=this.listeners[Z],Q=q.indexOf(X);if(Q===-1)return;if(Q===0&&q.length===1)q.length=0;else q.splice(Q,1)}emit(Z,X,q){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let Q=!1;for(let $ of this.listeners[Z])Q=$(X,q)===!0||Q;if(Z==="exit")Q=this.emit("afterExit",X,q)||Q;return Q}}class gZ{}var _7=(Z)=>!!Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function",bZ,hZ,$j,Jj=(Z)=>{return{onExit(X,q){return Z.onExit(X,q)},load(){return Z.load()},unload(){return Z.unload()}}},CK,SK,fZ,bK,Ku,Uu;var hK=B(()=>{vK();bZ=Symbol.for("signal-exit emitter"),hZ=globalThis,$j=Object.defineProperty.bind(Object);CK=class CK extends gZ{onExit(){return()=>{}}load(){}unload(){}};SK=class SK extends gZ{#q=fZ.platform==="win32"?"SIGINT":"SIGHUP";#Q=new yK;#X;#Y;#K;#V={};#A=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of a1)this.#V[X]=()=>{let q=this.#X.listeners(X),{count:Q}=this.#Q,$=Z;if(typeof $.__signal_exit_emitter__==="object"&&typeof $.__signal_exit_emitter__.count==="number")Q+=$.__signal_exit_emitter__.count;if(q.length===Q){this.unload();let J=this.#Q.emit("exit",null,X),Y=X==="SIGHUP"?this.#q:X;if(!J)Z.kill(Z.pid,Y)}};this.#K=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!_7(this.#X))return()=>{};if(this.#A===!1)this.load();let q=X?.alwaysLast?"afterExit":"exit";return this.#Q.on(q,Z),()=>{if(this.#Q.removeListener(q,Z),this.#Q.listeners.exit.length===0&&this.#Q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#Q.count+=1;for(let Z of a1)try{let X=this.#V[Z];if(X)this.#X.on(Z,X)}catch(X){}this.#X.emit=(Z,...X)=>{return this.#H(Z,...X)},this.#X.reallyExit=(Z)=>{return this.#_(Z)}}unload(){if(!this.#A)return;this.#A=!1,a1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(q){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#K,this.#Q.count-=1}#_(Z){if(!_7(this.#X))return 0;return this.#X.exitCode=Z||0,this.#Q.emit("exit",this.#X.exitCode,null),this.#K.call(this.#X,this.#X.exitCode)}#H(Z,...X){let q=this.#Y;if(Z==="exit"&&_7(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let Q=q.call(this.#X,Z,...X);return this.#Q.emit("exit",this.#X.exitCode,null),Q}else return q.call(this.#X,Z,...X)}};fZ=globalThis.process,{onExit:bK,load:Ku,unload:Uu}=Jj(_7(fZ)?new SK(fZ):new CK)});import{addAbortListener as Yj}from"node:events";var fK=(Z,{cleanup:X,detached:q},{signal:Q})=>{if(!X||q)return;let $=bK(()=>{Z()});Yj(Q,()=>{$()})};var gK=B(()=>{hK()});var M7=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),r6=(Z,X,q)=>{let Q=Z[q];if(!Q.has(X))Q.set(X,[]);let $=Q.get(X),J=l0();return $.push(J),{resolve:J.resolve.bind(J),promises:$}},b2=async({resolve:Z,promises:X},q)=>{Z();let[Q]=await Promise.race([Promise.allSettled([!0,q]),Promise.all([!1,...X])]);return!Q};var t6=B(()=>{w2()});import{on as Hj}from"node:events";import{getDefaultHighWaterMark as Kj}from"node:stream";var R7=({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:Q,encoding:$,preserveNewlines:J})=>{let Y=new AbortController;return Uj(X,Y),uK({stream:Z,controller:Y,binary:q,shouldEncode:!Z.readableObjectMode&&Q,encoding:$,shouldSplit:!Z.readableObjectMode,preserveNewlines:J})},Uj=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},mZ=({stream:Z,onStreamEnd:X,lines:q,encoding:Q,stripFinalNewline:$,allMixed:J})=>{let Y=new AbortController;Gj(X,Y,Z);let H=Z.readableObjectMode&&!J;return uK({stream:Z,controller:Y,binary:Q==="buffer",shouldEncode:!H,encoding:Q,shouldSplit:!H&&q,preserveNewlines:!$})},Gj=async(Z,X,q)=>{try{await Z}catch{q.destroy()}finally{X.abort()}},uK=({stream:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})=>{let H=Hj(Z,"data",{signal:X.signal,highWaterMark:mK,highWatermark:mK});return Wj({onStdoutChunk:H,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y})},uZ,mK,Wj=async function*({onStdoutChunk:Z,controller:X,binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y}){let H=Vj({binary:q,shouldEncode:Q,encoding:$,shouldSplit:J,preserveNewlines:Y});try{for await(let[U]of Z)yield*n1(U,H,0)}catch(U){if(!X.signal.aborted)throw U}finally{yield*n6(H)}},Vj=({binary:Z,shouldEncode:X,encoding:q,shouldSplit:Q,preserveNewlines:$})=>[Y7(Z,q,!X),$7(Z,$,!Q,{})].filter(Boolean);var F7=B(()=>{MZ();J7();DZ();uZ=Kj(!0),mK=uZ});var h2=(Z,X,{from:q,binary:Q=!1,preserveNewlines:$=!1}={})=>{let J=Q||D0.has(X),Y=C2(Z,q),H=R7({subprocessStdout:Y,subprocess:Z,binary:J,shouldEncode:!0,encoding:X,preserveNewlines:$});return Bj(H,Y,Z)},Bj=async function*(Z,X,q){try{yield*Z}finally{if(X.readable)X.destroy();await q}};var pZ=B(()=>{m1();A1();F7()});import{finished as Lj}from"node:stream/promises";var e6=async(Z,X,q,{isSameDirection:Q,stopOnExit:$=!1}={})=>{let J=zj(Z,q),Y=new AbortController;try{await Promise.race([...$?[q.exitPromise]:[],Lj(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!J.stdinCleanedUp)Rj(H,X,q,Q)}finally{Y.abort()}},zj=(Z,{originalStreams:X,subprocess:q})=>{let[Q]=X,$={stdinCleanedUp:!1};if(Z===Q)_j(Z,q,$);return $},_j=(Z,X,q)=>{let{_destroy:Q}=Z;Z._destroy=(...$)=>{Mj(X,q),Q.call(Z,...$)}},Mj=({exitCode:Z,signalCode:X},q)=>{if(Z!==null||X!==null)q.stdinCleanedUp=!0},Rj=(Z,X,q,Q)=>{if(!Fj(Z,X,q,Q))throw Z},Fj=(Z,X,q,Q=!0)=>{if(q.propagating)return pK(Z)||f2(Z);return q.propagating=!0,dZ(q,X)===Q?pK(Z):f2(Z)},dZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",f2=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",pK=(Z)=>Z?.code==="EPIPE";var Z4=()=>{};import{finished as dK}from"node:stream/promises";var cZ=async(Z)=>{if(Z===void 0)return;try{await lZ(Z)}catch{}},cK=async(Z)=>{if(Z===void 0)return;try{await nZ(Z)}catch{}},lZ=async(Z)=>{await dK(Z,{cleanup:!0,readable:!1,writable:!0})},nZ=async(Z)=>{await dK(Z,{cleanup:!0,readable:!0,writable:!1})},D7=async(Z,X)=>{if(await Z,X)throw X},A7=(Z,X,q)=>{if(q&&!f2(q))Z.destroy(q);else if(X)Z.destroy()};var iZ=B(()=>{Z4()});import{Readable as Dj}from"node:stream";import{callbackify as Aj}from"node:util";var T7=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,binary:$=!0,preserveNewlines:J=!0}={})=>{let Y=$||D0.has(q),{subprocessStdout:H,waitReadableDestroy:U}=aZ(Z,Q,X),{readableEncoding:G,readableObjectMode:W,readableHighWaterMark:V}=oZ(H,Y),{read:L,onStdoutDataDone:z}=sZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:q,preserveNewlines:J}),_=new Dj({read:L,destroy:Aj(tZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:U})),highWaterMark:V,objectMode:W,encoding:G});return rZ({subprocessStdout:H,onStdoutDataDone:z,readable:_,subprocess:Z}),_},aZ=(Z,X,q)=>{let Q=C2(Z,X),$=r6(q,Q,"readableDestroy");return{subprocessStdout:Q,waitReadableDestroy:$}},oZ=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q},Q)=>Q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:q}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:uZ},sZ=({subprocessStdout:Z,subprocess:X,binary:q,encoding:Q,preserveNewlines:$})=>{let J=l0(),Y=R7({subprocessStdout:Z,subprocess:X,binary:q,shouldEncode:!q,encoding:Q,preserveNewlines:$});return{read(){Tj(this,Y,J)},onStdoutDataDone:J}},Tj=async(Z,X,q)=>{try{let{value:Q,done:$}=await X.next();if($)q.resolve();else Z.push(Q)}catch{}},rZ=async({subprocessStdout:Z,onStdoutDataDone:X,readable:q,subprocess:Q,subprocessStdin:$})=>{try{if(await nZ(Z),await Q,await cZ($),await X,q.readable)q.push(null)}catch(J){await cZ($),lK(q,await jj(Q,J))}},jj=async(Z,X)=>{if(X.code!=="ERR_STREAM_PREMATURE_CLOSE")return X;try{await Z}catch(q){return q}return X},tZ=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:q},Q)=>{if(!await b2(q,X))return;lK(Z,Q),await D7(X,Q)},lK=(Z,X)=>{A7(Z,Z.readable,X)};var j7=B(()=>{m1();A1();F7();w2();t6();iZ()});import{Readable as Ij,Writable as wj,Duplex as Oj}from"node:stream";var I7=(Z,X)=>Ij.toWeb(Z.readable(X)),nK=(Z,X)=>wj.toWeb(Z.writable(X)),iK=(Z,X)=>Oj.toWeb(Z.duplex(X));var eZ=()=>{};var oK=({source:Z,sourcePromise:X,boundOptions:q,createNested:Q},...$)=>{let J=W8(),{destination:Y,destinationStream:H,destinationError:U,from:G,unpipeSignal:W}=kj(q,Q,$),{sourceStream:V,sourceError:L}=xj(Z,G),{options:z,fileDescriptors:_}=n0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:z,sourceError:L,destination:Y,destinationStream:H,destinationError:U,unpipeSignal:W,fileDescriptors:_,startTime:J}},kj=(Z,X,q)=>{try{let{destination:Q,pipeOptions:{from:$,to:J,unpipeSignal:Y}={}}=Nj(Z,X,...q),H=X7(Q,J);return{destination:Q,destinationStream:H,from:$,unpipeSignal:Y}}catch(Q){return{destinationError:Q}}},Nj=(Z,X,q,...Q)=>{if(Array.isArray(q))return{destination:X(aK,Z)(q,...Q),pipeOptions:Z};if(typeof q==="string"||q instanceof URL||z3(q)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[$,J,Y]=Z8(q,...Q);return{destination:X(aK)($,J,Y),pipeOptions:Y}}if(n0.has(q)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:q,pipeOptions:Q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${q}`)},aK=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),xj=(Z,X)=>{try{return{sourceStream:C2(Z,X)}}catch(q){return{sourceError:q}}};var sK=B(()=>{M3();V8();A1();R2()});var tK=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q,fileDescriptors:$,sourceOptions:J,startTime:Y})=>{let H=Pj({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q});if(H!==void 0)throw ZX({error:H,fileDescriptors:$,sourceOptions:J,startTime:Y})},Pj=({sourceStream:Z,sourceError:X,destinationStream:q,destinationError:Q})=>{if(X!==void 0&&Q!==void 0)return Q;if(Q!==void 0)return SZ(Z),Q;if(X!==void 0)return CZ(q),X},ZX=({error:Z,fileDescriptors:X,sourceOptions:q,startTime:Q})=>E2({error:Z,command:rK,escapedCommand:rK,fileDescriptors:X,options:q,startTime:Q,isSync:!1}),rK="source.pipe(destination)";var XX=B(()=>{u6();L7()});var eK=async(Z)=>{let[{status:X,reason:q,value:Q=q},{status:$,reason:J,value:Y=J}]=await Z;if(!Y.pipedFrom.includes(Q))Y.pipedFrom.push(Q);if($==="rejected")throw Y;if(X==="rejected")throw Q;return Y};var ZU=()=>{};import{finished as Ej}from"node:stream/promises";var XU=(Z,X,q)=>{let Q=w7.has(X)?yj(Z,X):vj(Z,X);return g1(Z,Sj,q.signal),g1(X,bj,q.signal),Cj(X),Q},vj=(Z,X)=>{let q=i1([Z]);return S2(q,X),w7.set(X,q),q},yj=(Z,X)=>{let q=w7.get(X);return q.add(Z),q},Cj=async(Z)=>{try{await Ej(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}w7.delete(Z)},w7,Sj=2,bj=1;var qU=B(()=>{B7();I8();L7();w7=new WeakMap});import{aborted as hj}from"node:util";var QU=(Z,X)=>Z===void 0?[]:[fj(Z,X)],fj=async(Z,{sourceStream:X,mergedStream:q,fileDescriptors:Q,sourceOptions:$,startTime:J})=>{await hj(Z,X),await q.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw ZX({error:Y,fileDescriptors:Q,sourceOptions:$,startTime:J})};var $U=B(()=>{XX()});var O7=(Z,...X)=>{if(s(X[0]))return O7.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:q,...Q}=oK(Z,...X),$=new AbortController,J=rj({...Q,destination:q,pipeFailureController:$});return J.pipe=O7.bind(void 0,{...Z,source:q,sourcePromise:J,boundOptions:{}}),gj(J,q,$.signal),J},gj=(Z,X,q)=>{if(X===void 0)return;mj(Z,X),cj(Z,X,q)},mj=(Z,X)=>{let q=n0.get(X);n0.set(Z,q),Z.stdio=X.stdio,Z.all=X.all;let{options:{encoding:Q}}=q,$=M7();Z[Symbol.asyncIterator]=h2.bind(void 0,Z,Q,{}),Z.iterable=h2.bind(void 0,Z,Q),Z.readable=pj.bind(void 0,Z,{subprocess:Z,concurrentStreams:$,encoding:Q}),Z.readableStream=I7.bind(void 0,Z),uj(Z,X)},uj=(Z,X)=>{if(X.all===void 0){Z.all=void 0;return}Object.defineProperty(Z,"all",{get(){JU(Z,X.all);let q=Z.readable({from:"all"});return JU(Z,q),q},enumerable:!0,configurable:!0})},JU=(Z,X)=>{Object.defineProperty(Z,"all",{value:X,writable:!0,enumerable:!0,configurable:!0})},pj=(Z,X,...q)=>{let Q=T7(X,...q);return dj(Z,Q),Q},dj=async(Z,X)=>{try{await Z}catch(q){X.destroy(q)}},cj=(Z,X,q)=>{Z.sendMessage=X.sendMessage,Z.getOneMessage=lj.bind(void 0,X,q),Z.getEachMessage=aj.bind(void 0,Z,X,q)},lj=(Z,X,...q)=>{let Q=new AbortController,$=Z.getOneMessage(...YU(q,Q.signal,kZ));return nj(X,$,Q)},nj=async(Z,X,q)=>{try{return await Promise.race([X,ij(Z,q.signal)])}finally{q.abort()}},ij=(Z,X)=>new Promise((q,Q)=>{if(Z.aborted){Q(Z.reason);return}Z.addEventListener("abort",()=>{Q(Z.reason)},{once:!0,signal:X})}),aj=(Z,X,q,...Q)=>{let $=new AbortController,J=X.getEachMessage(...YU(Q,$.signal,xZ));return sj(q,$),oj(Z,J,$)},oj=async function*(Z,X,q){try{yield*X}finally{q.abort(),await Z}},YU=(Z,X,q)=>{if(Z[0]===null)return Z;let[Q]=Z;return[{...Q,[q]:{signal:X,shouldAwait:!1}}]},sj=(Z,X)=>{if(Z.aborted){X.abort();return}Z.addEventListener("abort",()=>{X.abort()},{once:!0,signal:X.signal})},rj=async({sourcePromise:Z,sourceStream:X,sourceOptions:q,sourceError:Q,destination:$,destinationStream:J,destinationError:Y,unpipeSignal:H,fileDescriptors:U,startTime:G,pipeFailureController:W})=>{let V=new AbortController;try{let L=tj(Z,$);tK({sourceStream:X,sourceError:Q,destinationStream:J,destinationError:Y,fileDescriptors:U,sourceOptions:q,startTime:G});let z=XU(X,J,V);return await Promise.race([eK(L),...QU(H,{sourceStream:X,mergedStream:z,sourceOptions:q,fileDescriptors:U,startTime:G})])}catch(L){throw W.abort(L),L}finally{V.abort()}},tj=(Z,X)=>Promise.allSettled([Z,X]);var HU=B(()=>{e0();A1();t6();pZ();j7();eZ();NZ();W7();sK();XX();ZU();qU();$U()});import{setImmediate as ej}from"node:timers/promises";var KU=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,allMixed:H,stripFinalNewline:U,verboseInfo:G,streamInfo:W})=>{let V=ZI({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:H,verboseInfo:G,streamInfo:W});if(!$){await Promise.all([XI(Z),V]);return}let L=LZ(U,q),z=mZ({stream:Z,onStreamEnd:X,lines:Y,encoding:Q,stripFinalNewline:L,allMixed:H}),[_]=await Promise.all([qI({stream:Z,iterable:z,fdNumber:q,encoding:Q,maxBuffer:J,lines:Y}),V]);return _},ZI=async({stream:Z,onStreamEnd:X,fdNumber:q,encoding:Q,allMixed:$,verboseInfo:J,streamInfo:{fileDescriptors:Y}})=>{if(!G7({stdioItems:Y[q]?.stdioItems,encoding:Q,verboseInfo:J,fdNumber:q}))return;let H=mZ({stream:Z,onStreamEnd:X,lines:!0,encoding:Q,stripFinalNewline:!0,allMixed:$});await CH(H,Z,q,J)},XI=async(Z)=>{if(await ej(),Z.readableFlowing===null)Z.resume()},qI=async({stream:Z,stream:{readableObjectMode:X},iterable:q,fdNumber:Q,encoding:$,maxBuffer:J,lines:Y})=>{try{if(X||Y)return await d8(q,{maxBuffer:J});if($==="buffer")return new Uint8Array(await c8(q,{maxBuffer:J}));return await n8(q,{maxBuffer:J})}catch(H){return UU(BY({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:$,fdNumber:Q}))}},qX=async(Z)=>{try{return await Z}catch(X){return UU(X)}},UU=({bufferedData:Z})=>d$(Z)?new Uint8Array(Z):Z;var QX=B(()=>{i8();F0();TZ();F7();c1();l6()});var GU=({subprocess:Z,encoding:X,buffer:q,maxBuffer:Q,lines:$,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((U,G)=>$X({stream:U,fdNumber:G,encoding:X,buffer:q[G],maxBuffer:Q[G],lines:$[G],allMixed:!1,stripFinalNewline:J,verboseInfo:Y,streamInfo:H})),$X=async({stream:Z,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G})=>{if(!Z)return;let W=e6(Z,X,G);if(dZ(G,X)){await W;return}let[V]=await Promise.all([KU({stream:Z,onStreamEnd:W,fdNumber:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,allMixed:Y,stripFinalNewline:H,verboseInfo:U,streamInfo:G}),W]);return V};var JX=B(()=>{QX();Z4()});var WU=({stdout:Z,stderr:X},{all:q})=>q&&(Z||X)?i1([Z,X].filter(Boolean)):void 0,VU=({subprocess:Z,all:X,encoding:q,buffer:Q,maxBuffer:$,lines:J,stripFinalNewline:Y,verboseInfo:H,streamInfo:U})=>$X({...QI(Z,X,Q),fdNumber:"all",encoding:q,maxBuffer:$[1]+$[2],lines:J[1]||J[2],allMixed:$I(Z,X),stripFinalNewline:Y,verboseInfo:H,streamInfo:U}),QI=({stdout:Z,stderr:X},q,[,Q,$])=>{let J=Q||$;if(!J)return{stream:q,buffer:J};if(!Q)return{stream:X,buffer:J};if(!$)return{stream:Z,buffer:J};return{stream:q,buffer:J}},$I=({stdout:Z,stderr:X},q)=>q&&Z&&X&&Z.readableObjectMode!==X.readableObjectMode;var YX=B(()=>{B7();JX()});var BU=(Z)=>D2(Z,"ipc"),LU=(Z,X)=>{let q=G8(Z);d0({type:"ipc",verboseMessage:q,fdNumber:"ipc",verboseInfo:X})};var zU=B(()=>{A2();M1()});var _U=async({subprocess:Z,buffer:X,maxBuffer:q,ipc:Q,ipcOutput:$,verboseInfo:J})=>{if(!Q)return $;let Y=BU(J),H=q1(X,"ipc"),U=q1(q,"ipc");for await(let G of PZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:Q,shouldAwait:!1,reference:!0})){if(H)LY(Z,$,U),$.push(G);if(Y)LU(G,J)}return $},MU=async(Z,X)=>{return await Promise.allSettled([Z]),X};var RU=B(()=>{c1();zU();Q1();W7()});import{once as JI}from"node:events";var FU=async({subprocess:Z,kill:X,all:q,options:{encoding:Q,buffer:$,maxBuffer:J,lines:Y,timeoutDuration:H,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,stripFinalNewline:V,ipc:L,ipcInput:z},context:_,verboseInfo:M,fileDescriptors:R,originalStreams:F,onInternalError:k,controller:D})=>{let w=uH(Z,_),T={originalStreams:F,fileDescriptors:R,subprocess:Z,exitPromise:w,propagating:!1},j=GU({subprocess:Z,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:M,streamInfo:T}),A=VU({subprocess:Z,all:q,encoding:Q,buffer:$,maxBuffer:J,lines:Y,stripFinalNewline:V,verboseInfo:M,streamInfo:T}),S=[],O=_U({subprocess:Z,buffer:$,maxBuffer:J,ipc:L,ipcOutput:S,verboseInfo:M}),x=YI(F,Z,T),E=HI(R,T);try{return await Promise.race([Promise.all([{},dH(w),Promise.all(j),A,O,C9(Z,z,L),...x,...E]),k,KI(Z,D),...x9(X,H,_,D),...oJ({kill:X,cancelSignal:U,gracefulCancel:G,context:_,controller:D}),...k9({subprocess:Z,kill:X,cancelSignal:U,gracefulCancel:G,forceKillAfterDelay:W,context:_,controller:D})])}catch(h){return _.terminationReason??="other",Promise.all([{error:h},w,Promise.all(j.map((i)=>qX(i))),qX(A),MU(O,S),Promise.allSettled(x),Promise.allSettled(E)])}},YI=(Z,X,q)=>Z.map((Q,$)=>Q===X.stdio[$]?void 0:e6(Q,$,q)),HI=(Z,X)=>Z.flatMap(({stdioItems:q},Q)=>q.filter(({value:$,stream:J=$})=>b0(J,{checkOpen:!1})&&!C0(J)).map(({type:$,value:J,stream:Y=J})=>e6(Y,Q,X,{isSameDirection:x0.has($),stopOnExit:$==="native"}))),KI=async(Z,{signal:X})=>{let[q]=await JI(Z,"error",{signal:X});throw q};var DU=B(()=>{d1();p3();y3();u3();X1();V0();QX();RU();c3();YX();JX();wZ();Z4()});import{Writable as UI}from"node:stream";import{callbackify as AU}from"node:util";var TU=({subprocess:Z,concurrentStreams:X},{to:q}={})=>{let{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}=HX(Z,q,X),Y=new UI({...KX(Q,Z,$),destroy:AU(GX.bind(void 0,{subprocessStdin:Q,subprocess:Z,waitWritableFinal:$,waitWritableDestroy:J})),highWaterMark:Q.writableHighWaterMark,objectMode:Q.writableObjectMode});return UX(Q,Y,void 0,Z),Y},HX=(Z,X,q)=>{let Q=X7(Z,X),$=r6(q,Q,"writableFinal"),J=r6(q,Q,"writableDestroy");return{subprocessStdin:Q,waitWritableFinal:$,waitWritableDestroy:J}},KX=(Z,X,q)=>({write:GI.bind(void 0,Z),final:AU(WI.bind(void 0,Z,X,q))}),GI=(Z,X,q,Q)=>{if(Z.write(X,q))Q();else Z.once("drain",Q)},WI=async(Z,X,q)=>{if(!await b2(q,X))return;if(Z.writable)Z.end();await X},UX=async(Z,X,q,Q)=>{try{if(await lZ(Z),await Q,X.writable)X.end()}catch($){await cK(q),jU(X,await VI(Q,$))}},VI=async(Z,X)=>{if(!BI(X))return X;try{await Z}catch(q){return q}return X},BI=(Z)=>Z===void 0||f2(Z),GX=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:q,waitWritableDestroy:Q},$)=>{if(await b2(q,X),await b2(Q,X))jU(Z,$),await D7(X,$)},jU=(Z,X)=>{A7(Z,Z.writable,X)};var WX=B(()=>{A1();Z4();t6();iZ()});import{Duplex as LI}from"node:stream";import{callbackify as zI}from"node:util";var IU=({subprocess:Z,concurrentStreams:X,encoding:q},{from:Q,to:$,binary:J=!0,preserveNewlines:Y=!0}={})=>{let H=J||D0.has(q),{subprocessStdout:U,waitReadableDestroy:G}=aZ(Z,Q,X),{subprocessStdin:W,waitWritableFinal:V,waitWritableDestroy:L}=HX(Z,$,X),{readableEncoding:z,readableObjectMode:_,readableHighWaterMark:M}=oZ(U,H),{read:R,onStdoutDataDone:F}=sZ({subprocessStdout:U,subprocess:Z,binary:H,encoding:q,preserveNewlines:Y}),k=new LI({read:R,...KX(W,Z,V),destroy:zI(_I.bind(void 0,{subprocessStdout:U,subprocessStdin:W,subprocess:Z,waitReadableDestroy:G,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:M,writableHighWaterMark:W.writableHighWaterMark,readableObjectMode:_,writableObjectMode:W.writableObjectMode,encoding:z});return rZ({subprocessStdout:U,onStdoutDataDone:F,readable:k,subprocess:Z,subprocessStdin:W}),UX(W,k,U,Z),k},_I=async({subprocessStdout:Z,subprocessStdin:X,subprocess:q,waitReadableDestroy:Q,waitWritableFinal:$,waitWritableDestroy:J},Y)=>{await Promise.all([tZ({subprocessStdout:Z,subprocess:q,waitReadableDestroy:Q},Y),GX({subprocessStdin:X,subprocess:q,waitWritableFinal:$,waitWritableDestroy:J},Y)])};var wU=B(()=>{m1();j7();WX()});var OU=(Z,{encoding:X})=>{let q=M7();Z.readable=T7.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.writable=TU.bind(void 0,{subprocess:Z,concurrentStreams:q}),Z.duplex=IU.bind(void 0,{subprocess:Z,concurrentStreams:q,encoding:X}),Z.readableStream=I7.bind(void 0,Z),Z.writableStream=nK.bind(void 0,Z),Z.transformStream=iK.bind(void 0,Z),Z.iterable=h2.bind(void 0,Z,X),Z[Symbol.asyncIterator]=h2.bind(void 0,Z,X,{})};var kU=B(()=>{t6();j7();WX();wU();eZ();pZ()});var NU=(Z,X)=>Object.assign(Z,X);var xU=()=>{};import{setMaxListeners as MI}from"node:events";import{spawn as RI}from"node:child_process";var PU=(Z,X,q,Q)=>{let{file:$,commandArguments:J,command:Y,escapedCommand:H,startTime:U,verboseInfo:G,options:W,fileDescriptors:V}=FI(Z,X,q),{subprocess:L,promise:z,kill:_,all:M,convertedStreams:R}=AI({file:$,commandArguments:J,options:W,startTime:U,verboseInfo:G,command:Y,escapedCommand:H,fileDescriptors:V}),F=TI({promise:z,nodeChildProcess:L,kill:_,all:M,convertedStreams:R,options:W});return F.pipe=O7.bind(void 0,{source:F,sourcePromise:z,boundOptions:{},createNested:Q}),n0.set(F,{options:W,fileDescriptors:V}),F},FI=(Z,X,q)=>{let{command:Q,escapedCommand:$,startTime:J,verboseInfo:Y}=B8(Z,X,q),{file:H,commandArguments:U,options:G}=h8(Z,X,q),W=DI(G),V=LK(W,Y);return{file:H,commandArguments:U,command:Q,escapedCommand:$,startTime:J,verboseInfo:Y,options:W,fileDescriptors:V}},DI=({timeout:Z,signal:X,...q})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...q,timeoutDuration:Z}},AI=({file:Z,commandArguments:X,options:q,startTime:Q,verboseInfo:$,command:J,escapedCommand:Y,fileDescriptors:H})=>{let U;try{U=RI(...f8(Z,X,xK(q)))}catch(R){return YK({error:R,command:J,escapedCommand:Y,fileDescriptors:H,options:q,startTime:Q,verboseInfo:$})}let G=new AbortController;MI(1/0,G.signal);let W=[...U.stdio];wK(U,H,G),A9(U,q);let V={},L=l0(),z=iJ.bind(void 0,{kill:PK(U,q),options:q,onInternalError:L,context:V,controller:G});fK(z,q,G);let _=WU(U,q),M=II({subprocess:U,kill:z,all:_,options:q,startTime:Q,verboseInfo:$,fileDescriptors:H,originalStreams:W,command:J,escapedCommand:Y,context:V,onInternalError:L,controller:G});return{subprocess:U,promise:M,kill:z,all:_}},TI=({promise:Z,nodeChildProcess:X,kill:q,all:Q,convertedStreams:$,options:J})=>{let Y=NU(Z,jI(X,Q));if(Y.kill=q??Y.kill,$===void 0)OU(Y,J);else Object.assign(Y,$);return eH(Y,X,J),Y},jI=(Z,X)=>({nodeChildProcess:Z,pid:Z.pid,stdin:Z.stdin,stdout:Z.stdout,stderr:Z.stderr,stdio:Z.stdio,all:X,kill:Z.kill.bind(Z)}),II=async({subprocess:Z,kill:X,all:q,options:Q,startTime:$,verboseInfo:J,fileDescriptors:Y,originalStreams:H,command:U,escapedCommand:G,context:W,onInternalError:V,controller:L})=>{let[z,[_,M],R,F,k]=await FU({subprocess:Z,kill:X,all:q,options:Q,context:W,verboseInfo:J,fileDescriptors:Y,originalStreams:H,onInternalError:V,controller:L});L.abort(),V.resolve();let D=R.map((j,A)=>Y1(j,Q,A)),w=Y1(F,Q,"all"),T=wI({errorInfo:z,exitCode:_,signal:M,stdio:D,all:w,ipcOutput:k,context:W,options:Q,command:U,escapedCommand:G,startTime:$});return v2(T,J,Q)},wI=({errorInfo:Z,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,context:Y,options:H,command:U,escapedCommand:G,startTime:W})=>("error"in Z)?m6({error:Z.error,command:U,escapedCommand:G,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof $1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:q,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W,isSync:!1}):o8({command:U,escapedCommand:G,stdio:Q,all:$,ipcOutput:J,options:H,startTime:W});var EU=B(()=>{i8();O3();o3();A1();s3();EZ();P6();u6();s8();GK();zK();l6();OK();A8();EK();gK();HU();YX();DU();kU();w2();xU()});var k7=(Z,X)=>{let q={__proto__:null,...Z},Q=Object.fromEntries(Object.entries(X).map(([$,J])=>[$,OI($,q[$],J)]));return{...q,...Q}},OI=(Z,X,q)=>{if(kI.has(Z)&&s(X)&&s(q))return{...X,...q};return q},kI;var vU=B(()=>{e0();Q1();kI=new Set(["env",...T3])});var g2=(Z,X,q,Q)=>{let $=(Y,H,U)=>g2(Y,H,q,U),J=(...Y)=>NI({mapArguments:Z,deepOptions:q,boundOptions:X,setBoundExeca:Q,createNested:$},...Y);if(Q!==void 0)Q(J,$,X);return J},NI=({mapArguments:Z,deepOptions:X={},boundOptions:q={},setBoundExeca:Q,createNested:$},J,...Y)=>{if(s(J))return $(Z,k7(q,J),Q);let{file:H,commandArguments:U,options:G,isSync:W}=xI({mapArguments:Z,firstArgument:J,nextArguments:Y,deepOptions:X,boundOptions:q});return W?nH(H,U,G):PU(H,U,G,$)},xI=({mapArguments:Z,firstArgument:X,nextArguments:q,deepOptions:Q,boundOptions:$})=>{let J=o$(X)?s$(X,q):[X,...q],[Y,H,U]=Z8(...J),G=k7(k7(Q,$),U),{options:W=G,isSync:V=!1}=Z({options:G});return{file:Y,commandArguments:H,options:W,isSync:V}};var yU=B(()=>{e0();M3();r$();iH();EU();vU()});var CU=(Z,X,q)=>{Z.sync=X(PI,q),Z.s=Z.sync},SU=({options:Z})=>bU(Z),PI=({options:Z})=>({...bU(Z),isSync:!0}),bU=(Z)=>({options:{...EI(Z),...Z}}),EI=({input:Z,inputFile:X,stdio:q})=>Z===void 0&&X===void 0&&q===void 0?{stdin:"inherit"}:{},hU;var fU=B(()=>{hU={preferLocal:!0}});var VX,P0,Uc,Gc,Wc,Vc,Bc,Lc;var m2=B(()=>{yU();d3();fU();EZ();VX=g2(()=>({})),P0=g2(()=>({isSync:!0})),Uc=g2(E9),Gc=g2(SU,{},hU,CU),{sendMessage:Wc,getOneMessage:Vc,getEachMessage:Bc,getCancelSignal:Lc}=ZK()});import{execSync as vI}from"child_process";function u2(Z,X){let Q=[];try{const q=z2(Q,N7`execSync: ${Z.slice(0,100)}`,0);return vI(Z,X)}catch($){var J=$,Y=1}finally{_2(Q,J,Y)}}var BX=B(()=>{L0()});async function yI(Z){if(process.platform==="win32"){let q=await VX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim().split(/\r?\n/)[0]||null}let X=await VX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function CI(Z){if(process.platform==="win32")try{return u2(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return u2(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var LX,gU,x7;var P7=B(()=>{m2();BX();LX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,gU=LX?async(Z)=>LX(Z):yI,x7=LX??CI});function mU(Z,X){return{cmd:x7(Z)??Z,args:X}}var uU=B(()=>{P7()});import{dirname as SI,join as pU}from"path";async function p2(Z){try{return!!await gU(Z)}catch{return!1}}function mI(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function pI(){if(process.env.CURSOR_TRACE_ID)return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("cursor"))return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("windsurf"))return"windsurf";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("antigravity"))return"antigravity";let Z=process.env.__CFBundleIdentifier?.toLowerCase();if(Z?.includes("vscodium"))return"codium";if(Z?.includes("windsurf"))return"windsurf";if(Z?.includes("com.google.android.studio"))return"androidstudio";if(Z){for(let X of uI)if(Z.includes(X))return X}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(process.platform==="darwin")return"pycharm";return"pycharm"}if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(nU())return"ssh-session";if(process.env.TERM){let X=process.env.TERM;if(X.includes("alacritty"))return"alacritty";if(X.includes("rxvt"))return"rxvt";if(X.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function nU(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function yc(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return d2.platform}var J0,bI,hI,fI,lU,gI,uI,dI,d2;var X4=B(()=>{T1();cU();u$();a0();uU();z0();P7();J0=c(()=>{let Z=dU(),X=Z0(),q=pU(X,`config${Z}.json`);if(!N().existsSync(q)){let $=process.env.CLAUDIN_CONFIG_DIR?X:SI(X),J=pU($,`.claudin${Z}.json`);if(N().existsSync(J))return J}return q}),bI=c(async()=>{try{let{default:Z}=await import("./index-1.1.32-3wzxvtbf.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});hI=c(async()=>{let Z=[];if(await p2("npm"))Z.push("npm");if(await p2("yarn"))Z.push("yarn");if(await p2("pnpm"))Z.push("pnpm");return Z}),fI=c(async()=>{let Z=[];if(await p2("bun"))Z.push("bun");if(await p2("deno"))Z.push("deno");if(await p2("node"))Z.push("node");return Z}),lU=c(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),gI=c(()=>{try{if(!lU())return!1;let{cmd:Z}=mU("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});uI=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];dI=c(()=>{if(e(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(e(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(e(process.env.RENDER))return"render";if(e(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(e(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(N().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(e(process.env.GITHUB_ACTIONS))return"github-actions";if(e(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(e(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(d2.platform==="darwin")return"unknown-darwin";if(d2.platform==="linux")return"unknown-linux";if(d2.platform==="win32")return"unknown-win32";return"unknown"});d2={hasInternetAccess:bI,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:pI(),isSSH:nU,getPackageManagers:hI,getRuntimes:fI,isRunningWithBun:c(m$),isWslEnvironment:lU,isNpmFromWindowsPath:gI,isConductor:mI,detectDeploymentEnvironment:dI}});import{unwatchFile as cI,watchFile as lI}from"fs";function iI(){return}function c2(Z){let X=o0.config;if(!X)return!1;let q=X.oauthAccount!==void 0&&Z.oauthAccount===void 0,Q=X.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return q||Q}function AX(Z){return _X.add(Z),()=>_X.delete(Z)}function q4(){for(let Z of _X)try{Z()}catch{}}function MX(Z){return{...Z,projects:sI(Z.projects)}}function B0(Z){let X=null;try{if(y7(J0(),O0,(Q)=>{let $=Z(Q);if($===Q)return Q;return X=MX($),X})&&X)Q4(X),q4()}catch(q){let Q=Y0(q);if(Q==="EACCES"||Q==="EPERM"||Q==="EROFS"){P(`Skipping global config write due to permission error: ${q}`,{level:"error"});return}P(`Failed to save config with lock: ${q}`,{level:"error"});let $=H1(J0(),O0);if(c2($)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=Z($);if(J===$)return;X=MX(J),v7(J0(),X,S1),Q4(X),q4()}}function oI(){let Z=RX+FX;RX=0,FX=0}function DX(Z){if(Z.installMethod!==void 0)return Z;let X=Z,q="unknown",Q=Z.autoUpdates??!0;switch(X.autoUpdaterStatus){case"migrated":q="local";break;case"installed":q="native";break;case"disabled":Q=!1;break;case"enabled":case"no_permissions":case"not_configured":q="global";break;case void 0:break}return{...Z,installMethod:q,autoUpdates:Q}}function sI(Z){if(!Z)return Z;let X={},q=!1;for(let[Q,$]of Object.entries(Z)){let J=$;if(J.history!==void 0){q=!0;let{history:Y,...H}=J;X[Q]=H}else X[Q]=$}return q?X:Z}function tI(){if(zX)return;zX=!0;let Z=J0();lI(Z,{interval:rI,persistent:!1},(X)=>{if(X.mtimeMs<=o0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((q)=>{if(X.mtimeMs<=o0.mtime)return;let Q=k0(R0(q));if(Q===null||typeof Q!=="object")return;o0={config:DX({...O0(),...Q}),mtime:X.mtimeMs},E7({mtime:X.mtimeMs,size:X.size})}).catch(()=>{})}),$4(async()=>{cI(Z),zX=!1})}function Q4(Z){o0={config:Z,mtime:Date.now()},E7(null)}function a(){if(o0.config)return RX++,o0.config;FX++;try{let Z=null;try{Z=N().statSync(J0())}catch{}let X=DX(H1(J0(),O0));return o0={config:X,mtime:Z?.mtimeMs??Date.now()},E7(Z?{mtime:Z.mtimeMs,size:Z.size}:null),tI(),X}catch{return DX(H1(J0(),O0))}}function eI(){let Z=a().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function Zw(Z){let X=a();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function $w(Z){o0.config=Z,o0.mtime=Z?Date.now():0}var nI,_X,o0,RX=0,FX=0,aI=20,rI=1000,zX=!1,Xw,qw,Qw;var l2=B(()=>{_6();C7();iU();I6();A6();h0();X4();j1();z0();nI={...S1,autoUpdates:!1,knowledgeGraphEnabled:!0};_X=new Set;o0={config:null,mtime:0};$4(async()=>{oI()});Xw=H1,qw=c2,Qw=MX});import{dirname as Jw}from"path";function H0(Z,X,q){let Q=Yw();if(!Q)return;let $={timestamp:new Date().toISOString(),level:Z,event:X,data:q??{}},J=N(),Y=m($)+`
63
- `;try{J.appendFileSync(Q,Y)}catch{try{J.mkdirSync(Jw(Q)),J.appendFileSync(Q,Y)}catch{}}}function Yw(){return process.env.CLAUDIN_DIAGNOSTICS_FILE}async function oc(Z,X,q){let Q=Date.now();H0("info",`${Z}_started`);try{let $=await X(),J=q?q($):{};return H0("info",`${Z}_completed`,{duration_ms:Date.now()-Q,...J}),$}catch($){throw H0("error",`${Z}_failed`,{duration_ms:Date.now()-Q}),$}}var J4=B(()=>{z0();L0()});import{readFileSync as Hw}from"node:fs";import{homedir as Kw}from"node:os";import{join as Uw}from"node:path";function Gw(){if(I1!==void 0)return;try{let Z=process.env.CLAUDE_FEATURE_FLAGS_FILE??Uw(Kw(),".claudin","feature-flags.json"),X=JSON.parse(Hw(Z,"utf-8"));I1=X!==null&&typeof X==="object"&&!Array.isArray(X)?X:null}catch{I1=null}}function o1(Z,X){if(Gw(),Object.hasOwn(oU,Z))return oU[Z];if(I1!==null&&I1!==void 0&&Object.hasOwn(I1,Z))return I1[Z];if(Object.hasOwn(aU,Z))return aU[Z];return X}function s1(Z,X){return o1(Z,X)}function Zl(Z,X,q){return o1(Z,X)}async function Xl(Z,X){return o1(Z,X)}function ql(Z){return Boolean(o1(Z,!1))}async function Ql(Z){return Boolean(o1(Z,!1))}async function $l(Z){return!1}function Jl(Z,X){return o1(Z,X)}async function Yl(Z,X){return o1(Z,X)}function Kl(){}function Ul(){I1=void 0}function Gl(Z){return Ww}var aU,oU,I1,Hl=async()=>null,Ww=()=>{};var S7=B(()=>{aU={tengu_sedge_lantern:!0,tengu_passport_quail:!0,tengu_coral_fern:!0,tengu_bramble_lintel:15,tengu_glacier_2xr:!0,tengu_scratch:!0},oU={tengu_disable_bypass_permissions_mode:!1}});function TX(Z){let{buffer:X,bytesRead:q}=N().readSync(Z,{length:4096});if(q===0)return"utf8";if(q>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(q>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function jX(Z){let X=0,q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===`
64
- `)if(Q>0&&Z[Q-1]==="\r")X++;else q++;return X>q?"CRLF":"LF"}function Vw(Z){let X=N(),{resolvedPath:q,isSymlink:Q}=w1(X,Z);if(Q)P(`Reading through symlink: ${Z} -> ${q}`);let $=TX(q),J=X.readFileSync(q,{encoding:$}),Y=jX(J.slice(0,4096));return{content:J.replaceAll(`\r
65
- `,`
66
- `),encoding:$,lineEndings:Y}}function K1(Z){return Vw(Z).content}var Y4=B(()=>{h0();z0()});class sU{cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=N(),q;try{q=X.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let Q=this.cache.get(Z);if(Q&&Q.mtime===q.mtimeMs)return{content:Q.content,encoding:Q.encoding};let $=tU(Z),J=X.readFileSync(Z,{encoding:$}).replaceAll(`\r
67
- `,`
68
- `);if(q.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:J,encoding:$,mtime:q.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:J,encoding:$}}clear(){this.cache.clear()}invalidate(Z){this.cache.delete(Z)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}get size(){return this.cache.size}}var IX;var rU=B(()=>{b7();z0();IX=new sU});var Al,A0;var n2=B(()=>{T1();z0();y0();Al=["macos","wsl"],A0=c(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){g(Z)}return"linux"}return"unknown"}catch(Z){return g(Z),"unknown"}})});import*as i2 from"path";import*as eU from"path/win32";function wX(Z){try{return u2(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function Bw(Z){if(Z==="git"){let X=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let q of X)if(wX(q))return q}try{let q=u2(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
69
- `).filter(Boolean),Q=r().toLowerCase();for(let $ of q){let J=i2.resolve($).toLowerCase();if(i2.dirname(J).toLowerCase()===Q||J.startsWith(Q+i2.sep)){P(`Skipping potentially malicious executable in current directory: ${$}`);continue}return $}return null}catch{return null}}function xl(){if(A0()==="windows"){let Z=Lw();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var Lw,h7,ZG;var XG=B(()=>{T1();U1();h0();BX();e4();n2();Lw=c(()=>{if(process.env.CLAUDIN_GIT_BASH_PATH){if(wX(process.env.CLAUDIN_GIT_BASH_PATH))return process.env.CLAUDIN_GIT_BASH_PATH;console.error(`Claudin was unable to find CLAUDIN_GIT_BASH_PATH path "${process.env.CLAUDIN_GIT_BASH_PATH}"`),process.exit(1)}let Z=Bw("git");if(Z){let X=eU.join(Z,"..","..","bin","bash.exe");if(wX(X))return X}console.error("Claudin on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDIN_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),h7=_1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let X=Z.match(/^([A-Za-z]):[/\\]/);if(X)return"/"+X[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),ZG=_1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let Q=X[1].toUpperCase(),$=Z.slice(("/cygdrive/"+X[1]).length);return Q+":"+($||"\\").replace(/\//g,"\\")}let q=Z.match(/^\/([A-Za-z])(\/|$)/);if(q){let Q=q[1].toUpperCase(),$=Z.slice(2);return Q+":"+($||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as qG}from"os";import{dirname as QG,isAbsolute as _w,join as Mw,normalize as OX,posix as $G,relative as Rw,resolve as Fw}from"path";function NX(Z,X){let q=X??r()??N().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof q!=="string")throw TypeError(`Base directory must be a string, received ${typeof q}`);if(Z.includes("\x00")||q.includes("\x00"))throw Error("Path contains null bytes");let Q=Z.trim();if(!Q)return OX(q).normalize("NFC");if(Q==="~")return qG().normalize("NFC");if(Q.startsWith("~/"))return Mw(qG(),Q.slice(2)).normalize("NFC");let $=Q;if(A0()==="windows"&&Q.match(/^\/[a-z]\//i))try{$=ZG(Q)}catch{$=Q}if(_w($))return OX($).normalize("NFC");return Fw(q,$).normalize("NFC")}function hl(Z){let X=Rw(r(),Z);return X.startsWith("..")?Z:X}function fl(Z,X){if(A0()==="windows"){let q=h7(Z),Q=h7(X);return $G.relative(q,Q)}return $G.relative(Z,X)}function gl(Z){if(A0()==="windows")return h7(Z);return Z}function ml(Z){let X=NX(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return QG(X);try{if(N().statSync(X).isDirectory())return X}catch{}return QG(X)}function ul(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function O1(Z){return OX(Z).replace(/\\/g,"/")}var H4=B(()=>{U1();z0();n2();XG();zw()});import{chmodSync as Dw,writeFileSync as JG}from"fs";import{realpath as Aw,stat as UG}from"fs/promises";import{homedir as GG}from"os";import{basename as xX,dirname as f7,extname as YG,isAbsolute as Tw,join as a2,normalize as jw,relative as WG,resolve as Iw,sep as K4}from"path";async function $n(Z){try{return await UG(Z),!0}catch{return!1}}function Jn(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(X){return g(X),null}}function Yn(Z){let X=N();return Math.floor(X.statSync(Z).mtimeMs)}async function Hn(Z){let X=await N().stat(Z);return Math.floor(X.mtimeMs)}function Kn(Z,X,q,Q){let $=X;if(Q==="CRLF")$=X.replaceAll(`\r
70
- `,`
71
- `).split(`
72
- `).join(`\r
73
- `);s2(Z,$,{encoding:q}),IX.invalidate(Z)}function tU(Z){try{let X=N(),{resolvedPath:q}=w1(X,Z);return TX(q)}catch(X){if(KG(X))P(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else g(X);return"utf8"}}function Un(Z,X="utf8"){try{let q=N(),{resolvedPath:Q}=w1(q,Z),{buffer:$,bytesRead:J}=q.readSync(Q,{length:4096}),Y=$.toString(X,0,J);return jX(Y)}catch(q){return g(q),"LF"}}function Gn(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function Ow(Z){let X=Z?NX(Z):void 0,q=X?WG(r(),X):void 0;return{absolutePath:X,relativePath:q}}function Wn(Z){let{relativePath:X}=Ow(Z);if(X&&!X.startsWith(".."))return X;let q=GG();if(Z.startsWith(q+K4))return"~"+Z.slice(q.length);return Z}function Vn(Z){let X=N();try{let q=f7(Z),Q=xX(Z,YG(Z)),Y=X.readdirSync(q).filter((H)=>xX(H.name,YG(H.name))===Q&&a2(q,H.name)!==Z)[0];if(Y)return Y.name;return}catch(q){if(!o2(q))g(q);return}}async function Ln(Z){let X=r(),q=f7(X),Q=Z;try{let H=await Aw(f7(Z));Q=a2(H,xX(Z))}catch{}let $=q===K4?K4:q+K4;if(!Q.startsWith($)||Q.startsWith(X+K4)||Q===X)return;let J=WG(q,Q),Y=a2(X,J);try{return await UG(Y),Y}catch{return}}function kw(){return!s1("tengu_compact_line_prefix_killswitch",!1)}function zn({content:Z,startLine:X}){if(!Z)return"";let q=Z.split(/\r?\n/);if(kw())return q.map((Q,$)=>`${$+X}→${Q}`).join(`
74
- `);return q.map((Q,$)=>{let J=String($+X);if(J.length>=6)return`${J}→${Q}`;return`${J.padStart(6," ")}→${Q}`}).join(`
75
- `)}function _n(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function Mn(Z){try{return N().isDirEmptySync(Z)}catch(X){return o2(X)}}function Rn(Z){let{content:X}=IX.readFile(Z);return X}function s2(Z,X,q={encoding:"utf-8"}){let Q=N(),$=Z;try{let U=Q.readlinkSync(Z);$=Tw(U)?U:Iw(f7(Z),U),P(`Writing through symlink: ${Z} -> ${$}`)}catch{}let J=`${$}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=Q.statSync($).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(U){if(!o2(U))throw U;if(q.mode!==void 0)Y=q.mode,P(`Setting permissions for new file: ${Y.toString(8)}`)}try{P(`Writing to temp file: ${J}`);let U={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)U.mode=q.mode;if(JG(J,X,U),P(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)Dw(J,Y),P("Applied original permissions to temp file");P(`Renaming ${J} to ${$}`),Q.renameSync(J,$),P(`File ${$} written atomically`)}catch(U){P(`Failed to write file atomically: ${U}`,{level:"error"});try{P(`Cleaning up temp file: ${J}`),Q.unlinkSync(J)}catch(G){P(`Failed to clean up temp file: ${G}`)}P(`Falling back to non-atomic write for ${$}`);try{let G={encoding:q.encoding,flush:!0};if(!H&&q.mode!==void 0)G.mode=q.mode;JG($,X,G),P(`File ${$} written successfully with non-atomic fallback`)}catch(G){throw P(`Non-atomic write also failed: ${G}`),G}}}function Fn(){let Z=A0(),X=GG();if(Z==="macos")return a2(X,"Desktop");if(Z==="windows"){let Q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(Q){let J=`/mnt/c${Q.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync(J))return J}try{let J=N().readdirSync("/mnt/c/Users");for(let Y of J){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=a2("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch($){g($)}}let q=a2(X,"Desktop");if(N().existsSync(q))return q;return X}function Dn(Z,X=ww){try{return N().statSync(Z).size<=X}catch{return!1}}function HG(Z){let X=jw(Z);if(A0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function An(Z,X){return HG(Z)===HG(X)}var ww=262144,Bn="Note: your current working directory is";var b7=B(()=>{S7();U1();h0();j1();Y4();rU();z0();y0();H4();n2()});var BG=d((jn,VG)=>{var k1=$0("constants"),Nw=process.cwd,g7=null,xw=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!g7)g7=Nw.call(process);return g7};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(m7=process.chdir,process.chdir=function(Z){g7=null,m7.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,m7)}var m7;VG.exports=Pw;function Pw(Z){if(k1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)q(Z);if(Z.chown=J(Z.chown),Z.fchown=J(Z.fchown),Z.lchown=J(Z.lchown),Z.chmod=Q(Z.chmod),Z.fchmod=Q(Z.fchmod),Z.lchmod=Q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=$(Z.chmodSync),Z.fchmodSync=$(Z.fchmodSync),Z.lchmodSync=$(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=U(Z.statSync),Z.fstatSync=U(Z.fstatSync),Z.lstatSync=U(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(W,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(W,V,L,z){if(z)process.nextTick(z)},Z.lchownSync=function(){};if(xw==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(W){function V(L,z,_){var M=Date.now(),R=0;W(L,z,function F(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-M<60000){if(setTimeout(function(){Z.stat(z,function(D,w){if(D&&D.code==="ENOENT")W(L,z,F);else _(k)})},R),R<100)R+=10;return}if(_)_(k)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(W){function V(L,z,_,M,R,F){var k;if(F&&typeof F==="function"){var D=0;k=function(w,T,j){if(w&&w.code==="EAGAIN"&&D<10)return D++,W.call(Z,L,z,_,M,R,k);F.apply(this,arguments)}}return W.call(Z,L,z,_,M,R,k)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,W);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(W){return function(V,L,z,_,M){var R=0;while(!0)try{return W.call(Z,V,L,z,_,M)}catch(F){if(F.code==="EAGAIN"&&R<10){R++;continue}throw F}}}(Z.readSync);function X(W){W.lchmod=function(V,L,z){W.open(V,k1.O_WRONLY|k1.O_SYMLINK,L,function(_,M){if(_){if(z)z(_);return}W.fchmod(M,L,function(R){W.close(M,function(F){if(z)z(R||F)})})})},W.lchmodSync=function(V,L){var z=W.openSync(V,k1.O_WRONLY|k1.O_SYMLINK,L),_=!0,M;try{M=W.fchmodSync(z,L),_=!1}finally{if(_)try{W.closeSync(z)}catch(R){}else W.closeSync(z)}return M}}function q(W){if(k1.hasOwnProperty("O_SYMLINK")&&W.futimes)W.lutimes=function(V,L,z,_){W.open(V,k1.O_SYMLINK,function(M,R){if(M){if(_)_(M);return}W.futimes(R,L,z,function(F){W.close(R,function(k){if(_)_(F||k)})})})},W.lutimesSync=function(V,L,z){var _=W.openSync(V,k1.O_SYMLINK),M,R=!0;try{M=W.futimesSync(_,L,z),R=!1}finally{if(R)try{W.closeSync(_)}catch(F){}else W.closeSync(_)}return M};else if(W.futimes)W.lutimes=function(V,L,z,_){if(_)process.nextTick(_)},W.lutimesSync=function(){}}function Q(W){if(!W)return W;return function(V,L,z){return W.call(Z,V,L,function(_){if(G(_))_=null;if(z)z.apply(this,arguments)})}}function $(W){if(!W)return W;return function(V,L){try{return W.call(Z,V,L)}catch(z){if(!G(z))throw z}}}function J(W){if(!W)return W;return function(V,L,z,_){return W.call(Z,V,L,z,function(M){if(G(M))M=null;if(_)_.apply(this,arguments)})}}function Y(W){if(!W)return W;return function(V,L,z){try{return W.call(Z,V,L,z)}catch(_){if(!G(_))throw _}}}function H(W){if(!W)return W;return function(V,L,z){if(typeof L==="function")z=L,L=null;function _(M,R){if(R){if(R.uid<0)R.uid+=4294967296;if(R.gid<0)R.gid+=4294967296}if(z)z.apply(this,arguments)}return L?W.call(Z,V,L,_):W.call(Z,V,_)}}function U(W){if(!W)return W;return function(V,L){var z=L?W.call(Z,V,L):W.call(Z,V);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function G(W){if(!W)return!0;if(W.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(W.code==="EINVAL"||W.code==="EPERM")return!0}return!1}}});var _G=d((In,zG)=>{var LG=$0("stream").Stream;zG.exports=Ew;function Ew(Z){return{ReadStream:X,WriteStream:q};function X(Q,$){if(!(this instanceof X))return new X(Q,$);LG.call(this);var J=this;this.path=Q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,$=$||{};var Y=Object.keys($);for(var H=0,U=Y.length;H<U;H++){var G=Y[H];this[G]=$[G]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){J._read()});return}Z.open(this.path,this.flags,this.mode,function(W,V){if(W){J.emit("error",W),J.readable=!1;return}J.fd=V,J.emit("open",V),J._read()})}function q(Q,$){if(!(this instanceof q))return new q(Q,$);LG.call(this),this.path=Q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,$=$||{};var J=Object.keys($);for(var Y=0,H=J.length;Y<H;Y++){var U=J[Y];this[U]=$[U]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=Z.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var RG=d((wn,MG)=>{MG.exports=yw;var vw=Object.getPrototypeOf||function(Z){return Z.__proto__};function yw(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:vw(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(q){Object.defineProperty(X,q,Object.getOwnPropertyDescriptor(Z,q))}),X}});var CX=d((On,yX)=>{var o=$0("fs"),Cw=BG(),Sw=_G(),bw=RG(),u7=$0("util"),G0,d7;if(typeof Symbol==="function"&&typeof Symbol.for==="function")G0=Symbol.for("graceful-fs.queue"),d7=Symbol.for("graceful-fs.previous");else G0="___graceful-fs.queue",d7="___graceful-fs.previous";function hw(){}function DG(Z,X){Object.defineProperty(Z,G0,{get:function(){return X}})}var r1=hw;if(u7.debuglog)r1=u7.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))r1=function(){var Z=u7.format.apply(u7,arguments);Z="GFS4: "+Z.split(/\n/).join(`
76
- GFS4: `),console.error(Z)};if(!o[G0]){if(PX=global[G0]||[],DG(o,PX),o.close=function(Z){function X(q,Q){return Z.call(o,q,function($){if(!$)FG();if(typeof Q==="function")Q.apply(this,arguments)})}return Object.defineProperty(X,d7,{value:Z}),X}(o.close),o.closeSync=function(Z){function X(q){Z.apply(o,arguments),FG()}return Object.defineProperty(X,d7,{value:Z}),X}(o.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){r1(o[G0]),$0("assert").equal(o[G0].length,0)})}var PX;if(!global[G0])DG(global,o[G0]);yX.exports=EX(bw(o));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!o.__patched)yX.exports=EX(o),o.__patched=!0;function EX(Z){Cw(Z),Z.gracefulify=EX,Z.createReadStream=T,Z.createWriteStream=j;var X=Z.readFile;Z.readFile=q;function q(O,x,E){if(typeof x==="function")E=x,x=null;return h(O,x,E);function h(i,v,y,p){return X(i,v,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))r2([h,[i,v,y],f,p||Date.now(),Date.now()]);else if(typeof y==="function")y.apply(this,arguments)})}}var Q=Z.writeFile;Z.writeFile=$;function $(O,x,E,h){if(typeof E==="function")h=E,E=null;return i(O,x,E,h);function i(v,y,p,f,K0){return Q(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))r2([i,[v,y,p,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var J=Z.appendFile;if(J)Z.appendFile=Y;function Y(O,x,E,h){if(typeof E==="function")h=E,E=null;return i(O,x,E,h);function i(v,y,p,f,K0){return J(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))r2([i,[v,y,p,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=U;function U(O,x,E,h){if(typeof E==="function")h=E,E=0;return i(O,x,E,h);function i(v,y,p,f,K0){return H(v,y,p,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))r2([i,[v,y,p,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var G=Z.readdir;Z.readdir=V;var W=/^v[0-5]\./;function V(O,x,E){if(typeof x==="function")E=x,x=null;var h=W.test(process.version)?function(y,p,f,K0){return G(y,i(y,p,f,K0))}:function(y,p,f,K0){return G(y,p,i(y,p,f,K0))};return h(O,x,E);function i(v,y,p,f){return function(K0,l){if(K0&&(K0.code==="EMFILE"||K0.code==="ENFILE"))r2([h,[v,y,p],K0,f||Date.now(),Date.now()]);else{if(l&&l.sort)l.sort();if(typeof p==="function")p.call(this,K0,l)}}}}if(process.version.substr(0,4)==="v0.8"){var L=Sw(Z);F=L.ReadStream,D=L.WriteStream}var z=Z.ReadStream;if(z)F.prototype=Object.create(z.prototype),F.prototype.open=k;var _=Z.WriteStream;if(_)D.prototype=Object.create(_.prototype),D.prototype.open=w;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(O){F=O},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return D},set:function(O){D=O},enumerable:!0,configurable:!0});var M=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return M},set:function(O){M=O},enumerable:!0,configurable:!0});var R=D;Object.defineProperty(Z,"FileWriteStream",{get:function(){return R},set:function(O){R=O},enumerable:!0,configurable:!0});function F(O,x){if(this instanceof F)return z.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function k(){var O=this;S(O.path,O.flags,O.mode,function(x,E){if(x){if(O.autoClose)O.destroy();O.emit("error",x)}else O.fd=E,O.emit("open",E),O.read()})}function D(O,x){if(this instanceof D)return _.apply(this,arguments),this;else return D.apply(Object.create(D.prototype),arguments)}function w(){var O=this;S(O.path,O.flags,O.mode,function(x,E){if(x)O.destroy(),O.emit("error",x);else O.fd=E,O.emit("open",E)})}function T(O,x){return new Z.ReadStream(O,x)}function j(O,x){return new Z.WriteStream(O,x)}var A=Z.open;Z.open=S;function S(O,x,E,h){if(typeof E==="function")h=E,E=null;return i(O,x,E,h);function i(v,y,p,f,K0){return A(v,y,p,function(l,gE){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))r2([i,[v,y,p,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}return Z}function r2(Z){r1("ENQUEUE",Z[0].name,Z[1]),o[G0].push(Z),vX()}var p7;function FG(){var Z=Date.now();for(var X=0;X<o[G0].length;++X)if(o[G0][X].length>2)o[G0][X][3]=Z,o[G0][X][4]=Z;vX()}function vX(){if(clearTimeout(p7),p7=void 0,o[G0].length===0)return;var Z=o[G0].shift(),X=Z[0],q=Z[1],Q=Z[2],$=Z[3],J=Z[4];if($===void 0)r1("RETRY",X.name,q),X.apply(null,q);else if(Date.now()-$>=60000){r1("TIMEOUT",X.name,q);var Y=q.pop();if(typeof Y==="function")Y.call(null,Q)}else{var H=Date.now()-J,U=Math.max(J-$,1),G=Math.min(U*1.2,100);if(H>=G)r1("RETRY",X.name,q),X.apply(null,q.concat([$]));else o[G0].push(Z)}if(p7===void 0)p7=setTimeout(vX,0)}});var TG=d((kn,AG)=>{function E0(Z,X){if(typeof X==="boolean")X={forever:X};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=X||{},this._maxRetryTime=X&&X.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}AG.exports=E0;E0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};E0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};E0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var X=new Date().getTime();if(Z&&X-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var q=this._timeouts.shift();if(q===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),q=this._timeouts.shift();else return!1;var Q=this,$=setTimeout(function(){if(Q._attempts++,Q._operationTimeoutCb){if(Q._timeout=setTimeout(function(){Q._operationTimeoutCb(Q._attempts)},Q._operationTimeout),Q._options.unref)Q._timeout.unref()}Q._fn(Q._attempts)},q);if(this._options.unref)$.unref();return!0};E0.prototype.attempt=function(Z,X){if(this._fn=Z,X){if(X.timeout)this._operationTimeout=X.timeout;if(X.cb)this._operationTimeoutCb=X.cb}var q=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){q._operationTimeoutCb()},q._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};E0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};E0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};E0.prototype.start=E0.prototype.try;E0.prototype.errors=function(){return this._errors};E0.prototype.attempts=function(){return this._attempts};E0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},X=null,q=0;for(var Q=0;Q<this._errors.length;Q++){var $=this._errors[Q],J=$.message,Y=(Z[J]||0)+1;if(Z[J]=Y,Y>=q)X=$,q=Y}return X}});var IG=d((gw)=>{var fw=TG();gw.operation=function(Z){var X=gw.timeouts(Z);return new fw(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};gw.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var X={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var q in Z)X[q]=Z[q];if(X.minTimeout>X.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Q=[];for(var $=0;$<X.retries;$++)Q.push(this.createTimeout($,X));if(Z&&Z.forever&&!Q.length)Q.push(this.createTimeout($,X));return Q.sort(function(J,Y){return J-Y}),Q};gw.createTimeout=function(Z,X){var q=X.randomize?Math.random()+1:1,Q=Math.round(q*X.minTimeout*Math.pow(X.factor,Z));return Q=Math.min(Q,X.maxTimeout),Q};gw.wrap=function(Z,X,q){if(X instanceof Array)q=X,X=null;if(!q){q=[];for(var Q in Z)if(typeof Z[Q]==="function")q.push(Q)}for(var $=0;$<q.length;$++){var J=q[$],Y=Z[J];Z[J]=function(U){var G=gw.operation(X),W=Array.prototype.slice.call(arguments,1),V=W.pop();W.push(function(L){if(G.retry(L))return;if(L)arguments[0]=G.mainError();V.apply(this,arguments)}),G.attempt(function(){U.apply(Z,W)})}.bind(Z,Y),Z[J].options=X}}});var wG=d((xn,c7)=>{c7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")c7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")c7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var OG=d((Pn,e2)=>{var n=global.process,t1=function(Z){return Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function"};if(!t1(n))e2.exports=function(){return function(){}};else{if(SX=$0("assert"),e1=wG(),bX=/^win/i.test(n.platform),t2=$0("events"),typeof t2!=="function")t2=t2.EventEmitter;if(n.__signal_exit_emitter__)X0=n.__signal_exit_emitter__;else X0=n.__signal_exit_emitter__=new t2,X0.count=0,X0.emitted={};if(!X0.infinite)X0.setMaxListeners(1/0),X0.infinite=!0;e2.exports=function(Z,X){if(!t1(global.process))return function(){};if(SX.equal(typeof Z,"function","a callback must be provided for exit handler"),Z2===!1)l7();var q="exit";if(X&&X.alwaysLast)q="afterexit";var Q=function(){if(X0.removeListener(q,Z),X0.listeners("exit").length===0&&X0.listeners("afterexit").length===0)U4()};return X0.on(q,Z),Q},U4=function(){if(!Z2||!t1(global.process))return;Z2=!1,e1.forEach(function(X){try{n.removeListener(X,G4[X])}catch(q){}}),n.emit=W4,n.reallyExit=n7,X0.count-=1},e2.exports.unload=U4,N1=function(X,q,Q){if(X0.emitted[X])return;X0.emitted[X]=!0,X0.emit(X,q,Q)},G4={},e1.forEach(function(Z){G4[Z]=function(){if(!t1(global.process))return;var q=n.listeners(Z);if(q.length===X0.count){if(U4(),N1("exit",null,Z),N1("afterexit",null,Z),bX&&Z==="SIGHUP")Z="SIGINT";n.kill(n.pid,Z)}}}),e2.exports.signals=function(){return e1},Z2=!1,l7=function(){if(Z2||!t1(global.process))return;Z2=!0,X0.count+=1,e1=e1.filter(function(X){try{return n.on(X,G4[X]),!0}catch(q){return!1}}),n.emit=fX,n.reallyExit=hX},e2.exports.load=l7,n7=n.reallyExit,hX=function(X){if(!t1(global.process))return;n.exitCode=X||0,N1("exit",n.exitCode,null),N1("afterexit",n.exitCode,null),n7.call(n,n.exitCode)},W4=n.emit,fX=function(X,q){if(X==="exit"&&t1(global.process)){if(q!==void 0)n.exitCode=q;var Q=W4.apply(this,arguments);return N1("exit",n.exitCode,null),N1("afterexit",n.exitCode,null),Q}else return W4.apply(this,arguments)}}var SX,e1,bX,t2,X0,U4,N1,G4,Z2,l7,n7,hX,W4,fX});var NG=d((lw,gX)=>{var kG=Symbol();function dw(Z,X,q){let Q=X[kG];if(Q)return X.stat(Z,(J,Y)=>{if(J)return q(J);q(null,Y.mtime,Q)});let $=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,$,$,(J)=>{if(J)return q(J);X.stat(Z,(Y,H)=>{if(Y)return q(Y);let U=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,kG,{value:U}),q(null,H.mtime,U)})})}function cw(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}lw.probe=dw;lw.getMtime=cw});var yG=d((ZO,B4)=>{var aw=$0("path"),pX=CX(),ow=IG(),sw=OG(),xG=NG(),G1={};function V4(Z,X){return X.lockfilePath||`${Z}.lock`}function dX(Z,X,q){if(!X.realpath)return q(null,aw.resolve(Z));X.fs.realpath(Z,q)}function uX(Z,X,q){let Q=V4(Z,X);X.fs.mkdir(Q,($)=>{if(!$)return xG.probe(Q,X.fs,(J,Y,H)=>{if(J)return X.fs.rmdir(Q,()=>{}),q(J);q(null,Y,H)});if($.code!=="EEXIST")return q($);if(X.stale<=0)return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(Q,(J,Y)=>{if(J){if(J.code==="ENOENT")return uX(Z,{...X,stale:0},q);return q(J)}if(!PG(Y,X))return q(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));EG(Z,X,(H)=>{if(H)return q(H);uX(Z,{...X,stale:0},q)})})})}function PG(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function EG(Z,X,q){X.fs.rmdir(V4(Z,X),(Q)=>{if(Q&&Q.code!=="ENOENT")return q(Q);q()})}function i7(Z,X){let q=G1[Z];if(q.updateTimeout)return;if(q.updateDelay=q.updateDelay||X.update,q.updateTimeout=setTimeout(()=>{q.updateTimeout=null,X.fs.stat(q.lockfilePath,(Q,$)=>{let J=q.lastUpdate+X.stale<Date.now();if(Q){if(Q.code==="ENOENT"||J)return mX(Z,q,Object.assign(Q,{code:"ECOMPROMISED"}));return q.updateDelay=1000,i7(Z,X)}if(q.mtime.getTime()!==$.mtime.getTime())return mX(Z,q,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=xG.getMtime(q.mtimePrecision);X.fs.utimes(q.lockfilePath,H,H,(U)=>{let G=q.lastUpdate+X.stale<Date.now();if(q.released)return;if(U){if(U.code==="ENOENT"||G)return mX(Z,q,Object.assign(U,{code:"ECOMPROMISED"}));return q.updateDelay=1000,i7(Z,X)}q.mtime=H,q.lastUpdate=Date.now(),q.updateDelay=null,i7(Z,X)})})},q.updateDelay),q.updateTimeout.unref)q.updateTimeout.unref()}function mX(Z,X,q){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(G1[Z]===X)delete G1[Z];X.options.onCompromised(q)}function rw(Z,X,q){X={stale:1e4,update:null,realpath:!0,retries:0,fs:pX,onCompromised:(Q)=>{throw Q},...X},X.retries=X.retries||0,X.retries=typeof X.retries==="number"?{retries:X.retries}:X.retries,X.stale=Math.max(X.stale||0,2000),X.update=X.update==null?X.stale/2:X.update||0,X.update=Math.max(Math.min(X.update,X.stale/2),1000),dX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=ow.operation(X.retries);J.attempt(()=>{uX($,X,(Y,H,U)=>{if(J.retry(Y))return;if(Y)return q(J.mainError());let G=G1[$]={lockfilePath:V4($,X),mtime:H,mtimePrecision:U,options:X,lastUpdate:Date.now()};i7($,X),q(null,(W)=>{if(G.released)return W&&W(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));vG($,{...X,realpath:!1},W)})})})})}function vG(Z,X,q){X={fs:pX,realpath:!0,...X},dX(Z,X,(Q,$)=>{if(Q)return q(Q);let J=G1[$];if(!J)return q(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));J.updateTimeout&&clearTimeout(J.updateTimeout),J.released=!0,delete G1[$],EG($,X,q)})}function tw(Z,X,q){X={stale:1e4,realpath:!0,fs:pX,...X},X.stale=Math.max(X.stale||0,2000),dX(Z,X,(Q,$)=>{if(Q)return q(Q);X.fs.stat(V4($,X),(J,Y)=>{if(J)return J.code==="ENOENT"?q(null,!1):q(J);return q(null,!PG(Y,X))})})}function ew(){return G1}sw(()=>{for(let Z in G1){let X=G1[Z].options;try{X.fs.rmdirSync(V4(Z,X))}catch(q){}}});ZO.lock=rw;ZO.unlock=vG;ZO.check=tw;ZO.getLocks=ew});var SG=d((En,CG)=>{var JO=CX();function YO(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],q={...Z};return X.forEach((Q)=>{q[Q]=(...$)=>{let J=$.pop(),Y;try{Y=Z[`${Q}Sync`](...$)}catch(H){return J(H)}J(null,Y)}}),q}function HO(Z){return(...X)=>new Promise((q,Q)=>{X.push(($,J)=>{if($)Q($);else q(J)}),Z(...X)})}function KO(Z){return(...X)=>{let q,Q;if(X.push(($,J)=>{q=$,Q=J}),Z(...X),q)throw q;return Q}}function UO(Z){if(Z={...Z},Z.fs=YO(Z.fs||JO),typeof Z.retries==="number"&&Z.retries>0||Z.retries&&typeof Z.retries.retries==="number"&&Z.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return Z}CG.exports={toPromise:HO,toSync:KO,toSyncOptions:UO}});var hG=d((vn,x1)=>{var Z6=yG(),{toPromise:a7,toSync:o7,toSyncOptions:cX}=SG();async function bG(Z,X){let q=await a7(Z6.lock)(Z,X);return a7(q)}function GO(Z,X){let q=o7(Z6.lock)(Z,cX(X));return o7(q)}function WO(Z,X){return a7(Z6.unlock)(Z,X)}function VO(Z,X){return o7(Z6.unlock)(Z,cX(X))}function BO(Z,X){return a7(Z6.check)(Z,X)}function LO(Z,X){return o7(Z6.check)(Z,cX(X))}x1.exports=bG;x1.exports.lock=bG;x1.exports.unlock=WO;x1.exports.lockSync=GO;x1.exports.unlockSync=VO;x1.exports.check=BO;x1.exports.checkSync=LO});function nX(){if(!lX)lX=hG();return lX}function yn(Z,X){return nX().lock(Z,X)}function fG(Z,X){return nX().lockSync(Z,X)}function Cn(Z,X){return nX().check(Z,X)}var lX;var gG=()=>{};import{basename as t7,dirname as e7,join as P1}from"path";function _O(){return aX}function E7(Z){uG=Z}function v7(Z,X,q){let Q=e7(Z);N().mkdirSync(Q);let J=$3(X,(Y,H)=>m(Y)!==m(q[H]));if(s2(Z,m(J,null,2),{encoding:"utf-8",mode:384}),Z===J0())aX++}function y7(Z,X,q){let Q=X(),$=e7(Z),J=N();J.mkdirSync($);let Y;try{let H=`${Z}.lock`,U=Date.now();if(Y=fG(Z,{lockfilePath:H,onCompromised:(z)=>{P(`Config lock compromised: ${z}`,{level:"error"})}}),Date.now()-U>100)P("Lock acquisition took longer than expected - another Claude instance may be running");if(uG&&Z===J0())try{let z=J.statSync(Z)}catch(z){if(Y0(z)!=="ENOENT")throw z}let W=H1(Z,X);if(Z===J0()&&c2(W))return P("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),!1;let V=q(W);if(V===W)return!1;let L=$3(V,(z,_)=>m(z)!==m(Q[_]));try{let z=t7(Z),_=Z5();try{J.mkdirSync(_)}catch(j){if(Y0(j)!=="EEXIST")throw j}let M=60000,R=J.readdirStringSync(_).filter((j)=>j.startsWith(`${z}.backup.`)).sort().reverse(),F=R[0],k=F?Number(F.split(".backup.").pop()):0,D=Number.isNaN(k)||Date.now()-k>=M,w=FO(Z),T=D&&w;if(T){let j=P1(_,`${z}.backup.${Date.now()}`);J.copyFileSync(Z,j)}if(w){let A=T?J.readdirStringSync(_).filter((S)=>S.startsWith(`${z}.backup.`)).sort().reverse():R;for(let S of A.slice(5))try{J.unlinkSync(P1(_,S))}catch{}}}catch(z){if(Y0(z)!=="ENOENT")P(`Failed to backup config: ${z}`,{level:"error"})}if(s2(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===J0())aX++;return!0}finally{if(Y)Y()}}function MO(){return r7}function RO(){if(r7)return;let Z=Date.now();H0("info","enable_configs_started"),r7=!0,H1(J0(),O0,!0),H0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function Z5(){return P1(Z0(),"backups")}function mG(Z){let X=N(),q=t7(Z),Q=Z5();try{let Y=X.readdirStringSync(Q).filter((H)=>H.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return P1(Q,Y)}catch{}let $=e7(Z);try{let Y=X.readdirStringSync($).filter((U)=>U.startsWith(`${q}.backup.`)).sort().at(-1);if(Y)return P1($,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function FO(Z){let X=N();try{return q0(R0(X.readFileSync(Z,{encoding:"utf-8"}))),!0}catch{return!1}}function DO(Z,X){let q=N(),Q=t7(Z),$=new Set;for(let J of[Z5(),e7(Z)]){let Y;try{Y=q.readdirStringSync(J).filter((H)=>H.startsWith(`${Q}.backup.`)).sort().reverse()}catch{continue}for(let H of Y){let U=P1(J,H);if($.has(U))continue;$.add(U);try{let G=q0(R0(q.readFileSync(U,{encoding:"utf-8"})));return{config:{...X(),...G},backupPath:U}}catch{}}}return null}function H1(Z,X,q){if(!r7)throw Error("Config accessed before allowed.");let Q=N();try{let $=Q.readFileSync(Z,{encoding:"utf-8"});try{let J=q0(R0($));return{...X(),...J}}catch(J){let Y=J instanceof Error?J.message:String(J);throw new s7(Y,Z,X())}}catch($){if(Y0($)==="ENOENT"){let Y=mG(Z);if(Y)process.stderr.write(`
77
- Claude configuration file not found at: ${Z}
78
- A backup file exists at: ${Y}
79
- You can manually restore it by running: cp "${Y}" "${Z}"
80
-
81
- `);return X()}if($ instanceof s7&&q)throw $;if($ instanceof s7){if(P(`Config file corrupted, resetting to defaults: ${$.message}`,{level:"error"}),!iX){iX=!0;try{g($);let _=!1;try{Q.statSync(`${Z}.backup`),_=!0}catch{}}finally{iX=!1}}process.stderr.write(`
82
- Claude configuration file at ${Z} is corrupted: ${$.message}
83
- `);let Y=t7(Z),H=Z5();try{Q.mkdirSync(H)}catch(_){if(Y0(_)!=="EEXIST")throw _}let U=Q.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),G,W=!1,V=Q.readFileSync(Z,{encoding:"utf-8"});for(let _ of U)try{let M=Q.readFileSync(P1(H,_),{encoding:"utf-8"});if(V===M){W=!0;break}}catch{}if(!W){G=P1(H,`${Y}.corrupted.${Date.now()}`);try{Q.copyFileSync(Z,G),P(`Corrupted config backed up to: ${G}`,{level:"error"})}catch{}}let L=DO(Z,X);if(L){if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
84
- `);let _=!1;try{Q.copyFileSync(L.backupPath,Z),_=!0}catch{}return process.stderr.write(_?`Recovered configuration from backup: ${L.backupPath}
85
-
86
- `:`Recovered configuration from backup (in memory): ${L.backupPath}
87
-
88
- `),L.config}let z=mG(Z);if(G)process.stderr.write(`The corrupted file has been backed up to: ${G}
89
- `);else if(W)process.stderr.write(`The corrupted file has already been backed up.
90
- `);if(z)process.stderr.write(`A backup file exists at: ${z}
91
- You can manually restore it by running: cp "${z}" "${Z}"
92
-
93
- `);else process.stderr.write(`
94
- `)}return X()}}var iX=!1,uG=null,aX=0,r7=!1;var C7=B(()=>{F$();_6();l2();h0();J4();X4();a0();j1();b7();z0();A6();gG();y0();L0()});import{readFile as AO}from"fs/promises";import{join as TO}from"path";async function L4(Z,X,q,Q){try{let $=await AO(TO(Z,"config"),"utf-8");return jO($,X,q,Q)}catch{return null}}function jO(Z,X,q,Q){let $=Z.split(`
95
- `),J=X.toLowerCase(),Y=Q.toLowerCase(),H=!1;for(let U of $){let G=U.trim();if(G.length===0||G[0]==="#"||G[0]===";")continue;if(G[0]==="["){H=kO(G,J,q);continue}if(!H)continue;let W=IO(G);if(W&&W.key.toLowerCase()===Y)return W.value}return null}function IO(Z){let X=0;while(X<Z.length&&NO(Z[X]))X++;if(X===0)return null;let q=Z.slice(0,X);while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=="=")return null;X++;while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;let Q=wO(Z,X);return{key:q,value:Q}}function wO(Z,X){let q="",Q=!1,$=X;while($<Z.length){let J=Z[$];if(!Q&&(J==="#"||J===";"))break;if(J==='"'){Q=!Q,$++;continue}if(J==="\\"&&$+1<Z.length){let Y=Z[$+1];if(Q){switch(Y){case"n":q+=`
96
- `;break;case"t":q+="\t";break;case"b":q+="\b";break;case'"':q+='"';break;case"\\":q+="\\";break;default:q+=Y;break}$+=2;continue}if(Y==="\\"){q+="\\",$+=2;continue}}q+=J,$++}if(!Q)q=OO(q);return q}function OO(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function kO(Z,X,q){let Q=1;while(Q<Z.length&&Z[Q]!=="]"&&Z[Q]!==" "&&Z[Q]!=="\t"&&Z[Q]!=='"')Q++;if(Z.slice(1,Q).toLowerCase()!==X)return!1;if(q===null)return Q<Z.length&&Z[Q]==="]";while(Q<Z.length&&(Z[Q]===" "||Z[Q]==="\t"))Q++;if(Q>=Z.length||Z[Q]!=='"')return!1;Q++;let J="";while(Q<Z.length&&Z[Q]!=='"'){if(Z[Q]==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(Y==="\\"||Y==='"'){J+=Y,Q+=2;continue}J+=Y,Q+=2;continue}J+=Z[Q],Q++}if(Q>=Z.length||Z[Q]!=='"')return!1;if(Q++,Q>=Z.length||Z[Q]!=="]")return!1;return J===q}function NO(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var pG=()=>{};import{unwatchFile as dG,watchFile as xO}from"fs";import{readdir as PO,readFile as X2,stat as EO}from"fs/promises";import{join as f0,resolve as X5}from"path";function Ki(){X6.clear()}async function s0(Z){let X=X5(Z??r()),q=X6.get(X);if(q!==void 0)return q;let Q=_4(X);if(!Q)return X6.set(X,null),null;let $=f0(Q,".git");try{if((await EO($)).isFile()){let Y=(await X2($,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),U=X5(Q,H);return X6.set(X,U),U}}return X6.set(X,$),$}catch{return X6.set(X,null),null}}function q5(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((X)=>X==="."||X===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function oX(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function z4(Z){try{let X=(await X2(f0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let q=X.slice(4).trim();if(q.startsWith("refs/heads/")){let $=q.slice(11);if(!q5($))return null;return{type:"branch",name:$}}if(!q5(q))return null;let Q=await q6(Z,q);return Q?{type:"detached",sha:Q}:{type:"detached",sha:""}}if(!oX(X))return null;return{type:"detached",sha:X}}catch{return null}}async function q6(Z,X){let q=await cG(Z,X);if(q)return q;let Q=await Q6(Z);if(Q&&Q!==Z)return cG(Q,X);return null}async function cG(Z,X){try{let q=(await X2(f0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(!q5(Q))return null;return q6(Z,Q)}if(!oX(q))return null;return q}catch{}try{let q=await X2(f0(Z,"packed-refs"),"utf-8");for(let Q of q.split(`
97
- `)){if(Q.startsWith("#")||Q.startsWith("^"))continue;let $=Q.indexOf(" ");if($===-1)continue;if(Q.slice($+1)===X){let J=Q.slice(0,$);return oX(J)?J:null}}}catch{}return null}async function Q6(Z){try{let X=(await X2(f0(Z,"commondir"),"utf-8")).trim();return X5(Z,X)}catch{return null}}async function vO(Z,X,q){try{let Q=(await X2(f0(Z,X),"utf-8")).trim();if(Q.startsWith("ref:")){let $=Q.slice(4).trim();if($.startsWith(q)){let J=$.slice(q.length);if(!q5(J))return null;return J}}}catch{}return null}class nG{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await s0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await Q6(this.gitDir),this.watchPath(f0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(f0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),$4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),xO(Z,{interval:yO},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await z4(this.gitDir),X=this.commonDir??this.gitDir,q=Z?.type==="branch"?f0(X,"refs","heads",Z.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)dG(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((Q)=>Q!==this.branchRefPath);if(this.branchRefPath=q,!q)return;this.watchPath(q,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await lG(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)dG(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let q=this.cache.get(Z);if(q&&!q.dirty)return q.value;if(q)q.dirty=!1;let Q=await X(),$=this.cache.get(Z);if($&&!$.dirty)$.value=Q;if(!$)this.cache.set(Z,{value:Q,dirty:!1,compute:X});return Q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function CO(){let Z=await s0();if(!Z)return"HEAD";let X=await z4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function SO(){let Z=await s0();if(!Z)return"";let X=await z4(Z);if(!X)return"";if(X.type==="branch")return await q6(Z,`refs/heads/${X.name}`)??"";return X.sha}async function bO(){let Z=await s0();if(!Z)return null;let X=await L4(Z,"remote","origin","url");if(X)return X;let q=await Q6(Z);if(q&&q!==Z)return L4(q,"remote","origin","url");return null}async function hO(){let Z=await s0();if(!Z)return"main";let X=await Q6(Z)??Z,q=await vO(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let Q of["main","master"])if(await q6(X,`refs/remotes/origin/${Q}`))return Q;return"main"}function iG(){return Q5.get("branch",CO)}function aG(){return Q5.get("head",SO)}function oG(){return Q5.get("remoteUrl",bO)}function sG(){return Q5.get("defaultBranch",hO)}async function Ui(Z){let X=await s0(Z);if(!X)return null;let q=await z4(X);if(!q)return null;if(q.type==="branch")return q6(X,`refs/heads/${q.name}`);return q.sha}async function Gi(Z){let X;try{let Q=(await X2(f0(Z,".git"),"utf-8")).trim();if(!Q.startsWith("gitdir:"))return null;X=X5(Z,Q.slice(7).trim())}catch{return null}let q=await z4(X);if(!q)return null;if(q.type==="branch")return q6(X,`refs/heads/${q.name}`);return q.sha}async function Wi(Z){let X=await s0(Z);if(!X)return null;let q=await L4(X,"remote","origin","url");if(q)return q;let Q=await Q6(X);if(Q&&Q!==X)return L4(Q,"remote","origin","url");return null}async function rG(){try{let Z=await s0();if(!Z)return 0;let X=await Q6(Z)??Z;return(await PO(f0(X,"worktrees"))).length+1}catch{return 1}}var X6,yO=1000,Q5;var tG=B(()=>{E1();iU();U1();M4();pG();X6=new Map;Q5=new nG});import{readFileSync as sX,realpathSync as eG,statSync as ZW}from"fs";import{readdir as fO,stat as gO}from"fs/promises";import{basename as mO,dirname as rX,join as _0,resolve as $5,sep as XW}from"path";function uO(){function Z(X){let q=qW(X);return q===QW?null:q}return Z.cache=qW.cache,Z}function pO(){function Z(X){let q=_4(X);if(!q)return null;return tX(q)}return Z.cache=tX.cache,Z}function dO(Z){let X=new Set,q=[];for(let Q of Z){if(!Q||X.has(Q))continue;X.add(Q),q.push(Q)}return q}function wi(Z,X){return dO([q2(Z),...X.map((q)=>q2(q))])}async function Oi(Z,X){let q=X?.maxDepth??3,Q=X?.maxDirs??1500,$=[],J=0,Y=async(U)=>{try{return await gO(_0(U,".git")),!0}catch{return!1}},H=async(U,G)=>{if(G>q||J>=Q)return;let W;try{W=await fO(U,{withFileTypes:!0})}catch{return}for(let V of W){if(J>=Q)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||cO.has(V.name))continue;let L=_0(U,V.name);if(J++,await Y(L)){$.push(tX(L.normalize("NFC")));continue}await H(L,G+1)}};return await H(Z,1),$}function Ni(Z){return s0(Z)}async function yi(){try{let[Z,X,q,Q,$,J]=await Promise.all([lO(),nO(),JW(),iO(),aO(),sO()]);return{commitHash:Z,branchName:X,remoteUrl:q,isHeadOnRemote:Q,isClean:$,worktreeCount:J}}catch(Z){return null}}async function Ci(){let{parseGitRemote:Z}=await import("./detectRepository-1.1.32-y3wjkn3b.mjs"),X=await JW();if(!X)return P("Local GitHub repo: unknown"),null;let q=Z(X);if(q&&q.host==="github.com"){let Q=`${q.owner}/${q.name}`;return P(`Local GitHub repo: ${Q}`),Q}return P("Local GitHub repo: unknown"),null}async function Si(){let{stdout:Z,code:X}=await T0(j0(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:q,code:Q}=await T0(j0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Q===0){let J=q.match(/HEAD branch: (\S+)/);if(J&&J[1])return`origin/${J[1]}`}let $=["origin/main","origin/staging","origin/master"];for(let J of $){let{code:Y}=await T0(j0(),["rev-parse","--verify",J],{preserveOutputOnError:!1});if(Y===0)return J}return null}function bi(){let Z=N(),X=r(),q=_0(X,".git");try{let Q=Z.statSync(q);if(Q.isFile())return!1;if(Q.isDirectory()){let $=_0(q,"HEAD");try{if(Z.statSync($).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(_0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(_0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(_0(X,"refs")).isDirectory())return!0}catch{}return!1}var QW,qW,_4,tX,q2,cO,j0,ki,$W=async(Z)=>{return _4(Z)!==null},lO=async()=>{return aG()},nO=async(Z)=>{if(Z){let{stdout:X,code:q}=await Q2(j0(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return q===0?X.trim():""}return iG()},xi=async()=>{return sG()},JW=async()=>{return oG()},iO=async()=>{let{code:Z}=await T0(j0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},Pi=async(Z)=>{let X=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:q,code:Q}=Z?await Q2(j0(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await T0(j0(),X,{preserveOutputOnError:!1,useCwd:!0});if(Q!==0)return{ahead:0,behind:0};let $=q.trim().split(/\s+/);if($.length!==2)return{ahead:0,behind:0};let J=parseInt($[0],10),Y=parseInt($[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite(J)?J:0}},aO=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:q}=await T0(j0(),X,{preserveOutputOnError:!1});return q.trim().length===0},Ei=async()=>{let{stdout:Z}=await T0(j0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
98
- `).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},oO=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"],{stdout:q}=Z?await Q2(j0(),X,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await T0(j0(),X,{preserveOutputOnError:!1}),Q=[],$=[];return q.trim().split(`
99
- `).filter((J)=>J.length>0).forEach((J)=>{let Y=J.substring(0,2),H=J.substring(2).trim();if(Y==="??")$.push(H);else if(H)Q.push(H)}),{tracked:Q,untracked:$}},sO=async()=>{return rG()},vi=async(Z)=>{try{let X=Z||`Claudin auto-stash - ${new Date().toISOString()}`,{untracked:q}=await oO();if(q.length>0){let{code:$}=await T0(j0(),["add",...q],{preserveOutputOnError:!1});if($!==0)return!1}let{code:Q}=await T0(j0(),["stash","push","--message",X],{preserveOutputOnError:!1});return Q===0}catch(X){return!1}};var M4=B(()=>{T1();U1();h0();J4();J5();z0();tG();e4();P7();QW=Symbol("git-root-not-found"),qW=_1((Z)=>{let X=Date.now();H0("info","find_git_root_started");let q=$5(Z),Q=q.substring(0,q.indexOf(XW)+1)||XW,$=0;while(q!==Q){try{let Y=_0(q,".git");$++;let H=ZW(Y);if(H.isDirectory()||H.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),q.normalize("NFC")}catch{}let J=rX(q);if(J===q)break;q=J}try{let J=_0(Q,".git");$++;let Y=ZW(J);if(Y.isDirectory()||Y.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!0}),Q.normalize("NFC")}catch{}return H0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:$,found:!1}),QW},(Z)=>Z,50),_4=uO();tX=_1((Z)=>{try{let X=sX(_0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let q=$5(Z,X.slice(7).trim()),Q=$5(q,sX(_0(q,"commondir"),"utf-8").trim());if($5(rX(q))!==_0(Q,"worktrees"))return Z;if(eG(sX(_0(q,"gitdir"),"utf-8").trim())!==_0(eG(Z),".git"))return Z;if(mO(Q)!==".git")return Q.normalize("NFC");return rX(Q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),q2=pO();cO=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);j0=c(()=>{return x7("git")||"git"}),ki=c(async()=>{let Z=Date.now();H0("info","is_git_check_started");let X=_4(r())!==null;return H0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});import{resolve as rO}from"path";function tO(){return}function R4(){let Z=v1(),X=$2.get(Z);if(X!==void 0)return $2.delete(Z),$2.set(Z,X),X;let q=q2(Z),Q=q?O1(q):O1(rO(Z));if($2.size>=eO){let $=$2.keys().next().value;if($!==void 0)$2.delete($)}return $2.set(Z,Q),Q}function F4(){let Z=R4(),X=a();if(!X.projects)return C1;let q=X.projects[Z]??C1;if(typeof q.allowedTools==="string")q.allowedTools=k0(q.allowedTools)??[];return q}function Y5(Z){let X=R4(),q=null;try{if(y7(J0(),O0,($)=>{let J=$.projects?.[X]??C1,Y=Z(J);if(Y===J)return $;return q={...$,projects:{...$.projects,[X]:Y}},q})&&q)Q4(q),q4()}catch(Q){P(`Failed to save config with lock: ${Q}`,{level:"error"});let $=H1(J0(),O0);if(c2($)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"});return}let J=$.projects?.[X]??C1,Y=Z(J);if(Y===J)return;q={...$,projects:{...$.projects,[X]:Y}},v7(J0(),q,S1),Q4(q),q4()}}var eX,eO=32,$2;var Zq=B(()=>{E1();_6();C7();l2();I6();h0();X4();H4();M4();eX={...C1};$2=new Map});import{resolve as Xq}from"path";function Zk(){HW=!1}function Xk(){return HW||=qk()}function qk(){if(YW())return!0;let Z=a(),X=R4();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let Q=O1(r());while(!0){if(Z.projects?.[Q]?.hasTrustDialogAccepted)return!0;let J=O1(Xq(Q,".."));if(J===Q)break;Q=J}return!1}function Qk(Z){let X=a(),q=O1(Xq(Z));while(!0){if(X.projects?.[q]?.hasTrustDialogAccepted)return!0;let Q=O1(Xq(q,".."));if(Q===q)return!1;q=Q}}var HW=!1;var KW=B(()=>{E1();l2();Zq();U1();H4()});function Jk(Z,X,q){if(q!==void 0&&!H5(Z[X],q)||q===void 0&&!(X in Z))GW(Z,X,q)}var D4;var qq=B(()=>{$k();UW();D4=Jk});function Yk(Z){return function(X,q,Q){var $=-1,J=Object(X),Y=Q(X),H=Y.length;while(H--){var U=Y[Z?H:++$];if(q(J[U],U,J)===!1)break}return X}}var WW;var VW=B(()=>{WW=Yk});var Hk,BW;var LW=B(()=>{VW();Hk=WW(),BW=Hk});function Kk(Z){return K5(Z)&&U5(Z)}var MW;var RW=B(()=>{_W();zW();MW=Kk});function _k(Z){if(!K5(Z)||FW(Z)!=Wk)return!1;var X=DW(Z);if(X===null)return!0;var q=Lk.call(X,"constructor")&&X.constructor;return typeof q=="function"&&q instanceof q&&AW.call(q)==zk}var Wk="[object Object]",Vk,Bk,AW,Lk,zk,TW;var jW=B(()=>{Uk();Gk();zW();Vk=Function.prototype,Bk=Object.prototype,AW=Vk.toString,Lk=Bk.hasOwnProperty,zk=AW.call(Object);TW=_k});function Mk(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var A4;var Qq=B(()=>{A4=Mk});function Fk(Z){return IW(Z,G5(Z))}var OW;var kW=B(()=>{Rk();wW();OW=Fk});function xk(Z,X,q,Q,$,J,Y){var H=A4(Z,q),U=A4(X,q),G=Y.get(U);if(G){D4(Z,q,G);return}var W=J?J(H,U,q+"",Z,X,Y):void 0,V=W===void 0;if(V){var L=$q(U),z=!L&&xW(U),_=!L&&!z&&PW(U);if(W=U,L||z||_)if($q(H))W=H;else if(MW(H))W=vW(H);else if(z)V=!1,W=EW(U,!0);else if(_)V=!1,W=yW(U,!0);else W=[];else if(TW(U)||Jq(U)){if(W=H,Jq(H))W=OW(H);else if(!t0(H)||NW(H))W=CW(U)}else V=!1}if(V)Y.set(U,W),$(W,U,Q,J,Y),Y.delete(U);D4(Z,q,W)}var SW;var bW=B(()=>{qq();wk();kk();Ok();Nk();Tk();Ak();RW();jk();Dk();n4();jW();Ik();Qq();kW();SW=xk});function fW(Z,X,q,Q,$){if(Z===X)return;BW(X,function(J,Y){if($||($=new hW),t0(J))SW(Z,X,Y,q,fW,Q,$);else{var H=Q?Q(A4(Z,Y),J,Y+"",Z,X,$):void 0;if(H===void 0)H=J;D4(Z,Y,H)}},G5)}var gW;var mW=B(()=>{Pk();qq();LW();bW();n4();wW();Qq();gW=fW});function Ek(Z,X,q){switch(q.length){case 0:return Z.call(X);case 1:return Z.call(X,q[0]);case 2:return Z.call(X,q[0],q[1]);case 3:return Z.call(X,q[0],q[1],q[2])}return Z.apply(X,q)}var uW;var pW=B(()=>{uW=Ek});function vk(Z,X,q){return X=dW(X===void 0?Z.length-1:X,0),function(){var Q=arguments,$=-1,J=dW(Q.length-X,0),Y=Array(J);while(++$<J)Y[$]=Q[X+$];$=-1;var H=Array(X+1);while(++$<X)H[$]=Q[$];return H[X]=q(Y),uW(Z,this,H)}}var dW,cW;var lW=B(()=>{pW();dW=Math.max;cW=vk});function yk(Z){return function(){return Z}}var nW;var iW=B(()=>{nW=yk});var Sk,oW;var sW=B(()=>{iW();Ck();aW();Sk=!Yq?W5:function(Z,X){return Yq(Z,"toString",{configurable:!0,enumerable:!1,value:nW(X),writable:!0})},oW=Sk});function gk(Z){var X=0,q=0;return function(){var Q=fk(),$=hk-(Q-q);if(q=Q,$>0){if(++X>=bk)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var bk=800,hk=16,fk,rW;var tW=B(()=>{fk=Date.now;rW=gk});var mk,eW;var ZV=B(()=>{sW();tW();mk=rW(oW),eW=mk});function uk(Z,X){return eW(cW(Z,X,W5),Z+"")}var XV;var qV=B(()=>{aW();lW();ZV();XV=uk});function pk(Z,X,q){if(!t0(q))return!1;var Q=typeof X;if(Q=="number"?U5(q)&&i4(X,q.length):Q=="string"&&(X in q))return H5(q[X],Z);return!1}var QV;var $V=B(()=>{UW();_W();H$();n4();QV=pk});function dk(Z){return XV(function(X,q){var Q=-1,$=q.length,J=$>1?q[$-1]:void 0,Y=$>2?q[2]:void 0;if(J=Z.length>3&&typeof J=="function"?($--,J):void 0,Y&&QV(q[0],q[1],Y))J=$<3?void 0:J,$=1;X=Object(X);while(++Q<$){var H=q[Q];if(H)Z(X,H,Q,J)}return X})}var JV;var YV=B(()=>{qV();$V();JV=dk});var ck,W1;var HV=B(()=>{mW();YV();ck=JV(function(Z,X,q,Q){gW(Z,X,q,Q)}),W1=ck});import{join as lk}from"path";function To(Z){T4=Z}function jo(){T4=null,Hq=void 0}function Io(Z){return Hq=Z,Z}function ik(){return lk(Z0(),nk)}function ak(){try{let Z=K1(ik()),X=q0(R0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function V5(){if(Hq!==!0)return null;if(T4)return T4;let Z=ak();if(Z)return T4=Z,j4(),Z;return null}var nk="remote-settings.json",T4=null,Hq;var UV=B(()=>{a0();Y4();A6();KV();L0()});function Oo(Z,X){return Z.flatMap((q,Q)=>Q?[X(Q),q]:[q])}function Kq(Z,X){let q=0;for(let Q of Z)q+=+!!X(Q);return q}function GV(Z){return[...new Set(Z)]}var Uq=()=>{};import{appendFile as ok,mkdir as sk,readFile as rk,writeFile as tk}from"fs/promises";import{homedir as ek}from"os";import{dirname as ZN,join as XN}from"path";async function qN(Z,X){let{code:q}=await Q2("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return q===0}function QN(){return XN(ek(),".config","git","ignore")}async function WV(Z,X=r()){try{if(!await $W(X))return;let q=`**/${Z}`,Q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await qN(Q,X))return;let $=QN(),J=ZN($);await sk(J,{recursive:!0});try{if((await rk($,{encoding:"utf-8"})).includes(q))return;await ok($,`
100
- ${q}
101
- `)}catch(Y){if(Y0(Y)==="ENOENT")await tk($,`${q}
102
- `,"utf-8");else throw Y}}catch(q){g(q)}}var VV=B(()=>{U1();j1();J5();M4();y0()});function go(Z){switch(Z){case"userSettings":return"user";case"projectSettings":return"project";case"localSettings":return"project, gitignored";case"flagSettings":return"cli flag";case"policySettings":return"managed"}}function mo(Z){switch(Z){case"userSettings":return"User";case"projectSettings":return"Project";case"localSettings":return"Local";case"flagSettings":return"Flag";case"policySettings":return"Managed";case"plugin":return"Plugin";case"bundled":case"built-in":return"Built-in"}}function uo(Z){switch(Z){case"userSettings":return"user settings";case"projectSettings":return"shared project settings";case"localSettings":return"project local settings";case"flagSettings":return"command line arguments";case"policySettings":return"enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"command configuration";case"session":return"current session"}}function po(Z){switch(Z){case"userSettings":return"User settings";case"projectSettings":return"Shared project settings";case"localSettings":return"Project local settings";case"flagSettings":return"Command line arguments";case"policySettings":return"Enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"Command configuration";case"session":return"Current session"}}function co(Z){if(Z==="")return[];let X=Z.split(",").map((Q)=>Q.trim()),q=[];for(let Q of X)switch(Q){case"user":q.push("userSettings");break;case"project":q.push("projectSettings");break;case"local":q.push("localSettings");break;default:throw Error(`Invalid setting source: ${Q}. Valid options are: user, project, local`)}return q}function I4(){let Z=BV(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function lo(Z){return I4().includes(Z)}var fo,no,LV="https://json.schemastore.org/claude-code-settings.json";var Gq=B(()=>{E1();fo=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];no=["localSettings","projectSettings","userSettings"]});function zV(Z){B5.set(Z,Date.now())}function ao(Z,X){let q=B5.get(Z);if(q!==void 0&&Date.now()-q<X)return B5.delete(Z),!0;return!1}function oo(){B5.clear()}var B5;var _V=B(()=>{B5=new Map});function MV(Z){let X=[],q=[];for(let Q of Z){if(typeof Q!=="string"||Q.trim().length===0){q.push({entry:String(Q??""),reason:"empty"});continue}if(Q.length>1e4){q.push({entry:Q,reason:"too-long"});continue}if($N.test(Q)){q.push({entry:Q,reason:"control-characters"});continue}if(JN.test(Q)){q.push({entry:Q,reason:"invisible-characters"});continue}if(YN.test(Q)){q.push({entry:Q,reason:"settings-token"});continue}if(X.length>=200){q.push({entry:Q,reason:"over-entry-cap"});continue}X.push(Q.trim())}return{entries:X,dropped:q}}function to(Z){return Z.some((X)=>X.trim()==="$defaults")}function GN(Z,X){if(Z.length===0)return[...X];let q=[],Q=!1;for(let $ of Z){if($.trim()==="$defaults"){if(!Q)q.push(...X),Q=!0;continue}q.push($)}return q}function eo(Z){let X=[],q=[];for(let Q of Z){let $=Q.trim();if(HN.test($)||KN.test($)||UN.test($)){q.push({entry:Q,reason:"too-broad"});continue}X.push(Q)}return{entries:X,dropped:q}}function WN(Z){return Z.split(`
103
- `).map((X)=>X.trim()).filter((X)=>X.startsWith("- ")).map((X)=>X.slice(2))}function Zs(Z,X){if(Z.length===0)return X;let q=GN(Z,WN(X));if(q.length===0)return"";return`
104
- ${q.map((Q)=>`- ${Q}`).join(`
105
- `)}
106
- `}function RV(Z){switch(Z){case"empty":return"empty entry";case"control-characters":return"contains control characters";case"invisible-characters":return"contains invisible or bidirectional characters";case"settings-token":return"contains a settings delimiter token";case"too-long":return"longer than 10000 characters";case"over-entry-cap":return"beyond the 200-entry limit";case"too-broad":return"too broad for auto mode to honor safely"}}var ro="$defaults",$N,JN,YN,HN,KN,UN;var FV=B(()=>{$N=/[\u0000-\u001F\u007F-\u009F]/,JN=/[\p{Cf}\p{Zl}\p{Zp}\u2028\u2029\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,YN=/<\/?settings_/i,HN=/^[A-Za-z_][A-Za-z0-9_]*\((\*|:\*|\s*)\)$/,KN=/^(Bash|PowerShell)\(\s*(sh|bash|zsh|dash|ksh|fish|curl|wget|eval|python3?|node|perl|ruby|env|xargs|sudo|doas|pwsh|powershell)\b[^)]*\*[^)]*\)$/i,UN=/^(?:allow\s+)?(?:any|all|every)\s+(?:tool\s+calls?|tool\s+uses?|commands?|bash\s+commands?|shell\s+commands?|actions?|operations?)\b/i});import{join as VN}from"path";var y1,w4;var L5=B(()=>{T1();n2();y1=c(function(){switch(A0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),w4=c(function(){return VN(y1(),"managed-settings.d")})});var BN,LN,DV;var AV=B(()=>{r0();J2();BN=I(()=>K.object({allowedDomains:K.array(K.string()).optional(),allowManagedDomainsOnly:K.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:K.array(K.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:K.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:K.boolean().optional(),httpProxyPort:K.number().optional(),socksProxyPort:K.number().optional()}).optional()),LN=I(()=>K.object({allowWrite:K.array(K.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:K.array(K.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:K.array(K.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:K.array(K.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:K.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),DV=I(()=>K.object({enabled:K.boolean().optional(),failIfUnavailable:K.boolean().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate."),autoAllowBashIfSandboxed:K.boolean().optional(),allowUnsandboxedCommands:K.boolean().optional().describe("Allow trusted, user-initiated commands to run outside the sandbox. When false, sandbox override requests are ignored and all commands must run sandboxed. Default: true."),network:BN(),filesystem:LN(),ignoreViolations:K.record(K.string(),K.array(K.string())).optional(),enableWeakerNestedSandbox:K.boolean().optional(),enableWeakerNetworkIsolation:K.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false"),excludedCommands:K.array(K.string()).optional(),ripgrep:K.object({command:K.string(),args:K.array(K.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});var Gs,Ws="∙",Vs="✻",Bs="↑",Ls="↓",zs="↯",_s="○",Ms="◐",Rs="●",Fs="◎",Ds="◉",As="◍",Ts="▶",TV="⏸",js="↻",Is="◇",ws="◆",Os="※",ks="▎",Ns,xs="·✔︎·",Ps="×";var jV=B(()=>{X4();Gs=d2.platform==="darwin"?"⏺":"●",Ns=["·|·","·/·","·—·","·\\·"]});var wN={};Wq(wN,{toExternalPermissionMode:()=>FN,permissionModeTitle:()=>AN,permissionModeSymbol:()=>jN,permissionModeSchema:()=>_N,permissionModeFromString:()=>DN,isExternalPermissionMode:()=>RN,isDefaultMode:()=>TN,getModeColor:()=>IN,externalPermissionModeSchema:()=>MN,PERMISSION_MODES:()=>$6,EXTERNAL_PERMISSION_MODES:()=>Vq});function RN(Z){return Z!=="auto"}function z5(Z){return IV[Z]??IV.default}function FN(Z){return z5(Z).external}function DN(Z){return $6.includes(Z)?Z:"default"}function AN(Z){return z5(Z).title}function TN(Z){return Z==="default"||Z===void 0}function jN(Z){return z5(Z).symbol}function IN(Z){return z5(Z).color}var _N,MN,IV;var wV=B(()=>{r0();jV();zN();J2();_N=I(()=>K.enum($6)),MN=I(()=>K.enum(Vq)),IV={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:TV,color:"planMode",external:"plan"},acceptEdits:{title:"Accept edits",shortTitle:"Accept",symbol:"⏵⏵",color:"autoAccept",external:"acceptEdits"},bypassPermissions:{title:"Bypass Permissions",shortTitle:"Bypass",symbol:"⏵⏵",color:"error",external:"bypassPermissions"},dontAsk:{title:"Don't Ask",shortTitle:"DontAsk",symbol:"⏵⏵",color:"error",external:"dontAsk"},...{auto:{title:"Auto mode",shortTitle:"Auto",symbol:"⏵⏵",color:"warning",external:"default"}}}});var OV=()=>{};var kV;var NV=B(()=>{OV();kV=["PreToolUse","PostToolUse","PostToolUseFailure","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","StopFailure","SubagentStart","SubagentStop","PreCompact","PostCompact","PermissionRequest","PermissionDenied","Setup","TeammateIdle","TaskCreated","TaskCompleted","Elicitation","ElicitationResult","ConfigChange","WorktreeCreate","WorktreeRemove","InstructionsLoaded","CwdChanged","FileChanged"]});var xV=()=>{};var PV=()=>{};var EV=B(()=>{NV();xV();PV()});var vV,ps="bash";var yV=B(()=>{vV=["bash","powershell"]});function ON(){let Z=K.object({type:K.literal("command").describe("Shell command hook type"),command:K.string().describe("Shell command to execute"),if:_5(),shell:K.enum(vV).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:K.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:K.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async."),interactive:K.boolean().optional().describe("If true, stdin stays open after the input JSON so the hook can ask the user a question (the prompt protocol). Leave it off for an ordinary hook: it reads its input to EOF, and an stdin left open blocks it until its timeout.")}),X=K.object({type:K.literal("prompt").describe("LLM prompt hook type"),prompt:K.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:_5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:K.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-5"). If not specified, uses the default small fast model.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=K.object({type:K.literal("http").describe("HTTP hook type"),url:K.string().url().describe("URL to POST the hook input JSON to"),if:_5(),timeout:K.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:K.record(K.string(),K.string()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:K.array(K.string()).optional().describe("Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")}),Q=K.object({type:K.literal("agent").describe("Agentic verifier hook type"),prompt:K.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:_5(),timeout:K.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:K.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-5"). If not specified, uses Haiku.'),statusMessage:K.string().optional().describe("Custom status message to display in spinner while hook runs"),once:K.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:q,AgentHookSchema:Q}}var _5,kN,NN,Y2;var M5=B(()=>{EV();r0();J2();yV();_5=I(()=>K.string().optional().describe('Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.'));kN=I(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:q,HttpHookSchema:Q}=ON();return K.discriminatedUnion("type",[Z,X,q,Q])}),NN=I(()=>K.object({matcher:K.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:K.array(kN()).describe("List of hooks to execute when the matcher matches")})),Y2=I(()=>K.partialRecord(K.enum(kV),K.array(NN())))});var rs,ts,xN,CV,PN,EN,vN,yN,CN,SN,bN,R5,es;var SV=B(()=>{r0();J2();rs=I(()=>K.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),ts=I(()=>K.enum(["stdio","sse","sse-ide","http","ws","sdk"])),xN=I(()=>K.object({type:K.literal("stdio").optional(),command:K.string().min(1,"Command cannot be empty"),args:K.array(K.string()).default([]),env:K.record(K.string(),K.string()).optional()})),CV=I(()=>K.object({clientId:K.string().optional(),callbackPort:K.number().int().positive().optional(),authServerMetadataUrl:K.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional()})),PN=I(()=>K.object({type:K.literal("sse"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:CV().optional()})),EN=I(()=>K.object({type:K.literal("sse-ide"),url:K.string(),ideName:K.string(),ideRunningInWindows:K.boolean().optional()})),vN=I(()=>K.object({type:K.literal("ws-ide"),url:K.string(),ideName:K.string(),authToken:K.string().optional(),ideRunningInWindows:K.boolean().optional()})),yN=I(()=>K.object({type:K.literal("http"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional(),oauth:CV().optional()})),CN=I(()=>K.object({type:K.literal("ws"),url:K.string(),headers:K.record(K.string(),K.string()).optional(),headersHelper:K.string().optional()})),SN=I(()=>K.object({type:K.literal("sdk"),name:K.string()})),bN=I(()=>K.object({type:K.literal("claudeai-proxy"),url:K.string(),id:K.string()})),R5=I(()=>K.union([xN(),PN(),EN(),vN(),yN(),CN(),SN(),bN()])),es=I(()=>K.object({mcpServers:K.record(K.string(),R5())}))});function Jr(Z,X){let q=Z.toLowerCase();return X.autoUpdate??(F5.has(q)&&!hN.has(q))}function mN(Z){if(F5.has(Z.toLowerCase()))return!1;if(gN.test(Z))return!0;return fN.test(Z)}function uN(Z){let X=Z.trim(),q=pN.exec(X);if(q)return q[1].toLowerCase()==="github.com"&&q[2].toLowerCase()===J6;try{let Q=new URL(X);if(Q.protocol!=="https:"&&Q.protocol!=="ssh:")return!1;if(Q.hostname.toLowerCase()!=="github.com")return!1;return Q.pathname.split("/").filter(Boolean)[0]?.toLowerCase()===J6}catch{return!1}}function Yr(Z,X){let q=Z.toLowerCase();if(!F5.has(q))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${J6}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${J6}/' can use this name.`;return null}if(X.source==="git"&&X.url){if(uN(X.url))return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${J6}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${J6}' organization.`}function Kr(Z){return typeof Z==="string"&&Z.startsWith("./")}function Ur(Z){return Z.source==="file"||Z.source==="directory"}var F5,hN,fN,gN,J6="anthropics",pN,V1,Y6,bV,Lq,zq,gV,_q,dN,Hr,cN,lN,nN,iN,aN,oN,hV,sN,rN,mV,tN,eN,fV,Zx,uV,Xx,qx,O4,Bq,pV,Qx,$x,Gr,dV,Jx,Yx,Hx,Wr,Kx,Ux,Vr,Gx,Br;var cV=B(()=>{r0();M5();SV();J2();F5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),hN=new Set(["knowledge-work-plugins"]);fN=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,gN=/[^\u0020-\u007E]/;pN=/^git@([^:]+):([^/]+)\//i;V1=I(()=>K.string().startsWith("./")),Y6=I(()=>V1().endsWith(".json")),bV=I(()=>K.union([V1().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),K.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),Lq=I(()=>V1().endsWith(".md")),zq=I(()=>K.union([Lq(),V1()])),gV=I(()=>K.string().min(1,"Marketplace must have a name").refine((Z)=>!Z.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((Z)=>!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("..")&&Z!==".",{message:'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'}).refine((Z)=>!mN(Z),{message:"Marketplace name impersonates an official Anthropic/Claude marketplace"}).refine((Z)=>Z.toLowerCase()!=="inline",{message:'Marketplace name "inline" is reserved for --plugin-dir session plugins'}).refine((Z)=>Z.toLowerCase()!=="builtin",{message:'Marketplace name "builtin" is reserved for built-in plugins'})),_q=I(()=>K.object({name:K.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:K.string().optional().describe("Contact email for support or feedback"),url:K.string().optional().describe("Website, GitHub profile, or organization URL")})),dN=I(()=>K.object({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),version:K.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:K.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:_q().optional().describe("Information about the plugin creator or maintainer"),homepage:K.string().url().optional().describe("Plugin homepage or documentation URL"),repository:K.string().optional().describe("Source code repository URL"),license:K.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:K.array(K.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:K.array(Yx()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)})),Hr=I(()=>K.object({description:K.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:K.lazy(()=>Y2()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),cN=I(()=>K.object({hooks:K.union([Y6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>Y2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),K.array(K.union([Y6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),K.lazy(()=>Y2()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),lN=I(()=>K.object({source:zq().optional().describe("Path to command markdown file, relative to plugin root"),content:K.string().optional().describe("Inline markdown content for the command"),description:K.string().optional().describe("Command description override"),argumentHint:K.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:K.string().optional().describe("Default model for this command"),allowedTools:K.array(K.string()).optional().describe("Tools allowed when command runs")}).refine((Z)=>Z.source&&!Z.content||!Z.source&&Z.content,{message:'Command must have either "source" (file path) or "content" (inline markdown), but not both'})),nN=I(()=>K.object({commands:K.union([zq().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root"),K.array(zq().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional command files or skill directories"),K.record(K.string(),lN()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),iN=I(()=>K.object({agents:K.union([Lq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),K.array(Lq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional agent files")])})),aN=I(()=>K.object({skills:K.union([V1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),K.array(V1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")])})),oN=I(()=>K.object({outputStyles:K.union([V1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),K.array(V1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")])})),hV=I(()=>K.string().min(1)),sN=I(()=>K.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),rN=I(()=>K.object({mcpServers:K.union([Y6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),bV().describe("Path or URL to MCPB file containing MCP server configuration"),K.record(K.string(),R5()).describe("MCP server configurations keyed by server name"),K.array(K.union([Y6().describe("Path to MCP servers configuration file"),bV().describe("Path or URL to MCPB file"),K.record(K.string(),R5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),mV=I(()=>K.object({type:K.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:K.string().describe("Human-readable label shown in the config dialog"),description:K.string().describe("Help text shown beneath the field in the config dialog"),required:K.boolean().optional().describe("If true, validation fails when this field is empty"),default:K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]).optional().describe("Default value used when the user provides nothing"),multiple:K.boolean().optional().describe("For string type: allow an array of strings"),sensitive:K.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:K.number().optional().describe("Minimum value (number type only)"),max:K.number().optional().describe("Maximum value (number type only)")}).strict()),tN=I(()=>K.object({userConfig:K.record(K.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDIN_PLUGIN_OPTION_<KEY> env vars in hooks"),mV()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage (macOS keychain or .credentials.json). Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. "+"Note: sensitive values share a single keychain entry with OAuth tokens — keep "+"secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")})),eN=I(()=>K.object({channels:K.array(K.object({server:K.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:K.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:K.record(K.string(),mV()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),fV=I(()=>K.strictObject({command:K.string().min(1).refine((Z)=>{if(Z.includes(" ")&&!Z.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:K.array(hV()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:K.record(sN(),hV()).refine((Z)=>Object.keys(Z).length>0,{message:"extensionToLanguage must have at least one mapping"}).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),transport:K.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:K.record(K.string(),K.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:K.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:K.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:K.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:K.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:K.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:K.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:K.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),Zx=I(()=>K.object({lspServers:K.union([Y6().describe("Path to .lsp.json configuration file relative to plugin root"),K.record(K.string(),fV()).describe("LSP server configurations keyed by server name"),K.array(K.union([Y6().describe("Path to LSP configuration file"),K.record(K.string(),fV()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),uV=I(()=>K.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let X=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,q=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||q.test(Z)},"Invalid npm package name format")),Xx=I(()=>K.object({settings:K.record(K.string(),K.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),qx=I(()=>K.object({...dN().shape,...cN().partial().shape,...nN().partial().shape,...iN().partial().shape,...aN().partial().shape,...oN().partial().shape,...eN().partial().shape,...rN().partial().shape,...Zx().partial().shape,...Xx().partial().shape,...tN().partial().shape})),O4=I(()=>K.discriminatedUnion("source",[K.object({source:K.literal("url"),url:K.string().url().describe("Direct URL to marketplace.json file"),headers:K.record(K.string(),K.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),K.object({source:K.literal("git"),url:K.string().describe("Full git repository URL"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:K.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:K.array(K.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),K.object({source:K.literal("npm"),package:uV().describe("NPM package containing marketplace.json")}),K.object({source:K.literal("file"),path:K.string().describe("Local file path to marketplace.json")}),K.object({source:K.literal("directory"),path:K.string().describe("Local directory containing .claude-plugin/marketplace.json")}),K.object({source:K.literal("hostPattern"),hostPattern:K.string().describe('Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')}),K.object({source:K.literal("pathPattern"),pathPattern:K.string().describe('Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.')}),K.object({source:K.literal("settings"),name:gV().refine((Z)=>!F5.has(Z.toLowerCase()),{message:"Reserved official marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."}).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation "+"as PluginMarketplaceSchema plus reserved-name rejection — "+"validateOfficialNameSource runs after the disk write, too late to clean up."),plugins:K.array(Qx()).describe("Plugin entries declared inline in settings.json"),owner:_q().optional()}).describe("Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).")])),Bq=I(()=>K.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),pV=I(()=>K.union([V1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),K.object({source:K.literal("npm"),package:uV().or(K.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:K.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:K.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),K.object({source:K.literal("pip"),package:K.string().describe("Python package name as it appears on PyPI"),version:K.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:K.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),K.object({source:K.literal("url"),url:K.string().describe("Full git repository URL (https:// or git@)"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Bq().optional().describe("Specific commit SHA to use")}),K.object({source:K.literal("github"),repo:K.string().describe("GitHub repository in owner/repo format"),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Bq().optional().describe("Specific commit SHA to use")}),K.object({source:K.literal("git-subdir"),url:K.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:K.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.'),ref:K.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Bq().optional().describe("Specific commit SHA to use")}).describe("Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.")])),Qx=I(()=>K.object({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Plugin name as it appears in the target repository"),source:pV().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:K.string().optional(),version:K.string().optional(),strict:K.boolean().optional()}).refine((Z)=>typeof Z.source!=="string",{message:'Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, pip). Relative-path sources like "./foo" have no marketplace repository to resolve against.'}));$x=I(()=>qx().partial().extend({name:K.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier matching the plugin name"),source:pV().describe("Where to fetch the plugin from"),category:K.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:K.array(K.string()).optional().describe("Tags for searchability and discovery"),strict:K.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),Gr=I(()=>K.object({name:gV(),owner:_q().describe("Marketplace maintainer or curator information"),plugins:K.array($x()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:K.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:K.object({pluginRoot:K.string().optional().describe("Base path for relative plugin sources"),version:K.string().optional().describe("Marketplace version"),description:K.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:K.array(K.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),dV=I(()=>K.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),Jx=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,Yx=I(()=>K.union([K.string().regex(Jx,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),K.object({name:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:K.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),Hx=I(()=>K.object({version:K.string().describe("Currently installed version"),installedAt:K.string().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),installPath:K.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),Wr=I(()=>K.object({version:K.literal(1).describe("Schema version 1"),plugins:K.record(dV(),Hx()).describe("Map of plugin IDs to their installation metadata")})),Kx=I(()=>K.enum(["managed","user","project","local"])),Ux=I(()=>K.object({scope:Kx().describe("Installation scope"),projectPath:K.string().optional().describe("Project path (required for project/local scopes)"),installPath:K.string().describe("Absolute path to the versioned plugin directory"),version:K.string().optional().describe("Currently installed version"),installedAt:K.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:K.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:K.string().optional().describe("Git commit SHA for git-based plugins")})),Vr=I(()=>K.object({version:K.literal(2).describe("Schema version 2"),plugins:K.record(dV(),K.array(Ux())).describe("Map of plugin IDs to arrays of installation entries")})),Gx=I(()=>K.object({source:O4().describe("Where to fetch the marketplace from"),installLocation:K.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:K.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Br=I(()=>K.record(K.string(),Gx()))});function zr(Z){return Z.startsWith("claude.ai ")}function D5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var lV=()=>{};function nV(Z){let X=Z.split("__"),[q,Q,...$]=X;if(q!=="mcp"||!Q)return null;let J=$.length>0?$.join("__"):void 0;return{serverName:Q,toolName:J}}function Wx(Z){return`mcp__${D5(Z)}__`}function Vx(Z,X){return`${Wx(Z)}${D5(X)}`}function Rr(Z){return Z.mcpInfo?Vx(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function Fr(Z,X){let q=`mcp__${D5(X)}__`;return Z.replace(q,"")}function Dr(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let q=X.indexOf(" - ");if(q!==-1)return X.substring(q+3).trim();return X}var iV=B(()=>{lV()});var aV="Agent",Tr="Task",jr;var oV=B(()=>{jr=new Set(["Plan","WebResearcher","WebResearcherManager"])});var Mq="TaskOutput";var sV=()=>{};var rV="TaskStop",Or=`
107
- - Stops a running background task by its ID
108
- - Takes a task_id parameter identifying the task to stop
109
- - Returns a success or failure status
110
- - Use this tool when you need to terminate a long-running task
111
- `;var tV=()=>{};function H6(Z){return Object.hasOwn(Rq,Z)?Rq[Z]:Z}function Er(Z){let X=[];for(let[q,Q]of Object.entries(Rq))if(Q===Z)X.push(q);return X}function Bx(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function Lx(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function eV(Z){let X=zx(Z,"(");if(X===-1)return{toolName:H6(Z)};let q=_x(Z,")");if(q===-1||q<=X)return{toolName:H6(Z)};if(q!==Z.length-1)return{toolName:H6(Z)};let Q=Z.substring(0,X),$=Z.substring(X+1,q);if(!Q)return{toolName:H6(Z)};if($===""||$==="*")return{toolName:H6(Q)};let J=Lx($);return{toolName:H6(Q),ruleContent:J}}function vr(Z){if(!Z.ruleContent)return Z.toolName;let X=Bx(Z.ruleContent);return`${Z.toolName}(${X})`}function zx(Z,X){for(let q=0;q<Z.length;q++)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}function _x(Z,X){for(let q=Z.length-1;q>=0;q--)if(Z[q]===X){let Q=0,$=q-1;while($>=0&&Z[$]==="\\")Q++,$--;if(Q%2===0)return q}return-1}var Rq;var ZB=B(()=>{oV();sV();tV();Rq={Task:aV,KillShell:rV,AgentOutputTool:Mq,BashOutputTool:Mq}});function Cr(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function XB(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function qB(Z,X,q=X+"s"){return Z===1?X:q}function Sr(Z){let X=Z.indexOf(`
112
- `);return X===-1?Z:Z.slice(0,X)}function br(Z,X,q=0){let Q=0,$=Z.indexOf(X,q);while($!==-1)Q++,$=Z.indexOf(X,$+1);return Q}function hr(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function fr(Z){return Z.replace(/\u3000/g," ")}function gr(Z,X=",",q=QB){let $="";for(let J of Z){let Y=$?X:"",H=Y+J;if($.length+H.length<=q)$+=H;else{let U=q-$.length-Y.length-14;if(U>0)$+=Y+J.slice(0,U)+"...[truncated]";else $+="...[truncated]";return $}}return $}class Mx{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=QB){this.maxSize=Z}append(Z){let X=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=X.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+X.length>this.maxSize){let q=this.maxSize-this.content.length;if(q>0)this.content+=X.slice(0,q);this.isTruncated=!0}else this.content+=X}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,X=Math.round(Z/1024);return this.content+`
113
- ... [output truncated - ${X}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function mr(Z,X){let q=Z.split(`
114
- `);if(q.length<=X)return Z;return q.slice(0,X).join(`
115
- `)+"…"}var QB=33554432;var Fq=()=>{};function $B(Z){return A5.filePatternTools.includes(Z)}function JB(Z){return A5.bashPrefixTools.includes(Z)}function YB(Z){return Object.hasOwn(A5.customValidation,Z)?A5.customValidation[Z]:void 0}var A5;var HB=B(()=>{A5={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(Z)=>{if(Z.includes("*")||Z.includes("?"))return{valid:!1,error:"WebSearch does not support wildcards",suggestion:"Use exact search terms without * or ?",examples:["WebSearch(claude ai)","WebSearch(typescript tutorial)"]};return{valid:!0}},WebFetch:(Z)=>{if(Z.includes("://")||Z.startsWith("http"))return{valid:!1,error:"WebFetch permissions use domain format, not URLs",suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:github.com)"]};if(!Z.startsWith("domain:"))return{valid:!1,error:'WebFetch permissions must use "domain:" prefix',suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:*.google.com)"]};return{valid:!0}}}}});function KB(Z,X){let q=0,Q=X-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;return q%2!==0}function Dq(Z,X){let q=0;for(let Q=0;Q<Z.length;Q++)if(Z[Q]===X&&!KB(Z,Q))q++;return q}function Rx(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!KB(Z,X))return!0}return!1}function Aq(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=Dq(Z,"("),q=Dq(Z,")");if(X!==q)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(Rx(Z)){let Y=Z.substring(0,Z.indexOf("("));if(!Y)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${Y}" without parentheses`,examples:[`${Y}`,`${Y}(some-pattern)`]}}let Q=eV(Z),$=nV(Q.toolName);if($){if(Q.ruleContent!==void 0||Dq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Q.toolName}" without parentheses, or use "mcp__${$.serverName}__*" for all tools`,examples:[`mcp__${$.serverName}`,`mcp__${$.serverName}__*`,$.toolName&&$.toolName!=="*"?`mcp__${$.serverName}__${$.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!Q.toolName||Q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(Q.toolName[0]!==Q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${XB(String(Q.toolName))}"`};let J=YB(Q.toolName);if(J&&Q.ruleContent!==void 0){let Y=J(Q.ruleContent);if(!Y.valid)return Y}if(JB(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if($B(Q.toolName)&&Q.ruleContent!==void 0){let Y=Q.ruleContent;if(Y.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${Q.toolName}(*.ts) - matches .ts files`,`${Q.toolName}(src/**) - matches all files in src`,`${Q.toolName}(**/*.test.ts) - matches test files`]};if(Y.includes("*")&&!Y.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!Y.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${Q.toolName}(*.js) - all .js files`,`${Q.toolName}(src/*) - all files directly in src`,`${Q.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var T5;var Tq=B(()=>{r0();iV();J2();ZB();Fq();HB();T5=I(()=>K.string().superRefine((Z,X)=>{let q=Aq(Z);if(!q.valid){let Q=q.error;if(q.suggestion)Q+=`. ${q.suggestion}`;if(q.examples&&q.examples.length>0)Q+=`. Examples: ${q.examples.join(", ")}`;X.addIssue({code:K.ZodIssueCode.custom,message:Q,params:{received:Z}})}}))});function rr(Z){if(!Z||typeof Z!=="object")return null;let X=jq.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var jq;var UB=B(()=>{r0();jq=K.object({enabled:K.boolean().describe("Whether auto-fix is enabled"),lint:K.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:K.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:K.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:K.number().int().min(1000).max(300000).default(30000).describe("Timeout in ms for each lint/test command (default: 30000)")}).refine((Z)=>!Z.enabled||Z.lint!==void 0||Z.test!==void 0,{message:'At least one of "lint" or "test" must be set when enabled'})});function Gt(Z){return"serverName"in Z&&Z.serverName!==void 0}function Wt(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Vt(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var Fx,Dx,Ax,Tx,jx,GB,v0;var k4=B(()=>{r0();AV();J2();wV();cV();Gq();Tq();M5();M5();UB();Uq();Fx=I(()=>K.record(K.string(),K.coerce.string())),Dx=I(()=>K.object({allow:K.array(T5()).optional().describe("List of permission rules for allowed operations"),deny:K.array(T5()).optional().describe("List of permission rules for denied operations"),ask:K.array(T5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:K.enum($6).optional().describe("Default permission mode when Claudin needs access"),disableBypassPermissionsMode:K.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:K.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:K.array(K.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),Ax=I(()=>K.object({source:O4().describe("Where to fetch the marketplace from"),installLocation:K.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:K.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Tx=I(()=>K.object({serverName:K.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that users are allowed to configure"),serverCommand:K.array(K.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for allowed stdio servers"),serverUrl:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return Kq([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),jx=I(()=>K.object({serverName:K.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:K.array(K.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:K.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return Kq([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),GB=["skills","agents","hooks","mcp"],v0=I(()=>K.object({$schema:K.literal(LV).optional().describe("JSON Schema reference for Claudin settings"),apiKeyHelper:K.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:K.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:K.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:K.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),fileSuggestion:K.object({type:K.literal("command"),command:K.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:K.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:K.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),env:Fx().optional().describe("Environment variables to set for Claudin sessions"),attribution:K.object({commit:K.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:K.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claudin attribution if not set."),includeGitInstructions:K.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:Dx().optional().describe("Tool usage permissions configuration"),model:K.string().optional().describe("Override the default model used by Claudin"),availableModels:K.array(K.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),modelOverrides:K.record(K.string(),K.string()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:K.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:K.array(K.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:K.array(K.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:K.array(Tx()).optional().describe("Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:K.array(jx()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:Y2().optional().describe("Custom commands to run before/after tool executions"),autoFix:jq.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:K.object({symlinkDirectories:K.array(K.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'),sparsePaths:K.array(K.string()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). "+"Dramatically faster in large monorepos — only the listed paths are written to disk."),baseRef:K.enum(["fresh","head"]).optional().describe('Base ref for new worktrees. "fresh" (default) branches from origin/<default-branch>; "head" branches from the current local HEAD.')}).optional().describe("Git worktree configuration for --worktree flag."),lsp:K.object({enabled:K.boolean().optional(),diagnosticsTimeoutMs:K.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudin waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).optional().describe("LSP subsystem configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). LSP servers themselves are provided exclusively by enabled plugins (.lsp.json)."),disableAllHooks:K.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:K.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:K.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:K.array(K.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:K.array(K.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:K.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:K.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),strictPluginOnlyCustomization:K.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>GB.includes(X)):Z,K.union([K.boolean(),K.array(K.enum(GB))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. '+"Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by "+"marketplace allowlist, everything else blocked here."),statusLine:K.object({type:K.literal("command"),command:K.string(),padding:K.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:K.record(K.string(),K.union([K.array(K.string()),K.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:K.record(K.string(),Ax()).check((Z)=>{for(let[X,q]of Object.entries(Z.value))if(q.source.source==="settings"&&q.source.name!==X)Z.issues.push({code:"custom",input:q.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${q.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claudin/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:K.array(O4()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:K.array(O4()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:K.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:K.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:K.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:K.string().optional().describe("Controls the output style for assistant responses"),language:K.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:K.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:DV().optional(),feedbackSurveyRate:K.number().min(0).max(1).optional().describe("Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),spinnerTipsEnabled:K.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:K.object({mode:K.enum(["append","replace"]),verbs:K.array(K.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:K.object({excludeDefault:K.boolean().optional(),tips:K.array(K.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:K.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:K.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:K.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:K.enum(["low","medium","high","xhigh","max","adaptive"]).optional().catch(void 0).describe("Persisted effort level for supported models. 'adaptive' sends no effort field so the model scales per request."),codingLoopXhighDefault:K.boolean().optional().catch(void 0).describe("When true, defaults effort to xhigh for Opus 4.8 (coding/high-autonomy loops). Overrides the medium default for Pro/Max/Team and ultrathink. Opus 4.8 only; other models are unaffected. Defaults to false."),advisorModel:K.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:K.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:K.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:K.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:K.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:K.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:K.array(K.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:K.record(K.string(),K.object({mcpServers:K.record(K.string(),K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:K.record(K.string(),K.union([K.string(),K.number(),K.boolean(),K.array(K.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:K.object({defaultEnvironmentId:K.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:K.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),minimumVersion:K.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:K.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to .claudin/plans/ in the project root."),channelsEnabled:K.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:K.array(K.object({marketplace:K.string(),plugin:K.string()})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, "+"replaces the default Anthropic allowlist — admins decide which "+"plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."),prefersReducedMotion:K.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:K.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:K.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoMemoryProjectLocal:K.boolean().optional().describe("When true (the default), auto-memory for a git project defaults to <project>/.claudin/memory/ instead of the global ~/.claudin/projects/<sanitized-cwd>/memory/. Set to false to force the legacy global-only location. Ignored if set in projectSettings for security, same as autoMemoryDirectory."),autoDreamEnabled:K.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:K.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:K.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:K.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:K.object({allow:K.array(K.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:K.array(K.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:K.array(K.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:K.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:K.array(K.object({id:K.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:K.string().describe("Display name for the SSH connection"),sshHost:K.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:K.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:K.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:K.string().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:K.array(K.string()).optional().describe('Glob patterns or absolute paths of AGENTS.md/CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/AGENTS.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:K.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});function Iq(){let Z=WB(v0(),{unrepresentable:"any"});return m(Z,null,2)}var VB=B(()=>{r0();L0();k4()});function BB(Z){let X=Ix.find((Q)=>Q.matches(Z));if(!X)return null;let q={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!q.suggestion)q.suggestion=`Valid values: ${Z.enumValues.map((Q)=>`"${Q}"`).join(", ")}`;if(!q.docLink&&Z.path){let Q=Z.path.split(".")[0];if(Q)q.docLink=wx[Q]}return q}var Ix,wx;var LB=B(()=>{Ix=[{matches:(Z)=>Z.path==="permissions.defaultMode"&&Z.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)'}},{matches:(Z)=>Z.path==="apiKeyHelper"&&Z.code==="invalid_type",tip:{suggestion:'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"'}},{matches:(Z)=>Z.path==="cleanupPeriodDays"&&Z.code==="too_small"&&Z.expected==="0",tip:{suggestion:"Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."}},{matches:(Z)=>Z.path.startsWith("env.")&&Z.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"'}},{matches:(Z)=>(Z.path==="permissions.allow"||Z.path==="permissions.deny")&&Z.code==="invalid_type"&&Z.expected==="array",tip:{suggestion:'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.'}},{matches:(Z)=>Z.path.includes("hooks")&&Z.code==="invalid_type",tip:{suggestion:'Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}'}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeGitInstructions": true'}},{matches:(Z)=>Z.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields"}},{matches:(Z)=>Z.code==="invalid_value"&&Z.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="object"&&Z.received===null&&Z.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(Z)=>Z.path==="permissions.additionalDirectories"&&Z.code==="invalid_type",tip:{suggestion:'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command'}}],wx={}});function zB(Z){return Z.code==="invalid_type"}function _B(Z){return Z.code==="invalid_value"}function Ox(Z){return Z.code==="unrecognized_keys"}function MB(Z){return Z.code==="too_small"}function wq(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function RB(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function K6(Z,X){return Z.issues.map((q)=>{let Q=q.path.map(String).join("."),$=q.message,J,Y,H,U,G;if(_B(q))Y=q.values.map((V)=>String(V)),H=Y.join(" | "),U=void 0,G=void 0;else if(zB(q)){H=q.expected;let V=RB(q.message);U=V??wq(q.input),G=V??wq(q.input)}else if(MB(q))H=String(q.minimum);else if(q.code==="custom"&&"params"in q)U=q.params.received,G=U;let W=BB({path:Q,code:q.code,expected:H,received:U,enumValues:Y,message:q.message,value:U});if(_B(q))J=Y?.map((V)=>`"${V}"`).join(", "),$=`Invalid value. Expected one of: ${J}`;else if(zB(q)){let V=RB(q.message)??wq(q.input);if(q.expected==="object"&&V==="null"&&Q==="")$="Invalid or malformed JSON";else $=`Expected ${q.expected}, but received ${V}`}else if(Ox(q)){let V=q.keys.join(", ");$=`Unrecognized ${qB(q.keys.length,"field")}: ${V}`}else if(MB(q))$=`Number must be greater than or equal to ${q.minimum}`,J=String(q.minimum);return{file:X,path:Q,message:$,expected:J,invalidValue:G,suggestion:W?.suggestion,docLink:W?.docLink}})}function Ot(Z){try{let X=q0(Z),q=v0().strict().safeParse(X);if(q.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
116
- `+K6(q.error,"settings").map((J)=>`- ${J.path}: ${J.message}`).join(`
117
- `),fullSchema:Iq()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:Iq()}}}function j5(Z,X){if(!Z||typeof Z!=="object")return[];let q=Z;if(!q.permissions||typeof q.permissions!=="object")return[];let Q=q.permissions,$=[];for(let J of["allow","deny","ask"]){let Y=Q[J];if(!Array.isArray(Y))continue;Q[J]=Y.filter((H)=>{if(typeof H!=="string")return $.push({file:X,path:`permissions.${J}`,message:`Non-string value in ${J} array was removed`,invalidValue:H}),!1;let U=Aq(H);if(!U.valid){let G=`Invalid permission rule "${H}" was skipped`;if(U.error)G+=`: ${U.error}`;if(U.suggestion)G+=`. ${U.suggestion}`;return $.push({file:X,path:`permissions.${J}`,message:G,invalidValue:H}),!1}return!0})}return $}var Oq=B(()=>{L0();Fq();Tq();VB();k4();LB()});import{userInfo as kx}from"os";function jB(){let Z="";try{Z=kx().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${FB}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${FB}.plist`,label:"device-level managed preferences"}),X}var FB="com.anthropic.claudecode",I5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",w5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",U6="Settings",DB="/usr/bin/plutil",AB,TB=5000;var kq=B(()=>{AB=["-convert","json","-o","-","--"]});import{execFile as Nx}from"child_process";import{existsSync as xx}from"fs";function Nq(Z,X){return new Promise((q)=>{Nx(Z,X,{encoding:"utf-8",timeout:TB},(Q,$)=>{q({stdout:$??"",code:Q?1:0})})})}function O5(){return(async()=>{if(process.platform==="darwin"){let Z=jB(),q=(await Promise.all(Z.map(async({path:Q,label:$})=>{if(!xx(Q))return{stdout:"",label:$,ok:!1};let{stdout:J,code:Y}=await Nq(DB,[...AB,Q]);return{stdout:J,label:$,ok:Y===0&&!!J}}))).find((Q)=>Q.ok);return{plistStdouts:q?[{stdout:q.stdout,label:q.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([Nq("reg",["query",I5,"/v",U6]),Nq("reg",["query",w5,"/v",U6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:X.code===0?X.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function yt(){if(xq)return;xq=O5()}function IB(){return xq}var xq=null;var wB=B(()=>{kq()});import{join as OB}from"path";function Px(){if(k5)return;k5=(async()=>{G6("mdm_load_start");let Z=Date.now(),X=IB()??O5(),{mdm:q,hkcu:Q}=xB(await X);Eq=q,vq=Q,G6("mdm_load_end");let $=Date.now()-Z;if(P(`MDM settings load completed in ${$}ms`),Object.keys(q.settings).length>0){P(`MDM settings found: ${Object.keys(q.settings).join(", ")}`);try{H0("info","mdm_settings_loaded",{duration_ms:$,key_count:Object.keys(q.settings).length,error_count:q.errors.length})}catch{}}})()}async function it(){if(!k5)Px();await k5}function N5(){return Eq??B1}function x5(){return vq??B1}function at(Z,X){Eq=Z,vq=X}async function ot(){let Z=await O5();return xB(Z)}function Pq(Z,X){let q=k0(Z,!1);if(!q||typeof q!=="object")return{settings:{},errors:[]};let Q=j5(q,X),$=v0().safeParse(q);if(!$.success){let J=K6($.error,X);return{settings:{},errors:[...Q,...J]}}return{settings:$.data,errors:Q}}function kB(Z,X="Settings"){let q=Z.split(/\r?\n/),Q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$=new RegExp(`^\\s+${Q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let J of q){let Y=J.match($);if(Y&&Y[1])return Y[1].trimEnd()}return null}function xB(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:q}=Z.plistStdouts[0],Q=Pq(X,q);if(Object.keys(Q.settings).length>0)return{mdm:Q,hkcu:B1}}if(Z.hklmStdout){let X=kB(Z.hklmStdout);if(X){let q=Pq(X,`Registry: ${I5}\\${U6}`);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:B1}}}if(Ex())return{mdm:B1,hkcu:B1};if(Z.hkcuStdout){let X=kB(Z.hkcuStdout);if(X){let q=Pq(X,`Registry: ${w5}\\${U6}`);return{mdm:B1,hkcu:q}}}return{mdm:B1,hkcu:B1}}function Ex(){try{let Z=OB(y1(),"managed-settings.json"),X=K1(Z),q=k0(X,!1);if(q&&typeof q==="object"&&Object.keys(q).length>0)return!0}catch{}try{let Z=w4(),X=N().readdirSync(Z);for(let q of X){if(!(q.isFile()||q.isSymbolicLink())||!q.name.endsWith(".json")||q.name.startsWith("."))continue;try{let Q=K1(OB(Z,q.name)),$=k0(Q,!1);if($&&typeof $==="object"&&Object.keys($).length>0)return!0}catch{}}}catch{}return!1}var B1,Eq=null,vq=null,k5=null;var PB=B(()=>{h0();J4();Y4();z0();I6();NB();L5();k4();Oq();kq();wB();B1=Object.freeze({settings:{},errors:[]})});import{dirname as mB,join as P5,resolve as N4}from"path";function hq(){return P5(y1(),"managed-settings.json")}function fq(){let Z=[],X={},q=!1,{settings:Q,errors:$}=x4(hq());if(Z.push(...$),Q&&Object.keys(Q).length>0)X=W1(X,Q,H2),q=!0;let J=w4();try{let Y=N().readdirSync(J).filter((H)=>(H.isFile()||H.isSymbolicLink())&&H.name.endsWith(".json")&&!H.name.startsWith(".")).map((H)=>H.name).sort();for(let H of Y){let{settings:U,errors:G}=x4(P5(J,H));if(Z.push(...G),U&&Object.keys(U).length>0)X=W1(X,U,H2),q=!0}}catch(Y){let H=Y0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")g(Y)}return{settings:q?X:null,errors:Z}}function Ie(){let{settings:Z}=x4(hq()),X=!!Z&&Object.keys(Z).length>0,q=!1,Q=w4();try{q=N().readdirSync(Q).some(($)=>($.isFile()||$.isSymbolicLink())&&$.name.endsWith(".json")&&!$.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:q}}function uB(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")P(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else g(Z)}function x4(Z){let X=bB(Z);if(X)return{settings:X.settings?Cq(X.settings):null,errors:X.errors};let q=vx(Z);return hB(Z,q),{settings:q.settings?Cq(q.settings):null,errors:q.errors}}function vx(Z){try{let{resolvedPath:X}=w1(N(),Z),q=K1(X);if(q.trim()==="")return{settings:{},errors:[]};let Q=k0(q,!1),$=j5(Q,Z),J=v0().safeParse(Q);if(!J.success){let Y=K6(J.error,Z);return{settings:null,errors:[...$,...Y]}}return{settings:J.data,errors:$}}catch(X){return uB(X,Z),{settings:null,errors:[]}}}function EB(Z){switch(Z){case"userSettings":return N4(Z0());case"policySettings":case"projectSettings":case"localSettings":return N4(v1());case"flagSettings":{let X=Sq();return X?mB(N4(X)):N4(v1())}}}function yx(){if(gB()||e(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function E5(Z){switch(Z){case"userSettings":return P5(EB(Z),yx());case"projectSettings":case"localSettings":return P5(EB(Z),pB(Z));case"policySettings":return hq();case"flagSettings":return Sq()}}function pB(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function u(Z){let X=CB(Z);if(X!==void 0)return X;let q=dB(Z);return SB(Z,q),q}function dB(Z){if(Z==="policySettings"){let Q=V5();if(Q&&Object.keys(Q).length>0)return Q;let $=N5();if(Object.keys($.settings).length>0)return $.settings;let{settings:J}=fq();if(J)return J;let Y=x5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=E5(Z),{settings:q}=X?x4(X):{settings:null};if(Z==="flagSettings"){let Q=bq();if(Q){let $=v0().safeParse(Q);if($.success)return W1(q||{},$.data,H2)}}return q}function we(){let Z=V5();if(Z&&Object.keys(Z).length>0)return"remote";let X=N5();if(Object.keys(X.settings).length>0)return A0()==="macos"?"plist":"hklm";let{settings:q}=fq();if(q)return"file";let Q=x5();if(Object.keys(Q.settings).length>0)return"hkcu";return null}function Oe(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let q=E5(Z);if(!q)return{error:null};try{N().mkdirSync(mB(q));let Q=dB(Z);if(!Q){let J=null;try{J=K1(q)}catch(Y){if(!o2(Y))throw Y}if(J!==null){let Y=k0(J);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${q}`)};if(Y&&typeof Y==="object")Q=Y,P(`Using raw settings from ${q} due to validation failure`)}}let $=W1(Q||{},X,(J,Y,H,U)=>{if(Y===void 0&&U&&typeof H==="string"){delete U[H];return}if(Array.isArray(Y))return Y;return});if(zV(q),s2(q,m($,null,2)+`
118
- `),j4(),Z==="localSettings")WV(pB("localSettings"),v1())}catch(Q){let $=Error(`Failed to read raw settings from ${q}: ${Q}`);return g($),{error:$}}return{error:null}}function Cx(Z,X){return GV([...Z,...X])}function H2(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return Cx(Z,X);return}function ke(Z){let X=v0().strip().parse(Z),q=["permissions","sandbox","hooks"],Q=[],$={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let J of Object.keys(X))if(q.includes(J)&&X[J]&&typeof X[J]==="object"){let Y=X[J],H=$[J];if(H){for(let U of Object.keys(Y))if(H.has(U))Q.push(`${J}.${U}`)}}else Q.push(J);return Q.sort()}function Sx(){if(yq)return{settings:{},errors:[]};let Z=Date.now();G6("loadSettingsFromDisk_start"),H0("info","settings_load_started"),yq=!0;try{let X=fB(),q={};if(X)q=W1(q,X,H2);let Q=[],$=new Set,J=new Set;for(let Y of I4()){if(Y==="policySettings"){let U=null,G=[],W=V5();if(W&&Object.keys(W).length>0){let V=v0().safeParse(W);if(V.success)U=V.data;else G.push(...K6(V.error,"remote managed settings"))}if(!U){let V=N5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(!U){let{settings:V,errors:L}=fq();if(V)U=V;G.push(...L)}if(!U){let V=x5();if(Object.keys(V.settings).length>0)U=V.settings;G.push(...V.errors)}if(U)q=W1(q,U,H2);for(let V of G){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}continue}let H=E5(Y);if(H){let U=N4(H);if(!J.has(U)){J.add(U);let{settings:G,errors:W}=x4(H);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!$.has(L))$.add(L),Q.push(V)}if(G)q=W1(q,G,H2)}}if(Y==="flagSettings"){let U=bq();if(U){let G=v0().safeParse(U);if(G.success)q=W1(q,G.data,H2)}}}return H0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:J.size,error_count:Q.length}),{settings:q,errors:Q}}finally{yq=!1}}function gq(){let{settings:Z}=bx();return Z||{}}function Ne(){j4();let Z=[];for(let X of I4()){let q=u(X);if(q&&Object.keys(q).length>0)Z.push({source:X,settings:q})}return{effective:gq(),sources:Z}}function bx(){let Z=vB();if(Z!==null)return Z;let X=Sx();return G6("loadSettingsFromDisk_end"),yB(X),X}function xe(){return!!(u("userSettings")?.skipDangerousModePermissionPrompt||u("localSettings")?.skipDangerousModePermissionPrompt||u("flagSettings")?.skipDangerousModePermissionPrompt||u("policySettings")?.skipDangerousModePermissionPrompt)}function Pe(){return!!(u("userSettings")?.permissions?.allowBypassPermissionsMode||u("localSettings")?.permissions?.allowBypassPermissionsMode||u("flagSettings")?.permissions?.allowBypassPermissionsMode||u("policySettings")?.permissions?.allowBypassPermissionsMode)}function Ee(){{let Z=u("userSettings")?.skipAutoPermissionPrompt,X=u("localSettings")?.skipAutoPermissionPrompt,q=u("flagSettings")?.skipAutoPermissionPrompt,Q=u("policySettings")?.skipAutoPermissionPrompt,$=!!(Z||X||q||Q);return P(`[auto-mode] hasAutoModeOptIn=${$} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${q} policy=${Q}`),$}return!1}function ve(){return u("policySettings")?.useAutoModeDuringPlan!==!1&&u("flagSettings")?.useAutoModeDuringPlan!==!1&&u("userSettings")?.useAutoModeDuringPlan!==!1&&u("localSettings")?.useAutoModeDuringPlan!==!1}function ye(){return hx().config}function hx(){return ux(u)}function ux(Z){let X=[],q=[],Q=[],$=[],J=(U,G,W)=>{if(!W)return;let V=MV(W);G.push(...V.entries);for(let L of V.dropped)$.push({section:U,entry:L.entry,reason:RV(L.reason)})};for(let U of fx){let G=Z(U);if(!G)continue;let W=mx.safeParse(G.autoMode);if(W.success)J("allow",X,W.data.allow),J("soft_deny",q,W.data.soft_deny),J("environment",Q,W.data.environment)}let Y=[];for(let U of gx){let G=Z(U);if(!G)continue;let W=G.autoMode;if(W&&typeof W==="object")Y.push(U)}return{config:X.length>0||q.length>0||Q.length>0?{...X.length>0&&{allow:X},...q.length>0&&{soft_deny:q},...Q.length>0&&{environment:Q}}:void 0,dropped:$,ignoredSources:Y}}function Ce(Z){for(let X of I4()){if(X==="policySettings")continue;let q=E5(X);if(!q)continue;try{let{resolvedPath:Q}=w1(N(),q),$=K1(Q);if(!$.trim())continue;let J=k0($,!1);if(J&&typeof J==="object"&&Z in J)return!0}catch(Q){uB(Q,q)}}return!1}var yq=!1,fx,gx,mx;var cB=B(()=>{HV();r0();E1();UV();Uq();h0();J4();a0();j1();b7();Y4();z0();VV();I6();y0();n2();L0();NB();Gq();_V();FV();L5();PB();KV();k4();Oq();fx=["userSettings","flagSettings","policySettings"],gx=["projectSettings","localSettings"],mx=K.object({allow:K.array(K.string()).optional(),soft_deny:K.array(K.string()).optional(),deny:K.array(K.string()).optional(),environment:K.array(K.string()).optional()})});import{cpSync as px,readFileSync as dx,readdirSync as cx}from"fs";import{join as lx}from"path";function iB(Z,X){if(Z===X)return;if(nB(X))return;if(!nB(Z))return;try{px(Z,X,{recursive:!0,force:!1,errorOnExist:!1})}catch(q){g(Error(`Failed to migrate auto-memory from ${Z} to ${X}: ${q instanceof Error?q.message:String(q)}`))}}function nB(Z){try{if(dx(lx(Z,lB),"utf-8").trim())return!0}catch{}try{return cx(Z,{withFileTypes:!0}).some((X)=>X.isFile()&&X.name.endsWith(".md")&&X.name!==lB)}catch{return!1}}var lB="MEMORY.md";var aB=B(()=>{y0()});import{chmodSync as nx}from"fs";import{homedir as ix}from"os";import{isAbsolute as ax,join as P4,normalize as mq,sep as v5}from"path";function tB(){let Z=process.env.CLAUDIN_DISABLE_AUTO_MEMORY;if(e(Z))return!1;if(rB(Z))return!0;if(e(process.env.CLAUDIN_SIMPLE))return!1;if(e(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=gq();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function ee(){if(!s1("tengu_passport_quail",!1))return!1;return!sB()||s1("tengu_slate_thimble",!1)}function ox(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return Z0()}function eB(Z,X){if(!Z)return;let q=Z;if(X&&(q.startsWith("~/")||q.startsWith("~\\"))){let $=q.slice(2),J=mq($||".");if(J==="."||J==="..")return;q=P4(ix(),$)}let Q=mq(q).replace(/[/\\]+$/,"");if(!ax(Q)||Q.length<3||/^[A-Za-z]:$/.test(Q)||Q.startsWith("\\\\")||Q.startsWith("//")||Q.includes("\x00"))return;return(Q+v5).normalize("NFC")}function ZL(){return eB(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function rx(){let Z=u("policySettings")?.autoMemoryDirectory??u("flagSettings")?.autoMemoryDirectory??u("localSettings")?.autoMemoryDirectory??u("userSettings")?.autoMemoryDirectory;return eB(Z,!0)}function Z00(){return ZL()!==void 0}function tx(){return(u("policySettings")?.autoMemoryProjectLocal??u("flagSettings")?.autoMemoryProjectLocal??u("localSettings")?.autoMemoryProjectLocal??u("userSettings")?.autoMemoryProjectLocal)!==!1}function ex(){return q2(E4())??E4()}function XL(){return P4(v4(),sx)}function X00(Z){return mq(Z).startsWith(v4())}var oB="memory",sx="MEMORY.md",v4;var uq=B(()=>{T1();E1();S7();a0();M4();y0();H4();cB();z0();aB();v4=c(()=>{let Z=ZL()??rx();if(Z)return Z;let X=P4(ox(),"projects"),q=(P4(X,kX(ex()),oB)+v5).normalize("NFC");if(!tx())return q;let Q=q2(E4());if(!Q)return q;let $=(P4(Q,".claudin",oB)+v5).normalize("NFC");try{N().mkdirSync($,{mode:448})}catch(Y){return g(Y),q}let J=!1;try{let Y=N().realpathSync(Q),H=N().realpathSync($);if(J=H===Y||H.startsWith(Y+v5),!J)g(Error(`Auto-memory directory escapes project root via symlink: ${$} -> ${H}`))}catch(Y){g(Y)}if(!J)return q;try{nx($,448)}catch{}return iB(q,$),$},()=>E4())});function y4(Z){if(Z===void 0)return!1;let X=Z.trim().toLowerCase();return X==="0"||X==="false"||X==="no"||X==="off"||X===""}function ZP(){let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC,X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&y4(Z)||X!==void 0&&y4(X)){if(process.env.DISABLE_TELEMETRY&&!y4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function pq(){return ZP()==="essential-traffic"}function dq(){if(!pq())return null;let Z=process.env.CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!y4(Z))return"CLAUDIN_DISABLE_NONESSENTIAL_TRAFFIC";let X=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(X!==void 0&&!y4(X))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function qL(){let Z=dq();return Z==="claudin-default"?null:Z}var cq=()=>{};import{dirname as XP,join as QL}from"path";function JL(Z){return[QL(Z,y5),QL(Z,$L)]}function qP(Z,X){let[q,Q]=JL(Z);return X(q)?q:Q}function QP(Z,X){return JL(Z).some((q)=>X(q))}function J00(Z,X){let q=Z;while(!0){if(QP(q,X))return qP(q,X);let Q=XP(q);if(Q===q)return null;q=Q}}function Y00(Z){return Z===y5||Z===$L}var y5="AGENTS.md",$L="CLAUDE.md";var YL=()=>{};var VL={};Wq(VL,{validateTeamMemKey:()=>BP,isTeamMemoryEnabled:()=>GL,isTeamMemPath:()=>WL,isTeamMemLikelyGitIgnored:()=>GP,isTeamMemFile:()=>LP,getTeamMemPath:()=>C5,getTeamMemEntrypoint:()=>HP,PathTraversalError:()=>I0});import{readFileSync as $P}from"fs";import{lstat as JP,realpath as KL}from"fs/promises";import{dirname as HL,join as C4,resolve as UL,sep as lq}from"path";function YP(Z){if(Z.includes("\x00"))throw new I0(`Null byte in path key: "${Z}"`);let X;try{X=decodeURIComponent(Z)}catch{X=Z}if(X!==Z&&(X.includes("..")||X.includes("/")))throw new I0(`URL-encoded traversal in path key: "${Z}"`);let q=Z.normalize("NFKC");if(q!==Z&&(q.includes("..")||q.includes("/")||q.includes("\\")||q.includes("\x00")))throw new I0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new I0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new I0(`Absolute path key: "${Z}"`);return Z}function GL(){if(!tB())return!1;return s1("tengu_herring_clock",!0)}function C5(){return(C4(v4(),"team")+lq).normalize("NFC")}function HP(){return C4(v4(),"team","MEMORY.md")}async function WP(Z){let X=[],q=Z;for(let Q=HL(q);q!==Q;Q=HL(q))try{let $=await KL(q);return X.length===0?$:C4($,...X.reverse())}catch($){let J=Y0($);if(J==="ENOENT")try{if((await JP(q)).isSymbolicLink())throw new I0(`Dangling symlink detected (target does not exist): "${q}"`)}catch(Y){if(Y instanceof I0)throw Y}else if(J==="ELOOP")throw new I0(`Symlink loop detected in path: "${q}"`);else if(J!=="ENOTDIR"&&J!=="ENAMETOOLONG")throw new I0(`Cannot verify path containment (${J}): "${q}"`);X.push(q.slice(Q.length+lq.length)),q=Q}return Z}async function VP(Z){let X;try{X=await KL(C5().replace(/[/\\]+$/,""))}catch(q){let Q=Y0(q);if(Q==="ENOENT"||Q==="ENOTDIR")return!0;return!1}if(Z===X)return!0;return Z.startsWith(X+lq)}function WL(Z){let X=UL(Z),q=C5();return X.startsWith(q)}async function BP(Z){YP(Z);let X=C5(),q=C4(X,Z),Q=UL(q);if(!Q.startsWith(X))throw new I0(`Key escapes team memory directory: "${Z}"`);let $=await WP(Q);if(!await VP($))throw new I0(`Key escapes team memory directory via symlink: "${Z}"`);return Q}function LP(Z){return GL()&&WL(Z)}var I0,KP,UP,GP;var BL=B(()=>{T1();S7();j1();uq();I0=class I0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}};KP=/^\/?\.claudin\/?$/,UP=/^!\/?\.claudin\/memory\/team\/?/,GP=c((Z)=>{try{let X=$P(C4(Z,".gitignore"),"utf-8"),q=!1;for(let Q of X.split(`
119
- `)){let $=Q.trim();if(!$||$.startsWith("#"))continue;if(KP.test($))q=!0;else if(UP.test($))q=!1}return q}catch{return!1}})});import{randomBytes as zP}from"crypto";import{join as W6}from"path";function LL(){return zL()!==null}function MP(){return LL()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function RP(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function zL(Z){if(e(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let X=Z?.ignoreClaudinDefaultPrivacy?qL():dq();if(X)return{type:"env",envVar:X};let q=a();if(q.autoUpdates===!1&&(q.installMethod!=="native"||q.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function FP(){let Z=a();if(Z.userID)return Z.userID;let X=zP(32).toString("hex");return B0((q)=>({...q,userID:X})),X}function DP(){if(!a().firstStartTime){let X=new Date().toISOString();B0((q)=>({...q,firstStartTime:q.firstStartTime??X}))}}function AP(Z){let X=v1();switch(Z){case"User":return W6(Z0(),"CLAUDE.md");case"Local":return W6(X,"CLAUDE.local.md");case"Project":return W6(X,y5);case"Managed":return W6(y1(),"CLAUDE.md");case"AutoMem":return XL()}return _P.getTeamMemEntrypoint()}function TP(){return W6(y1(),".claudin","rules")}function jP(){return W6(Z0(),"rules")}var _P;var _L=B(()=>{E1();uq();a0();cq();l2();L5();YL();_P=(BL(),S4(VL))});var IP,wP;var ML=B(()=>{IP=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],wP=["normal","vim"]});var nq=B(()=>{$$();_6();C7();l2();Zq();KW();_L();ML()});function S5(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function RL(Z){let X=S5(Z);return X.length>0?X[0]:Z.trim()}var iq=()=>{};import{randomBytes as OP}from"crypto";function V6(Z){return Z?.trim()??""}function W0(Z){let X=V6(Z);return X.length>0?X:void 0}function kP(Z){return V6(Z).replace(/\/+$/,"")}function NP(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function xP(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function PP(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[q,Q]of Object.entries(Z)){let $=V6(q),J=typeof Q==="string"?Q.trim():"";if($.length>0&&J.length>0)X[$]=J}return Object.keys(X).length>0?X:void 0}function EP(Z){if(!Z||typeof Z!=="object")return;let X={},q=W0(Z.codexAuthPath);if(q)X.codexAuthPath=q;let Q=W0(Z.codexAccountId);if(Q)X.codexAccountId=Q;let $=W0(Z.githubToken);if($)X.githubToken=$;let J=W0(Z.awsRegion);if(J)X.awsRegion=J;let Y=W0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=W0(Z.gcpRegion);if(H)X.gcpRegion=H;let U=W0(Z.azureResource);if(U)X.azureResource=U;let G=PP(Z.customHeaders);if(G)X.customHeaders=G;let W=xP(Z.reasoningEffort);if(W)X.reasoningEffort=W;return Object.keys(X).length>0?X:void 0}function jL(Z){let X=V6(Z.id),q=V6(Z.name),Q=NP(Z.provider),$=kP(Z.baseUrl),J=V6(Z.model);if(!X||!q||!$||Q!=="anthropic"&&!J)return null;let H={id:X,name:q,provider:Q,baseUrl:$,model:J,apiKey:W0(Z.apiKey)},U=EP(Z.extras);if(U)H.extras=U;return H}function vP(Z){let X=new Set,q=[];for(let Q of Z??[]){let $=jL(Q);if(!$||X.has($.id))continue;X.add($.id),q.push($)}return q}function yP(){return`provider_${OP(6).toString("hex")}`}function IL(Z,X=yP()){return jL({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function wL(Z,X=a()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function g00(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:FL,model:DL,apiKey:"",requiresApiKey:!1};case"nvidia-nim":return{provider:"openai",name:"NVIDIA NIM",baseUrl:"https://integrate.api.nvidia.com/v1",model:"nvidia/llama-3.1-nemotron-70b-instruct",apiKey:"",requiresApiKey:!0};case"minimax":return{provider:"openai",name:"MiniMax",baseUrl:"https://api.minimax.io/v1",model:"MiniMax-M2.5",apiKey:"",requiresApiKey:!0};case"atomic-chat":return{provider:"openai",name:"Atomic Chat",baseUrl:"http://127.0.0.1:1337/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"bankr":return{provider:"openai",name:"Bankr",baseUrl:"https://llm.bankr.bot/v1",model:"claude-opus-4.6",apiKey:"",requiresApiKey:!0};case"bedrock":return{provider:"bedrock",name:"AWS Bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"vertex":return{provider:"vertex",name:"Google Vertex AI",baseUrl:"https://us-central1-aiplatform.googleapis.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"foundry":return{provider:"foundry",name:"Azure AI Foundry",baseUrl:"https://YOUR-RESOURCE-NAME.services.ai.azure.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"opencode-zen":return{provider:"openai",name:"OpenCode Zen",baseUrl:"https://opencode.ai/zen/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"opencode-go":return{provider:"openai",name:"OpenCode GO",baseUrl:"https://opencode.ai/zen/go/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"zai":return{provider:"openai",name:"Z.AI (GLM Coding Plan)",baseUrl:"https://api.z.ai/api/coding/paas/v4",model:"glm-5.2",apiKey:"",requiresApiKey:!0};case"cloudflare-workers-ai":return{provider:"openai",name:"Cloudflare Workers AI",baseUrl:"https://api.cloudflare.com/client/v4/accounts/YOUR-ACCOUNT-ID/ai/v1",model:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"cloudflare-ai-gateway":return{provider:"openai",name:"Cloudflare AI Gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/YOUR-ACCOUNT-ID/default/compat",model:"workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:FL,model:DL,apiKey:"",requiresApiKey:!1}}}function g0(Z=a()){return vP(Z.providerProfiles)}function m00(Z=a()){return g0(Z).length>0}function L1(Z=a()){let X=g0(Z);if(X.length===0)return;let q=W0(F4().activeProviderProfileId);if(q){let $=X.find((J)=>J.id===q);if($)return $}let Q=W0(Z.activeProviderProfileId);return X.find(($)=>$.id===Q)??X[0]}function u00(){let Z=W0(F4().activeProviderProfileId);if(!Z)return;return g0().some((q)=>q.id===Z)?Z:void 0}function CP(){return W0(F4().activeProviderProfileId)}function p00(){return CP()!==void 0}function SP(){return W0(a().activeProviderProfileId)}function d00(Z,X){let q=IL(Z);if(!q)return null;let Q=X?.makeActive??!0;if(B0(($)=>{let Y=[...g0($),q],H=W0($.activeProviderProfileId),U=Q||!H||!Y.some((G)=>G.id===H)?q.id:H;return{...$,providerProfiles:Y,activeProviderProfileId:U}}),SP()===q.id)hP(q.id),gP();return q}function c00(Z,X){let q=IL(X,Z);if(!q)return null;let Q=!1;if(B0(($)=>{let J=g0($),Y=J.findIndex((L)=>L.id===Z);if(Y<0)return $;Q=!0;let H=[...J];H[Y]=q;let U={...$.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let G=W0($.activeProviderProfileId),W=G&&H.some((L)=>L.id===G)?G:H[0]?.id;return{...$,providerProfiles:H,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:W===Z?[]:$.openaiAdditionalModelOptionsCache}}),!Q)return null;return q}function l00(Z){let X=W0(Z);if(!X)return null;let q=L1();if(!q)return null;if(S5(q.model).includes(X))return q;B0((J)=>{let Y=g0(J),H=Y.findIndex((V)=>V.id===q.id);if(H<0)return J;let U=Y[H];if(U.model===X)return J;let G=[...Y];G[H]={...U,model:X};let W={...J.openaiAdditionalModelOptionsCacheByProfile??{}};return delete W[q.id],{...J,providerProfiles:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:[]}});let $=L1();if(!$||$.id!==q.id)return null;return $}function n00(){let Z=L1();if(!Z)return;B0((X)=>{let q=g0(X),Q=q.findIndex((H)=>H.id===Z.id);if(Q<0)return X;let $=q[Q];if(!$.model)return X;let J=[...q];J[Q]={...$,model:""};let Y={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete Y[Z.id],{...X,providerProfiles:J,openaiAdditionalModelOptionsCacheByProfile:Y,openaiAdditionalModelOptionsCache:[]}})}function bP(Z){let X=S5(Z.model);if(X.length===0)return[];return X.map((q)=>({value:q,label:q,description:`Provider: ${Z.name}`}))}function aq(Z,X){let q=bP(Z);return{openaiAdditionalModelOptionsCache:q.length>0?q:wL(Z.id,X),openaiAdditionalModelOptionsCacheByProfile:{...X.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:q.length>0?q:X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function hP(Z){let X=a(),Q=g0(X).find(($)=>$.id===Z);if(!Q)return null;return B0(($)=>({...$,activeProviderProfileId:Z,...aq(Q,$)})),Q}function i00(Z){if(Z===null){Y5((J)=>({...J,activeProviderProfileId:void 0,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}));let $=L1();if($)AL($);return null}let q=g0().find(($)=>$.id===Z);if(!q)return null;let Q=!1;if(Y5(($)=>{if(!g0().some((H)=>H.id===Z))return Q=!0,$;let Y={...$,activeProviderProfileId:Z};if($.activeProviderProfileId!==Z)Y.activeModelForProject=void 0,Y.activeModelForProjectProfileId=void 0;return Y}),Q)return null;return AL(q),q}function AL(Z){let X=a(),q=aq(Z,X),Q=X.openaiAdditionalModelOptionsCache??[],$=X.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],J=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(TL(Q,q.openaiAdditionalModelOptionsCache??[])&&TL($,J))return;B0((Y)=>({...Y,...aq(Z,Y)}))}function TL(Z,X){if(Z.length!==X.length)return!1;for(let q=0;q<Z.length;q++)if(Z[q]!==X[q])return!1;return!0}function fP(Z,X){if(!Z)return{projects:Z,stripped:[]};let q=(J)=>{let Y=J?.activeProviderProfileId;return Y!=null&&X(Y)?Y:void 0};if(!Object.values(Z).some((J)=>q(J)!==void 0))return{projects:Z,stripped:[]};let Q=[];return{projects:Object.fromEntries(Object.entries(Z).map(([J,Y])=>{let H=q(Y);if(H!==void 0){let{activeProviderProfileId:U,activeModelForProject:G,activeModelForProjectProfileId:W,...V}=Y;return Q.push({path:J,activeProviderProfileId:H,activeModelForProject:G??void 0}),[J,V]}return[J,Y]})),stripped:Q}}function a00(Z){let X=!1,q;return B0((Q)=>{let $=g0(Q);if(!$.find((L)=>L.id===Z))return Q;X=!0;let Y=$.filter((L)=>L.id!==Z),H=W0(Q.activeProviderProfileId),G=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(G)q=Y.find((L)=>L.id===G)??Y[0];let W={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete W[Z];let{projects:V}=fP(Q.projects,(L)=>L===Z);return{...Q,providerProfiles:Y,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:W,openaiAdditionalModelOptionsCache:G?wL(G,{...Q,openaiAdditionalModelOptionsCacheByProfile:W}):[],projects:V}}),{removed:X,activeProfileId:q?.id}}function o00(Z=a()){let X=L1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let q=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(q)return q;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function s00(Z){let X=L1();if(!X){B0((q)=>({...q,openaiAdditionalModelOptionsCache:Z}));return}B0((q)=>({...q,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function gP(){let Z=L1();if(!Z){B0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}B0((X)=>{let q={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete q[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:q}})}var FL="http://localhost:11434/v1",DL="llama3.1:8b";var OL=B(()=>{nq();iq()});function b5(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let q=Z.read();if(q!==null&&q!==void 0)return q;return X.read()||{}},async readAsync(){let q=await Z.readAsync();if(q!==null&&q!==void 0)return q;return await X.readAsync()||{}},update(q){let Q=Z.read(),$=Z.update(q);if($.success){if(Q===null)X.delete();return $}let J=X.update(q);if(J.success){if(Q!==null)Z.delete();return{success:!0,warning:J.warning}}return{success:!1}},delete(){let q=Z.delete(),Q=X.delete();return q||Q}}}var kL=()=>{};function h5(Z,X,q=10*xL*NL){let G=[];try{let Q;if(X===void 0)Q={};else if(X instanceof AbortSignal)Q={abortSignal:X,timeout:q};else Q=X;let{abortSignal:$,timeout:J=10*xL*NL,input:Y,stdio:H=["ignore","pipe","pipe"]}=Q;$?.throwIfAborted();const U=z2(G,N7`exec: ${Z.slice(0,200)}`,0);try{let z=P0(Z,{env:process.env,maxBuffer:1e6,timeout:J,cwd:r(),stdio:H,shell:!0,reject:!1,input:Y});if(!z.stdout)return null;return z.stdout.trim()||null}catch{return null}}catch(W){var V=W,L=1}finally{_2(G,V,L)}}var NL=1000,xL=60;var oq=B(()=>{m2();U1();L0()});import{createHash as mP}from"crypto";import{userInfo as uP}from"os";function K2(Z=""){let X=Z0(),Q=!process.env.CLAUDIN_CONFIG_DIR?"":`-${mP("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${PL().OAUTH_FILE_SUFFIX}${Z}${Q}`}function b4(Z=""){return K2(Z)}function w0(){try{return process.env.USER||uP().username}catch{return"claude-code-user"}}function rq(){Q0.cache={data:null,cachedAt:0},Q0.generation++,Q0.readInFlight=null}function K10(Z){if(Q0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}Q0.cache={data:X,cachedAt:Date.now()}}var m0="-credentials",sq=30000,Q0;var f5=B(()=>{cU();a0();Q0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function dP(){try{let Z=b4(m0),X=w0(),{stdout:q,code:Q}=await T0("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(Q===0&&q)return q0(q.trim())}catch(Z){}return null}function _10(){if(B6!==void 0)return B6;if(process.platform!=="darwin")return B6=!1,!1;try{B6=P0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{B6=!1}return B6}var pP=4032,tq,B6;var EL=B(()=>{m2();h0();J5();oq();L0();f5();tq={name:"keychain",read(){let Z=Q0.cache;if(Date.now()-Z.cachedAt<sq)return Z.data;try{let X=b4(m0),q=w0(),Q=h5(`security find-generic-password -a "${q}" -w -s "${X}"`);if(Q){let $=q0(Q);return Q0.cache={data:$,cachedAt:Date.now()},$}}catch(X){}if(Z.data!==null)return P("[keychain] read failed; serving stale cache",{level:"warn"}),Q0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return Q0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=Q0.cache;if(Date.now()-Z.cachedAt<sq)return Z.data;if(Q0.readInFlight)return Q0.readInFlight;let X=Q0.generation,q=dP().then((Q)=>{if(X===Q0.generation){if(Q===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let $=Q??Z.data;return Q0.cache={data:$,cachedAt:Date.now()},Q0.readInFlight=null,$}return Q});return Q0.readInFlight=q,q},update(Z){rq();try{let X=b4(m0),q=w0(),Q=m(Z),$=Buffer.from(Q,"utf-8").toString("hex"),J=`add-generic-password -U -a "${q}" -s "${X}" -X "${$}"
120
- `,Y;if(J.length<=pP)Y=P0("security",["-i"],{input:J,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${Q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=P0("security",["add-generic-password","-U","-a",q,"-s",X,"-X",$],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return Q0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){rq();try{let Z=b4(m0),X=w0();return h5(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var eq;var vL=B(()=>{m2();L0();f5();eq={name:"libsecret",read(){try{let Z=w0(),X=K2(m0),q=P0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(q.exitCode===0&&q.stdout)return q0(q.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=w0(),q=K2(m0),Q=m(Z);return{success:P0("secret-tool",["store","--label",q,"service",q,"account",X],{input:Q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=w0(),X=K2(m0);return P0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as cP}from"path";function h4(Z){return Z.replace(/'/g,"''")}function g5(){return K2(m0)}function yL(){return`${g5()}:${w0()}`}function ZQ(){let Z=g5().replace(/[^a-zA-Z0-9._-]/g,"_");return cP(Z0(),`${Z}.secure.dpapi`)}function f4(Z,X){try{return P0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function XQ(Z){return typeof Z==="string"?Z:""}function lP(Z,X){let q=XQ(Z?.stderr).trim();if(q)return q;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function CL(){let Z=g5().replace(/"/g,'`"'),X=w0().replace(/"/g,'`"'),q=`
121
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
122
- try {
123
- $vault = New-Object Windows.Security.Credentials.PasswordVault
124
- $cred = $vault.Retrieve("${Z}", "${X}")
125
- $cred.FillPassword()
126
- [Console]::Out.Write($cred.Password)
127
- } catch {
128
- exit 1
129
- }
130
- `,Q=f4(q);if(Q?.exitCode===0&&Q.stdout)try{return q0(XQ(Q.stdout))}catch{return null}return null}var qQ;var SL=B(()=>{m2();a0();L0();f5();qQ={name:"credential-locker-dpapi",read(){let Z=h4(ZQ()),X=h4(yL()),q=`
131
- try {
132
- Add-Type -AssemblyName System.Security
133
- $path = '${Z}'
134
- if (!(Test-Path -LiteralPath $path)) {
135
- exit 1
136
- }
137
-
138
- $protectedBase64 = [System.IO.File]::ReadAllText(
139
- $path,
140
- [System.Text.Encoding]::UTF8
141
- ).Trim()
142
- if (-not $protectedBase64) {
143
- exit 1
144
- }
145
-
146
- $protectedBytes = [Convert]::FromBase64String($protectedBase64)
147
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
148
- $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
149
- $protectedBytes,
150
- $entropyBytes,
151
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
152
- )
153
- [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
154
- } catch {
155
- exit 1
156
- }
157
- `,Q=f4(q);if(Q?.exitCode===0&&Q.stdout)try{return q0(XQ(Q.stdout))}catch{return CL()}return CL()},async readAsync(){return this.read()},update(Z){let X=h4(ZQ()),q=h4(yL()),Q=m(Z),$=`
158
- try {
159
- Add-Type -AssemblyName System.Security
160
- $path = '${X}'
161
- $directory = [System.IO.Path]::GetDirectoryName($path)
162
- if ($directory) {
163
- [System.IO.Directory]::CreateDirectory($directory) | Out-Null
164
- }
165
-
166
- $payload = [Console]::In.ReadToEnd()
167
- $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
168
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
169
- $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
170
- $bytes,
171
- $entropyBytes,
172
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
173
- )
174
- $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
175
- [System.IO.File]::WriteAllText(
176
- $path,
177
- $protectedBase64,
178
- [System.Text.Encoding]::UTF8
179
- )
180
- } catch {
181
- Write-Error $_.Exception.Message
182
- exit 1
183
- }
184
- `,J=f4($,{input:Q});if(J?.exitCode===0)return{success:!0};return{success:!1,warning:lP(J,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
185
- try {
186
- $path = '${h4(ZQ())}'
187
- if (Test-Path -LiteralPath $path) {
188
- Remove-Item -LiteralPath $path -Force
189
- }
190
- } catch {
191
- exit 1
192
- }
193
- `,q=f4(X),Q=g5().replace(/"/g,'`"'),$=w0().replace(/"/g,'`"'),J=`
194
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
195
- try {
196
- $vault = New-Object Windows.Security.Credentials.PasswordVault
197
- $cred = $vault.Retrieve("${Q}", "${$}")
198
- $vault.Remove($cred)
199
- } catch {
200
- exit 0
201
- }
202
- `,Y=f4(J);return(q?.exitCode??1)===0}}});import{chmodSync as nP}from"fs";import{join as iP}from"path";function m5(){let Z=Z0(),X=".credentials.json";return{storageDir:Z,storagePath:iP(Z,".credentials.json")}}var g4;var hL=B(()=>{a0();j1();z0();L0();g4={name:"plaintext",read(){let{storagePath:Z}=m5();try{let X=N().readFileSync(Z,{encoding:"utf8"});return q0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=m5();try{let X=await N().readFile(Z,{encoding:"utf8"});return q0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:q}=m5();try{N().mkdirSync(X)}catch(Q){if(Y0(Q)!=="EEXIST")throw Q}return bL(q,m(Z),{encoding:"utf8",flush:!1}),nP(q,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=m5();try{return N().unlinkSync(Z),!0}catch(X){if(Y0(X)==="ENOENT")return!0;return!1}}}});function fL(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?b5(tq,g4):tq;if(process.platform==="linux")return X?b5(eq,g4):eq;if(process.platform==="win32")return X?b5(qQ,g4):qQ;return X?g4:aP}var aP;var gL=B(()=>{kL();EL();vL();SL();hL();aP={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function b(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function QQ(Z=process.env){return b(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function c10(Z=process.env){let X=b(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let q=Number.parseInt(X,10);if(Number.isInteger(q)&&q>=0&&q<=65535)return q;return 1455}function $Q(Z){let X=Z.split(".");if(X.length<2)return;try{let q=X[1].replace(/-/g,"+").replace(/_/g,"/"),Q=q+"=".repeat((4-q.length%4)%4),$=Buffer.from(Q,"base64").toString("utf8"),J=JSON.parse($);return J&&typeof J==="object"?J:void 0}catch{return}}function u0(Z){if(!Z)return;let X=$Q(Z),q=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0,Q=q?.organizations,$=Array.isArray(Q)&&Q.length>0&&typeof Q[0]==="object"?Q[0].id:void 0;return b(q?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id??$)??void 0}function l10(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return X}})}async function uL(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:QQ(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),q=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!q.ok){let J=await q.text().catch(()=>"");throw Error(J.trim()?`Codex API key exchange failed (${q.status}): ${J.trim()}`:`Codex API key exchange failed with status ${q.status}.`)}let Q=await q.json(),$=b(Q.access_token);if(!$)throw Error("Codex API key exchange completed, but no API key token was returned.");return $}var u10="https://auth.openai.com",mL="https://auth.openai.com/oauth/token",p10="openid profile email offline_access api.connectors.read api.connectors.invoke",d10="codex_cli_rs";var JQ=()=>{};function d5(){return fL({allowPlainTextFallback:!0})}function pL(Z){if(!Z)return;let q=$Q(Z)?.exp;if(typeof q==="number"&&Number.isFinite(q))return q*1000;return}function u4(Z){if(!Z||typeof Z!=="object")return;let X=Z,q=b(X.apiKey),Q=b(X.accessToken);if(!Q)return;let $=b(X.refreshToken),J=b(X.idToken),Y=b(X.accountId)??u0(J)??u0(Q),H=b(X.profileId),U=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,G=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:q,accessToken:Q,refreshToken:$,idToken:J,accountId:Y,profileId:H,lastRefreshAt:U,lastRefreshFailureAt:G}}function rP(Z){let X=pL(Z.accessToken)??pL(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+oP}function dL(Z,X=Date.now()){let q=Math.max(Z.lastRefreshFailureAt??0,p5??0);if(!q)return!1;return X-q<sP}function tP(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let q=JSON.parse(X),Q=q.error&&typeof q.error==="object"?q.error:void 0,$=b(Q?.code??q.code),J=b(Q?.message??q.error_description)??X.trim();return $?`Codex token refresh failed (${$}): ${J}`:`Codex token refresh failed with status ${Z}: ${J}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function cL(){if(L6())return;try{let Z=d5().read();return u4(Z?.codex)}catch{return}}async function eP(){if(L6())return;try{let Z=await d5().readAsync();return u4(Z?.codex)}catch{return}}function lL(Z,X=Date.now()){return dL(Z,X)}function nL(Z){if(L6())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=u4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let q=d5(),Q=q.read()||{},$=u4(Q[u5]),J={...Q,[u5]:{...X,profileId:X.profileId??$?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=q.update(J);if(Y.success)p5=u4(J[u5])?.lastRefreshFailureAt??null;return Y}function ZE(Z,X){if(!nL({...Z,lastRefreshFailureAt:X}).success)p5=X}function t10(){if(L6())return{success:!0};let Z=d5(),q={...Z.read()||{}};delete q[u5];let Q=Z.update(q);if(Q.success)p5=null;return Q}async function e10(Z){if(L6())return{refreshed:!1};if(p4()?.apiKey?.trim())return{refreshed:!1};let X=await eP();if(!X)return{refreshed:!1};let q=X.refreshToken;if(!q)return{refreshed:!1,credentials:X};if(!Z?.force&&!rP(X))return{refreshed:!1,credentials:X};if(dL(X))return{refreshed:!1,credentials:X};if(m4)return m4;return m4=(async()=>{let Q=Date.now();try{let $=new URLSearchParams({client_id:QQ(),grant_type:"refresh_token",refresh_token:q}),J=await fetch(mL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:$,signal:AbortSignal.timeout(15000)});if(!J.ok){let V=await J.text().catch(()=>"");throw Error(tP(J.status,V))}let Y=await J.json(),H=b(Y.access_token);if(!H)throw Error("Codex token refresh succeeded without a new access token.");let U={accessToken:H,refreshToken:b(Y.refresh_token)??X.refreshToken,idToken:b(Y.id_token)??X.idToken,accountId:u0(Y.id_token)??u0(Y.access_token)??X.accountId,lastRefreshAt:Date.now()},G=U.idToken??X.idToken;if(G)U.apiKey=await uL(G).catch((V)=>{P(`[codex] id-token → API-key exchange failed; falling back to access_token bearer: ${V instanceof Error?V.message:String(V)}`,{level:"warn"});return});let W=nL(U);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:U}}catch($){throw ZE(X,Q),$}finally{m4=null}})(),m4}var u5="codex",oP=60000,sP=60000,m4=null,p5=null;var iL=B(()=>{U2();h0();a0();gL();JQ()});import{existsSync as XE,readFileSync as qE}from"node:fs";import{isIP as QE}from"node:net";import{homedir as $E}from"node:os";import{join as aL}from"node:path";function K20(Z){if(!Z)return!1;try{let{hostname:X}=new URL(Z);return X==="api.x.ai"}catch{return!1}}function U20(Z){if(!Z)return!1;try{let{hostname:X,pathname:q}=new URL(Z);return X==="api.kimi.com"&&q.startsWith("/coding")}catch{return!1}}function KE(Z){let X=Z.split(".").map((q)=>Number.parseInt(q,10));if(X.length!==4||X.some((q)=>Number.isNaN(q)))return!1;return X[0]===10||X[0]===172&&X[1]>=16&&X[1]<=31||X[0]===192&&X[1]===168}function UE(Z){let X=Z.split(":",1)[0];if(!X)return!1;let q=Number.parseInt(X,16);if(Number.isNaN(q))return!1;return(q&65024)===64512||(q&65472)===65152}function KQ(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function YQ(Z,X){for(let q of X){let Q=Z,$=!0;for(let Y of q){if(!Q||typeof Q!=="object"||!(Y in Q)){$=!1;break}Q=Q[Y]}if(!$)continue;let J=b(Q);if(J)return J}return}function GE(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh"||X==="max")return X;return}function oL(Z){let X=Z.trim(),q=X.indexOf("?");if(q===-1){let G=X.toLowerCase(),W=l5[G];if(W)return{raw:X,baseModel:W.model,reasoning:W.reasoningEffort?{effort:W.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let Q=X.slice(0,q).trim(),$=new URLSearchParams(X.slice(q+1)),J=Q.toLowerCase(),Y=l5[J],H=Y?.model??Q,U=GE($.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof U==="string"?{effort:U}:U}}function Zz(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in l5}function UQ(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return YE.has(q)}function Xz(Z){return UQ(Z)}function WE(Z,X){let q=KQ(X);return RE(q)||!q&&Zz(Z)}function zE(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let q=VE.exec(X);if(!q)return!1;if(Number(q[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function qz(Z){if(!Z)return!1;try{let X=new URL(Z).hostname.toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);let q=X.indexOf("%25");if(q!==-1)X=X.slice(0,q);if(HE.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let Q=QE(X);if(Q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||KE(X);if(Q===6)return UE(X);return!1}catch{return!1}}function c5(Z){return Z.replace(GQ,"")}function _E(Z){let X=c5(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function ME(Z){try{let X=new URL(Z),q=X.hostname.toLowerCase(),Q=X.pathname.toLowerCase();if(X.port==="11434")return!0;return q.includes("ollama")||Q.includes("ollama")}catch{return!1}}function G20(Z){if(!qz(Z))return[];try{let X=new URL(Z),q=c5(X.toString()),Q=new Set([q]),$=[],J=(U,G)=>{let W=new URL(X.toString());W.hostname=U,W.pathname=G,W.search="",W.hash="";let V=c5(W.toString());if(Q.has(V))return;Q.add(V),$.push(V)},Y=_E(X.pathname);if(Y!==c5(X.pathname))J(X.hostname,Y);let H=X.hostname.toLowerCase().replace(LE,"");if(H==="localhost"||H==="::1")J("127.0.0.1",X.pathname||"/"),J("127.0.0.1",Y);return $}catch{return[]}}function W20(Z){if(!Z.hasTools)return!1;if(!qz(Z.baseUrl))return!1;return ME(Z.baseUrl)}function RE(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(GQ,"")==="/backend-api/codex"}catch{return!1}}function FE(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return eL;let Q=q.indexOf("/");if(Q!==-1)return q.slice(Q+1);return q}function sL(Z){let X=Z.split("?",1)[0]??Z,q=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!q||q.toLowerCase()==="copilot")return eL;return q}function tL(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com"||X.endsWith(".githubcopilot.com")||X.startsWith("copilot-api."))return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function WQ(Z){let X=Qz(),Q=X?.transport==="github_copilot",$=X?.model?.trim(),J=KQ(X?.baseUrl),Y=Z?.model?.trim()||$||Z?.fallbackModel?.trim()||(Q?"github:copilot":"gpt-4o"),H=oL(Y),U=KQ(Z?.baseUrl),G=U??J,V=Q&&Zz(Y)&&G&&tL(G)==="custom"?void 0:G,L=U??V,z=$??"",M=UQ(z)?oL(z).baseModel:null,R=Boolean(Z?.model)&&Boolean(M)&&H.baseModel===M,F=UQ(Y)||R,D=!Q&&F&&!(L&&L!==HQ)?JE:L,w=Q?tL(L):"custom",T=Q&&w==="copilot",j=Q&&w==="models",A=Q&&w==="custom",S=Q?sL(Y):Y,O=WE(Y,D)||T&&zE(S)?"codex_responses":"chat_completions",x=T?FE(H.baseModel):j||A?sL(H.baseModel):H.baseModel,E=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:O,requestedModel:Y,resolvedModel:x,baseUrl:(D??(T&&O==="codex_responses"?rL:Q?rL:HQ)).replace(GQ,""),reasoning:E}}function V20(Z){if(WQ({model:Z}).transport==="codex_responses")return!0;return Qz()?.transport==="github_copilot"}function Qz(){try{let{tryGetActiveProvider:Z}=(U2(),S4(d4));return Z()}catch{return null}}function B20(){let Z=null;try{let{tryGetActiveProvider:Q}=(U2(),S4(d4));Z=Q()}catch{Z=null}let X=Z?.transport;if(X!=="openai_compat"&&X!=="codex_responses"){if(!X||X==="anthropic")return"firstParty";return null}let q=WQ();if(q.transport!=="chat_completions")return null;return`openai:${q.baseUrl.toLowerCase()}`}function L20(){let Z=WQ();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();try{return new URL(X).hostname==="api.openai.com"}catch{return X===HQ}}function $z(Z=process.env){let X=VQ();if(X)return X;let q=b(Z.CODEX_AUTH_JSON_PATH);if(q)return q;let Q=b(Z.CODEX_HOME);if(Q)return aL(Q,"auth.json");return aL($E(),".codex","auth.json")}function VQ(){try{let{tryGetActiveProvider:Z}=(U2(),S4(d4));return b(Z()?.extras?.codexAuthPath)}catch{return}}function BQ(){try{let{tryGetActiveProvider:Z}=(U2(),S4(d4));return b(Z()?.extras?.codexAccountId)}catch{return}}function Jz(Z){if(!XE(Z))return;try{let X=qE(Z,"utf8"),q=JSON.parse(X);return q&&typeof q==="object"?q:void 0}catch{return}}function Yz(Z){let{authJson:X,authPath:q,envAccountId:Q}=Z;if(!X)return{apiKey:"",authPath:q,source:Z.missingSource??"none"};let $=YQ(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),J=YQ(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=Q??YQ(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??u0($)??u0(J);if(!$)return{apiKey:"",accountId:Y,authPath:q,source:Z.missingSource??"none"};return{apiKey:$,accountId:Y,authPath:q,source:"auth.json"}}function Hz(Z){let{storedCredentials:X,envAccountId:q}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:q??X.accountId??u0(X.idToken)??u0(X.accessToken),source:"secure-storage"}}function n5(Z,X){let q=b(Z.CODEX_API_KEY),$=BQ()??b(Z.CODEX_ACCOUNT_ID)??b(Z.CHATGPT_ACCOUNT_ID);if(q)return{apiKey:q,accountId:$??u0(q),source:"env"};let J=VQ();if(!Boolean(J??b(Z.CODEX_AUTH_JSON_PATH)??b(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:$,source:"none"};let H=$z(Z),U=Jz(H);return Yz({authJson:U,authPath:H,envAccountId:$})}function z20(Z){let X=Z?.env??process.env,q=n5(X,{explicitAuthPathOnly:!0}),Q=Boolean(VQ()??b(X.CODEX_AUTH_JSON_PATH)??b(X.CODEX_HOME)),$=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(Q||q.source==="env"||q.source==="auth.json")return q;if(Z?.storedCredentials?.accessToken)return Hz({storedCredentials:Z.storedCredentials,envAccountId:BQ()??b(X.CODEX_ACCOUNT_ID)??b(X.CHATGPT_ACCOUNT_ID)});if($)return n5(X);return DE(X)}function DE(Z=process.env){let X=BQ()??b(Z.CODEX_ACCOUNT_ID)??b(Z.CHATGPT_ACCOUNT_ID),q=n5(Z,{explicitAuthPathOnly:!0});if(q.source==="env"||q.source==="auth.json"||q.authPath)return q;let Q=cL();if(Q?.accessToken){let $=Hz({storedCredentials:Q,envAccountId:X});if(!(!$.accountId||lL(Q)))return $;let Y=$z(Z),H=Jz(Y),U=Yz({authJson:H,authPath:Y,envAccountId:X});if(U.apiKey)return{...U,accountId:U.accountId??$.accountId};return $}return n5(Z)}function AE(Z){let X=Z.trim().toLowerCase(),Q=X.split("?",1)[0]??X;return l5[Q]?.reasoningEffort}function _20(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;if(q==="gpt-5.3-codex-spark"||q==="codexspark")return!1;if(AE(q)!==void 0)return!0;return BE.test(q)}var HQ="https://api.openai.com/v1",JE="https://chatgpt.com/backend-api/codex",H20="https://api.x.ai/v1",eL="gpt-4o",l5,YE,HE,VE,BE,GQ,LE,rL="https://api.githubcopilot.com";var Kz=B(()=>{iL();JQ();l5={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.6":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-sol":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-terra":{model:"gpt-5.6-terra",reasoningEffort:"high"},"gpt-5.6-luna":{model:"gpt-5.6-luna",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},YE=new Set(["codexplan","codexspark"]),HE=new Set(["localhost","127.0.0.1","::1"]);VE=/^gpt-(\d+)/,BE=/^gpt-5(?:[.-]|$)/,GQ=/\/+$/,LE=/^\[|\]$/g});var d4={};Wq(d4,{tryGetActiveProvider:()=>p4,invalidateActiveProviderCache:()=>wE,getActiveProvider:()=>Gz,_peekActiveProviderCacheForTesting:()=>OE,ActiveProviderNotConfiguredError:()=>i5});function TE(){if(Uz)return;Uz=!0,AX(()=>{G2=null})}function jE(Z,X){switch(Z.provider){case"anthropic":return"anthropic";case"gemini":return"gemini";case"mistral":return"mistral";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai":default:{if(Z.extras?.githubToken)return"github_copilot";if(Xz(X))return"codex_responses";return"openai_compat"}}}function IE(Z){let X=RL(Z.model);return{transport:jE(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function Gz(){if(TE(),G2)return G2;let Z=L1(a());if(!Z)throw new i5;return G2=IE(Z),G2}function p4(){try{return Gz()}catch(Z){if(Z instanceof i5)return null;throw Z}}function wE(){G2=null}function OE(){return G2}var i5,G2=null,Uz=!1;var U2=B(()=>{nq();OL();iq();Kz();i5=class i5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function Vz(Z){return Z.replace(Wz,"").trim()||Z}function Bz(Z){return Z.replace(Wz,"").trim()}function T20(Z){return Z.replace(kE,"").trim()}var Wz,kE;var Lz=B(()=>{Wz=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;kE=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function E20(Z,X){let q=Z.firstPrompt?.startsWith(`<${Rz}>`),Q=Z.firstPrompt?Bz(Z.firstPrompt):"",$=Q&&!q,J=Z.agentName||Z.customTitle||Z.summary||($?Q:void 0)||X||(q?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return Vz(J).trim()}function v20(Z){return Z.toISOString().replace(/[:.]/g,"-")}function PE(Z){if(a5.length>=xE)a5.shift();a5.push(Z)}function y20(Z){if(p0!==null)return;if(p0=Z,z6.length>0){let X=[...z6];z6.length=0;for(let q of X)switch(q.type){case"error":p0.logError(q.error);break;case"mcpError":p0.logMCPError(q.serverName,q.error);break;case"mcpDebug":p0.logMCPDebug(q.serverName,q.message);break}}}function g(Z){let X=Mz(Z);try{let q=p4()?.transport;if(q==="bedrock"||q==="vertex"||q==="foundry"||process.env.DISABLE_ERROR_REPORTING||pq())return;let $={error:X.stack||X.message,timestamp:new Date().toISOString()};if(PE($),p0===null){z6.push({type:"error",error:X});return}p0.logError(X)}catch{}}function S20(){return[...a5]}function b20(Z,X){try{if(p0===null){z6.push({type:"mcpError",serverName:Z,error:X});return}p0.logMCPError(Z,X)}catch{}}function h20(Z,X){try{if(p0===null){z6.push({type:"mcpDebug",serverName:Z,message:X});return}p0.logMCPDebug(Z,X)}catch{}}function f20(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:q,...Q}=Z;zz(Q),_z(null)}var xE=100,a5,z6,p0=null,C20;var y0=B(()=>{T1();E1();U2();NE();Lz();j1();cq();a5=[];z6=[];C20=c(()=>{return process.argv.includes("--hard-fail")})});import Fz from"node:path";function yE(Z){return Z.includes(Fz.sep)||Z.includes("/")||Fz.isAbsolute(Z)}function CE(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(c4.test(X))return"Unsafe executable: control characters are not allowed";if(!yE(X)&&!vE.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function SE(Z){for(let X of Z)if(c4.test(X))return"Unsafe argument: control characters are not allowed";return null}function bE(Z){if(!Z)return null;if(c4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function hE(Z){if(!Z)return{};for(let[X,q]of Object.entries(Z)){if(c4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof q==="string"&&c4.test(q))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function fE(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function T0(Z,X,q={timeout:10*zQ*LQ,preserveOutputOnError:!0,useCwd:!0}){return Q2(Z,X,{abortSignal:q.abortSignal,timeout:q.timeout,preserveOutputOnError:q.preserveOutputOnError,cwd:q.useCwd?r():void 0,env:q.env,stdin:q.stdin,input:q.input})}function Q2(Z,X,{abortSignal:q,timeout:Q=10*zQ*LQ,preserveOutputOnError:$=!0,cwd:J,env:Y,maxBuffer:H=Dz,stdin:U,input:G}={timeout:10*zQ*LQ,preserveOutputOnError:!0,maxBuffer:Dz}){let W=CE(Z);if(W)return Promise.resolve({stdout:"",stderr:"",code:1,error:W});let V=SE(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=bE(J);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let z=hE(Y);if(z.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:z.error});return new Promise((_)=>{let M=G!==void 0?"pipe":U??"pipe",R=Az.spawn(Z,X,{cwd:J,env:z.value,shell:!1,signal:q,stdio:[M,"pipe","pipe"]}),F=!1,k="",D="",w=0,T,j=!1,A=(x)=>{if(F)return;F=!0,_(x)},S=(x,E)=>{let h=typeof x==="string"?x:x.toString("utf8");if(w+=Buffer.byteLength(h,"utf8"),w>H){R.kill(),A({stdout:$?k:"",stderr:$?D:"",code:1,error:"maxBuffer exceeded"});return}if(E==="stdout")k+=h;else D+=h};R.stdout?.on("data",(x)=>S(x,"stdout")),R.stderr?.on("data",(x)=>S(x,"stderr")),R.once("spawn",()=>{if(M==="pipe"&&R.stdin)if(G!==void 0)R.stdin.end(G);else R.stdin.end()}),R.once("error",(x)=>{g(x),A({stdout:"",stderr:"",code:1,error:x.message})});let O=Q>0?setTimeout(()=>{j=!0,R.kill()},Q):void 0;R.once("close",(x,E)=>{if(O)clearTimeout(O);T=E??void 0;let h=x??1;if(j){A({stdout:$?k:"",stderr:$?D:"",code:h,error:`Command timed out after ${Q}ms`});return}if(h!==0){if($)A({stdout:k,stderr:D,code:h,error:fE({signal:T},h)});else A({stdout:"",stderr:"",code:h});return}A({stdout:k,stderr:D,code:0})})})}var Az,LQ=1000,zQ=60,Dz=1e6,c4,vE;var J5=B(()=>{U1();y0();oq();Az=EE(Q$(),1),c4=/[\0\r\n]/,vE=/^[A-Za-z0-9_.-]+$/});
203
- export{yt as M9,wB as N9,m0 as O9,b4 as P9,w0 as Q9,rq as R9,K10 as S9,f5 as T9,H8 as U9,HJ as V9,bK as W9,hK as X9,VX as Y9,m2 as Z9,rz as _9,S1 as $9,J$ as a_,tz as b_,Y$ as c_,ez as d_,W$ as e_,V$ as f_,$3 as g_,F$ as h_,V3 as i_,E$ as j_,S$ as k_,b$ as l_,Sv as m_,_1 as n_,e4 as o_,k0 as p_,dv as q_,L3 as r_,cv as s_,lv as t_,I6 as u_,m$ as v_,ov as w_,sv as x_,u$ as y_,u2 as z_,BX as A_,gU as B_,x7 as C_,P7 as D_,mU as E_,uU as F_,J0 as G_,uI as H_,d2 as I_,yc as J_,X4 as K_,iI as L_,AX as M_,B0 as N_,aI as O_,a as P_,eI as Q_,Zw as R_,Xw as S_,qw as T_,Qw as U_,$w as V_,H0 as W_,oc as X_,J4 as Y_,s1 as Z_,Zl as __,Xl as $_,ql as a$,Ql as b$,$l as c$,Jl as d$,Yl as e$,Hl as f$,Kl as g$,Ul as h$,Gl as i$,S7 as j$,TX as k$,Vw as l$,K1 as m$,Y4 as n$,IX as o$,rU as p$,Al as q$,A0 as r$,n2 as s$,xl as t$,Lw as u$,h7 as v$,ZG as w$,XG as x$,NX as y$,hl as z$,fl as A$,gl as B$,ml as C$,ul as D$,H4 as E$,$n as F$,ww as G$,Jn as H$,Yn as I$,Hn as J$,Kn as K$,tU as L$,Un as M$,Gn as N$,Wn as O$,Vn as P$,Bn as Q$,Ln as R$,kw as S$,zn as T$,_n as U$,Mn as V$,Rn as W$,s2 as X$,Fn as Y$,Dn as Z$,HG as _$,An as $$,b7 as aaa,yn as baa,Cn as caa,gG as daa,_O as eaa,MO as faa,RO as gaa,Q$ as haa,h5 as iaa,T0 as jaa,Q2 as kaa,J5 as laa,L4 as maa,pG as naa,Ki as oaa,s0 as paa,q6 as qaa,Q6 as raa,Ui as saa,Gi as taa,Wi as uaa,tG as vaa,_4 as waa,q2 as xaa,dO as yaa,wi as zaa,Oi as Aaa,j0 as Baa,ki as Caa,Ni as Daa,$W as Eaa,lO as Faa,nO as Gaa,xi as Haa,JW as Iaa,iO as Jaa,Pi as Kaa,aO as Laa,Ei as Maa,oO as Naa,sO as Oaa,vi as Paa,yi as Qaa,Ci as Raa,Si as Saa,bi as Taa,M4 as Uaa,tO as Vaa,R4 as Waa,F4 as Xaa,Y5 as Yaa,Zk as Zaa,Xk as _aa,Qk as $aa,BW as aba,LW as bba,TW as cba,jW as dba,cW as eba,lW as fba,eW as gba,ZV as hba,To as iba,jo as jba,Io as kba,ik as lba,V5 as mba,UV as nba,Oo as oba,Kq as pba,GV as qba,Uq as rba,qN as sba,WV as tba,VV as uba,fo as vba,go as wba,mo as xba,uo as yba,po as zba,co as Aba,I4 as Bba,lo as Cba,no as Dba,Gq as Eba,ao as Fba,oo as Gba,_V as Hba,ro as Iba,MV as Jba,to as Kba,GN as Lba,eo as Mba,WN as Nba,Zs as Oba,RV as Pba,FV as Qba,y1 as Rba,w4 as Sba,L5 as Tba,Gs as Uba,Ws as Vba,Vs as Wba,Bs as Xba,Ls as Yba,zs as Zba,_s as _ba,Ms as $ba,Rs as aca,Fs as bca,Ds as cca,As as dca,Ts as eca,TV as fca,js as gca,Is as hca,ws as ica,Os as jca,ks as kca,Ns as lca,xs as mca,Ps as nca,jV as oca,_N as pca,MN as qca,RN as rca,FN as sca,DN as tca,AN as uca,TN as vca,jN as wca,IN as xca,wN as yca,wV as zca,kV as Aca,NV as Bca,EV as Cca,ps as Dca,yV as Eca,Y2 as Fca,rs as Gca,xN as Hca,R5 as Ica,es as Jca,SV as Kca,F5 as Lca,Jr as Mca,Yr as Nca,Hr as Oca,fV as Pca,qx as Qca,Kr as Rca,Ur as Sca,$x as Tca,Gr as Uca,dV as Vca,Wr as Wca,Vr as Xca,Br as Yca,cV as Zca,zr as _ca,D5 as $ca,lV as ada,nV as bda,Wx as cda,Vx as dda,Rr as eda,Fr as fda,Dr as gda,iV as hda,aV as ida,Tr as jda,jr as kda,oV as lda,Mq as mda,sV as nda,rV as oda,Or as pda,tV as qda,H6 as rda,Er as sda,eV as tda,vr as uda,ZB as vda,Cr as wda,XB as xda,qB as yda,Sr as zda,br as Ada,hr as Bda,fr as Cda,gr as Dda,Mx as Eda,mr as Fda,Fq as Gda,rr as Hda,UB as Ida,GB as Jda,v0 as Kda,Gt as Lda,Wt as Mda,Vt as Nda,k4 as Oda,Ot as Pda,Oq as Qda,it as Rda,N5 as Sda,x5 as Tda,at as Uda,ot as Vda,PB as Wda,fq as Xda,Ie as Yda,x4 as Zda,EB as _da,E5 as $da,pB as aea,u as bea,we as cea,Oe as dea,H2 as eea,ke as fea,gq as gea,Ne as hea,bx as iea,xe as jea,Pe as kea,Ee as lea,ve as mea,ye as nea,hx as oea,fx as pea,gx as qea,ux as rea,Ce as sea,cB as tea,tB as uea,ee as vea,ox as wea,Z00 as xea,v4 as yea,XL as zea,X00 as Aea,uq as Bea,pq as Cea,qL as Dea,cq as Eea,y5 as Fea,JL as Gea,qP as Hea,J00 as Iea,Y00 as Jea,YL as Kea,I0 as Lea,GL as Mea,C5 as Nea,GP as Oea,BP as Pea,LP as Qea,VL as Rea,BL as Sea,LL as Tea,MP as Uea,RP as Vea,zL as Wea,FP as Xea,DP as Yea,AP as Zea,TP as _ea,jP as $ea,IP as afa,wP as bfa,nq as cfa,S5 as dfa,RL as efa,iq as ffa,g00 as gfa,g0 as hfa,m00 as ifa,L1 as jfa,u00 as kfa,CP as lfa,p00 as mfa,SP as nfa,d00 as ofa,c00 as pfa,l00 as qfa,n00 as rfa,bP as sfa,hP as tfa,i00 as ufa,fP as vfa,a00 as wfa,o00 as xfa,s00 as yfa,gP as zfa,OL as Afa,_10 as Bfa,EL as Cfa,fL as Dfa,gL as Efa,u10 as Ffa,p10 as Gfa,d10 as Hfa,b as Ifa,QQ as Jfa,c10 as Kfa,u0 as Lfa,l10 as Mfa,uL as Nfa,JQ as Ofa,eP as Pfa,nL as Qfa,t10 as Rfa,e10 as Sfa,iL as Tfa,HQ as Ufa,JE as Vfa,H20 as Wfa,K20 as Xfa,U20 as Yfa,qz as Zfa,G20 as _fa,W20 as $fa,RE as aga,tL as bga,WQ as cga,V20 as dga,B20 as ega,L20 as fga,z20 as gga,DE as hga,AE as iga,_20 as jga,Kz as kga,i5 as lga,Gz as mga,p4 as nga,wE as oga,OE as pga,U2 as qga,Vz as rga,Bz as sga,T20 as tga,Lz as uga,E20 as vga,v20 as wga,y20 as xga,g as yga,S20 as zga,b20 as Aga,h20 as Bga,f20 as Cga,y0 as Dga};