@nsshunt/stsrunnerframework 2.0.10 → 2.0.12

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.cjs CHANGED
@@ -22,8 +22,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  enumerable: true
23
23
  }) : target, mod));
24
24
  //#endregion
25
- let detect_node = require("detect-node");
26
- detect_node = __toESM(detect_node);
27
25
  let _nsshunt_stsutils = require("@nsshunt/stsutils");
28
26
  let _nsshunt_stsobservability = require("@nsshunt/stsobservability");
29
27
  //#region src/commonTypes.ts
@@ -92,2056 +90,343 @@ var PublishMessageCommandsTestRunner = {
92
90
  ExecuteRefreshTokenResponse: "__ExecuteRefreshTokenResponse"
93
91
  };
94
92
  //#endregion
95
- //#region node_modules/color-name/index.js
96
- var require_color_name = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97
- module.exports = {
98
- "aliceblue": [
99
- 240,
100
- 248,
101
- 255
102
- ],
103
- "antiquewhite": [
104
- 250,
105
- 235,
106
- 215
107
- ],
108
- "aqua": [
109
- 0,
110
- 255,
111
- 255
112
- ],
113
- "aquamarine": [
114
- 127,
115
- 255,
116
- 212
117
- ],
118
- "azure": [
119
- 240,
120
- 255,
121
- 255
122
- ],
123
- "beige": [
124
- 245,
125
- 245,
126
- 220
127
- ],
128
- "bisque": [
129
- 255,
130
- 228,
131
- 196
132
- ],
133
- "black": [
134
- 0,
135
- 0,
136
- 0
137
- ],
138
- "blanchedalmond": [
139
- 255,
140
- 235,
141
- 205
142
- ],
143
- "blue": [
144
- 0,
145
- 0,
146
- 255
147
- ],
148
- "blueviolet": [
149
- 138,
150
- 43,
151
- 226
152
- ],
153
- "brown": [
154
- 165,
155
- 42,
156
- 42
157
- ],
158
- "burlywood": [
159
- 222,
160
- 184,
161
- 135
162
- ],
163
- "cadetblue": [
164
- 95,
165
- 158,
166
- 160
167
- ],
168
- "chartreuse": [
169
- 127,
170
- 255,
171
- 0
172
- ],
173
- "chocolate": [
174
- 210,
175
- 105,
176
- 30
177
- ],
178
- "coral": [
179
- 255,
180
- 127,
181
- 80
182
- ],
183
- "cornflowerblue": [
184
- 100,
185
- 149,
186
- 237
187
- ],
188
- "cornsilk": [
189
- 255,
190
- 248,
191
- 220
192
- ],
193
- "crimson": [
194
- 220,
195
- 20,
196
- 60
197
- ],
198
- "cyan": [
199
- 0,
200
- 255,
201
- 255
202
- ],
203
- "darkblue": [
204
- 0,
205
- 0,
206
- 139
207
- ],
208
- "darkcyan": [
209
- 0,
210
- 139,
211
- 139
212
- ],
213
- "darkgoldenrod": [
214
- 184,
215
- 134,
216
- 11
217
- ],
218
- "darkgray": [
219
- 169,
220
- 169,
221
- 169
222
- ],
223
- "darkgreen": [
224
- 0,
225
- 100,
226
- 0
227
- ],
228
- "darkgrey": [
229
- 169,
230
- 169,
231
- 169
232
- ],
233
- "darkkhaki": [
234
- 189,
235
- 183,
236
- 107
237
- ],
238
- "darkmagenta": [
239
- 139,
240
- 0,
241
- 139
242
- ],
243
- "darkolivegreen": [
244
- 85,
245
- 107,
246
- 47
247
- ],
248
- "darkorange": [
249
- 255,
250
- 140,
251
- 0
252
- ],
253
- "darkorchid": [
254
- 153,
255
- 50,
256
- 204
257
- ],
258
- "darkred": [
259
- 139,
260
- 0,
261
- 0
262
- ],
263
- "darksalmon": [
264
- 233,
265
- 150,
266
- 122
267
- ],
268
- "darkseagreen": [
269
- 143,
270
- 188,
271
- 143
272
- ],
273
- "darkslateblue": [
274
- 72,
275
- 61,
276
- 139
277
- ],
278
- "darkslategray": [
279
- 47,
280
- 79,
281
- 79
282
- ],
283
- "darkslategrey": [
284
- 47,
285
- 79,
286
- 79
287
- ],
288
- "darkturquoise": [
289
- 0,
290
- 206,
291
- 209
292
- ],
293
- "darkviolet": [
294
- 148,
295
- 0,
296
- 211
297
- ],
298
- "deeppink": [
299
- 255,
300
- 20,
301
- 147
302
- ],
303
- "deepskyblue": [
304
- 0,
305
- 191,
306
- 255
307
- ],
308
- "dimgray": [
309
- 105,
310
- 105,
311
- 105
312
- ],
313
- "dimgrey": [
314
- 105,
315
- 105,
316
- 105
317
- ],
318
- "dodgerblue": [
319
- 30,
320
- 144,
321
- 255
322
- ],
323
- "firebrick": [
324
- 178,
325
- 34,
326
- 34
327
- ],
328
- "floralwhite": [
329
- 255,
330
- 250,
331
- 240
332
- ],
333
- "forestgreen": [
334
- 34,
335
- 139,
336
- 34
337
- ],
338
- "fuchsia": [
339
- 255,
340
- 0,
341
- 255
342
- ],
343
- "gainsboro": [
344
- 220,
345
- 220,
346
- 220
347
- ],
348
- "ghostwhite": [
349
- 248,
350
- 248,
351
- 255
352
- ],
353
- "gold": [
354
- 255,
355
- 215,
356
- 0
357
- ],
358
- "goldenrod": [
359
- 218,
360
- 165,
361
- 32
362
- ],
363
- "gray": [
364
- 128,
365
- 128,
366
- 128
367
- ],
368
- "green": [
369
- 0,
370
- 128,
371
- 0
372
- ],
373
- "greenyellow": [
374
- 173,
375
- 255,
376
- 47
377
- ],
378
- "grey": [
379
- 128,
380
- 128,
381
- 128
382
- ],
383
- "honeydew": [
384
- 240,
385
- 255,
386
- 240
387
- ],
388
- "hotpink": [
389
- 255,
390
- 105,
391
- 180
392
- ],
393
- "indianred": [
394
- 205,
395
- 92,
396
- 92
397
- ],
398
- "indigo": [
399
- 75,
400
- 0,
401
- 130
402
- ],
403
- "ivory": [
404
- 255,
405
- 255,
406
- 240
407
- ],
408
- "khaki": [
409
- 240,
410
- 230,
411
- 140
412
- ],
413
- "lavender": [
414
- 230,
415
- 230,
416
- 250
417
- ],
418
- "lavenderblush": [
419
- 255,
420
- 240,
421
- 245
422
- ],
423
- "lawngreen": [
424
- 124,
425
- 252,
426
- 0
427
- ],
428
- "lemonchiffon": [
429
- 255,
430
- 250,
431
- 205
432
- ],
433
- "lightblue": [
434
- 173,
435
- 216,
436
- 230
437
- ],
438
- "lightcoral": [
439
- 240,
440
- 128,
441
- 128
442
- ],
443
- "lightcyan": [
444
- 224,
445
- 255,
446
- 255
447
- ],
448
- "lightgoldenrodyellow": [
449
- 250,
450
- 250,
451
- 210
452
- ],
453
- "lightgray": [
454
- 211,
455
- 211,
456
- 211
457
- ],
458
- "lightgreen": [
459
- 144,
460
- 238,
461
- 144
462
- ],
463
- "lightgrey": [
464
- 211,
465
- 211,
466
- 211
467
- ],
468
- "lightpink": [
469
- 255,
470
- 182,
471
- 193
472
- ],
473
- "lightsalmon": [
474
- 255,
475
- 160,
476
- 122
477
- ],
478
- "lightseagreen": [
479
- 32,
480
- 178,
481
- 170
482
- ],
483
- "lightskyblue": [
484
- 135,
485
- 206,
486
- 250
487
- ],
488
- "lightslategray": [
489
- 119,
490
- 136,
491
- 153
492
- ],
493
- "lightslategrey": [
494
- 119,
495
- 136,
496
- 153
497
- ],
498
- "lightsteelblue": [
499
- 176,
500
- 196,
501
- 222
502
- ],
503
- "lightyellow": [
504
- 255,
505
- 255,
506
- 224
507
- ],
508
- "lime": [
509
- 0,
510
- 255,
511
- 0
512
- ],
513
- "limegreen": [
514
- 50,
515
- 205,
516
- 50
517
- ],
518
- "linen": [
519
- 250,
520
- 240,
521
- 230
522
- ],
523
- "magenta": [
524
- 255,
525
- 0,
526
- 255
527
- ],
528
- "maroon": [
529
- 128,
530
- 0,
531
- 0
532
- ],
533
- "mediumaquamarine": [
534
- 102,
535
- 205,
536
- 170
537
- ],
538
- "mediumblue": [
539
- 0,
540
- 0,
541
- 205
542
- ],
543
- "mediumorchid": [
544
- 186,
545
- 85,
546
- 211
547
- ],
548
- "mediumpurple": [
549
- 147,
550
- 112,
551
- 219
552
- ],
553
- "mediumseagreen": [
554
- 60,
555
- 179,
556
- 113
557
- ],
558
- "mediumslateblue": [
559
- 123,
560
- 104,
561
- 238
562
- ],
563
- "mediumspringgreen": [
564
- 0,
565
- 250,
566
- 154
567
- ],
568
- "mediumturquoise": [
569
- 72,
570
- 209,
571
- 204
572
- ],
573
- "mediumvioletred": [
574
- 199,
575
- 21,
576
- 133
577
- ],
578
- "midnightblue": [
579
- 25,
580
- 25,
581
- 112
582
- ],
583
- "mintcream": [
584
- 245,
585
- 255,
586
- 250
587
- ],
588
- "mistyrose": [
589
- 255,
590
- 228,
591
- 225
592
- ],
593
- "moccasin": [
594
- 255,
595
- 228,
596
- 181
597
- ],
598
- "navajowhite": [
599
- 255,
600
- 222,
601
- 173
602
- ],
603
- "navy": [
604
- 0,
605
- 0,
606
- 128
607
- ],
608
- "oldlace": [
609
- 253,
610
- 245,
611
- 230
612
- ],
613
- "olive": [
614
- 128,
615
- 128,
616
- 0
617
- ],
618
- "olivedrab": [
619
- 107,
620
- 142,
621
- 35
622
- ],
623
- "orange": [
624
- 255,
625
- 165,
626
- 0
627
- ],
628
- "orangered": [
629
- 255,
630
- 69,
631
- 0
632
- ],
633
- "orchid": [
634
- 218,
635
- 112,
636
- 214
637
- ],
638
- "palegoldenrod": [
639
- 238,
640
- 232,
641
- 170
642
- ],
643
- "palegreen": [
644
- 152,
645
- 251,
646
- 152
647
- ],
648
- "paleturquoise": [
649
- 175,
650
- 238,
651
- 238
652
- ],
653
- "palevioletred": [
654
- 219,
655
- 112,
656
- 147
657
- ],
658
- "papayawhip": [
659
- 255,
660
- 239,
661
- 213
662
- ],
663
- "peachpuff": [
664
- 255,
665
- 218,
666
- 185
667
- ],
668
- "peru": [
669
- 205,
670
- 133,
671
- 63
672
- ],
673
- "pink": [
674
- 255,
675
- 192,
676
- 203
677
- ],
678
- "plum": [
679
- 221,
680
- 160,
681
- 221
682
- ],
683
- "powderblue": [
684
- 176,
685
- 224,
686
- 230
687
- ],
688
- "purple": [
689
- 128,
690
- 0,
691
- 128
692
- ],
693
- "rebeccapurple": [
694
- 102,
695
- 51,
696
- 153
697
- ],
698
- "red": [
699
- 255,
700
- 0,
701
- 0
702
- ],
703
- "rosybrown": [
704
- 188,
705
- 143,
706
- 143
707
- ],
708
- "royalblue": [
709
- 65,
710
- 105,
711
- 225
712
- ],
713
- "saddlebrown": [
714
- 139,
715
- 69,
716
- 19
717
- ],
718
- "salmon": [
719
- 250,
720
- 128,
721
- 114
722
- ],
723
- "sandybrown": [
724
- 244,
725
- 164,
726
- 96
727
- ],
728
- "seagreen": [
729
- 46,
730
- 139,
731
- 87
732
- ],
733
- "seashell": [
734
- 255,
735
- 245,
736
- 238
737
- ],
738
- "sienna": [
739
- 160,
740
- 82,
741
- 45
742
- ],
743
- "silver": [
744
- 192,
745
- 192,
746
- 192
747
- ],
748
- "skyblue": [
749
- 135,
750
- 206,
751
- 235
752
- ],
753
- "slateblue": [
754
- 106,
755
- 90,
756
- 205
757
- ],
758
- "slategray": [
759
- 112,
760
- 128,
761
- 144
762
- ],
763
- "slategrey": [
764
- 112,
765
- 128,
766
- 144
767
- ],
768
- "snow": [
769
- 255,
770
- 250,
771
- 250
772
- ],
773
- "springgreen": [
774
- 0,
775
- 255,
776
- 127
777
- ],
778
- "steelblue": [
779
- 70,
780
- 130,
781
- 180
782
- ],
783
- "tan": [
784
- 210,
785
- 180,
786
- 140
787
- ],
788
- "teal": [
789
- 0,
790
- 128,
791
- 128
792
- ],
793
- "thistle": [
794
- 216,
795
- 191,
796
- 216
797
- ],
798
- "tomato": [
799
- 255,
800
- 99,
801
- 71
802
- ],
803
- "turquoise": [
804
- 64,
805
- 224,
806
- 208
807
- ],
808
- "violet": [
809
- 238,
810
- 130,
811
- 238
812
- ],
813
- "wheat": [
814
- 245,
815
- 222,
816
- 179
817
- ],
818
- "white": [
819
- 255,
820
- 255,
821
- 255
822
- ],
823
- "whitesmoke": [
824
- 245,
825
- 245,
826
- 245
827
- ],
828
- "yellow": [
829
- 255,
830
- 255,
831
- 0
832
- ],
833
- "yellowgreen": [
834
- 154,
835
- 205,
836
- 50
837
- ]
838
- };
839
- }));
840
- //#endregion
841
- //#region node_modules/color-convert/conversions.js
842
- var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
843
- var cssKeywords = require_color_name();
844
- var reverseKeywords = {};
845
- for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
846
- var convert = {
847
- rgb: {
848
- channels: 3,
849
- labels: "rgb"
850
- },
851
- hsl: {
852
- channels: 3,
853
- labels: "hsl"
854
- },
855
- hsv: {
856
- channels: 3,
857
- labels: "hsv"
858
- },
859
- hwb: {
860
- channels: 3,
861
- labels: "hwb"
862
- },
863
- cmyk: {
864
- channels: 4,
865
- labels: "cmyk"
866
- },
867
- xyz: {
868
- channels: 3,
869
- labels: "xyz"
870
- },
871
- lab: {
872
- channels: 3,
873
- labels: "lab"
874
- },
875
- lch: {
876
- channels: 3,
877
- labels: "lch"
878
- },
879
- hex: {
880
- channels: 1,
881
- labels: ["hex"]
882
- },
883
- keyword: {
884
- channels: 1,
885
- labels: ["keyword"]
886
- },
887
- ansi16: {
888
- channels: 1,
889
- labels: ["ansi16"]
890
- },
891
- ansi256: {
892
- channels: 1,
893
- labels: ["ansi256"]
894
- },
895
- hcg: {
896
- channels: 3,
897
- labels: [
898
- "h",
899
- "c",
900
- "g"
901
- ]
902
- },
903
- apple: {
904
- channels: 3,
905
- labels: [
906
- "r16",
907
- "g16",
908
- "b16"
909
- ]
910
- },
911
- gray: {
912
- channels: 1,
913
- labels: ["gray"]
914
- }
915
- };
916
- module.exports = convert;
917
- for (const model of Object.keys(convert)) {
918
- if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
919
- if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
920
- if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
921
- const { channels, labels } = convert[model];
922
- delete convert[model].channels;
923
- delete convert[model].labels;
924
- Object.defineProperty(convert[model], "channels", { value: channels });
925
- Object.defineProperty(convert[model], "labels", { value: labels });
926
- }
927
- convert.rgb.hsl = function(rgb) {
928
- const r = rgb[0] / 255;
929
- const g = rgb[1] / 255;
930
- const b = rgb[2] / 255;
931
- const min = Math.min(r, g, b);
932
- const max = Math.max(r, g, b);
933
- const delta = max - min;
934
- let h;
935
- let s;
936
- if (max === min) h = 0;
937
- else if (r === max) h = (g - b) / delta;
938
- else if (g === max) h = 2 + (b - r) / delta;
939
- else if (b === max) h = 4 + (r - g) / delta;
940
- h = Math.min(h * 60, 360);
941
- if (h < 0) h += 360;
942
- const l = (min + max) / 2;
943
- if (max === min) s = 0;
944
- else if (l <= .5) s = delta / (max + min);
945
- else s = delta / (2 - max - min);
946
- return [
947
- h,
948
- s * 100,
949
- l * 100
950
- ];
951
- };
952
- convert.rgb.hsv = function(rgb) {
953
- let rdif;
954
- let gdif;
955
- let bdif;
956
- let h;
957
- let s;
958
- const r = rgb[0] / 255;
959
- const g = rgb[1] / 255;
960
- const b = rgb[2] / 255;
961
- const v = Math.max(r, g, b);
962
- const diff = v - Math.min(r, g, b);
963
- const diffc = function(c) {
964
- return (v - c) / 6 / diff + 1 / 2;
965
- };
966
- if (diff === 0) {
967
- h = 0;
968
- s = 0;
969
- } else {
970
- s = diff / v;
971
- rdif = diffc(r);
972
- gdif = diffc(g);
973
- bdif = diffc(b);
974
- if (r === v) h = bdif - gdif;
975
- else if (g === v) h = 1 / 3 + rdif - bdif;
976
- else if (b === v) h = 2 / 3 + gdif - rdif;
977
- if (h < 0) h += 1;
978
- else if (h > 1) h -= 1;
979
- }
980
- return [
981
- h * 360,
982
- s * 100,
983
- v * 100
984
- ];
985
- };
986
- convert.rgb.hwb = function(rgb) {
987
- const r = rgb[0];
988
- const g = rgb[1];
989
- let b = rgb[2];
990
- const h = convert.rgb.hsl(rgb)[0];
991
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
992
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
993
- return [
994
- h,
995
- w * 100,
996
- b * 100
997
- ];
998
- };
999
- convert.rgb.cmyk = function(rgb) {
1000
- const r = rgb[0] / 255;
1001
- const g = rgb[1] / 255;
1002
- const b = rgb[2] / 255;
1003
- const k = Math.min(1 - r, 1 - g, 1 - b);
1004
- const c = (1 - r - k) / (1 - k) || 0;
1005
- const m = (1 - g - k) / (1 - k) || 0;
1006
- const y = (1 - b - k) / (1 - k) || 0;
1007
- return [
1008
- c * 100,
1009
- m * 100,
1010
- y * 100,
1011
- k * 100
1012
- ];
1013
- };
1014
- function comparativeDistance(x, y) {
1015
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
1016
- }
1017
- convert.rgb.keyword = function(rgb) {
1018
- const reversed = reverseKeywords[rgb];
1019
- if (reversed) return reversed;
1020
- let currentClosestDistance = Infinity;
1021
- let currentClosestKeyword;
1022
- for (const keyword of Object.keys(cssKeywords)) {
1023
- const value = cssKeywords[keyword];
1024
- const distance = comparativeDistance(rgb, value);
1025
- if (distance < currentClosestDistance) {
1026
- currentClosestDistance = distance;
1027
- currentClosestKeyword = keyword;
1028
- }
1029
- }
1030
- return currentClosestKeyword;
1031
- };
1032
- convert.keyword.rgb = function(keyword) {
1033
- return cssKeywords[keyword];
1034
- };
1035
- convert.rgb.xyz = function(rgb) {
1036
- let r = rgb[0] / 255;
1037
- let g = rgb[1] / 255;
1038
- let b = rgb[2] / 255;
1039
- r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
1040
- g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
1041
- b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
1042
- const x = r * .4124 + g * .3576 + b * .1805;
1043
- const y = r * .2126 + g * .7152 + b * .0722;
1044
- const z = r * .0193 + g * .1192 + b * .9505;
1045
- return [
1046
- x * 100,
1047
- y * 100,
1048
- z * 100
1049
- ];
1050
- };
1051
- convert.rgb.lab = function(rgb) {
1052
- const xyz = convert.rgb.xyz(rgb);
1053
- let x = xyz[0];
1054
- let y = xyz[1];
1055
- let z = xyz[2];
1056
- x /= 95.047;
1057
- y /= 100;
1058
- z /= 108.883;
1059
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1060
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1061
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1062
- return [
1063
- 116 * y - 16,
1064
- 500 * (x - y),
1065
- 200 * (y - z)
1066
- ];
1067
- };
1068
- convert.hsl.rgb = function(hsl) {
1069
- const h = hsl[0] / 360;
1070
- const s = hsl[1] / 100;
1071
- const l = hsl[2] / 100;
1072
- let t2;
1073
- let t3;
1074
- let val;
1075
- if (s === 0) {
1076
- val = l * 255;
1077
- return [
1078
- val,
1079
- val,
1080
- val
1081
- ];
1082
- }
1083
- if (l < .5) t2 = l * (1 + s);
1084
- else t2 = l + s - l * s;
1085
- const t1 = 2 * l - t2;
1086
- const rgb = [
1087
- 0,
1088
- 0,
1089
- 0
1090
- ];
1091
- for (let i = 0; i < 3; i++) {
1092
- t3 = h + 1 / 3 * -(i - 1);
1093
- if (t3 < 0) t3++;
1094
- if (t3 > 1) t3--;
1095
- if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
1096
- else if (2 * t3 < 1) val = t2;
1097
- else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1098
- else val = t1;
1099
- rgb[i] = val * 255;
1100
- }
1101
- return rgb;
1102
- };
1103
- convert.hsl.hsv = function(hsl) {
1104
- const h = hsl[0];
1105
- let s = hsl[1] / 100;
1106
- let l = hsl[2] / 100;
1107
- let smin = s;
1108
- const lmin = Math.max(l, .01);
1109
- l *= 2;
1110
- s *= l <= 1 ? l : 2 - l;
1111
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1112
- const v = (l + s) / 2;
1113
- return [
1114
- h,
1115
- (l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
1116
- v * 100
1117
- ];
1118
- };
1119
- convert.hsv.rgb = function(hsv) {
1120
- const h = hsv[0] / 60;
1121
- const s = hsv[1] / 100;
1122
- let v = hsv[2] / 100;
1123
- const hi = Math.floor(h) % 6;
1124
- const f = h - Math.floor(h);
1125
- const p = 255 * v * (1 - s);
1126
- const q = 255 * v * (1 - s * f);
1127
- const t = 255 * v * (1 - s * (1 - f));
1128
- v *= 255;
1129
- switch (hi) {
1130
- case 0: return [
1131
- v,
1132
- t,
1133
- p
1134
- ];
1135
- case 1: return [
1136
- q,
1137
- v,
1138
- p
1139
- ];
1140
- case 2: return [
1141
- p,
1142
- v,
1143
- t
1144
- ];
1145
- case 3: return [
1146
- p,
1147
- q,
1148
- v
1149
- ];
1150
- case 4: return [
1151
- t,
1152
- p,
1153
- v
1154
- ];
1155
- case 5: return [
1156
- v,
1157
- p,
1158
- q
1159
- ];
1160
- }
1161
- };
1162
- convert.hsv.hsl = function(hsv) {
1163
- const h = hsv[0];
1164
- const s = hsv[1] / 100;
1165
- const v = hsv[2] / 100;
1166
- const vmin = Math.max(v, .01);
1167
- let sl;
1168
- let l;
1169
- l = (2 - s) * v;
1170
- const lmin = (2 - s) * vmin;
1171
- sl = s * vmin;
1172
- sl /= lmin <= 1 ? lmin : 2 - lmin;
1173
- sl = sl || 0;
1174
- l /= 2;
1175
- return [
1176
- h,
1177
- sl * 100,
1178
- l * 100
1179
- ];
1180
- };
1181
- convert.hwb.rgb = function(hwb) {
1182
- const h = hwb[0] / 360;
1183
- let wh = hwb[1] / 100;
1184
- let bl = hwb[2] / 100;
1185
- const ratio = wh + bl;
1186
- let f;
1187
- if (ratio > 1) {
1188
- wh /= ratio;
1189
- bl /= ratio;
1190
- }
1191
- const i = Math.floor(6 * h);
1192
- const v = 1 - bl;
1193
- f = 6 * h - i;
1194
- if ((i & 1) !== 0) f = 1 - f;
1195
- const n = wh + f * (v - wh);
1196
- let r;
1197
- let g;
1198
- let b;
1199
- switch (i) {
1200
- default:
1201
- case 6:
1202
- case 0:
1203
- r = v;
1204
- g = n;
1205
- b = wh;
1206
- break;
1207
- case 1:
1208
- r = n;
1209
- g = v;
1210
- b = wh;
1211
- break;
1212
- case 2:
1213
- r = wh;
1214
- g = v;
1215
- b = n;
1216
- break;
1217
- case 3:
1218
- r = wh;
1219
- g = n;
1220
- b = v;
1221
- break;
1222
- case 4:
1223
- r = n;
1224
- g = wh;
1225
- b = v;
1226
- break;
1227
- case 5:
1228
- r = v;
1229
- g = wh;
1230
- b = n;
1231
- break;
1232
- }
1233
- return [
1234
- r * 255,
1235
- g * 255,
1236
- b * 255
1237
- ];
1238
- };
1239
- convert.cmyk.rgb = function(cmyk) {
1240
- const c = cmyk[0] / 100;
1241
- const m = cmyk[1] / 100;
1242
- const y = cmyk[2] / 100;
1243
- const k = cmyk[3] / 100;
1244
- const r = 1 - Math.min(1, c * (1 - k) + k);
1245
- const g = 1 - Math.min(1, m * (1 - k) + k);
1246
- const b = 1 - Math.min(1, y * (1 - k) + k);
1247
- return [
1248
- r * 255,
1249
- g * 255,
1250
- b * 255
1251
- ];
1252
- };
1253
- convert.xyz.rgb = function(xyz) {
1254
- const x = xyz[0] / 100;
1255
- const y = xyz[1] / 100;
1256
- const z = xyz[2] / 100;
1257
- let r;
1258
- let g;
1259
- let b;
1260
- r = x * 3.2406 + y * -1.5372 + z * -.4986;
1261
- g = x * -.9689 + y * 1.8758 + z * .0415;
1262
- b = x * .0557 + y * -.204 + z * 1.057;
1263
- r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
1264
- g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
1265
- b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
1266
- r = Math.min(Math.max(0, r), 1);
1267
- g = Math.min(Math.max(0, g), 1);
1268
- b = Math.min(Math.max(0, b), 1);
1269
- return [
1270
- r * 255,
1271
- g * 255,
1272
- b * 255
1273
- ];
1274
- };
1275
- convert.xyz.lab = function(xyz) {
1276
- let x = xyz[0];
1277
- let y = xyz[1];
1278
- let z = xyz[2];
1279
- x /= 95.047;
1280
- y /= 100;
1281
- z /= 108.883;
1282
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1283
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1284
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1285
- return [
1286
- 116 * y - 16,
1287
- 500 * (x - y),
1288
- 200 * (y - z)
1289
- ];
1290
- };
1291
- convert.lab.xyz = function(lab) {
1292
- const l = lab[0];
1293
- const a = lab[1];
1294
- const b = lab[2];
1295
- let x;
1296
- let y;
1297
- let z;
1298
- y = (l + 16) / 116;
1299
- x = a / 500 + y;
1300
- z = y - b / 200;
1301
- const y2 = y ** 3;
1302
- const x2 = x ** 3;
1303
- const z2 = z ** 3;
1304
- y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
1305
- x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
1306
- z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
1307
- x *= 95.047;
1308
- y *= 100;
1309
- z *= 108.883;
1310
- return [
1311
- x,
1312
- y,
1313
- z
1314
- ];
1315
- };
1316
- convert.lab.lch = function(lab) {
1317
- const l = lab[0];
1318
- const a = lab[1];
1319
- const b = lab[2];
1320
- let h;
1321
- h = Math.atan2(b, a) * 360 / 2 / Math.PI;
1322
- if (h < 0) h += 360;
1323
- return [
1324
- l,
1325
- Math.sqrt(a * a + b * b),
1326
- h
1327
- ];
1328
- };
1329
- convert.lch.lab = function(lch) {
1330
- const l = lch[0];
1331
- const c = lch[1];
1332
- const hr = lch[2] / 360 * 2 * Math.PI;
1333
- return [
1334
- l,
1335
- c * Math.cos(hr),
1336
- c * Math.sin(hr)
1337
- ];
1338
- };
1339
- convert.rgb.ansi16 = function(args, saturation = null) {
1340
- const [r, g, b] = args;
1341
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1342
- value = Math.round(value / 50);
1343
- if (value === 0) return 30;
1344
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1345
- if (value === 2) ansi += 60;
1346
- return ansi;
1347
- };
1348
- convert.hsv.ansi16 = function(args) {
1349
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1350
- };
1351
- convert.rgb.ansi256 = function(args) {
1352
- const r = args[0];
1353
- const g = args[1];
1354
- const b = args[2];
1355
- if (r === g && g === b) {
1356
- if (r < 8) return 16;
1357
- if (r > 248) return 231;
1358
- return Math.round((r - 8) / 247 * 24) + 232;
1359
- }
1360
- return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1361
- };
1362
- convert.ansi16.rgb = function(args) {
1363
- let color = args % 10;
1364
- if (color === 0 || color === 7) {
1365
- if (args > 50) color += 3.5;
1366
- color = color / 10.5 * 255;
1367
- return [
1368
- color,
1369
- color,
1370
- color
1371
- ];
1372
- }
1373
- const mult = (~~(args > 50) + 1) * .5;
1374
- return [
1375
- (color & 1) * mult * 255,
1376
- (color >> 1 & 1) * mult * 255,
1377
- (color >> 2 & 1) * mult * 255
1378
- ];
1379
- };
1380
- convert.ansi256.rgb = function(args) {
1381
- if (args >= 232) {
1382
- const c = (args - 232) * 10 + 8;
1383
- return [
1384
- c,
1385
- c,
1386
- c
1387
- ];
1388
- }
1389
- args -= 16;
1390
- let rem;
1391
- return [
1392
- Math.floor(args / 36) / 5 * 255,
1393
- Math.floor((rem = args % 36) / 6) / 5 * 255,
1394
- rem % 6 / 5 * 255
1395
- ];
1396
- };
1397
- convert.rgb.hex = function(args) {
1398
- const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
1399
- return "000000".substring(string.length) + string;
1400
- };
1401
- convert.hex.rgb = function(args) {
1402
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1403
- if (!match) return [
1404
- 0,
1405
- 0,
1406
- 0
1407
- ];
1408
- let colorString = match[0];
1409
- if (match[0].length === 3) colorString = colorString.split("").map((char) => {
1410
- return char + char;
1411
- }).join("");
1412
- const integer = parseInt(colorString, 16);
1413
- return [
1414
- integer >> 16 & 255,
1415
- integer >> 8 & 255,
1416
- integer & 255
1417
- ];
1418
- };
1419
- convert.rgb.hcg = function(rgb) {
1420
- const r = rgb[0] / 255;
1421
- const g = rgb[1] / 255;
1422
- const b = rgb[2] / 255;
1423
- const max = Math.max(Math.max(r, g), b);
1424
- const min = Math.min(Math.min(r, g), b);
1425
- const chroma = max - min;
1426
- let grayscale;
1427
- let hue;
1428
- if (chroma < 1) grayscale = min / (1 - chroma);
1429
- else grayscale = 0;
1430
- if (chroma <= 0) hue = 0;
1431
- else if (max === r) hue = (g - b) / chroma % 6;
1432
- else if (max === g) hue = 2 + (b - r) / chroma;
1433
- else hue = 4 + (r - g) / chroma;
1434
- hue /= 6;
1435
- hue %= 1;
1436
- return [
1437
- hue * 360,
1438
- chroma * 100,
1439
- grayscale * 100
1440
- ];
1441
- };
1442
- convert.hsl.hcg = function(hsl) {
1443
- const s = hsl[1] / 100;
1444
- const l = hsl[2] / 100;
1445
- const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
1446
- let f = 0;
1447
- if (c < 1) f = (l - .5 * c) / (1 - c);
1448
- return [
1449
- hsl[0],
1450
- c * 100,
1451
- f * 100
1452
- ];
1453
- };
1454
- convert.hsv.hcg = function(hsv) {
1455
- const s = hsv[1] / 100;
1456
- const v = hsv[2] / 100;
1457
- const c = s * v;
1458
- let f = 0;
1459
- if (c < 1) f = (v - c) / (1 - c);
1460
- return [
1461
- hsv[0],
1462
- c * 100,
1463
- f * 100
1464
- ];
1465
- };
1466
- convert.hcg.rgb = function(hcg) {
1467
- const h = hcg[0] / 360;
1468
- const c = hcg[1] / 100;
1469
- const g = hcg[2] / 100;
1470
- if (c === 0) return [
1471
- g * 255,
1472
- g * 255,
1473
- g * 255
1474
- ];
1475
- const pure = [
1476
- 0,
1477
- 0,
1478
- 0
1479
- ];
1480
- const hi = h % 1 * 6;
1481
- const v = hi % 1;
1482
- const w = 1 - v;
1483
- let mg = 0;
1484
- switch (Math.floor(hi)) {
1485
- case 0:
1486
- pure[0] = 1;
1487
- pure[1] = v;
1488
- pure[2] = 0;
1489
- break;
1490
- case 1:
1491
- pure[0] = w;
1492
- pure[1] = 1;
1493
- pure[2] = 0;
1494
- break;
1495
- case 2:
1496
- pure[0] = 0;
1497
- pure[1] = 1;
1498
- pure[2] = v;
1499
- break;
1500
- case 3:
1501
- pure[0] = 0;
1502
- pure[1] = w;
1503
- pure[2] = 1;
1504
- break;
1505
- case 4:
1506
- pure[0] = v;
1507
- pure[1] = 0;
1508
- pure[2] = 1;
1509
- break;
1510
- default:
1511
- pure[0] = 1;
1512
- pure[1] = 0;
1513
- pure[2] = w;
1514
- }
1515
- mg = (1 - c) * g;
1516
- return [
1517
- (c * pure[0] + mg) * 255,
1518
- (c * pure[1] + mg) * 255,
1519
- (c * pure[2] + mg) * 255
1520
- ];
1521
- };
1522
- convert.hcg.hsv = function(hcg) {
1523
- const c = hcg[1] / 100;
1524
- const v = c + hcg[2] / 100 * (1 - c);
1525
- let f = 0;
1526
- if (v > 0) f = c / v;
1527
- return [
1528
- hcg[0],
1529
- f * 100,
1530
- v * 100
1531
- ];
1532
- };
1533
- convert.hcg.hsl = function(hcg) {
1534
- const c = hcg[1] / 100;
1535
- const l = hcg[2] / 100 * (1 - c) + .5 * c;
1536
- let s = 0;
1537
- if (l > 0 && l < .5) s = c / (2 * l);
1538
- else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
1539
- return [
1540
- hcg[0],
1541
- s * 100,
1542
- l * 100
1543
- ];
1544
- };
1545
- convert.hcg.hwb = function(hcg) {
1546
- const c = hcg[1] / 100;
1547
- const v = c + hcg[2] / 100 * (1 - c);
1548
- return [
1549
- hcg[0],
1550
- (v - c) * 100,
1551
- (1 - v) * 100
1552
- ];
1553
- };
1554
- convert.hwb.hcg = function(hwb) {
1555
- const w = hwb[1] / 100;
1556
- const v = 1 - hwb[2] / 100;
1557
- const c = v - w;
1558
- let g = 0;
1559
- if (c < 1) g = (v - c) / (1 - c);
1560
- return [
1561
- hwb[0],
1562
- c * 100,
1563
- g * 100
1564
- ];
1565
- };
1566
- convert.apple.rgb = function(apple) {
1567
- return [
1568
- apple[0] / 65535 * 255,
1569
- apple[1] / 65535 * 255,
1570
- apple[2] / 65535 * 255
1571
- ];
1572
- };
1573
- convert.rgb.apple = function(rgb) {
1574
- return [
1575
- rgb[0] / 255 * 65535,
1576
- rgb[1] / 255 * 65535,
1577
- rgb[2] / 255 * 65535
1578
- ];
1579
- };
1580
- convert.gray.rgb = function(args) {
1581
- return [
1582
- args[0] / 100 * 255,
1583
- args[0] / 100 * 255,
1584
- args[0] / 100 * 255
1585
- ];
1586
- };
1587
- convert.gray.hsl = function(args) {
1588
- return [
1589
- 0,
1590
- 0,
1591
- args[0]
1592
- ];
1593
- };
1594
- convert.gray.hsv = convert.gray.hsl;
1595
- convert.gray.hwb = function(gray) {
1596
- return [
1597
- 0,
1598
- 100,
1599
- gray[0]
1600
- ];
1601
- };
1602
- convert.gray.cmyk = function(gray) {
1603
- return [
1604
- 0,
1605
- 0,
1606
- 0,
1607
- gray[0]
1608
- ];
1609
- };
1610
- convert.gray.lab = function(gray) {
1611
- return [
1612
- gray[0],
1613
- 0,
1614
- 0
1615
- ];
1616
- };
1617
- convert.gray.hex = function(gray) {
1618
- const val = Math.round(gray[0] / 100 * 255) & 255;
1619
- const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
1620
- return "000000".substring(string.length) + string;
1621
- };
1622
- convert.rgb.gray = function(rgb) {
1623
- return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
1624
- };
1625
- }));
1626
- //#endregion
1627
- //#region node_modules/color-convert/route.js
1628
- var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1629
- var conversions = require_conversions();
1630
- function buildGraph() {
1631
- const graph = {};
1632
- const models = Object.keys(conversions);
1633
- for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
1634
- distance: -1,
1635
- parent: null
1636
- };
1637
- return graph;
1638
- }
1639
- function deriveBFS(fromModel) {
1640
- const graph = buildGraph();
1641
- const queue = [fromModel];
1642
- graph[fromModel].distance = 0;
1643
- while (queue.length) {
1644
- const current = queue.pop();
1645
- const adjacents = Object.keys(conversions[current]);
1646
- for (let len = adjacents.length, i = 0; i < len; i++) {
1647
- const adjacent = adjacents[i];
1648
- const node = graph[adjacent];
1649
- if (node.distance === -1) {
1650
- node.distance = graph[current].distance + 1;
1651
- node.parent = current;
1652
- queue.unshift(adjacent);
1653
- }
1654
- }
1655
- }
1656
- return graph;
93
+ //#region node_modules/chalk/source/vendor/ansi-styles/index.js
94
+ var ANSI_BACKGROUND_OFFSET = 10;
95
+ var wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
96
+ var wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
97
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
98
+ var styles$1 = {
99
+ modifier: {
100
+ reset: [0, 0],
101
+ bold: [1, 22],
102
+ dim: [2, 22],
103
+ italic: [3, 23],
104
+ underline: [4, 24],
105
+ overline: [53, 55],
106
+ inverse: [7, 27],
107
+ hidden: [8, 28],
108
+ strikethrough: [9, 29]
109
+ },
110
+ color: {
111
+ black: [30, 39],
112
+ red: [31, 39],
113
+ green: [32, 39],
114
+ yellow: [33, 39],
115
+ blue: [34, 39],
116
+ magenta: [35, 39],
117
+ cyan: [36, 39],
118
+ white: [37, 39],
119
+ blackBright: [90, 39],
120
+ gray: [90, 39],
121
+ grey: [90, 39],
122
+ redBright: [91, 39],
123
+ greenBright: [92, 39],
124
+ yellowBright: [93, 39],
125
+ blueBright: [94, 39],
126
+ magentaBright: [95, 39],
127
+ cyanBright: [96, 39],
128
+ whiteBright: [97, 39]
129
+ },
130
+ bgColor: {
131
+ bgBlack: [40, 49],
132
+ bgRed: [41, 49],
133
+ bgGreen: [42, 49],
134
+ bgYellow: [43, 49],
135
+ bgBlue: [44, 49],
136
+ bgMagenta: [45, 49],
137
+ bgCyan: [46, 49],
138
+ bgWhite: [47, 49],
139
+ bgBlackBright: [100, 49],
140
+ bgGray: [100, 49],
141
+ bgGrey: [100, 49],
142
+ bgRedBright: [101, 49],
143
+ bgGreenBright: [102, 49],
144
+ bgYellowBright: [103, 49],
145
+ bgBlueBright: [104, 49],
146
+ bgMagentaBright: [105, 49],
147
+ bgCyanBright: [106, 49],
148
+ bgWhiteBright: [107, 49]
1657
149
  }
1658
- function link(from, to) {
1659
- return function(args) {
1660
- return to(from(args));
1661
- };
1662
- }
1663
- function wrapConversion(toModel, graph) {
1664
- const path = [graph[toModel].parent, toModel];
1665
- let fn = conversions[graph[toModel].parent][toModel];
1666
- let cur = graph[toModel].parent;
1667
- while (graph[cur].parent) {
1668
- path.unshift(graph[cur].parent);
1669
- fn = link(conversions[graph[cur].parent][cur], fn);
1670
- cur = graph[cur].parent;
1671
- }
1672
- fn.conversion = path;
1673
- return fn;
1674
- }
1675
- module.exports = function(fromModel) {
1676
- const graph = deriveBFS(fromModel);
1677
- const conversion = {};
1678
- const models = Object.keys(graph);
1679
- for (let len = models.length, i = 0; i < len; i++) {
1680
- const toModel = models[i];
1681
- if (graph[toModel].parent === null) continue;
1682
- conversion[toModel] = wrapConversion(toModel, graph);
150
+ };
151
+ Object.keys(styles$1.modifier);
152
+ var foregroundColorNames = Object.keys(styles$1.color);
153
+ var backgroundColorNames = Object.keys(styles$1.bgColor);
154
+ [...foregroundColorNames, ...backgroundColorNames];
155
+ function assembleStyles() {
156
+ const codes = /* @__PURE__ */ new Map();
157
+ for (const [groupName, group] of Object.entries(styles$1)) {
158
+ for (const [styleName, style] of Object.entries(group)) {
159
+ styles$1[styleName] = {
160
+ open: `\u001B[${style[0]}m`,
161
+ close: `\u001B[${style[1]}m`
162
+ };
163
+ group[styleName] = styles$1[styleName];
164
+ codes.set(style[0], style[1]);
1683
165
  }
1684
- return conversion;
1685
- };
1686
- }));
1687
- //#endregion
1688
- //#region node_modules/color-convert/index.js
1689
- var require_color_convert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1690
- var conversions = require_conversions();
1691
- var route = require_route();
1692
- var convert = {};
1693
- var models = Object.keys(conversions);
1694
- function wrapRaw(fn) {
1695
- const wrappedFn = function(...args) {
1696
- const arg0 = args[0];
1697
- if (arg0 === void 0 || arg0 === null) return arg0;
1698
- if (arg0.length > 1) args = arg0;
1699
- return fn(args);
1700
- };
1701
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1702
- return wrappedFn;
1703
- }
1704
- function wrapRounded(fn) {
1705
- const wrappedFn = function(...args) {
1706
- const arg0 = args[0];
1707
- if (arg0 === void 0 || arg0 === null) return arg0;
1708
- if (arg0.length > 1) args = arg0;
1709
- const result = fn(args);
1710
- if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
1711
- return result;
1712
- };
1713
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1714
- return wrappedFn;
1715
- }
1716
- models.forEach((fromModel) => {
1717
- convert[fromModel] = {};
1718
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1719
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1720
- const routes = route(fromModel);
1721
- Object.keys(routes).forEach((toModel) => {
1722
- const fn = routes[toModel];
1723
- convert[fromModel][toModel] = wrapRounded(fn);
1724
- convert[fromModel][toModel].raw = wrapRaw(fn);
166
+ Object.defineProperty(styles$1, groupName, {
167
+ value: group,
168
+ enumerable: false
1725
169
  });
170
+ }
171
+ Object.defineProperty(styles$1, "codes", {
172
+ value: codes,
173
+ enumerable: false
1726
174
  });
1727
- module.exports = convert;
1728
- }));
1729
- //#endregion
1730
- //#region node_modules/ansi-styles/index.js
1731
- var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1732
- var wrapAnsi16 = (fn, offset) => (...args) => {
1733
- return `\u001B[${fn(...args) + offset}m`;
1734
- };
1735
- var wrapAnsi256 = (fn, offset) => (...args) => {
1736
- const code = fn(...args);
1737
- return `\u001B[${38 + offset};5;${code}m`;
1738
- };
1739
- var wrapAnsi16m = (fn, offset) => (...args) => {
1740
- const rgb = fn(...args);
1741
- return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1742
- };
1743
- var ansi2ansi = (n) => n;
1744
- var rgb2rgb = (r, g, b) => [
1745
- r,
1746
- g,
1747
- b
1748
- ];
1749
- var setLazyProperty = (object, property, get) => {
1750
- Object.defineProperty(object, property, {
1751
- get: () => {
1752
- const value = get();
1753
- Object.defineProperty(object, property, {
1754
- value,
1755
- enumerable: true,
1756
- configurable: true
1757
- });
1758
- return value;
175
+ styles$1.color.close = "\x1B[39m";
176
+ styles$1.bgColor.close = "\x1B[49m";
177
+ styles$1.color.ansi = wrapAnsi16();
178
+ styles$1.color.ansi256 = wrapAnsi256();
179
+ styles$1.color.ansi16m = wrapAnsi16m();
180
+ styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
181
+ styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
182
+ styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
183
+ Object.defineProperties(styles$1, {
184
+ rgbToAnsi256: {
185
+ value(red, green, blue) {
186
+ if (red === green && green === blue) {
187
+ if (red < 8) return 16;
188
+ if (red > 248) return 231;
189
+ return Math.round((red - 8) / 247 * 24) + 232;
190
+ }
191
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1759
192
  },
1760
- enumerable: true,
1761
- configurable: true
1762
- });
1763
- };
1764
- /** @type {typeof import('color-convert')} */
1765
- var colorConvert;
1766
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1767
- if (colorConvert === void 0) colorConvert = require_color_convert();
1768
- const offset = isBackground ? 10 : 0;
1769
- const styles = {};
1770
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1771
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1772
- if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
1773
- else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
1774
- }
1775
- return styles;
1776
- };
1777
- function assembleStyles() {
1778
- const codes = /* @__PURE__ */ new Map();
1779
- const styles = {
1780
- modifier: {
1781
- reset: [0, 0],
1782
- bold: [1, 22],
1783
- dim: [2, 22],
1784
- italic: [3, 23],
1785
- underline: [4, 24],
1786
- inverse: [7, 27],
1787
- hidden: [8, 28],
1788
- strikethrough: [9, 29]
193
+ enumerable: false
194
+ },
195
+ hexToRgb: {
196
+ value(hex) {
197
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
198
+ if (!matches) return [
199
+ 0,
200
+ 0,
201
+ 0
202
+ ];
203
+ let [colorString] = matches;
204
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
205
+ const integer = Number.parseInt(colorString, 16);
206
+ return [
207
+ integer >> 16 & 255,
208
+ integer >> 8 & 255,
209
+ integer & 255
210
+ ];
1789
211
  },
1790
- color: {
1791
- black: [30, 39],
1792
- red: [31, 39],
1793
- green: [32, 39],
1794
- yellow: [33, 39],
1795
- blue: [34, 39],
1796
- magenta: [35, 39],
1797
- cyan: [36, 39],
1798
- white: [37, 39],
1799
- blackBright: [90, 39],
1800
- redBright: [91, 39],
1801
- greenBright: [92, 39],
1802
- yellowBright: [93, 39],
1803
- blueBright: [94, 39],
1804
- magentaBright: [95, 39],
1805
- cyanBright: [96, 39],
1806
- whiteBright: [97, 39]
212
+ enumerable: false
213
+ },
214
+ hexToAnsi256: {
215
+ value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
216
+ enumerable: false
217
+ },
218
+ ansi256ToAnsi: {
219
+ value(code) {
220
+ if (code < 8) return 30 + code;
221
+ if (code < 16) return 90 + (code - 8);
222
+ let red;
223
+ let green;
224
+ let blue;
225
+ if (code >= 232) {
226
+ red = ((code - 232) * 10 + 8) / 255;
227
+ green = red;
228
+ blue = red;
229
+ } else {
230
+ code -= 16;
231
+ const remainder = code % 36;
232
+ red = Math.floor(code / 36) / 5;
233
+ green = Math.floor(remainder / 6) / 5;
234
+ blue = remainder % 6 / 5;
235
+ }
236
+ const value = Math.max(red, green, blue) * 2;
237
+ if (value === 0) return 30;
238
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
239
+ if (value === 2) result += 60;
240
+ return result;
1807
241
  },
1808
- bgColor: {
1809
- bgBlack: [40, 49],
1810
- bgRed: [41, 49],
1811
- bgGreen: [42, 49],
1812
- bgYellow: [43, 49],
1813
- bgBlue: [44, 49],
1814
- bgMagenta: [45, 49],
1815
- bgCyan: [46, 49],
1816
- bgWhite: [47, 49],
1817
- bgBlackBright: [100, 49],
1818
- bgRedBright: [101, 49],
1819
- bgGreenBright: [102, 49],
1820
- bgYellowBright: [103, 49],
1821
- bgBlueBright: [104, 49],
1822
- bgMagentaBright: [105, 49],
1823
- bgCyanBright: [106, 49],
1824
- bgWhiteBright: [107, 49]
1825
- }
1826
- };
1827
- styles.color.gray = styles.color.blackBright;
1828
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1829
- styles.color.grey = styles.color.blackBright;
1830
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1831
- for (const [groupName, group] of Object.entries(styles)) {
1832
- for (const [styleName, style] of Object.entries(group)) {
1833
- styles[styleName] = {
1834
- open: `\u001B[${style[0]}m`,
1835
- close: `\u001B[${style[1]}m`
1836
- };
1837
- group[styleName] = styles[styleName];
1838
- codes.set(style[0], style[1]);
1839
- }
1840
- Object.defineProperty(styles, groupName, {
1841
- value: group,
1842
- enumerable: false
1843
- });
1844
- }
1845
- Object.defineProperty(styles, "codes", {
1846
- value: codes,
1847
242
  enumerable: false
1848
- });
1849
- styles.color.close = "\x1B[39m";
1850
- styles.bgColor.close = "\x1B[49m";
1851
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1852
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1853
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1854
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1855
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1856
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1857
- return styles;
1858
- }
1859
- Object.defineProperty(module, "exports", {
1860
- enumerable: true,
1861
- get: assembleStyles
243
+ },
244
+ rgbToAnsi: {
245
+ value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
246
+ enumerable: false
247
+ },
248
+ hexToAnsi: {
249
+ value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
250
+ enumerable: false
251
+ }
1862
252
  });
1863
- }));
1864
- //#endregion
1865
- //#region node_modules/supports-color/browser.js
1866
- var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1867
- module.exports = {
1868
- stdout: false,
1869
- stderr: false
1870
- };
1871
- }));
253
+ return styles$1;
254
+ }
255
+ var ansiStyles = assembleStyles();
1872
256
  //#endregion
