@vitejs/devtools 0.1.11 → 0.1.13

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 (40) hide show
  1. package/dist/{DockStandalone-CX4RwLuJ.js → DockStandalone-kfuGuU1K.js} +128 -21
  2. package/dist/{LogItem-Ca0SsU39.js → LogItem-DOamSzjc.js} +1 -1
  3. package/dist/{ViewBuiltinLogs-B_CLlali.js → ViewBuiltinLogs-BW-Z3LV1.js} +35 -25
  4. package/dist/{ViewBuiltinTerminals-ZrMObMte.js → ViewBuiltinTerminals-D_aHYGk9.js} +1 -1
  5. package/dist/{ViewJsonRender-Cc5BPfnv.js → ViewJsonRender-BlN5HDyU.js} +1 -1
  6. package/dist/{build-static-BX4XcGdI.js → build-static-SRf6Mx0K.js} +1 -1
  7. package/dist/cli-commands.js +8 -5
  8. package/dist/client/inject.js +3 -3
  9. package/dist/client/standalone/assets/DockIcon-Bn9P0BA3.js +1 -0
  10. package/dist/client/standalone/assets/DockStandalone-BNVMXM6t.js +3 -0
  11. package/dist/client/standalone/assets/DockStandalone-GABFNqKk.js +1 -0
  12. package/dist/client/standalone/assets/{LogItem-BnVhub2j.js → LogItem-B2zhdfw_.js} +1 -1
  13. package/dist/client/standalone/assets/ViewBuiltinLogs-Bv93zOX9.js +1 -0
  14. package/dist/client/standalone/assets/{ViewBuiltinTerminals-DqaYBA6Q.js → ViewBuiltinTerminals-DPB8d-Q0.js} +4 -4
  15. package/dist/client/standalone/assets/{ViewJsonRender-De5eeIha.js → ViewJsonRender-CSnziLMr.js} +1 -1
  16. package/dist/client/standalone/assets/dist-DIiIv9-S.js +5 -0
  17. package/dist/client/standalone/assets/index-C05Px9az.css +1 -0
  18. package/dist/client/standalone/assets/index-C9nheAgG.js +1 -0
  19. package/dist/client/standalone/assets/runtime-core.esm-bundler-Dfaj58fA.js +1 -0
  20. package/dist/client/standalone/index.html +8 -6
  21. package/dist/client/webcomponents.js +3 -3
  22. package/dist/{context-BWju7fup.js → context-WJ5shSfy.js} +564 -506
  23. package/dist/{dist-CCdqIez-.js → dist-DD29zy1v.js} +390 -5
  24. package/dist/index.d.ts +90 -87
  25. package/dist/index.js +3 -3
  26. package/dist/{plugins-DxggNo2I.js → plugins-D8NH18dj.js} +4 -3
  27. package/dist/{popup-DgYOsFy3.js → popup-D4DzCx7h.js} +1 -1
  28. package/dist/{server-DSh-GQIq.js → server-CE1QMUPY.js} +4 -4
  29. package/dist/server-Cz5aS6Hb.js +2 -0
  30. package/dist/{server-ZWEvQMOm.js → server-kLW_T-bo.js} +3 -3
  31. package/dist/{standalone-CBP9wm6I.js → standalone-eqACht_F.js} +2 -2
  32. package/package.json +17 -14
  33. package/dist/client/standalone/assets/DockStandalone-BvXvOkmY.js +0 -1
  34. package/dist/client/standalone/assets/ViewBuiltinLogs-rU-E-8qT.js +0 -1
  35. package/dist/client/standalone/assets/dist-CAaP5Isp.js +0 -1
  36. package/dist/client/standalone/assets/index-2_yFTdkG.js +0 -3
  37. package/dist/client/standalone/assets/index-DtZFMvER.css +0 -1
  38. package/dist/client/standalone/assets/runtime-core.esm-bundler-Bvz2jy0O.js +0 -1
  39. package/dist/server-BQ4s1VXj.js +0 -2
  40. /package/dist/client/standalone/assets/{iconify-C-CPDXMf.js → iconify-DTCjcGxu.js} +0 -0
@@ -16,9 +16,9 @@ import process$1, { stdin, stdout } from "node:process";
16
16
  import sirv from "sirv";
17
17
  import { stripVTControlCharacters, styleText } from "node:util";
18
18
  import "node:readline";
19
- import ot from "node:readline";
19
+ import P from "node:readline";
20
20
  import "node:tty";
21
- import "node:path";
21
+ import { relative as relative$1, resolve as resolve$1 } from "node:path";
22
22
  import { defineRpcFunction } from "@vitejs/devtools-kit";
23
23
  //#region src/node/context-utils.ts
