@aussieljk/forkbook 0.0.1-2 → 0.0.1-20

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 (534) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +35 -53
  3. package/assets/addon-vitest/templates/vitest.config.4.template.ts +2 -2
  4. package/assets/browser/favicon-wrapper.svg +4 -4
  5. package/assets/browser/favicon.svg +1 -1
  6. package/assets/browser/inter-LICENSE.txt +92 -0
  7. package/assets/browser/inter-variable-italic.woff2 +0 -0
  8. package/assets/browser/inter-variable.woff2 +0 -0
  9. package/assets/browser/mirror-ball.png +0 -0
  10. package/assets/builder-vite/iframe.html +8 -24
  11. package/assets/create/rendererAssets/common/Configure.mdx +100 -100
  12. package/assets/create/rendererAssets/common/button.css +7 -7
  13. package/assets/create/rendererAssets/common/header.css +6 -6
  14. package/assets/create/rendererAssets/common/page.css +12 -12
  15. package/assets/create/templates/react-native/index.expo.js +4 -4
  16. package/assets/create/templates/react-native/index.js +5 -5
  17. package/assets/server/base-preview-body.html +32 -32
  18. package/assets/server/base-preview-head.html +86 -86
  19. package/assets/server/template.ejs +31 -26
  20. package/dist/_browser-chunks/{Color-PCLE2J36.js → Color-KALNKPOV.js} +8 -8
  21. package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
  22. package/dist/_browser-chunks/WithTooltip-66AWY4VQ.js +199 -0
  23. package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
  24. package/dist/_browser-chunks/{chunk-PFRNG3UC.js → chunk-2WZWS7GJ.js} +5 -5
  25. package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-3QNZOMD7.js} +8 -3
  26. package/dist/_browser-chunks/{chunk-LV5PIKV4.js → chunk-3QPZOXB7.js} +6 -8
  27. package/dist/_browser-chunks/{chunk-ODVJ3XZJ.js → chunk-4BOJAE7P.js} +14 -10
  28. package/dist/_browser-chunks/{chunk-2MEPHP35.js → chunk-4KIQBRD2.js} +1 -1
  29. package/dist/_browser-chunks/chunk-4ZGQ4YQ2.js +20 -0
  30. package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
  31. package/dist/_browser-chunks/{chunk-W5M6NPS3.js → chunk-6SL45YM3.js} +15 -18
  32. package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-AN2LJG5I.js} +1 -1
  33. package/dist/_browser-chunks/{chunk-P6PK47TQ.js → chunk-BLCZ3C5M.js} +48 -83
  34. package/dist/_browser-chunks/{chunk-RSPAQWVJ.js → chunk-BNP234B4.js} +1 -1
  35. package/dist/_browser-chunks/{chunk-JYVGARBG.js → chunk-CX37N6FG.js} +770 -720
  36. package/dist/_browser-chunks/{chunk-JSBKXXXF.js → chunk-DHTLVXAL.js} +38 -45
  37. package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-DISGPOF4.js} +54 -51
  38. package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
  39. package/dist/_browser-chunks/{chunk-6SXYJQST.js → chunk-E6QKKKLO.js} +21 -6
  40. package/dist/_browser-chunks/{chunk-FJGWSWL5.js → chunk-EBSOKHFG.js} +10 -4
  41. package/dist/_browser-chunks/{chunk-CFAOWGL7.js → chunk-ECMVTOVD.js} +1 -1
  42. package/dist/_browser-chunks/{chunk-CFWWCCZV.js → chunk-ENHFQXYS.js} +9 -7
  43. package/dist/_browser-chunks/{chunk-YTIT5NA5.js → chunk-EW2M3URL.js} +91 -84
  44. package/dist/_browser-chunks/{chunk-MFMDGWP6.js → chunk-FCULT3AE.js} +3 -3
  45. package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
  46. package/dist/_browser-chunks/chunk-HZFHNYRC.js +53 -0
  47. package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
  48. package/dist/_browser-chunks/{chunk-OQWFVDIN.js → chunk-KQJ4T6JL.js} +31 -25
  49. package/dist/_browser-chunks/{chunk-RNTIV5CE.js → chunk-LYYXDWR2.js} +9 -9
  50. package/dist/_browser-chunks/{chunk-V5M7Q4HT.js → chunk-MJIDTL3X.js} +4 -14
  51. package/dist/_browser-chunks/{chunk-V2G23FV7.js → chunk-N5WQGLI7.js} +1 -1
  52. package/dist/_browser-chunks/{chunk-EIYAKDGP.js → chunk-NA4ITZTK.js} +127 -105
  53. package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-NK5SGJNG.js} +22 -17
  54. package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
  55. package/dist/_browser-chunks/{chunk-YEKO6BHJ.js → chunk-ONTSNQON.js} +1 -1
  56. package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
  57. package/dist/_browser-chunks/{chunk-KQ7CRO2B.js → chunk-OWWV6YG7.js} +12 -12
  58. package/dist/_browser-chunks/chunk-PFYL47RM.js +45 -0
  59. package/dist/_browser-chunks/{chunk-OD6IBQCC.js → chunk-PQRPDA4U.js} +5 -5
  60. package/dist/_browser-chunks/{chunk-2JDQ35OA.js → chunk-PU7D2WDP.js} +0 -11
  61. package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
  62. package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-QFO2B4X2.js} +31 -28
  63. package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
  64. package/dist/_browser-chunks/{chunk-C3D4HEFY.js → chunk-TRXLBGLS.js} +344 -166
  65. package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
  66. package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
  67. package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
  68. package/dist/_browser-chunks/chunk-XSVERCGB.js +91 -0
  69. package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-XTQCLWVH.js} +325 -1635
  70. package/dist/_browser-chunks/{chunk-MDOL7KML.js → chunk-YJO5BK52.js} +7 -3
  71. package/dist/_browser-chunks/{chunk-66OCZ54D.js → chunk-ZF37BMDS.js} +6 -2
  72. package/dist/_browser-chunks/{matchers-YLBYSYAF.js → matchers-2HVLNCVO.js} +4 -4
  73. package/dist/_browser-chunks/{react-dom-client-4OHE3QDV.js → react-dom-client-SLBUX3U3.js} +1 -1
  74. package/dist/_node-chunks/{attached-runtime-I2G4WLJI.js → attached-runtime-YD6HKC4B.js} +33 -31
  75. package/dist/_node-chunks/builder-manager-UNJGYVTD.js +1176 -0
  76. package/dist/_node-chunks/chunk-25A7444H.js +47 -0
  77. package/dist/_node-chunks/{chunk-U5W53R2J.js → chunk-2CNN3CRI.js} +506 -494
  78. package/dist/_node-chunks/{chunk-VLOXOXXE.js → chunk-2GA4VQCS.js} +9 -9
  79. package/dist/_node-chunks/{chunk-YZFWBA5L.js → chunk-2VJHCGAK.js} +368 -321
  80. package/dist/_node-chunks/{chunk-FK7KGTV7.js → chunk-33I6AQU7.js} +7 -7
  81. package/dist/_node-chunks/{chunk-6YKBRP72.js → chunk-3CQI3JH5.js} +6 -6
  82. package/dist/_node-chunks/{chunk-IK4FGZLR.js → chunk-3ZOSFS7G.js} +6 -6
  83. package/dist/_node-chunks/{chunk-DUR55DJJ.js → chunk-4BE3LRIQ.js} +86 -67
  84. package/dist/_node-chunks/{chunk-Q7QNUM5H.js → chunk-5LFJQCYN.js} +6 -6
  85. package/dist/_node-chunks/{chunk-3Y6AAY5H.js → chunk-65X3MXFT.js} +8 -8
  86. package/dist/_node-chunks/chunk-6FWJWEAG.js +52 -0
  87. package/dist/_node-chunks/{chunk-UVINFLGY.js → chunk-6NLQCV6A.js} +7 -7
  88. package/dist/_node-chunks/{chunk-KISMCCP5.js → chunk-6OQKMJJA.js} +474 -479
  89. package/dist/_node-chunks/{chunk-XLP2ZKXV.js → chunk-6RYD6ENB.js} +7 -7
  90. package/dist/_node-chunks/{chunk-V2DY426G.js → chunk-75TTPKEA.js} +283 -306
  91. package/dist/_node-chunks/{chunk-3W7F2B7P.js → chunk-7CWDZLIZ.js} +6 -6
  92. package/dist/_node-chunks/{chunk-FPZB5OI7.js → chunk-7M3TOE4F.js} +6 -6
  93. package/dist/_node-chunks/{chunk-DC7DKR5K.js → chunk-AGLGQNTY.js} +6 -6
  94. package/dist/_node-chunks/{chunk-NIBT7XDZ.js → chunk-AOYLA323.js} +9 -6
  95. package/dist/_node-chunks/{chunk-RRN2V55B.js → chunk-AP4HJ3I3.js} +7 -7
  96. package/dist/_node-chunks/chunk-AVHJZUTH.js +2613 -0
  97. package/dist/_node-chunks/{chunk-H32DYT6P.js → chunk-B2EEX2SZ.js} +6 -6
  98. package/dist/_node-chunks/chunk-CGVVOUBC.js +18 -0
  99. package/dist/_node-chunks/{chunk-B5J7Q7J4.js → chunk-CJDYU653.js} +6 -6
  100. package/dist/_node-chunks/{chunk-XHL2LVBM.js → chunk-CPDP5SQS.js} +14 -16
  101. package/dist/_node-chunks/{chunk-LO56I6E2.js → chunk-DAYTIH6Z.js} +10 -10
  102. package/dist/_node-chunks/{chunk-FW2HQUBQ.js → chunk-DO3CPQAZ.js} +6 -6
  103. package/dist/_node-chunks/chunk-DQEUNKLX.js +347 -0
  104. package/dist/_node-chunks/{chunk-BS2WMZMR.js → chunk-EFCBUWOB.js} +7 -7
  105. package/dist/_node-chunks/{chunk-OWNFOGTA.js → chunk-EG2WLN5V.js} +7 -7
  106. package/dist/_node-chunks/{chunk-LCK4ZQKG.js → chunk-EKYNX5NX.js} +9 -9
  107. package/dist/_node-chunks/{chunk-TNJIXE37.js → chunk-F762PHMI.js} +6 -6
  108. package/dist/_node-chunks/{chunk-ET7PWEO7.js → chunk-FC3V4KZO.js} +14 -13
  109. package/dist/_node-chunks/chunk-FXW52X4U.js +281 -0
  110. package/dist/_node-chunks/{chunk-TD5PLLQG.js → chunk-GEJBTN76.js} +62 -7
  111. package/dist/_node-chunks/chunk-GFEH7IBP.js +620 -0
  112. package/dist/_node-chunks/{chunk-TWI4GVH7.js → chunk-GWT4HQZU.js} +6 -6
  113. package/dist/_node-chunks/{chunk-4FEANXWU.js → chunk-HHM5X5RQ.js} +140 -118
  114. package/dist/_node-chunks/{chunk-MA24JW6C.js → chunk-IBLUURAJ.js} +25 -8
  115. package/dist/_node-chunks/{chunk-2BUPBPFB.js → chunk-IENHXJVB.js} +7 -7
  116. package/dist/_node-chunks/{chunk-EWOX7HPJ.js → chunk-IIGBIVK3.js} +6 -6
  117. package/dist/_node-chunks/{chunk-XGIUVY52.js → chunk-J6FGP2VM.js} +7 -7
  118. package/dist/_node-chunks/chunk-JOX7OETB.js +534 -0
  119. package/dist/_node-chunks/{chunk-RXNJDRGO.js → chunk-JR7ZCQ77.js} +21 -25
  120. package/dist/_node-chunks/{chunk-OISX4AGQ.js → chunk-JXZONVHW.js} +37 -31
  121. package/dist/_node-chunks/{chunk-34EO2PUT.js → chunk-KAALBGRE.js} +6 -6
  122. package/dist/_node-chunks/{chunk-SLWQNBGO.js → chunk-L52VGA36.js} +34 -949
  123. package/dist/_node-chunks/chunk-LAJIVWUF.js +497 -0
  124. package/dist/_node-chunks/{chunk-JGGFYIG5.js → chunk-LCNF6BLP.js} +7 -7
  125. package/dist/_node-chunks/chunk-LGHTKFSF.js +405 -0
  126. package/dist/_node-chunks/{chunk-WCULS5TP.js → chunk-LNGSV5UI.js} +7 -7
  127. package/dist/_node-chunks/{chunk-HMP2G23X.js → chunk-MC4BFUVH.js} +6 -6
  128. package/dist/_node-chunks/{chunk-SWO5CDYU.js → chunk-MWKSSYPG.js} +8 -8
  129. package/dist/_node-chunks/{chunk-2DSIDINN.js → chunk-N25CZ3RC.js} +650 -9
  130. package/dist/_node-chunks/{chunk-WZJF2OUH.js → chunk-N4LNGTYL.js} +7 -7
  131. package/dist/_node-chunks/{chunk-XI6B6P47.js → chunk-N5WU4BEY.js} +6 -6
  132. package/dist/_node-chunks/{chunk-TINO74G5.js → chunk-NRXCMSAI.js} +6 -6
  133. package/dist/_node-chunks/{chunk-E6YESGLX.js → chunk-NZWK62R5.js} +542 -1049
  134. package/dist/_node-chunks/{chunk-DHJFTB4K.js → chunk-OBPVOYJA.js} +7 -7
  135. package/dist/_node-chunks/{chunk-6KEHV53S.js → chunk-OMMQME7G.js} +33 -41
  136. package/dist/_node-chunks/chunk-PJRPETSU.js +62 -0
  137. package/dist/_node-chunks/{chunk-7GUDZVRQ.js → chunk-QDVIQG3B.js} +6 -6
  138. package/dist/_node-chunks/{chunk-OUW6R7C3.js → chunk-QEYWG5C7.js} +6 -6
  139. package/dist/_node-chunks/{chunk-GRBLDJCR.js → chunk-QQNRWEHL.js} +132 -149
  140. package/dist/_node-chunks/{chunk-EHUNOMDD.js → chunk-RAIWLNFA.js} +29849 -51588
  141. package/dist/_node-chunks/{chunk-JZOO7GGC.js → chunk-S7RGKBGT.js} +6 -6
  142. package/dist/_node-chunks/{chunk-GEFQN7K3.js → chunk-SFXFL4TP.js} +8 -8
  143. package/dist/_node-chunks/{chunk-JDXXX6LB.js → chunk-SPAHK37C.js} +6 -6
  144. package/dist/_node-chunks/chunk-SUQ4OM7Y.js +49 -0
  145. package/dist/_node-chunks/chunk-U54Q3F7E.js +20 -0
  146. package/dist/_node-chunks/{chunk-RWFIFGO5.js → chunk-UZH2V3WY.js} +8 -8
  147. package/dist/_node-chunks/{chunk-SVTBJ7Q3.js → chunk-VIMGLCNZ.js} +6 -6
  148. package/dist/_node-chunks/{chunk-BSKFCWQD.js → chunk-VNZF62KE.js} +7 -7
  149. package/dist/_node-chunks/{chunk-CCOTJ4FC.js → chunk-VPFU5CEP.js} +10 -10
  150. package/dist/_node-chunks/{chunk-RZMQ7S3L.js → chunk-VYCVBW5Q.js} +8 -8
  151. package/dist/_node-chunks/{chunk-ICPBH3E7.js → chunk-WDANLGYN.js} +7 -7
  152. package/dist/_node-chunks/{chunk-UMUBKI6E.js → chunk-WMZJ2WK4.js} +96 -177
  153. package/dist/_node-chunks/{chunk-LXBD4UL4.js → chunk-WTPHQ2NG.js} +8 -8
  154. package/dist/_node-chunks/chunk-WYCITRIE.js +11 -0
  155. package/dist/_node-chunks/chunk-WYRBOMQF.js +137 -0
  156. package/dist/_node-chunks/{chunk-ZWBCQ4MJ.js → chunk-WZBMPROH.js} +9 -17
  157. package/dist/_node-chunks/{chunk-CXRU72ET.js → chunk-X2GGQZIN.js} +6 -6
  158. package/dist/_node-chunks/chunk-X6OGIC2G.js +28 -0
  159. package/dist/_node-chunks/{chunk-42UWAGPW.js → chunk-XF7H5GZM.js} +52 -22
  160. package/dist/_node-chunks/{chunk-WNZ2UMFM.js → chunk-XUZB4FIX.js} +15 -9
  161. package/dist/_node-chunks/{chunk-3SDUYDXH.js → chunk-XVSUIOZA.js} +7 -7
  162. package/dist/_node-chunks/{chunk-TFEWM4E3.js → chunk-Z665R6AF.js} +75 -75
  163. package/dist/_node-chunks/{chunk-H4PPVMP5.js → chunk-ZEYZWDOS.js} +6 -6
  164. package/dist/_node-chunks/{chunk-UBOGWBEA.js → chunk-ZHRCL7PG.js} +10 -10
  165. package/dist/_node-chunks/chunk-ZLC4JSBV.js +25 -0
  166. package/dist/_node-chunks/{chunk-F3ZFKBHY.js → chunk-ZN6YOIB2.js} +8 -8
  167. package/dist/_node-chunks/{chunk-YCMRA6RX.js → chunk-ZX32M4O7.js} +7 -7
  168. package/dist/_node-chunks/{chunk-NDWKJ4CL.js → chunk-ZZ5XMIGW.js} +97 -111
  169. package/dist/_node-chunks/dist-HBFOS25E.js +16 -0
  170. package/dist/_node-chunks/dist-Q2XNFC24.js +27 -0
  171. package/dist/_node-chunks/{local-runtime-NTKIN2QT.js → local-runtime-4ETW6QTI.js} +19 -20
  172. package/dist/_node-chunks/{mdx-plugin-MWISDWDQ.js → mdx-plugin-OOYTYMVU.js} +2263 -130
  173. package/dist/_node-chunks/{monorepo-LIRFMQXE.js → monorepo-3AWUYNFD.js} +12 -12
  174. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-ORY3BAP5.js} +12 -12
  175. package/dist/_node-chunks/optimized-tests-DOKSUJAM.js +22 -0
  176. package/dist/_node-chunks/{pattern-copy-play-EKHIUAU2.js → pattern-copy-play-AY4DE7ME.js} +12 -12
  177. package/dist/_node-chunks/postinstallAddon-L46G75CD.js +20 -0
  178. package/dist/_node-chunks/{rehype-external-links-BUN3HUCO.js → rehype-external-links-FGVC633L.js} +9 -9
  179. package/dist/_node-chunks/{rehype-slug-PLADX223.js → rehype-slug-2AZLMC5G.js} +9 -9
  180. package/dist/_node-chunks/{relaxed-limits-GBHW6KIQ.js → relaxed-limits-QI3YR6CU.js} +12 -12
  181. package/dist/_node-chunks/{run-NL66VTNR.js → run-QJJ4FOF3.js} +281 -19
  182. package/dist/_node-chunks/{run-KDTIZNSY.js → run-WFJZYNZN.js} +18 -18
  183. package/dist/_node-chunks/{setup-MGC7BQO6.js → setup-V5CRAJMV.js} +9 -9
  184. package/dist/_node-chunks/{vitest.config.4.template-JH2THZFG.js → vitest.config.4.template-LECBBF3L.js} +9 -9
  185. package/dist/actions/decorator.js +18 -22
  186. package/dist/actions/index.d.ts +4 -4
  187. package/dist/actions/index.js +3 -2
  188. package/dist/addon-a11y/index.d.ts +3 -3
  189. package/dist/addon-a11y/index.js +3 -2
  190. package/dist/addon-a11y/manager.js +41 -38
  191. package/dist/addon-a11y/preset.js +7 -7
  192. package/dist/addon-a11y/preview.d.ts +8 -2
  193. package/dist/addon-a11y/preview.js +3 -2
  194. package/dist/addon-comments/manager.js +353 -0
  195. package/dist/addon-comments/preset.js +52 -0
  196. package/dist/addon-comments/preview.js +101 -0
  197. package/dist/addon-docs/blocks.d.ts +123 -85
  198. package/dist/addon-docs/blocks.js +159 -85
  199. package/dist/addon-docs/index.d.ts +21 -21
  200. package/dist/addon-docs/index.js +3 -3
  201. package/dist/addon-docs/manager.js +6 -6
  202. package/dist/addon-docs/preset.js +12 -12
  203. package/dist/addon-docs/preview.d.ts +3 -1
  204. package/dist/addon-docs/preview.js +1 -1
  205. package/dist/addon-links/index.d.ts +2 -1
  206. package/dist/addon-links/index.js +5 -2
  207. package/dist/addon-links/preview.d.ts +1 -1
  208. package/dist/addon-links/preview.js +5 -2
  209. package/dist/addon-links/react/index.js +4 -1
  210. package/dist/addon-mcp/preset.js +176 -57
  211. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +70 -70
  212. package/dist/addon-ondevice-actions/index.js +5 -1
  213. package/dist/addon-ondevice-actions/register.js +5 -1
  214. package/dist/addon-ondevice-controls/index.js +1 -1
  215. package/dist/addon-ondevice-controls/register.js +1 -1
  216. package/dist/addon-pseudo-states/index.d.ts +1 -1
  217. package/dist/addon-pseudo-states/index.js +1 -1
  218. package/dist/addon-pseudo-states/manager.js +2 -2
  219. package/dist/addon-pseudo-states/preview.d.ts +1 -1
  220. package/dist/addon-pseudo-states/preview.js +1 -1
  221. package/dist/addon-themes/index.d.ts +7 -6
  222. package/dist/addon-themes/index.js +2 -2
  223. package/dist/addon-themes/manager.js +4 -4
  224. package/dist/addon-themes/postinstall.js +7 -7
  225. package/dist/addon-themes/preview.js +2 -2
  226. package/dist/addon-vitest/constants.js +8 -8
  227. package/dist/addon-vitest/manager.js +32 -23
  228. package/dist/addon-vitest/node/coverage-reporter.js +11 -11
  229. package/dist/addon-vitest/node/vitest.js +35 -35
  230. package/dist/addon-vitest/postinstall.js +10 -10
  231. package/dist/addon-vitest/preset.js +22 -22
  232. package/dist/addon-vitest/vitest-plugin/global-setup.js +22 -22
  233. package/dist/addon-vitest/vitest-plugin/index.js +78 -68
  234. package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +3 -3
  235. package/dist/addon-vitest/vitest-plugin/setup-file.js +1 -1
  236. package/dist/babel/index.d.ts +241 -995
  237. package/dist/babel/index.js +13 -19
  238. package/dist/backgrounds/index.d.ts +1 -1
  239. package/dist/bin/core.js +118 -95
  240. package/dist/bin/dispatcher.js +18 -16
  241. package/dist/bin/loader.js +17 -16
  242. package/dist/builder-next/index.d.ts +59 -0
  243. package/dist/builder-next/index.js +201 -0
  244. package/dist/builder-vite/index.d.ts +8 -3
  245. package/dist/builder-vite/index.js +80 -25
  246. package/dist/builder-vite/preset.js +13 -13
  247. package/dist/channels/index.d.ts +3 -2
  248. package/dist/channels/index.js +97 -24
  249. package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
  250. package/dist/{chunk-DoIGKY33.d.ts → chunk-BLZXEm1K.d.ts} +6 -8
  251. package/dist/chunk-BcYKnZln.d.ts +10 -0
  252. package/dist/{chunk-DEVFdzxR.d.ts → chunk-BsO65uOb.d.ts} +4 -4
  253. package/dist/{chunk-BCoJQE-f.d.ts → chunk-BtKww7r1.d.ts} +6 -4
  254. package/dist/{chunk-Bpi2tz-6.d.ts → chunk-Bubi-WAs.d.ts} +20 -17
  255. package/dist/chunk-CDMZhRke.d.ts +30 -0
  256. package/dist/chunk-CFhJCPSB.d.ts +48 -0
  257. package/dist/{chunk-DtHByo32.d.ts → chunk-CFk6djyM.d.ts} +5 -5
  258. package/dist/{chunk-CMeX4WRe.d.ts → chunk-CT2iXaHz.d.ts} +1 -1
  259. package/dist/{chunk-pcFXCimE.d.ts → chunk-CmV7WZzR.d.ts} +124 -2
  260. package/dist/{chunk-B2t1tGRh.d.ts → chunk-D2CQlXaR.d.ts} +13 -15
  261. package/dist/{chunk-BGkgZp-H.d.ts → chunk-D3uSIa6H.d.ts} +9 -1
  262. package/dist/{chunk-DzuY9DXg.d.ts → chunk-DDd8BhTY.d.ts} +2 -2
  263. package/dist/{chunk-Dw1z1Pki.d.ts → chunk-DNCU78oW.d.ts} +160 -323
  264. package/dist/chunk-DVIvUVkS.d.ts +195 -0
  265. package/dist/{chunk-gCX81nOr.d.ts → chunk-DgzPaTw9.d.ts} +3 -3
  266. package/dist/{chunk-Kt1tW-D1.d.ts → chunk-Dm-iHJ-s.d.ts} +3 -3
  267. package/dist/{chunk-C-bavsOH.d.ts → chunk-Dw_4ad2Y.d.ts} +6 -6
  268. package/dist/{chunk-CwQKNaYL.d.ts → chunk-OksNJcvJ.d.ts} +2 -2
  269. package/dist/chunk-Susgfkap.d.ts +20 -0
  270. package/dist/{chunk-C2p5r3Vt.d.ts → chunk-ge-rSPy0.d.ts} +818 -701
  271. package/dist/{chunk-BXLImeLy.d.ts → chunk-r-Vjut9o.d.ts} +52 -11
  272. package/dist/cli/index.d.ts +14 -867
  273. package/dist/cli/index.js +47 -4962
  274. package/dist/cli/skills/content/index.d.ts +2 -2
  275. package/dist/cli/skills/content/index.js +2 -2
  276. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  277. package/dist/cli/tools/sdk/child-host.js +17 -17
  278. package/dist/cli/tools/sdk/index.d.ts +3 -3
  279. package/dist/cli/tools/sdk/index.js +18 -18
  280. package/dist/cli-commands/bin/index.js +7 -7
  281. package/dist/client-logger/index.d.ts +20 -21
  282. package/dist/client-logger/index.js +5 -2
  283. package/dist/common/index.d.ts +27 -39
  284. package/dist/common/index.js +35 -42
  285. package/dist/components/index.d.ts +86 -272
  286. package/dist/components/index.js +2759 -8547
  287. package/dist/core-events/index.d.ts +6 -4
  288. package/dist/core-events/index.js +5 -1
  289. package/dist/core-server/index.d.ts +58 -17
  290. package/dist/core-server/index.js +1500 -382
  291. package/dist/core-server/presets/common-manager.js +836 -1334
  292. package/dist/core-server/presets/common-override-preset.js +12 -10
  293. package/dist/core-server/presets/common-preset.js +100 -282
  294. package/dist/create/bin/index.js +7 -7
  295. package/dist/create/index.js +15 -15
  296. package/dist/csf/csf-utils.d.ts +1 -1
  297. package/dist/csf/index.d.ts +6 -6
  298. package/dist/csf/index.js +86 -154
  299. package/dist/csf-tools/index.d.ts +66 -54
  300. package/dist/csf-tools/index.js +18 -16
  301. package/dist/docs-tools/index.d.ts +332 -16
  302. package/dist/docs-tools/index.js +3 -3
  303. package/dist/highlight/index.d.ts +1 -1
  304. package/dist/instrumenter/index.d.ts +5 -5
  305. package/dist/instrumenter/index.js +31 -19
  306. package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-B4NRbNSS.js} +638 -1731
  307. package/dist/{preview/_chunks/runtime-CqHxptiK.js → manager/_manager-chunks/globals-runtime-BC43T1rL.js} +3413 -173
  308. package/dist/manager/_manager-chunks/{globals-runtime-sGpNlIJ1.js → globals-runtime-BDkYPr00.js} +715 -620
  309. package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-BnQ7i5wq.js} +232 -370
  310. package/dist/manager/_manager-chunks/{globals-runtime-Rp_zjGnh.js → globals-runtime-BnWjPJUH.js} +2 -2
  311. package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
  312. package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-Bv2PBsx6.js} +411 -379
  313. package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
  314. package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
  315. package/dist/manager/_manager-chunks/globals-runtime-CS41oTca.js +1808 -0
  316. package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
  317. package/dist/manager/_manager-chunks/{globals-runtime-qKvCZHFY.js → globals-runtime-D6tkG2NO.js} +1033 -621
  318. package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-D9zzVzSP.js} +11 -11
  319. package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-DCmvKMN5.js} +2 -1
  320. package/dist/manager/_manager-chunks/{globals-runtime-DpNYC-qi.js → globals-runtime-DafcXCKU.js} +1013 -778
  321. package/dist/manager/_manager-chunks/globals-runtime-DgO0hT2p.js +32 -0
  322. package/dist/manager/_manager-chunks/globals-runtime-Me9Bl-sx.js +156 -0
  323. package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
  324. package/dist/manager/_manager-chunks/globals-runtime-oRjPg2jY.js +8935 -0
  325. package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
  326. package/dist/manager/_manager-chunks/runtime-BhfRBP4G.js +294 -0
  327. package/dist/manager/_manager-chunks/runtime-BuPcYKCO.js +737 -0
  328. package/dist/manager/_manager-chunks/{runtime-eDVAYF7N.js → runtime-CGaGp83p.js} +57 -76
  329. package/dist/manager/_manager-chunks/{runtime-BhkT2CXl.js → runtime-CXROgt6G.js} +220 -406
  330. package/dist/manager/_manager-chunks/{runtime-i-PDAHLR.js → runtime-Cn5PJT3-.js} +741 -698
  331. package/dist/manager/_manager-chunks/{runtime-cp5pazY2.js → runtime-DJlTd1qE.js} +1717 -1536
  332. package/dist/manager/_manager-chunks/{runtime-D0UOWx0U.js → runtime-DTUm5K9J.js} +232 -158
  333. package/dist/manager/_manager-chunks/{runtime-D94Vq3oR.js → runtime-Dc6lf19c.js} +8 -534
  334. package/dist/manager/_manager-chunks/runtime-DmpQacrn.js +553 -0
  335. package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
  336. package/dist/manager/_manager-chunks/runtime-mjv_40eH.js +201 -0
  337. package/dist/manager/globals-runtime.js +1 -1
  338. package/dist/manager/globals.d.ts +12 -12
  339. package/dist/manager/globals.js +12 -12
  340. package/dist/manager/runtime.js +1 -1
  341. package/dist/manager-api/index.d.ts +1 -1
  342. package/dist/manager-api/index.js +537 -527
  343. package/dist/manager-errors.d.ts +1 -1
  344. package/dist/manager-errors.js +2 -2
  345. package/dist/mcp/index.d.ts +1 -1
  346. package/dist/mcp/index.js +9 -9
  347. package/dist/mocking-utils/index.d.ts +7 -5
  348. package/dist/mocking-utils/index.js +34 -34
  349. package/dist/mocking-utils/mocker-runtime.js +2 -2
  350. package/dist/next/index.d.ts +231 -0
  351. package/dist/next/index.js +398 -0
  352. package/dist/nextjs-vite/export-mocks/headers/index.js +3 -1
  353. package/dist/nextjs-vite/export-mocks/link/index.d.ts +4 -1
  354. package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +9 -1
  355. package/dist/nextjs-vite/export-mocks/router/index.js +13 -7
  356. package/dist/nextjs-vite/index.d.ts +4 -4
  357. package/dist/nextjs-vite/index.js +10 -5
  358. package/dist/nextjs-vite/node/index.d.ts +2 -2
  359. package/dist/nextjs-vite/node/index.js +7 -7
  360. package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
  361. package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
  362. package/dist/nextjs-vite/preset.js +117 -15
  363. package/dist/nextjs-vite/preview.d.ts +2 -1
  364. package/dist/nextjs-vite/preview.js +1 -1
  365. package/dist/nextjs-vite/vite-plugin/index.d.ts +2 -2
  366. package/dist/nextjs-vite/vite-plugin/index.js +9 -9
  367. package/dist/nextjs-vite-plugin/index.d.ts +2 -3
  368. package/dist/nextjs-vite-plugin/index.js +24 -49
  369. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  370. package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +2 -2
  371. package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +2 -2
  372. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +10 -6
  373. package/dist/node-logger/index.d.ts +83 -90
  374. package/dist/node-logger/index.js +11 -12
  375. package/dist/oxc-parser/index.js +15 -14
  376. package/dist/oxc-parser/worker.js +10 -10
  377. package/dist/{manager/_manager-chunks/globals-runtime-8HkdnU2F.js → preview/_chunks/runtime-BYRCSYBN.js} +4440 -179
  378. package/dist/preview/_chunks/{runtime-CsV4HZPV.js → runtime-BiYuZt-X.js} +392 -173
  379. package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-Bvh_rfnQ.js} +29 -64
  380. package/dist/preview/_chunks/{runtime-iXdo8CR8.js → runtime-C88AzFBv.js} +772 -418
  381. package/dist/preview/_chunks/{runtime-DrTjJkPY.js → runtime-Cpzxe5eK.js} +447 -151
  382. package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-D2MPrqbU.js} +2 -2
  383. package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-DS0s7U3c.js} +482 -334
  384. package/dist/preview/_chunks/{runtime-CxZK_Ln3.js → runtime-MYVHRAoo.js} +3 -3
  385. package/dist/preview/globals.d.ts +10 -10
  386. package/dist/preview/globals.js +10 -10
  387. package/dist/preview/runtime.js +1 -1
  388. package/dist/preview-api/index.d.ts +3 -3
  389. package/dist/preview-api/index.js +12 -10
  390. package/dist/preview-errors.d.ts +1 -1
  391. package/dist/preview-errors.js +2 -2
  392. package/dist/react/docgen/docgen-worker.js +11 -12
  393. package/dist/react/entry-preview-argtypes.js +1 -1
  394. package/dist/react/entry-preview-docs.js +1 -1
  395. package/dist/react/entry-preview.js +2 -1
  396. package/dist/react/index.d.ts +9 -11
  397. package/dist/react/index.js +8 -6
  398. package/dist/react/preset.js +13 -14
  399. package/dist/react/preview.d.ts +1 -1
  400. package/dist/react/preview.js +5 -4
  401. package/dist/react-native/bin/get-stories.js +12 -12
  402. package/dist/react-native/index.d.ts +48 -47
  403. package/dist/react-native/index.js +64 -249
  404. package/dist/react-native/metro/node.d.ts +3 -3
  405. package/dist/react-native/metro/node.js +10 -9
  406. package/dist/react-native/metro/{withStorybook.d.ts → withForkbook.d.ts} +18 -18
  407. package/dist/react-native/metro/{withStorybook.js → withForkbook.js} +27 -26
  408. package/dist/react-native/preview.js +4 -1
  409. package/dist/react-native/scripts/generate.d.ts +1 -1
  410. package/dist/react-native/scripts/generate.js +8 -8
  411. package/dist/react-native/stub.js +1 -1
  412. package/dist/react-native-theming/index.d.ts +2 -58
  413. package/dist/react-native-theming/index.js +63 -2338
  414. package/dist/react-native-ui/index.d.ts +14 -14
  415. package/dist/react-native-ui/index.js +8 -15
  416. package/dist/react-native-ui-common/index.d.ts +32 -12
  417. package/dist/react-native-ui-common/index.js +26 -31
  418. package/dist/react-vite/index.d.ts +2 -2
  419. package/dist/react-vite/node/index.d.ts +3 -3
  420. package/dist/react-vite/node/index.js +7 -7
  421. package/dist/react-vite/preset.d.ts +3 -1
  422. package/dist/react-vite/preset.js +16 -9
  423. package/dist/router/index.d.ts +80 -3
  424. package/dist/router/index.js +66 -12
  425. package/dist/server-errors.d.ts +1 -1
  426. package/dist/server-errors.js +9 -9
  427. package/dist/shared/open-service/index.d.ts +3 -3
  428. package/dist/shared/open-service/index.js +2 -2
  429. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  430. package/dist/shared/open-service/toolsets/docs/public.d.ts +28 -28
  431. package/dist/telemetry/index.d.ts +38 -274
  432. package/dist/telemetry/index.js +11 -68
  433. package/dist/test/index.d.ts +2 -2
  434. package/dist/test/index.js +765 -511
  435. package/dist/theming/create.d.ts +1 -1
  436. package/dist/theming/create.js +2 -1
  437. package/dist/theming/index.d.ts +6 -6
  438. package/dist/theming/index.js +41 -16
  439. package/dist/types/index.d.ts +2 -2
  440. package/dist/types/index.js +5 -5
  441. package/dist/viewport/index.d.ts +1 -1
  442. package/package.json +69 -69
  443. package/skills/setup/SKILL.md +14 -0
  444. package/skills/stories/SKILL.md +21 -0
  445. package/skills/write-story/SKILL.md +14 -0
  446. package/template/nextjs-vite/cli/js/Button.jsx +2 -2
  447. package/template/nextjs-vite/cli/js/Button.stories.js +6 -6
  448. package/template/nextjs-vite/cli/js/Configure.mdx +100 -100
  449. package/template/nextjs-vite/cli/js/Header.jsx +1 -1
  450. package/template/nextjs-vite/cli/js/Header.stories.js +2 -2
  451. package/template/nextjs-vite/cli/js/Page.jsx +3 -3
  452. package/template/nextjs-vite/cli/js/Page.stories.js +2 -2
  453. package/template/nextjs-vite/cli/ts/Button.stories.ts +6 -6
  454. package/template/nextjs-vite/cli/ts/Button.tsx +2 -2
  455. package/template/nextjs-vite/cli/ts/Configure.mdx +84 -84
  456. package/template/nextjs-vite/cli/ts/Header.stories.ts +2 -2
  457. package/template/nextjs-vite/cli/ts/Header.tsx +1 -1
  458. package/template/nextjs-vite/cli/ts/Page.stories.ts +2 -2
  459. package/template/nextjs-vite/cli/ts/Page.tsx +3 -3
  460. package/template/react/cli/js/Button.jsx +2 -2
  461. package/template/react/cli/js/Button.stories.js +6 -6
  462. package/template/react/cli/js/Header.jsx +1 -1
  463. package/template/react/cli/js/Header.stories.js +2 -2
  464. package/template/react/cli/js/Page.jsx +3 -3
  465. package/template/react/cli/js/Page.stories.js +2 -2
  466. package/template/react/cli/ts/Button.stories.ts +6 -6
  467. package/template/react/cli/ts/Button.tsx +2 -2
  468. package/template/react/cli/ts/Header.stories.ts +2 -2
  469. package/template/react/cli/ts/Header.tsx +1 -1
  470. package/template/react/cli/ts/Page.stories.ts +2 -2
  471. package/template/react/cli/ts/Page.tsx +3 -3
  472. package/template/react-vite/cli/js/Button.jsx +2 -2
  473. package/template/react-vite/cli/js/Button.stories.js +6 -6
  474. package/template/react-vite/cli/js/Header.jsx +1 -1
  475. package/template/react-vite/cli/js/Header.stories.js +2 -2
  476. package/template/react-vite/cli/js/Page.jsx +3 -3
  477. package/template/react-vite/cli/js/Page.stories.js +2 -2
  478. package/template/react-vite/cli/ts/Button.stories.ts +6 -6
  479. package/template/react-vite/cli/ts/Button.tsx +2 -2
  480. package/template/react-vite/cli/ts/Header.stories.ts +2 -2
  481. package/template/react-vite/cli/ts/Header.tsx +1 -1
  482. package/template/react-vite/cli/ts/Page.stories.ts +2 -2
  483. package/template/react-vite/cli/ts/Page.tsx +3 -3
  484. package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
  485. package/assets/browser/nunito-sans-bold.woff2 +0 -0
  486. package/assets/browser/nunito-sans-italic.woff2 +0 -0
  487. package/assets/browser/nunito-sans-regular.woff2 +0 -0
  488. package/dist/_browser-chunks/WithTooltip-XSQFTBMB.js +0 -1619
  489. package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
  490. package/dist/_browser-chunks/chunk-JMC7AIKT.js +0 -108
  491. package/dist/_node-chunks/builder-manager-VVHYQXCH.js +0 -1661
  492. package/dist/_node-chunks/chunk-2RU7BKEW.js +0 -23
  493. package/dist/_node-chunks/chunk-3BKIBF5S.js +0 -3008
  494. package/dist/_node-chunks/chunk-3T4ZSNPH.js +0 -662
  495. package/dist/_node-chunks/chunk-5DQFEZEA.js +0 -40
  496. package/dist/_node-chunks/chunk-6LMWA44H.js +0 -3837
  497. package/dist/_node-chunks/chunk-BXVYT7SB.js +0 -36
  498. package/dist/_node-chunks/chunk-CQKMLL5J.js +0 -33
  499. package/dist/_node-chunks/chunk-FY6UXW6G.js +0 -11
  500. package/dist/_node-chunks/chunk-IDEL2J23.js +0 -23
  501. package/dist/_node-chunks/chunk-JPAZLYJ3.js +0 -29
  502. package/dist/_node-chunks/chunk-MK2KYAI6.js +0 -5414
  503. package/dist/_node-chunks/chunk-NPO45IMH.js +0 -33
  504. package/dist/_node-chunks/chunk-QEQLR22M.js +0 -1877
  505. package/dist/_node-chunks/chunk-SIEXZVCR.js +0 -51
  506. package/dist/_node-chunks/chunk-TEQGGSP7.js +0 -33
  507. package/dist/_node-chunks/chunk-TFCEV2XX.js +0 -155
  508. package/dist/_node-chunks/chunk-W4OMYLSP.js +0 -1297
  509. package/dist/_node-chunks/chunk-WAXVSN3O.js +0 -18
  510. package/dist/_node-chunks/chunk-ZMAMXQKP.js +0 -4731
  511. package/dist/_node-chunks/dist-VTSTZKUB.js +0 -16
  512. package/dist/_node-chunks/globby-OEMHPBFY.js +0 -2884
  513. package/dist/_node-chunks/jiti-NFX6UU74.js +0 -3848
  514. package/dist/_node-chunks/lib-MDVARD7W.js +0 -366
  515. package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +0 -22
  516. package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +0 -20
  517. package/dist/_node-chunks/session-id-KIIVOQLR.js +0 -23
  518. package/dist/chunk-BTVrWliM.d.ts +0 -115
  519. package/dist/chunk-BfBzpgct.d.ts +0 -916
  520. package/dist/chunk-BxWufQms.d.ts +0 -142
  521. package/dist/chunk-DaVb55-_.d.ts +0 -124
  522. package/dist/core-server/presets/common-manager.css +0 -170
  523. package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +0 -3389
  524. package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +0 -9766
  525. package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +0 -5357
  526. package/dist/manager/_manager-chunks/globals-runtime-ZHrQFa3-.js +0 -10463
  527. package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +0 -452
  528. package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +0 -22
  529. package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +0 -998
  530. package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +0 -77
  531. package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
  532. package/dist/preview/_chunks/runtime-BwSxqk3t.js +0 -63
  533. package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
  534. package/dist/preview/_chunks/runtime-DuHdxMFA.js +0 -387
