@digipair/skill-git 0.93.0 → 0.94.0-1

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.
@@ -1,11 +1,14 @@
1
+ import { Buffer as Buffer$1 } from 'node:buffer';
1
2
  import require$$0$1 from 'fs';
2
- import require$$1 from 'tty';
3
- import require$$1$1 from 'util';
4
- import require$$0 from 'os';
3
+ import require$$0 from 'tty';
4
+ import require$$1 from 'util';
5
5
  import { spawn } from 'child_process';
6
6
  import { EventEmitter } from 'node:events';
7
7
 
8
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
8
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
+ function getDefaultExportFromCjs(x) {
10
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
11
+ }
9
12
 
10
13
  var dist$1 = {};
11
14
 
@@ -15,7 +18,7 @@ var src = {
15
18
  exports: {}
16
19
  };
17
20
 
18
- var browser = {
21
+ var browser$1 = {
19
22
  exports: {}
20
23
  };
21
24
 
@@ -23,147 +26,155 @@ var browser = {
23
26
  * Helpers.
24
27
  */
25
28
 
26
- function _type_of$1(obj) {
27
- "@swc/helpers - typeof";
28
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
29
- }
30
- var s = 1000;
31
- var m = s * 60;
32
- var h = m * 60;
33
- var d = h * 24;
34
- var w = d * 7;
35
- var y = d * 365.25;
36
- /**
37
- * Parse or format the given `val`.
38
- *
39
- * Options:
40
- *
41
- * - `long` verbose formatting [false]
42
- *
43
- * @param {String|Number} val
44
- * @param {Object} [options]
45
- * @throws {Error} throw an error if val is not a non-empty string or a number
46
- * @return {String|Number}
47
- * @api public
48
- */ var ms = function(val, options) {
49
- options = options || {};
50
- var type = typeof val === "undefined" ? "undefined" : _type_of$1(val);
51
- if (type === "string" && val.length > 0) {
52
- return parse(val);
53
- } else if (type === "number" && isFinite(val)) {
54
- return options.long ? fmtLong(val) : fmtShort(val);
55
- }
56
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
57
- };
58
- /**
59
- * Parse the given `str` and return milliseconds.
60
- *
61
- * @param {String} str
62
- * @return {Number}
63
- * @api private
64
- */ function parse(str) {
65
- str = String(str);
66
- if (str.length > 100) {
67
- return;
68
- }
69
- 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(str);
70
- if (!match) {
71
- return;
72
- }
73
- var n = parseFloat(match[1]);
74
- var type = (match[2] || "ms").toLowerCase();
75
- switch(type){
76
- case "years":
77
- case "year":
78
- case "yrs":
79
- case "yr":
80
- case "y":
81
- return n * y;
82
- case "weeks":
83
- case "week":
84
- case "w":
85
- return n * w;
86
- case "days":
87
- case "day":
88
- case "d":
89
- return n * d;
90
- case "hours":
91
- case "hour":
92
- case "hrs":
93
- case "hr":
94
- case "h":
95
- return n * h;
96
- case "minutes":
97
- case "minute":
98
- case "mins":
99
- case "min":
100
- case "m":
101
- return n * m;
102
- case "seconds":
103
- case "second":
104
- case "secs":
105
- case "sec":
106
- case "s":
107
- return n * s;
108
- case "milliseconds":
109
- case "millisecond":
110
- case "msecs":
111
- case "msec":
112
- case "ms":
113
- return n;
114
- default:
115
- return undefined;
116
- }
117
- }
118
- /**
119
- * Short format for `ms`.
120
- *
121
- * @param {Number} ms
122
- * @return {String}
123
- * @api private
124
- */ function fmtShort(ms) {
125
- var msAbs = Math.abs(ms);
126
- if (msAbs >= d) {
127
- return Math.round(ms / d) + "d";
128
- }
129
- if (msAbs >= h) {
130
- return Math.round(ms / h) + "h";
131
- }
132
- if (msAbs >= m) {
133
- return Math.round(ms / m) + "m";
134
- }
135
- if (msAbs >= s) {
136
- return Math.round(ms / s) + "s";
137
- }
138
- return ms + "ms";
139
- }
140
- /**
141
- * Long format for `ms`.
142
- *
143
- * @param {Number} ms
144
- * @return {String}
145
- * @api private
146
- */ function fmtLong(ms) {
147
- var msAbs = Math.abs(ms);
148
- if (msAbs >= d) {
149
- return plural(ms, msAbs, d, "day");
150
- }
151
- if (msAbs >= h) {
152
- return plural(ms, msAbs, h, "hour");
153
- }
154
- if (msAbs >= m) {
155
- return plural(ms, msAbs, m, "minute");
156
- }
157
- if (msAbs >= s) {
158
- return plural(ms, msAbs, s, "second");
159
- }
160
- return ms + " ms";
161
- }
162
- /**
163
- * Pluralization helper.
164
- */ function plural(ms, msAbs, n, name) {
165
- var isPlural = msAbs >= n * 1.5;
166
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
29
+ var ms;
30
+ var hasRequiredMs;
31
+
32
+ function requireMs () {
33
+ if (hasRequiredMs) return ms;
34
+ hasRequiredMs = 1;
35
+ function _type_of(obj) {
36
+ "@swc/helpers - typeof";
37
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
38
+ }
39
+ var s = 1000;
40
+ var m = s * 60;
41
+ var h = m * 60;
42
+ var d = h * 24;
43
+ var w = d * 7;
44
+ var y = d * 365.25;
45
+ /**
46
+ * Parse or format the given `val`.
47
+ *
48
+ * Options:
49
+ *
50
+ * - `long` verbose formatting [false]
51
+ *
52
+ * @param {String|Number} val
53
+ * @param {Object} [options]
54
+ * @throws {Error} throw an error if val is not a non-empty string or a number
55
+ * @return {String|Number}
56
+ * @api public
57
+ */ ms = function(val, options) {
58
+ options = options || {};
59
+ var type = typeof val === "undefined" ? "undefined" : _type_of(val);
60
+ if (type === 'string' && val.length > 0) {
61
+ return parse(val);
62
+ } else if (type === 'number' && isFinite(val)) {
63
+ return options.long ? fmtLong(val) : fmtShort(val);
64
+ }
65
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
66
+ };
67
+ /**
68
+ * Parse the given `str` and return milliseconds.
69
+ *
70
+ * @param {String} str
71
+ * @return {Number}
72
+ * @api private
73
+ */ function parse(str) {
74
+ str = String(str);
75
+ if (str.length > 100) {
76
+ return;
77
+ }
78
+ 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(str);
79
+ if (!match) {
80
+ return;
81
+ }
82
+ var n = parseFloat(match[1]);
83
+ var type = (match[2] || 'ms').toLowerCase();
84
+ switch(type){
85
+ case 'years':
86
+ case 'year':
87
+ case 'yrs':
88
+ case 'yr':
89
+ case 'y':
90
+ return n * y;
91
+ case 'weeks':
92
+ case 'week':
93
+ case 'w':
94
+ return n * w;
95
+ case 'days':
96
+ case 'day':
97
+ case 'd':
98
+ return n * d;
99
+ case 'hours':
100
+ case 'hour':
101
+ case 'hrs':
102
+ case 'hr':
103
+ case 'h':
104
+ return n * h;
105
+ case 'minutes':
106
+ case 'minute':
107
+ case 'mins':
108
+ case 'min':
109
+ case 'm':
110
+ return n * m;
111
+ case 'seconds':
112
+ case 'second':
113
+ case 'secs':
114
+ case 'sec':
115
+ case 's':
116
+ return n * s;
117
+ case 'milliseconds':
118
+ case 'millisecond':
119
+ case 'msecs':
120
+ case 'msec':
121
+ case 'ms':
122
+ return n;
123
+ default:
124
+ return undefined;
125
+ }
126
+ }
127
+ /**
128
+ * Short format for `ms`.
129
+ *
130
+ * @param {Number} ms
131
+ * @return {String}
132
+ * @api private
133
+ */ function fmtShort(ms) {
134
+ var msAbs = Math.abs(ms);
135
+ if (msAbs >= d) {
136
+ return Math.round(ms / d) + 'd';
137
+ }
138
+ if (msAbs >= h) {
139
+ return Math.round(ms / h) + 'h';
140
+ }
141
+ if (msAbs >= m) {
142
+ return Math.round(ms / m) + 'm';
143
+ }
144
+ if (msAbs >= s) {
145
+ return Math.round(ms / s) + 's';
146
+ }
147
+ return ms + 'ms';
148
+ }
149
+ /**
150
+ * Long format for `ms`.
151
+ *
152
+ * @param {Number} ms
153
+ * @return {String}
154
+ * @api private
155
+ */ function fmtLong(ms) {
156
+ var msAbs = Math.abs(ms);
157
+ if (msAbs >= d) {
158
+ return plural(ms, msAbs, d, 'day');
159
+ }
160
+ if (msAbs >= h) {
161
+ return plural(ms, msAbs, h, 'hour');
162
+ }
163
+ if (msAbs >= m) {
164
+ return plural(ms, msAbs, m, 'minute');
165
+ }
166
+ if (msAbs >= s) {
167
+ return plural(ms, msAbs, s, 'second');
168
+ }
169
+ return ms + ' ms';
170
+ }
171
+ /**
172
+ * Pluralization helper.
173
+ */ function plural(ms, msAbs, n, name) {
174
+ var isPlural = msAbs >= n * 1.5;
175
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
176
+ }
177
+ return ms;
167
178
  }
168
179
 
169
180
  /**
@@ -171,1006 +182,942 @@ var y = d * 365.25;
171
182
  * implementations of `debug()`.
172
183
  */
173
184
 
174
- function _array_like_to_array$1(arr, len) {
175
- if (len == null || len > arr.length) len = arr.length;
176
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
177
- return arr2;
178
- }
179
- function _array_without_holes$1(arr) {
180
- if (Array.isArray(arr)) return _array_like_to_array$1(arr);
181
- }
182
- function _instanceof$1(left, right) {
183
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
184
- return !!right[Symbol.hasInstance](left);
185
- } else {
186
- return left instanceof right;
187
- }
188
- }
189
- function _iterable_to_array$1(iter) {
190
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
191
- }
192
- function _non_iterable_spread$1() {
193
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
194
- }
195
- function _to_consumable_array$1(arr) {
196
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
197
- }
198
- function _unsupported_iterable_to_array$1(o, minLen) {
199
- if (!o) return;
200
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
201
- var n = Object.prototype.toString.call(o).slice(8, -1);
202
- if (n === "Object" && o.constructor) n = o.constructor.name;
203
- if (n === "Map" || n === "Set") return Array.from(n);
204
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
205
- }
206
- function setup(env) {
207
- createDebug.debug = createDebug;
208
- createDebug.default = createDebug;
209
- createDebug.coerce = coerce;
210
- createDebug.disable = disable;
211
- createDebug.enable = enable;
212
- createDebug.enabled = enabled;
213
- createDebug.humanize = ms;
214
- createDebug.destroy = destroy;
215
- Object.keys(env).forEach(function(key) {
216
- createDebug[key] = env[key];
217
- });
218
- /**
219
- * The currently active debug mode names, and names to skip.
220
- */ createDebug.names = [];
221
- createDebug.skips = [];
222
- /**
223
- * Map of special "%n" handling functions, for the debug "format" argument.
224
- *
225
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
226
- */ createDebug.formatters = {};
227
- /**
228
- * Selects a color for a debug namespace
229
- * @param {String} namespace The namespace string for the debug instance to be colored
230
- * @return {Number|String} An ANSI color code for the given namespace
231
- * @api private
232
- */ function selectColor(namespace) {
233
- var hash = 0;
234
- for(var i = 0; i < namespace.length; i++){
235
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
236
- hash |= 0; // Convert to 32bit integer
237
- }
238
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
239
- }
240
- createDebug.selectColor = selectColor;
241
- /**
242
- * Create a debugger with the given `namespace`.
243
- *
244
- * @param {String} namespace
245
- * @return {Function}
246
- * @api public
247
- */ function createDebug(namespace) {
248
- var prevTime;
249
- var enableOverride = null;
250
- var namespacesCache;
251
- var enabledCache;
252
- function debug() {
253
- for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
254
- args[_key] = arguments[_key];
255
- }
256
- // Disabled?
257
- if (!debug.enabled) {
258
- return;
259
- }
260
- var self = debug;
261
- // Set `diff` timestamp
262
- var curr = Number(new Date());
263
- var ms = curr - (prevTime || curr);
264
- self.diff = ms;
265
- self.prev = prevTime;
266
- self.curr = curr;
267
- prevTime = curr;
268
- args[0] = createDebug.coerce(args[0]);
269
- if (typeof args[0] !== "string") {
270
- // Anything else let's inspect with %O
271
- args.unshift("%O");
272
- }
273
- // Apply any `formatters` transformations
274
- var index = 0;
275
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
276
- // If we encounter an escaped % then don't increase the array index
277
- if (match === "%%") {
278
- return "%";
279
- }
280
- index++;
281
- var formatter = createDebug.formatters[format];
282
- if (typeof formatter === "function") {
283
- var val = args[index];
284
- match = formatter.call(self, val);
285
- // Now we need to remove `args[index]` since it's inlined in the `format`
286
- args.splice(index, 1);
287
- index--;
288
- }
289
- return match;
290
- });
291
- // Apply env-specific formatting (colors, etc.)
292
- createDebug.formatArgs.call(self, args);
293
- var logFn = self.log || createDebug.log;
294
- logFn.apply(self, args);
295
- }
296
- debug.namespace = namespace;
297
- debug.useColors = createDebug.useColors();
298
- debug.color = createDebug.selectColor(namespace);
299
- debug.extend = extend;
300
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
301
- Object.defineProperty(debug, "enabled", {
302
- enumerable: true,
303
- configurable: false,
304
- get: function() {
305
- if (enableOverride !== null) {
306
- return enableOverride;
307
- }
308
- if (namespacesCache !== createDebug.namespaces) {
309
- namespacesCache = createDebug.namespaces;
310
- enabledCache = createDebug.enabled(namespace);
311
- }
312
- return enabledCache;
313
- },
314
- set: function(v) {
315
- enableOverride = v;
316
- }
317
- });
318
- // Env-specific initialization logic for debug instances
319
- if (typeof createDebug.init === "function") {
320
- createDebug.init(debug);
321
- }
322
- return debug;
323
- }
324
- function extend(namespace, delimiter) {
325
- var newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
326
- newDebug.log = this.log;
327
- return newDebug;
328
- }
329
- /**
330
- * Enables a debug mode by namespaces. This can include modes
331
- * separated by a colon and wildcards.
332
- *
333
- * @param {String} namespaces
334
- * @api public
335
- */ function enable(namespaces) {
336
- createDebug.save(namespaces);
337
- createDebug.namespaces = namespaces;
338
- createDebug.names = [];
339
- createDebug.skips = [];
340
- var split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
341
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
342
- try {
343
- for(var _iterator = split[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
344
- var ns = _step.value;
345
- if (ns[0] === "-") {
346
- createDebug.skips.push(ns.slice(1));
347
- } else {
348
- createDebug.names.push(ns);
349
- }
350
- }
351
- } catch (err) {
352
- _didIteratorError = true;
353
- _iteratorError = err;
354
- } finally{
355
- try {
356
- if (!_iteratorNormalCompletion && _iterator.return != null) {
357
- _iterator.return();
358
- }
359
- } finally{
360
- if (_didIteratorError) {
361
- throw _iteratorError;
362
- }
363
- }
364
- }
365
- }
366
- /**
367
- * Checks if the given string matches a namespace template, honoring
368
- * asterisks as wildcards.
369
- *
370
- * @param {String} search
371
- * @param {String} template
372
- * @return {Boolean}
373
- */ function matchesTemplate(search, template) {
374
- var searchIndex = 0;
375
- var templateIndex = 0;
376
- var starIndex = -1;
377
- var matchIndex = 0;
378
- while(searchIndex < search.length){
379
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
380
- // Match character or proceed with wildcard
381
- if (template[templateIndex] === "*") {
382
- starIndex = templateIndex;
383
- matchIndex = searchIndex;
384
- templateIndex++; // Skip the '*'
385
- } else {
386
- searchIndex++;
387
- templateIndex++;
388
- }
389
- } else if (starIndex !== -1) {
390
- // Backtrack to the last '*' and try to match more characters
391
- templateIndex = starIndex + 1;
392
- matchIndex++;
393
- searchIndex = matchIndex;
394
- } else {
395
- return false; // No match
396
- }
397
- }
398
- // Handle trailing '*' in template
399
- while(templateIndex < template.length && template[templateIndex] === "*"){
400
- templateIndex++;
401
- }
402
- return templateIndex === template.length;
403
- }
404
- /**
405
- * Disable debug output.
406
- *
407
- * @return {String} namespaces
408
- * @api public
409
- */ function disable() {
410
- var namespaces = _to_consumable_array$1(createDebug.names).concat(_to_consumable_array$1(createDebug.skips.map(function(namespace) {
411
- return "-" + namespace;
412
- }))).join(",");
413
- createDebug.enable("");
414
- return namespaces;
415
- }
416
- /**
417
- * Returns true if the given mode name is enabled, false otherwise.
418
- *
419
- * @param {String} name
420
- * @return {Boolean}
421
- * @api public
422
- */ function enabled(name) {
423
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
424
- try {
425
- for(var _iterator = createDebug.skips[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
426
- var skip = _step.value;
427
- if (matchesTemplate(name, skip)) {
428
- return false;
429
- }
430
- }
431
- } catch (err) {
432
- _didIteratorError = true;
433
- _iteratorError = err;
434
- } finally{
435
- try {
436
- if (!_iteratorNormalCompletion && _iterator.return != null) {
437
- _iterator.return();
438
- }
439
- } finally{
440
- if (_didIteratorError) {
441
- throw _iteratorError;
442
- }
443
- }
444
- }
445
- var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
446
- try {
447
- for(var _iterator1 = createDebug.names[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
448
- var ns = _step1.value;
449
- if (matchesTemplate(name, ns)) {
450
- return true;
451
- }
452
- }
453
- } catch (err) {
454
- _didIteratorError1 = true;
455
- _iteratorError1 = err;
456
- } finally{
457
- try {
458
- if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
459
- _iterator1.return();
460
- }
461
- } finally{
462
- if (_didIteratorError1) {
463
- throw _iteratorError1;
464
- }
465
- }
466
- }
467
- return false;
468
- }
469
- /**
470
- * Coerce `val`.
471
- *
472
- * @param {Mixed} val
473
- * @return {Mixed}
474
- * @api private
475
- */ function coerce(val) {
476
- if (_instanceof$1(val, Error)) {
477
- return val.stack || val.message;
478
- }
479
- return val;
480
- }
481
- /**
482
- * XXX DO NOT USE. This is a temporary stub function.
483
- * XXX It WILL be removed in the next major release.
484
- */ function destroy() {
485
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
486
- }
487
- createDebug.enable(createDebug.load());
488
- return createDebug;
185
+ var common;
186
+ var hasRequiredCommon;
187
+
188
+ function requireCommon () {
189
+ if (hasRequiredCommon) return common;
190
+ hasRequiredCommon = 1;
191
+ function _array_like_to_array(arr, len) {
192
+ if (len == null || len > arr.length) len = arr.length;
193
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
194
+ return arr2;
195
+ }
196
+ function _array_without_holes(arr) {
197
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
198
+ }
199
+ function _instanceof(left, right) {
200
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
201
+ return !!right[Symbol.hasInstance](left);
202
+ } else {
203
+ return left instanceof right;
204
+ }
205
+ }
206
+ function _iterable_to_array(iter) {
207
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
208
+ }
209
+ function _non_iterable_spread() {
210
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
211
+ }
212
+ function _to_consumable_array(arr) {
213
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
214
+ }
215
+ function _unsupported_iterable_to_array(o, minLen) {
216
+ if (!o) return;
217
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
218
+ var n = Object.prototype.toString.call(o).slice(8, -1);
219
+ if (n === "Object" && o.constructor) n = o.constructor.name;
220
+ if (n === "Map" || n === "Set") return Array.from(n);
221
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
222
+ }
223
+ function setup(env) {
224
+ createDebug.debug = createDebug;
225
+ createDebug.default = createDebug;
226
+ createDebug.coerce = coerce;
227
+ createDebug.disable = disable;
228
+ createDebug.enable = enable;
229
+ createDebug.enabled = enabled;
230
+ createDebug.humanize = requireMs();
231
+ createDebug.destroy = destroy;
232
+ Object.keys(env).forEach(function(key) {
233
+ createDebug[key] = env[key];
234
+ });
235
+ /**
236
+ * The currently active debug mode names, and names to skip.
237
+ */ createDebug.names = [];
238
+ createDebug.skips = [];
239
+ /**
240
+ * Map of special "%n" handling functions, for the debug "format" argument.
241
+ *
242
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
243
+ */ createDebug.formatters = {};
244
+ /**
245
+ * Selects a color for a debug namespace
246
+ * @param {String} namespace The namespace string for the debug instance to be colored
247
+ * @return {Number|String} An ANSI color code for the given namespace
248
+ * @api private
249
+ */ function selectColor(namespace) {
250
+ var hash = 0;
251
+ for(var i = 0; i < namespace.length; i++){
252
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
253
+ hash |= 0; // Convert to 32bit integer
254
+ }
255
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
256
+ }
257
+ createDebug.selectColor = selectColor;
258
+ /**
259
+ * Create a debugger with the given `namespace`.
260
+ *
261
+ * @param {String} namespace
262
+ * @return {Function}
263
+ * @api public
264
+ */ function createDebug(namespace) {
265
+ var prevTime;
266
+ var enableOverride = null;
267
+ var namespacesCache;
268
+ var enabledCache;
269
+ function debug() {
270
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
271
+ args[_key] = arguments[_key];
272
+ }
273
+ // Disabled?
274
+ if (!debug.enabled) {
275
+ return;
276
+ }
277
+ var self = debug;
278
+ // Set `diff` timestamp
279
+ var curr = Number(new Date());
280
+ var ms = curr - (prevTime || curr);
281
+ self.diff = ms;
282
+ self.prev = prevTime;
283
+ self.curr = curr;
284
+ prevTime = curr;
285
+ args[0] = createDebug.coerce(args[0]);
286
+ if (typeof args[0] !== 'string') {
287
+ // Anything else let's inspect with %O
288
+ args.unshift('%O');
289
+ }
290
+ // Apply any `formatters` transformations
291
+ var index = 0;
292
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
293
+ // If we encounter an escaped % then don't increase the array index
294
+ if (match === '%%') {
295
+ return '%';
296
+ }
297
+ index++;
298
+ var formatter = createDebug.formatters[format];
299
+ if (typeof formatter === 'function') {
300
+ var val = args[index];
301
+ match = formatter.call(self, val);
302
+ // Now we need to remove `args[index]` since it's inlined in the `format`
303
+ args.splice(index, 1);
304
+ index--;
305
+ }
306
+ return match;
307
+ });
308
+ // Apply env-specific formatting (colors, etc.)
309
+ createDebug.formatArgs.call(self, args);
310
+ var logFn = self.log || createDebug.log;
311
+ logFn.apply(self, args);
312
+ }
313
+ debug.namespace = namespace;
314
+ debug.useColors = createDebug.useColors();
315
+ debug.color = createDebug.selectColor(namespace);
316
+ debug.extend = extend;
317
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
318
+ Object.defineProperty(debug, 'enabled', {
319
+ enumerable: true,
320
+ configurable: false,
321
+ get: function() {
322
+ if (enableOverride !== null) {
323
+ return enableOverride;
324
+ }
325
+ if (namespacesCache !== createDebug.namespaces) {
326
+ namespacesCache = createDebug.namespaces;
327
+ enabledCache = createDebug.enabled(namespace);
328
+ }
329
+ return enabledCache;
330
+ },
331
+ set: function(v) {
332
+ enableOverride = v;
333
+ }
334
+ });
335
+ // Env-specific initialization logic for debug instances
336
+ if (typeof createDebug.init === 'function') {
337
+ createDebug.init(debug);
338
+ }
339
+ return debug;
340
+ }
341
+ function extend(namespace, delimiter) {
342
+ var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
343
+ newDebug.log = this.log;
344
+ return newDebug;
345
+ }
346
+ /**
347
+ * Enables a debug mode by namespaces. This can include modes
348
+ * separated by a colon and wildcards.
349
+ *
350
+ * @param {String} namespaces
351
+ * @api public
352
+ */ function enable(namespaces) {
353
+ createDebug.save(namespaces);
354
+ createDebug.namespaces = namespaces;
355
+ createDebug.names = [];
356
+ createDebug.skips = [];
357
+ var split = (typeof namespaces === 'string' ? namespaces : '').trim().replace(/\s+/g, ',').split(',').filter(Boolean);
358
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
359
+ try {
360
+ for(var _iterator = split[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
361
+ var ns = _step.value;
362
+ if (ns[0] === '-') {
363
+ createDebug.skips.push(ns.slice(1));
364
+ } else {
365
+ createDebug.names.push(ns);
366
+ }
367
+ }
368
+ } catch (err) {
369
+ _didIteratorError = true;
370
+ _iteratorError = err;
371
+ } finally{
372
+ try {
373
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
374
+ _iterator.return();
375
+ }
376
+ } finally{
377
+ if (_didIteratorError) {
378
+ throw _iteratorError;
379
+ }
380
+ }
381
+ }
382
+ }
383
+ /**
384
+ * Checks if the given string matches a namespace template, honoring
385
+ * asterisks as wildcards.
386
+ *
387
+ * @param {String} search
388
+ * @param {String} template
389
+ * @return {Boolean}
390
+ */ function matchesTemplate(search, template) {
391
+ var searchIndex = 0;
392
+ var templateIndex = 0;
393
+ var starIndex = -1;
394
+ var matchIndex = 0;
395
+ while(searchIndex < search.length){
396
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
397
+ // Match character or proceed with wildcard
398
+ if (template[templateIndex] === '*') {
399
+ starIndex = templateIndex;
400
+ matchIndex = searchIndex;
401
+ templateIndex++; // Skip the '*'
402
+ } else {
403
+ searchIndex++;
404
+ templateIndex++;
405
+ }
406
+ } else if (starIndex !== -1) {
407
+ // Backtrack to the last '*' and try to match more characters
408
+ templateIndex = starIndex + 1;
409
+ matchIndex++;
410
+ searchIndex = matchIndex;
411
+ } else {
412
+ return false; // No match
413
+ }
414
+ }
415
+ // Handle trailing '*' in template
416
+ while(templateIndex < template.length && template[templateIndex] === '*'){
417
+ templateIndex++;
418
+ }
419
+ return templateIndex === template.length;
420
+ }
421
+ /**
422
+ * Disable debug output.
423
+ *
424
+ * @return {String} namespaces
425
+ * @api public
426
+ */ function disable() {
427
+ var namespaces = _to_consumable_array(createDebug.names).concat(_to_consumable_array(createDebug.skips.map(function(namespace) {
428
+ return '-' + namespace;
429
+ }))).join(',');
430
+ createDebug.enable('');
431
+ return namespaces;
432
+ }
433
+ /**
434
+ * Returns true if the given mode name is enabled, false otherwise.
435
+ *
436
+ * @param {String} name
437
+ * @return {Boolean}
438
+ * @api public
439
+ */ function enabled(name) {
440
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
441
+ try {
442
+ for(var _iterator = createDebug.skips[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
443
+ var skip = _step.value;
444
+ if (matchesTemplate(name, skip)) {
445
+ return false;
446
+ }
447
+ }
448
+ } catch (err) {
449
+ _didIteratorError = true;
450
+ _iteratorError = err;
451
+ } finally{
452
+ try {
453
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
454
+ _iterator.return();
455
+ }
456
+ } finally{
457
+ if (_didIteratorError) {
458
+ throw _iteratorError;
459
+ }
460
+ }
461
+ }
462
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
463
+ try {
464
+ for(var _iterator1 = createDebug.names[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
465
+ var ns = _step1.value;
466
+ if (matchesTemplate(name, ns)) {
467
+ return true;
468
+ }
469
+ }
470
+ } catch (err) {
471
+ _didIteratorError1 = true;
472
+ _iteratorError1 = err;
473
+ } finally{
474
+ try {
475
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
476
+ _iterator1.return();
477
+ }
478
+ } finally{
479
+ if (_didIteratorError1) {
480
+ throw _iteratorError1;
481
+ }
482
+ }
483
+ }
484
+ return false;
485
+ }
486
+ /**
487
+ * Coerce `val`.
488
+ *
489
+ * @param {Mixed} val
490
+ * @return {Mixed}
491
+ * @api private
492
+ */ function coerce(val) {
493
+ if (_instanceof(val, Error)) {
494
+ return val.stack || val.message;
495
+ }
496
+ return val;
497
+ }
498
+ /**
499
+ * XXX DO NOT USE. This is a temporary stub function.
500
+ * XXX It WILL be removed in the next major release.
501
+ */ function destroy() {
502
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
503
+ }
504
+ createDebug.enable(createDebug.load());
505
+ return createDebug;
506
+ }
507
+ common = setup;
508
+ return common;
489
509
  }
