rolldown 0.10.5 → 0.11.0

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.
@@ -0,0 +1,897 @@
1
+ import __node_module__ from 'node:module';
2
+ const require = __node_module__.createRequire(import.meta.url)
3
+ import { sep } from "node:path";
4
+ import { default as process$1 } from "node:process";
5
+ import { formatWithOptions } from "node:util";
6
+ import * as tty from "node:tty";
7
+
8
+ //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
9
+ const LogLevels = {
10
+ silent: Number.NEGATIVE_INFINITY,
11
+ fatal: 0,
12
+ error: 0,
13
+ warn: 1,
14
+ log: 2,
15
+ info: 3,
16
+ success: 3,
17
+ fail: 3,
18
+ ready: 3,
19
+ start: 3,
20
+ box: 3,
21
+ debug: 4,
22
+ trace: 5,
23
+ verbose: Number.POSITIVE_INFINITY
24
+ };
25
+ const LogTypes = {
26
+ silent: {level: -1},
27
+ fatal: {level: LogLevels.fatal},
28
+ error: {level: LogLevels.error},
29
+ warn: {level: LogLevels.warn},
30
+ log: {level: LogLevels.log},
31
+ info: {level: LogLevels.info},
32
+ success: {level: LogLevels.success},
33
+ fail: {level: LogLevels.fail},
34
+ ready: {level: LogLevels.info},
35
+ start: {level: LogLevels.info},
36
+ box: {level: LogLevels.info},
37
+ debug: {level: LogLevels.debug},
38
+ trace: {level: LogLevels.trace},
39
+ verbose: {level: LogLevels.verbose}
40
+ };
41
+ function isObject(value) {
42
+ return value !== null && typeof value === 'object';
43
+ }
44
+ function _defu(baseObject, defaults, namespace = '.', merger) {
45
+ if (!isObject(defaults)) {
46
+ return _defu(baseObject, {}, namespace, merger);
47
+ }
48
+ const object = Object.assign({}, defaults);
49
+ for (const key in baseObject) {
50
+ if (key === '__proto__' || key === 'constructor') {
51
+ continue;
52
+ }
53
+ const value = baseObject[key];
54
+ if (value === null || value === void 0) {
55
+ continue;
56
+ }
57
+ if (merger && merger(object, key, value, namespace)) {
58
+ continue;
59
+ }
60
+ if (Array.isArray(value) && Array.isArray(object[key])) {
61
+ object[key] = [...value, ...object[key]];
62
+ } else if (isObject(value) && isObject(object[key])) {
63
+ object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : '') + key.toString(), merger);
64
+ } else {
65
+ object[key] = value;
66
+ }
67
+ }
68
+ return object;
69
+ }
70
+ function createDefu(merger) {
71
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, '', merger), {});
72
+ }
73
+ const defu = createDefu();
74
+ function isPlainObject(obj) {
75
+ return Object.prototype.toString.call(obj) === '[object Object]';
76
+ }
77
+ function isLogObj(arg) {
78
+ if (!isPlainObject(arg)) {
79
+ return false;
80
+ }
81
+ if (!arg.message && !arg.args) {
82
+ return false;
83
+ }
84
+ if (arg.stack) {
85
+ return false;
86
+ }
87
+ return true;
88
+ }
89
+ let paused = false;
90
+ const queue = [];
91
+ class Consola {
92
+ constructor(options = {}) {
93
+ const types = options.types || LogTypes;
94
+ this.options = defu({
95
+ ...options,
96
+ defaults: {...options.defaults},
97
+ level: _normalizeLogLevel(options.level, types),
98
+ reporters: [...options.reporters || []]
99
+ }, {
100
+ types: LogTypes,
101
+ throttle: 1e3,
102
+ throttleMin: 5,
103
+ formatOptions: {
104
+ date: true,
105
+ colors: false,
106
+ compact: true
107
+ }
108
+ });
109
+ for (const type in types) {
110
+ const defaults = {
111
+ type,
112
+ ...this.options.defaults,
113
+ ...types[type]
114
+ };
115
+ this[type] = this._wrapLogFn(defaults);
116
+ this[type].raw = this._wrapLogFn(defaults, true);
117
+ }
118
+ if (this.options.mockFn) {
119
+ this.mockTypes();
120
+ }
121
+ this._lastLog = {};
122
+ }
123
+ get level() {
124
+ return this.options.level;
125
+ }
126
+ set level(level) {
127
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
128
+ }
129
+ prompt(message, opts) {
130
+ if (!this.options.prompt) {
131
+ throw new Error('prompt is not supported!');
132
+ }
133
+ return this.options.prompt(message, opts);
134
+ }
135
+ create(options) {
136
+ const instance = new Consola({
137
+ ...this.options,
138
+ ...options
139
+ });
140
+ if (this._mockFn) {
141
+ instance.mockTypes(this._mockFn);
142
+ }
143
+ return instance;
144
+ }
145
+ withDefaults(defaults) {
146
+ return this.create({
147
+ ...this.options,
148
+ defaults: {
149
+ ...this.options.defaults,
150
+ ...defaults
151
+ }
152
+ });
153
+ }
154
+ withTag(tag) {
155
+ return this.withDefaults({tag: this.options.defaults.tag ? this.options.defaults.tag + ':' + tag : tag});
156
+ }
157
+ addReporter(reporter) {
158
+ this.options.reporters.push(reporter);
159
+ return this;
160
+ }
161
+ removeReporter(reporter) {
162
+ if (reporter) {
163
+ const i = this.options.reporters.indexOf(reporter);
164
+ if (i >= 0) {
165
+ return this.options.reporters.splice(i, 1);
166
+ }
167
+ } else {
168
+ this.options.reporters.splice(0);
169
+ }
170
+ return this;
171
+ }
172
+ setReporters(reporters) {
173
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
174
+ return this;
175
+ }
176
+ wrapAll() {
177
+ this.wrapConsole();
178
+ this.wrapStd();
179
+ }
180
+ restoreAll() {
181
+ this.restoreConsole();
182
+ this.restoreStd();
183
+ }
184
+ wrapConsole() {
185
+ for (const type in this.options.types) {
186
+ if (!console['__' + type]) {
187
+ console['__' + type] = console[type];
188
+ }
189
+ console[type] = this[type].raw;
190
+ }
191
+ }
192
+ restoreConsole() {
193
+ for (const type in this.options.types) {
194
+ if (console['__' + type]) {
195
+ console[type] = console['__' + type];
196
+ delete console['__' + type];
197
+ }
198
+ }
199
+ }
200
+ wrapStd() {
201
+ this._wrapStream(this.options.stdout, 'log');
202
+ this._wrapStream(this.options.stderr, 'log');
203
+ }
204
+ _wrapStream(stream, type) {
205
+ if (!stream) {
206
+ return;
207
+ }
208
+ if (!stream.__write) {
209
+ stream.__write = stream.write;
210
+ }
211
+ stream.write = (data) => {
212
+ this[type].raw(String(data).trim());
213
+ };
214
+ }
215
+ restoreStd() {
216
+ this._restoreStream(this.options.stdout);
217
+ this._restoreStream(this.options.stderr);
218
+ }
219
+ _restoreStream(stream) {
220
+ if (!stream) {
221
+ return;
222
+ }
223
+ if (stream.__write) {
224
+ stream.write = stream.__write;
225
+ delete stream.__write;
226
+ }
227
+ }
228
+ pauseLogs() {
229
+ paused = true;
230
+ }
231
+ resumeLogs() {
232
+ paused = false;
233
+ const _queue = queue.splice(0);
234
+ for (const item of _queue) {
235
+ item[0]._logFn(item[1], item[2]);
236
+ }
237
+ }
238
+ mockTypes(mockFn) {
239
+ const _mockFn = mockFn || this.options.mockFn;
240
+ this._mockFn = _mockFn;
241
+ if (typeof _mockFn !== 'function') {
242
+ return;
243
+ }
244
+ for (const type in this.options.types) {
245
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
246
+ this[type].raw = this[type];
247
+ }
248
+ }
249
+ _wrapLogFn(defaults, isRaw) {
250
+ return (...args) => {
251
+ if (paused) {
252
+ queue.push([this, defaults, args, isRaw]);
253
+ return;
254
+ }
255
+ return this._logFn(defaults, args, isRaw);
256
+ };
257
+ }
258
+ _logFn(defaults, args, isRaw) {
259
+ if ((defaults.level || 0) > this.level) {
260
+ return false;
261
+ }
262
+ const logObj = {
263
+ date: new Date(),
264
+ args: [],
265
+ ...defaults,
266
+ level: _normalizeLogLevel(defaults.level, this.options.types)
267
+ };
268
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) {
269
+ Object.assign(logObj, args[0]);
270
+ } else {
271
+ logObj.args = [...args];
272
+ }
273
+ if (logObj.message) {
274
+ logObj.args.unshift(logObj.message);
275
+ delete logObj.message;
276
+ }
277
+ if (logObj.additional) {
278
+ if (!Array.isArray(logObj.additional)) {
279
+ logObj.additional = logObj.additional.split('\n');
280
+ }
281
+ logObj.args.push('\n' + logObj.additional.join('\n'));
282
+ delete logObj.additional;
283
+ }
284
+ logObj.type = typeof logObj.type === 'string' ? logObj.type.toLowerCase() : 'log';
285
+ logObj.tag = typeof logObj.tag === 'string' ? logObj.tag : '';
286
+ const resolveLog = (newLog = false) => {
287
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
288
+ if (this._lastLog.object && repeated > 0) {
289
+ const args2 = [...this._lastLog.object.args];
290
+ if (repeated > 1) {
291
+ args2.push(`(repeated ${repeated} times)`);
292
+ }
293
+ this._log({
294
+ ...this._lastLog.object,
295
+ args: args2
296
+ });
297
+ this._lastLog.count = 1;
298
+ }
299
+ if (newLog) {
300
+ this._lastLog.object = logObj;
301
+ this._log(logObj);
302
+ }
303
+ };
304
+ clearTimeout(this._lastLog.timeout);
305
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
306
+ this._lastLog.time = logObj.date;
307
+ if (diffTime < this.options.throttle) {
308
+ try {
309
+ const serializedLog = JSON.stringify([logObj.type, logObj.tag, logObj.args]);
310
+ const isSameLog = this._lastLog.serialized === serializedLog;
311
+ this._lastLog.serialized = serializedLog;
312
+ if (isSameLog) {
313
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
314
+ if (this._lastLog.count > this.options.throttleMin) {
315
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
316
+ return;
317
+ }
318
+ }
319
+ } catch {}
320
+ }
321
+ resolveLog(true);
322
+ }
323
+ _log(logObj) {
324
+ for (const reporter of this.options.reporters) {
325
+ reporter.log(logObj, {options: this.options});
326
+ }
327
+ }
328
+ }
329
+ function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
330
+ if (input === void 0) {
331
+ return defaultLevel;
332
+ }
333
+ if (typeof input === 'number') {
334
+ return input;
335
+ }
336
+ if (types[input] && types[input].level !== void 0) {
337
+ return types[input].level;
338
+ }
339
+ return defaultLevel;
340
+ }
341
+ Consola.prototype.add = Consola.prototype.addReporter;
342
+ Consola.prototype.remove = Consola.prototype.removeReporter;
343
+ Consola.prototype.clear = Consola.prototype.removeReporter;
344
+ Consola.prototype.withScope = Consola.prototype.withTag;
345
+ Consola.prototype.mock = Consola.prototype.mockTypes;
346
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
347
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
348
+ function createConsola$1(options = {}) {
349
+ return new Consola(options);
350
+ }
351
+
352
+ //#endregion
353
+ //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
354
+ function parseStack(stack) {
355
+ const cwd = process.cwd() + sep;
356
+ const lines = stack.split('\n').splice(1).map((l) => l.trim().replace('file://', '').replace(cwd, ''));
357
+ return lines;
358
+ }
359
+ function writeStream(data, stream) {
360
+ const write = stream.__write || stream.write;
361
+ return write.call(stream, data);
362
+ }
363
+ const bracket = (x) => x ? `[${x}]` : '';
364
+ class BasicReporter {
365
+ formatStack(stack, opts) {
366
+ return ' ' + parseStack(stack).join('\n ');
367
+ }
368
+ formatArgs(args, opts) {
369
+ const _args = args.map((arg) => {
370
+ if (arg && typeof arg.stack === 'string') {
371
+ return arg.message + '\n' + this.formatStack(arg.stack, opts);
372
+ }
373
+ return arg;
374
+ });
375
+ return formatWithOptions(opts, ..._args);
376
+ }
377
+ formatDate(date, opts) {
378
+ return opts.date ? date.toLocaleTimeString() : '';
379
+ }
380
+ filterAndJoin(arr) {
381
+ return arr.filter(Boolean).join(' ');
382
+ }
383
+ formatLogObj(logObj, opts) {
384
+ const message = this.formatArgs(logObj.args, opts);
385
+ if (logObj.type === 'box') {
386
+ return '\n' + [bracket(logObj.tag), logObj.title && logObj.title, ...message.split('\n')].filter(Boolean).map((l) => ' > ' + l).join('\n') + '\n';
387
+ }
388
+ return this.filterAndJoin([bracket(logObj.type), bracket(logObj.tag), message]);
389
+ }
390
+ log(logObj, ctx) {
391
+ const line = this.formatLogObj(logObj, {
392
+ columns: ctx.options.stdout.columns || 0,
393
+ ...ctx.options.formatOptions
394
+ });
395
+ return writeStream(line + '\n', logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
396
+ }
397
+ }
398
+
399
+ //#endregion
400
+ //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
401
+ const { env = {}, argv = [], platform = '' } = typeof process === 'undefined' ? {} : process;
402
+ const isDisabled = 'NO_COLOR'in env || argv.includes('--no-color');
403
+ const isForced = 'FORCE_COLOR'in env || argv.includes('--color');
404
+ const isWindows = platform === 'win32';
405
+ const isDumbTerminal = env.TERM === 'dumb';
406
+ const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
407
+ const isCI$1 = 'CI'in env && ('GITHUB_ACTIONS'in env || 'GITLAB_CI'in env || 'CIRCLECI'in env);
408
+ const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI$1);
409
+ function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
410
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
411
+ }
412
+ function clearBleed(index, string, open, close, replace) {
413
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
414
+ }
415
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
416
+ return (string) => string || !(string === '' || string === void 0) ? clearBleed(('' + string).indexOf(close, at), string, open, close, replace) : '';
417
+ }
418
+ function init(open, close, replace) {
419
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
420
+ }
421
+ const colorDefs = {
422
+ reset: init(0, 0),
423
+ bold: init(1, 22, '\x1B[22m\x1B[1m'),
424
+ dim: init(2, 22, '\x1B[22m\x1B[2m'),
425
+ italic: init(3, 23),
426
+ underline: init(4, 24),
427
+ inverse: init(7, 27),
428
+ hidden: init(8, 28),
429
+ strikethrough: init(9, 29),
430
+ black: init(30, 39),
431
+ red: init(31, 39),
432
+ green: init(32, 39),
433
+ yellow: init(33, 39),
434
+ blue: init(34, 39),
435
+ magenta: init(35, 39),
436
+ cyan: init(36, 39),
437
+ white: init(37, 39),
438
+ gray: init(90, 39),
439
+ bgBlack: init(40, 49),
440
+ bgRed: init(41, 49),
441
+ bgGreen: init(42, 49),
442
+ bgYellow: init(43, 49),
443
+ bgBlue: init(44, 49),
444
+ bgMagenta: init(45, 49),
445
+ bgCyan: init(46, 49),
446
+ bgWhite: init(47, 49),
447
+ blackBright: init(90, 39),
448
+ redBright: init(91, 39),
449
+ greenBright: init(92, 39),
450
+ yellowBright: init(93, 39),
451
+ blueBright: init(94, 39),
452
+ magentaBright: init(95, 39),
453
+ cyanBright: init(96, 39),
454
+ whiteBright: init(97, 39),
455
+ bgBlackBright: init(100, 49),
456
+ bgRedBright: init(101, 49),
457
+ bgGreenBright: init(102, 49),
458
+ bgYellowBright: init(103, 49),
459
+ bgBlueBright: init(104, 49),
460
+ bgMagentaBright: init(105, 49),
461
+ bgCyanBright: init(106, 49),
462
+ bgWhiteBright: init(107, 49)
463
+ };
464
+ function createColors(useColor = isColorSupported) {
465
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
466
+ }
467
+ const colors = createColors();
468
+ function getColor$1(color, fallback = 'reset') {
469
+ return colors[color] || colors[fallback];
470
+ }
471
+ const ansiRegex$1 = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))'].join('|');
472
+ function stripAnsi$1(text) {
473
+ return text.replace(new RegExp(ansiRegex$1, 'g'), '');
474
+ }
475
+ const boxStylePresets = {
476
+ solid: {
477
+ tl: '┌',
478
+ tr: '┐',
479
+ bl: '└',
480
+ br: '┘',
481
+ h: '─',
482
+ v: '│'
483
+ },
484
+ double: {
485
+ tl: '╔',
486
+ tr: '╗',
487
+ bl: '╚',
488
+ br: '╝',
489
+ h: '═',
490
+ v: '║'
491
+ },
492
+ doubleSingle: {
493
+ tl: '╓',
494
+ tr: '╖',
495
+ bl: '╙',
496
+ br: '╜',
497
+ h: '─',
498
+ v: '║'
499
+ },
500
+ doubleSingleRounded: {
501
+ tl: '╭',
502
+ tr: '╮',
503
+ bl: '╰',
504
+ br: '╯',
505
+ h: '─',
506
+ v: '║'
507
+ },
508
+ singleThick: {
509
+ tl: '┏',
510
+ tr: '┓',
511
+ bl: '┗',
512
+ br: '┛',
513
+ h: '━',
514
+ v: '┃'
515
+ },
516
+ singleDouble: {
517
+ tl: '╒',
518
+ tr: '╕',
519
+ bl: '╘',
520
+ br: '╛',
521
+ h: '═',
522
+ v: '│'
523
+ },
524
+ singleDoubleRounded: {
525
+ tl: '╭',
526
+ tr: '╮',
527
+ bl: '╰',
528
+ br: '╯',
529
+ h: '═',
530
+ v: '│'
531
+ },
532
+ rounded: {
533
+ tl: '╭',
534
+ tr: '╮',
535
+ bl: '╰',
536
+ br: '╯',
537
+ h: '─',
538
+ v: '│'
539
+ }
540
+ };
541
+ const defaultStyle = {
542
+ borderColor: 'white',
543
+ borderStyle: 'rounded',
544
+ valign: 'center',
545
+ padding: 2,
546
+ marginLeft: 1,
547
+ marginTop: 1,
548
+ marginBottom: 1
549
+ };
550
+ function box(text, _opts = {}) {
551
+ const opts = {
552
+ ..._opts,
553
+ style: {
554
+ ...defaultStyle,
555
+ ..._opts.style
556
+ }
557
+ };
558
+ const textLines = text.split('\n');
559
+ const boxLines = [];
560
+ const _color = getColor$1(opts.style.borderColor);
561
+ const borderStyle = {...typeof opts.style.borderStyle === 'string' ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle};
562
+ if (_color) {
563
+ for (const key in borderStyle) {
564
+ borderStyle[key] = _color(borderStyle[key]);
565
+ }
566
+ }
567
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
568
+ const height = textLines.length + paddingOffset;
569
+ const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
570
+ const widthOffset = width + paddingOffset;
571
+ const leftSpace = opts.style.marginLeft > 0 ? ' '.repeat(opts.style.marginLeft) : '';
572
+ if (opts.style.marginTop > 0) {
573
+ boxLines.push(''.repeat(opts.style.marginTop));
574
+ }
575
+ if (opts.title) {
576
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
577
+ const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
578
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
579
+ } else {
580
+ boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
581
+ }
582
+ const valignOffset = opts.style.valign === 'center' ? Math.floor((height - textLines.length) / 2) : opts.style.valign === 'top' ? height - textLines.length - paddingOffset : height - textLines.length;
583
+ for (let i = 0; i < height; i++) {
584
+ if (i < valignOffset || i >= valignOffset + textLines.length) {
585
+ boxLines.push(`${leftSpace}${borderStyle.v}${' '.repeat(widthOffset)}${borderStyle.v}`);
586
+ } else {
587
+ const line = textLines[i - valignOffset];
588
+ const left = ' '.repeat(paddingOffset);
589
+ const right = ' '.repeat(width - stripAnsi$1(line).length);
590
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
591
+ }
592
+ }
593
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
594
+ if (opts.style.marginBottom > 0) {
595
+ boxLines.push(''.repeat(opts.style.marginBottom));
596
+ }
597
+ return boxLines.join('\n');
598
+ }
599
+
600
+ //#endregion
601
+ //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
602
+ const providers = [['APPVEYOR'], ['AZURE_PIPELINES', 'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'], ['AZURE_STATIC', 'INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN'], ['APPCIRCLE', 'AC_APPCIRCLE'], ['BAMBOO', 'bamboo_planKey'], ['BITBUCKET', 'BITBUCKET_COMMIT'], ['BITRISE', 'BITRISE_IO'], ['BUDDY', 'BUDDY_WORKSPACE_ID'], ['BUILDKITE'], ['CIRCLE', 'CIRCLECI'], ['CIRRUS', 'CIRRUS_CI'], ['CLOUDFLARE_PAGES', 'CF_PAGES', {ci: true}], ['CODEBUILD', 'CODEBUILD_BUILD_ARN'], ['CODEFRESH', 'CF_BUILD_ID'], ['DRONE'], ['DRONE', 'DRONE_BUILD_EVENT'], ['DSARI'], ['GITHUB_ACTIONS'], ['GITLAB', 'GITLAB_CI'], ['GITLAB', 'CI_MERGE_REQUEST_ID'], ['GOCD', 'GO_PIPELINE_LABEL'], ['LAYERCI'], ['HUDSON', 'HUDSON_URL'], ['JENKINS', 'JENKINS_URL'], ['MAGNUM'], ['NETLIFY'], ['NETLIFY', 'NETLIFY_LOCAL', {ci: false}], ['NEVERCODE'], ['RENDER'], ['SAIL', 'SAILCI'], ['SEMAPHORE'], ['SCREWDRIVER'], ['SHIPPABLE'], ['SOLANO', 'TDDIUM'], ['STRIDER'], ['TEAMCITY', 'TEAMCITY_VERSION'], ['TRAVIS'], ['VERCEL', 'NOW_BUILDER'], ['APPCENTER', 'APPCENTER_BUILD_ID'], ['CODESANDBOX', 'CODESANDBOX_SSE', {ci: false}], ['STACKBLITZ'], ['STORMKIT'], ['CLEAVR']];
603
+ function detectProvider(env$1) {
604
+ for (const provider of providers) {
605
+ const envName = provider[1] || provider[0];
606
+ if (env$1[envName]) {
607
+ return {
608
+ name: provider[0].toLowerCase(),
609
+ ...provider[2]
610
+ };
611
+ }
612
+ }
613
+ if (env$1.SHELL && env$1.SHELL === '/bin/jsh') {
614
+ return {
615
+ name: 'stackblitz',
616
+ ci: false
617
+ };
618
+ }
619
+ return {
620
+ name: '',
621
+ ci: false
622
+ };
623
+ }
624
+ const processShim = typeof process !== 'undefined' ? process : {};
625
+ const envShim = processShim.env || {};
626
+ const providerInfo = detectProvider(envShim);
627
+ const nodeENV = typeof process !== 'undefined' && process.env && process.env.NODE_ENV || '';
628
+ processShim.platform;
629
+ providerInfo.name;
630
+ const isCI = toBoolean(envShim.CI) || providerInfo.ci !== false;
631
+ const hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
632
+ const isDebug = toBoolean(envShim.DEBUG);
633
+ const isTest = nodeENV === 'test' || toBoolean(envShim.TEST);
634
+ toBoolean(envShim.MINIMAL) || isCI || isTest || !hasTTY;
635
+ function toBoolean(val) {
636
+ return val ? val !== 'false' : false;
637
+ }
638
+ function ansiRegex({ onlyFirst = false } = {}) {
639
+ const pattern = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'].join('|');
640
+ return new RegExp(pattern, onlyFirst ? undefined : 'g');
641
+ }
642
+ const regex = ansiRegex();
643
+ function stripAnsi(string) {
644
+ if (typeof string !== 'string') {
645
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
646
+ }
647
+ return string.replace(regex, '');
648
+ }
649
+ function getDefaultExportFromCjs(x) {
650
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
651
+ }
652
+ var eastasianwidth = {exports: {}};
653
+ (function(module) {
654
+ var eaw = {};
655
+ {
656
+ module.exports = eaw;
657
+ }
658
+ eaw.eastAsianWidth = function(character) {
659
+ var x = character.charCodeAt(0);
660
+ var y = character.length == 2 ? character.charCodeAt(1) : 0;
661
+ var codePoint = x;
662
+ if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
663
+ x &= 0x3FF;
664
+ y &= 0x3FF;
665
+ codePoint = x << 10 | y;
666
+ codePoint += 0x10000;
667
+ }
668
+ if (0x3000 == codePoint || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6) {
669
+ return 'F';
670
+ }
671
+ if (0x20A9 == codePoint || 0xFF61 <= codePoint && codePoint <= 0xFFBE || 0xFFC2 <= codePoint && codePoint <= 0xFFC7 || 0xFFCA <= codePoint && codePoint <= 0xFFCF || 0xFFD2 <= codePoint && codePoint <= 0xFFD7 || 0xFFDA <= codePoint && codePoint <= 0xFFDC || 0xFFE8 <= codePoint && codePoint <= 0xFFEE) {
672
+ return 'H';
673
+ }
674
+ if (0x1100 <= codePoint && codePoint <= 0x115F || 0x11A3 <= codePoint && codePoint <= 0x11A7 || 0x11FA <= codePoint && codePoint <= 0x11FF || 0x2329 <= codePoint && codePoint <= 0x232A || 0x2E80 <= codePoint && codePoint <= 0x2E99 || 0x2E9B <= codePoint && codePoint <= 0x2EF3 || 0x2F00 <= codePoint && codePoint <= 0x2FD5 || 0x2FF0 <= codePoint && codePoint <= 0x2FFB || 0x3001 <= codePoint && codePoint <= 0x303E || 0x3041 <= codePoint && codePoint <= 0x3096 || 0x3099 <= codePoint && codePoint <= 0x30FF || 0x3105 <= codePoint && codePoint <= 0x312D || 0x3131 <= codePoint && codePoint <= 0x318E || 0x3190 <= codePoint && codePoint <= 0x31BA || 0x31C0 <= codePoint && codePoint <= 0x31E3 || 0x31F0 <= codePoint && codePoint <= 0x321E || 0x3220 <= codePoint && codePoint <= 0x3247 || 0x3250 <= codePoint && codePoint <= 0x32FE || 0x3300 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA48C || 0xA490 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xD7B0 <= codePoint && codePoint <= 0xD7C6 || 0xD7CB <= codePoint && codePoint <= 0xD7FB || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE52 || 0xFE54 <= codePoint && codePoint <= 0xFE66 || 0xFE68 <= codePoint && codePoint <= 0xFE6B || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F202 || 0x1F210 <= codePoint && codePoint <= 0x1F23A || 0x1F240 <= codePoint && codePoint <= 0x1F248 || 0x1F250 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x2F73F || 0x2B740 <= codePoint && codePoint <= 0x2FFFD || 0x30000 <= codePoint && codePoint <= 0x3FFFD) {
675
+ return 'W';
676
+ }
677
+ if (0x0020 <= codePoint && codePoint <= 0x007E || 0x00A2 <= codePoint && codePoint <= 0x00A3 || 0x00A5 <= codePoint && codePoint <= 0x00A6 || 0x00AC == codePoint || 0x00AF == codePoint || 0x27E6 <= codePoint && codePoint <= 0x27ED || 0x2985 <= codePoint && codePoint <= 0x2986) {
678
+ return 'Na';
679
+ }
680
+ if (0x00A1 == codePoint || 0x00A4 == codePoint || 0x00A7 <= codePoint && codePoint <= 0x00A8 || 0x00AA == codePoint || 0x00AD <= codePoint && codePoint <= 0x00AE || 0x00B0 <= codePoint && codePoint <= 0x00B4 || 0x00B6 <= codePoint && codePoint <= 0x00BA || 0x00BC <= codePoint && codePoint <= 0x00BF || 0x00C6 == codePoint || 0x00D0 == codePoint || 0x00D7 <= codePoint && codePoint <= 0x00D8 || 0x00DE <= codePoint && codePoint <= 0x00E1 || 0x00E6 == codePoint || 0x00E8 <= codePoint && codePoint <= 0x00EA || 0x00EC <= codePoint && codePoint <= 0x00ED || 0x00F0 == codePoint || 0x00F2 <= codePoint && codePoint <= 0x00F3 || 0x00F7 <= codePoint && codePoint <= 0x00FA || 0x00FC == codePoint || 0x00FE == codePoint || 0x0101 == codePoint || 0x0111 == codePoint || 0x0113 == codePoint || 0x011B == codePoint || 0x0126 <= codePoint && codePoint <= 0x0127 || 0x012B == codePoint || 0x0131 <= codePoint && codePoint <= 0x0133 || 0x0138 == codePoint || 0x013F <= codePoint && codePoint <= 0x0142 || 0x0144 == codePoint || 0x0148 <= codePoint && codePoint <= 0x014B || 0x014D == codePoint || 0x0152 <= codePoint && codePoint <= 0x0153 || 0x0166 <= codePoint && codePoint <= 0x0167 || 0x016B == codePoint || 0x01CE == codePoint || 0x01D0 == codePoint || 0x01D2 == codePoint || 0x01D4 == codePoint || 0x01D6 == codePoint || 0x01D8 == codePoint || 0x01DA == codePoint || 0x01DC == codePoint || 0x0251 == codePoint || 0x0261 == codePoint || 0x02C4 == codePoint || 0x02C7 == codePoint || 0x02C9 <= codePoint && codePoint <= 0x02CB || 0x02CD == codePoint || 0x02D0 == codePoint || 0x02D8 <= codePoint && codePoint <= 0x02DB || 0x02DD == codePoint || 0x02DF == codePoint || 0x0300 <= codePoint && codePoint <= 0x036F || 0x0391 <= codePoint && codePoint <= 0x03A1 || 0x03A3 <= codePoint && codePoint <= 0x03A9 || 0x03B1 <= codePoint && codePoint <= 0x03C1 || 0x03C3 <= codePoint && codePoint <= 0x03C9 || 0x0401 == codePoint || 0x0410 <= codePoint && codePoint <= 0x044F || 0x0451 == codePoint || 0x2010 == codePoint || 0x2013 <= codePoint && codePoint <= 0x2016 || 0x2018 <= codePoint && codePoint <= 0x2019 || 0x201C <= codePoint && codePoint <= 0x201D || 0x2020 <= codePoint && codePoint <= 0x2022 || 0x2024 <= codePoint && codePoint <= 0x2027 || 0x2030 == codePoint || 0x2032 <= codePoint && codePoint <= 0x2033 || 0x2035 == codePoint || 0x203B == codePoint || 0x203E == codePoint || 0x2074 == codePoint || 0x207F == codePoint || 0x2081 <= codePoint && codePoint <= 0x2084 || 0x20AC == codePoint || 0x2103 == codePoint || 0x2105 == codePoint || 0x2109 == codePoint || 0x2113 == codePoint || 0x2116 == codePoint || 0x2121 <= codePoint && codePoint <= 0x2122 || 0x2126 == codePoint || 0x212B == codePoint || 0x2153 <= codePoint && codePoint <= 0x2154 || 0x215B <= codePoint && codePoint <= 0x215E || 0x2160 <= codePoint && codePoint <= 0x216B || 0x2170 <= codePoint && codePoint <= 0x2179 || 0x2189 == codePoint || 0x2190 <= codePoint && codePoint <= 0x2199 || 0x21B8 <= codePoint && codePoint <= 0x21B9 || 0x21D2 == codePoint || 0x21D4 == codePoint || 0x21E7 == codePoint || 0x2200 == codePoint || 0x2202 <= codePoint && codePoint <= 0x2203 || 0x2207 <= codePoint && codePoint <= 0x2208 || 0x220B == codePoint || 0x220F == codePoint || 0x2211 == codePoint || 0x2215 == codePoint || 0x221A == codePoint || 0x221D <= codePoint && codePoint <= 0x2220 || 0x2223 == codePoint || 0x2225 == codePoint || 0x2227 <= codePoint && codePoint <= 0x222C || 0x222E == codePoint || 0x2234 <= codePoint && codePoint <= 0x2237 || 0x223C <= codePoint && codePoint <= 0x223D || 0x2248 == codePoint || 0x224C == codePoint || 0x2252 == codePoint || 0x2260 <= codePoint && codePoint <= 0x2261 || 0x2264 <= codePoint && codePoint <= 0x2267 || 0x226A <= codePoint && codePoint <= 0x226B || 0x226E <= codePoint && codePoint <= 0x226F || 0x2282 <= codePoint && codePoint <= 0x2283 || 0x2286 <= codePoint && codePoint <= 0x2287 || 0x2295 == codePoint || 0x2299 == codePoint || 0x22A5 == codePoint || 0x22BF == codePoint || 0x2312 == codePoint || 0x2460 <= codePoint && codePoint <= 0x24E9 || 0x24EB <= codePoint && codePoint <= 0x254B || 0x2550 <= codePoint && codePoint <= 0x2573 || 0x2580 <= codePoint && codePoint <= 0x258F || 0x2592 <= codePoint && codePoint <= 0x2595 || 0x25A0 <= codePoint && codePoint <= 0x25A1 || 0x25A3 <= codePoint && codePoint <= 0x25A9 || 0x25B2 <= codePoint && codePoint <= 0x25B3 || 0x25B6 <= codePoint && codePoint <= 0x25B7 || 0x25BC <= codePoint && codePoint <= 0x25BD || 0x25C0 <= codePoint && codePoint <= 0x25C1 || 0x25C6 <= codePoint && codePoint <= 0x25C8 || 0x25CB == codePoint || 0x25CE <= codePoint && codePoint <= 0x25D1 || 0x25E2 <= codePoint && codePoint <= 0x25E5 || 0x25EF == codePoint || 0x2605 <= codePoint && codePoint <= 0x2606 || 0x2609 == codePoint || 0x260E <= codePoint && codePoint <= 0x260F || 0x2614 <= codePoint && codePoint <= 0x2615 || 0x261C == codePoint || 0x261E == codePoint || 0x2640 == codePoint || 0x2642 == codePoint || 0x2660 <= codePoint && codePoint <= 0x2661 || 0x2663 <= codePoint && codePoint <= 0x2665 || 0x2667 <= codePoint && codePoint <= 0x266A || 0x266C <= codePoint && codePoint <= 0x266D || 0x266F == codePoint || 0x269E <= codePoint && codePoint <= 0x269F || 0x26BE <= codePoint && codePoint <= 0x26BF || 0x26C4 <= codePoint && codePoint <= 0x26CD || 0x26CF <= codePoint && codePoint <= 0x26E1 || 0x26E3 == codePoint || 0x26E8 <= codePoint && codePoint <= 0x26FF || 0x273D == codePoint || 0x2757 == codePoint || 0x2776 <= codePoint && codePoint <= 0x277F || 0x2B55 <= codePoint && codePoint <= 0x2B59 || 0x3248 <= codePoint && codePoint <= 0x324F || 0xE000 <= codePoint && codePoint <= 0xF8FF || 0xFE00 <= codePoint && codePoint <= 0xFE0F || 0xFFFD == codePoint || 0x1F100 <= codePoint && codePoint <= 0x1F10A || 0x1F110 <= codePoint && codePoint <= 0x1F12D || 0x1F130 <= codePoint && codePoint <= 0x1F169 || 0x1F170 <= codePoint && codePoint <= 0x1F19A || 0xE0100 <= codePoint && codePoint <= 0xE01EF || 0xF0000 <= codePoint && codePoint <= 0xFFFFD || 0x100000 <= codePoint && codePoint <= 0x10FFFD) {
681
+ return 'A';
682
+ }
683
+ return 'N';
684
+ };
685
+ eaw.characterLength = function(character) {
686
+ var code = this.eastAsianWidth(character);
687
+ if (code == 'F' || code == 'W' || code == 'A') {
688
+ return 2;
689
+ } else {
690
+ return 1;
691
+ }
692
+ };
693
+ function stringToArray(string) {
694
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
695
+ }
696
+ eaw.length = function(string) {
697
+ var characters = stringToArray(string);
698
+ var len = 0;
699
+ for (var i = 0; i < characters.length; i++) {
700
+ len = len + this.characterLength(characters[i]);
701
+ }
702
+ return len;
703
+ };
704
+ eaw.slice = function(text, start, end) {
705
+ textLen = eaw.length(text);
706
+ start = start ? start : 0;
707
+ end = end ? end : 1;
708
+ if (start < 0) {
709
+ start = textLen + start;
710
+ }
711
+ if (end < 0) {
712
+ end = textLen + end;
713
+ }
714
+ var result = '';
715
+ var eawLen = 0;
716
+ var chars = stringToArray(text);
717
+ for (var i = 0; i < chars.length; i++) {
718
+ var char = chars[i];
719
+ var charLen = eaw.length(char);
720
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
721
+ if (eawLen + charLen <= end) {
722
+ result += char;
723
+ } else {
724
+ break;
725
+ }
726
+ }
727
+ eawLen += charLen;
728
+ }
729
+ return result;
730
+ };
731
+ })(eastasianwidth);
732
+ var eastasianwidthExports = eastasianwidth.exports;
733
+ const eastAsianWidth = getDefaultExportFromCjs(eastasianwidthExports);
734
+ const emojiRegex = () => {
735
+ return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
736
+ };
737
+ function stringWidth$1(string, options) {
738
+ if (typeof string !== 'string' || string.length === 0) {
739
+ return 0;
740
+ }
741
+ options = {
742
+ ambiguousIsNarrow: true,
743
+ countAnsiEscapeCodes: false,
744
+ ...options
745
+ };
746
+ if (!options.countAnsiEscapeCodes) {
747
+ string = stripAnsi(string);
748
+ }
749
+ if (string.length === 0) {
750
+ return 0;
751
+ }
752
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
753
+ let width = 0;
754
+ for (const { segment: character } of new Intl.Segmenter().segment(string)) {
755
+ const codePoint = character.codePointAt(0);
756
+ if (codePoint <= 0x1F || codePoint >= 0x7F && codePoint <= 0x9F) {
757
+ continue;
758
+ }
759
+ if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) {
760
+ continue;
761
+ }
762
+ if (emojiRegex().test(character)) {
763
+ width += 2;
764
+ continue;
765
+ }
766
+ const code = eastAsianWidth.eastAsianWidth(character);
767
+ switch (code) {
768
+ case 'F':
769
+ case 'W': {
770
+ width += 2;
771
+ break;
772
+ }
773
+ case 'A': {
774
+ width += ambiguousCharacterWidth;
775
+ break;
776
+ }
777
+ default: {
778
+ width += 1;
779
+ }
780
+ }
781
+ }
782
+ return width;
783
+ }
784
+ function isUnicodeSupported() {
785
+ if (process$1.platform !== 'win32') {
786
+ return process$1.env.TERM !== 'linux';
787
+ }
788
+ return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === '{cmd::Cmder}' || process$1.env.TERM_PROGRAM === 'Terminus-Sublime' || process$1.env.TERM_PROGRAM === 'vscode' || process$1.env.TERM === 'xterm-256color' || process$1.env.TERM === 'alacritty' || process$1.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
789
+ }
790
+ const TYPE_COLOR_MAP = {
791
+ info: 'cyan',
792
+ fail: 'red',
793
+ success: 'green',
794
+ ready: 'green',
795
+ start: 'magenta'
796
+ };
797
+ const LEVEL_COLOR_MAP = {
798
+ 0: 'red',
799
+ 1: 'yellow'
800
+ };
801
+ const unicode = isUnicodeSupported();
802
+ const s = (c, fallback) => unicode ? c : fallback;
803
+ const TYPE_ICONS = {
804
+ error: s('✖', '×'),
805
+ fatal: s('✖', '×'),
806
+ ready: s('✔', '√'),
807
+ warn: s('⚠', '‼'),
808
+ info: s('ℹ', 'i'),
809
+ success: s('✔', '√'),
810
+ debug: s('⚙', 'D'),
811
+ trace: s('→', '→'),
812
+ fail: s('✖', '×'),
813
+ start: s('◐', 'o'),
814
+ log: ''
815
+ };
816
+ function stringWidth(str) {
817
+ if (!Intl.Segmenter) {
818
+ return stripAnsi$1(str).length;
819
+ }
820
+ return stringWidth$1(str);
821
+ }
822
+ class FancyReporter extends BasicReporter {
823
+ formatStack(stack) {
824
+ return '\n' + parseStack(stack).map((line) => ' ' + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join('\n');
825
+ }
826
+ formatType(logObj, isBadge, opts) {
827
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || 'gray';
828
+ if (isBadge) {
829
+ return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
830
+ }
831
+ const _type = typeof TYPE_ICONS[logObj.type] === 'string' ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
832
+ return _type ? getColor(typeColor)(_type) : '';
833
+ }
834
+ formatLogObj(logObj, opts) {
835
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split('\n');
836
+ if (logObj.type === 'box') {
837
+ return box(characterFormat(message + (additional.length > 0 ? '\n' + additional.join('\n') : '')), {
838
+ title: logObj.title ? characterFormat(logObj.title) : void 0,
839
+ style: logObj.style
840
+ });
841
+ }
842
+ const date = this.formatDate(logObj.date, opts);
843
+ const coloredDate = date && colors.gray(date);
844
+ const isBadge = logObj.badge ?? logObj.level < 2;
845
+ const type = this.formatType(logObj, isBadge, opts);
846
+ const tag = logObj.tag ? colors.gray(logObj.tag) : '';
847
+ let line;
848
+ const left = this.filterAndJoin([type, characterFormat(message)]);
849
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
850
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
851
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + ' '.repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : '') + left;
852
+ line += characterFormat(additional.length > 0 ? '\n' + additional.join('\n') : '');
853
+ if (logObj.type === 'trace') {
854
+ const _err = new Error('Trace: ' + logObj.message);
855
+ line += this.formatStack(_err.stack || '');
856
+ }
857
+ return isBadge ? '\n' + line + '\n' : line;
858
+ }
859
+ }
860
+ function characterFormat(str) {
861
+ return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
862
+ }
863
+ function getColor(color = 'white') {
864
+ return colors[color] || colors.white;
865
+ }
866
+ function getBgColor(color = 'bgWhite') {
867
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
868
+ }
869
+ function createConsola(options = {}) {
870
+ let level = _getDefaultLogLevel();
871
+ if (process.env.CONSOLA_LEVEL) {
872
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
873
+ }
874
+ const consola2 = createConsola$1({
875
+ level,
876
+ defaults: {level},
877
+ stdout: process.stdout,
878
+ stderr: process.stderr,
879
+ prompt: (...args) => import('./prompt-qKiYiowG.mjs').then((m) => m.prompt(...args)),
880
+ reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
881
+ ...options
882
+ });
883
+ return consola2;
884
+ }
885
+ function _getDefaultLogLevel() {
886
+ if (isDebug) {
887
+ return LogLevels.debug;
888
+ }
889
+ if (isTest) {
890
+ return LogLevels.warn;
891
+ }
892
+ return LogLevels.info;
893
+ }
894
+ const consola = createConsola();
895
+
896
+ //#endregion
897
+ export { colors, consola, createConsola, getDefaultExportFromCjs, isUnicodeSupported };