claude-code-best 2.4.4 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (614) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-Cj5bvJgD.js +1 -0
  2. package/dist/chunks/App-2tgSv9lb.js +1 -0
  3. package/dist/chunks/ApproveApiKey-DWa-XTLb.js +1 -0
  4. package/dist/chunks/ApproveApiKey-SIUwkD8j.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-DF9eeJZS.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-DXJdube9.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-BOSW4Zdy.js +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-BW4XHmkw.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-B8oAAHSI.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-Bz0JyaOG.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-DYhmGSkx.js +1 -0
  12. package/dist/chunks/DesktopHandoff-CcsM_OAS.js +1 -0
  13. package/dist/chunks/DevChannelsDialog-DXRgY00D.js +1 -0
  14. package/dist/chunks/Dialog-DYFGqyDs.js +1 -0
  15. package/dist/chunks/DiffDialog-PvNZfZby.js +3 -0
  16. package/dist/chunks/Doctor--B1HUENo.js +1 -0
  17. package/dist/chunks/Doctor-CE_jL9jC.js +3 -0
  18. package/dist/chunks/ExitFlow-C4ybxKPn.js +2 -0
  19. package/dist/chunks/Feedback-B5rPGl_C.js +2 -0
  20. package/dist/chunks/Grove-C2YjB3zL.js +1 -0
  21. package/dist/chunks/Grove-CKVpREDU.js +11 -0
  22. package/dist/chunks/HybridTransport-Byjvz-DL.js +4 -0
  23. package/dist/chunks/ITermBackend-Co9XpeS4.js +1 -0
  24. package/dist/chunks/InProcessTransport-DB52dh4f.js +1 -0
  25. package/dist/chunks/InvalidConfigDialog-CNsqbNU3.js +1 -0
  26. package/dist/chunks/InvalidSettingsDialog-ClnZaN6b.js +1 -0
  27. package/dist/chunks/ListItem-OFARanN7.js +1 -0
  28. package/dist/chunks/MCPConnectionManager-CDsa79pu.js +1 -0
  29. package/dist/chunks/McpParsingWarnings-DZkzoeZf.js +1 -0
  30. package/dist/chunks/MessageSelector-CkeGQPNM.js +3 -0
  31. package/dist/chunks/Messages-PfbzLYOU.js +11 -0
  32. package/dist/chunks/Onboarding-BwoGQB4g.js +1 -0
  33. package/dist/chunks/OverageCreditUpsell-Q5g2YjQw.js +1 -0
  34. package/dist/chunks/PermissionDialog-5MlJf7ew.js +1 -0
  35. package/dist/chunks/PluginSettings-B2ASJ0Rx.js +17 -0
  36. package/dist/chunks/PressEnterToContinue-BdA9zDGs.js +1 -0
  37. package/dist/chunks/PromptInputFooterSuggestions-D4lMVCqj.js +1 -0
  38. package/dist/chunks/PromptInputHelpMenu-BvLtS6an.js +1 -0
  39. package/dist/chunks/QueryEngine-Av0G5fze.js +1 -0
  40. package/dist/chunks/REPL-DCwqua0C.js +1 -0
  41. package/dist/chunks/REPL-Dh8vzGmF.js +97 -0
  42. package/dist/chunks/RemoteCallout-BV_hoz98.js +1 -0
  43. package/dist/chunks/RemoteSessionManager-Cxoy1ud2.js +2 -0
  44. package/dist/chunks/ResumeConversation-B3WuB8rs.js +1 -0
  45. package/dist/chunks/SSETransport-pIm26VJq.js +4 -0
  46. package/dist/chunks/SearchBox-DfOmUoaI.js +1 -0
  47. package/dist/chunks/SearchExtraToolsTool-D70C-cmA.js +1 -0
  48. package/dist/chunks/SentryErrorBoundary-B6EWoJml.js +2 -0
  49. package/dist/chunks/SentryErrorBoundary-oJUBarGg.js +1 -0
  50. package/dist/chunks/Settings-CreAhCsb.js +2 -0
  51. package/dist/chunks/TeleportProgress-DPzGpyyM.js +1 -0
  52. package/dist/chunks/TeleportRepoMismatchDialog-DqWQX6j8.js +1 -0
  53. package/dist/chunks/TeleportResumeWrapper-DPSO0S49.js +1 -0
  54. package/dist/chunks/ThemePicker-DueihHcy.js +1 -0
  55. package/dist/chunks/TmuxBackend-BNaZNAeP.js +9 -0
  56. package/dist/chunks/TrustDialog-CIzAlGn9.js +1 -0
  57. package/dist/chunks/TungstenTool-C5IqKVr0.js +1 -0
  58. package/dist/chunks/TungstenTool-V-Bwqlx3.js +1 -0
  59. package/dist/chunks/ValidationErrorsList-1k1qbsRo.js +2 -0
  60. package/dist/chunks/WelcomeV2-CR6TtXXM.js +1 -0
  61. package/dist/chunks/WindowsTerminalBackend-C5SeTXqC.js +2 -0
  62. package/dist/chunks/add-dir-DAMizKzF.js +1 -0
  63. package/dist/chunks/agentDisplay-B9z7i8b_.js +1 -0
  64. package/dist/chunks/agents-D5u0p1UC.js +103 -0
  65. package/dist/chunks/agents-DCh_gEvJ.js +2 -0
  66. package/dist/chunks/ajv-B_OpU_Uh.js +8 -0
  67. package/dist/chunks/analytics-DqMQntaB.js +1 -0
  68. package/dist/chunks/ant-DRJq-cEg.js +1 -0
  69. package/dist/chunks/api-B6URs6nc.js +1 -0
  70. package/dist/chunks/api-Dz_3z1kl.js +1 -0
  71. package/dist/chunks/asciicast-aoKFhc7C.js +1 -0
  72. package/dist/chunks/asciicast-o5Zg4dJt.js +4 -0
  73. package/dist/chunks/assistant-BRGDWkKB.js +1 -0
  74. package/dist/chunks/assistant-tPxOUa-Z.js +1 -0
  75. package/dist/chunks/assistant-zVegFdAO.js +1 -0
  76. package/dist/chunks/attributionHooks-PygdohOh.js +1 -0
  77. package/dist/chunks/attributionTrailer-BpvhXgRP.js +1 -0
  78. package/dist/chunks/auth-CqURlg4d.js +1 -0
  79. package/dist/chunks/auth-D4isgfuK.js +1 -0
  80. package/dist/chunks/autoMode-DVt4K4I2.js +45 -0
  81. package/dist/chunks/autoModeDenials-Cp6VFdsm.js +1 -0
  82. package/dist/chunks/autonomy-BZzW8QJZ.js +1 -0
  83. package/dist/chunks/autonomy-Ffv0QIyl.js +19 -0
  84. package/dist/chunks/autonomyPanel-MwuzDvv_.js +1 -0
  85. package/dist/chunks/axios-DLnc2dVy.js +1 -0
  86. package/dist/chunks/axios-DhfaybwJ.js +12 -0
  87. package/dist/chunks/backgroundHousekeeping-CYnAG60-.js +17 -0
  88. package/dist/chunks/backgroundHousekeeping-DUmxC6h0.js +1 -0
  89. package/dist/chunks/banner-CVXH2xts.js +2 -0
  90. package/dist/chunks/base64-js-DIVSFswY.js +1 -0
  91. package/dist/chunks/bedrockClient-qi1-JCOK.js +15 -0
  92. package/dist/chunks/bg-DK0E4ZtW.js +9 -0
  93. package/dist/chunks/bg-Dbh5z3Y8.js +1 -0
  94. package/dist/chunks/branch-DXefFdDE.js +3 -0
  95. package/dist/chunks/break-cache-ByJ7U2Ts.js +8 -0
  96. package/dist/chunks/bridge-qr4GQW_c.js +2 -0
  97. package/dist/chunks/bridgeConfig-CJ-KznTS.js +1 -0
  98. package/dist/chunks/bridgeConfig-CNbOKpAg.js +1 -0
  99. package/dist/chunks/bridgeEnabled-5vsPrjuq.js +1 -0
  100. package/dist/chunks/bridgeEnabled-BUJTCUHY.js +1 -0
  101. package/dist/chunks/bridgeMain-BimZwc2P.js +68 -0
  102. package/dist/chunks/bridgeMain-DYL4fl6A.js +1 -0
  103. package/dist/chunks/bridgeMessaging-BiE0CTqq.js +1 -0
  104. package/dist/chunks/bridgePointer-FvAMj3re.js +1 -0
  105. package/dist/chunks/browser-fLRXxIsQ.js +1 -0
  106. package/dist/chunks/btw-FpimqEqk.js +1 -0
  107. package/dist/chunks/buddy-BA3Cr067.js +3 -0
  108. package/dist/chunks/bundledMode-kSQejuY4.js +1 -0
  109. package/dist/chunks/bypassPermissionsKillswitch-CSC9p8mO.js +1 -0
  110. package/dist/chunks/caches-BUBkfP2Q.js +3 -0
  111. package/dist/chunks/caches-CTfNpKhW.js +1 -0
  112. package/dist/chunks/capacityWake-BXlUpptF.js +1 -0
  113. package/dist/chunks/ccrClient-BOxUn9EJ.js +1 -0
  114. package/dist/chunks/ccshareResume-DWLjTF22.js +1 -0
  115. package/dist/chunks/changeDetector-Y9KV5LgG.js +1 -0
  116. package/dist/chunks/channelNotification-CC7Xb06W.js +1 -0
  117. package/dist/chunks/channelNotification-l3EXKDNB.js +1 -0
  118. package/dist/chunks/chokidar-BcI3rIKm.js +1 -0
  119. package/dist/chunks/chokidar-SzksMqYp.js +1 -0
  120. package/dist/chunks/chrome-BnKyWWQL.js +1 -0
  121. package/dist/chunks/chromeNativeHost-4U39yLtd.js +1 -0
  122. package/dist/chunks/chunk-DR8-3Aex.js +1 -0
  123. package/dist/chunks/classPrivateFieldSet2-EAQNhHs8.js +1 -0
  124. package/dist/chunks/claudeDesktop-D0S1eq1F.js +1 -0
  125. package/dist/chunks/cleanup-Bg_gFgcj.js +1 -0
  126. package/dist/chunks/clear-OUVFUt8Z.js +1 -0
  127. package/dist/chunks/cliLaunch-BQa48gsr.js +1 -0
  128. package/dist/chunks/client-B47ZvTMo.js +1 -0
  129. package/dist/chunks/client-CPn1wQyc.js +7 -0
  130. package/dist/chunks/client-_sjL0I7A.js +35 -0
  131. package/dist/chunks/color-D5MCzz9h.js +1 -0
  132. package/dist/chunks/color-convert-ULbeSgNC.js +1 -0
  133. package/dist/chunks/commands-FJGWgQsa.js +1 -0
  134. package/dist/chunks/commitAttribution-BFshsh2H.js +2 -0
  135. package/dist/chunks/commitAttribution-DSv9FggK.js +1 -0
  136. package/dist/chunks/common-B379wT22.js +1 -0
  137. package/dist/chunks/common-B_BC3eMY.js +1 -0
  138. package/dist/chunks/common-CMCv4N_v.js +1 -0
  139. package/dist/chunks/compact-DWNaf1wR.js +3 -0
  140. package/dist/chunks/companion-CyK_Dr1U.js +1 -0
  141. package/dist/chunks/completionCache-DHfUBBMH.js +1 -0
  142. package/dist/chunks/completionCache-DORrtxkS.js +4 -0
  143. package/dist/chunks/computerUseLock-BjoDJH2h.js +1 -0
  144. package/dist/chunks/config-BdCuh6eA.js +1 -0
  145. package/dist/chunks/config-DNz6Eitr.js +1 -0
  146. package/dist/chunks/connectHeadless-CwsFt-Mh.js +1 -0
  147. package/dist/chunks/constants-41VpZw2G.js +1 -0
  148. package/dist/chunks/context-BOjdTj0i.js +1 -0
  149. package/dist/chunks/context-noninteractive-Bd2HO-vU.js +1 -0
  150. package/dist/chunks/context-noninteractive-k2ibficU.js +54 -0
  151. package/dist/chunks/controlMessageCompat-BJhFiS7u.js +1 -0
  152. package/dist/chunks/conversation-BP0phkOY.js +1 -0
  153. package/dist/chunks/conversation-Ci8O_eZ-.js +1 -0
  154. package/dist/chunks/copy-B0VUJ2rH.js +7 -0
  155. package/dist/chunks/createSSHSession-DqmkCS_k.js +6 -0
  156. package/dist/chunks/createSession-B9MhWusY.js +1 -0
  157. package/dist/chunks/createSession-CJEsHz58.js +1 -0
  158. package/dist/chunks/cron-DiW7eIPP.js +1 -0
  159. package/dist/chunks/cronJitterConfig-BzPaa52I.js +6 -0
  160. package/dist/chunks/crossProjectResume-tWsqBUHc.js +40 -0
  161. package/dist/chunks/cwd--iizewsn.js +1 -0
  162. package/dist/chunks/cwd-BgpSJxd7.js +1 -0
  163. package/dist/chunks/daemon-VYRit6Aq.js +2 -0
  164. package/dist/chunks/dangerousBackend-BU_PHGR2.js +1 -0
  165. package/dist/chunks/datadog-Bd1s_VFj.js +1 -0
  166. package/dist/chunks/datadog-DJowkWhh.js +1 -0
  167. package/dist/chunks/debug-DM5ezCBS.js +1 -0
  168. package/dist/chunks/debug-UI3T040K.js +5 -0
  169. package/dist/chunks/debugUtils-BBMFODKH.js +1 -0
  170. package/dist/chunks/defineProperty-80gRi2ZW.js +1 -0
  171. package/dist/chunks/desktop-BDowrzvG.js +1 -0
  172. package/dist/chunks/detached-D300jlhj.js +5 -0
  173. package/dist/chunks/detect-libc-DNuQfUvI.js +1 -0
  174. package/dist/chunks/detectRepository-CBk3S2zv.js +1 -0
  175. package/dist/chunks/detectRepository-DCTvg4p0.js +1 -0
  176. package/dist/chunks/detection-CQsNad64.js +1 -0
  177. package/dist/chunks/detection-DJ-vTbBf.js +1 -0
  178. package/dist/chunks/diff-auU5sUOw.js +1 -0
  179. package/dist/chunks/directoryCompletion-DP_4B1GL.js +1 -0
  180. package/dist/chunks/dist-CanSxOZ1.js +5 -0
  181. package/dist/chunks/dist-Cg1a1Exw.js +29 -0
  182. package/dist/chunks/dist-Q7YNoZ0H.js +20 -0
  183. package/dist/chunks/dist-es-4z5T3Jzm.js +1 -0
  184. package/dist/chunks/dist-es-B2jg52tM2.js +1 -0
  185. package/dist/chunks/dist-es-B6OXHQ1S.js +1 -0
  186. package/dist/chunks/dist-es-B8NEy5hc.js +1 -0
  187. package/dist/chunks/dist-es-BVGppqE4.js +1 -0
  188. package/dist/chunks/dist-es-Bcw5GZko.js +1 -0
  189. package/dist/chunks/dist-es-BoIJpncb.js +9 -0
  190. package/dist/chunks/dist-es-Bu_Fshi1.js +1 -0
  191. package/dist/chunks/dist-es-C-1vn4OP2.js +1 -0
  192. package/dist/chunks/dist-es-C41b_0B5.js +1 -0
  193. package/dist/chunks/dist-es-CCZYybbG2.js +1 -0
  194. package/dist/chunks/dist-es-CLK1mey-.js +1 -0
  195. package/dist/chunks/dist-es-CQz2aNf72.js +1 -0
  196. package/dist/chunks/dist-es-CSfI8B8l.js +1 -0
  197. package/dist/chunks/dist-es-CUZBYppo.js +1 -0
  198. package/dist/chunks/dist-es-CZkzHpjF.js +1 -0
  199. package/dist/chunks/dist-es-Cbf0_D8d.js +5 -0
  200. package/dist/chunks/dist-es-ChHe-SVL.js +1 -0
  201. package/dist/chunks/dist-es-ClYOf0My.js +1 -0
  202. package/dist/chunks/dist-es-D-kJbj4A2.js +1 -0
  203. package/dist/chunks/dist-es-D1LN6CJd.js +1 -0
  204. package/dist/chunks/dist-es-DC1sC3ph.js +1 -0
  205. package/dist/chunks/dist-es-DGn8uOwQ2.js +1 -0
  206. package/dist/chunks/dist-es-DK5fTeKM2.js +1 -0
  207. package/dist/chunks/dist-es-DN7otr6F.js +1 -0
  208. package/dist/chunks/dist-es-DPM0mPK5.js +1 -0
  209. package/dist/chunks/dist-es-DqZAh3nG.js +1 -0
  210. package/dist/chunks/dist-es-DuAZyxJ02.js +5 -0
  211. package/dist/chunks/dist-es-HVQrM0oE.js +1 -0
  212. package/dist/chunks/dist-es-OVleIB54.js +1 -0
  213. package/dist/chunks/dist-es-UAs0rdXg.js +1 -0
  214. package/dist/chunks/dist-es-WvMMuHmx2.js +1 -0
  215. package/dist/chunks/dist-es-fjXft-jH.js +1 -0
  216. package/dist/chunks/dist-es-hdN_ShpZ.js +3 -0
  217. package/dist/chunks/dist-es-neiUvMJb.js +1 -0
  218. package/dist/chunks/dist-es-yMYpDtui2.js +1 -0
  219. package/dist/chunks/dist-es-zjcbuB72.js +1 -0
  220. package/dist/chunks/distRoot-CcxmnzqQ.js +1 -0
  221. package/dist/chunks/doctor-bKPp6AeL.js +1 -0
  222. package/dist/chunks/earlyInput-JGJo1zcC.js +1 -0
  223. package/dist/chunks/earlyInput-tRkbxFv2.js +2 -0
  224. package/dist/chunks/effort-BQj2QnnA.js +9 -0
  225. package/dist/chunks/entry-CUu6-QhT.js +14 -0
  226. package/dist/chunks/env-chR0gV31.js +1 -0
  227. package/dist/chunks/envLessBridgeConfig-CixkwbRF.js +1 -0
  228. package/dist/chunks/envLessBridgeConfig-Ju4W58xf.js +1 -0
  229. package/dist/chunks/envUtils-BWeoiL4Y.js +1 -0
  230. package/dist/chunks/escHotkey-Cyz0yyh1.js +259 -0
  231. package/dist/chunks/esm--xjzB1hI.js +1 -0
  232. package/dist/chunks/esm-B2HIF0XY.js +1 -0
  233. package/dist/chunks/esm-BGQPWnJy.js +1 -0
  234. package/dist/chunks/esm-C-1qL9Mn.js +1 -0
  235. package/dist/chunks/esm-C3jcs1DH.js +1 -0
  236. package/dist/chunks/esm-C97WL9nC.js +1 -0
  237. package/dist/chunks/esm-CIL-SKM8.js +1 -0
  238. package/dist/chunks/esm-CJlBxjtx.js +1 -0
  239. package/dist/chunks/esm-CsGLyWmS.js +56 -0
  240. package/dist/chunks/esm-DQHmDm-H.js +1 -0
  241. package/dist/chunks/esm-DcdOXSzi.js +1 -0
  242. package/dist/chunks/esm-DhNYgGTV.js +1 -0
  243. package/dist/chunks/esm-DxPW7qPs.js +1 -0
  244. package/dist/chunks/esm-FBUWr3vI.js +1 -0
  245. package/dist/chunks/esm-QgL6y---.js +10 -0
  246. package/dist/chunks/esm-v0kPjgVS.js +1 -0
  247. package/dist/chunks/esm-vIn-YV_h.js +1 -0
  248. package/dist/chunks/event-streams-BV7ngMXu.js +1 -0
  249. package/dist/chunks/eventLoopStallDetector-Dnh1fc31.js +1 -0
  250. package/dist/chunks/execAsync-BkA6ogic.js +1 -0
  251. package/dist/chunks/execFileNoThrow-CuQN1sz8.js +1 -0
  252. package/dist/chunks/execSyncWrapper-C2XQnFVo.js +1 -0
  253. package/dist/chunks/execa-CGue6Z3n.js +34 -0
  254. package/dist/chunks/executor-4EeD8GNm.js +1561 -0
  255. package/dist/chunks/executor-BHEuNh5F.js +1 -0
  256. package/dist/chunks/exit-DijkO8eo.js +1 -0
  257. package/dist/chunks/exit-_obETqBv.js +2 -0
  258. package/dist/chunks/export-DA-bBZkX.js +2 -0
  259. package/dist/chunks/exportRenderer-3y4tGdSB.js +1 -0
  260. package/dist/chunks/extra-usage-CS6VwKJt.js +1 -0
  261. package/dist/chunks/extra-usage-DGHEQOrY.js +1 -0
  262. package/dist/chunks/extra-usage-core-DOgT4u4i.js +1 -0
  263. package/dist/chunks/extra-usage-noninteractive-DYnfiRlV.js +1 -0
  264. package/dist/chunks/extraUsage-CfxgfpX_.js +1 -0
  265. package/dist/chunks/extractMemories-jvjCvtpC.js +1 -0
  266. package/dist/chunks/fast-Bbtx_Bs1.js +1 -0
  267. package/dist/chunks/fast-CzRUJBTK.js +1 -0
  268. package/dist/chunks/featureCheck-Cm0YNDXO.js +1 -0
  269. package/dist/chunks/featureCheck-p7OeCYzj.js +1 -0
  270. package/dist/chunks/feedback-FoXtdHAV.js +1 -0
  271. package/dist/chunks/figures-gfT9mM8P.js +1 -0
  272. package/dist/chunks/fileStateCache-C7-TxF8G.js +1 -0
  273. package/dist/chunks/files-DYvAZGxp.js +2 -0
  274. package/dist/chunks/firstPartyEventLogger-KIwaBY-E.js +1 -0
  275. package/dist/chunks/flushGate-C2Icy43G.js +1 -0
  276. package/dist/chunks/foundry-sdk-BFN5VDFQ.js +1 -0
  277. package/dist/chunks/fpsMetrics-DeezdcwV.js +1 -0
  278. package/dist/chunks/fuse-Ch_OAlm3.js +1 -0
  279. package/dist/chunks/gates-CbQLZHtm.js +1 -0
  280. package/dist/chunks/gates-DSI3vpwO.js +1 -0
  281. package/dist/chunks/gemini-BrNJGX4k.js +1 -0
  282. package/dist/chunks/generateRecap-B0fvSCjo.js +1 -0
  283. package/dist/chunks/generateSessionName-DvRYa39O.js +1 -0
  284. package/dist/chunks/genericProcessUtils-BGvcwuPt.js +23 -0
  285. package/dist/chunks/getMachineId-bsd-BMtYGBUL.js +1 -0
  286. package/dist/chunks/getMachineId-darwin-CiLdFH7z.js +2 -0
  287. package/dist/chunks/getMachineId-linux-Cr27rIeY.js +1 -0
  288. package/dist/chunks/getMachineId-unsupported-ceiBLwAN.js +1 -0
  289. package/dist/chunks/getMachineId-win-DFTmsQHq.js +1 -0
  290. package/dist/chunks/git-CN3qtTb_.js +6 -0
  291. package/dist/chunks/git-D23Mzu_K.js +1 -0
  292. package/dist/chunks/githubRepoPathMapping-Dut3d6nn.js +1 -0
  293. package/dist/chunks/graceful-fs-Cgc0rjGF.js +2 -0
  294. package/dist/chunks/grok-Ftoheab3.js +1 -0
  295. package/dist/chunks/growthbook-BynnuVTn.js +1 -0
  296. package/dist/chunks/hash-BRmOQc3c.js +1 -0
  297. package/dist/chunks/heapdump-hQ_w0LPC.js +5 -0
  298. package/dist/chunks/help-DQsHHv6r.js +1 -0
  299. package/dist/chunks/hooks-BLLL4iPv.js +1 -0
  300. package/dist/chunks/hooks-BhVDc8yb.js +79 -0
  301. package/dist/chunks/hostAdapter-D1eWmmhu.js +1 -0
  302. package/dist/chunks/hostGuard-zim_4F9V.js +1 -0
  303. package/dist/chunks/httpAuthSchemes-Wq4XWeLL.js +13 -0
  304. package/dist/chunks/ide-CPmMXLL-.js +2 -0
  305. package/dist/chunks/inboundAttachments-Bmf6vYsE.js +1 -0
  306. package/dist/chunks/inboundAttachments-D-p91z3w.js +1 -0
  307. package/dist/chunks/index.min-BJnb9GQI.js +1 -0
  308. package/dist/chunks/initReplBridge-BiHXpDEY.js +1 -0
  309. package/dist/chunks/insights-CTlTyvjj.js +822 -0
  310. package/dist/chunks/install-IPuD3Lq8.js +1 -0
  311. package/dist/chunks/install-github-app-Bmu_sA9e.js +147 -0
  312. package/dist/chunks/install-slack-app-Rfl81Jqo.js +1 -0
  313. package/dist/chunks/instinctParser-DHMa8xa0.js +1 -0
  314. package/dist/chunks/instrumentation-DWwmOmr0.js +12 -0
  315. package/dist/chunks/intl-Pse97ORk.js +1 -0
  316. package/dist/chunks/isObject-DaxDnPKm.js +1 -0
  317. package/dist/chunks/isSymbol-Dp3irZaY.js +1 -0
  318. package/dist/chunks/job-BXEt0izn.js +2 -0
  319. package/dist/chunks/json-bigint-OxRwRvup.js +8 -0
  320. package/dist/chunks/jsx-runtime-D-D469L8.js +1 -0
  321. package/dist/chunks/jws-2vqRyZtR.js +3 -0
  322. package/dist/chunks/jwtUtils-CpXwh_du.js +1 -0
  323. package/dist/chunks/keybindings-DRDgVvqz.js +2 -0
  324. package/dist/chunks/lang-D3ZHlfT6.js +1 -0
  325. package/dist/chunks/language-B_-BfBT4.js +1 -0
  326. package/dist/chunks/language-DcSjogBx.js +1 -0
  327. package/dist/chunks/launchAgentsPlatform-BPm_VMln.js +1 -0
  328. package/dist/chunks/launchAutofixPr-D2qac07g.js +2 -0
  329. package/dist/chunks/launchCommand-Du91jxMC.js +1 -0
  330. package/dist/chunks/launchLocalMemory-D_hBbXKE.js +3 -0
  331. package/dist/chunks/launchLocalVault-CPzNWvQ9.js +3 -0
  332. package/dist/chunks/launchMemoryStores-Djq2KhKb.js +1 -0
  333. package/dist/chunks/launchOnboarding-Bh6E7vdc.js +8 -0
  334. package/dist/chunks/launchSchedule-C988bQ-5.js +1 -0
  335. package/dist/chunks/launchSkillStore-DqrP6Gme.js +1 -0
  336. package/dist/chunks/launchTeleport-DFhybaq_.js +3 -0
  337. package/dist/chunks/launchVault-p_CSK4ZQ.js +1 -0
  338. package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
  339. package/dist/chunks/lib-B4Q0Nrpb.js +14 -0
  340. package/dist/chunks/lib-Ca3QWJjN.js +2 -0
  341. package/dist/chunks/lib-inCisXen.js +8 -0
  342. package/dist/chunks/loadAgentsDir-Ci5mr0vm.js +4601 -0
  343. package/dist/chunks/loadAgentsDir-vB1QEZ7H.js +1 -0
  344. package/dist/chunks/loadPluginHooks-xYCEZ6t5.js +1 -0
  345. package/dist/chunks/loadSso-sDs471GC.js +1 -0
  346. package/dist/chunks/localSearch-DtVqtfvk.js +1 -0
  347. package/dist/chunks/localSearch-Vpn6W5aY.js +1 -0
  348. package/dist/chunks/lockfile-DBwdlC3K.js +1 -0
  349. package/dist/chunks/log-CzsijfHZ.js +1 -0
  350. package/dist/chunks/login-D-N78G6r.js +1 -0
  351. package/dist/chunks/login-D9IWjvza.js +1 -0
  352. package/dist/chunks/logoV2Utils-SAulcC5x.js +1 -0
  353. package/dist/chunks/logout-CFggVS-9.js +1 -0
  354. package/dist/chunks/magicDocs-BfoeYhin.js +57 -0
  355. package/dist/chunks/main-C6be1KFk.js +31 -0
  356. package/dist/chunks/main-DhMlhVj3.js +1108 -0
  357. package/dist/chunks/mappers-uIrAj-Wd.js +1 -0
  358. package/dist/chunks/mcp-CAYGNxCb.js +1 -0
  359. package/dist/chunks/mcp-COQap0SM.js +6 -0
  360. package/dist/chunks/mcp-DlM0OC6R.js +2 -0
  361. package/dist/chunks/mcpServer-1SnOWb8_.js +1 -0
  362. package/dist/chunks/mcpServer-DXvS3v4x.js +1 -0
  363. package/dist/chunks/memoize-DNnuA2aU.js +1 -0
  364. package/dist/chunks/memoize-DxwLawI2.js +1 -0
  365. package/dist/chunks/memory-XccPLQLt.js +1 -0
  366. package/dist/chunks/mobile-umu5P0cM.js +2 -0
  367. package/dist/chunks/modalContext-CmSKRyea.js +1 -0
  368. package/dist/chunks/model-CbiDGGJU.js +1 -0
  369. package/dist/chunks/model-DdbcxKub.js +1 -0
  370. package/dist/chunks/normalization-Cox8C0dP.js +1 -0
  371. package/dist/chunks/oauth-CdZEzMww.js +1 -0
  372. package/dist/chunks/oauth-CmensepG.js +1 -0
  373. package/dist/chunks/observationStore-tvkldXUo.js +4 -0
  374. package/dist/chunks/onChangeAppState-Dp0JIXd8.js +1 -0
  375. package/dist/chunks/open-CDditBQ-.js +1 -0
  376. package/dist/chunks/openai-6KcHd4Hw.js +10 -0
  377. package/dist/chunks/openaiShared-D5lOejS1.js +16 -0
  378. package/dist/chunks/output-style-XDb9-2Kk.js +1 -0
  379. package/dist/chunks/overageCreditGrant-DYiB4sr-.js +1 -0
  380. package/dist/chunks/p-map-9Ud1LOrJ.js +1 -0
  381. package/dist/chunks/p-map-D7WEmnBE.js +1 -0
  382. package/dist/chunks/package-BhL7chzt.js +1 -0
  383. package/dist/chunks/panel-ByW1omJn.js +1 -0
  384. package/dist/chunks/panel-Bz_8td5D.js +1 -0
  385. package/dist/chunks/parseConnectUrl-BS6i9JPo.js +1 -0
  386. package/dist/chunks/parser-CmngCwjB.js +1 -0
  387. package/dist/chunks/parser-SWIZo39J.js +1 -0
  388. package/dist/chunks/passes-Cbc6T_Tj.js +1 -0
  389. package/dist/chunks/path-C4kbwvSH.js +1 -0
  390. package/dist/chunks/paths-Q2255dD7.js +39 -0
  391. package/dist/chunks/permissions-BLzPHh_3.js +3 -0
  392. package/dist/chunks/permissions-DXLfdE7b.js +1 -0
  393. package/dist/chunks/permissions-Ps_D01ZB.js +1 -0
  394. package/dist/chunks/pipeTransport-D7NIp3aA.js +1 -0
  395. package/dist/chunks/plan-DloFVJK7.js +1 -0
  396. package/dist/chunks/platform-CuyedWpe.js +2 -0
  397. package/dist/chunks/plist-BO4ZqMZc.js +6 -0
  398. package/dist/chunks/plugin-XR9IBPMM.js +1 -0
  399. package/dist/chunks/pluginAutoupdate-Cr9hP0zG.js +1 -0
  400. package/dist/chunks/pluginBlocklist-CM9uP8CY.js +1 -0
  401. package/dist/chunks/pluginCliCommands-BQkrvES5.js +1 -0
  402. package/dist/chunks/pluginFlagging-CJ1--2Kw.js +1 -0
  403. package/dist/chunks/pluginOperations-B0rLuSvo.js +2 -0
  404. package/dist/chunks/pluginStartupCheck-Bjdc8zhz.js +1 -0
  405. package/dist/chunks/pluginStartupCheck-Cu2ezD51.js +1 -0
  406. package/dist/chunks/plugins-BgOP_8TX.js +4 -0
  407. package/dist/chunks/policyLimits-CKy_gTEt.js +1 -0
  408. package/dist/chunks/pollConfig-DhptuhFw.js +1 -0
  409. package/dist/chunks/poller-Ds0Y6Cir.js +1 -0
  410. package/dist/chunks/poor-DF0aqXDx.js +1 -0
  411. package/dist/chunks/poorMode-C5Frra4j.js +1 -0
  412. package/dist/chunks/poorMode-DJvjO2nW.js +1 -0
  413. package/dist/chunks/postCommitAttribution-Ehmwzzuq.js +1 -0
  414. package/dist/chunks/print-CPtR0KTa.js +39 -0
  415. package/dist/chunks/privacy-settings-e-7lc7Un.js +1 -0
  416. package/dist/chunks/process-CWupreF6.js +1 -0
  417. package/dist/chunks/process-DMKLUQIO.js +1 -0
  418. package/dist/chunks/processBashCommand-D5dC6Mya.js +1 -0
  419. package/dist/chunks/processSlashCommand-DHRUtZ-C.js +6 -0
  420. package/dist/chunks/projectContext-0fpRKUeH.js +1 -0
  421. package/dist/chunks/projectContext-eXMSfgdZ.js +1 -0
  422. package/dist/chunks/prompt-4tea6NJQ.js +54 -0
  423. package/dist/chunks/prompt-CQC-mh6u.js +1 -0
  424. package/dist/chunks/prompt-DEPUnJdB.js +222 -0
  425. package/dist/chunks/prompt-DawxLANl.js +1 -0
  426. package/dist/chunks/promptEditor-Ci-h04-5.js +4 -0
  427. package/dist/chunks/protocolHandler-DhqM32qE.js +13 -0
  428. package/dist/chunks/protocols-CAyQOlkr.js +7 -0
  429. package/dist/chunks/proxy-CfZp-wce.js +99 -0
  430. package/dist/chunks/rate-limit-options-B0l29Zx8.js +1 -0
  431. package/dist/chunks/rcDebugLog-BbPkkigY.js +11 -0
  432. package/dist/chunks/referral-ByevBJrE.js +1 -0
  433. package/dist/chunks/refresh-B_CwwIRX.js +1 -0
  434. package/dist/chunks/registerProtocol-DzhaQH02.js +36 -0
  435. package/dist/chunks/registry-DkHA4cRu.js +1 -0
  436. package/dist/chunks/release-notes-CZthYkei.js +4 -0
  437. package/dist/chunks/releaseNotes-CwKpIsyd.js +2 -0
  438. package/dist/chunks/reload-plugins-DxWfXvrN.js +1 -0
  439. package/dist/chunks/remote-env-BiRLWIrh.js +1 -0
  440. package/dist/chunks/remoteBridgeCore-nz1fPY1U.js +1 -0
  441. package/dist/chunks/remoteControlServer-FzLUxh2B.js +3 -0
  442. package/dist/chunks/rename-DmGuyncE.js +1 -0
  443. package/dist/chunks/renderOptions-BiyC2rj1.js +1 -0
  444. package/dist/chunks/resume-7GeU7RMS.js +2 -0
  445. package/dist/chunks/rewind-CXplHgh_.js +1 -0
  446. package/dist/chunks/rollback-DbSpxmJE.js +11 -0
  447. package/dist/chunks/runtimeObserver-Duod-ign.js +10 -0
  448. package/dist/chunks/runtimeObserver-OgM9ZYxZ.js +1 -0
  449. package/dist/chunks/sandbox-adapter-CxkhKgaa.js +1 -0
  450. package/dist/chunks/sandbox-toggle-Cc96R6Ox.js +1 -0
  451. package/dist/chunks/sanitization-CYp-9DbE.js +1 -0
  452. package/dist/chunks/satisfies-BaHgd_ie.js +1 -0
  453. package/dist/chunks/schemas-BGAvj1T4.js +40 -0
  454. package/dist/chunks/sdk-DEtgRZvI.js +1 -0
  455. package/dist/chunks/sdkHeapDumpMonitor--fevrC5z.js +1 -0
  456. package/dist/chunks/searchExtraTools-DQ6e601b.js +1 -0
  457. package/dist/chunks/semver-Cq33BYay.js +1 -0
  458. package/dist/chunks/semver-Tw0AFar5.js +1 -0
  459. package/dist/chunks/sentry-BUHYuYGj.js +13 -0
  460. package/dist/chunks/server-C5XZSlto.js +1 -0
  461. package/dist/chunks/server-DzOdtq8A.js +1 -0
  462. package/dist/chunks/serverBanner-WlSYP-f8.js +1 -0
  463. package/dist/chunks/serverLog-DtsUvDiY.js +1 -0
  464. package/dist/chunks/session-DgLqm7ZI.js +2 -0
  465. package/dist/chunks/sessionDataUploader-Ctjo1bgR.js +1 -0
  466. package/dist/chunks/sessionDiscovery-DgNea6qa.js +1 -0
  467. package/dist/chunks/sessionFileAccessHooks-7Svz-7S-.js +1 -0
  468. package/dist/chunks/sessionManager-Dw72ZUTg.js +1 -0
  469. package/dist/chunks/sessionMemory-DIrR3zvb.js +1 -0
  470. package/dist/chunks/sessionMemory-_dmj8lcH.js +1 -0
  471. package/dist/chunks/sessionMemoryUtils-BdQtSkRx.js +1 -0
  472. package/dist/chunks/sessionObserver-CuWMVPlT.js +20 -0
  473. package/dist/chunks/sessionObserver-_adufOGQ.js +1 -0
  474. package/dist/chunks/sessionStorage-W7okgAlQ.js +1 -0
  475. package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +3 -0
  476. package/dist/chunks/sessionTitle-DzkMzHer.js +14 -0
  477. package/dist/chunks/sessionTracing-DTjmc0EF.js +11 -0
  478. package/dist/chunks/settingsSync-CfYDkakY.js +1 -0
  479. package/dist/chunks/setup-BKUG46jQ.js +9 -0
  480. package/dist/chunks/setup-CmLngvpJ.js +1 -0
  481. package/dist/chunks/setup-TqJ7-Nxh.js +2 -0
  482. package/dist/chunks/shadowedRuleDetection-DesT0yKM.js +1 -0
  483. package/dist/chunks/shellQuote-DgjT8KBA.js +1 -0
  484. package/dist/chunks/sideQuestion-BAq0YyKY.js +20 -0
  485. package/dist/chunks/signin-QEeYpJZw.js +1 -0
  486. package/dist/chunks/sink-B3uP8Cf8.js +1 -0
  487. package/dist/chunks/sink-CaWMZBw_.js +1 -0
  488. package/dist/chunks/sinks-COcy5GnB.js +2 -0
  489. package/dist/chunks/sinks-oFfsKySL.js +1 -0
  490. package/dist/chunks/skill-learning-DOIMPtWE.js +5 -0
  491. package/dist/chunks/skillChangeDetector-CA_Tdx8N.js +1 -0
  492. package/dist/chunks/skillGapStore-CWuw1dYh.js +1 -0
  493. package/dist/chunks/skillGapStore-DpEoKhn-.js +5 -0
  494. package/dist/chunks/skillGenerator-9y3Q4YoO.js +8 -0
  495. package/dist/chunks/skillLearning-BhM09bQD.js +1 -0
  496. package/dist/chunks/skillLearning-_o2D06yM.js +1 -0
  497. package/dist/chunks/skillPanel-Dt24mZTZ.js +28 -0
  498. package/dist/chunks/skillSearchPanel-gaXN64Fu.js +21 -0
  499. package/dist/chunks/skills-Dx3dMHYk.js +1 -0
  500. package/dist/chunks/slashCommandParsing-Cari0pNg.js +1 -0
  501. package/dist/chunks/sleep-8Eb9j_Ly.js +1 -0
  502. package/dist/chunks/sprites-5OAB-Ui2.js +1 -0
  503. package/dist/chunks/src-BIPP3_mo.js +26 -0
  504. package/dist/chunks/src-BJz1KAd_.js +6 -0
  505. package/dist/chunks/src-BRAdBA8A.js +1 -0
  506. package/dist/chunks/src-BRC_BuUP.js +1 -0
  507. package/dist/chunks/src-BaB-bpCj.js +5 -0
  508. package/dist/chunks/src-BlLavFUS.js +7 -0
  509. package/dist/chunks/src-C5yhFG0C.js +19 -0
  510. package/dist/chunks/src-CI_jaaBj.js +2 -0
  511. package/dist/chunks/src-CRsA-Z4y.js +1 -0
  512. package/dist/chunks/src-CYLfL70h.js +1 -0
  513. package/dist/chunks/src-DJXCzwyJ.js +1 -0
  514. package/dist/chunks/src-DJXKJavk.js +1 -0
  515. package/dist/chunks/src-Di342QoJ.js +53 -0
  516. package/dist/chunks/src-DsMd9Q9e.js +2 -0
  517. package/dist/chunks/src-DzH9IdOo.js +1 -0
  518. package/dist/chunks/src-hdbPEvzO.js +9 -0
  519. package/dist/chunks/src-poaoYkuc.js +1 -0
  520. package/dist/chunks/src-x7u_sB6m.js +1 -0
  521. package/dist/chunks/sso-oidc-BX1MlBX0.js +1 -0
  522. package/dist/chunks/startupProfiler-DnXZaX4A.js +3 -0
  523. package/dist/chunks/startupProfiler-SOE--nM9.js +1 -0
  524. package/dist/chunks/state-B2GIOsTB.js +1 -0
  525. package/dist/chunks/state-Ce1HlR-H.js +1 -0
  526. package/dist/chunks/state-sIHsFpDu.js +1 -0
  527. package/dist/chunks/staticRender-Br64h1E1.js +1 -0
  528. package/dist/chunks/stats-TUExo9iU.js +1 -0
  529. package/dist/chunks/status-Dghaz1my.js +1 -0
  530. package/dist/chunks/statusNoticeHelpers-DVZSSXeK.js +1 -0
  531. package/dist/chunks/stdio-BEEzuxaZ.js +1 -0
  532. package/dist/chunks/stdio-D4cT86R0.js +3 -0
  533. package/dist/chunks/stickers-2K05wjSp.js +1 -0
  534. package/dist/chunks/store-DhI7Lcan.js +1 -0
  535. package/dist/chunks/sts-BDFJ-6QE.js +1 -0
  536. package/dist/chunks/subprocessEnv-CggQWZCx.js +1 -0
  537. package/dist/chunks/subprocessEnv-DV6q6o6w.js +1 -0
  538. package/dist/chunks/supports-color-lkzOMQ6u.js +1 -0
  539. package/dist/chunks/systemPromptSections-BcN_XBTx.js +1 -0
  540. package/dist/chunks/systemPromptSections-DB93ZNWP.js +1 -0
  541. package/dist/chunks/systemTheme-dDbitcxB.js +1 -0
  542. package/dist/chunks/tag-ZcVkzFjz.js +11 -0
  543. package/dist/chunks/tasks-DbB33ekt.js +1 -0
  544. package/dist/chunks/teamHelpers-BmN9nKz-.js +1 -0
  545. package/dist/chunks/teamHelpers-yeTNtZbb.js +1 -0
  546. package/dist/chunks/teammate-DMYOtLTK.js +1 -0
  547. package/dist/chunks/teammateModeSnapshot-CPjJJDL1.js +1 -0
  548. package/dist/chunks/teammateModeSnapshot-CsNIJTKi.js +1 -0
  549. package/dist/chunks/teleport-JHgpwZIh.js +1 -0
  550. package/dist/chunks/templateJobs-Db630FZD.js +12 -0
  551. package/dist/chunks/terminalSetup-DJqWE8fc.js +33 -0
  552. package/dist/chunks/terminalSetup-ygKHrVKR.js +1 -0
  553. package/dist/chunks/theme-MmfFhdTD.js +1 -0
  554. package/dist/chunks/thinkback-CrNirB0V.js +1 -0
  555. package/dist/chunks/thinkback-Quc7KPmi.js +1 -0
  556. package/dist/chunks/thinkback-play-CQ1s7oqg.js +1 -0
  557. package/dist/chunks/tmux-CvbhsfwG.js +1 -0
  558. package/dist/chunks/toolEventObserver-BqMplcIk.js +1 -0
  559. package/dist/chunks/toolEventObserver-DBq2XBYY.js +1 -0
  560. package/dist/chunks/toolPool-BkCtTKXz.js +1 -0
  561. package/dist/chunks/toolPool-C7bOwJfR.js +1 -0
  562. package/dist/chunks/trustedDevice-C9Zevohz.js +1 -0
  563. package/dist/chunks/trustedDevice-DEuQUTbz.js +1 -0
  564. package/dist/chunks/tui-BVc2q4Xv.js +6 -0
  565. package/dist/chunks/turndown.es-Bv06VjMb.js +69 -0
  566. package/dist/chunks/types-CQ1wrnQ0.js +1 -0
  567. package/dist/chunks/types-Csi32ZXh.js +17 -0
  568. package/dist/chunks/types-RJTEOuIt.js +3 -0
  569. package/dist/chunks/udsClient-BvG_Jip0.js +1 -0
  570. package/dist/chunks/ultrareviewCommand-DrlfRrXq.js +3 -0
  571. package/dist/chunks/undercover-CBeHiWUd.js +1 -0
  572. package/dist/chunks/undercover-DKn95mh9.js +31 -0
  573. package/dist/chunks/up-D-U4wUCe.js +12 -0
  574. package/dist/chunks/updateCCB-CJ7dCUan.js +11 -0
  575. package/dist/chunks/upgrade-Degqbu8S.js +1 -0
  576. package/dist/chunks/upgrade-ucJ-lnlY.js +1 -0
  577. package/dist/chunks/upload-pTZQCPLt.js +1 -0
  578. package/dist/chunks/upstreamproxy-DcLeL2XX.js +11 -0
  579. package/dist/chunks/usage-D96a7Cke.js +1 -0
  580. package/dist/chunks/usage-DVQMUMcC.js +1 -0
  581. package/dist/chunks/useKeybinding-FsOnjW6T.js +1 -0
  582. package/dist/chunks/useMainLoopModel-B7ch2o9K.js +1 -0
  583. package/dist/chunks/useManagePlugins-BfGzHMvO.js +1 -0
  584. package/dist/chunks/useMergedTools-TemEvCrX.js +1 -0
  585. package/dist/chunks/useSearchInput-B-V4kIa-.js +1 -0
  586. package/dist/chunks/useSettingsErrors-B2JGz1s8.js +1 -0
  587. package/dist/chunks/useVoice-BuwYDm2U.js +1 -0
  588. package/dist/chunks/util-CeIKZmj9.js +1 -0
  589. package/dist/chunks/utils-CwhszpkT.js +1 -0
  590. package/dist/chunks/v4-f1i_CNUT.js +1 -0
  591. package/dist/chunks/validatePlugin-BlVho93x.js +1 -0
  592. package/dist/chunks/vertex-sdk-CSGw3fvU.js +9 -0
  593. package/dist/chunks/vim-DUZQCWUP.js +1 -0
  594. package/dist/chunks/voice-BkRIHZiM.js +2 -0
  595. package/dist/chunks/voice-DXiiy8HX.js +8 -0
  596. package/dist/chunks/voiceModeEnabled-CPQUE3PU.js +1 -0
  597. package/dist/chunks/voiceModeEnabled-DB8GCzAF.js +1 -0
  598. package/dist/chunks/voiceStreamSTT-DgoDscHn.js +1 -0
  599. package/dist/chunks/voiceStreamSTT-Dr_wH1Kh.js +1 -0
  600. package/dist/chunks/which-DqSAIvp2.js +1 -0
  601. package/dist/chunks/windowsPaths-C9CigqoF.js +1 -0
  602. package/dist/chunks/windowsPaths-swxCp7bX.js +2 -0
  603. package/dist/chunks/workSecret-mS2OrpxF.js +1 -0
  604. package/dist/chunks/workerRegistry-CT7_kjvY.js +1 -0
  605. package/dist/chunks/worktree-DU3xtwKW.js +1 -0
  606. package/dist/chunks/worktreeModeEnabled-Db6b_Iy_.js +1 -0
  607. package/dist/chunks/worktreeModeEnabled-THQb19xR.js +1 -0
  608. package/dist/chunks/wrapper-BSK0MCQH.js +1 -0
  609. package/dist/chunks/wrapper-D5qL1aQL.js +6 -0
  610. package/dist/chunks/xdg-CBxMmQux.js +1 -0
  611. package/dist/chunks/xml-DD_ldd3X.js +1 -0
  612. package/dist/chunks/zod-DT6hytkp.js +1 -0
  613. package/dist/cli.js +1 -10934
  614. package/package.json +1 -1