@@ -1,3837 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_ro17f80mg6k from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_ro17f80mg6k from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_ro17f80mg6k from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_ro17f80mg6k.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_ro17f80mg6k.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_ro17f80mg6k.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Forkbook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- require_picocolors
14
- } from "./chunk-2BUPBPFB.js";
15
- import {
16
- __commonJS,
17
- __export,
18
- __require,
19
- __toESM
20
- } from "./chunk-CXRU72ET.js";
21
-
22
- // ../../node_modules/are-we-there-yet/lib/tracker-base.js
23
- var require_tracker_base = __commonJS({
24
- "../../node_modules/are-we-there-yet/lib/tracker-base.js"(exports, module) {
25
- "use strict";
26
- var EventEmitter = __require("events"), trackerId = 0, TrackerBase = class extends EventEmitter {
27
- constructor(name) {
28
- super(), this.id = ++trackerId, this.name = name;
29
- }
30
- };
31
- module.exports = TrackerBase;
32
- }
33
- });
34
-
35
- // ../../node_modules/are-we-there-yet/lib/tracker.js
36
- var require_tracker = __commonJS({
37
- "../../node_modules/are-we-there-yet/lib/tracker.js"(exports, module) {
38
- "use strict";
39
- var TrackerBase = require_tracker_base(), Tracker = class extends TrackerBase {
40
- constructor(name, todo) {
41
- super(name), this.workDone = 0, this.workTodo = todo || 0;
42
- }
43
- completed() {
44
- return this.workTodo === 0 ? 0 : this.workDone / this.workTodo;
45
- }
46
- addWork(work) {
47
- this.workTodo += work, this.emit("change", this.name, this.completed(), this);
48
- }
49
- completeWork(work) {
50
- this.workDone += work, this.workDone > this.workTodo && (this.workDone = this.workTodo), this.emit("change", this.name, this.completed(), this);
51
- }
52
- finish() {
53
- this.workTodo = this.workDone = 1, this.emit("change", this.name, 1, this);
54
- }
55
- };
56
- module.exports = Tracker;
57
- }
58
- });
59
-
60
- // ../../node_modules/are-we-there-yet/lib/tracker-stream.js
61
- var require_tracker_stream = __commonJS({
62
- "../../node_modules/are-we-there-yet/lib/tracker-stream.js"(exports, module) {
63
- "use strict";
64
- var stream = __require("stream"), Tracker = require_tracker(), TrackerStream = class extends stream.Transform {
65
- constructor(name, size, options) {
66
- super(options), this.tracker = new Tracker(name, size), this.name = name, this.id = this.tracker.id, this.tracker.on("change", this.trackerChange.bind(this));
67
- }
68
- trackerChange(name, completion) {
69
- this.emit("change", name, completion, this);
70
- }
71
- _transform(data, encoding, cb) {
72
- this.tracker.completeWork(data.length ? data.length : 1), this.push(data), cb();
73
- }
74
- _flush(cb) {
75
- this.tracker.finish(), cb();
76
- }
77
- completed() {
78
- return this.tracker.completed();
79
- }
80
- addWork(work) {
81
- return this.tracker.addWork(work);
82
- }
83
- finish() {
84
- return this.tracker.finish();
85
- }
86
- };
87
- module.exports = TrackerStream;
88
- }
89
- });
90
-
91
- // ../../node_modules/are-we-there-yet/lib/tracker-group.js
92
- var require_tracker_group = __commonJS({
93
- "../../node_modules/are-we-there-yet/lib/tracker-group.js"(exports, module) {
94
- "use strict";
95
- var TrackerBase = require_tracker_base(), Tracker = require_tracker(), TrackerStream = require_tracker_stream(), TrackerGroup = class _TrackerGroup extends TrackerBase {
96
- parentGroup = null;
97
- trackers = [];
98
- completion = {};
99
- weight = {};
100
- totalWeight = 0;
101
- finished = !1;
102
- bubbleChange = bubbleChange(this);
103
- nameInTree() {
104
- for (var names = [], from = this; from; )
105
- names.unshift(from.name), from = from.parentGroup;
106
- return names.join("/");
107
- }
108
- addUnit(unit, weight) {
109
- if (unit.addUnit) {
110
- for (var toTest = this; toTest; ) {
111
- if (unit === toTest)
112
- throw new Error(
113
- "Attempted to add tracker group " + unit.name + " to tree that already includes it " + this.nameInTree(this)
114
- );
115
- toTest = toTest.parentGroup;
116
- }
117
- unit.parentGroup = this;
118
- }
119
- return this.weight[unit.id] = weight || 1, this.totalWeight += this.weight[unit.id], this.trackers.push(unit), this.completion[unit.id] = unit.completed(), unit.on("change", this.bubbleChange), this.finished || this.emit("change", unit.name, this.completion[unit.id], unit), unit;
120
- }
121
- completed() {
122
- if (this.trackers.length === 0)
123
- return 0;
124
- for (var valPerWeight = 1 / this.totalWeight, completed = 0, ii = 0; ii < this.trackers.length; ii++) {
125
- var trackerId = this.trackers[ii].id;
126
- completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId];
127
- }
128
- return completed;
129
- }
130
- newGroup(name, weight) {
131
- return this.addUnit(new _TrackerGroup(name), weight);
132
- }
133
- newItem(name, todo, weight) {
134
- return this.addUnit(new Tracker(name, todo), weight);
135
- }
136
- newStream(name, todo, weight) {
137
- return this.addUnit(new TrackerStream(name, todo), weight);
138
- }
139
- finish() {
140
- this.finished = !0, this.trackers.length || this.addUnit(new Tracker(), 1, !0);
141
- for (var ii = 0; ii < this.trackers.length; ii++) {
142
- var tracker = this.trackers[ii];
143
- tracker.finish(), tracker.removeListener("change", this.bubbleChange);
144
- }
145
- this.emit("change", this.name, 1, this);
146
- }
147
- debug(depth = 0) {
148
- let indent = " ".repeat(depth), output = `${indent}${this.name || "top"}: ${this.completed()}
149
- `;
150
- return this.trackers.forEach(function(tracker) {
151
- output += tracker instanceof _TrackerGroup ? tracker.debug(depth + 1) : `${indent} ${tracker.name}: ${tracker.completed()}
152
- `;
153
- }), output;
154
- }
155
- };
156
- function bubbleChange(trackerGroup) {
157
- return function(name, completed, tracker) {
158
- trackerGroup.completion[tracker.id] = completed, !trackerGroup.finished && trackerGroup.emit("change", name || trackerGroup.name, trackerGroup.completed(), trackerGroup);
159
- };
160
- }
161
- module.exports = TrackerGroup;
162
- }
163
- });
164
-
165
- // ../../node_modules/are-we-there-yet/lib/index.js
166
- var require_lib = __commonJS({
167
- "../../node_modules/are-we-there-yet/lib/index.js"(exports) {
168
- "use strict";
169
- exports.TrackerGroup = require_tracker_group();
170
- exports.Tracker = require_tracker();
171
- exports.TrackerStream = require_tracker_stream();
172
- }
173
- });
174
-
175
- // ../../node_modules/console-control-strings/index.js
176
- var require_console_control_strings = __commonJS({
177
- "../../node_modules/console-control-strings/index.js"(exports) {
178
- "use strict";
179
- var prefix = "\x1B[";
180
- exports.up = function(num) {
181
- return prefix + (num || "") + "A";
182
- };
183
- exports.down = function(num) {
184
- return prefix + (num || "") + "B";
185
- };
186
- exports.forward = function(num) {
187
- return prefix + (num || "") + "C";
188
- };
189
- exports.back = function(num) {
190
- return prefix + (num || "") + "D";
191
- };
192
- exports.nextLine = function(num) {
193
- return prefix + (num || "") + "E";
194
- };
195
- exports.previousLine = function(num) {
196
- return prefix + (num || "") + "F";
197
- };
198
- exports.horizontalAbsolute = function(num) {
199
- if (num == null) throw new Error("horizontalAboslute requires a column to position to");
200
- return prefix + num + "G";
201
- };
202
- exports.eraseData = function() {
203
- return prefix + "J";
204
- };
205
- exports.eraseLine = function() {
206
- return prefix + "K";
207
- };
208
- exports.goto = function(x3, y2) {
209
- return prefix + y2 + ";" + x3 + "H";
210
- };
211
- exports.gotoSOL = function() {
212
- return "\r";
213
- };
214
- exports.beep = function() {
215
- return "\x07";
216
- };
217
- exports.hideCursor = function() {
218
- return prefix + "?25l";
219
- };
220
- exports.showCursor = function() {
221
- return prefix + "?25h";
222
- };
223
- var colors2 = {
224
- reset: 0,
225
- // styles
226
- bold: 1,
227
- italic: 3,
228
- underline: 4,
229
- inverse: 7,
230
- // resets
231
- stopBold: 22,
232
- stopItalic: 23,
233
- stopUnderline: 24,
234
- stopInverse: 27,
235
- // colors
236
- white: 37,
237
- black: 30,
238
- blue: 34,
239
- cyan: 36,
240
- green: 32,
241
- magenta: 35,
242
- red: 31,
243
- yellow: 33,
244
- bgWhite: 47,
245
- bgBlack: 40,
246
- bgBlue: 44,
247
- bgCyan: 46,
248
- bgGreen: 42,
249
- bgMagenta: 45,
250
- bgRed: 41,
251
- bgYellow: 43,
252
- grey: 90,
253
- brightBlack: 90,
254
- brightRed: 91,
255
- brightGreen: 92,
256
- brightYellow: 93,
257
- brightBlue: 94,
258
- brightMagenta: 95,
259
- brightCyan: 96,
260
- brightWhite: 97,
261
- bgGrey: 100,
262
- bgBrightBlack: 100,
263
- bgBrightRed: 101,
264
- bgBrightGreen: 102,
265
- bgBrightYellow: 103,
266
- bgBrightBlue: 104,
267
- bgBrightMagenta: 105,
268
- bgBrightCyan: 106,
269
- bgBrightWhite: 107
270
- };
271
- exports.color = function(colorWith) {
272
- return (arguments.length !== 1 || !Array.isArray(colorWith)) && (colorWith = Array.prototype.slice.call(arguments)), prefix + colorWith.map(colorNameToCode).join(";") + "m";
273
- };
274
- function colorNameToCode(color) {
275
- if (colors2[color] != null) return colors2[color];
276
- throw new Error("Unknown color or style name: " + color);
277
- }
278
- }
279
- });
280
-
281
- // ../../node_modules/wide-align/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
282
- var require_ansi_regex = __commonJS({
283
- "../../node_modules/wide-align/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js"(exports, module) {
284
- "use strict";
285
- module.exports = ({ onlyFirst = !1 } = {}) => {
286
- let pattern = [
287
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
288
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
289
- ].join("|");
290
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
291
- };
292
- }
293
- });
294
-
295
- // ../../node_modules/wide-align/node_modules/string-width/node_modules/strip-ansi/index.js
296
- var require_strip_ansi = __commonJS({
297
- "../../node_modules/wide-align/node_modules/string-width/node_modules/strip-ansi/index.js"(exports, module) {
298
- "use strict";
299
- var ansiRegex2 = require_ansi_regex();
300
- module.exports = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string;
301
- }
302
- });
303
-
304
- // ../../node_modules/is-fullwidth-code-point/index.js
305
- var require_is_fullwidth_code_point = __commonJS({
306
- "../../node_modules/is-fullwidth-code-point/index.js"(exports, module) {
307
- "use strict";
308
- var isFullwidthCodePoint = (codePoint) => Number.isNaN(codePoint) ? !1 : codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
309
- codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
310
- codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
311
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
312
- 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
313
- 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
314
- 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
315
- 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
316
- 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
317
- 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
318
- 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
319
- 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
320
- 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
321
- 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
322
- 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
323
- 131072 <= codePoint && codePoint <= 262141);
324
- module.exports = isFullwidthCodePoint;
325
- module.exports.default = isFullwidthCodePoint;
326
- }
327
- });
328
-
329
- // ../../node_modules/wide-align/node_modules/string-width/node_modules/emoji-regex/index.js
330
- var require_emoji_regex = __commonJS({
331
- "../../node_modules/wide-align/node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) {
332
- "use strict";
333
- module.exports = function() {
334
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
335
- };
336
- }
337
- });
338
-
339
- // ../../node_modules/wide-align/node_modules/string-width/index.js
340
- var require_string_width = __commonJS({
341
- "../../node_modules/wide-align/node_modules/string-width/index.js"(exports, module) {
342
- "use strict";
343
- var stripAnsi2 = require_strip_ansi(), isFullwidthCodePoint = require_is_fullwidth_code_point(), emojiRegex2 = require_emoji_regex(), stringWidth2 = (string) => {
344
- if (typeof string != "string" || string.length === 0 || (string = stripAnsi2(string), string.length === 0))
345
- return 0;
346
- string = string.replace(emojiRegex2(), " ");
347
- let width = 0;
348
- for (let i = 0; i < string.length; i++) {
349
- let code = string.codePointAt(i);
350
- code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint(code) ? 2 : 1);
351
- }
352
- return width;
353
- };
354
- module.exports = stringWidth2;
355
- module.exports.default = stringWidth2;
356
- }
357
- });
358
-
359
- // ../../node_modules/wide-align/align.js
360
- var require_align = __commonJS({
361
- "../../node_modules/wide-align/align.js"(exports) {
362
- "use strict";
363
- var stringWidth2 = require_string_width();
364
- exports.center = alignCenter;
365
- exports.left = alignLeft;
366
- exports.right = alignRight;
367
- function createPadding(width) {
368
- var result = "", string = " ", n = width;
369
- do
370
- n % 2 && (result += string), n = Math.floor(n / 2), string += string;
371
- while (n);
372
- return result;
373
- }
374
- function alignLeft(str, width) {
375
- var trimmed = str.trimRight();
376
- if (trimmed.length === 0 && str.length >= width) return str;
377
- var padding = "", strWidth = stringWidth2(trimmed);
378
- return strWidth < width && (padding = createPadding(width - strWidth)), trimmed + padding;
379
- }
380
- function alignRight(str, width) {
381
- var trimmed = str.trimLeft();
382
- if (trimmed.length === 0 && str.length >= width) return str;
383
- var padding = "", strWidth = stringWidth2(trimmed);
384
- return strWidth < width && (padding = createPadding(width - strWidth)), padding + trimmed;
385
- }
386
- function alignCenter(str, width) {
387
- var trimmed = str.trim();
388
- if (trimmed.length === 0 && str.length >= width) return str;
389
- var padLeft = "", padRight = "", strWidth = stringWidth2(trimmed);
390
- if (strWidth < width) {
391
- var padLeftBy = parseInt((width - strWidth) / 2, 10);
392
- padLeft = createPadding(padLeftBy), padRight = createPadding(width - (strWidth + padLeftBy));
393
- }
394
- return padLeft + trimmed + padRight;
395
- }
396
- }
397
- });
398
-
399
- // ../../node_modules/aproba/index.js
400
- var require_aproba = __commonJS({
401
- "../../node_modules/aproba/index.js"(exports, module) {
402
- "use strict";
403
- module.exports = validate2;
404
- function isArguments(thingy) {
405
- return thingy != null && typeof thingy == "object" && thingy.hasOwnProperty("callee");
406
- }
407
- var types = {
408
- "*": { label: "any", check: () => !0 },
409
- A: { label: "array", check: (_2) => Array.isArray(_2) || isArguments(_2) },
410
- S: { label: "string", check: (_2) => typeof _2 == "string" },
411
- N: { label: "number", check: (_2) => typeof _2 == "number" },
412
- F: { label: "function", check: (_2) => typeof _2 == "function" },
413
- O: { label: "object", check: (_2) => typeof _2 == "object" && _2 != null && !types.A.check(_2) && !types.E.check(_2) },
414
- B: { label: "boolean", check: (_2) => typeof _2 == "boolean" },
415
- E: { label: "error", check: (_2) => _2 instanceof Error },
416
- Z: { label: "null", check: (_2) => _2 == null }
417
- };
418
- function addSchema(schema, arity) {
419
- let group = arity[schema.length] = arity[schema.length] || [];
420
- group.indexOf(schema) === -1 && group.push(schema);
421
- }
422
- function validate2(rawSchemas, args) {
423
- if (arguments.length !== 2) throw wrongNumberOfArgs(["SA"], arguments.length);
424
- if (!rawSchemas) throw missingRequiredArg(0, "rawSchemas");
425
- if (!args) throw missingRequiredArg(1, "args");
426
- if (!types.S.check(rawSchemas)) throw invalidType(0, ["string"], rawSchemas);
427
- if (!types.A.check(args)) throw invalidType(1, ["array"], args);
428
- let schemas = rawSchemas.split("|"), arity = {};
429
- schemas.forEach((schema) => {
430
- for (let ii = 0; ii < schema.length; ++ii) {
431
- let type = schema[ii];
432
- if (!types[type]) throw unknownType(ii, type);
433
- }
434
- if (/E.*E/.test(schema)) throw moreThanOneError(schema);
435
- addSchema(schema, arity), /E/.test(schema) && (addSchema(schema.replace(/E.*$/, "E"), arity), addSchema(schema.replace(/E/, "Z"), arity), schema.length === 1 && addSchema("", arity));
436
- });
437
- let matching = arity[args.length];
438
- if (!matching)
439
- throw wrongNumberOfArgs(Object.keys(arity), args.length);
440
- for (let ii = 0; ii < args.length; ++ii) {
441
- let newMatching = matching.filter((schema) => {
442
- let type = schema[ii], typeCheck = types[type].check;
443
- return typeCheck(args[ii]);
444
- });
445
- if (!newMatching.length) {
446
- let labels = matching.map((_2) => types[_2[ii]].label).filter((_2) => _2 != null);
447
- throw invalidType(ii, labels, args[ii]);
448
- }
449
- matching = newMatching;
450
- }
451
- }
452
- function missingRequiredArg(num) {
453
- return newException("EMISSINGARG", "Missing required argument #" + (num + 1));
454
- }
455
- function unknownType(num, type) {
456
- return newException("EUNKNOWNTYPE", "Unknown type " + type + " in argument #" + (num + 1));
457
- }
458
- function invalidType(num, expectedTypes, value) {
459
- let valueType;
460
- return Object.keys(types).forEach((typeCode) => {
461
- types[typeCode].check(value) && (valueType = types[typeCode].label);
462
- }), newException("EINVALIDTYPE", "Argument #" + (num + 1) + ": Expected " + englishList(expectedTypes) + " but got " + valueType);
463
- }
464
- function englishList(list) {
465
- return list.join(", ").replace(/, ([^,]+)$/, " or $1");
466
- }
467
- function wrongNumberOfArgs(expected, got) {
468
- let english = englishList(expected), args = expected.every((ex) => ex.length === 1) ? "argument" : "arguments";
469
- return newException("EWRONGARGCOUNT", "Expected " + english + " " + args + " but got " + got);
470
- }
471
- function moreThanOneError(schema) {
472
- return newException(
473
- "ETOOMANYERRORTYPES",
474
- 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"'
475
- );
476
- }
477
- function newException(code, msg) {
478
- let err = new TypeError(msg);
479
- return err.code = code, Error.captureStackTrace && Error.captureStackTrace(err, validate2), err;
480
- }
481
- }
482
- });
483
-
484
- // ../../node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js
485
- var require_ansi_regex2 = __commonJS({
486
- "../../node_modules/gauge/node_modules/strip-ansi/node_modules/ansi-regex/index.js"(exports, module) {
487
- "use strict";
488
- module.exports = ({ onlyFirst = !1 } = {}) => {
489
- let pattern = [
490
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
491
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
492
- ].join("|");
493
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
494
- };
495
- }
496
- });
497
-
498
- // ../../node_modules/gauge/node_modules/strip-ansi/index.js
499
- var require_strip_ansi2 = __commonJS({
500
- "../../node_modules/gauge/node_modules/strip-ansi/index.js"(exports, module) {
501
- "use strict";
502
- var ansiRegex2 = require_ansi_regex2();
503
- module.exports = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string;
504
- }
505
- });
506
-
507
- // ../../node_modules/gauge/node_modules/string-width/node_modules/emoji-regex/index.js
508
- var require_emoji_regex2 = __commonJS({
509
- "../../node_modules/gauge/node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) {
510
- "use strict";
511
- module.exports = function() {
512
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
513
- };
514
- }
515
- });
516
-
517
- // ../../node_modules/gauge/node_modules/string-width/index.js
518
- var require_string_width2 = __commonJS({
519
- "../../node_modules/gauge/node_modules/string-width/index.js"(exports, module) {
520
- "use strict";
521
- var stripAnsi2 = require_strip_ansi2(), isFullwidthCodePoint = require_is_fullwidth_code_point(), emojiRegex2 = require_emoji_regex2(), stringWidth2 = (string) => {
522
- if (typeof string != "string" || string.length === 0 || (string = stripAnsi2(string), string.length === 0))
523
- return 0;
524
- string = string.replace(emojiRegex2(), " ");
525
- let width = 0;
526
- for (let i = 0; i < string.length; i++) {
527
- let code = string.codePointAt(i);
528
- code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint(code) ? 2 : 1);
529
- }
530
- return width;
531
- };
532
- module.exports = stringWidth2;
533
- module.exports.default = stringWidth2;
534
- }
535
- });
536
-
537
- // ../../node_modules/gauge/lib/wide-truncate.js
538
- var require_wide_truncate = __commonJS({
539
- "../../node_modules/gauge/lib/wide-truncate.js"(exports, module) {
540
- "use strict";
541
- var stringWidth2 = require_string_width2(), stripAnsi2 = require_strip_ansi2();
542
- module.exports = wideTruncate;
543
- function wideTruncate(str, target) {
544
- if (stringWidth2(str) === 0)
545
- return str;
546
- if (target <= 0)
547
- return "";
548
- if (stringWidth2(str) <= target)
549
- return str;
550
- for (var noAnsi = stripAnsi2(str), ansiSize = str.length + noAnsi.length, truncated = str.slice(0, target + ansiSize); stringWidth2(truncated) > target; )
551
- truncated = truncated.slice(0, -1);
552
- return truncated;
553
- }
554
- }
555
- });
556
-
557
- // ../../node_modules/gauge/lib/error.js
558
- var require_error = __commonJS({
559
- "../../node_modules/gauge/lib/error.js"(exports) {
560
- "use strict";
561
- var util = __require("util"), User = exports.User = function User2(msg) {
562
- var err = new Error(msg);
563
- return Error.captureStackTrace(err, User2), err.code = "EGAUGE", err;
564
- };
565
- exports.MissingTemplateValue = function MissingTemplateValue(item, values) {
566
- var err = new User(util.format('Missing template value "%s"', item.type));
567
- return Error.captureStackTrace(err, MissingTemplateValue), err.template = item, err.values = values, err;
568
- };
569
- exports.Internal = function Internal(msg) {
570
- var err = new Error(msg);
571
- return Error.captureStackTrace(err, Internal), err.code = "EGAUGEINTERNAL", err;
572
- };
573
- }
574
- });
575
-
576
- // ../../node_modules/gauge/lib/template-item.js
577
- var require_template_item = __commonJS({
578
- "../../node_modules/gauge/lib/template-item.js"(exports, module) {
579
- "use strict";
580
- var stringWidth2 = require_string_width2();
581
- module.exports = TemplateItem;
582
- function isPercent(num) {
583
- return typeof num != "string" ? !1 : num.slice(-1) === "%";
584
- }
585
- function percent(num) {
586
- return Number(num.slice(0, -1)) / 100;
587
- }
588
- function TemplateItem(values, outputLength) {
589
- if (this.overallOutputLength = outputLength, this.finished = !1, this.type = null, this.value = null, this.length = null, this.maxLength = null, this.minLength = null, this.kerning = null, this.align = "left", this.padLeft = 0, this.padRight = 0, this.index = null, this.first = null, this.last = null, typeof values == "string")
590
- this.value = values;
591
- else
592
- for (var prop in values)
593
- this[prop] = values[prop];
594
- return isPercent(this.length) && (this.length = Math.round(this.overallOutputLength * percent(this.length))), isPercent(this.minLength) && (this.minLength = Math.round(this.overallOutputLength * percent(this.minLength))), isPercent(this.maxLength) && (this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength))), this;
595
- }
596
- TemplateItem.prototype = {};
597
- TemplateItem.prototype.getBaseLength = function() {
598
- var length = this.length;
599
- return length == null && typeof this.value == "string" && this.maxLength == null && this.minLength == null && (length = stringWidth2(this.value)), length;
600
- };
601
- TemplateItem.prototype.getLength = function() {
602
- var length = this.getBaseLength();
603
- return length == null ? null : length + this.padLeft + this.padRight;
604
- };
605
- TemplateItem.prototype.getMaxLength = function() {
606
- return this.maxLength == null ? null : this.maxLength + this.padLeft + this.padRight;
607
- };
608
- TemplateItem.prototype.getMinLength = function() {
609
- return this.minLength == null ? null : this.minLength + this.padLeft + this.padRight;
610
- };
611
- }
612
- });
613
-
614
- // ../../node_modules/gauge/lib/render-template.js
615
- var require_render_template = __commonJS({
616
- "../../node_modules/gauge/lib/render-template.js"(exports, module) {
617
- "use strict";
618
- var align = require_align(), validate2 = require_aproba(), wideTruncate = require_wide_truncate(), error2 = require_error(), TemplateItem = require_template_item();
619
- function renderValueWithValues(values) {
620
- return function(item) {
621
- return renderValue(item, values);
622
- };
623
- }
624
- var renderTemplate = module.exports = function(width, template, values) {
625
- var items = prepareItems(width, template, values), rendered = items.map(renderValueWithValues(values)).join("");
626
- return align.left(wideTruncate(rendered, width), width);
627
- };
628
- function preType(item) {
629
- var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1);
630
- return "pre" + cappedTypeName;
631
- }
632
- function postType(item) {
633
- var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1);
634
- return "post" + cappedTypeName;
635
- }
636
- function hasPreOrPost(item, values) {
637
- if (item.type)
638
- return values[preType(item)] || values[postType(item)];
639
- }
640
- function generatePreAndPost(baseItem, parentValues) {
641
- var item = Object.assign({}, baseItem), values = Object.create(parentValues), template = [], pre = preType(item), post = postType(item);
642
- return values[pre] && (template.push({ value: values[pre] }), values[pre] = null), item.minLength = null, item.length = null, item.maxLength = null, template.push(item), values[item.type] = values[item.type], values[post] && (template.push({ value: values[post] }), values[post] = null), function($1, $2, length) {
643
- return renderTemplate(length, template, values);
644
- };
645
- }
646
- function prepareItems(width, template, values) {
647
- function cloneAndObjectify(item, index, arr) {
648
- var cloned = new TemplateItem(item, width), type = cloned.type;
649
- if (cloned.value == null)
650
- if (type in values)
651
- cloned.value = values[type];
652
- else {
653
- if (cloned.default == null)
654
- throw new error2.MissingTemplateValue(cloned, values);
655
- cloned.value = cloned.default;
656
- }
657
- return cloned.value == null || cloned.value === "" ? null : (cloned.index = index, cloned.first = index === 0, cloned.last = index === arr.length - 1, hasPreOrPost(cloned, values) && (cloned.value = generatePreAndPost(cloned, values)), cloned);
658
- }
659
- var output = template.map(cloneAndObjectify).filter(function(item) {
660
- return item != null;
661
- }), remainingSpace = width, variableCount = output.length;
662
- function consumeSpace(length) {
663
- length > remainingSpace && (length = remainingSpace), remainingSpace -= length;
664
- }
665
- function finishSizing(item, length) {
666
- if (item.finished)
667
- throw new error2.Internal("Tried to finish template item that was already finished");
668
- if (length === 1 / 0)
669
- throw new error2.Internal("Length of template item cannot be infinity");
670
- if (length != null && (item.length = length), item.minLength = null, item.maxLength = null, --variableCount, item.finished = !0, item.length == null && (item.length = item.getBaseLength()), item.length == null)
671
- throw new error2.Internal("Finished template items must have a length");
672
- consumeSpace(item.getLength());
673
- }
674
- output.forEach(function(item) {
675
- if (item.kerning) {
676
- var prevPadRight = item.first ? 0 : output[item.index - 1].padRight;
677
- !item.first && prevPadRight < item.kerning && (item.padLeft = item.kerning - prevPadRight), item.last || (item.padRight = item.kerning);
678
- }
679
- }), output.forEach(function(item) {
680
- item.getBaseLength() != null && finishSizing(item);
681
- });
682
- var resized = 0, resizing, hunkSize;
683
- do
684
- resizing = !1, hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) {
685
- item.finished || item.maxLength && item.getMaxLength() < hunkSize && (finishSizing(item, item.maxLength), resizing = !0);
686
- });
687
- while (resizing && resized++ < output.length);
688
- if (resizing)
689
- throw new error2.Internal("Resize loop iterated too many times while determining maxLength");
690
- resized = 0;
691
- do
692
- resizing = !1, hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) {
693
- item.finished || item.minLength && item.getMinLength() >= hunkSize && (finishSizing(item, item.minLength), resizing = !0);
694
- });
695
- while (resizing && resized++ < output.length);
696
- if (resizing)
697
- throw new error2.Internal("Resize loop iterated too many times while determining minLength");
698
- return hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) {
699
- item.finished || finishSizing(item, hunkSize);
700
- }), output;
701
- }
702
- function renderFunction(item, values, length) {
703
- return validate2("OON", arguments), item.type ? item.value(values, values[item.type + "Theme"] || {}, length) : item.value(values, {}, length);
704
- }
705
- function renderValue(item, values) {
706
- var length = item.getBaseLength(), value = typeof item.value == "function" ? renderFunction(item, values, length) : item.value;
707
- if (value == null || value === "")
708
- return "";
709
- var alignWith = align[item.align] || align.left, leftPadding = item.padLeft ? align.left("", item.padLeft) : "", rightPadding = item.padRight ? align.right("", item.padRight) : "", truncated = wideTruncate(String(value), length), aligned = alignWith(truncated, length);
710
- return leftPadding + aligned + rightPadding;
711
- }
712
- }
713
- });
714
-
715
- // ../../node_modules/gauge/lib/plumbing.js
716
- var require_plumbing = __commonJS({
717
- "../../node_modules/gauge/lib/plumbing.js"(exports, module) {
718
- "use strict";
719
- var consoleControl = require_console_control_strings(), renderTemplate = require_render_template(), validate2 = require_aproba(), Plumbing = module.exports = function(theme, template, width) {
720
- width || (width = 80), validate2("OAN", [theme, template, width]), this.showing = !1, this.theme = theme, this.width = width, this.template = template;
721
- };
722
- Plumbing.prototype = {};
723
- Plumbing.prototype.setTheme = function(theme) {
724
- validate2("O", [theme]), this.theme = theme;
725
- };
726
- Plumbing.prototype.setTemplate = function(template) {
727
- validate2("A", [template]), this.template = template;
728
- };
729
- Plumbing.prototype.setWidth = function(width) {
730
- validate2("N", [width]), this.width = width;
731
- };
732
- Plumbing.prototype.hide = function() {
733
- return consoleControl.gotoSOL() + consoleControl.eraseLine();
734
- };
735
- Plumbing.prototype.hideCursor = consoleControl.hideCursor;
736
- Plumbing.prototype.showCursor = consoleControl.showCursor;
737
- Plumbing.prototype.show = function(status) {
738
- var values = Object.create(this.theme);
739
- for (var key in status)
740
- values[key] = status[key];
741
- return renderTemplate(this.width, this.template, values).trim() + consoleControl.color("reset") + consoleControl.eraseLine() + consoleControl.gotoSOL();
742
- };
743
- }
744
- });
745
-
746
- // ../../node_modules/has-unicode/index.js
747
- var require_has_unicode = __commonJS({
748
- "../../node_modules/has-unicode/index.js"(exports, module) {
749
- "use strict";
750
- var os = __require("os"), hasUnicode = module.exports = function() {
751
- if (os.type() == "Windows_NT")
752
- return !1;
753
- var isUTF8 = /UTF-?8$/i, ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG;
754
- return isUTF8.test(ctype);
755
- };
756
- }
757
- });
758
-
759
- // ../../node_modules/color-support/index.js
760
- var require_color_support = __commonJS({
761
- "../../node_modules/color-support/index.js"(exports, module) {
762
- module.exports = colorSupport({ alwaysReturn: !0 }, colorSupport);
763
- function hasNone(obj, options) {
764
- return obj.level = 0, obj.hasBasic = !1, obj.has256 = !1, obj.has16m = !1, options.alwaysReturn ? obj : !1;
765
- }
766
- function hasBasic(obj) {
767
- return obj.hasBasic = !0, obj.has256 = !1, obj.has16m = !1, obj.level = 1, obj;
768
- }
769
- function has256(obj) {
770
- return obj.hasBasic = !0, obj.has256 = !0, obj.has16m = !1, obj.level = 2, obj;
771
- }
772
- function has16m(obj) {
773
- return obj.hasBasic = !0, obj.has256 = !0, obj.has16m = !0, obj.level = 3, obj;
774
- }
775
- function colorSupport(options, obj) {
776
- if (options = options || {}, obj = obj || {}, typeof options.level == "number")
777
- switch (options.level) {
778
- case 0:
779
- return hasNone(obj, options);
780
- case 1:
781
- return hasBasic(obj);
782
- case 2:
783
- return has256(obj);
784
- case 3:
785
- return has16m(obj);
786
- }
787
- if (obj.level = 0, obj.hasBasic = !1, obj.has256 = !1, obj.has16m = !1, typeof process > "u" || !process || !process.stdout || !process.env || !process.platform)
788
- return hasNone(obj, options);
789
- var env = options.env || process.env, stream = options.stream || process.stdout, term = options.term || env.TERM || "", platform = options.platform || process.platform;
790
- if (!options.ignoreTTY && !stream.isTTY || !options.ignoreDumb && term === "dumb" && !env.COLORTERM)
791
- return hasNone(obj, options);
792
- if (platform === "win32")
793
- return hasBasic(obj);
794
- if (env.TMUX)
795
- return has256(obj);
796
- if (!options.ignoreCI && (env.CI || env.TEAMCITY_VERSION))
797
- return env.TRAVIS ? has256(obj) : hasNone(obj, options);
798
- switch (env.TERM_PROGRAM) {
799
- case "iTerm.app":
800
- var ver = env.TERM_PROGRAM_VERSION || "0.";
801
- return /^[0-2]\./.test(ver) ? has256(obj) : has16m(obj);
802
- case "HyperTerm":
803
- case "Hyper":
804
- return has16m(obj);
805
- case "MacTerm":
806
- return has16m(obj);
807
- case "Apple_Terminal":
808
- return has256(obj);
809
- }
810
- return /^xterm-256/.test(term) ? has256(obj) : /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(term) || env.COLORTERM ? hasBasic(obj) : hasNone(obj, options);
811
- }
812
- }
813
- });
814
-
815
- // ../../node_modules/gauge/lib/has-color.js
816
- var require_has_color = __commonJS({
817
- "../../node_modules/gauge/lib/has-color.js"(exports, module) {
818
- "use strict";
819
- var colorSupport = require_color_support();
820
- module.exports = colorSupport().hasBasic;
821
- }
822
- });
823
-
824
- // ../../node_modules/signal-exit/dist/cjs/signals.js
825
- var require_signals = __commonJS({
826
- "../../node_modules/signal-exit/dist/cjs/signals.js"(exports) {
827
- "use strict";
828
- Object.defineProperty(exports, "__esModule", { value: !0 });
829
- exports.signals = void 0;
830
- exports.signals = [];
831
- exports.signals.push("SIGHUP", "SIGINT", "SIGTERM");
832
- process.platform !== "win32" && exports.signals.push(
833
- "SIGALRM",
834
- "SIGABRT",
835
- "SIGVTALRM",
836
- "SIGXCPU",
837
- "SIGXFSZ",
838
- "SIGUSR2",
839
- "SIGTRAP",
840
- "SIGSYS",
841
- "SIGQUIT",
842
- "SIGIOT"
843
- // should detect profiler and enable/disable accordingly.
844
- // see #21
845
- // 'SIGPROF'
846
- );
847
- process.platform === "linux" && exports.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
848
- }
849
- });
850
-
851
- // ../../node_modules/signal-exit/dist/cjs/index.js
852
- var require_cjs = __commonJS({
853
- "../../node_modules/signal-exit/dist/cjs/index.js"(exports) {
854
- "use strict";
855
- var _a;
856
- Object.defineProperty(exports, "__esModule", { value: !0 });
857
- exports.unload = exports.load = exports.onExit = exports.signals = void 0;
858
- var signals_js_1 = require_signals();
859
- Object.defineProperty(exports, "signals", { enumerable: !0, get: function() {
860
- return signals_js_1.signals;
861
- } });
862
- var processOk = (process3) => !!process3 && typeof process3 == "object" && typeof process3.removeListener == "function" && typeof process3.emit == "function" && typeof process3.reallyExit == "function" && typeof process3.listeners == "function" && typeof process3.kill == "function" && typeof process3.pid == "number" && typeof process3.on == "function", kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter"), global = globalThis, ObjectDefineProperty = Object.defineProperty.bind(Object), Emitter = class {
863
- emitted = {
864
- afterExit: !1,
865
- exit: !1
866
- };
867
- listeners = {
868
- afterExit: [],
869
- exit: []
870
- };
871
- count = 0;
872
- id = Math.random();
873
- constructor() {
874
- if (global[kExitEmitter])
875
- return global[kExitEmitter];
876
- ObjectDefineProperty(global, kExitEmitter, {
877
- value: this,
878
- writable: !1,
879
- enumerable: !1,
880
- configurable: !1
881
- });
882
- }
883
- on(ev, fn) {
884
- this.listeners[ev].push(fn);
885
- }
886
- removeListener(ev, fn) {
887
- let list = this.listeners[ev], i = list.indexOf(fn);
888
- i !== -1 && (i === 0 && list.length === 1 ? list.length = 0 : list.splice(i, 1));
889
- }
890
- emit(ev, code, signal) {
891
- if (this.emitted[ev])
892
- return !1;
893
- this.emitted[ev] = !0;
894
- let ret = !1;
895
- for (let fn of this.listeners[ev])
896
- ret = fn(code, signal) === !0 || ret;
897
- return ev === "exit" && (ret = this.emit("afterExit", code, signal) || ret), ret;
898
- }
899
- }, SignalExitBase = class {
900
- }, signalExitWrap = (handler) => ({
901
- onExit(cb, opts) {
902
- return handler.onExit(cb, opts);
903
- },
904
- load() {
905
- return handler.load();
906
- },
907
- unload() {
908
- return handler.unload();
909
- }
910
- }), SignalExitFallback = class extends SignalExitBase {
911
- onExit() {
912
- return () => {
913
- };
914
- }
915
- load() {
916
- }
917
- unload() {
918
- }
919
- }, SignalExit = class extends SignalExitBase {
920
- // "SIGHUP" throws an `ENOSYS` error on Windows,
921
- // so use a supported signal instead
922
- /* c8 ignore start */
923
- #hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
924
- /* c8 ignore stop */
925
- #emitter = new Emitter();
926
- #process;
927
- #originalProcessEmit;
928
- #originalProcessReallyExit;
929
- #sigListeners = {};
930
- #loaded = !1;
931
- constructor(process3) {
932
- super(), this.#process = process3, this.#sigListeners = {};
933
- for (let sig of signals_js_1.signals)
934
- this.#sigListeners[sig] = () => {
935
- let listeners = this.#process.listeners(sig), { count } = this.#emitter, p = process3;
936
- if (typeof p.__signal_exit_emitter__ == "object" && typeof p.__signal_exit_emitter__.count == "number" && (count += p.__signal_exit_emitter__.count), listeners.length === count) {
937
- this.unload();
938
- let ret = this.#emitter.emit("exit", null, sig), s = sig === "SIGHUP" ? this.#hupSig : sig;
939
- ret || process3.kill(process3.pid, s);
940
- }
941
- };
942
- this.#originalProcessReallyExit = process3.reallyExit, this.#originalProcessEmit = process3.emit;
943
- }
944
- onExit(cb, opts) {
945
- if (!processOk(this.#process))
946
- return () => {
947
- };
948
- this.#loaded === !1 && this.load();
949
- let ev = opts?.alwaysLast ? "afterExit" : "exit";
950
- return this.#emitter.on(ev, cb), () => {
951
- this.#emitter.removeListener(ev, cb), this.#emitter.listeners.exit.length === 0 && this.#emitter.listeners.afterExit.length === 0 && this.unload();
952
- };
953
- }
954
- load() {
955
- if (!this.#loaded) {
956
- this.#loaded = !0, this.#emitter.count += 1;
957
- for (let sig of signals_js_1.signals)
958
- try {
959
- let fn = this.#sigListeners[sig];
960
- fn && this.#process.on(sig, fn);
961
- } catch {
962
- }
963
- this.#process.emit = (ev, ...a) => this.#processEmit(ev, ...a), this.#process.reallyExit = (code) => this.#processReallyExit(code);
964
- }
965
- }
966
- unload() {
967
- this.#loaded && (this.#loaded = !1, signals_js_1.signals.forEach((sig) => {
968
- let listener = this.#sigListeners[sig];
969
- if (!listener)
970
- throw new Error("Listener not defined for signal: " + sig);
971
- try {
972
- this.#process.removeListener(sig, listener);
973
- } catch {
974
- }
975
- }), this.#process.emit = this.#originalProcessEmit, this.#process.reallyExit = this.#originalProcessReallyExit, this.#emitter.count -= 1);
976
- }
977
- #processReallyExit(code) {
978
- return processOk(this.#process) ? (this.#process.exitCode = code || 0, this.#emitter.emit("exit", this.#process.exitCode, null), this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode)) : 0;
979
- }
980
- #processEmit(ev, ...args) {
981
- let og = this.#originalProcessEmit;
982
- if (ev === "exit" && processOk(this.#process)) {
983
- typeof args[0] == "number" && (this.#process.exitCode = args[0]);
984
- let ret = og.call(this.#process, ev, ...args);
985
- return this.#emitter.emit("exit", this.#process.exitCode, null), ret;
986
- } else
987
- return og.call(this.#process, ev, ...args);
988
- }
989
- }, process2 = globalThis.process;
990
- _a = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback()), /**
991
- * Called when the process is exiting, whether via signal, explicit
992
- * exit, or running out of stuff to do.
993
- *
994
- * If the global process object is not suitable for instrumentation,
995
- * then this will be a no-op.
996
- *
997
- * Returns a function that may be used to unload signal-exit.
998
- */
999
- exports.onExit = _a.onExit, /**
1000
- * Load the listeners. Likely you never need to call this, unless
1001
- * doing a rather deep integration with signal-exit functionality.
1002
- * Mostly exposed for the benefit of testing.
1003
- *
1004
- * @internal
1005
- */
1006
- exports.load = _a.load, /**
1007
- * Unload the listeners. Likely you never need to call this, unless
1008
- * doing a rather deep integration with signal-exit functionality.
1009
- * Mostly exposed for the benefit of testing.
1010
- *
1011
- * @internal
1012
- */
1013
- exports.unload = _a.unload;
1014
- }
1015
- });
1016
-
1017
- // ../../node_modules/gauge/lib/spin.js
1018
- var require_spin = __commonJS({
1019
- "../../node_modules/gauge/lib/spin.js"(exports, module) {
1020
- "use strict";
1021
- module.exports = function(spinstr, spun) {
1022
- return spinstr[spun % spinstr.length];
1023
- };
1024
- }
1025
- });
1026
-
1027
- // ../../node_modules/gauge/lib/progress-bar.js
1028
- var require_progress_bar = __commonJS({
1029
- "../../node_modules/gauge/lib/progress-bar.js"(exports, module) {
1030
- "use strict";
1031
- var validate2 = require_aproba(), renderTemplate = require_render_template(), wideTruncate = require_wide_truncate(), stringWidth2 = require_string_width2();
1032
- module.exports = function(theme, width, completed) {
1033
- if (validate2("ONN", [theme, width, completed]), completed < 0 && (completed = 0), completed > 1 && (completed = 1), width <= 0)
1034
- return "";
1035
- var sofar = Math.round(width * completed), rest = width - sofar, template = [
1036
- { type: "complete", value: repeat(theme.complete, sofar), length: sofar },
1037
- { type: "remaining", value: repeat(theme.remaining, rest), length: rest }
1038
- ];
1039
- return renderTemplate(width, template, theme);
1040
- };
1041
- function repeat(string, width) {
1042
- var result = "", n = width;
1043
- do
1044
- n % 2 && (result += string), n = Math.floor(n / 2), string += string;
1045
- while (n && stringWidth2(result) < width);
1046
- return wideTruncate(result, width);
1047
- }
1048
- }
1049
- });
1050
-
1051
- // ../../node_modules/gauge/lib/base-theme.js
1052
- var require_base_theme = __commonJS({
1053
- "../../node_modules/gauge/lib/base-theme.js"(exports, module) {
1054
- "use strict";
1055
- var spin = require_spin(), progressBar = require_progress_bar();
1056
- module.exports = {
1057
- activityIndicator: function(values, theme) {
1058
- if (values.spun != null)
1059
- return spin(theme, values.spun);
1060
- },
1061
- progressbar: function(values, theme, width) {
1062
- if (values.completed != null)
1063
- return progressBar(theme, width, values.completed);
1064
- }
1065
- };
1066
- }
1067
- });
1068
-
1069
- // ../../node_modules/gauge/lib/theme-set.js
1070
- var require_theme_set = __commonJS({
1071
- "../../node_modules/gauge/lib/theme-set.js"(exports, module) {
1072
- "use strict";
1073
- module.exports = function() {
1074
- return ThemeSetProto.newThemeSet();
1075
- };
1076
- var ThemeSetProto = {};
1077
- ThemeSetProto.baseTheme = require_base_theme();
1078
- ThemeSetProto.newTheme = function(parent, theme) {
1079
- return theme || (theme = parent, parent = this.baseTheme), Object.assign({}, parent, theme);
1080
- };
1081
- ThemeSetProto.getThemeNames = function() {
1082
- return Object.keys(this.themes);
1083
- };
1084
- ThemeSetProto.addTheme = function(name, parent, theme) {
1085
- this.themes[name] = this.newTheme(parent, theme);
1086
- };
1087
- ThemeSetProto.addToAllThemes = function(theme) {
1088
- var themes = this.themes;
1089
- Object.keys(themes).forEach(function(name) {
1090
- Object.assign(themes[name], theme);
1091
- }), Object.assign(this.baseTheme, theme);
1092
- };
1093
- ThemeSetProto.getTheme = function(name) {
1094
- if (!this.themes[name])
1095
- throw this.newMissingThemeError(name);
1096
- return this.themes[name];
1097
- };
1098
- ThemeSetProto.setDefault = function(opts, name) {
1099
- name == null && (name = opts, opts = {});
1100
- var platform = opts.platform == null ? "fallback" : opts.platform, hasUnicode = !!opts.hasUnicode, hasColor = !!opts.hasColor;
1101
- this.defaults[platform] || (this.defaults[platform] = { true: {}, false: {} }), this.defaults[platform][hasUnicode][hasColor] = name;
1102
- };
1103
- ThemeSetProto.getDefault = function(opts) {
1104
- opts || (opts = {});
1105
- var platformName = opts.platform || process.platform, platform = this.defaults[platformName] || this.defaults.fallback, hasUnicode = !!opts.hasUnicode, hasColor = !!opts.hasColor;
1106
- if (!platform)
1107
- throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor);
1108
- if (!platform[hasUnicode][hasColor]) {
1109
- if (hasUnicode && hasColor && platform[!hasUnicode][hasColor])
1110
- hasUnicode = !1;
1111
- else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor])
1112
- hasColor = !1;
1113
- else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor])
1114
- hasUnicode = !1, hasColor = !1;
1115
- else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor])
1116
- hasUnicode = !1;
1117
- else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor])
1118
- hasColor = !1;
1119
- else if (platform === this.defaults.fallback)
1120
- throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor);
1121
- }
1122
- return platform[hasUnicode][hasColor] ? this.getTheme(platform[hasUnicode][hasColor]) : this.getDefault(Object.assign({}, opts, { platform: "fallback" }));
1123
- };
1124
- ThemeSetProto.newMissingThemeError = function newMissingThemeError(name) {
1125
- var err = new Error('Could not find a gauge theme named "' + name + '"');
1126
- return Error.captureStackTrace.call(err, newMissingThemeError), err.theme = name, err.code = "EMISSINGTHEME", err;
1127
- };
1128
- ThemeSetProto.newMissingDefaultThemeError = function newMissingDefaultThemeError(platformName, hasUnicode, hasColor) {
1129
- var err = new Error(
1130
- `Could not find a gauge theme for your platform/unicode/color use combo:
1131
- platform = ` + platformName + `
1132
- hasUnicode = ` + hasUnicode + `
1133
- hasColor = ` + hasColor
1134
- );
1135
- return Error.captureStackTrace.call(err, newMissingDefaultThemeError), err.platform = platformName, err.hasUnicode = hasUnicode, err.hasColor = hasColor, err.code = "EMISSINGTHEME", err;
1136
- };
1137
- ThemeSetProto.newThemeSet = function() {
1138
- var themeset = function(opts) {
1139
- return themeset.getDefault(opts);
1140
- };
1141
- return Object.assign(themeset, ThemeSetProto, {
1142
- themes: Object.assign({}, this.themes),
1143
- baseTheme: Object.assign({}, this.baseTheme),
1144
- defaults: JSON.parse(JSON.stringify(this.defaults || {}))
1145
- });
1146
- };
1147
- }
1148
- });
1149
-
1150
- // ../../node_modules/gauge/lib/themes.js
1151
- var require_themes = __commonJS({
1152
- "../../node_modules/gauge/lib/themes.js"(exports, module) {
1153
- "use strict";
1154
- var color = require_console_control_strings().color, ThemeSet = require_theme_set(), themes = module.exports = new ThemeSet();
1155
- themes.addTheme("ASCII", {
1156
- preProgressbar: "[",
1157
- postProgressbar: "]",
1158
- progressbarTheme: {
1159
- complete: "#",
1160
- remaining: "."
1161
- },
1162
- activityIndicatorTheme: "-\\|/",
1163
- preSubsection: ">"
1164
- });
1165
- themes.addTheme("colorASCII", themes.getTheme("ASCII"), {
1166
- progressbarTheme: {
1167
- preComplete: color("bgBrightWhite", "brightWhite"),
1168
- complete: "#",
1169
- postComplete: color("reset"),
1170
- preRemaining: color("bgBrightBlack", "brightBlack"),
1171
- remaining: ".",
1172
- postRemaining: color("reset")
1173
- }
1174
- });
1175
- themes.addTheme("brailleSpinner", {
1176
- preProgressbar: "(",
1177
- postProgressbar: ")",
1178
- progressbarTheme: {
1179
- complete: "#",
1180
- remaining: "\u2802"
1181
- },
1182
- activityIndicatorTheme: "\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F",
1183
- preSubsection: ">"
1184
- });
1185
- themes.addTheme("colorBrailleSpinner", themes.getTheme("brailleSpinner"), {
1186
- progressbarTheme: {
1187
- preComplete: color("bgBrightWhite", "brightWhite"),
1188
- complete: "#",
1189
- postComplete: color("reset"),
1190
- preRemaining: color("bgBrightBlack", "brightBlack"),
1191
- remaining: "\u2802",
1192
- postRemaining: color("reset")
1193
- }
1194
- });
1195
- themes.setDefault({}, "ASCII");
1196
- themes.setDefault({ hasColor: !0 }, "colorASCII");
1197
- themes.setDefault({ platform: "darwin", hasUnicode: !0 }, "brailleSpinner");
1198
- themes.setDefault({ platform: "darwin", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner");
1199
- themes.setDefault({ platform: "linux", hasUnicode: !0 }, "brailleSpinner");
1200
- themes.setDefault({ platform: "linux", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner");
1201
- }
1202
- });
1203
-
1204
- // ../../node_modules/gauge/lib/set-interval.js
1205
- var require_set_interval = __commonJS({
1206
- "../../node_modules/gauge/lib/set-interval.js"(exports, module) {
1207
- "use strict";
1208
- module.exports = setInterval;
1209
- }
1210
- });
1211
-
1212
- // ../../node_modules/gauge/lib/process.js
1213
- var require_process = __commonJS({
1214
- "../../node_modules/gauge/lib/process.js"(exports, module) {
1215
- "use strict";
1216
- module.exports = process;
1217
- }
1218
- });
1219
-
1220
- // ../../node_modules/gauge/lib/set-immediate.js
1221
- var require_set_immediate = __commonJS({
1222
- "../../node_modules/gauge/lib/set-immediate.js"(exports, module) {
1223
- "use strict";
1224
- var process2 = require_process();
1225
- try {
1226
- module.exports = setImmediate;
1227
- } catch {
1228
- module.exports = process2.nextTick;
1229
- }
1230
- }
1231
- });
1232
-
1233
- // ../../node_modules/gauge/lib/index.js
1234
- var require_lib2 = __commonJS({
1235
- "../../node_modules/gauge/lib/index.js"(exports, module) {
1236
- "use strict";
1237
- var Plumbing = require_plumbing(), hasUnicode = require_has_unicode(), hasColor = require_has_color(), onExit = require_cjs().onExit, defaultThemes = require_themes(), setInterval2 = require_set_interval(), process2 = require_process(), setImmediate2 = require_set_immediate();
1238
- module.exports = Gauge;
1239
- function callWith(obj, method) {
1240
- return function() {
1241
- return method.call(obj);
1242
- };
1243
- }
1244
- function Gauge(arg1, arg2) {
1245
- var options, writeTo;
1246
- arg1 && arg1.write ? (writeTo = arg1, options = arg2 || {}) : arg2 && arg2.write ? (writeTo = arg2, options = arg1 || {}) : (writeTo = process2.stderr, options = arg1 || arg2 || {}), this._status = {
1247
- spun: 0,
1248
- section: "",
1249
- subsection: ""
1250
- }, this._paused = !1, this._disabled = !0, this._showing = !1, this._onScreen = !1, this._needsRedraw = !1, this._hideCursor = options.hideCursor == null ? !0 : options.hideCursor, this._fixedFramerate = options.fixedFramerate == null ? !/^v0\.8\./.test(process2.version) : options.fixedFramerate, this._lastUpdateAt = null, this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval, this._themes = options.themes || defaultThemes, this._theme = options.theme;
1251
- var theme = this._computeTheme(options.theme), template = options.template || [
1252
- { type: "progressbar", length: 20 },
1253
- { type: "activityIndicator", kerning: 1, length: 1 },
1254
- { type: "section", kerning: 1, default: "" },
1255
- { type: "subsection", kerning: 1, default: "" }
1256
- ];
1257
- this.setWriteTo(writeTo, options.tty);
1258
- var PlumbingClass = options.Plumbing || Plumbing;
1259
- this._gauge = new PlumbingClass(theme, template, this.getWidth()), this._$$doRedraw = callWith(this, this._doRedraw), this._$$handleSizeChange = callWith(this, this._handleSizeChange), this._cleanupOnExit = options.cleanupOnExit == null || options.cleanupOnExit, this._removeOnExit = null, options.enabled || options.enabled == null && this._tty && this._tty.isTTY ? this.enable() : this.disable();
1260
- }
1261
- Gauge.prototype = {};
1262
- Gauge.prototype.isEnabled = function() {
1263
- return !this._disabled;
1264
- };
1265
- Gauge.prototype.setTemplate = function(template) {
1266
- this._gauge.setTemplate(template), this._showing && this._requestRedraw();
1267
- };
1268
- Gauge.prototype._computeTheme = function(theme) {
1269
- if (theme || (theme = {}), typeof theme == "string")
1270
- theme = this._themes.getTheme(theme);
1271
- else if (Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null) {
1272
- var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode, useColor = theme.hasColor == null ? hasColor : theme.hasColor;
1273
- theme = this._themes.getDefault({
1274
- hasUnicode: useUnicode,
1275
- hasColor: useColor,
1276
- platform: theme.platform
1277
- });
1278
- }
1279
- return theme;
1280
- };
1281
- Gauge.prototype.setThemeset = function(themes) {
1282
- this._themes = themes, this.setTheme(this._theme);
1283
- };
1284
- Gauge.prototype.setTheme = function(theme) {
1285
- this._gauge.setTheme(this._computeTheme(theme)), this._showing && this._requestRedraw(), this._theme = theme;
1286
- };
1287
- Gauge.prototype._requestRedraw = function() {
1288
- this._needsRedraw = !0, this._fixedFramerate || this._doRedraw();
1289
- };
1290
- Gauge.prototype.getWidth = function() {
1291
- return (this._tty && this._tty.columns || 80) - 1;
1292
- };
1293
- Gauge.prototype.setWriteTo = function(writeTo, tty) {
1294
- var enabled = !this._disabled;
1295
- enabled && this.disable(), this._writeTo = writeTo, this._tty = tty || writeTo === process2.stderr && process2.stdout.isTTY && process2.stdout || writeTo.isTTY && writeTo || this._tty, this._gauge && this._gauge.setWidth(this.getWidth()), enabled && this.enable();
1296
- };
1297
- Gauge.prototype.enable = function() {
1298
- this._disabled && (this._disabled = !1, this._tty && this._enableEvents(), this._showing && this.show());
1299
- };
1300
- Gauge.prototype.disable = function() {
1301
- this._disabled || (this._showing && (this._lastUpdateAt = null, this._showing = !1, this._doRedraw(), this._showing = !0), this._disabled = !0, this._tty && this._disableEvents());
1302
- };
1303
- Gauge.prototype._enableEvents = function() {
1304
- this._cleanupOnExit && (this._removeOnExit = onExit(callWith(this, this.disable))), this._tty.on("resize", this._$$handleSizeChange), this._fixedFramerate && (this.redrawTracker = setInterval2(this._$$doRedraw, this._updateInterval), this.redrawTracker.unref && this.redrawTracker.unref());
1305
- };
1306
- Gauge.prototype._disableEvents = function() {
1307
- this._tty.removeListener("resize", this._$$handleSizeChange), this._fixedFramerate && clearInterval(this.redrawTracker), this._removeOnExit && this._removeOnExit();
1308
- };
1309
- Gauge.prototype.hide = function(cb) {
1310
- if (this._disabled || !this._showing)
1311
- return cb && process2.nextTick(cb);
1312
- this._showing = !1, this._doRedraw(), cb && setImmediate2(cb);
1313
- };
1314
- Gauge.prototype.show = function(section, completed) {
1315
- if (this._showing = !0, typeof section == "string")
1316
- this._status.section = section;
1317
- else if (typeof section == "object")
1318
- for (var sectionKeys = Object.keys(section), ii = 0; ii < sectionKeys.length; ++ii) {
1319
- var key = sectionKeys[ii];
1320
- this._status[key] = section[key];
1321
- }
1322
- completed != null && (this._status.completed = completed), !this._disabled && this._requestRedraw();
1323
- };
1324
- Gauge.prototype.pulse = function(subsection) {
1325
- this._status.subsection = subsection || "", this._status.spun++, !this._disabled && this._showing && this._requestRedraw();
1326
- };
1327
- Gauge.prototype._handleSizeChange = function() {
1328
- this._gauge.setWidth(this._tty.columns - 1), this._requestRedraw();
1329
- };
1330
- Gauge.prototype._doRedraw = function() {
1331
- if (!(this._disabled || this._paused)) {
1332
- if (!this._fixedFramerate) {
1333
- var now = Date.now();
1334
- if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval)
1335
- return;
1336
- this._lastUpdateAt = now;
1337
- }
1338
- if (!this._showing && this._onScreen) {
1339
- this._onScreen = !1;
1340
- var result = this._gauge.hide();
1341
- return this._hideCursor && (result += this._gauge.showCursor()), this._writeTo.write(result);
1342
- }
1343
- !this._showing && !this._onScreen || (this._showing && !this._onScreen && (this._onScreen = !0, this._needsRedraw = !0, this._hideCursor && this._writeTo.write(this._gauge.hideCursor())), this._needsRedraw && (this._writeTo.write(this._gauge.show(this._status)) || (this._paused = !0, this._writeTo.on("drain", callWith(this, function() {
1344
- this._paused = !1, this._doRedraw();
1345
- })))));
1346
- }
1347
- };
1348
- }
1349
- });
1350
-
1351
- // ../../node_modules/set-blocking/index.js
1352
- var require_set_blocking = __commonJS({
1353
- "../../node_modules/set-blocking/index.js"(exports, module) {
1354
- module.exports = function(blocking) {
1355
- [process.stdout, process.stderr].forEach(function(stream) {
1356
- stream._handle && stream.isTTY && typeof stream._handle.setBlocking == "function" && stream._handle.setBlocking(blocking);
1357
- });
1358
- };
1359
- }
1360
- });
1361
-
1362
- // ../../node_modules/npmlog/lib/log.js
1363
- var require_log = __commonJS({
1364
- "../../node_modules/npmlog/lib/log.js"(exports, module) {
1365
- "use strict";
1366
- var Progress = require_lib(), Gauge = require_lib2(), EE = __require("events").EventEmitter, log2 = exports = module.exports = new EE(), util = __require("util"), setBlocking = require_set_blocking(), consoleControl = require_console_control_strings();
1367
- setBlocking(!0);
1368
- var stream = process.stderr;
1369
- Object.defineProperty(log2, "stream", {
1370
- set: function(newStream) {
1371
- stream = newStream, this.gauge && this.gauge.setWriteTo(stream, stream);
1372
- },
1373
- get: function() {
1374
- return stream;
1375
- }
1376
- });
1377
- var colorEnabled;
1378
- log2.useColor = function() {
1379
- return colorEnabled ?? stream.isTTY;
1380
- };
1381
- log2.enableColor = function() {
1382
- colorEnabled = !0, this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled });
1383
- };
1384
- log2.disableColor = function() {
1385
- colorEnabled = !1, this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled });
1386
- };
1387
- log2.level = "info";
1388
- log2.gauge = new Gauge(stream, {
1389
- enabled: !1,
1390
- // no progress bars unless asked
1391
- theme: { hasColor: log2.useColor() },
1392
- template: [
1393
- { type: "progressbar", length: 20 },
1394
- { type: "activityIndicator", kerning: 1, length: 1 },
1395
- { type: "section", default: "" },
1396
- ":",
1397
- { type: "logline", kerning: 1, default: "" }
1398
- ]
1399
- });
1400
- log2.tracker = new Progress.TrackerGroup();
1401
- log2.progressEnabled = log2.gauge.isEnabled();
1402
- var unicodeEnabled;
1403
- log2.enableUnicode = function() {
1404
- unicodeEnabled = !0, this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled });
1405
- };
1406
- log2.disableUnicode = function() {
1407
- unicodeEnabled = !1, this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled });
1408
- };
1409
- log2.setGaugeThemeset = function(themes) {
1410
- this.gauge.setThemeset(themes);
1411
- };
1412
- log2.setGaugeTemplate = function(template) {
1413
- this.gauge.setTemplate(template);
1414
- };
1415
- log2.enableProgress = function() {
1416
- this.progressEnabled || this._paused || (this.progressEnabled = !0, this.tracker.on("change", this.showProgress), this.gauge.enable());
1417
- };
1418
- log2.disableProgress = function() {
1419
- this.progressEnabled && (this.progressEnabled = !1, this.tracker.removeListener("change", this.showProgress), this.gauge.disable());
1420
- };
1421
- var trackerConstructors = ["newGroup", "newItem", "newStream"], mixinLog = function(tracker) {
1422
- return Object.keys(log2).forEach(function(P2) {
1423
- if (P2[0] !== "_" && !trackerConstructors.filter(function(C) {
1424
- return C === P2;
1425
- }).length && !tracker[P2] && typeof log2[P2] == "function") {
1426
- var func = log2[P2];
1427
- tracker[P2] = function() {
1428
- return func.apply(log2, arguments);
1429
- };
1430
- }
1431
- }), tracker instanceof Progress.TrackerGroup && trackerConstructors.forEach(function(C) {
1432
- var func = tracker[C];
1433
- tracker[C] = function() {
1434
- return mixinLog(func.apply(tracker, arguments));
1435
- };
1436
- }), tracker;
1437
- };
1438
- trackerConstructors.forEach(function(C) {
1439
- log2[C] = function() {
1440
- return mixinLog(this.tracker[C].apply(this.tracker, arguments));
1441
- };
1442
- });
1443
- log2.clearProgress = function(cb) {
1444
- if (!this.progressEnabled)
1445
- return cb && process.nextTick(cb);
1446
- this.gauge.hide(cb);
1447
- };
1448
- log2.showProgress = function(name, completed) {
1449
- if (this.progressEnabled) {
1450
- var values = {};
1451
- name && (values.section = name);
1452
- var last = log2.record[log2.record.length - 1];
1453
- if (last) {
1454
- values.subsection = last.prefix;
1455
- var disp = log2.disp[last.level] || last.level, logline = this._format(disp, log2.style[last.level]);
1456
- last.prefix && (logline += " " + this._format(last.prefix, this.prefixStyle)), logline += " " + last.message.split(/\r?\n/)[0], values.logline = logline;
1457
- }
1458
- values.completed = completed || this.tracker.completed(), this.gauge.show(values);
1459
- }
1460
- }.bind(log2);
1461
- log2.pause = function() {
1462
- this._paused = !0, this.progressEnabled && this.gauge.disable();
1463
- };
1464
- log2.resume = function() {
1465
- if (this._paused) {
1466
- this._paused = !1;
1467
- var b = this._buffer;
1468
- this._buffer = [], b.forEach(function(m) {
1469
- this.emitLog(m);
1470
- }, this), this.progressEnabled && this.gauge.enable();
1471
- }
1472
- };
1473
- log2._buffer = [];
1474
- var id = 0;
1475
- log2.record = [];
1476
- log2.maxRecordSize = 1e4;
1477
- log2.log = function(lvl, prefix, message) {
1478
- var l = this.levels[lvl];
1479
- if (l === void 0)
1480
- return this.emit("error", new Error(util.format(
1481
- "Undefined log level: %j",
1482
- lvl
1483
- )));
1484
- for (var a = new Array(arguments.length - 2), stack = null, i = 2; i < arguments.length; i++) {
1485
- var arg = a[i - 2] = arguments[i];
1486
- typeof arg == "object" && arg instanceof Error && arg.stack && Object.defineProperty(arg, "stack", {
1487
- value: stack = arg.stack + "",
1488
- enumerable: !0,
1489
- writable: !0
1490
- });
1491
- }
1492
- stack && a.unshift(stack + `
1493
- `), message = util.format.apply(util, a);
1494
- var m = {
1495
- id: id++,
1496
- level: lvl,
1497
- prefix: String(prefix || ""),
1498
- message,
1499
- messageRaw: a
1500
- };
1501
- this.emit("log", m), this.emit("log." + lvl, m), m.prefix && this.emit(m.prefix, m), this.record.push(m);
1502
- var mrs = this.maxRecordSize, n = this.record.length - mrs;
1503
- if (n > mrs / 10) {
1504
- var newSize = Math.floor(mrs * 0.9);
1505
- this.record = this.record.slice(-1 * newSize);
1506
- }
1507
- this.emitLog(m);
1508
- }.bind(log2);
1509
- log2.emitLog = function(m) {
1510
- if (this._paused) {
1511
- this._buffer.push(m);
1512
- return;
1513
- }
1514
- this.progressEnabled && this.gauge.pulse(m.prefix);
1515
- var l = this.levels[m.level];
1516
- if (l !== void 0 && !(l < this.levels[this.level]) && !(l > 0 && !isFinite(l))) {
1517
- var disp = log2.disp[m.level] != null ? log2.disp[m.level] : m.level;
1518
- this.clearProgress(), m.message.split(/\r?\n/).forEach(function(line) {
1519
- var heading = this.heading;
1520
- heading && (this.write(heading, this.headingStyle), this.write(" ")), this.write(disp, log2.style[m.level]);
1521
- var p = m.prefix || "";
1522
- p && this.write(" "), this.write(p, this.prefixStyle), this.write(" " + line + `
1523
- `);
1524
- }, this), this.showProgress();
1525
- }
1526
- };
1527
- log2._format = function(msg, style) {
1528
- if (stream) {
1529
- var output = "";
1530
- if (this.useColor()) {
1531
- style = style || {};
1532
- var settings = [];
1533
- style.fg && settings.push(style.fg), style.bg && settings.push("bg" + style.bg[0].toUpperCase() + style.bg.slice(1)), style.bold && settings.push("bold"), style.underline && settings.push("underline"), style.inverse && settings.push("inverse"), settings.length && (output += consoleControl.color(settings)), style.beep && (output += consoleControl.beep());
1534
- }
1535
- return output += msg, this.useColor() && (output += consoleControl.color("reset")), output;
1536
- }
1537
- };
1538
- log2.write = function(msg, style) {
1539
- stream && stream.write(this._format(msg, style));
1540
- };
1541
- log2.addLevel = function(lvl, n, style, disp) {
1542
- disp == null && (disp = lvl), this.levels[lvl] = n, this.style[lvl] = style, this[lvl] || (this[lvl] = function() {
1543
- var a = new Array(arguments.length + 1);
1544
- a[0] = lvl;
1545
- for (var i = 0; i < arguments.length; i++)
1546
- a[i + 1] = arguments[i];
1547
- return this.log.apply(this, a);
1548
- }.bind(this)), this.disp[lvl] = disp;
1549
- };
1550
- log2.prefixStyle = { fg: "magenta" };
1551
- log2.headingStyle = { fg: "white", bg: "black" };
1552
- log2.style = {};
1553
- log2.levels = {};
1554
- log2.disp = {};
1555
- log2.addLevel("silly", -1 / 0, { inverse: !0 }, "sill");
1556
- log2.addLevel("verbose", 1e3, { fg: "cyan", bg: "black" }, "verb");
1557
- log2.addLevel("info", 2e3, { fg: "green" });
1558
- log2.addLevel("timing", 2500, { fg: "green", bg: "black" });
1559
- log2.addLevel("http", 3e3, { fg: "green", bg: "black" });
1560
- log2.addLevel("notice", 3500, { fg: "cyan", bg: "black" });
1561
- log2.addLevel("warn", 4e3, { fg: "black", bg: "yellow" }, "WARN");
1562
- log2.addLevel("error", 5e3, { fg: "red", bg: "black" }, "ERR!");
1563
- log2.addLevel("silent", 1 / 0);
1564
- log2.on("error", function() {
1565
- });
1566
- }
1567
- });
1568
-
1569
- // ../../node_modules/pretty-hrtime/index.js
1570
- var require_pretty_hrtime = __commonJS({
1571
- "../../node_modules/pretty-hrtime/index.js"(exports, module) {
1572
- "use strict";
1573
- var minimalDesc = ["h", "min", "s", "ms", "\u03BCs", "ns"], verboseDesc = ["hour", "minute", "second", "millisecond", "microsecond", "nanosecond"], convert = [3600, 60, 1, 1e6, 1e3, 1];
1574
- module.exports = function(source, opts) {
1575
- var verbose, precise, i, spot, sourceAtStep, valAtStep, decimals, strAtStep, results, totalSeconds;
1576
- if (verbose = !1, precise = !1, opts && (verbose = opts.verbose || !1, precise = opts.precise || !1), !Array.isArray(source) || source.length !== 2 || typeof source[0] != "number" || typeof source[1] != "number")
1577
- return "";
1578
- for (source[1] < 0 && (totalSeconds = source[0] + source[1] / 1e9, source[0] = parseInt(totalSeconds), source[1] = parseFloat((totalSeconds % 1).toPrecision(9)) * 1e9), results = "", i = 0; i < 6 && (spot = i < 3 ? 0 : 1, sourceAtStep = source[spot], i !== 3 && i !== 0 && (sourceAtStep = sourceAtStep % convert[i - 1]), i === 2 && (sourceAtStep += source[1] / 1e9), valAtStep = sourceAtStep / convert[i], !(valAtStep >= 1 && (verbose && (valAtStep = Math.floor(valAtStep)), precise ? strAtStep = valAtStep.toString() : (decimals = valAtStep >= 10 ? 0 : 2, strAtStep = valAtStep.toFixed(decimals)), strAtStep.indexOf(".") > -1 && strAtStep[strAtStep.length - 1] === "0" && (strAtStep = strAtStep.replace(/\.?0+$/, "")), results && (results += " "), results += strAtStep, verbose ? (results += " " + verboseDesc[i], strAtStep !== "1" && (results += "s")) : results += " " + minimalDesc[i], !verbose))); i++)
1579
- ;
1580
- return results;
1581
- };
1582
- }
1583
- });
1584
-
1585
- // ../../node_modules/sisteransi/src/index.js
1586
- var require_src = __commonJS({
1587
- "../../node_modules/sisteransi/src/index.js"(exports, module) {
1588
- "use strict";
1589
- var cursor = {
1590
- to(x3, y2) {
1591
- return y2 ? `\x1B[${y2 + 1};${x3 + 1}H` : `\x1B[${x3 + 1}G`;
1592
- },
1593
- move(x3, y2) {
1594
- let ret = "";
1595
- return x3 < 0 ? ret += `\x1B[${-x3}D` : x3 > 0 && (ret += `\x1B[${x3}C`), y2 < 0 ? ret += `\x1B[${-y2}A` : y2 > 0 && (ret += `\x1B[${y2}B`), ret;
1596
- },
1597
- up: (count = 1) => `\x1B[${count}A`,
1598
- down: (count = 1) => `\x1B[${count}B`,
1599
- forward: (count = 1) => `\x1B[${count}C`,
1600
- backward: (count = 1) => `\x1B[${count}D`,
1601
- nextLine: (count = 1) => "\x1B[E".repeat(count),
1602
- prevLine: (count = 1) => "\x1B[F".repeat(count),
1603
- left: "\x1B[G",
1604
- hide: "\x1B[?25l",
1605
- show: "\x1B[?25h",
1606
- save: "\x1B7",
1607
- restore: "\x1B8"
1608
- }, scroll = {
1609
- up: (count = 1) => "\x1B[S".repeat(count),
1610
- down: (count = 1) => "\x1B[T".repeat(count)
1611
- }, erase = {
1612
- screen: "\x1B[2J",
1613
- up: (count = 1) => "\x1B[1J".repeat(count),
1614
- down: (count = 1) => "\x1B[J".repeat(count),
1615
- line: "\x1B[2K",
1616
- lineEnd: "\x1B[K",
1617
- lineStart: "\x1B[1K",
1618
- lines(count) {
1619
- let clear = "";
1620
- for (let i = 0; i < count; i++)
1621
- clear += this.line + (i < count - 1 ? cursor.up() : "");
1622
- return count && (clear += cursor.left), clear;
1623
- }
1624
- };
1625
- module.exports = { cursor, scroll, erase, beep: "\x07" };
1626
- }
1627
- });
1628
-
1629
- // ../../node_modules/emoji-regex/index.js
1630
- var require_emoji_regex3 = __commonJS({
1631
- "../../node_modules/emoji-regex/index.js"(exports, module) {
1632
- module.exports = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\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](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
1633
- }
1634
- });
1635
-
1636
- // src/node-logger/index.ts
1637
- var import_npmlog = __toESM(require_log(), 1), import_pretty_hrtime = __toESM(require_pretty_hrtime(), 1);
1638
-
1639
- // src/node-logger/logger/logger.ts
1640
- var logger_exports = {};
1641
- __export(logger_exports, {
1642
- SYMBOLS: () => SYMBOLS,
1643
- debug: () => debug,
1644
- error: () => error,
1645
- getLogLevel: () => getLogLevel,
1646
- info: () => info,
1647
- intro: () => intro,
1648
- log: () => log,
1649
- logBox: () => logBox,
1650
- outro: () => outro,
1651
- setLogLevel: () => setLogLevel,
1652
- shouldLog: () => shouldLog,
1653
- step: () => step,
1654
- warn: () => warn,
1655
- wrapTextForClack: () => wrapTextForClack
1656
- });
1657
-
1658
- // ../../node_modules/@clack/core/dist/index.mjs
1659
- var import_picocolors = __toESM(require_picocolors(), 1), import_sisteransi = __toESM(require_src(), 1);
1660
- import { stdout as R, stdin as q } from "node:process";
1661
- import * as k from "node:readline";
1662
- import ot from "node:readline";
1663
- import { ReadStream as J } from "node:tty";
1664
- var at = (t2) => t2 === 161 || t2 === 164 || t2 === 167 || t2 === 168 || t2 === 170 || t2 === 173 || t2 === 174 || t2 >= 176 && t2 <= 180 || t2 >= 182 && t2 <= 186 || t2 >= 188 && t2 <= 191 || t2 === 198 || t2 === 208 || t2 === 215 || t2 === 216 || t2 >= 222 && t2 <= 225 || t2 === 230 || t2 >= 232 && t2 <= 234 || t2 === 236 || t2 === 237 || t2 === 240 || t2 === 242 || t2 === 243 || t2 >= 247 && t2 <= 250 || t2 === 252 || t2 === 254 || t2 === 257 || t2 === 273 || t2 === 275 || t2 === 283 || t2 === 294 || t2 === 295 || t2 === 299 || t2 >= 305 && t2 <= 307 || t2 === 312 || t2 >= 319 && t2 <= 322 || t2 === 324 || t2 >= 328 && t2 <= 331 || t2 === 333 || t2 === 338 || t2 === 339 || t2 === 358 || t2 === 359 || t2 === 363 || t2 === 462 || t2 === 464 || t2 === 466 || t2 === 468 || t2 === 470 || t2 === 472 || t2 === 474 || t2 === 476 || t2 === 593 || t2 === 609 || t2 === 708 || t2 === 711 || t2 >= 713 && t2 <= 715 || t2 === 717 || t2 === 720 || t2 >= 728 && t2 <= 731 || t2 === 733 || t2 === 735 || t2 >= 768 && t2 <= 879 || t2 >= 913 && t2 <= 929 || t2 >= 931 && t2 <= 937 || t2 >= 945 && t2 <= 961 || t2 >= 963 && t2 <= 969 || t2 === 1025 || t2 >= 1040 && t2 <= 1103 || t2 === 1105 || t2 === 8208 || t2 >= 8211 && t2 <= 8214 || t2 === 8216 || t2 === 8217 || t2 === 8220 || t2 === 8221 || t2 >= 8224 && t2 <= 8226 || t2 >= 8228 && t2 <= 8231 || t2 === 8240 || t2 === 8242 || t2 === 8243 || t2 === 8245 || t2 === 8251 || t2 === 8254 || t2 === 8308 || t2 === 8319 || t2 >= 8321 && t2 <= 8324 || t2 === 8364 || t2 === 8451 || t2 === 8453 || t2 === 8457 || t2 === 8467 || t2 === 8470 || t2 === 8481 || t2 === 8482 || t2 === 8486 || t2 === 8491 || t2 === 8531 || t2 === 8532 || t2 >= 8539 && t2 <= 8542 || t2 >= 8544 && t2 <= 8555 || t2 >= 8560 && t2 <= 8569 || t2 === 8585 || t2 >= 8592 && t2 <= 8601 || t2 === 8632 || t2 === 8633 || t2 === 8658 || t2 === 8660 || t2 === 8679 || t2 === 8704 || t2 === 8706 || t2 === 8707 || t2 === 8711 || t2 === 8712 || t2 === 8715 || t2 === 8719 || t2 === 8721 || t2 === 8725 || t2 === 8730 || t2 >= 8733 && t2 <= 8736 || t2 === 8739 || t2 === 8741 || t2 >= 8743 && t2 <= 8748 || t2 === 8750 || t2 >= 8756 && t2 <= 8759 || t2 === 8764 || t2 === 8765 || t2 === 8776 || t2 === 8780 || t2 === 8786 || t2 === 8800 || t2 === 8801 || t2 >= 8804 && t2 <= 8807 || t2 === 8810 || t2 === 8811 || t2 === 8814 || t2 === 8815 || t2 === 8834 || t2 === 8835 || t2 === 8838 || t2 === 8839 || t2 === 8853 || t2 === 8857 || t2 === 8869 || t2 === 8895 || t2 === 8978 || t2 >= 9312 && t2 <= 9449 || t2 >= 9451 && t2 <= 9547 || t2 >= 9552 && t2 <= 9587 || t2 >= 9600 && t2 <= 9615 || t2 >= 9618 && t2 <= 9621 || t2 === 9632 || t2 === 9633 || t2 >= 9635 && t2 <= 9641 || t2 === 9650 || t2 === 9651 || t2 === 9654 || t2 === 9655 || t2 === 9660 || t2 === 9661 || t2 === 9664 || t2 === 9665 || t2 >= 9670 && t2 <= 9672 || t2 === 9675 || t2 >= 9678 && t2 <= 9681 || t2 >= 9698 && t2 <= 9701 || t2 === 9711 || t2 === 9733 || t2 === 9734 || t2 === 9737 || t2 === 9742 || t2 === 9743 || t2 === 9756 || t2 === 9758 || t2 === 9792 || t2 === 9794 || t2 === 9824 || t2 === 9825 || t2 >= 9827 && t2 <= 9829 || t2 >= 9831 && t2 <= 9834 || t2 === 9836 || t2 === 9837 || t2 === 9839 || t2 === 9886 || t2 === 9887 || t2 === 9919 || t2 >= 9926 && t2 <= 9933 || t2 >= 9935 && t2 <= 9939 || t2 >= 9941 && t2 <= 9953 || t2 === 9955 || t2 === 9960 || t2 === 9961 || t2 >= 9963 && t2 <= 9969 || t2 === 9972 || t2 >= 9974 && t2 <= 9977 || t2 === 9979 || t2 === 9980 || t2 === 9982 || t2 === 9983 || t2 === 10045 || t2 >= 10102 && t2 <= 10111 || t2 >= 11094 && t2 <= 11097 || t2 >= 12872 && t2 <= 12879 || t2 >= 57344 && t2 <= 63743 || t2 >= 65024 && t2 <= 65039 || t2 === 65533 || t2 >= 127232 && t2 <= 127242 || t2 >= 127248 && t2 <= 127277 || t2 >= 127280 && t2 <= 127337 || t2 >= 127344 && t2 <= 127373 || t2 === 127375 || t2 === 127376 || t2 >= 127387 && t2 <= 127404 || t2 >= 917760 && t2 <= 917999 || t2 >= 983040 && t2 <= 1048573 || t2 >= 1048576 && t2 <= 1114109, lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510, ht = (t2) => t2 >= 4352 && t2 <= 4447 || t2 === 8986 || t2 === 8987 || t2 === 9001 || t2 === 9002 || t2 >= 9193 && t2 <= 9196 || t2 === 9200 || t2 === 9203 || t2 === 9725 || t2 === 9726 || t2 === 9748 || t2 === 9749 || t2 >= 9800 && t2 <= 9811 || t2 === 9855 || t2 === 9875 || t2 === 9889 || t2 === 9898 || t2 === 9899 || t2 === 9917 || t2 === 9918 || t2 === 9924 || t2 === 9925 || t2 === 9934 || t2 === 9940 || t2 === 9962 || t2 === 9970 || t2 === 9971 || t2 === 9973 || t2 === 9978 || t2 === 9981 || t2 === 9989 || t2 === 9994 || t2 === 9995 || t2 === 10024 || t2 === 10060 || t2 === 10062 || t2 >= 10067 && t2 <= 10069 || t2 === 10071 || t2 >= 10133 && t2 <= 10135 || t2 === 10160 || t2 === 10175 || t2 === 11035 || t2 === 11036 || t2 === 11088 || t2 === 11093 || t2 >= 11904 && t2 <= 11929 || t2 >= 11931 && t2 <= 12019 || t2 >= 12032 && t2 <= 12245 || t2 >= 12272 && t2 <= 12287 || t2 >= 12289 && t2 <= 12350 || t2 >= 12353 && t2 <= 12438 || t2 >= 12441 && t2 <= 12543 || t2 >= 12549 && t2 <= 12591 || t2 >= 12593 && t2 <= 12686 || t2 >= 12688 && t2 <= 12771 || t2 >= 12783 && t2 <= 12830 || t2 >= 12832 && t2 <= 12871 || t2 >= 12880 && t2 <= 19903 || t2 >= 19968 && t2 <= 42124 || t2 >= 42128 && t2 <= 42182 || t2 >= 43360 && t2 <= 43388 || t2 >= 44032 && t2 <= 55203 || t2 >= 63744 && t2 <= 64255 || t2 >= 65040 && t2 <= 65049 || t2 >= 65072 && t2 <= 65106 || t2 >= 65108 && t2 <= 65126 || t2 >= 65128 && t2 <= 65131 || t2 >= 94176 && t2 <= 94180 || t2 === 94192 || t2 === 94193 || t2 >= 94208 && t2 <= 100343 || t2 >= 100352 && t2 <= 101589 || t2 >= 101632 && t2 <= 101640 || t2 >= 110576 && t2 <= 110579 || t2 >= 110581 && t2 <= 110587 || t2 === 110589 || t2 === 110590 || t2 >= 110592 && t2 <= 110882 || t2 === 110898 || t2 >= 110928 && t2 <= 110930 || t2 === 110933 || t2 >= 110948 && t2 <= 110951 || t2 >= 110960 && t2 <= 111355 || t2 === 126980 || t2 === 127183 || t2 === 127374 || t2 >= 127377 && t2 <= 127386 || t2 >= 127488 && t2 <= 127490 || t2 >= 127504 && t2 <= 127547 || t2 >= 127552 && t2 <= 127560 || t2 === 127568 || t2 === 127569 || t2 >= 127584 && t2 <= 127589 || t2 >= 127744 && t2 <= 127776 || t2 >= 127789 && t2 <= 127797 || t2 >= 127799 && t2 <= 127868 || t2 >= 127870 && t2 <= 127891 || t2 >= 127904 && t2 <= 127946 || t2 >= 127951 && t2 <= 127955 || t2 >= 127968 && t2 <= 127984 || t2 === 127988 || t2 >= 127992 && t2 <= 128062 || t2 === 128064 || t2 >= 128066 && t2 <= 128252 || t2 >= 128255 && t2 <= 128317 || t2 >= 128331 && t2 <= 128334 || t2 >= 128336 && t2 <= 128359 || t2 === 128378 || t2 === 128405 || t2 === 128406 || t2 === 128420 || t2 >= 128507 && t2 <= 128591 || t2 >= 128640 && t2 <= 128709 || t2 === 128716 || t2 >= 128720 && t2 <= 128722 || t2 >= 128725 && t2 <= 128727 || t2 >= 128732 && t2 <= 128735 || t2 === 128747 || t2 === 128748 || t2 >= 128756 && t2 <= 128764 || t2 >= 128992 && t2 <= 129003 || t2 === 129008 || t2 >= 129292 && t2 <= 129338 || t2 >= 129340 && t2 <= 129349 || t2 >= 129351 && t2 <= 129535 || t2 >= 129648 && t2 <= 129660 || t2 >= 129664 && t2 <= 129672 || t2 >= 129680 && t2 <= 129725 || t2 >= 129727 && t2 <= 129733 || t2 >= 129742 && t2 <= 129755 || t2 >= 129760 && t2 <= 129768 || t2 >= 129776 && t2 <= 129784 || t2 >= 131072 && t2 <= 196605 || t2 >= 196608 && t2 <= 262141, O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, M = /\t{1,1000}/y, P = new RegExp("[\\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?))*", "yu"), L = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, ct = new RegExp("\\p{M}+", "gu"), Ft = { limit: 1 / 0, ellipsis: "" }, X = (t2, e = {}, s = {}) => {
1665
- let i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, Ft, s).width : 0), o = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V2 = s.wideWidth ?? 2, h = 0, u = 0, f = t2.length, v = 0, p = !1, d2 = f, b = Math.max(0, i - n), C = 0, B = 0, c = 0, F = 0;
1666
- t: for (; ; ) {
1667
- if (B > C || u >= f && u > h) {
1668
- let ut = t2.slice(C, B) || t2.slice(h, u);
1669
- v = 0;
1670
- for (let Y2 of ut.replaceAll(ct, "")) {
1671
- let $ = Y2.codePointAt(0) || 0;
1672
- if (lt($) ? F = m : ht($) ? F = V2 : E !== A && at($) ? F = E : F = A, c + F > b && (d2 = Math.min(d2, Math.max(C, h) + v)), c + F > i) {
1673
- p = !0;
1674
- break t;
1675
- }
1676
- v += Y2.length, c += F;
1677
- }
1678
- C = B = 0;
1679
- }
1680
- if (u >= f) break;
1681
- if (L.lastIndex = u, L.test(t2)) {
1682
- if (v = L.lastIndex - u, F = v * A, c + F > b && (d2 = Math.min(d2, u + Math.floor((b - c) / A))), c + F > i) {
1683
- p = !0;
1684
- break;
1685
- }
1686
- c += F, C = h, B = u, u = h = L.lastIndex;
1687
- continue;
1688
- }
1689
- if (O.lastIndex = u, O.test(t2)) {
1690
- if (c + o > b && (d2 = Math.min(d2, u)), c + o > i) {
1691
- p = !0;
1692
- break;
1693
- }
1694
- c += o, C = h, B = u, u = h = O.lastIndex;
1695
- continue;
1696
- }
1697
- if (y.lastIndex = u, y.test(t2)) {
1698
- if (v = y.lastIndex - u, F = v * a, c + F > b && (d2 = Math.min(d2, u + Math.floor((b - c) / a))), c + F > i) {
1699
- p = !0;
1700
- break;
1701
- }
1702
- c += F, C = h, B = u, u = h = y.lastIndex;
1703
- continue;
1704
- }
1705
- if (M.lastIndex = u, M.test(t2)) {
1706
- if (v = M.lastIndex - u, F = v * l, c + F > b && (d2 = Math.min(d2, u + Math.floor((b - c) / l))), c + F > i) {
1707
- p = !0;
1708
- break;
1709
- }
1710
- c += F, C = h, B = u, u = h = M.lastIndex;
1711
- continue;
1712
- }
1713
- if (P.lastIndex = u, P.test(t2)) {
1714
- if (c + g > b && (d2 = Math.min(d2, u)), c + g > i) {
1715
- p = !0;
1716
- break;
1717
- }
1718
- c += g, C = h, B = u, u = h = P.lastIndex;
1719
- continue;
1720
- }
1721
- u += 1;
1722
- }
1723
- return { width: p ? b : c, index: p ? d2 : f, truncated: p, ellipsed: p && i >= n };
1724
- }, ft = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, S = (t2, e = {}) => X(t2, ft, e).width, W = "\x1B", Z = "\x9B", pt = 39, j = "\x07", Q = "[", dt = "]", tt = "m", U = `${dt}8;;`, et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y"), mt = (t2) => {
1725
- if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
1726
- if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
1727
- if (t2 === 1 || t2 === 2) return 22;
1728
- if (t2 === 3) return 23;
1729
- if (t2 === 4) return 24;
1730
- if (t2 === 7) return 27;
1731
- if (t2 === 8) return 28;
1732
- if (t2 === 9) return 29;
1733
- if (t2 === 0) return 0;
1734
- }, st = (t2) => `${W}${Q}${t2}${tt}`, it = (t2) => `${W}${U}${t2}${j}`, gt = (t2) => t2.map((e) => S(e)), G = (t2, e, s) => {
1735
- let i = e[Symbol.iterator](), r = !1, n = !1, o = t2.at(-1), a = o === void 0 ? 0 : S(o), l = i.next(), E = i.next(), g = 0;
1736
- for (; !l.done; ) {
1737
- let m = l.value, A = S(m);
1738
- a + A <= s ? t2[t2.length - 1] += m : (t2.push(m), a = 0), (m === W || m === Z) && (r = !0, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = !1, n = !1) : m === tt && (r = !1) : (a += A, a === s && !E.done && (t2.push(""), a = 0)), l = E, E = i.next(), g += m.length;
1739
- }
1740
- o = t2.at(-1), !a && o !== void 0 && o.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
1741
- }, vt = (t2) => {
1742
- let e = t2.split(" "), s = e.length;
1743
- for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
1744
- return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
1745
- }, Et = (t2, e, s = {}) => {
1746
- if (s.trim !== !1 && t2.trim() === "") return "";
1747
- let i = "", r, n, o = t2.split(" "), a = gt(o), l = [""];
1748
- for (let [h, u] of o.entries()) {
1749
- s.trim !== !1 && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
1750
- let f = S(l.at(-1) ?? "");
1751
- if (h !== 0 && (f >= e && (s.wordWrap === !1 || s.trim === !1) && (l.push(""), f = 0), (f > 0 || s.trim === !1) && (l[l.length - 1] += " ", f++)), s.hard && a[h] > e) {
1752
- let v = e - f, p = 1 + Math.floor((a[h] - v - 1) / e);
1753
- Math.floor((a[h] - 1) / e) < p && l.push(""), G(l, u, e);
1754
- continue;
1755
- }
1756
- if (f + a[h] > e && f > 0 && a[h] > 0) {
1757
- if (s.wordWrap === !1 && f < e) {
1758
- G(l, u, e);
1759
- continue;
1760
- }
1761
- l.push("");
1762
- }
1763
- if (f + a[h] > e && s.wordWrap === !1) {
1764
- G(l, u, e);
1765
- continue;
1766
- }
1767
- l[l.length - 1] += u;
1768
- }
1769
- s.trim !== !1 && (l = l.map((h) => vt(h)));
1770
- let E = l.join(`
1771
- `), g = E[Symbol.iterator](), m = g.next(), A = g.next(), V2 = 0;
1772
- for (; !m.done; ) {
1773
- let h = m.value, u = A.value;
1774
- if (i += h, h === W || h === Z) {
1775
- et.lastIndex = V2 + 1;
1776
- let p = et.exec(E)?.groups;
1777
- if (p?.code !== void 0) {
1778
- let d2 = Number.parseFloat(p.code);
1779
- r = d2 === pt ? void 0 : d2;
1780
- } else p?.uri !== void 0 && (n = p.uri.length === 0 ? void 0 : p.uri);
1781
- }
1782
- let f = r ? mt(r) : void 0;
1783
- u === `
1784
- ` ? (n && (i += it("")), r && f && (i += st(f))) : h === `
1785
- ` && (r && f && (i += st(r)), n && (i += it(n))), V2 += h.length, m = A, A = g.next();
1786
- }
1787
- return i;
1788
- };
1789
- function K(t2, e, s) {
1790
- return String(t2).normalize().replaceAll(`\r
1791
- `, `
1792
- `).split(`
1793
- `).map((i) => Et(i, e, s)).join(`
1794
- `);
1795
- }
1796
- var At = ["up", "down", "left", "right", "space", "enter", "cancel"], _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: !0 };
1797
- function H(t2, e) {
1798
- if (typeof t2 == "string") return _.aliases.get(t2) === e;
1799
- for (let s of t2) if (s !== void 0 && H(s, e)) return !0;
1800
- return !1;
1801
- }
1802
- function _t(t2, e) {
1803
- if (t2 === e) return;
1804
- let s = t2.split(`
1805
- `), i = e.split(`
1806
- `), r = Math.max(s.length, i.length), n = [];
1807
- for (let o = 0; o < r; o++) s[o] !== i[o] && n.push(o);
1808
- return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
1809
- }
1810
- var bt = globalThis.process.platform.startsWith("win"), z = /* @__PURE__ */ Symbol("clack:cancel");
1811
- function Ct(t2) {
1812
- return t2 === z;
1813
- }
1814
- function T(t2, e) {
1815
- let s = t2;
1816
- s.isTTY && s.setRawMode(e);
1817
- }
1818
- function xt({ input: t2 = q, output: e = R, overwrite: s = !0, hideCursor: i = !0 } = {}) {
1819
- let r = k.createInterface({ input: t2, output: e, prompt: "", tabSize: 1 });
1820
- k.emitKeypressEvents(t2, r), t2 instanceof J && t2.isTTY && t2.setRawMode(!0);
1821
- let n = (o, { name: a, sequence: l }) => {
1822
- let E = String(o);
1823
- if (H([E, a, l], "cancel")) {
1824
- i && e.write(import_sisteransi.cursor.show), process.exit(0);
1825
- return;
1826
- }
1827
- if (!s) return;
1828
- k.moveCursor(e, a === "return" ? 0 : -1, a === "return" ? -1 : 0, () => {
1829
- k.clearLine(e, 1, () => {
1830
- t2.once("keypress", n);
1831
- });
1832
- });
1833
- };
1834
- return i && e.write(import_sisteransi.cursor.hide), t2.once("keypress", n), () => {
1835
- t2.off("keypress", n), i && e.write(import_sisteransi.cursor.show), t2 instanceof J && t2.isTTY && !bt && t2.setRawMode(!1), r.terminal = !1, r.close();
1836
- };
1837
- }
1838
- var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80, nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
1839
- function Bt(t2, e, s, i = s) {
1840
- let r = rt(t2 ?? R);
1841
- return K(e, r - s.length, { hard: !0, trim: !1 }).split(`
1842
- `).map((n, o) => `${o === 0 ? i : s}${n}`).join(`
1843
- `);
1844
- }
1845
- var x = class {
1846
- input;
1847
- output;
1848
- _abortSignal;
1849
- rl;
1850
- opts;
1851
- _render;
1852
- _track = !1;
1853
- _prevFrame = "";
1854
- _subscribers = /* @__PURE__ */ new Map();
1855
- _cursor = 0;
1856
- state = "initial";
1857
- error = "";
1858
- value;
1859
- userInput = "";
1860
- constructor(e, s = !0) {
1861
- let { input: i = q, output: r = R, render: n, signal: o, ...a } = e;
1862
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = o, this.input = i, this.output = r;
1863
- }
1864
- unsubscribe() {
1865
- this._subscribers.clear();
1866
- }
1867
- setSubscriber(e, s) {
1868
- let i = this._subscribers.get(e) ?? [];
1869
- i.push(s), this._subscribers.set(e, i);
1870
- }
1871
- on(e, s) {
1872
- this.setSubscriber(e, { cb: s });
1873
- }
1874
- once(e, s) {
1875
- this.setSubscriber(e, { cb: s, once: !0 });
1876
- }
1877
- emit(e, ...s) {
1878
- let i = this._subscribers.get(e) ?? [], r = [];
1879
- for (let n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
1880
- for (let n of r) n();
1881
- }
1882
- prompt() {
1883
- return new Promise((e) => {
1884
- if (this._abortSignal) {
1885
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
1886
- this._abortSignal.addEventListener("abort", () => {
1887
- this.state = "cancel", this.close();
1888
- }, { once: !0 });
1889
- }
1890
- this.rl = ot.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), T(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
1891
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), T(this.input, !1), e(this.value);
1892
- }), this.once("cancel", () => {
1893
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), T(this.input, !1), e(z);
1894
- });
1895
- });
1896
- }
1897
- _isActionKey(e, s) {
1898
- return e === " ";
1899
- }
1900
- _setValue(e) {
1901
- this.value = e, this.emit("value", this.value);
1902
- }
1903
- _setUserInput(e, s) {
1904
- this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
1905
- }
1906
- _clearUserInput() {
1907
- this.rl?.write(null, { ctrl: !0, name: "u" }), this._setUserInput("");
1908
- }
1909
- onKeypress(e, s) {
1910
- if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && 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"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e && (e.toLowerCase() === "y" || e.toLowerCase() === "n") && this.emit("confirm", e.toLowerCase() === "y"), this.emit("key", e?.toLowerCase(), s), s?.name === "return") {
1911
- if (this.opts.validate) {
1912
- let i = this.opts.validate(this.value);
1913
- i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
1914
- }
1915
- this.state !== "error" && (this.state = "submit");
1916
- }
1917
- H([e, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
1918
- }
1919
- close() {
1920
- this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
1921
- `), T(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
1922
- }
1923
- restoreCursor() {
1924
- let e = K(this._prevFrame, process.stdout.columns, { hard: !0, trim: !1 }).split(`
1925
- `).length - 1;
1926
- this.output.write(import_sisteransi.cursor.move(-999, e * -1));
1927
- }
1928
- render() {
1929
- let e = K(this._render(this) ?? "", process.stdout.columns, { hard: !0, trim: !1 });
1930
- if (e !== this._prevFrame) {
1931
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
1932
- else {
1933
- let s = _t(this._prevFrame, e), i = nt(this.output);
1934
- if (this.restoreCursor(), s) {
1935
- let r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i), o = s.lines.find((a) => a >= r);
1936
- if (o === void 0) {
1937
- this._prevFrame = e;
1938
- return;
1939
- }
1940
- if (s.lines.length === 1) {
1941
- this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
1942
- let a = e.split(`
1943
- `);
1944
- this.output.write(a[o]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
1945
- return;
1946
- } else if (s.lines.length > 1) {
1947
- if (r < n) o = r;
1948
- else {
1949
- let l = o - n;
1950
- l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
1951
- }
1952
- this.output.write(import_sisteransi.erase.down());
1953
- let a = e.split(`
1954
- `).slice(o);
1955
- this.output.write(a.join(`
1956
- `)), this._prevFrame = e;
1957
- return;
1958
- }
1959
- }
1960
- this.output.write(import_sisteransi.erase.down());
1961
- }
1962
- this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
1963
- }
1964
- }
1965
- };
1966
- var kt = class extends x {
1967
- get cursor() {
1968
- return this.value ? 0 : 1;
1969
- }
1970
- get _value() {
1971
- return this.cursor === 0;
1972
- }
1973
- constructor(e) {
1974
- super(e, !1), this.value = !!e.initialValue, this.on("userInput", () => {
1975
- this.value = this._value;
1976
- }), this.on("confirm", (s) => {
1977
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
1978
- }), this.on("cursor", () => {
1979
- this.value = !this.value;
1980
- });
1981
- }
1982
- };
1983
- function D(t2, e, s) {
1984
- let i = t2 + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
1985
- return s[n].disabled ? D(n, e < 0 ? -1 : 1, s) : n;
1986
- }
1987
- var Mt = class extends x {
1988
- options;
1989
- cursor = 0;
1990
- get _value() {
1991
- return this.options[this.cursor].value;
1992
- }
1993
- get _enabledOptions() {
1994
- return this.options.filter((e) => e.disabled !== !0);
1995
- }
1996
- toggleAll() {
1997
- let e = this._enabledOptions, s = this.value !== void 0 && this.value.length === e.length;
1998
- this.value = s ? [] : e.map((i) => i.value);
1999
- }
2000
- toggleInvert() {
2001
- let e = this.value;
2002
- if (!e) return;
2003
- let s = this._enabledOptions.filter((i) => !e.includes(i.value));
2004
- this.value = s.map((i) => i.value);
2005
- }
2006
- toggleValue() {
2007
- this.value === void 0 && (this.value = []);
2008
- let e = this.value.includes(this._value);
2009
- this.value = e ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
2010
- }
2011
- constructor(e) {
2012
- super(e, !1), this.options = e.options, this.value = [...e.initialValues ?? []];
2013
- let s = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), 0);
2014
- this.cursor = this.options[s].disabled ? D(s, 1, this.options) : s, this.on("key", (i) => {
2015
- i === "a" && this.toggleAll(), i === "i" && this.toggleInvert();
2016
- }), this.on("cursor", (i) => {
2017
- switch (i) {
2018
- case "left":
2019
- case "up":
2020
- this.cursor = D(this.cursor, -1, this.options);
2021
- break;
2022
- case "down":
2023
- case "right":
2024
- this.cursor = D(this.cursor, 1, this.options);
2025
- break;
2026
- case "space":
2027
- this.toggleValue();
2028
- break;
2029
- }
2030
- });
2031
- }
2032
- };
2033
- var Wt = class extends x {
2034
- options;
2035
- cursor = 0;
2036
- get _selectedValue() {
2037
- return this.options[this.cursor];
2038
- }
2039
- changeValue() {
2040
- this.value = this._selectedValue.value;
2041
- }
2042
- constructor(e) {
2043
- super(e, !1), this.options = e.options;
2044
- let s = this.options.findIndex(({ value: r }) => r === e.initialValue), i = s === -1 ? 0 : s;
2045
- this.cursor = this.options[i].disabled ? D(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r) => {
2046
- switch (r) {
2047
- case "left":
2048
- case "up":
2049
- this.cursor = D(this.cursor, -1, this.options);
2050
- break;
2051
- case "down":
2052
- case "right":
2053
- this.cursor = D(this.cursor, 1, this.options);
2054
- break;
2055
- }
2056
- this.changeValue();
2057
- });
2058
- }
2059
- };
2060
- var $t = class extends x {
2061
- get userInputWithCursor() {
2062
- if (this.state === "submit") return this.userInput;
2063
- let e = this.userInput;
2064
- if (this.cursor >= e.length) return `${this.userInput}\u2588`;
2065
- let s = e.slice(0, this.cursor), [i, ...r] = e.slice(this.cursor);
2066
- return `${s}${import_picocolors.default.inverse(i)}${r.join("")}`;
2067
- }
2068
- get cursor() {
2069
- return this._cursor;
2070
- }
2071
- constructor(e) {
2072
- super({ ...e, initialUserInput: e.initialUserInput ?? e.initialValue }), this.on("userInput", (s) => {
2073
- this._setValue(s);
2074
- }), this.on("finalize", () => {
2075
- this.value || (this.value = e.defaultValue), this.value === void 0 && (this.value = "");
2076
- });
2077
- }
2078
- };
2079
-
2080
- // ../../node_modules/@clack/prompts/dist/index.mjs
2081
- var import_picocolors2 = __toESM(require_picocolors(), 1);
2082
- import N2 from "node:process";
2083
- var import_sisteransi2 = __toESM(require_src(), 1);
2084
- function ht2() {
2085
- return N2.platform !== "win32" ? N2.env.TERM !== "linux" : !!N2.env.CI || !!N2.env.WT_SESSION || !!N2.env.TERMINUS_SUBLIME || N2.env.ConEmuTask === "{cmd::Cmder}" || N2.env.TERM_PROGRAM === "Terminus-Sublime" || N2.env.TERM_PROGRAM === "vscode" || N2.env.TERM === "xterm-256color" || N2.env.TERM === "alacritty" || N2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
2086
- }
2087
- var ee = ht2(), ue = () => process.env.CI === "true", Te = (e) => e.isTTY === !0, I2 = (e, r) => ee ? e : r, Me = I2("\u25C6", "*"), ce = I2("\u25A0", "x"), de = I2("\u25B2", "x"), j2 = I2("\u25C7", "o"), $e = I2("\u250C", "T"), d = I2("\u2502", "|"), x2 = I2("\u2514", "\u2014"), Re = I2("\u2510", "T"), Oe = I2("\u2518", "\u2014"), Y = I2("\u25CF", ">"), K2 = I2("\u25CB", " "), te = I2("\u25FB", "[\u2022]"), V = I2("\u25FC", "[+]"), z2 = I2("\u25FB", "[ ]"), Ne = I2("\u25AA", "\u2022"), se = I2("\u2500", "-"), he = I2("\u256E", "+"), Pe = I2("\u251C", "+"), me = I2("\u256F", "+"), pe = I2("\u2570", "+"), We = I2("\u256D", "+"), ge = I2("\u25CF", "\u2022"), fe = I2("\u25C6", "*"), Fe = I2("\u25B2", "!"), ye = I2("\u25A0", "x"), W2 = (e) => {
2088
- switch (e) {
2089
- case "initial":
2090
- case "active":
2091
- return import_picocolors2.default.cyan(Me);
2092
- case "cancel":
2093
- return import_picocolors2.default.red(ce);
2094
- case "error":
2095
- return import_picocolors2.default.yellow(de);
2096
- case "submit":
2097
- return import_picocolors2.default.green(j2);
2098
- }
2099
- }, Ee = (e) => {
2100
- switch (e) {
2101
- case "initial":
2102
- case "active":
2103
- return import_picocolors2.default.cyan(d);
2104
- case "cancel":
2105
- return import_picocolors2.default.red(d);
2106
- case "error":
2107
- return import_picocolors2.default.yellow(d);
2108
- case "submit":
2109
- return import_picocolors2.default.green(d);
2110
- }
2111
- }, mt2 = (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, pt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, gt2 = (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, ve = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, ie = /\t{1,1000}/y, Ae = new RegExp("[\\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?))*", "yu"), ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, ft2 = new RegExp("\\p{M}+", "gu"), Ft2 = { limit: 1 / 0, ellipsis: "" }, Le = (e, r = {}, s = {}) => {
2112
- let i = r.limit ?? 1 / 0, n = r.ellipsis ?? "", l = r?.ellipsisWidth ?? (n ? Le(n, Ft2, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, o = s.tabWidth ?? 8, $ = s.ambiguousWidth ?? 1, y2 = s.emojiWidth ?? 2, E = s.fullWidthWidth ?? 2, p = s.regularWidth ?? 1, f = s.wideWidth ?? 2, c = 0, m = 0, h = e.length, g = 0, F = !1, v = h, S2 = Math.max(0, i - l), B = 0, b = 0, A = 0, C = 0;
2113
- e: for (; ; ) {
2114
- if (b > B || m >= h && m > c) {
2115
- let _2 = e.slice(B, b) || e.slice(c, m);
2116
- g = 0;
2117
- for (let D2 of _2.replaceAll(ft2, "")) {
2118
- let T2 = D2.codePointAt(0) || 0;
2119
- if (pt2(T2) ? C = E : gt2(T2) ? C = f : $ !== p && mt2(T2) ? C = $ : C = p, A + C > S2 && (v = Math.min(v, Math.max(B, c) + g)), A + C > i) {
2120
- F = !0;
2121
- break e;
2122
- }
2123
- g += D2.length, A += C;
2124
- }
2125
- B = b = 0;
2126
- }
2127
- if (m >= h) break;
2128
- if (ne.lastIndex = m, ne.test(e)) {
2129
- if (g = ne.lastIndex - m, C = g * p, A + C > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / p))), A + C > i) {
2130
- F = !0;
2131
- break;
2132
- }
2133
- A += C, B = c, b = m, m = c = ne.lastIndex;
2134
- continue;
2135
- }
2136
- if (ve.lastIndex = m, ve.test(e)) {
2137
- if (A + u > S2 && (v = Math.min(v, m)), A + u > i) {
2138
- F = !0;
2139
- break;
2140
- }
2141
- A += u, B = c, b = m, m = c = ve.lastIndex;
2142
- continue;
2143
- }
2144
- if (re.lastIndex = m, re.test(e)) {
2145
- if (g = re.lastIndex - m, C = g * a, A + C > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / a))), A + C > i) {
2146
- F = !0;
2147
- break;
2148
- }
2149
- A += C, B = c, b = m, m = c = re.lastIndex;
2150
- continue;
2151
- }
2152
- if (ie.lastIndex = m, ie.test(e)) {
2153
- if (g = ie.lastIndex - m, C = g * o, A + C > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / o))), A + C > i) {
2154
- F = !0;
2155
- break;
2156
- }
2157
- A += C, B = c, b = m, m = c = ie.lastIndex;
2158
- continue;
2159
- }
2160
- if (Ae.lastIndex = m, Ae.test(e)) {
2161
- if (A + y2 > S2 && (v = Math.min(v, m)), A + y2 > i) {
2162
- F = !0;
2163
- break;
2164
- }
2165
- A += y2, B = c, b = m, m = c = Ae.lastIndex;
2166
- continue;
2167
- }
2168
- m += 1;
2169
- }
2170
- return { width: F ? S2 : A, index: F ? v : h, truncated: F, ellipsed: F && i >= l };
2171
- }, yt2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, M2 = (e, r = {}) => Le(e, yt2, r).width, ae = "\x1B", je = "\x9B", Et2 = 39, Ce = "\x07", Ve = "[", vt2 = "]", ke = "m", Ie = `${vt2}8;;`, Ge = new RegExp(`(?:\\${Ve}(?<code>\\d+)m|\\${Ie}(?<uri>.*)${Ce})`, "y"), At2 = (e) => {
2172
- if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
2173
- if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
2174
- if (e === 1 || e === 2) return 22;
2175
- if (e === 3) return 23;
2176
- if (e === 4) return 24;
2177
- if (e === 7) return 27;
2178
- if (e === 8) return 28;
2179
- if (e === 9) return 29;
2180
- if (e === 0) return 0;
2181
- }, He = (e) => `${ae}${Ve}${e}${ke}`, Ue = (e) => `${ae}${Ie}${e}${Ce}`, Ct2 = (e) => e.map((r) => M2(r)), Se = (e, r, s) => {
2182
- let i = r[Symbol.iterator](), n = !1, l = !1, u = e.at(-1), a = u === void 0 ? 0 : M2(u), o = i.next(), $ = i.next(), y2 = 0;
2183
- for (; !o.done; ) {
2184
- let E = o.value, p = M2(E);
2185
- a + p <= s ? e[e.length - 1] += E : (e.push(E), a = 0), (E === ae || E === je) && (n = !0, l = r.startsWith(Ie, y2 + 1)), n ? l ? E === Ce && (n = !1, l = !1) : E === ke && (n = !1) : (a += p, a === s && !$.done && (e.push(""), a = 0)), o = $, $ = i.next(), y2 += E.length;
2186
- }
2187
- u = e.at(-1), !a && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
2188
- }, It2 = (e) => {
2189
- let r = e.split(" "), s = r.length;
2190
- for (; s > 0 && !(M2(r[s - 1]) > 0); ) s--;
2191
- return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
2192
- }, St = (e, r, s = {}) => {
2193
- if (s.trim !== !1 && e.trim() === "") return "";
2194
- let i = "", n, l, u = e.split(" "), a = Ct2(u), o = [""];
2195
- for (let [c, m] of u.entries()) {
2196
- s.trim !== !1 && (o[o.length - 1] = (o.at(-1) ?? "").trimStart());
2197
- let h = M2(o.at(-1) ?? "");
2198
- if (c !== 0 && (h >= r && (s.wordWrap === !1 || s.trim === !1) && (o.push(""), h = 0), (h > 0 || s.trim === !1) && (o[o.length - 1] += " ", h++)), s.hard && a[c] > r) {
2199
- let g = r - h, F = 1 + Math.floor((a[c] - g - 1) / r);
2200
- Math.floor((a[c] - 1) / r) < F && o.push(""), Se(o, m, r);
2201
- continue;
2202
- }
2203
- if (h + a[c] > r && h > 0 && a[c] > 0) {
2204
- if (s.wordWrap === !1 && h < r) {
2205
- Se(o, m, r);
2206
- continue;
2207
- }
2208
- o.push("");
2209
- }
2210
- if (h + a[c] > r && s.wordWrap === !1) {
2211
- Se(o, m, r);
2212
- continue;
2213
- }
2214
- o[o.length - 1] += m;
2215
- }
2216
- s.trim !== !1 && (o = o.map((c) => It2(c)));
2217
- let $ = o.join(`
2218
- `), y2 = $[Symbol.iterator](), E = y2.next(), p = y2.next(), f = 0;
2219
- for (; !E.done; ) {
2220
- let c = E.value, m = p.value;
2221
- if (i += c, c === ae || c === je) {
2222
- Ge.lastIndex = f + 1;
2223
- let F = Ge.exec($)?.groups;
2224
- if (F?.code !== void 0) {
2225
- let v = Number.parseFloat(F.code);
2226
- n = v === Et2 ? void 0 : v;
2227
- } else F?.uri !== void 0 && (l = F.uri.length === 0 ? void 0 : F.uri);
2228
- }
2229
- let h = n ? At2(n) : void 0;
2230
- m === `
2231
- ` ? (l && (i += Ue("")), n && h && (i += He(h))) : c === `
2232
- ` && (n && h && (i += He(n)), l && (i += Ue(l))), f += c.length, E = p, p = y2.next();
2233
- }
2234
- return i;
2235
- };
2236
- function q2(e, r, s) {
2237
- return String(e).normalize().replaceAll(`\r
2238
- `, `
2239
- `).split(`
2240
- `).map((i) => St(i, r, s)).join(`
2241
- `);
2242
- }
2243
- var wt = (e, r, s, i, n) => {
2244
- let l = r, u = 0;
2245
- for (let a = s; a < i; a++) {
2246
- let o = e[a];
2247
- if (l = l - o.length, u++, l <= n) break;
2248
- }
2249
- return { lineCount: l, removals: u };
2250
- }, J2 = (e) => {
2251
- let { cursor: r, options: s, style: i } = e, n = e.output ?? process.stdout, l = rt(n), u = e.columnPadding ?? 0, a = e.rowPadding ?? 4, o = l - u, $ = nt(n), y2 = import_picocolors2.default.dim("..."), E = e.maxItems ?? Number.POSITIVE_INFINITY, p = Math.max($ - a, 0), f = Math.max(Math.min(E, p), 5), c = 0;
2252
- r >= f - 3 && (c = Math.max(Math.min(r - f + 3, s.length - f), 0));
2253
- let m = f < s.length && c > 0, h = f < s.length && c + f < s.length, g = Math.min(c + f, s.length), F = [], v = 0;
2254
- m && v++, h && v++;
2255
- let S2 = c + (m ? 1 : 0), B = g - (h ? 1 : 0);
2256
- for (let A = S2; A < B; A++) {
2257
- let C = q2(i(s[A], A === r), o, { hard: !0, trim: !1 }).split(`
2258
- `);
2259
- F.push(C), v += C.length;
2260
- }
2261
- if (v > p) {
2262
- let A = 0, C = 0, _2 = v, D2 = r - S2, T2 = (L2, w2) => wt(F, _2, L2, w2, p);
2263
- m ? ({ lineCount: _2, removals: A } = T2(0, D2), _2 > p && ({ lineCount: _2, removals: C } = T2(D2 + 1, F.length))) : ({ lineCount: _2, removals: C } = T2(D2 + 1, F.length), _2 > p && ({ lineCount: _2, removals: A } = T2(0, D2))), A > 0 && (m = !0, F.splice(0, A)), C > 0 && (h = !0, F.splice(F.length - C, C));
2264
- }
2265
- let b = [];
2266
- m && b.push(y2);
2267
- for (let A of F) for (let C of A) b.push(C);
2268
- return h && b.push(y2), b;
2269
- };
2270
- var xt2 = [We, he, pe, me], _t2 = [$e, Re, x2, Oe];
2271
- function Xe(e, r, s, i) {
2272
- let n = s, l = s;
2273
- return i === "center" ? n = Math.floor((r - e) / 2) : i === "right" && (n = r - e - s), l = r - n - e, [n, l];
2274
- }
2275
- var Dt = (e) => e, Tt2 = (e = "", r = "", s) => {
2276
- let i = s?.output ?? process.stdout, n = rt(i), l = 2, u = s?.titlePadding ?? 1, a = s?.contentPadding ?? 2, o = s?.width === void 0 || s.width === "auto" ? 1 : Math.min(1, s.width), $ = (s?.withGuide ?? _.withGuide) !== !1 ? `${d} ` : "", y2 = s?.formatBorder ?? Dt, E = (s?.rounded ? xt2 : _t2).map(y2), p = y2(se), f = y2(d), c = M2($), m = M2(r), h = n - c, g = Math.floor(n * o) - c;
2277
- if (s?.width === "auto") {
2278
- let _2 = e.split(`
2279
- `), D2 = m + u * 2;
2280
- for (let L2 of _2) {
2281
- let w2 = M2(L2) + a * 2;
2282
- w2 > D2 && (D2 = w2);
2283
- }
2284
- let T2 = D2 + l;
2285
- T2 < g && (g = T2);
2286
- }
2287
- g % 2 !== 0 && (g < h ? g++ : g--);
2288
- let F = g - l, v = F - u * 2, S2 = m > v ? `${r.slice(0, v - 3)}...` : r, [B, b] = Xe(M2(S2), F, u, s?.titleAlign), A = q2(e, F - a * 2, { hard: !0, trim: !1 });
2289
- i.write(`${$}${E[0]}${p.repeat(B)}${S2}${p.repeat(b)}${E[1]}
2290
- `);
2291
- let C = A.split(`
2292
- `);
2293
- for (let _2 of C) {
2294
- let [D2, T2] = Xe(M2(_2), F, a, s?.contentAlign);
2295
- i.write(`${$}${f}${" ".repeat(D2)}${_2}${" ".repeat(T2)}${f}
2296
- `);
2297
- }
2298
- i.write(`${$}${E[2]}${p.repeat(F)}${E[3]}
2299
- `);
2300
- }, Mt2 = (e) => {
2301
- let r = e.active ?? "Yes", s = e.inactive ?? "No";
2302
- return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? !0, render() {
2303
- let i = `${import_picocolors2.default.gray(d)}
2304
- ${W2(this.state)} ${e.message}
2305
- `, n = this.value ? r : s;
2306
- switch (this.state) {
2307
- case "submit":
2308
- return `${i}${import_picocolors2.default.gray(d)} ${import_picocolors2.default.dim(n)}`;
2309
- case "cancel":
2310
- return `${i}${import_picocolors2.default.gray(d)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n))}
2311
- ${import_picocolors2.default.gray(d)}`;
2312
- default:
2313
- return `${i}${import_picocolors2.default.cyan(d)} ${this.value ? `${import_picocolors2.default.green(Y)} ${r}` : `${import_picocolors2.default.dim(K2)} ${import_picocolors2.default.dim(r)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(K2)} ${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.green(Y)} ${s}`}
2314
- ${import_picocolors2.default.cyan(x2)}
2315
- `;
2316
- }
2317
- } }).prompt();
2318
- };
2319
- var R2 = { message: (e = [], { symbol: r = import_picocolors2.default.gray(d), secondarySymbol: s = import_picocolors2.default.gray(d), output: i = process.stdout, spacing: n = 1, withGuide: l } = {}) => {
2320
- let u = [], a = (l ?? _.withGuide) !== !1, o = a ? s : "", $ = a ? `${r} ` : "", y2 = a ? `${s} ` : "";
2321
- for (let p = 0; p < n; p++) u.push(o);
2322
- let E = Array.isArray(e) ? e : e.split(`
2323
- `);
2324
- if (E.length > 0) {
2325
- let [p, ...f] = E;
2326
- p.length > 0 ? u.push(`${$}${p}`) : u.push(a ? "" : r);
2327
- for (let c of f) c.length > 0 ? u.push(`${y2}${c}`) : u.push(a ? "" : s);
2328
- }
2329
- i.write(`${u.join(`
2330
- `)}
2331
- `);
2332
- }, info: (e, r) => {
2333
- R2.message(e, { ...r, symbol: import_picocolors2.default.blue(ge) });
2334
- }, success: (e, r) => {
2335
- R2.message(e, { ...r, symbol: import_picocolors2.default.green(fe) });
2336
- }, step: (e, r) => {
2337
- R2.message(e, { ...r, symbol: import_picocolors2.default.green(j2) });
2338
- }, warn: (e, r) => {
2339
- R2.message(e, { ...r, symbol: import_picocolors2.default.yellow(Fe) });
2340
- }, warning: (e, r) => {
2341
- R2.warn(e, r);
2342
- }, error: (e, r) => {
2343
- R2.message(e, { ...r, symbol: import_picocolors2.default.red(ye) });
2344
- } }, Nt = (e = "", r) => {
2345
- (r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(x2)} ${import_picocolors2.default.red(e)}
2346
-
2347
- `);
2348
- }, Pt = (e = "", r) => {
2349
- (r?.output ?? process.stdout).write(`${import_picocolors2.default.gray($e)} ${e}
2350
- `);
2351
- }, Wt2 = (e = "", r) => {
2352
- (r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(d)}
2353
- ${import_picocolors2.default.gray(x2)} ${e}
2354
-
2355
- `);
2356
- }, Q2 = (e, r) => e.split(`
2357
- `).map((s) => r(s)).join(`
2358
- `), Lt2 = (e) => {
2359
- let r = (i, n) => {
2360
- let l = i.label ?? String(i.value);
2361
- return n === "disabled" ? `${import_picocolors2.default.gray(z2)} ${Q2(l, import_picocolors2.default.gray)}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint ?? "disabled"})`)}` : ""}` : n === "active" ? `${import_picocolors2.default.cyan(te)} ${l}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "selected" ? `${import_picocolors2.default.green(V)} ${Q2(l, import_picocolors2.default.dim)}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "cancelled" ? `${Q2(l, (u) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(u)))}` : n === "active-selected" ? `${import_picocolors2.default.green(V)} ${l}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "submitted" ? `${Q2(l, import_picocolors2.default.dim)}` : `${import_picocolors2.default.dim(z2)} ${Q2(l, import_picocolors2.default.dim)}`;
2362
- }, s = e.required ?? !0;
2363
- return new Mt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(i) {
2364
- if (s && (i === void 0 || i.length === 0)) return `Please select at least one option.
2365
- ${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
2366
- }, render() {
2367
- let i = Bt(e.output, e.message, `${Ee(this.state)} `, `${W2(this.state)} `), n = `${import_picocolors2.default.gray(d)}
2368
- ${i}
2369
- `, l = this.value ?? [], u = (a, o) => {
2370
- if (a.disabled) return r(a, "disabled");
2371
- let $ = l.includes(a.value);
2372
- return o && $ ? r(a, "active-selected") : $ ? r(a, "selected") : r(a, o ? "active" : "inactive");
2373
- };
2374
- switch (this.state) {
2375
- case "submit": {
2376
- let a = this.options.filter(({ value: $ }) => l.includes($)).map(($) => r($, "submitted")).join(import_picocolors2.default.dim(", ")) || import_picocolors2.default.dim("none"), o = Bt(e.output, a, `${import_picocolors2.default.gray(d)} `);
2377
- return `${n}${o}`;
2378
- }
2379
- case "cancel": {
2380
- let a = this.options.filter(({ value: $ }) => l.includes($)).map(($) => r($, "cancelled")).join(import_picocolors2.default.dim(", "));
2381
- if (a.trim() === "") return `${n}${import_picocolors2.default.gray(d)}`;
2382
- let o = Bt(e.output, a, `${import_picocolors2.default.gray(d)} `);
2383
- return `${n}${o}
2384
- ${import_picocolors2.default.gray(d)}`;
2385
- }
2386
- case "error": {
2387
- let a = `${import_picocolors2.default.yellow(d)} `, o = this.error.split(`
2388
- `).map(($, y2) => y2 === 0 ? `${import_picocolors2.default.yellow(x2)} ${import_picocolors2.default.yellow($)}` : ` ${$}`).join(`
2389
- `);
2390
- return `${n}${a}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, style: u }).join(`
2391
- ${a}`)}
2392
- ${o}
2393
- `;
2394
- }
2395
- default: {
2396
- let a = `${import_picocolors2.default.cyan(d)} `;
2397
- return `${n}${a}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, style: u }).join(`
2398
- ${a}`)}
2399
- ${import_picocolors2.default.cyan(x2)}
2400
- `;
2401
- }
2402
- }
2403
- } }).prompt();
2404
- };
2405
- var Ut = import_picocolors2.default.magenta, we = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: n, frames: l = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: a, ...o } = {}) => {
2406
- let $ = ue(), y2, E, p = !1, f = !1, c = "", m, h = performance.now(), g = rt(s), F = o?.styleFrame ?? Ut, v = (w2) => {
2407
- let O2 = w2 > 1 ? n ?? _.messages.error : i ?? _.messages.cancel;
2408
- f = w2 === 1, p && (L2(O2, w2), f && typeof r == "function" && r());
2409
- }, S2 = () => v(2), B = () => v(1), b = () => {
2410
- process.on("uncaughtExceptionMonitor", S2), process.on("unhandledRejection", S2), process.on("SIGINT", B), process.on("SIGTERM", B), process.on("exit", v), a && a.addEventListener("abort", B);
2411
- }, A = () => {
2412
- process.removeListener("uncaughtExceptionMonitor", S2), process.removeListener("unhandledRejection", S2), process.removeListener("SIGINT", B), process.removeListener("SIGTERM", B), process.removeListener("exit", v), a && a.removeEventListener("abort", B);
2413
- }, C = () => {
2414
- if (m === void 0) return;
2415
- $ && s.write(`
2416
- `);
2417
- let w2 = q2(m, g, { hard: !0, trim: !1 }).split(`
2418
- `);
2419
- w2.length > 1 && s.write(import_sisteransi2.cursor.up(w2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
2420
- }, _2 = (w2) => w2.replace(/\.+$/, ""), D2 = (w2) => {
2421
- let O2 = (performance.now() - w2) / 1e3, P2 = Math.floor(O2 / 60), G2 = Math.floor(O2 % 60);
2422
- return P2 > 0 ? `[${P2}m ${G2}s]` : `[${G2}s]`;
2423
- }, T2 = (w2 = "") => {
2424
- p = !0, y2 = xt({ output: s }), c = _2(w2), h = performance.now(), s.write(`${import_picocolors2.default.gray(d)}
2425
- `);
2426
- let O2 = 0, P2 = 0;
2427
- b(), E = setInterval(() => {
2428
- if ($ && c === m) return;
2429
- C(), m = c;
2430
- let G2 = F(l[O2]), Z2;
2431
- if ($) Z2 = `${G2} ${c}...`;
2432
- else if (e === "timer") Z2 = `${G2} ${c} ${D2(h)}`;
2433
- else {
2434
- let Ze = ".".repeat(Math.floor(P2)).slice(0, 3);
2435
- Z2 = `${G2} ${c}${Ze}`;
2436
- }
2437
- let Qe = q2(Z2, g, { hard: !0, trim: !1 });
2438
- s.write(Qe), O2 = O2 + 1 < l.length ? O2 + 1 : 0, P2 = P2 < 4 ? P2 + 0.125 : 0;
2439
- }, u);
2440
- }, L2 = (w2 = "", O2 = 0) => {
2441
- if (!p) return;
2442
- p = !1, clearInterval(E), C();
2443
- let P2 = O2 === 0 ? import_picocolors2.default.green(j2) : O2 === 1 ? import_picocolors2.default.red(ce) : import_picocolors2.default.red(de);
2444
- c = w2 ?? c, e === "timer" ? s.write(`${P2} ${c} ${D2(h)}
2445
- `) : s.write(`${P2} ${c}
2446
- `), A(), y2();
2447
- };
2448
- return { start: T2, stop: (w2 = "") => L2(w2, 0), message: (w2 = "") => {
2449
- c = _2(w2 ?? c);
2450
- }, cancel: (w2 = "") => L2(w2, 1), error: (w2 = "") => L2(w2, 2), get isCancelled() {
2451
- return f;
2452
- } };
2453
- }, Ye = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
2454
- var oe = (e, r) => e.includes(`
2455
- `) ? e.split(`
2456
- `).map((s) => r(s)).join(`
2457
- `) : r(e), qt = (e) => {
2458
- let r = (s, i) => {
2459
- let n = s.label ?? String(s.value);
2460
- switch (i) {
2461
- case "disabled":
2462
- return `${import_picocolors2.default.gray(K2)} ${oe(n, import_picocolors2.default.gray)}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint ?? "disabled"})`)}` : ""}`;
2463
- case "selected":
2464
- return `${oe(n, import_picocolors2.default.dim)}`;
2465
- case "active":
2466
- return `${import_picocolors2.default.green(Y)} ${n}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}`;
2467
- case "cancelled":
2468
- return `${oe(n, (l) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(l)))}`;
2469
- default:
2470
- return `${import_picocolors2.default.dim(K2)} ${oe(n, import_picocolors2.default.dim)}`;
2471
- }
2472
- };
2473
- return new Wt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
2474
- let s = `${W2(this.state)} `, i = `${Ee(this.state)} `, n = Bt(e.output, e.message, i, s), l = `${import_picocolors2.default.gray(d)}
2475
- ${n}
2476
- `;
2477
- switch (this.state) {
2478
- case "submit": {
2479
- let u = `${import_picocolors2.default.gray(d)} `, a = Bt(e.output, r(this.options[this.cursor], "selected"), u);
2480
- return `${l}${a}`;
2481
- }
2482
- case "cancel": {
2483
- let u = `${import_picocolors2.default.gray(d)} `, a = Bt(e.output, r(this.options[this.cursor], "cancelled"), u);
2484
- return `${l}${a}
2485
- ${import_picocolors2.default.gray(d)}`;
2486
- }
2487
- default: {
2488
- let u = `${import_picocolors2.default.cyan(d)} `;
2489
- return `${l}${u}${J2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: u.length, style: (a, o) => r(a, a.disabled ? "disabled" : o ? "active" : "inactive") }).join(`
2490
- ${u}`)}
2491
- ${import_picocolors2.default.cyan(x2)}
2492
- `;
2493
- }
2494
- }
2495
- } }).prompt();
2496
- };
2497
- var ze = `${import_picocolors2.default.gray(d)} `;
2498
- var Yt = (e) => e.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g, ""), zt = (e) => {
2499
- let r = e.output ?? process.stdout, s = rt(r), i = import_picocolors2.default.gray(d), n = e.spacing ?? 1, l = 3, u = e.retainLog === !0, a = !ue() && Te(r);
2500
- r.write(`${i}
2501
- `), r.write(`${import_picocolors2.default.green(j2)} ${e.title}
2502
- `);
2503
- for (let h = 0; h < n; h++) r.write(`${i}
2504
- `);
2505
- let o = [{ value: "", full: "" }], $ = !1, y2 = (h) => {
2506
- if (o.length === 0) return;
2507
- let g = 0;
2508
- h && (g += n + 2);
2509
- for (let F of o) {
2510
- let { value: v, result: S2 } = F, B = S2?.message ?? v;
2511
- if (B.length === 0) continue;
2512
- S2 === void 0 && F.header !== void 0 && F.header !== "" && (B += `
2513
- ${F.header}`);
2514
- let b = B.split(`
2515
- `).reduce((A, C) => C === "" ? A + 1 : A + Math.ceil((C.length + l) / s), 0);
2516
- g += b;
2517
- }
2518
- g > 0 && (g += 1, r.write(import_sisteransi2.erase.lines(g)));
2519
- }, E = (h, g, F) => {
2520
- let v = F ? `${h.full}
2521
- ${h.value}` : h.value;
2522
- h.header !== void 0 && h.header !== "" && R2.message(h.header.split(`
2523
- `).map(import_picocolors2.default.bold), { output: r, secondarySymbol: i, symbol: i, spacing: 0 }), R2.message(v.split(`
2524
- `).map(import_picocolors2.default.dim), { output: r, secondarySymbol: i, symbol: i, spacing: g ?? n });
2525
- }, p = () => {
2526
- for (let h of o) {
2527
- let { header: g, value: F, full: v } = h;
2528
- (g === void 0 || g.length === 0) && F.length === 0 || E(h, void 0, u === !0 && v.length > 0);
2529
- }
2530
- }, f = (h, g, F) => {
2531
- if (y2(!1), (F?.raw !== !0 || !$) && h.value !== "" && (h.value += `
2532
- `), h.value += Yt(g), $ = F?.raw === !0, e.limit !== void 0) {
2533
- let v = h.value.split(`
2534
- `), S2 = v.length - e.limit;
2535
- if (S2 > 0) {
2536
- let B = v.splice(0, S2);
2537
- u && (h.full += (h.full === "" ? "" : `
2538
- `) + B.join(`
2539
- `));
2540
- }
2541
- h.value = v.join(`
2542
- `);
2543
- }
2544
- a && c();
2545
- }, c = () => {
2546
- for (let h of o) h.result ? h.result.status === "error" ? R2.error(h.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : R2.success(h.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : h.value !== "" && E(h, 0);
2547
- }, m = (h, g) => {
2548
- y2(!1), h.result = g, a && c();
2549
- };
2550
- return { message(h, g) {
2551
- f(o[0], h, g);
2552
- }, group(h) {
2553
- let g = { header: h, value: "", full: "" };
2554
- return o.push(g), { message(F, v) {
2555
- f(g, F, v);
2556
- }, error(F) {
2557
- m(g, { status: "error", message: F });
2558
- }, success(F) {
2559
- m(g, { status: "success", message: F });
2560
- } };
2561
- }, error(h, g) {
2562
- y2(!0), R2.error(h, { output: r, secondarySymbol: i, spacing: 1 }), g?.showLog !== !1 && p(), o.splice(1, o.length - 1), o[0].value = "", o[0].full = "";
2563
- }, success(h, g) {
2564
- y2(!0), R2.success(h, { output: r, secondarySymbol: i, spacing: 1 }), g?.showLog === !0 && p(), o.splice(1, o.length - 1), o[0].value = "", o[0].full = "";
2565
- } };
2566
- }, Qt = (e) => new $t({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
2567
- let r = (e?.withGuide ?? _.withGuide) !== !1, s = `${`${r ? `${import_picocolors2.default.gray(d)}
2568
- ` : ""}${W2(this.state)} `}${e.message}
2569
- `, i = e.placeholder ? import_picocolors2.default.inverse(e.placeholder[0]) + import_picocolors2.default.dim(e.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), n = this.userInput ? this.userInputWithCursor : i, l = this.value ?? "";
2570
- switch (this.state) {
2571
- case "error": {
2572
- let u = this.error ? ` ${import_picocolors2.default.yellow(this.error)}` : "", a = r ? `${import_picocolors2.default.yellow(d)} ` : "", o = r ? import_picocolors2.default.yellow(x2) : "";
2573
- return `${s.trim()}
2574
- ${a}${n}
2575
- ${o}${u}
2576
- `;
2577
- }
2578
- case "submit": {
2579
- let u = l ? ` ${import_picocolors2.default.dim(l)}` : "", a = r ? import_picocolors2.default.gray(d) : "";
2580
- return `${s}${a}${u}`;
2581
- }
2582
- case "cancel": {
2583
- let u = l ? ` ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(l))}` : "", a = r ? import_picocolors2.default.gray(d) : "";
2584
- return `${s}${a}${u}${l.trim() ? `
2585
- ${a}` : ""}`;
2586
- }
2587
- default: {
2588
- let u = r ? `${import_picocolors2.default.cyan(d)} ` : "", a = r ? import_picocolors2.default.cyan(x2) : "";
2589
- return `${s}${u}${n}
2590
- ${a}
2591
- `;
2592
- }
2593
- }
2594
- } }).prompt();
2595
-
2596
- // src/node-logger/prompts/prompt-config.ts
2597
- var prompt_config_exports = {};
2598
- __export(prompt_config_exports, {
2599
- getPreferredStdio: () => getPreferredStdio,
2600
- getPromptLibrary: () => getPromptLibrary,
2601
- getPromptProvider: () => getPromptProvider,
2602
- isClackEnabled: () => isClackEnabled,
2603
- setPromptLibrary: () => setPromptLibrary
2604
- });
2605
-
2606
- // src/node-logger/prompts/prompt-provider-clack.ts
2607
- import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
2608
-
2609
- // src/node-logger/logger/log-tracker.ts
2610
- import { promises as fs } from "node:fs";
2611
- import { join } from "node:path";
2612
- import { stripVTControlCharacters } from "node:util";
2613
- var DEBUG_LOG_FILE_NAME = "debug-storybook.log", DEFAULT_LOG_FILE_PATH = join(process.cwd(), DEBUG_LOG_FILE_NAME), LogTracker = class {
2614
- /** Array to store log entries */
2615
- #logs = [];
2616
- /**
2617
- * Flag indicating if logs should be written to file. It is enabled when users provide the
2618
- * `--logfile` flag to a CLI command.
2619
- */
2620
- #shouldWriteLogsToFile = !1;
2621
- /** Enables writing logs to file. */
2622
- enableLogWriting() {
2623
- this.#shouldWriteLogsToFile = !0;
2624
- }
2625
- /** Returns whether logs should be written to file. */
2626
- get shouldWriteLogsToFile() {
2627
- return this.#shouldWriteLogsToFile;
2628
- }
2629
- /** Returns a copy of all stored logs. */
2630
- get logs() {
2631
- return [...this.#logs];
2632
- }
2633
- /**
2634
- * Adds a new log entry.
2635
- *
2636
- * @param level - The log level
2637
- * @param message - The log message
2638
- * @param metadata - Optional metadata to attach to the log, can be any JSON serializable value
2639
- */
2640
- addLog(level, message, metadata) {
2641
- this.#logs.push({
2642
- timestamp: /* @__PURE__ */ new Date(),
2643
- level,
2644
- message: stripVTControlCharacters(message),
2645
- metadata
2646
- });
2647
- }
2648
- /** Clears all stored logs. */
2649
- clear() {
2650
- this.#logs = [];
2651
- }
2652
- /**
2653
- * Writes all stored logs to a file and clears the log store.
2654
- *
2655
- * @param filePath - Optional custom file path to write logs to
2656
- * @returns The path where logs were written, by default is debug-storybook.log in current working
2657
- * directory
2658
- */
2659
- async writeToFile(filePath) {
2660
- let logFilePath = typeof filePath == "string" ? filePath : DEFAULT_LOG_FILE_PATH, logContent = this.#logs.map((log2) => {
2661
- let timestamp = log2.timestamp.toLocaleTimeString("en-US", { hour12: !1 }) + `.${log2.timestamp.getMilliseconds().toString().padStart(3, "0")}`, metadata = log2.metadata ? ` ${JSON.stringify(log2.metadata)}` : "";
2662
- return `[${timestamp}] [${log2.level.toUpperCase()}] ${log2.message}${metadata}`;
2663
- }).join(`
2664
- `);
2665
- return await fs.writeFile(logFilePath, logContent, "utf-8"), this.#logs = [], logFilePath;
2666
- }
2667
- }, logTracker = new LogTracker();
2668
-
2669
- // src/node-logger/wrap-utils.ts
2670
- import { stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
2671
- var import_picocolors3 = __toESM(require_picocolors(), 1);
2672
-
2673
- // ../../node_modules/strip-ansi/node_modules/ansi-regex/index.js
2674
- function ansiRegex({ onlyFirst = !1 } = {}) {
2675
- let pattern = "(?:(?:\\u001B\\]|\\u009D)[^\\u0007\\u001B\\u009C\\u009D]*(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
2676
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
2677
- }
2678
-
2679
- // ../../node_modules/strip-ansi/index.js
2680
- var regex = ansiRegex();
2681
- function stripAnsi(string) {
2682
- if (typeof string != "string")
2683
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
2684
- return !string.includes("\x1B") && !string.includes("\x9B") ? string : string.replace(regex, "");
2685
- }
2686
-
2687
- // ../../node_modules/get-east-asian-width/lookup-data.js
2688
- var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109], fullwidthMinimalCodePoint = 12288, fullwidthMaximumCodePoint = 65510, fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
2689
- var wideMinimalCodePoint = 4352, wideMaximumCodePoint = 262141, wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
2690
-
2691
- // ../../node_modules/get-east-asian-width/utilities.js
2692
- var isInRange = (ranges, codePoint) => {
2693
- let low = 0, high = Math.floor(ranges.length / 2) - 1;
2694
- for (; low <= high; ) {
2695
- let mid = Math.floor((low + high) / 2), i = mid * 2;
2696
- if (codePoint < ranges[i])
2697
- high = mid - 1;
2698
- else if (codePoint > ranges[i + 1])
2699
- low = mid + 1;
2700
- else
2701
- return !0;
2702
- }
2703
- return !1;
2704
- };
2705
-
2706
- // ../../node_modules/get-east-asian-width/lookup.js
2707
- var commonCjkCodePoint = 19968, [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
2708
- function findWideFastPathRange(ranges) {
2709
- let fastPathStart = ranges[0], fastPathEnd = ranges[1];
2710
- for (let index = 0; index < ranges.length; index += 2) {
2711
- let start = ranges[index], end = ranges[index + 1];
2712
- if (commonCjkCodePoint >= start && commonCjkCodePoint <= end)
2713
- return [start, end];
2714
- end - start > fastPathEnd - fastPathStart && (fastPathStart = start, fastPathEnd = end);
2715
- }
2716
- return [fastPathStart, fastPathEnd];
2717
- }
2718
- var isAmbiguous = (codePoint) => codePoint < 161 || codePoint > 1114109 ? !1 : isInRange(ambiguousRanges, codePoint), isFullwidth = (codePoint) => codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint ? !1 : isInRange(fullwidthRanges, codePoint);
2719
- var isWide = (codePoint) => codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd ? !0 : codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint ? !1 : isInRange(wideRanges, codePoint);
2720
-
2721
- // ../../node_modules/get-east-asian-width/index.js
2722
- function validate(codePoint) {
2723
- if (!Number.isSafeInteger(codePoint))
2724
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
2725
- }
2726
- function eastAsianWidth(codePoint, { ambiguousAsWide = !1 } = {}) {
2727
- return validate(codePoint), isFullwidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint) ? 2 : 1;
2728
- }
2729
-
2730
- // ../../node_modules/string-width/index.js
2731
- var import_emoji_regex = __toESM(require_emoji_regex3(), 1), segmenter = new Intl.Segmenter(), defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
2732
- function stringWidth(string, options = {}) {
2733
- if (typeof string != "string" || string.length === 0)
2734
- return 0;
2735
- let {
2736
- ambiguousIsNarrow = !0,
2737
- countAnsiEscapeCodes = !1
2738
- } = options;
2739
- if (countAnsiEscapeCodes || (string = stripAnsi(string)), string.length === 0)
2740
- return 0;
2741
- let width = 0, eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
2742
- for (let { segment: character } of segmenter.segment(string)) {
2743
- let codePoint = character.codePointAt(0);
2744
- if (!(codePoint <= 31 || codePoint >= 127 && codePoint <= 159) && !(codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) && !(codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) && !(codePoint >= 55296 && codePoint <= 57343) && !(codePoint >= 65024 && codePoint <= 65039) && !defaultIgnorableCodePointRegex.test(character)) {
2745
- if ((0, import_emoji_regex.default)().test(character)) {
2746
- width += 2;
2747
- continue;
2748
- }
2749
- width += eastAsianWidth(codePoint, eastAsianWidthOptions);
2750
- }
2751
- }
2752
- return width;
2753
- }
2754
-
2755
- // ../../node_modules/ansi-styles/index.js
2756
- var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles = {
2757
- modifier: {
2758
- reset: [0, 0],
2759
- // 21 isn't widely supported and 22 does the same thing
2760
- bold: [1, 22],
2761
- dim: [2, 22],
2762
- italic: [3, 23],
2763
- underline: [4, 24],
2764
- overline: [53, 55],
2765
- inverse: [7, 27],
2766
- hidden: [8, 28],
2767
- strikethrough: [9, 29]
2768
- },
2769
- color: {
2770
- black: [30, 39],
2771
- red: [31, 39],
2772
- green: [32, 39],
2773
- yellow: [33, 39],
2774
- blue: [34, 39],
2775
- magenta: [35, 39],
2776
- cyan: [36, 39],
2777
- white: [37, 39],
2778
- // Bright color
2779
- blackBright: [90, 39],
2780
- gray: [90, 39],
2781
- // Alias of `blackBright`
2782
- grey: [90, 39],
2783
- // Alias of `blackBright`
2784
- redBright: [91, 39],
2785
- greenBright: [92, 39],
2786
- yellowBright: [93, 39],
2787
- blueBright: [94, 39],
2788
- magentaBright: [95, 39],
2789
- cyanBright: [96, 39],
2790
- whiteBright: [97, 39]
2791
- },
2792
- bgColor: {
2793
- bgBlack: [40, 49],
2794
- bgRed: [41, 49],
2795
- bgGreen: [42, 49],
2796
- bgYellow: [43, 49],
2797
- bgBlue: [44, 49],
2798
- bgMagenta: [45, 49],
2799
- bgCyan: [46, 49],
2800
- bgWhite: [47, 49],
2801
- // Bright color
2802
- bgBlackBright: [100, 49],
2803
- bgGray: [100, 49],
2804
- // Alias of `bgBlackBright`
2805
- bgGrey: [100, 49],
2806
- // Alias of `bgBlackBright`
2807
- bgRedBright: [101, 49],
2808
- bgGreenBright: [102, 49],
2809
- bgYellowBright: [103, 49],
2810
- bgBlueBright: [104, 49],
2811
- bgMagentaBright: [105, 49],
2812
- bgCyanBright: [106, 49],
2813
- bgWhiteBright: [107, 49]
2814
- }
2815
- }, modifierNames = Object.keys(styles.modifier), foregroundColorNames = Object.keys(styles.color), backgroundColorNames = Object.keys(styles.bgColor), colorNames = [...foregroundColorNames, ...backgroundColorNames];
2816
- function assembleStyles() {
2817
- let codes = /* @__PURE__ */ new Map();
2818
- for (let [groupName, group] of Object.entries(styles)) {
2819
- for (let [styleName, style] of Object.entries(group))
2820
- styles[styleName] = {
2821
- open: `\x1B[${style[0]}m`,
2822
- close: `\x1B[${style[1]}m`
2823
- }, group[styleName] = styles[styleName], codes.set(style[0], style[1]);
2824
- Object.defineProperty(styles, groupName, {
2825
- value: group,
2826
- enumerable: !1
2827
- });
2828
- }
2829
- return Object.defineProperty(styles, "codes", {
2830
- value: codes,
2831
- enumerable: !1
2832
- }), styles.color.close = "\x1B[39m", styles.bgColor.close = "\x1B[49m", styles.color.ansi = wrapAnsi16(), styles.color.ansi256 = wrapAnsi256(), styles.color.ansi16m = wrapAnsi16m(), styles.bgColor.ansi = wrapAnsi16(10), styles.bgColor.ansi256 = wrapAnsi256(10), styles.bgColor.ansi16m = wrapAnsi16m(10), Object.defineProperties(styles, {
2833
- rgbToAnsi256: {
2834
- value(red, green, blue) {
2835
- return red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
2836
- },
2837
- enumerable: !1
2838
- },
2839
- hexToRgb: {
2840
- value(hex2) {
2841
- let matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex2.toString(16));
2842
- if (!matches)
2843
- return [0, 0, 0];
2844
- let [colorString] = matches;
2845
- colorString.length === 3 && (colorString = [...colorString].map((character) => character + character).join(""));
2846
- let integer = Number.parseInt(colorString, 16);
2847
- return [
2848
- /* eslint-disable no-bitwise */
2849
- integer >> 16 & 255,
2850
- integer >> 8 & 255,
2851
- integer & 255
2852
- /* eslint-enable no-bitwise */
2853
- ];
2854
- },
2855
- enumerable: !1
2856
- },
2857
- hexToAnsi256: {
2858
- value: (hex2) => styles.rgbToAnsi256(...styles.hexToRgb(hex2)),
2859
- enumerable: !1
2860
- },
2861
- ansi256ToAnsi: {
2862
- value(code) {
2863
- if (code < 8)
2864
- return 30 + code;
2865
- if (code < 16)
2866
- return 90 + (code - 8);
2867
- let red, green, blue;
2868
- if (code >= 232)
2869
- red = ((code - 232) * 10 + 8) / 255, green = red, blue = red;
2870
- else {
2871
- code -= 16;
2872
- let remainder = code % 36;
2873
- red = Math.floor(code / 36) / 5, green = Math.floor(remainder / 6) / 5, blue = remainder % 6 / 5;
2874
- }
2875
- let value = Math.max(red, green, blue) * 2;
2876
- if (value === 0)
2877
- return 30;
2878
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
2879
- return value === 2 && (result += 60), result;
2880
- },
2881
- enumerable: !1
2882
- },
2883
- rgbToAnsi: {
2884
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
2885
- enumerable: !1
2886
- },
2887
- hexToAnsi: {
2888
- value: (hex2) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex2)),
2889
- enumerable: !1
2890
- }
2891
- }), styles;
2892
- }
2893
- var ansiStyles = assembleStyles(), ansi_styles_default = ansiStyles;
2894
-
2895
- // ../../node_modules/wrap-ansi/index.js
2896
- var ESCAPES = /* @__PURE__ */ new Set([
2897
- "\x1B",
2898
- "\x9B"
2899
- ]), END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC = "]", ANSI_SGR_TERMINATOR = "m", ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`, wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, wordLengths = (string) => string.split(" ").map((character) => stringWidth(character)), wrapWord = (rows, word, columns) => {
2900
- let characters = [...word], isInsideEscape = !1, isInsideLinkEscape = !1, visible = stringWidth(stripAnsi(rows.at(-1)));
2901
- for (let [index, character] of characters.entries()) {
2902
- let characterLength = stringWidth(character);
2903
- if (visible + characterLength <= columns ? rows[rows.length - 1] += character : (rows.push(character), visible = 0), ESCAPES.has(character) && (isInsideEscape = !0, isInsideLinkEscape = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("") === ANSI_ESCAPE_LINK), isInsideEscape) {
2904
- isInsideLinkEscape ? character === ANSI_ESCAPE_BELL && (isInsideEscape = !1, isInsideLinkEscape = !1) : character === ANSI_SGR_TERMINATOR && (isInsideEscape = !1);
2905
- continue;
2906
- }
2907
- visible += characterLength, visible === columns && index < characters.length - 1 && (rows.push(""), visible = 0);
2908
- }
2909
- !visible && rows.at(-1).length > 0 && rows.length > 1 && (rows[rows.length - 2] += rows.pop());
2910
- }, stringVisibleTrimSpacesRight = (string) => {
2911
- let words = string.split(" "), last = words.length;
2912
- for (; last > 0 && !(stringWidth(words[last - 1]) > 0); )
2913
- last--;
2914
- return last === words.length ? string : words.slice(0, last).join(" ") + words.slice(last).join("");
2915
- }, exec = (string, columns, options = {}) => {
2916
- if (options.trim !== !1 && string.trim() === "")
2917
- return "";
2918
- let returnValue = "", escapeCode, escapeUrl, lengths = wordLengths(string), rows = [""];
2919
- for (let [index, word] of string.split(" ").entries()) {
2920
- options.trim !== !1 && (rows[rows.length - 1] = rows.at(-1).trimStart());
2921
- let rowLength = stringWidth(rows.at(-1));
2922
- if (index !== 0 && (rowLength >= columns && (options.wordWrap === !1 || options.trim === !1) && (rows.push(""), rowLength = 0), (rowLength > 0 || options.trim === !1) && (rows[rows.length - 1] += " ", rowLength++)), options.hard && lengths[index] > columns) {
2923
- let remainingColumns = columns - rowLength, breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
2924
- Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine && rows.push(""), wrapWord(rows, word, columns);
2925
- continue;
2926
- }
2927
- if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
2928
- if (options.wordWrap === !1 && rowLength < columns) {
2929
- wrapWord(rows, word, columns);
2930
- continue;
2931
- }
2932
- rows.push("");
2933
- }
2934
- if (rowLength + lengths[index] > columns && options.wordWrap === !1) {
2935
- wrapWord(rows, word, columns);
2936
- continue;
2937
- }
2938
- rows[rows.length - 1] += word;
2939
- }
2940
- options.trim !== !1 && (rows = rows.map((row) => stringVisibleTrimSpacesRight(row)));
2941
- let preString = rows.join(`
2942
- `), pre = [...preString], preStringIndex = 0;
2943
- for (let [index, character] of pre.entries()) {
2944
- if (returnValue += character, ESCAPES.has(character)) {
2945
- let { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
2946
- if (groups.code !== void 0) {
2947
- let code2 = Number.parseFloat(groups.code);
2948
- escapeCode = code2 === END_CODE ? void 0 : code2;
2949
- } else groups.uri !== void 0 && (escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri);
2950
- }
2951
- let code = ansi_styles_default.codes.get(Number(escapeCode));
2952
- pre[index + 1] === `
2953
- ` ? (escapeUrl && (returnValue += wrapAnsiHyperlink("")), escapeCode && code && (returnValue += wrapAnsiCode(code))) : character === `
2954
- ` && (escapeCode && code && (returnValue += wrapAnsiCode(escapeCode)), escapeUrl && (returnValue += wrapAnsiHyperlink(escapeUrl))), preStringIndex += character.length;
2955
- }
2956
- return returnValue;
2957
- };
2958
- function wrapAnsi(string, columns, options) {
2959
- return String(string).normalize().replaceAll(`\r
2960
- `, `
2961
- `).split(`
2962
- `).map((line) => exec(line, columns, options)).join(`
2963
- `);
2964
- }
2965
-
2966
- // src/node-logger/wrap-utils.ts
2967
- function getTerminalWidth() {
2968
- try {
2969
- return process.stdout.columns > 0 ? process.stdout.columns : 80;
2970
- } catch {
2971
- return 80;
2972
- }
2973
- }
2974
- var URL_REGEX = /(https?:\/\/[^\s\u0000-\u001F\u007F]+)/g;
2975
- function getVisibleLength(str) {
2976
- return stripVTControlCharacters2(str).length;
2977
- }
2978
- function getEnvFromTerminal(key) {
2979
- return (process.env[key] || "").trim();
2980
- }
2981
- function supportsHyperlinks() {
2982
- try {
2983
- let termProgram = getEnvFromTerminal("TERM_PROGRAM"), termProgramVersion = getEnvFromTerminal("TERM_PROGRAM_VERSION");
2984
- switch (termProgram) {
2985
- case "iTerm.app":
2986
- if (termProgramVersion.trim()) {
2987
- let version = termProgramVersion.trim().split(".").map(Number);
2988
- return version[0] > 3 || version[0] === 3 && version[1] >= 1;
2989
- }
2990
- return !0;
2991
- // Assume recent version
2992
- case "Apple_Terminal":
2993
- return !1;
2994
- default:
2995
- return !0;
2996
- }
2997
- } catch {
2998
- return !1;
2999
- }
3000
- }
3001
- function protectUrls(text2, options) {
3002
- let defaultMaxUrlLength = Math.floor(getTerminalWidth() * 0.8), maxLineWidth = options?.maxLineWidth ?? getTerminalWidth(), useHyperlinks = supportsHyperlinks();
3003
- return text2.replace(URL_REGEX, (match, capturedUrl, offset) => {
3004
- if (!useHyperlinks)
3005
- return match;
3006
- let searchPos = 0;
3007
- for (; ; ) {
3008
- let hyperlinkStart = text2.indexOf("\x1B]8;;", searchPos);
3009
- if (hyperlinkStart === -1)
3010
- break;
3011
- let hyperlinkEnd = text2.indexOf("\x1B]8;;\x07", hyperlinkStart);
3012
- if (hyperlinkEnd === -1) {
3013
- searchPos = hyperlinkStart + 1;
3014
- continue;
3015
- }
3016
- if (offset >= hyperlinkStart && offset < hyperlinkEnd + 7)
3017
- return match;
3018
- searchPos = hyperlinkEnd + 1;
3019
- }
3020
- let textBeforeUrl = text2.substring(0, offset), lastNewlineIndex = textBeforeUrl.lastIndexOf(`
3021
- `), currentLinePrefix = lastNewlineIndex === -1 ? textBeforeUrl : textBeforeUrl.substring(lastNewlineIndex + 1), prefixLength = getVisibleLength(currentLinePrefix), availableSpace = maxLineWidth - prefixLength, minUrlLength = 20, configuredMax = options?.maxUrlLength ?? defaultMaxUrlLength, effectiveMaxLength = Math.min(configuredMax, defaultMaxUrlLength, availableSpace);
3022
- if ((capturedUrl.length <= minUrlLength || effectiveMaxLength < minUrlLength) && (effectiveMaxLength = capturedUrl.length), capturedUrl.length > effectiveMaxLength) {
3023
- let truncatedText = capturedUrl.substring(0, effectiveMaxLength - 3) + "...";
3024
- return `\x1B]8;;${capturedUrl}\x07${truncatedText}\x1B]8;;\x07`;
3025
- }
3026
- return `\x1B]8;;${capturedUrl}\x07${capturedUrl}\x1B]8;;\x07`;
3027
- });
3028
- }
3029
- function createHyperlink(title, url) {
3030
- return supportsHyperlinks() ? `\x1B]8;;${url}\x07${title}\x1B]8;;\x07` : `${title}: ${url}`;
3031
- }
3032
- function splitTextPreservingUrls(text2) {
3033
- let parts = [], lastIndex = 0, match;
3034
- for (URL_REGEX.lastIndex = 0; (match = URL_REGEX.exec(text2)) !== null; ) {
3035
- if (match.index > lastIndex) {
3036
- let beforeUrl = text2.slice(lastIndex, match.index);
3037
- parts.push(...beforeUrl.split(" ").filter((part) => part.length > 0));
3038
- }
3039
- parts.push(match[0]), lastIndex = match.index + match[0].length;
3040
- }
3041
- if (lastIndex < text2.length) {
3042
- let remaining = text2.slice(lastIndex);
3043
- parts.push(...remaining.split(" ").filter((part) => part.length > 0));
3044
- }
3045
- return parts;
3046
- }
3047
- var MAX_OPTIMAL_WIDTH = 80;
3048
- function getOptimalWidth(width) {
3049
- return Math.min(width, MAX_OPTIMAL_WIDTH);
3050
- }
3051
- function wrapTextForClack(text2, width) {
3052
- let terminalWidth = width || getTerminalWidth(), contentWidth = Math.max(terminalWidth - 10, 40), maxOptimalWidth = getOptimalWidth(contentWidth), protectedText = protectUrls(text2, { maxLineWidth: maxOptimalWidth });
3053
- return wrapAnsi(protectedText, maxOptimalWidth);
3054
- }
3055
- function wrapTextForClackHint(text2, width, label, _indentSpaces = 4) {
3056
- let terminalWidth = width || getTerminalWidth(), reservedSpaceFirstLine = 8 + (label ? getVisibleLength(label) : 0), firstLineWidth = Math.min(
3057
- MAX_OPTIMAL_WIDTH - reservedSpaceFirstLine,
3058
- Math.max(terminalWidth - reservedSpaceFirstLine, 30)
3059
- ), indentSpaces = _indentSpaces, continuationLineWidth = getOptimalWidth(Math.max(terminalWidth - indentSpaces, 30)), protectedText = protectUrls(text2, { maxLineWidth: continuationLineWidth }), initialWrap = wrapAnsi(protectedText, continuationLineWidth), lines = initialWrap.split(`
3060
- `);
3061
- if (lines.length > 0 && getVisibleLength(lines[0]) > firstLineWidth) {
3062
- let words = splitTextPreservingUrls(text2), firstLinePart = "", remainingPart = "";
3063
- for (let i = 0; i < words.length; i++) {
3064
- let testLine = i === 0 ? words[i] : firstLinePart + " " + words[i];
3065
- if (getVisibleLength(testLine) <= firstLineWidth)
3066
- firstLinePart = testLine;
3067
- else {
3068
- remainingPart = words.slice(i).join(" ");
3069
- break;
3070
- }
3071
- }
3072
- !firstLinePart && words.length > 0 && (firstLinePart = words[0], remainingPart = words.slice(1).join(" "));
3073
- let finalLines = [firstLinePart];
3074
- if (remainingPart.trim()) {
3075
- let protectedRemainder = protectUrls(remainingPart.trim(), {
3076
- maxLineWidth: continuationLineWidth
3077
- }), wrappedRemainder = wrapAnsi(protectedRemainder, continuationLineWidth);
3078
- finalLines = finalLines.concat(wrappedRemainder.split(`
3079
- `));
3080
- }
3081
- if (finalLines.length <= 1)
3082
- return finalLines[0] || "";
3083
- let indentation2 = indentSpaces > 0 ? (0, import_picocolors3.reset)((0, import_picocolors3.cyan)(d)) + " ".repeat(indentSpaces) : "";
3084
- return finalLines.map((line, index) => index === 0 ? line : `${indentation2}${(0, import_picocolors3.dim)(line)}`).join(`
3085
- `);
3086
- }
3087
- if (lines.length <= 1)
3088
- return initialWrap;
3089
- let indentation = (0, import_picocolors3.reset)((0, import_picocolors3.cyan)(d)) + " ".repeat(indentSpaces);
3090
- return lines.map((line, index) => index === 0 ? line : `${indentation}${(0, import_picocolors3.dim)(line)}`).join(`
3091
- `);
3092
- }
3093
-
3094
- // src/node-logger/prompts/prompt-provider-base.ts
3095
- var PromptProvider = class {
3096
- };
3097
-
3098
- // src/node-logger/prompts/prompt-provider-clack.ts
3099
- var getCurrentTaskLog = () => globalThis.FORKBOOK_CURRENT_TASK_LOG ? globalThis.FORKBOOK_CURRENT_TASK_LOG[globalThis.FORKBOOK_CURRENT_TASK_LOG.length - 1] : null, setCurrentTaskLog = (taskLog2) => {
3100
- globalThis.FORKBOOK_CURRENT_TASK_LOG = [...globalThis.FORKBOOK_CURRENT_TASK_LOG || [], taskLog2];
3101
- }, clearCurrentTaskLog = () => {
3102
- globalThis.FORKBOOK_CURRENT_TASK_LOG && globalThis.FORKBOOK_CURRENT_TASK_LOG.pop();
3103
- }, formatTaskLogMessage = (message) => {
3104
- let columns = process.stdout.columns || 80, rows = (length) => Math.ceil((length + 3) / columns);
3105
- return message.split(`
3106
- `).map((line) => {
3107
- let plain = stripVTControlCharacters3(line);
3108
- return rows(line.length) === rows(plain.length) ? line : plain;
3109
- }).join(`
3110
- `);
3111
- }, ClackPromptProvider = class extends PromptProvider {
3112
- async handleCancel(result, promptOptions) {
3113
- Ct(result) && (promptOptions?.onCancel ? await promptOptions.onCancel() : (Nt("Operation canceled."), process.exit(0)));
3114
- }
3115
- async text(options, promptOptions) {
3116
- let result = await Qt(options);
3117
- return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), result.toString();
3118
- }
3119
- async confirm(options, promptOptions) {
3120
- let result = await Mt2({
3121
- ...options,
3122
- message: wrapTextForClackHint(options.message, void 0, void 0, 2)
3123
- });
3124
- return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), !!result;
3125
- }
3126
- async select(options, promptOptions) {
3127
- let result = await qt({
3128
- ...options,
3129
- message: wrapTextForClackHint(options.message, void 0, void 0, 2)
3130
- });
3131
- return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), result;
3132
- }
3133
- async multiselect(options, promptOptions) {
3134
- let result = await Lt2({
3135
- ...options,
3136
- required: options.required
3137
- });
3138
- return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), result;
3139
- }
3140
- spinner(options) {
3141
- let task = we(), spinnerId = `${options.id}-spinner`;
3142
- return {
3143
- start: (message) => {
3144
- logTracker.addLog("info", `${spinnerId}-start: ${message}`), task.start(message);
3145
- },
3146
- message: (message) => {
3147
- logTracker.addLog("info", `${spinnerId}: ${message}`), task.message(message);
3148
- },
3149
- stop: (message) => {
3150
- logTracker.addLog("info", `${spinnerId}-stop: ${message}`), task.stop(message);
3151
- },
3152
- cancel: (message) => {
3153
- logTracker.addLog("info", `${spinnerId}-cancel: ${message}`), task.cancel(message);
3154
- },
3155
- error: (message) => {
3156
- logTracker.addLog("error", `${spinnerId}-error: ${message}`), task.error(message);
3157
- }
3158
- };
3159
- }
3160
- taskLog(options) {
3161
- let isCurrentTaskActive = !!getCurrentTaskLog(), task = getCurrentTaskLog() || zt({ limit: 10, retainLog: !0, ...options }), taskId = `${options.id}-task`;
3162
- return logTracker.addLog("info", `${taskId}-start: ${options.title}`), isCurrentTaskActive || setCurrentTaskLog(task), {
3163
- message: (message) => {
3164
- logTracker.addLog("info", `${taskId}: ${message}`), task.message(formatTaskLogMessage(message));
3165
- },
3166
- error: (message) => {
3167
- logTracker.addLog("error", `${taskId}-error: ${message}`), task.error(message, { showLog: !0 }), clearCurrentTaskLog();
3168
- },
3169
- success: (message, options2) => {
3170
- logTracker.addLog("info", `${taskId}-success: ${message}`), isCurrentTaskActive || task.success(message, options2), clearCurrentTaskLog();
3171
- },
3172
- group(title) {
3173
- logTracker.addLog("info", `${taskId}-group: ${title}`);
3174
- let group = task.group(title);
3175
- return setCurrentTaskLog(group), {
3176
- message: (message) => {
3177
- group.message(message);
3178
- },
3179
- success: (message) => {
3180
- group.success(message), clearCurrentTaskLog();
3181
- },
3182
- error: (message) => {
3183
- group.error(message), clearCurrentTaskLog();
3184
- }
3185
- };
3186
- }
3187
- };
3188
- }
3189
- };
3190
-
3191
- // src/node-logger/prompts/prompt-config.ts
3192
- var PROVIDERS = {
3193
- clack: new ClackPromptProvider()
3194
- }, currentPromptLibrary = "clack", setPromptLibrary = (library) => {
3195
- currentPromptLibrary = library;
3196
- }, getPromptLibrary = () => currentPromptLibrary, getPromptProvider = () => PROVIDERS[currentPromptLibrary], isClackEnabled = () => currentPromptLibrary === "clack", getPreferredStdio = () => isClackEnabled() ? "pipe" : "inherit";
3197
-
3198
- // src/node-logger/logger/colors.ts
3199
- var import_picocolors4 = __toESM(require_picocolors(), 1), CLI_COLORS = {
3200
- success: import_picocolors4.default.green,
3201
- error: import_picocolors4.default.red,
3202
- warning: import_picocolors4.default.yellow,
3203
- // Improve contrast on dark terminals by using cyan for info on all platforms
3204
- info: import_picocolors4.default.cyan,
3205
- debug: import_picocolors4.default.gray,
3206
- // Only color a link if it is the primary call to action, otherwise links shouldn't be colored
3207
- cta: import_picocolors4.default.cyan,
3208
- muted: import_picocolors4.default.dim,
3209
- storybook: (text2) => `\x1B[38;2;255;71;133m${text2}\x1B[39m`
3210
- };
3211
-
3212
- // src/node-logger/logger/logger.ts
3213
- var createLogFunction = (clackFn, consoleFn, cliColors) => () => isClackEnabled() ? (...args) => {
3214
- let [message, ...rest] = args, currentTaskLog = getCurrentTaskLog();
3215
- currentTaskLog ? currentTaskLog.message(
3216
- cliColors && typeof message == "string" ? cliColors(message) : message
3217
- ) : typeof message == "string" ? clackFn(wrapTextForClack(message), ...rest) : clackFn(message, ...rest);
3218
- } : consoleFn, LOG_FUNCTIONS = {
3219
- log: createLogFunction(R2.message, console.log),
3220
- info: createLogFunction(R2.info, console.log),
3221
- warn: createLogFunction(R2.warn, console.warn, CLI_COLORS.warning),
3222
- error: createLogFunction(R2.error, console.error, CLI_COLORS.error),
3223
- intro: createLogFunction(Pt, console.log),
3224
- outro: createLogFunction(Wt2, console.log),
3225
- step: createLogFunction(R2.step, console.log)
3226
- }, LOG_LEVELS = {
3227
- trace: 1,
3228
- debug: 2,
3229
- info: 3,
3230
- warn: 4,
3231
- error: 5,
3232
- silent: 10
3233
- }, currentLogLevel = "info", setLogLevel = (level) => {
3234
- currentLogLevel = level;
3235
- }, getLogLevel = () => currentLogLevel, shouldLog = (level) => LOG_LEVELS[currentLogLevel] <= LOG_LEVELS[level];
3236
- function getMinimalTrace() {
3237
- let stack = new Error().stack;
3238
- if (!stack)
3239
- return;
3240
- let userStackLines = stack.split(`
3241
- `).slice(1).filter(
3242
- (line) => !["getMinimalTrace", "createLogger", "logFunction"].some((fn) => line.includes(fn))
3243
- );
3244
- return userStackLines.length === 0 ? void 0 : `
3245
- ` + userStackLines.slice(0, 4).join(`
3246
- `);
3247
- }
3248
- var formatLogMessage = (args) => args.map((arg) => typeof arg == "string" ? arg : typeof arg == "object" ? JSON.stringify(arg, null, 2) : String(arg)).join(" ");
3249
- function createLogger(level, logFn, prefix) {
3250
- return function(...args) {
3251
- let [message, ...rest] = args, msg = formatLogMessage([message]);
3252
- if (logTracker.addLog(level, msg), level === "prompt" && (level = "info"), shouldLog(level)) {
3253
- let formattedMessage = prefix ? `${prefix} ${msg}` : message;
3254
- logFn(formattedMessage, ...rest);
3255
- }
3256
- };
3257
- }
3258
- var debug = createLogger(
3259
- "debug",
3260
- function(message) {
3261
- shouldLog("trace") && (message += getMinimalTrace()), LOG_FUNCTIONS.log()(message);
3262
- },
3263
- "[DEBUG]"
3264
- ), log = createLogger(
3265
- "info",
3266
- (...args) => LOG_FUNCTIONS.log()(...args)
3267
- ), info = createLogger(
3268
- "info",
3269
- (...args) => LOG_FUNCTIONS.info()(...args)
3270
- ), warn = createLogger(
3271
- "warn",
3272
- (...args) => LOG_FUNCTIONS.warn()(...args)
3273
- ), error = createLogger(
3274
- "error",
3275
- (...args) => LOG_FUNCTIONS.error()(...args)
3276
- ), logBox = (message, { title, ...options } = {}) => {
3277
- try {
3278
- shouldLog("info") && (logTracker.addLog("info", message), isClackEnabled() ? Tt2(message, title, {
3279
- ...options,
3280
- width: options.width ?? "auto"
3281
- }) : console.log(message));
3282
- } catch {
3283
- R2.message(message);
3284
- }
3285
- }, intro = (message) => {
3286
- logTracker.addLog("info", message), shouldLog("info") && (console.log(""), LOG_FUNCTIONS.intro()(message));
3287
- }, outro = (message) => {
3288
- logTracker.addLog("info", message), shouldLog("info") && LOG_FUNCTIONS.outro()(message);
3289
- }, step = (message) => {
3290
- logTracker.addLog("info", message), shouldLog("info") && LOG_FUNCTIONS.step()(message);
3291
- }, SYMBOLS = {
3292
- success: CLI_COLORS.success("\u2714"),
3293
- error: CLI_COLORS.error("\u2715")
3294
- };
3295
-
3296
- // src/node-logger/logger/console.ts
3297
- var import_picocolors5 = __toESM(require_picocolors(), 1);
3298
- var ConsoleLogger = class _ConsoleLogger {
3299
- constructor() {
3300
- this.Console = _ConsoleLogger;
3301
- this.timers = /* @__PURE__ */ new Map();
3302
- this.counters = /* @__PURE__ */ new Map();
3303
- this.lastStatusLine = null;
3304
- this.statusLineCount = 0;
3305
- }
3306
- // These will be overridden by child classes
3307
- get prefix() {
3308
- return "";
3309
- }
3310
- get color() {
3311
- return (text2) => text2;
3312
- }
3313
- formatMessage(...data) {
3314
- let message = data.join(" ");
3315
- return this.prefix ? `${this.color(this.prefix)} ${message}` : message;
3316
- }
3317
- assert(condition, ...data) {
3318
- condition || error(this.formatMessage("Assertion failed:", ...data));
3319
- }
3320
- // Needs some proper implementation
3321
- // Take a look at https://github.com/webpack/webpack/blob/5f898719ae47b89bee3c126bf5d2e0081ea8c91f/lib/node/nodeConsole.js#L4
3322
- // for some inspiration
3323
- // status(...data: any[]): void {
3324
- // const message = this.formatMessage(...data);
3325
- // // If we have a previous status line, we need to clear it
3326
- // if (this.lastStatusLine !== null) {
3327
- // this.clearStatus();
3328
- // }
3329
- // // Write the status message directly to stdout without adding newlines
3330
- // process.stdout.write(message);
3331
- // // Update tracking variables
3332
- // this.lastStatusLine = message;
3333
- // this.statusLineCount = 1; // For now, assume single line status messages
3334
- // // If the message contains newlines, count them
3335
- // const newlineCount = (message.match(/\n/g) || []).length;
3336
- // this.statusLineCount = newlineCount + 1;
3337
- // }
3338
- // /** Clears the current status line if one exists */
3339
- // clearStatus(): void {
3340
- // if (this.lastStatusLine !== null) {
3341
- // // Move cursor to the beginning of the current line
3342
- // process.stdout.write('\r');
3343
- // // Clear the current line
3344
- // process.stdout.clearLine(1);
3345
- // // Reset tracking variables
3346
- // this.lastStatusLine = null;
3347
- // this.statusLineCount = 0;
3348
- // }
3349
- // }
3350
- /**
3351
- * The **`console.clear()`** static method clears the console if possible.
3352
- *
3353
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static)
3354
- */
3355
- clear() {
3356
- console.clear();
3357
- }
3358
- /**
3359
- * The **`console.count()`** static method logs the number of times that this particular call to
3360
- * `count()` has been called.
3361
- *
3362
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
3363
- */
3364
- count(label) {
3365
- let key = label || "default", currentCount = (this.counters.get(key) || 0) + 1;
3366
- this.counters.set(key, currentCount), log(this.formatMessage(`${key}: ${currentCount}`));
3367
- }
3368
- /**
3369
- * The **`console.countReset()`** static method resets counter used with console/count_static.
3370
- *
3371
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
3372
- */
3373
- countReset(label) {
3374
- let key = label || "default";
3375
- this.counters.delete(key);
3376
- }
3377
- /**
3378
- * The **`console.debug()`** static method outputs a message to the console at the 'debug' log
3379
- * level.
3380
- *
3381
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
3382
- */
3383
- debug(...data) {
3384
- process.stdout.write(`
3385
- `), debug(this.formatMessage(...data));
3386
- }
3387
- /**
3388
- * The **`console.dir()`** static method displays a list of the properties of the specified
3389
- * JavaScript object.
3390
- *
3391
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
3392
- */
3393
- dir(item, options) {
3394
- console.dir(item, options);
3395
- }
3396
- /**
3397
- * The **`console.dirxml()`** static method displays an interactive tree of the descendant
3398
- * elements of the specified XML/HTML element.
3399
- *
3400
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
3401
- */
3402
- dirxml(...data) {
3403
- console.dirxml(...data);
3404
- }
3405
- /**
3406
- * The **`console.error()`** static method outputs a message to the console at the 'error' log
3407
- * level.
3408
- *
3409
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
3410
- */
3411
- error(...data) {
3412
- process.stdout.write(`
3413
- `), error(this.formatMessage(...data));
3414
- }
3415
- /**
3416
- * The **`console.group()`** static method creates a new inline group in the Web console log,
3417
- * causing any subsequent console messages to be indented by an additional level, until
3418
- * console/groupEnd_static is called.
3419
- *
3420
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
3421
- */
3422
- group(...data) {
3423
- console.group(...data);
3424
- }
3425
- /**
3426
- * The **`console.groupCollapsed()`** static method creates a new inline group in the console.
3427
- *
3428
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
3429
- */
3430
- groupCollapsed(...data) {
3431
- console.groupCollapsed(...data);
3432
- }
3433
- /**
3434
- * The **`console.groupEnd()`** static method exits the current inline group in the console.
3435
- *
3436
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
3437
- */
3438
- groupEnd() {
3439
- console.groupEnd();
3440
- }
3441
- /**
3442
- * The **`console.info()`** static method outputs a message to the console at the 'info' log
3443
- * level.
3444
- *
3445
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
3446
- */
3447
- info(...data) {
3448
- process.stdout.write(`
3449
- `), log(this.formatMessage(...data));
3450
- }
3451
- /**
3452
- * The **`console.log()`** static method outputs a message to the console.
3453
- *
3454
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
3455
- */
3456
- log(...data) {
3457
- process.stdout.write(`
3458
- `), log(this.formatMessage(...data));
3459
- }
3460
- /**
3461
- * The **`console.table()`** static method displays tabular data as a table.
3462
- *
3463
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static)
3464
- */
3465
- table(tabularData, properties) {
3466
- console.table(tabularData, properties);
3467
- }
3468
- /**
3469
- * The **`console.time()`** static method starts a timer you can use to track how long an
3470
- * operation takes.
3471
- *
3472
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
3473
- */
3474
- time(label) {
3475
- let key = label || "default";
3476
- this.timers.set(key, Date.now());
3477
- }
3478
- /**
3479
- * The **`console.timeEnd()`** static method stops a timer that was previously started by calling
3480
- * console/time_static.
3481
- *
3482
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
3483
- */
3484
- timeEnd(label) {
3485
- let key = label || "default", startTime = this.timers.get(key);
3486
- if (startTime) {
3487
- let duration = Date.now() - startTime;
3488
- log(this.formatMessage(`${key}: ${duration}ms`)), this.timers.delete(key);
3489
- } else
3490
- warn(this.formatMessage(`Timer '${key}' does not exist`));
3491
- }
3492
- /**
3493
- * The **`console.timeLog()`** static method logs the current value of a timer that was previously
3494
- * started by calling console/time_static.
3495
- *
3496
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
3497
- */
3498
- timeLog(label, ...data) {
3499
- let key = label || "default", startTime = this.timers.get(key);
3500
- if (startTime) {
3501
- let duration = Date.now() - startTime;
3502
- log(this.formatMessage(`${key}: ${duration}ms`, ...data));
3503
- } else
3504
- warn(this.formatMessage(`Timer '${key}' does not exist`));
3505
- }
3506
- timeStamp(label) {
3507
- let timestamp = (/* @__PURE__ */ new Date()).toISOString();
3508
- log(this.formatMessage(`[${timestamp}]${label ? ` ${label}` : ""}`));
3509
- }
3510
- /**
3511
- * The **`console.trace()`** static method outputs a stack trace to the console.
3512
- *
3513
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static)
3514
- */
3515
- trace(...data) {
3516
- console.trace(...data);
3517
- }
3518
- /**
3519
- * The **`console.warn()`** static method outputs a warning message to the console at the
3520
- * 'warning' log level.
3521
- *
3522
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
3523
- */
3524
- warn(...data) {
3525
- process.stdout.write(`
3526
- `), warn(this.formatMessage(...data));
3527
- }
3528
- profile(label) {
3529
- console.profile(label), log(this.formatMessage(`Profile started: ${label}`));
3530
- }
3531
- profileEnd(label) {
3532
- console.profileEnd(label), log(this.formatMessage(`Profile ended: ${label}`));
3533
- }
3534
- }, StyledConsoleLogger = class extends ConsoleLogger {
3535
- constructor(options) {
3536
- super(), this._prefix = options.prefix || "", this._color = options.color;
3537
- }
3538
- // Override the getter methods from parent class
3539
- get prefix() {
3540
- return this._prefix;
3541
- }
3542
- get color() {
3543
- return import_picocolors5.default[this._color];
3544
- }
3545
- };
3546
-
3547
- // src/node-logger/prompts/prompt-functions.ts
3548
- var prompt_functions_exports = {};
3549
- __export(prompt_functions_exports, {
3550
- confirm: () => confirm,
3551
- multiselect: () => multiselect,
3552
- select: () => select,
3553
- spinner: () => spinner,
3554
- taskLog: () => taskLog,
3555
- text: () => text
3556
- });
3557
- var activeSpinner = null, activeTaskLog = null, originalConsoleLog = null;
3558
- if (typeof process.stdout.columns == "number" && !(process.stdout.columns > 0))
3559
- try {
3560
- process.stdout.columns = getTerminalWidth();
3561
- } catch {
3562
- }
3563
- var isInteractiveTerminal = () => process.stdout.isTTY && process.stdin.isTTY && !process.env.CI, patchConsoleLog = () => {
3564
- originalConsoleLog || (originalConsoleLog = console.log, console.log = (...args) => {
3565
- let message = args.map((arg) => typeof arg == "string" ? arg : JSON.stringify(arg)).join(" ");
3566
- activeTaskLog ? shouldLog("info") && activeTaskLog.message(message) : activeSpinner ? shouldLog("info") && activeSpinner.message(message) : originalConsoleLog(...args);
3567
- });
3568
- }, restoreConsoleLog = () => {
3569
- originalConsoleLog && !activeSpinner && !activeTaskLog && (console.log = originalConsoleLog, originalConsoleLog = null);
3570
- }, text = async (options, promptOptions) => getPromptProvider().text(options, promptOptions), confirm = async (options, promptOptions) => getPromptProvider().confirm(options, promptOptions), select = async (options, promptOptions) => getPromptProvider().select(options, promptOptions), multiselect = async (options, promptOptions) => getPromptProvider().multiselect(
3571
- {
3572
- ...options,
3573
- options: options.options.map((opt) => ({
3574
- ...opt,
3575
- hint: opt.hint ? wrapTextForClackHint(opt.hint, void 0, opt.label || String(opt.value), 0) : void 0
3576
- }))
3577
- },
3578
- promptOptions
3579
- ), spinner = (options) => {
3580
- if (isInteractiveTerminal()) {
3581
- let spinnerInstance = getPromptProvider().spinner(options), wrappedSpinner = {
3582
- start: (message) => {
3583
- activeSpinner = wrappedSpinner, patchConsoleLog(), shouldLog("info") && spinnerInstance.start(message);
3584
- },
3585
- stop: (message) => {
3586
- activeSpinner = null, restoreConsoleLog(), shouldLog("info") && spinnerInstance.stop(message);
3587
- },
3588
- cancel: (message) => {
3589
- activeSpinner = null, restoreConsoleLog(), shouldLog("info") && spinnerInstance.cancel(message);
3590
- },
3591
- error: (message) => {
3592
- activeSpinner = null, restoreConsoleLog(), shouldLog("error") && spinnerInstance.error(message);
3593
- },
3594
- message: (text2) => {
3595
- shouldLog("info") && spinnerInstance.message(text2);
3596
- }
3597
- };
3598
- return wrappedSpinner;
3599
- } else {
3600
- let maybeLog = shouldLog("info") ? log : (_2) => {
3601
- };
3602
- return {
3603
- start: (message) => {
3604
- message && maybeLog(message);
3605
- },
3606
- stop: (message) => {
3607
- message && maybeLog(message);
3608
- },
3609
- cancel: (message) => {
3610
- message && maybeLog(message);
3611
- },
3612
- error: (message) => {
3613
- message && shouldLog("error") && error(message);
3614
- },
3615
- message: (message) => {
3616
- maybeLog(message);
3617
- }
3618
- };
3619
- }
3620
- }, taskLog = (options) => {
3621
- if (isInteractiveTerminal() && shouldLog("info")) {
3622
- let task = getPromptProvider().taskLog(options), wrappedTaskLog = {
3623
- message: (message) => {
3624
- task.message(wrapTextForClack(message));
3625
- },
3626
- success: (message, options2) => {
3627
- activeTaskLog = null, restoreConsoleLog(), task.success(message, options2);
3628
- },
3629
- error: (message) => {
3630
- activeTaskLog = null, restoreConsoleLog(), task.error(message);
3631
- },
3632
- group: function(title) {
3633
- return this.message(`
3634
- ${title}
3635
- `), {
3636
- message: (message) => {
3637
- task.message(wrapTextForClack(message));
3638
- },
3639
- success: (message) => {
3640
- task.success(message);
3641
- },
3642
- error: (message) => {
3643
- task.error(message);
3644
- }
3645
- };
3646
- }
3647
- };
3648
- return activeTaskLog = wrappedTaskLog, patchConsoleLog(), wrappedTaskLog;
3649
- } else {
3650
- let maybeLog = shouldLog("info") ? log : (_2) => {
3651
- };
3652
- return {
3653
- message: (message) => {
3654
- maybeLog(message);
3655
- },
3656
- success: (message) => {
3657
- maybeLog(message);
3658
- },
3659
- error: (message) => {
3660
- maybeLog(message);
3661
- },
3662
- group: (title) => (maybeLog(`
3663
- ${title}
3664
- `), {
3665
- message: (message) => {
3666
- maybeLog(message);
3667
- },
3668
- success: (message) => {
3669
- maybeLog(message);
3670
- },
3671
- error: (message) => {
3672
- maybeLog(message);
3673
- }
3674
- })
3675
- };
3676
- }
3677
- };
3678
-
3679
- // src/node-logger/tasks.ts
3680
- function setupAbortController() {
3681
- let abortController = new AbortController(), isRawMode = !1, wasRawMode = process.stdin.isRaw, onKeyPress = (chunk) => {
3682
- let key = chunk.toString();
3683
- (key === "c" || key === "C") && abortController.abort();
3684
- }, cleanup = () => {
3685
- isRawMode && (process.stdin.setRawMode(wasRawMode ?? !1), process.stdin.removeListener("data", onKeyPress), wasRawMode || process.stdin.pause());
3686
- };
3687
- if (process.stdin.isTTY)
3688
- try {
3689
- isRawMode = !0, process.stdin.setRawMode(!0), process.stdin.resume(), process.stdin.on("data", onKeyPress);
3690
- } catch {
3691
- isRawMode = !1;
3692
- }
3693
- return { abortController, cleanup };
3694
- }
3695
- var executeTask = async (childProcessFactories, {
3696
- intro: intro2,
3697
- error: error2,
3698
- success,
3699
- abortable = !1
3700
- }) => {
3701
- logTracker.addLog("info", intro2), log(intro2);
3702
- let abortController, cleanup;
3703
- if (abortable) {
3704
- let result = setupAbortController();
3705
- abortController = result.abortController, cleanup = result.cleanup;
3706
- }
3707
- let factories = Array.isArray(childProcessFactories) ? childProcessFactories : [childProcessFactories];
3708
- try {
3709
- for (let factory of factories) {
3710
- let childProcess = factory(abortController?.signal);
3711
- childProcess.stdout?.on("data", (data) => {
3712
- let message = data.toString().trim();
3713
- logTracker.addLog("info", message), log(message);
3714
- }), await childProcess;
3715
- }
3716
- logTracker.addLog("info", success), log(CLI_COLORS.success(success));
3717
- } catch (err) {
3718
- if (abortController?.signal.aborted || err.message?.includes("Command was killed with SIGINT") || err.message?.includes("The operation was aborted"))
3719
- return logTracker.addLog("info", `${intro2} aborted`), log(CLI_COLORS.error(`${intro2} aborted`)), "aborted";
3720
- let errorMessage = err instanceof Error ? err.stack ?? err.message : String(err);
3721
- throw logTracker.addLog("error", error2, { error: errorMessage }), log(CLI_COLORS.error(String(err.message ?? err))), err;
3722
- } finally {
3723
- cleanup?.();
3724
- }
3725
- }, executeTaskWithSpinner = async (childProcessFactories, {
3726
- id,
3727
- intro: intro2,
3728
- error: error2,
3729
- success,
3730
- abortable = !1
3731
- }) => {
3732
- logTracker.addLog("info", intro2);
3733
- let abortController, cleanup;
3734
- if (abortable) {
3735
- let result = setupAbortController();
3736
- abortController = result.abortController, cleanup = result.cleanup;
3737
- }
3738
- let task = spinner({ id });
3739
- task.start(intro2);
3740
- let factories = Array.isArray(childProcessFactories) ? childProcessFactories : [childProcessFactories];
3741
- try {
3742
- for (let factory of factories) {
3743
- let childProcess = factory(abortController?.signal);
3744
- childProcess.stdout?.on("data", (data) => {
3745
- let message = data.toString().trim().slice(0, 25);
3746
- logTracker.addLog("info", `${intro2}: ${data.toString()}`), task.message(`${intro2}: ${message}`);
3747
- }), await childProcess;
3748
- }
3749
- logTracker.addLog("info", success), task.stop(success);
3750
- } catch (err) {
3751
- if (abortController?.signal.aborted || err.message?.includes("Command was killed with SIGINT") || err.message?.includes("The operation was aborted"))
3752
- return logTracker.addLog("info", `${intro2} aborted`), task.cancel(CLI_COLORS.warning(`${intro2} aborted`)), "aborted";
3753
- let errorMessage = err instanceof Error ? err.stack ?? err.message : String(err);
3754
- throw logTracker.addLog("error", error2, { error: errorMessage }), task.error(CLI_COLORS.error(error2)), err;
3755
- } finally {
3756
- cleanup?.();
3757
- }
3758
- };
3759
-
3760
- // src/node-logger/prompts/index.ts
3761
- var prompt = {
3762
- ...prompt_functions_exports,
3763
- ...prompt_config_exports,
3764
- executeTask,
3765
- executeTaskWithSpinner
3766
- };
3767
-
3768
- // src/node-logger/index.ts
3769
- import_npmlog.default.stream = process.stdout;
3770
- var toNpmLogLevel = (level) => {
3771
- switch (level) {
3772
- case "trace":
3773
- return "silly";
3774
- case "debug":
3775
- return "verbose";
3776
- default:
3777
- return level;
3778
- }
3779
- }, setLoggerLevel = (level = "info") => {
3780
- import_npmlog.default.level = toNpmLogLevel(level), setLogLevel(level);
3781
- };
3782
- function hex(hexColor) {
3783
- if (!/^#?[0-9A-Fa-f]{6}$/.test(hexColor))
3784
- throw new Error("Invalid hex color. It must be a 6-character hex code.");
3785
- hexColor.startsWith("#") && (hexColor = hexColor.slice(1));
3786
- let r = parseInt(hexColor.slice(0, 2), 16), g = parseInt(hexColor.slice(2, 4), 16), b = parseInt(hexColor.slice(4, 6), 16);
3787
- return (text2) => `\x1B[38;2;${r};${g};${b}m${text2}\x1B[39m`;
3788
- }
3789
- var colors = {
3790
- pink: hex("#F1618C"),
3791
- purple: hex("#B57EE5"),
3792
- orange: hex("#F3AD38"),
3793
- green: hex("#A2E05E"),
3794
- blue: hex("#6DABF5"),
3795
- red: hex("#F16161"),
3796
- gray: hex("#B8C2CC")
3797
- }, logger = {
3798
- ...logger_exports,
3799
- verbose: (message) => debug(message),
3800
- line: (count = 1) => log(`${Array(count - 1).fill(`
3801
- `)}`),
3802
- /** For non-critical issues or warnings */
3803
- warn: (message) => warn(message),
3804
- trace: ({ message, time }) => debug(`${message} (${colors.purple((0, import_pretty_hrtime.default)(time))})`),
3805
- setLevel: setLoggerLevel,
3806
- setLogLevel: setLoggerLevel,
3807
- error: (message) => {
3808
- let msg;
3809
- message instanceof Error && message.stack ? msg = message.stack.toString().replace(message.toString(), colors.red(message.toString())) : typeof message == "string" ? msg = message.toString() : msg = String(message), error(msg.replaceAll(process.cwd(), "."));
3810
- }
3811
- };
3812
- var logged = /* @__PURE__ */ new Set(), once = (type) => (message) => {
3813
- if (!logged.has(message))
3814
- return logged.add(message), logger[type](message);
3815
- };
3816
- once.clear = () => logged.clear();
3817
- once.verbose = once("verbose");
3818
- once.info = once("info");
3819
- once.warn = once("warn");
3820
- once.error = once("error");
3821
- var deprecate = once("warn");
3822
-
3823
- export {
3824
- require_pretty_hrtime,
3825
- logTracker,
3826
- protectUrls,
3827
- createHyperlink,
3828
- CLI_COLORS,
3829
- ConsoleLogger,
3830
- StyledConsoleLogger,
3831
- prompt,
3832
- import_npmlog,
3833
- colors,
3834
- logger,
3835
- once,
3836
- deprecate
3837
- };