490
- var common = setup;
491
510
 
492
511
  /* eslint-env browser */
493
512
 
494
- (function (module, exports) {
495
- /**
496
- * This is the web browser implementation of `debug()`.
497
- */ exports.formatArgs = formatArgs;
498
- exports.save = save;
499
- exports.load = load;
500
- exports.useColors = useColors;
501
- exports.storage = localstorage();
502
- exports.destroy = function() {
503
- var warned = false;
504
- return function() {
505
- if (!warned) {
506
- warned = true;
507
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
508
- }
509
- };
510
- }();
511
- /**
512
- * Colors.
513
- */ exports.colors = [
514
- "#0000CC",
515
- "#0000FF",
516
- "#0033CC",
517
- "#0033FF",
518
- "#0066CC",
519
- "#0066FF",
520
- "#0099CC",
521
- "#0099FF",
522
- "#00CC00",
523
- "#00CC33",
524
- "#00CC66",
525
- "#00CC99",
526
- "#00CCCC",
527
- "#00CCFF",
528
- "#3300CC",
529
- "#3300FF",
530
- "#3333CC",
531
- "#3333FF",
532
- "#3366CC",
533
- "#3366FF",
534
- "#3399CC",
535
- "#3399FF",
536
- "#33CC00",
537
- "#33CC33",
538
- "#33CC66",
539
- "#33CC99",
540
- "#33CCCC",
541
- "#33CCFF",
542
- "#6600CC",
543
- "#6600FF",
544
- "#6633CC",
545
- "#6633FF",
546
- "#66CC00",
547
- "#66CC33",
548
- "#9900CC",
549
- "#9900FF",
550
- "#9933CC",
551
- "#9933FF",
552
- "#99CC00",
553
- "#99CC33",
554
- "#CC0000",
555
- "#CC0033",
556
- "#CC0066",
557
- "#CC0099",
558
- "#CC00CC",
559
- "#CC00FF",
560
- "#CC3300",
561
- "#CC3333",
562
- "#CC3366",
563
- "#CC3399",
564
- "#CC33CC",
565
- "#CC33FF",
566
- "#CC6600",
567
- "#CC6633",
568
- "#CC9900",
569
- "#CC9933",
570
- "#CCCC00",
571
- "#CCCC33",
572
- "#FF0000",
573
- "#FF0033",
574
- "#FF0066",
575
- "#FF0099",
576
- "#FF00CC",
577
- "#FF00FF",
578
- "#FF3300",
579
- "#FF3333",
580
- "#FF3366",
581
- "#FF3399",
582
- "#FF33CC",
583
- "#FF33FF",
584
- "#FF6600",
585
- "#FF6633",
586
- "#FF9900",
587
- "#FF9933",
588
- "#FFCC00",
589
- "#FFCC33"
590
- ];
591
- /**
592
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
593
- * and the Firebug extension (any Firefox version) are known
594
- * to support "%c" CSS customizations.
595
- *
596
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
597
- */ // eslint-disable-next-line complexity
598
- function useColors() {
599
- // NB: In an Electron preload script, document will be defined but not fully
600
- // initialized. Since we know we're in Chrome, we'll just detect this case
601
- // explicitly
602
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
603
- return true;
604
- }
605
- // Internet Explorer and Edge do not support colors.
606
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
607
- return false;
608
- }
609
- var m;
610
- // Is webkit? http://stackoverflow.com/a/16459606/376773
611
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
612
- // eslint-disable-next-line no-return-assign
613
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
614
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
615
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
616
- typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
617
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
618
- }
619
- /**
620
- * Colorize log arguments if enabled.
621
- *
622
- * @api public
623
- */ function formatArgs(args) {
624
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
625
- if (!this.useColors) {
626
- return;
627
- }
628
- var c = "color: " + this.color;
629
- args.splice(1, 0, c, "color: inherit");
630
- // The final "%c" is somewhat tricky, because there could be other
631
- // arguments passed either before or after the %c, so we need to
632
- // figure out the correct index to insert the CSS into
633
- var index = 0;
634
- var lastC = 0;
635
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
636
- if (match === "%%") {
637
- return;
638
- }
639
- index++;
640
- if (match === "%c") {
641
- // We only are interested in the *last* %c
642
- // (the user may have provided their own)
643
- lastC = index;
644
- }
645
- });
646
- args.splice(lastC, 0, c);
647
- }
648
- /**
649
- * Invokes `console.debug()` when available.
650
- * No-op when `console.debug` is not a "function".
651
- * If `console.debug` is not available, falls back
652
- * to `console.log`.
653
- *
654
- * @api public
655
- */ exports.log = console.debug || console.log || function() {};
656
- /**
657
- * Save `namespaces`.
658
- *
659
- * @param {String} namespaces
660
- * @api private
661
- */ function save(namespaces) {
662
- try {
663
- if (namespaces) {
664
- exports.storage.setItem("debug", namespaces);
665
- } else {
666
- exports.storage.removeItem("debug");
667
- }
668
- } catch (error) {
669
- // Swallow
670
- // XXX (@Qix-) should we be logging these?
671
- }
672
- }
673
- /**
674
- * Load `namespaces`.
675
- *
676
- * @return {String} returns the previously persisted debug modes
677
- * @api private
678
- */ function load() {
679
- var r;
680
- try {
681
- r = exports.storage.getItem("debug");
682
- } catch (error) {
683
- // Swallow
684
- // XXX (@Qix-) should we be logging these?
685
- }
686
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
687
- if (!r && typeof process !== "undefined" && "env" in process) {
688
- r = process.env.DEBUG;
689
- }
690
- return r;
691
- }
692
- /**
693
- * Localstorage attempts to return the localstorage.
694
- *
695
- * This is necessary because safari throws
696
- * when a user disables cookies/localstorage
697
- * and you attempt to access it.
698
- *
699
- * @return {LocalStorage}
700
- * @api private
701
- */ function localstorage() {
702
- try {
703
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
704
- // The Browser also has localStorage in the global context.
705
- return localStorage;
706
- } catch (error) {
707
- // Swallow
708
- // XXX (@Qix-) should we be logging these?
709
- }
513
+ var hasRequiredBrowser$1;
514
+
515
+ function requireBrowser$1 () {
516
+ if (hasRequiredBrowser$1) return browser$1.exports;
517
+ hasRequiredBrowser$1 = 1;
518
+ (function (module, exports) {
519
+ /**
520
+ * This is the web browser implementation of `debug()`.
521
+ */ exports.formatArgs = formatArgs;
522
+ exports.save = save;
523
+ exports.load = load;
524
+ exports.useColors = useColors;
525
+ exports.storage = localstorage();
526
+ exports.destroy = function() {
527
+ var warned = false;
528
+ return function() {
529
+ if (!warned) {
530
+ warned = true;
531
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
532
+ }
533
+ };
534
+ }();
535
+ /**
536
+ * Colors.
537
+ */ exports.colors = [
538
+ '#0000CC',
539
+ '#0000FF',
540
+ '#0033CC',
541
+ '#0033FF',
542
+ '#0066CC',
543
+ '#0066FF',
544
+ '#0099CC',
545
+ '#0099FF',
546
+ '#00CC00',
547
+ '#00CC33',
548
+ '#00CC66',
549
+ '#00CC99',
550
+ '#00CCCC',
551
+ '#00CCFF',
552
+ '#3300CC',
553
+ '#3300FF',
554
+ '#3333CC',
555
+ '#3333FF',
556
+ '#3366CC',
557
+ '#3366FF',
558
+ '#3399CC',
559
+ '#3399FF',
560
+ '#33CC00',
561
+ '#33CC33',
562
+ '#33CC66',
563
+ '#33CC99',
564
+ '#33CCCC',
565
+ '#33CCFF',
566
+ '#6600CC',
567
+ '#6600FF',
568
+ '#6633CC',
569
+ '#6633FF',
570
+ '#66CC00',
571
+ '#66CC33',
572
+ '#9900CC',
573
+ '#9900FF',
574
+ '#9933CC',
575
+ '#9933FF',
576
+ '#99CC00',
577
+ '#99CC33',
578
+ '#CC0000',
579
+ '#CC0033',
580
+ '#CC0066',
581
+ '#CC0099',
582
+ '#CC00CC',
583
+ '#CC00FF',
584
+ '#CC3300',
585
+ '#CC3333',
586
+ '#CC3366',
587
+ '#CC3399',
588
+ '#CC33CC',
589
+ '#CC33FF',
590
+ '#CC6600',
591
+ '#CC6633',
592
+ '#CC9900',
593
+ '#CC9933',
594
+ '#CCCC00',
595
+ '#CCCC33',
596
+ '#FF0000',
597
+ '#FF0033',
598
+ '#FF0066',
599
+ '#FF0099',
600
+ '#FF00CC',
601
+ '#FF00FF',
602
+ '#FF3300',
603
+ '#FF3333',
604
+ '#FF3366',
605
+ '#FF3399',
606
+ '#FF33CC',
607
+ '#FF33FF',
608
+ '#FF6600',
609
+ '#FF6633',
610
+ '#FF9900',
611
+ '#FF9933',
612
+ '#FFCC00',
613
+ '#FFCC33'
614
+ ];
615
+ /**
616
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
617
+ * and the Firebug extension (any Firefox version) are known
618
+ * to support "%c" CSS customizations.
619
+ *
620
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
621
+ */ // eslint-disable-next-line complexity
622
+ function useColors() {
623
+ // NB: In an Electron preload script, document will be defined but not fully
624
+ // initialized. Since we know we're in Chrome, we'll just detect this case
625
+ // explicitly
626
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
627
+ return true;
628
+ }
629
+ // Internet Explorer and Edge do not support colors.
630
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
631
+ return false;
632
+ }
633
+ var m;
634
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
635
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
636
+ // eslint-disable-next-line no-return-assign
637
+ return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
638
+ typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
639
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
640
+ typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
641
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
642
+ }
643
+ /**
644
+ * Colorize log arguments if enabled.
645
+ *
646
+ * @api public
647
+ */ function formatArgs(args) {
648
+ args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
649
+ if (!this.useColors) {
650
+ return;
651
+ }
652
+ var c = 'color: ' + this.color;
653
+ args.splice(1, 0, c, 'color: inherit');
654
+ // The final "%c" is somewhat tricky, because there could be other
655
+ // arguments passed either before or after the %c, so we need to
656
+ // figure out the correct index to insert the CSS into
657
+ var index = 0;
658
+ var lastC = 0;
659
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
660
+ if (match === '%%') {
661
+ return;
662
+ }
663
+ index++;
664
+ if (match === '%c') {
665
+ // We only are interested in the *last* %c
666
+ // (the user may have provided their own)
667
+ lastC = index;
668
+ }
669
+ });
670
+ args.splice(lastC, 0, c);
671
+ }
672
+ /**
673
+ * Invokes `console.debug()` when available.
674
+ * No-op when `console.debug` is not a "function".
675
+ * If `console.debug` is not available, falls back
676
+ * to `console.log`.
677
+ *
678
+ * @api public
679
+ */ exports.log = console.debug || console.log || function() {};
680
+ /**
681
+ * Save `namespaces`.
682
+ *
683
+ * @param {String} namespaces
684
+ * @api private
685
+ */ function save(namespaces) {
686
+ try {
687
+ if (namespaces) {
688
+ exports.storage.setItem('debug', namespaces);
689
+ } else {
690
+ exports.storage.removeItem('debug');
691
+ }
692
+ } catch (error) {
693
+ // Swallow
694
+ // XXX (@Qix-) should we be logging these?
695
+ }
696
+ }
697
+ /**
698
+ * Load `namespaces`.
699
+ *
700
+ * @return {String} returns the previously persisted debug modes
701
+ * @api private
702
+ */ function load() {
703
+ var r;
704
+ try {
705
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG');
706
+ } catch (error) {
707
+ // Swallow
708
+ // XXX (@Qix-) should we be logging these?
709
+ }
710
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
711
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
712
+ r = process.env.DEBUG;
713
+ }
714
+ return r;
715
+ }
716
+ /**
717
+ * Localstorage attempts to return the localstorage.
718
+ *
719
+ * This is necessary because safari throws
720
+ * when a user disables cookies/localstorage
721
+ * and you attempt to access it.
722
+ *
723
+ * @return {LocalStorage}
724
+ * @api private
725
+ */ function localstorage() {
726
+ try {
727
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
728
+ // The Browser also has localStorage in the global context.
729
+ return localStorage;
730
+ } catch (error) {
731
+ // Swallow
732
+ // XXX (@Qix-) should we be logging these?
733
+ }
734
+ }
735
+ module.exports = requireCommon()(exports);
736
+ var formatters = module.exports.formatters;
737
+ /**
738
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
739
+ */ formatters.j = function(v) {
740
+ try {
741
+ return JSON.stringify(v);
742
+ } catch (error) {
743
+ return '[UnexpectedJSONParseError]: ' + error.message;
744
+ }
745
+ };
746
+ } (browser$1, browser$1.exports));
747
+ return browser$1.exports;
710
748
  }