1873
- //#region node_modules/chalk/source/util.js
1874
- var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1875
- var stringReplaceAll = (string, substring, replacer) => {
1876
- let index = string.indexOf(substring);
1877
- if (index === -1) return string;
1878
- const substringLength = substring.length;
1879
- let endIndex = 0;
1880
- let returnValue = "";
1881
- do {
1882
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1883
- endIndex = index + substringLength;
1884
- index = string.indexOf(substring, endIndex);
1885
- } while (index !== -1);
1886
- returnValue += string.substr(endIndex);
1887
- return returnValue;
1888
- };
1889
- var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1890
- let endIndex = 0;
1891
- let returnValue = "";
1892
- do {
1893
- const gotCR = string[index - 1] === "\r";
1894
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1895
- endIndex = index + 1;
1896
- index = string.indexOf("\n", endIndex);
1897
- } while (index !== -1);
1898
- returnValue += string.substr(endIndex);
1899
- return returnValue;
1900
- };
1901
- module.exports = {
1902
- stringReplaceAll,
1903
- stringEncaseCRLFWithFirstIndex
1904
- };
1905
- }));
257
+ //#region node_modules/chalk/source/vendor/supports-color/browser.js
258
+ var level = (() => {
259
+ if (!("navigator" in globalThis)) return 0;
260
+ if (globalThis.navigator.userAgentData) {
261
+ const brand = navigator.userAgentData.brands.find(({ brand }) => brand === "Chromium");
262
+ if (brand && brand.version > 93) return 3;
263
+ }
264
+ if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) return 1;
265
+ return 0;
266
+ })();
267
+ var colorSupport = level !== 0 && {
268
+ level,
269
+ hasBasic: true,
270
+ has256: level >= 2,
271
+ has16m: level >= 3
272
+ };
273
+ var supportsColor = {
274
+ stdout: colorSupport,
275
+ stderr: colorSupport
276
+ };
1906
277
  //#endregion
