tty-table 7.0.0 → 7.0.1

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.
@@ -1,4 +1,4 @@
1
- var process = typeof process !== 'undefined' ? process : { env: {} };
1
+ var process = typeof process !== "undefined" ? process : { env: { TERM: "", TERM_PROGRAM: "", COLORTERM: "" }, platform: "browser", stdout: undefined, argv: [] };
2
2
  "use strict";
3
3
  var TtyTable = (() => {
4
4
  var __create = Object.create;
@@ -32,11 +32,1573 @@ var TtyTable = (() => {
32
32
  ));
33
33
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
34
 
35
- // stub:stub
36
- var require_stub = __commonJS({
37
- "stub:stub"(exports, module) {
35
+ // node_modules/color-name/index.js
36
+ var require_color_name = __commonJS({
37
+ "node_modules/color-name/index.js"(exports, module) {
38
38
  "use strict";
39
- module.exports = {};
39
+ module.exports = {
40
+ "aliceblue": [240, 248, 255],
41
+ "antiquewhite": [250, 235, 215],
42
+ "aqua": [0, 255, 255],
43
+ "aquamarine": [127, 255, 212],
44
+ "azure": [240, 255, 255],
45
+ "beige": [245, 245, 220],
46
+ "bisque": [255, 228, 196],
47
+ "black": [0, 0, 0],
48
+ "blanchedalmond": [255, 235, 205],
49
+ "blue": [0, 0, 255],
50
+ "blueviolet": [138, 43, 226],
51
+ "brown": [165, 42, 42],
52
+ "burlywood": [222, 184, 135],
53
+ "cadetblue": [95, 158, 160],
54
+ "chartreuse": [127, 255, 0],
55
+ "chocolate": [210, 105, 30],
56
+ "coral": [255, 127, 80],
57
+ "cornflowerblue": [100, 149, 237],
58
+ "cornsilk": [255, 248, 220],
59
+ "crimson": [220, 20, 60],
60
+ "cyan": [0, 255, 255],
61
+ "darkblue": [0, 0, 139],
62
+ "darkcyan": [0, 139, 139],
63
+ "darkgoldenrod": [184, 134, 11],
64
+ "darkgray": [169, 169, 169],
65
+ "darkgreen": [0, 100, 0],
66
+ "darkgrey": [169, 169, 169],
67
+ "darkkhaki": [189, 183, 107],
68
+ "darkmagenta": [139, 0, 139],
69
+ "darkolivegreen": [85, 107, 47],
70
+ "darkorange": [255, 140, 0],
71
+ "darkorchid": [153, 50, 204],
72
+ "darkred": [139, 0, 0],
73
+ "darksalmon": [233, 150, 122],
74
+ "darkseagreen": [143, 188, 143],
75
+ "darkslateblue": [72, 61, 139],
76
+ "darkslategray": [47, 79, 79],
77
+ "darkslategrey": [47, 79, 79],
78
+ "darkturquoise": [0, 206, 209],
79
+ "darkviolet": [148, 0, 211],
80
+ "deeppink": [255, 20, 147],
81
+ "deepskyblue": [0, 191, 255],
82
+ "dimgray": [105, 105, 105],
83
+ "dimgrey": [105, 105, 105],
84
+ "dodgerblue": [30, 144, 255],
85
+ "firebrick": [178, 34, 34],
86
+ "floralwhite": [255, 250, 240],
87
+ "forestgreen": [34, 139, 34],
88
+ "fuchsia": [255, 0, 255],
89
+ "gainsboro": [220, 220, 220],
90
+ "ghostwhite": [248, 248, 255],
91
+ "gold": [255, 215, 0],
92
+ "goldenrod": [218, 165, 32],
93
+ "gray": [128, 128, 128],
94
+ "green": [0, 128, 0],
95
+ "greenyellow": [173, 255, 47],
96
+ "grey": [128, 128, 128],
97
+ "honeydew": [240, 255, 240],
98
+ "hotpink": [255, 105, 180],
99
+ "indianred": [205, 92, 92],
100
+ "indigo": [75, 0, 130],
101
+ "ivory": [255, 255, 240],
102
+ "khaki": [240, 230, 140],
103
+ "lavender": [230, 230, 250],
104
+ "lavenderblush": [255, 240, 245],
105
+ "lawngreen": [124, 252, 0],
106
+ "lemonchiffon": [255, 250, 205],
107
+ "lightblue": [173, 216, 230],
108
+ "lightcoral": [240, 128, 128],
109
+ "lightcyan": [224, 255, 255],
110
+ "lightgoldenrodyellow": [250, 250, 210],
111
+ "lightgray": [211, 211, 211],
112
+ "lightgreen": [144, 238, 144],
113
+ "lightgrey": [211, 211, 211],
114
+ "lightpink": [255, 182, 193],
115
+ "lightsalmon": [255, 160, 122],
116
+ "lightseagreen": [32, 178, 170],
117
+ "lightskyblue": [135, 206, 250],
118
+ "lightslategray": [119, 136, 153],
119
+ "lightslategrey": [119, 136, 153],
120
+ "lightsteelblue": [176, 196, 222],
121
+ "lightyellow": [255, 255, 224],
122
+ "lime": [0, 255, 0],
123
+ "limegreen": [50, 205, 50],
124
+ "linen": [250, 240, 230],
125
+ "magenta": [255, 0, 255],
126
+ "maroon": [128, 0, 0],
127
+ "mediumaquamarine": [102, 205, 170],
128
+ "mediumblue": [0, 0, 205],
129
+ "mediumorchid": [186, 85, 211],
130
+ "mediumpurple": [147, 112, 219],
131
+ "mediumseagreen": [60, 179, 113],
132
+ "mediumslateblue": [123, 104, 238],
133
+ "mediumspringgreen": [0, 250, 154],
134
+ "mediumturquoise": [72, 209, 204],
135
+ "mediumvioletred": [199, 21, 133],
136
+ "midnightblue": [25, 25, 112],
137
+ "mintcream": [245, 255, 250],
138
+ "mistyrose": [255, 228, 225],
139
+ "moccasin": [255, 228, 181],
140
+ "navajowhite": [255, 222, 173],
141
+ "navy": [0, 0, 128],
142
+ "oldlace": [253, 245, 230],
143
+ "olive": [128, 128, 0],
144
+ "olivedrab": [107, 142, 35],
145
+ "orange": [255, 165, 0],
146
+ "orangered": [255, 69, 0],
147
+ "orchid": [218, 112, 214],
148
+ "palegoldenrod": [238, 232, 170],
149
+ "palegreen": [152, 251, 152],
150
+ "paleturquoise": [175, 238, 238],
151
+ "palevioletred": [219, 112, 147],
152
+ "papayawhip": [255, 239, 213],
153
+ "peachpuff": [255, 218, 185],
154
+ "peru": [205, 133, 63],
155
+ "pink": [255, 192, 203],
156
+ "plum": [221, 160, 221],
157
+ "powderblue": [176, 224, 230],
158
+ "purple": [128, 0, 128],
159
+ "rebeccapurple": [102, 51, 153],
160
+ "red": [255, 0, 0],
161
+ "rosybrown": [188, 143, 143],
162
+ "royalblue": [65, 105, 225],
163
+ "saddlebrown": [139, 69, 19],
164
+ "salmon": [250, 128, 114],
165
+ "sandybrown": [244, 164, 96],
166
+ "seagreen": [46, 139, 87],
167
+ "seashell": [255, 245, 238],
168
+ "sienna": [160, 82, 45],
169
+ "silver": [192, 192, 192],
170
+ "skyblue": [135, 206, 235],
171
+ "slateblue": [106, 90, 205],
172
+ "slategray": [112, 128, 144],
173
+ "slategrey": [112, 128, 144],
174
+ "snow": [255, 250, 250],
175
+ "springgreen": [0, 255, 127],
176
+ "steelblue": [70, 130, 180],
177
+ "tan": [210, 180, 140],
178
+ "teal": [0, 128, 128],
179
+ "thistle": [216, 191, 216],
180
+ "tomato": [255, 99, 71],
181
+ "turquoise": [64, 224, 208],
182
+ "violet": [238, 130, 238],
183
+ "wheat": [245, 222, 179],
184
+ "white": [255, 255, 255],
185
+ "whitesmoke": [245, 245, 245],
186
+ "yellow": [255, 255, 0],
187
+ "yellowgreen": [154, 205, 50]
188
+ };
189
+ }
190
+ });
191
+
192
+ // node_modules/color-convert/conversions.js
193
+ var require_conversions = __commonJS({
194
+ "node_modules/color-convert/conversions.js"(exports, module) {
195
+ "use strict";
196
+ var cssKeywords = require_color_name();
197
+ var reverseKeywords = {};
198
+ for (const key of Object.keys(cssKeywords)) {
199
+ reverseKeywords[cssKeywords[key]] = key;
200
+ }
201
+ var convert = {
202
+ rgb: { channels: 3, labels: "rgb" },
203
+ hsl: { channels: 3, labels: "hsl" },
204
+ hsv: { channels: 3, labels: "hsv" },
205
+ hwb: { channels: 3, labels: "hwb" },
206
+ cmyk: { channels: 4, labels: "cmyk" },
207
+ xyz: { channels: 3, labels: "xyz" },
208
+ lab: { channels: 3, labels: "lab" },
209
+ lch: { channels: 3, labels: "lch" },
210
+ hex: { channels: 1, labels: ["hex"] },
211
+ keyword: { channels: 1, labels: ["keyword"] },
212
+ ansi16: { channels: 1, labels: ["ansi16"] },
213
+ ansi256: { channels: 1, labels: ["ansi256"] },
214
+ hcg: { channels: 3, labels: ["h", "c", "g"] },
215
+ apple: { channels: 3, labels: ["r16", "g16", "b16"] },
216
+ gray: { channels: 1, labels: ["gray"] }
217
+ };
218
+ module.exports = convert;
219
+ for (const model of Object.keys(convert)) {
220
+ if (!("channels" in convert[model])) {
221
+ throw new Error("missing channels property: " + model);
222
+ }
223
+ if (!("labels" in convert[model])) {
224
+ throw new Error("missing channel labels property: " + model);
225
+ }
226
+ if (convert[model].labels.length !== convert[model].channels) {
227
+ throw new Error("channel and label counts mismatch: " + model);
228
+ }
229
+ const { channels, labels } = convert[model];
230
+ delete convert[model].channels;
231
+ delete convert[model].labels;
232
+ Object.defineProperty(convert[model], "channels", { value: channels });
233
+ Object.defineProperty(convert[model], "labels", { value: labels });
234
+ }
235
+ convert.rgb.hsl = function(rgb) {
236
+ const r = rgb[0] / 255;
237
+ const g = rgb[1] / 255;
238
+ const b = rgb[2] / 255;
239
+ const min = Math.min(r, g, b);
240
+ const max = Math.max(r, g, b);
241
+ const delta = max - min;
242
+ let h;
243
+ let s;
244
+ if (max === min) {
245
+ h = 0;
246
+ } else if (r === max) {
247
+ h = (g - b) / delta;
248
+ } else if (g === max) {
249
+ h = 2 + (b - r) / delta;
250
+ } else if (b === max) {
251
+ h = 4 + (r - g) / delta;
252
+ }
253
+ h = Math.min(h * 60, 360);
254
+ if (h < 0) {
255
+ h += 360;
256
+ }
257
+ const l = (min + max) / 2;
258
+ if (max === min) {
259
+ s = 0;
260
+ } else if (l <= 0.5) {
261
+ s = delta / (max + min);
262
+ } else {
263
+ s = delta / (2 - max - min);
264
+ }
265
+ return [h, s * 100, l * 100];
266
+ };
267
+ convert.rgb.hsv = function(rgb) {
268
+ let rdif;
269
+ let gdif;
270
+ let bdif;
271
+ let h;
272
+ let s;
273
+ const r = rgb[0] / 255;
274
+ const g = rgb[1] / 255;
275
+ const b = rgb[2] / 255;
276
+ const v = Math.max(r, g, b);
277
+ const diff = v - Math.min(r, g, b);
278
+ const diffc = function(c) {
279
+ return (v - c) / 6 / diff + 1 / 2;
280
+ };
281
+ if (diff === 0) {
282
+ h = 0;
283
+ s = 0;
284
+ } else {
285
+ s = diff / v;
286
+ rdif = diffc(r);
287
+ gdif = diffc(g);
288
+ bdif = diffc(b);
289
+ if (r === v) {
290
+ h = bdif - gdif;
291
+ } else if (g === v) {
292
+ h = 1 / 3 + rdif - bdif;
293
+ } else if (b === v) {
294
+ h = 2 / 3 + gdif - rdif;
295
+ }
296
+ if (h < 0) {
297
+ h += 1;
298
+ } else if (h > 1) {
299
+ h -= 1;
300
+ }
301
+ }
302
+ return [
303
+ h * 360,
304
+ s * 100,
305
+ v * 100
306
+ ];
307
+ };
308
+ convert.rgb.hwb = function(rgb) {
309
+ const r = rgb[0];
310
+ const g = rgb[1];
311
+ let b = rgb[2];
312
+ const h = convert.rgb.hsl(rgb)[0];
313
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
314
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
315
+ return [h, w * 100, b * 100];
316
+ };
317
+ convert.rgb.cmyk = function(rgb) {
318
+ const r = rgb[0] / 255;
319
+ const g = rgb[1] / 255;
320
+ const b = rgb[2] / 255;
321
+ const k = Math.min(1 - r, 1 - g, 1 - b);
322
+ const c = (1 - r - k) / (1 - k) || 0;
323
+ const m = (1 - g - k) / (1 - k) || 0;
324
+ const y = (1 - b - k) / (1 - k) || 0;
325
+ return [c * 100, m * 100, y * 100, k * 100];
326
+ };
327
+ function comparativeDistance(x, y) {
328
+ return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
329
+ }
330
+ convert.rgb.keyword = function(rgb) {
331
+ const reversed = reverseKeywords[rgb];
332
+ if (reversed) {
333
+ return reversed;
334
+ }
335
+ let currentClosestDistance = Infinity;
336
+ let currentClosestKeyword;
337
+ for (const keyword of Object.keys(cssKeywords)) {
338
+ const value = cssKeywords[keyword];
339
+ const distance = comparativeDistance(rgb, value);
340
+ if (distance < currentClosestDistance) {
341
+ currentClosestDistance = distance;
342
+ currentClosestKeyword = keyword;
343
+ }
344
+ }
345
+ return currentClosestKeyword;
346
+ };
347
+ convert.keyword.rgb = function(keyword) {
348
+ return cssKeywords[keyword];
349
+ };
350
+ convert.rgb.xyz = function(rgb) {
351
+ let r = rgb[0] / 255;
352
+ let g = rgb[1] / 255;
353
+ let b = rgb[2] / 255;
354
+ r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
355
+ g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
356
+ b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
357
+ const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
358
+ const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
359
+ const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
360
+ return [x * 100, y * 100, z * 100];
361
+ };
362
+ convert.rgb.lab = function(rgb) {
363
+ const xyz = convert.rgb.xyz(rgb);
364
+ let x = xyz[0];
365
+ let y = xyz[1];
366
+ let z = xyz[2];
367
+ x /= 95.047;
368
+ y /= 100;
369
+ z /= 108.883;
370
+ x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
371
+ y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
372
+ z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
373
+ const l = 116 * y - 16;
374
+ const a = 500 * (x - y);
375
+ const b = 200 * (y - z);
376
+ return [l, a, b];
377
+ };
378
+ convert.hsl.rgb = function(hsl) {
379
+ const h = hsl[0] / 360;
380
+ const s = hsl[1] / 100;
381
+ const l = hsl[2] / 100;
382
+ let t2;
383
+ let t3;
384
+ let val;
385
+ if (s === 0) {
386
+ val = l * 255;
387
+ return [val, val, val];
388
+ }
389
+ if (l < 0.5) {
390
+ t2 = l * (1 + s);
391
+ } else {
392
+ t2 = l + s - l * s;
393
+ }
394
+ const t1 = 2 * l - t2;
395
+ const rgb = [0, 0, 0];
396
+ for (let i = 0; i < 3; i++) {
397
+ t3 = h + 1 / 3 * -(i - 1);
398
+ if (t3 < 0) {
399
+ t3++;
400
+ }
401
+ if (t3 > 1) {
402
+ t3--;
403
+ }
404
+ if (6 * t3 < 1) {
405
+ val = t1 + (t2 - t1) * 6 * t3;
406
+ } else if (2 * t3 < 1) {
407
+ val = t2;
408
+ } else if (3 * t3 < 2) {
409
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
410
+ } else {
411
+ val = t1;
412
+ }
413
+ rgb[i] = val * 255;
414
+ }
415
+ return rgb;
416
+ };
417
+ convert.hsl.hsv = function(hsl) {
418
+ const h = hsl[0];
419
+ let s = hsl[1] / 100;
420
+ let l = hsl[2] / 100;
421
+ let smin = s;
422
+ const lmin = Math.max(l, 0.01);
423
+ l *= 2;
424
+ s *= l <= 1 ? l : 2 - l;
425
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
426
+ const v = (l + s) / 2;
427
+ const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
428
+ return [h, sv * 100, v * 100];
429
+ };
430
+ convert.hsv.rgb = function(hsv) {
431
+ const h = hsv[0] / 60;
432
+ const s = hsv[1] / 100;
433
+ let v = hsv[2] / 100;
434
+ const hi = Math.floor(h) % 6;
435
+ const f = h - Math.floor(h);
436
+ const p = 255 * v * (1 - s);
437
+ const q = 255 * v * (1 - s * f);
438
+ const t = 255 * v * (1 - s * (1 - f));
439
+ v *= 255;
440
+ switch (hi) {
441
+ case 0:
442
+ return [v, t, p];
443
+ case 1:
444
+ return [q, v, p];
445
+ case 2:
446
+ return [p, v, t];
447
+ case 3:
448
+ return [p, q, v];
449
+ case 4:
450
+ return [t, p, v];
451
+ case 5:
452
+ return [v, p, q];
453
+ }
454
+ };
455
+ convert.hsv.hsl = function(hsv) {
456
+ const h = hsv[0];
457
+ const s = hsv[1] / 100;
458
+ const v = hsv[2] / 100;
459
+ const vmin = Math.max(v, 0.01);
460
+ let sl;
461
+ let l;
462
+ l = (2 - s) * v;
463
+ const lmin = (2 - s) * vmin;
464
+ sl = s * vmin;
465
+ sl /= lmin <= 1 ? lmin : 2 - lmin;
466
+ sl = sl || 0;
467
+ l /= 2;
468
+ return [h, sl * 100, l * 100];
469
+ };
470
+ convert.hwb.rgb = function(hwb) {
471
+ const h = hwb[0] / 360;
472
+ let wh = hwb[1] / 100;
473
+ let bl = hwb[2] / 100;
474
+ const ratio = wh + bl;
475
+ let f;
476
+ if (ratio > 1) {
477
+ wh /= ratio;
478
+ bl /= ratio;
479
+ }
480
+ const i = Math.floor(6 * h);
481
+ const v = 1 - bl;
482
+ f = 6 * h - i;
483
+ if ((i & 1) !== 0) {
484
+ f = 1 - f;
485
+ }
486
+ const n = wh + f * (v - wh);
487
+ let r;
488
+ let g;
489
+ let b;
490
+ switch (i) {
491
+ default:
492
+ case 6:
493
+ case 0:
494
+ r = v;
495
+ g = n;
496
+ b = wh;
497
+ break;
498
+ case 1:
499
+ r = n;
500
+ g = v;
501
+ b = wh;
502
+ break;
503
+ case 2:
504
+ r = wh;
505
+ g = v;
506
+ b = n;
507
+ break;
508
+ case 3:
509
+ r = wh;
510
+ g = n;
511
+ b = v;
512
+ break;
513
+ case 4:
514
+ r = n;
515
+ g = wh;
516
+ b = v;
517
+ break;
518
+ case 5:
519
+ r = v;
520
+ g = wh;
521
+ b = n;
522
+ break;
523
+ }
524
+ return [r * 255, g * 255, b * 255];
525
+ };
526
+ convert.cmyk.rgb = function(cmyk) {
527
+ const c = cmyk[0] / 100;
528
+ const m = cmyk[1] / 100;
529
+ const y = cmyk[2] / 100;
530
+ const k = cmyk[3] / 100;
531
+ const r = 1 - Math.min(1, c * (1 - k) + k);
532
+ const g = 1 - Math.min(1, m * (1 - k) + k);
533
+ const b = 1 - Math.min(1, y * (1 - k) + k);
534
+ return [r * 255, g * 255, b * 255];
535
+ };
536
+ convert.xyz.rgb = function(xyz) {
537
+ const x = xyz[0] / 100;
538
+ const y = xyz[1] / 100;
539
+ const z = xyz[2] / 100;
540
+ let r;
541
+ let g;
542
+ let b;
543
+ r = x * 3.2406 + y * -1.5372 + z * -0.4986;
544
+ g = x * -0.9689 + y * 1.8758 + z * 0.0415;
545
+ b = x * 0.0557 + y * -0.204 + z * 1.057;
546
+ r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
547
+ g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
548
+ b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
549
+ r = Math.min(Math.max(0, r), 1);
550
+ g = Math.min(Math.max(0, g), 1);
551
+ b = Math.min(Math.max(0, b), 1);
552
+ return [r * 255, g * 255, b * 255];
553
+ };
554
+ convert.xyz.lab = function(xyz) {
555
+ let x = xyz[0];
556
+ let y = xyz[1];
557
+ let z = xyz[2];
558
+ x /= 95.047;
559
+ y /= 100;
560
+ z /= 108.883;
561
+ x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
562
+ y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
563
+ z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
564
+ const l = 116 * y - 16;
565
+ const a = 500 * (x - y);
566
+ const b = 200 * (y - z);
567
+ return [l, a, b];
568
+ };
569
+ convert.lab.xyz = function(lab) {
570
+ const l = lab[0];
571
+ const a = lab[1];
572
+ const b = lab[2];
573
+ let x;
574
+ let y;
575
+ let z;
576
+ y = (l + 16) / 116;
577
+ x = a / 500 + y;
578
+ z = y - b / 200;
579
+ const y2 = y ** 3;
580
+ const x2 = x ** 3;
581
+ const z2 = z ** 3;
582
+ y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
583
+ x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
584
+ z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
585
+ x *= 95.047;
586
+ y *= 100;
587
+ z *= 108.883;
588
+ return [x, y, z];
589
+ };
590
+ convert.lab.lch = function(lab) {
591
+ const l = lab[0];
592
+ const a = lab[1];
593
+ const b = lab[2];
594
+ let h;
595
+ const hr = Math.atan2(b, a);
596
+ h = hr * 360 / 2 / Math.PI;
597
+ if (h < 0) {
598
+ h += 360;
599
+ }
600
+ const c = Math.sqrt(a * a + b * b);
601
+ return [l, c, h];
602
+ };
603
+ convert.lch.lab = function(lch) {
604
+ const l = lch[0];
605
+ const c = lch[1];
606
+ const h = lch[2];
607
+ const hr = h / 360 * 2 * Math.PI;
608
+ const a = c * Math.cos(hr);
609
+ const b = c * Math.sin(hr);
610
+ return [l, a, b];
611
+ };
612
+ convert.rgb.ansi16 = function(args, saturation = null) {
613
+ const [r, g, b] = args;
614
+ let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
615
+ value = Math.round(value / 50);
616
+ if (value === 0) {
617
+ return 30;
618
+ }
619
+ let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
620
+ if (value === 2) {
621
+ ansi += 60;
622
+ }
623
+ return ansi;
624
+ };
625
+ convert.hsv.ansi16 = function(args) {
626
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
627
+ };
628
+ convert.rgb.ansi256 = function(args) {
629
+ const r = args[0];
630
+ const g = args[1];
631
+ const b = args[2];
632
+ if (r === g && g === b) {
633
+ if (r < 8) {
634
+ return 16;
635
+ }
636
+ if (r > 248) {
637
+ return 231;
638
+ }
639
+ return Math.round((r - 8) / 247 * 24) + 232;
640
+ }
641
+ const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
642
+ return ansi;
643
+ };
644
+ convert.ansi16.rgb = function(args) {
645
+ let color = args % 10;
646
+ if (color === 0 || color === 7) {
647
+ if (args > 50) {
648
+ color += 3.5;
649
+ }
650
+ color = color / 10.5 * 255;
651
+ return [color, color, color];
652
+ }
653
+ const mult = (~~(args > 50) + 1) * 0.5;
654
+ const r = (color & 1) * mult * 255;
655
+ const g = (color >> 1 & 1) * mult * 255;
656
+ const b = (color >> 2 & 1) * mult * 255;
657
+ return [r, g, b];
658
+ };
659
+ convert.ansi256.rgb = function(args) {
660
+ if (args >= 232) {
661
+ const c = (args - 232) * 10 + 8;
662
+ return [c, c, c];
663
+ }
664
+ args -= 16;
665
+ let rem;
666
+ const r = Math.floor(args / 36) / 5 * 255;
667
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
668
+ const b = rem % 6 / 5 * 255;
669
+ return [r, g, b];
670
+ };
671
+ convert.rgb.hex = function(args) {
672
+ const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
673
+ const string = integer.toString(16).toUpperCase();
674
+ return "000000".substring(string.length) + string;
675
+ };
676
+ convert.hex.rgb = function(args) {
677
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
678
+ if (!match) {
679
+ return [0, 0, 0];
680
+ }
681
+ let colorString = match[0];
682
+ if (match[0].length === 3) {
683
+ colorString = colorString.split("").map((char) => {
684
+ return char + char;
685
+ }).join("");
686
+ }
687
+ const integer = parseInt(colorString, 16);
688
+ const r = integer >> 16 & 255;
689
+ const g = integer >> 8 & 255;
690
+ const b = integer & 255;
691
+ return [r, g, b];
692
+ };
693
+ convert.rgb.hcg = function(rgb) {
694
+ const r = rgb[0] / 255;
695
+ const g = rgb[1] / 255;
696
+ const b = rgb[2] / 255;
697
+ const max = Math.max(Math.max(r, g), b);
698
+ const min = Math.min(Math.min(r, g), b);
699
+ const chroma = max - min;
700
+ let grayscale;
701
+ let hue;
702
+ if (chroma < 1) {
703
+ grayscale = min / (1 - chroma);
704
+ } else {
705
+ grayscale = 0;
706
+ }
707
+ if (chroma <= 0) {
708
+ hue = 0;
709
+ } else if (max === r) {
710
+ hue = (g - b) / chroma % 6;
711
+ } else if (max === g) {
712
+ hue = 2 + (b - r) / chroma;
713
+ } else {
714
+ hue = 4 + (r - g) / chroma;
715
+ }
716
+ hue /= 6;
717
+ hue %= 1;
718
+ return [hue * 360, chroma * 100, grayscale * 100];
719
+ };
720
+ convert.hsl.hcg = function(hsl) {
721
+ const s = hsl[1] / 100;
722
+ const l = hsl[2] / 100;
723
+ const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
724
+ let f = 0;
725
+ if (c < 1) {
726
+ f = (l - 0.5 * c) / (1 - c);
727
+ }
728
+ return [hsl[0], c * 100, f * 100];
729
+ };
730
+ convert.hsv.hcg = function(hsv) {
731
+ const s = hsv[1] / 100;
732
+ const v = hsv[2] / 100;
733
+ const c = s * v;
734
+ let f = 0;
735
+ if (c < 1) {
736
+ f = (v - c) / (1 - c);
737
+ }
738
+ return [hsv[0], c * 100, f * 100];
739
+ };
740
+ convert.hcg.rgb = function(hcg) {
741
+ const h = hcg[0] / 360;
742
+ const c = hcg[1] / 100;
743
+ const g = hcg[2] / 100;
744
+ if (c === 0) {
745
+ return [g * 255, g * 255, g * 255];
746
+ }
747
+ const pure = [0, 0, 0];
748
+ const hi = h % 1 * 6;
749
+ const v = hi % 1;
750
+ const w = 1 - v;
751
+ let mg = 0;
752
+ switch (Math.floor(hi)) {
753
+ case 0:
754
+ pure[0] = 1;
755
+ pure[1] = v;
756
+ pure[2] = 0;
757
+ break;
758
+ case 1:
759
+ pure[0] = w;
760
+ pure[1] = 1;
761
+ pure[2] = 0;
762
+ break;
763
+ case 2:
764
+ pure[0] = 0;
765
+ pure[1] = 1;
766
+ pure[2] = v;
767
+ break;
768
+ case 3:
769
+ pure[0] = 0;
770
+ pure[1] = w;
771
+ pure[2] = 1;
772
+ break;
773
+ case 4:
774
+ pure[0] = v;
775
+ pure[1] = 0;
776
+ pure[2] = 1;
777
+ break;
778
+ default:
779
+ pure[0] = 1;
780
+ pure[1] = 0;
781
+ pure[2] = w;
782
+ }
783
+ mg = (1 - c) * g;
784
+ return [
785
+ (c * pure[0] + mg) * 255,
786
+ (c * pure[1] + mg) * 255,
787
+ (c * pure[2] + mg) * 255
788
+ ];
789
+ };
790
+ convert.hcg.hsv = function(hcg) {
791
+ const c = hcg[1] / 100;
792
+ const g = hcg[2] / 100;
793
+ const v = c + g * (1 - c);
794
+ let f = 0;
795
+ if (v > 0) {
796
+ f = c / v;
797
+ }
798
+ return [hcg[0], f * 100, v * 100];
799
+ };
800
+ convert.hcg.hsl = function(hcg) {
801
+ const c = hcg[1] / 100;
802
+ const g = hcg[2] / 100;
803
+ const l = g * (1 - c) + 0.5 * c;
804
+ let s = 0;
805
+ if (l > 0 && l < 0.5) {
806
+ s = c / (2 * l);
807
+ } else if (l >= 0.5 && l < 1) {
808
+ s = c / (2 * (1 - l));
809
+ }
810
+ return [hcg[0], s * 100, l * 100];
811
+ };
812
+ convert.hcg.hwb = function(hcg) {
813
+ const c = hcg[1] / 100;
814
+ const g = hcg[2] / 100;
815
+ const v = c + g * (1 - c);
816
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
817
+ };
818
+ convert.hwb.hcg = function(hwb) {
819
+ const w = hwb[1] / 100;
820
+ const b = hwb[2] / 100;
821
+ const v = 1 - b;
822
+ const c = v - w;
823
+ let g = 0;
824
+ if (c < 1) {
825
+ g = (v - c) / (1 - c);
826
+ }
827
+ return [hwb[0], c * 100, g * 100];
828
+ };
829
+ convert.apple.rgb = function(apple) {
830
+ return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
831
+ };
832
+ convert.rgb.apple = function(rgb) {
833
+ return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
834
+ };
835
+ convert.gray.rgb = function(args) {
836
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
837
+ };
838
+ convert.gray.hsl = function(args) {
839
+ return [0, 0, args[0]];
840
+ };
841
+ convert.gray.hsv = convert.gray.hsl;
842
+ convert.gray.hwb = function(gray) {
843
+ return [0, 100, gray[0]];
844
+ };
845
+ convert.gray.cmyk = function(gray) {
846
+ return [0, 0, 0, gray[0]];
847
+ };
848
+ convert.gray.lab = function(gray) {
849
+ return [gray[0], 0, 0];
850
+ };
851
+ convert.gray.hex = function(gray) {
852
+ const val = Math.round(gray[0] / 100 * 255) & 255;
853
+ const integer = (val << 16) + (val << 8) + val;
854
+ const string = integer.toString(16).toUpperCase();
855
+ return "000000".substring(string.length) + string;
856
+ };
857
+ convert.rgb.gray = function(rgb) {
858
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
859
+ return [val / 255 * 100];
860
+ };
861
+ }
862
+ });
863
+
864
+ // node_modules/color-convert/route.js
865
+ var require_route = __commonJS({
866
+ "node_modules/color-convert/route.js"(exports, module) {
867
+ "use strict";
868
+ var conversions = require_conversions();
869
+ function buildGraph() {
870
+ const graph = {};
871
+ const models = Object.keys(conversions);
872
+ for (let len = models.length, i = 0; i < len; i++) {
873
+ graph[models[i]] = {
874
+ // http://jsperf.com/1-vs-infinity
875
+ // micro-opt, but this is simple.
876
+ distance: -1,
877
+ parent: null
878
+ };
879
+ }
880
+ return graph;
881
+ }
882
+ function deriveBFS(fromModel) {
883
+ const graph = buildGraph();
884
+ const queue = [fromModel];
885
+ graph[fromModel].distance = 0;
886
+ while (queue.length) {
887
+ const current = queue.pop();
888
+ const adjacents = Object.keys(conversions[current]);
889
+ for (let len = adjacents.length, i = 0; i < len; i++) {
890
+ const adjacent = adjacents[i];
891
+ const node = graph[adjacent];
892
+ if (node.distance === -1) {
893
+ node.distance = graph[current].distance + 1;
894
+ node.parent = current;
895
+ queue.unshift(adjacent);
896
+ }
897
+ }
898
+ }
899
+ return graph;
900
+ }
901
+ function link(from, to) {
902
+ return function(args) {
903
+ return to(from(args));
904
+ };
905
+ }
906
+ function wrapConversion(toModel, graph) {
907
+ const path = [graph[toModel].parent, toModel];
908
+ let fn = conversions[graph[toModel].parent][toModel];
909
+ let cur = graph[toModel].parent;
910
+ while (graph[cur].parent) {
911
+ path.unshift(graph[cur].parent);
912
+ fn = link(conversions[graph[cur].parent][cur], fn);
913
+ cur = graph[cur].parent;
914
+ }
915
+ fn.conversion = path;
916
+ return fn;
917
+ }
918
+ module.exports = function(fromModel) {
919
+ const graph = deriveBFS(fromModel);
920
+ const conversion = {};
921
+ const models = Object.keys(graph);
922
+ for (let len = models.length, i = 0; i < len; i++) {
923
+ const toModel = models[i];
924
+ const node = graph[toModel];
925
+ if (node.parent === null) {
926
+ continue;
927
+ }
928
+ conversion[toModel] = wrapConversion(toModel, graph);
929
+ }
930
+ return conversion;
931
+ };
932
+ }
933
+ });
934
+
935
+ // node_modules/color-convert/index.js
936
+ var require_color_convert = __commonJS({
937
+ "node_modules/color-convert/index.js"(exports, module) {
938
+ "use strict";
939
+ var conversions = require_conversions();
940
+ var route = require_route();
941
+ var convert = {};
942
+ var models = Object.keys(conversions);
943
+ function wrapRaw(fn) {
944
+ const wrappedFn = function(...args) {
945
+ const arg0 = args[0];
946
+ if (arg0 === void 0 || arg0 === null) {
947
+ return arg0;
948
+ }
949
+ if (arg0.length > 1) {
950
+ args = arg0;
951
+ }
952
+ return fn(args);
953
+ };
954
+ if ("conversion" in fn) {
955
+ wrappedFn.conversion = fn.conversion;
956
+ }
957
+ return wrappedFn;
958
+ }
959
+ function wrapRounded(fn) {
960
+ const wrappedFn = function(...args) {
961
+ const arg0 = args[0];
962
+ if (arg0 === void 0 || arg0 === null) {
963
+ return arg0;
964
+ }
965
+ if (arg0.length > 1) {
966
+ args = arg0;
967
+ }
968
+ const result = fn(args);
969
+ if (typeof result === "object") {
970
+ for (let len = result.length, i = 0; i < len; i++) {
971
+ result[i] = Math.round(result[i]);
972
+ }
973
+ }
974
+ return result;
975
+ };
976
+ if ("conversion" in fn) {
977
+ wrappedFn.conversion = fn.conversion;
978
+ }
979
+ return wrappedFn;
980
+ }
981
+ models.forEach((fromModel) => {
982
+ convert[fromModel] = {};
983
+ Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
984
+ Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
985
+ const routes = route(fromModel);
986
+ const routeModels = Object.keys(routes);
987
+ routeModels.forEach((toModel) => {
988
+ const fn = routes[toModel];
989
+ convert[fromModel][toModel] = wrapRounded(fn);
990
+ convert[fromModel][toModel].raw = wrapRaw(fn);
991
+ });
992
+ });
993
+ module.exports = convert;
994
+ }
995
+ });
996
+
997
+ // node_modules/ansi-styles/index.js
998
+ var require_ansi_styles = __commonJS({
999
+ "node_modules/ansi-styles/index.js"(exports, module) {
1000
+ "use strict";
1001
+ var wrapAnsi16 = (fn, offset) => (...args) => {
1002
+ const code = fn(...args);
1003
+ return `\x1B[${code + offset}m`;
1004
+ };
1005
+ var wrapAnsi256 = (fn, offset) => (...args) => {
1006
+ const code = fn(...args);
1007
+ return `\x1B[${38 + offset};5;${code}m`;
1008
+ };
1009
+ var wrapAnsi16m = (fn, offset) => (...args) => {
1010
+ const rgb = fn(...args);
1011
+ return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1012
+ };
1013
+ var ansi2ansi = (n) => n;
1014
+ var rgb2rgb = (r, g, b) => [r, g, b];
1015
+ var setLazyProperty = (object, property, get) => {
1016
+ Object.defineProperty(object, property, {
1017
+ get: () => {
1018
+ const value = get();
1019
+ Object.defineProperty(object, property, {
1020
+ value,
1021
+ enumerable: true,
1022
+ configurable: true
1023
+ });
1024
+ return value;
1025
+ },
1026
+ enumerable: true,
1027
+ configurable: true
1028
+ });
1029
+ };
1030
+ var colorConvert;
1031
+ var makeDynamicStyles = (wrap3, targetSpace, identity, isBackground) => {
1032
+ if (colorConvert === void 0) {
1033
+ colorConvert = require_color_convert();
1034
+ }
1035
+ const offset = isBackground ? 10 : 0;
1036
+ const styles = {};
1037
+ for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1038
+ const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1039
+ if (sourceSpace === targetSpace) {
1040
+ styles[name] = wrap3(identity, offset);
1041
+ } else if (typeof suite === "object") {
1042
+ styles[name] = wrap3(suite[targetSpace], offset);
1043
+ }
1044
+ }
1045
+ return styles;
1046
+ };
1047
+ function assembleStyles() {
1048
+ const codes = /* @__PURE__ */ new Map();
1049
+ const styles = {
1050
+ modifier: {
1051
+ reset: [0, 0],
1052
+ // 21 isn't widely supported and 22 does the same thing
1053
+ bold: [1, 22],
1054
+ dim: [2, 22],
1055
+ italic: [3, 23],
1056
+ underline: [4, 24],
1057
+ inverse: [7, 27],
1058
+ hidden: [8, 28],
1059
+ strikethrough: [9, 29]
1060
+ },
1061
+ color: {
1062
+ black: [30, 39],
1063
+ red: [31, 39],
1064
+ green: [32, 39],
1065
+ yellow: [33, 39],
1066
+ blue: [34, 39],
1067
+ magenta: [35, 39],
1068
+ cyan: [36, 39],
1069
+ white: [37, 39],
1070
+ // Bright color
1071
+ blackBright: [90, 39],
1072
+ redBright: [91, 39],
1073
+ greenBright: [92, 39],
1074
+ yellowBright: [93, 39],
1075
+ blueBright: [94, 39],
1076
+ magentaBright: [95, 39],
1077
+ cyanBright: [96, 39],
1078
+ whiteBright: [97, 39]
1079
+ },
1080
+ bgColor: {
1081
+ bgBlack: [40, 49],
1082
+ bgRed: [41, 49],
1083
+ bgGreen: [42, 49],
1084
+ bgYellow: [43, 49],
1085
+ bgBlue: [44, 49],
1086
+ bgMagenta: [45, 49],
1087
+ bgCyan: [46, 49],
1088
+ bgWhite: [47, 49],
1089
+ // Bright color
1090
+ bgBlackBright: [100, 49],
1091
+ bgRedBright: [101, 49],
1092
+ bgGreenBright: [102, 49],
1093
+ bgYellowBright: [103, 49],
1094
+ bgBlueBright: [104, 49],
1095
+ bgMagentaBright: [105, 49],
1096
+ bgCyanBright: [106, 49],
1097
+ bgWhiteBright: [107, 49]
1098
+ }
1099
+ };
1100
+ styles.color.gray = styles.color.blackBright;
1101
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1102
+ styles.color.grey = styles.color.blackBright;
1103
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1104
+ for (const [groupName, group] of Object.entries(styles)) {
1105
+ for (const [styleName, style2] of Object.entries(group)) {
1106
+ styles[styleName] = {
1107
+ open: `\x1B[${style2[0]}m`,
1108
+ close: `\x1B[${style2[1]}m`
1109
+ };
1110
+ group[styleName] = styles[styleName];
1111
+ codes.set(style2[0], style2[1]);
1112
+ }
1113
+ Object.defineProperty(styles, groupName, {
1114
+ value: group,
1115
+ enumerable: false
1116
+ });
1117
+ }
1118
+ Object.defineProperty(styles, "codes", {
1119
+ value: codes,
1120
+ enumerable: false
1121
+ });
1122
+ styles.color.close = "\x1B[39m";
1123
+ styles.bgColor.close = "\x1B[49m";
1124
+ setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1125
+ setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1126
+ setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1127
+ setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1128
+ setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1129
+ setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1130
+ return styles;
1131
+ }
1132
+ Object.defineProperty(module, "exports", {
1133
+ enumerable: true,
1134
+ get: assembleStyles
1135
+ });
1136
+ }
1137
+ });
1138
+
1139
+ // stub:os
1140
+ var require_os = __commonJS({
1141
+ "stub:os"(exports, module) {
1142
+ "use strict";
1143
+ module.exports = { release: function() {
1144
+ return "";
1145
+ } };
1146
+ }
1147
+ });
1148
+
1149
+ // stub:tty
1150
+ var require_tty = __commonJS({
1151
+ "stub:tty"(exports, module) {
1152
+ "use strict";
1153
+ module.exports = { isatty: function() {
1154
+ return false;
1155
+ } };
1156
+ }
1157
+ });
1158
+
1159
+ // node_modules/has-flag/index.js
1160
+ var require_has_flag = __commonJS({
1161
+ "node_modules/has-flag/index.js"(exports, module) {
1162
+ "use strict";
1163
+ module.exports = (flag, argv = process.argv) => {
1164
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
1165
+ const position = argv.indexOf(prefix + flag);
1166
+ const terminatorPosition = argv.indexOf("--");
1167
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1168
+ };
1169
+ }
1170
+ });
1171
+
1172
+ // node_modules/chalk/node_modules/supports-color/index.js
1173
+ var require_supports_color = __commonJS({
1174
+ "node_modules/chalk/node_modules/supports-color/index.js"(exports, module) {
1175
+ "use strict";
1176
+ var os = require_os();
1177
+ var tty = require_tty();
1178
+ var hasFlag = require_has_flag();
1179
+ var { env } = process;
1180
+ var forceColor;
1181
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
1182
+ forceColor = 0;
1183
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
1184
+ forceColor = 1;
1185
+ }
1186
+ if ("FORCE_COLOR" in env) {
1187
+ if (env.FORCE_COLOR === "true") {
1188
+ forceColor = 1;
1189
+ } else if (env.FORCE_COLOR === "false") {
1190
+ forceColor = 0;
1191
+ } else {
1192
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
1193
+ }
1194
+ }
1195
+ function translateLevel(level) {
1196
+ if (level === 0) {
1197
+ return false;
1198
+ }
1199
+ return {
1200
+ level,
1201
+ hasBasic: true,
1202
+ has256: level >= 2,
1203
+ has16m: level >= 3
1204
+ };
1205
+ }
1206
+ function supportsColor(haveStream, streamIsTTY) {
1207
+ if (forceColor === 0) {
1208
+ return 0;
1209
+ }
1210
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
1211
+ return 3;
1212
+ }
1213
+ if (hasFlag("color=256")) {
1214
+ return 2;
1215
+ }
1216
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
1217
+ return 0;
1218
+ }
1219
+ const min = forceColor || 0;
1220
+ if (env.TERM === "dumb") {
1221
+ return min;
1222
+ }
1223
+ if (process.platform === "win32") {
1224
+ const osRelease = os.release().split(".");
1225
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1226
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1227
+ }
1228
+ return 1;
1229
+ }
1230
+ if ("CI" in env) {
1231
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
1232
+ return 1;
1233
+ }
1234
+ return min;
1235
+ }
1236
+ if ("TEAMCITY_VERSION" in env) {
1237
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1238
+ }
1239
+ if (env.COLORTERM === "truecolor") {
1240
+ return 3;
1241
+ }
1242
+ if ("TERM_PROGRAM" in env) {
1243
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1244
+ switch (env.TERM_PROGRAM) {
1245
+ case "iTerm.app":
1246
+ return version >= 3 ? 3 : 2;
1247
+ case "Apple_Terminal":
1248
+ return 2;
1249
+ }
1250
+ }
1251
+ if (/-256(color)?$/i.test(env.TERM)) {
1252
+ return 2;
1253
+ }
1254
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1255
+ return 1;
1256
+ }
1257
+ if ("COLORTERM" in env) {
1258
+ return 1;
1259
+ }
1260
+ return min;
1261
+ }
1262
+ function getSupportLevel(stream) {
1263
+ const level = supportsColor(stream, stream && stream.isTTY);
1264
+ return translateLevel(level);
1265
+ }
1266
+ module.exports = {
1267
+ supportsColor: getSupportLevel,
1268
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1269
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1270
+ };
1271
+ }
1272
+ });
1273
+
1274
+ // node_modules/chalk/source/util.js
1275
+ var require_util = __commonJS({
1276
+ "node_modules/chalk/source/util.js"(exports, module) {
1277
+ "use strict";
1278
+ var stringReplaceAll = (string, substring, replacer) => {
1279
+ let index = string.indexOf(substring);
1280
+ if (index === -1) {
1281
+ return string;
1282
+ }
1283
+ const substringLength = substring.length;
1284
+ let endIndex = 0;
1285
+ let returnValue = "";
1286
+ do {
1287
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1288
+ endIndex = index + substringLength;
1289
+ index = string.indexOf(substring, endIndex);
1290
+ } while (index !== -1);
1291
+ returnValue += string.substr(endIndex);
1292
+ return returnValue;
1293
+ };
1294
+ var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1295
+ let endIndex = 0;
1296
+ let returnValue = "";
1297
+ do {
1298
+ const gotCR = string[index - 1] === "\r";
1299
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1300
+ endIndex = index + 1;
1301
+ index = string.indexOf("\n", endIndex);
1302
+ } while (index !== -1);
1303
+ returnValue += string.substr(endIndex);
1304
+ return returnValue;
1305
+ };
1306
+ module.exports = {
1307
+ stringReplaceAll,
1308
+ stringEncaseCRLFWithFirstIndex
1309
+ };
1310
+ }
1311
+ });
1312
+
1313
+ // node_modules/chalk/source/templates.js
1314
+ var require_templates = __commonJS({
1315
+ "node_modules/chalk/source/templates.js"(exports, module) {
1316
+ "use strict";
1317
+ var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
1318
+ var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
1319
+ var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
1320
+ var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
1321
+ var ESCAPES = /* @__PURE__ */ new Map([
1322
+ ["n", "\n"],
1323
+ ["r", "\r"],
1324
+ ["t", " "],
1325
+ ["b", "\b"],
1326
+ ["f", "\f"],
1327
+ ["v", "\v"],
1328
+ ["0", "\0"],
1329
+ ["\\", "\\"],
1330
+ ["e", "\x1B"],
1331
+ ["a", "\x07"]
1332
+ ]);
1333
+ function unescape(c) {
1334
+ const u = c[0] === "u";
1335
+ const bracket = c[1] === "{";
1336
+ if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
1337
+ return String.fromCharCode(parseInt(c.slice(1), 16));
1338
+ }
1339
+ if (u && bracket) {
1340
+ return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
1341
+ }
1342
+ return ESCAPES.get(c) || c;
1343
+ }
1344
+ function parseArguments(name, arguments_) {
1345
+ const results = [];
1346
+ const chunks = arguments_.trim().split(/\s*,\s*/g);
1347
+ let matches;
1348
+ for (const chunk of chunks) {
1349
+ const number = Number(chunk);
1350
+ if (!Number.isNaN(number)) {
1351
+ results.push(number);
1352
+ } else if (matches = chunk.match(STRING_REGEX)) {
1353
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
1354
+ } else {
1355
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
1356
+ }
1357
+ }
1358
+ return results;
1359
+ }
1360
+ function parseStyle(style2) {
1361
+ STYLE_REGEX.lastIndex = 0;
1362
+ const results = [];
1363
+ let matches;
1364
+ while ((matches = STYLE_REGEX.exec(style2)) !== null) {
1365
+ const name = matches[1];
1366
+ if (matches[2]) {
1367
+ const args = parseArguments(name, matches[2]);
1368
+ results.push([name].concat(args));
1369
+ } else {
1370
+ results.push([name]);
1371
+ }
1372
+ }
1373
+ return results;
1374
+ }
1375
+ function buildStyle(chalk2, styles) {
1376
+ const enabled = {};
1377
+ for (const layer of styles) {
1378
+ for (const style2 of layer.styles) {
1379
+ enabled[style2[0]] = layer.inverse ? null : style2.slice(1);
1380
+ }
1381
+ }
1382
+ let current = chalk2;
1383
+ for (const [styleName, styles2] of Object.entries(enabled)) {
1384
+ if (!Array.isArray(styles2)) {
1385
+ continue;
1386
+ }
1387
+ if (!(styleName in current)) {
1388
+ throw new Error(`Unknown Chalk style: ${styleName}`);
1389
+ }
1390
+ current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
1391
+ }
1392
+ return current;
1393
+ }
1394
+ module.exports = (chalk2, temporary) => {
1395
+ const styles = [];
1396
+ const chunks = [];
1397
+ let chunk = [];
1398
+ temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style2, close, character) => {
1399
+ if (escapeCharacter) {
1400
+ chunk.push(unescape(escapeCharacter));
1401
+ } else if (style2) {
1402
+ const string = chunk.join("");
1403
+ chunk = [];
1404
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
1405
+ styles.push({ inverse, styles: parseStyle(style2) });
1406
+ } else if (close) {
1407
+ if (styles.length === 0) {
1408
+ throw new Error("Found extraneous } in Chalk template literal");
1409
+ }
1410
+ chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
1411
+ chunk = [];
1412
+ styles.pop();
1413
+ } else {
1414
+ chunk.push(character);
1415
+ }
1416
+ });
1417
+ chunks.push(chunk.join(""));
1418
+ if (styles.length > 0) {
1419
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1420
+ throw new Error(errMessage);
1421
+ }
1422
+ return chunks.join("");
1423
+ };
1424
+ }
1425
+ });
1426
+
1427
+ // node_modules/chalk/source/index.js
1428
+ var require_source = __commonJS({
1429
+ "node_modules/chalk/source/index.js"(exports, module) {
1430
+ "use strict";
1431
+ var ansiStyles = require_ansi_styles();
1432
+ var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color();
1433
+ var {
1434
+ stringReplaceAll,
1435
+ stringEncaseCRLFWithFirstIndex
1436
+ } = require_util();
1437
+ var { isArray } = Array;
1438
+ var levelMapping = [
1439
+ "ansi",
1440
+ "ansi",
1441
+ "ansi256",
1442
+ "ansi16m"
1443
+ ];
1444
+ var styles = /* @__PURE__ */ Object.create(null);
1445
+ var applyOptions = (object, options = {}) => {
1446
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1447
+ throw new Error("The `level` option should be an integer from 0 to 3");
1448
+ }
1449
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1450
+ object.level = options.level === void 0 ? colorLevel : options.level;
1451
+ };
1452
+ var ChalkClass = class {
1453
+ constructor(options) {
1454
+ return chalkFactory(options);
1455
+ }
1456
+ };
1457
+ var chalkFactory = (options) => {
1458
+ const chalk3 = {};
1459
+ applyOptions(chalk3, options);
1460
+ chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
1461
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
1462
+ Object.setPrototypeOf(chalk3.template, chalk3);
1463
+ chalk3.template.constructor = () => {
1464
+ throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
1465
+ };
1466
+ chalk3.template.Instance = ChalkClass;
1467
+ return chalk3.template;
1468
+ };
1469
+ function Chalk(options) {
1470
+ return chalkFactory(options);
1471
+ }
1472
+ for (const [styleName, style2] of Object.entries(ansiStyles)) {
1473
+ styles[styleName] = {
1474
+ get() {
1475
+ const builder = createBuilder(this, createStyler(style2.open, style2.close, this._styler), this._isEmpty);
1476
+ Object.defineProperty(this, styleName, { value: builder });
1477
+ return builder;
1478
+ }
1479
+ };
1480
+ }
1481
+ styles.visible = {
1482
+ get() {
1483
+ const builder = createBuilder(this, this._styler, true);
1484
+ Object.defineProperty(this, "visible", { value: builder });
1485
+ return builder;
1486
+ }
1487
+ };
1488
+ var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1489
+ for (const model of usedModels) {
1490
+ styles[model] = {
1491
+ get() {
1492
+ const { level } = this;
1493
+ return function(...arguments_) {
1494
+ const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1495
+ return createBuilder(this, styler, this._isEmpty);
1496
+ };
1497
+ }
1498
+ };
1499
+ }
1500
+ for (const model of usedModels) {
1501
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1502
+ styles[bgModel] = {
1503
+ get() {
1504
+ const { level } = this;
1505
+ return function(...arguments_) {
1506
+ const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
1507
+ return createBuilder(this, styler, this._isEmpty);
1508
+ };
1509
+ }
1510
+ };
1511
+ }
1512
+ var proto = Object.defineProperties(() => {
1513
+ }, {
1514
+ ...styles,
1515
+ level: {
1516
+ enumerable: true,
1517
+ get() {
1518
+ return this._generator.level;
1519
+ },
1520
+ set(level) {
1521
+ this._generator.level = level;
1522
+ }
1523
+ }
1524
+ });
1525
+ var createStyler = (open, close, parent) => {
1526
+ let openAll;
1527
+ let closeAll;
1528
+ if (parent === void 0) {
1529
+ openAll = open;
1530
+ closeAll = close;
1531
+ } else {
1532
+ openAll = parent.openAll + open;
1533
+ closeAll = close + parent.closeAll;
1534
+ }
1535
+ return {
1536
+ open,
1537
+ close,
1538
+ openAll,
1539
+ closeAll,
1540
+ parent
1541
+ };
1542
+ };
1543
+ var createBuilder = (self, _styler, _isEmpty) => {
1544
+ const builder = (...arguments_) => {
1545
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
1546
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
1547
+ }
1548
+ return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1549
+ };
1550
+ Object.setPrototypeOf(builder, proto);
1551
+ builder._generator = self;
1552
+ builder._styler = _styler;
1553
+ builder._isEmpty = _isEmpty;
1554
+ return builder;
1555
+ };
1556
+ var applyStyle = (self, string) => {
1557
+ if (self.level <= 0 || !string) {
1558
+ return self._isEmpty ? "" : string;
1559
+ }
1560
+ let styler = self._styler;
1561
+ if (styler === void 0) {
1562
+ return string;
1563
+ }
1564
+ const { openAll, closeAll } = styler;
1565
+ if (string.indexOf("\x1B") !== -1) {
1566
+ while (styler !== void 0) {
1567
+ string = stringReplaceAll(string, styler.close, styler.open);
1568
+ styler = styler.parent;
1569
+ }
1570
+ }
1571
+ const lfIndex = string.indexOf("\n");
1572
+ if (lfIndex !== -1) {
1573
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1574
+ }
1575
+ return openAll + string + closeAll;
1576
+ };
1577
+ var template;
1578
+ var chalkTag = (chalk3, ...strings) => {
1579
+ const [firstString] = strings;
1580
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
1581
+ return strings.join(" ");
1582
+ }
1583
+ const arguments_ = strings.slice(1);
1584
+ const parts = [firstString.raw[0]];
1585
+ for (let i = 1; i < firstString.length; i++) {
1586
+ parts.push(
1587
+ String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
1588
+ String(firstString.raw[i])
1589
+ );
1590
+ }
1591
+ if (template === void 0) {
1592
+ template = require_templates();
1593
+ }
1594
+ return template(chalk3, parts.join(""));
1595
+ };
1596
+ Object.defineProperties(Chalk.prototype, styles);
1597
+ var chalk2 = Chalk();
1598
+ chalk2.supportsColor = stdoutColor;
1599
+ chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
1600
+ chalk2.stderr.supportsColor = stderrColor;
1601
+ module.exports = chalk2;
40
1602
  }
