openfox 2.0.41 → 2.0.42

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 (48) hide show
  1. package/dist/{ask-4GZ334CO.js → ask-TOBEA6KD.js} +2 -1
  2. package/dist/{auth-56SIRACI.js → auth-YY5PJYSC.js} +2 -1
  3. package/dist/{auto-config-FZFXOEEG.js → auto-config-F5Y6KAQ6.js} +2 -1
  4. package/dist/{backend-AGXWAU7A.js → backend-4HGUPY6W.js} +2 -1
  5. package/dist/{branch.api-PWFW26KC.js → branch.api-5DMEAIBI.js} +2 -1
  6. package/dist/{chat-handler-H4O7TLGM.js → chat-handler-KW4CAXTH.js} +5 -4
  7. package/dist/chunk-5WRI5ZAA.js +31 -0
  8. package/dist/{chunk-X3L37IIK.js → chunk-6ZS7YQOO.js} +24 -18
  9. package/dist/{chunk-NX6O62MR.js → chunk-LS3FQ4UQ.js} +63 -63
  10. package/dist/{chunk-JGNAYJJZ.js → chunk-NVQFIZJI.js} +2 -2
  11. package/dist/{chunk-XFMN7OFO.js → chunk-TT6LDJU5.js} +8 -8
  12. package/dist/{chunk-6KFKVGPK.js → chunk-ULZORR3T.js} +3 -3
  13. package/dist/{chunk-X6PMP7XH.js → chunk-XIBT7GFC.js} +3 -3
  14. package/dist/chunk-XY3LESVZ.js +1000 -0
  15. package/dist/cli/dev.js +3 -1
  16. package/dist/cli/index.js +3 -1
  17. package/dist/{client-XTPAYYRH.js → client-ZUL4AR4J.js} +2 -1
  18. package/dist/{client-pure-N2MOIDQ6.js → client-pure-DO3S675T.js} +2 -1
  19. package/dist/{compactor-RZA5VSRT.js → compactor-TJEAAZL3.js} +2 -1
  20. package/dist/{config-XOXIIBUY.js → config-S5CF4QU4.js} +2 -1
  21. package/dist/{events-KZZPCW2Q.js → events-THW3MYXE.js} +2 -1
  22. package/dist/{folding-ENYH4LMG.js → folding-H5C6HS7O.js} +2 -1
  23. package/dist/{http-client-SIPAW7IM.js → http-client-3OLSDU63.js} +2 -1
  24. package/dist/{inspect-proxy-UT2LFGJ5.js → inspect-proxy-BV25JERQ.js} +2 -1
  25. package/dist/{manager-W7N3XQ4Q.js → manager-R3EMNOPR.js} +2 -1
  26. package/dist/{orchestrator-IZ6VSEZT.js → orchestrator-XIGRXAEC.js} +4 -3
  27. package/dist/package.json +1 -1
  28. package/dist/{paths-X46PPOI2.js → paths-F27V3S4I.js} +2 -1
  29. package/dist/{permissions-Z2IIV2V7.js → permissions-QLHZUEGW.js} +3 -1
  30. package/dist/{processor-WQYQUIPB.js → processor-VGEPABSY.js} +5 -4
  31. package/dist/{profiles-Q36ELWQF.js → profiles-5J7F4BML.js} +2 -1
  32. package/dist/{project-creator-W6Z7KCMZ.js → project-creator-7RBHP6K6.js} +2 -1
  33. package/dist/{projects-2XSGA7JG.js → projects-BY227WT2.js} +2 -1
  34. package/dist/{protocol-BKNLAEPJ.js → protocol-CTNE3ANP.js} +2 -1
  35. package/dist/{provider-JLLIB72V.js → provider-JDI3LVYF.js} +67 -57
  36. package/dist/{provider-manager-GTWFGTCV.js → provider-manager-5UZXYOZZ.js} +2 -1
  37. package/dist/{pwa-76XP2DY2.js → pwa-M6QZ52ZO.js} +37 -31
  38. package/dist/{serve-XP3S4QDS.js → serve-J5POPC5Z.js} +6 -5
  39. package/dist/server/index.js +5 -4
  40. package/dist/{server-DKCNTFA5.js → server-NJ56QOTU.js} +5 -4
  41. package/dist/{service-FJ4TW5L7.js → service-YYJ5Y7CN.js} +3 -1
  42. package/dist/{settings-MTGCEUS7.js → settings-L2V4ZUA2.js} +2 -1
  43. package/dist/shared/index.js +1 -0
  44. package/dist/{store-OQ45KONN.js → store-SF7CDOQT.js} +2 -1
  45. package/dist/{tool-adapter-B7QP6NLA.js → tool-adapter-MOGEI6TP.js} +2 -1
  46. package/dist/{tools-X3QW7SN7.js → tools-PS5CSPGS.js} +3 -2
  47. package/dist/{url-utils-QWAHP54Q.js → url-utils-SAJP7AEX.js} +2 -1
  48. package/package.json +1 -1