1907
- //#region node_modules/chalk/source/templates.js
1908
- var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1909
- 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;
1910
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
1911
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
1912
- var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
1913
- var ESCAPES = new Map([
1914
- ["n", "\n"],
1915
- ["r", "\r"],
1916
- ["t", " "],
1917
- ["b", "\b"],
1918
- ["f", "\f"],
1919
- ["v", "\v"],
1920
- ["0", "\0"],
1921
- ["\\", "\\"],
1922
- ["e", "\x1B"],
1923
- ["a", "\x07"]
1924
- ]);
1925
- function unescape(c) {
1926
- const u = c[0] === "u";
1927
- const bracket = c[1] === "{";
1928
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) return String.fromCharCode(parseInt(c.slice(1), 16));
1929
- if (u && bracket) return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
1930
- return ESCAPES.get(c) || c;
1931
- }
1932
- function parseArguments(name, arguments_) {
1933
- const results = [];
1934
- const chunks = arguments_.trim().split(/\s*,\s*/g);
1935
- let matches;
1936
- for (const chunk of chunks) {
1937
- const number = Number(chunk);
1938
- if (!Number.isNaN(number)) results.push(number);
1939
- else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
1940
- else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
1941
- }
1942
- return results;
1943
- }
1944
- function parseStyle(style) {
1945
- STYLE_REGEX.lastIndex = 0;
1946
- const results = [];
1947
- let matches;
1948
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
1949
- const name = matches[1];
1950
- if (matches[2]) {
1951
- const args = parseArguments(name, matches[2]);
1952
- results.push([name].concat(args));
1953
- } else results.push([name]);
1954
- }
1955
- return results;
1956
- }
1957
- function buildStyle(chalk, styles) {
1958
- const enabled = {};
1959
- for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
1960
- let current = chalk;
1961
- for (const [styleName, styles] of Object.entries(enabled)) {
1962
- if (!Array.isArray(styles)) continue;
1963
- if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
1964
- current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
1965
- }
1966
- return current;
1967
- }
1968
- module.exports = (chalk, temporary) => {
1969
- const styles = [];
1970
- const chunks = [];
1971
- let chunk = [];
1972
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
1973
- if (escapeCharacter) chunk.push(unescape(escapeCharacter));
1974
- else if (style) {
1975
- const string = chunk.join("");
1976
- chunk = [];
1977
- chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
1978
- styles.push({
1979
- inverse,
1980
- styles: parseStyle(style)
1981
- });
1982
- } else if (close) {
1983
- if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
1984
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
1985
- chunk = [];
1986
- styles.pop();
1987
- } else chunk.push(character);
1988
- });
1989
- chunks.push(chunk.join(""));
1990
- if (styles.length > 0) {
1991
- const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1992
- throw new Error(errMessage);
1993
- }
1994
- return chunks.join("");
1995
- };
1996
- }));
278
+ //#region node_modules/chalk/source/utilities.js
279
+ function stringReplaceAll(string, substring, replacer) {
280
+ let index = string.indexOf(substring);
281
+ if (index === -1) return string;
282
+ const substringLength = substring.length;
283
+ let endIndex = 0;
284
+ let returnValue = "";
285
+ do {
286
+ returnValue += string.slice(endIndex, index) + substring + replacer;
287
+ endIndex = index + substringLength;
288
+ index = string.indexOf(substring, endIndex);
289
+ } while (index !== -1);
290
+ returnValue += string.slice(endIndex);
291
+ return returnValue;
292
+ }
293
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
294
+ let endIndex = 0;
295
+ let returnValue = "";
296
+ do {
297
+ const gotCR = string[index - 1] === "\r";
298
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
299
+ endIndex = index + 1;
300
+ index = string.indexOf("\n", endIndex);
301
+ } while (index !== -1);
302
+ returnValue += string.slice(endIndex);
303
+ return returnValue;
304
+ }
1997
305
  //#endregion