24
24
  const ContextUtils = { createSimpleClientScript(fn) {
@@ -472,7 +472,327 @@ var DevToolsViewHost = class {
472
472
  }
473
473
  };
474
474
  //#endregion
475
- //#region ../../node_modules/.pnpm/@clack+core@1.1.0/node_modules/@clack/core/dist/index.mjs
475
+ //#region ../../node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
476
+ const isAmbiguous = (x) => {
477
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
478
+ };
479
+ const isFullWidth = (x) => {
480
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
481
+ };
482
+ const isWide = (x) => {
483
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
484
+ };
485
+ //#endregion
486
+ //#region ../../node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
487
+ const ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
488
+ const CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
489
+ const TAB_RE = /\t{1,1000}/y;
490
+ const EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy;
491
+ const LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
492
+ const MODIFIER_RE = /\p{M}+/gu;
493
+ const NO_TRUNCATION$1 = {
494
+ limit: Infinity,
495
+ ellipsis: ""
496
+ };
497
+ const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
498
+ const LIMIT = truncationOptions.limit ?? Infinity;
499
+ const ELLIPSIS = truncationOptions.ellipsis ?? "";
500
+ const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION$1, widthOptions).width : 0);
501
+ const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
502
+ const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
503
+ const TAB_WIDTH = widthOptions.tabWidth ?? 8;
504
+ const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
505
+ const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
506
+ const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
507
+ const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
508
+ const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
509
+ let indexPrev = 0;
510
+ let index = 0;
511
+ let length = input.length;
512
+ let lengthExtra = 0;
513
+ let truncationEnabled = false;
514
+ let truncationIndex = length;
515
+ let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
516
+ let unmatchedStart = 0;
517
+ let unmatchedEnd = 0;
518
+ let width = 0;
519
+ let widthExtra = 0;
520
+ outer: while (true) {
521
+ if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
522
+ const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
523
+ lengthExtra = 0;
524
+ for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
525
+ const codePoint = char.codePointAt(0) || 0;
526
+ if (isFullWidth(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
527
+ else if (isWide(codePoint)) widthExtra = WIDE_WIDTH;
528
+ else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) widthExtra = AMBIGUOUS_WIDTH;
529
+ else widthExtra = REGULAR_WIDTH;
530
+ if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
531
+ if (width + widthExtra > LIMIT) {
532
+ truncationEnabled = true;
533
+ break outer;
534
+ }
535
+ lengthExtra += char.length;
536
+ width += widthExtra;
537
+ }
538
+ unmatchedStart = unmatchedEnd = 0;
539
+ }
540
+ if (index >= length) break;
541
+ LATIN_RE.lastIndex = index;
542
+ if (LATIN_RE.test(input)) {
543
+ lengthExtra = LATIN_RE.lastIndex - index;
544
+ widthExtra = lengthExtra * REGULAR_WIDTH;
545
+ if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
546
+ if (width + widthExtra > LIMIT) {
547
+ truncationEnabled = true;
548
+ break;
549
+ }
550
+ width += widthExtra;
551
+ unmatchedStart = indexPrev;
552
+ unmatchedEnd = index;
553
+ index = indexPrev = LATIN_RE.lastIndex;
554
+ continue;
555
+ }
556
+ ANSI_RE.lastIndex = index;
557
+ if (ANSI_RE.test(input)) {
558
+ if (width + ANSI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
559
+ if (width + ANSI_WIDTH > LIMIT) {
560
+ truncationEnabled = true;
561
+ break;
562
+ }
563
+ width += ANSI_WIDTH;
564
+ unmatchedStart = indexPrev;
565
+ unmatchedEnd = index;
566
+ index = indexPrev = ANSI_RE.lastIndex;
567
+ continue;
568
+ }
569
+ CONTROL_RE.lastIndex = index;
570
+ if (CONTROL_RE.test(input)) {
571
+ lengthExtra = CONTROL_RE.lastIndex - index;
572
+ widthExtra = lengthExtra * CONTROL_WIDTH;
573
+ if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
574
+ if (width + widthExtra > LIMIT) {
575
+ truncationEnabled = true;
576
+ break;
577
+ }
578
+ width += widthExtra;
579
+ unmatchedStart = indexPrev;
580
+ unmatchedEnd = index;
581
+ index = indexPrev = CONTROL_RE.lastIndex;
582
+ continue;
583
+ }
584
+ TAB_RE.lastIndex = index;
585
+ if (TAB_RE.test(input)) {
586
+ lengthExtra = TAB_RE.lastIndex - index;
587
+ widthExtra = lengthExtra * TAB_WIDTH;
588
+ if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
589
+ if (width + widthExtra > LIMIT) {
590
+ truncationEnabled = true;
591
+ break;
592
+ }
593
+ width += widthExtra;
594
+ unmatchedStart = indexPrev;
595
+ unmatchedEnd = index;
596
+ index = indexPrev = TAB_RE.lastIndex;
597
+ continue;
598
+ }
599
+ EMOJI_RE.lastIndex = index;
600
+ if (EMOJI_RE.test(input)) {
601
+ if (width + EMOJI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
602
+ if (width + EMOJI_WIDTH > LIMIT) {
603
+ truncationEnabled = true;
604
+ break;
605
+ }
606
+ width += EMOJI_WIDTH;
607
+ unmatchedStart = indexPrev;
608
+ unmatchedEnd = index;
609
+ index = indexPrev = EMOJI_RE.lastIndex;
610
+ continue;
611
+ }
612
+ index += 1;
613
+ }
614
+ return {
615
+ width: truncationEnabled ? truncationLimit : width,
616
+ index: truncationEnabled ? truncationIndex : length,
617
+ truncated: truncationEnabled,
618
+ ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
619
+ };
620
+ };
621
+ //#endregion
622
+ //#region ../../node_modules/.pnpm/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
623
+ const NO_TRUNCATION = {
624
+ limit: Infinity,
625
+ ellipsis: "",
626
+ ellipsisWidth: 0
627
+ };
628
+ const fastStringWidth = (input, options = {}) => {
629
+ return getStringTruncatedWidth(input, NO_TRUNCATION, options).width;
630
+ };
631
+ //#endregion
632
+ //#region ../../node_modules/.pnpm/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
633
+ const ESC = "\x1B";
634
+ const CSI = "›";
635
+ const END_CODE = 39;
636
+ const ANSI_ESCAPE_BELL = "\x07";
637
+ const ANSI_CSI = "[";
638
+ const ANSI_OSC = "]";
639
+ const ANSI_SGR_TERMINATOR = "m";
640
+ const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
641
+ const GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
642
+ const getClosingCode = (openingCode) => {
643
+ if (openingCode >= 30 && openingCode <= 37) return 39;
644
+ if (openingCode >= 90 && openingCode <= 97) return 39;
645
+ if (openingCode >= 40 && openingCode <= 47) return 49;
646
+ if (openingCode >= 100 && openingCode <= 107) return 49;
647
+ if (openingCode === 1 || openingCode === 2) return 22;
648
+ if (openingCode === 3) return 23;
649
+ if (openingCode === 4) return 24;
650
+ if (openingCode === 7) return 27;
651
+ if (openingCode === 8) return 28;
652
+ if (openingCode === 9) return 29;
653
+ if (openingCode === 0) return 0;
654
+ };
655
+ const wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
656
+ const wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
657
+ const wrapWord = (rows, word, columns) => {
658
+ const characters = word[Symbol.iterator]();
659
+ let isInsideEscape = false;
660
+ let isInsideLinkEscape = false;
661
+ let lastRow = rows.at(-1);
662
+ let visible = lastRow === void 0 ? 0 : fastStringWidth(lastRow);
663
+ let currentCharacter = characters.next();
664
+ let nextCharacter = characters.next();
665
+ let rawCharacterIndex = 0;
666
+ while (!currentCharacter.done) {
667
+ const character = currentCharacter.value;
668
+ const characterLength = fastStringWidth(character);
669
+ if (visible + characterLength <= columns) rows[rows.length - 1] += character;
670
+ else {
671
+ rows.push(character);
672
+ visible = 0;
673
+ }
674
+ if (character === ESC || character === CSI) {
675
+ isInsideEscape = true;
676
+ isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
677
+ }
678
+ if (isInsideEscape) {
679
+ if (isInsideLinkEscape) {
680
+ if (character === ANSI_ESCAPE_BELL) {
681
+ isInsideEscape = false;
682
+ isInsideLinkEscape = false;
683
+ }
684
+ } else if (character === ANSI_SGR_TERMINATOR) isInsideEscape = false;
685
+ } else {
686
+ visible += characterLength;
687
+ if (visible === columns && !nextCharacter.done) {
688
+ rows.push("");
689
+ visible = 0;
690
+ }
691
+ }
692
+ currentCharacter = nextCharacter;
693
+ nextCharacter = characters.next();
694
+ rawCharacterIndex += character.length;
695
+ }
696
+ lastRow = rows.at(-1);
697
+ if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) rows[rows.length - 2] += rows.pop();
698
+ };
699
+ const stringVisibleTrimSpacesRight = (string) => {
700
+ const words = string.split(" ");
701
+ let last = words.length;
702
+ while (last) {
703
+ if (fastStringWidth(words[last - 1])) break;
704
+ last--;
705
+ }
706
+ if (last === words.length) return string;
707
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
708
+ };
709
+ const exec = (string, columns, options = {}) => {
710
+ if (options.trim !== false && string.trim() === "") return "";
711
+ let returnValue = "";
712
+ let escapeCode;
713
+ let escapeUrl;
714
+ const words = string.split(" ");
715
+ let rows = [""];
716
+ let rowLength = 0;
717
+ for (let index = 0; index < words.length; index++) {
718
+ const word = words[index];
719
+ if (options.trim !== false) {
720
+ const row = rows.at(-1) ?? "";
721
+ const trimmed = row.trimStart();
722
+ if (row.length !== trimmed.length) {
723
+ rows[rows.length - 1] = trimmed;
724
+ rowLength = fastStringWidth(trimmed);
725
+ }
726
+ }
727
+ if (index !== 0) {
728
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
729
+ rows.push("");
730
+ rowLength = 0;
731
+ }
732
+ if (rowLength || options.trim === false) {
733
+ rows[rows.length - 1] += " ";
734
+ rowLength++;
735
+ }
736
+ }
737
+ const wordLength = fastStringWidth(word);
738
+ if (options.hard && wordLength > columns) {
739
+ const remainingColumns = columns - rowLength;
740
+ const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
741
+ if (Math.floor((wordLength - 1) / columns) < breaksStartingThisLine) rows.push("");
742
+ wrapWord(rows, word, columns);
743
+ rowLength = fastStringWidth(rows.at(-1) ?? "");
744
+ continue;
745
+ }
746
+ if (rowLength + wordLength > columns && rowLength && wordLength) {
747
+ if (options.wordWrap === false && rowLength < columns) {
748
+ wrapWord(rows, word, columns);
749
+ rowLength = fastStringWidth(rows.at(-1) ?? "");
750
+ continue;
751
+ }
752
+ rows.push("");
753
+ rowLength = 0;
754
+ }
755
+ if (rowLength + wordLength > columns && options.wordWrap === false) {
756
+ wrapWord(rows, word, columns);
757
+ rowLength = fastStringWidth(rows.at(-1) ?? "");
758
+ continue;
759
+ }
760
+ rows[rows.length - 1] += word;
761
+ rowLength += wordLength;
762
+ }
763
+ if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
764
+ const preString = rows.join("\n");
765
+ let inSurrogate = false;
766
+ for (let i = 0; i < preString.length; i++) {
767
+ const character = preString[i];
768
+ returnValue += character;
769
+ if (!inSurrogate) inSurrogate = character >= "\ud800" && character <= "\udbff";
770
+ else continue;
771
+ if (character === ESC || character === CSI) {
772
+ GROUP_REGEX.lastIndex = i + 1;
773
+ const groups = GROUP_REGEX.exec(preString)?.groups;
774
+ if (groups?.code !== void 0) {
775
+ const code = Number.parseFloat(groups.code);
776
+ escapeCode = code === END_CODE ? void 0 : code;
777
+ } else if (groups?.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
778
+ }
779
+ if (preString[i + 1] === "\n") {
780
+ if (escapeUrl) returnValue += wrapAnsiHyperlink("");
781
+ const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
782
+ if (escapeCode && closingCode) returnValue += wrapAnsiCode(closingCode);
783
+ } else if (character === "\n") {
784
+ if (escapeCode && getClosingCode(escapeCode)) returnValue += wrapAnsiCode(escapeCode);
785
+ if (escapeUrl) returnValue += wrapAnsiHyperlink(escapeUrl);
786
+ }
787
+ }
788
+ return returnValue;
789
+ };
790
+ const CRLF_OR_LF = /\r?\n/;
791
+ function wrapAnsi(string, columns, options) {
792
+ return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
793
+ }
794
+ //#endregion
795
+ //#region ../../node_modules/.pnpm/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
476
796
  var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
477
797
  const ESC = "\x1B";
478
798
  const CSI = `${ESC}[`;
@@ -525,162 +845,12 @@ var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
525
845
  beep
526
846
  };
527
847
  })))();
