@nsshunt/stsutils 1.19.91 → 1.19.93

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.mjs CHANGED
@@ -1,2076 +1,339 @@
1
- import Ajv from "ajv/dist/jtd.js";
2
- //#region \0rolldown/runtime.js
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
- key = keys[i];
13
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: ((k) => from[k]).bind(null, key),
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
1
+ //#region node_modules/chalk/source/vendor/ansi-styles/index.js
2
+ var ANSI_BACKGROUND_OFFSET = 10;
3
+ var wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
4
+ var wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
5
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
6
+ var styles$1 = {
7
+ modifier: {
8
+ reset: [0, 0],
9
+ bold: [1, 22],
10
+ dim: [2, 22],
11
+ italic: [3, 23],
12
+ underline: [4, 24],
13
+ overline: [53, 55],
14
+ inverse: [7, 27],
15
+ hidden: [8, 28],
16
+ strikethrough: [9, 29]
17
+ },
18
+ color: {
19
+ black: [30, 39],
20
+ red: [31, 39],
21
+ green: [32, 39],
22
+ yellow: [33, 39],
23
+ blue: [34, 39],
24
+ magenta: [35, 39],
25
+ cyan: [36, 39],
26
+ white: [37, 39],
27
+ blackBright: [90, 39],
28
+ gray: [90, 39],
29
+ grey: [90, 39],
30
+ redBright: [91, 39],
31
+ greenBright: [92, 39],
32
+ yellowBright: [93, 39],
33
+ blueBright: [94, 39],
34
+ magentaBright: [95, 39],
35
+ cyanBright: [96, 39],
36
+ whiteBright: [97, 39]
37
+ },
38
+ bgColor: {
39
+ bgBlack: [40, 49],
40
+ bgRed: [41, 49],
41
+ bgGreen: [42, 49],
42
+ bgYellow: [43, 49],
43
+ bgBlue: [44, 49],
44
+ bgMagenta: [45, 49],
45
+ bgCyan: [46, 49],
46
+ bgWhite: [47, 49],
47
+ bgBlackBright: [100, 49],
48
+ bgGray: [100, 49],
49
+ bgGrey: [100, 49],
50
+ bgRedBright: [101, 49],
51
+ bgGreenBright: [102, 49],
52
+ bgYellowBright: [103, 49],
53
+ bgBlueBright: [104, 49],
54
+ bgMagentaBright: [105, 49],
55
+ bgCyanBright: [106, 49],
56
+ bgWhiteBright: [107, 49]
17
57
  }
18
- return to;
19
58
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
21
- value: mod,
22
- enumerable: true
23
- }) : target, mod));
24
- //#endregion
25
- //#region node_modules/color-name/index.js
26
- var require_color_name = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27
- module.exports = {
28
- "aliceblue": [
29
- 240,
30
- 248,
31
- 255
32
- ],
33
- "antiquewhite": [
34
- 250,
35
- 235,
36
- 215
37
- ],
38
- "aqua": [
39
- 0,
40
- 255,
41
- 255
42
- ],
43
- "aquamarine": [
44
- 127,
45
- 255,
46
- 212
47
- ],
48
- "azure": [
49
- 240,
50
- 255,
51
- 255
52
- ],
53
- "beige": [
54
- 245,
55
- 245,
56
- 220
57
- ],
58
- "bisque": [
59
- 255,
60
- 228,
61
- 196
62
- ],
63
- "black": [
64
- 0,
65
- 0,
66
- 0
67
- ],
68
- "blanchedalmond": [
69
- 255,
70
- 235,
71
- 205
72
- ],
73
- "blue": [
74
- 0,
75
- 0,
76
- 255
77
- ],
78
- "blueviolet": [
79
- 138,
80
- 43,
81
- 226
82
- ],
83
- "brown": [
84
- 165,
85
- 42,
86
- 42
87
- ],
88
- "burlywood": [
89
- 222,
90
- 184,
91
- 135
92
- ],
93
- "cadetblue": [
94
- 95,
95
- 158,
96
- 160
97
- ],
98
- "chartreuse": [
99
- 127,
100
- 255,
101
- 0
102
- ],
103
- "chocolate": [
104
- 210,
105
- 105,
106
- 30
107
- ],
108
- "coral": [
109
- 255,
110
- 127,
111
- 80
112
- ],
113
- "cornflowerblue": [
114
- 100,
115
- 149,
116
- 237
117
- ],
118
- "cornsilk": [
119
- 255,
120
- 248,
121
- 220
122
- ],
123
- "crimson": [
124
- 220,
125
- 20,
126
- 60
127
- ],
128
- "cyan": [
129
- 0,
130
- 255,
131
- 255
132
- ],
133
- "darkblue": [
134
- 0,
135
- 0,
136
- 139
137
- ],
138
- "darkcyan": [
139
- 0,
140
- 139,
141
- 139
142
- ],
143
- "darkgoldenrod": [
144
- 184,
145
- 134,
146
- 11
147
- ],
148
- "darkgray": [
149
- 169,
150
- 169,
151
- 169
152
- ],
153
- "darkgreen": [
154
- 0,
155
- 100,
156
- 0
157
- ],
158
- "darkgrey": [
159
- 169,
160
- 169,
161
- 169
162
- ],
163
- "darkkhaki": [
164
- 189,
165
- 183,
166
- 107
167
- ],
168
- "darkmagenta": [
169
- 139,
170
- 0,
171
- 139
172
- ],
173
- "darkolivegreen": [
174
- 85,
175
- 107,
176
- 47
177
- ],
178
- "darkorange": [
179
- 255,
180
- 140,
181
- 0
182
- ],
183
- "darkorchid": [
184
- 153,
185
- 50,
186
- 204
187
- ],
188
- "darkred": [
189
- 139,
190
- 0,
191
- 0
192
- ],
193
- "darksalmon": [
194
- 233,
195
- 150,
196
- 122
197
- ],
198
- "darkseagreen": [
199
- 143,
200
- 188,
201
- 143
202
- ],
203
- "darkslateblue": [
204
- 72,
205
- 61,
206
- 139
207
- ],
208
- "darkslategray": [
209
- 47,
210
- 79,
211
- 79
212
- ],
213
- "darkslategrey": [
214
- 47,
215
- 79,
216
- 79
217
- ],
218
- "darkturquoise": [
219
- 0,
220
- 206,
221
- 209
222
- ],
223
- "darkviolet": [
224
- 148,
225
- 0,
226
- 211
227
- ],
228
- "deeppink": [
229
- 255,
230
- 20,
231
- 147
232
- ],
233
- "deepskyblue": [
234
- 0,
235
- 191,
236
- 255
237
- ],
238
- "dimgray": [
239
- 105,
240
- 105,
241
- 105
242
- ],
243
- "dimgrey": [
244
- 105,
245
- 105,
246
- 105
247
- ],
248
- "dodgerblue": [
249
- 30,
250
- 144,
251
- 255
252
- ],
253
- "firebrick": [
254
- 178,
255
- 34,
256
- 34
257
- ],
258
- "floralwhite": [
259
- 255,
260
- 250,
261
- 240
262
- ],
263
- "forestgreen": [
264
- 34,
265
- 139,
266
- 34
267
- ],
268
- "fuchsia": [
269
- 255,
270
- 0,
271
- 255
272
- ],
273
- "gainsboro": [
274
- 220,
275
- 220,
276
- 220
277
- ],
278
- "ghostwhite": [
279
- 248,
280
- 248,
281
- 255
282
- ],
283
- "gold": [
284
- 255,
285
- 215,
286
- 0
287
- ],
288
- "goldenrod": [
289
- 218,
290
- 165,
291
- 32
292
- ],
293
- "gray": [
294
- 128,
295
- 128,
296
- 128
297
- ],
298
- "green": [
299
- 0,
300
- 128,
301
- 0
302
- ],
303
- "greenyellow": [
304
- 173,
305
- 255,
306
- 47
307
- ],
308
- "grey": [
309
- 128,
310
- 128,
311
- 128
312
- ],
313
- "honeydew": [
314
- 240,
315
- 255,
316
- 240
317
- ],
318
- "hotpink": [
319
- 255,
320
- 105,
321
- 180
322
- ],
323
- "indianred": [
324
- 205,
325
- 92,
326
- 92
327
- ],
328
- "indigo": [
329
- 75,
330
- 0,
331
- 130
332
- ],
333
- "ivory": [
334
- 255,
335
- 255,
336
- 240
337
- ],
338
- "khaki": [
339
- 240,
340
- 230,
341
- 140
342
- ],
343
- "lavender": [
344
- 230,
345
- 230,
346
- 250
347
- ],
348
- "lavenderblush": [
349
- 255,
350
- 240,
351
- 245
352
- ],
353
- "lawngreen": [
354
- 124,
355
- 252,
356
- 0
357
- ],
358
- "lemonchiffon": [
359
- 255,
360
- 250,
361
- 205
362
- ],
363
- "lightblue": [
364
- 173,
365
- 216,
366
- 230
367
- ],
368
- "lightcoral": [
369
- 240,
370
- 128,
371
- 128
372
- ],
373
- "lightcyan": [
374
- 224,
375
- 255,
376
- 255
377
- ],
378
- "lightgoldenrodyellow": [
379
- 250,
380
- 250,
381
- 210
382
- ],
383
- "lightgray": [
384
- 211,
385
- 211,
386
- 211
387
- ],
388
- "lightgreen": [
389
- 144,
390
- 238,
391
- 144
392
- ],
393
- "lightgrey": [
394
- 211,
395
- 211,
396
- 211
397
- ],
398
- "lightpink": [
399
- 255,
400
- 182,
401
- 193
402
- ],
403
- "lightsalmon": [
404
- 255,
405
- 160,
406
- 122
407
- ],
408
- "lightseagreen": [
409
- 32,
410
- 178,
411
- 170
412
- ],
413
- "lightskyblue": [
414
- 135,
415
- 206,
416
- 250
417
- ],
418
- "lightslategray": [
419
- 119,
420
- 136,
421
- 153
422
- ],
423
- "lightslategrey": [
424
- 119,
425
- 136,
426
- 153
427
- ],
428
- "lightsteelblue": [
429
- 176,
430
- 196,
431
- 222
432
- ],
433
- "lightyellow": [
434
- 255,
435
- 255,
436
- 224
437
- ],
438
- "lime": [
439
- 0,
440
- 255,
441
- 0
442
- ],
443
- "limegreen": [
444
- 50,
445
- 205,
446
- 50
447
- ],
448
- "linen": [
449
- 250,
450
- 240,
451
- 230
452
- ],
453
- "magenta": [
454
- 255,
455
- 0,
456
- 255
457
- ],
458
- "maroon": [
459
- 128,
460
- 0,
461
- 0
462
- ],
463
- "mediumaquamarine": [
464
- 102,
465
- 205,
466
- 170
467
- ],
468
- "mediumblue": [
469
- 0,
470
- 0,
471
- 205
472
- ],
473
- "mediumorchid": [
474
- 186,
475
- 85,
476
- 211
477
- ],
478
- "mediumpurple": [
479
- 147,
480
- 112,
481
- 219
482
- ],
483
- "mediumseagreen": [
484
- 60,
485
- 179,
486
- 113
487
- ],
488
- "mediumslateblue": [
489
- 123,
490
- 104,
491
- 238
492
- ],
493
- "mediumspringgreen": [
494
- 0,
495
- 250,
496
- 154
497
- ],
498
- "mediumturquoise": [
499
- 72,
500
- 209,
501
- 204
502
- ],
503
- "mediumvioletred": [
504
- 199,
505
- 21,
506
- 133
507
- ],
508
- "midnightblue": [
509
- 25,
510
- 25,
511
- 112
512
- ],
513
- "mintcream": [
514
- 245,
515
- 255,
516
- 250
517
- ],
518
- "mistyrose": [
519
- 255,
520
- 228,
521
- 225
522
- ],
523
- "moccasin": [
524
- 255,
525
- 228,
526
- 181
527
- ],
528
- "navajowhite": [
529
- 255,
530
- 222,
531
- 173
532
- ],
533
- "navy": [
534
- 0,
535
- 0,
536
- 128
537
- ],
538
- "oldlace": [
539
- 253,
540
- 245,
541
- 230
542
- ],
543
- "olive": [
544
- 128,
545
- 128,
546
- 0
547
- ],
548
- "olivedrab": [
549
- 107,
550
- 142,
551
- 35
552
- ],
553
- "orange": [
554
- 255,
555
- 165,
556
- 0
557
- ],
558
- "orangered": [
559
- 255,
560
- 69,
561
- 0
562
- ],
563
- "orchid": [
564
- 218,
565
- 112,
566
- 214
567
- ],
568
- "palegoldenrod": [
569
- 238,
570
- 232,
571
- 170
572
- ],
573
- "palegreen": [
574
- 152,
575
- 251,
576
- 152
577
- ],
578
- "paleturquoise": [
579
- 175,
580
- 238,
581
- 238
582
- ],
583
- "palevioletred": [
584
- 219,
585
- 112,
586
- 147
587
- ],
588
- "papayawhip": [
589
- 255,
590
- 239,
591
- 213
592
- ],
593
- "peachpuff": [
594
- 255,
595
- 218,
596
- 185
597
- ],
598
- "peru": [
599
- 205,
600
- 133,
601
- 63
602
- ],
603
- "pink": [
604
- 255,
605
- 192,
606
- 203
607
- ],
608
- "plum": [
609
- 221,
610
- 160,
611
- 221
612
- ],
613
- "powderblue": [
614
- 176,
615
- 224,
616
- 230
617
- ],
618
- "purple": [
619
- 128,
620
- 0,
621
- 128
622
- ],
623
- "rebeccapurple": [
624
- 102,
625
- 51,
626
- 153
627
- ],
628
- "red": [
629
- 255,
630
- 0,
631
- 0
632
- ],
633
- "rosybrown": [
634
- 188,
635
- 143,
636
- 143
637
- ],
638
- "royalblue": [
639
- 65,
640
- 105,
641
- 225
642
- ],
643
- "saddlebrown": [
644
- 139,
645
- 69,
646
- 19
647
- ],
648
- "salmon": [
649
- 250,
650
- 128,
651
- 114
652
- ],
653
- "sandybrown": [
654
- 244,
655
- 164,
656
- 96
657
- ],
658
- "seagreen": [
659
- 46,
660
- 139,
661
- 87
662
- ],
663
- "seashell": [
664
- 255,
665
- 245,
666
- 238
667
- ],
668
- "sienna": [
669
- 160,
670
- 82,
671
- 45
672
- ],
673
- "silver": [
674
- 192,
675
- 192,
676
- 192
677
- ],
678
- "skyblue": [
679
- 135,
680
- 206,
681
- 235
682
- ],
683
- "slateblue": [
684
- 106,
685
- 90,
686
- 205
687
- ],
688
- "slategray": [
689
- 112,
690
- 128,
691
- 144
692
- ],
693
- "slategrey": [
694
- 112,
695
- 128,
696
- 144
697
- ],
698
- "snow": [
699
- 255,
700
- 250,
701
- 250
702
- ],
703
- "springgreen": [
704
- 0,
705
- 255,
706
- 127
707
- ],
708
- "steelblue": [
709
- 70,
710
- 130,
711
- 180
712
- ],
713
- "tan": [
714
- 210,
715
- 180,
716
- 140
717
- ],
718
- "teal": [
719
- 0,
720
- 128,
721
- 128
722
- ],
723
- "thistle": [
724
- 216,
725
- 191,
726
- 216
727
- ],
728
- "tomato": [
729
- 255,
730
- 99,
731
- 71
732
- ],
733
- "turquoise": [
734
- 64,
735
- 224,
736
- 208
737
- ],
738
- "violet": [
739
- 238,
740
- 130,
741
- 238
742
- ],
743
- "wheat": [
744
- 245,
745
- 222,
746
- 179
747
- ],
748
- "white": [
749
- 255,
750
- 255,
751
- 255
752
- ],
753
- "whitesmoke": [
754
- 245,
755
- 245,
756
- 245
757
- ],
758
- "yellow": [
759
- 255,
760
- 255,
761
- 0
762
- ],
763
- "yellowgreen": [
764
- 154,
765
- 205,
766
- 50
767
- ]
768
- };
769
- }));
770
- //#endregion
771
- //#region node_modules/color-convert/conversions.js
772
- var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
773
- var cssKeywords = require_color_name();
774
- var reverseKeywords = {};
775
- for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
776
- var convert = {
777
- rgb: {
778
- channels: 3,
779
- labels: "rgb"
780
- },
781
- hsl: {
782
- channels: 3,
783
- labels: "hsl"
784
- },
785
- hsv: {
786
- channels: 3,
787
- labels: "hsv"
788
- },
789
- hwb: {
790
- channels: 3,
791
- labels: "hwb"
792
- },
793
- cmyk: {
794
- channels: 4,
795
- labels: "cmyk"
796
- },
797
- xyz: {
798
- channels: 3,
799
- labels: "xyz"
800
- },
801
- lab: {
802
- channels: 3,
803
- labels: "lab"
804
- },
805
- lch: {
806
- channels: 3,
807
- labels: "lch"
808
- },
809
- hex: {
810
- channels: 1,
811
- labels: ["hex"]
812
- },
813
- keyword: {
814
- channels: 1,
815
- labels: ["keyword"]
816
- },
817
- ansi16: {
818
- channels: 1,
819
- labels: ["ansi16"]
820
- },
821
- ansi256: {
822
- channels: 1,
823
- labels: ["ansi256"]
824
- },
825
- hcg: {
826
- channels: 3,
827
- labels: [
828
- "h",
829
- "c",
830
- "g"
831
- ]
832
- },
833
- apple: {
834
- channels: 3,
835
- labels: [
836
- "r16",
837
- "g16",
838
- "b16"
839
- ]
840
- },
841
- gray: {
842
- channels: 1,
843
- labels: ["gray"]
844
- }
845
- };
846
- module.exports = convert;
847
- for (const model of Object.keys(convert)) {
848
- if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
849
- if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
850
- if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
851
- const { channels, labels } = convert[model];
852
- delete convert[model].channels;
853
- delete convert[model].labels;
854
- Object.defineProperty(convert[model], "channels", { value: channels });
855
- Object.defineProperty(convert[model], "labels", { value: labels });
856
- }
857
- convert.rgb.hsl = function(rgb) {
858
- const r = rgb[0] / 255;
859
- const g = rgb[1] / 255;
860
- const b = rgb[2] / 255;
861
- const min = Math.min(r, g, b);
862
- const max = Math.max(r, g, b);
863
- const delta = max - min;
864
- let h;
865
- let s;
866
- if (max === min) h = 0;
867
- else if (r === max) h = (g - b) / delta;
868
- else if (g === max) h = 2 + (b - r) / delta;
869
- else if (b === max) h = 4 + (r - g) / delta;
870
- h = Math.min(h * 60, 360);
871
- if (h < 0) h += 360;
872
- const l = (min + max) / 2;
873
- if (max === min) s = 0;
874
- else if (l <= .5) s = delta / (max + min);
875
- else s = delta / (2 - max - min);
876
- return [
877
- h,
878
- s * 100,
879
- l * 100
880
- ];
881
- };
882
- convert.rgb.hsv = function(rgb) {
883
- let rdif;
884
- let gdif;
885
- let bdif;
886
- let h;
887
- let s;
888
- const r = rgb[0] / 255;
889
- const g = rgb[1] / 255;
890
- const b = rgb[2] / 255;
891
- const v = Math.max(r, g, b);
892
- const diff = v - Math.min(r, g, b);
893
- const diffc = function(c) {
894
- return (v - c) / 6 / diff + 1 / 2;
895
- };
896
- if (diff === 0) {
897
- h = 0;
898
- s = 0;
899
- } else {
900
- s = diff / v;
901
- rdif = diffc(r);
902
- gdif = diffc(g);
903
- bdif = diffc(b);
904
- if (r === v) h = bdif - gdif;
905
- else if (g === v) h = 1 / 3 + rdif - bdif;
906
- else if (b === v) h = 2 / 3 + gdif - rdif;
907
- if (h < 0) h += 1;
908
- else if (h > 1) h -= 1;
909
- }
910
- return [
911
- h * 360,
912
- s * 100,
913
- v * 100
914
- ];
915
- };
916
- convert.rgb.hwb = function(rgb) {
917
- const r = rgb[0];
918
- const g = rgb[1];
919
- let b = rgb[2];
920
- const h = convert.rgb.hsl(rgb)[0];
921
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
922
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
923
- return [
924
- h,
925
- w * 100,
926
- b * 100
927
- ];
928
- };
929
- convert.rgb.cmyk = function(rgb) {
930
- const r = rgb[0] / 255;
931
- const g = rgb[1] / 255;
932
- const b = rgb[2] / 255;
933
- const k = Math.min(1 - r, 1 - g, 1 - b);
934
- const c = (1 - r - k) / (1 - k) || 0;
935
- const m = (1 - g - k) / (1 - k) || 0;
936
- const y = (1 - b - k) / (1 - k) || 0;
937
- return [
938
- c * 100,
939
- m * 100,
940
- y * 100,
941
- k * 100
942
- ];
943
- };
944
- function comparativeDistance(x, y) {
945
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
946
- }
947
- convert.rgb.keyword = function(rgb) {
948
- const reversed = reverseKeywords[rgb];
949
- if (reversed) return reversed;
950
- let currentClosestDistance = Infinity;
951
- let currentClosestKeyword;
952
- for (const keyword of Object.keys(cssKeywords)) {
953
- const value = cssKeywords[keyword];
954
- const distance = comparativeDistance(rgb, value);
955
- if (distance < currentClosestDistance) {
956
- currentClosestDistance = distance;
957
- currentClosestKeyword = keyword;
958
- }
959
- }
960
- return currentClosestKeyword;
961
- };
962
- convert.keyword.rgb = function(keyword) {
963
- return cssKeywords[keyword];
964
- };
965
- convert.rgb.xyz = function(rgb) {
966
- let r = rgb[0] / 255;
967
- let g = rgb[1] / 255;
968
- let b = rgb[2] / 255;
969
- r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
970
- g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
971
- b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
972
- const x = r * .4124 + g * .3576 + b * .1805;
973
- const y = r * .2126 + g * .7152 + b * .0722;
974
- const z = r * .0193 + g * .1192 + b * .9505;
975
- return [
976
- x * 100,
977
- y * 100,
978
- z * 100
979
- ];
980
- };
981
- convert.rgb.lab = function(rgb) {
982
- const xyz = convert.rgb.xyz(rgb);
983
- let x = xyz[0];
984
- let y = xyz[1];
985
- let z = xyz[2];
986
- x /= 95.047;
987
- y /= 100;
988
- z /= 108.883;
989
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
990
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
991
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
992
- return [
993
- 116 * y - 16,
994
- 500 * (x - y),
995
- 200 * (y - z)
996
- ];
997
- };
998
- convert.hsl.rgb = function(hsl) {
999
- const h = hsl[0] / 360;
1000
- const s = hsl[1] / 100;
1001
- const l = hsl[2] / 100;
1002
- let t2;
1003
- let t3;
1004
- let val;
1005
- if (s === 0) {
1006
- val = l * 255;
1007
- return [
1008
- val,
1009
- val,
1010
- val
1011
- ];
1012
- }
1013
- if (l < .5) t2 = l * (1 + s);
1014
- else t2 = l + s - l * s;
1015
- const t1 = 2 * l - t2;
1016
- const rgb = [
1017
- 0,
1018
- 0,
1019
- 0
1020
- ];
1021
- for (let i = 0; i < 3; i++) {
1022
- t3 = h + 1 / 3 * -(i - 1);
1023
- if (t3 < 0) t3++;
1024
- if (t3 > 1) t3--;
1025
- if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
1026
- else if (2 * t3 < 1) val = t2;
1027
- else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1028
- else val = t1;
1029
- rgb[i] = val * 255;
1030
- }
1031
- return rgb;
1032
- };
1033
- convert.hsl.hsv = function(hsl) {
1034
- const h = hsl[0];
1035
- let s = hsl[1] / 100;
1036
- let l = hsl[2] / 100;
1037
- let smin = s;
1038
- const lmin = Math.max(l, .01);
1039
- l *= 2;
1040
- s *= l <= 1 ? l : 2 - l;
1041
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1042
- const v = (l + s) / 2;
1043
- return [
1044
- h,
1045
- (l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
1046
- v * 100
1047
- ];
1048
- };
1049
- convert.hsv.rgb = function(hsv) {
1050
- const h = hsv[0] / 60;
1051
- const s = hsv[1] / 100;
1052
- let v = hsv[2] / 100;
1053
- const hi = Math.floor(h) % 6;
1054
- const f = h - Math.floor(h);
1055
- const p = 255 * v * (1 - s);
1056
- const q = 255 * v * (1 - s * f);
1057
- const t = 255 * v * (1 - s * (1 - f));
1058
- v *= 255;
1059
- switch (hi) {
1060
- case 0: return [
1061
- v,
1062
- t,
1063
- p
1064
- ];
1065
- case 1: return [
1066
- q,
1067
- v,
1068
- p
1069
- ];
1070
- case 2: return [
1071
- p,
1072
- v,
1073
- t
1074
- ];
1075
- case 3: return [
1076
- p,
1077
- q,
1078
- v
1079
- ];
1080
- case 4: return [
1081
- t,
1082
- p,
1083
- v
1084
- ];
1085
- case 5: return [
1086
- v,
1087
- p,
1088
- q
1089
- ];
1090
- }
1091
- };
1092
- convert.hsv.hsl = function(hsv) {
1093
- const h = hsv[0];
1094
- const s = hsv[1] / 100;
1095
- const v = hsv[2] / 100;
1096
- const vmin = Math.max(v, .01);
1097
- let sl;
1098
- let l;
1099
- l = (2 - s) * v;
1100
- const lmin = (2 - s) * vmin;
1101
- sl = s * vmin;
1102
- sl /= lmin <= 1 ? lmin : 2 - lmin;
1103
- sl = sl || 0;
1104
- l /= 2;
1105
- return [
1106
- h,
1107
- sl * 100,
1108
- l * 100
1109
- ];
1110
- };
1111
- convert.hwb.rgb = function(hwb) {
1112
- const h = hwb[0] / 360;
1113
- let wh = hwb[1] / 100;
1114
- let bl = hwb[2] / 100;
1115
- const ratio = wh + bl;
1116
- let f;
1117
- if (ratio > 1) {
1118
- wh /= ratio;
1119
- bl /= ratio;
1120
- }
1121
- const i = Math.floor(6 * h);
1122
- const v = 1 - bl;
1123
- f = 6 * h - i;
1124
- if ((i & 1) !== 0) f = 1 - f;
1125
- const n = wh + f * (v - wh);
1126
- let r;
1127
- let g;
1128
- let b;
1129
- switch (i) {
1130
- default:
1131
- case 6:
1132
- case 0:
1133
- r = v;
1134
- g = n;
1135
- b = wh;
1136
- break;
1137
- case 1:
1138
- r = n;
1139
- g = v;
1140
- b = wh;
1141
- break;
1142
- case 2:
1143
- r = wh;
1144
- g = v;
1145
- b = n;
1146
- break;
1147
- case 3:
1148
- r = wh;
1149
- g = n;
1150
- b = v;
1151
- break;
1152
- case 4:
1153
- r = n;
1154
- g = wh;
1155
- b = v;
1156
- break;
1157
- case 5:
1158
- r = v;
1159
- g = wh;
1160
- b = n;
1161
- break;
1162
- }
1163
- return [
1164
- r * 255,
1165
- g * 255,
1166
- b * 255
1167
- ];
1168
- };
1169
- convert.cmyk.rgb = function(cmyk) {
1170
- const c = cmyk[0] / 100;
1171
- const m = cmyk[1] / 100;
1172
- const y = cmyk[2] / 100;
1173
- const k = cmyk[3] / 100;
1174
- const r = 1 - Math.min(1, c * (1 - k) + k);
1175
- const g = 1 - Math.min(1, m * (1 - k) + k);
1176
- const b = 1 - Math.min(1, y * (1 - k) + k);
1177
- return [
1178
- r * 255,
1179
- g * 255,
1180
- b * 255
1181
- ];
1182
- };
1183
- convert.xyz.rgb = function(xyz) {
1184
- const x = xyz[0] / 100;
1185
- const y = xyz[1] / 100;
1186
- const z = xyz[2] / 100;
1187
- let r;
1188
- let g;
1189
- let b;
1190
- r = x * 3.2406 + y * -1.5372 + z * -.4986;
1191
- g = x * -.9689 + y * 1.8758 + z * .0415;
1192
- b = x * .0557 + y * -.204 + z * 1.057;
1193
- r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
1194
- g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
1195
- b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
1196
- r = Math.min(Math.max(0, r), 1);
1197
- g = Math.min(Math.max(0, g), 1);
1198
- b = Math.min(Math.max(0, b), 1);
1199
- return [
1200
- r * 255,
1201
- g * 255,
1202
- b * 255
1203
- ];
1204
- };
1205
- convert.xyz.lab = function(xyz) {
1206
- let x = xyz[0];
1207
- let y = xyz[1];
1208
- let z = xyz[2];
1209
- x /= 95.047;
1210
- y /= 100;
1211
- z /= 108.883;
1212
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1213
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1214
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1215
- return [
1216
- 116 * y - 16,
1217
- 500 * (x - y),
1218
- 200 * (y - z)
1219
- ];
1220
- };
1221
- convert.lab.xyz = function(lab) {
1222
- const l = lab[0];
1223
- const a = lab[1];
1224
- const b = lab[2];
1225
- let x;
1226
- let y;
1227
- let z;
1228
- y = (l + 16) / 116;
1229
- x = a / 500 + y;
1230
- z = y - b / 200;
1231
- const y2 = y ** 3;
1232
- const x2 = x ** 3;
1233
- const z2 = z ** 3;
1234
- y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
1235
- x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
1236
- z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
1237
- x *= 95.047;
1238
- y *= 100;
1239
- z *= 108.883;
1240
- return [
1241
- x,
1242
- y,
1243
- z
1244
- ];
1245
- };
1246
- convert.lab.lch = function(lab) {
1247
- const l = lab[0];
1248
- const a = lab[1];
1249
- const b = lab[2];
1250
- let h;
1251
- h = Math.atan2(b, a) * 360 / 2 / Math.PI;
1252
- if (h < 0) h += 360;
1253
- return [
1254
- l,
1255
- Math.sqrt(a * a + b * b),
1256
- h
1257
- ];
1258
- };
1259
- convert.lch.lab = function(lch) {
1260
- const l = lch[0];
1261
- const c = lch[1];
1262
- const hr = lch[2] / 360 * 2 * Math.PI;
1263
- return [
1264
- l,
1265
- c * Math.cos(hr),
1266
- c * Math.sin(hr)
1267
- ];
1268
- };
1269
- convert.rgb.ansi16 = function(args, saturation = null) {
1270
- const [r, g, b] = args;
1271
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1272
- value = Math.round(value / 50);
1273
- if (value === 0) return 30;
1274
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1275
- if (value === 2) ansi += 60;
1276
- return ansi;
1277
- };
1278
- convert.hsv.ansi16 = function(args) {
1279
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1280
- };
1281
- convert.rgb.ansi256 = function(args) {
1282
- const r = args[0];
1283
- const g = args[1];
1284
- const b = args[2];
1285
- if (r === g && g === b) {
1286
- if (r < 8) return 16;
1287
- if (r > 248) return 231;
1288
- return Math.round((r - 8) / 247 * 24) + 232;
1289
- }
1290
- return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1291
- };
1292
- convert.ansi16.rgb = function(args) {
1293
- let color = args % 10;
1294
- if (color === 0 || color === 7) {
1295
- if (args > 50) color += 3.5;
1296
- color = color / 10.5 * 255;
1297
- return [
1298
- color,
1299
- color,
1300
- color
1301
- ];
1302
- }
1303
- const mult = (~~(args > 50) + 1) * .5;
1304
- return [
1305
- (color & 1) * mult * 255,
1306
- (color >> 1 & 1) * mult * 255,
1307
- (color >> 2 & 1) * mult * 255
1308
- ];
1309
- };
1310
- convert.ansi256.rgb = function(args) {
1311
- if (args >= 232) {
1312
- const c = (args - 232) * 10 + 8;
1313
- return [
1314
- c,
1315
- c,
1316
- c
1317
- ];
1318
- }
1319
- args -= 16;
1320
- let rem;
1321
- return [
1322
- Math.floor(args / 36) / 5 * 255,
1323
- Math.floor((rem = args % 36) / 6) / 5 * 255,
1324
- rem % 6 / 5 * 255
1325
- ];
1326
- };
1327
- convert.rgb.hex = function(args) {
1328
- const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
1329
- return "000000".substring(string.length) + string;
1330
- };
1331
- convert.hex.rgb = function(args) {
1332
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1333
- if (!match) return [
1334
- 0,
1335
- 0,
1336
- 0
1337
- ];
1338
- let colorString = match[0];
1339
- if (match[0].length === 3) colorString = colorString.split("").map((char) => {
1340
- return char + char;
1341
- }).join("");
1342
- const integer = parseInt(colorString, 16);
1343
- return [
1344
- integer >> 16 & 255,
1345
- integer >> 8 & 255,
1346
- integer & 255
1347
- ];
1348
- };
1349
- convert.rgb.hcg = function(rgb) {
1350
- const r = rgb[0] / 255;
1351
- const g = rgb[1] / 255;
1352
- const b = rgb[2] / 255;
1353
- const max = Math.max(Math.max(r, g), b);
1354
- const min = Math.min(Math.min(r, g), b);
1355
- const chroma = max - min;
1356
- let grayscale;
1357
- let hue;
1358
- if (chroma < 1) grayscale = min / (1 - chroma);
1359
- else grayscale = 0;
1360
- if (chroma <= 0) hue = 0;
1361
- else if (max === r) hue = (g - b) / chroma % 6;
1362
- else if (max === g) hue = 2 + (b - r) / chroma;
1363
- else hue = 4 + (r - g) / chroma;
1364
- hue /= 6;
1365
- hue %= 1;
1366
- return [
1367
- hue * 360,
1368
- chroma * 100,
1369
- grayscale * 100
1370
- ];
1371
- };
1372
- convert.hsl.hcg = function(hsl) {
1373
- const s = hsl[1] / 100;
1374
- const l = hsl[2] / 100;
1375
- const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
1376
- let f = 0;
1377
- if (c < 1) f = (l - .5 * c) / (1 - c);
1378
- return [
1379
- hsl[0],
1380
- c * 100,
1381
- f * 100
1382
- ];
1383
- };
1384
- convert.hsv.hcg = function(hsv) {
1385
- const s = hsv[1] / 100;
1386
- const v = hsv[2] / 100;
1387
- const c = s * v;
1388
- let f = 0;
1389
- if (c < 1) f = (v - c) / (1 - c);
1390
- return [
1391
- hsv[0],
1392
- c * 100,
1393
- f * 100
1394
- ];
1395
- };
1396
- convert.hcg.rgb = function(hcg) {
1397
- const h = hcg[0] / 360;
1398
- const c = hcg[1] / 100;
1399
- const g = hcg[2] / 100;
1400
- if (c === 0) return [
1401
- g * 255,
1402
- g * 255,
1403
- g * 255
1404
- ];
1405
- const pure = [
1406
- 0,
1407
- 0,
1408
- 0
1409
- ];
1410
- const hi = h % 1 * 6;
1411
- const v = hi % 1;
1412
- const w = 1 - v;
1413
- let mg = 0;
1414
- switch (Math.floor(hi)) {
1415
- case 0:
1416
- pure[0] = 1;
1417
- pure[1] = v;
1418
- pure[2] = 0;
1419
- break;
1420
- case 1:
1421
- pure[0] = w;
1422
- pure[1] = 1;
1423
- pure[2] = 0;
1424
- break;
1425
- case 2:
1426
- pure[0] = 0;
1427
- pure[1] = 1;
1428
- pure[2] = v;
1429
- break;
1430
- case 3:
1431
- pure[0] = 0;
1432
- pure[1] = w;
1433
- pure[2] = 1;
1434
- break;
1435
- case 4:
1436
- pure[0] = v;
1437
- pure[1] = 0;
1438
- pure[2] = 1;
1439
- break;
1440
- default:
1441
- pure[0] = 1;
1442
- pure[1] = 0;
1443
- pure[2] = w;
1444
- }
1445
- mg = (1 - c) * g;
1446
- return [
1447
- (c * pure[0] + mg) * 255,
1448
- (c * pure[1] + mg) * 255,
1449
- (c * pure[2] + mg) * 255
1450
- ];
1451
- };
1452
- convert.hcg.hsv = function(hcg) {
1453
- const c = hcg[1] / 100;
1454
- const v = c + hcg[2] / 100 * (1 - c);
1455
- let f = 0;
1456
- if (v > 0) f = c / v;
1457
- return [
1458
- hcg[0],
1459
- f * 100,
1460
- v * 100
1461
- ];
1462
- };
1463
- convert.hcg.hsl = function(hcg) {
1464
- const c = hcg[1] / 100;
1465
- const l = hcg[2] / 100 * (1 - c) + .5 * c;
1466
- let s = 0;
1467
- if (l > 0 && l < .5) s = c / (2 * l);
1468
- else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
1469
- return [
1470
- hcg[0],
1471
- s * 100,
1472
- l * 100
1473
- ];
1474
- };
1475
- convert.hcg.hwb = function(hcg) {
1476
- const c = hcg[1] / 100;
1477
- const v = c + hcg[2] / 100 * (1 - c);
1478
- return [
1479
- hcg[0],
1480
- (v - c) * 100,
1481
- (1 - v) * 100
1482
- ];
1483
- };
1484
- convert.hwb.hcg = function(hwb) {
1485
- const w = hwb[1] / 100;
1486
- const v = 1 - hwb[2] / 100;
1487
- const c = v - w;
1488
- let g = 0;
1489
- if (c < 1) g = (v - c) / (1 - c);
1490
- return [
1491
- hwb[0],
1492
- c * 100,
1493
- g * 100
1494
- ];
1495
- };
1496
- convert.apple.rgb = function(apple) {
1497
- return [
1498
- apple[0] / 65535 * 255,
1499
- apple[1] / 65535 * 255,
1500
- apple[2] / 65535 * 255
1501
- ];
1502
- };
1503
- convert.rgb.apple = function(rgb) {
1504
- return [
1505
- rgb[0] / 255 * 65535,
1506
- rgb[1] / 255 * 65535,
1507
- rgb[2] / 255 * 65535
1508
- ];
1509
- };
1510
- convert.gray.rgb = function(args) {
1511
- return [
1512
- args[0] / 100 * 255,
1513
- args[0] / 100 * 255,
1514
- args[0] / 100 * 255
1515
- ];
1516
- };
1517
- convert.gray.hsl = function(args) {
1518
- return [
1519
- 0,
1520
- 0,
1521
- args[0]
1522
- ];
1523
- };
1524
- convert.gray.hsv = convert.gray.hsl;
1525
- convert.gray.hwb = function(gray) {
1526
- return [
1527
- 0,
1528
- 100,
1529
- gray[0]
1530
- ];
1531
- };
1532
- convert.gray.cmyk = function(gray) {
1533
- return [
1534
- 0,
1535
- 0,
1536
- 0,
1537
- gray[0]
1538
- ];
1539
- };
1540
- convert.gray.lab = function(gray) {
1541
- return [
1542
- gray[0],
1543
- 0,
1544
- 0
1545
- ];
1546
- };
1547
- convert.gray.hex = function(gray) {
1548
- const val = Math.round(gray[0] / 100 * 255) & 255;
1549
- const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
1550
- return "000000".substring(string.length) + string;
1551
- };
1552
- convert.rgb.gray = function(rgb) {
1553
- return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
1554
- };
1555
- }));
1556
- //#endregion
1557
- //#region node_modules/color-convert/route.js
1558
- var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1559
- var conversions = require_conversions();
1560
- function buildGraph() {
1561
- const graph = {};
1562
- const models = Object.keys(conversions);
1563
- for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
1564
- distance: -1,
1565
- parent: null
1566
- };
1567
- return graph;
1568
- }
1569
- function deriveBFS(fromModel) {
1570
- const graph = buildGraph();
1571
- const queue = [fromModel];
1572
- graph[fromModel].distance = 0;
1573
- while (queue.length) {
1574
- const current = queue.pop();
1575
- const adjacents = Object.keys(conversions[current]);
1576
- for (let len = adjacents.length, i = 0; i < len; i++) {
1577
- const adjacent = adjacents[i];
1578
- const node = graph[adjacent];
1579
- if (node.distance === -1) {
1580
- node.distance = graph[current].distance + 1;
1581
- node.parent = current;
1582
- queue.unshift(adjacent);
1583
- }
1584
- }
1585
- }
1586
- return graph;
1587
- }
1588
- function link(from, to) {
1589
- return function(args) {
1590
- return to(from(args));
1591
- };
1592
- }
1593
- function wrapConversion(toModel, graph) {
1594
- const path = [graph[toModel].parent, toModel];
1595
- let fn = conversions[graph[toModel].parent][toModel];
1596
- let cur = graph[toModel].parent;
1597
- while (graph[cur].parent) {
1598
- path.unshift(graph[cur].parent);
1599
- fn = link(conversions[graph[cur].parent][cur], fn);
1600
- cur = graph[cur].parent;
1601
- }
1602
- fn.conversion = path;
1603
- return fn;
1604
- }
1605
- module.exports = function(fromModel) {
1606
- const graph = deriveBFS(fromModel);
1607
- const conversion = {};
1608
- const models = Object.keys(graph);
1609
- for (let len = models.length, i = 0; i < len; i++) {
1610
- const toModel = models[i];
1611
- if (graph[toModel].parent === null) continue;
1612
- conversion[toModel] = wrapConversion(toModel, graph);
59
+ Object.keys(styles$1.modifier);
60
+ var foregroundColorNames = Object.keys(styles$1.color);
61
+ var backgroundColorNames = Object.keys(styles$1.bgColor);
62
+ [...foregroundColorNames, ...backgroundColorNames];
63
+ function assembleStyles() {
64
+ const codes = /* @__PURE__ */ new Map();
65
+ for (const [groupName, group] of Object.entries(styles$1)) {
66
+ for (const [styleName, style] of Object.entries(group)) {
67
+ styles$1[styleName] = {
68
+ open: `\u001B[${style[0]}m`,
69
+ close: `\u001B[${style[1]}m`
70
+ };
71
+ group[styleName] = styles$1[styleName];
72
+ codes.set(style[0], style[1]);
1613
73
  }
1614
- return conversion;
1615
- };
1616
- }));
1617
- //#endregion
1618
- //#region node_modules/color-convert/index.js
1619
- var require_color_convert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1620
- var conversions = require_conversions();
1621
- var route = require_route();
1622
- var convert = {};
1623
- var models = Object.keys(conversions);
1624
- function wrapRaw(fn) {
1625
- const wrappedFn = function(...args) {
1626
- const arg0 = args[0];
1627
- if (arg0 === void 0 || arg0 === null) return arg0;
1628
- if (arg0.length > 1) args = arg0;
1629
- return fn(args);
1630
- };
1631
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1632
- return wrappedFn;
1633
- }
1634
- function wrapRounded(fn) {
1635
- const wrappedFn = function(...args) {
1636
- const arg0 = args[0];
1637
- if (arg0 === void 0 || arg0 === null) return arg0;
1638
- if (arg0.length > 1) args = arg0;
1639
- const result = fn(args);
1640
- if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
1641
- return result;
1642
- };
1643
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1644
- return wrappedFn;
1645
- }
1646
- models.forEach((fromModel) => {
1647
- convert[fromModel] = {};
1648
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1649
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1650
- const routes = route(fromModel);
1651
- Object.keys(routes).forEach((toModel) => {
1652
- const fn = routes[toModel];
1653
- convert[fromModel][toModel] = wrapRounded(fn);
1654
- convert[fromModel][toModel].raw = wrapRaw(fn);
74
+ Object.defineProperty(styles$1, groupName, {
75
+ value: group,
76
+ enumerable: false
1655
77
  });
78
+ }
79
+ Object.defineProperty(styles$1, "codes", {
80
+ value: codes,
81
+ enumerable: false
1656
82
  });
1657
- module.exports = convert;
1658
- }));
1659
- //#endregion
1660
- //#region node_modules/ansi-styles/index.js
1661
- var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1662
- var wrapAnsi16 = (fn, offset) => (...args) => {
1663
- return `\u001B[${fn(...args) + offset}m`;
1664
- };
1665
- var wrapAnsi256 = (fn, offset) => (...args) => {
1666
- const code = fn(...args);
1667
- return `\u001B[${38 + offset};5;${code}m`;
1668
- };
1669
- var wrapAnsi16m = (fn, offset) => (...args) => {
1670
- const rgb = fn(...args);
1671
- return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1672
- };
1673
- var ansi2ansi = (n) => n;
1674
- var rgb2rgb = (r, g, b) => [
1675
- r,
1676
- g,
1677
- b
1678
- ];
1679
- var setLazyProperty = (object, property, get) => {
1680
- Object.defineProperty(object, property, {
1681
- get: () => {
1682
- const value = get();
1683
- Object.defineProperty(object, property, {
1684
- value,
1685
- enumerable: true,
1686
- configurable: true
1687
- });
1688
- return value;
83
+ styles$1.color.close = "\x1B[39m";
84
+ styles$1.bgColor.close = "\x1B[49m";
85
+ styles$1.color.ansi = wrapAnsi16();
86
+ styles$1.color.ansi256 = wrapAnsi256();
87
+ styles$1.color.ansi16m = wrapAnsi16m();
88
+ styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
89
+ styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
90
+ styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
91
+ Object.defineProperties(styles$1, {
92
+ rgbToAnsi256: {
93
+ value(red, green, blue) {
94
+ if (red === green && green === blue) {
95
+ if (red < 8) return 16;
96
+ if (red > 248) return 231;
97
+ return Math.round((red - 8) / 247 * 24) + 232;
98
+ }
99
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1689
100
  },
1690
- enumerable: true,
1691
- configurable: true
1692
- });
1693
- };
1694
- /** @type {typeof import('color-convert')} */
1695
- var colorConvert;
1696
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1697
- if (colorConvert === void 0) colorConvert = require_color_convert();
1698
- const offset = isBackground ? 10 : 0;
1699
- const styles = {};
1700
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1701
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1702
- if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
1703
- else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
1704
- }
1705
- return styles;
1706
- };
1707
- function assembleStyles() {
1708
- const codes = /* @__PURE__ */ new Map();
1709
- const styles = {
1710
- modifier: {
1711
- reset: [0, 0],
1712
- bold: [1, 22],
1713
- dim: [2, 22],
1714
- italic: [3, 23],
1715
- underline: [4, 24],
1716
- inverse: [7, 27],
1717
- hidden: [8, 28],
1718
- strikethrough: [9, 29]
101
+ enumerable: false
102
+ },
103
+ hexToRgb: {
104
+ value(hex) {
105
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
106
+ if (!matches) return [
107
+ 0,
108
+ 0,
109
+ 0
110
+ ];
111
+ let [colorString] = matches;
112
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
113
+ const integer = Number.parseInt(colorString, 16);
114
+ return [
115
+ integer >> 16 & 255,
116
+ integer >> 8 & 255,
117
+ integer & 255
118
+ ];
1719
119
  },
1720
- color: {
1721
- black: [30, 39],
1722
- red: [31, 39],
1723
- green: [32, 39],
1724
- yellow: [33, 39],
1725
- blue: [34, 39],
1726
- magenta: [35, 39],
1727
- cyan: [36, 39],
1728
- white: [37, 39],
1729
- blackBright: [90, 39],
1730
- redBright: [91, 39],
1731
- greenBright: [92, 39],
1732
- yellowBright: [93, 39],
1733
- blueBright: [94, 39],
1734
- magentaBright: [95, 39],
1735
- cyanBright: [96, 39],
1736
- whiteBright: [97, 39]
120
+ enumerable: false
121
+ },
122
+ hexToAnsi256: {
123
+ value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
124
+ enumerable: false
125
+ },
126
+ ansi256ToAnsi: {
127
+ value(code) {
128
+ if (code < 8) return 30 + code;
129
+ if (code < 16) return 90 + (code - 8);
130
+ let red;
131
+ let green;
132
+ let blue;
133
+ if (code >= 232) {
134
+ red = ((code - 232) * 10 + 8) / 255;
135
+ green = red;
136
+ blue = red;
137
+ } else {
138
+ code -= 16;
139
+ const remainder = code % 36;
140
+ red = Math.floor(code / 36) / 5;
141
+ green = Math.floor(remainder / 6) / 5;
142
+ blue = remainder % 6 / 5;
143
+ }
144
+ const value = Math.max(red, green, blue) * 2;
145
+ if (value === 0) return 30;
146
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
147
+ if (value === 2) result += 60;
148
+ return result;
1737
149
  },
1738
- bgColor: {
1739
- bgBlack: [40, 49],
1740
- bgRed: [41, 49],
1741
- bgGreen: [42, 49],
1742
- bgYellow: [43, 49],
1743
- bgBlue: [44, 49],
1744
- bgMagenta: [45, 49],
1745
- bgCyan: [46, 49],
1746
- bgWhite: [47, 49],
1747
- bgBlackBright: [100, 49],
1748
- bgRedBright: [101, 49],
1749
- bgGreenBright: [102, 49],
1750
- bgYellowBright: [103, 49],
1751
- bgBlueBright: [104, 49],
1752
- bgMagentaBright: [105, 49],
1753
- bgCyanBright: [106, 49],
1754
- bgWhiteBright: [107, 49]
1755
- }
1756
- };
1757
- styles.color.gray = styles.color.blackBright;
1758
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1759
- styles.color.grey = styles.color.blackBright;
1760
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1761
- for (const [groupName, group] of Object.entries(styles)) {
1762
- for (const [styleName, style] of Object.entries(group)) {
1763
- styles[styleName] = {
1764
- open: `\u001B[${style[0]}m`,
1765
- close: `\u001B[${style[1]}m`
1766
- };
1767
- group[styleName] = styles[styleName];
1768
- codes.set(style[0], style[1]);
1769
- }
1770
- Object.defineProperty(styles, groupName, {
1771
- value: group,
1772
- enumerable: false
1773
- });
1774
- }
1775
- Object.defineProperty(styles, "codes", {
1776
- value: codes,
1777
150
  enumerable: false
1778
- });
1779
- styles.color.close = "\x1B[39m";
1780
- styles.bgColor.close = "\x1B[49m";
1781
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1782
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1783
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1784
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1785
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1786
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1787
- return styles;
1788
- }
1789
- Object.defineProperty(module, "exports", {
1790
- enumerable: true,
1791
- get: assembleStyles
151
+ },
152
+ rgbToAnsi: {
153
+ value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
154
+ enumerable: false
155
+ },
156
+ hexToAnsi: {
157
+ value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
158
+ enumerable: false
159
+ }
1792
160
  });
1793
- }));
1794
- //#endregion
1795
- //#region node_modules/supports-color/browser.js
1796
- var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1797
- module.exports = {
1798
- stdout: false,
1799
- stderr: false
1800
- };
1801
- }));
161
+ return styles$1;
162
+ }
163
+ var ansiStyles = assembleStyles();
1802
164
  //#endregion
