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