merge-tsconfigs 0.0.2

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/index.js ADDED
@@ -0,0 +1,2910 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined")
11
+ return require.apply(this, arguments);
12
+ throw new Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+
30
+ // node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
31
+ var require_color_name = __commonJS({
32
+ "node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module) {
33
+ "use strict";
34
+ module.exports = {
35
+ "aliceblue": [240, 248, 255],
36
+ "antiquewhite": [250, 235, 215],
37
+ "aqua": [0, 255, 255],
38
+ "aquamarine": [127, 255, 212],
39
+ "azure": [240, 255, 255],
40
+ "beige": [245, 245, 220],
41
+ "bisque": [255, 228, 196],
42
+ "black": [0, 0, 0],
43
+ "blanchedalmond": [255, 235, 205],
44
+ "blue": [0, 0, 255],
45
+ "blueviolet": [138, 43, 226],
46
+ "brown": [165, 42, 42],
47
+ "burlywood": [222, 184, 135],
48
+ "cadetblue": [95, 158, 160],
49
+ "chartreuse": [127, 255, 0],
50
+ "chocolate": [210, 105, 30],
51
+ "coral": [255, 127, 80],
52
+ "cornflowerblue": [100, 149, 237],
53
+ "cornsilk": [255, 248, 220],
54
+ "crimson": [220, 20, 60],
55
+ "cyan": [0, 255, 255],
56
+ "darkblue": [0, 0, 139],
57
+ "darkcyan": [0, 139, 139],
58
+ "darkgoldenrod": [184, 134, 11],
59
+ "darkgray": [169, 169, 169],
60
+ "darkgreen": [0, 100, 0],
61
+ "darkgrey": [169, 169, 169],
62
+ "darkkhaki": [189, 183, 107],
63
+ "darkmagenta": [139, 0, 139],
64
+ "darkolivegreen": [85, 107, 47],
65
+ "darkorange": [255, 140, 0],
66
+ "darkorchid": [153, 50, 204],
67
+ "darkred": [139, 0, 0],
68
+ "darksalmon": [233, 150, 122],
69
+ "darkseagreen": [143, 188, 143],
70
+ "darkslateblue": [72, 61, 139],
71
+ "darkslategray": [47, 79, 79],
72
+ "darkslategrey": [47, 79, 79],
73
+ "darkturquoise": [0, 206, 209],
74
+ "darkviolet": [148, 0, 211],
75
+ "deeppink": [255, 20, 147],
76
+ "deepskyblue": [0, 191, 255],
77
+ "dimgray": [105, 105, 105],
78
+ "dimgrey": [105, 105, 105],
79
+ "dodgerblue": [30, 144, 255],
80
+ "firebrick": [178, 34, 34],
81
+ "floralwhite": [255, 250, 240],
82
+ "forestgreen": [34, 139, 34],
83
+ "fuchsia": [255, 0, 255],
84
+ "gainsboro": [220, 220, 220],
85
+ "ghostwhite": [248, 248, 255],
86
+ "gold": [255, 215, 0],
87
+ "goldenrod": [218, 165, 32],
88
+ "gray": [128, 128, 128],
89
+ "green": [0, 128, 0],
90
+ "greenyellow": [173, 255, 47],
91
+ "grey": [128, 128, 128],
92
+ "honeydew": [240, 255, 240],
93
+ "hotpink": [255, 105, 180],
94
+ "indianred": [205, 92, 92],
95
+ "indigo": [75, 0, 130],
96
+ "ivory": [255, 255, 240],
97
+ "khaki": [240, 230, 140],
98
+ "lavender": [230, 230, 250],
99
+ "lavenderblush": [255, 240, 245],
100
+ "lawngreen": [124, 252, 0],
101
+ "lemonchiffon": [255, 250, 205],
102
+ "lightblue": [173, 216, 230],
103
+ "lightcoral": [240, 128, 128],
104
+ "lightcyan": [224, 255, 255],
105
+ "lightgoldenrodyellow": [250, 250, 210],
106
+ "lightgray": [211, 211, 211],
107
+ "lightgreen": [144, 238, 144],
108
+ "lightgrey": [211, 211, 211],
109
+ "lightpink": [255, 182, 193],
110
+ "lightsalmon": [255, 160, 122],
111
+ "lightseagreen": [32, 178, 170],
112
+ "lightskyblue": [135, 206, 250],
113
+ "lightslategray": [119, 136, 153],
114
+ "lightslategrey": [119, 136, 153],
115
+ "lightsteelblue": [176, 196, 222],
116
+ "lightyellow": [255, 255, 224],
117
+ "lime": [0, 255, 0],
118
+ "limegreen": [50, 205, 50],
119
+ "linen": [250, 240, 230],
120
+ "magenta": [255, 0, 255],
121
+ "maroon": [128, 0, 0],
122
+ "mediumaquamarine": [102, 205, 170],
123
+ "mediumblue": [0, 0, 205],
124
+ "mediumorchid": [186, 85, 211],
125
+ "mediumpurple": [147, 112, 219],
126
+ "mediumseagreen": [60, 179, 113],
127
+ "mediumslateblue": [123, 104, 238],
128
+ "mediumspringgreen": [0, 250, 154],
129
+ "mediumturquoise": [72, 209, 204],
130
+ "mediumvioletred": [199, 21, 133],
131
+ "midnightblue": [25, 25, 112],
132
+ "mintcream": [245, 255, 250],
133
+ "mistyrose": [255, 228, 225],
134
+ "moccasin": [255, 228, 181],
135
+ "navajowhite": [255, 222, 173],
136
+ "navy": [0, 0, 128],
137
+ "oldlace": [253, 245, 230],
138
+ "olive": [128, 128, 0],
139
+ "olivedrab": [107, 142, 35],
140
+ "orange": [255, 165, 0],
141
+ "orangered": [255, 69, 0],
142
+ "orchid": [218, 112, 214],
143
+ "palegoldenrod": [238, 232, 170],
144
+ "palegreen": [152, 251, 152],
145
+ "paleturquoise": [175, 238, 238],
146
+ "palevioletred": [219, 112, 147],
147
+ "papayawhip": [255, 239, 213],
148
+ "peachpuff": [255, 218, 185],
149
+ "peru": [205, 133, 63],
150
+ "pink": [255, 192, 203],
151
+ "plum": [221, 160, 221],
152
+ "powderblue": [176, 224, 230],
153
+ "purple": [128, 0, 128],
154
+ "rebeccapurple": [102, 51, 153],
155
+ "red": [255, 0, 0],
156
+ "rosybrown": [188, 143, 143],
157
+ "royalblue": [65, 105, 225],
158
+ "saddlebrown": [139, 69, 19],
159
+ "salmon": [250, 128, 114],
160
+ "sandybrown": [244, 164, 96],
161
+ "seagreen": [46, 139, 87],
162
+ "seashell": [255, 245, 238],
163
+ "sienna": [160, 82, 45],
164
+ "silver": [192, 192, 192],
165
+ "skyblue": [135, 206, 235],
166
+ "slateblue": [106, 90, 205],
167
+ "slategray": [112, 128, 144],
168
+ "slategrey": [112, 128, 144],
169
+ "snow": [255, 250, 250],
170
+ "springgreen": [0, 255, 127],
171
+ "steelblue": [70, 130, 180],
172
+ "tan": [210, 180, 140],
173
+ "teal": [0, 128, 128],
174
+ "thistle": [216, 191, 216],
175
+ "tomato": [255, 99, 71],
176
+ "turquoise": [64, 224, 208],
177
+ "violet": [238, 130, 238],
178
+ "wheat": [245, 222, 179],
179
+ "white": [255, 255, 255],
180
+ "whitesmoke": [245, 245, 245],
181
+ "yellow": [255, 255, 0],
182
+ "yellowgreen": [154, 205, 50]
183
+ };
184
+ }
185
+ });
186
+
187
+ // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
188
+ var require_conversions = __commonJS({
189
+ "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports, module) {
190
+ var cssKeywords = require_color_name();
191
+ var reverseKeywords = {};
192
+ for (const key of Object.keys(cssKeywords)) {
193
+ reverseKeywords[cssKeywords[key]] = key;
194
+ }
195
+ var convert = {
196
+ rgb: { channels: 3, labels: "rgb" },
197
+ hsl: { channels: 3, labels: "hsl" },
198
+ hsv: { channels: 3, labels: "hsv" },
199
+ hwb: { channels: 3, labels: "hwb" },
200
+ cmyk: { channels: 4, labels: "cmyk" },
201
+ xyz: { channels: 3, labels: "xyz" },
202
+ lab: { channels: 3, labels: "lab" },
203
+ lch: { channels: 3, labels: "lch" },
204
+ hex: { channels: 1, labels: ["hex"] },
205
+ keyword: { channels: 1, labels: ["keyword"] },
206
+ ansi16: { channels: 1, labels: ["ansi16"] },
207
+ ansi256: { channels: 1, labels: ["ansi256"] },
208
+ hcg: { channels: 3, labels: ["h", "c", "g"] },
209
+ apple: { channels: 3, labels: ["r16", "g16", "b16"] },
210
+ gray: { channels: 1, labels: ["gray"] }
211
+ };
212
+ module.exports = convert;
213
+ for (const model of Object.keys(convert)) {
214
+ if (!("channels" in convert[model])) {
215
+ throw new Error("missing channels property: " + model);
216
+ }
217
+ if (!("labels" in convert[model])) {
218
+ throw new Error("missing channel labels property: " + model);
219
+ }
220
+ if (convert[model].labels.length !== convert[model].channels) {
221
+ throw new Error("channel and label counts mismatch: " + model);
222
+ }
223
+ const { channels, labels } = convert[model];
224
+ delete convert[model].channels;
225
+ delete convert[model].labels;
226
+ Object.defineProperty(convert[model], "channels", { value: channels });
227
+ Object.defineProperty(convert[model], "labels", { value: labels });
228
+ }
229
+ convert.rgb.hsl = function(rgb) {
230
+ const r = rgb[0] / 255;
231
+ const g = rgb[1] / 255;
232
+ const b = rgb[2] / 255;
233
+ const min = Math.min(r, g, b);
234
+ const max = Math.max(r, g, b);
235
+ const delta = max - min;
236
+ let h;
237
+ let s;
238
+ if (max === min) {
239
+ h = 0;
240
+ } else if (r === max) {
241
+ h = (g - b) / delta;
242
+ } else if (g === max) {
243
+ h = 2 + (b - r) / delta;
244
+ } else if (b === max) {
245
+ h = 4 + (r - g) / delta;
246
+ }
247
+ h = Math.min(h * 60, 360);
248
+ if (h < 0) {
249
+ h += 360;
250
+ }
251
+ const l = (min + max) / 2;
252
+ if (max === min) {
253
+ s = 0;
254
+ } else if (l <= 0.5) {
255
+ s = delta / (max + min);
256
+ } else {
257
+ s = delta / (2 - max - min);
258
+ }
259
+ return [h, s * 100, l * 100];
260
+ };
261
+ convert.rgb.hsv = function(rgb) {
262
+ let rdif;
263
+ let gdif;
264
+ let bdif;
265
+ let h;
266
+ let s;
267
+ const r = rgb[0] / 255;
268
+ const g = rgb[1] / 255;
269
+ const b = rgb[2] / 255;
270
+ const v = Math.max(r, g, b);
271
+ const diff = v - Math.min(r, g, b);
272
+ const diffc = function(c) {
273
+ return (v - c) / 6 / diff + 1 / 2;
274
+ };
275
+ if (diff === 0) {
276
+ h = 0;
277
+ s = 0;
278
+ } else {
279
+ s = diff / v;
280
+ rdif = diffc(r);
281
+ gdif = diffc(g);
282
+ bdif = diffc(b);
283
+ if (r === v) {
284
+ h = bdif - gdif;
285
+ } else if (g === v) {
286
+ h = 1 / 3 + rdif - bdif;
287
+ } else if (b === v) {
288
+ h = 2 / 3 + gdif - rdif;
289
+ }
290
+ if (h < 0) {
291
+ h += 1;
292
+ } else if (h > 1) {
293
+ h -= 1;
294
+ }
295
+ }
296
+ return [
297
+ h * 360,
298
+ s * 100,
299
+ v * 100
300
+ ];
301
+ };
302
+ convert.rgb.hwb = function(rgb) {
303
+ const r = rgb[0];
304
+ const g = rgb[1];
305
+ let b = rgb[2];
306
+ const h = convert.rgb.hsl(rgb)[0];
307
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
308
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
309
+ return [h, w * 100, b * 100];
310
+ };
311
+ convert.rgb.cmyk = function(rgb) {
312
+ const r = rgb[0] / 255;
313
+ const g = rgb[1] / 255;
314
+ const b = rgb[2] / 255;
315
+ const k = Math.min(1 - r, 1 - g, 1 - b);
316
+ const c = (1 - r - k) / (1 - k) || 0;
317
+ const m = (1 - g - k) / (1 - k) || 0;
318
+ const y = (1 - b - k) / (1 - k) || 0;
319
+ return [c * 100, m * 100, y * 100, k * 100];
320
+ };
321
+ function comparativeDistance(x, y) {
322
+ return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
323
+ }
324
+ convert.rgb.keyword = function(rgb) {
325
+ const reversed = reverseKeywords[rgb];
326
+ if (reversed) {
327
+ return reversed;
328
+ }
329
+ let currentClosestDistance = Infinity;
330
+ let currentClosestKeyword;
331
+ for (const keyword of Object.keys(cssKeywords)) {
332
+ const value = cssKeywords[keyword];
333
+ const distance = comparativeDistance(rgb, value);
334
+ if (distance < currentClosestDistance) {
335
+ currentClosestDistance = distance;
336
+ currentClosestKeyword = keyword;
337
+ }
338
+ }
339
+ return currentClosestKeyword;
340
+ };
341
+ convert.keyword.rgb = function(keyword) {
342
+ return cssKeywords[keyword];
343
+ };
344
+ convert.rgb.xyz = function(rgb) {
345
+ let r = rgb[0] / 255;
346
+ let g = rgb[1] / 255;
347
+ let b = rgb[2] / 255;
348
+ r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
349
+ g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
350
+ b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
351
+ const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
352
+ const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
353
+ const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
354
+ return [x * 100, y * 100, z * 100];
355
+ };
356
+ convert.rgb.lab = function(rgb) {
357
+ const xyz = convert.rgb.xyz(rgb);
358
+ let x = xyz[0];
359
+ let y = xyz[1];
360
+ let z = xyz[2];
361
+ x /= 95.047;
362
+ y /= 100;
363
+ z /= 108.883;
364
+ x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
365
+ y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
366
+ z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
367
+ const l = 116 * y - 16;
368
+ const a = 500 * (x - y);
369
+ const b = 200 * (y - z);
370
+ return [l, a, b];
371
+ };
372
+ convert.hsl.rgb = function(hsl) {
373
+ const h = hsl[0] / 360;
374
+ const s = hsl[1] / 100;
375
+ const l = hsl[2] / 100;
376
+ let t2;
377
+ let t3;
378
+ let val;
379
+ if (s === 0) {
380
+ val = l * 255;
381
+ return [val, val, val];
382
+ }
383
+ if (l < 0.5) {
384
+ t2 = l * (1 + s);
385
+ } else {
386
+ t2 = l + s - l * s;
387
+ }
388
+ const t1 = 2 * l - t2;
389
+ const rgb = [0, 0, 0];
390
+ for (let i = 0; i < 3; i++) {
391
+ t3 = h + 1 / 3 * -(i - 1);
392
+ if (t3 < 0) {
393
+ t3++;
394
+ }
395
+ if (t3 > 1) {
396
+ t3--;
397
+ }
398
+ if (6 * t3 < 1) {
399
+ val = t1 + (t2 - t1) * 6 * t3;
400
+ } else if (2 * t3 < 1) {
401
+ val = t2;
402
+ } else if (3 * t3 < 2) {
403
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
404
+ } else {
405
+ val = t1;
406
+ }
407
+ rgb[i] = val * 255;
408
+ }
409
+ return rgb;
410
+ };
411
+ convert.hsl.hsv = function(hsl) {
412
+ const h = hsl[0];
413
+ let s = hsl[1] / 100;
414
+ let l = hsl[2] / 100;
415
+ let smin = s;
416
+ const lmin = Math.max(l, 0.01);
417
+ l *= 2;
418
+ s *= l <= 1 ? l : 2 - l;
419
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
420
+ const v = (l + s) / 2;
421
+ const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
422
+ return [h, sv * 100, v * 100];
423
+ };
424
+ convert.hsv.rgb = function(hsv) {
425
+ const h = hsv[0] / 60;
426
+ const s = hsv[1] / 100;
427
+ let v = hsv[2] / 100;
428
+ const hi = Math.floor(h) % 6;
429
+ const f = h - Math.floor(h);
430
+ const p = 255 * v * (1 - s);
431
+ const q = 255 * v * (1 - s * f);
432
+ const t = 255 * v * (1 - s * (1 - f));
433
+ v *= 255;
434
+ switch (hi) {
435
+ case 0:
436
+ return [v, t, p];
437
+ case 1:
438
+ return [q, v, p];
439
+ case 2:
440
+ return [p, v, t];
441
+ case 3:
442
+ return [p, q, v];
443
+ case 4:
444
+ return [t, p, v];
445
+ case 5:
446
+ return [v, p, q];
447
+ }
448
+ };
449
+ convert.hsv.hsl = function(hsv) {
450
+ const h = hsv[0];
451
+ const s = hsv[1] / 100;
452
+ const v = hsv[2] / 100;
453
+ const vmin = Math.max(v, 0.01);
454
+ let sl;
455
+ let l;
456
+ l = (2 - s) * v;
457
+ const lmin = (2 - s) * vmin;
458
+ sl = s * vmin;
459
+ sl /= lmin <= 1 ? lmin : 2 - lmin;
460
+ sl = sl || 0;
461
+ l /= 2;
462
+ return [h, sl * 100, l * 100];
463
+ };
464
+ convert.hwb.rgb = function(hwb) {
465
+ const h = hwb[0] / 360;
466
+ let wh = hwb[1] / 100;
467
+ let bl = hwb[2] / 100;
468
+ const ratio = wh + bl;
469
+ let f;
470
+ if (ratio > 1) {
471
+ wh /= ratio;
472
+ bl /= ratio;
473
+ }
474
+ const i = Math.floor(6 * h);
475
+ const v = 1 - bl;
476
+ f = 6 * h - i;
477
+ if ((i & 1) !== 0) {
478
+ f = 1 - f;
479
+ }
480
+ const n = wh + f * (v - wh);
481
+ let r;
482
+ let g;
483
+ let b;
484
+ switch (i) {
485
+ default:
486
+ case 6:
487
+ case 0:
488
+ r = v;
489
+ g = n;
490
+ b = wh;
491
+ break;
492
+ case 1:
493
+ r = n;
494
+ g = v;
495
+ b = wh;
496
+ break;
497
+ case 2:
498
+ r = wh;
499
+ g = v;
500
+ b = n;
501
+ break;
502
+ case 3:
503
+ r = wh;
504
+ g = n;
505
+ b = v;
506
+ break;
507
+ case 4:
508
+ r = n;
509
+ g = wh;
510
+ b = v;
511
+ break;
512
+ case 5:
513
+ r = v;
514
+ g = wh;
515
+ b = n;
516
+ break;
517
+ }
518
+ return [r * 255, g * 255, b * 255];
519
+ };
520
+ convert.cmyk.rgb = function(cmyk) {
521
+ const c = cmyk[0] / 100;
522
+ const m = cmyk[1] / 100;
523
+ const y = cmyk[2] / 100;
524
+ const k = cmyk[3] / 100;
525
+ const r = 1 - Math.min(1, c * (1 - k) + k);
526
+ const g = 1 - Math.min(1, m * (1 - k) + k);
527
+ const b = 1 - Math.min(1, y * (1 - k) + k);
528
+ return [r * 255, g * 255, b * 255];
529
+ };
530
+ convert.xyz.rgb = function(xyz) {
531
+ const x = xyz[0] / 100;
532
+ const y = xyz[1] / 100;
533
+ const z = xyz[2] / 100;
534
+ let r;
535
+ let g;
536
+ let b;
537
+ r = x * 3.2406 + y * -1.5372 + z * -0.4986;
538
+ g = x * -0.9689 + y * 1.8758 + z * 0.0415;
539
+ b = x * 0.0557 + y * -0.204 + z * 1.057;
540
+ r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
541
+ g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
542
+ b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
543
+ r = Math.min(Math.max(0, r), 1);
544
+ g = Math.min(Math.max(0, g), 1);
545
+ b = Math.min(Math.max(0, b), 1);
546
+ return [r * 255, g * 255, b * 255];
547
+ };
548
+ convert.xyz.lab = function(xyz) {
549
+ let x = xyz[0];
550
+ let y = xyz[1];
551
+ let z = xyz[2];
552
+ x /= 95.047;
553
+ y /= 100;
554
+ z /= 108.883;
555
+ x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
556
+ y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
557
+ z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
558
+ const l = 116 * y - 16;
559
+ const a = 500 * (x - y);
560
+ const b = 200 * (y - z);
561
+ return [l, a, b];
562
+ };
563
+ convert.lab.xyz = function(lab) {
564
+ const l = lab[0];
565
+ const a = lab[1];
566
+ const b = lab[2];
567
+ let x;
568
+ let y;
569
+ let z;
570
+ y = (l + 16) / 116;
571
+ x = a / 500 + y;
572
+ z = y - b / 200;
573
+ const y2 = y ** 3;
574
+ const x2 = x ** 3;
575
+ const z2 = z ** 3;
576
+ y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
577
+ x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
578
+ z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
579
+ x *= 95.047;
580
+ y *= 100;
581
+ z *= 108.883;
582
+ return [x, y, z];
583
+ };
584
+ convert.lab.lch = function(lab) {
585
+ const l = lab[0];
586
+ const a = lab[1];
587
+ const b = lab[2];
588
+ let h;
589
+ const hr = Math.atan2(b, a);
590
+ h = hr * 360 / 2 / Math.PI;
591
+ if (h < 0) {
592
+ h += 360;
593
+ }
594
+ const c = Math.sqrt(a * a + b * b);
595
+ return [l, c, h];
596
+ };
597
+ convert.lch.lab = function(lch) {
598
+ const l = lch[0];
599
+ const c = lch[1];
600
+ const h = lch[2];
601
+ const hr = h / 360 * 2 * Math.PI;
602
+ const a = c * Math.cos(hr);
603
+ const b = c * Math.sin(hr);
604
+ return [l, a, b];
605
+ };
606
+ convert.rgb.ansi16 = function(args, saturation = null) {
607
+ const [r, g, b] = args;
608
+ let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
609
+ value = Math.round(value / 50);
610
+ if (value === 0) {
611
+ return 30;
612
+ }
613
+ let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
614
+ if (value === 2) {
615
+ ansi += 60;
616
+ }
617
+ return ansi;
618
+ };
619
+ convert.hsv.ansi16 = function(args) {
620
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
621
+ };
622
+ convert.rgb.ansi256 = function(args) {
623
+ const r = args[0];
624
+ const g = args[1];
625
+ const b = args[2];
626
+ if (r === g && g === b) {
627
+ if (r < 8) {
628
+ return 16;
629
+ }
630
+ if (r > 248) {
631
+ return 231;
632
+ }
633
+ return Math.round((r - 8) / 247 * 24) + 232;
634
+ }
635
+ const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
636
+ return ansi;
637
+ };
638
+ convert.ansi16.rgb = function(args) {
639
+ let color = args % 10;
640
+ if (color === 0 || color === 7) {
641
+ if (args > 50) {
642
+ color += 3.5;
643
+ }
644
+ color = color / 10.5 * 255;
645
+ return [color, color, color];
646
+ }
647
+ const mult = (~~(args > 50) + 1) * 0.5;
648
+ const r = (color & 1) * mult * 255;
649
+ const g = (color >> 1 & 1) * mult * 255;
650
+ const b = (color >> 2 & 1) * mult * 255;
651
+ return [r, g, b];
652
+ };
653
+ convert.ansi256.rgb = function(args) {
654
+ if (args >= 232) {
655
+ const c = (args - 232) * 10 + 8;
656
+ return [c, c, c];
657
+ }
658
+ args -= 16;
659
+ let rem;
660
+ const r = Math.floor(args / 36) / 5 * 255;
661
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
662
+ const b = rem % 6 / 5 * 255;
663
+ return [r, g, b];
664
+ };
665
+ convert.rgb.hex = function(args) {
666
+ const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
667
+ const string = integer.toString(16).toUpperCase();
668
+ return "000000".substring(string.length) + string;
669
+ };
670
+ convert.hex.rgb = function(args) {
671
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
672
+ if (!match) {
673
+ return [0, 0, 0];
674
+ }
675
+ let colorString = match[0];
676
+ if (match[0].length === 3) {
677
+ colorString = colorString.split("").map((char) => {
678
+ return char + char;
679
+ }).join("");
680
+ }
681
+ const integer = parseInt(colorString, 16);
682
+ const r = integer >> 16 & 255;
683
+ const g = integer >> 8 & 255;
684
+ const b = integer & 255;
685
+ return [r, g, b];
686
+ };
687
+ convert.rgb.hcg = function(rgb) {
688
+ const r = rgb[0] / 255;
689
+ const g = rgb[1] / 255;
690
+ const b = rgb[2] / 255;
691
+ const max = Math.max(Math.max(r, g), b);
692
+ const min = Math.min(Math.min(r, g), b);
693
+ const chroma = max - min;
694
+ let grayscale;
695
+ let hue;
696
+ if (chroma < 1) {
697
+ grayscale = min / (1 - chroma);
698
+ } else {
699
+ grayscale = 0;
700
+ }
701
+ if (chroma <= 0) {
702
+ hue = 0;
703
+ } else if (max === r) {
704
+ hue = (g - b) / chroma % 6;
705
+ } else if (max === g) {
706
+ hue = 2 + (b - r) / chroma;
707
+ } else {
708
+ hue = 4 + (r - g) / chroma;
709
+ }
710
+ hue /= 6;
711
+ hue %= 1;
712
+ return [hue * 360, chroma * 100, grayscale * 100];
713
+ };
714
+ convert.hsl.hcg = function(hsl) {
715
+ const s = hsl[1] / 100;
716
+ const l = hsl[2] / 100;
717
+ const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
718
+ let f = 0;
719
+ if (c < 1) {
720
+ f = (l - 0.5 * c) / (1 - c);
721
+ }
722
+ return [hsl[0], c * 100, f * 100];
723
+ };
724
+ convert.hsv.hcg = function(hsv) {
725
+ const s = hsv[1] / 100;
726
+ const v = hsv[2] / 100;
727
+ const c = s * v;
728
+ let f = 0;
729
+ if (c < 1) {
730
+ f = (v - c) / (1 - c);
731
+ }
732
+ return [hsv[0], c * 100, f * 100];
733
+ };
734
+ convert.hcg.rgb = function(hcg) {
735
+ const h = hcg[0] / 360;
736
+ const c = hcg[1] / 100;
737
+ const g = hcg[2] / 100;
738
+ if (c === 0) {
739
+ return [g * 255, g * 255, g * 255];
740
+ }
741
+ const pure = [0, 0, 0];
742
+ const hi = h % 1 * 6;
743
+ const v = hi % 1;
744
+ const w = 1 - v;
745
+ let mg = 0;
746
+ switch (Math.floor(hi)) {
747
+ case 0:
748
+ pure[0] = 1;
749
+ pure[1] = v;
750
+ pure[2] = 0;
751
+ break;
752
+ case 1:
753
+ pure[0] = w;
754
+ pure[1] = 1;
755
+ pure[2] = 0;
756
+ break;
757
+ case 2:
758
+ pure[0] = 0;
759
+ pure[1] = 1;
760
+ pure[2] = v;
761
+ break;
762
+ case 3:
763
+ pure[0] = 0;
764
+ pure[1] = w;
765
+ pure[2] = 1;
766
+ break;
767
+ case 4:
768
+ pure[0] = v;
769
+ pure[1] = 0;
770
+ pure[2] = 1;
771
+ break;
772
+ default:
773
+ pure[0] = 1;
774
+ pure[1] = 0;
775
+ pure[2] = w;
776
+ }
777
+ mg = (1 - c) * g;
778
+ return [
779
+ (c * pure[0] + mg) * 255,
780
+ (c * pure[1] + mg) * 255,
781
+ (c * pure[2] + mg) * 255
782
+ ];
783
+ };
784
+ convert.hcg.hsv = function(hcg) {
785
+ const c = hcg[1] / 100;
786
+ const g = hcg[2] / 100;
787
+ const v = c + g * (1 - c);
788
+ let f = 0;
789
+ if (v > 0) {
790
+ f = c / v;
791
+ }
792
+ return [hcg[0], f * 100, v * 100];
793
+ };
794
+ convert.hcg.hsl = function(hcg) {
795
+ const c = hcg[1] / 100;
796
+ const g = hcg[2] / 100;
797
+ const l = g * (1 - c) + 0.5 * c;
798
+ let s = 0;
799
+ if (l > 0 && l < 0.5) {
800
+ s = c / (2 * l);
801
+ } else if (l >= 0.5 && l < 1) {
802
+ s = c / (2 * (1 - l));
803
+ }
804
+ return [hcg[0], s * 100, l * 100];
805
+ };
806
+ convert.hcg.hwb = function(hcg) {
807
+ const c = hcg[1] / 100;
808
+ const g = hcg[2] / 100;
809
+ const v = c + g * (1 - c);
810
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
811
+ };
812
+ convert.hwb.hcg = function(hwb) {
813
+ const w = hwb[1] / 100;
814
+ const b = hwb[2] / 100;
815
+ const v = 1 - b;
816
+ const c = v - w;
817
+ let g = 0;
818
+ if (c < 1) {
819
+ g = (v - c) / (1 - c);
820
+ }
821
+ return [hwb[0], c * 100, g * 100];
822
+ };
823
+ convert.apple.rgb = function(apple) {
824
+ return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
825
+ };
826
+ convert.rgb.apple = function(rgb) {
827
+ return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
828
+ };
829
+ convert.gray.rgb = function(args) {
830
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
831
+ };
832
+ convert.gray.hsl = function(args) {
833
+ return [0, 0, args[0]];
834
+ };
835
+ convert.gray.hsv = convert.gray.hsl;
836
+ convert.gray.hwb = function(gray) {
837
+ return [0, 100, gray[0]];
838
+ };
839
+ convert.gray.cmyk = function(gray) {
840
+ return [0, 0, 0, gray[0]];
841
+ };
842
+ convert.gray.lab = function(gray) {
843
+ return [gray[0], 0, 0];
844
+ };
845
+ convert.gray.hex = function(gray) {
846
+ const val = Math.round(gray[0] / 100 * 255) & 255;
847
+ const integer = (val << 16) + (val << 8) + val;
848
+ const string = integer.toString(16).toUpperCase();
849
+ return "000000".substring(string.length) + string;
850
+ };
851
+ convert.rgb.gray = function(rgb) {
852
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
853
+ return [val / 255 * 100];
854
+ };
855
+ }
856
+ });
857
+
858
+ // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
859
+ var require_route = __commonJS({
860
+ "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports, module) {
861
+ var conversions = require_conversions();
862
+ function buildGraph() {
863
+ const graph = {};
864
+ const models = Object.keys(conversions);
865
+ for (let len = models.length, i = 0; i < len; i++) {
866
+ graph[models[i]] = {
867
+ distance: -1,
868
+ parent: null
869
+ };
870
+ }
871
+ return graph;
872
+ }
873
+ function deriveBFS(fromModel) {
874
+ const graph = buildGraph();
875
+ const queue = [fromModel];
876
+ graph[fromModel].distance = 0;
877
+ while (queue.length) {
878
+ const current = queue.pop();
879
+ const adjacents = Object.keys(conversions[current]);
880
+ for (let len = adjacents.length, i = 0; i < len; i++) {
881
+ const adjacent = adjacents[i];
882
+ const node = graph[adjacent];
883
+ if (node.distance === -1) {
884
+ node.distance = graph[current].distance + 1;
885
+ node.parent = current;
886
+ queue.unshift(adjacent);
887
+ }
888
+ }
889
+ }
890
+ return graph;
891
+ }
892
+ function link(from, to) {
893
+ return function(args) {
894
+ return to(from(args));
895
+ };
896
+ }
897
+ function wrapConversion(toModel, graph) {
898
+ const path = [graph[toModel].parent, toModel];
899
+ let fn = conversions[graph[toModel].parent][toModel];
900
+ let cur = graph[toModel].parent;
901
+ while (graph[cur].parent) {
902
+ path.unshift(graph[cur].parent);
903
+ fn = link(conversions[graph[cur].parent][cur], fn);
904
+ cur = graph[cur].parent;
905
+ }
906
+ fn.conversion = path;
907
+ return fn;
908
+ }
909
+ module.exports = function(fromModel) {
910
+ const graph = deriveBFS(fromModel);
911
+ const conversion = {};
912
+ const models = Object.keys(graph);
913
+ for (let len = models.length, i = 0; i < len; i++) {
914
+ const toModel = models[i];
915
+ const node = graph[toModel];
916
+ if (node.parent === null) {
917
+ continue;
918
+ }
919
+ conversion[toModel] = wrapConversion(toModel, graph);
920
+ }
921
+ return conversion;
922
+ };
923
+ }
924
+ });
925
+
926
+ // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
927
+ var require_color_convert = __commonJS({
928
+ "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports, module) {
929
+ var conversions = require_conversions();
930
+ var route = require_route();
931
+ var convert = {};
932
+ var models = Object.keys(conversions);
933
+ function wrapRaw(fn) {
934
+ const wrappedFn = function(...args) {
935
+ const arg0 = args[0];
936
+ if (arg0 === void 0 || arg0 === null) {
937
+ return arg0;
938
+ }
939
+ if (arg0.length > 1) {
940
+ args = arg0;
941
+ }
942
+ return fn(args);
943
+ };
944
+ if ("conversion" in fn) {
945
+ wrappedFn.conversion = fn.conversion;
946
+ }
947
+ return wrappedFn;
948
+ }
949
+ function wrapRounded(fn) {
950
+ const wrappedFn = function(...args) {
951
+ const arg0 = args[0];
952
+ if (arg0 === void 0 || arg0 === null) {
953
+ return arg0;
954
+ }
955
+ if (arg0.length > 1) {
956
+ args = arg0;
957
+ }
958
+ const result = fn(args);
959
+ if (typeof result === "object") {
960
+ for (let len = result.length, i = 0; i < len; i++) {
961
+ result[i] = Math.round(result[i]);
962
+ }
963
+ }
964
+ return result;
965
+ };
966
+ if ("conversion" in fn) {
967
+ wrappedFn.conversion = fn.conversion;
968
+ }
969
+ return wrappedFn;
970
+ }
971
+ models.forEach((fromModel) => {
972
+ convert[fromModel] = {};
973
+ Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
974
+ Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
975
+ const routes = route(fromModel);
976
+ const routeModels = Object.keys(routes);
977
+ routeModels.forEach((toModel) => {
978
+ const fn = routes[toModel];
979
+ convert[fromModel][toModel] = wrapRounded(fn);
980
+ convert[fromModel][toModel].raw = wrapRaw(fn);
981
+ });
982
+ });
983
+ module.exports = convert;
984
+ }
985
+ });
986
+
987
+ // node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js
988
+ var require_ansi_styles = __commonJS({
989
+ "node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports, module) {
990
+ "use strict";
991
+ var wrapAnsi16 = (fn, offset) => (...args) => {
992
+ const code = fn(...args);
993
+ return `\x1B[${code + offset}m`;
994
+ };
995
+ var wrapAnsi256 = (fn, offset) => (...args) => {
996
+ const code = fn(...args);
997
+ return `\x1B[${38 + offset};5;${code}m`;
998
+ };
999
+ var wrapAnsi16m = (fn, offset) => (...args) => {
1000
+ const rgb = fn(...args);
1001
+ return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1002
+ };
1003
+ var ansi2ansi = (n) => n;
1004
+ var rgb2rgb = (r, g, b) => [r, g, b];
1005
+ var setLazyProperty = (object, property, get) => {
1006
+ Object.defineProperty(object, property, {
1007
+ get: () => {
1008
+ const value = get();
1009
+ Object.defineProperty(object, property, {
1010
+ value,
1011
+ enumerable: true,
1012
+ configurable: true
1013
+ });
1014
+ return value;
1015
+ },
1016
+ enumerable: true,
1017
+ configurable: true
1018
+ });
1019
+ };
1020
+ var colorConvert;
1021
+ var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1022
+ if (colorConvert === void 0) {
1023
+ colorConvert = require_color_convert();
1024
+ }
1025
+ const offset = isBackground ? 10 : 0;
1026
+ const styles = {};
1027
+ for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1028
+ const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1029
+ if (sourceSpace === targetSpace) {
1030
+ styles[name] = wrap(identity, offset);
1031
+ } else if (typeof suite === "object") {
1032
+ styles[name] = wrap(suite[targetSpace], offset);
1033
+ }
1034
+ }
1035
+ return styles;
1036
+ };
1037
+ function assembleStyles() {
1038
+ const codes = /* @__PURE__ */ new Map();
1039
+ const styles = {
1040
+ modifier: {
1041
+ reset: [0, 0],
1042
+ bold: [1, 22],
1043
+ dim: [2, 22],
1044
+ italic: [3, 23],
1045
+ underline: [4, 24],
1046
+ inverse: [7, 27],
1047
+ hidden: [8, 28],
1048
+ strikethrough: [9, 29]
1049
+ },
1050
+ color: {
1051
+ black: [30, 39],
1052
+ red: [31, 39],
1053
+ green: [32, 39],
1054
+ yellow: [33, 39],
1055
+ blue: [34, 39],
1056
+ magenta: [35, 39],
1057
+ cyan: [36, 39],
1058
+ white: [37, 39],
1059
+ blackBright: [90, 39],
1060
+ redBright: [91, 39],
1061
+ greenBright: [92, 39],
1062
+ yellowBright: [93, 39],
1063
+ blueBright: [94, 39],
1064
+ magentaBright: [95, 39],
1065
+ cyanBright: [96, 39],
1066
+ whiteBright: [97, 39]
1067
+ },
1068
+ bgColor: {
1069
+ bgBlack: [40, 49],
1070
+ bgRed: [41, 49],
1071
+ bgGreen: [42, 49],
1072
+ bgYellow: [43, 49],
1073
+ bgBlue: [44, 49],
1074
+ bgMagenta: [45, 49],
1075
+ bgCyan: [46, 49],
1076
+ bgWhite: [47, 49],
1077
+ bgBlackBright: [100, 49],
1078
+ bgRedBright: [101, 49],
1079
+ bgGreenBright: [102, 49],
1080
+ bgYellowBright: [103, 49],
1081
+ bgBlueBright: [104, 49],
1082
+ bgMagentaBright: [105, 49],
1083
+ bgCyanBright: [106, 49],
1084
+ bgWhiteBright: [107, 49]
1085
+ }
1086
+ };
1087
+ styles.color.gray = styles.color.blackBright;
1088
+ styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1089
+ styles.color.grey = styles.color.blackBright;
1090
+ styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1091
+ for (const [groupName, group] of Object.entries(styles)) {
1092
+ for (const [styleName, style] of Object.entries(group)) {
1093
+ styles[styleName] = {
1094
+ open: `\x1B[${style[0]}m`,
1095
+ close: `\x1B[${style[1]}m`
1096
+ };
1097
+ group[styleName] = styles[styleName];
1098
+ codes.set(style[0], style[1]);
1099
+ }
1100
+ Object.defineProperty(styles, groupName, {
1101
+ value: group,
1102
+ enumerable: false
1103
+ });
1104
+ }
1105
+ Object.defineProperty(styles, "codes", {
1106
+ value: codes,
1107
+ enumerable: false
1108
+ });
1109
+ styles.color.close = "\x1B[39m";
1110
+ styles.bgColor.close = "\x1B[49m";
1111
+ setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1112
+ setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1113
+ setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1114
+ setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1115
+ setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1116
+ setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1117
+ return styles;
1118
+ }
1119
+ Object.defineProperty(module, "exports", {
1120
+ enumerable: true,
1121
+ get: assembleStyles
1122
+ });
1123
+ }
1124
+ });
1125
+
1126
+ // node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
1127
+ var require_has_flag = __commonJS({
1128
+ "node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
1129
+ "use strict";
1130
+ module.exports = (flag, argv = process.argv) => {
1131
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
1132
+ const position = argv.indexOf(prefix + flag);
1133
+ const terminatorPosition = argv.indexOf("--");
1134
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1135
+ };
1136
+ }
1137
+ });
1138
+
1139
+ // node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
1140
+ var require_supports_color = __commonJS({
1141
+ "node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
1142
+ "use strict";
1143
+ var os = __require("os");
1144
+ var tty = __require("tty");
1145
+ var hasFlag = require_has_flag();
1146
+ var { env } = process;
1147
+ var forceColor;
1148
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
1149
+ forceColor = 0;
1150
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
1151
+ forceColor = 1;
1152
+ }
1153
+ if ("FORCE_COLOR" in env) {
1154
+ if (env.FORCE_COLOR === "true") {
1155
+ forceColor = 1;
1156
+ } else if (env.FORCE_COLOR === "false") {
1157
+ forceColor = 0;
1158
+ } else {
1159
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
1160
+ }
1161
+ }
1162
+ function translateLevel(level) {
1163
+ if (level === 0) {
1164
+ return false;
1165
+ }
1166
+ return {
1167
+ level,
1168
+ hasBasic: true,
1169
+ has256: level >= 2,
1170
+ has16m: level >= 3
1171
+ };
1172
+ }
1173
+ function supportsColor(haveStream, streamIsTTY) {
1174
+ if (forceColor === 0) {
1175
+ return 0;
1176
+ }
1177
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
1178
+ return 3;
1179
+ }
1180
+ if (hasFlag("color=256")) {
1181
+ return 2;
1182
+ }
1183
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
1184
+ return 0;
1185
+ }
1186
+ const min = forceColor || 0;
1187
+ if (env.TERM === "dumb") {
1188
+ return min;
1189
+ }
1190
+ if (process.platform === "win32") {
1191
+ const osRelease = os.release().split(".");
1192
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1193
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1194
+ }
1195
+ return 1;
1196
+ }
1197
+ if ("CI" in env) {
1198
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
1199
+ return 1;
1200
+ }
1201
+ return min;
1202
+ }
1203
+ if ("TEAMCITY_VERSION" in env) {
1204
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1205
+ }
1206
+ if (env.COLORTERM === "truecolor") {
1207
+ return 3;
1208
+ }
1209
+ if ("TERM_PROGRAM" in env) {
1210
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1211
+ switch (env.TERM_PROGRAM) {
1212
+ case "iTerm.app":
1213
+ return version >= 3 ? 3 : 2;
1214
+ case "Apple_Terminal":
1215
+ return 2;
1216
+ }
1217
+ }
1218
+ if (/-256(color)?$/i.test(env.TERM)) {
1219
+ return 2;
1220
+ }
1221
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1222
+ return 1;
1223
+ }
1224
+ if ("COLORTERM" in env) {
1225
+ return 1;
1226
+ }
1227
+ return min;
1228
+ }
1229
+ function getSupportLevel(stream) {
1230
+ const level = supportsColor(stream, stream && stream.isTTY);
1231
+ return translateLevel(level);
1232
+ }
1233
+ module.exports = {
1234
+ supportsColor: getSupportLevel,
1235
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1236
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1237
+ };
1238
+ }
1239
+ });
1240
+
1241
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
1242
+ var require_util = __commonJS({
1243
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module) {
1244
+ "use strict";
1245
+ var stringReplaceAll = (string, substring, replacer) => {
1246
+ let index = string.indexOf(substring);
1247
+ if (index === -1) {
1248
+ return string;
1249
+ }
1250
+ const substringLength = substring.length;
1251
+ let endIndex = 0;
1252
+ let returnValue = "";
1253
+ do {
1254
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1255
+ endIndex = index + substringLength;
1256
+ index = string.indexOf(substring, endIndex);
1257
+ } while (index !== -1);
1258
+ returnValue += string.substr(endIndex);
1259
+ return returnValue;
1260
+ };
1261
+ var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1262
+ let endIndex = 0;
1263
+ let returnValue = "";
1264
+ do {
1265
+ const gotCR = string[index - 1] === "\r";
1266
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1267
+ endIndex = index + 1;
1268
+ index = string.indexOf("\n", endIndex);
1269
+ } while (index !== -1);
1270
+ returnValue += string.substr(endIndex);
1271
+ return returnValue;
1272
+ };
1273
+ module.exports = {
1274
+ stringReplaceAll,
1275
+ stringEncaseCRLFWithFirstIndex
1276
+ };
1277
+ }
1278
+ });
1279
+
1280
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
1281
+ var require_templates = __commonJS({
1282
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module) {
1283
+ "use strict";
1284
+ 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;
1285
+ var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
1286
+ var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
1287
+ var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
1288
+ var ESCAPES = /* @__PURE__ */ new Map([
1289
+ ["n", "\n"],
1290
+ ["r", "\r"],
1291
+ ["t", " "],
1292
+ ["b", "\b"],
1293
+ ["f", "\f"],
1294
+ ["v", "\v"],
1295
+ ["0", "\0"],
1296
+ ["\\", "\\"],
1297
+ ["e", "\x1B"],
1298
+ ["a", "\x07"]
1299
+ ]);
1300
+ function unescape(c) {
1301
+ const u = c[0] === "u";
1302
+ const bracket = c[1] === "{";
1303
+ if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
1304
+ return String.fromCharCode(parseInt(c.slice(1), 16));
1305
+ }
1306
+ if (u && bracket) {
1307
+ return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
1308
+ }
1309
+ return ESCAPES.get(c) || c;
1310
+ }
1311
+ function parseArguments(name, arguments_) {
1312
+ const results = [];
1313
+ const chunks = arguments_.trim().split(/\s*,\s*/g);
1314
+ let matches;
1315
+ for (const chunk of chunks) {
1316
+ const number = Number(chunk);
1317
+ if (!Number.isNaN(number)) {
1318
+ results.push(number);
1319
+ } else if (matches = chunk.match(STRING_REGEX)) {
1320
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
1321
+ } else {
1322
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
1323
+ }
1324
+ }
1325
+ return results;
1326
+ }
1327
+ function parseStyle(style) {
1328
+ STYLE_REGEX.lastIndex = 0;
1329
+ const results = [];
1330
+ let matches;
1331
+ while ((matches = STYLE_REGEX.exec(style)) !== null) {
1332
+ const name = matches[1];
1333
+ if (matches[2]) {
1334
+ const args = parseArguments(name, matches[2]);
1335
+ results.push([name].concat(args));
1336
+ } else {
1337
+ results.push([name]);
1338
+ }
1339
+ }
1340
+ return results;
1341
+ }
1342
+ function buildStyle(chalk, styles) {
1343
+ const enabled = {};
1344
+ for (const layer of styles) {
1345
+ for (const style of layer.styles) {
1346
+ enabled[style[0]] = layer.inverse ? null : style.slice(1);
1347
+ }
1348
+ }
1349
+ let current = chalk;
1350
+ for (const [styleName, styles2] of Object.entries(enabled)) {
1351
+ if (!Array.isArray(styles2)) {
1352
+ continue;
1353
+ }
1354
+ if (!(styleName in current)) {
1355
+ throw new Error(`Unknown Chalk style: ${styleName}`);
1356
+ }
1357
+ current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
1358
+ }
1359
+ return current;
1360
+ }
1361
+ module.exports = (chalk, temporary) => {
1362
+ const styles = [];
1363
+ const chunks = [];
1364
+ let chunk = [];
1365
+ temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
1366
+ if (escapeCharacter) {
1367
+ chunk.push(unescape(escapeCharacter));
1368
+ } else if (style) {
1369
+ const string = chunk.join("");
1370
+ chunk = [];
1371
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
1372
+ styles.push({ inverse, styles: parseStyle(style) });
1373
+ } else if (close) {
1374
+ if (styles.length === 0) {
1375
+ throw new Error("Found extraneous } in Chalk template literal");
1376
+ }
1377
+ chunks.push(buildStyle(chalk, styles)(chunk.join("")));
1378
+ chunk = [];
1379
+ styles.pop();
1380
+ } else {
1381
+ chunk.push(character);
1382
+ }
1383
+ });
1384
+ chunks.push(chunk.join(""));
1385
+ if (styles.length > 0) {
1386
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1387
+ throw new Error(errMessage);
1388
+ }
1389
+ return chunks.join("");
1390
+ };
1391
+ }
1392
+ });
1393
+
1394
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
1395
+ var require_source = __commonJS({
1396
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module) {
1397
+ "use strict";
1398
+ var ansiStyles = require_ansi_styles();
1399
+ var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color();
1400
+ var {
1401
+ stringReplaceAll,
1402
+ stringEncaseCRLFWithFirstIndex
1403
+ } = require_util();
1404
+ var { isArray } = Array;
1405
+ var levelMapping = [
1406
+ "ansi",
1407
+ "ansi",
1408
+ "ansi256",
1409
+ "ansi16m"
1410
+ ];
1411
+ var styles = /* @__PURE__ */ Object.create(null);
1412
+ var applyOptions = (object, options = {}) => {
1413
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1414
+ throw new Error("The `level` option should be an integer from 0 to 3");
1415
+ }
1416
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1417
+ object.level = options.level === void 0 ? colorLevel : options.level;
1418
+ };
1419
+ var ChalkClass = class {
1420
+ constructor(options) {
1421
+ return chalkFactory(options);
1422
+ }
1423
+ };
1424
+ var chalkFactory = (options) => {
1425
+ const chalk2 = {};
1426
+ applyOptions(chalk2, options);
1427
+ chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_);
1428
+ Object.setPrototypeOf(chalk2, Chalk.prototype);
1429
+ Object.setPrototypeOf(chalk2.template, chalk2);
1430
+ chalk2.template.constructor = () => {
1431
+ throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
1432
+ };
1433
+ chalk2.template.Instance = ChalkClass;
1434
+ return chalk2.template;
1435
+ };
1436
+ function Chalk(options) {
1437
+ return chalkFactory(options);
1438
+ }
1439
+ for (const [styleName, style] of Object.entries(ansiStyles)) {
1440
+ styles[styleName] = {
1441
+ get() {
1442
+ const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1443
+ Object.defineProperty(this, styleName, { value: builder });
1444
+ return builder;
1445
+ }
1446
+ };
1447
+ }
1448
+ styles.visible = {
1449
+ get() {
1450
+ const builder = createBuilder(this, this._styler, true);
1451
+ Object.defineProperty(this, "visible", { value: builder });
1452
+ return builder;
1453
+ }
1454
+ };
1455
+ var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1456
+ for (const model of usedModels) {
1457
+ styles[model] = {
1458
+ get() {
1459
+ const { level } = this;
1460
+ return function(...arguments_) {
1461
+ const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1462
+ return createBuilder(this, styler, this._isEmpty);
1463
+ };
1464
+ }
1465
+ };
1466
+ }
1467
+ for (const model of usedModels) {
1468
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1469
+ styles[bgModel] = {
1470
+ get() {
1471
+ const { level } = this;
1472
+ return function(...arguments_) {
1473
+ const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
1474
+ return createBuilder(this, styler, this._isEmpty);
1475
+ };
1476
+ }
1477
+ };
1478
+ }
1479
+ var proto = Object.defineProperties(() => {
1480
+ }, {
1481
+ ...styles,
1482
+ level: {
1483
+ enumerable: true,
1484
+ get() {
1485
+ return this._generator.level;
1486
+ },
1487
+ set(level) {
1488
+ this._generator.level = level;
1489
+ }
1490
+ }
1491
+ });
1492
+ var createStyler = (open, close, parent) => {
1493
+ let openAll;
1494
+ let closeAll;
1495
+ if (parent === void 0) {
1496
+ openAll = open;
1497
+ closeAll = close;
1498
+ } else {
1499
+ openAll = parent.openAll + open;
1500
+ closeAll = close + parent.closeAll;
1501
+ }
1502
+ return {
1503
+ open,
1504
+ close,
1505
+ openAll,
1506
+ closeAll,
1507
+ parent
1508
+ };
1509
+ };
1510
+ var createBuilder = (self2, _styler, _isEmpty) => {
1511
+ const builder = (...arguments_) => {
1512
+ if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
1513
+ return applyStyle(builder, chalkTag(builder, ...arguments_));
1514
+ }
1515
+ return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1516
+ };
1517
+ Object.setPrototypeOf(builder, proto);
1518
+ builder._generator = self2;
1519
+ builder._styler = _styler;
1520
+ builder._isEmpty = _isEmpty;
1521
+ return builder;
1522
+ };
1523
+ var applyStyle = (self2, string) => {
1524
+ if (self2.level <= 0 || !string) {
1525
+ return self2._isEmpty ? "" : string;
1526
+ }
1527
+ let styler = self2._styler;
1528
+ if (styler === void 0) {
1529
+ return string;
1530
+ }
1531
+ const { openAll, closeAll } = styler;
1532
+ if (string.indexOf("\x1B") !== -1) {
1533
+ while (styler !== void 0) {
1534
+ string = stringReplaceAll(string, styler.close, styler.open);
1535
+ styler = styler.parent;
1536
+ }
1537
+ }
1538
+ const lfIndex = string.indexOf("\n");
1539
+ if (lfIndex !== -1) {
1540
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1541
+ }
1542
+ return openAll + string + closeAll;
1543
+ };
1544
+ var template;
1545
+ var chalkTag = (chalk2, ...strings) => {
1546
+ const [firstString] = strings;
1547
+ if (!isArray(firstString) || !isArray(firstString.raw)) {
1548
+ return strings.join(" ");
1549
+ }
1550
+ const arguments_ = strings.slice(1);
1551
+ const parts = [firstString.raw[0]];
1552
+ for (let i = 1; i < firstString.length; i++) {
1553
+ parts.push(
1554
+ String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
1555
+ String(firstString.raw[i])
1556
+ );
1557
+ }
1558
+ if (template === void 0) {
1559
+ template = require_templates();
1560
+ }
1561
+ return template(chalk2, parts.join(""));
1562
+ };
1563
+ Object.defineProperties(Chalk.prototype, styles);
1564
+ var chalk = Chalk();
1565
+ chalk.supportsColor = stdoutColor;
1566
+ chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
1567
+ chalk.stderr.supportsColor = stderrColor;
1568
+ module.exports = chalk;
1569
+ }
1570
+ });
1571
+
1572
+ // node_modules/.pnpm/tinycolor2@1.5.2/node_modules/tinycolor2/cjs/tinycolor.js
1573
+ var require_tinycolor = __commonJS({
1574
+ "node_modules/.pnpm/tinycolor2@1.5.2/node_modules/tinycolor2/cjs/tinycolor.js"(exports, module) {
1575
+ (function(global, factory) {
1576
+ typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.tinycolor = factory());
1577
+ })(exports, function() {
1578
+ "use strict";
1579
+ const trimLeft = /^\s+/;
1580
+ const trimRight = /\s+$/;
1581
+ function tinycolor(color, opts) {
1582
+ color = color ? color : "";
1583
+ opts = opts || {};
1584
+ if (color instanceof tinycolor) {
1585
+ return color;
1586
+ }
1587
+ if (!(this instanceof tinycolor)) {
1588
+ return new tinycolor(color, opts);
1589
+ }
1590
+ var rgb = inputToRGB(color);
1591
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
1592
+ this._gradientType = opts.gradientType;
1593
+ if (this._r < 1)
1594
+ this._r = Math.round(this._r);
1595
+ if (this._g < 1)
1596
+ this._g = Math.round(this._g);
1597
+ if (this._b < 1)
1598
+ this._b = Math.round(this._b);
1599
+ this._ok = rgb.ok;
1600
+ }
1601
+ tinycolor.prototype = {
1602
+ isDark: function() {
1603
+ return this.getBrightness() < 128;
1604
+ },
1605
+ isLight: function() {
1606
+ return !this.isDark();
1607
+ },
1608
+ isValid: function() {
1609
+ return this._ok;
1610
+ },
1611
+ getOriginalInput: function() {
1612
+ return this._originalInput;
1613
+ },
1614
+ getFormat: function() {
1615
+ return this._format;
1616
+ },
1617
+ getAlpha: function() {
1618
+ return this._a;
1619
+ },
1620
+ getBrightness: function() {
1621
+ var rgb = this.toRgb();
1622
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
1623
+ },
1624
+ getLuminance: function() {
1625
+ var rgb = this.toRgb();
1626
+ var RsRGB, GsRGB, BsRGB, R, G, B;
1627
+ RsRGB = rgb.r / 255;
1628
+ GsRGB = rgb.g / 255;
1629
+ BsRGB = rgb.b / 255;
1630
+ if (RsRGB <= 0.03928)
1631
+ R = RsRGB / 12.92;
1632
+ else
1633
+ R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
1634
+ if (GsRGB <= 0.03928)
1635
+ G = GsRGB / 12.92;
1636
+ else
1637
+ G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
1638
+ if (BsRGB <= 0.03928)
1639
+ B = BsRGB / 12.92;
1640
+ else
1641
+ B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
1642
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
1643
+ },
1644
+ setAlpha: function(value) {
1645
+ this._a = boundAlpha(value);
1646
+ this._roundA = Math.round(100 * this._a) / 100;
1647
+ return this;
1648
+ },
1649
+ toHsv: function() {
1650
+ var hsv = rgbToHsv(this._r, this._g, this._b);
1651
+ return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
1652
+ },
1653
+ toHsvString: function() {
1654
+ var hsv = rgbToHsv(this._r, this._g, this._b);
1655
+ var h = Math.round(hsv.h * 360), s = Math.round(hsv.s * 100), v = Math.round(hsv.v * 100);
1656
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
1657
+ },
1658
+ toHsl: function() {
1659
+ var hsl = rgbToHsl(this._r, this._g, this._b);
1660
+ return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
1661
+ },
1662
+ toHslString: function() {
1663
+ var hsl = rgbToHsl(this._r, this._g, this._b);
1664
+ var h = Math.round(hsl.h * 360), s = Math.round(hsl.s * 100), l = Math.round(hsl.l * 100);
1665
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
1666
+ },
1667
+ toHex: function(allow3Char) {
1668
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
1669
+ },
1670
+ toHexString: function(allow3Char) {
1671
+ return "#" + this.toHex(allow3Char);
1672
+ },
1673
+ toHex8: function(allow4Char) {
1674
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
1675
+ },
1676
+ toHex8String: function(allow4Char) {
1677
+ return "#" + this.toHex8(allow4Char);
1678
+ },
1679
+ toRgb: function() {
1680
+ return {
1681
+ r: Math.round(this._r),
1682
+ g: Math.round(this._g),
1683
+ b: Math.round(this._b),
1684
+ a: this._a
1685
+ };
1686
+ },
1687
+ toRgbString: function() {
1688
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
1689
+ },
1690
+ toPercentageRgb: function() {
1691
+ return {
1692
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
1693
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
1694
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
1695
+ a: this._a
1696
+ };
1697
+ },
1698
+ toPercentageRgbString: function() {
1699
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
1700
+ },
1701
+ toName: function() {
1702
+ if (this._a === 0) {
1703
+ return "transparent";
1704
+ }
1705
+ if (this._a < 1) {
1706
+ return false;
1707
+ }
1708
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
1709
+ },
1710
+ toFilter: function(secondColor) {
1711
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
1712
+ var secondHex8String = hex8String;
1713
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
1714
+ if (secondColor) {
1715
+ var s = tinycolor(secondColor);
1716
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
1717
+ }
1718
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
1719
+ },
1720
+ toString: function(format) {
1721
+ var formatSet = !!format;
1722
+ format = format || this._format;
1723
+ var formattedString = false;
1724
+ var hasAlpha = this._a < 1 && this._a >= 0;
1725
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
1726
+ if (needsAlphaFormat) {
1727
+ if (format === "name" && this._a === 0) {
1728
+ return this.toName();
1729
+ }
1730
+ return this.toRgbString();
1731
+ }
1732
+ if (format === "rgb") {
1733
+ formattedString = this.toRgbString();
1734
+ }
1735
+ if (format === "prgb") {
1736
+ formattedString = this.toPercentageRgbString();
1737
+ }
1738
+ if (format === "hex" || format === "hex6") {
1739
+ formattedString = this.toHexString();
1740
+ }
1741
+ if (format === "hex3") {
1742
+ formattedString = this.toHexString(true);
1743
+ }
1744
+ if (format === "hex4") {
1745
+ formattedString = this.toHex8String(true);
1746
+ }
1747
+ if (format === "hex8") {
1748
+ formattedString = this.toHex8String();
1749
+ }
1750
+ if (format === "name") {
1751
+ formattedString = this.toName();
1752
+ }
1753
+ if (format === "hsl") {
1754
+ formattedString = this.toHslString();
1755
+ }
1756
+ if (format === "hsv") {
1757
+ formattedString = this.toHsvString();
1758
+ }
1759
+ return formattedString || this.toHexString();
1760
+ },
1761
+ clone: function() {
1762
+ return tinycolor(this.toString());
1763
+ },
1764
+ _applyModification: function(fn, args) {
1765
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
1766
+ this._r = color._r;
1767
+ this._g = color._g;
1768
+ this._b = color._b;
1769
+ this.setAlpha(color._a);
1770
+ return this;
1771
+ },
1772
+ lighten: function() {
1773
+ return this._applyModification(lighten, arguments);
1774
+ },
1775
+ brighten: function() {
1776
+ return this._applyModification(brighten, arguments);
1777
+ },
1778
+ darken: function() {
1779
+ return this._applyModification(darken, arguments);
1780
+ },
1781
+ desaturate: function() {
1782
+ return this._applyModification(desaturate, arguments);
1783
+ },
1784
+ saturate: function() {
1785
+ return this._applyModification(saturate, arguments);
1786
+ },
1787
+ greyscale: function() {
1788
+ return this._applyModification(greyscale, arguments);
1789
+ },
1790
+ spin: function() {
1791
+ return this._applyModification(spin, arguments);
1792
+ },
1793
+ _applyCombination: function(fn, args) {
1794
+ return fn.apply(null, [this].concat([].slice.call(args)));
1795
+ },
1796
+ analogous: function() {
1797
+ return this._applyCombination(analogous, arguments);
1798
+ },
1799
+ complement: function() {
1800
+ return this._applyCombination(complement, arguments);
1801
+ },
1802
+ monochromatic: function() {
1803
+ return this._applyCombination(monochromatic, arguments);
1804
+ },
1805
+ splitcomplement: function() {
1806
+ return this._applyCombination(splitcomplement, arguments);
1807
+ },
1808
+ triad: function() {
1809
+ return this._applyCombination(polyad, [3]);
1810
+ },
1811
+ tetrad: function() {
1812
+ return this._applyCombination(polyad, [4]);
1813
+ }
1814
+ };
1815
+ tinycolor.fromRatio = function(color, opts) {
1816
+ if (typeof color == "object") {
1817
+ var newColor = {};
1818
+ for (var i in color) {
1819
+ if (color.hasOwnProperty(i)) {
1820
+ if (i === "a") {
1821
+ newColor[i] = color[i];
1822
+ } else {
1823
+ newColor[i] = convertToPercentage(color[i]);
1824
+ }
1825
+ }
1826
+ }
1827
+ color = newColor;
1828
+ }
1829
+ return tinycolor(color, opts);
1830
+ };
1831
+ function inputToRGB(color) {
1832
+ var rgb = { r: 0, g: 0, b: 0 };
1833
+ var a = 1;
1834
+ var s = null;
1835
+ var v = null;
1836
+ var l = null;
1837
+ var ok = false;
1838
+ var format = false;
1839
+ if (typeof color == "string") {
1840
+ color = stringInputToObject(color);
1841
+ }
1842
+ if (typeof color == "object") {
1843
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
1844
+ rgb = rgbToRgb(color.r, color.g, color.b);
1845
+ ok = true;
1846
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
1847
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
1848
+ s = convertToPercentage(color.s);
1849
+ v = convertToPercentage(color.v);
1850
+ rgb = hsvToRgb(color.h, s, v);
1851
+ ok = true;
1852
+ format = "hsv";
1853
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
1854
+ s = convertToPercentage(color.s);
1855
+ l = convertToPercentage(color.l);
1856
+ rgb = hslToRgb(color.h, s, l);
1857
+ ok = true;
1858
+ format = "hsl";
1859
+ }
1860
+ if (color.hasOwnProperty("a")) {
1861
+ a = color.a;
1862
+ }
1863
+ }
1864
+ a = boundAlpha(a);
1865
+ return {
1866
+ ok,
1867
+ format: color.format || format,
1868
+ r: Math.min(255, Math.max(rgb.r, 0)),
1869
+ g: Math.min(255, Math.max(rgb.g, 0)),
1870
+ b: Math.min(255, Math.max(rgb.b, 0)),
1871
+ a
1872
+ };
1873
+ }
1874
+ function rgbToRgb(r, g, b) {
1875
+ return {
1876
+ r: bound01(r, 255) * 255,
1877
+ g: bound01(g, 255) * 255,
1878
+ b: bound01(b, 255) * 255
1879
+ };
1880
+ }
1881
+ function rgbToHsl(r, g, b) {
1882
+ r = bound01(r, 255);
1883
+ g = bound01(g, 255);
1884
+ b = bound01(b, 255);
1885
+ var max = Math.max(r, g, b), min = Math.min(r, g, b);
1886
+ var h, s, l = (max + min) / 2;
1887
+ if (max == min) {
1888
+ h = s = 0;
1889
+ } else {
1890
+ var d = max - min;
1891
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
1892
+ switch (max) {
1893
+ case r:
1894
+ h = (g - b) / d + (g < b ? 6 : 0);
1895
+ break;
1896
+ case g:
1897
+ h = (b - r) / d + 2;
1898
+ break;
1899
+ case b:
1900
+ h = (r - g) / d + 4;
1901
+ break;
1902
+ }
1903
+ h /= 6;
1904
+ }
1905
+ return { h, s, l };
1906
+ }
1907
+ function hslToRgb(h, s, l) {
1908
+ var r, g, b;
1909
+ h = bound01(h, 360);
1910
+ s = bound01(s, 100);
1911
+ l = bound01(l, 100);
1912
+ function hue2rgb(p2, q2, t) {
1913
+ if (t < 0)
1914
+ t += 1;
1915
+ if (t > 1)
1916
+ t -= 1;
1917
+ if (t < 1 / 6)
1918
+ return p2 + (q2 - p2) * 6 * t;
1919
+ if (t < 1 / 2)
1920
+ return q2;
1921
+ if (t < 2 / 3)
1922
+ return p2 + (q2 - p2) * (2 / 3 - t) * 6;
1923
+ return p2;
1924
+ }
1925
+ if (s === 0) {
1926
+ r = g = b = l;
1927
+ } else {
1928
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
1929
+ var p = 2 * l - q;
1930
+ r = hue2rgb(p, q, h + 1 / 3);
1931
+ g = hue2rgb(p, q, h);
1932
+ b = hue2rgb(p, q, h - 1 / 3);
1933
+ }
1934
+ return { r: r * 255, g: g * 255, b: b * 255 };
1935
+ }
1936
+ function rgbToHsv(r, g, b) {
1937
+ r = bound01(r, 255);
1938
+ g = bound01(g, 255);
1939
+ b = bound01(b, 255);
1940
+ var max = Math.max(r, g, b), min = Math.min(r, g, b);
1941
+ var h, s, v = max;
1942
+ var d = max - min;
1943
+ s = max === 0 ? 0 : d / max;
1944
+ if (max == min) {
1945
+ h = 0;
1946
+ } else {
1947
+ switch (max) {
1948
+ case r:
1949
+ h = (g - b) / d + (g < b ? 6 : 0);
1950
+ break;
1951
+ case g:
1952
+ h = (b - r) / d + 2;
1953
+ break;
1954
+ case b:
1955
+ h = (r - g) / d + 4;
1956
+ break;
1957
+ }
1958
+ h /= 6;
1959
+ }
1960
+ return { h, s, v };
1961
+ }
1962
+ function hsvToRgb(h, s, v) {
1963
+ h = bound01(h, 360) * 6;
1964
+ s = bound01(s, 100);
1965
+ v = bound01(v, 100);
1966
+ var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod];
1967
+ return { r: r * 255, g: g * 255, b: b * 255 };
1968
+ }
1969
+ function rgbToHex(r, g, b, allow3Char) {
1970
+ var hex = [
1971
+ pad2(Math.round(r).toString(16)),
1972
+ pad2(Math.round(g).toString(16)),
1973
+ pad2(Math.round(b).toString(16))
1974
+ ];
1975
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
1976
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
1977
+ }
1978
+ return hex.join("");
1979
+ }
1980
+ function rgbaToHex(r, g, b, a, allow4Char) {
1981
+ var hex = [
1982
+ pad2(Math.round(r).toString(16)),
1983
+ pad2(Math.round(g).toString(16)),
1984
+ pad2(Math.round(b).toString(16)),
1985
+ pad2(convertDecimalToHex(a))
1986
+ ];
1987
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
1988
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
1989
+ }
1990
+ return hex.join("");
1991
+ }
1992
+ function rgbaToArgbHex(r, g, b, a) {
1993
+ var hex = [
1994
+ pad2(convertDecimalToHex(a)),
1995
+ pad2(Math.round(r).toString(16)),
1996
+ pad2(Math.round(g).toString(16)),
1997
+ pad2(Math.round(b).toString(16))
1998
+ ];
1999
+ return hex.join("");
2000
+ }
2001
+ tinycolor.equals = function(color1, color2) {
2002
+ if (!color1 || !color2)
2003
+ return false;
2004
+ return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
2005
+ };
2006
+ tinycolor.random = function() {
2007
+ return tinycolor.fromRatio({
2008
+ r: Math.random(),
2009
+ g: Math.random(),
2010
+ b: Math.random()
2011
+ });
2012
+ };
2013
+ function desaturate(color, amount) {
2014
+ amount = amount === 0 ? 0 : amount || 10;
2015
+ var hsl = tinycolor(color).toHsl();
2016
+ hsl.s -= amount / 100;
2017
+ hsl.s = clamp01(hsl.s);
2018
+ return tinycolor(hsl);
2019
+ }
2020
+ function saturate(color, amount) {
2021
+ amount = amount === 0 ? 0 : amount || 10;
2022
+ var hsl = tinycolor(color).toHsl();
2023
+ hsl.s += amount / 100;
2024
+ hsl.s = clamp01(hsl.s);
2025
+ return tinycolor(hsl);
2026
+ }
2027
+ function greyscale(color) {
2028
+ return tinycolor(color).desaturate(100);
2029
+ }
2030
+ function lighten(color, amount) {
2031
+ amount = amount === 0 ? 0 : amount || 10;
2032
+ var hsl = tinycolor(color).toHsl();
2033
+ hsl.l += amount / 100;
2034
+ hsl.l = clamp01(hsl.l);
2035
+ return tinycolor(hsl);
2036
+ }
2037
+ function brighten(color, amount) {
2038
+ amount = amount === 0 ? 0 : amount || 10;
2039
+ var rgb = tinycolor(color).toRgb();
2040
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
2041
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
2042
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
2043
+ return tinycolor(rgb);
2044
+ }
2045
+ function darken(color, amount) {
2046
+ amount = amount === 0 ? 0 : amount || 10;
2047
+ var hsl = tinycolor(color).toHsl();
2048
+ hsl.l -= amount / 100;
2049
+ hsl.l = clamp01(hsl.l);
2050
+ return tinycolor(hsl);
2051
+ }
2052
+ function spin(color, amount) {
2053
+ var hsl = tinycolor(color).toHsl();
2054
+ var hue = (hsl.h + amount) % 360;
2055
+ hsl.h = hue < 0 ? 360 + hue : hue;
2056
+ return tinycolor(hsl);
2057
+ }
2058
+ function complement(color) {
2059
+ var hsl = tinycolor(color).toHsl();
2060
+ hsl.h = (hsl.h + 180) % 360;
2061
+ return tinycolor(hsl);
2062
+ }
2063
+ function polyad(color, number) {
2064
+ if (isNaN(number) || number <= 0) {
2065
+ throw new Error("Argument to polyad must be a positive number");
2066
+ }
2067
+ var hsl = tinycolor(color).toHsl();
2068
+ var result = [tinycolor(color)];
2069
+ var step = 360 / number;
2070
+ for (var i = 1; i < number; i++) {
2071
+ result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l }));
2072
+ }
2073
+ return result;
2074
+ }
2075
+ function splitcomplement(color) {
2076
+ var hsl = tinycolor(color).toHsl();
2077
+ var h = hsl.h;
2078
+ return [
2079
+ tinycolor(color),
2080
+ tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
2081
+ tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })
2082
+ ];
2083
+ }
2084
+ function analogous(color, results, slices) {
2085
+ results = results || 6;
2086
+ slices = slices || 30;
2087
+ var hsl = tinycolor(color).toHsl();
2088
+ var part = 360 / slices;
2089
+ var ret = [tinycolor(color)];
2090
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) {
2091
+ hsl.h = (hsl.h + part) % 360;
2092
+ ret.push(tinycolor(hsl));
2093
+ }
2094
+ return ret;
2095
+ }
2096
+ function monochromatic(color, results) {
2097
+ results = results || 6;
2098
+ var hsv = tinycolor(color).toHsv();
2099
+ var h = hsv.h, s = hsv.s, v = hsv.v;
2100
+ var ret = [];
2101
+ var modification = 1 / results;
2102
+ while (results--) {
2103
+ ret.push(tinycolor({ h, s, v }));
2104
+ v = (v + modification) % 1;
2105
+ }
2106
+ return ret;
2107
+ }
2108
+ tinycolor.mix = function(color1, color2, amount) {
2109
+ amount = amount === 0 ? 0 : amount || 50;
2110
+ var rgb1 = tinycolor(color1).toRgb();
2111
+ var rgb2 = tinycolor(color2).toRgb();
2112
+ var p = amount / 100;
2113
+ var rgba = {
2114
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
2115
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
2116
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
2117
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
2118
+ };
2119
+ return tinycolor(rgba);
2120
+ };
2121
+ tinycolor.readability = function(color1, color2) {
2122
+ var c1 = tinycolor(color1);
2123
+ var c2 = tinycolor(color2);
2124
+ return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
2125
+ };
2126
+ tinycolor.isReadable = function(color1, color2, wcag2) {
2127
+ var readability = tinycolor.readability(color1, color2);
2128
+ var wcag2Parms, out;
2129
+ out = false;
2130
+ wcag2Parms = validateWCAG2Parms(wcag2);
2131
+ switch (wcag2Parms.level + wcag2Parms.size) {
2132
+ case "AAsmall":
2133
+ case "AAAlarge":
2134
+ out = readability >= 4.5;
2135
+ break;
2136
+ case "AAlarge":
2137
+ out = readability >= 3;
2138
+ break;
2139
+ case "AAAsmall":
2140
+ out = readability >= 7;
2141
+ break;
2142
+ }
2143
+ return out;
2144
+ };
2145
+ tinycolor.mostReadable = function(baseColor, colorList, args) {
2146
+ var bestColor = null;
2147
+ var bestScore = 0;
2148
+ var readability;
2149
+ var includeFallbackColors, level, size;
2150
+ args = args || {};
2151
+ includeFallbackColors = args.includeFallbackColors;
2152
+ level = args.level;
2153
+ size = args.size;
2154
+ for (var i = 0; i < colorList.length; i++) {
2155
+ readability = tinycolor.readability(baseColor, colorList[i]);
2156
+ if (readability > bestScore) {
2157
+ bestScore = readability;
2158
+ bestColor = tinycolor(colorList[i]);
2159
+ }
2160
+ }
2161
+ if (tinycolor.isReadable(baseColor, bestColor, {
2162
+ level,
2163
+ size
2164
+ }) || !includeFallbackColors) {
2165
+ return bestColor;
2166
+ } else {
2167
+ args.includeFallbackColors = false;
2168
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
2169
+ }
2170
+ };
2171
+ var names = tinycolor.names = {
2172
+ aliceblue: "f0f8ff",
2173
+ antiquewhite: "faebd7",
2174
+ aqua: "0ff",
2175
+ aquamarine: "7fffd4",
2176
+ azure: "f0ffff",
2177
+ beige: "f5f5dc",
2178
+ bisque: "ffe4c4",
2179
+ black: "000",
2180
+ blanchedalmond: "ffebcd",
2181
+ blue: "00f",
2182
+ blueviolet: "8a2be2",
2183
+ brown: "a52a2a",
2184
+ burlywood: "deb887",
2185
+ burntsienna: "ea7e5d",
2186
+ cadetblue: "5f9ea0",
2187
+ chartreuse: "7fff00",
2188
+ chocolate: "d2691e",
2189
+ coral: "ff7f50",
2190
+ cornflowerblue: "6495ed",
2191
+ cornsilk: "fff8dc",
2192
+ crimson: "dc143c",
2193
+ cyan: "0ff",
2194
+ darkblue: "00008b",
2195
+ darkcyan: "008b8b",
2196
+ darkgoldenrod: "b8860b",
2197
+ darkgray: "a9a9a9",
2198
+ darkgreen: "006400",
2199
+ darkgrey: "a9a9a9",
2200
+ darkkhaki: "bdb76b",
2201
+ darkmagenta: "8b008b",
2202
+ darkolivegreen: "556b2f",
2203
+ darkorange: "ff8c00",
2204
+ darkorchid: "9932cc",
2205
+ darkred: "8b0000",
2206
+ darksalmon: "e9967a",
2207
+ darkseagreen: "8fbc8f",
2208
+ darkslateblue: "483d8b",
2209
+ darkslategray: "2f4f4f",
2210
+ darkslategrey: "2f4f4f",
2211
+ darkturquoise: "00ced1",
2212
+ darkviolet: "9400d3",
2213
+ deeppink: "ff1493",
2214
+ deepskyblue: "00bfff",
2215
+ dimgray: "696969",
2216
+ dimgrey: "696969",
2217
+ dodgerblue: "1e90ff",
2218
+ firebrick: "b22222",
2219
+ floralwhite: "fffaf0",
2220
+ forestgreen: "228b22",
2221
+ fuchsia: "f0f",
2222
+ gainsboro: "dcdcdc",
2223
+ ghostwhite: "f8f8ff",
2224
+ gold: "ffd700",
2225
+ goldenrod: "daa520",
2226
+ gray: "808080",
2227
+ green: "008000",
2228
+ greenyellow: "adff2f",
2229
+ grey: "808080",
2230
+ honeydew: "f0fff0",
2231
+ hotpink: "ff69b4",
2232
+ indianred: "cd5c5c",
2233
+ indigo: "4b0082",
2234
+ ivory: "fffff0",
2235
+ khaki: "f0e68c",
2236
+ lavender: "e6e6fa",
2237
+ lavenderblush: "fff0f5",
2238
+ lawngreen: "7cfc00",
2239
+ lemonchiffon: "fffacd",
2240
+ lightblue: "add8e6",
2241
+ lightcoral: "f08080",
2242
+ lightcyan: "e0ffff",
2243
+ lightgoldenrodyellow: "fafad2",
2244
+ lightgray: "d3d3d3",
2245
+ lightgreen: "90ee90",
2246
+ lightgrey: "d3d3d3",
2247
+ lightpink: "ffb6c1",
2248
+ lightsalmon: "ffa07a",
2249
+ lightseagreen: "20b2aa",
2250
+ lightskyblue: "87cefa",
2251
+ lightslategray: "789",
2252
+ lightslategrey: "789",
2253
+ lightsteelblue: "b0c4de",
2254
+ lightyellow: "ffffe0",
2255
+ lime: "0f0",
2256
+ limegreen: "32cd32",
2257
+ linen: "faf0e6",
2258
+ magenta: "f0f",
2259
+ maroon: "800000",
2260
+ mediumaquamarine: "66cdaa",
2261
+ mediumblue: "0000cd",
2262
+ mediumorchid: "ba55d3",
2263
+ mediumpurple: "9370db",
2264
+ mediumseagreen: "3cb371",
2265
+ mediumslateblue: "7b68ee",
2266
+ mediumspringgreen: "00fa9a",
2267
+ mediumturquoise: "48d1cc",
2268
+ mediumvioletred: "c71585",
2269
+ midnightblue: "191970",
2270
+ mintcream: "f5fffa",
2271
+ mistyrose: "ffe4e1",
2272
+ moccasin: "ffe4b5",
2273
+ navajowhite: "ffdead",
2274
+ navy: "000080",
2275
+ oldlace: "fdf5e6",
2276
+ olive: "808000",
2277
+ olivedrab: "6b8e23",
2278
+ orange: "ffa500",
2279
+ orangered: "ff4500",
2280
+ orchid: "da70d6",
2281
+ palegoldenrod: "eee8aa",
2282
+ palegreen: "98fb98",
2283
+ paleturquoise: "afeeee",
2284
+ palevioletred: "db7093",
2285
+ papayawhip: "ffefd5",
2286
+ peachpuff: "ffdab9",
2287
+ peru: "cd853f",
2288
+ pink: "ffc0cb",
2289
+ plum: "dda0dd",
2290
+ powderblue: "b0e0e6",
2291
+ purple: "800080",
2292
+ rebeccapurple: "663399",
2293
+ red: "f00",
2294
+ rosybrown: "bc8f8f",
2295
+ royalblue: "4169e1",
2296
+ saddlebrown: "8b4513",
2297
+ salmon: "fa8072",
2298
+ sandybrown: "f4a460",
2299
+ seagreen: "2e8b57",
2300
+ seashell: "fff5ee",
2301
+ sienna: "a0522d",
2302
+ silver: "c0c0c0",
2303
+ skyblue: "87ceeb",
2304
+ slateblue: "6a5acd",
2305
+ slategray: "708090",
2306
+ slategrey: "708090",
2307
+ snow: "fffafa",
2308
+ springgreen: "00ff7f",
2309
+ steelblue: "4682b4",
2310
+ tan: "d2b48c",
2311
+ teal: "008080",
2312
+ thistle: "d8bfd8",
2313
+ tomato: "ff6347",
2314
+ turquoise: "40e0d0",
2315
+ violet: "ee82ee",
2316
+ wheat: "f5deb3",
2317
+ white: "fff",
2318
+ whitesmoke: "f5f5f5",
2319
+ yellow: "ff0",
2320
+ yellowgreen: "9acd32"
2321
+ };
2322
+ var hexNames = tinycolor.hexNames = flip(names);
2323
+ function flip(o) {
2324
+ var flipped = {};
2325
+ for (var i in o) {
2326
+ if (o.hasOwnProperty(i)) {
2327
+ flipped[o[i]] = i;
2328
+ }
2329
+ }
2330
+ return flipped;
2331
+ }
2332
+ function boundAlpha(a) {
2333
+ a = parseFloat(a);
2334
+ if (isNaN(a) || a < 0 || a > 1) {
2335
+ a = 1;
2336
+ }
2337
+ return a;
2338
+ }
2339
+ function bound01(n, max) {
2340
+ if (isOnePointZero(n))
2341
+ n = "100%";
2342
+ var processPercent = isPercentage(n);
2343
+ n = Math.min(max, Math.max(0, parseFloat(n)));
2344
+ if (processPercent) {
2345
+ n = parseInt(n * max, 10) / 100;
2346
+ }
2347
+ if (Math.abs(n - max) < 1e-6) {
2348
+ return 1;
2349
+ }
2350
+ return n % max / parseFloat(max);
2351
+ }
2352
+ function clamp01(val) {
2353
+ return Math.min(1, Math.max(0, val));
2354
+ }
2355
+ function parseIntFromHex(val) {
2356
+ return parseInt(val, 16);
2357
+ }
2358
+ function isOnePointZero(n) {
2359
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
2360
+ }
2361
+ function isPercentage(n) {
2362
+ return typeof n === "string" && n.indexOf("%") != -1;
2363
+ }
2364
+ function pad2(c) {
2365
+ return c.length == 1 ? "0" + c : "" + c;
2366
+ }
2367
+ function convertToPercentage(n) {
2368
+ if (n <= 1) {
2369
+ n = n * 100 + "%";
2370
+ }
2371
+ return n;
2372
+ }
2373
+ function convertDecimalToHex(d) {
2374
+ return Math.round(parseFloat(d) * 255).toString(16);
2375
+ }
2376
+ function convertHexToDecimal(h) {
2377
+ return parseIntFromHex(h) / 255;
2378
+ }
2379
+ var matchers = function() {
2380
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
2381
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
2382
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
2383
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
2384
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
2385
+ return {
2386
+ CSS_UNIT: new RegExp(CSS_UNIT),
2387
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
2388
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
2389
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
2390
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
2391
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
2392
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
2393
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
2394
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
2395
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
2396
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
2397
+ };
2398
+ }();
2399
+ function isValidCSSUnit(color) {
2400
+ return !!matchers.CSS_UNIT.exec(color);
2401
+ }
2402
+ function stringInputToObject(color) {
2403
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
2404
+ var named = false;
2405
+ if (names[color]) {
2406
+ color = names[color];
2407
+ named = true;
2408
+ } else if (color == "transparent") {
2409
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
2410
+ }
2411
+ var match;
2412
+ if (match = matchers.rgb.exec(color)) {
2413
+ return { r: match[1], g: match[2], b: match[3] };
2414
+ }
2415
+ if (match = matchers.rgba.exec(color)) {
2416
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
2417
+ }
2418
+ if (match = matchers.hsl.exec(color)) {
2419
+ return { h: match[1], s: match[2], l: match[3] };
2420
+ }
2421
+ if (match = matchers.hsla.exec(color)) {
2422
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
2423
+ }
2424
+ if (match = matchers.hsv.exec(color)) {
2425
+ return { h: match[1], s: match[2], v: match[3] };
2426
+ }
2427
+ if (match = matchers.hsva.exec(color)) {
2428
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
2429
+ }
2430
+ if (match = matchers.hex8.exec(color)) {
2431
+ return {
2432
+ r: parseIntFromHex(match[1]),
2433
+ g: parseIntFromHex(match[2]),
2434
+ b: parseIntFromHex(match[3]),
2435
+ a: convertHexToDecimal(match[4]),
2436
+ format: named ? "name" : "hex8"
2437
+ };
2438
+ }
2439
+ if (match = matchers.hex6.exec(color)) {
2440
+ return {
2441
+ r: parseIntFromHex(match[1]),
2442
+ g: parseIntFromHex(match[2]),
2443
+ b: parseIntFromHex(match[3]),
2444
+ format: named ? "name" : "hex"
2445
+ };
2446
+ }
2447
+ if (match = matchers.hex4.exec(color)) {
2448
+ return {
2449
+ r: parseIntFromHex(match[1] + "" + match[1]),
2450
+ g: parseIntFromHex(match[2] + "" + match[2]),
2451
+ b: parseIntFromHex(match[3] + "" + match[3]),
2452
+ a: convertHexToDecimal(match[4] + "" + match[4]),
2453
+ format: named ? "name" : "hex8"
2454
+ };
2455
+ }
2456
+ if (match = matchers.hex3.exec(color)) {
2457
+ return {
2458
+ r: parseIntFromHex(match[1] + "" + match[1]),
2459
+ g: parseIntFromHex(match[2] + "" + match[2]),
2460
+ b: parseIntFromHex(match[3] + "" + match[3]),
2461
+ format: named ? "name" : "hex"
2462
+ };
2463
+ }
2464
+ return false;
2465
+ }
2466
+ function validateWCAG2Parms(parms) {
2467
+ var level, size;
2468
+ parms = parms || { level: "AA", size: "small" };
2469
+ level = (parms.level || "AA").toUpperCase();
2470
+ size = (parms.size || "small").toLowerCase();
2471
+ if (level !== "AA" && level !== "AAA") {
2472
+ level = "AA";
2473
+ }
2474
+ if (size !== "small" && size !== "large") {
2475
+ size = "small";
2476
+ }
2477
+ return { level, size };
2478
+ }
2479
+ return tinycolor;
2480
+ });
2481
+ }
2482
+ });
2483
+
2484
+ // node_modules/.pnpm/tinygradient@1.1.5/node_modules/tinygradient/index.js
2485
+ var require_tinygradient = __commonJS({
2486
+ "node_modules/.pnpm/tinygradient@1.1.5/node_modules/tinygradient/index.js"(exports, module) {
2487
+ var tinycolor = require_tinycolor();
2488
+ var RGBA_MAX = { r: 256, g: 256, b: 256, a: 1 };
2489
+ var HSVA_MAX = { h: 360, s: 1, v: 1, a: 1 };
2490
+ function stepize(start, end, steps) {
2491
+ let step = {};
2492
+ for (let k in start) {
2493
+ if (start.hasOwnProperty(k)) {
2494
+ step[k] = steps === 0 ? 0 : (end[k] - start[k]) / steps;
2495
+ }
2496
+ }
2497
+ return step;
2498
+ }
2499
+ function interpolate(step, start, i, max) {
2500
+ let color = {};
2501
+ for (let k in start) {
2502
+ if (start.hasOwnProperty(k)) {
2503
+ color[k] = step[k] * i + start[k];
2504
+ color[k] = color[k] < 0 ? color[k] + max[k] : max[k] !== 1 ? color[k] % max[k] : color[k];
2505
+ }
2506
+ }
2507
+ return color;
2508
+ }
2509
+ function interpolateRgb(stop1, stop2, steps) {
2510
+ const start = stop1.color.toRgb();
2511
+ const end = stop2.color.toRgb();
2512
+ const step = stepize(start, end, steps);
2513
+ let gradient2 = [stop1.color];
2514
+ for (let i = 1; i < steps; i++) {
2515
+ const color = interpolate(step, start, i, RGBA_MAX);
2516
+ gradient2.push(tinycolor(color));
2517
+ }
2518
+ return gradient2;
2519
+ }
2520
+ function interpolateHsv(stop1, stop2, steps, mode) {
2521
+ const start = stop1.color.toHsv();
2522
+ const end = stop2.color.toHsv();
2523
+ if (start.s === 0 || end.s === 0) {
2524
+ return interpolateRgb(stop1, stop2, steps);
2525
+ }
2526
+ let trigonometric;
2527
+ if (typeof mode === "boolean") {
2528
+ trigonometric = mode;
2529
+ } else {
2530
+ const trigShortest = start.h < end.h && end.h - start.h < 180 || start.h > end.h && start.h - end.h > 180;
2531
+ trigonometric = mode === "long" && trigShortest || mode === "short" && !trigShortest;
2532
+ }
2533
+ const step = stepize(start, end, steps);
2534
+ let gradient2 = [stop1.color];
2535
+ let diff;
2536
+ if (start.h <= end.h && !trigonometric || start.h >= end.h && trigonometric) {
2537
+ diff = end.h - start.h;
2538
+ } else if (trigonometric) {
2539
+ diff = 360 - end.h + start.h;
2540
+ } else {
2541
+ diff = 360 - start.h + end.h;
2542
+ }
2543
+ step.h = Math.pow(-1, trigonometric ? 1 : 0) * Math.abs(diff) / steps;
2544
+ for (let i = 1; i < steps; i++) {
2545
+ const color = interpolate(step, start, i, HSVA_MAX);
2546
+ gradient2.push(tinycolor(color));
2547
+ }
2548
+ return gradient2;
2549
+ }
2550
+ function computeSubsteps(stops, steps) {
2551
+ const l = stops.length;
2552
+ steps = parseInt(steps, 10);
2553
+ if (isNaN(steps) || steps < 2) {
2554
+ throw new Error("Invalid number of steps (< 2)");
2555
+ }
2556
+ if (steps < l) {
2557
+ throw new Error("Number of steps cannot be inferior to number of stops");
2558
+ }
2559
+ let substeps = [];
2560
+ for (let i = 1; i < l; i++) {
2561
+ const step = (steps - 1) * (stops[i].pos - stops[i - 1].pos);
2562
+ substeps.push(Math.max(1, Math.round(step)));
2563
+ }
2564
+ let totalSubsteps = 1;
2565
+ for (let n = l - 1; n--; )
2566
+ totalSubsteps += substeps[n];
2567
+ while (totalSubsteps !== steps) {
2568
+ if (totalSubsteps < steps) {
2569
+ const min = Math.min.apply(null, substeps);
2570
+ substeps[substeps.indexOf(min)]++;
2571
+ totalSubsteps++;
2572
+ } else {
2573
+ const max = Math.max.apply(null, substeps);
2574
+ substeps[substeps.indexOf(max)]--;
2575
+ totalSubsteps--;
2576
+ }
2577
+ }
2578
+ return substeps;
2579
+ }
2580
+ function computeAt(stops, pos, method, max) {
2581
+ if (pos < 0 || pos > 1) {
2582
+ throw new Error("Position must be between 0 and 1");
2583
+ }
2584
+ let start, end;
2585
+ for (let i = 0, l = stops.length; i < l - 1; i++) {
2586
+ if (pos >= stops[i].pos && pos < stops[i + 1].pos) {
2587
+ start = stops[i];
2588
+ end = stops[i + 1];
2589
+ break;
2590
+ }
2591
+ }
2592
+ if (!start) {
2593
+ start = end = stops[stops.length - 1];
2594
+ }
2595
+ const step = stepize(start.color[method](), end.color[method](), (end.pos - start.pos) * 100);
2596
+ const color = interpolate(step, start.color[method](), (pos - start.pos) * 100, max);
2597
+ return tinycolor(color);
2598
+ }
2599
+ var TinyGradient = class {
2600
+ constructor(stops) {
2601
+ if (stops.length < 2) {
2602
+ throw new Error("Invalid number of stops (< 2)");
2603
+ }
2604
+ const havingPositions = stops[0].pos !== void 0;
2605
+ let l = stops.length;
2606
+ let p = -1;
2607
+ let lastColorLess = false;
2608
+ this.stops = stops.map((stop, i) => {
2609
+ const hasPosition = stop.pos !== void 0;
2610
+ if (havingPositions ^ hasPosition) {
2611
+ throw new Error("Cannot mix positionned and not posionned color stops");
2612
+ }
2613
+ if (hasPosition) {
2614
+ const hasColor = stop.color !== void 0;
2615
+ if (!hasColor && (lastColorLess || i === 0 || i === l - 1)) {
2616
+ throw new Error("Cannot define two consecutive position-only stops");
2617
+ }
2618
+ lastColorLess = !hasColor;
2619
+ stop = {
2620
+ color: hasColor ? tinycolor(stop.color) : null,
2621
+ colorLess: !hasColor,
2622
+ pos: stop.pos
2623
+ };
2624
+ if (stop.pos < 0 || stop.pos > 1) {
2625
+ throw new Error("Color stops positions must be between 0 and 1");
2626
+ } else if (stop.pos < p) {
2627
+ throw new Error("Color stops positions are not ordered");
2628
+ }
2629
+ p = stop.pos;
2630
+ } else {
2631
+ stop = {
2632
+ color: tinycolor(stop.color !== void 0 ? stop.color : stop),
2633
+ pos: i / (l - 1)
2634
+ };
2635
+ }
2636
+ return stop;
2637
+ });
2638
+ if (this.stops[0].pos !== 0) {
2639
+ this.stops.unshift({
2640
+ color: this.stops[0].color,
2641
+ pos: 0
2642
+ });
2643
+ l++;
2644
+ }
2645
+ if (this.stops[l - 1].pos !== 1) {
2646
+ this.stops.push({
2647
+ color: this.stops[l - 1].color,
2648
+ pos: 1
2649
+ });
2650
+ }
2651
+ }
2652
+ reverse() {
2653
+ let stops = [];
2654
+ this.stops.forEach(function(stop) {
2655
+ stops.push({
2656
+ color: stop.color,
2657
+ pos: 1 - stop.pos
2658
+ });
2659
+ });
2660
+ return new TinyGradient(stops.reverse());
2661
+ }
2662
+ loop() {
2663
+ let stops1 = [];
2664
+ let stops2 = [];
2665
+ this.stops.forEach((stop) => {
2666
+ stops1.push({
2667
+ color: stop.color,
2668
+ pos: stop.pos / 2
2669
+ });
2670
+ });
2671
+ this.stops.slice(0, -1).forEach((stop) => {
2672
+ stops2.push({
2673
+ color: stop.color,
2674
+ pos: 1 - stop.pos / 2
2675
+ });
2676
+ });
2677
+ return new TinyGradient(stops1.concat(stops2.reverse()));
2678
+ }
2679
+ rgb(steps) {
2680
+ const substeps = computeSubsteps(this.stops, steps);
2681
+ let gradient2 = [];
2682
+ this.stops.forEach((stop, i) => {
2683
+ if (stop.colorLess) {
2684
+ stop.color = interpolateRgb(this.stops[i - 1], this.stops[i + 1], 2)[1];
2685
+ }
2686
+ });
2687
+ for (let i = 0, l = this.stops.length; i < l - 1; i++) {
2688
+ const rgb = interpolateRgb(this.stops[i], this.stops[i + 1], substeps[i]);
2689
+ gradient2.splice(gradient2.length, 0, ...rgb);
2690
+ }
2691
+ gradient2.push(this.stops[this.stops.length - 1].color);
2692
+ return gradient2;
2693
+ }
2694
+ hsv(steps, mode) {
2695
+ const substeps = computeSubsteps(this.stops, steps);
2696
+ let gradient2 = [];
2697
+ this.stops.forEach((stop, i) => {
2698
+ if (stop.colorLess) {
2699
+ stop.color = interpolateHsv(this.stops[i - 1], this.stops[i + 1], 2, mode)[1];
2700
+ }
2701
+ });
2702
+ for (let i = 0, l = this.stops.length; i < l - 1; i++) {
2703
+ const hsv = interpolateHsv(this.stops[i], this.stops[i + 1], substeps[i], mode);
2704
+ gradient2.splice(gradient2.length, 0, ...hsv);
2705
+ }
2706
+ gradient2.push(this.stops[this.stops.length - 1].color);
2707
+ return gradient2;
2708
+ }
2709
+ css(mode, direction) {
2710
+ mode = mode || "linear";
2711
+ direction = direction || (mode === "linear" ? "to right" : "ellipse at center");
2712
+ let css = mode + "-gradient(" + direction;
2713
+ this.stops.forEach(function(stop) {
2714
+ css += ", " + (stop.colorLess ? "" : stop.color.toRgbString() + " ") + stop.pos * 100 + "%";
2715
+ });
2716
+ css += ")";
2717
+ return css;
2718
+ }
2719
+ rgbAt(pos) {
2720
+ return computeAt(this.stops, pos, "toRgb", RGBA_MAX);
2721
+ }
2722
+ hsvAt(pos) {
2723
+ return computeAt(this.stops, pos, "toHsv", HSVA_MAX);
2724
+ }
2725
+ };
2726
+ module.exports = function(stops) {
2727
+ if (arguments.length === 1) {
2728
+ if (!Array.isArray(arguments[0])) {
2729
+ throw new Error('"stops" is not an array');
2730
+ }
2731
+ stops = arguments[0];
2732
+ } else {
2733
+ stops = Array.prototype.slice.call(arguments);
2734
+ }
2735
+ return new TinyGradient(stops);
2736
+ };
2737
+ }
2738
+ });
2739
+
2740
+ // node_modules/.pnpm/gradient-string@2.0.2/node_modules/gradient-string/index.js
2741
+ var require_gradient_string = __commonJS({
2742
+ "node_modules/.pnpm/gradient-string@2.0.2/node_modules/gradient-string/index.js"(exports, module) {
2743
+ "use strict";
2744
+ var chalk = require_source();
2745
+ var tinygradient = require_tinygradient();
2746
+ var forbiddenChars = /\s/g;
2747
+ function InitGradient(...args) {
2748
+ const grad = tinygradient.apply(this, args);
2749
+ const ret = (str, opts) => applyGradient(str ? str.toString() : "", grad, opts);
2750
+ ret.multiline = (str, opts) => multilineGradient(str ? str.toString() : "", grad, opts);
2751
+ return ret;
2752
+ }
2753
+ var getColors = (gradient2, options, count) => options.interpolation.toLowerCase() === "hsv" ? gradient2.hsv(count, options.hsvSpin.toLowerCase()) : gradient2.rgb(count);
2754
+ function applyGradient(str, gradient2, opts) {
2755
+ const options = validateOptions(opts);
2756
+ const colorsCount = Math.max(str.replace(forbiddenChars, "").length, gradient2.stops.length);
2757
+ const colors = getColors(gradient2, options, colorsCount);
2758
+ let result = "";
2759
+ for (const s of str) {
2760
+ result += s.match(forbiddenChars) ? s : chalk.hex(colors.shift().toHex())(s);
2761
+ }
2762
+ return result;
2763
+ }
2764
+ function multilineGradient(str, gradient2, opts) {
2765
+ const options = validateOptions(opts);
2766
+ const lines = str.split("\n");
2767
+ const maxLength = Math.max.apply(null, lines.map((l) => l.length).concat([gradient2.stops.length]));
2768
+ const colors = getColors(gradient2, options, maxLength);
2769
+ const results = [];
2770
+ for (const line of lines) {
2771
+ const lineColors = colors.slice(0);
2772
+ let lineResult = "";
2773
+ for (const l of line) {
2774
+ lineResult += chalk.hex(lineColors.shift().toHex())(l);
2775
+ }
2776
+ results.push(lineResult);
2777
+ }
2778
+ return results.join("\n");
2779
+ }
2780
+ function validateOptions(opts) {
2781
+ const options = { interpolation: "rgb", hsvSpin: "short", ...opts };
2782
+ if (opts !== void 0 && typeof opts !== "object") {
2783
+ throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof opts}\``);
2784
+ }
2785
+ if (typeof options.interpolation !== "string") {
2786
+ throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof options.interpolation}\``);
2787
+ }
2788
+ if (options.interpolation.toLowerCase() === "hsv" && typeof options.hsvSpin !== "string") {
2789
+ throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof options.hsvSpin}\``);
2790
+ }
2791
+ return options;
2792
+ }
2793
+ var aliases = {
2794
+ atlas: { colors: ["#feac5e", "#c779d0", "#4bc0c8"], options: {} },
2795
+ cristal: { colors: ["#bdfff3", "#4ac29a"], options: {} },
2796
+ teen: { colors: ["#77a1d3", "#79cbca", "#e684ae"], options: {} },
2797
+ mind: { colors: ["#473b7b", "#3584a7", "#30d2be"], options: {} },
2798
+ morning: { colors: ["#ff5f6d", "#ffc371"], options: { interpolation: "hsv" } },
2799
+ vice: { colors: ["#5ee7df", "#b490ca"], options: { interpolation: "hsv" } },
2800
+ passion: { colors: ["#f43b47", "#453a94"], options: {} },
2801
+ fruit: { colors: ["#ff4e50", "#f9d423"], options: {} },
2802
+ instagram: { colors: ["#833ab4", "#fd1d1d", "#fcb045"], options: {} },
2803
+ retro: { colors: ["#3f51b1", "#5a55ae", "#7b5fac", "#8f6aae", "#a86aa4", "#cc6b8e", "#f18271", "#f3a469", "#f7c978"], options: {} },
2804
+ summer: { colors: ["#fdbb2d", "#22c1c3"], options: {} },
2805
+ rainbow: { colors: ["#ff0000", "#ff0100"], options: { interpolation: "hsv", hsvSpin: "long" } },
2806
+ pastel: { colors: ["#74ebd5", "#74ecd5"], options: { interpolation: "hsv", hsvSpin: "long" } }
2807
+ };
2808
+ module.exports = InitGradient;
2809
+ for (const a in aliases) {
2810
+ module.exports[a] = (str) => new InitGradient(aliases[a].colors)(str, aliases[a].options);
2811
+ module.exports[a].multiline = (str) => new InitGradient(aliases[a].colors).multiline(str, aliases[a].options);
2812
+ }
2813
+ }
2814
+ });
2815
+
2816
+ // src/scripts.ts
2817
+ var import_gradient_string = __toESM(require_gradient_string(), 1);
2818
+ import { readFileSync } from "fs";
2819
+ var logger = ({ isDebugging = false, emoji = `\u{1F6E3}\uFE0F`, gap = ` => `, name = "merge-tsconfigs" }) => (type) => (section) => (message) => (err) => {
2820
+ const debugMsg = isDebugging ? "debugging:" : "";
2821
+ const sectionMsg = section.length ? `${section}:` : "";
2822
+ const firstLine = `${name}:${debugMsg}${sectionMsg}`;
2823
+ const secondLine = message ? `${emoji}${gap}${message}` : "";
2824
+ if (type === "error") {
2825
+ console.error(import_gradient_string.default.passion(firstLine));
2826
+ if (secondLine)
2827
+ console.error(secondLine);
2828
+ if (err)
2829
+ console.error(err);
2830
+ } else if (type === "debug") {
2831
+ console.debug(import_gradient_string.default.passion(firstLine));
2832
+ if (secondLine)
2833
+ console.debug(secondLine);
2834
+ } else if (type === "info") {
2835
+ console.info(import_gradient_string.default.teen(firstLine));
2836
+ if (secondLine)
2837
+ console.info(secondLine);
2838
+ } else {
2839
+ console.log(import_gradient_string.default.teen(firstLine));
2840
+ if (secondLine)
2841
+ console.log(secondLine);
2842
+ }
2843
+ };
2844
+ function resolveJSON(path, debug = false) {
2845
+ try {
2846
+ const json = JSON.parse(readFileSync(path, "utf8"));
2847
+ return json;
2848
+ } catch (err) {
2849
+ if (debug)
2850
+ logger({ isDebugging: debug })("error")("resolveJSON")("There was an error:")(err);
2851
+ return {};
2852
+ }
2853
+ }
2854
+ var mergeConfigContent = (tsconfigs, debug = false) => tsconfigs.reduce((acc = {}, tsconfig) => {
2855
+ let tsconfigJSON = resolveJSON(tsconfig, true);
2856
+ if (tsconfigJSON?.extends) {
2857
+ const parentTsconfig = resolveJSON(tsconfigJSON.extends, true);
2858
+ if (parentTsconfig?.extends) {
2859
+ logger({ isDebugging: false })("error")("mergeConfigContent")("Parent tsconfig:merge-tsconfigs only handles extending from a parent, consider extending tsconfigs less.")(parentTsconfig);
2860
+ }
2861
+ tsconfigJSON = {
2862
+ ...parentTsconfig,
2863
+ ...tsconfigJSON
2864
+ };
2865
+ }
2866
+ if (!tsconfigJSON) {
2867
+ if (debug)
2868
+ logger({ isDebugging: debug })("error")("mergeConfigContent")("There was an error:")(tsconfigJSON);
2869
+ return acc;
2870
+ }
2871
+ return {
2872
+ ...acc,
2873
+ ...tsconfigJSON
2874
+ };
2875
+ }, {});
2876
+ var mergeTsConfigs = ({
2877
+ tsconfigs = [],
2878
+ debug = false
2879
+ }) => {
2880
+ if (tsconfigs.length === 0) {
2881
+ if (debug)
2882
+ logger({ isDebugging: debug })("error")("mergeTsConfig")("No tsconfig files were provided.")(null);
2883
+ return;
2884
+ }
2885
+ const updatedTsconfig = mergeConfigContent(tsconfigs, debug);
2886
+ if (debug)
2887
+ logger({ isDebugging: debug })("debug")("mergeTsConfig")("Updated tsconfig:")(updatedTsconfig);
2888
+ return {
2889
+ ...updatedTsconfig
2890
+ };
2891
+ };
2892
+ var script = mergeTsConfigs;
2893
+ var scripts_default = mergeTsConfigs;
2894
+
2895
+ // src/program.ts
2896
+ import { program } from "commander";
2897
+ program.name("merge-tsconfigs").description(
2898
+ "Codependency, for code dependency. Checks `coDependencies` in package.json files to ensure dependencies are up-to-date"
2899
+ ).argument("[files...]", "files to check").option("-t, --isTestingCLI", "enable CLI only testing").option("--isTesting", "enable running fn tests w/o overwriting");
2900
+
2901
+ // src/index.ts
2902
+ var src_default = scripts_default;
2903
+ export {
2904
+ src_default as default,
2905
+ logger,
2906
+ mergeConfigContent,
2907
+ mergeTsConfigs,
2908
+ resolveJSON,
2909
+ script
2910
+ };