1803
- //#region node_modules/chalk/source/util.js
1804
- var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1805
- var stringReplaceAll = (string, substring, replacer) => {
1806
- let index = string.indexOf(substring);
1807
- if (index === -1) return string;
1808
- const substringLength = substring.length;
1809
- let endIndex = 0;
1810
- let returnValue = "";
1811
- do {
1812
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1813
- endIndex = index + substringLength;
1814
- index = string.indexOf(substring, endIndex);
1815
- } while (index !== -1);
1816
- returnValue += string.substr(endIndex);
1817
- return returnValue;
1818
- };
1819
- var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1820
- let endIndex = 0;
1821
- let returnValue = "";
1822
- do {
1823
- const gotCR = string[index - 1] === "\r";
1824
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1825
- endIndex = index + 1;
1826
- index = string.indexOf("\n", endIndex);
1827
- } while (index !== -1);
1828
- returnValue += string.substr(endIndex);
1829
- return returnValue;
1830
- };
1831
- module.exports = {
1832
- stringReplaceAll,
1833
- stringEncaseCRLFWithFirstIndex
1834
- };
1835
- }));
165
+ //#region node_modules/chalk/source/vendor/supports-color/browser.js
166
+ var level = (() => {
167
+ if (!("navigator" in globalThis)) return 0;
168
+ if (globalThis.navigator.userAgentData) {
169
+ const brand = navigator.userAgentData.brands.find(({ brand }) => brand === "Chromium");
170
+ if (brand && brand.version > 93) return 3;
171
+ }
172
+ if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) return 1;
173
+ return 0;
174
+ })();
175
+ var colorSupport = level !== 0 && {
176
+ level,
177
+ hasBasic: true,
178
+ has256: level >= 2,
179
+ has16m: level >= 3
180
+ };
181
+ var supportsColor = {
182
+ stdout: colorSupport,
183
+ stderr: colorSupport
184
+ };
1836
185
  //#endregion