711
- module.exports = common(exports);
712
- var formatters = module.exports.formatters;
713
- /**
714
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
715
- */ formatters.j = function(v) {
716
- try {
717
- return JSON.stringify(v);
718
- } catch (error) {
719
- return "[UnexpectedJSONParseError]: " + error.message;
720
- }
721
- };
722
- }(browser, browser.exports));
723
749
 
724
750
  var node = {
725
751
  exports: {}
726
752
  };
727
753
 
728
- var hasFlag$1 = function(flag) {
729
- var argv = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.argv;
730
- var prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
731
- var position = argv.indexOf(prefix + flag);
732
- var terminatorPosition = argv.indexOf("--");
733
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
734
- };
754
+ /* eslint-env browser */
735
755
 
736
- var os = require$$0;
737
- var tty = require$$1;
738
- var hasFlag = hasFlag$1;
739
- var env = process.env;
740
- var forceColor;
741
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
742
- forceColor = 0;
743
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
744
- forceColor = 1;
745
- }
746
- if ("FORCE_COLOR" in env) {
747
- if (env.FORCE_COLOR === "true") {
748
- forceColor = 1;
749
- } else if (env.FORCE_COLOR === "false") {
750
- forceColor = 0;
751
- } else {
752
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
753
- }
754
- }
755
- function translateLevel(level) {
756
- if (level === 0) {
757
- return false;
758
- }
759
- return {
760
- level: level,
761
- hasBasic: true,
762
- has256: level >= 2,
763
- has16m: level >= 3
764
- };
765
- }
766
- function supportsColor(haveStream, streamIsTTY) {
767
- if (forceColor === 0) {
768
- return 0;
769
- }
770
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
771
- return 3;
772
- }
773
- if (hasFlag("color=256")) {
774
- return 2;
775
- }
776
- if (haveStream && !streamIsTTY && forceColor === undefined) {
777
- return 0;
778
- }
779
- var min = forceColor || 0;
780
- if (env.TERM === "dumb") {
781
- return min;
782
- }
783
- if (process.platform === "win32") {
784
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
785
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
786
- var osRelease = os.release().split(".");
787
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
788
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
789
- }
790
- return 1;
791
- }
792
- if ("CI" in env) {
793
- if ([
794
- "TRAVIS",
795
- "CIRCLECI",
796
- "APPVEYOR",
797
- "GITLAB_CI",
798
- "GITHUB_ACTIONS",
799
- "BUILDKITE"
800
- ].some(function(sign) {
801
- return sign in env;
802
- }) || env.CI_NAME === "codeship") {
803
- return 1;
804
- }
805
- return min;
806
- }
807
- if ("TEAMCITY_VERSION" in env) {
808
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
809
- }
810
- if (env.COLORTERM === "truecolor") {
811
- return 3;
812
- }
813
- if ("TERM_PROGRAM" in env) {
814
- var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
815
- switch(env.TERM_PROGRAM){
816
- case "iTerm.app":
817
- return version >= 3 ? 3 : 2;
818
- case "Apple_Terminal":
819
- return 2;
820
- }
821
- }
822
- if (/-256(color)?$/i.test(env.TERM)) {
823
- return 2;
824
- }
825
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
826
- return 1;
827
- }
828
- if ("COLORTERM" in env) {
829
- return 1;
830
- }
831
- return min;
832
- }
833
- function getSupportLevel(stream) {
834
- var level = supportsColor(stream, stream && stream.isTTY);
835
- return translateLevel(level);
756
+ var browser;
757
+ var hasRequiredBrowser;
758
+
759
+ function requireBrowser () {
760
+ if (hasRequiredBrowser) return browser;
761
+ hasRequiredBrowser = 1;
762
+ function getChromeVersion() {
763
+ var matches = RegExp("(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\.").exec(navigator.userAgent);
764
+ if (!matches) {
765
+ return;
766
+ }
767
+ return Number.parseInt(matches.groups.chromeVersion, 10);
768
+ }
769
+ var colorSupport = getChromeVersion() >= 69 ? {
770
+ level: 1,
771
+ hasBasic: true,
772
+ has256: false,
773
+ has16m: false
774
+ } : false;
775
+ browser = {
776
+ stdout: colorSupport,
777
+ stderr: colorSupport
778
+ };
779
+ return browser;
836
780
  }
837
- var supportsColor_1 = {
838
- supportsColor: getSupportLevel,
839
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
840
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
841
- };
842
781
 
843
782
  /**
844
783
  * Module dependencies.
845
784
  */
846
785
 
847
- (function (module, exports) {
848
- function _array_like_to_array(arr, len) {
849
- if (len == null || len > arr.length) len = arr.length;
850
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
851
- return arr2;
852
- }
853
- function _array_without_holes(arr) {
854
- if (Array.isArray(arr)) return _array_like_to_array(arr);
855
- }
856
- function _iterable_to_array(iter) {
857
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
858
- }
859
- function _non_iterable_spread() {
860
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
861
- }
862
- function _to_consumable_array(arr) {
863
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
864
- }
865
- function _unsupported_iterable_to_array(o, minLen) {
866
- if (!o) return;
867
- if (typeof o === "string") return _array_like_to_array(o, minLen);
868
- var n = Object.prototype.toString.call(o).slice(8, -1);
869
- if (n === "Object" && o.constructor) n = o.constructor.name;
870
- if (n === "Map" || n === "Set") return Array.from(n);
871
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
872
- }
873
- var tty = require$$1;
874
- var util = require$$1$1;
875
- /**
876
- * This is the Node.js implementation of `debug()`.
877
- */ exports.init = init;
878
- exports.log = log;
879
- exports.formatArgs = formatArgs;
880
- exports.save = save;
881
- exports.load = load;
882
- exports.useColors = useColors;
883
- exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
884
- /**
885
- * Colors.
886
- */ exports.colors = [
887
- 6,
888
- 2,
889
- 3,
890
- 4,
891
- 5,
892
- 1
893
- ];
894
- try {
895
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
896
- // eslint-disable-next-line import/no-extraneous-dependencies
897
- var supportsColor = supportsColor_1;
898
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
899
- exports.colors = [
900
- 20,
901
- 21,
902
- 26,
903
- 27,
904
- 32,
905
- 33,
906
- 38,
907
- 39,
908
- 40,
909
- 41,
910
- 42,
911
- 43,
912
- 44,
913
- 45,
914
- 56,
915
- 57,
916
- 62,
917
- 63,
918
- 68,
919
- 69,
920
- 74,
921
- 75,
922
- 76,
923
- 77,
924
- 78,
925
- 79,
926
- 80,
927
- 81,
928
- 92,
929
- 93,
930
- 98,
931
- 99,
932
- 112,
933
- 113,
934
- 128,
935
- 129,
936
- 134,
937
- 135,
938
- 148,
939
- 149,
940
- 160,
941
- 161,
942
- 162,
943
- 163,
944
- 164,
945
- 165,
946
- 166,
947
- 167,
948
- 168,
949
- 169,
950
- 170,
951
- 171,
952
- 172,
953
- 173,
954
- 178,
955
- 179,
956
- 184,
957
- 185,
958
- 196,
959
- 197,
960
- 198,
961
- 199,
962
- 200,
963
- 201,
964
- 202,
965
- 203,
966
- 204,
967
- 205,
968
- 206,
969
- 207,
970
- 208,
971
- 209,
972
- 214,
973
- 215,
974
- 220,
975
- 221
976
- ];
977
- }
978
- } catch (error) {
979
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
980
- }
981
- /**
982
- * Build up the default `inspectOpts` object from the environment variables.
983
- *
984
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
985
- */ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
986
- return /^debug_/i.test(key);
987
- }).reduce(function(obj, key) {
988
- // Camel-case
989
- var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
990
- return k.toUpperCase();
991
- });
992
- // Coerce string value into JS value
993
- var val = process.env[key];
994
- if (/^(yes|on|true|enabled)$/i.test(val)) {
995
- val = true;
996
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
997
- val = false;
998
- } else if (val === "null") {
999
- val = null;
1000
- } else {
1001
- val = Number(val);
1002
- }
1003
- obj[prop] = val;
1004
- return obj;
1005
- }, {});
1006
- /**
1007
- * Is stdout a TTY? Colored output is enabled when `true`.
1008
- */ function useColors() {
1009
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
1010
- }
1011
- /**
1012
- * Adds ANSI color escape codes if enabled.
1013
- *
1014
- * @api public
1015
- */ function formatArgs(args) {
1016
- var _this = this, name = _this.namespace, _$useColors = _this.useColors;
1017
- if (_$useColors) {
1018
- var c = this.color;
1019
- var colorCode = "\x1b[3" + (c < 8 ? c : "8;5;" + c);
1020
- var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1b[0m");
1021
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
1022
- args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1b[0m");
1023
- } else {
1024
- args[0] = getDate() + name + " " + args[0];
1025
- }
1026
- }
1027
- function getDate() {
1028
- if (exports.inspectOpts.hideDate) {
1029
- return "";
1030
- }
1031
- return new Date().toISOString() + " ";
1032
- }
1033
- /**
1034
- * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
1035
- */ function log() {
1036
- for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
1037
- args[_key] = arguments[_key];
1038
- }
1039
- var _util;
1040
- return process.stderr.write((_util = util).formatWithOptions.apply(_util, [
1041
- exports.inspectOpts
1042
- ].concat(_to_consumable_array(args))) + "\n");
1043
- }
1044
- /**
1045
- * Save `namespaces`.
1046
- *
1047
- * @param {String} namespaces
1048
- * @api private
1049
- */ function save(namespaces) {
1050
- if (namespaces) {
1051
- process.env.DEBUG = namespaces;
1052
- } else {
1053
- // If you set a process.env field to null or undefined, it gets cast to the
1054
- // string 'null' or 'undefined'. Just delete instead.
1055
- delete process.env.DEBUG;
1056
- }
1057
- }
1058
- /**
1059
- * Load `namespaces`.
1060
- *
1061
- * @return {String} returns the previously persisted debug modes
1062
- * @api private
1063
- */ function load() {
1064
- return process.env.DEBUG;
1065
- }
1066
- /**
1067
- * Init logic for `debug` instances.
1068
- *
1069
- * Create a new `inspectOpts` object in case `useColors` is set
1070
- * differently for a particular `debug` instance.
1071
- */ function init(debug) {
1072
- debug.inspectOpts = {};
1073
- var keys = Object.keys(exports.inspectOpts);
1074
- for(var i = 0; i < keys.length; i++){
1075
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1076
- }
786
+ var hasRequiredNode;
787
+
788
+ function requireNode () {
789
+ if (hasRequiredNode) return node.exports;
790
+ hasRequiredNode = 1;
791
+ (function (module, exports) {
792
+ function _array_like_to_array(arr, len) {
793
+ if (len == null || len > arr.length) len = arr.length;
794
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
795
+ return arr2;
796
+ }
797
+ function _array_without_holes(arr) {
798
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
799
+ }
800
+ function _iterable_to_array(iter) {
801
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
802
+ }
803
+ function _non_iterable_spread() {
804
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
805
+ }
806
+ function _to_consumable_array(arr) {
807
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
808
+ }
809
+ function _unsupported_iterable_to_array(o, minLen) {
810
+ if (!o) return;
811
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
812
+ var n = Object.prototype.toString.call(o).slice(8, -1);
813
+ if (n === "Object" && o.constructor) n = o.constructor.name;
814
+ if (n === "Map" || n === "Set") return Array.from(n);
815
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
816
+ }
817
+ var tty = require$$0;
818
+ var util = require$$1;
819
+ /**
820
+ * This is the Node.js implementation of `debug()`.
821
+ */ exports.init = init;
822
+ exports.log = log;
823
+ exports.formatArgs = formatArgs;
824
+ exports.save = save;
825
+ exports.load = load;
826
+ exports.useColors = useColors;
827
+ exports.destroy = util.deprecate(function() {}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
828
+ /**
829
+ * Colors.
830
+ */ exports.colors = [
831
+ 6,
832
+ 2,
833
+ 3,
834
+ 4,
835
+ 5,
836
+ 1
837
+ ];
838
+ try {
839
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
840
+ // eslint-disable-next-line import/no-extraneous-dependencies
841
+ var supportsColor = requireBrowser();
842
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
843
+ exports.colors = [
844
+ 20,
845
+ 21,
846
+ 26,
847
+ 27,
848
+ 32,
849
+ 33,
850
+ 38,
851
+ 39,
852
+ 40,
853
+ 41,
854
+ 42,
855
+ 43,
856
+ 44,
857
+ 45,
858
+ 56,
859
+ 57,
860
+ 62,
861
+ 63,
862
+ 68,
863
+ 69,
864
+ 74,
865
+ 75,
866
+ 76,
867
+ 77,
868
+ 78,
869
+ 79,
870
+ 80,
871
+ 81,
872
+ 92,
873
+ 93,
874
+ 98,
875
+ 99,
876
+ 112,
877
+ 113,
878
+ 128,
879
+ 129,
880
+ 134,
881
+ 135,
882
+ 148,
883
+ 149,
884
+ 160,
885
+ 161,
886
+ 162,
887
+ 163,
888
+ 164,
889
+ 165,
890
+ 166,
891
+ 167,
892
+ 168,
893
+ 169,
894
+ 170,
895
+ 171,
896
+ 172,
897
+ 173,
898
+ 178,
899
+ 179,
900
+ 184,
901
+ 185,
902
+ 196,
903
+ 197,
904
+ 198,
905
+ 199,
906
+ 200,
907
+ 201,
908
+ 202,
909
+ 203,
910
+ 204,
911
+ 205,
912
+ 206,
913
+ 207,
914
+ 208,
915
+ 209,
916
+ 214,
917
+ 215,
918
+ 220,
919
+ 221
920
+ ];
921
+ }
922
+ } catch (error) {
923
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
924
+ }
925
+ /**
926
+ * Build up the default `inspectOpts` object from the environment variables.
927
+ *
928
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
929
+ */ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
930
+ return /^debug_/i.test(key);
931
+ }).reduce(function(obj, key) {
932
+ // Camel-case
933
+ var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
934
+ return k.toUpperCase();
935
+ });
936
+ // Coerce string value into JS value
937
+ var val = process.env[key];
938
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
939
+ val = true;
940
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
941
+ val = false;
942
+ } else if (val === 'null') {
943
+ val = null;
944
+ } else {
945
+ val = Number(val);
946
+ }
947
+ obj[prop] = val;
948
+ return obj;
949
+ }, {});
950
+ /**
951
+ * Is stdout a TTY? Colored output is enabled when `true`.
952
+ */ function useColors() {
953
+ return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
954
+ }
955
+ /**
956
+ * Adds ANSI color escape codes if enabled.
957
+ *
958
+ * @api public
959
+ */ function formatArgs(args) {
960
+ var _this = this, name = _this.namespace, _$useColors = _this.useColors;
961
+ if (_$useColors) {
962
+ var c = this.color;
963
+ var colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
964
+ var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1b[0m");
965
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
966
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
967
+ } else {
968
+ args[0] = getDate() + name + ' ' + args[0];
969
+ }
970
+ }
971
+ function getDate() {
972
+ if (exports.inspectOpts.hideDate) {
973
+ return '';
974
+ }
975
+ return new Date().toISOString() + ' ';
976
+ }
977
+ /**
978
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
979
+ */ function log() {
980
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
981
+ args[_key] = arguments[_key];
982
+ }
983
+ var _util;
984
+ return process.stderr.write((_util = util).formatWithOptions.apply(_util, [
985
+ exports.inspectOpts
986
+ ].concat(_to_consumable_array(args))) + '\n');
987
+ }
988
+ /**
989
+ * Save `namespaces`.
990
+ *
991
+ * @param {String} namespaces
992
+ * @api private
993
+ */ function save(namespaces) {
994
+ if (namespaces) {
995
+ process.env.DEBUG = namespaces;
996
+ } else {
997
+ // If you set a process.env field to null or undefined, it gets cast to the
998
+ // string 'null' or 'undefined'. Just delete instead.
999
+ delete process.env.DEBUG;
1000
+ }
1001
+ }
1002
+ /**
1003
+ * Load `namespaces`.
1004
+ *
1005
+ * @return {String} returns the previously persisted debug modes
1006
+ * @api private
1007
+ */ function load() {
1008
+ return process.env.DEBUG;
1009
+ }
1010
+ /**
1011
+ * Init logic for `debug` instances.
1012
+ *
1013
+ * Create a new `inspectOpts` object in case `useColors` is set
1014
+ * differently for a particular `debug` instance.
1015
+ */ function init(debug) {
1016
+ debug.inspectOpts = {};
1017
+ var keys = Object.keys(exports.inspectOpts);
1018
+ for(var i = 0; i < keys.length; i++){
1019
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1020
+ }
1021
+ }
1022
+ module.exports = requireCommon()(exports);
1023
+ var formatters = module.exports.formatters;
1024
+ /**
1025
+ * Map %o to `util.inspect()`, all on a single line.
1026
+ */ formatters.o = function(v) {
1027
+ this.inspectOpts.colors = this.useColors;
1028
+ return util.inspect(v, this.inspectOpts).split('\n').map(function(str) {
1029
+ return str.trim();
1030
+ }).join(' ');
1031
+ };
1032
+ /**
1033
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
1034
+ */ formatters.O = function(v) {
1035
+ this.inspectOpts.colors = this.useColors;
1036
+ return util.inspect(v, this.inspectOpts);
1037
+ };
1038
+ } (node, node.exports));
1039
+ return node.exports;
1077
1040
  }
