@kinosec/cli 0.3.1 → 0.3.3

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.
package/dist/cli.js CHANGED
@@ -3507,7 +3507,7 @@ var require_string_width = __commonJS({
3507
3507
  var stripAnsi2 = require_strip_ansi();
3508
3508
  var isFullwidthCodePoint = require_is_fullwidth_code_point();
3509
3509
  var emojiRegex = require_emoji_regex();
3510
- var stringWidth2 = (string) => {
3510
+ var stringWidth3 = (string) => {
3511
3511
  if (typeof string !== "string" || string.length === 0) {
3512
3512
  return 0;
3513
3513
  }
@@ -3532,8 +3532,8 @@ var require_string_width = __commonJS({
3532
3532
  }
3533
3533
  return width;
3534
3534
  };
3535
- module.exports = stringWidth2;
3536
- module.exports.default = stringWidth2;
3535
+ module.exports = stringWidth3;
3536
+ module.exports.default = stringWidth3;
3537
3537
  }
3538
3538
  });
3539
3539
 
@@ -3541,7 +3541,7 @@ var require_string_width = __commonJS({
3541
3541
  var require_utils = __commonJS({
3542
3542
  "../../node_modules/.pnpm/cli-table3@0.6.5/node_modules/cli-table3/src/utils.js"(exports, module) {
3543
3543
  "use strict";
3544
- var stringWidth2 = require_string_width();
3544
+ var stringWidth3 = require_string_width();
3545
3545
  function codeRegex(capture) {
3546
3546
  return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
3547
3547
  }
@@ -3550,7 +3550,7 @@ var require_utils = __commonJS({
3550
3550
  let stripped = ("" + str).replace(code, "");
3551
3551
  let split = stripped.split("\n");
3552
3552
  return split.reduce(function(memo, s) {
3553
- return stringWidth2(s) > memo ? stringWidth2(s) : memo;
3553
+ return stringWidth3(s) > memo ? stringWidth3(s) : memo;
3554
3554
  }, 0);
3555
3555
  }
3556
3556
  function repeat(str, times) {
@@ -3844,8 +3844,8 @@ var require_utils = __commonJS({
3844
3844
  var require_styles = __commonJS({
3845
3845
  "../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports, module) {
3846
3846
  "use strict";
3847
- var styles3 = {};
3848
- module["exports"] = styles3;
3847
+ var styles4 = {};
3848
+ module["exports"] = styles4;
3849
3849
  var codes = {
3850
3850
  reset: [0, 0],
3851
3851
  bold: [1, 22],
@@ -3901,7 +3901,7 @@ var require_styles = __commonJS({
3901
3901
  };
3902
3902
  Object.keys(codes).forEach(function(key) {
3903
3903
  var val = codes[key];
3904
- var style = styles3[key] = [];
3904
+ var style = styles4[key] = [];
3905
3905
  style.open = "\x1B[" + val[0] + "m";
3906
3906
  style.close = "\x1B[" + val[1] + "m";
3907
3907
  });
@@ -4364,7 +4364,7 @@ var require_colors = __commonJS({
4364
4364
  module["exports"] = colors;
4365
4365
  colors.themes = {};
4366
4366
  var util = __require("util");
4367
- var ansiStyles2 = colors.styles = require_styles();
4367
+ var ansiStyles3 = colors.styles = require_styles();
4368
4368
  var defineProps = Object.defineProperties;
4369
4369
  var newLineRegex = new RegExp(/[\r\n]+/g);
4370
4370
  colors.supportsColor = require_supports_colors().supportsColor;
@@ -4384,7 +4384,7 @@ var require_colors = __commonJS({
4384
4384
  if (!colors.enabled) {
4385
4385
  return str + "";
4386
4386
  }
4387
- var styleMap = ansiStyles2[style];
4387
+ var styleMap = ansiStyles3[style];
4388
4388
  if (!styleMap && style in colors) {
4389
4389
  return colors[style](str);
4390
4390
  }
@@ -4405,11 +4405,11 @@ var require_colors = __commonJS({
4405
4405
  builder.__proto__ = proto2;
4406
4406
  return builder;
4407
4407
  }
4408
- var styles3 = (function() {
4408
+ var styles4 = (function() {
4409
4409
  var ret = {};
4410
- ansiStyles2.grey = ansiStyles2.gray;
4411
- Object.keys(ansiStyles2).forEach(function(key) {
4412
- ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles2[key].close), "g");
4410
+ ansiStyles3.grey = ansiStyles3.gray;
4411
+ Object.keys(ansiStyles3).forEach(function(key) {
4412
+ ansiStyles3[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles3[key].close), "g");
4413
4413
  ret[key] = {
4414
4414
  get: function() {
4415
4415
  return build(this._styles.concat(key));
@@ -4419,7 +4419,7 @@ var require_colors = __commonJS({
4419
4419
  return ret;
4420
4420
  })();
4421
4421
  var proto2 = defineProps(function colors2() {
4422
- }, styles3);
4422
+ }, styles4);
4423
4423
  function applyStyle2() {
4424
4424
  var args = Array.prototype.slice.call(arguments);
4425
4425
  var str = args.map(function(arg) {
@@ -4436,7 +4436,7 @@ var require_colors = __commonJS({
4436
4436
  var nestedStyles = this._styles;
4437
4437
  var i = nestedStyles.length;
4438
4438
  while (i--) {
4439
- var code = ansiStyles2[nestedStyles[i]];
4439
+ var code = ansiStyles3[nestedStyles[i]];
4440
4440
  str = code.open + str.replace(code.closeRe, code.open) + code.close;
4441
4441
  if (newLinesPresent) {
4442
4442
  str = str.replace(newLineRegex, function(match) {
@@ -4468,7 +4468,7 @@ var require_colors = __commonJS({
4468
4468
  };
4469
4469
  function init() {
4470
4470
  var ret = {};
4471
- Object.keys(styles3).forEach(function(name) {
4471
+ Object.keys(styles4).forEach(function(name) {
4472
4472
  ret[name] = {
4473
4473
  get: function() {
4474
4474
  return build([name]);
@@ -7970,6 +7970,775 @@ var AuditResource = class {
7970
7970
  // src/lib/output.ts
7971
7971
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
7972
7972
  var import_picocolors = __toESM(require_picocolors(), 1);
7973
+
7974
+ // ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
7975
+ function ansiRegex({ onlyFirst = false } = {}) {
7976
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
7977
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
7978
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
7979
+ const pattern = `${osc}|${csi}`;
7980
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
7981
+ }
7982
+
7983
+ // ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
7984
+ var regex = ansiRegex();
7985
+ function stripAnsi(string) {
7986
+ if (typeof string !== "string") {
7987
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
7988
+ }
7989
+ if (!string.includes("\x1B") && !string.includes("\x9B")) {
7990
+ return string;
7991
+ }
7992
+ return string.replace(regex, "");
7993
+ }
7994
+
7995
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
7996
+ var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
7997
+ var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
7998
+ var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
7999
+ var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
8000
+ var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
8001
+
8002
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
8003
+ var isInRange = (ranges, codePoint) => {
8004
+ let low = 0;
8005
+ let high = Math.floor(ranges.length / 2) - 1;
8006
+ while (low <= high) {
8007
+ const mid = Math.floor((low + high) / 2);
8008
+ const i = mid * 2;
8009
+ if (codePoint < ranges[i]) {
8010
+ high = mid - 1;
8011
+ } else if (codePoint > ranges[i + 1]) {
8012
+ low = mid + 1;
8013
+ } else {
8014
+ return true;
8015
+ }
8016
+ }
8017
+ return false;
8018
+ };
8019
+
8020
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
8021
+ var minimumAmbiguousCodePoint = ambiguousRanges[0];
8022
+ var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
8023
+ var minimumFullWidthCodePoint = fullwidthRanges[0];
8024
+ var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
8025
+ var minimumHalfWidthCodePoint = halfwidthRanges[0];
8026
+ var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
8027
+ var minimumNarrowCodePoint = narrowRanges[0];
8028
+ var maximumNarrowCodePoint = narrowRanges.at(-1);
8029
+ var minimumWideCodePoint = wideRanges[0];
8030
+ var maximumWideCodePoint = wideRanges.at(-1);
8031
+ var commonCjkCodePoint = 19968;
8032
+ var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
8033
+ function findWideFastPathRange(ranges) {
8034
+ let fastPathStart = ranges[0];
8035
+ let fastPathEnd = ranges[1];
8036
+ for (let index = 0; index < ranges.length; index += 2) {
8037
+ const start = ranges[index];
8038
+ const end = ranges[index + 1];
8039
+ if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
8040
+ return [start, end];
8041
+ }
8042
+ if (end - start > fastPathEnd - fastPathStart) {
8043
+ fastPathStart = start;
8044
+ fastPathEnd = end;
8045
+ }
8046
+ }
8047
+ return [fastPathStart, fastPathEnd];
8048
+ }
8049
+ var isAmbiguous = (codePoint) => {
8050
+ if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
8051
+ return false;
8052
+ }
8053
+ return isInRange(ambiguousRanges, codePoint);
8054
+ };
8055
+ var isFullWidth = (codePoint) => {
8056
+ if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
8057
+ return false;
8058
+ }
8059
+ return isInRange(fullwidthRanges, codePoint);
8060
+ };
8061
+ var isWide = (codePoint) => {
8062
+ if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
8063
+ return true;
8064
+ }
8065
+ if (codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint) {
8066
+ return false;
8067
+ }
8068
+ return isInRange(wideRanges, codePoint);
8069
+ };
8070
+
8071
+ // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
8072
+ function validate2(codePoint) {
8073
+ if (!Number.isSafeInteger(codePoint)) {
8074
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
8075
+ }
8076
+ }
8077
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
8078
+ validate2(codePoint);
8079
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
8080
+ return 2;
8081
+ }
8082
+ return 1;
8083
+ }
8084
+
8085
+ // ../../node_modules/.pnpm/string-width@8.2.1/node_modules/string-width/index.js
8086
+ var segmenter = new Intl.Segmenter();
8087
+ var zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$", "v");
8088
+ var leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
8089
+ var rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
8090
+ var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
8091
+ var extendedPictographicRegex = /\p{Extended_Pictographic}/gu;
8092
+ function isDoubleWidthNonRgiEmojiSequence(segment) {
8093
+ if (segment.length > 50) {
8094
+ return false;
8095
+ }
8096
+ if (unqualifiedKeycapRegex.test(segment)) {
8097
+ return true;
8098
+ }
8099
+ if (segment.includes("\u200D")) {
8100
+ const pictographics = segment.match(extendedPictographicRegex);
8101
+ return pictographics !== null && pictographics.length >= 2;
8102
+ }
8103
+ return false;
8104
+ }
8105
+ function baseVisible(segment) {
8106
+ return segment.replace(leadingNonPrintingRegex, "");
8107
+ }
8108
+ function isZeroWidthCluster(segment) {
8109
+ return zeroWidthClusterRegex.test(segment);
8110
+ }
8111
+ function isHangulLeadingJamo(codePoint) {
8112
+ return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
8113
+ }
8114
+ function isHangulVowelJamo(codePoint) {
8115
+ return codePoint >= 4448 && codePoint <= 4519 || codePoint >= 55216 && codePoint <= 55238;
8116
+ }
8117
+ function isHangulTrailingJamo(codePoint) {
8118
+ return codePoint >= 4520 && codePoint <= 4607 || codePoint >= 55243 && codePoint <= 55291;
8119
+ }
8120
+ function isHangulJamo(codePoint) {
8121
+ return isHangulLeadingJamo(codePoint) || isHangulVowelJamo(codePoint) || isHangulTrailingJamo(codePoint);
8122
+ }
8123
+ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
8124
+ const codePoints = [];
8125
+ for (const character of visibleSegment) {
8126
+ if (zeroWidthClusterRegex.test(character)) {
8127
+ continue;
8128
+ }
8129
+ codePoints.push(character.codePointAt(0));
8130
+ }
8131
+ if (codePoints.length === 0) {
8132
+ return void 0;
8133
+ }
8134
+ let width = 0;
8135
+ for (let index = 0; index < codePoints.length; index++) {
8136
+ const codePoint = codePoints[index];
8137
+ if (!isHangulJamo(codePoint)) {
8138
+ if (width === 0) {
8139
+ return void 0;
8140
+ }
8141
+ for (let remaining = index; remaining < codePoints.length; remaining++) {
8142
+ width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
8143
+ }
8144
+ return width;
8145
+ }
8146
+ if (isHangulLeadingJamo(codePoint) && isHangulVowelJamo(codePoints[index + 1])) {
8147
+ width += 2;
8148
+ index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
8149
+ continue;
8150
+ }
8151
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
8152
+ }
8153
+ return width;
8154
+ }
8155
+ function trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions) {
8156
+ let extra = 0;
8157
+ let first = true;
8158
+ for (const character of visibleSegment) {
8159
+ if (first) {
8160
+ first = false;
8161
+ continue;
8162
+ }
8163
+ if (character >= "\uFF00" && character <= "\uFFEF") {
8164
+ extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
8165
+ }
8166
+ }
8167
+ return extra;
8168
+ }
8169
+ function stringWidth(input, options = {}) {
8170
+ if (typeof input !== "string" || input.length === 0) {
8171
+ return 0;
8172
+ }
8173
+ const {
8174
+ ambiguousIsNarrow = true,
8175
+ countAnsiEscapeCodes = false
8176
+ } = options;
8177
+ let string = input;
8178
+ if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes("\x9B"))) {
8179
+ string = stripAnsi(string);
8180
+ }
8181
+ if (string.length === 0) {
8182
+ return 0;
8183
+ }
8184
+ if (/^[\u0020-\u007E]*$/.test(string)) {
8185
+ return string.length;
8186
+ }
8187
+ let width = 0;
8188
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
8189
+ for (const { segment } of segmenter.segment(string)) {
8190
+ if (isZeroWidthCluster(segment)) {
8191
+ continue;
8192
+ }
8193
+ if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
8194
+ width += 2;
8195
+ continue;
8196
+ }
8197
+ const visibleSegment = baseVisible(segment);
8198
+ const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
8199
+ if (hangulWidth !== void 0) {
8200
+ width += hangulWidth;
8201
+ continue;
8202
+ }
8203
+ const codePoint = visibleSegment.codePointAt(0);
8204
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
8205
+ width += trailingHalfwidthWidth(visibleSegment, eastAsianWidthOptions);
8206
+ }
8207
+ return width;
8208
+ }
8209
+
8210
+ // ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
8211
+ var ANSI_BACKGROUND_OFFSET = 10;
8212
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
8213
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
8214
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
8215
+ var styles = {
8216
+ modifier: {
8217
+ reset: [0, 0],
8218
+ // 21 isn't widely supported and 22 does the same thing
8219
+ bold: [1, 22],
8220
+ dim: [2, 22],
8221
+ italic: [3, 23],
8222
+ underline: [4, 24],
8223
+ overline: [53, 55],
8224
+ inverse: [7, 27],
8225
+ hidden: [8, 28],
8226
+ strikethrough: [9, 29]
8227
+ },
8228
+ color: {
8229
+ black: [30, 39],
8230
+ red: [31, 39],
8231
+ green: [32, 39],
8232
+ yellow: [33, 39],
8233
+ blue: [34, 39],
8234
+ magenta: [35, 39],
8235
+ cyan: [36, 39],
8236
+ white: [37, 39],
8237
+ // Bright color
8238
+ blackBright: [90, 39],
8239
+ gray: [90, 39],
8240
+ // Alias of `blackBright`
8241
+ grey: [90, 39],
8242
+ // Alias of `blackBright`
8243
+ redBright: [91, 39],
8244
+ greenBright: [92, 39],
8245
+ yellowBright: [93, 39],
8246
+ blueBright: [94, 39],
8247
+ magentaBright: [95, 39],
8248
+ cyanBright: [96, 39],
8249
+ whiteBright: [97, 39]
8250
+ },
8251
+ bgColor: {
8252
+ bgBlack: [40, 49],
8253
+ bgRed: [41, 49],
8254
+ bgGreen: [42, 49],
8255
+ bgYellow: [43, 49],
8256
+ bgBlue: [44, 49],
8257
+ bgMagenta: [45, 49],
8258
+ bgCyan: [46, 49],
8259
+ bgWhite: [47, 49],
8260
+ // Bright color
8261
+ bgBlackBright: [100, 49],
8262
+ bgGray: [100, 49],
8263
+ // Alias of `bgBlackBright`
8264
+ bgGrey: [100, 49],
8265
+ // Alias of `bgBlackBright`
8266
+ bgRedBright: [101, 49],
8267
+ bgGreenBright: [102, 49],
8268
+ bgYellowBright: [103, 49],
8269
+ bgBlueBright: [104, 49],
8270
+ bgMagentaBright: [105, 49],
8271
+ bgCyanBright: [106, 49],
8272
+ bgWhiteBright: [107, 49]
8273
+ }
8274
+ };
8275
+ var modifierNames = Object.keys(styles.modifier);
8276
+ var foregroundColorNames = Object.keys(styles.color);
8277
+ var backgroundColorNames = Object.keys(styles.bgColor);
8278
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
8279
+ function assembleStyles() {
8280
+ const codes = /* @__PURE__ */ new Map();
8281
+ for (const [groupName, group] of Object.entries(styles)) {
8282
+ for (const [styleName, style] of Object.entries(group)) {
8283
+ styles[styleName] = {
8284
+ open: `\x1B[${style[0]}m`,
8285
+ close: `\x1B[${style[1]}m`
8286
+ };
8287
+ group[styleName] = styles[styleName];
8288
+ codes.set(style[0], style[1]);
8289
+ }
8290
+ Object.defineProperty(styles, groupName, {
8291
+ value: group,
8292
+ enumerable: false
8293
+ });
8294
+ }
8295
+ Object.defineProperty(styles, "codes", {
8296
+ value: codes,
8297
+ enumerable: false
8298
+ });
8299
+ styles.color.close = "\x1B[39m";
8300
+ styles.bgColor.close = "\x1B[49m";
8301
+ styles.color.ansi = wrapAnsi16();
8302
+ styles.color.ansi256 = wrapAnsi256();
8303
+ styles.color.ansi16m = wrapAnsi16m();
8304
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
8305
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
8306
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
8307
+ Object.defineProperties(styles, {
8308
+ rgbToAnsi256: {
8309
+ value(red, green, blue) {
8310
+ if (red === green && green === blue) {
8311
+ if (red < 8) {
8312
+ return 16;
8313
+ }
8314
+ if (red > 248) {
8315
+ return 231;
8316
+ }
8317
+ return Math.round((red - 8) / 247 * 24) + 232;
8318
+ }
8319
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
8320
+ },
8321
+ enumerable: false
8322
+ },
8323
+ hexToRgb: {
8324
+ value(hex) {
8325
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
8326
+ if (!matches) {
8327
+ return [0, 0, 0];
8328
+ }
8329
+ let [colorString] = matches;
8330
+ if (colorString.length === 3) {
8331
+ colorString = [...colorString].map((character) => character + character).join("");
8332
+ }
8333
+ const integer = Number.parseInt(colorString, 16);
8334
+ return [
8335
+ /* eslint-disable no-bitwise */
8336
+ integer >> 16 & 255,
8337
+ integer >> 8 & 255,
8338
+ integer & 255
8339
+ /* eslint-enable no-bitwise */
8340
+ ];
8341
+ },
8342
+ enumerable: false
8343
+ },
8344
+ hexToAnsi256: {
8345
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
8346
+ enumerable: false
8347
+ },
8348
+ ansi256ToAnsi: {
8349
+ value(code) {
8350
+ if (code < 8) {
8351
+ return 30 + code;
8352
+ }
8353
+ if (code < 16) {
8354
+ return 90 + (code - 8);
8355
+ }
8356
+ let red;
8357
+ let green;
8358
+ let blue;
8359
+ if (code >= 232) {
8360
+ red = ((code - 232) * 10 + 8) / 255;
8361
+ green = red;
8362
+ blue = red;
8363
+ } else {
8364
+ code -= 16;
8365
+ const remainder = code % 36;
8366
+ red = Math.floor(code / 36) / 5;
8367
+ green = Math.floor(remainder / 6) / 5;
8368
+ blue = remainder % 6 / 5;
8369
+ }
8370
+ const value = Math.max(red, green, blue) * 2;
8371
+ if (value === 0) {
8372
+ return 30;
8373
+ }
8374
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
8375
+ if (value === 2) {
8376
+ result += 60;
8377
+ }
8378
+ return result;
8379
+ },
8380
+ enumerable: false
8381
+ },
8382
+ rgbToAnsi: {
8383
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
8384
+ enumerable: false
8385
+ },
8386
+ hexToAnsi: {
8387
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
8388
+ enumerable: false
8389
+ }
8390
+ });
8391
+ return styles;
8392
+ }
8393
+ var ansiStyles = assembleStyles();
8394
+ var ansi_styles_default = ansiStyles;
8395
+
8396
+ // ../../node_modules/.pnpm/wrap-ansi@10.0.0/node_modules/wrap-ansi/index.js
8397
+ var ANSI_ESCAPE = "\x1B";
8398
+ var ANSI_ESCAPE_CSI = "\x9B";
8399
+ var ESCAPES = /* @__PURE__ */ new Set([
8400
+ ANSI_ESCAPE,
8401
+ ANSI_ESCAPE_CSI
8402
+ ]);
8403
+ var ANSI_ESCAPE_BELL = "\x07";
8404
+ var ANSI_CSI = "[";
8405
+ var ANSI_OSC = "]";
8406
+ var ANSI_SGR_TERMINATOR = "m";
8407
+ var ANSI_SGR_RESET = 0;
8408
+ var ANSI_SGR_RESET_FOREGROUND = 39;
8409
+ var ANSI_SGR_RESET_BACKGROUND = 49;
8410
+ var ANSI_SGR_RESET_UNDERLINE_COLOR = 59;
8411
+ var ANSI_SGR_FOREGROUND_EXTENDED = 38;
8412
+ var ANSI_SGR_BACKGROUND_EXTENDED = 48;
8413
+ var ANSI_SGR_UNDERLINE_COLOR_EXTENDED = 58;
8414
+ var ANSI_SGR_COLOR_MODE_256 = 5;
8415
+ var ANSI_SGR_COLOR_MODE_RGB = 2;
8416
+ var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
8417
+ var ANSI_ESCAPE_REGEX = new RegExp(`^\\u001B(?:\\${ANSI_CSI}(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}|${ANSI_ESCAPE_LINK}(?<uri>[^\\u0007\\u001B]*)(?:\\u0007|\\u001B\\\\))`);
8418
+ var ANSI_ESCAPE_CSI_REGEX = new RegExp(`^\\u009B(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}`);
8419
+ var ANSI_SGR_MODIFIER_CLOSE_CODES = new Set(ansi_styles_default.codes.values());
8420
+ ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);
8421
+ var segmenter2 = new Intl.Segmenter();
8422
+ var getGraphemes = (string) => Array.from(segmenter2.segment(string), ({ segment }) => segment);
8423
+ var TAB_SIZE = 8;
8424
+ var wrapAnsiCode = (code) => `${ANSI_ESCAPE}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
8425
+ var wrapAnsiHyperlink = (url) => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
8426
+ var getSgrTokens = (sgrParameters) => {
8427
+ const codes = sgrParameters.split(";").map((sgrParameter) => sgrParameter === "" ? ANSI_SGR_RESET : Number.parseInt(sgrParameter, 10));
8428
+ const sgrTokens = [];
8429
+ for (let index = 0; index < codes.length; index++) {
8430
+ const code = codes[index];
8431
+ if (!Number.isFinite(code)) {
8432
+ continue;
8433
+ }
8434
+ if (code === ANSI_SGR_FOREGROUND_EXTENDED || code === ANSI_SGR_BACKGROUND_EXTENDED || code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
8435
+ if (index + 1 >= codes.length) {
8436
+ break;
8437
+ }
8438
+ const mode = codes[index + 1];
8439
+ if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(codes[index + 2])) {
8440
+ sgrTokens.push([code, mode, codes[index + 2]]);
8441
+ index += 2;
8442
+ continue;
8443
+ }
8444
+ const red = codes[index + 2];
8445
+ const green = codes[index + 3];
8446
+ const blue = codes[index + 4];
8447
+ if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red) && Number.isFinite(green) && Number.isFinite(blue)) {
8448
+ sgrTokens.push([code, mode, red, green, blue]);
8449
+ index += 4;
8450
+ continue;
8451
+ }
8452
+ break;
8453
+ }
8454
+ sgrTokens.push([code]);
8455
+ }
8456
+ return sgrTokens;
8457
+ };
8458
+ var removeActiveStyle = (activeStyles, family) => {
8459
+ const activeStyleIndex = activeStyles.findIndex((activeStyle) => activeStyle.family === family);
8460
+ if (activeStyleIndex !== -1) {
8461
+ activeStyles.splice(activeStyleIndex, 1);
8462
+ }
8463
+ };
8464
+ var upsertActiveStyle = (activeStyles, nextActiveStyle) => {
8465
+ removeActiveStyle(activeStyles, nextActiveStyle.family);
8466
+ activeStyles.push(nextActiveStyle);
8467
+ };
8468
+ var removeModifierStylesByClose = (activeStyles, closeCode) => {
8469
+ for (let index = activeStyles.length - 1; index >= 0; index--) {
8470
+ const activeStyle = activeStyles[index];
8471
+ if (activeStyle.family.startsWith("modifier-") && activeStyle.close === closeCode) {
8472
+ activeStyles.splice(index, 1);
8473
+ }
8474
+ }
8475
+ };
8476
+ var getColorStyle = (code, sgrToken) => {
8477
+ if (code >= 30 && code <= 37 || code >= 90 && code <= 97 || code === ANSI_SGR_FOREGROUND_EXTENDED && sgrToken.length > 1) {
8478
+ return {
8479
+ family: "foreground",
8480
+ open: sgrToken.join(";"),
8481
+ close: ANSI_SGR_RESET_FOREGROUND
8482
+ };
8483
+ }
8484
+ if (code >= 40 && code <= 47 || code >= 100 && code <= 107 || code === ANSI_SGR_BACKGROUND_EXTENDED && sgrToken.length > 1) {
8485
+ return {
8486
+ family: "background",
8487
+ open: sgrToken.join(";"),
8488
+ close: ANSI_SGR_RESET_BACKGROUND
8489
+ };
8490
+ }
8491
+ if (code === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && sgrToken.length > 1) {
8492
+ return {
8493
+ family: "underlineColor",
8494
+ open: sgrToken.join(";"),
8495
+ close: ANSI_SGR_RESET_UNDERLINE_COLOR
8496
+ };
8497
+ }
8498
+ };
8499
+ var applySgrResetCode = (code, activeStyles) => {
8500
+ if (code === ANSI_SGR_RESET) {
8501
+ activeStyles.length = 0;
8502
+ return true;
8503
+ }
8504
+ if (code === ANSI_SGR_RESET_FOREGROUND) {
8505
+ removeActiveStyle(activeStyles, "foreground");
8506
+ return true;
8507
+ }
8508
+ if (code === ANSI_SGR_RESET_BACKGROUND) {
8509
+ removeActiveStyle(activeStyles, "background");
8510
+ return true;
8511
+ }
8512
+ if (code === ANSI_SGR_RESET_UNDERLINE_COLOR) {
8513
+ removeActiveStyle(activeStyles, "underlineColor");
8514
+ return true;
8515
+ }
8516
+ if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code)) {
8517
+ removeModifierStylesByClose(activeStyles, code);
8518
+ return true;
8519
+ }
8520
+ return false;
8521
+ };
8522
+ var applySgrToken = (sgrToken, activeStyles) => {
8523
+ const [code] = sgrToken;
8524
+ if (applySgrResetCode(code, activeStyles)) {
8525
+ return;
8526
+ }
8527
+ const colorStyle = getColorStyle(code, sgrToken);
8528
+ if (colorStyle) {
8529
+ upsertActiveStyle(activeStyles, colorStyle);
8530
+ return;
8531
+ }
8532
+ const close = ansi_styles_default.codes.get(code);
8533
+ if (close !== void 0 && close !== ANSI_SGR_RESET) {
8534
+ upsertActiveStyle(activeStyles, {
8535
+ family: `modifier-${code}`,
8536
+ open: sgrToken.join(";"),
8537
+ close
8538
+ });
8539
+ }
8540
+ };
8541
+ var applySgrParameters = (sgrParameters, activeStyles) => {
8542
+ for (const sgrToken of getSgrTokens(sgrParameters)) {
8543
+ applySgrToken(sgrToken, activeStyles);
8544
+ }
8545
+ };
8546
+ var applySgrResets = (sgrParameters, activeStyles) => {
8547
+ for (const sgrToken of getSgrTokens(sgrParameters)) {
8548
+ const [code] = sgrToken;
8549
+ applySgrResetCode(code, activeStyles);
8550
+ }
8551
+ };
8552
+ var applyLeadingSgrResets = (string, activeStyles) => {
8553
+ let remainder = string;
8554
+ while (remainder.length > 0) {
8555
+ if (remainder.startsWith(ANSI_ESCAPE) && remainder[1] !== "\\") {
8556
+ const match = ANSI_ESCAPE_REGEX.exec(remainder);
8557
+ if (!match) {
8558
+ break;
8559
+ }
8560
+ if (match.groups.sgr !== void 0) {
8561
+ applySgrResets(match.groups.sgr, activeStyles);
8562
+ }
8563
+ remainder = remainder.slice(match[0].length);
8564
+ continue;
8565
+ }
8566
+ if (remainder.startsWith(ANSI_ESCAPE_CSI)) {
8567
+ const match = ANSI_ESCAPE_CSI_REGEX.exec(remainder);
8568
+ if (!match || match.groups.sgr === void 0) {
8569
+ break;
8570
+ }
8571
+ applySgrResets(match.groups.sgr, activeStyles);
8572
+ remainder = remainder.slice(match[0].length);
8573
+ continue;
8574
+ }
8575
+ break;
8576
+ }
8577
+ };
8578
+ var getClosingSgrSequence = (activeStyles) => [...activeStyles].reverse().map((activeStyle) => wrapAnsiCode(activeStyle.close)).join("");
8579
+ var getOpeningSgrSequence = (activeStyles) => activeStyles.map((activeStyle) => wrapAnsiCode(activeStyle.open)).join("");
8580
+ var wordLengths = (string) => string.split(" ").map((word) => stringWidth(word));
8581
+ var wrapWord = (rows, word, columns) => {
8582
+ const characters = getGraphemes(word);
8583
+ let isInsideEscape = false;
8584
+ let isInsideLinkEscape = false;
8585
+ let visible = stringWidth(stripAnsi(rows.at(-1)));
8586
+ for (const [index, character] of characters.entries()) {
8587
+ const characterLength = stringWidth(character);
8588
+ if (visible + characterLength <= columns) {
8589
+ rows[rows.length - 1] += character;
8590
+ } else {
8591
+ rows.push(character);
8592
+ visible = 0;
8593
+ }
8594
+ if (ESCAPES.has(character) && !(isInsideLinkEscape && character === ANSI_ESCAPE && characters[index + 1] === "\\")) {
8595
+ isInsideEscape = true;
8596
+ const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
8597
+ isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
8598
+ }
8599
+ if (isInsideEscape) {
8600
+ if (isInsideLinkEscape) {
8601
+ if (character === ANSI_ESCAPE_BELL || character === "\\" && index > 0 && characters[index - 1] === ANSI_ESCAPE) {
8602
+ isInsideEscape = false;
8603
+ isInsideLinkEscape = false;
8604
+ }
8605
+ } else if (character === ANSI_SGR_TERMINATOR) {
8606
+ isInsideEscape = false;
8607
+ }
8608
+ continue;
8609
+ }
8610
+ visible += characterLength;
8611
+ if (visible === columns && index < characters.length - 1) {
8612
+ rows.push("");
8613
+ visible = 0;
8614
+ }
8615
+ }
8616
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
8617
+ rows[rows.length - 2] += rows.pop();
8618
+ }
8619
+ };
8620
+ var stringVisibleTrimSpacesRight = (string) => {
8621
+ const words = string.split(" ");
8622
+ let last = words.length;
8623
+ while (last > 0) {
8624
+ if (stringWidth(words[last - 1]) > 0) {
8625
+ break;
8626
+ }
8627
+ last--;
8628
+ }
8629
+ if (last === words.length) {
8630
+ return string;
8631
+ }
8632
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
8633
+ };
8634
+ var expandTabs = (line) => {
8635
+ if (!line.includes(" ")) {
8636
+ return line;
8637
+ }
8638
+ const segments = line.split(" ");
8639
+ let visible = 0;
8640
+ let expandedLine = "";
8641
+ for (const [index, segment] of segments.entries()) {
8642
+ expandedLine += segment;
8643
+ visible += stringWidth(segment);
8644
+ if (index < segments.length - 1) {
8645
+ const spaces = TAB_SIZE - visible % TAB_SIZE;
8646
+ expandedLine += " ".repeat(spaces);
8647
+ visible += spaces;
8648
+ }
8649
+ }
8650
+ return expandedLine;
8651
+ };
8652
+ var exec = (string, columns, options = {}) => {
8653
+ if (options.trim !== false && string.trim() === "") {
8654
+ return "";
8655
+ }
8656
+ let returnValue = "";
8657
+ let escapeUrl;
8658
+ const activeStyles = [];
8659
+ const lengths = wordLengths(string);
8660
+ let rows = [""];
8661
+ for (const [index, word] of string.split(" ").entries()) {
8662
+ if (options.trim !== false) {
8663
+ rows[rows.length - 1] = rows.at(-1).trimStart();
8664
+ }
8665
+ let rowLength = stringWidth(rows.at(-1));
8666
+ if (index !== 0) {
8667
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
8668
+ rows.push("");
8669
+ rowLength = 0;
8670
+ }
8671
+ if (rowLength > 0 || options.trim === false) {
8672
+ rows[rows.length - 1] += " ";
8673
+ rowLength++;
8674
+ }
8675
+ }
8676
+ if (options.hard && options.wordWrap !== false && lengths[index] > columns) {
8677
+ const remainingColumns = columns - rowLength;
8678
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
8679
+ const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
8680
+ if (breaksStartingNextLine < breaksStartingThisLine) {
8681
+ rows.push("");
8682
+ }
8683
+ wrapWord(rows, word, columns);
8684
+ continue;
8685
+ }
8686
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
8687
+ if (options.wordWrap === false && rowLength < columns) {
8688
+ wrapWord(rows, word, columns);
8689
+ continue;
8690
+ }
8691
+ rows.push("");
8692
+ }
8693
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
8694
+ wrapWord(rows, word, columns);
8695
+ continue;
8696
+ }
8697
+ rows[rows.length - 1] += word;
8698
+ }
8699
+ if (options.trim !== false) {
8700
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
8701
+ }
8702
+ const preString = rows.join("\n");
8703
+ const pre = getGraphemes(preString);
8704
+ let preStringIndex = 0;
8705
+ for (const [index, character] of pre.entries()) {
8706
+ returnValue += character;
8707
+ if (character === ANSI_ESCAPE && pre[index + 1] !== "\\") {
8708
+ const { groups } = ANSI_ESCAPE_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
8709
+ if (groups.sgr !== void 0) {
8710
+ applySgrParameters(groups.sgr, activeStyles);
8711
+ } else if (groups.uri !== void 0) {
8712
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
8713
+ }
8714
+ } else if (character === ANSI_ESCAPE_CSI) {
8715
+ const { groups } = ANSI_ESCAPE_CSI_REGEX.exec(preString.slice(preStringIndex)) || { groups: {} };
8716
+ if (groups.sgr !== void 0) {
8717
+ applySgrParameters(groups.sgr, activeStyles);
8718
+ }
8719
+ }
8720
+ if (pre[index + 1] === "\n") {
8721
+ if (escapeUrl) {
8722
+ returnValue += wrapAnsiHyperlink("");
8723
+ }
8724
+ returnValue += getClosingSgrSequence(activeStyles);
8725
+ } else if (character === "\n") {
8726
+ const openingStyles = [...activeStyles];
8727
+ applyLeadingSgrResets(preString.slice(preStringIndex + 1), openingStyles);
8728
+ returnValue += getOpeningSgrSequence(openingStyles);
8729
+ if (escapeUrl) {
8730
+ returnValue += wrapAnsiHyperlink(escapeUrl);
8731
+ }
8732
+ }
8733
+ preStringIndex += character.length;
8734
+ }
8735
+ return returnValue;
8736
+ };
8737
+ function wrapAnsi(string, columns, options) {
8738
+ return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
8739
+ }
8740
+
8741
+ // src/lib/output.ts
7973
8742
  function isTTY() {
7974
8743
  return Boolean(process.stdout.isTTY) && !process.env.CI && !process.env.NO_COLOR;
7975
8744
  }
@@ -8004,6 +8773,73 @@ function truncate(str, maxLen) {
8004
8773
  if (str.length <= maxLen) return str;
8005
8774
  return str.slice(0, maxLen - 1) + "\u2026";
8006
8775
  }
8776
+ function severityColor(level) {
8777
+ if (!isTTY()) return level;
8778
+ switch (level.toLowerCase()) {
8779
+ case "critical":
8780
+ return import_picocolors.default.red(import_picocolors.default.bold(level));
8781
+ case "high":
8782
+ return import_picocolors.default.yellow(level);
8783
+ case "medium":
8784
+ return import_picocolors.default.dim(import_picocolors.default.yellow(level));
8785
+ case "low":
8786
+ return import_picocolors.default.green(level);
8787
+ case "info":
8788
+ return import_picocolors.default.cyan(level);
8789
+ default:
8790
+ return level;
8791
+ }
8792
+ }
8793
+ function getSeverityCount(counts, level) {
8794
+ if (!counts) return 0;
8795
+ const key = Object.keys(counts).find((k) => k.toLowerCase() === level);
8796
+ return key ? counts[key] : 0;
8797
+ }
8798
+ function formatFindings(counts) {
8799
+ const c = getSeverityCount(counts, "critical");
8800
+ const h = getSeverityCount(counts, "high");
8801
+ const m = getSeverityCount(counts, "medium");
8802
+ const l = getSeverityCount(counts, "low");
8803
+ const i = getSeverityCount(counts, "info");
8804
+ if (!isTTY()) return `${c}C ${h}H ${m}M ${l}L ${i}I`;
8805
+ return [
8806
+ import_picocolors.default.red(import_picocolors.default.bold(`${c}C`)),
8807
+ import_picocolors.default.yellow(`${h}H`),
8808
+ import_picocolors.default.dim(import_picocolors.default.yellow(`${m}M`)),
8809
+ import_picocolors.default.green(`${l}L`),
8810
+ import_picocolors.default.cyan(`${i}I`)
8811
+ ].join(" ");
8812
+ }
8813
+ function printDetail(fields, sections) {
8814
+ const tty2 = isTTY();
8815
+ const cols = process.stdout.columns ?? 80;
8816
+ const width = tty2 ? Math.min(cols, 100) : Infinity;
8817
+ const indent = " ";
8818
+ const maxLabelLen = Math.max(...fields.map((f) => f.label.length));
8819
+ const padLen = maxLabelLen + 1;
8820
+ for (const { label, value } of fields) {
8821
+ const coloredLabel = tty2 ? import_picocolors.default.dim(`${label}:`.padEnd(padLen)) : `${label}:`.padEnd(padLen);
8822
+ console.log(`${coloredLabel} ${value}`);
8823
+ }
8824
+ if (!sections) return;
8825
+ for (const { title, body } of sections) {
8826
+ if (!body?.trim()) continue;
8827
+ const underline = "\u2500".repeat(title.length);
8828
+ const header = tty2 ? import_picocolors.default.bold(title) : title;
8829
+ const separator = tty2 ? import_picocolors.default.dim(underline) : underline;
8830
+ let content;
8831
+ if (width === Infinity) {
8832
+ content = body.trim().split("\n").map((line) => indent + line).join("\n");
8833
+ } else {
8834
+ const wrapped = wrapAnsi(body.trim(), width - indent.length, { hard: true, trim: false });
8835
+ content = wrapped.split("\n").map((line) => indent + line).join("\n");
8836
+ }
8837
+ console.log(`
8838
+ ${header}
8839
+ ${separator}
8840
+ ${content}`);
8841
+ }
8842
+ }
8007
8843
 
8008
8844
  // src/lib/errors.ts
8009
8845
  function handleError(error) {
@@ -8409,17 +9245,15 @@ Examples:
8409
9245
  printJson(me);
8410
9246
  return;
8411
9247
  }
8412
- printTable(
8413
- ["Field", "Value"],
8414
- [
8415
- ["User ID", me.user.id],
8416
- ["Email", me.user.email ?? "(not set)"],
8417
- ["Plan", `${me.plan.tier} (${me.plan.slug})`],
8418
- ["Org", me.org ? me.org.name ?? me.org.id : "(none)"],
8419
- ["Auth Type", me.auth_type],
8420
- ["Scopes", me.scopes.length > 0 ? me.scopes.join(", ") : "(all \u2014 session)"]
8421
- ]
8422
- );
9248
+ printDetail([
9249
+ { label: "User ID", value: `\u2026${me.user.id.slice(-8)}` },
9250
+ { label: "Email", value: me.user.email ?? "(not set)" },
9251
+ { label: "Plan", value: `${me.plan.tier} (${me.plan.slug})` },
9252
+ { label: "Org", value: me.org ? me.org.name ?? me.org.id : "(none)" },
9253
+ { label: "Auth Type", value: me.auth_type },
9254
+ { label: "Token ID", value: `\u2026${me.token_id.slice(-8)}` },
9255
+ { label: "Scopes", value: me.scopes.length > 0 ? me.scopes.join(", ") : "(all \u2014 session)" }
9256
+ ]);
8423
9257
  } catch (error) {
8424
9258
  handleError(error);
8425
9259
  }
@@ -8430,11 +9264,11 @@ Examples:
8430
9264
  import process9 from "process";
8431
9265
 
8432
9266
  // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
8433
- var ANSI_BACKGROUND_OFFSET = 10;
8434
- var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
8435
- var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
8436
- var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
8437
- var styles = {
9267
+ var ANSI_BACKGROUND_OFFSET2 = 10;
9268
+ var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
9269
+ var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
9270
+ var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
9271
+ var styles2 = {
8438
9272
  modifier: {
8439
9273
  reset: [0, 0],
8440
9274
  // 21 isn't widely supported and 22 does the same thing
@@ -8494,39 +9328,39 @@ var styles = {
8494
9328
  bgWhiteBright: [107, 49]
8495
9329
  }
8496
9330
  };
8497
- var modifierNames = Object.keys(styles.modifier);
8498
- var foregroundColorNames = Object.keys(styles.color);
8499
- var backgroundColorNames = Object.keys(styles.bgColor);
8500
- var colorNames = [...foregroundColorNames, ...backgroundColorNames];
8501
- function assembleStyles() {
9331
+ var modifierNames2 = Object.keys(styles2.modifier);
9332
+ var foregroundColorNames2 = Object.keys(styles2.color);
9333
+ var backgroundColorNames2 = Object.keys(styles2.bgColor);
9334
+ var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
9335
+ function assembleStyles2() {
8502
9336
  const codes = /* @__PURE__ */ new Map();
8503
- for (const [groupName, group] of Object.entries(styles)) {
9337
+ for (const [groupName, group] of Object.entries(styles2)) {
8504
9338
  for (const [styleName, style] of Object.entries(group)) {
8505
- styles[styleName] = {
9339
+ styles2[styleName] = {
8506
9340
  open: `\x1B[${style[0]}m`,
8507
9341
  close: `\x1B[${style[1]}m`
8508
9342
  };
8509
- group[styleName] = styles[styleName];
9343
+ group[styleName] = styles2[styleName];
8510
9344
  codes.set(style[0], style[1]);
8511
9345
  }
8512
- Object.defineProperty(styles, groupName, {
9346
+ Object.defineProperty(styles2, groupName, {
8513
9347
  value: group,
8514
9348
  enumerable: false
8515
9349
  });
8516
9350
  }
8517
- Object.defineProperty(styles, "codes", {
9351
+ Object.defineProperty(styles2, "codes", {
8518
9352
  value: codes,
8519
9353
  enumerable: false
8520
9354
  });
8521
- styles.color.close = "\x1B[39m";
8522
- styles.bgColor.close = "\x1B[49m";
8523
- styles.color.ansi = wrapAnsi16();
8524
- styles.color.ansi256 = wrapAnsi256();
8525
- styles.color.ansi16m = wrapAnsi16m();
8526
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
8527
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
8528
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
8529
- Object.defineProperties(styles, {
9355
+ styles2.color.close = "\x1B[39m";
9356
+ styles2.bgColor.close = "\x1B[49m";
9357
+ styles2.color.ansi = wrapAnsi162();
9358
+ styles2.color.ansi256 = wrapAnsi2562();
9359
+ styles2.color.ansi16m = wrapAnsi16m2();
9360
+ styles2.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
9361
+ styles2.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
9362
+ styles2.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
9363
+ Object.defineProperties(styles2, {
8530
9364
  rgbToAnsi256: {
8531
9365
  value(red, green, blue) {
8532
9366
  if (red === green && green === blue) {
@@ -8564,7 +9398,7 @@ function assembleStyles() {
8564
9398
  enumerable: false
8565
9399
  },
8566
9400
  hexToAnsi256: {
8567
- value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
9401
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
8568
9402
  enumerable: false
8569
9403
  },
8570
9404
  ansi256ToAnsi: {
@@ -8602,18 +9436,18 @@ function assembleStyles() {
8602
9436
  enumerable: false
8603
9437
  },
8604
9438
  rgbToAnsi: {
8605
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
9439
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
8606
9440
  enumerable: false
8607
9441
  },
8608
9442
  hexToAnsi: {
8609
- value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
9443
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
8610
9444
  enumerable: false
8611
9445
  }
8612
9446
  });
8613
- return styles;
9447
+ return styles2;
8614
9448
  }
8615
- var ansiStyles = assembleStyles();
8616
- var ansi_styles_default = ansiStyles;
9449
+ var ansiStyles2 = assembleStyles2();
9450
+ var ansi_styles_default2 = ansiStyles2;
8617
9451
 
8618
9452
  // ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
8619
9453
  import process2 from "process";
@@ -8788,7 +9622,7 @@ var levelMapping = [
8788
9622
  "ansi256",
8789
9623
  "ansi16m"
8790
9624
  ];
8791
- var styles2 = /* @__PURE__ */ Object.create(null);
9625
+ var styles3 = /* @__PURE__ */ Object.create(null);
8792
9626
  var applyOptions = (object, options = {}) => {
8793
9627
  if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
8794
9628
  throw new Error("The `level` option should be an integer from 0 to 3");
@@ -8806,8 +9640,8 @@ function createChalk(options) {
8806
9640
  return chalkFactory(options);
8807
9641
  }
8808
9642
  Object.setPrototypeOf(createChalk.prototype, Function.prototype);
8809
- for (const [styleName, style] of Object.entries(ansi_styles_default)) {
8810
- styles2[styleName] = {
9643
+ for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
9644
+ styles3[styleName] = {
8811
9645
  get() {
8812
9646
  const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
8813
9647
  Object.defineProperty(this, styleName, { value: builder });
@@ -8815,7 +9649,7 @@ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
8815
9649
  }
8816
9650
  };
8817
9651
  }
8818
- styles2.visible = {
9652
+ styles3.visible = {
8819
9653
  get() {
8820
9654
  const builder = createBuilder(this, this[STYLER], true);
8821
9655
  Object.defineProperty(this, "visible", { value: builder });
@@ -8825,35 +9659,35 @@ styles2.visible = {
8825
9659
  var getModelAnsi = (model, level, type, ...arguments_) => {
8826
9660
  if (model === "rgb") {
8827
9661
  if (level === "ansi16m") {
8828
- return ansi_styles_default[type].ansi16m(...arguments_);
9662
+ return ansi_styles_default2[type].ansi16m(...arguments_);
8829
9663
  }
8830
9664
  if (level === "ansi256") {
8831
- return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
9665
+ return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
8832
9666
  }
8833
- return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
9667
+ return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
8834
9668
  }
8835
9669
  if (model === "hex") {
8836
- return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
9670
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
8837
9671
  }
8838
- return ansi_styles_default[type][model](...arguments_);
9672
+ return ansi_styles_default2[type][model](...arguments_);
8839
9673
  };
8840
9674
  var usedModels = ["rgb", "hex", "ansi256"];
8841
9675
  for (const model of usedModels) {
8842
- styles2[model] = {
9676
+ styles3[model] = {
8843
9677
  get() {
8844
9678
  const { level } = this;
8845
9679
  return function(...arguments_) {
8846
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
9680
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER]);
8847
9681
  return createBuilder(this, styler, this[IS_EMPTY]);
8848
9682
  };
8849
9683
  }
8850
9684
  };
8851
9685
  const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
8852
- styles2[bgModel] = {
9686
+ styles3[bgModel] = {
8853
9687
  get() {
8854
9688
  const { level } = this;
8855
9689
  return function(...arguments_) {
8856
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
9690
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER]);
8857
9691
  return createBuilder(this, styler, this[IS_EMPTY]);
8858
9692
  };
8859
9693
  }
@@ -8861,7 +9695,7 @@ for (const model of usedModels) {
8861
9695
  }
8862
9696
  var proto = Object.defineProperties(() => {
8863
9697
  }, {
8864
- ...styles2,
9698
+ ...styles3,
8865
9699
  level: {
8866
9700
  enumerable: true,
8867
9701
  get() {
@@ -8919,7 +9753,7 @@ var applyStyle = (self, string) => {
8919
9753
  }
8920
9754
  return openAll + string + closeAll;
8921
9755
  };
8922
- Object.defineProperties(createChalk.prototype, styles2);
9756
+ Object.defineProperties(createChalk.prototype, styles3);
8923
9757
  var chalk = createChalk();
8924
9758
  var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
8925
9759
  var source_default = chalk;
@@ -9326,126 +10160,15 @@ var fallback = {
9326
10160
  var logSymbols = isUnicodeSupported() ? main : fallback;
9327
10161
  var log_symbols_default = logSymbols;
9328
10162
 
9329
- // ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
9330
- function ansiRegex({ onlyFirst = false } = {}) {
9331
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
9332
- const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
9333
- const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
9334
- const pattern = `${osc}|${csi}`;
9335
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
9336
- }
9337
-
9338
- // ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
9339
- var regex = ansiRegex();
9340
- function stripAnsi(string) {
9341
- if (typeof string !== "string") {
9342
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
9343
- }
9344
- if (!string.includes("\x1B") && !string.includes("\x9B")) {
9345
- return string;
9346
- }
9347
- return string.replace(regex, "");
9348
- }
9349
-
9350
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js
9351
- var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
9352
- var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
9353
- var halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
9354
- var narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
9355
- var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
9356
-
9357
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js
9358
- var isInRange = (ranges, codePoint) => {
9359
- let low = 0;
9360
- let high = Math.floor(ranges.length / 2) - 1;
9361
- while (low <= high) {
9362
- const mid = Math.floor((low + high) / 2);
9363
- const i = mid * 2;
9364
- if (codePoint < ranges[i]) {
9365
- high = mid - 1;
9366
- } else if (codePoint > ranges[i + 1]) {
9367
- low = mid + 1;
9368
- } else {
9369
- return true;
9370
- }
9371
- }
9372
- return false;
9373
- };
9374
-
9375
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js
9376
- var minimumAmbiguousCodePoint = ambiguousRanges[0];
9377
- var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
9378
- var minimumFullWidthCodePoint = fullwidthRanges[0];
9379
- var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
9380
- var minimumHalfWidthCodePoint = halfwidthRanges[0];
9381
- var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
9382
- var minimumNarrowCodePoint = narrowRanges[0];
9383
- var maximumNarrowCodePoint = narrowRanges.at(-1);
9384
- var minimumWideCodePoint = wideRanges[0];
9385
- var maximumWideCodePoint = wideRanges.at(-1);
9386
- var commonCjkCodePoint = 19968;
9387
- var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
9388
- function findWideFastPathRange(ranges) {
9389
- let fastPathStart = ranges[0];
9390
- let fastPathEnd = ranges[1];
9391
- for (let index = 0; index < ranges.length; index += 2) {
9392
- const start = ranges[index];
9393
- const end = ranges[index + 1];
9394
- if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
9395
- return [start, end];
9396
- }
9397
- if (end - start > fastPathEnd - fastPathStart) {
9398
- fastPathStart = start;
9399
- fastPathEnd = end;
9400
- }
9401
- }
9402
- return [fastPathStart, fastPathEnd];
9403
- }
9404
- var isAmbiguous = (codePoint) => {
9405
- if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
9406
- return false;
9407
- }
9408
- return isInRange(ambiguousRanges, codePoint);
9409
- };
9410
- var isFullWidth = (codePoint) => {
9411
- if (codePoint < minimumFullWidthCodePoint || codePoint > maximumFullWidthCodePoint) {
9412
- return false;
9413
- }
9414
- return isInRange(fullwidthRanges, codePoint);
9415
- };
9416
- var isWide = (codePoint) => {
9417
- if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
9418
- return true;
9419
- }
9420
- if (codePoint < minimumWideCodePoint || codePoint > maximumWideCodePoint) {
9421
- return false;
9422
- }
9423
- return isInRange(wideRanges, codePoint);
9424
- };
9425
-
9426
- // ../../node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js
9427
- function validate2(codePoint) {
9428
- if (!Number.isSafeInteger(codePoint)) {
9429
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
9430
- }
9431
- }
9432
- function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
9433
- validate2(codePoint);
9434
- if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
9435
- return 2;
9436
- }
9437
- return 1;
9438
- }
9439
-
9440
10163
  // ../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
9441
10164
  var emoji_regex_default = () => {
9442
10165
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
9443
10166
  };
9444
10167
 
9445
10168
  // ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
9446
- var segmenter = new Intl.Segmenter();
10169
+ var segmenter3 = new Intl.Segmenter();
9447
10170
  var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
9448
- function stringWidth(string, options = {}) {
10171
+ function stringWidth2(string, options = {}) {
9449
10172
  if (typeof string !== "string" || string.length === 0) {
9450
10173
  return 0;
9451
10174
  }
@@ -9461,7 +10184,7 @@ function stringWidth(string, options = {}) {
9461
10184
  }
9462
10185
  let width = 0;
9463
10186
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
9464
- for (const { segment: character } of segmenter.segment(string)) {
10187
+ for (const { segment: character } of segmenter3.segment(string)) {
9465
10188
  const codePoint = character.codePointAt(0);
9466
10189
  if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
9467
10190
  continue;
@@ -9702,7 +10425,7 @@ var Ora = class {
9702
10425
  const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
9703
10426
  this.#lineCount = 0;
9704
10427
  for (const line of stripAnsi(fullText).split("\n")) {
9705
- this.#lineCount += Math.max(1, Math.ceil(stringWidth(line, { countAnsiEscapeCodes: true }) / columns));
10428
+ this.#lineCount += Math.max(1, Math.ceil(stringWidth2(line, { countAnsiEscapeCodes: true }) / columns));
9706
10429
  }
9707
10430
  }
9708
10431
  get isEnabled() {
@@ -10527,22 +11250,11 @@ Examples:
10527
11250
 
10528
11251
  // src/commands/finding.ts
10529
11252
  var import_picocolors7 = __toESM(require_picocolors(), 1);
10530
- function severityColor(level) {
10531
- if (!isTTY()) return level;
10532
- switch (level.toLowerCase()) {
10533
- case "critical":
10534
- return import_picocolors7.default.red(import_picocolors7.default.bold(level));
10535
- case "high":
10536
- return import_picocolors7.default.red(level);
10537
- case "medium":
10538
- return import_picocolors7.default.yellow(level);
10539
- case "low":
10540
- return import_picocolors7.default.blue(level);
10541
- case "info":
10542
- return import_picocolors7.default.dim(level);
10543
- default:
10544
- return level;
10545
- }
11253
+ function formatPoc(poc) {
11254
+ if (poc == null) return null;
11255
+ if (typeof poc === "string") return poc.trim() || null;
11256
+ const json = JSON.stringify(poc, null, 2);
11257
+ return json === "{}" || json === "[]" ? null : json;
10546
11258
  }
10547
11259
  var VALID_STATUSES = ["open", "fixed", "false_positive", "accepted_risk", "resolved"];
10548
11260
  function registerFindingCommand(program3) {
@@ -10598,17 +11310,21 @@ Examples:
10598
11310
  printJson(detail);
10599
11311
  return;
10600
11312
  }
10601
- printTable(
10602
- ["Field", "Value"],
11313
+ const pocBody = formatPoc(detail.poc);
11314
+ printDetail(
10603
11315
  [
10604
- ["ID", detail.id],
10605
- ["Name", detail.finding_name],
10606
- ["Severity", severityColor(detail.impact_level)],
10607
- ["Status", detail.status],
10608
- ["Verification", detail.verification_status],
10609
- ["Description", truncate(detail.finding_description, 60)],
10610
- ["Solution", truncate(detail.finding_solution, 60)],
10611
- ["Created", detail.created_at]
11316
+ { label: "ID", value: detail.id },
11317
+ { label: "Name", value: detail.finding_name },
11318
+ { label: "Severity", value: severityColor(detail.impact_level) },
11319
+ { label: "Status", value: detail.status },
11320
+ { label: "Verification", value: detail.verification_status },
11321
+ { label: "Phase", value: detail.scan_phase },
11322
+ { label: "Created", value: detail.created_at }
11323
+ ],
11324
+ [
11325
+ { title: "Description", body: detail.finding_description },
11326
+ { title: "Solution", body: detail.finding_solution },
11327
+ ...pocBody ? [{ title: "Proof of Concept", body: pocBody }] : []
10612
11328
  ]
10613
11329
  );
10614
11330
  } catch (error) {
@@ -10729,14 +11445,12 @@ Examples:
10729
11445
  return;
10730
11446
  }
10731
11447
  printTable(
10732
- ["ID", "Target", "Mode", "Critical", "High", "Medium", "Completed"],
11448
+ ["ID", "Target", "Mode", "Findings", "Completed"],
10733
11449
  result.items.map((r) => [
10734
11450
  r.id,
10735
11451
  truncate(r.domain_or_ip, 30),
10736
11452
  r.scan_mode,
10737
- String(r.severity_counts?.Critical ?? 0),
10738
- String(r.severity_counts?.High ?? 0),
10739
- String(r.severity_counts?.Medium ?? 0),
11453
+ formatFindings(r.severity_counts),
10740
11454
  r.scan_completed_at ? new Date(r.scan_completed_at).toLocaleDateString() : "(pending)"
10741
11455
  ])
10742
11456
  );
@@ -10907,7 +11621,7 @@ Examples:
10907
11621
 
10908
11622
  // src/cli.ts
10909
11623
  var program2 = new Command();
10910
- program2.name("kinosec").description("KinoSec CLI \u2014 run pentests from your terminal").version("0.3.1", "-v, --version").option("--token <pat>", "API token (overrides KINOSEC_TOKEN and config)").option("--api-url <url>", "API base URL (overrides config)").option("--output <format>", "Output format: text or json", "text").option("--json", "Shorthand for --output json").option("--no-color", "Disable colors");
11624
+ program2.name("kinosec").description("KinoSec CLI \u2014 run pentests from your terminal").version("0.3.3", "-v, --version").option("--token <pat>", "API token (overrides KINOSEC_TOKEN and config)").option("--api-url <url>", "API base URL (overrides config)").option("--output <format>", "Output format: text or json", "text").option("--json", "Shorthand for --output json").option("--no-color", "Disable colors");
10911
11625
  registerAuthCommand(program2);
10912
11626
  registerConfigCommand(program2);
10913
11627
  registerMeCommand(program2);
@@ -10916,7 +11630,7 @@ registerAssetCommand(program2);
10916
11630
  registerFindingCommand(program2);
10917
11631
  registerReportCommand(program2);
10918
11632
  registerTokenCommand(program2);
10919
- program2.parseAsync(process.argv).then(() => checkForUpdate("0.3.1")).catch(handleError);
11633
+ program2.parseAsync(process.argv).then(() => checkForUpdate("0.3.3")).catch(handleError);
10920
11634
  /*! Bundled license information:
10921
11635
 
10922
11636
  ky/distribution/index.js: