vite 3.0.0-beta.1 → 3.0.0-beta.10

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.
@@ -31,10 +31,12 @@ var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
31
31
  var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
32
32
  var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
33
33
 
34
- var version = "3.0.0-beta.1";
34
+ var version = "3.0.0-beta.10";
35
35
 
36
36
  const VERSION = version;
37
- const VITE_PACKAGE_DIR = path$3.resolve(node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))), '../../..');
37
+ const VITE_PACKAGE_DIR = path$3.resolve(
38
+ // import.meta.url is `dist/node/constants.js` after bundle
39
+ node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))), '../../..');
38
40
  const CLIENT_ENTRY = path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/client.mjs');
39
41
  path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/env.mjs');
40
42
  path__default.dirname(CLIENT_ENTRY);
@@ -153,6 +155,10 @@ for (let i = 0; i < chars.length; i++) {
153
155
  charToInt[c] = i;
154
156
  }
155
157
 
158
+ function getDefaultExportFromCjs (x) {
159
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
160
+ }
161
+
156
162
  var picocolors = {exports: {}};
157
163
 
158
164
  let tty = require$$0__default;
@@ -214,8 +220,6 @@ let createColors = (enabled = isColorSupported) => ({
214
220
  picocolors.exports = createColors();
215
221
  picocolors.exports.createColors = createColors;
216
222
 
217
- var colors = picocolors.exports;
218
-
219
223
  var src = {exports: {}};
220
224
 
221
225
  var browser = {exports: {}};
@@ -224,991 +228,1025 @@ var browser = {exports: {}};
224
228
  * Helpers.
225
229
  */
226
230
 
227
- var s = 1000;
228
- var m = s * 60;
229
- var h = m * 60;
230
- var d = h * 24;
231
- var w = d * 7;
232
- var y = d * 365.25;
233
-
234
- /**
235
- * Parse or format the given `val`.
236
- *
237
- * Options:
238
- *
239
- * - `long` verbose formatting [false]
240
- *
241
- * @param {String|Number} val
242
- * @param {Object} [options]
243
- * @throws {Error} throw an error if val is not a non-empty string or a number
244
- * @return {String|Number}
245
- * @api public
246
- */
247
-
248
- var ms = function(val, options) {
249
- options = options || {};
250
- var type = typeof val;
251
- if (type === 'string' && val.length > 0) {
252
- return parse$3(val);
253
- } else if (type === 'number' && isFinite(val)) {
254
- return options.long ? fmtLong(val) : fmtShort(val);
255
- }
256
- throw new Error(
257
- 'val is not a non-empty string or a valid number. val=' +
258
- JSON.stringify(val)
259
- );
260
- };
231
+ var ms;
232
+ var hasRequiredMs;
261
233
 
262
- /**
263
- * Parse the given `str` and return milliseconds.
264
- *
265
- * @param {String} str
266
- * @return {Number}
267
- * @api private
268
- */
234
+ function requireMs () {
235
+ if (hasRequiredMs) return ms;
236
+ hasRequiredMs = 1;
237
+ var s = 1000;
238
+ var m = s * 60;
239
+ var h = m * 60;
240
+ var d = h * 24;
241
+ var w = d * 7;
242
+ var y = d * 365.25;
269
243
 
270
- function parse$3(str) {
271
- str = String(str);
272
- if (str.length > 100) {
273
- return;
274
- }
275
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
276
- str
277
- );
278
- if (!match) {
279
- return;
280
- }
281
- var n = parseFloat(match[1]);
282
- var type = (match[2] || 'ms').toLowerCase();
283
- switch (type) {
284
- case 'years':
285
- case 'year':
286
- case 'yrs':
287
- case 'yr':
288
- case 'y':
289
- return n * y;
290
- case 'weeks':
291
- case 'week':
292
- case 'w':
293
- return n * w;
294
- case 'days':
295
- case 'day':
296
- case 'd':
297
- return n * d;
298
- case 'hours':
299
- case 'hour':
300
- case 'hrs':
301
- case 'hr':
302
- case 'h':
303
- return n * h;
304
- case 'minutes':
305
- case 'minute':
306
- case 'mins':
307
- case 'min':
308
- case 'm':
309
- return n * m;
310
- case 'seconds':
311
- case 'second':
312
- case 'secs':
313
- case 'sec':
314
- case 's':
315
- return n * s;
316
- case 'milliseconds':
317
- case 'millisecond':
318
- case 'msecs':
319
- case 'msec':
320
- case 'ms':
321
- return n;
322
- default:
323
- return undefined;
324
- }
325
- }
326
-
327
- /**
328
- * Short format for `ms`.
329
- *
330
- * @param {Number} ms
331
- * @return {String}
332
- * @api private
333
- */
334
-
335
- function fmtShort(ms) {
336
- var msAbs = Math.abs(ms);
337
- if (msAbs >= d) {
338
- return Math.round(ms / d) + 'd';
339
- }
340
- if (msAbs >= h) {
341
- return Math.round(ms / h) + 'h';
342
- }
343
- if (msAbs >= m) {
344
- return Math.round(ms / m) + 'm';
345
- }
346
- if (msAbs >= s) {
347
- return Math.round(ms / s) + 's';
348
- }
349
- return ms + 'ms';
350
- }
351
-
352
- /**
353
- * Long format for `ms`.
354
- *
355
- * @param {Number} ms
356
- * @return {String}
357
- * @api private
358
- */
359
-
360
- function fmtLong(ms) {
361
- var msAbs = Math.abs(ms);
362
- if (msAbs >= d) {
363
- return plural(ms, msAbs, d, 'day');
364
- }
365
- if (msAbs >= h) {
366
- return plural(ms, msAbs, h, 'hour');
367
- }
368
- if (msAbs >= m) {
369
- return plural(ms, msAbs, m, 'minute');
370
- }
371
- if (msAbs >= s) {
372
- return plural(ms, msAbs, s, 'second');
373
- }
374
- return ms + ' ms';
375
- }
376
-
377
- /**
378
- * Pluralization helper.
379
- */
380
-
381
- function plural(ms, msAbs, n, name) {
382
- var isPlural = msAbs >= n * 1.5;
383
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
384
- }
385
-
386
- /**
387
- * This is the common logic for both the Node.js and web browser
388
- * implementations of `debug()`.
389
- */
390
-
391
- function setup(env) {
392
- createDebug.debug = createDebug;
393
- createDebug.default = createDebug;
394
- createDebug.coerce = coerce;
395
- createDebug.disable = disable;
396
- createDebug.enable = enable;
397
- createDebug.enabled = enabled;
398
- createDebug.humanize = ms;
399
- createDebug.destroy = destroy;
400
-
401
- Object.keys(env).forEach(key => {
402
- createDebug[key] = env[key];
403
- });
244
+ /**
245
+ * Parse or format the given `val`.
246
+ *
247
+ * Options:
248
+ *
249
+ * - `long` verbose formatting [false]
250
+ *
251
+ * @param {String|Number} val
252
+ * @param {Object} [options]
253
+ * @throws {Error} throw an error if val is not a non-empty string or a number
254
+ * @return {String|Number}
255
+ * @api public
256
+ */
257
+
258
+ ms = function(val, options) {
259
+ options = options || {};
260
+ var type = typeof val;
261
+ if (type === 'string' && val.length > 0) {
262
+ return parse(val);
263
+ } else if (type === 'number' && isFinite(val)) {
264
+ return options.long ? fmtLong(val) : fmtShort(val);
265
+ }
266
+ throw new Error(
267
+ 'val is not a non-empty string or a valid number. val=' +
268
+ JSON.stringify(val)
269
+ );
270
+ };
404
271
 
405
272
  /**
406
- * The currently active debug mode names, and names to skip.
407
- */
273
+ * Parse the given `str` and return milliseconds.
274
+ *
275
+ * @param {String} str
276
+ * @return {Number}
277
+ * @api private
278
+ */
279
+
280
+ function parse(str) {
281
+ str = String(str);
282
+ if (str.length > 100) {
283
+ return;
284
+ }
285
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
286
+ str
287
+ );
288
+ if (!match) {
289
+ return;
290
+ }
291
+ var n = parseFloat(match[1]);
292
+ var type = (match[2] || 'ms').toLowerCase();
293
+ switch (type) {
294
+ case 'years':
295
+ case 'year':
296
+ case 'yrs':
297
+ case 'yr':
298
+ case 'y':
299
+ return n * y;
300
+ case 'weeks':
301
+ case 'week':
302
+ case 'w':
303
+ return n * w;
304
+ case 'days':
305
+ case 'day':
306
+ case 'd':
307
+ return n * d;
308
+ case 'hours':
309
+ case 'hour':
310
+ case 'hrs':
311
+ case 'hr':
312
+ case 'h':
313
+ return n * h;
314
+ case 'minutes':
315
+ case 'minute':
316
+ case 'mins':
317
+ case 'min':
318
+ case 'm':
319
+ return n * m;
320
+ case 'seconds':
321
+ case 'second':
322
+ case 'secs':
323
+ case 'sec':
324
+ case 's':
325
+ return n * s;
326
+ case 'milliseconds':
327
+ case 'millisecond':
328
+ case 'msecs':
329
+ case 'msec':
330
+ case 'ms':
331
+ return n;
332
+ default:
333
+ return undefined;
334
+ }
335
+ }
408
336
 
409
- createDebug.names = [];
410
- createDebug.skips = [];
337
+ /**
338
+ * Short format for `ms`.
339
+ *
340
+ * @param {Number} ms
341
+ * @return {String}
342
+ * @api private
343
+ */
344
+
345
+ function fmtShort(ms) {
346
+ var msAbs = Math.abs(ms);
347
+ if (msAbs >= d) {
348
+ return Math.round(ms / d) + 'd';
349
+ }
350
+ if (msAbs >= h) {
351
+ return Math.round(ms / h) + 'h';
352
+ }
353
+ if (msAbs >= m) {
354
+ return Math.round(ms / m) + 'm';
355
+ }
356
+ if (msAbs >= s) {
357
+ return Math.round(ms / s) + 's';
358
+ }
359
+ return ms + 'ms';
360
+ }
411
361
 
412
362
  /**
413
- * Map of special "%n" handling functions, for the debug "format" argument.
414
- *
415
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
416
- */
417
- createDebug.formatters = {};
363
+ * Long format for `ms`.
364
+ *
365
+ * @param {Number} ms
366
+ * @return {String}
367
+ * @api private
368
+ */
369
+
370
+ function fmtLong(ms) {
371
+ var msAbs = Math.abs(ms);
372
+ if (msAbs >= d) {
373
+ return plural(ms, msAbs, d, 'day');
374
+ }
375
+ if (msAbs >= h) {
376
+ return plural(ms, msAbs, h, 'hour');
377
+ }
378
+ if (msAbs >= m) {
379
+ return plural(ms, msAbs, m, 'minute');
380
+ }
381
+ if (msAbs >= s) {
382
+ return plural(ms, msAbs, s, 'second');
383
+ }
384
+ return ms + ' ms';
385
+ }
418
386
 
419
387
  /**
420
- * Selects a color for a debug namespace
421
- * @param {String} namespace The namespace string for the debug instance to be colored
422
- * @return {Number|String} An ANSI color code for the given namespace
423
- * @api private
424
- */
425
- function selectColor(namespace) {
426
- let hash = 0;
427
-
428
- for (let i = 0; i < namespace.length; i++) {
429
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
430
- hash |= 0; // Convert to 32bit integer
431
- }
388
+ * Pluralization helper.
389
+ */
432
390
 
433
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
391
+ function plural(ms, msAbs, n, name) {
392
+ var isPlural = msAbs >= n * 1.5;
393
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
434
394
  }
435
- createDebug.selectColor = selectColor;
395
+ return ms;
396
+ }
436
397
 
437
- /**
438
- * Create a debugger with the given `namespace`.
439
- *
440
- * @param {String} namespace
441
- * @return {Function}
442
- * @api public
443
- */
444
- function createDebug(namespace) {
445
- let prevTime;
446
- let enableOverride = null;
447
- let namespacesCache;
448
- let enabledCache;
449
-
450
- function debug(...args) {
451
- // Disabled?
452
- if (!debug.enabled) {
453
- return;
454
- }
398
+ var common;
399
+ var hasRequiredCommon;
455
400
 
456
- const self = debug;
401
+ function requireCommon () {
402
+ if (hasRequiredCommon) return common;
403
+ hasRequiredCommon = 1;
404
+ /**
405
+ * This is the common logic for both the Node.js and web browser
406
+ * implementations of `debug()`.
407
+ */
408
+
409
+ function setup(env) {
410
+ createDebug.debug = createDebug;
411
+ createDebug.default = createDebug;
412
+ createDebug.coerce = coerce;
413
+ createDebug.disable = disable;
414
+ createDebug.enable = enable;
415
+ createDebug.enabled = enabled;
416
+ createDebug.humanize = requireMs();
417
+ createDebug.destroy = destroy;
418
+
419
+ Object.keys(env).forEach(key => {
420
+ createDebug[key] = env[key];
421
+ });
457
422
 
458
- // Set `diff` timestamp
459
- const curr = Number(new Date());
460
- const ms = curr - (prevTime || curr);
461
- self.diff = ms;
462
- self.prev = prevTime;
463
- self.curr = curr;
464
- prevTime = curr;
423
+ /**
424
+ * The currently active debug mode names, and names to skip.
425
+ */
465
426
 
466
- args[0] = createDebug.coerce(args[0]);
427
+ createDebug.names = [];
428
+ createDebug.skips = [];
467
429
 
468
- if (typeof args[0] !== 'string') {
469
- // Anything else let's inspect with %O
470
- args.unshift('%O');
430
+ /**
431
+ * Map of special "%n" handling functions, for the debug "format" argument.
432
+ *
433
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
434
+ */
435
+ createDebug.formatters = {};
436
+
437
+ /**
438
+ * Selects a color for a debug namespace
439
+ * @param {String} namespace The namespace string for the debug instance to be colored
440
+ * @return {Number|String} An ANSI color code for the given namespace
441
+ * @api private
442
+ */
443
+ function selectColor(namespace) {
444
+ let hash = 0;
445
+
446
+ for (let i = 0; i < namespace.length; i++) {
447
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
448
+ hash |= 0; // Convert to 32bit integer
471
449
  }
472
450
 
473
- // Apply any `formatters` transformations
474
- let index = 0;
475
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
476
- // If we encounter an escaped % then don't increase the array index
477
- if (match === '%%') {
478
- return '%';
479
- }
480
- index++;
481
- const formatter = createDebug.formatters[format];
482
- if (typeof formatter === 'function') {
483
- const val = args[index];
484
- match = formatter.call(self, val);
485
-
486
- // Now we need to remove `args[index]` since it's inlined in the `format`
487
- args.splice(index, 1);
488
- index--;
451
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
452
+ }
453
+ createDebug.selectColor = selectColor;
454
+
455
+ /**
456
+ * Create a debugger with the given `namespace`.
457
+ *
458
+ * @param {String} namespace
459
+ * @return {Function}
460
+ * @api public
461
+ */
462
+ function createDebug(namespace) {
463
+ let prevTime;
464
+ let enableOverride = null;
465
+ let namespacesCache;
466
+ let enabledCache;
467
+
468
+ function debug(...args) {
469
+ // Disabled?
470
+ if (!debug.enabled) {
471
+ return;
489
472
  }
490
- return match;
491
- });
492
473
 
493
- // Apply env-specific formatting (colors, etc.)
494
- createDebug.formatArgs.call(self, args);
474
+ const self = debug;
495
475
 
496
- const logFn = self.log || createDebug.log;
497
- logFn.apply(self, args);
498
- }
476
+ // Set `diff` timestamp
477
+ const curr = Number(new Date());
478
+ const ms = curr - (prevTime || curr);
479
+ self.diff = ms;
480
+ self.prev = prevTime;
481
+ self.curr = curr;
482
+ prevTime = curr;
483
+
484
+ args[0] = createDebug.coerce(args[0]);
499
485
 
500
- debug.namespace = namespace;
501
- debug.useColors = createDebug.useColors();
502
- debug.color = createDebug.selectColor(namespace);
503
- debug.extend = extend;
504
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
505
-
506
- Object.defineProperty(debug, 'enabled', {
507
- enumerable: true,
508
- configurable: false,
509
- get: () => {
510
- if (enableOverride !== null) {
511
- return enableOverride;
486
+ if (typeof args[0] !== 'string') {
487
+ // Anything else let's inspect with %O
488
+ args.unshift('%O');
512
489
  }
513
- if (namespacesCache !== createDebug.namespaces) {
514
- namespacesCache = createDebug.namespaces;
515
- enabledCache = createDebug.enabled(namespace);
490
+
491
+ // Apply any `formatters` transformations
492
+ let index = 0;
493
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
494
+ // If we encounter an escaped % then don't increase the array index
495
+ if (match === '%%') {
496
+ return '%';
497
+ }
498
+ index++;
499
+ const formatter = createDebug.formatters[format];
500
+ if (typeof formatter === 'function') {
501
+ const val = args[index];
502
+ match = formatter.call(self, val);
503
+
504
+ // Now we need to remove `args[index]` since it's inlined in the `format`
505
+ args.splice(index, 1);
506
+ index--;
507
+ }
508
+ return match;
509
+ });
510
+
511
+ // Apply env-specific formatting (colors, etc.)
512
+ createDebug.formatArgs.call(self, args);
513
+
514
+ const logFn = self.log || createDebug.log;
515
+ logFn.apply(self, args);
516
+ }
517
+
518
+ debug.namespace = namespace;
519
+ debug.useColors = createDebug.useColors();
520
+ debug.color = createDebug.selectColor(namespace);
521
+ debug.extend = extend;
522
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
523
+
524
+ Object.defineProperty(debug, 'enabled', {
525
+ enumerable: true,
526
+ configurable: false,
527
+ get: () => {
528
+ if (enableOverride !== null) {
529
+ return enableOverride;
530
+ }
531
+ if (namespacesCache !== createDebug.namespaces) {
532
+ namespacesCache = createDebug.namespaces;
533
+ enabledCache = createDebug.enabled(namespace);
534
+ }
535
+
536
+ return enabledCache;
537
+ },
538
+ set: v => {
539
+ enableOverride = v;
516
540
  }
541
+ });
517
542
 
518
- return enabledCache;
519
- },
520
- set: v => {
521
- enableOverride = v;
543
+ // Env-specific initialization logic for debug instances
544
+ if (typeof createDebug.init === 'function') {
545
+ createDebug.init(debug);
522
546
  }
523
- });
524
547
 
525
- // Env-specific initialization logic for debug instances
526
- if (typeof createDebug.init === 'function') {
527
- createDebug.init(debug);
548
+ return debug;
528
549
  }
529
550
 
530
- return debug;
531
- }
551
+ function extend(namespace, delimiter) {
552
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
553
+ newDebug.log = this.log;
554
+ return newDebug;
555
+ }
532
556
 
533
- function extend(namespace, delimiter) {
534
- const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
535
- newDebug.log = this.log;
536
- return newDebug;
537
- }
557
+ /**
558
+ * Enables a debug mode by namespaces. This can include modes
559
+ * separated by a colon and wildcards.
560
+ *
561
+ * @param {String} namespaces
562
+ * @api public
563
+ */
564
+ function enable(namespaces) {
565
+ createDebug.save(namespaces);
566
+ createDebug.namespaces = namespaces;
567
+
568
+ createDebug.names = [];
569
+ createDebug.skips = [];
570
+
571
+ let i;
572
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
573
+ const len = split.length;
574
+
575
+ for (i = 0; i < len; i++) {
576
+ if (!split[i]) {
577
+ // ignore empty strings
578
+ continue;
579
+ }
538
580
 
539
- /**
540
- * Enables a debug mode by namespaces. This can include modes
541
- * separated by a colon and wildcards.
542
- *
543
- * @param {String} namespaces
544
- * @api public
545
- */
546
- function enable(namespaces) {
547
- createDebug.save(namespaces);
548
- createDebug.namespaces = namespaces;
581
+ namespaces = split[i].replace(/\*/g, '.*?');
549
582
 
550
- createDebug.names = [];
551
- createDebug.skips = [];
583
+ if (namespaces[0] === '-') {
584
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
585
+ } else {
586
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
587
+ }
588
+ }
589
+ }
552
590
 
553
- let i;
554
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
555
- const len = split.length;
591
+ /**
592
+ * Disable debug output.
593
+ *
594
+ * @return {String} namespaces
595
+ * @api public
596
+ */
597
+ function disable() {
598
+ const namespaces = [
599
+ ...createDebug.names.map(toNamespace),
600
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
601
+ ].join(',');
602
+ createDebug.enable('');
603
+ return namespaces;
604
+ }
556
605
 
557
- for (i = 0; i < len; i++) {
558
- if (!split[i]) {
559
- // ignore empty strings
560
- continue;
606
+ /**
607
+ * Returns true if the given mode name is enabled, false otherwise.
608
+ *
609
+ * @param {String} name
610
+ * @return {Boolean}
611
+ * @api public
612
+ */
613
+ function enabled(name) {
614
+ if (name[name.length - 1] === '*') {
615
+ return true;
561
616
  }
562
617
 
563
- namespaces = split[i].replace(/\*/g, '.*?');
618
+ let i;
619
+ let len;
564
620
 
565
- if (namespaces[0] === '-') {
566
- createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
567
- } else {
568
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
621
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
622
+ if (createDebug.skips[i].test(name)) {
623
+ return false;
624
+ }
569
625
  }
570
- }
571
- }
572
626
 
573
- /**
574
- * Disable debug output.
575
- *
576
- * @return {String} namespaces
577
- * @api public
578
- */
579
- function disable() {
580
- const namespaces = [
581
- ...createDebug.names.map(toNamespace),
582
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
583
- ].join(',');
584
- createDebug.enable('');
585
- return namespaces;
586
- }
627
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
628
+ if (createDebug.names[i].test(name)) {
629
+ return true;
630
+ }
631
+ }
587
632
 
588
- /**
589
- * Returns true if the given mode name is enabled, false otherwise.
590
- *
591
- * @param {String} name
592
- * @return {Boolean}
593
- * @api public
594
- */
595
- function enabled(name) {
596
- if (name[name.length - 1] === '*') {
597
- return true;
633
+ return false;
598
634
  }
599
635
 
600
- let i;
601
- let len;
602
-
603
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
604
- if (createDebug.skips[i].test(name)) {
605
- return false;
606
- }
636
+ /**
637
+ * Convert regexp to namespace
638
+ *
639
+ * @param {RegExp} regxep
640
+ * @return {String} namespace
641
+ * @api private
642
+ */
643
+ function toNamespace(regexp) {
644
+ return regexp.toString()
645
+ .substring(2, regexp.toString().length - 2)
646
+ .replace(/\.\*\?$/, '*');
607
647
  }
608
648
 
609
- for (i = 0, len = createDebug.names.length; i < len; i++) {
610
- if (createDebug.names[i].test(name)) {
611
- return true;
649
+ /**
650
+ * Coerce `val`.
651
+ *
652
+ * @param {Mixed} val
653
+ * @return {Mixed}
654
+ * @api private
655
+ */
656
+ function coerce(val) {
657
+ if (val instanceof Error) {
658
+ return val.stack || val.message;
612
659
  }
660
+ return val;
613
661
  }
614
662
 
615
- return false;
616
- }
617
-
618
- /**
619
- * Convert regexp to namespace
620
- *
621
- * @param {RegExp} regxep
622
- * @return {String} namespace
623
- * @api private
624
- */
625
- function toNamespace(regexp) {
626
- return regexp.toString()
627
- .substring(2, regexp.toString().length - 2)
628
- .replace(/\.\*\?$/, '*');
629
- }
630
-
631
- /**
632
- * Coerce `val`.
633
- *
634
- * @param {Mixed} val
635
- * @return {Mixed}
636
- * @api private
637
- */
638
- function coerce(val) {
639
- if (val instanceof Error) {
640
- return val.stack || val.message;
663
+ /**
664
+ * XXX DO NOT USE. This is a temporary stub function.
665
+ * XXX It WILL be removed in the next major release.
666
+ */
667
+ function destroy() {
668
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
641
669
  }
642
- return val;
643
- }
644
670
 
645
- /**
646
- * XXX DO NOT USE. This is a temporary stub function.
647
- * XXX It WILL be removed in the next major release.
648
- */
649
- function destroy() {
650
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
651
- }
671
+ createDebug.enable(createDebug.load());
652
672
 
653
- createDebug.enable(createDebug.load());
673
+ return createDebug;
674
+ }
654
675
 
655
- return createDebug;
676
+ common = setup;
677
+ return common;
656
678
  }
657
679
 
658
- var common = setup;
659
-
660
680
  /* eslint-env browser */
661
681
 
662
- (function (module, exports) {
663
- /**
664
- * This is the web browser implementation of `debug()`.
665
- */
666
-
667
- exports.formatArgs = formatArgs;
668
- exports.save = save;
669
- exports.load = load;
670
- exports.useColors = useColors;
671
- exports.storage = localstorage();
672
- exports.destroy = (() => {
673
- let warned = false;
674
-
675
- return () => {
676
- if (!warned) {
677
- warned = true;
678
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
679
- }
680
- };
681
- })();
682
-
683
- /**
684
- * Colors.
685
- */
682
+ var hasRequiredBrowser;
683
+
684
+ function requireBrowser () {
685
+ if (hasRequiredBrowser) return browser.exports;
686
+ hasRequiredBrowser = 1;
687
+ (function (module, exports) {
688
+ /**
689
+ * This is the web browser implementation of `debug()`.
690
+ */
691
+
692
+ exports.formatArgs = formatArgs;
693
+ exports.save = save;
694
+ exports.load = load;
695
+ exports.useColors = useColors;
696
+ exports.storage = localstorage();
697
+ exports.destroy = (() => {
698
+ let warned = false;
699
+
700
+ return () => {
701
+ if (!warned) {
702
+ warned = true;
703
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
704
+ }
705
+ };
706
+ })();
686
707
 
687
- exports.colors = [
688
- '#0000CC',
689
- '#0000FF',
690
- '#0033CC',
691
- '#0033FF',
692
- '#0066CC',
693
- '#0066FF',
694
- '#0099CC',
695
- '#0099FF',
696
- '#00CC00',
697
- '#00CC33',
698
- '#00CC66',
699
- '#00CC99',
700
- '#00CCCC',
701
- '#00CCFF',
702
- '#3300CC',
703
- '#3300FF',
704
- '#3333CC',
705
- '#3333FF',
706
- '#3366CC',
707
- '#3366FF',
708
- '#3399CC',
709
- '#3399FF',
710
- '#33CC00',
711
- '#33CC33',
712
- '#33CC66',
713
- '#33CC99',
714
- '#33CCCC',
715
- '#33CCFF',
716
- '#6600CC',
717
- '#6600FF',
718
- '#6633CC',
719
- '#6633FF',
720
- '#66CC00',
721
- '#66CC33',
722
- '#9900CC',
723
- '#9900FF',
724
- '#9933CC',
725
- '#9933FF',
726
- '#99CC00',
727
- '#99CC33',
728
- '#CC0000',
729
- '#CC0033',
730
- '#CC0066',
731
- '#CC0099',
732
- '#CC00CC',
733
- '#CC00FF',
734
- '#CC3300',
735
- '#CC3333',
736
- '#CC3366',
737
- '#CC3399',
738
- '#CC33CC',
739
- '#CC33FF',
740
- '#CC6600',
741
- '#CC6633',
742
- '#CC9900',
743
- '#CC9933',
744
- '#CCCC00',
745
- '#CCCC33',
746
- '#FF0000',
747
- '#FF0033',
748
- '#FF0066',
749
- '#FF0099',
750
- '#FF00CC',
751
- '#FF00FF',
752
- '#FF3300',
753
- '#FF3333',
754
- '#FF3366',
755
- '#FF3399',
756
- '#FF33CC',
757
- '#FF33FF',
758
- '#FF6600',
759
- '#FF6633',
760
- '#FF9900',
761
- '#FF9933',
762
- '#FFCC00',
763
- '#FFCC33'
764
- ];
708
+ /**
709
+ * Colors.
710
+ */
765
711
 
766
- /**
767
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
768
- * and the Firebug extension (any Firefox version) are known
769
- * to support "%c" CSS customizations.
770
- *
771
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
772
- */
712
+ exports.colors = [
713
+ '#0000CC',
714
+ '#0000FF',
715
+ '#0033CC',
716
+ '#0033FF',
717
+ '#0066CC',
718
+ '#0066FF',
719
+ '#0099CC',
720
+ '#0099FF',
721
+ '#00CC00',
722
+ '#00CC33',
723
+ '#00CC66',
724
+ '#00CC99',
725
+ '#00CCCC',
726
+ '#00CCFF',
727
+ '#3300CC',
728
+ '#3300FF',
729
+ '#3333CC',
730
+ '#3333FF',
731
+ '#3366CC',
732
+ '#3366FF',
733
+ '#3399CC',
734
+ '#3399FF',
735
+ '#33CC00',
736
+ '#33CC33',
737
+ '#33CC66',
738
+ '#33CC99',
739
+ '#33CCCC',
740
+ '#33CCFF',
741
+ '#6600CC',
742
+ '#6600FF',
743
+ '#6633CC',
744
+ '#6633FF',
745
+ '#66CC00',
746
+ '#66CC33',
747
+ '#9900CC',
748
+ '#9900FF',
749
+ '#9933CC',
750
+ '#9933FF',
751
+ '#99CC00',
752
+ '#99CC33',
753
+ '#CC0000',
754
+ '#CC0033',
755
+ '#CC0066',
756
+ '#CC0099',
757
+ '#CC00CC',
758
+ '#CC00FF',
759
+ '#CC3300',
760
+ '#CC3333',
761
+ '#CC3366',
762
+ '#CC3399',
763
+ '#CC33CC',
764
+ '#CC33FF',
765
+ '#CC6600',
766
+ '#CC6633',
767
+ '#CC9900',
768
+ '#CC9933',
769
+ '#CCCC00',
770
+ '#CCCC33',
771
+ '#FF0000',
772
+ '#FF0033',
773
+ '#FF0066',
774
+ '#FF0099',
775
+ '#FF00CC',
776
+ '#FF00FF',
777
+ '#FF3300',
778
+ '#FF3333',
779
+ '#FF3366',
780
+ '#FF3399',
781
+ '#FF33CC',
782
+ '#FF33FF',
783
+ '#FF6600',
784
+ '#FF6633',
785
+ '#FF9900',
786
+ '#FF9933',
787
+ '#FFCC00',
788
+ '#FFCC33'
789
+ ];
773
790
 
774
- // eslint-disable-next-line complexity
775
- function useColors() {
776
- // NB: In an Electron preload script, document will be defined but not fully
777
- // initialized. Since we know we're in Chrome, we'll just detect this case
778
- // explicitly
779
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
780
- return true;
781
- }
791
+ /**
792
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
793
+ * and the Firebug extension (any Firefox version) are known
794
+ * to support "%c" CSS customizations.
795
+ *
796
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
797
+ */
798
+
799
+ // eslint-disable-next-line complexity
800
+ function useColors() {
801
+ // NB: In an Electron preload script, document will be defined but not fully
802
+ // initialized. Since we know we're in Chrome, we'll just detect this case
803
+ // explicitly
804
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
805
+ return true;
806
+ }
782
807
 
783
- // Internet Explorer and Edge do not support colors.
784
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
785
- return false;
786
- }
808
+ // Internet Explorer and Edge do not support colors.
809
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
810
+ return false;
811
+ }
787
812
 
788
- // Is webkit? http://stackoverflow.com/a/16459606/376773
789
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
790
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
791
- // Is firebug? http://stackoverflow.com/a/398120/376773
792
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
793
- // Is firefox >= v31?
794
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
795
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
796
- // Double check webkit in userAgent just in case we are in a worker
797
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
798
- }
813
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
814
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
815
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
816
+ // Is firebug? http://stackoverflow.com/a/398120/376773
817
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
818
+ // Is firefox >= v31?
819
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
820
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
821
+ // Double check webkit in userAgent just in case we are in a worker
822
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
823
+ }
799
824
 
800
- /**
801
- * Colorize log arguments if enabled.
802
- *
803
- * @api public
804
- */
825
+ /**
826
+ * Colorize log arguments if enabled.
827
+ *
828
+ * @api public
829
+ */
830
+
831
+ function formatArgs(args) {
832
+ args[0] = (this.useColors ? '%c' : '') +
833
+ this.namespace +
834
+ (this.useColors ? ' %c' : ' ') +
835
+ args[0] +
836
+ (this.useColors ? '%c ' : ' ') +
837
+ '+' + module.exports.humanize(this.diff);
838
+
839
+ if (!this.useColors) {
840
+ return;
841
+ }
805
842
 
806
- function formatArgs(args) {
807
- args[0] = (this.useColors ? '%c' : '') +
808
- this.namespace +
809
- (this.useColors ? ' %c' : ' ') +
810
- args[0] +
811
- (this.useColors ? '%c ' : ' ') +
812
- '+' + module.exports.humanize(this.diff);
843
+ const c = 'color: ' + this.color;
844
+ args.splice(1, 0, c, 'color: inherit');
813
845
 
814
- if (!this.useColors) {
815
- return;
816
- }
846
+ // The final "%c" is somewhat tricky, because there could be other
847
+ // arguments passed either before or after the %c, so we need to
848
+ // figure out the correct index to insert the CSS into
849
+ let index = 0;
850
+ let lastC = 0;
851
+ args[0].replace(/%[a-zA-Z%]/g, match => {
852
+ if (match === '%%') {
853
+ return;
854
+ }
855
+ index++;
856
+ if (match === '%c') {
857
+ // We only are interested in the *last* %c
858
+ // (the user may have provided their own)
859
+ lastC = index;
860
+ }
861
+ });
817
862
 
818
- const c = 'color: ' + this.color;
819
- args.splice(1, 0, c, 'color: inherit');
820
-
821
- // The final "%c" is somewhat tricky, because there could be other
822
- // arguments passed either before or after the %c, so we need to
823
- // figure out the correct index to insert the CSS into
824
- let index = 0;
825
- let lastC = 0;
826
- args[0].replace(/%[a-zA-Z%]/g, match => {
827
- if (match === '%%') {
828
- return;
863
+ args.splice(lastC, 0, c);
829
864
  }
830
- index++;
831
- if (match === '%c') {
832
- // We only are interested in the *last* %c
833
- // (the user may have provided their own)
834
- lastC = index;
865
+
866
+ /**
867
+ * Invokes `console.debug()` when available.
868
+ * No-op when `console.debug` is not a "function".
869
+ * If `console.debug` is not available, falls back
870
+ * to `console.log`.
871
+ *
872
+ * @api public
873
+ */
874
+ exports.log = console.debug || console.log || (() => {});
875
+
876
+ /**
877
+ * Save `namespaces`.
878
+ *
879
+ * @param {String} namespaces
880
+ * @api private
881
+ */
882
+ function save(namespaces) {
883
+ try {
884
+ if (namespaces) {
885
+ exports.storage.setItem('debug', namespaces);
886
+ } else {
887
+ exports.storage.removeItem('debug');
888
+ }
889
+ } catch (error) {
890
+ // Swallow
891
+ // XXX (@Qix-) should we be logging these?
892
+ }
835
893
  }
836
- });
837
894
 
838
- args.splice(lastC, 0, c);
839
- }
895
+ /**
896
+ * Load `namespaces`.
897
+ *
898
+ * @return {String} returns the previously persisted debug modes
899
+ * @api private
900
+ */
901
+ function load() {
902
+ let r;
903
+ try {
904
+ r = exports.storage.getItem('debug');
905
+ } catch (error) {
906
+ // Swallow
907
+ // XXX (@Qix-) should we be logging these?
908
+ }
840
909
 
841
- /**
842
- * Invokes `console.debug()` when available.
843
- * No-op when `console.debug` is not a "function".
844
- * If `console.debug` is not available, falls back
845
- * to `console.log`.
846
- *
847
- * @api public
848
- */
849
- exports.log = console.debug || console.log || (() => {});
910
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
911
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
912
+ r = process.env.DEBUG;
913
+ }
850
914
 
851
- /**
852
- * Save `namespaces`.
853
- *
854
- * @param {String} namespaces
855
- * @api private
856
- */
857
- function save(namespaces) {
858
- try {
859
- if (namespaces) {
860
- exports.storage.setItem('debug', namespaces);
861
- } else {
862
- exports.storage.removeItem('debug');
915
+ return r;
863
916
  }
864
- } catch (error) {
865
- // Swallow
866
- // XXX (@Qix-) should we be logging these?
867
- }
868
- }
869
917
 
870
- /**
871
- * Load `namespaces`.
872
- *
873
- * @return {String} returns the previously persisted debug modes
874
- * @api private
875
- */
876
- function load() {
877
- let r;
878
- try {
879
- r = exports.storage.getItem('debug');
880
- } catch (error) {
881
- // Swallow
882
- // XXX (@Qix-) should we be logging these?
883
- }
918
+ /**
919
+ * Localstorage attempts to return the localstorage.
920
+ *
921
+ * This is necessary because safari throws
922
+ * when a user disables cookies/localstorage
923
+ * and you attempt to access it.
924
+ *
925
+ * @return {LocalStorage}
926
+ * @api private
927
+ */
928
+
929
+ function localstorage() {
930
+ try {
931
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
932
+ // The Browser also has localStorage in the global context.
933
+ return localStorage;
934
+ } catch (error) {
935
+ // Swallow
936
+ // XXX (@Qix-) should we be logging these?
937
+ }
938
+ }
884
939
 
885
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
886
- if (!r && typeof process !== 'undefined' && 'env' in process) {
887
- r = process.env.DEBUG;
888
- }
940
+ module.exports = requireCommon()(exports);
889
941
 
890
- return r;
891
- }
942
+ const {formatters} = module.exports;
892
943
 
893
- /**
894
- * Localstorage attempts to return the localstorage.
895
- *
896
- * This is necessary because safari throws
897
- * when a user disables cookies/localstorage
898
- * and you attempt to access it.
899
- *
900
- * @return {LocalStorage}
901
- * @api private
902
- */
944
+ /**
945
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
946
+ */
903
947
 
904
- function localstorage() {
905
- try {
906
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
907
- // The Browser also has localStorage in the global context.
908
- return localStorage;
909
- } catch (error) {
910
- // Swallow
911
- // XXX (@Qix-) should we be logging these?
912
- }
948
+ formatters.j = function (v) {
949
+ try {
950
+ return JSON.stringify(v);
951
+ } catch (error) {
952
+ return '[UnexpectedJSONParseError]: ' + error.message;
953
+ }
954
+ };
955
+ } (browser, browser.exports));
956
+ return browser.exports;
913
957
  }
914
958
 
915
- module.exports = common(exports);
916
-
917
- const {formatters} = module.exports;
918
-
919
- /**
920
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
921
- */
922
-
923
- formatters.j = function (v) {
924
- try {
925
- return JSON.stringify(v);
926
- } catch (error) {
927
- return '[UnexpectedJSONParseError]: ' + error.message;
928
- }
929
- };
930
- }(browser, browser.exports));
931
-
932
959
  var node = {exports: {}};
933
960
 
934
961
  /**
935
962
  * Module dependencies.
936
963
  */
937
964
 
938
- (function (module, exports) {
939
- const tty = require$$0__default;
940
- const util = require$$1__default;
941
-
942
- /**
943
- * This is the Node.js implementation of `debug()`.
944
- */
945
-
946
- exports.init = init;
947
- exports.log = log;
948
- exports.formatArgs = formatArgs;
949
- exports.save = save;
950
- exports.load = load;
951
- exports.useColors = useColors;
952
- exports.destroy = util.deprecate(
953
- () => {},
954
- 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
955
- );
965
+ var hasRequiredNode;
966
+
967
+ function requireNode () {
968
+ if (hasRequiredNode) return node.exports;
969
+ hasRequiredNode = 1;
970
+ (function (module, exports) {
971
+ const tty = require$$0__default;
972
+ const util = require$$1__default;
973
+
974
+ /**
975
+ * This is the Node.js implementation of `debug()`.
976
+ */
977
+
978
+ exports.init = init;
979
+ exports.log = log;
980
+ exports.formatArgs = formatArgs;
981
+ exports.save = save;
982
+ exports.load = load;
983
+ exports.useColors = useColors;
984
+ exports.destroy = util.deprecate(
985
+ () => {},
986
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
987
+ );
988
+
989
+ /**
990
+ * Colors.
991
+ */
992
+
993
+ exports.colors = [6, 2, 3, 4, 5, 1];
994
+
995
+ try {
996
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
997
+ // eslint-disable-next-line import/no-extraneous-dependencies
998
+ const supportsColor = require('supports-color');
999
+
1000
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1001
+ exports.colors = [
1002
+ 20,
1003
+ 21,
1004
+ 26,
1005
+ 27,
1006
+ 32,
1007
+ 33,
1008
+ 38,
1009
+ 39,
1010
+ 40,
1011
+ 41,
1012
+ 42,
1013
+ 43,
1014
+ 44,
1015
+ 45,
1016
+ 56,
1017
+ 57,
1018
+ 62,
1019
+ 63,
1020
+ 68,
1021
+ 69,
1022
+ 74,
1023
+ 75,
1024
+ 76,
1025
+ 77,
1026
+ 78,
1027
+ 79,
1028
+ 80,
1029
+ 81,
1030
+ 92,
1031
+ 93,
1032
+ 98,
1033
+ 99,
1034
+ 112,
1035
+ 113,
1036
+ 128,
1037
+ 129,
1038
+ 134,
1039
+ 135,
1040
+ 148,
1041
+ 149,
1042
+ 160,
1043
+ 161,
1044
+ 162,
1045
+ 163,
1046
+ 164,
1047
+ 165,
1048
+ 166,
1049
+ 167,
1050
+ 168,
1051
+ 169,
1052
+ 170,
1053
+ 171,
1054
+ 172,
1055
+ 173,
1056
+ 178,
1057
+ 179,
1058
+ 184,
1059
+ 185,
1060
+ 196,
1061
+ 197,
1062
+ 198,
1063
+ 199,
1064
+ 200,
1065
+ 201,
1066
+ 202,
1067
+ 203,
1068
+ 204,
1069
+ 205,
1070
+ 206,
1071
+ 207,
1072
+ 208,
1073
+ 209,
1074
+ 214,
1075
+ 215,
1076
+ 220,
1077
+ 221
1078
+ ];
1079
+ }
1080
+ } catch (error) {
1081
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
1082
+ }
956
1083
 
957
- /**
958
- * Colors.
959
- */
1084
+ /**
1085
+ * Build up the default `inspectOpts` object from the environment variables.
1086
+ *
1087
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
1088
+ */
1089
+
1090
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
1091
+ return /^debug_/i.test(key);
1092
+ }).reduce((obj, key) => {
1093
+ // Camel-case
1094
+ const prop = key
1095
+ .substring(6)
1096
+ .toLowerCase()
1097
+ .replace(/_([a-z])/g, (_, k) => {
1098
+ return k.toUpperCase();
1099
+ });
1100
+
1101
+ // Coerce string value into JS value
1102
+ let val = process.env[key];
1103
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
1104
+ val = true;
1105
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
1106
+ val = false;
1107
+ } else if (val === 'null') {
1108
+ val = null;
1109
+ } else {
1110
+ val = Number(val);
1111
+ }
960
1112
 
961
- exports.colors = [6, 2, 3, 4, 5, 1];
1113
+ obj[prop] = val;
1114
+ return obj;
1115
+ }, {});
962
1116
 
963
- try {
964
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
965
- // eslint-disable-next-line import/no-extraneous-dependencies
966
- const supportsColor = require('supports-color');
1117
+ /**
1118
+ * Is stdout a TTY? Colored output is enabled when `true`.
1119
+ */
967
1120
 
968
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
969
- exports.colors = [
970
- 20,
971
- 21,
972
- 26,
973
- 27,
974
- 32,
975
- 33,
976
- 38,
977
- 39,
978
- 40,
979
- 41,
980
- 42,
981
- 43,
982
- 44,
983
- 45,
984
- 56,
985
- 57,
986
- 62,
987
- 63,
988
- 68,
989
- 69,
990
- 74,
991
- 75,
992
- 76,
993
- 77,
994
- 78,
995
- 79,
996
- 80,
997
- 81,
998
- 92,
999
- 93,
1000
- 98,
1001
- 99,
1002
- 112,
1003
- 113,
1004
- 128,
1005
- 129,
1006
- 134,
1007
- 135,
1008
- 148,
1009
- 149,
1010
- 160,
1011
- 161,
1012
- 162,
1013
- 163,
1014
- 164,
1015
- 165,
1016
- 166,
1017
- 167,
1018
- 168,
1019
- 169,
1020
- 170,
1021
- 171,
1022
- 172,
1023
- 173,
1024
- 178,
1025
- 179,
1026
- 184,
1027
- 185,
1028
- 196,
1029
- 197,
1030
- 198,
1031
- 199,
1032
- 200,
1033
- 201,
1034
- 202,
1035
- 203,
1036
- 204,
1037
- 205,
1038
- 206,
1039
- 207,
1040
- 208,
1041
- 209,
1042
- 214,
1043
- 215,
1044
- 220,
1045
- 221
1046
- ];
1047
- }
1048
- } catch (error) {
1049
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
1050
- }
1121
+ function useColors() {
1122
+ return 'colors' in exports.inspectOpts ?
1123
+ Boolean(exports.inspectOpts.colors) :
1124
+ tty.isatty(process.stderr.fd);
1125
+ }
1051
1126
 
1052
- /**
1053
- * Build up the default `inspectOpts` object from the environment variables.
1054
- *
1055
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
1056
- */
1127
+ /**
1128
+ * Adds ANSI color escape codes if enabled.
1129
+ *
1130
+ * @api public
1131
+ */
1057
1132
 
1058
- exports.inspectOpts = Object.keys(process.env).filter(key => {
1059
- return /^debug_/i.test(key);
1060
- }).reduce((obj, key) => {
1061
- // Camel-case
1062
- const prop = key
1063
- .substring(6)
1064
- .toLowerCase()
1065
- .replace(/_([a-z])/g, (_, k) => {
1066
- return k.toUpperCase();
1067
- });
1133
+ function formatArgs(args) {
1134
+ const {namespace: name, useColors} = this;
1068
1135
 
1069
- // Coerce string value into JS value
1070
- let val = process.env[key];
1071
- if (/^(yes|on|true|enabled)$/i.test(val)) {
1072
- val = true;
1073
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
1074
- val = false;
1075
- } else if (val === 'null') {
1076
- val = null;
1077
- } else {
1078
- val = Number(val);
1079
- }
1136
+ if (useColors) {
1137
+ const c = this.color;
1138
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
1139
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
1080
1140
 
1081
- obj[prop] = val;
1082
- return obj;
1083
- }, {});
1141
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
1142
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
1143
+ } else {
1144
+ args[0] = getDate() + name + ' ' + args[0];
1145
+ }
1146
+ }
1084
1147
 
1085
- /**
1086
- * Is stdout a TTY? Colored output is enabled when `true`.
1087
- */
1148
+ function getDate() {
1149
+ if (exports.inspectOpts.hideDate) {
1150
+ return '';
1151
+ }
1152
+ return new Date().toISOString() + ' ';
1153
+ }
1088
1154
 
1089
- function useColors() {
1090
- return 'colors' in exports.inspectOpts ?
1091
- Boolean(exports.inspectOpts.colors) :
1092
- tty.isatty(process.stderr.fd);
1093
- }
1155
+ /**
1156
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
1157
+ */
1094
1158
 
1095
- /**
1096
- * Adds ANSI color escape codes if enabled.
1097
- *
1098
- * @api public
1099
- */
1159
+ function log(...args) {
1160
+ return process.stderr.write(util.format(...args) + '\n');
1161
+ }
1100
1162
 
1101
- function formatArgs(args) {
1102
- const {namespace: name, useColors} = this;
1163
+ /**
1164
+ * Save `namespaces`.
1165
+ *
1166
+ * @param {String} namespaces
1167
+ * @api private
1168
+ */
1169
+ function save(namespaces) {
1170
+ if (namespaces) {
1171
+ process.env.DEBUG = namespaces;
1172
+ } else {
1173
+ // If you set a process.env field to null or undefined, it gets cast to the
1174
+ // string 'null' or 'undefined'. Just delete instead.
1175
+ delete process.env.DEBUG;
1176
+ }
1177
+ }
1103
1178
 
1104
- if (useColors) {
1105
- const c = this.color;
1106
- const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
1107
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
1179
+ /**
1180
+ * Load `namespaces`.
1181
+ *
1182
+ * @return {String} returns the previously persisted debug modes
1183
+ * @api private
1184
+ */
1108
1185
 
1109
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
1110
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
1111
- } else {
1112
- args[0] = getDate() + name + ' ' + args[0];
1113
- }
1114
- }
1186
+ function load() {
1187
+ return process.env.DEBUG;
1188
+ }
1115
1189
 
1116
- function getDate() {
1117
- if (exports.inspectOpts.hideDate) {
1118
- return '';
1119
- }
1120
- return new Date().toISOString() + ' ';
1121
- }
1190
+ /**
1191
+ * Init logic for `debug` instances.
1192
+ *
1193
+ * Create a new `inspectOpts` object in case `useColors` is set
1194
+ * differently for a particular `debug` instance.
1195
+ */
1122
1196
 
1123
- /**
1124
- * Invokes `util.format()` with the specified arguments and writes to stderr.
1125
- */
1197
+ function init(debug) {
1198
+ debug.inspectOpts = {};
1126
1199
 
1127
- function log(...args) {
1128
- return process.stderr.write(util.format(...args) + '\n');
1129
- }
1200
+ const keys = Object.keys(exports.inspectOpts);
1201
+ for (let i = 0; i < keys.length; i++) {
1202
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1203
+ }
1204
+ }
1130
1205
 
1131
- /**
1132
- * Save `namespaces`.
1133
- *
1134
- * @param {String} namespaces
1135
- * @api private
1136
- */
1137
- function save(namespaces) {
1138
- if (namespaces) {
1139
- process.env.DEBUG = namespaces;
1140
- } else {
1141
- // If you set a process.env field to null or undefined, it gets cast to the
1142
- // string 'null' or 'undefined'. Just delete instead.
1143
- delete process.env.DEBUG;
1144
- }
1145
- }
1206
+ module.exports = requireCommon()(exports);
1146
1207
 
1147
- /**
1148
- * Load `namespaces`.
1149
- *
1150
- * @return {String} returns the previously persisted debug modes
1151
- * @api private
1152
- */
1208
+ const {formatters} = module.exports;
1153
1209
 
1154
- function load() {
1155
- return process.env.DEBUG;
1156
- }
1210
+ /**
1211
+ * Map %o to `util.inspect()`, all on a single line.
1212
+ */
1157
1213
 
1158
- /**
1159
- * Init logic for `debug` instances.
1160
- *
1161
- * Create a new `inspectOpts` object in case `useColors` is set
1162
- * differently for a particular `debug` instance.
1163
- */
1214
+ formatters.o = function (v) {
1215
+ this.inspectOpts.colors = this.useColors;
1216
+ return util.inspect(v, this.inspectOpts)
1217
+ .split('\n')
1218
+ .map(str => str.trim())
1219
+ .join(' ');
1220
+ };
1164
1221
 
1165
- function init(debug) {
1166
- debug.inspectOpts = {};
1222
+ /**
1223
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
1224
+ */
1167
1225
 
1168
- const keys = Object.keys(exports.inspectOpts);
1169
- for (let i = 0; i < keys.length; i++) {
1170
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1171
- }
1226
+ formatters.O = function (v) {
1227
+ this.inspectOpts.colors = this.useColors;
1228
+ return util.inspect(v, this.inspectOpts);
1229
+ };
1230
+ } (node, node.exports));
1231
+ return node.exports;
1172
1232
  }
1173
1233
 
1174
- module.exports = common(exports);
1175
-
1176
- const {formatters} = module.exports;
1177
-
1178
- /**
1179
- * Map %o to `util.inspect()`, all on a single line.
1180
- */
1181
-
1182
- formatters.o = function (v) {
1183
- this.inspectOpts.colors = this.useColors;
1184
- return util.inspect(v, this.inspectOpts)
1185
- .split('\n')
1186
- .map(str => str.trim())
1187
- .join(' ');
1188
- };
1189
-
1190
- /**
1191
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
1192
- */
1193
-
1194
- formatters.O = function (v) {
1195
- this.inspectOpts.colors = this.useColors;
1196
- return util.inspect(v, this.inspectOpts);
1197
- };
1198
- }(node, node.exports));
1199
-
1200
1234
  /**
1201
1235
  * Detect Electron renderer / nwjs process, which is node, but we should
1202
1236
  * treat as a browser.
1203
1237
  */
1204
1238
 
1205
- if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
1206
- src.exports = browser.exports;
1207
- } else {
1208
- src.exports = node.exports;
1209
- }
1239
+ (function (module) {
1240
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
1241
+ module.exports = requireBrowser();
1242
+ } else {
1243
+ module.exports = requireNode();
1244
+ }
1245
+ } (src));
1246
+
1247
+ var debug = /*@__PURE__*/getDefaultExportFromCjs(src.exports);
1210
1248
 
1211
- var debug = src.exports;
1249
+ var picomatch$1 = {exports: {}};
1212
1250
 
1213
1251
  var utils$3 = {};
1214
1252
 
@@ -1392,69 +1430,69 @@ var constants$2 = {
1392
1430
 
1393
1431
  (function (exports) {
1394
1432
 
1395
- const path = require$$0__default$1;
1396
- const win32 = process.platform === 'win32';
1397
- const {
1398
- REGEX_BACKSLASH,
1399
- REGEX_REMOVE_BACKSLASH,
1400
- REGEX_SPECIAL_CHARS,
1401
- REGEX_SPECIAL_CHARS_GLOBAL
1402
- } = constants$2;
1403
-
1404
- exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
1405
- exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
1406
- exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
1407
- exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
1408
- exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
1409
-
1410
- exports.removeBackslashes = str => {
1411
- return str.replace(REGEX_REMOVE_BACKSLASH, match => {
1412
- return match === '\\' ? '' : match;
1413
- });
1414
- };
1433
+ const path = require$$0__default$1;
1434
+ const win32 = process.platform === 'win32';
1435
+ const {
1436
+ REGEX_BACKSLASH,
1437
+ REGEX_REMOVE_BACKSLASH,
1438
+ REGEX_SPECIAL_CHARS,
1439
+ REGEX_SPECIAL_CHARS_GLOBAL
1440
+ } = constants$2;
1441
+
1442
+ exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
1443
+ exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
1444
+ exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
1445
+ exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
1446
+ exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
1447
+
1448
+ exports.removeBackslashes = str => {
1449
+ return str.replace(REGEX_REMOVE_BACKSLASH, match => {
1450
+ return match === '\\' ? '' : match;
1451
+ });
1452
+ };
1415
1453
 
1416
- exports.supportsLookbehinds = () => {
1417
- const segs = process.version.slice(1).split('.').map(Number);
1418
- if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
1419
- return true;
1420
- }
1421
- return false;
1422
- };
1454
+ exports.supportsLookbehinds = () => {
1455
+ const segs = process.version.slice(1).split('.').map(Number);
1456
+ if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
1457
+ return true;
1458
+ }
1459
+ return false;
1460
+ };
1423
1461
 
1424
- exports.isWindows = options => {
1425
- if (options && typeof options.windows === 'boolean') {
1426
- return options.windows;
1427
- }
1428
- return win32 === true || path.sep === '\\';
1429
- };
1462
+ exports.isWindows = options => {
1463
+ if (options && typeof options.windows === 'boolean') {
1464
+ return options.windows;
1465
+ }
1466
+ return win32 === true || path.sep === '\\';
1467
+ };
1430
1468
 
1431
- exports.escapeLast = (input, char, lastIdx) => {
1432
- const idx = input.lastIndexOf(char, lastIdx);
1433
- if (idx === -1) return input;
1434
- if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
1435
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
1436
- };
1469
+ exports.escapeLast = (input, char, lastIdx) => {
1470
+ const idx = input.lastIndexOf(char, lastIdx);
1471
+ if (idx === -1) return input;
1472
+ if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
1473
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
1474
+ };
1437
1475
 
1438
- exports.removePrefix = (input, state = {}) => {
1439
- let output = input;
1440
- if (output.startsWith('./')) {
1441
- output = output.slice(2);
1442
- state.prefix = './';
1443
- }
1444
- return output;
1445
- };
1476
+ exports.removePrefix = (input, state = {}) => {
1477
+ let output = input;
1478
+ if (output.startsWith('./')) {
1479
+ output = output.slice(2);
1480
+ state.prefix = './';
1481
+ }
1482
+ return output;
1483
+ };
1446
1484
 
1447
- exports.wrapOutput = (input, state = {}, options = {}) => {
1448
- const prepend = options.contains ? '' : '^';
1449
- const append = options.contains ? '' : '$';
1485
+ exports.wrapOutput = (input, state = {}, options = {}) => {
1486
+ const prepend = options.contains ? '' : '^';
1487
+ const append = options.contains ? '' : '$';
1450
1488
 
1451
- let output = `${prepend}(?:${input})${append}`;
1452
- if (state.negated === true) {
1453
- output = `(?:^(?!${output}).*$)`;
1454
- }
1455
- return output;
1456
- };
1457
- }(utils$3));
1489
+ let output = `${prepend}(?:${input})${append}`;
1490
+ if (state.negated === true) {
1491
+ output = `(?:^(?!${output}).*$)`;
1492
+ }
1493
+ return output;
1494
+ };
1495
+ } (utils$3));
1458
1496
 