1837
- //#region node_modules/chalk/source/templates.js
1838
- var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1839
- 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;
1840
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
1841
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
1842
- var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
1843
- var ESCAPES = new Map([
1844
- ["n", "\n"],
1845
- ["r", "\r"],
1846
- ["t", " "],
1847
- ["b", "\b"],
1848
- ["f", "\f"],
1849
- ["v", "\v"],
1850
- ["0", "\0"],
1851
- ["\\", "\\"],
1852
- ["e", "\x1B"],
1853
- ["a", "\x07"]
1854
- ]);
1855
- function unescape(c) {
1856
- const u = c[0] === "u";
1857
- const bracket = c[1] === "{";
1858
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) return String.fromCharCode(parseInt(c.slice(1), 16));
1859
- if (u && bracket) return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
1860
- return ESCAPES.get(c) || c;
1861
- }
1862
- function parseArguments(name, arguments_) {
1863
- const results = [];
1864
- const chunks = arguments_.trim().split(/\s*,\s*/g);
1865
- let matches;
1866
- for (const chunk of chunks) {
1867
- const number = Number(chunk);
1868
- if (!Number.isNaN(number)) results.push(number);
1869
- else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
1870
- else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
1871
- }
1872
- return results;
1873
- }
1874
- function parseStyle(style) {
1875
- STYLE_REGEX.lastIndex = 0;
1876
- const results = [];
1877
- let matches;
1878
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
1879
- const name = matches[1];
1880
- if (matches[2]) {
1881
- const args = parseArguments(name, matches[2]);
1882
- results.push([name].concat(args));
1883
- } else results.push([name]);
1884
- }
1885
- return results;
1886
- }
1887
- function buildStyle(chalk, styles) {
1888
- const enabled = {};
1889
- for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
1890
- let current = chalk;
1891
- for (const [styleName, styles] of Object.entries(enabled)) {
1892
- if (!Array.isArray(styles)) continue;
1893
- if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
1894
- current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
1895
- }
1896
- return current;
1897
- }
1898
- module.exports = (chalk, temporary) => {
1899
- const styles = [];
1900
- const chunks = [];
1901
- let chunk = [];
1902
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
1903
- if (escapeCharacter) chunk.push(unescape(escapeCharacter));
1904
- else if (style) {
1905
- const string = chunk.join("");
1906
- chunk = [];
1907
- chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
1908
- styles.push({
1909
- inverse,
1910
- styles: parseStyle(style)
1911
- });
1912
- } else if (close) {
1913
- if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
1914
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
1915
- chunk = [];
1916
- styles.pop();
1917
- } else chunk.push(character);
1918
- });
1919
- chunks.push(chunk.join(""));
1920
- if (styles.length > 0) {
1921
- const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1922
- throw new Error(errMessage);
1923
- }
1924
- return chunks.join("");
1925
- };
1926
- }));
186
+ //#region node_modules/chalk/source/utilities.js
187
+ function stringReplaceAll(string, substring, replacer) {
188
+ let index = string.indexOf(substring);
189
+ if (index === -1) return string;
190
+ const substringLength = substring.length;
191
+ let endIndex = 0;
192
+ let returnValue = "";
193
+ do {
194
+ returnValue += string.slice(endIndex, index) + substring + replacer;
195
+ endIndex = index + substringLength;
196
+ index = string.indexOf(substring, endIndex);
197
+ } while (index !== -1);
198
+ returnValue += string.slice(endIndex);
199
+ return returnValue;
200
+ }
201
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
202
+ let endIndex = 0;
203
+ let returnValue = "";
204
+ do {
205
+ const gotCR = string[index - 1] === "\r";
206
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
207
+ endIndex = index + 1;
208
+ index = string.indexOf("\n", endIndex);
209
+ } while (index !== -1);
210
+ returnValue += string.slice(endIndex);
211
+ return returnValue;
212
+ }
1927
213
  //#endregion
1928
- //#region src/commonTypes.ts
1929
- var import_source = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1930
- var ansiStyles = require_ansi_styles();
1931
- var { stdout: stdoutColor, stderr: stderrColor } = require_browser();
1932
- var { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = require_util();
1933
- var { isArray } = Array;
1934
- var levelMapping = [
1935
- "ansi",
1936
- "ansi",
1937
- "ansi256",
1938
- "ansi16m"
1939
- ];
1940
- var styles = Object.create(null);
1941
- var applyOptions = (object, options = {}) => {
1942
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
1943
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
1944
- object.level = options.level === void 0 ? colorLevel : options.level;
1945
- };
1946
- var ChalkClass = class {
1947
- constructor(options) {
1948
- return chalkFactory(options);
1949
- }
1950
- };
1951
- var chalkFactory = (options) => {
1952
- const chalk = {};
1953
- applyOptions(chalk, options);
1954
- chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
1955
- Object.setPrototypeOf(chalk, Chalk.prototype);
1956
- Object.setPrototypeOf(chalk.template, chalk);
1957
- chalk.template.constructor = () => {
1958
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
214
+ //#region node_modules/chalk/source/index.js
215
+ var { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
216
+ var GENERATOR = Symbol("GENERATOR");
217
+ var STYLER = Symbol("STYLER");
218
+ var IS_EMPTY = Symbol("IS_EMPTY");
219
+ var levelMapping = [
220
+ "ansi",
221
+ "ansi",
222
+ "ansi256",
223
+ "ansi16m"
224
+ ];
225
+ var styles = Object.create(null);
226
+ var applyOptions = (object, options = {}) => {
227
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
228
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
229
+ object.level = options.level === void 0 ? colorLevel : options.level;
230
+ };
231
+ var chalkFactory = (options) => {
232
+ const chalk = (...strings) => strings.join(" ");
233
+ applyOptions(chalk, options);
234
+ Object.setPrototypeOf(chalk, createChalk.prototype);
235
+ return chalk;
236
+ };
237
+ function createChalk(options) {
238
+ return chalkFactory(options);
239
+ }
240
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
241
+ for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
242
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
243
+ Object.defineProperty(this, styleName, { value: builder });
244
+ return builder;
245
+ } };
246
+ styles.visible = { get() {
247
+ const builder = createBuilder(this, this[STYLER], true);
248
+ Object.defineProperty(this, "visible", { value: builder });
249
+ return builder;
250
+ } };
251
+ var getModelAnsi = (model, level, type, ...arguments_) => {
252
+ if (model === "rgb") {
253
+ if (level === "ansi16m") return ansiStyles[type].ansi16m(...arguments_);
254
+ if (level === "ansi256") return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
255
+ return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
256
+ }
257
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles.hexToRgb(...arguments_));
258
+ return ansiStyles[type][model](...arguments_);
259
+ };
260
+ for (const model of [
261
+ "rgb",
262
+ "hex",
263
+ "ansi256"
264
+ ]) {
265
+ styles[model] = { get() {
266
+ const { level } = this;
267
+ return function(...arguments_) {
268
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles.color.close, this[STYLER]);
269
+ return createBuilder(this, styler, this[IS_EMPTY]);
1959
270
  };
1960
- chalk.template.Instance = ChalkClass;
1961
- return chalk.template;
1962
- };
1963
- function Chalk(options) {
1964
- return chalkFactory(options);
1965
- }
1966
- for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
1967
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1968
- Object.defineProperty(this, styleName, { value: builder });
1969
- return builder;
1970
- } };
1971
- styles.visible = { get() {
1972
- const builder = createBuilder(this, this._styler, true);
1973
- Object.defineProperty(this, "visible", { value: builder });
1974
- return builder;
1975
271
  } };