1078
- module.exports = common(exports);
1079
- var formatters = module.exports.formatters;
1080
- /**
1081
- * Map %o to `util.inspect()`, all on a single line.
1082
- */ formatters.o = function(v) {
1083
- this.inspectOpts.colors = this.useColors;
1084
- return util.inspect(v, this.inspectOpts).split("\n").map(function(str) {
1085
- return str.trim();
1086
- }).join(" ");
1087
- };
1088
- /**
1089
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
1090
- */ formatters.O = function(v) {
1091
- this.inspectOpts.colors = this.useColors;
1092
- return util.inspect(v, this.inspectOpts);
1093
- };
1094
- }(node, node.exports));
1095
1041
 
1096
1042
  /**
1097
1043
  * Detect Electron renderer / nwjs process, which is node, but we should
1098
1044
  * treat as a browser.
1099
1045
  */
1100
1046
 
1101
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
1102
- src.exports = browser.exports;
1047
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
1048
+ src.exports = requireBrowser$1();
1103
1049
  } else {
1104
- src.exports = node.exports;
1050
+ src.exports = requireNode();
1105
1051
  }
1106
1052
 
1107
- var debug = src.exports;
1053
+ var srcExports = src.exports;
1054
+ var debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
1108
1055
 
1109
1056
  (function (exports) {
1110
- var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
1111
- return mod && mod.__esModule ? mod : {
1112
- "default": mod
1113
- };
1114
- };
1115
- Object.defineProperty(exports, "__esModule", {
1116
- value: true
1117
- });
1118
- var fs_1 = require$$0$1;
1119
- var debug_1 = __importDefault(src.exports);
1120
- var log = debug_1.default("@kwsites/file-exists");
1121
- function check(path, isFile, isDirectory) {
1122
- log("checking %s", path);
1123
- try {
1124
- var stat = fs_1.statSync(path);
1125
- if (stat.isFile() && isFile) {
1126
- log("[OK] path represents a file");
1127
- return true;
1128
- }
1129
- if (stat.isDirectory() && isDirectory) {
1130
- log("[OK] path represents a directory");
1131
- return true;
1132
- }
1133
- log("[FAIL] path represents something other than a file or directory");
1134
- return false;
1135
- } catch (e) {
1136
- if (e.code === "ENOENT") {
1137
- log("[FAIL] path is not accessible: %o", e);
1138
- return false;
1139
- }
1140
- log("[FATAL] %o", e);
1141
- throw e;
1142
- }
1143
- }
1144
- /**
1145
- * Synchronous validation of a path existing either as a file or as a directory.
1146
- *
1147
- * @param {string} path The path to check
1148
- * @param {number} type One or both of the exported numeric constants
1149
- */ function exists(path) {
1150
- var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : exports.READABLE;
1151
- return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
1152
- }
1153
- exports.exists = exists;
1154
- /**
1155
- * Constant representing a file
1156
- */ exports.FILE = 1;
1157
- /**
1158
- * Constant representing a folder
1159
- */ exports.FOLDER = 2;
1160
- /**
1161
- * Constant representing either a file or a folder
1162
- */ exports.READABLE = exports.FILE + exports.FOLDER;
1163
- }(src$1));
1057
+ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
1058
+ return mod && mod.__esModule ? mod : {
1059
+ "default": mod
1060
+ };
1061
+ };
1062
+ Object.defineProperty(exports, "__esModule", {
1063
+ value: true
1064
+ });
1065
+ var fs_1 = require$$0$1;
1066
+ var debug_1 = __importDefault(srcExports);
1067
+ var log = debug_1.default('@kwsites/file-exists');
1068
+ function check(path, isFile, isDirectory) {
1069
+ log("checking %s", path);
1070
+ try {
1071
+ var stat = fs_1.statSync(path);
1072
+ if (stat.isFile() && isFile) {
1073
+ log("[OK] path represents a file");
1074
+ return true;
1075
+ }
1076
+ if (stat.isDirectory() && isDirectory) {
1077
+ log("[OK] path represents a directory");
1078
+ return true;
1079
+ }
1080
+ log("[FAIL] path represents something other than a file or directory");
1081
+ return false;
1082
+ } catch (e) {
1083
+ if (e.code === 'ENOENT') {
1084
+ log("[FAIL] path is not accessible: %o", e);
1085
+ return false;
1086
+ }
1087
+ log("[FATAL] %o", e);
1088
+ throw e;
1089
+ }
1090
+ }
1091
+ /**
1092
+ * Synchronous validation of a path existing either as a file or as a directory.
1093
+ *
1094
+ * @param {string} path The path to check
1095
+ * @param {number} type One or both of the exported numeric constants
1096
+ */ function exists(path) {
1097
+ var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : exports.READABLE;
1098
+ return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
1099
+ }
1100
+ exports.exists = exists;
1101
+ /**
1102
+ * Constant representing a file
1103
+ */ exports.FILE = 1;
1104
+ /**
1105
+ * Constant representing a folder
1106
+ */ exports.FOLDER = 2;
1107
+ /**
1108
+ * Constant representing either a file or a folder
1109
+ */ exports.READABLE = exports.FILE + exports.FOLDER;
1110
+ } (src$1));
1164
1111
 