41
1603
  });
42
1604
 
@@ -241,6 +1803,16 @@ var TtyTable = (() => {
241
1803
  }
242
1804
  });
243
1805
 
1806
+ // stub:adapter
1807
+ var require_adapter = __commonJS({
1808
+ "stub:adapter"(exports, module) {
1809
+ "use strict";
1810
+ module.exports = function() {
1811
+ return "";
1812
+ };
1813
+ }
1814
+ });
1815
+
244
1816
  // src/browser.ts
245
1817
  var browser_exports = {};
246
1818
  __export(browser_exports, {
@@ -322,126 +1894,19 @@ var TtyTable = (() => {
322
1894
  var defaults_default = defaults;
323
1895
 
324
1896
  // src/style.ts
325
- var import_chalk = __toESM(require_stub());
326
-
327
- // node_modules/kleur/index.mjs
328
- var FORCE_COLOR;
329
- var NODE_DISABLE_COLORS;
330
- var NO_COLOR;
331
- var TERM;
332
- var isTTY = true;
333
- if (typeof process !== "undefined") {
334
- ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
335
- isTTY = process.stdout && process.stdout.isTTY;
336
- }
337
- var $ = {
338
- enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY),
339
- // modifiers
340
- reset: init(0, 0),
341
- bold: init(1, 22),
342
- dim: init(2, 22),
343
- italic: init(3, 23),
344
- underline: init(4, 24),
345
- inverse: init(7, 27),
346
- hidden: init(8, 28),
347
- strikethrough: init(9, 29),
348
- // colors
349
- black: init(30, 39),
350
- red: init(31, 39),
351
- green: init(32, 39),
352
- yellow: init(33, 39),
353
- blue: init(34, 39),
354
- magenta: init(35, 39),
355
- cyan: init(36, 39),
356
- white: init(37, 39),
357
- gray: init(90, 39),
358
- grey: init(90, 39),
359
- // background colors
360
- bgBlack: init(40, 49),
361
- bgRed: init(41, 49),
362
- bgGreen: init(42, 49),
363
- bgYellow: init(43, 49),
364
- bgBlue: init(44, 49),
365
- bgMagenta: init(45, 49),
366
- bgCyan: init(46, 49),
367
- bgWhite: init(47, 49)
368
- };
369
- function run(arr, str) {
370
- let i = 0, tmp, beg = "", end = "";
371
- for (; i < arr.length; i++) {
372
- tmp = arr[i];
373
- beg += tmp.open;
374
- end += tmp.close;
375
- if (!!~str.indexOf(tmp.close)) {
376
- str = str.replace(tmp.rgx, tmp.close + tmp.open);
377
- }
378
- }
379
- return beg + str + end;
380
- }
381
- function chain(has, keys) {
382
- let ctx = { has, keys };
383
- ctx.reset = $.reset.bind(ctx);
384
- ctx.bold = $.bold.bind(ctx);
385
- ctx.dim = $.dim.bind(ctx);
386
- ctx.italic = $.italic.bind(ctx);
387
- ctx.underline = $.underline.bind(ctx);
388
- ctx.inverse = $.inverse.bind(ctx);
389
- ctx.hidden = $.hidden.bind(ctx);
390
- ctx.strikethrough = $.strikethrough.bind(ctx);
391
- ctx.black = $.black.bind(ctx);
392
- ctx.red = $.red.bind(ctx);
393
- ctx.green = $.green.bind(ctx);
394
- ctx.yellow = $.yellow.bind(ctx);
395
- ctx.blue = $.blue.bind(ctx);
396
- ctx.magenta = $.magenta.bind(ctx);
397
- ctx.cyan = $.cyan.bind(ctx);
398
- ctx.white = $.white.bind(ctx);
399
- ctx.gray = $.gray.bind(ctx);
400
- ctx.grey = $.grey.bind(ctx);
401
- ctx.bgBlack = $.bgBlack.bind(ctx);
402
- ctx.bgRed = $.bgRed.bind(ctx);
403
- ctx.bgGreen = $.bgGreen.bind(ctx);
404
- ctx.bgYellow = $.bgYellow.bind(ctx);
405
- ctx.bgBlue = $.bgBlue.bind(ctx);
406
- ctx.bgMagenta = $.bgMagenta.bind(ctx);
407
- ctx.bgCyan = $.bgCyan.bind(ctx);
408
- ctx.bgWhite = $.bgWhite.bind(ctx);
409
- return ctx;
410
- }
411
- function init(open, close) {
412
- let blk = {
413
- open: `\x1B[${open}m`,
414
- close: `\x1B[${close}m`,
415
- rgx: new RegExp(`\\x1b\\[${close}m`, "g")
416
- };
417
- return function(txt) {
418
- if (this !== void 0 && this.has !== void 0) {
419
- !!~this.has.indexOf(open) || (this.has.push(open), this.keys.push(blk));
420
- return txt === void 0 ? this : $.enabled ? run(this.keys, txt + "") : txt + "";
421
- }
422
- return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt + "") : txt + "";
423
- };
424
- }
425
- var kleur_default = $;
426
-
427
- // src/style.ts
1897
+ var import_chalk = __toESM(require_source());
428
1898
  var import_strip_ansi = __toESM(require_strip_ansi());
429
- var colorLib = process && process.stdout ? import_chalk.default : kleur_default;
430
- var style = (str, ...colors) => {
431
- const out = colors.reduce(function(input, color) {
432
- return colorLib[color](input);
433
- }, str);
434
- return out;
1899
+ var colorLib = typeof process !== "undefined" && process.stdout ? import_chalk.default : new import_chalk.default.Instance({ level: 1 });
1900
+ var colorize = (value, color) => {
1901
+ const fn = colorLib[color];
1902
+ return typeof fn === "function" ? fn(value) : value;
435
1903
  };
1904
+ var style = (str, ...colors) => colors.reduce(colorize, str);
436
1905
  var styleEachChar = (str, ...colors) => {
437
1906
  const chars = [...(0, import_strip_ansi.default)(str)];
438
- const out = chars.reduce((prev, current) => {
439
- const coded = colors.reduce((input, color) => {
440
- return colorLib[color](input);
441
- }, current);
442
- return prev + coded;
1907
+ return chars.reduce((result, char) => {
1908
+ return result + colors.reduce(colorize, char);
443
1909
  }, "");
444
- return out;
445
1910
  };
446
1911
  var resetStyle = function(str) {
447
1912
  this.configure({ reset: true });
@@ -464,9 +1929,7 @@ var TtyTable = (() => {
464
1929
  }
465
1930
  return str;
466
1931
  };
467
- var isColorEnabled = () => {
468
- return process && process.stdout ? colorLib.level > 0 : colorLib.enabled;
469
- };
1932
+ var isColorEnabled = () => colorLib.level > 0;
470
1933
 
471
1934
  // node_modules/smartwrap/dist/esm/main.js
472
1935
  var import_strip_ansi2 = __toESM(require_strip_ansi(), 1);
@@ -1060,9 +2523,9 @@ var TtyTable = (() => {
1060
2523
  // adapter called: i.e. `require('tty-table')('automattic-cli-table')`
1061
2524
  case (paramsArr.length === 1 && typeof paramsArr[0] === "string"): {
1062
2525
  const adapters = {
1063
- "automattic-cli-table": () => require_stub(),
1064
- "default-adapter": () => require_stub(),
1065
- "terminal-adapter": () => require_stub()
2526
+ "automattic-cli-table": () => require_adapter(),
2527
+ "default-adapter": () => require_adapter(),
2528
+ "terminal-adapter": () => require_adapter()
1066
2529
  };
1067
2530
  const load = adapters[paramsArr[0]];
1068
2531
  if (!load) throw new Error(`Unknown adapter: "${paramsArr[0]}". Available adapters: ${Object.keys(adapters).join(", ")}`);