1998
- //#region src/abstractRunnerExecutionWorker.ts
1999
- var import_source = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
2000
- var ansiStyles = require_ansi_styles();
2001
- var { stdout: stdoutColor, stderr: stderrColor } = require_browser();
2002
- var { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = require_util();
2003
- var { isArray } = Array;
2004
- var levelMapping = [
2005
- "ansi",
2006
- "ansi",
2007
- "ansi256",
2008
- "ansi16m"
2009
- ];
2010
- var styles = Object.create(null);
2011
- var applyOptions = (object, options = {}) => {
2012
- 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");
2013
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
2014
- object.level = options.level === void 0 ? colorLevel : options.level;
2015
- };
2016
- var ChalkClass = class {
2017
- constructor(options) {
2018
- return chalkFactory(options);
2019
- }
2020
- };
2021
- var chalkFactory = (options) => {
2022
- const chalk = {};
2023
- applyOptions(chalk, options);
2024
- chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
2025
- Object.setPrototypeOf(chalk, Chalk.prototype);
2026
- Object.setPrototypeOf(chalk.template, chalk);
2027
- chalk.template.constructor = () => {
2028
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
306
+ //#region node_modules/chalk/source/index.js
307
+ var { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
308
+ var GENERATOR = Symbol("GENERATOR");
309
+ var STYLER = Symbol("STYLER");
310
+ var IS_EMPTY = Symbol("IS_EMPTY");
311
+ var levelMapping = [
312
+ "ansi",
313
+ "ansi",
314
+ "ansi256",
315
+ "ansi16m"
316
+ ];
317
+ var styles = Object.create(null);
318
+ var applyOptions = (object, options = {}) => {
319
+ 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");
320
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
321
+ object.level = options.level === void 0 ? colorLevel : options.level;
322
+ };
323
+ var chalkFactory = (options) => {
324
+ const chalk = (...strings) => strings.join(" ");
325
+ applyOptions(chalk, options);
326
+ Object.setPrototypeOf(chalk, createChalk.prototype);
327
+ return chalk;
328
+ };
329
+ function createChalk(options) {
330
+ return chalkFactory(options);
331
+ }
332
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
333
+ for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
334
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
335
+ Object.defineProperty(this, styleName, { value: builder });
336
+ return builder;
337
+ } };
338
+ styles.visible = { get() {
339
+ const builder = createBuilder(this, this[STYLER], true);
340
+ Object.defineProperty(this, "visible", { value: builder });
341
+ return builder;
342
+ } };
343
+ var getModelAnsi = (model, level, type, ...arguments_) => {
344
+ if (model === "rgb") {
345
+ if (level === "ansi16m") return ansiStyles[type].ansi16m(...arguments_);
346
+ if (level === "ansi256") return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
347
+ return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
348
+ }
349
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles.hexToRgb(...arguments_));
350
+ return ansiStyles[type][model](...arguments_);
351
+ };
352
+ for (const model of [
353
+ "rgb",
354
+ "hex",
355
+ "ansi256"
356
+ ]) {
357
+ styles[model] = { get() {
358
+ const { level } = this;
359
+ return function(...arguments_) {
360
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles.color.close, this[STYLER]);
361
+ return createBuilder(this, styler, this[IS_EMPTY]);
2029
362
  };
2030
- chalk.template.Instance = ChalkClass;
2031
- return chalk.template;
2032
- };
2033
- function Chalk(options) {
2034
- return chalkFactory(options);
2035
- }
2036
- for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
2037
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
2038
- Object.defineProperty(this, styleName, { value: builder });
2039
- return builder;
2040
- } };
2041
- styles.visible = { get() {
2042
- const builder = createBuilder(this, this._styler, true);
2043
- Object.defineProperty(this, "visible", { value: builder });
2044
- return builder;
2045
363
  } };