1165
1112
  (function (exports) {
1166
- function __export(m) {
1167
- for(var p in m)if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1168
- }
1169
- Object.defineProperty(exports, "__esModule", {
1170
- value: true
1171
- });
1172
- __export(src$1);
1173
- }(dist$1));
1113
+ function __export(m) {
1114
+ for(var p in m)if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1115
+ }
1116
+ Object.defineProperty(exports, "__esModule", {
1117
+ value: true
1118
+ });
1119
+ __export(src$1);
1120
+ } (dist$1));
1174
1121
 
1175
1122
  var dist = {};
1176
1123
 
@@ -1187,7 +1134,7 @@ var createDeferred = dist.createDeferred = deferred_1 = dist.deferred = void 0;
1187
1134
  */ function deferred() {
1188
1135
  var done;
1189
1136
  var fail;
1190
- var status = "pending";
1137
+ var status = 'pending';
1191
1138
  var promise = new Promise(function(_done, _fail) {
1192
1139
  done = _done;
1193
1140
  fail = _fail;
@@ -1195,19 +1142,19 @@ var createDeferred = dist.createDeferred = deferred_1 = dist.deferred = void 0;
1195
1142
  return {
1196
1143
  promise: promise,
1197
1144
  done: function done1(result) {
1198
- if (status === "pending") {
1199
- status = "resolved";
1145
+ if (status === 'pending') {
1146
+ status = 'resolved';
1200
1147
  done(result);
1201
1148
  }
1202
1149
  },
1203
1150
  fail: function fail1(error) {
1204
- if (status === "pending") {
1205
- status = "rejected";
1151
+ if (status === 'pending') {
1152
+ status = 'rejected';
1206
1153
  fail(error);
1207
1154
  }
1208
1155
  },
1209
1156
  get fulfilled () {
1210
- return status !== "pending";
1157
+ return status !== 'pending';
1211
1158
  },
1212
1159
  get status () {
1213
1160
  return status;
@@ -1248,6 +1195,35 @@ function _assert_this_initialized(self) {
1248
1195
  }
1249
1196
  return self;
1250
1197
  }
1198
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1199
+ try {
1200
+ var info = gen[key](arg);
1201
+ var value = info.value;
1202
+ } catch (error) {
1203
+ reject(error);
1204
+ return;
1205
+ }
1206
+ if (info.done) {
1207
+ resolve(value);
1208
+ } else {
1209
+ Promise.resolve(value).then(_next, _throw);
1210
+ }
1211
+ }
1212
+ function _async_to_generator(fn) {
1213
+ return function() {
1214
+ var self = this, args = arguments;
1215
+ return new Promise(function(resolve, reject) {
1216
+ var gen = fn.apply(self, args);
1217
+ function _next(value) {
1218
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1219
+ }
1220
+ function _throw(err) {
1221
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1222
+ }
1223
+ _next(undefined);
1224
+ });
1225
+ };
1226
+ }
1251
1227
  function _class_call_check(instance, Constructor) {
1252
1228
  if (!(instance instanceof Constructor)) {
1253
1229
  throw new TypeError("Cannot call a class as a function");
@@ -1375,6 +1351,40 @@ function _non_iterable_rest() {
1375
1351
  function _non_iterable_spread() {
1376
1352
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1377
1353
  }
1354
+ function _object_spread(target) {
1355
+ for(var i = 1; i < arguments.length; i++){
1356
+ var source = arguments[i] != null ? arguments[i] : {};
1357
+ var ownKeys = Object.keys(source);
1358
+ if (typeof Object.getOwnPropertySymbols === "function") {
1359
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1360
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1361
+ }));
1362
+ }
1363
+ ownKeys.forEach(function(key) {
1364
+ _define_property(target, key, source[key]);
1365
+ });
1366
+ }
1367
+ return target;
1368
+ }
1369
+ function ownKeys(object, enumerableOnly) {
1370
+ var keys = Object.keys(object);
1371
+ if (Object.getOwnPropertySymbols) {
1372
+ var symbols = Object.getOwnPropertySymbols(object);
1373
+ keys.push.apply(keys, symbols);
1374
+ }
1375
+ return keys;
1376
+ }
1377
+ function _object_spread_props(target, source) {
1378
+ source = source != null ? source : {};
1379
+ if (Object.getOwnPropertyDescriptors) {
1380
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1381
+ } else {
1382
+ ownKeys(Object(source)).forEach(function(key) {
1383
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1384
+ });
1385
+ }
1386
+ return target;
1387
+ }
1378
1388
  function _possible_constructor_return(self, call) {
1379
1389
  if (call && (_type_of(call) === "object" || typeof call === "function")) {
1380
1390
  return call;
@@ -1559,48 +1569,9 @@ function _ts_generator(thisArg, body) {
1559
1569
  }
1560
1570
  }
1561
1571
  var __defProp = Object.defineProperty;
1562
- var __defProps = Object.defineProperties;
1563
1572
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1564
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1565
1573
  var __getOwnPropNames = Object.getOwnPropertyNames;
1566
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1567
1574
  var __hasOwnProp = Object.prototype.hasOwnProperty;
1568
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
1569
- var __defNormalProp = function(obj, key, value) {
1570
- return key in obj ? __defProp(obj, key, {
1571
- enumerable: true,
1572
- configurable: true,
1573
- writable: true,
1574
- value: value
1575
- }) : obj[key] = value;
1576
- };
1577
- var __spreadValues = function(a, b) {
1578
- for(var prop in b || (b = {}))if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
1579
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1580
- if (__getOwnPropSymbols) try {
1581
- for(var _iterator = __getOwnPropSymbols(b)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1582
- var prop = _step.value;
1583
- if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
1584
- }
1585
- } catch (err) {
1586
- _didIteratorError = true;
1587
- _iteratorError = err;
1588
- } finally{
1589
- try {
1590
- if (!_iteratorNormalCompletion && _iterator.return != null) {
1591
- _iterator.return();
1592
- }
1593
- } finally{
1594
- if (_didIteratorError) {
1595
- throw _iteratorError;
1596
- }
1597
- }
1598
- }
1599
- return a;
1600
- };
1601
- var __spreadProps = function(a, b) {
1602
- return __defProps(a, __getOwnPropDescs(b));
1603
- };
1604
1575
  var __esm = function(fn, res) {
1605
1576
  return function __init() {
1606
1577
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
@@ -1620,7 +1591,7 @@ var __export = function(target, all) {
1620
1591
  });
1621
1592
  };
1622
1593
  var __copyProps = function(to, from, except, desc) {
1623
- if (from && typeof from === "object" || typeof from === "function") {
1594
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
1624
1595
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1625
1596
  try {
1626
1597
  var _loop = function() {
@@ -1655,28 +1626,6 @@ var __toCommonJS = function(mod) {
1655
1626
  value: true
1656
1627
  }), mod);
1657
1628
  };
1658
- var __async = function(__this, __arguments, generator) {
1659
- return new Promise(function(resolve, reject) {
1660
- var fulfilled = function(value) {
1661
- try {
1662
- step(generator.next(value));
1663
- } catch (e) {
1664
- reject(e);
1665
- }
1666
- };
1667
- var rejected = function(value) {
1668
- try {
1669
- step(generator.throw(value));
1670
- } catch (e) {
1671
- reject(e);
1672
- }
1673
- };
1674
- var step = function(x) {
1675
- return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
1676
- };
1677
- step((generator = generator.apply(__this, __arguments)).next());
1678
- });
1679
- };
1680
1629
  // src/lib/args/pathspec.ts
1681
1630
  function pathspec() {
1682
1631
  for(var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++){
@@ -1753,7 +1702,10 @@ var init_task_configuration_error = __esm({
1753
1702
  }
1754
1703
  });
1755
1704
  function asFunction(source) {
1756
- return typeof source === "function" ? source : NOOP;
1705
+ if (typeof source !== "function") {
1706
+ return NOOP;
1707
+ }
1708
+ return source;
1757
1709
  }
1758
1710
  function isUserFunction(source) {
1759
1711
  return typeof source === "function" && source !== NOOP;
@@ -1858,7 +1810,7 @@ function prefixedArray(input, prefix) {
1858
1810
  return output;
1859
1811
  }
1860
1812
  function bufferToString(input) {
1861
- return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8");
1813
+ return (Array.isArray(input) ? Buffer$1.concat(input) : input).toString("utf-8");
1862
1814
  }
1863
1815
  function pick(source, properties) {
1864
1816
  var _Object;
@@ -1948,20 +1900,20 @@ var GitOutputStreams;
1948
1900
  var init_git_output_streams = __esm({
1949
1901
  "src/lib/utils/git-output-streams.ts": function() {
1950
1902
  GitOutputStreams = /*#__PURE__*/ function() {
1951
- function GitOutputStreams1(stdOut, stdErr) {
1952
- _class_call_check(this, GitOutputStreams1);
1903
+ function _GitOutputStreams(stdOut, stdErr) {
1904
+ _class_call_check(this, _GitOutputStreams);
1953
1905
  this.stdOut = stdOut;
1954
1906
  this.stdErr = stdErr;
1955
1907
  }
1956
- _create_class(GitOutputStreams1, [
1908
+ _create_class(_GitOutputStreams, [
1957
1909
  {
1958
1910
  key: "asStrings",
1959
1911
  value: function asStrings() {
1960
- return new GitOutputStreams(this.stdOut.toString("utf8"), this.stdErr.toString("utf8"));
1912
+ return new _GitOutputStreams(this.stdOut.toString("utf8"), this.stdErr.toString("utf8"));
1961
1913
  }
1962
1914
  }
1963
1915
  ]);
1964
- return GitOutputStreams1;
1916
+ return _GitOutputStreams;
1965
1917
  }();
1966
1918
  }
1967
1919
  });
@@ -1992,6 +1944,7 @@ var init_line_parser = __esm({
1992
1944
  }
1993
1945
  _create_class(LineParser, [
1994
1946
  {
1947
+ // @ts-ignore
1995
1948
  key: "useMatches",
1996
1949
  value: function useMatches(target, match) {
1997
1950
  throw new Error("LineParser:useMatches not implemented");
@@ -2064,11 +2017,11 @@ function createInstanceConfig() {
2064
2017
  var _Object;
2065
2018
  var baseDir = process.cwd();
2066
2019
  var config = (_Object = Object).assign.apply(_Object, [
2067
- __spreadValues({
2020
+ _object_spread({
2068
2021
  baseDir: baseDir
2069
2022
  }, defaultOptions)
2070
2023
  ].concat(_to_consumable_array(options.filter(function(o) {
2071
- return typeof o === "object" && o;
2024
+ return (typeof o === "undefined" ? "undefined" : _type_of(o)) === "object" && o;
2072
2025
  }))));
2073
2026
  config.baseDir = config.baseDir || baseDir;
2074
2027
  config.trimmed = config.trimmed === true;
@@ -2099,6 +2052,32 @@ function appendTaskOptions(options) {
2099
2052
  "boolean"
2100
2053
  ])) {
2101
2054
  commands2.push(key + "=" + value);
2055
+ } else if (Array.isArray(value)) {
2056
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2057
+ try {
2058
+ for(var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2059
+ var v = _step.value;
2060
+ if (!filterPrimitives(v, [
2061
+ "string",
2062
+ "number"
2063
+ ])) {
2064
+ commands2.push(key + "=" + v);
2065
+ }
2066
+ }
2067
+ } catch (err) {
2068
+ _didIteratorError = true;
2069
+ _iteratorError = err;
2070
+ } finally{
2071
+ try {
2072
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2073
+ _iterator.return();
2074
+ }
2075
+ } finally{
2076
+ if (_didIteratorError) {
2077
+ throw _iteratorError;
2078
+ }
2079
+ }
2080
+ }
2102
2081
  } else {
2103
2082
  commands2.push(key);
2104
2083
  }
@@ -3221,19 +3200,20 @@ var init_git_logger = __esm({
3221
3200
  }
3222
3201
  });
3223
3202
  // src/lib/runners/tasks-pending-queue.ts
3224
- var _TasksPendingQueue, TasksPendingQueue;
3203
+ var TasksPendingQueue;
3225
3204
  var init_tasks_pending_queue = __esm({
3226
3205
  "src/lib/runners/tasks-pending-queue.ts": function() {
3206
+ var __TasksPendingQueue;
3227
3207
  init_git_error();
3228
3208
  init_git_logger();
3229
- _TasksPendingQueue = /*#__PURE__*/ function() {
3230
- function _TasksPendingQueue1() {
3209
+ TasksPendingQueue = (__TasksPendingQueue = /*#__PURE__*/ function() {
3210
+ function _TasksPendingQueue() {
3231
3211
  var logLabel = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "GitExecutor";
3232
- _class_call_check(this, _TasksPendingQueue1);
3212
+ _class_call_check(this, _TasksPendingQueue);
3233
3213
  this.logLabel = logLabel;
3234
3214
  this._queue = /* @__PURE__ */ new Map();
3235
3215
  }
3236
- _create_class(_TasksPendingQueue1, [
3216
+ _create_class(_TasksPendingQueue, [
3237
3217
  {
3238
3218
  key: "withProgress",
3239
3219
  value: function withProgress(task) {
@@ -3324,10 +3304,8 @@ var init_tasks_pending_queue = __esm({
3324
3304
  }
3325
3305
  }
3326
3306
  ]);
3327
- return _TasksPendingQueue1;
3328
- }();
3329
- TasksPendingQueue = _TasksPendingQueue;
3330
- TasksPendingQueue.counter = 0;
3307
+ return _TasksPendingQueue;
3308
+ }(), __TasksPendingQueue.counter = 0, __TasksPendingQueue);
3331
3309
  }
3332
3310
  });
3333
3311
  function pluginContext(task, commands) {
@@ -3406,15 +3384,15 @@ var init_git_executor_chain = __esm({
3406
3384
  {
3407
3385
  key: "attemptTask",
3408
3386
  value: function attemptTask(task) {
3409
- return __async(this, null, function() {
3410
- var _this, onScheduleComplete, onQueueComplete, logger, e;
3387
+ var _this = this;
3388
+ return _async_to_generator(function() {
3389
+ var onScheduleComplete, onQueueComplete, logger, e;
3411
3390
  return _ts_generator(this, function(_state) {
3412
3391
  switch(_state.label){
3413
3392
  case 0:
3414
- _this = this;
3415
3393
  return [
3416
3394
  4,
3417
- this._scheduler.next()
3395
+ _this._scheduler.next()
3418
3396
  ];
3419
3397
  case 1:
3420
3398
  onScheduleComplete = _state.sent();
@@ -3429,10 +3407,10 @@ var init_git_executor_chain = __esm({
3429
3407
  5,
3430
3408
  6
3431
3409
  ]);
3432
- logger = this._queue.attempt(task).logger;
3410
+ logger = _this._queue.attempt(task).logger;
3433
3411
  return [
3434
3412
  4,
3435
- isEmptyTask(task) ? this.attemptEmptyTask(task, logger) : this.attemptRemoteTask(task, logger)
3413
+ isEmptyTask(task) ? _this.attemptEmptyTask(task, logger) : _this.attemptRemoteTask(task, logger)
3436
3414
  ];
3437
3415
  case 3:
3438
3416
  return [
@@ -3441,7 +3419,7 @@ var init_git_executor_chain = __esm({
3441
3419
  ];
3442
3420
  case 4:
3443
3421
  e = _state.sent();
3444
- throw this.onFatalException(task, e);
3422
+ throw _this.onFatalException(task, e);
3445
3423
  case 5:
3446
3424
  onQueueComplete();
3447
3425
  onScheduleComplete();
@@ -3454,7 +3432,7 @@ var init_git_executor_chain = __esm({
3454
3432
  ];
3455
3433
  }
3456
3434
  });
3457
- });
3435
+ })();
3458
3436
  }
3459
3437
  },
3460
3438
  {
@@ -3471,22 +3449,23 @@ var init_git_executor_chain = __esm({
3471
3449
  {
3472
3450
  key: "attemptRemoteTask",
3473
3451
  value: function attemptRemoteTask(task, logger) {
3474
- return __async(this, null, function() {
3452
+ var _this = this;
3453
+ return _async_to_generator(function() {
3475
3454
  var binary, args, raw, outputStreams;
3476
3455
  return _ts_generator(this, function(_state) {
3477
3456
  switch(_state.label){
3478
3457
  case 0:
3479
- binary = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands));
3480
- args = this._plugins.exec("spawn.args", _to_consumable_array(task.commands), pluginContext(task, task.commands));
3458
+ binary = _this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands));
3459
+ args = _this._plugins.exec("spawn.args", _to_consumable_array(task.commands), pluginContext(task, task.commands));
3481
3460
  return [
3482
3461
  4,
3483
- this.gitResponse(task, binary, args, this.outputHandler, logger.step("SPAWN"))
3462
+ _this.gitResponse(task, binary, args, _this.outputHandler, logger.step("SPAWN"))
3484
3463
  ];
3485
3464
  case 1:
3486
3465
  raw = _state.sent();
3487
3466
  return [
3488
3467
  4,
3489
- this.handleTaskData(task, args, raw, logger.step("HANDLE"))
3468
+ _this.handleTaskData(task, args, raw, logger.step("HANDLE"))
3490
3469
  ];
3491
3470
  case 2:
3492
3471
  outputStreams = _state.sent();
@@ -3503,21 +3482,22 @@ var init_git_executor_chain = __esm({
3503
3482
  ];
3504
3483
  }
3505
3484
  });
3506
- });
3485
+ })();
3507
3486
  }
3508
3487
  },
3509
3488
  {
3510
3489
  key: "attemptEmptyTask",
3511
3490
  value: function attemptEmptyTask(task, logger) {
3512
- return __async(this, null, function() {
3491
+ var _this = this;
3492
+ return _async_to_generator(function() {
3513
3493
  return _ts_generator(this, function(_state) {
3514
3494
  logger("empty task bypassing child process to call to task's parser");
3515
3495
  return [
3516
3496
  2,
3517
- task.parser(this)
3497
+ task.parser(_this)
3518
3498
  ];
3519
3499
  });
3520
- });
3500
+ })();
3521
3501
  }
3522
3502
  },
3523
3503
  {
@@ -3529,7 +3509,7 @@ var init_git_executor_chain = __esm({
3529
3509
  logger("Preparing to handle process response exitCode=%d stdOut=", exitCode);
3530
3510
  var error = _this._plugins.exec("task.error", {
3531
3511
  error: rejection
3532
- }, __spreadValues(__spreadValues({}, pluginContext(task, args)), result)).error;
3512
+ }, _object_spread({}, pluginContext(task, args), result)).error;
3533
3513
  if (error && task.onError) {
3534
3514
  logger.info("exitCode=%s handling with custom error handler");
3535
3515
  return task.onError(result, error, function(newStdOut) {
@@ -3550,14 +3530,14 @@ var init_git_executor_chain = __esm({
3550
3530
  {
3551
3531
  key: "gitResponse",
3552
3532
  value: function gitResponse(task, command, args, outputHandler, logger) {
3553
- return __async(this, null, function() {
3554
- var _this, outputLogger, spawnOptions;
3533
+ var _this = this;
3534
+ return _async_to_generator(function() {
3535
+ var outputLogger, spawnOptions;
3555
3536
  return _ts_generator(this, function(_state) {
3556
- _this = this;
3557
3537
  outputLogger = logger.sibling("output");
3558
- spawnOptions = this._plugins.exec("spawn.options", {
3559
- cwd: this.cwd,
3560
- env: this.env,
3538
+ spawnOptions = _this._plugins.exec("spawn.options", {
3539
+ cwd: _this.cwd,
3540
+ env: _this.env,
3561
3541
  windowsHide: true
3562
3542
  }, pluginContext(task, task.commands));
3563
3543
  return [
@@ -3576,7 +3556,7 @@ var init_git_executor_chain = __esm({
3576
3556
  rejection: rejection
3577
3557
  });
3578
3558
  }
3579
- _this._plugins.exec("spawn.before", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), {
3559
+ _this._plugins.exec("spawn.before", void 0, _object_spread_props(_object_spread({}, pluginContext(task, args)), {
3580
3560
  kill: function kill(reason) {
3581
3561
  rejection = reason || rejection;
3582
3562
  }
@@ -3589,7 +3569,7 @@ var init_git_executor_chain = __esm({
3589
3569
  logger("Passing child process stdOut/stdErr to custom outputHandler");
3590
3570
  outputHandler(command, spawned.stdout, spawned.stderr, _to_consumable_array(args));
3591
3571
  }
3592
- _this._plugins.exec("spawn.after", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), {
3572
+ _this._plugins.exec("spawn.after", void 0, _object_spread_props(_object_spread({}, pluginContext(task, args)), {
3593
3573
  spawned: spawned,
3594
3574
  close: function close(exitCode, reason) {
3595
3575
  done({
@@ -3610,14 +3590,14 @@ var init_git_executor_chain = __esm({
3610
3590
  })
3611
3591
  ];
3612
3592
  });
3613
- });
3593
+ })();
3614
3594
  }
3615
3595
  },
3616
3596
  {
3617
3597
  key: "_beforeSpawn",
3618
3598
  value: function _beforeSpawn(task, args) {
3619
3599
  var rejection;
3620
- this._plugins.exec("spawn.before", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), {
3600
+ this._plugins.exec("spawn.before", void 0, _object_spread_props(_object_spread({}, pluginContext(task, args)), {
3621
3601
  kill: function kill(reason) {
3622
3602
  rejection = reason || rejection;
3623
3603
  }
@@ -3674,7 +3654,7 @@ function taskCallback(task, response) {
3674
3654
  callback(null, data);
3675
3655
  };
3676
3656
  var onError2 = function(err) {
3677
- if ((err == null ? void 0 : err.task) === task) {
3657
+ if ((err === null || err === void 0 ? void 0 : err.task) === task) {
3678
3658
  callback(_instanceof(err, GitResponseError) ? addDeprecationNoticeToError(err) : err, void 0);
3679
3659
  }
3680
3660
  };
@@ -4062,8 +4042,8 @@ var init_parse_diff_summary = __esm({
4062
4042
  var inserted = /(\d+) i/.exec(summary);
4063
4043
  var deleted = /(\d+) d/.exec(summary);
4064
4044
  result.changed = asNumber(changed);
4065
- result.insertions = asNumber(inserted == null ? void 0 : inserted[1]);
4066
- result.deletions = asNumber(deleted == null ? void 0 : deleted[1]);
4045
+ result.insertions = asNumber(inserted === null || inserted === void 0 ? void 0 : inserted[1]);
4046
+ result.deletions = asNumber(deleted === null || deleted === void 0 ? void 0 : deleted[1]);
4067
4047
  })
4068
4048
  ];
4069
4049
  numStatParser = [
@@ -4111,7 +4091,7 @@ var init_parse_diff_summary = __esm({
4111
4091
  var _param = _sliced_to_array(param, 5), status = _param[0], similarity = _param[1], from = _param[2]; _param[3]; var to = _param[4];
4112
4092
  result.changed++;
4113
4093
  result.files.push({
4114
- file: to != null ? to : from,
4094
+ file: to !== null && to !== void 0 ? to : from,
4115
4095
  changes: 0,
4116
4096
  insertions: 0,
4117
4097
  deletions: 0,
@@ -4160,9 +4140,9 @@ var init_parse_list_log_summary = __esm({
4160
4140
  init_utils();
4161
4141
  init_parse_diff_summary();
4162
4142
  init_log_format();
4163
- START_BOUNDARY = "\xf2\xf2\xf2\xf2\xf2\xf2 ";
4164
- COMMIT_BOUNDARY = " \xf2\xf2";
4165
- SPLITTER = " \xf2 ";
4143
+ START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 ";
4144
+ COMMIT_BOUNDARY = " \xF2\xF2";
4145
+ SPLITTER = " \xF2 ";
4166
4146
  defaultFieldNames = [
4167
4147
  "hash",
4168
4148
  "date",
@@ -4240,7 +4220,7 @@ function userOptions(input) {
4240
4220
  function parseLogOptions() {
4241
4221
  var opt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, customArgs = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
4242
4222
  var splitter = filterType(opt.splitter, filterString, SPLITTER);
4243
- var format = !filterPrimitives(opt.format) && opt.format ? opt.format : {
4223
+ var format = filterPlainObject(opt.format) ? opt.format : {
4244
4224
  hash: "%H",
4245
4225
  date: opt.strictDate === false ? "%ai" : "%aI",
4246
4226
  message: "%s",
@@ -4689,7 +4669,7 @@ var init_parse_push = __esm({
4689
4669
  }),
4690
4670
  new LineParser(/^updating local tracking ref '(.+)'/, function(result, param) {
4691
4671
  var _param = _sliced_to_array(param, 1), local = _param[0];
4692
- result.ref = __spreadProps(__spreadValues({}, result.ref || {}), {
4672
+ result.ref = _object_spread_props(_object_spread({}, result.ref || {}), {
4693
4673
  local: local
4694
4674
  });
4695
4675
  }),
@@ -4699,7 +4679,7 @@ var init_parse_push = __esm({
4699
4679
  }),
4700
4680
  new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, function(result, param) {
4701
4681
  var _param = _sliced_to_array(param, 3), local = _param[0], remote = _param[1], remoteName = _param[2];
4702
- result.branch = __spreadProps(__spreadValues({}, result.branch || {}), {
4682
+ result.branch = _object_spread_props(_object_spread({}, result.branch || {}), {
4703
4683
  local: local,
4704
4684
  remote: remote,
4705
4685
  remoteName: remoteName
@@ -4722,7 +4702,7 @@ var init_parse_push = __esm({
4722
4702
  parsePushResult = function(stdOut, stdErr) {
4723
4703
  var pushDetail = parsePushDetail(stdOut, stdErr);
4724
4704
  var responseDetail = parseRemoteMessages(stdOut, stdErr);
4725
- return __spreadValues(__spreadValues({}, pushDetail), responseDetail);
4705
+ return _object_spread({}, pushDetail, responseDetail);
4726
4706
  };
4727
4707
  parsePushDetail = function(stdOut, stdErr) {
4728
4708
  return parseStringResponse({
@@ -5135,7 +5115,7 @@ var init_simple_git_api = __esm({
5135
5115
  if (typeof directory === "string") {
5136
5116
  return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);
5137
5117
  }
5138
- if (typeof (directory == null ? void 0 : directory.path) === "string") {
5118
+ if (typeof (directory === null || directory === void 0 ? void 0 : directory.path) === "string") {
5139
5119
  return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || void 0), next);
5140
5120
  }
5141
5121
  return this._runTask(configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"), next);
@@ -5220,7 +5200,7 @@ var init_scheduler = __esm({
5220
5200
  "src/lib/runners/scheduler.ts": function() {
5221
5201
  init_utils();
5222
5202
  init_git_logger();
5223
- createScheduledTask = function() {
5203
+ createScheduledTask = /* @__PURE__ */ function() {
5224
5204
  var id = 0;
5225
5205
  return function() {
5226
5206
  id++;
@@ -5414,7 +5394,7 @@ var init_parse_branch = __esm({
5414
5394
  var _param = _sliced_to_array(param, 4), current = _param[0], name = _param[1], commit = _param[2], label = _param[3];
5415
5395
  result.push(branchStatus(current), true, name, commit, label);
5416
5396
  }),
5417
- new LineParser(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$", "s"), function(result, param) {
5397
+ new LineParser(RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$", "s"), function(result, param) {
5418
5398
  var _param = _sliced_to_array(param, 4), current = _param[0], name = _param[1], commit = _param[2], label = _param[3];
5419
5399
  result.push(branchStatus(current), false, name, commit, label);
5420
5400
  })
@@ -6113,7 +6093,7 @@ var require_git = __commonJS({
6113
6093
  return this;
6114
6094
  };
6115
6095
  Git2.prototype.env = function(name, value) {
6116
- if (arguments.length === 1 && typeof name === "object") {
6096
+ if (arguments.length === 1 && (typeof name === "undefined" ? "undefined" : _type_of(name)) === "object") {
6117
6097
  this._executor.env = name;
6118
6098
  } else {
6119
6099
  (this._executor.env = this._executor.env || {})[name] = value;
@@ -6513,20 +6493,20 @@ function completionDetectionPlugin() {
6513
6493
  }
6514
6494
  return {
6515
6495
  type: "spawn.after",
6516
- action: function action(_0, _1) {
6517
- return __async(this, arguments, function(_data, param) {
6518
- var spawned, close, _a3, _b, events, deferClose, quickClose, err;
6496
+ action: function action(_data, param) {
6497
+ var spawned = param.spawned, close = param.close;
6498
+ return _async_to_generator(function() {
6499
+ var _spawned_stdout, _spawned_stderr, events, deferClose, quickClose, err;
6519
6500
  return _ts_generator(this, function(_state) {
6520
6501
  switch(_state.label){
6521
6502
  case 0:
6522
- spawned = param.spawned, close = param.close;
6523
6503
  events = createEvents();
6524
6504
  deferClose = true;
6525
6505
  quickClose = function() {
6526
6506
  return void (deferClose = false);
6527
6507
  };
6528
- (_a3 = spawned.stdout) == null ? void 0 : _a3.on("data", quickClose);
6529
- (_b = spawned.stderr) == null ? void 0 : _b.on("data", quickClose);
6508
+ (_spawned_stdout = spawned.stdout) === null || _spawned_stdout === void 0 ? void 0 : _spawned_stdout.on("data", quickClose);
6509
+ (_spawned_stderr = spawned.stderr) === null || _spawned_stderr === void 0 ? void 0 : _spawned_stderr.on("data", quickClose);
6530
6510
  spawned.on("error", quickClose);
6531
6511
  spawned.on("close", function(code) {
6532
6512
  return events.close(code);
@@ -6578,7 +6558,7 @@ function completionDetectionPlugin() {
6578
6558
  ];
6579
6559
  }
6580
6560
  });
6581
- });
6561
+ })();
6582
6562
  }
6583
6563
  };
6584
6564
  }
@@ -6757,11 +6737,11 @@ function progressMonitorPlugin(progress) {
6757
6737
  var onProgress = {
6758
6738
  type: "spawn.after",
6759
6739
  action: function action(_data, context) {
6760
- var _a2;
6740
+ var _context_spawned_stderr;
6761
6741
  if (!context.commands.includes(progressCommand)) {
6762
6742
  return;
6763
6743
  }
6764
- (_a2 = context.spawned.stderr) == null ? void 0 : _a2.on("data", function(chunk) {
6744
+ (_context_spawned_stderr = context.spawned.stderr) === null || _context_spawned_stderr === void 0 ? void 0 : _context_spawned_stderr.on("data", function(chunk) {
6765
6745
  var message = /^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(chunk.toString("utf8"));
6766
6746
  if (!message) {
6767
6747
  return;
@@ -6803,7 +6783,7 @@ function spawnOptionsPlugin(spawnOptions) {
6803
6783
  return {
6804
6784
  type: "spawn.options",
6805
6785
  action: function action(data) {
6806
- return __spreadValues(__spreadValues({}, options), data);
6786
+ return _object_spread({}, options, data);
6807
6787
  }
6808
6788
  };
6809
6789
  }
@@ -6814,16 +6794,16 @@ function timeoutPlugin(param) {
6814
6794
  return {
6815
6795
  type: "spawn.after",
6816
6796
  action: function action(_data, context) {
6817
- var _a2, _b;
6797
+ var _context_spawned_stdout, _context_spawned_stderr;
6818
6798
  var timeout;
6819
6799
  function wait() {
6820
6800
  timeout && clearTimeout(timeout);
6821
6801
  timeout = setTimeout(kill, block);
6822
6802
  }
6823
6803
  function stop() {
6824
- var _a3, _b2;
6825
- (_a3 = context.spawned.stdout) == null ? void 0 : _a3.off("data", wait);
6826
- (_b2 = context.spawned.stderr) == null ? void 0 : _b2.off("data", wait);
6804
+ var _context_spawned_stdout, _context_spawned_stderr;
6805
+ (_context_spawned_stdout = context.spawned.stdout) === null || _context_spawned_stdout === void 0 ? void 0 : _context_spawned_stdout.off("data", wait);
6806
+ (_context_spawned_stderr = context.spawned.stderr) === null || _context_spawned_stderr === void 0 ? void 0 : _context_spawned_stderr.off("data", wait);
6827
6807
  context.spawned.off("exit", stop);
6828
6808
  context.spawned.off("close", stop);
6829
6809
  timeout && clearTimeout(timeout);
@@ -6832,8 +6812,8 @@ function timeoutPlugin(param) {
6832
6812
  stop();
6833
6813
  context.kill(new GitPluginError(void 0, "timeout", "block timeout reached"));
6834
6814
  }
6835
- stdOut && ((_a2 = context.spawned.stdout) == null ? void 0 : _a2.on("data", wait));
6836
- stdErr && ((_b = context.spawned.stderr) == null ? void 0 : _b.on("data", wait));
6815
+ stdOut && ((_context_spawned_stdout = context.spawned.stdout) === null || _context_spawned_stdout === void 0 ? void 0 : _context_spawned_stdout.on("data", wait));
6816
+ stdErr && ((_context_spawned_stderr = context.spawned.stderr) === null || _context_spawned_stderr === void 0 ? void 0 : _context_spawned_stderr.on("data", wait));
6837
6817
  context.spawned.on("exit", stop);
6838
6818
  context.spawned.on("close", stop);
6839
6819
  wait();
@@ -6877,7 +6857,7 @@ function suffixPathsPlugin() {
6877
6857
  init_utils();
6878
6858
  var Git = require_git();
6879
6859
  function gitInstanceFactory(baseDir, options) {
6880
- var _a2;
6860
+ var _config_unsafe;
6881
6861
  var plugins = new PluginStore();
6882
6862
  var config = createInstanceConfig(baseDir && (typeof baseDir === "string" ? {
6883
6863
  baseDir: baseDir
@@ -6897,7 +6877,7 @@ function gitInstanceFactory(baseDir, options) {
6897
6877
  config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));
6898
6878
  plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
6899
6879
  config.errors && plugins.add(errorDetectionPlugin(config.errors));
6900
- customBinaryPlugin(plugins, config.binary, (_a2 = config.unsafe) == null ? void 0 : _a2.allowUnsafeCustomBinary);
6880
+ customBinaryPlugin(plugins, config.binary, (_config_unsafe = config.unsafe) === null || _config_unsafe === void 0 ? void 0 : _config_unsafe.allowUnsafeCustomBinary);
6901
6881
  return new Git(config, plugins);
6902
6882
  }
6903
6883
  // src/lib/runners/promise-wrapped.ts