cf 0.5.0 → 0.7.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 (317) hide show
  1. package/dist/_meta/agent-context.json +78 -41
  2. package/dist/_meta/commands.json +19888 -21071
  3. package/dist/_meta/schemas.json +14305 -15328
  4. package/dist/abuse-reports-BsF9JZPW.mjs +8 -0
  5. package/dist/account-D8mYiWxQ.mjs +2 -0
  6. package/dist/accounts-CJci1Oez.mjs +23 -0
  7. package/dist/acm-CmCd985Q.mjs +3 -0
  8. package/dist/addressing-R7p6TRBe.mjs +12 -0
  9. package/dist/{agent-context-DMPfi54f.mjs → agent-context-Bzl5PGW-.mjs} +1 -1
  10. package/dist/ai-BzJg0RIX.mjs +3 -0
  11. package/dist/ai-audit-B0vJNOZG.mjs +2 -0
  12. package/dist/ai-gateway-D3vJR3My.mjs +10 -0
  13. package/dist/ai-search-CNg7W7U4.mjs +7 -0
  14. package/dist/alerting-_sdM0B0S.mjs +6 -0
  15. package/dist/alerts-dpT6Qsdu.mjs +2 -0
  16. package/dist/{analytics-DSSRDZz8.mjs → analytics-BFBJhDrP.mjs} +1 -1
  17. package/dist/analytics_engine-CWhFvyeK.mjs +2 -0
  18. package/dist/api-gateway-D4AIEtUq.mjs +33 -0
  19. package/dist/argo-Bjk6nFfs.mjs +2 -0
  20. package/dist/artifacts-Ba4b3iOa.mjs +4 -0
  21. package/dist/{audit-logs-BuExU_nz.mjs → audit-logs-BE0T5All.mjs} +1 -1
  22. package/dist/{auth-CSC4yhEJ.mjs → auth-CZ0E51rF.mjs} +3 -3
  23. package/dist/auth-D_zyQbDR.mjs +5 -0
  24. package/dist/autorag-Cnpp8PAG.mjs +2 -0
  25. package/dist/billing-Dz6Zj8Eq.mjs +2 -0
  26. package/dist/bot-management-pFwIbFi-.mjs +5 -0
  27. package/dist/botnet-feed-BY9uGChY.mjs +3 -0
  28. package/dist/brand-protection-DkPAk2Cz.mjs +3 -0
  29. package/dist/brands-CGpk9nZB.mjs +2 -0
  30. package/dist/browser-extension-D9P6Yv8i.mjs +3 -0
  31. package/dist/browser-run-DhHtz4y3.mjs +4 -0
  32. package/dist/build-CWuStmDi.mjs +2 -0
  33. package/dist/cache-DVhkiIGK.mjs +5 -0
  34. package/dist/calls-95zjvIcO.mjs +4 -0
  35. package/dist/certificate-authorities-BowBqbVq.mjs +2 -0
  36. package/dist/cf-BLT7uKJF.mjs +18 -0
  37. package/dist/chunk-2SIGYDH3-qXx_zE6v.mjs +397 -0
  38. package/dist/clear-DXx8WBAN.mjs +2 -0
  39. package/dist/client-certificates-D6mE4vJu.mjs +3 -0
  40. package/dist/cloud-connector-DmwsjeFN.mjs +2 -0
  41. package/dist/cloudforce-one-CG3TT7IN.mjs +23 -0
  42. package/dist/{completions-DOeHPdCG.mjs → completions-DMc_PlIw.mjs} +2 -2
  43. package/dist/connectivity-DJkE3crz.mjs +3 -0
  44. package/dist/connector-interrupts-DTgQ7onV.mjs +2 -0
  45. package/dist/connector-telemetry-events-D0rTHDou.mjs +2 -0
  46. package/dist/connector-telemetry-snapshots--0QmD3z6.mjs +2 -0
  47. package/dist/connectors-zWaZTi2A.mjs +3 -0
  48. package/dist/content-scanning-CGvGf04y.mjs +4 -0
  49. package/dist/ct-alerting-ebSPSWNC.mjs +3 -0
  50. package/dist/custom-certificates-CWUrPYLP.mjs +5 -0
  51. package/dist/custom-csrs-CRtdrF9R.mjs +4 -0
  52. package/dist/custom-hostnames-CVQSksqq.mjs +5 -0
  53. package/dist/custom-nameservers-BRwbIdsX.mjs +3 -0
  54. package/dist/custom-pages-Ci8sTQX7.mjs +4 -0
  55. package/dist/d1-78Ym1P6D.mjs +4 -0
  56. package/dist/data-security-zmFoMwRU.mjs +6 -0
  57. package/dist/{dcv-delegation-Bgf86J-r.mjs → dcv-delegation-Dd4FZ2IG.mjs} +1 -1
  58. package/dist/{deploy-dVrgDUOp.mjs → deploy-CVvkZFjR.mjs} +1 -1
  59. package/dist/{dev-C01_Lby6.mjs → dev-DSslyDXx.mjs} +1 -1
  60. package/dist/diagnostics-B8Ev5m_o.mjs +3 -0
  61. package/dist/dispatch-namespaces-Dm5vGeEP.mjs +7 -0
  62. package/dist/dist-B7hsuvbF.mjs +57 -0
  63. package/dist/dist-BH-4NQOV.mjs +134 -0
  64. package/dist/dns-D7VAaCyO.mjs +29 -0
  65. package/dist/dns-firewall-ByLCsf0q.mjs +57 -0
  66. package/dist/domain-info-CRvKc2Lg.mjs +2 -0
  67. package/dist/durable-objects-BIpvyu9m.mjs +2 -0
  68. package/dist/email-auth-Cx--s8W4.mjs +2 -0
  69. package/dist/email-routing-CiDbivcN.mjs +10 -0
  70. package/dist/email-security-BYeAuSc6.mjs +12 -0
  71. package/dist/email-sending-Dg2rSmHH.mjs +4 -0
  72. package/dist/filters-DZ8YnQ90.mjs +4 -0
  73. package/dist/firewall-DEd1hs_I.mjs +11 -0
  74. package/dist/flagship-DVw7xGoP.mjs +4 -0
  75. package/dist/{fraud-C03MtdZb.mjs → fraud-BbGS3FZs.mjs} +2 -2
  76. package/dist/google-tag-gateway-CBnRGYQR.mjs +2 -0
  77. package/dist/healthchecks-Da9N3ix4.mjs +4 -0
  78. package/dist/hostnames-mimZu2tB.mjs +3 -0
  79. package/dist/hyperdrive-BNdvxOos.mjs +21 -0
  80. package/dist/iam-DGQ-OgRl.mjs +6 -0
  81. package/dist/images-CI6Iy9ho.mjs +7 -0
  82. package/dist/index.mjs +1 -1
  83. package/dist/intel-BDB-aRtU.mjs +3 -0
  84. package/dist/internal-Czlp5Ekb.mjs +2 -0
  85. package/dist/{ips-nv9INuWZ.mjs → ips-B9UuPvsY.mjs} +1 -1
  86. package/dist/keyless-certificates-Ua9uJgPt.mjs +3 -0
  87. package/dist/kv-BHerx4dZ.mjs +5 -0
  88. package/dist/leaked-credential-checks-B8Vunj9h.mjs +3 -0
  89. package/dist/live-Ce7dZW7p.mjs +2 -0
  90. package/dist/load-balancers-DSjS5WKw.mjs +6 -0
  91. package/dist/logexplorer-DBIfTlRP.mjs +24 -0
  92. package/dist/logo-matches-C00iGpzW.mjs +2 -0
  93. package/dist/logos-CJLhx1go.mjs +3 -0
  94. package/dist/logpush-Cr1U-eK-.mjs +5 -0
  95. package/dist/logs-DMvtchc6.mjs +3 -0
  96. package/dist/magic-cloud-networking-FQfO8QWH.mjs +5 -0
  97. package/dist/magic-network-monitoring-CDd70fJQ.mjs +4 -0
  98. package/dist/magic-transit-DiKiPUax.mjs +110 -0
  99. package/dist/managed-transforms-fPVUTrAv.mjs +3 -0
  100. package/dist/matches-B0yHbQ2I.mjs +2 -0
  101. package/dist/moq-UgBawOXe.mjs +13 -0
  102. package/dist/mtls-certificates-xKUbC5EL.mjs +3 -0
  103. package/dist/network-interconnects-BJzOE2ny.mjs +41 -0
  104. package/dist/oauth-DBJ5GSFk.mjs +40 -0
  105. package/dist/observability-B-1y36QS.mjs +4 -0
  106. package/dist/organization-Dq3PClZ7.mjs +41 -0
  107. package/dist/organizations-AhsQkHyX.mjs +2 -0
  108. package/dist/origin-ca-certificates-CRgF0UyU.mjs +3 -0
  109. package/dist/origin-post-quantum-encryption-BXTx7DPa.mjs +2 -0
  110. package/dist/origin-tls-client-auth-BDw5q-6G.mjs +4 -0
  111. package/dist/{page-rules-EZHJePmn.mjs → page-rules-DqYQ23eg.mjs} +5 -5
  112. package/dist/{page-shield-CXJioWPs.mjs → page-shield-DKdlZOLO.mjs} +5 -5
  113. package/dist/pages-BsXF11Kv.mjs +11 -0
  114. package/dist/pay-per-crawl-BGAwuAP3.mjs +2 -0
  115. package/dist/pipelines-D_QhSnGW.mjs +6 -0
  116. package/dist/progress-O88q63Bk.mjs +2 -0
  117. package/dist/prompt-DTAWiEm2.mjs +3 -0
  118. package/dist/queries-CAE95-OH.mjs +3 -0
  119. package/dist/queues-BBz35Mqd.mjs +6 -0
  120. package/dist/r2-Zp99S5xF.mjs +21 -0
  121. package/dist/r2-data-catalog-BeVLZwrE.mjs +16 -0
  122. package/dist/radar-Cij-XVQJ.mjs +2 -0
  123. package/dist/rate-limit-analytics-CGviSPnJ.mjs +2 -0
  124. package/dist/rate-limits-DSdToIWv.mjs +5 -0
  125. package/dist/raw-fetch-DgezeshQ.mjs +2 -0
  126. package/dist/ready-DMpJvyaz.mjs +2 -0
  127. package/dist/realtime-kit-9rJcapfM.mjs +18 -0
  128. package/dist/recent-submissions-LS5IM-bm.mjs +2 -0
  129. package/dist/refute-BGTpr5sy.mjs +2 -0
  130. package/dist/registrar-CXViZlah.mjs +83 -0
  131. package/dist/registrar-sandbox-CvQyjXLJ.mjs +83 -0
  132. package/dist/request-tracers-DATfBnE9.mjs +2 -0
  133. package/dist/{resolve-C3h-mwp7.mjs → resolve-Bs2sMRYS.mjs} +1 -1
  134. package/dist/resource-sharing-Cmhn6ghR.mjs +3 -0
  135. package/dist/resource-tagging-BTn05AOj.mjs +16 -0
  136. package/dist/rules-ens3OHme.mjs +4 -0
  137. package/dist/rulesets-bkreZRao.mjs +8 -0
  138. package/dist/rum-CpgXFcwl.mjs +4 -0
  139. package/dist/scan-logo-DUDIZJ2A.mjs +2 -0
  140. package/dist/scan-page-BqoQTk3R.mjs +2 -0
  141. package/dist/{schema-BR31o4P6.mjs → schema-DCF4yEp_.mjs} +1 -1
  142. package/dist/schema-validation-Ca6o94ts.mjs +24 -0
  143. package/dist/scim-C4oT8TMc.mjs +4 -0
  144. package/dist/sdk-pQ5kaGUX.mjs +3 -0
  145. package/dist/search-C4T5riPh.mjs +2 -0
  146. package/dist/secrets-store-CWEuiDNo.mjs +7 -0
  147. package/dist/security-center-BOvm7xy6.mjs +2 -0
  148. package/dist/security-txt-BCAUBctN.mjs +3 -0
  149. package/dist/session-B1ARgLG7.mjs +2 -0
  150. package/dist/share-DhmVspmL.mjs +5 -0
  151. package/dist/shared-Bod3-Exx.mjs +990 -0
  152. package/dist/signed-url-DA509wgp.mjs +2 -0
  153. package/dist/smart-shield-DZm4fn6z.mjs +3 -0
  154. package/dist/snippets-oQ0u26-z.mjs +4 -0
  155. package/dist/{spawn-CCGzKlC4.mjs → spawn-ChG5Xi9Z.mjs} +1 -1
  156. package/dist/{spectrum-pVGxb7u5.mjs → spectrum-Cnkee5Ww.mjs} +6 -6
  157. package/dist/speed-DqNnvLBD.mjs +4 -0
  158. package/dist/{src-DU7FBCOX.mjs → src-By-zTCHz.mjs} +9 -9
  159. package/dist/ssl-tS3CYZsZ.mjs +15 -0
  160. package/dist/state-OsdDJvdj.mjs +2 -0
  161. package/dist/stream-Bud9Os5V.mjs +14 -0
  162. package/dist/submission-info-DfIXmu-M.mjs +2 -0
  163. package/dist/submit-BtP8she2.mjs +2 -0
  164. package/dist/tenant-CMwHa-tU.mjs +2 -0
  165. package/dist/token-validation-BYC7HTok.mjs +10 -0
  166. package/dist/{tools-D_hfUU_Z.mjs → tools-Dru4l8yh.mjs} +1 -1
  167. package/dist/total-queries-DdLBNJzd.mjs +2 -0
  168. package/dist/tracked-domains-BbaY-IuY.mjs +2 -0
  169. package/dist/turnstile-CP4nScaL.mjs +23 -0
  170. package/dist/{ui-erjBdVKL.mjs → ui-BNoF0KpD.mjs} +2 -2
  171. package/dist/url-info-Chs9h7Y-.mjs +2 -0
  172. package/dist/url-normalization-XYxW5Gj0.mjs +3 -0
  173. package/dist/url-scanner-D4pYNlO-.mjs +2 -0
  174. package/dist/user-DtefniLc.mjs +11 -0
  175. package/dist/vectorize-BeAY2g-7.mjs +4 -0
  176. package/dist/verify-D7J3F_NZ.mjs +2 -0
  177. package/dist/{versions-CBHwWPAM.mjs → versions-dMW3bLVv.mjs} +1 -1
  178. package/dist/waiting-rooms-K78HeeTg.mjs +11 -0
  179. package/dist/web3-Dhw79l4S.mjs +4 -0
  180. package/dist/workers-builds-CuOAB3u4.mjs +7 -0
  181. package/dist/workers-l3zMNOU6.mjs +20 -0
  182. package/dist/workflows-rb7RYBKP.mjs +6 -0
  183. package/dist/zaraz-CHecMYuo.mjs +2 -0
  184. package/dist/zero-trust-DAZoa-Aj.mjs +117 -0
  185. package/dist/zone-BnnqJwW-.mjs +2 -0
  186. package/dist/zones-DpI2YikF.mjs +21 -0
  187. package/package.json +3 -1
  188. package/dist/abuse-reports-Ina5TlsU.mjs +0 -8
  189. package/dist/accounts-B_joQcMi.mjs +0 -22
  190. package/dist/acm-_kIHqYME.mjs +0 -3
  191. package/dist/addressing-CaFlw8y1.mjs +0 -12
  192. package/dist/ai-CqnhNb_c.mjs +0 -2
  193. package/dist/ai-gateway-pgYGI519.mjs +0 -8
  194. package/dist/ai-search-eqQMPQol.mjs +0 -7
  195. package/dist/ai_gateway--vuVLnOm.mjs +0 -4
  196. package/dist/alerting-CPxHiYHb.mjs +0 -6
  197. package/dist/analytics_engine-gWyfnsCs.mjs +0 -2
  198. package/dist/api-gateway-BXXGFCVR.mjs +0 -33
  199. package/dist/argo-aC6A3JyX.mjs +0 -2
  200. package/dist/artifacts-HD4V2xpK.mjs +0 -4
  201. package/dist/auth-D5hNsOFq.mjs +0 -5
  202. package/dist/billing-COaghyxl.mjs +0 -2
  203. package/dist/bot-management-DmEzeV1Y.mjs +0 -5
  204. package/dist/botnet-feed-ByEAXAkw.mjs +0 -3
  205. package/dist/brand-protection-dPrGe8sL.mjs +0 -3
  206. package/dist/browser-rendering-BiSGnpBf.mjs +0 -4
  207. package/dist/build-HuS9-R0V.mjs +0 -1054
  208. package/dist/cache-CY-7Lt71.mjs +0 -5
  209. package/dist/calls-wOQGDWPl.mjs +0 -4
  210. package/dist/certificate-authorities-CtqzAtxQ.mjs +0 -2
  211. package/dist/client-certificates-CRf41xLe.mjs +0 -3
  212. package/dist/cloud-connector-BA5IRZUP.mjs +0 -2
  213. package/dist/cloudforce-one-Bq_qPAWs.mjs +0 -21
  214. package/dist/config-B5k-XbwS.mjs +0 -2
  215. package/dist/connectivity-Bx3MgTHX.mjs +0 -3
  216. package/dist/connector-interrupts-D7ylweJZ.mjs +0 -2
  217. package/dist/connector-telemetry-events-6izV1kbP.mjs +0 -2
  218. package/dist/connector-telemetry-snapshots-BnjKbyxX.mjs +0 -2
  219. package/dist/connectors-DRt4e6d_.mjs +0 -3
  220. package/dist/content-scanning-Cd2vy5Sz.mjs +0 -4
  221. package/dist/context-jpewmual.mjs +0 -2
  222. package/dist/custom-certificates-DYE-9epx.mjs +0 -5
  223. package/dist/custom-hostnames-CtuTdFcX.mjs +0 -5
  224. package/dist/custom-nameservers-CWqA51in.mjs +0 -3
  225. package/dist/custom-pages-DeUKEFGe.mjs +0 -4
  226. package/dist/d1-DvWY9Gp4.mjs +0 -4
  227. package/dist/data-security-BPo6dIWu.mjs +0 -6
  228. package/dist/diagnostics-6nKPmVgz.mjs +0 -3
  229. package/dist/dispatch-namespaces-64lXx2WJ.mjs +0 -7
  230. package/dist/dist-C6zxsVdY.mjs +0 -306
  231. package/dist/dist-t_YrL25p.mjs +0 -82
  232. package/dist/dns-ClciFGxx.mjs +0 -29
  233. package/dist/dns-firewall-DfUmXDCe.mjs +0 -57
  234. package/dist/durable-objects-CMaYZ-YU.mjs +0 -2
  235. package/dist/email-routing-CGXhFqF5.mjs +0 -10
  236. package/dist/email-security-D5viPq8S.mjs +0 -8
  237. package/dist/email-sending-C2jpc3gh.mjs +0 -3
  238. package/dist/filters-bzsFcWt0.mjs +0 -4
  239. package/dist/firewall-DYZcTtIC.mjs +0 -11
  240. package/dist/google-tag-gateway-Dfy887yA.mjs +0 -2
  241. package/dist/healthchecks-DRoAlWgr.mjs +0 -4
  242. package/dist/hostnames-CFgIVI3s.mjs +0 -3
  243. package/dist/hyperdrive-C7-gwTSV.mjs +0 -18
  244. package/dist/iam-DqVPzGrb.mjs +0 -6
  245. package/dist/images-BYfl4YgR.mjs +0 -7
  246. package/dist/intel-duTEPIHc.mjs +0 -3
  247. package/dist/keyless-certificates-CRCDVd3g.mjs +0 -3
  248. package/dist/kv-CZoV4tiv.mjs +0 -5
  249. package/dist/leaked-credential-checks-DNIBg7Pe.mjs +0 -3
  250. package/dist/load-balancers--OMg0HNt.mjs +0 -6
  251. package/dist/logpush-C0_lZTyY.mjs +0 -4
  252. package/dist/logs-BtpWZQfV.mjs +0 -3
  253. package/dist/magic-cloud-networking-u6rwYbGg.mjs +0 -5
  254. package/dist/magic-network-monitoring-CKgQyRj4.mjs +0 -4
  255. package/dist/magic-transit-CLhMcJ_-.mjs +0 -89
  256. package/dist/managed-transforms-D0Z2mlth.mjs +0 -3
  257. package/dist/mtls-certificates-BL65NK5T.mjs +0 -3
  258. package/dist/network-interconnects-Bgu9gmaG.mjs +0 -36
  259. package/dist/oauth-Bk-F-tIO.mjs +0 -52
  260. package/dist/observability-BynRbTF4.mjs +0 -4
  261. package/dist/organizations-BqJHyvMK.mjs +0 -41
  262. package/dist/origin-ca-certificates-BGvYwm3C.mjs +0 -3
  263. package/dist/origin-post-quantum-encryption-9KOE8YPI.mjs +0 -2
  264. package/dist/origin-tls-client-auth-d3snC3vr.mjs +0 -4
  265. package/dist/pages-D4aYteKk.mjs +0 -11
  266. package/dist/pipelines-G8Iusxq-.mjs +0 -6
  267. package/dist/progress-DrDErV9w.mjs +0 -2
  268. package/dist/queues-DEkbKqZX.mjs +0 -6
  269. package/dist/r2-CV0IkCAW.mjs +0 -21
  270. package/dist/r2-data-catalog-NtqGC_a_.mjs +0 -14
  271. package/dist/radar-D986zPJr.mjs +0 -2
  272. package/dist/rate-limits-B2wRsUX1.mjs +0 -5
  273. package/dist/raw-fetch-_n0lMAnD.mjs +0 -2
  274. package/dist/realtime-kit-Ld3c5eU6.mjs +0 -18
  275. package/dist/registrar-CDIwTz3G.mjs +0 -46
  276. package/dist/request-tracers-D7SFMDik.mjs +0 -2
  277. package/dist/resource-sharing-YIQ04jXE.mjs +0 -5
  278. package/dist/resource-tagging-Bd6Y03sg.mjs +0 -16
  279. package/dist/rules-DHjLP5Kx.mjs +0 -4
  280. package/dist/rulesets-q4QABpKs.mjs +0 -8
  281. package/dist/rum-SmT4HZmM.mjs +0 -4
  282. package/dist/schema-validation-vVetgC_P.mjs +0 -24
  283. package/dist/scim-ChOkZpNx.mjs +0 -3
  284. package/dist/sdk-DhIhH6GB.mjs +0 -5
  285. package/dist/secrets-store-BAK9G12O.mjs +0 -25
  286. package/dist/security-center-eScuYDKP.mjs +0 -2
  287. package/dist/security-txt-x7R4gmQu.mjs +0 -3
  288. package/dist/session-DHYCE-PM.mjs +0 -93
  289. package/dist/shared-BAjo72Lz.mjs +0 -2
  290. package/dist/smart-shield-CWlSsNi8.mjs +0 -3
  291. package/dist/snippets-DrlgYJYp.mjs +0 -4
  292. package/dist/speed-ZFrMWDgd.mjs +0 -4
  293. package/dist/ssl-9JY05sYt.mjs +0 -15
  294. package/dist/stream-tRU39b8K.mjs +0 -14
  295. package/dist/tenants-HLGUazms.mjs +0 -2
  296. package/dist/token-validation-_VdamKpz.mjs +0 -10
  297. package/dist/turnstile-BRzXd28B.mjs +0 -23
  298. package/dist/url-normalization-D-NxuLtN.mjs +0 -3
  299. package/dist/url-scanner-BzzR6iDx.mjs +0 -2
  300. package/dist/user-C4omq__w.mjs +0 -10
  301. package/dist/vectorize-By6EqcNR.mjs +0 -4
  302. package/dist/waiting-rooms-u6KwrzWd.mjs +0 -11
  303. package/dist/web3-DQ5dmE9W.mjs +0 -4
  304. package/dist/workers-D8Be7_as.mjs +0 -18
  305. package/dist/workers-builds-BE3W3qNk.mjs +0 -7
  306. package/dist/workflows-BWWufqFA.mjs +0 -4
  307. package/dist/zaraz-Bsa9AvVL.mjs +0 -2
  308. package/dist/zero-trust-UNVZFnKu.mjs +0 -118
  309. package/dist/zero_trust-B0_Rk4p2.mjs +0 -3
  310. package/dist/zones-BXtdwt6E.mjs +0 -21
  311. /package/dist/{body-parser-DWSy7uZ8.mjs → body-parser-BO6mfo_W.mjs} +0 -0
  312. /package/dist/{cli-types-BeyOc81z.mjs → cli-types-CFw6Xygp.mjs} +0 -0
  313. /package/dist/{input-validation-_fMCApaH.mjs → input-validation-BwUR9z8e.mjs} +0 -0
  314. /package/dist/{lib-4PQI6yRW.mjs → lib-Og5sB51C.mjs} +0 -0
  315. /package/dist/{local-CYc9q7l2.mjs → local-C6TLPAT6.mjs} +0 -0
  316. /package/dist/{metadata-OOwvpR8m.mjs → metadata-Cnyws6iO.mjs} +0 -0
  317. /package/dist/{open-YWOUIZ5Y-3jqSKAB1.mjs → open-YWOUIZ5Y-CFRcYALi.mjs} +0 -0
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env node
2
- import{i as e,o as t,t as n}from"./chunk-DH-VkVmc.mjs";import{b as r,x as i}from"./session-DHYCE-PM.mjs";import"node:fs";import a from"node:os";import"node:path";import{styleText as o}from"node:util";import s,{stdin as c,stdout as l}from"node:process";import u,{ReadStream as d}from"node:tty";import*as f from"node:readline";import p from"node:readline";const m=(e=0)=>t=>`\u001B[${t+e}m`,h=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,g=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,_={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(_.modifier);const v=Object.keys(_.color),y=Object.keys(_.bgColor);[...v,...y];function b(){let e=new Map;for(let[t,n]of Object.entries(_)){for(let[t,r]of Object.entries(n))_[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=_[t],e.set(r[0],r[1]);Object.defineProperty(_,t,{value:n,enumerable:!1})}return Object.defineProperty(_,`codes`,{value:e,enumerable:!1}),_.color.close=`\x1B[39m`,_.bgColor.close=`\x1B[49m`,_.color.ansi=m(),_.color.ansi256=h(),_.color.ansi16m=g(),_.bgColor.ansi=m(10),_.bgColor.ansi256=h(10),_.bgColor.ansi16m=g(10),Object.defineProperties(_,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>_.rgbToAnsi256(..._.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>_.ansi256ToAnsi(_.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>_.ansi256ToAnsi(_.hexToAnsi256(e)),enumerable:!1}}),_}const x=b();function S(e,t=globalThis.Deno?globalThis.Deno.args:s.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}const{env:C}=s;let w;S(`no-color`)||S(`no-colors`)||S(`color=false`)||S(`color=never`)?w=0:(S(`color`)||S(`colors`)||S(`color=true`)||S(`color=always`))&&(w=1);function ee(){if(`FORCE_COLOR`in C)return C.FORCE_COLOR===`true`?1:C.FORCE_COLOR===`false`?0:C.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(C.FORCE_COLOR,10),3)}function te(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ne(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=ee();r!==void 0&&(w=r);let i=n?w:r;if(i===0)return 0;if(n){if(S(`color=16m`)||S(`color=full`)||S(`color=truecolor`))return 3;if(S(`color=256`))return 2}if(`TF_BUILD`in C&&`AGENT_NAME`in C)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(C.TERM===`dumb`)return o;if(s.platform===`win32`){let e=a.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in C)return`GITHUB_ACTIONS`in C||`GITEA_ACTIONS`in C?3:[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in C)||C.CI_NAME===`codeship`?1:o;if(`TEAMCITY_VERSION`in C)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(C.TEAMCITY_VERSION);if(C.COLORTERM===`truecolor`||C.TERM===`xterm-kitty`)return 3;if(`TERM_PROGRAM`in C){let e=Number.parseInt((C.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(C.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(C.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(C.TERM)||`COLORTERM`in C?1:o}function re(e,t={}){return te(ne(e,{streamIsTTY:e&&e.isTTY,...t}))}const ie={stdout:re({isTTY:u.isatty(1)}),stderr:re({isTTY:u.isatty(2)})};function T(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function ae(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
3
- `:`
4
- `)+n,i=r+1,r=e.indexOf(`
5
- `,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:oe,stderr:se}=ie,ce=Symbol(`GENERATOR`),E=Symbol(`STYLER`),D=Symbol(`IS_EMPTY`),le=[`ansi`,`ansi`,`ansi256`,`ansi16m`],O=Object.create(null),ue=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=oe?oe.level:0;e.level=t.level===void 0?n:t.level},de=e=>{let t=(...e)=>e.join(` `);return ue(t,e),Object.setPrototypeOf(t,k.prototype),t};function k(e){return de(e)}Object.setPrototypeOf(k.prototype,Function.prototype);for(let[e,t]of Object.entries(x))O[e]={get(){let n=he(this,me(t.open,t.close,this[E]),this[D]);return Object.defineProperty(this,e,{value:n}),n}};O.visible={get(){let e=he(this,this[E],!0);return Object.defineProperty(this,`visible`,{value:e}),e}};const fe=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?x[n].ansi16m(...r):t===`ansi256`?x[n].ansi256(x.rgbToAnsi256(...r)):x[n].ansi(x.rgbToAnsi(...r)):e===`hex`?fe(`rgb`,t,n,...x.hexToRgb(...r)):x[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){O[e]={get(){let{level:t}=this;return function(...n){let r=me(fe(e,le[t],`color`,...n),x.color.close,this[E]);return he(this,r,this[D])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);O[t]={get(){let{level:t}=this;return function(...n){let r=me(fe(e,le[t],`bgColor`,...n),x.bgColor.close,this[E]);return he(this,r,this[D])}}}}const pe=Object.defineProperties(()=>{},{...O,level:{enumerable:!0,get(){return this[ce].level},set(e){this[ce].level=e}}}),me=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},he=(e,t,n)=>{let r=(...e)=>ge(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,pe),r[ce]=e,r[E]=t,r[D]=n,r},ge=(e,t)=>{if(e.level<=0||!t)return e[D]?``:t;let n=e[E];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=T(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
6
- `);return a!==-1&&(t=ae(t,i,r,a)),r+t+i};Object.defineProperties(k.prototype,O);const _e=k();k({level:se?se.level:0});const ve=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ye=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,be=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,xe=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,Se=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ce=/\t{1,1000}/y,we=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,A=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Te=/\p{M}+/gu,Ee={limit:1/0,ellipsis:``},De=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?De(i,Ee,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(Te,``)){let t=e.codePointAt(0)||0;if(w=ye(t)?d:be(t)?p:l!==f&&ve(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(A.lastIndex=h,A.test(e)){if(_=A.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=A.lastIndex;continue}if(xe.lastIndex=h,xe.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=xe.lastIndex;continue}if(Se.lastIndex=h,Se.test(e)){if(_=Se.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=Se.lastIndex;continue}if(Ce.lastIndex=h,Ce.test(e)){if(_=Ce.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=Ce.lastIndex;continue}if(we.lastIndex=h,we.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=we.lastIndex;continue}h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},Oe={limit:1/0,ellipsis:``,ellipsisWidth:0},j=(e,t={})=>De(e,Oe,t).width,ke=`]8;;`,Ae=RegExp(`(?:\\[(?<code>\\d+)m|\\${ke}(?<uri>.*))`,`y`),je=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Me=e=>`[${e}m`,Ne=e=>`${ke}${e}`,Pe=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:j(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=j(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(ke,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Fe=e=>{let t=e.split(` `),n=t.length;for(;n&&!j(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ie=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=j(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=j(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Pe(s,r,t),c=j(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Pe(s,r,t),c=j(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Pe(s,r,t),c=j(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Fe(e)));let l=s.join(`
7
- `),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===`›`){Ae.lastIndex=e+1;let t=Ae.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
8
- `){a&&(r+=Ne(``));let e=i?je(i):void 0;i&&e&&(r+=Me(e))}else t===`
9
- `&&(i&&je(i)&&(r+=Me(i)),a&&(r+=Ne(a)))}return r},Le=/\r?\n/;function Re(e,t,n){return String(e).normalize().split(Le).map(e=>Ie(e,t,n)).join(`
10
- `)}var M=n(((e,t)=>{let n={to(e,t){return t?`[${t+1};${e+1}H`:`[${e+1}G`},move(e,t){let n=``;return e<0?n+=`[${-e}D`:e>0&&(n+=`[${e}C`),t<0?n+=`[${-t}A`:t>0&&(n+=`[${t}B`),n},up:(e=1)=>`[${e}A`,down:(e=1)=>`[${e}B`,forward:(e=1)=>`[${e}C`,backward:(e=1)=>`[${e}D`,nextLine:(e=1)=>`\x1B[E`.repeat(e),prevLine:(e=1)=>`\x1B[F`.repeat(e),left:`\x1B[G`,hide:`\x1B[?25l`,show:`\x1B[?25h`,save:`\x1B7`,restore:`\x1B8`};t.exports={cursor:n,scroll:{up:(e=1)=>`\x1B[S`.repeat(e),down:(e=1)=>`\x1B[T`.repeat(e)},erase:{screen:`\x1B[2J`,up:(e=1)=>`\x1B[1J`.repeat(e),down:(e=1)=>`\x1B[J`.repeat(e),line:`\x1B[2K`,lineEnd:`\x1B[K`,lineStart:`\x1B[1K`,lines(e){let t=``;for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():``);return e&&(t+=n.left),t}},beep:`\x07`}}))();function N(e,t,n){if(!n.some(e=>!e.disabled))return e;let r=e+t,i=Math.max(n.length-1,0),a=r<0?i:r>i?0:r;return n[a].disabled?N(a,t<0?-1:1,n):a}const P={actions:new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases:new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]]),messages:{cancel:`Canceled`,error:`Something went wrong`},withGuide:!0,date:{monthNames:[...[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],messages:{required:`Please enter a valid date`,invalidMonth:`There are only 12 months in a year`,invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function ze(e,t){if(typeof e==`string`)return P.aliases.get(e)===t;for(let n of e)if(n!==void 0&&ze(n,t))return!0;return!1}function Be(e,t){if(e===t)return;let n=e.split(`
11
- `),r=t.split(`
12
- `),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++)n[e]!==r[e]&&a.push(e);return{lines:a,numLinesBefore:n.length,numLinesAfter:r.length,numLines:i}}globalThis.process.platform.startsWith(`win`);const Ve=Symbol(`clack:cancel`);function He(e){return e===Ve}function F(e,t){let n=e;n.isTTY&&n.setRawMode(t)}const Ue=e=>`rows`in e&&typeof e.rows==`number`?e.rows:20;let I=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame=``;_subscribers=new Map;_cursor=0;state=`initial`;error=``;value;userInput=``;constructor(e,t=!0){let{input:n=c,output:r=l,render:i,signal:a,...o}=e;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=t,this._abortSignal=a,this.input=n,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(Ve);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}this.rl=p.createInterface({input:this.input,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on(`keypress`,this.onKeypress),F(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(M.cursor.show),this.output.off(`resize`,this.render),F(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(M.cursor.show),this.output.off(`resize`,this.render),F(this.input,!1),e(Ve)})})}_isActionKey(e,t){return e===` `}_setValue(e){this.value=e,this.emit(`value`,this.value)}_setUserInput(e,t){this.userInput=e??``,this.emit(`userInput`,this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:`u`}),this._setUserInput(``)}onKeypress(e,t){if(this._track&&t.name!==`return`&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:`h`}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&P.aliases.has(t.name)&&this.emit(`cursor`,P.aliases.get(t.name)),P.actions.has(t.name)&&this.emit(`cursor`,t.name)),e&&(e.toLowerCase()===`y`||e.toLowerCase()===`n`)&&this.emit(`confirm`,e.toLowerCase()===`y`),this.emit(`key`,e?.toLowerCase(),t),t?.name===`return`){if(this.opts.validate){let e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state=`error`,this.rl?.write(this.userInput))}this.state!==`error`&&(this.state=`submit`)}ze([e,t?.name,t?.sequence],`cancel`)&&(this.state=`cancel`),(this.state===`submit`||this.state===`cancel`)&&this.emit(`finalize`),this.render(),(this.state===`submit`||this.state===`cancel`)&&this.close()}close(){this.input.unpipe(),this.input.removeListener(`keypress`,this.onKeypress),this.output.write(`
13
- `),F(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=Re(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
14
- `).length-1;this.output.write(M.cursor.move(-999,e*-1))}render(){let e=Re(this._render(this)??``,process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(M.cursor.hide);else{let t=Be(this._prevFrame,e),n=Ue(this.output);if(this.restoreCursor(),t){let r=Math.max(0,t.numLinesAfter-n),i=Math.max(0,t.numLinesBefore-n),a=t.lines.find(e=>e>=r);if(a===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(M.cursor.move(0,a-i)),this.output.write(M.erase.lines(1));let t=e.split(`
15
- `);this.output.write(t[a]),this._prevFrame=e,this.output.write(M.cursor.move(0,t.length-a-1));return}else if(t.lines.length>1){if(r<i)a=r;else{let e=a-i;e>0&&this.output.write(M.cursor.move(0,e))}this.output.write(M.erase.down());let t=e.split(`
16
- `).slice(a);this.output.write(t.join(`
17
- `)),this._prevFrame=e;return}}this.output.write(M.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}};var We=class extends I{get cursor(){return+!this.value}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on(`userInput`,()=>{this.value=this._value}),this.on(`confirm`,e=>{this.output.write(M.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}};let Ge=class extends I{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(e=>e.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(t=>!e.includes(t.value));this.value=t.map(e=>e.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(e=>e!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0);this.cursor=this.options[t].disabled?N(t,1,this.options):t,this.on(`key`,e=>{e===`a`&&this.toggleAll(),e===`i`&&this.toggleInvert()}),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=N(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=N(this.cursor,1,this.options);break;case`space`:this.toggleValue();break}})}};var Ke=class extends I{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(e){super(e,!1),this.options=e.options;let t=this.options.findIndex(({value:t})=>t===e.initialValue),n=t===-1?0:t;this.cursor=this.options[n].disabled?N(n,1,this.options):n,this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=N(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=N(this.cursor,1,this.options);break}this.changeValue()})}},qe=class extends I{get userInputWithCursor(){if(this.state===`submit`)return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let t=e.slice(0,this.cursor),[n,...r]=e.slice(this.cursor);return`${t}${o(`inverse`,n)}${r.join(``)}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on(`userInput`,e=>{this._setValue(e)}),this.on(`finalize`,()=>{this.value||=e.defaultValue,this.value===void 0&&(this.value=``)})}},Je=n(((e,t)=>{t.exports=[{name:`Agola CI`,constant:`AGOLA`,env:`AGOLA_GIT_REF`,pr:`AGOLA_PULL_REQUEST_ID`},{name:`Alpic`,constant:`ALPIC`,env:`ALPIC_HOST`},{name:`Appcircle`,constant:`APPCIRCLE`,env:`AC_APPCIRCLE`,pr:{env:`AC_GIT_PR`,ne:`false`}},{name:`AppVeyor`,constant:`APPVEYOR`,env:`APPVEYOR`,pr:`APPVEYOR_PULL_REQUEST_NUMBER`},{name:`AWS CodeBuild`,constant:`CODEBUILD`,env:`CODEBUILD_BUILD_ARN`,pr:{env:`CODEBUILD_WEBHOOK_EVENT`,any:[`PULL_REQUEST_CREATED`,`PULL_REQUEST_UPDATED`,`PULL_REQUEST_REOPENED`]}},{name:`Azure Pipelines`,constant:`AZURE_PIPELINES`,env:`TF_BUILD`,pr:{BUILD_REASON:`PullRequest`}},{name:`Bamboo`,constant:`BAMBOO`,env:`bamboo_planKey`},{name:`Bitbucket Pipelines`,constant:`BITBUCKET`,env:`BITBUCKET_COMMIT`,pr:`BITBUCKET_PR_ID`},{name:`Bitrise`,constant:`BITRISE`,env:`BITRISE_IO`,pr:`BITRISE_PULL_REQUEST`},{name:`Buddy`,constant:`BUDDY`,env:`BUDDY_WORKSPACE_ID`,pr:`BUDDY_EXECUTION_PULL_REQUEST_ID`},{name:`Buildkite`,constant:`BUILDKITE`,env:`BUILDKITE`,pr:{env:`BUILDKITE_PULL_REQUEST`,ne:`false`}},{name:`CircleCI`,constant:`CIRCLE`,env:`CIRCLECI`,pr:`CIRCLE_PULL_REQUEST`},{name:`Cirrus CI`,constant:`CIRRUS`,env:`CIRRUS_CI`,pr:`CIRRUS_PR`},{name:`Cloudflare Pages`,constant:`CLOUDFLARE_PAGES`,env:`CF_PAGES`},{name:`Cloudflare Workers`,constant:`CLOUDFLARE_WORKERS`,env:`WORKERS_CI`},{name:`Codefresh`,constant:`CODEFRESH`,env:`CF_BUILD_ID`,pr:{any:[`CF_PULL_REQUEST_NUMBER`,`CF_PULL_REQUEST_ID`]}},{name:`Codemagic`,constant:`CODEMAGIC`,env:`CM_BUILD_ID`,pr:`CM_PULL_REQUEST`},{name:`Codeship`,constant:`CODESHIP`,env:{CI_NAME:`codeship`}},{name:`Drone`,constant:`DRONE`,env:`DRONE`,pr:{DRONE_BUILD_EVENT:`pull_request`}},{name:`dsari`,constant:`DSARI`,env:`DSARI`},{name:`Earthly`,constant:`EARTHLY`,env:`EARTHLY_CI`},{name:`Expo Application Services`,constant:`EAS`,env:`EAS_BUILD`},{name:`Gerrit`,constant:`GERRIT`,env:`GERRIT_PROJECT`},{name:`Gitea Actions`,constant:`GITEA_ACTIONS`,env:`GITEA_ACTIONS`},{name:`GitHub Actions`,constant:`GITHUB_ACTIONS`,env:`GITHUB_ACTIONS`,pr:{GITHUB_EVENT_NAME:`pull_request`}},{name:`GitLab CI`,constant:`GITLAB`,env:`GITLAB_CI`,pr:`CI_MERGE_REQUEST_ID`},{name:`GoCD`,constant:`GOCD`,env:`GO_PIPELINE_LABEL`},{name:`Google Cloud Build`,constant:`GOOGLE_CLOUD_BUILD`,env:`BUILDER_OUTPUT`},{name:`Harness CI`,constant:`HARNESS`,env:`HARNESS_BUILD_ID`},{name:`Heroku`,constant:`HEROKU`,env:{env:`NODE`,includes:`/app/.heroku/node/bin/node`}},{name:`Hudson`,constant:`HUDSON`,env:`HUDSON_URL`},{name:`Jenkins`,constant:`JENKINS`,env:[`JENKINS_URL`,`BUILD_ID`],pr:{any:[`ghprbPullId`,`CHANGE_ID`]}},{name:`LayerCI`,constant:`LAYERCI`,env:`LAYERCI`,pr:`LAYERCI_PULL_REQUEST`},{name:`Magnum CI`,constant:`MAGNUM`,env:`MAGNUM`},{name:`Netlify CI`,constant:`NETLIFY`,env:`NETLIFY`,pr:{env:`PULL_REQUEST`,ne:`false`}},{name:`Nevercode`,constant:`NEVERCODE`,env:`NEVERCODE`,pr:{env:`NEVERCODE_PULL_REQUEST`,ne:`false`}},{name:`Prow`,constant:`PROW`,env:`PROW_JOB_ID`},{name:`ReleaseHub`,constant:`RELEASEHUB`,env:`RELEASE_BUILD_ID`},{name:`Render`,constant:`RENDER`,env:`RENDER`,pr:{IS_PULL_REQUEST:`true`}},{name:`Sail CI`,constant:`SAIL`,env:`SAILCI`,pr:`SAIL_PULL_REQUEST_NUMBER`},{name:`Screwdriver`,constant:`SCREWDRIVER`,env:`SCREWDRIVER`,pr:{env:`SD_PULL_REQUEST`,ne:`false`}},{name:`Semaphore`,constant:`SEMAPHORE`,env:`SEMAPHORE`,pr:`PULL_REQUEST_NUMBER`},{name:`Sourcehut`,constant:`SOURCEHUT`,env:{CI_NAME:`sourcehut`}},{name:`Strider CD`,constant:`STRIDER`,env:`STRIDER`},{name:`TaskCluster`,constant:`TASKCLUSTER`,env:[`TASK_ID`,`RUN_ID`]},{name:`TeamCity`,constant:`TEAMCITY`,env:`TEAMCITY_VERSION`},{name:`Travis CI`,constant:`TRAVIS`,env:`TRAVIS`,pr:{env:`TRAVIS_PULL_REQUEST`,ne:`false`}},{name:`Vela`,constant:`VELA`,env:`VELA`,pr:{VELA_PULL_REQUEST:`1`}},{name:`Vercel`,constant:`VERCEL`,env:{any:[`NOW_BUILDER`,`VERCEL`]},pr:`VERCEL_GIT_PULL_REQUEST_ID`},{name:`Visual Studio App Center`,constant:`APPCENTER`,env:`APPCENTER_BUILD_ID`},{name:`Woodpecker`,constant:`WOODPECKER`,env:{CI:`woodpecker`},pr:{CI_BUILD_EVENT:`pull_request`}},{name:`Xcode Cloud`,constant:`XCODE_CLOUD`,env:`CI_XCODE_PROJECT`,pr:`CI_PULL_REQUEST_NUMBER`},{name:`Xcode Server`,constant:`XCODE_SERVER`,env:`XCS`}]})),Ye=n((e=>{let t=Je(),n=process.env;Object.defineProperty(e,`_vendors`,{value:t.map(function(e){return e.constant})}),e.name=null,e.isPR=null,e.id=null,n.CI!==`false`&&t.forEach(function(t){let n=(Array.isArray(t.env)?t.env:[t.env]).every(function(e){return r(e)});e[t.constant]=n,n&&(e.name=t.name,e.isPR=i(t),e.id=t.constant)}),e.isCI=!!(n.CI!==`false`&&(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name));function r(e){return typeof e==`string`?!!n[e]:`env`in e?n[e.env]&&n[e.env].includes(e.includes):`any`in e?e.any.some(function(e){return!!n[e]}):Object.keys(e).every(function(t){return n[t]===e[t]})}function i(e){switch(typeof e.pr){case`string`:return!!n[e.pr];case`object`:return`env`in e.pr?`any`in e.pr?e.pr.any.some(function(t){return n[e.pr.env]===t}):e.pr.env in n&&n[e.pr.env]!==e.pr.ne:`any`in e.pr?e.pr.any.some(function(e){return!!n[e]}):r(e.pr);default:return null}}}));const Xe=process.env.TERM_PROGRAM===`Apple_Terminal`,L={};L.cursorTo=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");return typeof t==`number`?`\x1B[`+(t+1)+`;`+(e+1)+`H`:`\x1B[`+(e+1)+`G`},L.cursorMove=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");let n=``;return e<0?n+=`\x1B[`+-e+`D`:e>0&&(n+=`\x1B[`+e+`C`),t<0?n+=`\x1B[`+-t+`A`:t>0&&(n+=`\x1B[`+t+`B`),n},L.cursorUp=(e=1)=>`\x1B[`+e+`A`,L.cursorDown=(e=1)=>`\x1B[`+e+`B`,L.cursorForward=(e=1)=>`\x1B[`+e+`C`,L.cursorBackward=(e=1)=>`\x1B[`+e+`D`,L.cursorLeft=`\x1B[G`,L.cursorSavePosition=Xe?`\x1B7`:`\x1B[s`,L.cursorRestorePosition=Xe?`\x1B8`:`\x1B[u`,L.cursorGetPosition=`\x1B[6n`,L.cursorNextLine=`\x1B[E`,L.cursorPrevLine=`\x1B[F`,L.cursorHide=`\x1B[?25l`,L.cursorShow=`\x1B[?25h`,L.eraseLines=e=>{let t=``;for(let n=0;n<e;n++)t+=L.eraseLine+(n<e-1?L.cursorUp():``);return e&&(t+=L.cursorLeft),t},L.eraseEndLine=`\x1B[K`,L.eraseStartLine=`\x1B[1K`,L.eraseLine=`\x1B[2K`,L.eraseDown=`\x1B[J`,L.eraseUp=`\x1B[1J`,L.eraseScreen=`\x1B[2J`,L.scrollUp=`\x1B[S`,L.scrollDown=`\x1B[T`,L.clearScreen=`\x1Bc`,L.clearTerminal=process.platform===`win32`?`${L.eraseScreen}`:`${L.eraseScreen}`,L.beep=`\x07`,L.link=(e,t)=>[`\x1B]`,`8`,`;`,`;`,t,`\x07`,e,`\x1B]`,`8`,`;`,`;`,`\x07`].join(``),L.image=(e,t={})=>{let n=`\x1B]1337;File=inline=1`;return t.width&&(n+=`;width=${t.width}`),t.height&&(n+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(n+=`;preserveAspectRatio=0`),n+`:`+e.toString(`base64`)+`\x07`},L.iTerm={setCwd:(e=process.cwd())=>`]50;CurrentDir=${e}`,annotation:(e,t={})=>{let n=`\x1B]1337;`,r=t.x!==void 0,i=t.y!==void 0;if((r||i)&&!(r&&i&&t.length!==void 0))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,``),n+=t.isHidden?`AddHiddenAnnotation=`:`AddAnnotation=`,t.length>0?n+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join(`|`):n+=e,n+`\x07`}};var Ze=n(((e,t)=>{let n=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=n,t.exports.default=n})),Qe=n(((e,t)=>{let n=Ze(),r=new WeakMap,i=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,s=function(...n){if(r.set(s,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(s,e),r.set(s,a),s};t.exports=i,t.exports.default=i,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}})),$e=n(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),et=n(((t,n)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=$e(),s=/^win/i.test(r.platform),c=e(`events`);typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),n.exports=function(e,t){if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){!p||!i(global.process)||(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),n.exports.signals=function(){return o};var p=!1,m=function(){p||!i(global.process)||(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=v,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,v=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}else return _.apply(this,arguments)}}})),tt=t(Qe(),1),nt=t(et(),1);const rt=(0,tt.default)(()=>{(0,nt.default)(()=>{s.stderr.write(`\x1B[?25h`)},{alwaysLast:!0})});let R=!1;const z={};z.show=(e=s.stderr)=>{e.isTTY&&(R=!1,e.write(`\x1B[?25h`))},z.hide=(e=s.stderr)=>{e.isTTY&&(rt(),R=!0,e.write(`\x1B[?25l`))},z.toggle=(e,t)=>{e!==void 0&&(R=e),R?z.show(t):z.hide(t)};var it=n(((e,t)=>{var n={};t===void 0?window.eastasianwidth=n:t.exports=n,n.eastAsianWidth=function(e){var t=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=t<<10|n,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?`F`:r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?`H`:4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?`W`:32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?`Na`:r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?`A`:`N`},n.characterLength=function(e){var t=this.eastAsianWidth(e);return t==`F`||t==`W`||t==`A`?2:1};function r(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}n.length=function(e){for(var t=r(e),n=0,i=0;i<t.length;i++)n+=this.characterLength(t[i]);return n},n.slice=function(e,t,i){textLen=n.length(e),t||=0,i||=1,t<0&&(t=textLen+t),i<0&&(i=textLen+i);for(var a=``,o=0,s=r(e),c=0;c<s.length;c++){var l=s[c],u=n.length(l);if(o>=t-+(u==2))if(o+u<=i)a+=l;else break;o+=u}return a}})),at=n(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),ot=t(it(),1),st=t(at(),1);function B(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=i(e),e.length===0))return 0;e=e.replace((0,st.default)(),` `);let n=t.ambiguousIsNarrow?1:2,r=0;for(let t of e){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=768&&e<=879))switch(ot.default.eastAsianWidth(t)){case`F`:case`W`:r+=2;break;case`A`:r+=n;break;default:r+=1}}return r}const V=new Set([`\x1B`,`›`]),ct=`]8;;`,lt=e=>`${V.values().next().value}[${e}m`,ut=e=>`${V.values().next().value}${ct}${e}`,dt=e=>e.split(` `).map(e=>B(e)),ft=(e,t,n)=>{let r=[...t],a=!1,o=!1,s=B(i(e[e.length-1]));for(let[t,i]of r.entries()){let c=B(i);if(s+c<=n?e[e.length-1]+=i:(e.push(i),s=0),V.has(i)&&(a=!0,o=r.slice(t+1).join(``).startsWith(ct)),a){o?i===`\x07`&&(a=!1,o=!1):i===`m`&&(a=!1);continue}s+=c,s===n&&t<r.length-1&&(e.push(``),s=0)}!s&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},pt=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(B(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},mt=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let i=``,a,o,s=dt(e),c=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let e=B(c[c.length-1]);if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(c.push(``),e=0),(e>0||n.trim===!1)&&(c[c.length-1]+=` `,e++)),n.hard&&s[r]>t){let n=t-e,a=1+Math.floor((s[r]-n-1)/t);Math.floor((s[r]-1)/t)<a&&c.push(``),ft(c,i,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(n.wordWrap===!1&&e<t){ft(c,i,t);continue}c.push(``)}if(e+s[r]>t&&n.wordWrap===!1){ft(c,i,t);continue}c[c.length-1]+=i}n.trim!==!1&&(c=c.map(e=>pt(e)));let l=[...c.join(`
18
- `)];for(let[e,t]of l.entries()){if(i+=t,V.has(t)){let{groups:t}=RegExp(`(?:\\[(?<code>\\d+)m|\\${ct}(?<uri>.*))`).exec(l.slice(e).join(``))||{groups:{}};if(t.code!==void 0){let e=Number.parseFloat(t.code);a=e===39?void 0:e}else t.uri!==void 0&&(o=t.uri.length===0?void 0:t.uri)}let n=r.codes.get(Number(a));l[e+1]===`
19
- `?(o&&(i+=ut(``)),a&&n&&(i+=lt(n))):t===`
20
- `&&(a&&n&&(i+=lt(a)),o&&(i+=ut(o)))}return i};function ht(e,t,n){return String(e).normalize().replace(/\r\n/g,`
21
- `).split(`
22
- `).map(e=>mt(e,t,n)).join(`
23
- `)}function gt(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const _t=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,vt=[`\x1B`,`›`],H=e=>`${vt[0]}[${e}m`,yt=(e,t,n)=>{let i=[];e=[...e];for(let n of e){let a=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let o=r.codes.get(Number.parseInt(n,10));if(o){let n=e.indexOf(o.toString());n===-1?i.push(H(t?o:a)):e.splice(n,1)}else if(t){i.push(H(0));break}else i.push(H(a))}if(t&&(i=i.filter((e,t)=>i.indexOf(e)===t),n!==void 0)){let e=H(r.codes.get(Number.parseInt(n,10)));i=i.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return i.join(``)};function bt(e,t,n){let r=[...e],i=[],a=typeof n==`number`?n:r.length,o=!1,s,c=0,l=``;for(let[u,d]of r.entries()){let r=!1;if(vt.includes(d)){let t=/\d[^m]*/.exec(e.slice(u,u+18));s=t&&t.length>0?t[0]:void 0,c<a&&(o=!0,s!==void 0&&i.push(s))}else o&&d===`m`&&(o=!1,r=!0);if(!o&&!r&&c++,!_t.test(d)&&gt(d.codePointAt())&&(c++,typeof n!=`number`&&a++),c>t&&c<=a)l+=d;else if(c===t&&!o&&s!==void 0)l=yt(i);else if(c>=a){l+=yt(i,!0,s);break}}return l}const U=e=>{let{columns:t}=e;return t||80},xt=(e,t)=>{let n=e.rows||24,r=t.split(`
24
- `),a=r.length-n;return a<=0?t:bt(t,i(r.slice(0,a).join(`
25
- `)).length+1)};function St(e,{showCursor:t=!1}={}){let n=0,r=U(e),i=``,a=(...a)=>{t||z.hide();let o=a.join(` `)+`
26
- `;o=xt(e,o);let s=U(e);o===i&&r===s||(i=o,r=s,o=ht(o,s,{trim:!1,hard:!0,wordWrap:!1}),e.write(L.eraseLines(n)+o),n=o.split(`
27
- `).length)};return a.clear=()=>{e.write(L.eraseLines(n)),i=``,r=U(e),n=0},a.done=()=>{i=``,r=U(e),n=0,t||z.show()},a}St(s.stdout),St(s.stderr);const Ct=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),wt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Tt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Et=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Dt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ot=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,kt=/\t{1,1000}/y,At=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,jt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Mt=/\p{M}+/gu,Nt={limit:1/0,ellipsis:``},Pt=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Pt(i,Nt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[jt,l],[Et,0],[Dt,o],[kt,s],[At,c],[Ot,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Mt,``)){let t=e.codePointAt(0)||0;if(S=wt(t)?2:Tt(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===Ot?Ct(e.slice(p,n.lastIndex)):n===At?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},Ft={limit:1/0,ellipsis:``,ellipsisWidth:0},W=(e,t={})=>Pt(e,Ft,t).width,It=`]8;;`,Lt=RegExp(`(?:\\[(?<code>\\d+)m|\\${It}(?<uri>.*))`,`y`),Rt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},zt=e=>`[${e}m`,Bt=e=>`${It}${e}`,Vt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:W(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=W(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(It,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ht=e=>{let t=e.split(` `),n=t.length;for(;n&&!W(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ut=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=W(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=W(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Vt(s,r,t),c=W(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Vt(s,r,t),c=W(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Vt(s,r,t),c=W(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Ht(e)));let l=s.join(`
28
- `),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===`›`){Lt.lastIndex=e+1;let t=Lt.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
29
- `){a&&(r+=Bt(``));let e=i?Rt(i):void 0;i&&e&&(r+=zt(e))}else t===`
30
- `&&(i&&Rt(i)&&(r+=zt(i)),a&&(r+=Bt(a)))}return r},Wt=/\r?\n/;function G(e,t,n){return String(e).normalize().split(Wt).map(e=>Ut(e,t,n)).join(`
31
- `)}function K(e,t,n){if(!n.some(e=>!e.disabled))return e;let r=e+t,i=Math.max(n.length-1,0),a=r<0?i:r>i?0:r;return n[a].disabled?K(a,t<0?-1:1,n):a}const q={actions:new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases:new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]]),messages:{cancel:`Canceled`,error:`Something went wrong`},withGuide:!0,date:{monthNames:[...[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],messages:{required:`Please enter a valid date`,invalidMonth:`There are only 12 months in a year`,invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function Gt(e,t){if(typeof e==`string`)return q.aliases.get(e)===t;for(let n of e)if(n!==void 0&&Gt(n,t))return!0;return!1}function Kt(e,t){if(e===t)return;let n=e.split(`
32
- `),r=t.split(`
33
- `),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++)n[e]!==r[e]&&a.push(e);return{lines:a,numLinesBefore:n.length,numLinesAfter:r.length,numLines:i}}const qt=globalThis.process.platform.startsWith(`win`),Jt=Symbol(`clack:cancel`);function Yt(e,t){let n=e;n.isTTY&&n.setRawMode(t)}function Xt({input:e=c,output:t=l,overwrite:n=!0,hideCursor:r=!0}={}){let i=f.createInterface({input:e,output:t,prompt:``,tabSize:1});f.emitKeypressEvents(e,i),e instanceof d&&e.isTTY&&e.setRawMode(!0);let a=(i,{name:o,sequence:s})=>{if(Gt([String(i),o,s],`cancel`)){r&&t.write(M.cursor.show),process.exit(0);return}if(!n)return;let c=o===`return`?0:-1,l=o===`return`?-1:0;f.moveCursor(t,c,l,()=>{f.clearLine(t,1,()=>{e.once(`keypress`,a)})})};return r&&t.write(M.cursor.hide),e.once(`keypress`,a),()=>{e.off(`keypress`,a),r&&t.write(M.cursor.show),e instanceof d&&e.isTTY&&!qt&&e.setRawMode(!1),i.terminal=!1,i.close()}}const Zt=e=>`columns`in e&&typeof e.columns==`number`?e.columns:80,Qt=e=>`rows`in e&&typeof e.rows==`number`?e.rows:20;function J(e,t,n,r=n,i=n,a){return G(t,Zt(e??l)-n.length,{hard:!0,trim:!1}).split(`
34
- `).map((e,t,o)=>{let s=a?a(e,t):e;return t===0?`${r}${s}`:t===o.length-1?`${i}${s}`:`${n}${s}`}).join(`
35
- `)}function $t(e,t){if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw TypeError("Schema validation must be synchronous. Update `validate()` and remove any asynchronous logic.");return n.issues?.at(0)?.message}return e(t)}var en=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame=``;_subscribers=new Map;_cursor=0;state=`initial`;error=``;value;userInput=``;constructor(e,t=!0){let{input:n=c,output:r=l,render:i,signal:a,...o}=e;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=t,this._abortSignal=a,this.input=n,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(Jt);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}this.rl=p.createInterface({input:this.input,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on(`keypress`,this.onKeypress),Yt(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(M.cursor.show),this.output.off(`resize`,this.render),Yt(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(M.cursor.show),this.output.off(`resize`,this.render),Yt(this.input,!1),e(Jt)})})}_isActionKey(e,t){return e===` `}_shouldSubmit(e,t){return!0}_setValue(e){this.value=e,this.emit(`value`,this.value)}_setUserInput(e,t){this.userInput=e??``,this.emit(`userInput`,this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:`u`}),this._setUserInput(``)}onKeypress(e,t){if(this._track&&t.name!==`return`&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:`h`}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&q.aliases.has(t.name)&&this.emit(`cursor`,q.aliases.get(t.name)),q.actions.has(t.name)&&this.emit(`cursor`,t.name)),e&&(e.toLowerCase()===`y`||e.toLowerCase()===`n`)&&this.emit(`confirm`,e.toLowerCase()===`y`),this.emit(`key`,e,t),t?.name===`return`&&this._shouldSubmit(e,t)){if(this.opts.validate){let e=$t(this.opts.validate,this.value);e&&(this.error=e instanceof Error?e.message:e,this.state=`error`,this.rl?.write(this.userInput))}this.state!==`error`&&(this.state=`submit`)}Gt([e,t?.name,t?.sequence],`cancel`)&&(this.state=`cancel`),(this.state===`submit`||this.state===`cancel`)&&this.emit(`finalize`),this.render(),(this.state===`submit`||this.state===`cancel`)&&this.close()}close(){this.input.unpipe(),this.input.removeListener(`keypress`,this.onKeypress),this.output.write(`
36
- `),Yt(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=G(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
37
- `).length-1;this.output.write(M.cursor.move(-999,e*-1))}render(){let e=G(this._render(this)??``,process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(M.cursor.hide);else{let t=Kt(this._prevFrame,e),n=Qt(this.output);if(this.restoreCursor(),t){let r=Math.max(0,t.numLinesAfter-n),i=Math.max(0,t.numLinesBefore-n),a=t.lines.find(e=>e>=r);if(a===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(M.cursor.move(0,a-i)),this.output.write(M.erase.lines(1));let t=e.split(`
38
- `);this.output.write(t[a]),this._prevFrame=e,this.output.write(M.cursor.move(0,t.length-a-1));return}else if(t.lines.length>1){if(r<i)a=r;else{let e=a-i;e>0&&this.output.write(M.cursor.move(0,e))}this.output.write(M.erase.down());let t=e.split(`
39
- `).slice(a);this.output.write(t.join(`
40
- `)),this._prevFrame=e;return}}this.output.write(M.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}},tn=class extends en{get cursor(){return+!this.value}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on(`userInput`,()=>{this.value=this._value}),this.on(`confirm`,e=>{this.output.write(M.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}},nn=class extends en{_mask=`•`;get cursor(){return this._cursor}get masked(){return this.userInput.replaceAll(/./g,this._mask)}get userInputWithCursor(){if(this.state===`submit`||this.state===`cancel`)return this.masked;let e=this.userInput;if(this.cursor>=e.length)return`${this.masked}${o([`inverse`,`hidden`],`_`)}`;let t=this.masked,n=t.slice(0,this.cursor),r=t.slice(this.cursor);return`${n}${o(`inverse`,r[0])}${r.slice(1)}`}clear(){this._clearUserInput()}constructor({mask:e,...t}){super(t),this._mask=e??`•`,this.on(`userInput`,e=>{this._setValue(e)})}},rn=class extends en{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(e){super(e,!1),this.options=e.options;let t=this.options.findIndex(({value:t})=>t===e.initialValue),n=t===-1?0:t;this.cursor=this.options[n].disabled?K(n,1,this.options):n,this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=K(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=K(this.cursor,1,this.options);break}this.changeValue()})}},an=class extends en{get userInputWithCursor(){if(this.state===`submit`)return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let t=e.slice(0,this.cursor),[n,...r]=e.slice(this.cursor);return`${t}${o(`inverse`,n)}${r.join(``)}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on(`userInput`,e=>{this._setValue(e)}),this.on(`finalize`,()=>{this.value||=e.defaultValue,this.value===void 0&&(this.value=``)})}};function on(){return s.platform===`win32`?!!s.env.CI||!!s.env.WT_SESSION||!!s.env.TERMINUS_SUBLIME||s.env.ConEmuTask===`{cmd::Cmder}`||s.env.TERM_PROGRAM===`Terminus-Sublime`||s.env.TERM_PROGRAM===`vscode`||s.env.TERM===`xterm-256color`||s.env.TERM===`alacritty`||s.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:s.env.TERM!==`linux`}const sn=on(),cn=()=>process.env.CI===`true`,Y=(e,t)=>sn?e:t,ln=Y(`◆`,`*`),un=Y(`■`,`x`),dn=Y(`▲`,`x`),fn=Y(`◇`,`o`),X=Y(`│`,`|`),Z=Y(`└`,`—`),pn=Y(`●`,`>`),mn=Y(`○`,` `),hn=Y(`▪`,`•`),gn=Y(`●`,`•`),_n=Y(`◆`,`*`),vn=Y(`▲`,`!`),yn=Y(`■`,`x`),Q=e=>{switch(e){case`initial`:case`active`:return o(`cyan`,ln);case`cancel`:return o(`red`,un);case`error`:return o(`yellow`,dn);case`submit`:return o(`green`,fn)}},bn=e=>{switch(e){case`initial`:case`active`:return o(`cyan`,X);case`cancel`:return o(`red`,X);case`error`:return o(`yellow`,X);case`submit`:return o(`green`,X)}},xn=(e,t,n,r,i,a=!1)=>{let o=t,s=0;if(a)for(let t=r-1;t>=n&&(o-=e[t].length,s++,!(o<=i));t--);else for(let t=n;t<r&&(o-=e[t].length,s++,!(o<=i));t++);return{lineCount:o,removals:s}},Sn=({cursor:e,options:t,style:n,output:r=process.stdout,maxItems:i=1/0,columnPadding:a=0,rowPadding:s=4})=>{let c=Zt(r)-a,l=Qt(r),u=o(`dim`,`...`),d=Math.max(l-s,0),f=Math.max(Math.min(i,d),5),p=0;e>=f-3&&(p=Math.max(Math.min(e-f+3,t.length-f),0));let m=f<t.length&&p>0,h=f<t.length&&p+f<t.length,g=Math.min(p+f,t.length),_=[],v=0;m&&v++,h&&v++;let y=p+ +!!m,b=g-+!!h;for(let r=y;r<b;r++){let i=G(n(t[r],r===e),c,{hard:!0,trim:!1}).split(`
41
- `);_.push(i),v+=i.length}if(v>d){let t=0,n=0,r=v,i=e-y,a=d,o=()=>xn(_,r,0,i,a),s=()=>xn(_,r,i+1,_.length,a,!0);m?({lineCount:r,removals:t}=o(),r>a&&(h||--a,{lineCount:r,removals:n}=s())):(h||--a,{lineCount:r,removals:n}=s(),r>a&&(--a,{lineCount:r,removals:t}=o())),t>0&&(m=!0,_.splice(0,t)),n>0&&(h=!0,_.splice(_.length-n,n))}let x=[];m&&x.push(u);for(let e of _)for(let t of e)x.push(t);return h&&x.push(u),x},Cn=e=>{let t=e.active??`Yes`,n=e.inactive??`No`;return new tn({active:t,inactive:n,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let r=e.withGuide??q.withGuide,i=`${Q(this.state)} `,a=r?`${o(`gray`,X)} `:``,s=J(e.output,e.message,a,i),c=`${r?`${o(`gray`,X)}
42
- `:``}${s}
43
- `,l=this.value?t:n;switch(this.state){case`submit`:return`${c}${r?`${o(`gray`,X)} `:``}${o(`dim`,l)}`;case`cancel`:return`${c}${r?`${o(`gray`,X)} `:``}${o([`strikethrough`,`dim`],l)}${r?`
44
- ${o(`gray`,X)}`:``}`;default:{let i=r?`${o(`cyan`,X)} `:``,a=r?o(`cyan`,Z):``;return`${c}${i}${this.value?`${o(`green`,pn)} ${t}`:`${o(`dim`,mn)} ${o(`dim`,t)}`}${e.vertical?r?`
45
- ${o(`cyan`,X)} `:`
46
- `:` ${o(`dim`,`/`)} `}${this.value?`${o(`dim`,mn)} ${o(`dim`,n)}`:`${o(`green`,pn)} ${n}`}
47
- ${a}
48
- `}}}}).prompt()},$={message:(e=[],{symbol:t=o(`gray`,X),secondarySymbol:n=o(`gray`,X),output:r=process.stdout,spacing:i=1,withGuide:a}={})=>{let s=[],c=a??q.withGuide,l=c?n:``,u=c?`${t} `:``,d=c?`${n} `:``;for(let e=0;e<i;e++)s.push(l);let f=Array.isArray(e)?e:e.split(`
49
- `);if(f.length>0){let[e,...r]=f;e.length>0?s.push(`${u}${e}`):s.push(c?t:``);for(let e of r)e.length>0?s.push(`${d}${e}`):s.push(c?n:``)}r.write(`${s.join(`
50
- `)}
51
- `)},info:(e,t)=>{$.message(e,{...t,symbol:o(`blue`,gn)})},success:(e,t)=>{$.message(e,{...t,symbol:o(`green`,_n)})},step:(e,t)=>{$.message(e,{...t,symbol:o(`green`,fn)})},warn:(e,t)=>{$.message(e,{...t,symbol:o(`yellow`,vn)})},warning:(e,t)=>{$.warn(e,t)},error:(e,t)=>{$.message(e,{...t,symbol:o(`red`,yn)})}},wn=e=>new nn({validate:e.validate,mask:e.mask??hn,signal:e.signal,input:e.input,output:e.output,render(){let t=e.withGuide??q.withGuide,n=`${t?`${o(`gray`,X)}
52
- `:``}${Q(this.state)} ${e.message}
53
- `,r=this.userInputWithCursor,i=this.masked;switch(this.state){case`error`:{let r=t?`${o(`yellow`,X)} `:``,a=t?`${o(`yellow`,Z)} `:``,s=i??``;return e.clearOnError&&this.clear(),`${n.trim()}
54
- ${r}${s}
55
- ${a}${o(`yellow`,this.error)}
56
- `}case`submit`:return`${n}${t?`${o(`gray`,X)} `:``}${i?o(`dim`,i):``}`;case`cancel`:return`${n}${t?`${o(`gray`,X)} `:``}${i?o([`strikethrough`,`dim`],i):``}${i&&t?`
57
- ${o(`gray`,X)}`:``}`;default:return`${n}${t?`${o(`cyan`,X)} `:``}${r}
58
- ${t?o(`cyan`,Z):``}
59
- `}}}).prompt(),Tn=e=>o(`magenta`,e),En=({indicator:e=`dots`,onCancel:t,output:n=process.stdout,cancelMessage:r,errorMessage:i,frames:a=sn?[`◒`,`◐`,`◓`,`◑`]:[`•`,`o`,`O`,`0`],delay:s=sn?80:120,signal:c,...l}={})=>{let u=cn(),d,f,p=!1,m=!1,h=``,g,_=performance.now(),v=Zt(n),y=l?.styleFrame??Tn,b=e=>{let n=e>1?i??q.messages.error:r??q.messages.cancel;m=e===1,p&&(T(n,e),m&&typeof t==`function`&&t())},x=()=>b(2),S=()=>b(1),C=()=>{process.on(`uncaughtExceptionMonitor`,x),process.on(`unhandledRejection`,x),process.on(`SIGINT`,S),process.on(`SIGTERM`,S),process.on(`exit`,b),c&&c.addEventListener(`abort`,S)},w=()=>{process.removeListener(`uncaughtExceptionMonitor`,x),process.removeListener(`unhandledRejection`,x),process.removeListener(`SIGINT`,S),process.removeListener(`SIGTERM`,S),process.removeListener(`exit`,b),c&&c.removeEventListener(`abort`,S)},ee=()=>{if(g===void 0)return;u&&n.write(`
60
- `);let e=G(g,v,{hard:!0,trim:!1}).split(`
61
- `);e.length>1&&n.write(M.cursor.up(e.length-1)),n.write(M.cursor.to(0)),n.write(M.erase.down())},te=e=>e.replace(/\.+$/,``),ne=e=>{let t=(performance.now()-e)/1e3,n=Math.floor(t/60),r=Math.floor(t%60);return n>0?`[${n}m ${r}s]`:`[${r}s]`},re=l.withGuide??q.withGuide,ie=(t=``)=>{p=!0,d=Xt({output:n}),h=te(t),_=performance.now(),re&&n.write(`${o(`gray`,X)}
62
- `);let r=0,i=0;C(),f=setInterval(()=>{if(u&&h===g)return;ee(),g=h;let t=y(a[r]),o;if(u)o=`${t} ${h}...`;else if(e===`timer`)o=`${t} ${h} ${ne(_)}`;else{let e=`.`.repeat(Math.floor(i)).slice(0,3);o=`${t} ${h}${e}`}let s=G(o,v,{hard:!0,trim:!1});n.write(s),r=r+1<a.length?r+1:0,i=i<4?i+.125:0},s)},T=(t=``,r=0,i=!1)=>{if(!p)return;p=!1,clearInterval(f),ee();let a=r===0?o(`green`,fn):r===1?o(`red`,un):o(`red`,dn);h=t??h,i||(e===`timer`?n.write(`${a} ${h} ${ne(_)}
63
- `):n.write(`${a} ${h}
64
- `)),w(),d()};return{start:ie,stop:(e=``)=>T(e,0),message:(e=``)=>{h=te(e??h)},cancel:(e=``)=>T(e,1),error:(e=``)=>T(e,2),clear:()=>T(``,0,!0),get isCancelled(){return m}}},Dn=(e,t)=>e.includes(`
65
- `)?e.split(`
66
- `).map(e=>t(e)).join(`
67
- `):t(e),On=e=>{let t=(e,t)=>{let n=e.label??String(e.value);switch(t){case`disabled`:return`${o(`gray`,mn)} ${Dn(n,e=>o(`gray`,e))}${e.hint?` ${o(`dim`,`(${e.hint??`disabled`})`)}`:``}`;case`selected`:return`${Dn(n,e=>o(`dim`,e))}`;case`active`:return`${o(`green`,pn)} ${n}${e.hint?` ${o(`dim`,`(${e.hint})`)}`:``}`;case`cancelled`:return`${Dn(n,e=>o([`strikethrough`,`dim`],e))}`;default:return`${o(`dim`,mn)} ${Dn(n,e=>o(`dim`,e))}`}};return new rn({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){let n=e.withGuide??q.withGuide,r=`${Q(this.state)} `,i=`${bn(this.state)} `,a=J(e.output,e.message,i,r),s=`${n?`${o(`gray`,X)}
68
- `:``}${a}
69
- `;switch(this.state){case`submit`:{let r=n?`${o(`gray`,X)} `:``;return`${s}${J(e.output,t(this.options[this.cursor],`selected`),r)}`}case`cancel`:{let r=n?`${o(`gray`,X)} `:``;return`${s}${J(e.output,t(this.options[this.cursor],`cancelled`),r)}${n?`
70
- ${o(`gray`,X)}`:``}`}default:{let r=n?`${o(`cyan`,X)} `:``,i=n?o(`cyan`,Z):``,a=s.split(`
71
- `).length,c=n?2:1;return`${s}${r}${Sn({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,columnPadding:r.length,rowPadding:a+c,style:(e,n)=>t(e,e.disabled?`disabled`:n?`active`:`inactive`)}).join(`
72
- ${r}`)}
73
- ${i}
74
- `}}}}).prompt()};`${o(`gray`,X)}`;const kn=e=>new an({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??q.withGuide,n=`${`${t?`${o(`gray`,X)}
75
- `:``}${Q(this.state)} `}${e.message}
76
- `,r=e.placeholder?o(`inverse`,e.placeholder[0])+o(`dim`,e.placeholder.slice(1)):o([`inverse`,`hidden`],`_`),i=this.userInput?this.userInputWithCursor:r,a=this.value??``;switch(this.state){case`error`:{let e=this.error?` ${o(`yellow`,this.error)}`:``,r=t?`${o(`yellow`,X)} `:``,a=t?o(`yellow`,Z):``;return`${n.trim()}
77
- ${r}${i}
78
- ${a}${e}
79
- `}case`submit`:{let e=a?` ${o(`dim`,a)}`:``;return`${n}${t?o(`gray`,X):``}${e}`}case`cancel`:{let e=a?` ${o([`strikethrough`,`dim`],a)}`:``,r=t?o(`gray`,X):``;return`${n}${r}${e}${a.trim()?`
80
- ${r}`:``}`}default:return`${n}${t?`${o(`cyan`,X)} `:``}${i}
81
- ${t?o(`cyan`,Z):``}
82
- `}}}).prompt();export{En as a,Ye as c,Ge as d,Ke as f,_e as h,On as i,We as l,He as m,$ as n,kn as o,I as p,wn as r,St as s,Cn as t,qe as u};
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env node
2
- import{E as e,S as t,g as n,w as r,x as i}from"./oauth-Bk-F-tIO.mjs";import{i as a,n as o}from"./auth-CSC4yhEJ.mjs";import{n as s,t as c}from"./body-parser-DWSy7uZ8.mjs";import{t as l}from"./output-B6fBFRqe.mjs";import{n as u,t as d}from"./progress-DrDErV9w.mjs";import{n as f,t as p}from"./input-validation-_fMCApaH.mjs";import{t as m}from"./local-CYc9q7l2.mjs";import{t as h}from"./cli-types-BeyOc81z.mjs";import{n as ee,t as te}from"./raw-fetch-_n0lMAnD.mjs";function g(e){return e.option(`metrics`,{type:`string`,description:`A comma-separated list of metrics to query.`}).option(`dimensions`,{type:`string`,description:`A comma-separated list of dimensions to group results by.`}).option(`since`,{type:`string`,description:`Start date and time of requesting data period in ISO 8601 format.`}).option(`until`,{type:`string`,description:`End date and time of requesting data period in ISO 8601 format.`}).option(`limit`,{type:`number`,description:`Limit number of returned metrics.`}).option(`sort`,{type:`string`,description:`A comma-separated list of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).`}).option(`filters`,{type:`string`,description:`Segmentation filter in 'attribute operator value' format.`}).option(`time-delta`,{type:`string`,description:`Unit of time to group data by.`,choices:[`all`,`auto`,`year`,`quarter`,`month`,`week`,`day`,`hour`,`dekaminute`,`minute`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`Retrieves a list of aggregate metrics grouped by time interval. See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.`,builder:h(g),handler:async e=>{let t={metrics:e.metrics,dimensions:e.dimensions,since:e.since,until:e.until,limit:e.limit,sort:e.sort,filters:e.filters,time_delta:e[`time-delta`]};if(e.dryRun){u({command:`cf dns analytics reports bytimes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_analytics/report/bytime`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,l(await d(`Loading`,async()=>n.dns.analytics.reports.bytimes.get({zone_id:r,...t})),{successLabel:`Loaded`})}},v={command:`bytimes`,describe:`DNS analytics and reporting`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`metrics`,{type:`string`,description:`A comma-separated list of metrics to query.`}).option(`dimensions`,{type:`string`,description:`A comma-separated list of dimensions to group results by.`}).option(`since`,{type:`string`,description:`Start date and time of requesting data period in ISO 8601 format.`}).option(`until`,{type:`string`,description:`End date and time of requesting data period in ISO 8601 format.`}).option(`limit`,{type:`number`,description:`Limit number of returned metrics.`}).option(`sort`,{type:`string`,description:`A comma-separated list of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).`}).option(`filters`,{type:`string`,description:`Segmentation filter in 'attribute operator value' format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Retrieves a list of summarised aggregate metrics over a given time period. See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.`,builder:y,handler:async e=>{let t={metrics:e.metrics,dimensions:e.dimensions,since:e.since,until:e.until,limit:e.limit,sort:e.sort,filters:e.filters};if(e.dryRun){u({command:`cf dns analytics reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_analytics/report`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,l(await d(`Loading`,async()=>n.dns.analytics.reports.get({zone_id:r,...t})),{successLabel:`Loaded`})}},x={command:`reports`,describe:`DNS analytics and reporting`,builder:e=>e.command(b).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},S={command:`analytics`,describe:`Operations for analytics`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const w={command:`delete`,describe:`Delete DNSSEC.`,builder:C,handler:async e=>{if(e.dryRun){u({command:`cf dns dnssec delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await r({force:!!e.force})){process.stderr.write(`Aborted.
3
- `);return}l(await d(`Deleting`,async()=>t.dns.dnssec.delete({zone_id:n})),{successLabel:`Deleted`})}};function T(e){return e.option(`dnssec-multi-signer`,{type:`boolean`,description:`If true, multi-signer DNSSEC is enabled on the zone, allowing multiple
4
- providers to serve a DNSSEC-signed zone at the same time.
5
- This is required for DNSKEY records (except those automatically
6
- generated by Cloudflare) to be added to the zone.
7
-
8
- See [Multi-signer DNSSEC](https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/) for details.`}).option(`dnssec-presigned`,{type:`boolean`,description:`If true, allows Cloudflare to transfer in a DNSSEC-signed zone
9
- including signatures from an external provider, without requiring
10
- Cloudflare to sign any records on the fly.
11
-
12
- Note that this feature has some limitations.
13
- See [Cloudflare as Secondary](https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/setup/#dnssec) for details.`}).option(`dnssec-use-nsec3`,{type:`boolean`,description:`If true, enables the use of NSEC3 together with DNSSEC on the zone.
14
- Combined with setting dnssec_presigned to true, this enables the use of
15
- NSEC3 records when transferring in from an external provider.
16
- If dnssec_presigned is instead set to false (default), NSEC3 records will be
17
- generated and signed at request time.
18
-
19
- See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details.`}).option(`status`,{type:`string`,description:`Status of DNSSEC, based on user-desired state and presence of necessary records.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`edit`,describe:`Enable or disable DNSSEC.`,builder:T,handler:async e=>{if(e.dryRun){u({command:`cf dns dnssec edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({dnssec_multi_signer:e[`dnssec-multi-signer`],dnssec_presigned:e[`dnssec-presigned`],dnssec_use_nsec3:e[`dnssec-use-nsec3`],status:f(e.status,`status`,`text`)}):s(e.body)});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=s(e.body);l(await d(`Updating`,async()=>t.dns.dnssec.edit({...r,zone_id:n})),{successLabel:`Updated`});return}let r=c({dnssec_multi_signer:e[`dnssec-multi-signer`],dnssec_presigned:e[`dnssec-presigned`],dnssec_use_nsec3:e[`dnssec-use-nsec3`],status:f(e.status,`status`,`text`)});l(await d(`Updating`,async()=>t.dns.dnssec.edit({...r,zone_id:n})),{successLabel:`Updated`})}};function D(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Details about DNSSEC status and configuration.`,builder:D,handler:async e=>{if(e.dryRun){u({command:`cf dns dnssec get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.dnssec.get({zone_id:n})),{successLabel:`Loaded`})}};function k(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`zsks`,describe:`List the Zone Signing Keys (ZSKs) that DNSSEC uses for the zone.`,builder:k,handler:async e=>{if(e.dryRun){u({command:`cf dns dnssec list zsks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec/zsk`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.dnssec.list.zsks({zone_id:n})),{successLabel:`Loaded`})}},j={command:`list`,describe:`Operations for dnssec.list`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`dnssec`,describe:`Operations for dnssec`,builder:e=>e.command(w).command(E).command(O).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`batch`,describe:`Send a Batch of DNS Record API calls to be executed together. Notes: - Although Cloudflare will execute the batched operations in a single database transaction, Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/batch-record-changes/ "Batch DNS records") for more information. - The operations you specify within the /batch request body are always executed in the following order: - Deletes - Patches - Puts - Posts`,builder:N,handler:async e=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){u({command:`cf dns records batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let i=s(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>n.dns.records.batch({...i,zone_id:r,...t})),{successLabel:`Created`});return}l(await d(`Creating`,async()=>n.dns.records.batch({zone_id:r,...t})),{successLabel:`Created`})}};function F(e){return e.option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Create a new DNS record for a zone. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:F,handler:async e=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){u({command:`cf dns records create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let i=s(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Creating`,async()=>n.dns.records.create({body:i,zone_id:r,...t})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function L(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const R={command:`delete <dns-record-id>`,describe:`Permanently removes a DNS record from the zone.`,builder:L,handler:async e=>{if(e.dryRun){u({command:`cf dns records delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await r({force:!!e.force})){process.stderr.write(`Aborted.
20
- `);return}l(await d(`Deleting`,async()=>t.dns.records.delete({zone_id:n,dns_record_id:e[`dns-record-id`]})),{successLabel:`Deleted`})}};function z(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`edit <dns-record-id>`,describe:`Update an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:z,handler:async e=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){u({command:`cf dns records edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let i=s(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Updating`,async()=>n.dns.records.edit({body:i,zone_id:r,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function V(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`export`,describe:`You can export your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`,builder:V,handler:async e=>{if(e.dryRun){u({command:`cf dns records export`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/export`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e);e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),ee((await d(`Loading`,async()=>te(`/zones/${e.zoneId}/dns_records/export`,{method:`GET`,localEndpoint:e.local?e.localEndpoint:void 0}))).toString(`utf-8`))}};function U(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <dns-record-id>`,describe:`Retrieves details for a specific DNS record in the zone.`,builder:U,handler:async e=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){u({command:`cf dns records get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,l(await d(`Loading`,async()=>n.dns.records.get({zone_id:r,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Loaded`})}};function G(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`proxied`,{type:`string`,description:"Whether or not proxiable records should receive the performance and security benefits of Cloudflare. The value should be either `true` or `false`."})}const K={command:`import`,describe:`You can upload your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`,builder:G,handler:async e=>{if(e.dryRun){u({command:`cf dns records import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/import`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,proxied:e.proxied}});return}let t=await o(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.file!==void 0||e.body!==void 0||e.proxied!==void 0){let n=new FormData;if(e.file){let t=p(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);e.proxied!==void 0&&n.append(`proxied`,String(f(e.proxied,`proxied`,`text`)??``)),l(await d(`Creating`,async()=>a(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n})),{successLabel:`Created`});return}if(e.body){let n=f(e.body,`body`,`binary`);l(await d(`Creating`,async()=>a(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function q(e){return e.option(`name`,{type:`string`,description:"Exact value of the DNS record name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS record name. Name filters are case-insensitive.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS record name. Name filters are case-insensitive.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS record name. Name filters are case-insensitive.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS record name. Name filters are case-insensitive.`}).option(`type`,{type:`string`,description:`Record type.`,choices:[`A`,`AAAA`,`CAA`,`CERT`,`CNAME`,`DNSKEY`,`DS`,`HTTPS`,`LOC`,`MX`,`NAPTR`,`NS`,`OPENPGPKEY`,`PTR`,`SMIMEA`,`SRV`,`SSHFP`,`SVCB`,`TLSA`,`TXT`,`URI`]}).option(`content`,{type:`string`,description:"Exact value of the DNS record content. This is a convenience alias for `content.exact`."}).option(`content-exact`,{type:`string`,description:`Exact value of the DNS record content. Content filters are case-insensitive.`}).option(`content-contains`,{type:`string`,description:`Substring of the DNS record content. Content filters are case-insensitive.`}).option(`content-startswith`,{type:`string`,description:`Prefix of the DNS record content. Content filters are case-insensitive.`}).option(`content-endswith`,{type:`string`,description:`Suffix of the DNS record content. Content filters are case-insensitive.`}).option(`proxied`,{type:`boolean`,description:`Whether the record is receiving the performance and security benefits of Cloudflare.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.",choices:[`any`,`all`]}).option(`comment`,{type:`string`,description:"Exact value of the DNS record comment. This is a convenience alias for `comment.exact`."}).option(`comment-present`,{type:`string`,description:`If this parameter is present, only records *with* a comment are returned.`}).option(`comment-absent`,{type:`string`,description:`If this parameter is present, only records *without* a comment are returned.`}).option(`comment-exact`,{type:`string`,description:`Exact value of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-contains`,{type:`string`,description:`Substring of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-startswith`,{type:`string`,description:`Prefix of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-endswith`,{type:`string`,description:`Suffix of the DNS record comment. Comment filters are case-insensitive.`}).option(`tag`,{type:`string`,description:"Condition on the DNS record tag.\n\nParameter values can be of the form `<tag-name>:<tag-value>` to search for an exact `name:value` pair, or just `<tag-name>` to search for records with a specific tag name regardless of its value.\n\nThis is a convenience shorthand for the more powerful `tag.<predicate>` parameters.\nExamples:\n- `tag=important` is equivalent to `tag.present=important`\n- `tag=team:DNS` is equivalent to `tag.exact=team:DNS`"}).option(`tag-present`,{type:`string`,description:`Name of a tag which must be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-absent`,{type:`string`,description:`Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-exact`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value is `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-contains`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value contains `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-startswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value starts with `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-endswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value ends with `<tag-value>`. Tag filters are case-insensitive."}).option(`search`,{type:`string`,description:"Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the `match` setting. For automated searches, please use the other available parameters."}).option(`tag-match`,{type:`string`,description:"Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS records per page.`}).option(`order`,{type:`string`,description:`Field to order DNS records by.`,choices:[`type`,`name`,`content`,`ttl`,`proxied`]}).option(`direction`,{type:`string`,description:`Direction to order DNS records in.`,choices:[`asc`,`desc`]}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowed-by-name`,{type:`string`,description:"Filters to records at or below the given NS delegation name, excluding the NS records that form the delegation itself. The value must be a subdomain of the zone; the zone apex is not accepted. Requires `include_shadow_metadata=true`. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowing-name`,{type:`string`,description:`Returns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List, search, sort, and filter a zones' DNS records.`,builder:h(q),handler:async e=>{let t={name:e.name,"name.exact":e[`name-exact`],"name.contains":e[`name-contains`],"name.startswith":e[`name-startswith`],"name.endswith":e[`name-endswith`],type:e.type,content:e.content,"content.exact":e[`content-exact`],"content.contains":e[`content-contains`],"content.startswith":e[`content-startswith`],"content.endswith":e[`content-endswith`],proxied:e.proxied,match:e.match,comment:e.comment,"comment.present":e[`comment-present`],"comment.absent":e[`comment-absent`],"comment.exact":e[`comment-exact`],"comment.contains":e[`comment-contains`],"comment.startswith":e[`comment-startswith`],"comment.endswith":e[`comment-endswith`],tag:e.tag,"tag.present":e[`tag-present`],"tag.absent":e[`tag-absent`],"tag.exact":e[`tag-exact`],"tag.contains":e[`tag-contains`],"tag.startswith":e[`tag-startswith`],"tag.endswith":e[`tag-endswith`],search:e.search,tag_match:e[`tag-match`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,include_shadow_metadata:e[`include-shadow-metadata`],shadowed_by_name:e[`shadowed-by-name`],shadowing_name:e[`shadowing-name`]};if(e.dryRun){u({command:`cf dns records list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,l(await d(`Loading`,async()=>n.dns.records.list({zone_id:r,...t})),{successLabel:`Loaded`})}};function Y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`scan-list`,describe:"Retrieves the list of DNS records discovered up to this point by the asynchronous scan. These records are temporary until explicitly accepted or rejected via `POST /scan/review`. Additional records may be discovered by the scan later.",builder:Y,handler:async e=>{if(e.dryRun){u({command:`cf dns records scan-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/review`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.records.scanList({zone_id:n})),{successLabel:`Loaded`})}};function Z(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Q={command:`scan-review`,describe:`Accept or reject DNS records found by the DNS records scan. Accepted records will be permanently added to the zone, while rejected records will be permanently deleted.`,builder:Z,handler:async e=>{if(e.dryRun){u({command:`cf dns records scan-review`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/review`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=s(e.body);l(await d(`Creating`,async()=>t.dns.records.scanReview({...r,zone_id:n})),{successLabel:`Created`});return}l(await d(`Creating`,async()=>t.dns.records.scanReview({zone_id:n})),{successLabel:`Created`})}};function ne(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`scan-trigger`,describe:"Initiates an asynchronous scan for common DNS records on your domain. Note that this **does not** automatically add records to your zone. The scan runs in the background, and results can be reviewed later using the `/scan/review` endpoints. Useful if you haven't updated your nameservers yet.",builder:ne,handler:async e=>{if(e.dryRun){u({command:`cf dns records scan-trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/trigger`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Creating`,async()=>t.dns.records.scanTrigger({zone_id:n})),{successLabel:`Created`})}};function ie(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`scan`,describe:`Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.`,builder:ie,handler:async e=>{if(e.dryRun){u({command:`cf dns records scan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Creating`,async()=>t.dns.records.scan({zone_id:n})),{successLabel:`Created`})}};function oe(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`update <dns-record-id>`,describe:`Overwrite an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:oe,handler:async e=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){u({command:`cf dns records update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let n=await o(e),r=await i({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let i=s(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),l(await d(`Updating`,async()=>n.dns.records.update({body:i,zone_id:r,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},ce={command:`records`,describe:`Operations for records`,builder:e=>e.command(P).command(I).command(R).command(B).command(H).command(W).command(K).command(J).command(ae).command(X).command(Q).command(re).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.option(`enforce-dns-only`,{type:`boolean`,description:`When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on [Enforce DNS-only](https://developers.cloudflare.com/dns/proxy-status/enforce-dns-only).`}).option(`zone-defaults-flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`zone-defaults-foundation-dns`,{type:`boolean`,description:`Whether to enable Foundation DNS Advanced Nameservers on the zone.`}).option(`zone-defaults-internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`zone-defaults-multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`zone-defaults-ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`zone-defaults-secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`zone-defaults-soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`zone-defaults-soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`zone-defaults-soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`zone-defaults-soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`zone-defaults-soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`zone-defaults-soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`zone-defaults-soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-defaults-zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).option(`zone-defaults-nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`cloudflare.standard.random`,`custom.account`,`custom.tenant`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`edit`,describe:`Update DNS settings for an account`,builder:le,handler:async e=>{if(e.dryRun){u({command:`cf dns settings account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({enforce_dns_only:e[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:e[`zone-defaults-flatten-all-cnames`],foundation_dns:e[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:f(e[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:e[`zone-defaults-multi-provider`],ns_ttl:e[`zone-defaults-ns-ttl`],secondary_overrides:e[`zone-defaults-secondary-overrides`],soa:{expire:e[`zone-defaults-soa-expire`],min_ttl:e[`zone-defaults-soa-min-ttl`],mname:f(e[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:e[`zone-defaults-soa-refresh`],retry:e[`zone-defaults-soa-retry`],rname:f(e[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:e[`zone-defaults-soa-ttl`]},zone_mode:f(e[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:f(e[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}}):s(e.body)});return}let r=await o(e),i=e.local?m:await n(r);if(e.accountId=i,e.body){let t=s(e.body);l(await d(`Updating`,async()=>r.dns.settings.account.edit({...t,account_id:i})),{successLabel:`Updated`});return}let a=c({enforce_dns_only:e[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:e[`zone-defaults-flatten-all-cnames`],foundation_dns:e[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:f(e[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:e[`zone-defaults-multi-provider`],ns_ttl:e[`zone-defaults-ns-ttl`],secondary_overrides:e[`zone-defaults-secondary-overrides`],soa:{expire:e[`zone-defaults-soa-expire`],min_ttl:e[`zone-defaults-soa-min-ttl`],mname:f(e[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:e[`zone-defaults-soa-refresh`],retry:e[`zone-defaults-soa-retry`],rname:f(e[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:e[`zone-defaults-soa-ttl`]},zone_mode:f(e[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:f(e[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}});l(await d(`Updating`,async()=>r.dns.settings.account.edit({...a,account_id:i})),{successLabel:`Updated`})}};function de(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get`,describe:`Show DNS settings for an account`,builder:de,handler:async e=>{if(e.dryRun){u({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_settings`,pathParams:{},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.settings.account.get({account_id:i})),{successLabel:`Loaded`})}};function pe(e){return e.option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const me={command:`create`,describe:`Create Internal DNS View for an account`,builder:pe,handler:async e=>{if(e.dryRun){u({command:`cf dns settings account views create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_settings/views`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({name:f(e.name,`name`,`text`),zones:e.zones}):s(e.body)});return}let r=await o(e),i=e.local?m:await n(r);if(e.accountId=i,e.body){let t=s(e.body);l(await d(`Creating`,async()=>r.dns.settings.account.views.create({...t,account_id:i})),{successLabel:`Created`});return}let a=c({name:f(e.name,`name`,`text`),zones:e.zones});l(await d(`Creating`,async()=>r.dns.settings.account.views.create({...a,account_id:i})),{successLabel:`Created`})}};function he(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ge={command:`delete <view-id>`,describe:`Delete an existing Internal DNS View`,builder:he,handler:async e=>{if(e.dryRun){u({command:`cf dns settings account views delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_settings/views/${e[`view-id`]==null?`<view-id>`:encodeURIComponent(String(e[`view-id`]))}`,pathParams:{"view-id":String(e[`view-id`]??``)},bodyKind:`none`});return}let i=await o(e),a=e.local?m:await n(i);if(e.accountId=a,!await r({force:!!e.force})){process.stderr.write(`Aborted.
21
- `);return}l(await d(`Deleting`,async()=>i.dns.settings.account.views.delete({account_id:a,view_id:e[`view-id`]})),{successLabel:`Deleted`})}};function _e(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ve={command:`edit <view-id>`,describe:`Update an existing Internal DNS View`,builder:_e,handler:async e=>{if(e.dryRun){u({command:`cf dns settings account views edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_settings/views/${e[`view-id`]==null?`<view-id>`:encodeURIComponent(String(e[`view-id`]))}`,pathParams:{"view-id":String(e[`view-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({name:f(e.name,`name`,`text`),zones:e.zones}):s(e.body)});return}let r=await o(e),i=e.local?m:await n(r);if(e.accountId=i,e.body){let t=s(e.body);l(await d(`Updating`,async()=>r.dns.settings.account.views.edit({...t,account_id:i,view_id:e[`view-id`]})),{successLabel:`Updated`});return}let a=c({name:f(e.name,`name`,`text`),zones:e.zones});l(await d(`Updating`,async()=>r.dns.settings.account.views.edit({...a,account_id:i,view_id:e[`view-id`]})),{successLabel:`Updated`})}};function ye(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get <view-id>`,describe:`Get DNS Internal View`,builder:ye,handler:async e=>{if(e.dryRun){u({command:`cf dns settings account views get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_settings/views/${e[`view-id`]==null?`<view-id>`:encodeURIComponent(String(e[`view-id`]))}`,pathParams:{"view-id":String(e[`view-id`]??``)},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.settings.account.views.get({account_id:i,view_id:e[`view-id`]})),{successLabel:`Loaded`})}};function xe(e){return e.option(`name`,{type:`string`,description:"Exact value of the DNS view name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS view name.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS view name.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS view name.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS view name.`}).option(`zone-id`,{type:`string`,description:`A zone ID that exists in the zones list for the view.`}).option(`zone-name`,{type:`string`,description:`A zone name that exists in the zones list for the view.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS views per page.`}).option(`order`,{type:`string`,description:`Field to order DNS views by.`,choices:[`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order DNS views in.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`list`,describe:`List DNS Internal Views for an Account`,builder:h(xe),handler:async e=>{let r={name:e.name,"name.exact":e[`name-exact`],"name.contains":e[`name-contains`],"name.startswith":e[`name-startswith`],"name.endswith":e[`name-endswith`],zone_id:e[`zone-id`],zone_name:e[`zone-name`],match:e.match,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){u({command:`cf dns settings account views list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_settings/views`,pathParams:{},query:r,bodyKind:`none`});return}let i=await o(e),a=e.local?m:await n(i);e.accountId=a,l(await d(`Loading`,async()=>i.dns.settings.account.views.list({account_id:a,...r})),{successLabel:`Loaded`})}},Ce={command:`views`,describe:`Operations for settings.account.views`,builder:e=>e.command(me).command(ge).command(ve).command(be).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},we={command:`account`,describe:`Operations for settings.account`,builder:e=>e.command(ue).command(fe).command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Te(e){return e.option(`flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`foundation-dns`,{type:`boolean`,description:`Whether to enable Foundation DNS Advanced Nameservers on the zone.`}).option(`internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).option(`nameservers-ns-set`,{type:`number`,description:`Configured nameserver set to be used for this zone`}).option(`nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`custom.account`,`custom.tenant`,`custom.zone`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ee={command:`edit`,describe:`Update DNS settings for a zone`,builder:Te,handler:async e=>{if(e.dryRun){u({command:`cf dns settings zone edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({flatten_all_cnames:e[`flatten-all-cnames`],foundation_dns:e[`foundation-dns`],internal_dns:{reference_zone_id:f(e[`internal-dns-reference-zone-id`],`internal-dns-reference-zone-id`,`text`)},multi_provider:e[`multi-provider`],ns_ttl:e[`ns-ttl`],secondary_overrides:e[`secondary-overrides`],soa:{expire:e[`soa-expire`],min_ttl:e[`soa-min-ttl`],mname:f(e[`soa-mname`],`soa-mname`,`text`),refresh:e[`soa-refresh`],retry:e[`soa-retry`],rname:f(e[`soa-rname`],`soa-rname`,`text`),ttl:e[`soa-ttl`]},zone_mode:f(e[`zone-mode`],`zone-mode`,`text`),nameservers:{ns_set:e[`nameservers-ns-set`],type:f(e[`nameservers-type`],`nameservers-type`,`text`)}}):s(e.body)});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=s(e.body);l(await d(`Updating`,async()=>t.dns.settings.zone.edit({...r,zone_id:n})),{successLabel:`Updated`});return}let r=c({flatten_all_cnames:e[`flatten-all-cnames`],foundation_dns:e[`foundation-dns`],internal_dns:{reference_zone_id:f(e[`internal-dns-reference-zone-id`],`internal-dns-reference-zone-id`,`text`)},multi_provider:e[`multi-provider`],ns_ttl:e[`ns-ttl`],secondary_overrides:e[`secondary-overrides`],soa:{expire:e[`soa-expire`],min_ttl:e[`soa-min-ttl`],mname:f(e[`soa-mname`],`soa-mname`,`text`),refresh:e[`soa-refresh`],retry:e[`soa-retry`],rname:f(e[`soa-rname`],`soa-rname`,`text`),ttl:e[`soa-ttl`]},zone_mode:f(e[`zone-mode`],`zone-mode`,`text`),nameservers:{ns_set:e[`nameservers-ns-set`],type:f(e[`nameservers-type`],`nameservers-type`,`text`)}});l(await d(`Updating`,async()=>t.dns.settings.zone.edit({...r,zone_id:n})),{successLabel:`Updated`})}};function De(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`get`,describe:`Show DNS settings for a zone`,builder:De,handler:async e=>{if(e.dryRun){u({command:`cf dns settings zone get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.settings.zone.get({zone_id:n})),{successLabel:`Loaded`})}},ke={command:`zone`,describe:`Operations for settings.zone`,builder:e=>e.command(Ee).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ae={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(we).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function je(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`get`,describe:`Get the current DNS record usage and quota for an account. May include internal DNS usage and quota.`,builder:je,handler:async e=>{if(e.dryRun){u({command:`cf dns usage account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/dns_records/usage`,pathParams:{},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.usage.account.get({account_id:i})),{successLabel:`Loaded`})}},Ne={command:`account`,describe:`Operations for usage.account`,builder:e=>e.command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`get`,describe:`Get the current DNS record usage for a zone, including the number of records and the quota limit.`,builder:Pe,handler:async e=>{if(e.dryRun){u({command:`cf dns usage zone get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/usage`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.usage.zone.get({zone_id:n})),{successLabel:`Loaded`})}},Ie={command:`zone`,describe:`Operations for usage.zone`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Le={command:`usage`,describe:`Operations for usage`,builder:e=>e.command(Ne).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ze={command:`create`,describe:`Create ACL.`,builder:Re,handler:async r=>{if(r.dryRun){u({command:`cf dns zone-transfers acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`json`,body:r.body===void 0?c({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)}):s(r.body)});return}let i=await o(r),a=r.local?m:await n(i);if(r.accountId=a,r.body){let e=s(r.body);l(await d(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...e,account_id:a})),{successLabel:`Created`});return}r[`ip-range`]===void 0&&(r[`ip-range`]=await e(`ip-range`,`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`)),r.name===void 0&&(r.name=await e(`name`,`The name of the acl.`));let p=c({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)});l(await d(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...p,account_id:a})),{successLabel:`Created`})}};function Be(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ve={command:`delete <acl-id>`,describe:`Delete ACL.`,builder:Be,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let i=await o(e),a=e.local?m:await n(i);if(e.accountId=a,!await r({force:!!e.force})){process.stderr.write(`Aborted.
22
- `);return}l(await d(`Deleting`,async()=>i.dns.zoneTransfers.acls.delete({account_id:a,acl_id:e[`acl-id`]})),{successLabel:`Deleted`})}};function He(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`get <acl-id>`,describe:`Get ACL.`,builder:He,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.zoneTransfers.acls.get({account_id:i,acl_id:e[`acl-id`]})),{successLabel:`Loaded`})}};function We(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`list`,describe:`List ACLs.`,builder:We,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.zoneTransfers.acls.list({account_id:i})),{successLabel:`Loaded`})}};function Ke(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const qe={command:`update <acl-id>`,describe:`Modify ACL.`,builder:Ke,handler:async r=>{if(r.dryRun){u({command:`cf dns zone-transfers acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"acl-id":String(r[`acl-id`]??``)},bodyKind:`json`,body:r.body===void 0?c({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)}):s(r.body)});return}let i=await o(r),a=r.local?m:await n(i);if(r.accountId=a,r.body){let e=s(r.body);l(await d(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:e,account_id:a,acl_id:r[`acl-id`]})),{successLabel:`Updated`});return}r[`ip-range`]===void 0&&(r[`ip-range`]=await e(`ip-range`,`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`)),r.name===void 0&&(r.name=await e(`name`,`The name of the acl.`));let p=c({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)});l(await d(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:p,account_id:a,acl_id:r[`acl-id`]})),{successLabel:`Updated`})}},Je={command:`acls`,describe:`Operations for zone-transfers.acls`,builder:e=>e.command(ze).command(Ve).command(Ue).command(Ge).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ye(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xe={command:`create`,describe:`Sends AXFR zone transfer request to primary nameserver(s).`,builder:Ye,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers force-axfr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/force_axfr`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Creating`,async()=>t.dns.zoneTransfers.forceAxfr.create({zone_id:n})),{successLabel:`Created`})}},Ze={command:`force-axfr`,describe:`Operations for zone-transfers.force-axfr`,builder:e=>e.command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qe(e){return e.option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
23
- Not applicable for primary zones.`,default:86400}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $e={command:`create`,describe:`Create secondary zone configuration for incoming zone transfers.`,builder:Qe,handler:async t=>{if(t.dryRun){u({command:`cf dns zone-transfers incoming create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({auto_refresh_seconds:t[`auto-refresh-seconds`],name:f(t.name,`name`,`text`),peers:t.peers}):s(t.body)});return}let n=await o(t),r=await i({zone:t.zone},n,{quiet:t.quiet});if(t.zoneId=r,t.body){let e=s(t.body);l(await d(`Creating`,async()=>n.dns.zoneTransfers.incoming.create({body:e,zone_id:r})),{successLabel:`Created`});return}if(t[`auto-refresh-seconds`]===void 0)throw Error(`--auto-refresh-seconds is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await e(`name`,`Zone name.`)),t.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let a=c({auto_refresh_seconds:t[`auto-refresh-seconds`],name:f(t.name,`name`,`text`),peers:t.peers});l(await d(`Creating`,async()=>n.dns.zoneTransfers.incoming.create({body:a,zone_id:r})),{successLabel:`Created`})}};function et(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const tt={command:`delete`,describe:`Delete secondary zone configuration for incoming zone transfers.`,builder:et,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers incoming delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await r({force:!!e.force})){process.stderr.write(`Aborted.
24
- `);return}l(await d(`Deleting`,async()=>t.dns.zoneTransfers.incoming.delete({zone_id:n})),{successLabel:`Deleted`})}};function nt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`get`,describe:`Get secondary zone configuration for incoming zone transfers.`,builder:nt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers incoming get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.zoneTransfers.incoming.get({zone_id:n})),{successLabel:`Loaded`})}};function it(e){return e.option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
25
- Not applicable for primary zones.`}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const at={command:`update`,describe:`Update secondary zone configuration for incoming zone transfers.`,builder:it,handler:async t=>{if(t.dryRun){u({command:`cf dns zone-transfers incoming update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({auto_refresh_seconds:t[`auto-refresh-seconds`],name:f(t.name,`name`,`text`),peers:t.peers}):s(t.body)});return}let n=await o(t),r=await i({zone:t.zone},n,{quiet:t.quiet});if(t.zoneId=r,t.body){let e=s(t.body);l(await d(`Updating`,async()=>n.dns.zoneTransfers.incoming.update({body:e,zone_id:r})),{successLabel:`Updated`});return}if(t[`auto-refresh-seconds`]===void 0)throw Error(`--auto-refresh-seconds is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await e(`name`,`Zone name.`)),t.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let a=c({auto_refresh_seconds:t[`auto-refresh-seconds`],name:f(t.name,`name`,`text`),peers:t.peers});l(await d(`Updating`,async()=>n.dns.zoneTransfers.incoming.update({body:a,zone_id:r})),{successLabel:`Updated`})}},ot={command:`incoming`,describe:`Operations for zone-transfers.incoming`,builder:e=>e.command($e).command(tt).command(rt).command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function st(e){return e.option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ct={command:`create`,describe:`Create primary zone configuration for outgoing zone transfers.`,builder:st,handler:async t=>{if(t.dryRun){u({command:`cf dns zone-transfers outgoing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({name:f(t.name,`name`,`text`),peers:t.peers}):s(t.body)});return}let n=await o(t),r=await i({zone:t.zone},n,{quiet:t.quiet});if(t.zoneId=r,t.body){let e=s(t.body);l(await d(`Creating`,async()=>n.dns.zoneTransfers.outgoing.create({body:e,zone_id:r})),{successLabel:`Created`});return}if(t.name===void 0&&(t.name=await e(`name`,`Zone name.`)),t.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let a=c({name:f(t.name,`name`,`text`),peers:t.peers});l(await d(`Creating`,async()=>n.dns.zoneTransfers.outgoing.create({body:a,zone_id:r})),{successLabel:`Created`})}};function lt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ut={command:`delete`,describe:`Delete primary zone configuration for outgoing zone transfers.`,builder:lt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers outgoing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await r({force:!!e.force})){process.stderr.write(`Aborted.
26
- `);return}l(await d(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.delete({zone_id:n})),{successLabel:`Deleted`})}};function dt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ft={command:`disable`,describe:`Disable outgoing zone transfers for primary zone and clears IXFR backlog of primary zone.`,builder:dt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers outgoing disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/disable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await r({force:!!e.force,message:`This operation turns off outgoing zone transfers for the primary zone, which means secondary zones will stop receiving updates.`})){process.stderr.write(`Aborted.
27
- `);return}l(await d(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.disable({zone_id:n})),{successLabel:`Deleted`})}};function pt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`enable`,describe:`Enable outgoing zone transfers for primary zone.`,builder:pt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers outgoing enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Creating`,async()=>t.dns.zoneTransfers.outgoing.enable({zone_id:n})),{successLabel:`Created`})}};function ht(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`force-notify`,describe:`Notifies the secondary nameserver(s) and clears IXFR backlog of primary zone.`,builder:ht,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers outgoing force-notify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/force_notify`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Creating`,async()=>t.dns.zoneTransfers.outgoing.forceNotify({zone_id:n})),{successLabel:`Created`})}};function _t(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`get`,describe:`Get primary zone configuration for outgoing zone transfers.`,builder:_t,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers outgoing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.zoneTransfers.outgoing.get({zone_id:n})),{successLabel:`Loaded`})}};function yt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bt={command:`get`,describe:`Get primary zone transfer status.`,builder:yt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers outgoing status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/status`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.dns.zoneTransfers.outgoing.status.get({zone_id:n})),{successLabel:`Loaded`})}},xt={command:`status`,describe:`Operations for zone-transfers.outgoing.status`,builder:e=>e.command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function St(e){return e.option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ct={command:`update`,describe:`Update primary zone configuration for outgoing zone transfers.`,builder:St,handler:async t=>{if(t.dryRun){u({command:`cf dns zone-transfers outgoing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({name:f(t.name,`name`,`text`),peers:t.peers}):s(t.body)});return}let n=await o(t),r=await i({zone:t.zone},n,{quiet:t.quiet});if(t.zoneId=r,t.body){let e=s(t.body);l(await d(`Updating`,async()=>n.dns.zoneTransfers.outgoing.update({body:e,zone_id:r})),{successLabel:`Updated`});return}if(t.name===void 0&&(t.name=await e(`name`,`Zone name.`)),t.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let a=c({name:f(t.name,`name`,`text`),peers:t.peers});l(await d(`Updating`,async()=>n.dns.zoneTransfers.outgoing.update({body:a,zone_id:r})),{successLabel:`Updated`})}},wt={command:`outgoing`,describe:`Operations for zone-transfers.outgoing`,builder:e=>e.command(ct).command(ut).command(ft).command(mt).command(gt).command(vt).command(Ct).command(xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Tt(e){return e.option(`name`,{type:`string`,description:`The name of the peer.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Et={command:`create`,describe:`Create Peer.`,builder:Tt,handler:async r=>{if(r.dryRun){u({command:`cf dns zone-transfers peers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`json`,body:r.body===void 0?c({name:f(r.name,`name`,`text`)}):s(r.body)});return}let i=await o(r),a=r.local?m:await n(i);if(r.accountId=a,r.body){let e=s(r.body);l(await d(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...e,account_id:a})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await e(`name`,`The name of the peer.`));let p=c({name:f(r.name,`name`,`text`)});l(await d(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...p,account_id:a})),{successLabel:`Created`})}};function Dt(e){return e.positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ot={command:`delete <peer-id>`,describe:`Delete Peer.`,builder:Dt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers peers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/peers/${e[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(e[`peer-id`]))}`,pathParams:{"peer-id":String(e[`peer-id`]??``)},bodyKind:`none`});return}let i=await o(e),a=e.local?m:await n(i);if(e.accountId=a,!await r({force:!!e.force})){process.stderr.write(`Aborted.
28
- `);return}l(await d(`Deleting`,async()=>i.dns.zoneTransfers.peers.delete({account_id:a,peer_id:e[`peer-id`]})),{successLabel:`Deleted`})}};function kt(e){return e.positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const At={command:`get <peer-id>`,describe:`Get Peer.`,builder:kt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers peers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/peers/${e[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(e[`peer-id`]))}`,pathParams:{"peer-id":String(e[`peer-id`]??``)},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.zoneTransfers.peers.get({account_id:i,peer_id:e[`peer-id`]})),{successLabel:`Loaded`})}};function jt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`list`,describe:`List Peers.`,builder:jt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers peers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.zoneTransfers.peers.list({account_id:i})),{successLabel:`Loaded`})}};function Nt(e){return e.positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`ip`,{type:`string`,description:`IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to.`}).option(`ixfr-enable`,{type:`boolean`,description:`Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones.`}).option(`name`,{type:`string`,description:`The name of the peer.`}).option(`port`,{type:`number`,description:`DNS port of primary or secondary nameserver, depending on what zone this peer is linked to.`}).option(`tsig-id`,{type:`string`,description:`TSIG authentication will be used for zone transfer if configured.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`update <peer-id>`,describe:`Modify Peer.`,builder:Nt,handler:async r=>{if(r.dryRun){u({command:`cf dns zone-transfers peers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/peers/${r[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(r[`peer-id`]))}`,pathParams:{"peer-id":String(r[`peer-id`]??``)},bodyKind:`json`,body:r.body===void 0?c({ip:f(r.ip,`ip`,`text`),ixfr_enable:r[`ixfr-enable`],name:f(r.name,`name`,`text`),port:r.port,tsig_id:f(r[`tsig-id`],`tsig-id`,`text`)}):s(r.body)});return}let i=await o(r),a=r.local?m:await n(i);if(r.accountId=a,r.body){let e=s(r.body);l(await d(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:e,account_id:a,peer_id:r[`peer-id`]})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await e(`name`,`The name of the peer.`));let p=c({ip:f(r.ip,`ip`,`text`),ixfr_enable:r[`ixfr-enable`],name:f(r.name,`name`,`text`),port:r.port,tsig_id:f(r[`tsig-id`],`tsig-id`,`text`)});l(await d(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:p,account_id:a,peer_id:r[`peer-id`]})),{successLabel:`Updated`})}},Pt={command:`peers`,describe:`Operations for zone-transfers.peers`,builder:e=>e.command(Et).command(Ot).command(At).command(Mt).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ft(e){return e.option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const It={command:`create`,describe:`Create TSIG.`,builder:Ft,handler:async r=>{if(r.dryRun){u({command:`cf dns zone-transfers tsigs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`json`,body:r.body===void 0?c({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)}):s(r.body)});return}let i=await o(r),a=r.local?m:await n(i);if(r.accountId=a,r.body){let e=s(r.body);l(await d(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:e,account_id:a})),{successLabel:`Created`});return}r.algo===void 0&&(r.algo=await e(`algo`,`TSIG algorithm.`)),r.name===void 0&&(r.name=await e(`name`,`TSIG key name.`)),r.secret===void 0&&(r.secret=await e(`secret`,`TSIG secret.`,{kind:`secret`}));let p=c({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)});l(await d(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:p,account_id:a})),{successLabel:`Created`})}};function Lt(e){return e.positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Rt={command:`delete <tsig-id>`,describe:`Delete TSIG.`,builder:Lt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers tsigs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/tsigs/${e[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(e[`tsig-id`]))}`,pathParams:{"tsig-id":String(e[`tsig-id`]??``)},bodyKind:`none`});return}let i=await o(e),a=e.local?m:await n(i);if(e.accountId=a,!await r({force:!!e.force})){process.stderr.write(`Aborted.
29
- `);return}l(await d(`Deleting`,async()=>i.dns.zoneTransfers.tsigs.delete({account_id:a,tsig_id:e[`tsig-id`]})),{successLabel:`Deleted`})}};function zt(e){return e.positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bt={command:`get <tsig-id>`,describe:`Get TSIG.`,builder:zt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers tsigs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/tsigs/${e[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(e[`tsig-id`]))}`,pathParams:{"tsig-id":String(e[`tsig-id`]??``)},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.zoneTransfers.tsigs.get({account_id:i,tsig_id:e[`tsig-id`]})),{successLabel:`Loaded`})}};function Vt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ht={command:`list`,describe:`List TSIGs.`,builder:Vt,handler:async e=>{if(e.dryRun){u({command:`cf dns zone-transfers tsigs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`none`});return}let r=await o(e),i=e.local?m:await n(r);e.accountId=i,l(await d(`Loading`,async()=>r.dns.zoneTransfers.tsigs.list({account_id:i})),{successLabel:`Loaded`})}};function Ut(e){return e.positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Wt={command:`update <tsig-id>`,describe:`Modify TSIG.`,builder:Ut,handler:async r=>{if(r.dryRun){u({command:`cf dns zone-transfers tsigs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/secondary_dns/tsigs/${r[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(r[`tsig-id`]))}`,pathParams:{"tsig-id":String(r[`tsig-id`]??``)},bodyKind:`json`,body:r.body===void 0?c({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)}):s(r.body)});return}let i=await o(r),a=r.local?m:await n(i);if(r.accountId=a,r.body){let e=s(r.body);l(await d(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:e,account_id:a,tsig_id:r[`tsig-id`]})),{successLabel:`Updated`});return}r.algo===void 0&&(r.algo=await e(`algo`,`TSIG algorithm.`)),r.name===void 0&&(r.name=await e(`name`,`TSIG key name.`)),r.secret===void 0&&(r.secret=await e(`secret`,`TSIG secret.`,{kind:`secret`}));let p=c({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)});l(await d(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:p,account_id:a,tsig_id:r[`tsig-id`]})),{successLabel:`Updated`})}},Gt={command:`tsigs`,describe:`Operations for zone-transfers.tsigs`,builder:e=>e.command(It).command(Rt).command(Bt).command(Ht).command(Wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Kt={command:`zone-transfers`,describe:`Operations for zone-transfers`,builder:e=>e.command(Je).command(Ze).command(ot).command(wt).command(Pt).command(Gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},qt={command:`dns`,describe:`DNS management API for zones, records, DNSSEC, analytics, and zone transfers`,builder:e=>e.command(S).command(M).command(ce).command(Ae).command(Le).command(Kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{qt as default};