528
- function x$1(t, e, s) {
529
- if (!s.some((u) => !u.disabled)) return t;
530
- const i = t + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
531
- return s[n].disabled ? x$1(n, e < 0 ? -1 : 1, s) : n;
848
+ function d$1(r, t, e) {
849
+ if (!e.some((o) => !o.disabled)) return r;
850
+ const s = r + t, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
851
+ return e[n].disabled ? d$1(n, t < 0 ? -1 : 1, e) : n;
532
852
  }
533
- const at = (t) => t === 161 || t === 164 || t === 167 || t === 168 || t === 170 || t === 173 || t === 174 || t >= 176 && t <= 180 || t >= 182 && t <= 186 || t >= 188 && t <= 191 || t === 198 || t === 208 || t === 215 || t === 216 || t >= 222 && t <= 225 || t === 230 || t >= 232 && t <= 234 || t === 236 || t === 237 || t === 240 || t === 242 || t === 243 || t >= 247 && t <= 250 || t === 252 || t === 254 || t === 257 || t === 273 || t === 275 || t === 283 || t === 294 || t === 295 || t === 299 || t >= 305 && t <= 307 || t === 312 || t >= 319 && t <= 322 || t === 324 || t >= 328 && t <= 331 || t === 333 || t === 338 || t === 339 || t === 358 || t === 359 || t === 363 || t === 462 || t === 464 || t === 466 || t === 468 || t === 470 || t === 472 || t === 474 || t === 476 || t === 593 || t === 609 || t === 708 || t === 711 || t >= 713 && t <= 715 || t === 717 || t === 720 || t >= 728 && t <= 731 || t === 733 || t === 735 || t >= 768 && t <= 879 || t >= 913 && t <= 929 || t >= 931 && t <= 937 || t >= 945 && t <= 961 || t >= 963 && t <= 969 || t === 1025 || t >= 1040 && t <= 1103 || t === 1105 || t === 8208 || t >= 8211 && t <= 8214 || t === 8216 || t === 8217 || t === 8220 || t === 8221 || t >= 8224 && t <= 8226 || t >= 8228 && t <= 8231 || t === 8240 || t === 8242 || t === 8243 || t === 8245 || t === 8251 || t === 8254 || t === 8308 || t === 8319 || t >= 8321 && t <= 8324 || t === 8364 || t === 8451 || t === 8453 || t === 8457 || t === 8467 || t === 8470 || t === 8481 || t === 8482 || t === 8486 || t === 8491 || t === 8531 || t === 8532 || t >= 8539 && t <= 8542 || t >= 8544 && t <= 8555 || t >= 8560 && t <= 8569 || t === 8585 || t >= 8592 && t <= 8601 || t === 8632 || t === 8633 || t === 8658 || t === 8660 || t === 8679 || t === 8704 || t === 8706 || t === 8707 || t === 8711 || t === 8712 || t === 8715 || t === 8719 || t === 8721 || t === 8725 || t === 8730 || t >= 8733 && t <= 8736 || t === 8739 || t === 8741 || t >= 8743 && t <= 8748 || t === 8750 || t >= 8756 && t <= 8759 || t === 8764 || t === 8765 || t === 8776 || t === 8780 || t === 8786 || t === 8800 || t === 8801 || t >= 8804 && t <= 8807 || t === 8810 || t === 8811 || t === 8814 || t === 8815 || t === 8834 || t === 8835 || t === 8838 || t === 8839 || t === 8853 || t === 8857 || t === 8869 || t === 8895 || t === 8978 || t >= 9312 && t <= 9449 || t >= 9451 && t <= 9547 || t >= 9552 && t <= 9587 || t >= 9600 && t <= 9615 || t >= 9618 && t <= 9621 || t === 9632 || t === 9633 || t >= 9635 && t <= 9641 || t === 9650 || t === 9651 || t === 9654 || t === 9655 || t === 9660 || t === 9661 || t === 9664 || t === 9665 || t >= 9670 && t <= 9672 || t === 9675 || t >= 9678 && t <= 9681 || t >= 9698 && t <= 9701 || t === 9711 || t === 9733 || t === 9734 || t === 9737 || t === 9742 || t === 9743 || t === 9756 || t === 9758 || t === 9792 || t === 9794 || t === 9824 || t === 9825 || t >= 9827 && t <= 9829 || t >= 9831 && t <= 9834 || t === 9836 || t === 9837 || t === 9839 || t === 9886 || t === 9887 || t === 9919 || t >= 9926 && t <= 9933 || t >= 9935 && t <= 9939 || t >= 9941 && t <= 9953 || t === 9955 || t === 9960 || t === 9961 || t >= 9963 && t <= 9969 || t === 9972 || t >= 9974 && t <= 9977 || t === 9979 || t === 9980 || t === 9982 || t === 9983 || t === 10045 || t >= 10102 && t <= 10111 || t >= 11094 && t <= 11097 || t >= 12872 && t <= 12879 || t >= 57344 && t <= 63743 || t >= 65024 && t <= 65039 || t === 65533 || t >= 127232 && t <= 127242 || t >= 127248 && t <= 127277 || t >= 127280 && t <= 127337 || t >= 127344 && t <= 127373 || t === 127375 || t === 127376 || t >= 127387 && t <= 127404 || t >= 917760 && t <= 917999 || t >= 983040 && t <= 1048573 || t >= 1048576 && t <= 1114109, lt = (t) => t === 12288 || t >= 65281 && t <= 65376 || t >= 65504 && t <= 65510, ht = (t) => t >= 4352 && t <= 4447 || t === 8986 || t === 8987 || t === 9001 || t === 9002 || t >= 9193 && t <= 9196 || t === 9200 || t === 9203 || t === 9725 || t === 9726 || t === 9748 || t === 9749 || t >= 9800 && t <= 9811 || t === 9855 || t === 9875 || t === 9889 || t === 9898 || t === 9899 || t === 9917 || t === 9918 || t === 9924 || t === 9925 || t === 9934 || t === 9940 || t === 9962 || t === 9970 || t === 9971 || t === 9973 || t === 9978 || t === 9981 || t === 9989 || t === 9994 || t === 9995 || t === 10024 || t === 10060 || t === 10062 || t >= 10067 && t <= 10069 || t === 10071 || t >= 10133 && t <= 10135 || t === 10160 || t === 10175 || t === 11035 || t === 11036 || t === 11088 || t === 11093 || t >= 11904 && t <= 11929 || t >= 11931 && t <= 12019 || t >= 12032 && t <= 12245 || t >= 12272 && t <= 12287 || t >= 12289 && t <= 12350 || t >= 12353 && t <= 12438 || t >= 12441 && t <= 12543 || t >= 12549 && t <= 12591 || t >= 12593 && t <= 12686 || t >= 12688 && t <= 12771 || t >= 12783 && t <= 12830 || t >= 12832 && t <= 12871 || t >= 12880 && t <= 19903 || t >= 19968 && t <= 42124 || t >= 42128 && t <= 42182 || t >= 43360 && t <= 43388 || t >= 44032 && t <= 55203 || t >= 63744 && t <= 64255 || t >= 65040 && t <= 65049 || t >= 65072 && t <= 65106 || t >= 65108 && t <= 65126 || t >= 65128 && t <= 65131 || t >= 94176 && t <= 94180 || t === 94192 || t === 94193 || t >= 94208 && t <= 100343 || t >= 100352 && t <= 101589 || t >= 101632 && t <= 101640 || t >= 110576 && t <= 110579 || t >= 110581 && t <= 110587 || t === 110589 || t === 110590 || t >= 110592 && t <= 110882 || t === 110898 || t >= 110928 && t <= 110930 || t === 110933 || t >= 110948 && t <= 110951 || t >= 110960 && t <= 111355 || t === 126980 || t === 127183 || t === 127374 || t >= 127377 && t <= 127386 || t >= 127488 && t <= 127490 || t >= 127504 && t <= 127547 || t >= 127552 && t <= 127560 || t === 127568 || t === 127569 || t >= 127584 && t <= 127589 || t >= 127744 && t <= 127776 || t >= 127789 && t <= 127797 || t >= 127799 && t <= 127868 || t >= 127870 && t <= 127891 || t >= 127904 && t <= 127946 || t >= 127951 && t <= 127955 || t >= 127968 && t <= 127984 || t === 127988 || t >= 127992 && t <= 128062 || t === 128064 || t >= 128066 && t <= 128252 || t >= 128255 && t <= 128317 || t >= 128331 && t <= 128334 || t >= 128336 && t <= 128359 || t === 128378 || t === 128405 || t === 128406 || t === 128420 || t >= 128507 && t <= 128591 || t >= 128640 && t <= 128709 || t === 128716 || t >= 128720 && t <= 128722 || t >= 128725 && t <= 128727 || t >= 128732 && t <= 128735 || t === 128747 || t === 128748 || t >= 128756 && t <= 128764 || t >= 128992 && t <= 129003 || t === 129008 || t >= 129292 && t <= 129338 || t >= 129340 && t <= 129349 || t >= 129351 && t <= 129535 || t >= 129648 && t <= 129660 || t >= 129664 && t <= 129672 || t >= 129680 && t <= 129725 || t >= 129727 && t <= 129733 || t >= 129742 && t <= 129755 || t >= 129760 && t <= 129768 || t >= 129776 && t <= 129784 || t >= 131072 && t <= 196605 || t >= 196608 && t <= 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, L = /\t{1,1000}/y, 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?))*/uy, M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, ct = /\p{M}+/gu, ft$1 = {
534
- limit: Infinity,
535
- ellipsis: ""
536
- }, X$1 = (t, e = {}, s = {}) => {
537
- const i = e.limit ?? Infinity, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X$1(r, ft$1, 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, V = s.wideWidth ?? 2;
538
- let h = 0, o = 0, p = t.length, v = 0, F = !1, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
539
- t: for (;;) {
540
- if (w > C || o >= p && o > h) {
541
- const ut = t.slice(C, w) || t.slice(h, o);
542
- v = 0;
543
- for (const Y of ut.replaceAll(ct, "")) {
544
- const $ = Y.codePointAt(0) || 0;
545
- if (lt($) ? f = m : ht($) ? f = V : E !== A && at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h) + v)), c + f > i) {
546
- F = !0;
547
- break t;
548
- }
549
- v += Y.length, c += f;
550
- }
551
- C = w = 0;
552
- }
553
- if (o >= p) break;
554
- if (M.lastIndex = o, M.test(t)) {
555
- if (v = M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
556
- F = !0;
557
- break;
558
- }
559
- c += f, C = h, w = o, o = h = M.lastIndex;
560
- continue;
561
- }
562
- if (O.lastIndex = o, O.test(t)) {
563
- if (c + u > b && (d = Math.min(d, o)), c + u > i) {
564
- F = !0;
565
- break;
566
- }
567
- c += u, C = h, w = o, o = h = O.lastIndex;
568
- continue;
569
- }
570
- if (y.lastIndex = o, y.test(t)) {
571
- if (v = y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
572
- F = !0;
573
- break;
574
- }
575
- c += f, C = h, w = o, o = h = y.lastIndex;
576
- continue;
577
- }
578
- if (L.lastIndex = o, L.test(t)) {
579
- if (v = L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
580
- F = !0;
581
- break;
582
- }
583
- c += f, C = h, w = o, o = h = L.lastIndex;
584
- continue;
585
- }
586
- if (P.lastIndex = o, P.test(t)) {
587
- if (c + g > b && (d = Math.min(d, o)), c + g > i) {
588
- F = !0;
589
- break;
590
- }
591
- c += g, C = h, w = o, o = h = P.lastIndex;
592
- continue;
593
- }
594
- o += 1;
595
- }
596
- return {
597
- width: F ? b : c,
598
- index: F ? d : p,
599
- truncated: F,
600
- ellipsed: F && i >= n
601
- };
602
- }, pt$1 = {
603
- limit: Infinity,
604
- ellipsis: "",
605
- ellipsisWidth: 0
606
- }, S = (t, e = {}) => X$1(t, pt$1, e).width, T = "\x1B", Z = "›", Ft$1 = 39, j = "\x07", Q$1 = "[", dt = "]", tt = "m", U$1 = `${dt}8;;`, et = new RegExp(`(?:\\${Q$1}(?<code>\\d+)m|\\${U$1}(?<uri>.*)${j})`, "y"), mt$1 = (t) => {
607
- if (t >= 30 && t <= 37 || t >= 90 && t <= 97) return 39;
608
- if (t >= 40 && t <= 47 || t >= 100 && t <= 107) return 49;
609
- if (t === 1 || t === 2) return 22;
610
- if (t === 3) return 23;
611
- if (t === 4) return 24;
612
- if (t === 7) return 27;
613
- if (t === 8) return 28;
614
- if (t === 9) return 29;
615
- if (t === 0) return 0;
616
- }, st = (t) => `${T}${Q$1}${t}${tt}`, it = (t) => `${T}${U$1}${t}${j}`, gt$1 = (t) => t.map((e) => S(e)), G = (t, e, s) => {
617
- const i = e[Symbol.iterator]();
618
- let r = !1, n = !1, u = t.at(-1), a = u === void 0 ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
619
- for (; !l.done;) {
620
- const m = l.value, A = S(m);
621
- a + A <= s ? t[t.length - 1] += m : (t.push(m), a = 0), (m === T || m === Z) && (r = !0, n = e.startsWith(U$1, g + 1)), r ? n ? m === j && (r = !1, n = !1) : m === tt && (r = !1) : (a += A, a === s && !E.done && (t.push(""), a = 0)), l = E, E = i.next(), g += m.length;
622
- }
623
- u = t.at(-1), !a && u !== void 0 && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
624
- }, vt$1 = (t) => {
625
- const e = t.split(" ");
626
- let s = e.length;
627
- for (; s > 0 && !(S(e[s - 1]) > 0);) s--;
628
- return s === e.length ? t : e.slice(0, s).join(" ") + e.slice(s).join("");
629
- }, Et$1 = (t, e, s = {}) => {
630
- if (s.trim !== !1 && t.trim() === "") return "";
631
- let i = "", r, n;
632
- const u = t.split(" "), a = gt$1(u);
633
- let l = [""];
634
- for (const [h, o] of u.entries()) {
635
- s.trim !== !1 && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
636
- let p = S(l.at(-1) ?? "");
637
- if (h !== 0 && (p >= e && (s.wordWrap === !1 || s.trim === !1) && (l.push(""), p = 0), (p > 0 || s.trim === !1) && (l[l.length - 1] += " ", p++)), s.hard && a[h] > e) {
638
- const v = e - p, F = 1 + Math.floor((a[h] - v - 1) / e);
639
- Math.floor((a[h] - 1) / e) < F && l.push(""), G(l, o, e);
640
- continue;
641
- }
642
- if (p + a[h] > e && p > 0 && a[h] > 0) {
643
- if (s.wordWrap === !1 && p < e) {
644
- G(l, o, e);
645
- continue;
646
- }
647
- l.push("");
648
- }
649
- if (p + a[h] > e && s.wordWrap === !1) {
650
- G(l, o, e);
651
- continue;
652
- }
653
- l[l.length - 1] += o;
654
- }
655
- s.trim !== !1 && (l = l.map((h) => vt$1(h)));
656
- const E = l.join(`
657
- `), g = E[Symbol.iterator]();
658
- let m = g.next(), A = g.next(), V = 0;
659
- for (; !m.done;) {
660
- const h = m.value, o = A.value;
661
- if (i += h, h === T || h === Z) {
662
- et.lastIndex = V + 1;
663
- const F = et.exec(E)?.groups;
664
- if (F?.code !== void 0) {
665
- const d = Number.parseFloat(F.code);
666
- r = d === Ft$1 ? void 0 : d;
667
- } else F?.uri !== void 0 && (n = F.uri.length === 0 ? void 0 : F.uri);
668
- }
669
- const p = r ? mt$1(r) : void 0;
670
- o === `
671
- ` ? (n && (i += it("")), r && p && (i += st(p))) : h === `
672
- ` && (r && p && (i += st(r)), n && (i += it(n))), V += h.length, m = A, A = g.next();
673
- }
674
- return i;
675
- };
676
- function K$1(t, e, s) {
677
- return String(t).normalize().replaceAll(`\r
678
- `, `
679
- `).split(`
680
- `).map((i) => Et$1(i, e, s)).join(`
681
- `);
682
- }
683
- const _ = {
853
+ const u = {
684
854
  actions: new Set([
685
855
  "up",
686
856
  "down",
@@ -702,37 +872,68 @@ const _ = {
702
872
  cancel: "Canceled",
703
873
  error: "Something went wrong"
704
874
  },
705
- withGuide: !0
875
+ withGuide: !0,
876
+ date: {
877
+ monthNames: [...[
878
+ "January",
879
+ "February",
880
+ "March",
881
+ "April",
882
+ "May",
883
+ "June",
884
+ "July",
885
+ "August",
886
+ "September",
887
+ "October",
888
+ "November",
889
+ "December"
890
+ ]],
891
+ messages: {
892
+ required: "Please enter a valid date",
893
+ invalidMonth: "There are only 12 months in a year",
894
+ invalidDay: (r, t) => `There are only ${r} days in ${t}`,
895
+ afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`,
896
+ beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}`
897
+ }
898
+ }
706
899
  };
707
- function H$1(t, e) {
708
- if (typeof t == "string") return _.aliases.get(t) === e;
709
- for (const s of t) if (s !== void 0 && H$1(s, e)) return !0;
900
+ function V$1(r, t) {
901
+ if (typeof r == "string") return u.aliases.get(r) === t;
902
+ for (const e of r) if (e !== void 0 && V$1(e, t)) return !0;
710
903
  return !1;
711
904
  }
712
- function _t$1(t, e) {
713
- if (t === e) return;
714
- const s = t.split(`
715
- `), i = e.split(`
716
- `), r = Math.max(s.length, i.length), n = [];
717
- for (let u = 0; u < r; u++) s[u] !== i[u] && n.push(u);
905
+ function j(r, t) {
906
+ if (r === t) return;
907
+ const e = r.split(`
908
+ `), s = t.split(`
909
+ `), i = Math.max(e.length, s.length), n = [];
910
+ for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
718
911
  return {
719
912
  lines: n,
720
- numLinesBefore: s.length,
721
- numLinesAfter: i.length,
722
- numLines: r
913
+ numLinesBefore: e.length,
914
+ numLinesAfter: s.length,
915
+ numLines: i
723
916
  };
724
917
  }
725
918
  globalThis.process.platform.startsWith("win");
726
- const z$1 = Symbol("clack:cancel");
727
- function Ct$1(t) {
728
- return t === z$1;
919
+ const C = Symbol("clack:cancel");
920
+ function q(r) {
921
+ return r === C;
729
922
  }
730
- function W$1(t, e) {
731
- const s = t;
732
- s.isTTY && s.setRawMode(e);
923
+ function w$1(r, t) {
924
+ const e = r;
925
+ e.isTTY && e.setRawMode(t);
733
926
  }
734
- const rt = (t) => "columns" in t && typeof t.columns == "number" ? t.columns : 80, nt = (t) => "rows" in t && typeof t.rows == "number" ? t.rows : 20;
735
- var B = class {
927
+ const O$1 = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80, A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
928
+ function R(r, t, e, s = e) {
929
+ return wrapAnsi(t, O$1(r ?? stdout) - e.length, {
930
+ hard: !0,
931
+ trim: !1
932
+ }).split(`
933
+ `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
934
+ `);
935
+ }
936
+ let p = class {
736
937
  input;
737
938
  output;
738
939
  _abortSignal;
@@ -747,60 +948,60 @@ var B = class {
747
948
  error = "";
748
949
  value;
749
950
  userInput = "";
750
- constructor(e, s = !0) {
751
- const { input: i = stdin, output: r = stdout, render: n, signal: u, ...a } = e;
752
- 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;
951
+ constructor(t, e = !0) {
952
+ const { input: s = stdin, output: i = stdout, render: n, signal: o, ...a } = t;
953
+ 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 = e, this._abortSignal = o, this.input = s, this.output = i;
753
954
  }
754
955
  unsubscribe() {
755
956
  this._subscribers.clear();
756
957
  }
757
- setSubscriber(e, s) {
758
- const i = this._subscribers.get(e) ?? [];
759
- i.push(s), this._subscribers.set(e, i);
958
+ setSubscriber(t, e) {
959
+ const s = this._subscribers.get(t) ?? [];
960
+ s.push(e), this._subscribers.set(t, s);
760
961
  }
761
- on(e, s) {
762
- this.setSubscriber(e, { cb: s });
962
+ on(t, e) {
963
+ this.setSubscriber(t, { cb: e });
763
964
  }
764
- once(e, s) {
765
- this.setSubscriber(e, {
766
- cb: s,
965
+ once(t, e) {
966
+ this.setSubscriber(t, {
967
+ cb: e,
767
968
  once: !0
768
969
  });
769
970
  }
770
- emit(e, ...s) {
771
- const i = this._subscribers.get(e) ?? [], r = [];
772
- for (const n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
773
- for (const n of r) n();
971
+ emit(t, ...e) {
972
+ const s = this._subscribers.get(t) ?? [], i = [];
973
+ for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
974
+ for (const n of i) n();
774
975
  }
775
976
  prompt() {
776
- return new Promise((e) => {
977
+ return new Promise((t) => {
777
978
  if (this._abortSignal) {
778
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z$1);
979
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t(C);
779
980
  this._abortSignal.addEventListener("abort", () => {
780
981
  this.state = "cancel", this.close();
781
982
  }, { once: !0 });
782
983
  }
783
- this.rl = ot.createInterface({
984
+ this.rl = P.createInterface({
784
985
  input: this.input,
785
986
  tabSize: 2,
786
987
  prompt: "",
787
988
  escapeCodeTimeout: 50,
788
989
  terminal: !0
789
- }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), W$1(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
790
- this.output.write(import_src.cursor.show), this.output.off("resize", this.render), W$1(this.input, !1), e(this.value);
990
+ }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), w$1(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
991
+ this.output.write(import_src.cursor.show), this.output.off("resize", this.render), w$1(this.input, !1), t(this.value);
791
992
  }), this.once("cancel", () => {
792
- this.output.write(import_src.cursor.show), this.output.off("resize", this.render), W$1(this.input, !1), e(z$1);
993
+ this.output.write(import_src.cursor.show), this.output.off("resize", this.render), w$1(this.input, !1), t(C);
793
994
  });
794
995
  });
795
996
  }
796
- _isActionKey(e, s) {
797
- return e === " ";
997
+ _isActionKey(t, e) {
998
+ return t === " ";
798
999
  }
799
- _setValue(e) {
800
- this.value = e, this.emit("value", this.value);
1000
+ _setValue(t) {
1001
+ this.value = t, this.emit("value", this.value);
801
1002
  }
802
- _setUserInput(e, s) {
803
- this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
1003
+ _setUserInput(t, e) {
1004
+ this.userInput = t ?? "", this.emit("userInput", this.userInput), e && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
804
1005
  }
805
1006
  _clearUserInput() {
806
1007
  this.rl?.write(null, {
@@ -808,399 +1009,250 @@ var B = class {
808
1009
  name: "u"
809
1010
  }), this._setUserInput("");
810
1011
  }
811
- onKeypress(e, s) {
812
- if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, {
1012
+ onKeypress(t, e) {
1013
+ if (this._track && e.name !== "return" && (e.name && this._isActionKey(t, e) && this.rl?.write(null, {
813
1014
  ctrl: !0,
814
1015
  name: "h"
815
- }), 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") {
1016
+ }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t && (t.toLowerCase() === "y" || t.toLowerCase() === "n") && this.emit("confirm", t.toLowerCase() === "y"), this.emit("key", t?.toLowerCase(), e), e?.name === "return") {
816
1017
  if (this.opts.validate) {
817
- const i = this.opts.validate(this.value);
818
- i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
1018
+ const s = this.opts.validate(this.value);
1019
+ s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
819
1020
  }
820
1021
  this.state !== "error" && (this.state = "submit");
821
1022
  }
822
- H$1([
823
- e,
824
- s?.name,
825
- s?.sequence
1023
+ V$1([
1024
+ t,
1025
+ e?.name,
1026
+ e?.sequence
826
1027
  ], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
827
1028
  }
828
1029
  close() {
829
1030
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
830
- `), W$1(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
1031
+ `), w$1(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
831
1032
  }
832
1033
  restoreCursor() {
833
- const e = K$1(this._prevFrame, process.stdout.columns, {
1034
+ const t = wrapAnsi(this._prevFrame, process.stdout.columns, {
834
1035
  hard: !0,
835
1036
  trim: !1
836
1037
  }).split(`
837
1038
  `).length - 1;
838
- this.output.write(import_src.cursor.move(-999, e * -1));
1039
+ this.output.write(import_src.cursor.move(-999, t * -1));
839
1040
  }
840
1041
  render() {
841
- const e = K$1(this._render(this) ?? "", process.stdout.columns, {
1042
+ const t = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
842
1043
  hard: !0,
843
1044
  trim: !1
844
1045
  });
845
- if (e !== this._prevFrame) {
1046
+ if (t !== this._prevFrame) {
846
1047
  if (this.state === "initial") this.output.write(import_src.cursor.hide);
847
1048
  else {
848
- const s = _t$1(this._prevFrame, e), i = nt(this.output);
849
- if (this.restoreCursor(), s) {
850
- const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
851
- let u = s.lines.find((a) => a >= r);
852
- if (u === void 0) {
853
- this._prevFrame = e;
1049
+ const e = j(this._prevFrame, t), s = A(this.output);
1050
+ if (this.restoreCursor(), e) {
1051
+ const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
1052
+ let o = e.lines.find((a) => a >= i);
1053
+ if (o === void 0) {
1054
+ this._prevFrame = t;
854
1055
  return;
855
1056
  }
856
- if (s.lines.length === 1) {
857
- this.output.write(import_src.cursor.move(0, u - n)), this.output.write(import_src.erase.lines(1));
858
- const a = e.split(`
1057
+ if (e.lines.length === 1) {
1058
+ this.output.write(import_src.cursor.move(0, o - n)), this.output.write(import_src.erase.lines(1));
1059
+ const a = t.split(`
859
1060
  `);
860
- this.output.write(a[u]), this._prevFrame = e, this.output.write(import_src.cursor.move(0, a.length - u - 1));
1061
+ this.output.write(a[o]), this._prevFrame = t, this.output.write(import_src.cursor.move(0, a.length - o - 1));
861
1062
  return;
862
- } else if (s.lines.length > 1) {
863
- if (r < n) u = r;
1063
+ } else if (e.lines.length > 1) {
1064
+ if (i < n) o = i;
864
1065
  else {
865
- const l = u - n;
866
- l > 0 && this.output.write(import_src.cursor.move(0, l));
1066
+ const h = o - n;
1067
+ h > 0 && this.output.write(import_src.cursor.move(0, h));
867
1068
  }
868
1069
  this.output.write(import_src.erase.down());
869
- const a = e.split(`
870
- `).slice(u);
1070
+ const a = t.split(`
1071
+ `).slice(o);
871
1072
  this.output.write(a.join(`
872
- `)), this._prevFrame = e;
1073
+ `)), this._prevFrame = t;
873
1074
  return;
874
1075
  }
875
1076
  }
876
1077
  this.output.write(import_src.erase.down());
877
1078
  }
878
- this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
1079
+ this.output.write(t), this.state === "initial" && (this.state = "active"), this._prevFrame = t;
879
1080
  }
880
1081
  }
881
1082
  };
882
- var kt$1 = class extends B {
1083
+ var Q$1 = class extends p {
883
1084
  get cursor() {
884
1085
  return this.value ? 0 : 1;
885
1086
  }
886
1087
  get _value() {
887
1088
  return this.cursor === 0;
888
1089
  }
889
- constructor(e) {
890
- super(e, !1), this.value = !!e.initialValue, this.on("userInput", () => {
1090
+ constructor(t) {
1091
+ super(t, !1), this.value = !!t.initialValue, this.on("userInput", () => {
891
1092
  this.value = this._value;
892
- }), this.on("confirm", (s) => {
893
- this.output.write(import_src.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
1093
+ }), this.on("confirm", (e) => {
1094
+ this.output.write(import_src.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
894
1095
  }), this.on("cursor", () => {
895
1096
  this.value = !this.value;
896
1097
  });
897
1098
  }
898
1099
  };
899
1100
  //#endregion
900
- //#region ../../node_modules/.pnpm/@clack+prompts@1.1.0/node_modules/@clack/prompts/dist/index.mjs
901
- function pt() {
1101
+ //#region ../../node_modules/.pnpm/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
1102
+ function Ze() {
902
1103
  return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
903
1104
  }
904
- const ee = pt(), I = (e, r) => ee ? e : r, Re = I("◆", "*"), $e = I("■", "x"), de = I("▲", "x"), V = I("◇", "o");
905
- I("┌", "T");
906
- const h = I("│", "|"), x = I("└", "—");
907
- I("┐", "T");
908
- I("┘", "—");
909
- const z = I("●", ">"), H = I("○", " ");
910
- I("◻", "[•]");
911
- I("◼", "[+]");
912
- I("◻", "[ ]");
913
- I("▪", "•");
914
- const se = I("─", "-"), pe = I("╮", "+"), We = I("├", "+"), me = I("╯", "+"), ge = I("╰", "+");
915
- I("╭", "+");
916
- const fe = I("●", "•"), Fe = I("◆", "*"), ye = I("▲", "!"), Ee = I("■", "x"), W = (e) => {
1105
+ const ee = Ze(), w = (e, i) => ee ? e : i, _e = w("◆", "*"), oe = w("■", "x"), ue = w("▲", "x"), F = w("◇", "o");
1106
+ w("┌", "T");
1107
+ const d = w("│", "|"), E = w("└", "—");
1108
+ w("┐", "T");
1109
+ w("┘", "—");
1110
+ const z = w("●", ">"), H = w("○", " ");
1111
+ w("◻", "[•]");
1112
+ w("◼", "[+]");
1113
+ w("◻", "[ ]");
1114
+ w("▪", "•");
1115
+ const se = w("─", "-"), ce = w("╮", "+"), Ge = w("├", "+"), $e = w("╯", "+"), de = w("╰", "+");
1116
+ w("╭", "+");
1117
+ const he = w("●", "•"), pe = w("◆", "*"), me = w("▲", "!"), ge = w("■", "x"), V = (e) => {
917
1118
  switch (e) {
918
1119
  case "initial":
919
- case "active": return styleText("cyan", Re);
920
- case "cancel": return styleText("red", $e);
921
- case "error": return styleText("yellow", de);
922
- case "submit": return styleText("green", V);
1120
+ case "active": return styleText("cyan", _e);
1121
+ case "cancel": return styleText("red", oe);
1122
+ case "error": return styleText("yellow", ue);
1123
+ case "submit": return styleText("green", F);
923
1124
  }
924
- }, mt = (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, gt = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, ft = (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, we = /[\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 = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy, ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, Ft = /\p{M}+/gu, yt = {
925
- limit: Infinity,
926
- ellipsis: ""
927
- }, Le = (e, r = {}, s = {}) => {
928
- const i = r.limit ?? Infinity, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, yt, 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;
929
- let $ = 0, m = 0, d = e.length, F = 0, y = !1, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S = 0;
930
- e: for (;;) {
931
- if (b > A || m >= d && m > $) {
932
- const T = e.slice(A, b) || e.slice($, m);
933
- F = 0;
934
- for (const M of T.replaceAll(Ft, "")) {
935
- const O = M.codePointAt(0) || 0;
936
- if (gt(O) ? S = f : ft(O) ? S = E : c !== g && mt(O) ? S = c : S = g, w + S > C && (v = Math.min(v, Math.max(A, $) + F)), w + S > i) {
937
- y = !0;
938
- break e;
939
- }
940
- F += M.length, w += S;
941
- }
942
- A = b = 0;
943
- }
944
- if (m >= d) break;
945
- if (ne.lastIndex = m, ne.test(e)) {
946
- if (F = ne.lastIndex - m, S = F * g, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S > i) {
947
- y = !0;
948
- break;
949
- }
950
- w += S, A = $, b = m, m = $ = ne.lastIndex;
951
- continue;
952
- }
953
- if (we.lastIndex = m, we.test(e)) {
954
- if (w + u > C && (v = Math.min(v, m)), w + u > i) {
955
- y = !0;
956
- break;
957
- }
958
- w += u, A = $, b = m, m = $ = we.lastIndex;
959
- continue;
960
- }
961
- if (re.lastIndex = m, re.test(e)) {
962
- if (F = re.lastIndex - m, S = F * l, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S > i) {
963
- y = !0;
964
- break;
965
- }
966
- w += S, A = $, b = m, m = $ = re.lastIndex;
967
- continue;
968
- }
969
- if (ie.lastIndex = m, ie.test(e)) {
970
- if (F = ie.lastIndex - m, S = F * n, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S > i) {
971
- y = !0;
972
- break;
973
- }
974
- w += S, A = $, b = m, m = $ = ie.lastIndex;
975
- continue;
976
- }
977
- if (Ae.lastIndex = m, Ae.test(e)) {
978
- if (w + p > C && (v = Math.min(v, m)), w + p > i) {
979
- y = !0;
980
- break;
981
- }
982
- w += p, A = $, b = m, m = $ = Ae.lastIndex;
983
- continue;
984
- }
985
- m += 1;
986
- }
987
- return {
988
- width: y ? C : w,
989
- index: y ? v : d,
990
- truncated: y,
991
- ellipsed: y && i >= o
992
- };
993
- }, Et = {
994
- limit: Infinity,
995
- ellipsis: "",
996
- ellipsisWidth: 0
997
- }, D = (e, r = {}) => Le(e, Et, r).width, ae = "\x1B", je = "›", vt = 39, Ce = "\x07", ke = "[", wt = "]", Ve = "m", Se = `${wt}8;;`, He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y"), At = (e) => {
998
- if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
999
- if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
1000
- if (e === 1 || e === 2) return 22;
1001
- if (e === 3) return 23;
1002
- if (e === 4) return 24;
1003
- if (e === 7) return 27;
1004
- if (e === 8) return 28;
1005
- if (e === 9) return 29;
1006
- if (e === 0) return 0;
1007
- }, Ue = (e) => `${ae}${ke}${e}${Ve}`, Ke = (e) => `${ae}${Se}${e}${Ce}`, Ct = (e) => e.map((r) => D(r)), Ie = (e, r, s) => {
1008
- const i = r[Symbol.iterator]();
1009
- let a = !1, o = !1, u = e.at(-1), l = u === void 0 ? 0 : D(u), n = i.next(), c = i.next(), p = 0;
1010
- for (; !n.done;) {
1011
- const f = n.value, g = D(f);
1012
- l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = !0, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = !1, o = !1) : f === Ve && (a = !1) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
1013
- }
1014
- u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
1015
- }, St = (e) => {
1016
- const r = e.split(" ");
1017
- let s = r.length;
1018
- for (; s > 0 && !(D(r[s - 1]) > 0);) s--;
1019
- return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
1020
- }, It = (e, r, s = {}) => {
1021
- if (s.trim !== !1 && e.trim() === "") return "";
1022
- let i = "", a, o;
1023
- const u = e.split(" "), l = Ct(u);
1024
- let n = [""];
1025
- for (const [$, m] of u.entries()) {
1026
- s.trim !== !1 && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
1027
- let d = D(n.at(-1) ?? "");
1028
- if ($ !== 0 && (d >= r && (s.wordWrap === !1 || s.trim === !1) && (n.push(""), d = 0), (d > 0 || s.trim === !1) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
1029
- const F = r - d, y = 1 + Math.floor((l[$] - F - 1) / r);
1030
- Math.floor((l[$] - 1) / r) < y && n.push(""), Ie(n, m, r);
1031
- continue;
1032
- }
1033
- if (d + l[$] > r && d > 0 && l[$] > 0) {
1034
- if (s.wordWrap === !1 && d < r) {
1035
- Ie(n, m, r);
1036
- continue;
1037
- }
1038
- n.push("");
1039
- }
1040
- if (d + l[$] > r && s.wordWrap === !1) {
1041
- Ie(n, m, r);
1042
- continue;
1043
- }
1044
- n[n.length - 1] += m;
1045
- }
1046
- s.trim !== !1 && (n = n.map(($) => St($)));
1047
- const c = n.join(`
1048
- `), p = c[Symbol.iterator]();
1049
- let f = p.next(), g = p.next(), E = 0;
1050
- for (; !f.done;) {
1051
- const $ = f.value, m = g.value;
1052
- if (i += $, $ === ae || $ === je) {
1053
- He.lastIndex = E + 1;
1054
- const y = He.exec(c)?.groups;
1055
- if (y?.code !== void 0) {
1056
- const v = Number.parseFloat(y.code);
1057
- a = v === vt ? void 0 : v;
1058
- } else y?.uri !== void 0 && (o = y.uri.length === 0 ? void 0 : y.uri);
1059
- }
1060
- const d = a ? At(a) : void 0;
1061
- m === `
1062
- ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
1063
- ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
1064
- }
1065
- return i;
1066
1125
  };
1067
- function J(e, r, s) {
1068
- return String(e).normalize().replaceAll(`\r
1069
- `, `
1070
- `).split(`
1071
- `).map((i) => It(i, r, s)).join(`
1072
- `);
1073
- }
1074
- const Rt = (e) => {
1075
- const r = e.active ?? "Yes", s = e.inactive ?? "No";
1076
- return new kt$1({
1077
- active: r,
1126
+ const ot = (e) => {
1127
+ const i = e.active ?? "Yes", s = e.inactive ?? "No";
1128
+ return new Q$1({
1129
+ active: i,
1078
1130
  inactive: s,
1079
1131
  signal: e.signal,
1080
1132
  input: e.input,
1081
1133
  output: e.output,
1082
1134
  initialValue: e.initialValue ?? !0,
1083
1135
  render() {
1084
- const i = e.withGuide ?? _.withGuide, a = `${i ? `${styleText("gray", h)}
1085
- ` : ""}${W(this.state)} ${e.message}
1086
- `, o = this.value ? r : s;
1136
+ const r = e.withGuide ?? u.withGuide, u$4 = `${V(this.state)} `, n = r ? `${styleText("gray", d)} ` : "", o = R(e.output, e.message, n, u$4), c = `${r ? `${styleText("gray", d)}
1137
+ ` : ""}${o}
1138
+ `, a = this.value ? i : s;
1087
1139
  switch (this.state) {
1088
- case "submit": return `${a}${i ? `${styleText("gray", h)} ` : ""}${styleText("dim", o)}`;
1089
- case "cancel": return `${a}${i ? `${styleText("gray", h)} ` : ""}${styleText(["strikethrough", "dim"], o)}${i ? `
1090
- ${styleText("gray", h)}` : ""}`;
1140
+ case "submit": return `${c}${r ? `${styleText("gray", d)} ` : ""}${styleText("dim", a)}`;
1141
+ case "cancel": return `${c}${r ? `${styleText("gray", d)} ` : ""}${styleText(["strikethrough", "dim"], a)}${r ? `
1142
+ ${styleText("gray", d)}` : ""}`;
1091
1143
  default: {
1092
- const u = i ? `${styleText("cyan", h)} ` : "", l = i ? styleText("cyan", x) : "";
1093
- return `${a}${u}${this.value ? `${styleText("green", z)} ${r}` : `${styleText("dim", H)} ${styleText("dim", r)}`}${e.vertical ? i ? `
1094
- ${styleText("cyan", h)} ` : `
1144
+ const l = r ? `${styleText("cyan", d)} ` : "", $ = r ? styleText("cyan", E) : "";
1145
+ return `${c}${l}${this.value ? `${styleText("green", z)} ${i}` : `${styleText("dim", H)} ${styleText("dim", i)}`}${e.vertical ? r ? `
1146
+ ${styleText("cyan", d)} ` : `
1095
1147
  ` : ` ${styleText("dim", "/")} `}${this.value ? `${styleText("dim", H)} ${styleText("dim", s)}` : `${styleText("green", z)} ${s}`}
1096
- ${l}
1148
+ ${$}
1097
1149
  `;
1098
1150
  }
1099
1151
  }
1100
1152
  }
1101
1153
  }).prompt();
1102
- }, R = {
1103
- message: (e = [], { symbol: r = styleText("gray", h), secondarySymbol: s = styleText("gray", h), output: i = process.stdout, spacing: a = 1, withGuide: o } = {}) => {
1104
- const u = [], l = o ?? _.withGuide, n = l ? s : "", c = l ? `${r} ` : "", p = l ? `${s} ` : "";
1105
- for (let g = 0; g < a; g++) u.push(n);
1106
- const f = Array.isArray(e) ? e : e.split(`
1154
+ }, O = {
1155
+ message: (e = [], { symbol: i = styleText("gray", d), secondarySymbol: s = styleText("gray", d), output: r = process.stdout, spacing: u$7 = 1, withGuide: n } = {}) => {
1156
+ const o = [], c = n ?? u.withGuide, a = c ? s : "", l = c ? `${i} ` : "", $ = c ? `${s} ` : "";
1157
+ for (let p = 0; p < u$7; p++) o.push(a);
1158
+ const y = Array.isArray(e) ? e : e.split(`
1107
1159
  `);
1108
- if (f.length > 0) {
1109
- const [g, ...E] = f;
1110
- g.length > 0 ? u.push(`${c}${g}`) : u.push(l ? r : "");
1111
- for (const $ of E) $.length > 0 ? u.push(`${p}${$}`) : u.push(l ? s : "");
1160
+ if (y.length > 0) {
1161
+ const [p, ...m] = y;
1162
+ p.length > 0 ? o.push(`${l}${p}`) : o.push(c ? i : "");
1163
+ for (const g of m) g.length > 0 ? o.push(`${$}${g}`) : o.push(c ? s : "");
1112
1164
  }
1113
- i.write(`${u.join(`
1165
+ r.write(`${o.join(`
1114
1166
  `)}
1115
1167
  `);
1116
1168
  },
1117
- info: (e, r) => {
1118
- R.message(e, {
1119
- ...r,
1120
- symbol: styleText("blue", fe)
1169
+ info: (e, i) => {
1170
+ O.message(e, {
1171
+ ...i,
1172
+ symbol: styleText("blue", he)
1121
1173
  });
1122
1174
  },
1123
- success: (e, r) => {
1124
- R.message(e, {
1125
- ...r,
1126
- symbol: styleText("green", Fe)
1175
+ success: (e, i) => {
1176
+ O.message(e, {
1177
+ ...i,
1178
+ symbol: styleText("green", pe)
1127
1179
  });
1128
1180
  },
1129
- step: (e, r) => {
1130
- R.message(e, {
1131
- ...r,
1132
- symbol: styleText("green", V)
1181
+ step: (e, i) => {
1182
+ O.message(e, {
1183
+ ...i,
1184
+ symbol: styleText("green", F)
1133
1185
  });
1134
1186
  },
1135
- warn: (e, r) => {
1136
- R.message(e, {
1137
- ...r,
1138
- symbol: styleText("yellow", ye)
1187
+ warn: (e, i) => {
1188
+ O.message(e, {
1189
+ ...i,
1190
+ symbol: styleText("yellow", me)
1139
1191
  });
1140
1192
  },
1141
- warning: (e, r) => {
1142
- R.warn(e, r);
1193
+ warning: (e, i) => {
1194
+ O.warn(e, i);
1143
1195
  },
1144
- error: (e, r) => {
1145
- R.message(e, {
1146
- ...r,
1147
- symbol: styleText("red", Ee)
1196
+ error: (e, i) => {
1197
+ O.message(e, {
1198
+ ...i,
1199
+ symbol: styleText("red", ge)
1148
1200
  });
1149
1201
  }
1150
- }, Gt = (e = "", r) => {
1151
- const s = r?.output ?? process.stdout, i = r?.withGuide ?? _.withGuide ? `${styleText("gray", h)}
1152
- ${styleText("gray", x)} ` : "";
1153
- s.write(`${i}${e}
1202
+ }, gt = (e = "", i) => {
1203
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${styleText("gray", d)}
1204
+ ${styleText("gray", E)} ` : "";
1205
+ s.write(`${r}${e}
1154
1206
 
1155
1207
  `);
1156
- }, jt = (e) => styleText("dim", e), kt = (e, r, s) => {
1157
- const i = {
1208
+ }, ft = (e) => styleText("dim", e), vt = (e, i, s) => {
1209
+ const r = {
1158
1210
  hard: !0,
1159
1211
  trim: !1
1160
- }, a = J(e, r, i).split(`
1161
- `), o = a.reduce((n, c) => Math.max(D(c), n), 0);
1162
- return J(e, r - (a.map(s).reduce((n, c) => Math.max(D(c), n), 0) - o), i);
1163
- }, Vt = (e = "", r = "", s) => {
1164
- const i = s?.output ?? process$1.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? jt, u = [
1212
+ }, u = wrapAnsi(e, i, r).split(`
1213
+ `), n = u.reduce((a, l) => Math.max(fastStringWidth(l), a), 0);
1214
+ return wrapAnsi(e, i - (u.map(s).reduce((a, l) => Math.max(fastStringWidth(l), a), 0) - n), r);
1215
+ }, wt = (e = "", i = "", s) => {
1216
+ const r = s?.output ?? process$1.stdout, u$9 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = [
1165
1217
  "",
1166
- ...kt(e, rt(i) - 6, o).split(`
1167
- `).map(o),
1218
+ ...vt(e, O$1(r) - 6, n).split(`
1219
+ `).map(n),
1168
1220
  ""
1169
- ], l = D(r), n = Math.max(u.reduce((g, E) => {
1170
- const $ = D(E);
1171
- return $ > g ? $ : g;
1172
- }, 0), l) + 2, c = u.map((g) => `${styleText("gray", h)} ${g}${" ".repeat(n - D(g))}${styleText("gray", h)}`).join(`
1173
- `), p = a ? `${styleText("gray", h)}
1174
- ` : "", f = a ? We : ge;
1175
- i.write(`${p}${styleText("green", V)} ${styleText("reset", r)} ${styleText("gray", se.repeat(Math.max(n - l - 1, 1)) + pe)}
1176
- ${c}
1177
- ${styleText("gray", f + se.repeat(n + 2) + me)}
1221
+ ], c = fastStringWidth(i), a = Math.max(o.reduce((p, m) => {
1222
+ const g = fastStringWidth(m);
1223
+ return g > p ? g : p;
1224
+ }, 0), c) + 2, l = o.map((p) => `${styleText("gray", d)} ${p}${" ".repeat(a - fastStringWidth(p))}${styleText("gray", d)}`).join(`
1225
+ `), $ = u$9 ? `${styleText("gray", d)}
1226
+ ` : "", y = u$9 ? Ge : de;
1227
+ r.write(`${$}${styleText("green", F)} ${styleText("reset", i)} ${styleText("gray", se.repeat(Math.max(a - c - 1, 1)) + ce)}
1228
+ ${l}
1229
+ ${styleText("gray", y + se.repeat(a + 2) + $e)}
1178
1230
  `);
1179
1231
  };
1180
- I("─", "-"), I("━", "="), I("█", "#");
1181
- const Qe = `${styleText("gray", h)} `, K = {
1182
- message: async (e, { symbol: r = styleText("gray", h) } = {}) => {
1183
- process.stdout.write(`${styleText("gray", h)}
1184
- ${r} `);
1232
+ w("─", "-"), w("━", "="), w("█", "#");
1233
+ const je = `${styleText("gray", d)} `, K = {
1234
+ message: async (e, { symbol: i = styleText("gray", d) } = {}) => {
1235
+ process.stdout.write(`${styleText("gray", d)}
1236
+ ${i} `);
1185
1237
  let s = 3;
1186
- for await (let i of e) {
1187
- i = i.replace(/\n/g, `
1188
- ${Qe}`), i.includes(`
1189
- `) && (s = 3 + stripVTControlCharacters(i.slice(i.lastIndexOf(`
1238
+ for await (let r of e) {
1239
+ r = r.replace(/\n/g, `
1240
+ ${je}`), r.includes(`
1241
+ `) && (s = 3 + stripVTControlCharacters(r.slice(r.lastIndexOf(`
1190
1242
  `))).length);
1191
- const a = stripVTControlCharacters(i).length;
1192
- s + a < process.stdout.columns ? (s += a, process.stdout.write(i)) : (process.stdout.write(`
1193
- ${Qe}${i.trimStart()}`), s = 3 + stripVTControlCharacters(i.trimStart()).length);
1243
+ const u = stripVTControlCharacters(r).length;
1244
+ s + u < process.stdout.columns ? (s += u, process.stdout.write(r)) : (process.stdout.write(`
1245
+ ${je}${r.trimStart()}`), s = 3 + stripVTControlCharacters(r.trimStart()).length);
1194
1246
  }
1195
1247
  process.stdout.write(`
1196
1248
  `);
1197
1249
  },
1198
- info: (e) => K.message(e, { symbol: styleText("blue", fe) }),
1199
- success: (e) => K.message(e, { symbol: styleText("green", Fe) }),
1200
- step: (e) => K.message(e, { symbol: styleText("green", V) }),
1201
- warn: (e) => K.message(e, { symbol: styleText("yellow", ye) }),
1250
+ info: (e) => K.message(e, { symbol: styleText("blue", he) }),
1251
+ success: (e) => K.message(e, { symbol: styleText("green", pe) }),
1252
+ step: (e) => K.message(e, { symbol: styleText("green", F) }),
1253
+ warn: (e) => K.message(e, { symbol: styleText("yellow", me) }),
1202
1254
  warning: (e) => K.warn(e),
1203
- error: (e) => K.message(e, { symbol: styleText("red", Ee) })
1255
+ error: (e) => K.message(e, { symbol: styleText("red", ge) })
1204
1256
  };
1205
1257
  //#endregion
1206
1258
  //#region src/node/rpc/anonymous/auth.ts
@@ -1218,7 +1270,7 @@ const anonymousAuth = defineRpcFunction({
1218
1270
  session.meta.isTrusted = true;
1219
1271
  return { isTrusted: true };
1220
1272
  }
1221
- if (((context.viteConfig.devtools?.config)?.clientAuthTokens ?? []).includes(query.authToken)) {
1273
+ if ((context.viteConfig.devtools?.config?.clientAuthTokens ?? []).includes(query.authToken)) {
1222
1274
  session.meta.clientAuthToken = query.authToken;
1223
1275
  session.meta.isTrusted = true;
1224
1276
  return { isTrusted: true };
@@ -1253,7 +1305,7 @@ const anonymousAuth = defineRpcFunction({
1253
1305
  "This will allow the browser to interact with the server, make file changes and run commands.",
1254
1306
  ansis_default.red(ansis_default.bold("You should only trust your local development browsers."))
1255
1307
  ];
1256
- Vt(ansis_default.reset(message.join("\n")), ansis_default.bold(ansis_default.yellow(" Vite DevTools Permission Request ")));
1308
+ wt(ansis_default.reset(message.join("\n")), ansis_default.bold(ansis_default.yellow(" Vite DevTools Permission Request ")));
1257
1309
  if (!process$1.stdout.isTTY) return { isTrusted: false };
1258
1310
  const abortController = new AbortController();
1259
1311
  return new Promise((resolve) => {
@@ -1272,14 +1324,14 @@ const anonymousAuth = defineRpcFunction({
1272
1324
  abortController,
1273
1325
  timeout
1274
1326
  });
1275
- Rt({
1327
+ ot({
1276
1328
  message: ansis_default.bold(`Do you trust this client (${ansis_default.green(ansis_default.bold(query.authToken))})?`),
1277
1329
  initialValue: false,
1278
1330
  signal: abortController.signal
1279
1331
  }).then((answer) => {
1280
1332
  clearTimeout(timeout);
1281
1333
  setPendingAuth(null);
1282
- if (Ct$1(answer)) return;
1334
+ if (q(answer)) return;
1283
1335
  if (answer) {
1284
1336
  storage.mutate((state) => {
1285
1337
  state.trusted[query.authToken] = {
@@ -1291,10 +1343,10 @@ const anonymousAuth = defineRpcFunction({
1291
1343
  });
1292
1344
  session.meta.clientAuthToken = query.authToken;
1293
1345
  session.meta.isTrusted = true;
1294
- Gt(ansis_default.green(ansis_default.bold(`You have granted permissions to ${ansis_default.bold(query.authToken)}`)));
1346
+ gt(ansis_default.green(ansis_default.bold(`You have granted permissions to ${ansis_default.bold(query.authToken)}`)));
1295
1347
  resolve({ isTrusted: true });
1296
1348
  } else {
1297
- Gt(ansis_default.red(ansis_default.bold(`You have denied permissions to ${ansis_default.bold(query.authToken)}`)));
1349
+ gt(ansis_default.red(ansis_default.bold(`You have denied permissions to ${ansis_default.bold(query.authToken)}`)));
1298
1350
  resolve({ isTrusted: false });
1299
1351
  }
1300
1352
  }).catch(() => {
@@ -1557,17 +1609,23 @@ const terminalsRead = defineRpcFunction({
1557
1609
  const builtinPublicRpcDeclarations = [defineRpcFunction({
1558
1610
  name: "vite:core:open-in-editor",
1559
1611
  type: "action",
1560
- setup: () => {
1612
+ setup: (context) => {
1561
1613
  return { handler: async (path) => {
1562
- await import("launch-editor").then((r) => r.default(path));
1614
+ const resolved = resolve$1(context.workspaceRoot, path);
1615
+ const rel = relative$1(context.workspaceRoot, resolved);
1616
+ if (rel.startsWith("..") || rel.includes("\0")) throw new Error("Path is outside the workspace root");
1617
+ await import("launch-editor").then((r) => r.default(resolved));
1563
1618
  } };
1564
1619
  }
1565
1620
  }), defineRpcFunction({
1566
1621
  name: "vite:core:open-in-finder",
1567
1622
  type: "action",
1568
- setup: () => {
1623
+ setup: (context) => {
1569
1624
  return { handler: async (path) => {
1570
- await import("open").then((r) => r.default(path));
1625
+ const resolved = resolve$1(context.workspaceRoot, path);
1626
+ const rel = relative$1(context.workspaceRoot, resolved);
1627
+ if (rel.startsWith("..") || rel.includes("\0")) throw new Error("Path is outside the workspace root");
1628
+ await import("open").then((r) => r.default(resolved));
1571
1629
  } };
1572
1630
  }
1573
1631
  })];