2046
- var usedModels = [
2047
- "rgb",
2048
- "hex",
2049
- "keyword",
2050
- "hsl",
2051
- "hsv",
2052
- "hwb",
2053
- "ansi",
2054
- "ansi256"
2055
- ];
2056
- for (const model of usedModels) styles[model] = { get() {
364
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
365
+ styles[bgModel] = { get() {
2057
366
  const { level } = this;
2058
367
  return function(...arguments_) {
2059
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
2060
- return createBuilder(this, styler, this._isEmpty);
368
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
369
+ return createBuilder(this, styler, this[IS_EMPTY]);
2061
370
  };
2062
371
  } };
2063
- for (const model of usedModels) {
2064
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
2065
- styles[bgModel] = { get() {
2066
- const { level } = this;
2067
- return function(...arguments_) {
2068
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
2069
- return createBuilder(this, styler, this._isEmpty);
2070
- };
2071
- } };
2072
- }
2073
- var proto = Object.defineProperties(() => {}, {
2074
- ...styles,
2075
- level: {
2076
- enumerable: true,
2077
- get() {
2078
- return this._generator.level;
2079
- },
2080
- set(level) {
2081
- this._generator.level = level;
2082
- }
2083
- }
2084
- });
2085
- var createStyler = (open, close, parent) => {
2086
- let openAll;
2087
- let closeAll;
2088
- if (parent === void 0) {
2089
- openAll = open;
2090
- closeAll = close;
2091
- } else {
2092
- openAll = parent.openAll + open;
2093
- closeAll = close + parent.closeAll;
2094
- }
2095
- return {
2096
- open,
2097
- close,
2098
- openAll,
2099
- closeAll,
2100
- parent
2101
- };
2102
- };
2103
- var createBuilder = (self, _styler, _isEmpty) => {
2104
- const builder = (...arguments_) => {
2105
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) return applyStyle(builder, chalkTag(builder, ...arguments_));
2106
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2107
- };
2108
- Object.setPrototypeOf(builder, proto);
2109
- builder._generator = self;
2110
- builder._styler = _styler;
2111
- builder._isEmpty = _isEmpty;
2112
- return builder;
2113
- };
2114
- var applyStyle = (self, string) => {
2115
- if (self.level <= 0 || !string) return self._isEmpty ? "" : string;
2116
- let styler = self._styler;
2117
- if (styler === void 0) return string;
2118
- const { openAll, closeAll } = styler;
2119
- if (string.indexOf("\x1B") !== -1) while (styler !== void 0) {
2120
- string = stringReplaceAll(string, styler.close, styler.open);
2121
- styler = styler.parent;
372
+ }
373
+ var proto = Object.defineProperties(() => {}, {
374
+ ...styles,
375
+ level: {
376
+ enumerable: true,
377
+ get() {
378
+ return this[GENERATOR].level;
379
+ },
380
+ set(level) {
381
+ this[GENERATOR].level = level;
2122
382
  }
2123
- const lfIndex = string.indexOf("\n");
2124
- if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2125
- return openAll + string + closeAll;
2126
- };
2127
- var template;
2128
- var chalkTag = (chalk, ...strings) => {
2129
- const [firstString] = strings;
2130
- if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
2131
- const arguments_ = strings.slice(1);
2132
- const parts = [firstString.raw[0]];
2133
- for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
2134
- if (template === void 0) template = require_templates();
2135
- return template(chalk, parts.join(""));
383
+ }
384
+ });
385
+ var createStyler = (open, close, parent) => {
386
+ let openAll;
387
+ let closeAll;
388
+ if (parent === void 0) {
389
+ openAll = open;
390
+ closeAll = close;
391
+ } else {
392
+ openAll = parent.openAll + open;
393
+ closeAll = close + parent.closeAll;
394
+ }
395
+ return {
396
+ open,
397
+ close,
398
+ openAll,
399
+ closeAll,
400
+ parent
2136
401
  };
2137
- Object.defineProperties(Chalk.prototype, styles);
2138
- var chalk = Chalk();
2139
- chalk.supportsColor = stdoutColor;
2140
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
2141
- chalk.stderr.supportsColor = stderrColor;
2142
- module.exports = chalk;
2143
- })))());
2144
- import_source.default.level = 3;
402
+ };
403
+ var createBuilder = (self, _styler, _isEmpty) => {
404
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
405
+ Object.setPrototypeOf(builder, proto);
406
+ builder[GENERATOR] = self;
407
+ builder[STYLER] = _styler;
408
+ builder[IS_EMPTY] = _isEmpty;
409
+ return builder;
410
+ };
411
+ var applyStyle = (self, string) => {
412
+ if (self.level <= 0 || !string) return self[IS_EMPTY] ? "" : string;
413
+ let styler = self[STYLER];
414
+ if (styler === void 0) return string;
415
+ const { openAll, closeAll } = styler;
416
+ if (string.includes("\x1B")) while (styler !== void 0) {
417
+ string = stringReplaceAll(string, styler.close, styler.open);
418
+ styler = styler.parent;
419
+ }
420
+ const lfIndex = string.indexOf("\n");
421
+ if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
422
+ return openAll + string + closeAll;
423
+ };
424
+ Object.defineProperties(createChalk.prototype, styles);
425
+ var chalk = createChalk();
426
+ createChalk({ level: stderrColor ? stderrColor.level : 0 });
427
+ //#endregion
428
+ //#region src/abstractRunnerExecutionWorker.ts
429
+ chalk.level = 3;
2145
430
  /**
2146
431
  * Abstract worker-runtime base class.
2147
432
  *
@@ -2284,14 +569,14 @@ var AbstractRunnerExecutionWorker = class {
2284
569
  const removeList = [];
2285
570
  for (const [, runner] of Object.entries(this.#runners)) if (runner.archived === false && (runner.runner.state === IRunnerState.completed || runner.runner.state === IRunnerState.error || runner.runner.state === IRunnerState.stopped || runner.runner.state === IRunnerState.terminated)) removeList.push(runner.runner.id);
2286
571
  if (removeList.length > 0) setTimeout(() => {
2287
- this.#debug(import_source.default.grey(`WorkerInstance:#processLoopExecutor(): Removing runners from collection: [${removeList}]`));
572
+ this.#debug(chalk.grey(`WorkerInstance:#processLoopExecutor(): Removing runners from collection: [${removeList}]`));
2288
573
  for (let i = 0; i < removeList.length; i++) {
2289
574
  this.#runners[removeList[i]].archived = true;
2290
- if (this.#archiveDeleteTimeout !== 0) if (detect_node.default) setTimeout(() => delete this.#runners[removeList[i]], this.#archiveDeleteTimeout * 1e3).unref();
575
+ if (this.#archiveDeleteTimeout !== 0) if (_nsshunt_stsutils.isNode) setTimeout(() => delete this.#runners[removeList[i]], this.#archiveDeleteTimeout * 1e3).unref();
2291
576
  else setTimeout(() => delete this.#runners[removeList[i]], this.#archiveDeleteTimeout * 1e3);
2292
577
  }
2293
578
  const message = `WorkerInstance:#processLoopExecutor(): Remaining Runner Count: [${Object.keys(this.#runners).length}]`;
2294
- this.#debug(import_source.default.magenta(message));
579
+ this.#debug(chalk.magenta(message));
2295
580
  setTimeout(this.#processLoopExecutor, 1e3);
2296
581
  }, 100);
2297
582
  else setTimeout(this.#processLoopExecutor, 1e3);
@@ -2360,7 +645,7 @@ var AbstractRunnerExecutionWorker = class {
2360
645
  #SetMessagePort = (workerMessagePort) => {
2361
646
  try {
2362
647
  this.#collectorCollectorPort = workerMessagePort.port;
2363
- if (detect_node.default) this.#collectorCollectorPort.on("message", (data) => {
648
+ if (_nsshunt_stsutils.isNode) this.#collectorCollectorPort.on("message", (data) => {
2364
649
  this.#silly(`collectorCollectorPort on('message'): ${JSON.stringify(data)}`);
2365
650
  });
2366
651
  else this.#collectorCollectorPort.addEventListener("message", (data) => {
@@ -3061,10 +1346,10 @@ var AbstractRunnerExecutionWorker = class {
3061
1346
  const { state } = this.#runners[runnerId].runner;
3062
1347
  if (state === IRunnerState.paused || state === IRunnerState.created) {
3063
1348
  const currentIteration = this.#GetRunnerIterationByRunnerId(runnerId);
3064
- this.#debug(`${import_source.default.magenta(`runner: [${runnerId}]`)} ExecuteRunner(${currentIteration})`);
1349
+ this.#debug(`${chalk.magenta(`runner: [${runnerId}]`)} ExecuteRunner(${currentIteration})`);
3065
1350
  result = await this.#GetRunnerInstanceByRunnerId(runnerId)?.ExecuteRunner();
3066
1351
  const newIteration = this.#IncRunnerIterationByRunnerId(runnerId);
3067
- this.#debug(`${import_source.default.magenta(` --> runner: [${runnerId}]`)} Next iteration number: [${newIteration}] for next Execute or Resume.`);
1352
+ this.#debug(`${chalk.magenta(` --> runner: [${runnerId}]`)} Next iteration number: [${newIteration}] for next Execute or Resume.`);
3068
1353
  this.#UpdateRunnerStateByRunnerId("#ExecuteRunner", runnerId, IRunnerState.paused);
3069
1354
  }
3070
1355
  } else this.#warn(`#ExecuteRunner(): Runner: [${runnerId}] not found`);
@@ -3097,9 +1382,9 @@ var AbstractRunnerExecutionWorker = class {
3097
1382
  if (this.#runners[runnerId]) {
3098
1383
  const { state } = this.#runners[runnerId].runner;
3099
1384
  if (state === IRunnerState.paused || state === IRunnerState.created || state === IRunnerState.running) {
3100
- this.#debug(import_source.default.cyan(`before: [${JSON.stringify(this.#GetRunnerOptionsByRunnerId(runnerId))}]`));
1385
+ this.#debug(chalk.cyan(`before: [${JSON.stringify(this.#GetRunnerOptionsByRunnerId(runnerId))}]`));
3101
1386
  this.#SetRunnerOptionsByRunnerId(runnerId, testRunnerTelemetryPayload.runner.options);
3102
- this.#debug(import_source.default.cyan(`after: [${JSON.stringify(this.#GetRunnerOptionsByRunnerId(runnerId))}]`));
1387
+ this.#debug(chalk.cyan(`after: [${JSON.stringify(this.#GetRunnerOptionsByRunnerId(runnerId))}]`));
3103
1388
  result = await this.#GetRunnerInstanceByRunnerId(runnerId)?.UpdateRunner(testRunnerTelemetryPayload.runner.options);
3104
1389
  }
3105
1390
  } else this.#warn(`#UpdateRunner(): Runner: [${runnerId}] not found`);
@@ -3197,6 +1482,32 @@ var AbstractRunnerExecutionWorker = class {
3197
1482
  };
3198
1483
  //#endregion
3199
1484
  //#region src/messageBroker.ts
1485
+ /**
1486
+ * STSMessageBroker
1487
+ * ----------------
1488
+ * Central message broker for worker <-> manager communications.
1489
+ *
1490
+ * Responsibilities:
1491
+ * - Create and manage callback-correlated request/response message flows
1492
+ * - Route inbound port messages as either:
1493
+ * - solicited responses (request/response messages with `messageId`)
1494
+ * - unsolicited push/event messages (telemetry, state changes, etc.)
1495
+ * - Initialise message ports between the manager and the worker
1496
+ * - Provide helper methods for sending worker-level and runner-level commands
1497
+ * - Manage response timeouts for outstanding requests
1498
+ *
1499
+ * High-level design:
1500
+ * - Every solicited request gets a generated `messageId`
1501
+ * - The broker stores a pending promise resolver keyed by `messageId`
1502
+ * - When a matching inbound response arrives, the broker resolves that promise
1503
+ * - If no response arrives before the configured timeout, the request is rejected
1504
+ *
1505
+ * Notes:
1506
+ * - This broker supports both Node and browser worker environments
1507
+ * - Environment-specific message port listener wiring is handled internally
1508
+ * - The broker itself does not interpret business meaning of unsolicited messages;
1509
+ * those are delegated to a caller-supplied callback
1510
+ */
3200
1511
  var import_lodash_merge = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