@@ -0,0 +1,1000 @@
1
+ import {
2
+ __commonJS,
3
+ __toESM
4
+ } from "./chunk-5WRI5ZAA.js";
5
+
6
+ // node_modules/sisteransi/src/index.js
7
+ var require_src = __commonJS({
8
+ "node_modules/sisteransi/src/index.js"(exports, module) {
9
+ "use strict";
10
+ var ESC = "\x1B";
11
+ var CSI = `${ESC}[`;
12
+ var beep = "\x07";
13
+ var cursor = {
14
+ to(x3, y2) {
15
+ if (!y2) return `${CSI}${x3 + 1}G`;
16
+ return `${CSI}${y2 + 1};${x3 + 1}H`;
17
+ },
18
+ move(x3, y2) {
19
+ let ret = "";
20
+ if (x3 < 0) ret += `${CSI}${-x3}D`;
21
+ else if (x3 > 0) ret += `${CSI}${x3}C`;
22
+ if (y2 < 0) ret += `${CSI}${-y2}A`;
23
+ else if (y2 > 0) ret += `${CSI}${y2}B`;
24
+ return ret;
25
+ },
26
+ up: (count = 1) => `${CSI}${count}A`,
27
+ down: (count = 1) => `${CSI}${count}B`,
28
+ forward: (count = 1) => `${CSI}${count}C`,
29
+ backward: (count = 1) => `${CSI}${count}D`,
30
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
31
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
32
+ left: `${CSI}G`,
33
+ hide: `${CSI}?25l`,
34
+ show: `${CSI}?25h`,
35
+ save: `${ESC}7`,
36
+ restore: `${ESC}8`
37
+ };
38
+ var scroll = {
39
+ up: (count = 1) => `${CSI}S`.repeat(count),
40
+ down: (count = 1) => `${CSI}T`.repeat(count)
41
+ };
42
+ var erase = {
43
+ screen: `${CSI}2J`,
44
+ up: (count = 1) => `${CSI}1J`.repeat(count),
45
+ down: (count = 1) => `${CSI}J`.repeat(count),
46
+ line: `${CSI}2K`,
47
+ lineEnd: `${CSI}K`,
48
+ lineStart: `${CSI}1K`,
49
+ lines(count) {
50
+ let clear = "";
51
+ for (let i = 0; i < count; i++)
52
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
53
+ if (count)
54
+ clear += cursor.left;
55
+ return clear;
56
+ }
57
+ };
58
+ module.exports = { cursor, scroll, erase, beep };
59
+ }
60
+ });
61
+
62
+ // node_modules/@clack/core/dist/index.mjs
63
+ var import_sisteransi = __toESM(require_src(), 1);
64
+ import { styleText as D } from "util";
65
+ import { stdout as R, stdin as q } from "process";
66
+ import * as k from "readline";
67
+ import ot from "readline";
68
+ import { ReadStream as J } from "tty";
69
+ function x(t2, e, s) {
70
+ if (!s.some((u) => !u.disabled)) return t2;
71
+ const i = t2 + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
72
+ return s[n].disabled ? x(n, e < 0 ? -1 : 1, s) : n;
73
+ }
74
+ 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;
75
+ var lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510;
76
+ var 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;
77
+ var O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
78
+ var y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
79
+ var L = /\t{1,1000}/y;
80
+ var P = /[\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;
81
+ var M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
82
+ var ct = /\p{M}+/gu;
83
+ var ft = { limit: 1 / 0, ellipsis: "" };
84
+ var X = (t2, e = {}, s = {}) => {
85
+ const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, ft, s).width : 0), u = 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;
86
+ let h2 = 0, o = 0, p = t2.length, v = 0, F = false, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
87
+ t: for (; ; ) {
88
+ if (w > C || o >= p && o > h2) {
89
+ const ut = t2.slice(C, w) || t2.slice(h2, o);
90
+ v = 0;
91
+ for (const Y of ut.replaceAll(ct, "")) {
92
+ const $ = Y.codePointAt(0) || 0;
93
+ if (lt($) ? f = m : ht($) ? f = V2 : E !== A && at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h2) + v)), c + f > i) {
94
+ F = true;
95
+ break t;
96
+ }
97
+ v += Y.length, c += f;
98
+ }
99
+ C = w = 0;
100
+ }
101
+ if (o >= p) break;
102
+ if (M.lastIndex = o, M.test(t2)) {
103
+ if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
104
+ F = true;
105
+ break;
106
+ }
107
+ c += f, C = h2, w = o, o = h2 = M.lastIndex;
108
+ continue;
109
+ }
110
+ if (O.lastIndex = o, O.test(t2)) {
111
+ if (c + u > b && (d = Math.min(d, o)), c + u > i) {
112
+ F = true;
113
+ break;
114
+ }
115
+ c += u, C = h2, w = o, o = h2 = O.lastIndex;
116
+ continue;
117
+ }
118
+ if (y.lastIndex = o, y.test(t2)) {
119
+ if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
120
+ F = true;
121
+ break;
122
+ }
123
+ c += f, C = h2, w = o, o = h2 = y.lastIndex;
124
+ continue;
125
+ }
126
+ if (L.lastIndex = o, L.test(t2)) {
127
+ if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
128
+ F = true;
129
+ break;
130
+ }
131
+ c += f, C = h2, w = o, o = h2 = L.lastIndex;
132
+ continue;
133
+ }
134
+ if (P.lastIndex = o, P.test(t2)) {
135
+ if (c + g > b && (d = Math.min(d, o)), c + g > i) {
136
+ F = true;
137
+ break;
138
+ }
139
+ c += g, C = h2, w = o, o = h2 = P.lastIndex;
140
+ continue;
141
+ }
142
+ o += 1;
143
+ }
144
+ return { width: F ? b : c, index: F ? d : p, truncated: F, ellipsed: F && i >= n };
145
+ };
146
+ var pt = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
147
+ var S = (t2, e = {}) => X(t2, pt, e).width;
148
+ var T = "\x1B";
149
+ var Z = "\x9B";
150
+ var Ft = 39;
151
+ var j = "\x07";
152
+ var Q = "[";
153
+ var dt = "]";
154
+ var tt = "m";
155
+ var U = `${dt}8;;`;
156
+ var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
157
+ var mt = (t2) => {
158
+ if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
159
+ if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
160
+ if (t2 === 1 || t2 === 2) return 22;
161
+ if (t2 === 3) return 23;
162
+ if (t2 === 4) return 24;
163
+ if (t2 === 7) return 27;
164
+ if (t2 === 8) return 28;
165
+ if (t2 === 9) return 29;
166
+ if (t2 === 0) return 0;
167
+ };
168
+ var st = (t2) => `${T}${Q}${t2}${tt}`;
169
+ var it = (t2) => `${T}${U}${t2}${j}`;
170
+ var gt = (t2) => t2.map((e) => S(e));
171
+ var G = (t2, e, s) => {
172
+ const i = e[Symbol.iterator]();
173
+ let r = false, n = false, u = t2.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
174
+ for (; !l.done; ) {
175
+ const m = l.value, A = S(m);
176
+ a + A <= s ? t2[t2.length - 1] += m : (t2.push(m), a = 0), (m === T || m === Z) && (r = true, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = false, n = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t2.push(""), a = 0)), l = E, E = i.next(), g += m.length;
177
+ }
178
+ u = t2.at(-1), !a && u !== void 0 && u.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
179
+ };
180
+ var vt = (t2) => {
181
+ const e = t2.split(" ");
182
+ let s = e.length;
183
+ for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
184
+ return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
185
+ };
186
+ var Et = (t2, e, s = {}) => {
187
+ if (s.trim !== false && t2.trim() === "") return "";
188
+ let i = "", r, n;
189
+ const u = t2.split(" "), a = gt(u);
190
+ let l = [""];
191
+ for (const [h2, o] of u.entries()) {
192
+ s.trim !== false && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
193
+ let p = S(l.at(-1) ?? "");
194
+ if (h2 !== 0 && (p >= e && (s.wordWrap === false || s.trim === false) && (l.push(""), p = 0), (p > 0 || s.trim === false) && (l[l.length - 1] += " ", p++)), s.hard && a[h2] > e) {
195
+ const v = e - p, F = 1 + Math.floor((a[h2] - v - 1) / e);
196
+ Math.floor((a[h2] - 1) / e) < F && l.push(""), G(l, o, e);
197
+ continue;
198
+ }
199
+ if (p + a[h2] > e && p > 0 && a[h2] > 0) {
200
+ if (s.wordWrap === false && p < e) {
201
+ G(l, o, e);
202
+ continue;
203
+ }
204
+ l.push("");
205
+ }
206
+ if (p + a[h2] > e && s.wordWrap === false) {
207
+ G(l, o, e);
208
+ continue;
209
+ }
210
+ l[l.length - 1] += o;
211
+ }
212
+ s.trim !== false && (l = l.map((h2) => vt(h2)));
213
+ const E = l.join(`
214
+ `), g = E[Symbol.iterator]();
215
+ let m = g.next(), A = g.next(), V2 = 0;
216
+ for (; !m.done; ) {
217
+ const h2 = m.value, o = A.value;
218
+ if (i += h2, h2 === T || h2 === Z) {
219
+ et.lastIndex = V2 + 1;
220
+ const F = et.exec(E)?.groups;
221
+ if (F?.code !== void 0) {
222
+ const d = Number.parseFloat(F.code);
223
+ r = d === Ft ? void 0 : d;
224
+ } else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
225
+ }
226
+ const p = r ? mt(r) : void 0;
227
+ o === `
228
+ ` ? (n && (i += it("")), r && p && (i += st(p))) : h2 === `
229
+ ` && (r && p && (i += st(r)), n && (i += it(n))), V2 += h2.length, m = A, A = g.next();
230
+ }
231
+ return i;
232
+ };
233
+ function K(t2, e, s) {
234
+ return String(t2).normalize().replaceAll(`\r
235
+ `, `
236
+ `).split(`
237
+ `).map((i) => Et(i, e, s)).join(`
238
+ `);
239
+ }
240
+ var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
241
+ var _ = { 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: true };
242
+ function H(t2, e) {
243
+ if (typeof t2 == "string") return _.aliases.get(t2) === e;
244
+ for (const s of t2) if (s !== void 0 && H(s, e)) return true;
245
+ return false;
246
+ }
247
+ function _t(t2, e) {
248
+ if (t2 === e) return;
249
+ const s = t2.split(`
250
+ `), i = e.split(`
251
+ `), r = Math.max(s.length, i.length), n = [];
252
+ for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
253
+ return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
254
+ }
255
+ var bt = globalThis.process.platform.startsWith("win");
256
+ var z = /* @__PURE__ */ Symbol("clack:cancel");
257
+ function Ct(t2) {
258
+ return t2 === z;
259
+ }
260
+ function W(t2, e) {
261
+ const s = t2;
262
+ s.isTTY && s.setRawMode(e);
263
+ }
264
+ function xt({ input: t2 = q, output: e = R, overwrite: s = true, hideCursor: i = true } = {}) {
265
+ const r = k.createInterface({ input: t2, output: e, prompt: "", tabSize: 1 });
266
+ k.emitKeypressEvents(t2, r), t2 instanceof J && t2.isTTY && t2.setRawMode(true);
267
+ const n = (u, { name: a, sequence: l }) => {
268
+ const E = String(u);
269
+ if (H([E, a, l], "cancel")) {
270
+ i && e.write(import_sisteransi.cursor.show), process.exit(0);
271
+ return;
272
+ }
273
+ if (!s) return;
274
+ const g = a === "return" ? 0 : -1, m = a === "return" ? -1 : 0;
275
+ k.moveCursor(e, g, m, () => {
276
+ k.clearLine(e, 1, () => {
277
+ t2.once("keypress", n);
278
+ });
279
+ });
280
+ };
281
+ return i && e.write(import_sisteransi.cursor.hide), t2.once("keypress", n), () => {
282
+ t2.off("keypress", n), i && e.write(import_sisteransi.cursor.show), t2 instanceof J && t2.isTTY && !bt && t2.setRawMode(false), r.terminal = false, r.close();
283
+ };
284
+ }
285
+ var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80;
286
+ var nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
287
+ function Bt(t2, e, s, i = s) {
288
+ const r = rt(t2 ?? R);
289
+ return K(e, r - s.length, { hard: true, trim: false }).split(`
290
+ `).map((n, u) => `${u === 0 ? i : s}${n}`).join(`
291
+ `);
292
+ }
293
+ var B = class {
294
+ input;
295
+ output;
296
+ _abortSignal;
297
+ rl;
298
+ opts;
299
+ _render;
300
+ _track = false;
301
+ _prevFrame = "";
302
+ _subscribers = /* @__PURE__ */ new Map();
303
+ _cursor = 0;
304
+ state = "initial";
305
+ error = "";
306
+ value;
307
+ userInput = "";
308
+ constructor(e, s = true) {
309
+ const { input: i = q, output: r = R, render: n, signal: u, ...a } = e;
310
+ 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 = u, this.input = i, this.output = r;
311
+ }
312
+ unsubscribe() {
313
+ this._subscribers.clear();
314
+ }
315
+ setSubscriber(e, s) {
316
+ const i = this._subscribers.get(e) ?? [];
317
+ i.push(s), this._subscribers.set(e, i);
318
+ }
319
+ on(e, s) {
320
+ this.setSubscriber(e, { cb: s });
321
+ }
322
+ once(e, s) {
323
+ this.setSubscriber(e, { cb: s, once: true });
324
+ }
325
+ emit(e, ...s) {
326
+ const i = this._subscribers.get(e) ?? [], r = [];
327
+ for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
328
+ for (const n of r) n();
329
+ }
330
+ prompt() {
331
+ return new Promise((e) => {
332
+ if (this._abortSignal) {
333
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
334
+ this._abortSignal.addEventListener("abort", () => {
335
+ this.state = "cancel", this.close();
336
+ }, { once: true });
337
+ }
338
+ this.rl = ot.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), W(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
339
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(this.value);
340
+ }), this.once("cancel", () => {
341
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), W(this.input, false), e(z);
342
+ });
343
+ });
344
+ }
345
+ _isActionKey(e, s) {
346
+ return e === " ";
347
+ }
348
+ _setValue(e) {
349
+ this.value = e, this.emit("value", this.value);
350
+ }
351
+ _setUserInput(e, s) {
352
+ this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
353
+ }
354
+ _clearUserInput() {
355
+ this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
356
+ }
357
+ onKeypress(e, s) {
358
+ if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, { ctrl: true, 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") {
359
+ if (this.opts.validate) {
360
+ const i = this.opts.validate(this.value);
361
+ i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
362
+ }
363
+ this.state !== "error" && (this.state = "submit");
364
+ }
365
+ 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();
366
+ }
367
+ close() {
368
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
369
+ `), W(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
370
+ }
371
+ restoreCursor() {
372
+ const e = K(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
373
+ `).length - 1;
374
+ this.output.write(import_sisteransi.cursor.move(-999, e * -1));
375
+ }
376
+ render() {
377
+ const e = K(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
378
+ if (e !== this._prevFrame) {
379
+ if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
380
+ else {
381
+ const s = _t(this._prevFrame, e), i = nt(this.output);
382
+ if (this.restoreCursor(), s) {
383
+ const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
384
+ let u = s.lines.find((a) => a >= r);
385
+ if (u === void 0) {
386
+ this._prevFrame = e;
387
+ return;
388
+ }
389
+ if (s.lines.length === 1) {
390
+ this.output.write(import_sisteransi.cursor.move(0, u - n)), this.output.write(import_sisteransi.erase.lines(1));
391
+ const a = e.split(`
392
+ `);
393
+ this.output.write(a[u]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
394
+ return;
395
+ } else if (s.lines.length > 1) {
396
+ if (r < n) u = r;
397
+ else {
398
+ const l = u - n;
399
+ l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
400
+ }
401
+ this.output.write(import_sisteransi.erase.down());
402
+ const a = e.split(`
403
+ `).slice(u);
404
+ this.output.write(a.join(`
405
+ `)), this._prevFrame = e;
406
+ return;
407
+ }
408
+ }
409
+ this.output.write(import_sisteransi.erase.down());
410
+ }
411
+ this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
412
+ }
413
+ }
414
+ };
415
+ var kt = class extends B {
416
+ get cursor() {
417
+ return this.value ? 0 : 1;
418
+ }
419
+ get _value() {
420
+ return this.cursor === 0;
421
+ }
422
+ constructor(e) {
423
+ super(e, false), this.value = !!e.initialValue, this.on("userInput", () => {
424
+ this.value = this._value;
425
+ }), this.on("confirm", (s) => {
426
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
427
+ }), this.on("cursor", () => {
428
+ this.value = !this.value;
429
+ });
430
+ }
431
+ };
432
+ var Mt = class extends B {
433
+ _mask = "\u2022";
434
+ get cursor() {
435
+ return this._cursor;
436
+ }
437
+ get masked() {
438
+ return this.userInput.replaceAll(/./g, this._mask);
439
+ }
440
+ get userInputWithCursor() {
441
+ if (this.state === "submit" || this.state === "cancel") return this.masked;
442
+ const e = this.userInput;
443
+ if (this.cursor >= e.length) return `${this.masked}${D(["inverse", "hidden"], "_")}`;
444
+ const s = this.masked, i = s.slice(0, this.cursor), r = s.slice(this.cursor);
445
+ return `${i}${D("inverse", r[0])}${r.slice(1)}`;
446
+ }
447
+ clear() {
448
+ this._clearUserInput();
449
+ }
450
+ constructor({ mask: e, ...s }) {
451
+ super(s), this._mask = e ?? "\u2022", this.on("userInput", (i) => {
452
+ this._setValue(i);
453
+ });
454
+ }
455
+ };
456
+ var Tt = class extends B {
457
+ options;
458
+ cursor = 0;
459
+ get _selectedValue() {
460
+ return this.options[this.cursor];
461
+ }
462
+ changeValue() {
463
+ this.value = this._selectedValue.value;
464
+ }
465
+ constructor(e) {
466
+ super(e, false), this.options = e.options;
467
+ const s = this.options.findIndex(({ value: r }) => r === e.initialValue), i = s === -1 ? 0 : s;
468
+ this.cursor = this.options[i].disabled ? x(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r) => {
469
+ switch (r) {
470
+ case "left":
471
+ case "up":
472
+ this.cursor = x(this.cursor, -1, this.options);
473
+ break;
474
+ case "down":
475
+ case "right":
476
+ this.cursor = x(this.cursor, 1, this.options);
477
+ break;
478
+ }
479
+ this.changeValue();
480
+ });
481
+ }
482
+ };
483
+ var $t = class extends B {
484
+ get userInputWithCursor() {
485
+ if (this.state === "submit") return this.userInput;
486
+ const e = this.userInput;
487
+ if (this.cursor >= e.length) return `${this.userInput}\u2588`;
488
+ const s = e.slice(0, this.cursor), [i, ...r] = e.slice(this.cursor);
489
+ return `${s}${D("inverse", i)}${r.join("")}`;
490
+ }
491
+ get cursor() {
492
+ return this._cursor;
493
+ }
494
+ constructor(e) {
495
+ super({ ...e, initialUserInput: e.initialUserInput ?? e.initialValue }), this.on("userInput", (s) => {
496
+ this._setValue(s);
497
+ }), this.on("finalize", () => {
498
+ this.value || (this.value = e.defaultValue), this.value === void 0 && (this.value = "");
499
+ });
500
+ }
501
+ };
502
+
503
+ // node_modules/@clack/prompts/dist/index.mjs
504
+ var import_sisteransi2 = __toESM(require_src(), 1);
505
+ import { styleText as t, stripVTControlCharacters as ue } from "util";
506
+ import N2 from "process";
507
+ import { readdirSync as $t2, existsSync as dt2, lstatSync as xe } from "fs";
508
+ import { dirname as _e, join as ht2 } from "path";
509
+ function pt2() {
510
+ 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";
511
+ }
512
+ var ee = pt2();
513
+ var ce = () => process.env.CI === "true";
514
+ var I2 = (e, r) => ee ? e : r;
515
+ var Re = I2("\u25C6", "*");
516
+ var $e = I2("\u25A0", "x");
517
+ var de = I2("\u25B2", "x");
518
+ var V = I2("\u25C7", "o");
519
+ var he = I2("\u250C", "T");
520
+ var h = I2("\u2502", "|");
521
+ var x2 = I2("\u2514", "\u2014");
522
+ var Oe = I2("\u2510", "T");
523
+ var Pe = I2("\u2518", "\u2014");
524
+ var z2 = I2("\u25CF", ">");
525
+ var H2 = I2("\u25CB", " ");
526
+ var te = I2("\u25FB", "[\u2022]");
527
+ var U2 = I2("\u25FC", "[+]");
528
+ var q2 = I2("\u25FB", "[ ]");
529
+ var Ne = I2("\u25AA", "\u2022");
530
+ var se = I2("\u2500", "-");
531
+ var pe = I2("\u256E", "+");
532
+ var We = I2("\u251C", "+");
533
+ var me = I2("\u256F", "+");
534
+ var ge = I2("\u2570", "+");
535
+ var Ge = I2("\u256D", "+");
536
+ var fe = I2("\u25CF", "\u2022");
537
+ var Fe = I2("\u25C6", "*");
538
+ var ye = I2("\u25B2", "!");
539
+ var Ee = I2("\u25A0", "x");
540
+ var W2 = (e) => {
541
+ switch (e) {
542
+ case "initial":
543
+ case "active":
544
+ return t("cyan", Re);
545
+ case "cancel":
546
+ return t("red", $e);
547
+ case "error":
548
+ return t("yellow", de);
549
+ case "submit":
550
+ return t("green", V);
551
+ }
552
+ };
553
+ var ve = (e) => {
554
+ switch (e) {
555
+ case "initial":
556
+ case "active":
557
+ return t("cyan", h);
558
+ case "cancel":
559
+ return t("red", h);
560
+ case "error":
561
+ return t("yellow", h);
562
+ case "submit":
563
+ return t("green", h);
564
+ }
565
+ };
566
+ var 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;
567
+ var gt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
568
+ var ft2 = (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;
569
+ var we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
570
+ var re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
571
+ var ie = /\t{1,1000}/y;
572
+ var Ae = /[\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;
573
+ var ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
574
+ var Ft2 = /\p{M}+/gu;
575
+ var yt2 = { limit: 1 / 0, ellipsis: "" };
576
+ var Le = (e, r = {}, s = {}) => {
577
+ const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, yt2, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, p = s.emojiWidth ?? 2, f = s.fullWidthWidth ?? 2, g = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
578
+ let $ = 0, m = 0, d = e.length, F = 0, y2 = false, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S2 = 0;
579
+ e: for (; ; ) {
580
+ if (b > A || m >= d && m > $) {
581
+ const T2 = e.slice(A, b) || e.slice($, m);
582
+ F = 0;
583
+ for (const M2 of T2.replaceAll(Ft2, "")) {
584
+ const O2 = M2.codePointAt(0) || 0;
585
+ if (gt2(O2) ? S2 = f : ft2(O2) ? S2 = E : c !== g && mt2(O2) ? S2 = c : S2 = g, w + S2 > C && (v = Math.min(v, Math.max(A, $) + F)), w + S2 > i) {
586
+ y2 = true;
587
+ break e;
588
+ }
589
+ F += M2.length, w += S2;
590
+ }
591
+ A = b = 0;
592
+ }
593
+ if (m >= d) break;
594
+ if (ne.lastIndex = m, ne.test(e)) {
595
+ if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
596
+ y2 = true;
597
+ break;
598
+ }
599
+ w += S2, A = $, b = m, m = $ = ne.lastIndex;
600
+ continue;
601
+ }
602
+ if (we.lastIndex = m, we.test(e)) {
603
+ if (w + u > C && (v = Math.min(v, m)), w + u > i) {
604
+ y2 = true;
605
+ break;
606
+ }
607
+ w += u, A = $, b = m, m = $ = we.lastIndex;
608
+ continue;
609
+ }
610
+ if (re.lastIndex = m, re.test(e)) {
611
+ if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
612
+ y2 = true;
613
+ break;
614
+ }
615
+ w += S2, A = $, b = m, m = $ = re.lastIndex;
616
+ continue;
617
+ }
618
+ if (ie.lastIndex = m, ie.test(e)) {
619
+ if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
620
+ y2 = true;
621
+ break;
622
+ }
623
+ w += S2, A = $, b = m, m = $ = ie.lastIndex;
624
+ continue;
625
+ }
626
+ if (Ae.lastIndex = m, Ae.test(e)) {
627
+ if (w + p > C && (v = Math.min(v, m)), w + p > i) {
628
+ y2 = true;
629
+ break;
630
+ }
631
+ w += p, A = $, b = m, m = $ = Ae.lastIndex;
632
+ continue;
633
+ }
634
+ m += 1;
635
+ }
636
+ return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
637
+ };
638
+ var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
639
+ var D2 = (e, r = {}) => Le(e, Et2, r).width;
640
+ var ae = "\x1B";
641
+ var je = "\x9B";
642
+ var vt2 = 39;
643
+ var Ce = "\x07";
644
+ var ke = "[";
645
+ var wt = "]";
646
+ var Ve = "m";
647
+ var Se = `${wt}8;;`;
648
+ var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
649
+ var At2 = (e) => {
650
+ if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
651
+ if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
652
+ if (e === 1 || e === 2) return 22;
653
+ if (e === 3) return 23;
654
+ if (e === 4) return 24;
655
+ if (e === 7) return 27;
656
+ if (e === 8) return 28;
657
+ if (e === 9) return 29;
658
+ if (e === 0) return 0;
659
+ };
660
+ var Ue = (e) => `${ae}${ke}${e}${Ve}`;
661
+ var Ke = (e) => `${ae}${Se}${e}${Ce}`;
662
+ var Ct2 = (e) => e.map((r) => D2(r));
663
+ var Ie = (e, r, s) => {
664
+ const i = r[Symbol.iterator]();
665
+ let a = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D2(u), n = i.next(), c = i.next(), p = 0;
666
+ for (; !n.done; ) {
667
+ const f = n.value, g = D2(f);
668
+ l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = true, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = false, o = false) : f === Ve && (a = false) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
669
+ }
670
+ u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
671
+ };
672
+ var St = (e) => {
673
+ const r = e.split(" ");
674
+ let s = r.length;
675
+ for (; s > 0 && !(D2(r[s - 1]) > 0); ) s--;
676
+ return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
677
+ };
678
+ var It2 = (e, r, s = {}) => {
679
+ if (s.trim !== false && e.trim() === "") return "";
680
+ let i = "", a, o;
681
+ const u = e.split(" "), l = Ct2(u);
682
+ let n = [""];
683
+ for (const [$, m] of u.entries()) {
684
+ s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
685
+ let d = D2(n.at(-1) ?? "");
686
+ if ($ !== 0 && (d >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), d = 0), (d > 0 || s.trim === false) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
687
+ const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
688
+ Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
689
+ continue;
690
+ }
691
+ if (d + l[$] > r && d > 0 && l[$] > 0) {
692
+ if (s.wordWrap === false && d < r) {
693
+ Ie(n, m, r);
694
+ continue;
695
+ }
696
+ n.push("");
697
+ }
698
+ if (d + l[$] > r && s.wordWrap === false) {
699
+ Ie(n, m, r);
700
+ continue;
701
+ }
702
+ n[n.length - 1] += m;
703
+ }
704
+ s.trim !== false && (n = n.map(($) => St($)));
705
+ const c = n.join(`
706
+ `), p = c[Symbol.iterator]();
707
+ let f = p.next(), g = p.next(), E = 0;
708
+ for (; !f.done; ) {
709
+ const $ = f.value, m = g.value;
710
+ if (i += $, $ === ae || $ === je) {
711
+ He.lastIndex = E + 1;
712
+ const y2 = He.exec(c)?.groups;
713
+ if (y2?.code !== void 0) {
714
+ const v = Number.parseFloat(y2.code);
715
+ a = v === vt2 ? void 0 : v;
716
+ } else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
717
+ }
718
+ const d = a ? At2(a) : void 0;
719
+ m === `
720
+ ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
721
+ ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
722
+ }
723
+ return i;
724
+ };
725
+ function J2(e, r, s) {
726
+ return String(e).normalize().replaceAll(`\r
727
+ `, `
728
+ `).split(`
729
+ `).map((i) => It2(i, r, s)).join(`
730
+ `);
731
+ }
732
+ var bt2 = (e, r, s, i, a) => {
733
+ let o = r, u = 0;
734
+ for (let l = s; l < i; l++) {
735
+ const n = e[l];
736
+ if (o = o - n.length, u++, o <= a) break;
737
+ }
738
+ return { lineCount: o, removals: u };
739
+ };
740
+ var X2 = ({ cursor: e, options: r, style: s, output: i = process.stdout, maxItems: a = Number.POSITIVE_INFINITY, columnPadding: o = 0, rowPadding: u = 4 }) => {
741
+ const l = rt(i) - o, n = nt(i), c = t("dim", "..."), p = Math.max(n - u, 0), f = Math.max(Math.min(a, p), 5);
742
+ let g = 0;
743
+ e >= f - 3 && (g = Math.max(Math.min(e - f + 3, r.length - f), 0));
744
+ let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
745
+ const m = Math.min(g + f, r.length), d = [];
746
+ let F = 0;
747
+ E && F++, $ && F++;
748
+ const y2 = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
749
+ for (let A = y2; A < v; A++) {
750
+ const b = J2(s(r[A], A === e), l, { hard: true, trim: false }).split(`
751
+ `);
752
+ d.push(b), F += b.length;
753
+ }
754
+ if (F > p) {
755
+ let A = 0, b = 0, w = F;
756
+ const S2 = e - y2, T2 = (M2, O2) => bt2(d, w, M2, O2, p);
757
+ E ? ({ lineCount: w, removals: A } = T2(0, S2), w > p && ({ lineCount: w, removals: b } = T2(S2 + 1, d.length))) : ({ lineCount: w, removals: b } = T2(S2 + 1, d.length), w > p && ({ lineCount: w, removals: A } = T2(0, S2))), A > 0 && (E = true, d.splice(0, A)), b > 0 && ($ = true, d.splice(d.length - b, b));
758
+ }
759
+ const C = [];
760
+ E && C.push(c);
761
+ for (const A of d) for (const b of A) C.push(b);
762
+ return $ && C.push(c), C;
763
+ };
764
+ var Rt = (e) => {
765
+ const r = e.active ?? "Yes", s = e.inactive ?? "No";
766
+ return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
767
+ const i = e.withGuide ?? _.withGuide, a = `${i ? `${t("gray", h)}
768
+ ` : ""}${W2(this.state)} ${e.message}
769
+ `, o = this.value ? r : s;
770
+ switch (this.state) {
771
+ case "submit": {
772
+ const u = i ? `${t("gray", h)} ` : "";
773
+ return `${a}${u}${t("dim", o)}`;
774
+ }
775
+ case "cancel": {
776
+ const u = i ? `${t("gray", h)} ` : "";
777
+ return `${a}${u}${t(["strikethrough", "dim"], o)}${i ? `
778
+ ${t("gray", h)}` : ""}`;
779
+ }
780
+ default: {
781
+ const u = i ? `${t("cyan", h)} ` : "", l = i ? t("cyan", x2) : "";
782
+ return `${a}${u}${this.value ? `${t("green", z2)} ${r}` : `${t("dim", H2)} ${t("dim", r)}`}${e.vertical ? i ? `
783
+ ${t("cyan", h)} ` : `
784
+ ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
785
+ ${l}
786
+ `;
787
+ }
788
+ }
789
+ } }).prompt();
790
+ };
791
+ var R2 = { message: (e = [], { symbol: r = t("gray", h), secondarySymbol: s = t("gray", h), output: i = process.stdout, spacing: a = 1, withGuide: o } = {}) => {
792
+ const u = [], l = o ?? _.withGuide, n = l ? s : "", c = l ? `${r} ` : "", p = l ? `${s} ` : "";
793
+ for (let g = 0; g < a; g++) u.push(n);
794
+ const f = Array.isArray(e) ? e : e.split(`
795
+ `);
796
+ if (f.length > 0) {
797
+ const [g, ...E] = f;
798
+ g.length > 0 ? u.push(`${c}${g}`) : u.push(l ? r : "");
799
+ for (const $ of E) $.length > 0 ? u.push(`${p}${$}`) : u.push(l ? s : "");
800
+ }
801
+ i.write(`${u.join(`
802
+ `)}
803
+ `);
804
+ }, info: (e, r) => {
805
+ R2.message(e, { ...r, symbol: t("blue", fe) });
806
+ }, success: (e, r) => {
807
+ R2.message(e, { ...r, symbol: t("green", Fe) });
808
+ }, step: (e, r) => {
809
+ R2.message(e, { ...r, symbol: t("green", V) });
810
+ }, warn: (e, r) => {
811
+ R2.message(e, { ...r, symbol: t("yellow", ye) });
812
+ }, warning: (e, r) => {
813
+ R2.warn(e, r);
814
+ }, error: (e, r) => {
815
+ R2.message(e, { ...r, symbol: t("red", Ee) });
816
+ } };
817
+ var Nt = (e = "", r) => {
818
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", x2)} ` : "";
819
+ s.write(`${i}${t("red", e)}
820
+
821
+ `);
822
+ };
823
+ var Gt = (e = "", r) => {
824
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${t("gray", h)}
825
+ ${t("gray", x2)} ` : "";
826
+ s.write(`${i}${e}
827
+
828
+ `);
829
+ };
830
+ var Ht = (e) => new Mt({ validate: e.validate, mask: e.mask ?? Ne, signal: e.signal, input: e.input, output: e.output, render() {
831
+ const r = e.withGuide ?? _.withGuide, s = `${r ? `${t("gray", h)}
832
+ ` : ""}${W2(this.state)} ${e.message}
833
+ `, i = this.userInputWithCursor, a = this.masked;
834
+ switch (this.state) {
835
+ case "error": {
836
+ const o = r ? `${t("yellow", h)} ` : "", u = r ? `${t("yellow", x2)} ` : "", l = a ?? "";
837
+ return e.clearOnError && this.clear(), `${s.trim()}
838
+ ${o}${l}
839
+ ${u}${t("yellow", this.error)}
840
+ `;
841
+ }
842
+ case "submit": {
843
+ const o = r ? `${t("gray", h)} ` : "", u = a ? t("dim", a) : "";
844
+ return `${s}${o}${u}`;
845
+ }
846
+ case "cancel": {
847
+ const o = r ? `${t("gray", h)} ` : "", u = a ? t(["strikethrough", "dim"], a) : "";
848
+ return `${s}${o}${u}${a && r ? `
849
+ ${t("gray", h)}` : ""}`;
850
+ }
851
+ default: {
852
+ const o = r ? `${t("cyan", h)} ` : "", u = r ? t("cyan", x2) : "";
853
+ return `${s}${o}${i}
854
+ ${u}
855
+ `;
856
+ }
857
+ }
858
+ } }).prompt();
859
+ var Kt = (e) => t("magenta", e);
860
+ var be = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: a, frames: o = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: l, ...n } = {}) => {
861
+ const c = ce();
862
+ let p, f, g = false, E = false, $ = "", m, d = performance.now();
863
+ const F = rt(s), y2 = n?.styleFrame ?? Kt, v = (B2) => {
864
+ const P2 = B2 > 1 ? a ?? _.messages.error : i ?? _.messages.cancel;
865
+ E = B2 === 1, g && (k2(P2, B2), E && typeof r == "function" && r());
866
+ }, C = () => v(2), A = () => v(1), b = () => {
867
+ process.on("uncaughtExceptionMonitor", C), process.on("unhandledRejection", C), process.on("SIGINT", A), process.on("SIGTERM", A), process.on("exit", v), l && l.addEventListener("abort", A);
868
+ }, w = () => {
869
+ process.removeListener("uncaughtExceptionMonitor", C), process.removeListener("unhandledRejection", C), process.removeListener("SIGINT", A), process.removeListener("SIGTERM", A), process.removeListener("exit", v), l && l.removeEventListener("abort", A);
870
+ }, S2 = () => {
871
+ if (m === void 0) return;
872
+ c && s.write(`
873
+ `);
874
+ const B2 = J2(m, F, { hard: true, trim: false }).split(`
875
+ `);
876
+ B2.length > 1 && s.write(import_sisteransi2.cursor.up(B2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
877
+ }, T2 = (B2) => B2.replace(/\.+$/, ""), M2 = (B2) => {
878
+ const P2 = (performance.now() - B2) / 1e3, G2 = Math.floor(P2 / 60), L2 = Math.floor(P2 % 60);
879
+ return G2 > 0 ? `[${G2}m ${L2}s]` : `[${L2}s]`;
880
+ }, O2 = n.withGuide ?? _.withGuide, le = (B2 = "") => {
881
+ g = true, p = xt({ output: s }), $ = T2(B2), d = performance.now(), O2 && s.write(`${t("gray", h)}
882
+ `);
883
+ let P2 = 0, G2 = 0;
884
+ b(), f = setInterval(() => {
885
+ if (c && $ === m) return;
886
+ S2(), m = $;
887
+ const L2 = y2(o[P2]);
888
+ let Z2;
889
+ if (c) Z2 = `${L2} ${$}...`;
890
+ else if (e === "timer") Z2 = `${L2} ${$} ${M2(d)}`;
891
+ else {
892
+ const et2 = ".".repeat(Math.floor(G2)).slice(0, 3);
893
+ Z2 = `${L2} ${$}${et2}`;
894
+ }
895
+ const Ze = J2(Z2, F, { hard: true, trim: false });
896
+ s.write(Ze), P2 = P2 + 1 < o.length ? P2 + 1 : 0, G2 = G2 < 4 ? G2 + 0.125 : 0;
897
+ }, u);
898
+ }, k2 = (B2 = "", P2 = 0, G2 = false) => {
899
+ if (!g) return;
900
+ g = false, clearInterval(f), S2();
901
+ const L2 = P2 === 0 ? t("green", V) : P2 === 1 ? t("red", $e) : t("red", de);
902
+ $ = B2 ?? $, G2 || (e === "timer" ? s.write(`${L2} ${$} ${M2(d)}
903
+ `) : s.write(`${L2} ${$}
904
+ `)), w(), p();
905
+ };
906
+ return { start: le, stop: (B2 = "") => k2(B2, 0), message: (B2 = "") => {
907
+ $ = T2(B2 ?? $);
908
+ }, cancel: (B2 = "") => k2(B2, 1), error: (B2 = "") => k2(B2, 2), clear: () => k2("", 0, true), get isCancelled() {
909
+ return E;
910
+ } };
911
+ };
912
+ var ze = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
913
+ var oe = (e, r) => e.includes(`
914
+ `) ? e.split(`
915
+ `).map((s) => r(s)).join(`
916
+ `) : r(e);
917
+ var Jt = (e) => {
918
+ const r = (s, i) => {
919
+ const a = s.label ?? String(s.value);
920
+ switch (i) {
921
+ case "disabled":
922
+ return `${t("gray", H2)} ${oe(a, (o) => t("gray", o))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
923
+ case "selected":
924
+ return `${oe(a, (o) => t("dim", o))}`;
925
+ case "active":
926
+ return `${t("green", z2)} ${a}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
927
+ case "cancelled":
928
+ return `${oe(a, (o) => t(["strikethrough", "dim"], o))}`;
929
+ default:
930
+ return `${t("dim", H2)} ${oe(a, (o) => t("dim", o))}`;
931
+ }
932
+ };
933
+ return new Tt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
934
+ const s = e.withGuide ?? _.withGuide, i = `${W2(this.state)} `, a = `${ve(this.state)} `, o = Bt(e.output, e.message, a, i), u = `${s ? `${t("gray", h)}
935
+ ` : ""}${o}
936
+ `;
937
+ switch (this.state) {
938
+ case "submit": {
939
+ const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "selected"), l);
940
+ return `${u}${n}`;
941
+ }
942
+ case "cancel": {
943
+ const l = s ? `${t("gray", h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "cancelled"), l);
944
+ return `${u}${n}${s ? `
945
+ ${t("gray", h)}` : ""}`;
946
+ }
947
+ default: {
948
+ const l = s ? `${t("cyan", h)} ` : "", n = s ? t("cyan", x2) : "", c = u.split(`
949
+ `).length, p = s ? 2 : 1;
950
+ return `${u}${l}${X2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: l.length, rowPadding: c + p, style: (f, g) => r(f, f.disabled ? "disabled" : g ? "active" : "inactive") }).join(`
951
+ ${l}`)}
952
+ ${n}
953
+ `;
954
+ }
955
+ }
956
+ } }).prompt();
957
+ };
958
+ var Qe = `${t("gray", h)} `;
959
+ var Zt = (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() {
960
+ const r = e?.withGuide ?? _.withGuide, s = `${`${r ? `${t("gray", h)}
961
+ ` : ""}${W2(this.state)} `}${e.message}
962
+ `, i = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), a = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
963
+ switch (this.state) {
964
+ case "error": {
965
+ const u = this.error ? ` ${t("yellow", this.error)}` : "", l = r ? `${t("yellow", h)} ` : "", n = r ? t("yellow", x2) : "";
966
+ return `${s.trim()}
967
+ ${l}${a}
968
+ ${n}${u}
969
+ `;
970
+ }
971
+ case "submit": {
972
+ const u = o ? ` ${t("dim", o)}` : "", l = r ? t("gray", h) : "";
973
+ return `${s}${l}${u}`;
974
+ }
975
+ case "cancel": {
976
+ const u = o ? ` ${t(["strikethrough", "dim"], o)}` : "", l = r ? t("gray", h) : "";
977
+ return `${s}${l}${u}${o.trim() ? `
978
+ ${l}` : ""}`;
979
+ }
980
+ default: {
981
+ const u = r ? `${t("cyan", h)} ` : "", l = r ? t("cyan", x2) : "";
982
+ return `${s}${u}${a}
983
+ ${l}
984
+ `;
985
+ }
986
+ }
987
+ } }).prompt();
988
+
989
+ export {
990
+ Ct,
991
+ Rt,
992
+ R2 as R,
993
+ Nt,
994
+ Gt,
995
+ Ht,
996
+ be,
997
+ Jt,
998
+ Zt
999
+ };
1000
+ //# sourceMappingURL=chunk-XY3LESVZ.js.map