1976
- var usedModels = [
1977
- "rgb",
1978
- "hex",
1979
- "keyword",
1980
- "hsl",
1981
- "hsv",
1982
- "hwb",
1983
- "ansi",
1984
- "ansi256"
1985
- ];
1986
- for (const model of usedModels) styles[model] = { get() {
272
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
273
+ styles[bgModel] = { get() {
1987
274
  const { level } = this;
1988
275
  return function(...arguments_) {
1989
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1990
- return createBuilder(this, styler, this._isEmpty);
276
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
277
+ return createBuilder(this, styler, this[IS_EMPTY]);
1991
278
  };
1992
279
  } };
1993
- for (const model of usedModels) {
1994
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1995
- styles[bgModel] = { get() {
1996
- const { level } = this;
1997
- return function(...arguments_) {
1998
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
1999
- return createBuilder(this, styler, this._isEmpty);
2000
- };
2001
- } };
2002
- }
2003
- var proto = Object.defineProperties(() => {}, {
2004
- ...styles,
2005
- level: {
2006
- enumerable: true,
2007
- get() {
2008
- return this._generator.level;
2009
- },
2010
- set(level) {
2011
- this._generator.level = level;
2012
- }
2013
- }
2014
- });
2015
- var createStyler = (open, close, parent) => {
2016
- let openAll;
2017
- let closeAll;
2018
- if (parent === void 0) {
2019
- openAll = open;
2020
- closeAll = close;
2021
- } else {
2022
- openAll = parent.openAll + open;
2023
- closeAll = close + parent.closeAll;
2024
- }
2025
- return {
2026
- open,
2027
- close,
2028
- openAll,
2029
- closeAll,
2030
- parent
2031
- };
2032
- };
2033
- var createBuilder = (self, _styler, _isEmpty) => {
2034
- const builder = (...arguments_) => {
2035
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) return applyStyle(builder, chalkTag(builder, ...arguments_));
2036
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2037
- };
2038
- Object.setPrototypeOf(builder, proto);
2039
- builder._generator = self;
2040
- builder._styler = _styler;
2041
- builder._isEmpty = _isEmpty;
2042
- return builder;
2043
- };
2044
- var applyStyle = (self, string) => {
2045
- if (self.level <= 0 || !string) return self._isEmpty ? "" : string;
2046
- let styler = self._styler;
2047
- if (styler === void 0) return string;
2048
- const { openAll, closeAll } = styler;
2049
- if (string.indexOf("\x1B") !== -1) while (styler !== void 0) {
2050
- string = stringReplaceAll(string, styler.close, styler.open);
2051
- styler = styler.parent;
280
+ }
281
+ var proto = Object.defineProperties(() => {}, {
282
+ ...styles,
283
+ level: {
284
+ enumerable: true,
285
+ get() {
286
+ return this[GENERATOR].level;
287
+ },
288
+ set(level) {
289
+ this[GENERATOR].level = level;
2052
290
  }
2053
- const lfIndex = string.indexOf("\n");
2054
- if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2055
- return openAll + string + closeAll;
2056
- };
2057
- var template;
2058
- var chalkTag = (chalk, ...strings) => {
2059
- const [firstString] = strings;
2060
- if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
2061
- const arguments_ = strings.slice(1);
2062
- const parts = [firstString.raw[0]];
2063
- for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
2064
- if (template === void 0) template = require_templates();
2065
- return template(chalk, parts.join(""));
291
+ }
292
+ });
293
+ var createStyler = (open, close, parent) => {
294
+ let openAll;
295
+ let closeAll;
296
+ if (parent === void 0) {
297
+ openAll = open;
298
+ closeAll = close;
299
+ } else {
300
+ openAll = parent.openAll + open;
301
+ closeAll = close + parent.closeAll;
302
+ }
303
+ return {
304
+ open,
305
+ close,
306
+ openAll,
307
+ closeAll,
308
+ parent
2066
309
  };
2067
- Object.defineProperties(Chalk.prototype, styles);
2068
- var chalk = Chalk();
2069
- chalk.supportsColor = stdoutColor;
2070
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
2071
- chalk.stderr.supportsColor = stderrColor;
2072
- module.exports = chalk;
2073
- })))());
310
+ };
311
+ var createBuilder = (self, _styler, _isEmpty) => {
312
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
313
+ Object.setPrototypeOf(builder, proto);
314
+ builder[GENERATOR] = self;
315
+ builder[STYLER] = _styler;
316
+ builder[IS_EMPTY] = _isEmpty;
317
+ return builder;
318
+ };
319
+ var applyStyle = (self, string) => {
320
+ if (self.level <= 0 || !string) return self[IS_EMPTY] ? "" : string;
321
+ let styler = self[STYLER];
322
+ if (styler === void 0) return string;
323
+ const { openAll, closeAll } = styler;
324
+ if (string.includes("\x1B")) while (styler !== void 0) {
325
+ string = stringReplaceAll(string, styler.close, styler.open);
326
+ styler = styler.parent;
327
+ }
328
+ const lfIndex = string.indexOf("\n");
329
+ if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
330
+ return openAll + string + closeAll;
331
+ };
332
+ Object.defineProperties(createChalk.prototype, styles);
333
+ var chalk = createChalk();
334
+ createChalk({ level: stderrColor ? stderrColor.level : 0 });
335
+ //#endregion
336
+ //#region src/commonTypes.ts
2074
337
  var ModelDelimeter = /* @__PURE__ */ function(ModelDelimeter) {
2075
338
  ModelDelimeter["ROOT"] = "_";
2076
339
  ModelDelimeter["SEPERATOR"] = "|";
@@ -2093,25 +356,25 @@ var CheckValidChar = (checkParams) => {
2093
356
  };
2094
357
  var defaultLogger = {
2095
358
  debug(message) {
2096
- console.log(import_source.default.grey(`debug: ${message}`));
359
+ console.log(chalk.grey(`debug: ${message}`));
2097
360
  },
2098
361
  error(message) {
2099
- console.log(import_source.default.red(`error: ${message}`));
362
+ console.log(chalk.red(`error: ${message}`));
2100
363
  },
2101
364
  http(message) {
2102
- console.log(import_source.default.cyan(`http: ${message}`));
365
+ console.log(chalk.cyan(`http: ${message}`));
2103
366
  },
2104
367
  info(message) {
2105
- console.log(import_source.default.white(`info: ${message}`));
368
+ console.log(chalk.white(`info: ${message}`));
2106
369
  },
2107
370
  silly(message) {
2108
- console.log(import_source.default.yellow(`silly: ${message}`));
371
+ console.log(chalk.yellow(`silly: ${message}`));
2109
372
  },
2110
373
  verbose(message) {
2111
- console.log(import_source.default.green(`verbose: ${message}`));
374
+ console.log(chalk.green(`verbose: ${message}`));
2112
375
  },
2113
376
  warn(message) {
2114
- console.log(import_source.default.magenta(`warn: ${message}`));
377
+ console.log(chalk.magenta(`warn: ${message}`));
2115
378
  }
2116
379
  };
2117
380
  var emptyLogger = {
@@ -2142,32 +405,6 @@ function GetErrorPayload(errorCode, details = null) {
2142
405
  };
2143
406
  }
2144
407
  //#endregion
2145
- //#region src/validate.ts
2146
- var ajv = new Ajv();
2147
- var _Validate = (validator, payload) => {
2148
- if (!validator(payload)) return validator.errors;
2149
- else return null;
2150
- };
2151
- function AddSchema(name, schema) {
2152
- ajv.addSchema(schema, name);
2153
- }
2154
- function Validate(name, payload) {
2155
- const validator = ajv.getSchema(name);
2156
- if (validator) return _Validate(validator, payload);
2157
- }
2158
- //#endregion
2159
- //#region src/stsoptionsbase.ts
2160
- var STSOptionsBase = class {
2161
- #options;
2162
- constructor(options = null) {
2163
- this.#options = options;
2164
- if (options !== null) if (typeof options.validator === "undefined") {} else Validate(options.validator, options);
2165
- }
2166
- get options() {
2167
- return this.#options;
2168
- }
2169
- };
2170
- //#endregion
2171
408
  //#region src/sleep.ts
2172
409
  async function Sleep(milliseconds = 1e3) {
2173
410
  return new Promise((resolve) => setTimeout(resolve, milliseconds));
@@ -2511,6 +748,9 @@ var AgentManager = class {
2511
748
  }
2512
749
  };
2513
750
  //#endregion
2514
- export { AddSchema, CheckValidChar, GetErrorPayload, JestSleep, ModelDelimeter, OAuth2ParameterErrorType, OAuth2ParameterType, OIDCAddressClaim, OIDCStandardClaim, STSAxiosConfig, STSOptionsBase, Sleep, Validate, compareParameterTypes, createAgentManager, defaultLogger, edbaction, emptyLogger };
751
+ //#region src/index.ts
752
+ var isNode = typeof process !== "undefined" && typeof process.release !== "undefined" && process.release.name === "node";
753
+ //#endregion
754
+ export { CheckValidChar, GetErrorPayload, JestSleep, ModelDelimeter, OAuth2ParameterErrorType, OAuth2ParameterType, OIDCAddressClaim, OIDCStandardClaim, STSAxiosConfig, Sleep, compareParameterTypes, createAgentManager, defaultLogger, edbaction, emptyLogger, isNode };
2515
755
 
2516
756
  //# sourceMappingURL=index.mjs.map