@keycloakify/angular 0.2.11 → 0.2.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/bin/986.index.js DELETED
@@ -1,1294 +0,0 @@
1
- export const id = 986;
2
- export const ids = [986];
3
- export const modules = {
4
-
5
- /***/ 672:
6
- /***/ ((__unused_webpack_module, exports) => {
7
-
8
-
9
-
10
- Object.defineProperty(exports, "__esModule", ({
11
- value: true
12
- }));
13
- exports.withPromise = exports.withCallback = void 0;
14
-
15
- /**
16
- * Open the input with a normal callback function
17
- *
18
- * @param {Input} input - input object
19
- * @param {function} valueMapper - function which maps the resulting id and value back to the expected format
20
- * @param {function} callback - callback function
21
- */
22
- const withCallback = (input, valueMapper, callback) => {
23
- input.open();
24
- input.onSelect((id, value) => callback(valueMapper(id, value)));
25
- };
26
- /**
27
- * Open the input with a promise
28
- *
29
- * @param {Input} input - input object
30
- * @param {function} valueMapper - function which maps the resulting id and value back to the expected format
31
- */
32
-
33
-
34
- exports.withCallback = withCallback;
35
-
36
- const withPromise = (input, valueMapper) => {
37
- return new Promise((resolve, reject) => {
38
- input.open();
39
- input.onSelect((id, value) => {
40
- if (id === null) {
41
- reject();
42
- } else {
43
- resolve(valueMapper(id, value));
44
- }
45
- });
46
- });
47
- };
48
-
49
- exports.withPromise = withPromise;
50
-
51
- /***/ }),
52
-
53
- /***/ 546:
54
- /***/ ((module, exports, __webpack_require__) => {
55
-
56
-
57
-
58
- Object.defineProperty(exports, "__esModule", ({
59
- value: true
60
- }));
61
- exports["default"] = void 0;
62
-
63
- var _input = _interopRequireDefault(__webpack_require__(938));
64
-
65
- var _renderer = _interopRequireDefault(__webpack_require__(547));
66
-
67
- var _callbackMappers = __webpack_require__(672);
68
-
69
- var _valueMappers = __webpack_require__(348);
70
-
71
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
72
-
73
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
74
-
75
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
76
-
77
- /**
78
- * Default options
79
- */
80
- const defaultOptions = {
81
- outputStream: process.stdout,
82
- inputStream: process.stdin,
83
- values: [],
84
- defaultValue: 0,
85
- selected: '(x)',
86
- unselected: '( )',
87
- indentation: 0,
88
- cleanup: true,
89
- valueRenderer: value => value
90
- };
91
- /**
92
- * Create an instance of cli-select with the given options
93
- *
94
- * @param {object} options - options for cli-select
95
- * @param {function} callback - if specified, a callback will be used, otherwise a promise gets returned (optional)
96
- */
97
-
98
- const creator = (options, callback) => {
99
- // merge options with default options
100
- options = _objectSpread({}, defaultOptions, options); // create renderer and input instances
101
-
102
- const renderer = new _renderer.default(options, options.outputStream);
103
- const input = new _input.default(options.inputStream);
104
- input.setDefaultValue(options.defaultValue);
105
- input.attachRenderer(renderer); // handle array and object values
106
-
107
- let valueMapper;
108
-
109
- if (Array.isArray(options.values)) {
110
- valueMapper = (0, _valueMappers.withArrayValues)(options);
111
- } else {
112
- valueMapper = (0, _valueMappers.withObjectValues)(options);
113
- } // map values
114
-
115
-
116
- options.values = valueMapper.input;
117
- input.setValues(options.values); // handle different callback methods
118
-
119
- if (typeof callback === 'function') {
120
- return (0, _callbackMappers.withCallback)(input, valueMapper.output, callback);
121
- } else {
122
- return (0, _callbackMappers.withPromise)(input, valueMapper.output);
123
- }
124
- };
125
-
126
- exports = module.exports = creator;
127
- Object.defineProperty(exports, "__esModule", ({
128
- value: true
129
- }));
130
- var _default = creator;
131
- exports["default"] = _default;
132
-
133
- /***/ }),
134
-
135
- /***/ 938:
136
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
137
-
138
-
139
-
140
- Object.defineProperty(exports, "__esModule", ({
141
- value: true
142
- }));
143
- exports["default"] = void 0;
144
-
145
- var _readline = _interopRequireDefault(__webpack_require__(785));
146
-
147
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
148
-
149
- /**
150
- * Handle cli input
151
- */
152
- class Input {
153
- /**
154
- * Input constructor
155
- *
156
- * @param {any} stream - stream to catch (optional)
157
- */
158
- constructor(stream = process.stdin) {
159
- // set default values
160
- this.stream = stream;
161
- this.values = [];
162
- this.selectedValue = 0;
163
-
164
- this.onSelectListener = () => {};
165
-
166
- this.onKeyPress = this.onKeyPress.bind(this);
167
- }
168
- /**
169
- * Set the available values
170
- *
171
- * @param {array} values - all available values
172
- */
173
-
174
-
175
- setValues(values) {
176
- this.values = values;
177
-
178
- if (this.renderer) {
179
- this.renderer.setValues(values);
180
- }
181
- }
182
- /**
183
- * Set the default value
184
- *
185
- * @param {number} defaultValue - default value id
186
- */
187
-
188
-
189
- setDefaultValue(defaultValue) {
190
- this.selectedValue = defaultValue;
191
- }
192
- /**
193
- * Attach a renderer to the input catcher
194
- *
195
- * @param {Renderer} renderer - renderer to use for rendering responses
196
- */
197
-
198
-
199
- attachRenderer(renderer) {
200
- this.renderer = renderer;
201
- this.renderer.setValues(this.values);
202
- }
203
- /**
204
- * Register an on select listener
205
- *
206
- * @param {function} listener - listener function which receives two parameters: valueId and value
207
- */
208
-
209
-
210
- onSelect(listener) {
211
- this.onSelectListener = listener;
212
- }
213
- /**
214
- * Open the stream and listen for input
215
- */
216
-
217
-
218
- open() {
219
- // register keypress event
220
- _readline.default.emitKeypressEvents(this.stream); // handle keypress
221
-
222
-
223
- this.stream.on('keypress', this.onKeyPress); // initially render the response
224
-
225
- if (this.renderer) {
226
- this.renderer.render(this.selectedValue);
227
- } // hide pressed keys and start listening on input
228
-
229
-
230
- this.stream.setRawMode(true);
231
- this.stream.resume();
232
- }
233
- /**
234
- * Close the stream
235
- *
236
- * @param {boolean} cancelled - true if no value was selected (optional)
237
- */
238
-
239
-
240
- close(cancelled = false) {
241
- // reset stream properties
242
- this.stream.setRawMode(false);
243
- this.stream.pause(); // cleanup the output
244
-
245
- if (this.renderer) {
246
- this.renderer.cleanup();
247
- } // call the on select listener
248
-
249
-
250
- if (cancelled) {
251
- this.onSelectListener(null);
252
- } else {
253
- this.onSelectListener(this.selectedValue, this.values[this.selectedValue]);
254
- }
255
-
256
- this.stream.removeListener('keypress', this.onKeyPress);
257
- }
258
- /**
259
- * Render the response
260
- */
261
-
262
-
263
- render() {
264
- if (!this.renderer) {
265
- return;
266
- }
267
-
268
- this.renderer.render(this.selectedValue);
269
- }
270
- /**
271
- * Handle key press event
272
- *
273
- * @param {string} string - input string
274
- * @param {object} key - object containing information about the pressed key
275
- */
276
-
277
-
278
- onKeyPress(string, key) {
279
- if (key) {
280
- if (key.name === 'up' && this.selectedValue > 0) {
281
- this.selectedValue--;
282
- this.render();
283
- } else if (key.name === 'down' && this.selectedValue + 1 < this.values.length) {
284
- this.selectedValue++;
285
- this.render();
286
- } else if (key.name === 'return') {
287
- this.close();
288
- } else if (key.name === 'escape' || key.name === 'c' && key.ctrl) {
289
- this.close(true);
290
- }
291
- }
292
- }
293
-
294
- }
295
-
296
- exports["default"] = Input;
297
-
298
- /***/ }),
299
-
300
- /***/ 547:
301
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
302
-
303
-
304
-
305
- Object.defineProperty(exports, "__esModule", ({
306
- value: true
307
- }));
308
- exports["default"] = void 0;
309
-
310
- var _readline = _interopRequireDefault(__webpack_require__(785));
311
-
312
- var _ansiEscapes = __webpack_require__(719);
313
-
314
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
315
-
316
- /**
317
- * Response renderer
318
- */
319
- class Renderer {
320
- /**
321
- * Renderer constructor
322
- *
323
- * @param {object} options - renderer options
324
- * @param {any} stream - stream to write to (optional)
325
- */
326
- constructor(options, stream = process.stdout) {
327
- this.options = options;
328
- this.stream = stream;
329
- this.values = [];
330
- this.initialRender = true;
331
- }
332
- /**
333
- * Set the available values
334
- *
335
- * @param {array} values - all available values
336
- */
337
-
338
-
339
- setValues(values) {
340
- this.values = values;
341
- }
342
- /**
343
- * Render the values
344
- *
345
- * @param {number} selectedValue - selected value (optional)
346
- */
347
-
348
-
349
- render(selectedValue = 0) {
350
- if (this.initialRender) {
351
- // hide the cursor initially
352
- this.initialRender = false;
353
- this.stream.write(_ansiEscapes.cursorHide);
354
- } else {
355
- // remove previous lines and values
356
- this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
357
- } // output the current values
358
-
359
-
360
- this.values.forEach((value, index) => {
361
- const symbol = selectedValue === index ? this.options.selected : this.options.unselected;
362
- const indentation = ' '.repeat(this.options.indentation);
363
- const renderedValue = this.options.valueRenderer(value, selectedValue === index);
364
- const end = index !== this.values.length - 1 ? '\n' : '';
365
- this.stream.write(indentation + symbol + ' ' + renderedValue + end);
366
- });
367
- }
368
- /**
369
- * Cleanup the console at the end
370
- */
371
-
372
-
373
- cleanup() {
374
- this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
375
- this.stream.write(_ansiEscapes.cursorShow);
376
- }
377
-
378
- }
379
-
380
- exports["default"] = Renderer;
381
-
382
- /***/ }),
383
-
384
- /***/ 348:
385
- /***/ ((__unused_webpack_module, exports) => {
386
-
387
-
388
-
389
- Object.defineProperty(exports, "__esModule", ({
390
- value: true
391
- }));
392
- exports.withObjectValues = exports.withArrayValues = void 0;
393
-
394
- /**
395
- * Map incoming and outgoing values if the initial values are an array
396
- *
397
- * @param {object} options - cli-select options
398
- */
399
- const withArrayValues = options => {
400
- return {
401
- input: options.values,
402
- output: (id, value) => {
403
- return {
404
- id,
405
- value
406
- };
407
- }
408
- };
409
- };
410
- /**
411
- * Map incoming and outgoing values if the initial values are an object
412
- *
413
- * @param {object} options - cli-select options
414
- */
415
-
416
-
417
- exports.withArrayValues = withArrayValues;
418
-
419
- const withObjectValues = options => {
420
- const originalValues = options.values;
421
- return {
422
- input: Object.values(originalValues),
423
- output: (id, value) => {
424
- return {
425
- id: Object.keys(originalValues)[id],
426
- value
427
- };
428
- }
429
- };
430
- };
431
-
432
- exports.withObjectValues = withObjectValues;
433
-
434
- /***/ }),
435
-
436
- /***/ 719:
437
- /***/ ((module) => {
438
-
439
-
440
- const x = module.exports;
441
- const ESC = '\u001B[';
442
- const OSC = '\u001B]';
443
- const BEL = '\u0007';
444
- const SEP = ';';
445
- const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
446
-
447
- x.cursorTo = (x, y) => {
448
- if (typeof x !== 'number') {
449
- throw new TypeError('The `x` argument is required');
450
- }
451
-
452
- if (typeof y !== 'number') {
453
- return ESC + (x + 1) + 'G';
454
- }
455
-
456
- return ESC + (y + 1) + ';' + (x + 1) + 'H';
457
- };
458
-
459
- x.cursorMove = (x, y) => {
460
- if (typeof x !== 'number') {
461
- throw new TypeError('The `x` argument is required');
462
- }
463
-
464
- let ret = '';
465
-
466
- if (x < 0) {
467
- ret += ESC + (-x) + 'D';
468
- } else if (x > 0) {
469
- ret += ESC + x + 'C';
470
- }
471
-
472
- if (y < 0) {
473
- ret += ESC + (-y) + 'A';
474
- } else if (y > 0) {
475
- ret += ESC + y + 'B';
476
- }
477
-
478
- return ret;
479
- };
480
-
481
- x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A';
482
- x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B';
483
- x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C';
484
- x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D';
485
-
486
- x.cursorLeft = ESC + 'G';
487
- x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's');
488
- x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u');
489
- x.cursorGetPosition = ESC + '6n';
490
- x.cursorNextLine = ESC + 'E';
491
- x.cursorPrevLine = ESC + 'F';
492
- x.cursorHide = ESC + '?25l';
493
- x.cursorShow = ESC + '?25h';
494
-
495
- x.eraseLines = count => {
496
- let clear = '';
497
-
498
- for (let i = 0; i < count; i++) {
499
- clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : '');
500
- }
501
-
502
- if (count) {
503
- clear += x.cursorLeft;
504
- }
505
-
506
- return clear;
507
- };
508
-
509
- x.eraseEndLine = ESC + 'K';
510
- x.eraseStartLine = ESC + '1K';
511
- x.eraseLine = ESC + '2K';
512
- x.eraseDown = ESC + 'J';
513
- x.eraseUp = ESC + '1J';
514
- x.eraseScreen = ESC + '2J';
515
- x.scrollUp = ESC + 'S';
516
- x.scrollDown = ESC + 'T';
517
-
518
- x.clearScreen = '\u001Bc';
519
-
520
- x.clearTerminal = process.platform === 'win32' ?
521
- `${x.eraseScreen}${ESC}0f` :
522
- // 1. Erases the screen (Only done in case `2` is not supported)
523
- // 2. Erases the whole screen including scrollback buffer
524
- // 3. Moves cursor to the top-left position
525
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
526
- `${x.eraseScreen}${ESC}3J${ESC}H`;
527
-
528
- x.beep = BEL;
529
-
530
- x.link = (text, url) => {
531
- return [
532
- OSC,
533
- '8',
534
- SEP,
535
- SEP,
536
- url,
537
- BEL,
538
- text,
539
- OSC,
540
- '8',
541
- SEP,
542
- SEP,
543
- BEL
544
- ].join('');
545
- };
546
-
547
- x.image = (buf, opts) => {
548
- opts = opts || {};
549
-
550
- let ret = OSC + '1337;File=inline=1';
551
-
552
- if (opts.width) {
553
- ret += `;width=${opts.width}`;
554
- }
555
-
556
- if (opts.height) {
557
- ret += `;height=${opts.height}`;
558
- }
559
-
560
- if (opts.preserveAspectRatio === false) {
561
- ret += ';preserveAspectRatio=0';
562
- }
563
-
564
- return ret + ':' + buf.toString('base64') + BEL;
565
- };
566
-
567
- x.iTerm = {};
568
-
569
- x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL;
570
-
571
-
572
- /***/ }),
573
-
574
- /***/ 797:
575
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
576
-
577
-
578
- // EXPORTS
579
- __webpack_require__.d(__webpack_exports__, {
580
- Ay: () => (/* binding */ source)
581
- });
582
-
583
- // UNUSED EXPORTS: Chalk, backgroundColorNames, backgroundColors, chalkStderr, colorNames, colors, foregroundColorNames, foregroundColors, modifierNames, modifiers, supportsColor, supportsColorStderr
584
-
585
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/ansi-styles/index.js
586
- const ANSI_BACKGROUND_OFFSET = 10;
587
-
588
- const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
589
-
590
- const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
591
-
592
- const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
593
-
594
- const styles = {
595
- modifier: {
596
- reset: [0, 0],
597
- // 21 isn't widely supported and 22 does the same thing
598
- bold: [1, 22],
599
- dim: [2, 22],
600
- italic: [3, 23],
601
- underline: [4, 24],
602
- overline: [53, 55],
603
- inverse: [7, 27],
604
- hidden: [8, 28],
605
- strikethrough: [9, 29],
606
- },
607
- color: {
608
- black: [30, 39],
609
- red: [31, 39],
610
- green: [32, 39],
611
- yellow: [33, 39],
612
- blue: [34, 39],
613
- magenta: [35, 39],
614
- cyan: [36, 39],
615
- white: [37, 39],
616
-
617
- // Bright color
618
- blackBright: [90, 39],
619
- gray: [90, 39], // Alias of `blackBright`
620
- grey: [90, 39], // Alias of `blackBright`
621
- redBright: [91, 39],
622
- greenBright: [92, 39],
623
- yellowBright: [93, 39],
624
- blueBright: [94, 39],
625
- magentaBright: [95, 39],
626
- cyanBright: [96, 39],
627
- whiteBright: [97, 39],
628
- },
629
- bgColor: {
630
- bgBlack: [40, 49],
631
- bgRed: [41, 49],
632
- bgGreen: [42, 49],
633
- bgYellow: [43, 49],
634
- bgBlue: [44, 49],
635
- bgMagenta: [45, 49],
636
- bgCyan: [46, 49],
637
- bgWhite: [47, 49],
638
-
639
- // Bright color
640
- bgBlackBright: [100, 49],
641
- bgGray: [100, 49], // Alias of `bgBlackBright`
642
- bgGrey: [100, 49], // Alias of `bgBlackBright`
643
- bgRedBright: [101, 49],
644
- bgGreenBright: [102, 49],
645
- bgYellowBright: [103, 49],
646
- bgBlueBright: [104, 49],
647
- bgMagentaBright: [105, 49],
648
- bgCyanBright: [106, 49],
649
- bgWhiteBright: [107, 49],
650
- },
651
- };
652
-
653
- const modifierNames = Object.keys(styles.modifier);
654
- const foregroundColorNames = Object.keys(styles.color);
655
- const backgroundColorNames = Object.keys(styles.bgColor);
656
- const colorNames = [...foregroundColorNames, ...backgroundColorNames];
657
-
658
- function assembleStyles() {
659
- const codes = new Map();
660
-
661
- for (const [groupName, group] of Object.entries(styles)) {
662
- for (const [styleName, style] of Object.entries(group)) {
663
- styles[styleName] = {
664
- open: `\u001B[${style[0]}m`,
665
- close: `\u001B[${style[1]}m`,
666
- };
667
-
668
- group[styleName] = styles[styleName];
669
-
670
- codes.set(style[0], style[1]);
671
- }
672
-
673
- Object.defineProperty(styles, groupName, {
674
- value: group,
675
- enumerable: false,
676
- });
677
- }
678
-
679
- Object.defineProperty(styles, 'codes', {
680
- value: codes,
681
- enumerable: false,
682
- });
683
-
684
- styles.color.close = '\u001B[39m';
685
- styles.bgColor.close = '\u001B[49m';
686
-
687
- styles.color.ansi = wrapAnsi16();
688
- styles.color.ansi256 = wrapAnsi256();
689
- styles.color.ansi16m = wrapAnsi16m();
690
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
691
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
692
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
693
-
694
- // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
695
- Object.defineProperties(styles, {
696
- rgbToAnsi256: {
697
- value(red, green, blue) {
698
- // We use the extended greyscale palette here, with the exception of
699
- // black and white. normal palette only has 4 greyscale shades.
700
- if (red === green && green === blue) {
701
- if (red < 8) {
702
- return 16;
703
- }
704
-
705
- if (red > 248) {
706
- return 231;
707
- }
708
-
709
- return Math.round(((red - 8) / 247) * 24) + 232;
710
- }
711
-
712
- return 16
713
- + (36 * Math.round(red / 255 * 5))
714
- + (6 * Math.round(green / 255 * 5))
715
- + Math.round(blue / 255 * 5);
716
- },
717
- enumerable: false,
718
- },
719
- hexToRgb: {
720
- value(hex) {
721
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
722
- if (!matches) {
723
- return [0, 0, 0];
724
- }
725
-
726
- let [colorString] = matches;
727
-
728
- if (colorString.length === 3) {
729
- colorString = [...colorString].map(character => character + character).join('');
730
- }
731
-
732
- const integer = Number.parseInt(colorString, 16);
733
-
734
- return [
735
- /* eslint-disable no-bitwise */
736
- (integer >> 16) & 0xFF,
737
- (integer >> 8) & 0xFF,
738
- integer & 0xFF,
739
- /* eslint-enable no-bitwise */
740
- ];
741
- },
742
- enumerable: false,
743
- },
744
- hexToAnsi256: {
745
- value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
746
- enumerable: false,
747
- },
748
- ansi256ToAnsi: {
749
- value(code) {
750
- if (code < 8) {
751
- return 30 + code;
752
- }
753
-
754
- if (code < 16) {
755
- return 90 + (code - 8);
756
- }
757
-
758
- let red;
759
- let green;
760
- let blue;
761
-
762
- if (code >= 232) {
763
- red = (((code - 232) * 10) + 8) / 255;
764
- green = red;
765
- blue = red;
766
- } else {
767
- code -= 16;
768
-
769
- const remainder = code % 36;
770
-
771
- red = Math.floor(code / 36) / 5;
772
- green = Math.floor(remainder / 6) / 5;
773
- blue = (remainder % 6) / 5;
774
- }
775
-
776
- const value = Math.max(red, green, blue) * 2;
777
-
778
- if (value === 0) {
779
- return 30;
780
- }
781
-
782
- // eslint-disable-next-line no-bitwise
783
- let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
784
-
785
- if (value === 2) {
786
- result += 60;
787
- }
788
-
789
- return result;
790
- },
791
- enumerable: false,
792
- },
793
- rgbToAnsi: {
794
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
795
- enumerable: false,
796
- },
797
- hexToAnsi: {
798
- value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
799
- enumerable: false,
800
- },
801
- });
802
-
803
- return styles;
804
- }
805
-
806
- const ansiStyles = assembleStyles();
807
-
808
- /* harmony default export */ const ansi_styles = (ansiStyles);
809
-
810
- // EXTERNAL MODULE: external "node:process"
811
- var external_node_process_ = __webpack_require__(708);
812
- // EXTERNAL MODULE: external "node:os"
813
- var external_node_os_ = __webpack_require__(161);
814
- // EXTERNAL MODULE: external "node:tty"
815
- var external_node_tty_ = __webpack_require__(66);
816
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/supports-color/index.js
817
-
818
-
819
-
820
-
821
- // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
822
- /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
823
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : external_node_process_.argv) {
824
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
825
- const position = argv.indexOf(prefix + flag);
826
- const terminatorPosition = argv.indexOf('--');
827
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
828
- }
829
-
830
- const {env} = external_node_process_;
831
-
832
- let flagForceColor;
833
- if (
834
- hasFlag('no-color')
835
- || hasFlag('no-colors')
836
- || hasFlag('color=false')
837
- || hasFlag('color=never')
838
- ) {
839
- flagForceColor = 0;
840
- } else if (
841
- hasFlag('color')
842
- || hasFlag('colors')
843
- || hasFlag('color=true')
844
- || hasFlag('color=always')
845
- ) {
846
- flagForceColor = 1;
847
- }
848
-
849
- function envForceColor() {
850
- if ('FORCE_COLOR' in env) {
851
- if (env.FORCE_COLOR === 'true') {
852
- return 1;
853
- }
854
-
855
- if (env.FORCE_COLOR === 'false') {
856
- return 0;
857
- }
858
-
859
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
860
- }
861
- }
862
-
863
- function translateLevel(level) {
864
- if (level === 0) {
865
- return false;
866
- }
867
-
868
- return {
869
- level,
870
- hasBasic: true,
871
- has256: level >= 2,
872
- has16m: level >= 3,
873
- };
874
- }
875
-
876
- function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
877
- const noFlagForceColor = envForceColor();
878
- if (noFlagForceColor !== undefined) {
879
- flagForceColor = noFlagForceColor;
880
- }
881
-
882
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
883
-
884
- if (forceColor === 0) {
885
- return 0;
886
- }
887
-
888
- if (sniffFlags) {
889
- if (hasFlag('color=16m')
890
- || hasFlag('color=full')
891
- || hasFlag('color=truecolor')) {
892
- return 3;
893
- }
894
-
895
- if (hasFlag('color=256')) {
896
- return 2;
897
- }
898
- }
899
-
900
- // Check for Azure DevOps pipelines.
901
- // Has to be above the `!streamIsTTY` check.
902
- if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
903
- return 1;
904
- }
905
-
906
- if (haveStream && !streamIsTTY && forceColor === undefined) {
907
- return 0;
908
- }
909
-
910
- const min = forceColor || 0;
911
-
912
- if (env.TERM === 'dumb') {
913
- return min;
914
- }
915
-
916
- if (external_node_process_.platform === 'win32') {
917
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
918
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
919
- const osRelease = external_node_os_.release().split('.');
920
- if (
921
- Number(osRelease[0]) >= 10
922
- && Number(osRelease[2]) >= 10_586
923
- ) {
924
- return Number(osRelease[2]) >= 14_931 ? 3 : 2;
925
- }
926
-
927
- return 1;
928
- }
929
-
930
- if ('CI' in env) {
931
- if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
932
- return 3;
933
- }
934
-
935
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
936
- return 1;
937
- }
938
-
939
- return min;
940
- }
941
-
942
- if ('TEAMCITY_VERSION' in env) {
943
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
944
- }
945
-
946
- if (env.COLORTERM === 'truecolor') {
947
- return 3;
948
- }
949
-
950
- if (env.TERM === 'xterm-kitty') {
951
- return 3;
952
- }
953
-
954
- if ('TERM_PROGRAM' in env) {
955
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
956
-
957
- switch (env.TERM_PROGRAM) {
958
- case 'iTerm.app': {
959
- return version >= 3 ? 3 : 2;
960
- }
961
-
962
- case 'Apple_Terminal': {
963
- return 2;
964
- }
965
- // No default
966
- }
967
- }
968
-
969
- if (/-256(color)?$/i.test(env.TERM)) {
970
- return 2;
971
- }
972
-
973
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
974
- return 1;
975
- }
976
-
977
- if ('COLORTERM' in env) {
978
- return 1;
979
- }
980
-
981
- return min;
982
- }
983
-
984
- function createSupportsColor(stream, options = {}) {
985
- const level = _supportsColor(stream, {
986
- streamIsTTY: stream && stream.isTTY,
987
- ...options,
988
- });
989
-
990
- return translateLevel(level);
991
- }
992
-
993
- const supportsColor = {
994
- stdout: createSupportsColor({isTTY: external_node_tty_.isatty(1)}),
995
- stderr: createSupportsColor({isTTY: external_node_tty_.isatty(2)}),
996
- };
997
-
998
- /* harmony default export */ const supports_color = (supportsColor);
999
-
1000
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/utilities.js
1001
- // TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
1002
- function stringReplaceAll(string, substring, replacer) {
1003
- let index = string.indexOf(substring);
1004
- if (index === -1) {
1005
- return string;
1006
- }
1007
-
1008
- const substringLength = substring.length;
1009
- let endIndex = 0;
1010
- let returnValue = '';
1011
- do {
1012
- returnValue += string.slice(endIndex, index) + substring + replacer;
1013
- endIndex = index + substringLength;
1014
- index = string.indexOf(substring, endIndex);
1015
- } while (index !== -1);
1016
-
1017
- returnValue += string.slice(endIndex);
1018
- return returnValue;
1019
- }
1020
-
1021
- function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
1022
- let endIndex = 0;
1023
- let returnValue = '';
1024
- do {
1025
- const gotCR = string[index - 1] === '\r';
1026
- returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
1027
- endIndex = index + 1;
1028
- index = string.indexOf('\n', endIndex);
1029
- } while (index !== -1);
1030
-
1031
- returnValue += string.slice(endIndex);
1032
- return returnValue;
1033
- }
1034
-
1035
- ;// CONCATENATED MODULE: ./node_modules/chalk/source/index.js
1036
-
1037
-
1038
-
1039
-
1040
- const {stdout: stdoutColor, stderr: stderrColor} = supports_color;
1041
-
1042
- const GENERATOR = Symbol('GENERATOR');
1043
- const STYLER = Symbol('STYLER');
1044
- const IS_EMPTY = Symbol('IS_EMPTY');
1045
-
1046
- // `supportsColor.level` → `ansiStyles.color[name]` mapping
1047
- const levelMapping = [
1048
- 'ansi',
1049
- 'ansi',
1050
- 'ansi256',
1051
- 'ansi16m',
1052
- ];
1053
-
1054
- const source_styles = Object.create(null);
1055
-
1056
- const applyOptions = (object, options = {}) => {
1057
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
1058
- throw new Error('The `level` option should be an integer from 0 to 3');
1059
- }
1060
-
1061
- // Detect level if not set manually
1062
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
1063
- object.level = options.level === undefined ? colorLevel : options.level;
1064
- };
1065
-
1066
- class Chalk {
1067
- constructor(options) {
1068
- // eslint-disable-next-line no-constructor-return
1069
- return chalkFactory(options);
1070
- }
1071
- }
1072
-
1073
- const chalkFactory = options => {
1074
- const chalk = (...strings) => strings.join(' ');
1075
- applyOptions(chalk, options);
1076
-
1077
- Object.setPrototypeOf(chalk, createChalk.prototype);
1078
-
1079
- return chalk;
1080
- };
1081
-
1082
- function createChalk(options) {
1083
- return chalkFactory(options);
1084
- }
1085
-
1086
- Object.setPrototypeOf(createChalk.prototype, Function.prototype);
1087
-
1088
- for (const [styleName, style] of Object.entries(ansi_styles)) {
1089
- source_styles[styleName] = {
1090
- get() {
1091
- const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
1092
- Object.defineProperty(this, styleName, {value: builder});
1093
- return builder;
1094
- },
1095
- };
1096
- }
1097
-
1098
- source_styles.visible = {
1099
- get() {
1100
- const builder = createBuilder(this, this[STYLER], true);
1101
- Object.defineProperty(this, 'visible', {value: builder});
1102
- return builder;
1103
- },
1104
- };
1105
-
1106
- const getModelAnsi = (model, level, type, ...arguments_) => {
1107
- if (model === 'rgb') {
1108
- if (level === 'ansi16m') {
1109
- return ansi_styles[type].ansi16m(...arguments_);
1110
- }
1111
-
1112
- if (level === 'ansi256') {
1113
- return ansi_styles[type].ansi256(ansi_styles.rgbToAnsi256(...arguments_));
1114
- }
1115
-
1116
- return ansi_styles[type].ansi(ansi_styles.rgbToAnsi(...arguments_));
1117
- }
1118
-
1119
- if (model === 'hex') {
1120
- return getModelAnsi('rgb', level, type, ...ansi_styles.hexToRgb(...arguments_));
1121
- }
1122
-
1123
- return ansi_styles[type][model](...arguments_);
1124
- };
1125
-
1126
- const usedModels = ['rgb', 'hex', 'ansi256'];
1127
-
1128
- for (const model of usedModels) {
1129
- source_styles[model] = {
1130
- get() {
1131
- const {level} = this;
1132
- return function (...arguments_) {
1133
- const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansi_styles.color.close, this[STYLER]);
1134
- return createBuilder(this, styler, this[IS_EMPTY]);
1135
- };
1136
- },
1137
- };
1138
-
1139
- const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
1140
- source_styles[bgModel] = {
1141
- get() {
1142
- const {level} = this;
1143
- return function (...arguments_) {
1144
- const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansi_styles.bgColor.close, this[STYLER]);
1145
- return createBuilder(this, styler, this[IS_EMPTY]);
1146
- };
1147
- },
1148
- };
1149
- }
1150
-
1151
- const proto = Object.defineProperties(() => {}, {
1152
- ...source_styles,
1153
- level: {
1154
- enumerable: true,
1155
- get() {
1156
- return this[GENERATOR].level;
1157
- },
1158
- set(level) {
1159
- this[GENERATOR].level = level;
1160
- },
1161
- },
1162
- });
1163
-
1164
- const createStyler = (open, close, parent) => {
1165
- let openAll;
1166
- let closeAll;
1167
- if (parent === undefined) {
1168
- openAll = open;
1169
- closeAll = close;
1170
- } else {
1171
- openAll = parent.openAll + open;
1172
- closeAll = close + parent.closeAll;
1173
- }
1174
-
1175
- return {
1176
- open,
1177
- close,
1178
- openAll,
1179
- closeAll,
1180
- parent,
1181
- };
1182
- };
1183
-
1184
- const createBuilder = (self, _styler, _isEmpty) => {
1185
- // Single argument is hot path, implicit coercion is faster than anything
1186
- // eslint-disable-next-line no-implicit-coercion
1187
- const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
1188
-
1189
- // We alter the prototype because we must return a function, but there is
1190
- // no way to create a function with a different prototype
1191
- Object.setPrototypeOf(builder, proto);
1192
-
1193
- builder[GENERATOR] = self;
1194
- builder[STYLER] = _styler;
1195
- builder[IS_EMPTY] = _isEmpty;
1196
-
1197
- return builder;
1198
- };
1199
-
1200
- const applyStyle = (self, string) => {
1201
- if (self.level <= 0 || !string) {
1202
- return self[IS_EMPTY] ? '' : string;
1203
- }
1204
-
1205
- let styler = self[STYLER];
1206
-
1207
- if (styler === undefined) {
1208
- return string;
1209
- }
1210
-
1211
- const {openAll, closeAll} = styler;
1212
- if (string.includes('\u001B')) {
1213
- while (styler !== undefined) {
1214
- // Replace any instances already present with a re-opening code
1215
- // otherwise only the part of the string until said closing code
1216
- // will be colored, and the rest will simply be 'plain'.
1217
- string = stringReplaceAll(string, styler.close, styler.open);
1218
-
1219
- styler = styler.parent;
1220
- }
1221
- }
1222
-
1223
- // We can move both next actions out of loop, because remaining actions in loop won't have
1224
- // any/visible effect on parts we add here. Close the styling before a linebreak and reopen
1225
- // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
1226
- const lfIndex = string.indexOf('\n');
1227
- if (lfIndex !== -1) {
1228
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1229
- }
1230
-
1231
- return openAll + string + closeAll;
1232
- };
1233
-
1234
- Object.defineProperties(createChalk.prototype, source_styles);
1235
-
1236
- const chalk = createChalk();
1237
- const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
1238
-
1239
-
1240
-
1241
-
1242
-
1243
- /* harmony default export */ const source = (chalk);
1244
-
1245
-
1246
- /***/ }),
1247
-
1248
- /***/ 94:
1249
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1250
-
1251
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1252
- /* harmony export */ id: () => (/* binding */ id)
1253
- /* harmony export */ });
1254
- /** https://docs.tsafe.dev/id */
1255
- const id = (x) => x;
1256
-
1257
-
1258
- //# sourceMappingURL=id.mjs.map
1259
-
1260
-
1261
- /***/ }),
1262
-
1263
- /***/ 289:
1264
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1265
-
1266
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1267
- /* harmony export */ is: () => (/* reexport safe */ _assert_mjs__WEBPACK_IMPORTED_MODULE_0__.is)
1268
- /* harmony export */ });
1269
- /* harmony import */ var _assert_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(966);
1270
-
1271
- //# sourceMappingURL=is.mjs.map
1272
-
1273
-
1274
- /***/ }),
1275
-
1276
- /***/ 886:
1277
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1278
-
1279
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1280
- /* harmony export */ I: () => (/* binding */ symToStr)
1281
- /* harmony export */ });
1282
- /** @see <https://docs.tsafe.dev/main/symtostr> */
1283
- function symToStr(wrap) {
1284
- // @ts-expect-error: We know better
1285
- return Object.keys(wrap)[0];
1286
- }
1287
-
1288
-
1289
- //# sourceMappingURL=symToStr.mjs.map
1290
-
1291
-
1292
- /***/ })
1293
-
1294
- };