3201
1512
  /**
3202
1513
  * Lodash (Custom Build) <https://lodash.com/>
@@ -4768,8 +3079,8 @@ var import_lodash_merge = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin
4768
3079
  return false;
4769
3080
  }
4770
3081
  module.exports = merge;
4771
- })))());
4772
- import_source.default.level = 3;
3082
+ })))(), 1);
3083
+ chalk.level = 3;
4773
3084
  /**
4774
3085
  * Message broker used to coordinate request/response and push-style messaging
4775
3086
  * between the manager/runtime and worker instances.
@@ -4839,7 +3150,7 @@ var STSMessageBroker = class {
4839
3150
  * @param cb Callback used to handle unsolicited inbound messages.
4840
3151
  */
4841
3152
  SetupMessagePortListener = (stsWorkerEx, cb) => {
4842
- if (detect_node.default) stsWorkerEx.messagePort.on("message", (data) => {
3153
+ if (_nsshunt_stsutils.isNode) stsWorkerEx.messagePort.on("message", (data) => {
4843
3154
  this._processInboundMessage(data, cb);
4844
3155
  });
4845
3156
  else stsWorkerEx.messagePort.addEventListener("message", (data) => {
@@ -5070,7 +3381,7 @@ var STSMessageBroker = class {
5070
3381
  */
5071
3382
  GetPorts = () => {
5072
3383
  const { port1, port2 } = new MessageChannel();
5073
- if (!detect_node.default) port1.start();
3384
+ if (!_nsshunt_stsutils.isNode) port1.start();
5074
3385
  return {
5075
3386
  port1,
5076
3387
  port2
@@ -5402,7 +3713,7 @@ var RunnerInstance = class {
5402
3713
  };
5403
3714
  //#endregion
5404
3715
  //#region src/asyncRunnerInstanceManager.ts
5405
- import_source.default.level = 3;
3716
+ chalk.level = 3;
5406
3717
  /**
5407
3718
  * Factory/manager used to construct new live asynchronous runner instances.
5408
3719
  *
@@ -5534,7 +3845,7 @@ ${runnerId}`,
5534
3845
  * - This class owns only the archive list and loop scheduling; live worker/runner
5535
3846
  * ownership remains with the {@link WorkerRegistry}.
5536
3847
  */
5537
- import_source.default.level = 3;
3848
+ chalk.level = 3;
5538
3849
  /**
5539
3850
  * Archive manager for completed/stopped/failed runner instances.
5540
3851
  */
@@ -5640,7 +3951,7 @@ var ArchiveManager = class {
5640
3951
  */
5641
3952
  if (removeList.length > 0) {
5642
3953
  const startTimeout = setTimeout(async () => {
5643
- this.options.logger.debug(import_source.default.grey(`STSWorkerManager:_processLoopExecutor(): Removing runners from collection: [${JSON.stringify(removeList)}]`));
3954
+ this.options.logger.debug(chalk.grey(`STSWorkerManager:_processLoopExecutor(): Removing runners from collection: [${JSON.stringify(removeList)}]`));
5644
3955
  /**
5645
3956
  * Process each matched runner from the temporary remove list.
5646
3957
  */
@@ -5656,7 +3967,7 @@ var ArchiveManager = class {
5656
3967
  * publishing occurs after the runner is considered retired.
5657
3968
  */
5658
3969
  if (runnerEx.publishInstrumentController) {
5659
- this.options.logger.debug(import_source.default.grey(`Ending publish for runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
3970
+ this.options.logger.debug(chalk.grey(`Ending publish for runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
5660
3971
  runnerEx.publishInstrumentController.EndPublish();
5661
3972
  }
5662
3973
  /**
@@ -5665,14 +3976,14 @@ var ArchiveManager = class {
5665
3976
  * Terminated runners are treated as retired/removed but not archived.
5666
3977
  */
5667
3978
  if (runnerEx.state !== IRunnerState.terminated) {
5668
- this.options.logger.debug(import_source.default.grey(`Archive runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
3979
+ this.options.logger.debug(chalk.grey(`Archive runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
5669
3980
  const runner = runnerEx.toRunner();
5670
3981
  this.archiveList.push(runner);
5671
3982
  /**
5672
3983
  * Enforce archive list size cap by discarding the oldest item.
5673
3984
  */
5674
3985
  if (this.archiveList.length > this.options.maxArchiveListLength) this.archiveList.shift();
5675
- } else this.options.logger.debug(import_source.default.grey(`Runner has been terminated and will not be archived, runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
3986
+ } else this.options.logger.debug(chalk.grey(`Runner has been terminated and will not be archived, runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
5676
3987
  /**
5677
3988
  * Mark as archived regardless of whether it was actually added
5678
3989
  * to the archive list. This prevents the runner from being
@@ -5694,7 +4005,7 @@ var ArchiveManager = class {
5694
4005
  }
5695
4006
  delete this.archiveDelTimeout[delTimeoutId];
5696
4007
  }, this.archiveDeleteTimeout * 1e3);
5697
- if (detect_node.default) delTimeout.unref();
4008
+ if (_nsshunt_stsutils.isNode) delTimeout.unref();
5698
4009
  this.archiveDelTimeout[delTimeoutId] = {
5699
4010
  workerId: workerEx.id,
5700
4011
  runnerId: removeList[i].runnerId,
@@ -5709,21 +4020,21 @@ var ArchiveManager = class {
5709
4020
  */
5710
4021
  for (const [, workerEx] of Object.entries(this.options.workerRegistry.GetWorkersEx([]))) {
5711
4022
  const message = `STSWorkerManager:_processLoopExecutor(): Remaining runners from worker: [${workerEx.id}]: [${workerEx.GetAllRunnersEx().length}]`;
5712
- this.options.logger.debug(import_source.default.magenta(message));
4023
+ this.options.logger.debug(chalk.magenta(message));
5713
4024
  }
5714
4025
  /**
5715
4026
  * Schedule the next archive scan.
5716
4027
  */
5717
4028
  this.timeout = setTimeout(() => this.ProcessLoopExecutor(), 1e3);
5718
- if (detect_node.default) this.timeout.unref();
4029
+ if (_nsshunt_stsutils.isNode) this.timeout.unref();
5719
4030
  }, 100);
5720
- if (detect_node.default) startTimeout.unref();
4031
+ if (_nsshunt_stsutils.isNode) startTimeout.unref();
5721
4032
  } else {
5722
4033
  /**
5723
4034
  * No archive candidates found; just schedule the next scan.
5724
4035
  */
5725
4036
  this.timeout = setTimeout(() => this.ProcessLoopExecutor(), 1e3);
5726
- if (detect_node.default) this.timeout.unref();
4037
+ if (_nsshunt_stsutils.isNode) this.timeout.unref();
5727
4038
  }
5728
4039
  } catch (error) {
5729
4040
  this.options.logger.error(`_processLoopExecutor(): Error: [${error}]`);
@@ -5778,7 +4089,7 @@ var ArchiveManager = class {
5778
4089
  */
5779
4090
  Terminate = () => {
5780
4091
  this.options.logger.debug(`ArchiveManager:Terminate()`);
5781
- this.options.logger.debug(`Runtime context: isNode = [${detect_node.default}]`);
4092
+ this.options.logger.debug(`Runtime context: isNode = [${_nsshunt_stsutils.isNode}]`);
5782
4093
  if (this.timeout) {
5783
4094
  this.options.logger.debug(`ArchiveManager:Terminate() - this.timeout cleared ...`);
5784
4095
  clearTimeout(this.timeout);
@@ -6249,8 +4560,8 @@ var WorkerInstance = class {
6249
4560
  const runnerEx = this.#asyncRunnerInstanceManager.CreateAsyncRunner(this, runnerOptions);
6250
4561
  this.AddRunnerEx(runnerEx);
6251
4562
  const retVal = await this.#messageBroker.SendMessageToWorkerForRunnerWithCallBack(this, runnerEx, eIWMessageCommands.AddRunner);
6252
- if (runnerEx.publishInstrumentController) runnerEx.publishInstrumentController.LogEx(import_source.default.green(`Added runner: [${runnerEx.id}] into worker: [${this.id}]`));
6253
- if (retVal) this.#logger.debug(import_source.default.green(`Added runner: [${runnerEx.id}] into worker: [${this.id}] result: [${JSON.stringify(retVal)}]`));
4563
+ if (runnerEx.publishInstrumentController) runnerEx.publishInstrumentController.LogEx(chalk.green(`Added runner: [${runnerEx.id}] into worker: [${this.id}]`));
4564
+ if (retVal) this.#logger.debug(chalk.green(`Added runner: [${runnerEx.id}] into worker: [${this.id}] result: [${JSON.stringify(retVal)}]`));
6254
4565
  return runnerEx;
6255
4566
  } catch (error) {
6256
4567
  this.#logger.error(`AddRunnerToWorker(): Error: [${error}]`);
@@ -6260,7 +4571,7 @@ var WorkerInstance = class {
6260
4571
  };
6261
4572
  //#endregion
6262
4573
  //#region src/workerInstanceMannager.ts
6263
- import_source.default.level = 3;
4574
+ chalk.level = 3;
6264
4575
  /**
6265
4576
  * Manager-side factory/helper for worker instances.
6266
4577
  *
@@ -6354,7 +4665,7 @@ var WorkerInstanceManager = class {
6354
4665
  * @param stsWorkerEx Manager-side worker instance whose underlying actual worker should be monitored.
6355
4666
  */
6356
4667
  SetupWorkerSystemEvents = (stsWorkerEx) => {
6357
- if (detect_node.default) {
4668
+ if (_nsshunt_stsutils.isNode) {
6358
4669
  /**
6359
4670
  * Node.js worker thread exit event.
6360
4671
  *
@@ -6362,11 +4673,11 @@ var WorkerInstanceManager = class {
6362
4673
  */
6363
4674
  stsWorkerEx.worker.on("exit", (code) => {
6364
4675
  try {
6365
- this.options.logger.debug(import_source.default.magenta(`STSWorkerManager:stsWorkerEx.worker.on(exit): Worker exited with code: ${code}`));
4676
+ this.options.logger.debug(chalk.magenta(`STSWorkerManager:stsWorkerEx.worker.on(exit): Worker exited with code: ${code}`));
6366
4677
  this._EmitWorkerEvent("exit", stsWorkerEx);
6367
4678
  this.options.workerRegistry.DeleteWorker(stsWorkerEx.id);
6368
4679
  } catch (error) {
6369
- this.options.logger.error(import_source.default.red(`STSWorkerManager:stsWorkerEx.worker.on(exit): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
4680
+ this.options.logger.error(chalk.red(`STSWorkerManager:stsWorkerEx.worker.on(exit): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
6370
4681
  }
6371
4682
  });
6372
4683
  /**
@@ -6378,10 +4689,10 @@ var WorkerInstanceManager = class {
6378
4689
  */
6379
4690
  stsWorkerEx.worker.on("error", (error) => {
6380
4691
  try {
6381
- this.options.logger.error(import_source.default.red(`STSWorkerManager:stsWorkerEx.worker.on(error): Worker error: ${error}`));
4692
+ this.options.logger.error(chalk.red(`STSWorkerManager:stsWorkerEx.worker.on(error): Worker error: ${error}`));
6382
4693
  this._EmitWorkerEvent("error", stsWorkerEx);
6383
4694
  } catch (error) {
6384
- this.options.logger.error(import_source.default.red(`STSWorkerManager:stsWorkerEx.worker.on(error): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
4695
+ this.options.logger.error(chalk.red(`STSWorkerManager:stsWorkerEx.worker.on(error): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
6385
4696
  }
6386
4697
  });
6387
4698
  } else {
@@ -6392,11 +4703,11 @@ var WorkerInstanceManager = class {
6392
4703
  */
6393
4704
  stsWorkerEx.worker.onerror = (error) => {
6394
4705
  try {
6395
- this.options.logger.error(import_source.default.red("STSWorkerManager:stsWorkerEx.worker.onerror(): Error in worker:", error));
4706
+ this.options.logger.error(chalk.red("STSWorkerManager:stsWorkerEx.worker.onerror(): Error in worker:", error));
6396
4707
  this._EmitWorkerEvent("onerror", stsWorkerEx);
6397
4708
  this.options.workerRegistry.DeleteWorker(stsWorkerEx.id);
6398
4709
  } catch (error) {
6399
- this.options.logger.error(import_source.default.red(`STSWorkerManager:stsWorkerEx.worker.onerror(error): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
4710
+ this.options.logger.error(chalk.red(`STSWorkerManager:stsWorkerEx.worker.onerror(error): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
6400
4711
  }
6401
4712
  };
6402
4713
  /**
@@ -6407,10 +4718,10 @@ var WorkerInstanceManager = class {
6407
4718
  */
6408
4719
  stsWorkerEx.worker.onmessageerror = (error) => {
6409
4720
  try {
6410
- this.options.logger.error(import_source.default.red("STSWorkerManager:stsWorkerEx.worker.onmessageerror(): Message error in worker:", error));
4721
+ this.options.logger.error(chalk.red("STSWorkerManager:stsWorkerEx.worker.onmessageerror(): Message error in worker:", error));
6411
4722
  this._EmitWorkerEvent("onmessageerror", stsWorkerEx);
6412
4723
  } catch (error) {
6413
- this.options.logger.error(import_source.default.red(`STSWorkerManager:stsWorkerEx.worker.onmessageerror(error): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
4724
+ this.options.logger.error(chalk.red(`STSWorkerManager:stsWorkerEx.worker.onmessageerror(error): Error: [${error}] Worker: [${stsWorkerEx.id}]`));
6414
4725
  }
6415
4726
  };
6416
4727
  }
@@ -7478,7 +5789,7 @@ var WorkerStateSynchroniser = class {
7478
5789
  };
7479
5790
  //#endregion
7480
5791
  //#region src/workerCommandCoordinator.ts
7481
- import_source.default.level = 3;
5792
+ chalk.level = 3;
7482
5793
  /**
7483
5794
  * Central coordinator for worker-level and runner-level command execution.
7484
5795
  *
@@ -7724,7 +6035,7 @@ var WorkerCommandCoordinator = class {
7724
6035
  * - Most public methods are intentionally thin façade methods delegating to
7725
6036
  * more specialised collaborators.
7726
6037
  */
7727
- import_source.default.level = 3;
6038
+ chalk.level = 3;
7728
6039
  /**
7729
6040
  * Main manager/coordinator for workers and runners.
7730
6041
  *
@@ -7951,7 +6262,7 @@ var STSWorkerManager = class {
7951
6262
  */
7952
6263
  CreateAndWireWorker = (workerOptions, workerFactory, port1, port2) => {
7953
6264
  const stsWorkerEx = this.#workerInstanceManager.CreateWorkerInstance(workerOptions, port1, workerFactory);
7954
- if (this.#STSInstrumentController) this.#STSInstrumentController.LogEx(import_source.default.yellow(`pid: [${process.pid}] Creating new worker: [${stsWorkerEx.id}]`));
6265
+ if (this.#STSInstrumentController) this.#STSInstrumentController.LogEx(chalk.yellow(`pid: [${process.pid}] Creating new worker: [${stsWorkerEx.id}]`));
7955
6266
  this.#debug(`AddWorker::workerThreadWorkerOptions: Worker ID: [${stsWorkerEx.id}] Options: [${stsWorkerEx.options}]`);
7956
6267
  this.#messageBroker.SetupMessagePort(stsWorkerEx, port2);
7957
6268
  return stsWorkerEx;
@@ -8021,8 +6332,8 @@ var STSWorkerManager = class {
8021
6332
  const runnerEx = this.#asyncRunnerInstanceManager.CreateAsyncRunner(stsWorkerEx, runnerOptions);
8022
6333
  this.#workerRegistry.AddRunner(stsWorkerEx.id, runnerEx);
8023
6334
  const retVal = await this.#messageBroker.SendMessageToWorkerForRunnerWithCallBack(stsWorkerEx, runnerEx, eIWMessageCommands.AddRunner);
8024
- if (runnerEx.publishInstrumentController) runnerEx.publishInstrumentController.LogEx(import_source.default.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}]`));
8025
- if (retVal) this.#debug(import_source.default.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}] result: [${JSON.stringify(retVal)}]`));
6335
+ if (runnerEx.publishInstrumentController) runnerEx.publishInstrumentController.LogEx(chalk.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}]`));
6336
+ if (retVal) this.#debug(chalk.green(`Added runner: [${runnerEx.id}] into worker: [${stsWorkerEx.id}] result: [${JSON.stringify(retVal)}]`));
8026
6337
  return runnerEx;
8027
6338
  } catch (error) {
8028
6339
  this.#error(`AddRunnerToWorker(): Error: [${error}]`);