@@ -0,0 +1,103 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{g as i}from"./client-_sjL0I7A.js";import{n as a,t as o}from"./figures-gfT9mM8P.js";import{In as s,Ln as c,Rn as l,b as u,f as d,g as f,h as p,m,t as h,tt as g,x as _}from"./src-Di342QoJ.js";import{t as v}from"./jsx-runtime-D-D469L8.js";import{Ct as y,cn as b}from"./state-sIHsFpDu.js";import{$o as x,Bc as S,Bl as ee,Do as C,Fa as te,Hc as ne,Na as re,Po as ie,a as ae,ec as oe,jo as se,ls as ce,nc as le,rs as ue,s as de,us as fe,zl as pe}from"./paths-Q2255dD7.js";import{K as me,R as he,T as ge,V as _e,w as ve}from"./debug-UI3T040K.js";import{n as ye,r as be}from"./analytics-DqMQntaB.js";import{n as xe,t as Se}from"./cwd--iizewsn.js";import{t as Ce}from"./sdk-DEtgRZvI.js";import{o as we,s as Te}from"./log-CzsijfHZ.js";import{b as Ee,x as De}from"./teammate-DMYOtLTK.js";import{E as Oe,x as ke}from"./startupProfiler-DnXZaX4A.js";import{AE as Ae,Ap as je,Bc as Me,Bg as Ne,Bp as Pe,CD as Fe,Dp as Ie,Dx as Le,Ep as Re,Fw as ze,Gf as Be,Gn as Ve,Hg as He,IE as Ue,Iw as We,JS as w,Jy as Ge,Kf as Ke,Ko as qe,Ku as Je,Lf as Ye,Lo as Xe,Lp as Ze,ME as Qe,MS as $e,Mp as et,Np as tt,Nx as nt,Ox as rt,PS as it,Px as at,Rf as ot,Rp as st,SD as ct,S_ as lt,Un as ut,Vc as dt,Wf as ft,Wn as pt,XC as mt,Xy as ht,YS as T,Yy as gt,ZC as _t,Zy as vt,b_ as yt,bo as bt,c as xt,cC as St,c_ as Ct,fk as wt,gy as Tt,hp as Et,hu as Dt,jE as Ot,jO as kt,jS as At,jp as jt,l as Mt,lC as Nt,l_ as Pt,lt as Ft,mp as It,mu as Lt,my as Rt,nE as zt,np as Bt,o as Vt,pk as Ht,qf as Ut,qu as Wt,qy as Gt,r as Kt,rt as qt,s as Jt,s_ as Yt,st as Xt,t as Zt,tE as Qt,tp as $t,tt as en,y_ as tn,zp as nn}from"./loadAgentsDir-Ci5mr0vm.js";import{Bn as rn,Vn as an}from"./prompt-DEPUnJdB.js";import{X as on}from"./rcDebugLog-BbPkkigY.js";import{t as E}from"./useKeybinding-FsOnjW6T.js";import{l as sn,u as cn}from"./referral-ByevBJrE.js";import{r as ln,t as un}from"./TungstenTool-V-Bwqlx3.js";import{a as dn,i as fn,n as pn,o as mn,r as hn,t as gn}from"./agentDisplay-B9z7i8b_.js";import{n as _n,t as vn}from"./useMergedTools-TemEvCrX.js";import{n as yn,r as bn,t as xn}from"./promptEditor-Ci-h04-5.js";import{n as Sn,t as Cn}from"./useMainLoopModel-B7ch2o9K.js";import{join as D}from"path";import{mkdir as wn,open as Tn,unlink as En}from"fs/promises";var O,Dn=e((()=>{O={FOLDER_NAME:`.claude`,AGENTS_DIR:`agents`}}));function On(e,t,n,r,i,a,o,s){return`---
2
+ name: ${e}
3
+ description: "${t.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\\\n`)}"${n===void 0||n.length===1&&n[0]===`*`?``:`\ntools: ${n.join(`, `)}`}${a?`\nmodel: ${a}`:``}${s===void 0?``:`\neffort: ${s}`}${i?`\ncolor: ${i}`:``}${o?`\nmemory: ${o}`:``}
4
+ ---
5
+
6
+ ${r}
7
+ `}function kn(e){switch(e){case`flagSettings`:throw Error(`Cannot get directory path for ${e} agents`);case`userSettings`:return D(n(),O.AGENTS_DIR);case`projectSettings`:return D(Se(),O.FOLDER_NAME,O.AGENTS_DIR);case`policySettings`:return D(S(),O.FOLDER_NAME,O.AGENTS_DIR);case`localSettings`:return D(Se(),O.FOLDER_NAME,O.AGENTS_DIR)}}function An(e){switch(e){case`projectSettings`:return D(`.`,O.FOLDER_NAME,O.AGENTS_DIR);default:return kn(e)}}function jn(e){return D(kn(e.source),`${e.agentType}.md`)}function Mn(e){if(e.source===`built-in`)return`Built-in`;if(e.source===`plugin`)throw Error(`Cannot get file path for plugin agents`);return D(kn(e.source),`${e.filename||e.agentType}.md`)}function Nn(e){return e.source===`built-in`?`Built-in`:D(An(e.source),`${e.agentType}.md`)}function Pn(e){return Jt(e)?`Built-in`:Mt(e)?`Plugin: ${e.plugin||`Unknown`}`:e.source===`flagSettings`?`CLI argument`:D(An(e.source),`${e.filename||e.agentType}.md`)}async function Fn(e){let t=kn(e);return await wn(t,{recursive:!0}),t}async function In(e,t,n,r,i,a=!0,o,s,c,l){if(e===`built-in`)throw Error(`Cannot save built-in agents`);await Fn(e);let u=jn({source:e,agentType:t}),d=On(t,n,r,i,o,s,c,l);try{await zn(u,d,a?`wx`:`w`)}catch(e){throw he(e)===`EEXIST`?Error(`Agent file already exists: ${u}`):e}}async function Ln(e,t,n,r,i,a,o,s){if(e.source===`built-in`)throw Error(`Cannot update built-in agents`);await zn(Mn(e),On(e.agentType,t,n,r,i,a,o,s))}async function Rn(e){if(e.source===`built-in`)throw Error(`Cannot delete built-in agents`);let t=Mn(e);try{await En(t)}catch(e){if(he(e)!==`ENOENT`)throw e}}async function zn(e,t,n=`w`){let r=await Tn(e,n);try{await r.writeFile(t,{encoding:`utf-8`}),await r.datasync()}finally{await r.close()}}var Bn=e((()=>{ne(),Vt(),xe(),r(),_e(),Dn()}));function Vn({agent:e,tools:t,onBack:n}){let r=Pt(e,t,!1),i=Pn(e),a=gt(e.agentType);g(`confirm:no`,n,{context:`Confirmation`});let s=e=>{e.key===`return`&&(e.preventDefault(),n())};function c(){return r.hasWildcard?(0,k.jsx)(u,{children:`All tools`}):!e.tools||e.tools.length===0?(0,k.jsx)(u,{children:`None`}):(0,k.jsxs)(k.Fragment,{children:[r.validTools.length>0&&(0,k.jsx)(u,{children:r.validTools.join(`, `)}),r.invalidTools.length>0&&(0,k.jsxs)(u,{color:`warning`,children:[o.warning,` Unrecognized: `,r.invalidTools.join(`, `)]})]})}return(0,k.jsxs)(_,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:s,children:[(0,k.jsx)(u,{dimColor:!0,children:i}),(0,k.jsxs)(_,{flexDirection:`column`,children:[(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Description`}),` (tells Claude when to use this agent):`]}),(0,k.jsx)(_,{marginLeft:2,children:(0,k.jsx)(u,{children:e.whenToUse})})]}),(0,k.jsxs)(_,{children:[(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Tools`}),`:`,` `]}),c()]}),(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Model`}),`: `,tn(e.model)]}),e.permissionMode&&(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Permission mode`}),`: `,e.permissionMode]}),e.memory&&(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Memory`}),`: `,ut(e.memory)]}),e.hooks&&Object.keys(e.hooks).length>0&&(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Hooks`}),`: `,Object.keys(e.hooks).join(`, `)]}),e.skills&&e.skills.length>0&&(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Skills`}),`:`,` `,e.skills.length>10?`${e.skills.length} skills`:e.skills.join(`, `)]}),a&&(0,k.jsx)(_,{children:(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`Color`}),`:`,` `,(0,k.jsxs)(u,{backgroundColor:a,color:`inverseText`,children:[` `,e.agentType,` `]})]})}),!Jt(e)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(_,{children:(0,k.jsxs)(u,{children:[(0,k.jsx)(u,{bold:!0,children:`System prompt`}),`:`]})}),(0,k.jsx)(_,{marginLeft:2,marginRight:2,children:(0,k.jsx)(Ne,{children:e.getSystemPrompt()})})]})]})}var k,Hn=e((()=>{a(),l(),h(),E(),ht(),pt(),Ct(),Vt(),lt(),He(),Bn(),k=v()}));function Un({agentName:e,currentColor:t=`automatic`,onConfirm:n}){let[r,i]=(0,Wn.useState)(Math.max(0,Gn.indexOf(t))),a=e=>{if(e.key===`up`)e.preventDefault(),i(e=>e>0?e-1:Gn.length-1);else if(e.key===`down`)e.preventDefault(),i(e=>e<Gn.length-1?e+1:0);else if(e.key===`return`){e.preventDefault();let t=Gn[r];n(t===`automatic`?void 0:t)}},s=Gn[r];return(0,A.jsxs)(_,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:a,children:[(0,A.jsx)(_,{flexDirection:`column`,children:Gn.map((e,t)=>{let n=t===r;return(0,A.jsxs)(_,{flexDirection:`row`,gap:1,children:[(0,A.jsx)(u,{color:n?`suggestion`:void 0,children:n?o.pointer:` `}),e===`automatic`?(0,A.jsx)(u,{bold:n,children:`Automatic color`}):(0,A.jsxs)(_,{gap:1,children:[(0,A.jsx)(u,{backgroundColor:Ge[e],color:`inverseText`,children:` `}),(0,A.jsx)(u,{bold:n,children:C(e)})]})]},e)})}),(0,A.jsxs)(_,{marginTop:1,children:[(0,A.jsx)(u,{children:`Preview: `}),s===void 0||s===`automatic`?(0,A.jsxs)(u,{inverse:!0,bold:!0,children:[` `,`@`,e,` `]}):(0,A.jsxs)(u,{backgroundColor:Ge[s],color:`inverseText`,bold:!0,children:[` `,`@`,e,` `]})]})]})}var Wn,A,Gn,Kn=e((()=>{a(),Wn=t(l(),1),h(),ht(),se(),A=v(),Gn=[`automatic`,...Gt]}));function qn({initialModel:e,onComplete:t,onCancel:n}){let r=Jn.useMemo(()=>{let t=yt();return e&&!t.some(t=>t.value===e)?[{value:e,label:e,description:`Current model (custom ID)`},...t]:t},[e]);return(0,Yn.jsxs)(_,{flexDirection:`column`,children:[(0,Yn.jsx)(_,{marginBottom:1,children:(0,Yn.jsx)(u,{dimColor:!0,children:`Model determines the agent's reasoning capabilities and speed.`})}),(0,Yn.jsx)(Le,{options:r,defaultValue:e??`sonnet`,onChange:t,onCancel:()=>n?n():t(void 0)})]})}var Jn,Yn,Xn=e((()=>{Jn=t(l(),1),h(),lt(),rt(),Yn=v()}));function Zn(){return{READ_ONLY:{name:`Read-only tools`,toolNames:new Set([je.name,et.name,Ye.name,Me.name,It.name,Qt.name,ft.name,$t.name,Ke.name,ze.name,St.name])},EDIT:{name:`Edit tools`,toolNames:new Set([nn.name,Ze.name,Re.name])},EXECUTION:{name:`Execution tools`,toolNames:new Set([Lt.name,process.env.USER_TYPE===`ant`?un.name:void 0].filter(e=>e!==void 0))},MCP:{name:`MCP tools`,toolNames:new Set,isMcp:!0},OTHER:{name:`Other tools`,toolNames:new Set}}}function Qn(e){let t=new Map;return e.forEach(e=>{if(_t(e)){let n=fe(e.name);if(n?.serverName){let r=t.get(n.serverName)||[];r.push(e),t.set(n.serverName,r)}}}),Array.from(t.entries()).map(([e,t])=>({serverName:e,tools:t})).sort((e,t)=>e.serverName.localeCompare(t.serverName))}function $n({tools:e,initialTools:t,onComplete:n,onCancel:r}){let i=(0,j.useMemo)(()=>Yt({tools:e,isBuiltIn:!1,isAsync:!1}),[e]),[a,s]=(0,j.useState)(!t||t.includes(`*`)?i.map(e=>e.name):t),[c,l]=(0,j.useState)(0),[d,f]=(0,j.useState)(!1),p=(0,j.useMemo)(()=>{let e=new Set(i.map(e=>e.name));return a.filter(t=>e.has(t))},[a,i]),h=new Set(p),v=p.length===i.length&&i.length>0,y=e=>{e&&s(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},b=(e,t)=>{s(n=>{if(t){let t=e.filter(e=>!n.includes(e));return[...n,...t]}else return n.filter(t=>!e.includes(t))})},x=()=>{let e=i.map(e=>e.name);n(p.length===e.length&&e.every(e=>p.includes(e))?void 0:p)},S=(0,j.useMemo)(()=>{let e=Zn(),t={readOnly:[],edit:[],execution:[],mcp:[],other:[]};return i.forEach(n=>{_t(n)?t.mcp.push(n):e.READ_ONLY.toolNames.has(n.name)?t.readOnly.push(n):e.EDIT.toolNames.has(n.name)?t.edit.push(n):e.EXECUTION.toolNames.has(n.name)?t.execution.push(n):n.name!==`Agent`&&t.other.push(n)}),t},[i]),ee=e=>{let t=Ee(e,e=>h.has(e.name))<e.length;return()=>{b(e.map(e=>e.name),t)}},C=[];C.push({id:`continue`,label:`Continue`,action:x,isContinue:!0}),C.push({id:`bucket-all`,label:`${v?o.checkboxOn:o.checkboxOff} All tools`,action:()=>{b(i.map(e=>e.name),!v)}});let te=Zn();[{id:`bucket-readonly`,name:te.READ_ONLY.name,tools:S.readOnly},{id:`bucket-edit`,name:te.EDIT.name,tools:S.edit},{id:`bucket-execution`,name:te.EXECUTION.name,tools:S.execution},{id:`bucket-mcp`,name:te.MCP.name,tools:S.mcp},{id:`bucket-other`,name:te.OTHER.name,tools:S.other}].forEach(({id:e,name:t,tools:n})=>{if(n.length===0)return;let r=Ee(n,e=>h.has(e.name))===n.length;C.push({id:e,label:`${r?o.checkboxOn:o.checkboxOff} ${t}`,action:ee(n)})});let ne=C.length;C.push({id:`toggle-individual`,label:d?`Hide advanced options`:`Show advanced options`,action:()=>{f(!d),d&&c>ne&&l(ne)},isToggle:!0});let re=(0,j.useMemo)(()=>Qn(i),[i]);return d&&(re.length>0&&(C.push({id:`mcp-servers-header`,label:`MCP Servers:`,action:()=>{},isHeader:!0}),re.forEach(({serverName:e,tools:t})=>{let n=Ee(t,e=>h.has(e.name))===t.length;C.push({id:`mcp-server-${e}`,label:`${n?o.checkboxOn:o.checkboxOff} ${e} (${t.length} ${ie(t.length,`tool`)})`,action:()=>{b(t.map(e=>e.name),!n)}})}),C.push({id:`tools-header`,label:`Individual Tools:`,action:()=>{},isHeader:!0})),i.forEach(e=>{let t=e.name;if(e.name.startsWith(`mcp__`)){let n=fe(e.name);t=n?`${n.toolName} (${n.serverName})`:e.name}C.push({id:`tool-${e.name}`,label:`${h.has(e.name)?o.checkboxOn:o.checkboxOff} ${t}`,action:()=>y(e.name)})})),g(`confirm:no`,(0,j.useCallback)(()=>{r?r():n(t)},[r,n,t]),{context:`Confirmation`}),(0,M.jsxs)(_,{flexDirection:`column`,marginTop:1,tabIndex:0,autoFocus:!0,onKeyDown:e=>{if(e.key===`return`){e.preventDefault();let t=C[c];t&&!t.isHeader&&t.action()}else if(e.key===`up`){e.preventDefault();let t=c-1;for(;t>0&&C[t]?.isHeader;)t--;l(Math.max(0,t))}else if(e.key===`down`){e.preventDefault();let t=c+1;for(;t<C.length-1&&C[t]?.isHeader;)t++;l(Math.min(C.length-1,t))}},children:[(0,M.jsxs)(u,{color:c===0?`suggestion`:void 0,bold:c===0,children:[c===0?`${o.pointer} `:` `,`[ Continue ]`]}),(0,M.jsx)(m,{width:40}),C.slice(1).map((e,t)=>{let n=t+1===c,r=e.isToggle,i=e.isHeader;return(0,M.jsxs)(j.Fragment,{children:[r&&(0,M.jsx)(m,{width:40}),i&&t>0&&(0,M.jsx)(_,{marginTop:1}),(0,M.jsxs)(u,{color:i?void 0:n?`suggestion`:void 0,dimColor:i,bold:r&&n,children:[i?``:n?`${o.pointer} `:` `,r?`[ ${e.label} ]`:e.label]})]},e.id)}),(0,M.jsx)(_,{marginTop:1,flexDirection:`column`,children:(0,M.jsx)(u,{dimColor:!0,children:v?`All tools selected`:`${h.size} of ${i.length} tools selected`})})]})}var j,M,er=e((()=>{a(),j=t(l(),1),ce(),mt(),Ct(),ue(),Dt(),ot(),Pe(),dt(),st(),jt(),tt(),We(),Ie(),Nt(),Ut(),Bt(),zt(),ln(),Et(),Be(),h(),E(),De(),se(),M=v()}));function tr(e){return e===`all`?`Agents`:e===`built-in`?`Built-in agents`:e===`plugin`?`Plugin agents`:pe(oe(e))}var nr=e((()=>{ee(),le()}));function rr({agent:e,tools:t,onSaved:n,onBack:r}){let i=it(),[a,c]=(0,N.useState)(`menu`),[l,d]=(0,N.useState)(0),[f,p]=(0,N.useState)(null),[m,h]=(0,N.useState)(e.color),v=(0,N.useCallback)(async()=>{let t=await xn(Mn(e));t.error?p(t.error):n(`Opened ${e.agentType} in editor. If you made edits, restart to load the latest version.`)},[e,n]),y=(0,N.useCallback)(async(t={})=>{let{tools:r,color:a,model:o}=t,c=a??m,l=r!==void 0,u=o!==void 0,d=c!==e.color;if(!l&&!u&&!d)return!1;try{return!xt(e)&&!Mt(e)?!1:(await Ln(e,e.whenToUse,r??e.tools,e.getSystemPrompt(),c,o??e.model),d&&c&&vt(e.agentType,c),i(t=>{let n=t.agentDefinitions.allAgents.map(t=>t.agentType===e.agentType?{...t,tools:r??t.tools,color:c,model:o??t.model}:t);return{...t,agentDefinitions:{...t.agentDefinitions,activeAgents:Kt(n),allAgents:n}}}),n(`Updated agent: ${s.bold(e.agentType)}`),!0)}catch(e){return p(e instanceof Error?e.message:`Failed to save agent`),!1}},[e,m,n,i]),b=(0,N.useMemo)(()=>[{label:`Open in editor`,action:v},{label:`Edit tools`,action:()=>c(`edit-tools`)},{label:`Edit model`,action:()=>c(`edit-model`)},{label:`Edit color`,action:()=>c(`edit-color`)}],[v]),x=(0,N.useCallback)(()=>{p(null),a===`menu`?r():c(`menu`)},[a,r]),S=(0,N.useCallback)(e=>{if(e.key===`up`)e.preventDefault(),d(e=>Math.max(0,e-1));else if(e.key===`down`)e.preventDefault(),d(e=>Math.min(b.length-1,e+1));else if(e.key===`return`){e.preventDefault();let t=b[l];t&&t.action()}},[b,l]);g(`confirm:no`,x,{context:`Confirmation`});let ee=()=>(0,P.jsxs)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:S,children:[(0,P.jsxs)(u,{dimColor:!0,children:[`Source: `,tr(e.source)]}),(0,P.jsx)(_,{marginTop:1,flexDirection:`column`,children:b.map((e,t)=>(0,P.jsxs)(u,{color:t===l?`suggestion`:void 0,children:[t===l?`${o.pointer} `:` `,e.label]},e.label))}),f&&(0,P.jsx)(_,{marginTop:1,children:(0,P.jsx)(u,{color:`error`,children:f})})]});switch(a){case`menu`:return ee();case`edit-tools`:return(0,P.jsx)($n,{tools:t,initialTools:e.tools,onComplete:async e=>{c(`menu`),await y({tools:e})}});case`edit-color`:return(0,P.jsx)(Un,{agentName:e.agentType,currentColor:m||e.color||`automatic`,onConfirm:async e=>{h(e),c(`menu`),await y({color:e})}});case`edit-model`:return(0,P.jsx)(qn,{initialModel:e.model,onComplete:async e=>{c(`menu`),await y({model:e})}});default:return null}}var N,P,ir=e((()=>{c(),a(),l(),N=t(l(),1),At(),h(),E(),ht(),Vt(),bn(),Bn(),Kn(),Xn(),er(),nr(),P=v()}));function ar({instructions:e=`Press ↑↓ to navigate · Enter to select · Esc to go back`}){let t=cn();return(0,or.jsx)(_,{marginLeft:2,children:(0,or.jsx)(u,{dimColor:!0,children:t.pending?`Press ${t.keyName} again to exit`:e})})}var or,sr=e((()=>{l(),sn(),h(),or=v()}));function cr({source:e,agents:t,onBack:n,onSelect:r,onCreateNew:i,changes:a}){let[s,c]=F.useState(null),[l,f]=F.useState(!0),p=F.useMemo(()=>[...t].sort(pn),[t]),h=e=>({isOverridden:!!e.overriddenBy,overriddenBy:e.overriddenBy||null}),g=()=>(0,I.jsxs)(_,{children:[(0,I.jsx)(u,{color:l?`suggestion`:void 0,children:l?`${o.pointer} `:` `}),(0,I.jsx)(u,{color:l?`suggestion`:void 0,children:`Create new agent`})]}),v=e=>{let t=e.source===`built-in`,n=!t&&!l&&s?.agentType===e.agentType&&s?.source===e.source,{isOverridden:r,overriddenBy:i}=h(e),a=t||r,c=!t&&n?`suggestion`:void 0,d=dn(e);return(0,I.jsxs)(_,{children:[(0,I.jsx)(u,{dimColor:a&&!n,color:c,children:t?``:n?`${o.pointer} `:` `}),(0,I.jsx)(u,{dimColor:a&&!n,color:c,children:e.agentType}),d&&(0,I.jsxs)(u,{dimColor:!0,color:c,children:[` · `,d]}),e.memory&&(0,I.jsxs)(u,{dimColor:!0,color:c,children:[` · `,e.memory,` memory`]}),i&&(0,I.jsxs)(u,{dimColor:!n,color:n?`warning`:void 0,children:[` `,o.warning,` shadowed by `,hn(i)]})]},`${e.agentType}-${e.source}`)},y=F.useMemo(()=>{let t=p.filter(e=>e.source!==`built-in`);return e===`all`?gn.filter(e=>e.source!==`built-in`).flatMap(({source:e})=>t.filter(t=>t.source===e)):t},[p,e]);F.useEffect(()=>{!s&&!l&&y.length>0&&(i?f(!0):c(y[0]||null))},[y,s,l,i]);let b=e=>{if(e.key===`return`){e.preventDefault(),l&&i?i():s&&r(s);return}if(e.key!==`up`&&e.key!==`down`)return;e.preventDefault();let t=!!i,n=y.length+ +!!t;if(n===0)return;let a=0;if(!l&&s){let e=y.findIndex(e=>e.agentType===s.agentType&&e.source===s.source);e>=0&&(a=t?e+1:e)}let o=e.key===`up`?a===0?n-1:a-1:a===n-1?0:a+1;if(t&&o===0)f(!0),c(null);else{let e=y[t?o-1:o];e&&(f(!1),c(e))}},x=(e=`Built-in (always available):`)=>{let t=p.filter(e=>e.source===`built-in`);return(0,I.jsxs)(_,{flexDirection:`column`,marginBottom:1,paddingLeft:2,children:[(0,I.jsx)(u,{bold:!0,dimColor:!0,children:e}),t.map(v)]})},S=(e,t)=>{if(!t.length)return null;let n=t[0]?.baseDir;return(0,I.jsxs)(_,{flexDirection:`column`,marginBottom:1,children:[(0,I.jsxs)(_,{paddingLeft:2,children:[(0,I.jsx)(u,{bold:!0,dimColor:!0,children:e}),n&&(0,I.jsxs)(u,{dimColor:!0,children:[` (`,n,`)`]})]}),t.map(e=>v(e))]})},ee=tr(e),C=p.filter(e=>e.source===`built-in`);return!p.length||e!==`built-in`&&!p.some(e=>e.source!==`built-in`)?(0,I.jsx)(d,{title:ee,subtitle:`No agents found`,onCancel:n,hideInputGuide:!0,children:(0,I.jsxs)(_,{flexDirection:`column`,gap:1,tabIndex:0,autoFocus:!0,onKeyDown:b,children:[i&&(0,I.jsx)(_,{children:g()}),(0,I.jsx)(u,{dimColor:!0,children:`No agents found. Create specialized subagents that Claude can delegate to.`}),(0,I.jsx)(u,{dimColor:!0,children:`Each subagent has its own context window, custom system prompt, and specific tools.`}),(0,I.jsx)(u,{dimColor:!0,children:`Try creating: Code Reviewer, Code Simplifier, Security Reviewer, Tech Lead, or UX Reviewer.`}),e!==`built-in`&&p.some(e=>e.source===`built-in`)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(m,{}),x()]})]})}):(0,I.jsxs)(d,{title:ee,subtitle:`${Ee(p,e=>!e.overriddenBy)} agents`,onCancel:n,hideInputGuide:!0,children:[a&&a.length>0&&(0,I.jsx)(_,{marginTop:1,children:(0,I.jsx)(u,{dimColor:!0,children:a[a.length-1]})}),(0,I.jsxs)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:b,children:[i&&(0,I.jsx)(_,{marginBottom:1,children:g()}),e===`all`?(0,I.jsxs)(I.Fragment,{children:[gn.filter(e=>e.source!==`built-in`).map(({label:e,source:t})=>(0,I.jsx)(F.Fragment,{children:S(e,p.filter(e=>e.source===t))},t)),C.length>0&&(0,I.jsxs)(_,{flexDirection:`column`,marginBottom:1,paddingLeft:2,children:[(0,I.jsxs)(u,{dimColor:!0,children:[(0,I.jsx)(u,{bold:!0,children:`Built-in agents`}),` (always available)`]}),C.map(v)]})]}):e===`built-in`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u,{dimColor:!0,italic:!0,children:`Built-in agents are provided by default and cannot be modified.`}),(0,I.jsx)(_,{marginTop:1,flexDirection:`column`,children:p.map(e=>v(e))})]}):(0,I.jsxs)(I.Fragment,{children:[p.filter(e=>e.source!==`built-in`).map(e=>v(e)),p.some(e=>e.source===`built-in`)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(m,{}),x()]})]})]})]})}var F,I,lr=e((()=>{a(),F=t(l(),1),h(),fn(),De(),nr(),I=v()}));function ur({steps:e,initialData:t={},onComplete:n,onCancel:r,children:i,title:a,showStepCounter:o=!0}){let[s,c]=(0,L.useState)(0),[l,u]=(0,L.useState)(t),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)([]);cn(),(0,L.useEffect)(()=>{d&&(m([]),n(l))},[d,l,n]);let h=(0,L.useCallback)(()=>{s<e.length-1?(p.length>0&&m(e=>[...e,s]),c(e=>e+1)):f(!0)},[s,e.length,p]),g=(0,L.useCallback)(()=>{if(p.length>0){let e=p[p.length-1];e!==void 0&&(m(e=>e.slice(0,-1)),c(e))}else s>0?c(e=>e-1):r&&r()},[s,p,r]),_=(0,L.useCallback)(t=>{t>=0&&t<e.length&&(m(e=>[...e,s]),c(t))},[s,e.length]),v=(0,L.useCallback)(()=>{m([]),r&&r()},[r]),y=(0,L.useCallback)(e=>{u(t=>({...t,...e}))},[]),b=(0,L.useMemo)(()=>({currentStepIndex:s,totalSteps:e.length,wizardData:l,setWizardData:u,updateWizardData:y,goNext:h,goBack:g,goToStep:_,cancel:v,title:a,showStepCounter:o}),[s,e.length,l,y,h,g,_,v,a,o]),x=e[s];return!x||d?null:(0,dr.jsx)(fr.Provider,{value:b,children:i||(0,dr.jsx)(x,{})})}var L,dr,fr,pr=e((()=>{L=t(l(),1),sn(),dr=v(),fr=(0,L.createContext)(null)}));function R(){let e=(0,mr.useContext)(fr);if(!e)throw Error(`useWizard must be used within a WizardProvider`);return e}var mr,hr=e((()=>{mr=t(l(),1),pr()}));function gr({instructions:e=(0,z.jsxs)(p,{children:[(0,z.jsx)(f,{shortcut:`↑↓`,action:`navigate`}),(0,z.jsx)(f,{shortcut:`Enter`,action:`select`}),(0,z.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]})}){let t=cn();return(0,z.jsx)(_,{marginLeft:3,marginTop:1,children:(0,z.jsx)(u,{dimColor:!0,children:t.pending?`Press ${t.keyName} again to exit`:e})})}var z,_r=e((()=>{sn(),h(),T(),z=v()}));function B({title:e,color:t=`suggestion`,children:n,subtitle:r,footerText:i}){let{currentStepIndex:a,totalSteps:o,title:s,showStepCounter:c,goBack:l}=R();return(0,vr.jsxs)(vr.Fragment,{children:[(0,vr.jsx)(d,{title:`${e||s||`Wizard`}${c===!1?``:` (${a+1}/${o})`}`,subtitle:r,onCancel:l,color:t,hideInputGuide:!0,isCancelActive:!1,children:n}),(0,vr.jsx)(gr,{instructions:i})]})}var vr,V=e((()=>{h(),hr(),_r(),vr=v()})),H=e((()=>{hr(),V(),_r(),pr()}));function yr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=R();return g(`confirm:no`,t,{context:`Confirmation`}),(0,U.jsx)(B,{subtitle:`Choose background color`,footerText:(0,U.jsxs)(p,{children:[(0,U.jsx)(f,{shortcut:`↑↓`,action:`navigate`}),(0,U.jsx)(f,{shortcut:`Enter`,action:`select`}),(0,U.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,U.jsx)(_,{children:(0,U.jsx)(Un,{agentName:r.agentType||`agent`,currentColor:`automatic`,onConfirm:t=>{n({selectedColor:t,finalAgent:{agentType:r.agentType,whenToUse:r.whenToUse,getSystemPrompt:()=>r.systemPrompt,tools:r.selectedTools,...r.selectedModel?{model:r.selectedModel}:{},...t?{color:t}:{},source:r.location}}),e()}})})})}var U,br=e((()=>{h(),E(),T(),H(),V(),Kn(),U=v()}));function xr(e){return e?/^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$/.test(e)?e.length<3?`Agent type must be at least 3 characters long`:e.length>50?`Agent type must be less than 50 characters`:null:`Agent type must start and end with alphanumeric characters and contain only letters, numbers, and hyphens`:`Agent type is required`}function Sr(e,t,n){let r=[],i=[];if(!e.agentType)r.push(`Agent type is required`);else{let t=xr(e.agentType);t&&r.push(t);let i=n.find(t=>t.agentType===e.agentType&&t.source!==e.source);i&&r.push(`Agent type "${e.agentType}" already exists in ${tr(i.source)}`)}if(e.whenToUse?e.whenToUse.length<10?i.push(`Description should be more descriptive (at least 10 characters)`):e.whenToUse.length>5e3&&i.push(`Description is very long (over 5000 characters)`):r.push(`Description (description) is required`),e.tools!==void 0&&!Array.isArray(e.tools))r.push(`Tools must be an array`);else{e.tools===void 0?i.push(`Agent has access to all tools`):e.tools.length===0&&i.push(`No tools selected - agent will have very limited capabilities`);let n=Pt(e,t,!1);n.invalidTools.length>0&&r.push(`Invalid tools: ${n.invalidTools.join(`, `)}`)}let a=e.getSystemPrompt();return a?a.length<20?r.push(`System prompt is too short (minimum 20 characters)`):a.length>1e4&&i.push(`System prompt is very long (over 10,000 characters)`):r.push(`System prompt is required`),{isValid:r.length===0,errors:r,warnings:i}}var Cr=e((()=>{Ct(),nr()}));function wr({tools:e,existingAgents:t,onSave:n,onSaveAndEdit:r,error:i}){let{goBack:a,wizardData:o}=R();g(`confirm:no`,a,{context:`Confirmation`});let s=e=>{e.key===`s`||e.key===`return`?(e.preventDefault(),n()):e.key===`e`&&(e.preventDefault(),r())},c=o.finalAgent,l=Sr(c,e,t),d=Oe(c.getSystemPrompt(),240),m=Oe(c.whenToUse,240),h=e=>e===void 0?`All tools`:e.length===0?`None`:e.length===1?e[0]||`None`:e.length===2?e.join(` and `):`${e.slice(0,-1).join(`, `)}, and ${e[e.length-1]}`,v=de()?(0,W.jsxs)(u,{children:[(0,W.jsx)(u,{bold:!0,children:`Memory`}),`: `,ut(c.memory)]}):null;return(0,W.jsx)(B,{subtitle:`Confirm and save`,footerText:(0,W.jsxs)(p,{children:[(0,W.jsx)(f,{shortcut:`s/Enter`,action:`save`}),(0,W.jsx)(f,{shortcut:`e`,action:`edit in your editor`}),(0,W.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}),children:(0,W.jsxs)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:s,children:[(0,W.jsxs)(u,{children:[(0,W.jsx)(u,{bold:!0,children:`Name`}),`: `,c.agentType]}),(0,W.jsxs)(u,{children:[(0,W.jsx)(u,{bold:!0,children:`Location`}),`:`,` `,Nn({source:o.location,agentType:c.agentType})]}),(0,W.jsxs)(u,{children:[(0,W.jsx)(u,{bold:!0,children:`Tools`}),`: `,h(c.tools)]}),(0,W.jsxs)(u,{children:[(0,W.jsx)(u,{bold:!0,children:`Model`}),`: `,tn(c.model)]}),v,(0,W.jsx)(_,{marginTop:1,children:(0,W.jsxs)(u,{children:[(0,W.jsx)(u,{bold:!0,children:`Description`}),` (tells Claude when to use this agent):`]})}),(0,W.jsx)(_,{marginLeft:2,marginTop:1,children:(0,W.jsx)(u,{children:m})}),(0,W.jsx)(_,{marginTop:1,children:(0,W.jsxs)(u,{children:[(0,W.jsx)(u,{bold:!0,children:`System prompt`}),`:`]})}),(0,W.jsx)(_,{marginLeft:2,marginTop:1,children:(0,W.jsx)(u,{children:d})}),l.warnings.length>0&&(0,W.jsxs)(_,{marginTop:1,flexDirection:`column`,children:[(0,W.jsx)(u,{color:`warning`,children:`Warnings:`}),l.warnings.map((e,t)=>(0,W.jsxs)(u,{dimColor:!0,children:[` `,`• `,e]},t))]}),l.errors.length>0&&(0,W.jsxs)(_,{marginTop:1,flexDirection:`column`,children:[(0,W.jsx)(u,{color:`error`,children:`Errors:`}),l.errors.map((e,t)=>(0,W.jsxs)(u,{color:`error`,children:[` `,`• `,e]},t))]}),i&&(0,W.jsx)(_,{marginTop:1,children:(0,W.jsx)(u,{color:`error`,children:i})}),(0,W.jsx)(_,{marginTop:2,children:(0,W.jsxs)(u,{color:`success`,children:[`Press `,(0,W.jsx)(u,{bold:!0,children:`s`}),` or `,(0,W.jsx)(u,{bold:!0,children:`Enter`}),` to save, `,(0,W.jsx)(u,{bold:!0,children:`e`}),` to save and edit`]})})]})})}var W,Tr=e((()=>{h(),E(),ae(),pt(),ke(),lt(),T(),H(),V(),Bn(),Cr(),W=v()}));function Er({tools:e,existingAgents:t,onComplete:n}){let{wizardData:r}=R(),[i,a]=(0,Dr.useState)(null),o=it(),c=(0,Dr.useCallback)(async e=>{if(r?.finalAgent)try{await In(r.location,r.finalAgent.agentType,r.finalAgent.whenToUse,r.finalAgent.tools,r.finalAgent.getSystemPrompt(),!0,r.finalAgent.color,r.finalAgent.model,r.finalAgent.memory),o(e=>{if(!r.finalAgent)return e;let t=e.agentDefinitions.allAgents.concat(r.finalAgent);return{...e,agentDefinitions:{...e.agentDefinitions,activeAgents:Kt(t),allAgents:t}}}),Zt(),e&&await xn(jn({source:r.location,agentType:r.finalAgent.agentType})),be(`tengu_agent_created`,{agent_type:r.finalAgent.agentType,generation_method:r.wasGenerated?`generated`:`manual`,source:r.location,tool_count:r.finalAgent.tools?.length??`all`,has_custom_model:!!r.finalAgent.model,has_custom_color:!!r.finalAgent.color,has_memory:!!r.finalAgent.memory,memory_scope:r.finalAgent.memory??`none`,...e?{opened_in_editor:!0}:{}}),n(e?`Created agent: ${s.bold(r.finalAgent.agentType)} and opened in editor. If you made edits, restart to load the latest version.`:`Created agent: ${s.bold(r.finalAgent.agentType)}`)}catch(e){a(e instanceof Error?e.message:`Failed to save agent`)}},[r,n,o]);return(0,Or.jsx)(wr,{tools:e,existingAgents:t,onSave:(0,Dr.useCallback)(()=>c(!1),[c]),onSaveAndEdit:(0,Dr.useCallback)(()=>c(!0),[c]),error:i})}var Dr,Or,kr=e((()=>{c(),Dr=t(l(),1),ye(),At(),Vt(),bn(),H(),Bn(),Tr(),Or=v()}));function Ar(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=R(),[i,a]=(0,jr.useState)(r.whenToUse||``),[o,s]=(0,jr.useState)(i.length),[c,l]=(0,jr.useState)(null);return g(`confirm:no`,t,{context:`Settings`}),g(`chat:externalEditor`,(0,jr.useCallback)(async()=>{let e=await yn(i);e.content!==null&&(a(e.content),s(e.content.length))},[i]),{context:`Chat`}),(0,G.jsx)(B,{subtitle:`Description (tell Claude when to use this agent)`,footerText:(0,G.jsxs)(p,{children:[(0,G.jsx)(f,{shortcut:`Type`,action:`enter text`}),(0,G.jsx)(f,{shortcut:`Enter`,action:`continue`}),(0,G.jsx)(w,{action:`chat:externalEditor`,context:`Chat`,fallback:`ctrl+g`,description:`open in editor`}),(0,G.jsx)(w,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,G.jsxs)(_,{flexDirection:`column`,children:[(0,G.jsx)(u,{children:`When should Claude use this agent?`}),(0,G.jsx)(_,{marginTop:1,children:(0,G.jsx)(nt,{value:i,onChange:a,onSubmit:t=>{let r=t.trim();if(!r){l(`Description is required`);return}l(null),n({whenToUse:r}),e()},placeholder:`e.g., use this agent after you're done writing code...`,columns:80,cursorOffset:o,onChangeCursorOffset:s,focus:!0,showCursor:!0})}),c&&(0,G.jsx)(_,{marginTop:1,children:(0,G.jsx)(u,{color:`error`,children:c})})]})})}var jr,G,Mr=e((()=>{jr=t(l(),1),h(),E(),bn(),T(),at(),H(),V(),G=v()}));async function Nr(e,t,n,r){let i=bt({content:`Create an agent configuration based on this request: "${e}".${n.length>0?`\n\nIMPORTANT: The following identifiers already exist and must NOT be used: ${n.join(`, `)}`:``}
8
+ Return ONLY the JSON object, no other text.`}),a=await wt(),o=Ft([i],a),s=de()?Pr+Fr:Pr,c=Ue()?Ot({sessionId:y(),model:t,provider:re(),name:`agent-creation`}):null,l=await qt({messages:qe(o),systemPrompt:on([s]),thinkingConfig:{type:`disabled`},tools:[],signal:r,options:{getToolPermissionContext:async()=>rn(),model:t,toolChoice:void 0,agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,querySource:`agent_creation`,mcpTools:[],langfuseTrace:c}});Qe(c);let u=(Array.isArray(l.message.content)?l.message.content:[]).filter(e=>e.type===`text`).map(e=>e.text).join(`
9
+ `),d;try{d=ge(u.trim())}catch{let e=u.match(/\{[\s\S]*\}/);if(!e)throw Error(`No JSON object found in response`);d=ge(e[0])}if(!d.identifier||!d.whenToUse||!d.systemPrompt)throw Error(`Invalid agent configuration generated`);return be(`tengu_agent_definition_generated`,{agent_identifier:d.identifier}),{identifier:d.identifier,whenToUse:d.whenToUse,systemPrompt:d.systemPrompt}}var Pr,Fr,Ir=e((()=>{Ht(),en(),an(),ue(),Xt(),Xe(),ae(),ye(),Ae(),b(),te(),ve(),kt(),Pr=`You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.
10
+
11
+ **Important Context**: You may have access to project-specific instructions from CLAUDE.md files and other context that may include coding standards, project structure, and custom requirements. Consider this context when creating agents to ensure they align with the project's established patterns and practices.
12
+
13
+ When a user describes what they want an agent to do, you will:
14
+
15
+ 1. **Extract Core Intent**: Identify the fundamental purpose, key responsibilities, and success criteria for the agent. Look for both explicit requirements and implicit needs. Consider any project-specific context from CLAUDE.md files. For agents that are meant to review code, you should assume that the user is asking to review recently written code and not the whole codebase, unless the user has explicitly instructed you otherwise.
16
+
17
+ 2. **Design Expert Persona**: Create a compelling expert identity that embodies deep domain knowledge relevant to the task. The persona should inspire confidence and guide the agent's decision-making approach.
18
+
19
+ 3. **Architect Comprehensive Instructions**: Develop a system prompt that:
20
+ - Establishes clear behavioral boundaries and operational parameters
21
+ - Provides specific methodologies and best practices for task execution
22
+ - Anticipates edge cases and provides guidance for handling them
23
+ - Incorporates any specific requirements or preferences mentioned by the user
24
+ - Defines output format expectations when relevant
25
+ - Aligns with project-specific coding standards and patterns from CLAUDE.md
26
+
27
+ 4. **Optimize for Performance**: Include:
28
+ - Decision-making frameworks appropriate to the domain
29
+ - Quality control mechanisms and self-verification steps
30
+ - Efficient workflow patterns
31
+ - Clear escalation or fallback strategies
32
+
33
+ 5. **Create Identifier**: Design a concise, descriptive identifier that:
34
+ - Uses lowercase letters, numbers, and hyphens only
35
+ - Is typically 2-4 words joined by hyphens
36
+ - Clearly indicates the agent's primary function
37
+ - Is memorable and easy to type
38
+ - Avoids generic terms like "helper" or "assistant"
39
+
40
+ 6 **Example agent descriptions**:
41
+ - in the 'whenToUse' field of the JSON object, you should include examples of when this agent should be used.
42
+ - examples should be of the form:
43
+ - <example>
44
+ Context: The user is creating a test-runner agent that should be called after a logical chunk of code is written.
45
+ user: "Please write a function that checks if a number is prime"
46
+ assistant: "Here is the relevant function: "
47
+ <function call omitted for brevity only for this example>
48
+ <commentary>
49
+ Since a significant piece of code was written, use the ${x} tool to launch the test-runner agent to run the tests.
50
+ </commentary>
51
+ assistant: "Now let me use the test-runner agent to run the tests"
52
+ </example>
53
+ - <example>
54
+ Context: User is creating an agent to respond to the word "hello" with a friendly jok.
55
+ user: "Hello"
56
+ assistant: "I'm going to use the ${x} tool to launch the greeting-responder agent to respond with a friendly joke"
57
+ <commentary>
58
+ Since the user is greeting, use the greeting-responder agent to respond with a friendly joke.
59
+ </commentary>
60
+ </example>
61
+ - If the user mentioned or implied that the agent should be used proactively, you should include examples of this.
62
+ - NOTE: Ensure that in the examples, you are making the assistant use the Agent tool and not simply respond directly to the task.
63
+
64
+ Your output must be a valid JSON object with exactly these fields:
65
+ {
66
+ "identifier": "A unique, descriptive identifier using lowercase letters, numbers, and hyphens (e.g., 'test-runner', 'api-docs-writer', 'code-formatter')",
67
+ "whenToUse": "A precise, actionable description starting with 'Use this agent when...' that clearly defines the triggering conditions and use cases. Ensure you include examples as described above.",
68
+ "systemPrompt": "The complete system prompt that will govern the agent's behavior, written in second person ('You are...', 'You will...') and structured for maximum clarity and effectiveness"
69
+ }
70
+
71
+ Key principles for your system prompts:
72
+ - Be specific rather than generic - avoid vague instructions
73
+ - Include concrete examples when they would clarify behavior
74
+ - Balance comprehensiveness with clarity - every instruction should add value
75
+ - Ensure the agent has enough context to handle variations of the core task
76
+ - Make the agent proactive in seeking clarification when needed
77
+ - Build in quality assurance and self-correction mechanisms
78
+
79
+ Remember: The agents you create should be autonomous experts capable of handling their designated tasks with minimal additional guidance. Your system prompts are their complete operational manual.
80
+ `,Fr=`
81
+
82
+ 7. **Agent Memory Instructions**: If the user mentions "memory", "remember", "learn", "persist", or similar concepts, OR if the agent would benefit from building up knowledge across conversations (e.g., code reviewers learning patterns, architects learning codebase structure, etc.), include domain-specific memory update instructions in the systemPrompt.
83
+
84
+ Add a section like this to the systemPrompt, tailored to the agent's specific domain:
85
+
86
+ "**Update your agent memory** as you discover [domain-specific items]. This builds up institutional knowledge across conversations. Write concise notes about what you found and where.
87
+
88
+ Examples of what to record:
89
+ - [domain-specific item 1]
90
+ - [domain-specific item 2]
91
+ - [domain-specific item 3]"
92
+
93
+ Examples of domain-specific memory instructions:
94
+ - For a code-reviewer: "Update your agent memory as you discover code patterns, style conventions, common issues, and architectural decisions in this codebase."
95
+ - For a test-runner: "Update your agent memory as you discover test patterns, common failure modes, flaky tests, and testing best practices."
96
+ - For an architect: "Update your agent memory as you discover codepaths, library locations, key architectural decisions, and component relationships."
97
+ - For a documentation writer: "Update your agent memory as you discover documentation patterns, API structures, and terminology conventions."
98
+
99
+ The memory instructions should be specific to what the agent would naturally learn while performing its core tasks.
100
+ `}));function Lr(){let{updateWizardData:e,goBack:t,goToStep:n,wizardData:r}=R(),[a,o]=(0,K.useState)(r.generationPrompt||``),[s,c]=(0,K.useState)(!1),[l,d]=(0,K.useState)(null),[f,m]=(0,K.useState)(a.length),h=Sn(),v=(0,K.useRef)(null);g(`confirm:no`,(0,K.useCallback)(()=>{v.current&&(v.current.abort(),v.current=null,c(!1),d(`Generation cancelled`))},[]),{context:`Settings`,isActive:s}),g(`chat:externalEditor`,(0,K.useCallback)(async()=>{let e=await yn(a);e.content!==null&&(o(e.content),m(e.content.length))},[a]),{context:`Chat`,isActive:!s}),g(`confirm:no`,(0,K.useCallback)(()=>{e({generationPrompt:``,agentType:``,systemPrompt:``,whenToUse:``,generatedAgent:void 0,wasGenerated:!1}),o(``),d(null),t()},[e,t]),{context:`Settings`,isActive:!s});let y=async()=>{let t=a.trim();if(!t){d(`Please describe what the agent should do`);return}d(null),c(!0),e({generationPrompt:t,isGenerating:!0});let r=ct();v.current=r;try{let i=await Nr(t,h,[],r.signal);e({agentType:i.identifier,whenToUse:i.whenToUse,systemPrompt:i.systemPrompt,generatedAgent:i,isGenerating:!1,wasGenerated:!0}),n(6)}catch(t){t instanceof i||t instanceof Error&&!t.message.includes(`No assistant message found`)&&d(t.message||`Failed to generate agent`),e({isGenerating:!1})}finally{c(!1),v.current=null}},b=`Describe what this agent should do and when it should be used (be comprehensive for best results)`;return s?(0,q.jsx)(B,{subtitle:b,footerText:(0,q.jsx)(w,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`}),children:(0,q.jsxs)(_,{flexDirection:`row`,alignItems:`center`,children:[(0,q.jsx)(Rt,{}),(0,q.jsx)(u,{color:`suggestion`,children:` Generating agent from description...`})]})}):(0,q.jsx)(B,{subtitle:b,footerText:(0,q.jsxs)(p,{children:[(0,q.jsx)(w,{action:`confirm:yes`,context:`Confirmation`,fallback:`Enter`,description:`submit`}),(0,q.jsx)(w,{action:`chat:externalEditor`,context:`Chat`,fallback:`ctrl+g`,description:`open in editor`}),(0,q.jsx)(w,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,q.jsxs)(_,{flexDirection:`column`,children:[l&&(0,q.jsx)(_,{marginBottom:1,children:(0,q.jsx)(u,{color:`error`,children:l})}),(0,q.jsx)(nt,{value:a,onChange:o,onSubmit:y,placeholder:`e.g., Help me write unit tests for my code...`,columns:80,cursorOffset:f,onChangeCursorOffset:m,focus:!0,showCursor:!0})]})})}var K,q,Rr=e((()=>{Ce(),K=t(l(),1),Cn(),h(),E(),Fe(),bn(),T(),Tt(),at(),H(),V(),Ir(),q=v()}));function zr(){let{goNext:e,updateWizardData:t,cancel:n}=R();return(0,J.jsx)(B,{subtitle:`Choose location`,footerText:(0,J.jsxs)(p,{children:[(0,J.jsx)(f,{shortcut:`↑↓`,action:`navigate`}),(0,J.jsx)(f,{shortcut:`Enter`,action:`select`}),(0,J.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}),children:(0,J.jsx)(_,{children:(0,J.jsx)(Le,{options:[{label:`Project (.claude/agents/)`,value:`projectSettings`},{label:`Personal (~/.claude/agents/)`,value:`userSettings`}],onChange:n=>{t({location:n}),e()},onCancel:()=>n()},`location-select`)})})}var J,Br=e((()=>{h(),T(),rt(),H(),V(),J=v()}));function Vr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=R();g(`confirm:no`,t,{context:`Confirmation`});let i=r.location===`userSettings`?[{label:`User scope (~/.claude/agent-memory/) (Recommended)`,value:`user`},{label:`None (no persistent memory)`,value:`none`},{label:`Project scope (.claude/agent-memory/)`,value:`project`},{label:`Local scope (.claude/agent-memory-local/)`,value:`local`}]:[{label:`Project scope (.claude/agent-memory/) (Recommended)`,value:`project`},{label:`None (no persistent memory)`,value:`none`},{label:`User scope (~/.claude/agent-memory/)`,value:`user`},{label:`Local scope (.claude/agent-memory-local/)`,value:`local`}];return(0,Y.jsx)(B,{subtitle:`Configure agent memory`,footerText:(0,Y.jsxs)(p,{children:[(0,Y.jsx)(f,{shortcut:`↑↓`,action:`navigate`}),(0,Y.jsx)(f,{shortcut:`Enter`,action:`select`}),(0,Y.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,Y.jsx)(_,{children:(0,Y.jsx)(Le,{options:i,onChange:t=>{let i=t===`none`?void 0:t,a=r.finalAgent?.agentType;n({selectedMemory:i,finalAgent:r.finalAgent?{...r.finalAgent,memory:i,getSystemPrompt:de()&&i&&a?()=>r.systemPrompt+`
101
+
102
+ `+Ve(a,i):()=>r.systemPrompt}:void 0}),e()},onCancel:t},`memory-select`)})})}var Y,Hr=e((()=>{h(),E(),ae(),pt(),T(),rt(),H(),V(),Y=v()}));function Ur(){let{goNext:e,goBack:t,updateWizardData:n,goToStep:r}=R();return(0,X.jsx)(B,{subtitle:`Creation method`,footerText:(0,X.jsxs)(p,{children:[(0,X.jsx)(f,{shortcut:`↑↓`,action:`navigate`}),(0,X.jsx)(f,{shortcut:`Enter`,action:`select`}),(0,X.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,X.jsx)(_,{children:(0,X.jsx)(Le,{options:[{label:`Generate with Claude (recommended)`,value:`generate`},{label:`Manual configuration`,value:`manual`}],onChange:t=>{let i=t;n({method:i,wasGenerated:i===`generate`}),i===`generate`?e():r(3)},onCancel:()=>t()},`method-select`)})})}var X,Wr=e((()=>{h(),T(),rt(),H(),V(),X=v()}));function Gr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=R();return(0,Kr.jsx)(B,{subtitle:`Select model`,footerText:(0,Kr.jsxs)(p,{children:[(0,Kr.jsx)(f,{shortcut:`↑↓`,action:`navigate`}),(0,Kr.jsx)(f,{shortcut:`Enter`,action:`select`}),(0,Kr.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,Kr.jsx)(qn,{initialModel:r.selectedModel,onComplete:t=>{n({selectedModel:t}),e()},onCancel:t})})}var Kr,qr=e((()=>{T(),h(),H(),V(),Xn(),Kr=v()}));function Jr(){let{goNext:e,goBack:t,updateWizardData:n,wizardData:r}=R(),[i,a]=(0,Yr.useState)(r.systemPrompt||``),[o,s]=(0,Yr.useState)(i.length),[c,l]=(0,Yr.useState)(null);return g(`confirm:no`,t,{context:`Settings`}),g(`chat:externalEditor`,(0,Yr.useCallback)(async()=>{let e=await yn(i);e.content!==null&&(a(e.content),s(e.content.length))},[i]),{context:`Chat`}),(0,Z.jsx)(B,{subtitle:`System prompt`,footerText:(0,Z.jsxs)(p,{children:[(0,Z.jsx)(f,{shortcut:`Type`,action:`enter text`}),(0,Z.jsx)(f,{shortcut:`Enter`,action:`continue`}),(0,Z.jsx)(w,{action:`chat:externalEditor`,context:`Chat`,fallback:`ctrl+g`,description:`open in editor`}),(0,Z.jsx)(w,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,Z.jsxs)(_,{flexDirection:`column`,children:[(0,Z.jsx)(u,{children:`Enter the system prompt for your agent:`}),(0,Z.jsx)(u,{dimColor:!0,children:`Be comprehensive for best results`}),(0,Z.jsx)(_,{marginTop:1,children:(0,Z.jsx)(nt,{value:i,onChange:a,onSubmit:()=>{let t=i.trim();if(!t){l(`System prompt is required`);return}l(null),n({systemPrompt:t}),e()},placeholder:`You are a helpful code reviewer who...`,columns:80,cursorOffset:o,onChangeCursorOffset:s,focus:!0,showCursor:!0})}),c&&(0,Z.jsx)(_,{marginTop:1,children:(0,Z.jsx)(u,{color:`error`,children:c})})]})})}var Yr,Z,Xr=e((()=>{Yr=t(l(),1),h(),E(),bn(),T(),at(),H(),V(),Z=v()}));function Zr({tools:e}){let{goNext:t,goBack:n,updateWizardData:r,wizardData:i}=R(),a=e=>{r({selectedTools:e}),t()},o=i.selectedTools;return(0,Qr.jsx)(B,{subtitle:`Select tools`,footerText:(0,Qr.jsxs)(p,{children:[(0,Qr.jsx)(f,{shortcut:`Enter`,action:`toggle selection`}),(0,Qr.jsx)(f,{shortcut:`↑↓`,action:`navigate`}),(0,Qr.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`go back`})]}),children:(0,Qr.jsx)($n,{tools:e,initialTools:o,onComplete:a,onCancel:n})})}var Qr,$r=e((()=>{h(),T(),H(),V(),er(),Qr=v()}));function ei(e){let{goNext:t,goBack:n,updateWizardData:r,wizardData:i}=R(),[a,o]=(0,ti.useState)(i.agentType||``),[s,c]=(0,ti.useState)(null),[l,d]=(0,ti.useState)(a.length);return g(`confirm:no`,n,{context:`Settings`}),(0,Q.jsx)(B,{subtitle:`Agent type (identifier)`,footerText:(0,Q.jsxs)(p,{children:[(0,Q.jsx)(f,{shortcut:`Type`,action:`enter text`}),(0,Q.jsx)(f,{shortcut:`Enter`,action:`continue`}),(0,Q.jsx)(w,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`go back`})]}),children:(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsx)(u,{children:`Enter a unique identifier for your agent:`}),(0,Q.jsx)(_,{marginTop:1,children:(0,Q.jsx)(nt,{value:a,onChange:o,onSubmit:e=>{let n=e.trim(),i=xr(n);if(i){c(i);return}c(null),r({agentType:n}),t()},placeholder:`e.g., test-runner, tech-lead, etc`,columns:60,cursorOffset:l,onChangeCursorOffset:d,focus:!0,showCursor:!0})}),s&&(0,Q.jsx)(_,{marginTop:1,children:(0,Q.jsx)(u,{color:`error`,children:s})})]})})}var ti,Q,ni=e((()=>{ti=t(l(),1),h(),E(),T(),at(),H(),V(),Cr(),Q=v()}));function ri({tools:e,existingAgents:t,onComplete:n,onCancel:r}){return(0,ii.jsx)(ur,{steps:[zr,Ur,Lr,()=>(0,ii.jsx)(ei,{existingAgents:t}),Jr,Ar,()=>(0,ii.jsx)(Zr,{tools:e}),Gr,yr,...de()?[Vr]:[],()=>(0,ii.jsx)(Er,{tools:e,existingAgents:t,onComplete:n})],initialData:{},onComplete:()=>{},onCancel:r,title:`Create new agent`,showStepCounter:!1})}var ii,ai=e((()=>{ae(),H(),br(),kr(),Mr(),Rr(),Br(),Hr(),Wr(),qr(),Xr(),$r(),ni(),ii=v()}));function oi({tools:e,onExit:t}){let[n,r]=(0,si.useState)({mode:`list-agents`,source:`all`}),i=$e(e=>e.agentDefinitions),a=$e(e=>e.mcp.tools),o=$e(e=>e.toolPermissionContext),c=it(),{allAgents:l,activeAgents:f}=i,[p,m]=(0,si.useState)([]),h=_n(e,a,o);cn();let g=(0,si.useMemo)(()=>({"built-in":l.filter(e=>e.source===`built-in`),userSettings:l.filter(e=>e.source===`userSettings`),projectSettings:l.filter(e=>e.source===`projectSettings`),policySettings:l.filter(e=>e.source===`policySettings`),localSettings:l.filter(e=>e.source===`localSettings`),flagSettings:l.filter(e=>e.source===`flagSettings`),plugin:l.filter(e=>e.source===`plugin`),all:l}),[l]),v=(0,si.useCallback)(e=>{m(t=>[...t,e]),r({mode:`list-agents`,source:`all`})},[]),y=(0,si.useCallback)(async e=>{try{await Rn(e),c(t=>{let n=t.agentDefinitions.allAgents.filter(t=>!(t.agentType===e.agentType&&t.source===e.source));return{...t,agentDefinitions:{...t.agentDefinitions,allAgents:n,activeAgents:Kt(n)}}}),m(t=>[...t,`Deleted agent: ${s.bold(e.agentType)}`]),r({mode:`list-agents`,source:`all`})}catch(e){Te(me(e))}},[c]);switch(n.mode){case`list-agents`:{let e=mn(n.source===`all`?[...g[`built-in`],...g.userSettings,...g.projectSettings,...g.localSettings,...g.policySettings,...g.flagSettings,...g.plugin]:g[n.source],f);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(cr,{source:n.source,agents:e,onBack:()=>{t((p.length>0?`Agent changes:\n${p.join(`
103
+ `)}`:void 0)??`Agents dialog dismissed`,{display:p.length===0?`system`:void 0})},onSelect:e=>r({mode:`agent-menu`,agent:e,previousMode:n}),onCreateNew:()=>r({mode:`create-agent`}),changes:p}),(0,$.jsx)(ar,{})]})}case`create-agent`:return(0,$.jsx)(ri,{tools:h,existingAgents:f,onComplete:v,onCancel:()=>r({mode:`list-agents`,source:`all`})});case`agent-menu`:{let e=l.find(e=>e.agentType===n.agent.agentType&&e.source===n.agent.source)||n.agent,t=[{label:`View agent`,value:`view`},...e.source!==`built-in`&&e.source!==`plugin`&&e.source!==`flagSettings`?[{label:`Edit agent`,value:`edit`},{label:`Delete agent`,value:`delete`}]:[],{label:`Back`,value:`back`}];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(d,{title:n.agent.agentType,onCancel:()=>r(n.previousMode),hideInputGuide:!0,children:(0,$.jsxs)(_,{flexDirection:`column`,children:[(0,$.jsx)(Le,{options:t,onChange:t=>{switch(t){case`view`:r({mode:`view-agent`,agent:e,previousMode:n.previousMode});break;case`edit`:r({mode:`edit-agent`,agent:e,previousMode:n});break;case`delete`:r({mode:`delete-confirm`,agent:e,previousMode:n});break;case`back`:r(n.previousMode);break}},onCancel:()=>r(n.previousMode)}),p.length>0&&(0,$.jsx)(_,{marginTop:1,children:(0,$.jsx)(u,{dimColor:!0,children:p[p.length-1]})})]})}),(0,$.jsx)(ar,{})]})}case`view-agent`:{let e=l.find(e=>e.agentType===n.agent.agentType&&e.source===n.agent.source)||n.agent;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(d,{title:e.agentType,onCancel:()=>r({mode:`agent-menu`,agent:e,previousMode:n.previousMode}),hideInputGuide:!0,children:(0,$.jsx)(Vn,{agent:e,tools:h,allAgents:l,onBack:()=>r({mode:`agent-menu`,agent:e,previousMode:n.previousMode})})}),(0,$.jsx)(ar,{instructions:`Press Enter or Esc to go back`})]})}case`delete-confirm`:return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(d,{title:`Delete agent`,onCancel:()=>{`previousMode`in n&&r(n.previousMode)},color:`error`,children:[(0,$.jsxs)(u,{children:[`Are you sure you want to delete the agent `,(0,$.jsx)(u,{bold:!0,children:n.agent.agentType}),`?`]}),(0,$.jsx)(_,{marginTop:1,children:(0,$.jsxs)(u,{dimColor:!0,children:[`Source: `,n.agent.source]})}),(0,$.jsx)(_,{marginTop:1,children:(0,$.jsx)(Le,{options:[{label:`Yes, delete`,value:`yes`},{label:`No, cancel`,value:`no`}],onChange:e=>{e===`yes`?y(n.agent):`previousMode`in n&&r(n.previousMode)},onCancel:()=>{`previousMode`in n&&r(n.previousMode)}})})]}),(0,$.jsx)(ar,{instructions:`Press ↑↓ to navigate, Enter to select, Esc to cancel`})]});case`edit-agent`:{let e=l.find(e=>e.agentType===n.agent.agentType&&e.source===n.agent.source)||n.agent;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(d,{title:`Edit agent: ${e.agentType}`,onCancel:()=>r(n.previousMode),hideInputGuide:!0,children:(0,$.jsx)(rr,{agent:e,tools:h,onSaved:e=>{v(e),r(n.previousMode)},onBack:()=>r(n.previousMode)})}),(0,$.jsx)(ar,{})]})}default:return null}}var si,$,ci=e((()=>{c(),l(),si=t(l(),1),sn(),vn(),h(),At(),fn(),Vt(),_e(),we(),rt(),Hn(),ir(),sr(),lr(),Bn(),ai(),$=v()}));async function li(e,t){let n=t.getAppState().toolPermissionContext;return(0,ui.jsx)(oi,{tools:Je(n),onExit:e})}var ui;e((()=>{l(),ci(),Wt(),ui=v()}))();export{li as call};
@@ -0,0 +1,2 @@
1
+ import{n as e,t}from"./cwd--iizewsn.js";import{i as n,o as r,r as i}from"./loadAgentsDir-Ci5mr0vm.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./agentDisplay-B9z7i8b_.js";o(),r(),e();function d(e){let t=a(e),n=[e.agentType];return t&&n.push(t),e.memory&&n.push(`${e.memory} memory`),n.join(` · `)}async function f(){let{allAgents:e}=await n(t()),r=c(e,i(e)),a=[],o=0;for(let{label:e,source:t}of u){let n=r.filter(e=>e.source===t).sort(s);if(n.length!==0){a.push(`${e}:`);for(let e of n)if(e.overriddenBy){let t=l(e.overriddenBy);a.push(` (shadowed by ${t}) ${d(e)}`)}else a.push(` ${d(e)}`),o++;a.push(``)}}a.length===0?console.log(`No agents found.`):(console.log(`${o} active agents\n`),console.log(a.join(`
2
+ `).trimEnd()))}export{f as agentsHandler};
@@ -0,0 +1,8 @@
1
+ import{a as e,n as t,r as n,t as r}from"./chunk-DR8-3Aex.js";var i=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??(this._str=this._items.reduce((e,t)=>`${e}${t}`,``))}get names(){return this._names??(this._names=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{}))}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),a=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=i(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var a=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=a;var o=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=o;var s=(0,t._)`\n`;e.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new o(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),o=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=i(),n=a(),r=i();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var o=a();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var s=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},c=class extends s{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},l=class extends s{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=j(this.rhs,e,n),this}get names(){return A(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},u=class extends l{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},d=class extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},f=class extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},p=class extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},m=class extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=j(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},h=class extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(M(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>k(e,t.names),{})}},g=class extends h{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},_=class extends h{},v=class extends g{};v.kind=`else`;var y=class e extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new v(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(N(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=j(this.condition,e,t),this}get names(){let e=super.names;return A(e,this.condition),this.else&&k(e,this.else.names),e}};y.kind=`if`;var b=class extends g{};b.kind=`for`;var x=class extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=j(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}},S=class extends b{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return A(A(super.names,this.from),this.to)}},C=class extends b{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=j(this.iterable,e,t),this}get names(){return k(super.names,this.iterable.names)}},w=class extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};w.kind=`func`;var T=class extends h{render(e){return`return `+super.render(e)}};T.kind=`return`;var E=class extends g{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}},D=class extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};D.kind=`catch`;var O=class extends g{render(e){return`finally`+super.render(e)}};O.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
2
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new c(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new l(e,t,n))}add(t,n){return this._leafNode(new u(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new m(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new y(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new y(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new S(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new C(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new C(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new f(e))}return(e){let t=new T;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(T)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new E;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new D(e),t(e)}return n&&(this._currNode=r.finally=new O,this.code(n)),this._endBlockNode(D,O)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new w(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof y))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function k(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function A(e,n){return n instanceof t._CodeOrName?k(e,n.names):e}function j(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function M(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function N(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${z(e)}`}e.not=N;var P=R(e.operators.AND);function F(...e){return e.reduce(P)}e.and=F;var I=R(e.operators.OR);function L(...e){return e.reduce(I)}e.or=L;function R(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${z(n)} ${e} ${z(r)}`}function z(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),s=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=o(),n=i();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function a(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(s(e,t),!c(t,e.self.RULES.all))}e.alwaysValidSchema=a;function s(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||C(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=s;function c(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=c;function l(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=l;function u({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=u;function d(e){return m(decodeURIComponent(e))}e.unescapeFragment=d;function f(e){return encodeURIComponent(p(e))}e.escapeFragment=f;function p(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=p;function m(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=m;function h(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=h;function g({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:g({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),v(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:_}),items:g({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function _(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&v(e,r,n),r}e.evaluatedPropsToName=_;function v(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=v;var y={};function b(e,t){return e.scopeValue(`func`,{ref:t,code:y[t.code]||(y[t.code]=new n._Code(t.code))})}e.useFunc=b;var x;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(x||(e.Type=x={}));function S(e,n,r){if(e instanceof t.Name){let i=n===x.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+p(e)}e.getErrorPath=S;function C(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=C})),c=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),l=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=o(),n=s(),r=c();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:c,allErrors:l}=o,u=m(n,r,i);a??(c||l)?d(s,u):f(o,(0,t._)`[${u}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:c}=a;d(o,m(t,n,i)),s||c||f(a,r.default.vErrors)}e.reportExtraError=a;function l(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function u({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=u;function d(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function f(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var p={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function m(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:h(e,n,r)}function h(e,t,n={}){let{gen:r,it:i}=e,a=[g(i,n),_(e,n)];return v(e,t,a),r.object(...a)}function g({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function _({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[p.schemaPath,o]}function v(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:u,propertyName:d,topSchemaRef:f,schemaPath:m}=l;a.push([p.keyword,o],[p.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),u.messages&&a.push([p.message,typeof i==`function`?i(e):i]),u.verbose&&a.push([p.schema,c],[p.parentSchema,(0,t._)`${f}${m}`],[r.default.data,s]),d&&a.push([p.propertyName,d])}})),u=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=l(),n=o(),r=c(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?u(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function s(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),u(e)):n.var(t,!0)}e.boolOrEmptySchema=s;function u(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),d=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),f=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),p=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=d(),n=f(),r=l(),i=o(),a=s(),c;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(c||(e.DataType=c={}));function u(e){let t=p(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=u;function p(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=p;function m(e,t){let{gen:r,data:i,opts:a}=e,o=g(t,a.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(s){let n=b(t,i,a.strictNumbers,c.Wrong);r.if(n,()=>{o.length?_(e,t,o):S(e)})}return s}e.coerceAndCheckDataType=m;var h=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function g(e,t){return t?e.filter(e=>h.has(e)||t===`array`&&e===`array`):[]}function _(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(b(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(h.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),S(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),v(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
3
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
4
+ || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
5
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function v({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function y(e,t,n,r=c.Correct){let a=r===c.Correct?i.operators.EQ:i.operators.NEQ,o;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:o=(0,i._)`Array.isArray(${t})`;break;case`object`:o=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:o=s((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:o=s();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===c.Correct?o:(0,i.not)(o);function s(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=y;function b(e,t,n,r){if(e.length===1)return y(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,y(e,t,n,r));return o}e.checkDataTypes=b;var x={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function S(e){let t=C(e);(0,r.reportError)(t,x)}e.reportTypeError=S;function C(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),m=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assignDefaults=void 0;var t=o(),n=s();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),h=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=o(),n=s(),r=c(),i=s();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(m(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function l({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(m(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=l;function u(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=u;function d(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=d;function f(e,n,r){return(0,t._)`${d(e)}.call(${n}, ${r})`}e.isOwnProperty=f;function p(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${f(e,n,r)}`:a}e.propertyInData=p;function m(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(f(e,n,r))):a}e.noPropertyInData=m;function h(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=h;function g(e,t){return h(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=g;function _({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=_;var v=(0,t._)`new RegExp`;function y({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?v:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=y;function b(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=b;function x(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=x})),g=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=o(),n=c(),r=h(),i=l();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=p(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let u=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}e.macroKeywordCode=a;function s(e,i){let{gen:a,keyword:o,schema:s,parentSchema:c,$data:l,it:m}=e;f(m,i);let h=p(a,o,!l&&i.compile?i.compile.call(m.self,s,c,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&u(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&u(e),x(()=>d(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!l||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=s;function u(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function d(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function f({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function p(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function m(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=m;function g({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=g})),_=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=o(),n=s();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),v=r(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),y=r(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),b=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=s(),n=v(),r=y(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!c(e):t?l(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function c(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(c)||typeof n==`object`&&c(n))return!0}return!1}function l(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=l(e)),n===1/0)))return 1/0;return n}function u(e,t=``,n){return n!==!1&&(t=p(t)),d(e,e.parse(t))}e.getFullPath=u;function d(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=d;var f=/#\/?$/;function p(e){return e?e.replace(f,``):``}e.normalizeId=p;function m(e,t,n){return n=p(n),e.resolve(t,n)}e.resolveUrl=m;var h=/^[a-z_][-a-z0-9._]*$/i;function g(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=p(e[i]||t),s={"":o},c=u(a,o,!1),l={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=u.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function u(t){let n=this.opts.uriResolver.resolve;if(t=p(o?n(o,t):t),d.has(t))throw m(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?f(e,r.schema,t):t!==p(a)&&(t[0]===`#`?(f(e,l[t],t),l[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!h.test(e))throw Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}}),l;function f(e,t,r){if(t!==void 0&&!n(e,t))throw m(r)}function m(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=g})),x=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=u(),n=p(),r=f(),i=p(),a=m(),d=g(),h=_(),v=o(),y=c(),x=b(),S=s(),C=l();function w(e){if(N(e)&&(F(e),M(e))){O(e);return}T(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=w;function T({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,v._)`${y.default.data}, ${y.default.valCxt}`,r.$async,()=>{e.code((0,v._)`"use strict"; ${A(n,i)}`),D(e,i),e.code(a)}):e.func(t,(0,v._)`${y.default.data}, ${E(i)}`,r.$async,()=>e.code(A(n,i)).code(a))}function E(e){return(0,v._)`{${y.default.instancePath}="", ${y.default.parentData}, ${y.default.parentDataProperty}, ${y.default.rootData}=${y.default.data}${e.dynamicRef?(0,v._)`, ${y.default.dynamicAnchors}={}`:v.nil}}={}`}function D(e,t){e.if(y.default.valCxt,()=>{e.var(y.default.instancePath,(0,v._)`${y.default.valCxt}.${y.default.instancePath}`),e.var(y.default.parentData,(0,v._)`${y.default.valCxt}.${y.default.parentData}`),e.var(y.default.parentDataProperty,(0,v._)`${y.default.valCxt}.${y.default.parentDataProperty}`),e.var(y.default.rootData,(0,v._)`${y.default.valCxt}.${y.default.rootData}`),t.dynamicRef&&e.var(y.default.dynamicAnchors,(0,v._)`${y.default.valCxt}.${y.default.dynamicAnchors}`)},()=>{e.var(y.default.instancePath,(0,v._)`""`),e.var(y.default.parentData,(0,v._)`undefined`),e.var(y.default.parentDataProperty,(0,v._)`undefined`),e.var(y.default.rootData,y.default.data),t.dynamicRef&&e.var(y.default.dynamicAnchors,(0,v._)`{}`)})}function O(e){let{schema:t,opts:n,gen:r}=e;T(e,()=>{n.$comment&&t.$comment&&V(e),R(e),r.let(y.default.vErrors,null),r.let(y.default.errors,0),n.unevaluated&&k(e),I(e),ee(e)})}function k(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,v._)`${n}.evaluated`),t.if((0,v._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,v._)`${e.evaluated}.props`,(0,v._)`undefined`)),t.if((0,v._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,v._)`${e.evaluated}.items`,(0,v._)`undefined`))}function A(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,v._)`/*# sourceURL=${n} */`:v.nil}function j(e,n){if(N(e)&&(F(e),M(e))){P(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function M({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function N(e){return typeof e.schema!=`boolean`}function P(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&V(e),z(e),B(e);let a=r.const(`_errs`,y.default.errors);I(e,a),r.var(t,(0,v._)`${a} === ${y.default.errors}`)}function F(e){(0,S.checkUnknownRules)(e),L(e)}function I(e,t){if(e.opts.jtd)return U(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);U(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function L(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,S.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function R(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,S.checkStrictMode)(e,`default is ignored in the schema root`)}function z(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,x.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function B(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function V({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,v._)`${y.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,v.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,v._)`${y.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function ee(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,v._)`${y.default.errors} === 0`,()=>t.return(y.default.data),()=>t.throw((0,v._)`new ${i}(${y.default.vErrors})`)):(t.assign((0,v._)`${r}.errors`,y.default.vErrors),a.unevaluated&&H(e),t.return((0,v._)`${y.default.errors} === 0`))}function H({gen:e,evaluated:t,props:n,items:r}){n instanceof v.Name&&e.assign((0,v._)`${t}.props`,n),r instanceof v.Name&&e.assign((0,v._)`${t}.items`,r)}function U(e,t,n,a){let{gen:o,schema:s,data:c,allErrors:l,opts:u,self:d}=e,{RULES:f}=d;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,S.schemaHasRulesButRef)(s,f))){o.block(()=>Q(e,`$ref`,f.all.$ref.definition));return}u.jtd||G(e,t),o.block(()=>{for(let e of f.rules)p(e);p(f.post)});function p(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,c,u.strictNumbers)),W(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):W(e,d),l||o.if((0,v._)`${y.default.errors} === ${a||0}`))}}function W(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&Q(e,n.keyword,n.definition,t.type)})}function G(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(K(e,t),e.opts.allowUnionTypes||q(e,t),J(e,e.dataTypes))}function K(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{Y(e.dataTypes,t)||X(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),ne(e,t)}}function q(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&X(e,`use allowUnionTypes to allow union type keyword`)}function J(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>te(t,e))&&X(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function te(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function Y(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function ne(e,t){let n=[];for(let r of e.dataTypes)Y(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function X(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,S.checkStrictMode)(e,t,e.opts.strictTypes)}var Z=class{constructor(e,t,n){if((0,d.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,S.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,$(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,d.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,y.default.errors))}result(e,t,n){this.failResult((0,v.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,v.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,v._)`${t} !== undefined && (${(0,v.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?C.reportExtraError:C.reportError)(this,this.def.error,t)}$dataError(){(0,C.reportError)(this,this.def.$dataError||C.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,C.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=v.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=v.nil,t=v.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,v.or)((0,v._)`${r} === undefined`,t)),e!==v.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==v.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,v.or)(o(),s());function o(){if(n.length){if(!(t instanceof v.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,v._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return v.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,v._)`!${n}(${t})`}return v.nil}}subschema(e,t){let n=(0,h.getSubschema)(this.it,e);(0,h.extendSubschemaData)(n,this.it,e),(0,h.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return j(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=S.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=S.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,v.Name)),!0}};e.KeywordCxt=Z;function Q(e,t,n,r){let i=new Z(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,d.funcKeywordCode)(i,n):`macro`in n?(0,d.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,d.funcKeywordCode)(i,n)}var re=/^\/(?:[^~]|~0|~1)*$/,ie=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function $(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return y.default.rootData;if(e[0]===`/`){if(!re.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=y.default.rootData}else{let o=ie.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(c(`property/index`,s));return r[t-s]}if(s>t)throw Error(c(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,v._)`${a}${(0,v.getProperty)((0,S.unescapeJsonPointer)(e))}`,o=(0,v._)`${o} && ${a}`);return o;function c(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=$})),S=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),C=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=b();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),w=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=o(),n=S(),r=c(),i=b(),a=s(),l=x(),u=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=u;function d(e){let a=m.call(this,e);if(a)return a;let o=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:u}=this.opts,d=new t.CodeGen(this.scope,{es5:s,lines:c,ownProperties:u}),f;e.$async&&(f=d.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let p=d.scopeName(`validate`);e.validateName=p;let h={gen:d,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:o,baseId:e.baseId||o,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,l.validateFunctionCode)(h),d.optimize(this.opts.code.optimize);let n=d.toString();g=`${d.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(p,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:p,validateCode:n,scopeValues:d._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=d;function f(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=g.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new u({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=p.call(this,a)}e.resolveRef=f;function p(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function m(e){for(let t of this._compilations)if(h(t,e))return t}e.getCompilingSchema=m;function h(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function g(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||_.call(this,e,t)}function _(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return y.call(this,n,e);let o=(0,i.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s==`string`){let t=_.call(this,e,s);return typeof t?.schema==`object`?y.call(this,n,t):void 0}if(typeof s?.schema==`object`){if(s.validate||d.call(this,s),o===(0,i.normalizeId)(t)){let{schema:t}=s,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new u({schema:t,schemaId:n,root:e,baseId:a})}return y.call(this,n,s)}}e.resolveSchema=_;var v=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function y(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!v.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=_.call(this,r,e)}let{schemaId:s}=this.opts;if(o=o||new u({schema:n,schemaId:s,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),T=n({$id:()=>E,additionalProperties:()=>!1,default:()=>j,description:()=>D,properties:()=>A,required:()=>k,type:()=>O}),E,D,O,k,A,j,M=t((()=>{E=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,D=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,O=`object`,k=[`$data`],A={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},j={$id:E,description:D,type:O,required:k,properties:A,additionalProperties:!1}})),N=r(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function i(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){let r=i(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function c(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],c=!1,l=!1,u=s;for(let i=0;i<e.length;i++){let s=e[i];if(!(s===`[`||s===`]`))if(s===`:`){if(c===!0&&(l=!0),!u(a,r,n))break;if(++t>7){n.error=!0;break}i>0&&e[i-1]===`:`&&(c=!0),r.push(`:`);continue}else if(s===`%`){if(!u(a,r,n))break;u=o}else{a.push(s);continue}}return a.length&&(u===o?n.zone=a.join(``):l?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function l(e){if(u(e,`:`)<2)return{host:e,isIPV6:!1};let t=c(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function u(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function d(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}function f(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function p(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let t=l(n);n=t.isIPV6===!0?`[${t.escapedHost}]`:e.host}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:a,recomposeAuthority:p,normalizeComponentEncoding:f,removeDotSegments:d,isIPv4:r,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:i}})),P=r(((e,t)=>{var{isUUID:n}=N(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||(e.path=`/`),e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),F=r(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:s}=N(),{SCHEMES:c,getSchemeHandler:l}=P();function u(e,t){return typeof e==`string`?e=m(g(e,t),t):typeof e==`object`&&(e=g(m(e,t),t)),e}function d(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=f(g(e,r),g(t,r),r,!0);return r.skipEscape=!0,m(i,r)}function f(e,t,n,i){let a={};return i||(e=g(m(e,n),n),t=g(m(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function p(e,t,n){return typeof e==`string`?(e=unescape(e),e=m(a(g(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=m(a(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=m(a(g(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=m(a(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function m(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},a=Object.assign({},t),o=[],s=l(a.scheme||n.scheme);s&&s.serialize&&s.serialize(n,a),n.path!==void 0&&(a.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),a.reference!==`suffix`&&n.scheme&&o.push(n.scheme,`:`);let c=i(n);if(c!==void 0&&(a.reference!==`suffix`&&o.push(`//`),o.push(c),n.path&&n.path[0]!==`/`&&o.push(`/`)),n.path!==void 0){let e=n.path;!a.absolutePath&&(!s||!s.absolutePath)&&(e=r(e)),c===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),o.push(e)}return n.query!==void 0&&o.push(`?`,n.query),n.fragment!==void 0&&o.push(`#`,n.fragment),o.join(``)}var h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||``,i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host)if(o(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let t=l(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&a===!1&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!t||t&&!t.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return i}var _={SCHEMES:c,normalize:u,resolve:d,resolveComponent:f,equal:p,serialize:m,parse:g};t.exports=_,t.exports.default=_,t.exports.fastUri=_})),I=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=F();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),L=r((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=x();Object.defineProperty(t,`KeywordCxt`,{enumerable:!0,get:function(){return n.KeywordCxt}});var r=o();Object.defineProperty(t,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,`Name`,{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,`CodeGen`,{enumerable:!0,get:function(){return r.CodeGen}});var i=S(),a=C(),c=d(),l=w(),u=o(),f=b(),m=p(),h=s(),g=(M(),e(T).default),_=I(),v=(e,t)=>new RegExp(e,t);v.code=`new RegExp`;var y=[`removeAdditional`,`useDefaults`,`coerceTypes`],E=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),D={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},O={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},k=200;function A(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??v,a=e.uriResolver??_.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??k,loopEnum:e.loopEnum??k,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var j=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...A(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:E,es5:t,lines:n}),this.logger=V(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,c.getRules)(),N.call(this,D,e,`NOT SUPPORTED`),N.call(this,O,e,`DEPRECATED`,`warn`),this._metaOpts=z.call(this),e.formats&&L.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&R.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),F.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=g;n===`id`&&(r={...g},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await i.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function i(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await i.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,f.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=P.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new l.SchemaEnv({schema:{},schemaId:n});if(t=l.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=P.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,f.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(H.call(this,n,t),!t)return(0,h.eachItem)(n,e=>U.call(this,e)),this;G.call(this,t);let r={...t,type:(0,m.getJSONTypes)(t.type),schemaType:(0,m.getJSONTypes)(t.schemaType)};return(0,h.eachItem)(n,r.type.length===0?e=>U.call(this,e,r):e=>r.type.forEach(t=>U.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=q(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:o}=this.opts;if(typeof e==`object`)a=e[o];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let s=this._cache.get(e);if(s!==void 0)return s;n=(0,f.normalizeId)(a||n);let c=f.getSchemaRefs.call(this,e,n);return s=new l.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:c}),this._cache.set(s.schema,s),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=s),r&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}};j.ValidationError=i.default,j.MissingRefError=a.default,t.default=j;function N(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function P(e){return e=(0,f.normalizeId)(e),this.schemas[e]||this.refs[e]}function F(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function L(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function R(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function z(){let e={...this.opts};for(let t of y)delete e[t];return e}var B={log(){},warn(){},error(){}};function V(e){if(e===!1)return B;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var ee=/^[a-z_$][a-z0-9_$:-]*$/i;function H(e,t){let{RULES:n}=this;if((0,h.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!ee.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function U(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,m.getJSONTypes)(t.type),schemaType:(0,m.getJSONTypes)(t.schemaType)}};t.before?W.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function W(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function G(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=q(t)),e.validateSchema=this.compile(t,!0))}var K={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function q(e){return{anyOf:[e,K]}}})),R=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),z=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callRef=e.getValidate=void 0;var t=C(),n=h(),r=o(),i=c(),a=w(),l=s(),u={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:c,validateName:l,opts:u,self:p}=o,{root:m}=c;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(c===m)return f(e,l,c,c.$async);let t=n.scopeValue(`root`,{ref:m});return f(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){f(e,d(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,u.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function d(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=d;function f(e,t,a,o){let{gen:s,it:c}=e,{allErrors:u,schemaEnv:d,opts:f}=c,p=f.passContext?i.default.this:r.nil;o?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=s.let(`valid`);s.try(()=>{s.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||s.assign(i,!0)},e=>{s.if((0,r._)`!(${e} instanceof ${c.ValidationError})`,()=>s.throw(e)),g(e),u||s.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;s.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),s.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!c.opts.unevaluated)return;let t=a?.validate?.evaluated;if(c.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(c.props=l.mergeEvaluated.props(s,t.props,c.props));else{let t=s.var(`props`,(0,r._)`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,r.Name)}if(c.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(c.items=l.mergeEvaluated.items(s,t.items,c.items));else{let t=s.var(`items`,(0,r._)`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,r.Name)}}}e.callRef=f,e.default=u})),B=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=R(),n=z();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),V=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),ee=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),H=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),U=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s(),r=H();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),W=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=h(),n=s(),r=o();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),G=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),K=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=h(),n=o(),r=s();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),q=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),J=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=v();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),te=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=p(),n=o(),r=s(),i=J();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),Y=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s(),r=J();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),ne=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s(),r=J();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??(d=(0,n.useFunc)(i,r.default)),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),X=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=V(),n=ee(),r=U(),i=W(),a=G(),o=K(),s=q(),c=te(),l=Y(),u=ne();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Z=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateAdditionalItems=void 0;var t=o(),n=s(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),Q=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTuple=void 0;var t=o(),n=s(),r=h(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),re=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Q();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),ie=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s(),r=h(),i=Z();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),$=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),ae=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=o(),n=s(),r=h();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
6
+ missingProperty: ${i},
7
+ depsCount: ${n},
8
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);c(e,t),l(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function c(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=c;function l(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=l,e.default=i})),oe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),se=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=h(),n=o(),r=c(),i=s();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),ce=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=x(),n=h(),r=s(),i=se();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),le=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=h(),n=o(),r=s(),i=s();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),ue=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=s();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),de=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:h().validateUnion,error:{message:`must match a schema in anyOf`}}})),fe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),pe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=s();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),me=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=s(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),he=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=s();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),ge=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Z(),n=re(),r=Q(),i=ie(),a=$(),o=ae(),s=oe(),c=se(),l=ce(),u=le(),d=ue(),f=de(),p=fe(),m=pe(),h=me(),g=he();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),_e=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),ve=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=[_e().default]})),ye=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),be=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=B(),n=X(),r=ge(),i=ve(),a=ye();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),xe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Se=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=o(),n=xe(),r=w(),i=C(),a=s();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(t||o(c)),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Ce=n({$id:()=>Te,$schema:()=>we,default:()=>Ae,definitions:()=>De,properties:()=>ke,title:()=>Ee,type:()=>Oe}),we,Te,Ee,De,Oe,ke,Ae,je=t((()=>{we=`http://json-schema.org/draft-07/schema#`,Te=`http://json-schema.org/draft-07/schema#`,Ee=`Core schema meta-schema`,De={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Oe=[`object`,`boolean`],ke={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},Ae={$schema:we,$id:Te,title:Ee,definitions:De,type:Oe,properties:ke,default:!0}})),Me=r(((t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=L(),i=be(),a=Se(),s=(je(),e(Ce).default),c=[`/properties`],l=`http://json-schema.org/draft-07/schema`,u=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(s,c):s;this.addMetaSchema(e,l,!1),this.refs[`http://json-schema.org/schema`]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}};t.Ajv=u,n.exports=t=u,n.exports.Ajv=u,Object.defineProperty(t,`__esModule`,{value:!0}),t.default=u;var d=x();Object.defineProperty(t,`KeywordCxt`,{enumerable:!0,get:function(){return d.KeywordCxt}});var f=o();Object.defineProperty(t,`_`,{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,`str`,{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,`stringify`,{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,`nil`,{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,`Name`,{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,`CodeGen`,{enumerable:!0,get:function(){return f.CodeGen}});var p=S();Object.defineProperty(t,`ValidationError`,{enumerable:!0,get:function(){return p.default}});var m=C();Object.defineProperty(t,`MissingRefError`,{enumerable:!0,get:function(){return m.default}})}));export{o as n,Me as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";function t(e){let t;for(let n in e)n.startsWith(`_PROTO_`)&&(t===void 0&&(t={...e}),delete t[n]);return t??e}function n(e){if(o===null&&(o=e,a.length>0)){let e=[...a];a.length=0,process.env.USER_TYPE===`ant`&&o.logEvent(`analytics_sink_attached`,{queued_event_count:e.length}),queueMicrotask(()=>{for(let t of e)t.async?o.logEventAsync(t.eventName,t.metadata):o.logEvent(t.eventName,t.metadata)})}}function r(e,t){if(o===null){a.push({eventName:e,metadata:t,async:!1});return}o.logEvent(e,t)}async function i(e,t){if(o===null){a.push({eventName:e,metadata:t,async:!0});return}await o.logEventAsync(e,t)}var a,o,s=e((()=>{a=[],o=null}));export{t as a,i,s as n,r,n as t};
@@ -0,0 +1 @@
1
+ import{H as e,I as t,N as n,O as r,P as i,j as a}from"./teamHelpers-BmN9nKz-.js";import{s as o,u as s}from"./logoV2Utils-SAulcC5x.js";i(),s();var c=`default`;async function l(e,t){let n=await r(t.list||c,{subject:e,description:t.description||``,status:`pending`,blocks:[],blockedBy:[]});console.log(`Created task ${n}: ${e}`)}async function u(e){let n=await t(e.list||c);if(e.pending&&(n=n.filter(e=>e.status===`pending`)),e.json){console.log(JSON.stringify(n,null,2));return}if(n.length===0){console.log(`No tasks found.`);return}for(let e of n)console.log(` [${e.status}] ${e.id}: ${e.subject}`),e.description&&console.log(` ${e.description}`),e.owner&&console.log(` owner: ${e.owner}`)}async function d(e,t){let n=await a(t.list||c,e);if(!n){console.error(`Task not found: ${e}`),process.exitCode=1;return}console.log(JSON.stringify(n,null,2))}async function f(t,n){let r=n.list||c,i={};n.status&&(i.status=n.status),n.subject&&(i.subject=n.subject),n.description&&(i.description=n.description),n.owner&&(i.owner=n.owner),n.clearOwner&&(i.owner=void 0);let a=await e(r,t,i);if(!a){console.error(`Task not found: ${t}`),process.exitCode=1;return}console.log(`Updated task ${t}: [${a.status}] ${a.subject}`)}async function p(e){let t=e.list||c;console.log(n(t))}async function m(e){let t=await o();if(e===void 0){if(t.length===0){console.log(`No recent sessions.`);return}for(let e=0;e<Math.min(t.length,20);e++){let n=t[e],r=n.modified?new Date(n.modified).toLocaleString():`unknown`,i=n.title||n.sessionId||`untitled`;console.log(` ${e}: ${i} (${r})`)}return}let n=typeof e==`string`?parseInt(e,10):e,r=Number.isFinite(n)&&n>=0&&n<t.length?t[n]:t.find(t=>t.sessionId===String(e));if(!r){console.error(`Session not found: ${e}`),process.exitCode=1;return}console.log(JSON.stringify(r,null,2))}async function h(e){let t=await o(),n=e??5;console.log(`Last ${n} sessions:`);for(let e=0;e<Math.min(n,t.length);e++){let n=t[e],r=n.modified?new Date(n.modified).toLocaleString():`unknown`;console.log(` ${e}: ${n.sessionId} (${r})`)}}async function g(e,t){let{writeFile:n,readFile:r}=await import(`fs/promises`),i=await o(),a=parseInt(e,10),s;if(s=Number.isFinite(a)&&a>=0&&a<i.length?i[a]:i.find(t=>t.sessionId===e),!s)try{await n(t,await r(e,`utf-8`),`utf-8`),console.log(`Exported ${e} → ${t}`);return}catch{console.error(`Source not found: ${e}`),process.exitCode=1;return}await n(t,JSON.stringify(s,null,2),`utf-8`),console.log(`Exported session ${s.sessionId} → ${t}`)}async function _(e,t,n){let{regenerateCompletionCache:r}=await import(`./completionCache-DHfUBBMH.js`);t.output,await r(),console.log(`Completion cache regenerated for ${e}.`)}export{_ as completionHandler,h as errorHandler,g as exportHandler,m as logHandler,l as taskCreateHandler,p as taskDirHandler,d as taskGetHandler,u as taskListHandler,f as taskUpdateHandler};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-DhfaybwJ.js";import{n as r,t as i}from"./v4-f1i_CNUT.js";import{Ac as a,Jt as o,Sc as s,la as c,on as l,ua as u}from"./paths-Q2255dD7.js";import{E as d,K as f,L as p,V as m,d as h,s as g,w as _}from"./debug-UI3T040K.js";import{l as v,u as y}from"./oauth-CdZEzMww.js";import{o as b,s as x}from"./log-CzsijfHZ.js";import{n as S,t as C}from"./lazySchema-2sOku3cX.js";import{n as w,t as T}from"./sleep-8Eb9j_Ly.js";import{a as E,o as D}from"./detectRepository-CBk3S2zv.js";import{randomUUID as O}from"crypto";function k(e){return t.isAxiosError(e)?!e.response||e.response.status>=500:!1}async function A(e,n){let r;for(let i=0;i<=V;i++)try{return await t.get(e,n)}catch(e){if(r=e,!k(e))throw e;if(i>=V)throw h(`Teleport request failed after ${i+1} attempts: ${p(e)}`),e;let t=B[i]??2e3;h(`Teleport request failed (attempt ${i+1}/${V+1}), retrying in ${t}ms: ${p(e)}`),await w(t)}throw r}function j(e){return e===null||typeof e==`string`&&e.trim()===``}async function M(){let e=s(),t=process.env.ANTHROPIC_API_KEY?.trim()||e.workspaceApiKey?.trim();if(!t){let t=e.workspaceApiKey,n=j(t)?`Your workspace API key was cleared. `:`A workspace API key (sk-ant-api03-*) is required to use workspace endpoints (/v1/agents, /v1/vaults, /v1/memory_stores, /v1/skills). `;throw Error(n+`Press W in /login to save your key directly (no restart needed), or set ANTHROPIC_API_KEY=<key> and restart. Obtain a key from https://console.anthropic.com/settings/keys. Subscription OAuth (claude.ai login) cannot reach these endpoints.`)}if(!t.startsWith(`sk-ant-api03-`))throw Error(`Workspace API key must start with sk-ant-api03-, got prefix "${t.slice(0,4)}...". Obtain a workspace API key from https://console.anthropic.com/settings/keys. Press W in /login to save your key, or set ANTHROPIC_API_KEY.`);return{apiKey:t}}async function N(){let e=o()?.accessToken;if(e===void 0)throw Error(`Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.`);let t=await c();if(!t)throw Error(`Unable to get organization UUID`);return{accessToken:e,orgUUID:t}}async function P(){let{accessToken:e,orgUUID:t}=await N(),n=`${v().BASE_API_URL}/v1/sessions`;try{let r=await A(n,{headers:{...F(e),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":t}});if(r.status!==200)throw Error(`Failed to fetch code sessions: ${r.statusText}`);return r.data.data.map(e=>{let t=e.session_context.sources.find(e=>e.type===`git_repository`),n=null;if(t?.url){let e=D(t.url);if(e){let[r,i]=e.split(`/`);r&&i&&(n={name:i,owner:{login:r},default_branch:t.revision||void 0})}}return{id:e.id,title:e.title||`Untitled`,description:``,status:e.session_status,repo:n,turns:[],created_at:e.created_at,updated_at:e.updated_at}})}catch(e){throw x(f(e)),e}}function F(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`}}async function I(e){let{accessToken:n,orgUUID:r}=await N(),i=`${v().BASE_API_URL}/v1/sessions/${e}`,a={...F(n),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":r},o=await t.get(i,{headers:a,timeout:15e3,validateStatus:e=>e<500});if(o.status!==200){let t=o.data?.error?.message;throw o.status===404?Error(`Session not found: ${e}`):o.status===401?Error(`Session expired. Please run /login to sign in again.`):Error(t||`Failed to fetch session: ${o.status} ${o.statusText}`)}return o.data}function L(e){return(e.session_context.outcomes?.find(e=>e.type===`git_repository`))?.git_info?.branches[0]}async function R(e,n,r){try{let{accessToken:i,orgUUID:a}=await N(),o=`${v().BASE_API_URL}/v1/sessions/${e}/events`,s={...F(i),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":a},c={events:[{uuid:r?.uuid??O(),session_id:e,type:`user`,parent_tool_use_id:null,message:{role:`user`,content:n}}]};h(`[sendEventToRemoteSession] Sending event to session ${e}`);let l=await t.post(o,c,{headers:s,validateStatus:e=>e<500,timeout:3e4});return l.status===200||l.status===201?(h(`[sendEventToRemoteSession] Successfully sent event to session ${e}`),!0):(h(`[sendEventToRemoteSession] Failed with status ${l.status}: ${d(l.data)}`),!1)}catch(e){return h(`[sendEventToRemoteSession] Error: ${p(e)}`),!1}}async function z(e,n){try{let{accessToken:r,orgUUID:i}=await N(),a=`${v().BASE_API_URL}/v1/sessions/${e}`,o={...F(r),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":i};h(`[updateSessionTitle] Updating title for session ${e}: "${n}"`);let s=await t.patch(a,{title:n},{headers:o,validateStatus:e=>e<500});return s.status===200?(h(`[updateSessionTitle] Successfully updated title for session ${e}`),!0):(h(`[updateSessionTitle] Failed with status ${s.status}: ${d(s.data)}`),!1)}catch(e){return h(`[updateSessionTitle] Error: ${p(e)}`),!1}}var B,V,H=e((()=>{n(),y(),u(),i(),l(),a(),g(),E(),m(),C(),b(),T(),_(),B=[2e3,4e3,8e3,16e3],V=B.length,S(()=>r.object({id:r.string(),title:r.string(),description:r.string(),status:r.enum([`idle`,`working`,`waiting`,`completed`,`archived`,`cancelled`,`rejected`]),repo:r.object({name:r.string(),owner:r.object({login:r.string()}),default_branch:r.string().optional()}).nullable(),turns:r.array(r.string()),created_at:r.string(),updated_at:r.string()}))}));export{F as a,j as c,R as d,z as f,L as i,N as l,P as n,H as o,I as r,k as s,A as t,M as u};
@@ -0,0 +1 @@
1
+ import{a as e,n as t,o as n}from"./api-B6URs6nc.js";n();export{t as fetchCodeSessionsFromSessionsAPI,e as getOAuthHeaders};
@@ -0,0 +1 @@
1
+ import{r as e}from"./asciicast-o5Zg4dJt.js";export{e as renameRecordingForSession};
@@ -0,0 +1,4 @@
1
+ import{n as e,s as t,u as n}from"./envUtils-BWeoiL4Y.js";import{Ct as r,cn as i,ot as a}from"./state-sIHsFpDu.js";import{E as o,J as s,X as c,Y as l,d as u,h as d,p as f,q as p,s as m,w as h}from"./debug-UI3T040K.js";import{p as g}from"./sessionStoragePortable-BI9q2WcJ.js";import{i as _}from"./path-C4kbwvSH.js";import{basename as v,dirname as y,join as b}from"path";import{appendFile as x,rename as S}from"fs/promises";i(),s(),l(),m(),t(),d(),_(),h();var C={filePath:null,timestamp:0};function w(){if(C.filePath!==null)return C.filePath;if(process.env.USER_TYPE!==`ant`||!n(process.env.CLAUDE_CODE_TERMINAL_RECORDING))return null;let t=b(b(e(),`projects`),g(a()));return C.timestamp=Date.now(),C.filePath=b(t,`${r()}-${C.timestamp}.cast`),C.filePath}async function T(){let t=C.filePath;if(!t||C.timestamp===0)return;let n=b(b(b(e(),`projects`),g(a())),`${r()}-${C.timestamp}.cast`);if(t===n)return;await E?.flush();let i=v(t),o=v(n);try{await S(t,n),C.filePath=n,u(`[asciicast] Renamed recording: ${i} → ${o}`)}catch{u(`[asciicast] Failed to rename recording from ${i} to ${o}`)}}var E=null;function D(){return{cols:process.stdout.columns||80,rows:process.stdout.rows||24}}function O(){let e=w();if(!e)return;let{cols:t,rows:n}=D(),r=performance.now(),i=o({version:2,width:t,height:n,timestamp:Math.floor(Date.now()/1e3),env:{SHELL:process.env.SHELL||``,TERM:process.env.TERM||``}});try{f().mkdirSync(y(e))}catch{}f().appendFileSync(e,i+`
2
+ `,{mode:384});let a=Promise.resolve(),s=p({writeFn(e){let t=C.filePath;t&&(a=a.then(()=>x(t,e)).catch(()=>{}))},flushIntervalMs:500,maxBufferSize:50,maxBufferBytes:10*1024*1024}),l=process.stdout.write.bind(process.stdout);process.stdout.write=function(e,t,n){let i=(performance.now()-r)/1e3,a=typeof e==`string`?e:Buffer.from(e).toString(`utf-8`);return s.write(o([i,`o`,a])+`
3
+ `),typeof t==`function`?l(e,t):l(e,t,n)};function d(){let e=(performance.now()-r)/1e3,{cols:t,rows:n}=D();s.write(o([e,`r`,`${t}x${n}`])+`
4
+ `)}process.stdout.on(`resize`,d),E={async flush(){s.flush(),await a},async dispose(){s.dispose(),await a,process.stdout.removeListener(`resize`,d),process.stdout.write=l}},c(async()=>{await E?.dispose(),E=null}),u(`[asciicast] Recording to ${e}`)}export{O as n,T as r,w as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{Ct as i,K as a,cn as o}from"./state-sIHsFpDu.js";import{n as s,t as c}from"./cwd--iizewsn.js";import{Ad as l,Ay as u,kd as d,ky as f}from"./loadAgentsDir-Ci5mr0vm.js";import{A as p,B as m,P as h,R as g,a as _,c as v,i as y,p as b,y as x}from"./teamHelpers-BmN9nKz-.js";import{a as S,c as C}from"./constants-41VpZw2G.js";import{join as w}from"path";import{readFileSync as T}from"fs";var E=t({getAssistantActivationPath:()=>M,getAssistantSystemPromptAddendum:()=>j,initializeAssistantTeam:()=>A,isAssistantForced:()=>k,isAssistantMode:()=>D,markAssistantForced:()=>O});function D(){return a()}function O(){N=!0}function k(){return N}async function A(){let e=i(),t=b(`assistant-${e.slice(0,8)}`),n=f(S,t),r=y(t),a=Date.now(),o=c(),s=d(n);return await x(t,{name:t,description:`Assistant mode in-process team`,createdAt:a,leadAgentId:n,leadSessionId:e,members:[{agentId:n,name:S,agentType:`assistant`,color:s,joinedAt:a,tmuxPaneId:``,cwd:o,subscriptions:[],backendType:`in-process`}]}),v(t),await g(t),await p(t),m(t),{teamName:t,teamFilePath:r,leadAgentId:n,selfAgentId:n,selfAgentName:S,isLeader:!0,selfAgentColor:s,teammates:{[n]:{name:S,agentType:`assistant`,color:s,tmuxSessionName:`in-process`,tmuxPaneId:`leader`,cwd:o,spawnedAt:a}}}}function j(){try{return T(w(n(),`agents`,`assistant.md`),`utf-8`)}catch{return``}}function M(){if(D())return N?`daemon`:`gate`}var N,P=e((()=>{o(),u(),s(),r(),C(),_(),l(),h(),N=!1}));export{A as a,O as c,P as i,M as n,k as o,j as r,D as s,E as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,d as i,f as a,nt as o,t as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{K as u,Kn as d,cn as f}from"./state-sIHsFpDu.js";import{r as p,v as m}from"./git-CN3qtTb_.js";import{Mx as h,kx as g}from"./loadAgentsDir-Ci5mr0vm.js";import{t as _}from"./useKeybinding-FsOnjW6T.js";import{t as v}from"./Dialog-DYFGqyDs.js";import{t as y}from"./ListItem-OFARanN7.js";import{i as b,o as x,t as S}from"./cliLaunch-BQa48gsr.js";import{resolve as C}from"path";async function w(){let e=process.cwd();return p(e)||C(e)}function T({defaultDir:e,onInstalled:t,onCancel:n,onError:s}){h(`assistant-install-wizard`);let[l,u]=(0,D.useState)(0),[d,f]=(0,D.useState)(!1);o({"select:next":()=>u(e=>(e+1)%2),"select:previous":()=>u(e=>(e-1+2)%2),"select:accept":()=>{l===0?p():n()}},{context:`Select`});function p(){if(d)return;f(!0);let n=e||C(`.`);try{let e=x(S([`daemon`,`start`,`--dir=${n}`]),{cwd:n,stdio:`ignore`,detached:!0});e.unref(),e.on(`error`,e=>{s(`Failed to start daemon: ${e.message}`)}),setTimeout(()=>{t(n)},1500)}catch(e){s(`Failed to start daemon: ${e instanceof Error?e.message:String(e)}`)}}return d?(0,O.jsx)(a,{title:`Assistant Setup`,onCancel:n,hideInputGuide:!0,children:(0,O.jsxs)(r,{children:[`Starting daemon in `,e,`...`]})}):(0,O.jsx)(a,{title:`Assistant Setup`,onCancel:n,hideInputGuide:!0,children:(0,O.jsxs)(c,{flexDirection:`column`,gap:1,children:[(0,O.jsx)(r,{children:`No active assistant sessions found.`}),(0,O.jsxs)(r,{children:[`Start a daemon in `,(0,O.jsx)(r,{bold:!0,children:e||`.`}),` to create a cloud session?`]}),(0,O.jsxs)(c,{flexDirection:`column`,children:[(0,O.jsx)(i,{isFocused:l===0,children:(0,O.jsx)(r,{children:`Start assistant daemon`})}),(0,O.jsx)(i,{isFocused:l===1,children:(0,O.jsx)(r,{children:`Cancel`})})]}),(0,O.jsx)(r,{dimColor:!0,children:`Enter to select · Esc to cancel`})]})})}async function E(e,t,n){let{setAppState:r,getAppState:i}=t;return u()?(i().assistantPanelVisible?(r(e=>({...e,assistantPanelVisible:!1})),e(`Assistant panel hidden.`,{display:`system`})):(r(e=>({...e,assistantPanelVisible:!0})),e(`Assistant panel opened.`,{display:`system`})),null):(d(!0),r(e=>({...e,kairosEnabled:!0,assistantPanelVisible:!0})),e(`KAIROS assistant mode activated.`,{display:`system`}),null)}var D,O;e((()=>{n(),D=t(n(),1),s(),v(),y(),g(),_(),m(),b(),f(),O=l()}))();export{T as NewInstallWizard,E as call,w as computeDefaultInstallDir};
@@ -0,0 +1 @@
1
+ import{i as e,s as t}from"./assistant-BRGDWkKB.js";e();export{t as isAssistantMode};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";var t,n,r;e((()=>{t=()=>{},n=()=>{},r=()=>{}}))();export{t as clearAttributionCaches,r as registerAttributionHooks,n as sweepFileContentCache};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";var t;e((()=>{t=()=>[]}))();export{t as buildPRTrailers};
@@ -0,0 +1 @@
1
+ import{Jt as e,Pt as t,cn as n,nn as r,on as i,zt as a}from"./paths-Q2255dD7.js";i();export{t as checkAndRefreshOAuthTokenIfNeeded,a as clearOAuthTokenCache,e as getClaudeAIOAuthTokens,r as handleOAuth401Error,n as isAnthropicAuthEnabled};
@@ -0,0 +1 @@
1
+ import{_b as e,gb as t,hb as n,mb as r}from"./loadAgentsDir-Ci5mr0vm.js";e();export{r as authLogin,n as authLogout,t as authStatus};