1459
1497
  const utils$2 = utils$3;
1460
1498
  const {
@@ -2958,9 +2996,9 @@ const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
2958
2996
  * @api public
2959
2997
  */
2960
2998
 
2961
- const picomatch$1 = (glob, options, returnState = false) => {
2999
+ const picomatch = (glob, options, returnState = false) => {
2962
3000
  if (Array.isArray(glob)) {
2963
- const fns = glob.map(input => picomatch$1(input, options, returnState));
3001
+ const fns = glob.map(input => picomatch(input, options, returnState));
2964
3002
  const arrayMatcher = str => {
2965
3003
  for (const isMatch of fns) {
2966
3004
  const state = isMatch(str);
@@ -2980,8 +3018,8 @@ const picomatch$1 = (glob, options, returnState = false) => {
2980
3018
  const opts = options || {};
2981
3019
  const posix = utils.isWindows(options);
2982
3020
  const regex = isState
2983
- ? picomatch$1.compileRe(glob, options)
2984
- : picomatch$1.makeRe(glob, options, false, true);
3021
+ ? picomatch.compileRe(glob, options)
3022
+ : picomatch.makeRe(glob, options, false, true);
2985
3023
 
2986
3024
  const state = regex.state;
2987
3025
  delete regex.state;
@@ -2989,11 +3027,11 @@ const picomatch$1 = (glob, options, returnState = false) => {
2989
3027
  let isIgnored = () => false;
2990
3028
  if (opts.ignore) {
2991
3029
  const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
2992
- isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState);
3030
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2993
3031
  }
2994
3032
 
2995
3033
  const matcher = (input, returnObject = false) => {
2996
- const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix });
3034
+ const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
2997
3035
  const result = { glob, state, regex, posix, input, output, match, isMatch };
2998
3036
 
2999
3037
  if (typeof opts.onResult === 'function') {
@@ -3043,7 +3081,7 @@ const picomatch$1 = (glob, options, returnState = false) => {
3043
3081
  * @api public
3044
3082
  */
3045
3083
 
3046
- picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
3084
+ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3047
3085
  if (typeof input !== 'string') {
3048
3086
  throw new TypeError('Expected input to be a string');
3049
3087
  }
@@ -3064,7 +3102,7 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
3064
3102
 
3065
3103
  if (match === false || opts.capture === true) {
3066
3104
  if (opts.matchBase === true || opts.basename === true) {
3067
- match = picomatch$1.matchBase(input, regex, options, posix);
3105
+ match = picomatch.matchBase(input, regex, options, posix);
3068
3106
  } else {
3069
3107
  match = regex.exec(output);
3070
3108
  }
@@ -3087,8 +3125,8 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
3087
3125
  * @api public
3088
3126
  */
3089
3127
 
3090
- picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3091
- const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options);
3128
+ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3129
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
3092
3130
  return regex.test(path$1.basename(input));
3093
3131
  };
3094
3132
 
@@ -3109,7 +3147,7 @@ picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options))
3109
3147
  * @api public
3110
3148
  */
3111
3149
 
3112
- picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
3150
+ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
3113
3151
 
3114
3152
  /**
3115
3153
  * Parse a glob pattern to create the source string for a regular
@@ -3125,8 +3163,8 @@ picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)
3125
3163
  * @api public
3126
3164
  */
3127
3165
 
3128
- picomatch$1.parse = (pattern, options) => {
3129
- if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options));
3166
+ picomatch.parse = (pattern, options) => {
3167
+ if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
3130
3168
  return parse$1(pattern, { ...options, fastpaths: false });
3131
3169
  };
3132
3170
 
@@ -3157,7 +3195,7 @@ picomatch$1.parse = (pattern, options) => {
3157
3195
  * @api public
3158
3196
  */
3159
3197
 
3160
- picomatch$1.scan = (input, options) => scan(input, options);
3198
+ picomatch.scan = (input, options) => scan(input, options);
3161
3199
 
3162
3200
  /**
3163
3201
  * Compile a regular expression from the `state` object returned by the
@@ -3171,7 +3209,7 @@ picomatch$1.scan = (input, options) => scan(input, options);
3171
3209
  * @api public
3172
3210
  */
3173
3211
 
3174
- picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => {
3212
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
3175
3213
  if (returnOutput === true) {
3176
3214
  return state.output;
3177
3215
  }
@@ -3185,7 +3223,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
3185
3223
  source = `^(?!${source}).*$`;
3186
3224
  }
3187
3225
 
3188
- const regex = picomatch$1.toRegex(source, options);
3226
+ const regex = picomatch.toRegex(source, options);
3189
3227
  if (returnState === true) {
3190
3228
  regex.state = state;
3191
3229
  }
@@ -3212,7 +3250,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
3212
3250
  * @api public
3213
3251
  */
3214
3252
 
3215
- picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
3253
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
3216
3254
  if (!input || typeof input !== 'string') {
3217
3255
  throw new TypeError('Expected a non-empty string');
3218
3256
  }
@@ -3227,7 +3265,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
3227
3265
  parsed = parse$1(input, options);
3228
3266
  }
3229
3267
 
3230
- return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
3268
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
3231
3269
  };
3232
3270
 
3233
3271
  /**
@@ -3247,7 +3285,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
3247
3285
  * @api public
3248
3286
  */
3249
3287
 
3250
- picomatch$1.toRegex = (source, options) => {
3288
+ picomatch.toRegex = (source, options) => {
3251
3289
  try {
3252
3290
  const opts = options || {};
3253
3291
  return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
@@ -3262,15 +3300,20 @@ picomatch$1.toRegex = (source, options) => {
3262
3300
  * @return {Object}
3263
3301
  */
3264
3302
 
3265
- picomatch$1.constants = constants;
3303
+ picomatch.constants = constants;
3266
3304
 
3267
3305
  /**
3268
3306
  * Expose "picomatch"
3269
3307
  */
3270
3308
 
3271
- var picomatch_1 = picomatch$1;
3309
+ var picomatch_1 = picomatch;
3310
+
3311
+ (function (module) {
3272
3312
 
3273
- var picomatch = picomatch_1;
3313
+ module.exports = picomatch_1;
3314
+ } (picomatch$1));
3315
+
3316
+ var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatch$1.exports);
3274
3317
 
3275
3318
  // Helper since Typescript can't detect readonly arrays with Array.isArray
3276
3319
  function isArray(arg) {
@@ -3310,7 +3353,7 @@ const createFilter$1 = function createFilter(include, exclude, options) {
3310
3353
  test: (what) => {
3311
3354
  // this refactor is a tad overly verbose but makes for easy debugging
3312
3355
  const pattern = getMatcherString(id, resolutionBase);
3313
- const fn = picomatch(pattern, { dot: true });
3356
+ const fn = pm(pattern, { dot: true });
3314
3357
  const result = fn(what);
3315
3358
  return result;
3316
3359
  }
@@ -3796,11 +3839,11 @@ function createLogger(level = 'info', options = {}) {
3796
3839
  const format = () => {
3797
3840
  if (options.timestamp) {
3798
3841
  const tag = type === 'info'
3799
- ? colors.cyan(colors.bold(prefix))
3842
+ ? picocolors.exports.cyan(picocolors.exports.bold(prefix))
3800
3843
  : type === 'warn'
3801
- ? colors.yellow(colors.bold(prefix))
3802
- : colors.red(colors.bold(prefix));
3803
- return `${colors.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
3844
+ ? picocolors.exports.yellow(picocolors.exports.bold(prefix))
3845
+ : picocolors.exports.red(picocolors.exports.bold(prefix));
3846
+ return `${picocolors.exports.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
3804
3847
  }
3805
3848
  else {
3806
3849
  return msg;
@@ -3813,7 +3856,7 @@ function createLogger(level = 'info', options = {}) {
3813
3856
  if (type === lastType && msg === lastMsg) {
3814
3857
  sameCount++;
3815
3858
  clear();
3816
- console[method](format(), colors.yellow(`(x${sameCount + 1})`));
3859
+ console[method](format(), picocolors.exports.yellow(`(x${sameCount + 1})`));
3817
3860
  }
3818
3861
  else {
3819
3862
  sameCount = 0;
@@ -4065,8 +4108,6 @@ main$1.exports.config = DotenvModule.config;
4065
4108
  main$1.exports.parse = DotenvModule.parse;
4066
4109
  main$1.exports = DotenvModule;
4067
4110
 
4068
- var dotenv = main$1.exports;
4069
-
4070
4111
  var dotenvExpand = function (config) {
4071
4112
  // if ignoring process.env, use a blank object
4072
4113
  var environment = config.ignoreProcessEnv ? {} : process.env;
@@ -4136,7 +4177,7 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
4136
4177
  for (const file of envFiles) {
4137
4178
  const path = lookupFile(envDir, [file], { pathOnly: true, rootDir: envDir });
4138
4179
  if (path) {
4139
- const parsed = dotenv.parse(fs__default.readFileSync(path), {
4180
+ const parsed = main$1.exports.parse(fs__default.readFileSync(path), {
4140
4181
  debug: process.env.DEBUG?.includes('vite:dotenv') || undefined
4141
4182
  });
4142
4183
  // let environment variables use each other