glitch-javascript-sdk 0.6.5 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +819 -746
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1326 -1230
- package/dist/esm/index.js.map +1 -1
- package/package.json +13 -13
package/dist/esm/index.js
CHANGED
|
@@ -773,7 +773,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
|
|
|
773
773
|
const isThenable = (thing) =>
|
|
774
774
|
thing && (isObject(thing) || isFunction$2(thing)) && isFunction$2(thing.then) && isFunction$2(thing.catch);
|
|
775
775
|
|
|
776
|
-
var utils = {
|
|
776
|
+
var utils$1 = {
|
|
777
777
|
isArray: isArray$2,
|
|
778
778
|
isArrayBuffer,
|
|
779
779
|
isBuffer: isBuffer$2,
|
|
@@ -1034,6 +1034,8 @@ var isArray$1 = Array.isArray || function (arr) {
|
|
|
1034
1034
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
1035
1035
|
* @license MIT
|
|
1036
1036
|
*/
|
|
1037
|
+
/* eslint-disable no-proto */
|
|
1038
|
+
|
|
1037
1039
|
|
|
1038
1040
|
var INSPECT_MAX_BYTES = 50;
|
|
1039
1041
|
|
|
@@ -2830,7 +2832,7 @@ function AxiosError(message, code, config, request, response) {
|
|
|
2830
2832
|
response && (this.response = response);
|
|
2831
2833
|
}
|
|
2832
2834
|
|
|
2833
|
-
utils.inherits(AxiosError, Error, {
|
|
2835
|
+
utils$1.inherits(AxiosError, Error, {
|
|
2834
2836
|
toJSON: function toJSON() {
|
|
2835
2837
|
return {
|
|
2836
2838
|
// Standard
|
|
@@ -2845,7 +2847,7 @@ utils.inherits(AxiosError, Error, {
|
|
|
2845
2847
|
columnNumber: this.columnNumber,
|
|
2846
2848
|
stack: this.stack,
|
|
2847
2849
|
// Axios
|
|
2848
|
-
config: utils.toJSONObject(this.config),
|
|
2850
|
+
config: utils$1.toJSONObject(this.config),
|
|
2849
2851
|
code: this.code,
|
|
2850
2852
|
status: this.response && this.response.status ? this.response.status : null
|
|
2851
2853
|
};
|
|
@@ -2880,7 +2882,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
|
2880
2882
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
2881
2883
|
const axiosError = Object.create(prototype$1);
|
|
2882
2884
|
|
|
2883
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
2885
|
+
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
2884
2886
|
return obj !== Error.prototype;
|
|
2885
2887
|
}, prop => {
|
|
2886
2888
|
return prop !== 'isAxiosError';
|
|
@@ -3031,7 +3033,7 @@ Item.prototype.run = function () {
|
|
|
3031
3033
|
this.fun.apply(null, this.array);
|
|
3032
3034
|
};
|
|
3033
3035
|
var title = 'browser';
|
|
3034
|
-
var platform$
|
|
3036
|
+
var platform$3 = 'browser';
|
|
3035
3037
|
var browser$1 = true;
|
|
3036
3038
|
var env = {};
|
|
3037
3039
|
var argv = [];
|
|
@@ -3113,7 +3115,7 @@ var browser$1$1 = {
|
|
|
3113
3115
|
chdir: chdir,
|
|
3114
3116
|
umask: umask,
|
|
3115
3117
|
hrtime: hrtime,
|
|
3116
|
-
platform: platform$
|
|
3118
|
+
platform: platform$3,
|
|
3117
3119
|
release: release$1,
|
|
3118
3120
|
config: config,
|
|
3119
3121
|
uptime: uptime$1
|
|
@@ -20008,7 +20010,7 @@ var FormData$2 = /*@__PURE__*/getDefaultExportFromCjs(form_data);
|
|
|
20008
20010
|
* @returns {boolean}
|
|
20009
20011
|
*/
|
|
20010
20012
|
function isVisitable(thing) {
|
|
20011
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
20013
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
20012
20014
|
}
|
|
20013
20015
|
|
|
20014
20016
|
/**
|
|
@@ -20019,7 +20021,7 @@ function isVisitable(thing) {
|
|
|
20019
20021
|
* @returns {string} the key without the brackets.
|
|
20020
20022
|
*/
|
|
20021
20023
|
function removeBrackets(key) {
|
|
20022
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
20024
|
+
return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
20023
20025
|
}
|
|
20024
20026
|
|
|
20025
20027
|
/**
|
|
@@ -20048,10 +20050,10 @@ function renderKey(path, key, dots) {
|
|
|
20048
20050
|
* @returns {boolean}
|
|
20049
20051
|
*/
|
|
20050
20052
|
function isFlatArray(arr) {
|
|
20051
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
20053
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
20052
20054
|
}
|
|
20053
20055
|
|
|
20054
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
20056
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
20055
20057
|
return /^is[A-Z]/.test(prop);
|
|
20056
20058
|
});
|
|
20057
20059
|
|
|
@@ -20079,7 +20081,7 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
|
20079
20081
|
* @returns
|
|
20080
20082
|
*/
|
|
20081
20083
|
function toFormData(obj, formData, options) {
|
|
20082
|
-
if (!utils.isObject(obj)) {
|
|
20084
|
+
if (!utils$1.isObject(obj)) {
|
|
20083
20085
|
throw new TypeError('target must be an object');
|
|
20084
20086
|
}
|
|
20085
20087
|
|
|
@@ -20087,13 +20089,13 @@ function toFormData(obj, formData, options) {
|
|
|
20087
20089
|
formData = formData || new (FormData$2 || FormData)();
|
|
20088
20090
|
|
|
20089
20091
|
// eslint-disable-next-line no-param-reassign
|
|
20090
|
-
options = utils.toFlatObject(options, {
|
|
20092
|
+
options = utils$1.toFlatObject(options, {
|
|
20091
20093
|
metaTokens: true,
|
|
20092
20094
|
dots: false,
|
|
20093
20095
|
indexes: false
|
|
20094
20096
|
}, false, function defined(option, source) {
|
|
20095
20097
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
20096
|
-
return !utils.isUndefined(source[option]);
|
|
20098
|
+
return !utils$1.isUndefined(source[option]);
|
|
20097
20099
|
});
|
|
20098
20100
|
|
|
20099
20101
|
const metaTokens = options.metaTokens;
|
|
@@ -20102,24 +20104,24 @@ function toFormData(obj, formData, options) {
|
|
|
20102
20104
|
const dots = options.dots;
|
|
20103
20105
|
const indexes = options.indexes;
|
|
20104
20106
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
20105
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
20107
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
20106
20108
|
|
|
20107
|
-
if (!utils.isFunction(visitor)) {
|
|
20109
|
+
if (!utils$1.isFunction(visitor)) {
|
|
20108
20110
|
throw new TypeError('visitor must be a function');
|
|
20109
20111
|
}
|
|
20110
20112
|
|
|
20111
20113
|
function convertValue(value) {
|
|
20112
20114
|
if (value === null) return '';
|
|
20113
20115
|
|
|
20114
|
-
if (utils.isDate(value)) {
|
|
20116
|
+
if (utils$1.isDate(value)) {
|
|
20115
20117
|
return value.toISOString();
|
|
20116
20118
|
}
|
|
20117
20119
|
|
|
20118
|
-
if (!useBlob && utils.isBlob(value)) {
|
|
20120
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
|
20119
20121
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
20120
20122
|
}
|
|
20121
20123
|
|
|
20122
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
20124
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
20123
20125
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
20124
20126
|
}
|
|
20125
20127
|
|
|
@@ -20140,20 +20142,20 @@ function toFormData(obj, formData, options) {
|
|
|
20140
20142
|
let arr = value;
|
|
20141
20143
|
|
|
20142
20144
|
if (value && !path && typeof value === 'object') {
|
|
20143
|
-
if (utils.endsWith(key, '{}')) {
|
|
20145
|
+
if (utils$1.endsWith(key, '{}')) {
|
|
20144
20146
|
// eslint-disable-next-line no-param-reassign
|
|
20145
20147
|
key = metaTokens ? key : key.slice(0, -2);
|
|
20146
20148
|
// eslint-disable-next-line no-param-reassign
|
|
20147
20149
|
value = JSON.stringify(value);
|
|
20148
20150
|
} else if (
|
|
20149
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
|
20150
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
|
20151
|
+
(utils$1.isArray(value) && isFlatArray(value)) ||
|
|
20152
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
|
20151
20153
|
)) {
|
|
20152
20154
|
// eslint-disable-next-line no-param-reassign
|
|
20153
20155
|
key = removeBrackets(key);
|
|
20154
20156
|
|
|
20155
20157
|
arr.forEach(function each(el, index) {
|
|
20156
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
20158
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
20157
20159
|
// eslint-disable-next-line no-nested-ternary
|
|
20158
20160
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
20159
20161
|
convertValue(el)
|
|
@@ -20181,7 +20183,7 @@ function toFormData(obj, formData, options) {
|
|
|
20181
20183
|
});
|
|
20182
20184
|
|
|
20183
20185
|
function build(value, path) {
|
|
20184
|
-
if (utils.isUndefined(value)) return;
|
|
20186
|
+
if (utils$1.isUndefined(value)) return;
|
|
20185
20187
|
|
|
20186
20188
|
if (stack.indexOf(value) !== -1) {
|
|
20187
20189
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
@@ -20189,9 +20191,9 @@ function toFormData(obj, formData, options) {
|
|
|
20189
20191
|
|
|
20190
20192
|
stack.push(value);
|
|
20191
20193
|
|
|
20192
|
-
utils.forEach(value, function each(el, key) {
|
|
20193
|
-
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
|
20194
|
-
formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
20194
|
+
utils$1.forEach(value, function each(el, key) {
|
|
20195
|
+
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
|
|
20196
|
+
formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
20195
20197
|
);
|
|
20196
20198
|
|
|
20197
20199
|
if (result === true) {
|
|
@@ -20202,7 +20204,7 @@ function toFormData(obj, formData, options) {
|
|
|
20202
20204
|
stack.pop();
|
|
20203
20205
|
}
|
|
20204
20206
|
|
|
20205
|
-
if (!utils.isObject(obj)) {
|
|
20207
|
+
if (!utils$1.isObject(obj)) {
|
|
20206
20208
|
throw new TypeError('data must be an object');
|
|
20207
20209
|
}
|
|
20208
20210
|
|
|
@@ -20306,7 +20308,7 @@ function buildURL(url, params, options) {
|
|
|
20306
20308
|
if (serializeFn) {
|
|
20307
20309
|
serializedParams = serializeFn(params, options);
|
|
20308
20310
|
} else {
|
|
20309
|
-
serializedParams = utils.isURLSearchParams(params) ?
|
|
20311
|
+
serializedParams = utils$1.isURLSearchParams(params) ?
|
|
20310
20312
|
params.toString() :
|
|
20311
20313
|
new AxiosURLSearchParams(params, options).toString(_encode);
|
|
20312
20314
|
}
|
|
@@ -20381,7 +20383,7 @@ class InterceptorManager {
|
|
|
20381
20383
|
* @returns {void}
|
|
20382
20384
|
*/
|
|
20383
20385
|
forEach(fn) {
|
|
20384
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
20386
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
|
20385
20387
|
if (h !== null) {
|
|
20386
20388
|
fn(h);
|
|
20387
20389
|
}
|
|
@@ -20399,7 +20401,7 @@ var transitionalDefaults = {
|
|
|
20399
20401
|
|
|
20400
20402
|
var URLSearchParams = url$1.URLSearchParams;
|
|
20401
20403
|
|
|
20402
|
-
var platform$
|
|
20404
|
+
var platform$2 = {
|
|
20403
20405
|
isNode: true,
|
|
20404
20406
|
classes: {
|
|
20405
20407
|
URLSearchParams,
|
|
@@ -20409,10 +20411,64 @@ var platform$1 = {
|
|
|
20409
20411
|
protocols: [ 'http', 'https', 'file', 'data' ]
|
|
20410
20412
|
};
|
|
20411
20413
|
|
|
20414
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
20415
|
+
|
|
20416
|
+
/**
|
|
20417
|
+
* Determine if we're running in a standard browser environment
|
|
20418
|
+
*
|
|
20419
|
+
* This allows axios to run in a web worker, and react-native.
|
|
20420
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
20421
|
+
*
|
|
20422
|
+
* web workers:
|
|
20423
|
+
* typeof window -> undefined
|
|
20424
|
+
* typeof document -> undefined
|
|
20425
|
+
*
|
|
20426
|
+
* react-native:
|
|
20427
|
+
* navigator.product -> 'ReactNative'
|
|
20428
|
+
* nativescript
|
|
20429
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
20430
|
+
*
|
|
20431
|
+
* @returns {boolean}
|
|
20432
|
+
*/
|
|
20433
|
+
const hasStandardBrowserEnv = (
|
|
20434
|
+
(product) => {
|
|
20435
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
20436
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
|
20437
|
+
|
|
20438
|
+
/**
|
|
20439
|
+
* Determine if we're running in a standard browser webWorker environment
|
|
20440
|
+
*
|
|
20441
|
+
* Although the `isStandardBrowserEnv` method indicates that
|
|
20442
|
+
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
20443
|
+
* filtered out due to its judgment standard
|
|
20444
|
+
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
20445
|
+
* This leads to a problem when axios post `FormData` in webWorker
|
|
20446
|
+
*/
|
|
20447
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
20448
|
+
return (
|
|
20449
|
+
typeof WorkerGlobalScope !== 'undefined' &&
|
|
20450
|
+
// eslint-disable-next-line no-undef
|
|
20451
|
+
self instanceof WorkerGlobalScope &&
|
|
20452
|
+
typeof self.importScripts === 'function'
|
|
20453
|
+
);
|
|
20454
|
+
})();
|
|
20455
|
+
|
|
20456
|
+
var utils = /*#__PURE__*/Object.freeze({
|
|
20457
|
+
__proto__: null,
|
|
20458
|
+
hasBrowserEnv: hasBrowserEnv,
|
|
20459
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
20460
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv
|
|
20461
|
+
});
|
|
20462
|
+
|
|
20463
|
+
var platform$1 = {
|
|
20464
|
+
...utils,
|
|
20465
|
+
...platform$2
|
|
20466
|
+
};
|
|
20467
|
+
|
|
20412
20468
|
function toURLEncodedForm(data, options) {
|
|
20413
20469
|
return toFormData(data, new platform$1.classes.URLSearchParams(), Object.assign({
|
|
20414
20470
|
visitor: function(value, key, path, helpers) {
|
|
20415
|
-
if (utils.isBuffer(value)) {
|
|
20471
|
+
if (platform$1.isNode && utils$1.isBuffer(value)) {
|
|
20416
20472
|
this.append(key, value.toString('base64'));
|
|
20417
20473
|
return false;
|
|
20418
20474
|
}
|
|
@@ -20434,7 +20490,7 @@ function parsePropPath(name) {
|
|
|
20434
20490
|
// foo.x.y.z
|
|
20435
20491
|
// foo-x-y-z
|
|
20436
20492
|
// foo x y z
|
|
20437
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
20493
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
20438
20494
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
20439
20495
|
});
|
|
20440
20496
|
}
|
|
@@ -20471,10 +20527,10 @@ function formDataToJSON(formData) {
|
|
|
20471
20527
|
let name = path[index++];
|
|
20472
20528
|
const isNumericKey = Number.isFinite(+name);
|
|
20473
20529
|
const isLast = index >= path.length;
|
|
20474
|
-
name = !name && utils.isArray(target) ? target.length : name;
|
|
20530
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
20475
20531
|
|
|
20476
20532
|
if (isLast) {
|
|
20477
|
-
if (utils.hasOwnProp(target, name)) {
|
|
20533
|
+
if (utils$1.hasOwnProp(target, name)) {
|
|
20478
20534
|
target[name] = [target[name], value];
|
|
20479
20535
|
} else {
|
|
20480
20536
|
target[name] = value;
|
|
@@ -20483,23 +20539,23 @@ function formDataToJSON(formData) {
|
|
|
20483
20539
|
return !isNumericKey;
|
|
20484
20540
|
}
|
|
20485
20541
|
|
|
20486
|
-
if (!target[name] || !utils.isObject(target[name])) {
|
|
20542
|
+
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
20487
20543
|
target[name] = [];
|
|
20488
20544
|
}
|
|
20489
20545
|
|
|
20490
20546
|
const result = buildPath(path, value, target[name], index);
|
|
20491
20547
|
|
|
20492
|
-
if (result && utils.isArray(target[name])) {
|
|
20548
|
+
if (result && utils$1.isArray(target[name])) {
|
|
20493
20549
|
target[name] = arrayToObject(target[name]);
|
|
20494
20550
|
}
|
|
20495
20551
|
|
|
20496
20552
|
return !isNumericKey;
|
|
20497
20553
|
}
|
|
20498
20554
|
|
|
20499
|
-
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
20555
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
20500
20556
|
const obj = {};
|
|
20501
20557
|
|
|
20502
|
-
utils.forEachEntry(formData, (name, value) => {
|
|
20558
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
|
20503
20559
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
20504
20560
|
});
|
|
20505
20561
|
|
|
@@ -20520,10 +20576,10 @@ function formDataToJSON(formData) {
|
|
|
20520
20576
|
* @returns {string} A stringified version of the rawValue.
|
|
20521
20577
|
*/
|
|
20522
20578
|
function stringifySafely(rawValue, parser, encoder) {
|
|
20523
|
-
if (utils.isString(rawValue)) {
|
|
20579
|
+
if (utils$1.isString(rawValue)) {
|
|
20524
20580
|
try {
|
|
20525
20581
|
(parser || JSON.parse)(rawValue);
|
|
20526
|
-
return utils.trim(rawValue);
|
|
20582
|
+
return utils$1.trim(rawValue);
|
|
20527
20583
|
} catch (e) {
|
|
20528
20584
|
if (e.name !== 'SyntaxError') {
|
|
20529
20585
|
throw e;
|
|
@@ -20543,13 +20599,13 @@ const defaults = {
|
|
|
20543
20599
|
transformRequest: [function transformRequest(data, headers) {
|
|
20544
20600
|
const contentType = headers.getContentType() || '';
|
|
20545
20601
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
20546
|
-
const isObjectPayload = utils.isObject(data);
|
|
20602
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
20547
20603
|
|
|
20548
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
20604
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
20549
20605
|
data = new FormData(data);
|
|
20550
20606
|
}
|
|
20551
20607
|
|
|
20552
|
-
const isFormData = utils.isFormData(data);
|
|
20608
|
+
const isFormData = utils$1.isFormData(data);
|
|
20553
20609
|
|
|
20554
20610
|
if (isFormData) {
|
|
20555
20611
|
if (!hasJSONContentType) {
|
|
@@ -20558,18 +20614,18 @@ const defaults = {
|
|
|
20558
20614
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
20559
20615
|
}
|
|
20560
20616
|
|
|
20561
|
-
if (utils.isArrayBuffer(data) ||
|
|
20562
|
-
utils.isBuffer(data) ||
|
|
20563
|
-
utils.isStream(data) ||
|
|
20564
|
-
utils.isFile(data) ||
|
|
20565
|
-
utils.isBlob(data)
|
|
20617
|
+
if (utils$1.isArrayBuffer(data) ||
|
|
20618
|
+
utils$1.isBuffer(data) ||
|
|
20619
|
+
utils$1.isStream(data) ||
|
|
20620
|
+
utils$1.isFile(data) ||
|
|
20621
|
+
utils$1.isBlob(data)
|
|
20566
20622
|
) {
|
|
20567
20623
|
return data;
|
|
20568
20624
|
}
|
|
20569
|
-
if (utils.isArrayBufferView(data)) {
|
|
20625
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
20570
20626
|
return data.buffer;
|
|
20571
20627
|
}
|
|
20572
|
-
if (utils.isURLSearchParams(data)) {
|
|
20628
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
20573
20629
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
20574
20630
|
return data.toString();
|
|
20575
20631
|
}
|
|
@@ -20581,7 +20637,7 @@ const defaults = {
|
|
|
20581
20637
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
20582
20638
|
}
|
|
20583
20639
|
|
|
20584
|
-
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
20640
|
+
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
20585
20641
|
const _FormData = this.env && this.env.FormData;
|
|
20586
20642
|
|
|
20587
20643
|
return toFormData(
|
|
@@ -20605,7 +20661,7 @@ const defaults = {
|
|
|
20605
20661
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
20606
20662
|
const JSONRequested = this.responseType === 'json';
|
|
20607
20663
|
|
|
20608
|
-
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
20664
|
+
if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
20609
20665
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
20610
20666
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
20611
20667
|
|
|
@@ -20653,7 +20709,7 @@ const defaults = {
|
|
|
20653
20709
|
}
|
|
20654
20710
|
};
|
|
20655
20711
|
|
|
20656
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
20712
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
20657
20713
|
defaults.headers[method] = {};
|
|
20658
20714
|
});
|
|
20659
20715
|
|
|
@@ -20661,7 +20717,7 @@ var defaults$1 = defaults;
|
|
|
20661
20717
|
|
|
20662
20718
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
20663
20719
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
20664
|
-
const ignoreDuplicateOf = utils.toObjectSet([
|
|
20720
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
20665
20721
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
20666
20722
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
20667
20723
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
@@ -20722,7 +20778,7 @@ function normalizeValue(value) {
|
|
|
20722
20778
|
return value;
|
|
20723
20779
|
}
|
|
20724
20780
|
|
|
20725
|
-
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
20781
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
20726
20782
|
}
|
|
20727
20783
|
|
|
20728
20784
|
function parseTokens(str) {
|
|
@@ -20740,7 +20796,7 @@ function parseTokens(str) {
|
|
|
20740
20796
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
20741
20797
|
|
|
20742
20798
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
20743
|
-
if (utils.isFunction(filter)) {
|
|
20799
|
+
if (utils$1.isFunction(filter)) {
|
|
20744
20800
|
return filter.call(this, value, header);
|
|
20745
20801
|
}
|
|
20746
20802
|
|
|
@@ -20748,13 +20804,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
20748
20804
|
value = header;
|
|
20749
20805
|
}
|
|
20750
20806
|
|
|
20751
|
-
if (!utils.isString(value)) return;
|
|
20807
|
+
if (!utils$1.isString(value)) return;
|
|
20752
20808
|
|
|
20753
|
-
if (utils.isString(filter)) {
|
|
20809
|
+
if (utils$1.isString(filter)) {
|
|
20754
20810
|
return value.indexOf(filter) !== -1;
|
|
20755
20811
|
}
|
|
20756
20812
|
|
|
20757
|
-
if (utils.isRegExp(filter)) {
|
|
20813
|
+
if (utils$1.isRegExp(filter)) {
|
|
20758
20814
|
return filter.test(value);
|
|
20759
20815
|
}
|
|
20760
20816
|
}
|
|
@@ -20767,7 +20823,7 @@ function formatHeader(header) {
|
|
|
20767
20823
|
}
|
|
20768
20824
|
|
|
20769
20825
|
function buildAccessors(obj, header) {
|
|
20770
|
-
const accessorName = utils.toCamelCase(' ' + header);
|
|
20826
|
+
const accessorName = utils$1.toCamelCase(' ' + header);
|
|
20771
20827
|
|
|
20772
20828
|
['get', 'set', 'has'].forEach(methodName => {
|
|
20773
20829
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
@@ -20794,7 +20850,7 @@ class AxiosHeaders {
|
|
|
20794
20850
|
throw new Error('header name must be a non-empty string');
|
|
20795
20851
|
}
|
|
20796
20852
|
|
|
20797
|
-
const key = utils.findKey(self, lHeader);
|
|
20853
|
+
const key = utils$1.findKey(self, lHeader);
|
|
20798
20854
|
|
|
20799
20855
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
20800
20856
|
self[key || _header] = normalizeValue(_value);
|
|
@@ -20802,11 +20858,11 @@ class AxiosHeaders {
|
|
|
20802
20858
|
}
|
|
20803
20859
|
|
|
20804
20860
|
const setHeaders = (headers, _rewrite) =>
|
|
20805
|
-
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
20861
|
+
utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
20806
20862
|
|
|
20807
|
-
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
20863
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
20808
20864
|
setHeaders(header, valueOrRewrite);
|
|
20809
|
-
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
20865
|
+
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
20810
20866
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
20811
20867
|
} else {
|
|
20812
20868
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
@@ -20819,7 +20875,7 @@ class AxiosHeaders {
|
|
|
20819
20875
|
header = normalizeHeader(header);
|
|
20820
20876
|
|
|
20821
20877
|
if (header) {
|
|
20822
|
-
const key = utils.findKey(this, header);
|
|
20878
|
+
const key = utils$1.findKey(this, header);
|
|
20823
20879
|
|
|
20824
20880
|
if (key) {
|
|
20825
20881
|
const value = this[key];
|
|
@@ -20832,11 +20888,11 @@ class AxiosHeaders {
|
|
|
20832
20888
|
return parseTokens(value);
|
|
20833
20889
|
}
|
|
20834
20890
|
|
|
20835
|
-
if (utils.isFunction(parser)) {
|
|
20891
|
+
if (utils$1.isFunction(parser)) {
|
|
20836
20892
|
return parser.call(this, value, key);
|
|
20837
20893
|
}
|
|
20838
20894
|
|
|
20839
|
-
if (utils.isRegExp(parser)) {
|
|
20895
|
+
if (utils$1.isRegExp(parser)) {
|
|
20840
20896
|
return parser.exec(value);
|
|
20841
20897
|
}
|
|
20842
20898
|
|
|
@@ -20849,7 +20905,7 @@ class AxiosHeaders {
|
|
|
20849
20905
|
header = normalizeHeader(header);
|
|
20850
20906
|
|
|
20851
20907
|
if (header) {
|
|
20852
|
-
const key = utils.findKey(this, header);
|
|
20908
|
+
const key = utils$1.findKey(this, header);
|
|
20853
20909
|
|
|
20854
20910
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
20855
20911
|
}
|
|
@@ -20865,7 +20921,7 @@ class AxiosHeaders {
|
|
|
20865
20921
|
_header = normalizeHeader(_header);
|
|
20866
20922
|
|
|
20867
20923
|
if (_header) {
|
|
20868
|
-
const key = utils.findKey(self, _header);
|
|
20924
|
+
const key = utils$1.findKey(self, _header);
|
|
20869
20925
|
|
|
20870
20926
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
20871
20927
|
delete self[key];
|
|
@@ -20875,7 +20931,7 @@ class AxiosHeaders {
|
|
|
20875
20931
|
}
|
|
20876
20932
|
}
|
|
20877
20933
|
|
|
20878
|
-
if (utils.isArray(header)) {
|
|
20934
|
+
if (utils$1.isArray(header)) {
|
|
20879
20935
|
header.forEach(deleteHeader);
|
|
20880
20936
|
} else {
|
|
20881
20937
|
deleteHeader(header);
|
|
@@ -20904,8 +20960,8 @@ class AxiosHeaders {
|
|
|
20904
20960
|
const self = this;
|
|
20905
20961
|
const headers = {};
|
|
20906
20962
|
|
|
20907
|
-
utils.forEach(this, (value, header) => {
|
|
20908
|
-
const key = utils.findKey(headers, header);
|
|
20963
|
+
utils$1.forEach(this, (value, header) => {
|
|
20964
|
+
const key = utils$1.findKey(headers, header);
|
|
20909
20965
|
|
|
20910
20966
|
if (key) {
|
|
20911
20967
|
self[key] = normalizeValue(value);
|
|
@@ -20934,8 +20990,8 @@ class AxiosHeaders {
|
|
|
20934
20990
|
toJSON(asStrings) {
|
|
20935
20991
|
const obj = Object.create(null);
|
|
20936
20992
|
|
|
20937
|
-
utils.forEach(this, (value, header) => {
|
|
20938
|
-
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
20993
|
+
utils$1.forEach(this, (value, header) => {
|
|
20994
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
|
20939
20995
|
});
|
|
20940
20996
|
|
|
20941
20997
|
return obj;
|
|
@@ -20982,7 +21038,7 @@ class AxiosHeaders {
|
|
|
20982
21038
|
}
|
|
20983
21039
|
}
|
|
20984
21040
|
|
|
20985
|
-
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
21041
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
20986
21042
|
|
|
20987
21043
|
return this;
|
|
20988
21044
|
}
|
|
@@ -20991,7 +21047,7 @@ class AxiosHeaders {
|
|
|
20991
21047
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
20992
21048
|
|
|
20993
21049
|
// reserved names hotfix
|
|
20994
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
21050
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
20995
21051
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
20996
21052
|
return {
|
|
20997
21053
|
get: () => value,
|
|
@@ -21001,7 +21057,7 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
|
21001
21057
|
}
|
|
21002
21058
|
});
|
|
21003
21059
|
|
|
21004
|
-
utils.freezeMethods(AxiosHeaders);
|
|
21060
|
+
utils$1.freezeMethods(AxiosHeaders);
|
|
21005
21061
|
|
|
21006
21062
|
var AxiosHeaders$1 = AxiosHeaders;
|
|
21007
21063
|
|
|
@@ -21019,7 +21075,7 @@ function transformData(fns, response) {
|
|
|
21019
21075
|
const headers = AxiosHeaders$1.from(context.headers);
|
|
21020
21076
|
let data = context.data;
|
|
21021
21077
|
|
|
21022
|
-
utils.forEach(fns, function transform(fn) {
|
|
21078
|
+
utils$1.forEach(fns, function transform(fn) {
|
|
21023
21079
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
21024
21080
|
});
|
|
21025
21081
|
|
|
@@ -21047,7 +21103,7 @@ function CanceledError(message, config, request) {
|
|
|
21047
21103
|
this.name = 'CanceledError';
|
|
21048
21104
|
}
|
|
21049
21105
|
|
|
21050
|
-
utils.inherits(CanceledError, AxiosError, {
|
|
21106
|
+
utils$1.inherits(CanceledError, AxiosError, {
|
|
21051
21107
|
__CANCEL__: true
|
|
21052
21108
|
});
|
|
21053
21109
|
|
|
@@ -21712,1077 +21768,796 @@ var require$$4 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_assert);
|
|
|
21712
21768
|
|
|
21713
21769
|
var src = {exports: {}};
|
|
21714
21770
|
|
|
21715
|
-
var
|
|
21771
|
+
var node = {exports: {}};
|
|
21716
21772
|
|
|
21717
|
-
|
|
21718
|
-
|
|
21719
|
-
*/
|
|
21773
|
+
// MIT lisence
|
|
21774
|
+
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
21720
21775
|
|
|
21721
|
-
|
|
21722
|
-
|
|
21776
|
+
function isatty() {
|
|
21777
|
+
return false;
|
|
21778
|
+
}
|
|
21723
21779
|
|
|
21724
|
-
function
|
|
21725
|
-
|
|
21726
|
-
|
|
21727
|
-
var s = 1000;
|
|
21728
|
-
var m = s * 60;
|
|
21729
|
-
var h = m * 60;
|
|
21730
|
-
var d = h * 24;
|
|
21731
|
-
var w = d * 7;
|
|
21732
|
-
var y = d * 365.25;
|
|
21780
|
+
function ReadStream() {
|
|
21781
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
21782
|
+
}
|
|
21733
21783
|
|
|
21734
|
-
|
|
21735
|
-
|
|
21736
|
-
|
|
21737
|
-
* Options:
|
|
21738
|
-
*
|
|
21739
|
-
* - `long` verbose formatting [false]
|
|
21740
|
-
*
|
|
21741
|
-
* @param {String|Number} val
|
|
21742
|
-
* @param {Object} [options]
|
|
21743
|
-
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
21744
|
-
* @return {String|Number}
|
|
21745
|
-
* @api public
|
|
21746
|
-
*/
|
|
21784
|
+
function WriteStream() {
|
|
21785
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
21786
|
+
}
|
|
21747
21787
|
|
|
21748
|
-
|
|
21749
|
-
|
|
21750
|
-
|
|
21751
|
-
|
|
21752
|
-
|
|
21753
|
-
} else if (type === 'number' && isFinite(val)) {
|
|
21754
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
21755
|
-
}
|
|
21756
|
-
throw new Error(
|
|
21757
|
-
'val is not a non-empty string or a valid number. val=' +
|
|
21758
|
-
JSON.stringify(val)
|
|
21759
|
-
);
|
|
21760
|
-
};
|
|
21788
|
+
var _polyfillNode_tty = {
|
|
21789
|
+
isatty: isatty,
|
|
21790
|
+
ReadStream: ReadStream,
|
|
21791
|
+
WriteStream: WriteStream
|
|
21792
|
+
};
|
|
21761
21793
|
|
|
21762
|
-
|
|
21763
|
-
|
|
21764
|
-
|
|
21765
|
-
|
|
21766
|
-
|
|
21767
|
-
|
|
21768
|
-
|
|
21794
|
+
var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({
|
|
21795
|
+
__proto__: null,
|
|
21796
|
+
ReadStream: ReadStream,
|
|
21797
|
+
WriteStream: WriteStream,
|
|
21798
|
+
default: _polyfillNode_tty,
|
|
21799
|
+
isatty: isatty
|
|
21800
|
+
});
|
|
21769
21801
|
|
|
21770
|
-
|
|
21771
|
-
str = String(str);
|
|
21772
|
-
if (str.length > 100) {
|
|
21773
|
-
return;
|
|
21774
|
-
}
|
|
21775
|
-
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(
|
|
21776
|
-
str
|
|
21777
|
-
);
|
|
21778
|
-
if (!match) {
|
|
21779
|
-
return;
|
|
21780
|
-
}
|
|
21781
|
-
var n = parseFloat(match[1]);
|
|
21782
|
-
var type = (match[2] || 'ms').toLowerCase();
|
|
21783
|
-
switch (type) {
|
|
21784
|
-
case 'years':
|
|
21785
|
-
case 'year':
|
|
21786
|
-
case 'yrs':
|
|
21787
|
-
case 'yr':
|
|
21788
|
-
case 'y':
|
|
21789
|
-
return n * y;
|
|
21790
|
-
case 'weeks':
|
|
21791
|
-
case 'week':
|
|
21792
|
-
case 'w':
|
|
21793
|
-
return n * w;
|
|
21794
|
-
case 'days':
|
|
21795
|
-
case 'day':
|
|
21796
|
-
case 'd':
|
|
21797
|
-
return n * d;
|
|
21798
|
-
case 'hours':
|
|
21799
|
-
case 'hour':
|
|
21800
|
-
case 'hrs':
|
|
21801
|
-
case 'hr':
|
|
21802
|
-
case 'h':
|
|
21803
|
-
return n * h;
|
|
21804
|
-
case 'minutes':
|
|
21805
|
-
case 'minute':
|
|
21806
|
-
case 'mins':
|
|
21807
|
-
case 'min':
|
|
21808
|
-
case 'm':
|
|
21809
|
-
return n * m;
|
|
21810
|
-
case 'seconds':
|
|
21811
|
-
case 'second':
|
|
21812
|
-
case 'secs':
|
|
21813
|
-
case 'sec':
|
|
21814
|
-
case 's':
|
|
21815
|
-
return n * s;
|
|
21816
|
-
case 'milliseconds':
|
|
21817
|
-
case 'millisecond':
|
|
21818
|
-
case 'msecs':
|
|
21819
|
-
case 'msec':
|
|
21820
|
-
case 'ms':
|
|
21821
|
-
return n;
|
|
21822
|
-
default:
|
|
21823
|
-
return undefined;
|
|
21824
|
-
}
|
|
21825
|
-
}
|
|
21802
|
+
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_tty$1);
|
|
21826
21803
|
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
*
|
|
21830
|
-
* @param {Number} ms
|
|
21831
|
-
* @return {String}
|
|
21832
|
-
* @api private
|
|
21833
|
-
*/
|
|
21804
|
+
/*
|
|
21805
|
+
The MIT License (MIT)
|
|
21834
21806
|
|
|
21835
|
-
|
|
21836
|
-
var msAbs = Math.abs(ms);
|
|
21837
|
-
if (msAbs >= d) {
|
|
21838
|
-
return Math.round(ms / d) + 'd';
|
|
21839
|
-
}
|
|
21840
|
-
if (msAbs >= h) {
|
|
21841
|
-
return Math.round(ms / h) + 'h';
|
|
21842
|
-
}
|
|
21843
|
-
if (msAbs >= m) {
|
|
21844
|
-
return Math.round(ms / m) + 'm';
|
|
21845
|
-
}
|
|
21846
|
-
if (msAbs >= s) {
|
|
21847
|
-
return Math.round(ms / s) + 's';
|
|
21848
|
-
}
|
|
21849
|
-
return ms + 'ms';
|
|
21850
|
-
}
|
|
21807
|
+
Copyright (c) 2016 CoderPuppy
|
|
21851
21808
|
|
|
21852
|
-
|
|
21853
|
-
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
|
|
21857
|
-
|
|
21858
|
-
*/
|
|
21809
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
21810
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
21811
|
+
in the Software without restriction, including without limitation the rights
|
|
21812
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21813
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21814
|
+
furnished to do so, subject to the following conditions:
|
|
21859
21815
|
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
if (msAbs >= d) {
|
|
21863
|
-
return plural(ms, msAbs, d, 'day');
|
|
21864
|
-
}
|
|
21865
|
-
if (msAbs >= h) {
|
|
21866
|
-
return plural(ms, msAbs, h, 'hour');
|
|
21867
|
-
}
|
|
21868
|
-
if (msAbs >= m) {
|
|
21869
|
-
return plural(ms, msAbs, m, 'minute');
|
|
21870
|
-
}
|
|
21871
|
-
if (msAbs >= s) {
|
|
21872
|
-
return plural(ms, msAbs, s, 'second');
|
|
21873
|
-
}
|
|
21874
|
-
return ms + ' ms';
|
|
21875
|
-
}
|
|
21816
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21817
|
+
copies or substantial portions of the Software.
|
|
21876
21818
|
|
|
21877
|
-
|
|
21878
|
-
|
|
21879
|
-
|
|
21819
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21820
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21821
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21822
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21823
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21824
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21825
|
+
SOFTWARE.
|
|
21880
21826
|
|
|
21881
|
-
|
|
21882
|
-
|
|
21883
|
-
|
|
21884
|
-
|
|
21885
|
-
|
|
21827
|
+
*/
|
|
21828
|
+
var _endianness;
|
|
21829
|
+
function endianness() {
|
|
21830
|
+
if (typeof _endianness === 'undefined') {
|
|
21831
|
+
var a = new ArrayBuffer(2);
|
|
21832
|
+
var b = new Uint8Array(a);
|
|
21833
|
+
var c = new Uint16Array(a);
|
|
21834
|
+
b[0] = 1;
|
|
21835
|
+
b[1] = 2;
|
|
21836
|
+
if (c[0] === 258) {
|
|
21837
|
+
_endianness = 'BE';
|
|
21838
|
+
} else if (c[0] === 513){
|
|
21839
|
+
_endianness = 'LE';
|
|
21840
|
+
} else {
|
|
21841
|
+
throw new Error('unable to figure out endianess');
|
|
21842
|
+
}
|
|
21843
|
+
}
|
|
21844
|
+
return _endianness;
|
|
21886
21845
|
}
|
|
21887
21846
|
|
|
21888
|
-
|
|
21889
|
-
|
|
21847
|
+
function hostname() {
|
|
21848
|
+
if (typeof global$1.location !== 'undefined') {
|
|
21849
|
+
return global$1.location.hostname
|
|
21850
|
+
} else return '';
|
|
21851
|
+
}
|
|
21890
21852
|
|
|
21891
|
-
function
|
|
21892
|
-
|
|
21893
|
-
|
|
21894
|
-
/**
|
|
21895
|
-
* This is the common logic for both the Node.js and web browser
|
|
21896
|
-
* implementations of `debug()`.
|
|
21897
|
-
*/
|
|
21853
|
+
function loadavg() {
|
|
21854
|
+
return [];
|
|
21855
|
+
}
|
|
21898
21856
|
|
|
21899
|
-
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
createDebug.coerce = coerce;
|
|
21903
|
-
createDebug.disable = disable;
|
|
21904
|
-
createDebug.enable = enable;
|
|
21905
|
-
createDebug.enabled = enabled;
|
|
21906
|
-
createDebug.humanize = requireMs();
|
|
21907
|
-
createDebug.destroy = destroy;
|
|
21857
|
+
function uptime() {
|
|
21858
|
+
return 0;
|
|
21859
|
+
}
|
|
21908
21860
|
|
|
21909
|
-
|
|
21910
|
-
|
|
21911
|
-
|
|
21861
|
+
function freemem() {
|
|
21862
|
+
return Number.MAX_VALUE;
|
|
21863
|
+
}
|
|
21912
21864
|
|
|
21913
|
-
|
|
21914
|
-
|
|
21915
|
-
|
|
21865
|
+
function totalmem() {
|
|
21866
|
+
return Number.MAX_VALUE;
|
|
21867
|
+
}
|
|
21916
21868
|
|
|
21917
|
-
|
|
21918
|
-
|
|
21869
|
+
function cpus() {
|
|
21870
|
+
return [];
|
|
21871
|
+
}
|
|
21919
21872
|
|
|
21920
|
-
|
|
21921
|
-
|
|
21922
|
-
|
|
21923
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
21924
|
-
*/
|
|
21925
|
-
createDebug.formatters = {};
|
|
21873
|
+
function type() {
|
|
21874
|
+
return 'Browser';
|
|
21875
|
+
}
|
|
21926
21876
|
|
|
21927
|
-
|
|
21928
|
-
|
|
21929
|
-
|
|
21930
|
-
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
function selectColor(namespace) {
|
|
21934
|
-
let hash = 0;
|
|
21877
|
+
function release () {
|
|
21878
|
+
if (typeof global$1.navigator !== 'undefined') {
|
|
21879
|
+
return global$1.navigator.appVersion;
|
|
21880
|
+
}
|
|
21881
|
+
return '';
|
|
21882
|
+
}
|
|
21935
21883
|
|
|
21936
|
-
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
}
|
|
21884
|
+
function networkInterfaces () {
|
|
21885
|
+
return {};
|
|
21886
|
+
}
|
|
21940
21887
|
|
|
21941
|
-
|
|
21942
|
-
|
|
21943
|
-
|
|
21888
|
+
function getNetworkInterfaces () {
|
|
21889
|
+
return {};
|
|
21890
|
+
}
|
|
21944
21891
|
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
* @param {String} namespace
|
|
21949
|
-
* @return {Function}
|
|
21950
|
-
* @api public
|
|
21951
|
-
*/
|
|
21952
|
-
function createDebug(namespace) {
|
|
21953
|
-
let prevTime;
|
|
21954
|
-
let enableOverride = null;
|
|
21955
|
-
let namespacesCache;
|
|
21956
|
-
let enabledCache;
|
|
21892
|
+
function arch() {
|
|
21893
|
+
return 'javascript';
|
|
21894
|
+
}
|
|
21957
21895
|
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
return;
|
|
21962
|
-
}
|
|
21896
|
+
function platform() {
|
|
21897
|
+
return 'browser';
|
|
21898
|
+
}
|
|
21963
21899
|
|
|
21964
|
-
|
|
21900
|
+
function tmpDir() {
|
|
21901
|
+
return '/tmp';
|
|
21902
|
+
}
|
|
21903
|
+
var tmpdir = tmpDir;
|
|
21965
21904
|
|
|
21966
|
-
|
|
21967
|
-
const curr = Number(new Date());
|
|
21968
|
-
const ms = curr - (prevTime || curr);
|
|
21969
|
-
self.diff = ms;
|
|
21970
|
-
self.prev = prevTime;
|
|
21971
|
-
self.curr = curr;
|
|
21972
|
-
prevTime = curr;
|
|
21905
|
+
var EOL = '\n';
|
|
21973
21906
|
|
|
21974
|
-
|
|
21907
|
+
function homedir(){
|
|
21908
|
+
return '$HOME'
|
|
21909
|
+
}
|
|
21975
21910
|
|
|
21976
|
-
|
|
21977
|
-
|
|
21978
|
-
|
|
21979
|
-
|
|
21911
|
+
var _polyfillNode_os = {
|
|
21912
|
+
homedir: homedir,
|
|
21913
|
+
EOL: EOL,
|
|
21914
|
+
arch: arch,
|
|
21915
|
+
platform: platform,
|
|
21916
|
+
tmpdir: tmpdir,
|
|
21917
|
+
tmpDir: tmpDir,
|
|
21918
|
+
networkInterfaces:networkInterfaces,
|
|
21919
|
+
getNetworkInterfaces: getNetworkInterfaces,
|
|
21920
|
+
release: release,
|
|
21921
|
+
type: type,
|
|
21922
|
+
cpus: cpus,
|
|
21923
|
+
totalmem: totalmem,
|
|
21924
|
+
freemem: freemem,
|
|
21925
|
+
uptime: uptime,
|
|
21926
|
+
loadavg: loadavg,
|
|
21927
|
+
hostname: hostname,
|
|
21928
|
+
endianness: endianness,
|
|
21929
|
+
};
|
|
21980
21930
|
|
|
21981
|
-
|
|
21982
|
-
|
|
21983
|
-
|
|
21984
|
-
|
|
21985
|
-
|
|
21986
|
-
|
|
21987
|
-
|
|
21988
|
-
|
|
21989
|
-
|
|
21990
|
-
|
|
21991
|
-
|
|
21992
|
-
|
|
21931
|
+
var _polyfillNode_os$1 = /*#__PURE__*/Object.freeze({
|
|
21932
|
+
__proto__: null,
|
|
21933
|
+
EOL: EOL,
|
|
21934
|
+
arch: arch,
|
|
21935
|
+
cpus: cpus,
|
|
21936
|
+
default: _polyfillNode_os,
|
|
21937
|
+
endianness: endianness,
|
|
21938
|
+
freemem: freemem,
|
|
21939
|
+
getNetworkInterfaces: getNetworkInterfaces,
|
|
21940
|
+
homedir: homedir,
|
|
21941
|
+
hostname: hostname,
|
|
21942
|
+
loadavg: loadavg,
|
|
21943
|
+
networkInterfaces: networkInterfaces,
|
|
21944
|
+
platform: platform,
|
|
21945
|
+
release: release,
|
|
21946
|
+
tmpDir: tmpDir,
|
|
21947
|
+
tmpdir: tmpdir,
|
|
21948
|
+
totalmem: totalmem,
|
|
21949
|
+
type: type,
|
|
21950
|
+
uptime: uptime
|
|
21951
|
+
});
|
|
21993
21952
|
|
|
21994
|
-
|
|
21995
|
-
args.splice(index, 1);
|
|
21996
|
-
index--;
|
|
21997
|
-
}
|
|
21998
|
-
return match;
|
|
21999
|
-
});
|
|
21953
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_os$1);
|
|
22000
21954
|
|
|
22001
|
-
|
|
22002
|
-
|
|
21955
|
+
var hasFlag;
|
|
21956
|
+
var hasRequiredHasFlag;
|
|
22003
21957
|
|
|
22004
|
-
|
|
22005
|
-
|
|
22006
|
-
|
|
21958
|
+
function requireHasFlag () {
|
|
21959
|
+
if (hasRequiredHasFlag) return hasFlag;
|
|
21960
|
+
hasRequiredHasFlag = 1;
|
|
21961
|
+
hasFlag = (flag, argv) => {
|
|
21962
|
+
argv = argv || process.argv;
|
|
21963
|
+
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
21964
|
+
const pos = argv.indexOf(prefix + flag);
|
|
21965
|
+
const terminatorPos = argv.indexOf('--');
|
|
21966
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
21967
|
+
};
|
|
21968
|
+
return hasFlag;
|
|
21969
|
+
}
|
|
22007
21970
|
|
|
22008
|
-
|
|
22009
|
-
|
|
22010
|
-
debug.color = createDebug.selectColor(namespace);
|
|
22011
|
-
debug.extend = extend;
|
|
22012
|
-
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
21971
|
+
var supportsColor_1;
|
|
21972
|
+
var hasRequiredSupportsColor;
|
|
22013
21973
|
|
|
22014
|
-
|
|
22015
|
-
|
|
22016
|
-
|
|
22017
|
-
|
|
22018
|
-
|
|
22019
|
-
return enableOverride;
|
|
22020
|
-
}
|
|
22021
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
22022
|
-
namespacesCache = createDebug.namespaces;
|
|
22023
|
-
enabledCache = createDebug.enabled(namespace);
|
|
22024
|
-
}
|
|
21974
|
+
function requireSupportsColor () {
|
|
21975
|
+
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
21976
|
+
hasRequiredSupportsColor = 1;
|
|
21977
|
+
const os = require$$0;
|
|
21978
|
+
const hasFlag = requireHasFlag();
|
|
22025
21979
|
|
|
22026
|
-
|
|
22027
|
-
},
|
|
22028
|
-
set: v => {
|
|
22029
|
-
enableOverride = v;
|
|
22030
|
-
}
|
|
22031
|
-
});
|
|
21980
|
+
const env = process.env;
|
|
22032
21981
|
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
21982
|
+
let forceColor;
|
|
21983
|
+
if (hasFlag('no-color') ||
|
|
21984
|
+
hasFlag('no-colors') ||
|
|
21985
|
+
hasFlag('color=false')) {
|
|
21986
|
+
forceColor = false;
|
|
21987
|
+
} else if (hasFlag('color') ||
|
|
21988
|
+
hasFlag('colors') ||
|
|
21989
|
+
hasFlag('color=true') ||
|
|
21990
|
+
hasFlag('color=always')) {
|
|
21991
|
+
forceColor = true;
|
|
21992
|
+
}
|
|
21993
|
+
if ('FORCE_COLOR' in env) {
|
|
21994
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
21995
|
+
}
|
|
22037
21996
|
|
|
22038
|
-
|
|
21997
|
+
function translateLevel(level) {
|
|
21998
|
+
if (level === 0) {
|
|
21999
|
+
return false;
|
|
22039
22000
|
}
|
|
22040
22001
|
|
|
22041
|
-
|
|
22042
|
-
|
|
22043
|
-
|
|
22044
|
-
|
|
22045
|
-
|
|
22002
|
+
return {
|
|
22003
|
+
level,
|
|
22004
|
+
hasBasic: true,
|
|
22005
|
+
has256: level >= 2,
|
|
22006
|
+
has16m: level >= 3
|
|
22007
|
+
};
|
|
22008
|
+
}
|
|
22046
22009
|
|
|
22047
|
-
|
|
22048
|
-
|
|
22049
|
-
|
|
22050
|
-
|
|
22051
|
-
* @param {String} namespaces
|
|
22052
|
-
* @api public
|
|
22053
|
-
*/
|
|
22054
|
-
function enable(namespaces) {
|
|
22055
|
-
createDebug.save(namespaces);
|
|
22056
|
-
createDebug.namespaces = namespaces;
|
|
22010
|
+
function supportsColor(stream) {
|
|
22011
|
+
if (forceColor === false) {
|
|
22012
|
+
return 0;
|
|
22013
|
+
}
|
|
22057
22014
|
|
|
22058
|
-
|
|
22059
|
-
|
|
22015
|
+
if (hasFlag('color=16m') ||
|
|
22016
|
+
hasFlag('color=full') ||
|
|
22017
|
+
hasFlag('color=truecolor')) {
|
|
22018
|
+
return 3;
|
|
22019
|
+
}
|
|
22060
22020
|
|
|
22061
|
-
|
|
22062
|
-
|
|
22063
|
-
|
|
22021
|
+
if (hasFlag('color=256')) {
|
|
22022
|
+
return 2;
|
|
22023
|
+
}
|
|
22064
22024
|
|
|
22065
|
-
|
|
22066
|
-
|
|
22067
|
-
|
|
22068
|
-
continue;
|
|
22069
|
-
}
|
|
22025
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
22026
|
+
return 0;
|
|
22027
|
+
}
|
|
22070
22028
|
|
|
22071
|
-
|
|
22029
|
+
const min = forceColor ? 1 : 0;
|
|
22072
22030
|
|
|
22073
|
-
|
|
22074
|
-
|
|
22075
|
-
|
|
22076
|
-
|
|
22077
|
-
|
|
22031
|
+
if (process.platform === 'win32') {
|
|
22032
|
+
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
22033
|
+
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
22034
|
+
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
22035
|
+
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
22036
|
+
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
22037
|
+
// that supports 16m/TrueColor.
|
|
22038
|
+
const osRelease = os.release().split('.');
|
|
22039
|
+
if (
|
|
22040
|
+
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
22041
|
+
Number(osRelease[0]) >= 10 &&
|
|
22042
|
+
Number(osRelease[2]) >= 10586
|
|
22043
|
+
) {
|
|
22044
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
22078
22045
|
}
|
|
22079
|
-
}
|
|
22080
22046
|
|
|
22081
|
-
|
|
22082
|
-
* Disable debug output.
|
|
22083
|
-
*
|
|
22084
|
-
* @return {String} namespaces
|
|
22085
|
-
* @api public
|
|
22086
|
-
*/
|
|
22087
|
-
function disable() {
|
|
22088
|
-
const namespaces = [
|
|
22089
|
-
...createDebug.names.map(toNamespace),
|
|
22090
|
-
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
22091
|
-
].join(',');
|
|
22092
|
-
createDebug.enable('');
|
|
22093
|
-
return namespaces;
|
|
22047
|
+
return 1;
|
|
22094
22048
|
}
|
|
22095
22049
|
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
|
|
22099
|
-
* @param {String} name
|
|
22100
|
-
* @return {Boolean}
|
|
22101
|
-
* @api public
|
|
22102
|
-
*/
|
|
22103
|
-
function enabled(name) {
|
|
22104
|
-
if (name[name.length - 1] === '*') {
|
|
22105
|
-
return true;
|
|
22050
|
+
if ('CI' in env) {
|
|
22051
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
22052
|
+
return 1;
|
|
22106
22053
|
}
|
|
22107
22054
|
|
|
22108
|
-
|
|
22109
|
-
|
|
22055
|
+
return min;
|
|
22056
|
+
}
|
|
22110
22057
|
|
|
22111
|
-
|
|
22112
|
-
|
|
22113
|
-
|
|
22114
|
-
}
|
|
22115
|
-
}
|
|
22058
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
22059
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
22060
|
+
}
|
|
22116
22061
|
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
|
|
22120
|
-
|
|
22062
|
+
if (env.COLORTERM === 'truecolor') {
|
|
22063
|
+
return 3;
|
|
22064
|
+
}
|
|
22065
|
+
|
|
22066
|
+
if ('TERM_PROGRAM' in env) {
|
|
22067
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
22068
|
+
|
|
22069
|
+
switch (env.TERM_PROGRAM) {
|
|
22070
|
+
case 'iTerm.app':
|
|
22071
|
+
return version >= 3 ? 3 : 2;
|
|
22072
|
+
case 'Apple_Terminal':
|
|
22073
|
+
return 2;
|
|
22074
|
+
// No default
|
|
22121
22075
|
}
|
|
22076
|
+
}
|
|
22122
22077
|
|
|
22123
|
-
|
|
22078
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
22079
|
+
return 2;
|
|
22124
22080
|
}
|
|
22125
22081
|
|
|
22126
|
-
|
|
22127
|
-
|
|
22128
|
-
*
|
|
22129
|
-
* @param {RegExp} regxep
|
|
22130
|
-
* @return {String} namespace
|
|
22131
|
-
* @api private
|
|
22132
|
-
*/
|
|
22133
|
-
function toNamespace(regexp) {
|
|
22134
|
-
return regexp.toString()
|
|
22135
|
-
.substring(2, regexp.toString().length - 2)
|
|
22136
|
-
.replace(/\.\*\?$/, '*');
|
|
22082
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
22083
|
+
return 1;
|
|
22137
22084
|
}
|
|
22138
22085
|
|
|
22139
|
-
|
|
22140
|
-
|
|
22141
|
-
*
|
|
22142
|
-
* @param {Mixed} val
|
|
22143
|
-
* @return {Mixed}
|
|
22144
|
-
* @api private
|
|
22145
|
-
*/
|
|
22146
|
-
function coerce(val) {
|
|
22147
|
-
if (val instanceof Error) {
|
|
22148
|
-
return val.stack || val.message;
|
|
22149
|
-
}
|
|
22150
|
-
return val;
|
|
22086
|
+
if ('COLORTERM' in env) {
|
|
22087
|
+
return 1;
|
|
22151
22088
|
}
|
|
22152
22089
|
|
|
22153
|
-
|
|
22154
|
-
|
|
22155
|
-
* XXX It WILL be removed in the next major release.
|
|
22156
|
-
*/
|
|
22157
|
-
function destroy() {
|
|
22158
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22090
|
+
if (env.TERM === 'dumb') {
|
|
22091
|
+
return min;
|
|
22159
22092
|
}
|
|
22160
22093
|
|
|
22161
|
-
|
|
22094
|
+
return min;
|
|
22095
|
+
}
|
|
22162
22096
|
|
|
22163
|
-
|
|
22097
|
+
function getSupportLevel(stream) {
|
|
22098
|
+
const level = supportsColor(stream);
|
|
22099
|
+
return translateLevel(level);
|
|
22164
22100
|
}
|
|
22165
22101
|
|
|
22166
|
-
|
|
22167
|
-
|
|
22102
|
+
supportsColor_1 = {
|
|
22103
|
+
supportsColor: getSupportLevel,
|
|
22104
|
+
stdout: getSupportLevel(process.stdout),
|
|
22105
|
+
stderr: getSupportLevel(process.stderr)
|
|
22106
|
+
};
|
|
22107
|
+
return supportsColor_1;
|
|
22168
22108
|
}
|
|
22169
22109
|
|
|
22170
|
-
|
|
22110
|
+
/**
|
|
22111
|
+
* Helpers.
|
|
22112
|
+
*/
|
|
22171
22113
|
|
|
22172
|
-
var
|
|
22114
|
+
var ms;
|
|
22115
|
+
var hasRequiredMs;
|
|
22173
22116
|
|
|
22174
|
-
function
|
|
22175
|
-
if (
|
|
22176
|
-
|
|
22177
|
-
|
|
22178
|
-
|
|
22179
|
-
|
|
22180
|
-
|
|
22117
|
+
function requireMs () {
|
|
22118
|
+
if (hasRequiredMs) return ms;
|
|
22119
|
+
hasRequiredMs = 1;
|
|
22120
|
+
var s = 1000;
|
|
22121
|
+
var m = s * 60;
|
|
22122
|
+
var h = m * 60;
|
|
22123
|
+
var d = h * 24;
|
|
22124
|
+
var w = d * 7;
|
|
22125
|
+
var y = d * 365.25;
|
|
22181
22126
|
|
|
22182
|
-
|
|
22183
|
-
|
|
22184
|
-
|
|
22185
|
-
|
|
22186
|
-
|
|
22187
|
-
|
|
22188
|
-
|
|
22127
|
+
/**
|
|
22128
|
+
* Parse or format the given `val`.
|
|
22129
|
+
*
|
|
22130
|
+
* Options:
|
|
22131
|
+
*
|
|
22132
|
+
* - `long` verbose formatting [false]
|
|
22133
|
+
*
|
|
22134
|
+
* @param {String|Number} val
|
|
22135
|
+
* @param {Object} [options]
|
|
22136
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
22137
|
+
* @return {String|Number}
|
|
22138
|
+
* @api public
|
|
22139
|
+
*/
|
|
22189
22140
|
|
|
22190
|
-
|
|
22191
|
-
|
|
22192
|
-
|
|
22193
|
-
|
|
22194
|
-
|
|
22195
|
-
|
|
22196
|
-
|
|
22141
|
+
ms = function(val, options) {
|
|
22142
|
+
options = options || {};
|
|
22143
|
+
var type = typeof val;
|
|
22144
|
+
if (type === 'string' && val.length > 0) {
|
|
22145
|
+
return parse(val);
|
|
22146
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
22147
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
22148
|
+
}
|
|
22149
|
+
throw new Error(
|
|
22150
|
+
'val is not a non-empty string or a valid number. val=' +
|
|
22151
|
+
JSON.stringify(val)
|
|
22152
|
+
);
|
|
22153
|
+
};
|
|
22197
22154
|
|
|
22198
|
-
|
|
22199
|
-
|
|
22200
|
-
|
|
22155
|
+
/**
|
|
22156
|
+
* Parse the given `str` and return milliseconds.
|
|
22157
|
+
*
|
|
22158
|
+
* @param {String} str
|
|
22159
|
+
* @return {Number}
|
|
22160
|
+
* @api private
|
|
22161
|
+
*/
|
|
22201
22162
|
|
|
22202
|
-
|
|
22203
|
-
|
|
22204
|
-
|
|
22205
|
-
|
|
22206
|
-
|
|
22207
|
-
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22222
|
-
|
|
22223
|
-
|
|
22224
|
-
|
|
22225
|
-
|
|
22226
|
-
|
|
22227
|
-
|
|
22228
|
-
|
|
22229
|
-
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22236
|
-
|
|
22237
|
-
|
|
22238
|
-
|
|
22239
|
-
|
|
22240
|
-
|
|
22241
|
-
|
|
22242
|
-
|
|
22243
|
-
|
|
22244
|
-
|
|
22245
|
-
|
|
22246
|
-
|
|
22247
|
-
|
|
22248
|
-
|
|
22249
|
-
|
|
22250
|
-
|
|
22251
|
-
|
|
22252
|
-
|
|
22253
|
-
|
|
22254
|
-
|
|
22255
|
-
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
'#CC9933',
|
|
22259
|
-
'#CCCC00',
|
|
22260
|
-
'#CCCC33',
|
|
22261
|
-
'#FF0000',
|
|
22262
|
-
'#FF0033',
|
|
22263
|
-
'#FF0066',
|
|
22264
|
-
'#FF0099',
|
|
22265
|
-
'#FF00CC',
|
|
22266
|
-
'#FF00FF',
|
|
22267
|
-
'#FF3300',
|
|
22268
|
-
'#FF3333',
|
|
22269
|
-
'#FF3366',
|
|
22270
|
-
'#FF3399',
|
|
22271
|
-
'#FF33CC',
|
|
22272
|
-
'#FF33FF',
|
|
22273
|
-
'#FF6600',
|
|
22274
|
-
'#FF6633',
|
|
22275
|
-
'#FF9900',
|
|
22276
|
-
'#FF9933',
|
|
22277
|
-
'#FFCC00',
|
|
22278
|
-
'#FFCC33'
|
|
22279
|
-
];
|
|
22280
|
-
|
|
22281
|
-
/**
|
|
22282
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
22283
|
-
* and the Firebug extension (any Firefox version) are known
|
|
22284
|
-
* to support "%c" CSS customizations.
|
|
22285
|
-
*
|
|
22286
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
22287
|
-
*/
|
|
22288
|
-
|
|
22289
|
-
// eslint-disable-next-line complexity
|
|
22290
|
-
function useColors() {
|
|
22291
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
|
22292
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
22293
|
-
// explicitly
|
|
22294
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
22295
|
-
return true;
|
|
22296
|
-
}
|
|
22297
|
-
|
|
22298
|
-
// Internet Explorer and Edge do not support colors.
|
|
22299
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
22300
|
-
return false;
|
|
22301
|
-
}
|
|
22302
|
-
|
|
22303
|
-
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
22304
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
22305
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
22306
|
-
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
22307
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
22308
|
-
// Is firefox >= v31?
|
|
22309
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
22310
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
22311
|
-
// Double check webkit in userAgent just in case we are in a worker
|
|
22312
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
22313
|
-
}
|
|
22314
|
-
|
|
22315
|
-
/**
|
|
22316
|
-
* Colorize log arguments if enabled.
|
|
22317
|
-
*
|
|
22318
|
-
* @api public
|
|
22319
|
-
*/
|
|
22320
|
-
|
|
22321
|
-
function formatArgs(args) {
|
|
22322
|
-
args[0] = (this.useColors ? '%c' : '') +
|
|
22323
|
-
this.namespace +
|
|
22324
|
-
(this.useColors ? ' %c' : ' ') +
|
|
22325
|
-
args[0] +
|
|
22326
|
-
(this.useColors ? '%c ' : ' ') +
|
|
22327
|
-
'+' + module.exports.humanize(this.diff);
|
|
22328
|
-
|
|
22329
|
-
if (!this.useColors) {
|
|
22330
|
-
return;
|
|
22331
|
-
}
|
|
22332
|
-
|
|
22333
|
-
const c = 'color: ' + this.color;
|
|
22334
|
-
args.splice(1, 0, c, 'color: inherit');
|
|
22335
|
-
|
|
22336
|
-
// The final "%c" is somewhat tricky, because there could be other
|
|
22337
|
-
// arguments passed either before or after the %c, so we need to
|
|
22338
|
-
// figure out the correct index to insert the CSS into
|
|
22339
|
-
let index = 0;
|
|
22340
|
-
let lastC = 0;
|
|
22341
|
-
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
22342
|
-
if (match === '%%') {
|
|
22343
|
-
return;
|
|
22344
|
-
}
|
|
22345
|
-
index++;
|
|
22346
|
-
if (match === '%c') {
|
|
22347
|
-
// We only are interested in the *last* %c
|
|
22348
|
-
// (the user may have provided their own)
|
|
22349
|
-
lastC = index;
|
|
22350
|
-
}
|
|
22351
|
-
});
|
|
22352
|
-
|
|
22353
|
-
args.splice(lastC, 0, c);
|
|
22354
|
-
}
|
|
22355
|
-
|
|
22356
|
-
/**
|
|
22357
|
-
* Invokes `console.debug()` when available.
|
|
22358
|
-
* No-op when `console.debug` is not a "function".
|
|
22359
|
-
* If `console.debug` is not available, falls back
|
|
22360
|
-
* to `console.log`.
|
|
22361
|
-
*
|
|
22362
|
-
* @api public
|
|
22363
|
-
*/
|
|
22364
|
-
exports.log = console.debug || console.log || (() => {});
|
|
22365
|
-
|
|
22366
|
-
/**
|
|
22367
|
-
* Save `namespaces`.
|
|
22368
|
-
*
|
|
22369
|
-
* @param {String} namespaces
|
|
22370
|
-
* @api private
|
|
22371
|
-
*/
|
|
22372
|
-
function save(namespaces) {
|
|
22373
|
-
try {
|
|
22374
|
-
if (namespaces) {
|
|
22375
|
-
exports.storage.setItem('debug', namespaces);
|
|
22376
|
-
} else {
|
|
22377
|
-
exports.storage.removeItem('debug');
|
|
22378
|
-
}
|
|
22379
|
-
} catch (error) {
|
|
22380
|
-
// Swallow
|
|
22381
|
-
// XXX (@Qix-) should we be logging these?
|
|
22382
|
-
}
|
|
22383
|
-
}
|
|
22384
|
-
|
|
22385
|
-
/**
|
|
22386
|
-
* Load `namespaces`.
|
|
22387
|
-
*
|
|
22388
|
-
* @return {String} returns the previously persisted debug modes
|
|
22389
|
-
* @api private
|
|
22390
|
-
*/
|
|
22391
|
-
function load() {
|
|
22392
|
-
let r;
|
|
22393
|
-
try {
|
|
22394
|
-
r = exports.storage.getItem('debug');
|
|
22395
|
-
} catch (error) {
|
|
22396
|
-
// Swallow
|
|
22397
|
-
// XXX (@Qix-) should we be logging these?
|
|
22398
|
-
}
|
|
22399
|
-
|
|
22400
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
22401
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
22402
|
-
r = process.env.DEBUG;
|
|
22403
|
-
}
|
|
22404
|
-
|
|
22405
|
-
return r;
|
|
22406
|
-
}
|
|
22407
|
-
|
|
22408
|
-
/**
|
|
22409
|
-
* Localstorage attempts to return the localstorage.
|
|
22410
|
-
*
|
|
22411
|
-
* This is necessary because safari throws
|
|
22412
|
-
* when a user disables cookies/localstorage
|
|
22413
|
-
* and you attempt to access it.
|
|
22414
|
-
*
|
|
22415
|
-
* @return {LocalStorage}
|
|
22416
|
-
* @api private
|
|
22417
|
-
*/
|
|
22418
|
-
|
|
22419
|
-
function localstorage() {
|
|
22420
|
-
try {
|
|
22421
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
22422
|
-
// The Browser also has localStorage in the global context.
|
|
22423
|
-
return localStorage;
|
|
22424
|
-
} catch (error) {
|
|
22425
|
-
// Swallow
|
|
22426
|
-
// XXX (@Qix-) should we be logging these?
|
|
22427
|
-
}
|
|
22428
|
-
}
|
|
22429
|
-
|
|
22430
|
-
module.exports = requireCommon()(exports);
|
|
22431
|
-
|
|
22432
|
-
const {formatters} = module.exports;
|
|
22433
|
-
|
|
22434
|
-
/**
|
|
22435
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
22436
|
-
*/
|
|
22437
|
-
|
|
22438
|
-
formatters.j = function (v) {
|
|
22439
|
-
try {
|
|
22440
|
-
return JSON.stringify(v);
|
|
22441
|
-
} catch (error) {
|
|
22442
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
22443
|
-
}
|
|
22444
|
-
};
|
|
22445
|
-
} (browser, browser.exports));
|
|
22446
|
-
return browser.exports;
|
|
22447
|
-
}
|
|
22448
|
-
|
|
22449
|
-
var node = {exports: {}};
|
|
22450
|
-
|
|
22451
|
-
// MIT lisence
|
|
22452
|
-
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
22453
|
-
|
|
22454
|
-
function isatty() {
|
|
22455
|
-
return false;
|
|
22456
|
-
}
|
|
22457
|
-
|
|
22458
|
-
function ReadStream() {
|
|
22459
|
-
throw new Error('tty.ReadStream is not implemented');
|
|
22460
|
-
}
|
|
22461
|
-
|
|
22462
|
-
function WriteStream() {
|
|
22463
|
-
throw new Error('tty.ReadStream is not implemented');
|
|
22464
|
-
}
|
|
22465
|
-
|
|
22466
|
-
var _polyfillNode_tty = {
|
|
22467
|
-
isatty: isatty,
|
|
22468
|
-
ReadStream: ReadStream,
|
|
22469
|
-
WriteStream: WriteStream
|
|
22470
|
-
};
|
|
22471
|
-
|
|
22472
|
-
var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({
|
|
22473
|
-
__proto__: null,
|
|
22474
|
-
ReadStream: ReadStream,
|
|
22475
|
-
WriteStream: WriteStream,
|
|
22476
|
-
default: _polyfillNode_tty,
|
|
22477
|
-
isatty: isatty
|
|
22478
|
-
});
|
|
22479
|
-
|
|
22480
|
-
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_tty$1);
|
|
22481
|
-
|
|
22482
|
-
/*
|
|
22483
|
-
The MIT License (MIT)
|
|
22484
|
-
|
|
22485
|
-
Copyright (c) 2016 CoderPuppy
|
|
22163
|
+
function parse(str) {
|
|
22164
|
+
str = String(str);
|
|
22165
|
+
if (str.length > 100) {
|
|
22166
|
+
return;
|
|
22167
|
+
}
|
|
22168
|
+
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(
|
|
22169
|
+
str
|
|
22170
|
+
);
|
|
22171
|
+
if (!match) {
|
|
22172
|
+
return;
|
|
22173
|
+
}
|
|
22174
|
+
var n = parseFloat(match[1]);
|
|
22175
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
22176
|
+
switch (type) {
|
|
22177
|
+
case 'years':
|
|
22178
|
+
case 'year':
|
|
22179
|
+
case 'yrs':
|
|
22180
|
+
case 'yr':
|
|
22181
|
+
case 'y':
|
|
22182
|
+
return n * y;
|
|
22183
|
+
case 'weeks':
|
|
22184
|
+
case 'week':
|
|
22185
|
+
case 'w':
|
|
22186
|
+
return n * w;
|
|
22187
|
+
case 'days':
|
|
22188
|
+
case 'day':
|
|
22189
|
+
case 'd':
|
|
22190
|
+
return n * d;
|
|
22191
|
+
case 'hours':
|
|
22192
|
+
case 'hour':
|
|
22193
|
+
case 'hrs':
|
|
22194
|
+
case 'hr':
|
|
22195
|
+
case 'h':
|
|
22196
|
+
return n * h;
|
|
22197
|
+
case 'minutes':
|
|
22198
|
+
case 'minute':
|
|
22199
|
+
case 'mins':
|
|
22200
|
+
case 'min':
|
|
22201
|
+
case 'm':
|
|
22202
|
+
return n * m;
|
|
22203
|
+
case 'seconds':
|
|
22204
|
+
case 'second':
|
|
22205
|
+
case 'secs':
|
|
22206
|
+
case 'sec':
|
|
22207
|
+
case 's':
|
|
22208
|
+
return n * s;
|
|
22209
|
+
case 'milliseconds':
|
|
22210
|
+
case 'millisecond':
|
|
22211
|
+
case 'msecs':
|
|
22212
|
+
case 'msec':
|
|
22213
|
+
case 'ms':
|
|
22214
|
+
return n;
|
|
22215
|
+
default:
|
|
22216
|
+
return undefined;
|
|
22217
|
+
}
|
|
22218
|
+
}
|
|
22486
22219
|
|
|
22487
|
-
|
|
22488
|
-
|
|
22489
|
-
|
|
22490
|
-
|
|
22491
|
-
|
|
22492
|
-
|
|
22220
|
+
/**
|
|
22221
|
+
* Short format for `ms`.
|
|
22222
|
+
*
|
|
22223
|
+
* @param {Number} ms
|
|
22224
|
+
* @return {String}
|
|
22225
|
+
* @api private
|
|
22226
|
+
*/
|
|
22493
22227
|
|
|
22494
|
-
|
|
22495
|
-
|
|
22228
|
+
function fmtShort(ms) {
|
|
22229
|
+
var msAbs = Math.abs(ms);
|
|
22230
|
+
if (msAbs >= d) {
|
|
22231
|
+
return Math.round(ms / d) + 'd';
|
|
22232
|
+
}
|
|
22233
|
+
if (msAbs >= h) {
|
|
22234
|
+
return Math.round(ms / h) + 'h';
|
|
22235
|
+
}
|
|
22236
|
+
if (msAbs >= m) {
|
|
22237
|
+
return Math.round(ms / m) + 'm';
|
|
22238
|
+
}
|
|
22239
|
+
if (msAbs >= s) {
|
|
22240
|
+
return Math.round(ms / s) + 's';
|
|
22241
|
+
}
|
|
22242
|
+
return ms + 'ms';
|
|
22243
|
+
}
|
|
22496
22244
|
|
|
22497
|
-
|
|
22498
|
-
|
|
22499
|
-
|
|
22500
|
-
|
|
22501
|
-
|
|
22502
|
-
|
|
22503
|
-
|
|
22245
|
+
/**
|
|
22246
|
+
* Long format for `ms`.
|
|
22247
|
+
*
|
|
22248
|
+
* @param {Number} ms
|
|
22249
|
+
* @return {String}
|
|
22250
|
+
* @api private
|
|
22251
|
+
*/
|
|
22504
22252
|
|
|
22505
|
-
|
|
22506
|
-
var
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
|
|
22511
|
-
|
|
22512
|
-
|
|
22513
|
-
|
|
22514
|
-
|
|
22515
|
-
|
|
22516
|
-
|
|
22517
|
-
|
|
22518
|
-
|
|
22519
|
-
|
|
22520
|
-
|
|
22521
|
-
}
|
|
22522
|
-
return _endianness;
|
|
22523
|
-
}
|
|
22253
|
+
function fmtLong(ms) {
|
|
22254
|
+
var msAbs = Math.abs(ms);
|
|
22255
|
+
if (msAbs >= d) {
|
|
22256
|
+
return plural(ms, msAbs, d, 'day');
|
|
22257
|
+
}
|
|
22258
|
+
if (msAbs >= h) {
|
|
22259
|
+
return plural(ms, msAbs, h, 'hour');
|
|
22260
|
+
}
|
|
22261
|
+
if (msAbs >= m) {
|
|
22262
|
+
return plural(ms, msAbs, m, 'minute');
|
|
22263
|
+
}
|
|
22264
|
+
if (msAbs >= s) {
|
|
22265
|
+
return plural(ms, msAbs, s, 'second');
|
|
22266
|
+
}
|
|
22267
|
+
return ms + ' ms';
|
|
22268
|
+
}
|
|
22524
22269
|
|
|
22525
|
-
|
|
22526
|
-
|
|
22527
|
-
|
|
22528
|
-
} else return '';
|
|
22529
|
-
}
|
|
22270
|
+
/**
|
|
22271
|
+
* Pluralization helper.
|
|
22272
|
+
*/
|
|
22530
22273
|
|
|
22531
|
-
function
|
|
22532
|
-
|
|
22274
|
+
function plural(ms, msAbs, n, name) {
|
|
22275
|
+
var isPlural = msAbs >= n * 1.5;
|
|
22276
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
22277
|
+
}
|
|
22278
|
+
return ms;
|
|
22533
22279
|
}
|
|
22534
22280
|
|
|
22535
|
-
|
|
22536
|
-
|
|
22537
|
-
}
|
|
22281
|
+
var common;
|
|
22282
|
+
var hasRequiredCommon;
|
|
22538
22283
|
|
|
22539
|
-
function
|
|
22540
|
-
|
|
22541
|
-
|
|
22284
|
+
function requireCommon () {
|
|
22285
|
+
if (hasRequiredCommon) return common;
|
|
22286
|
+
hasRequiredCommon = 1;
|
|
22287
|
+
/**
|
|
22288
|
+
* This is the common logic for both the Node.js and web browser
|
|
22289
|
+
* implementations of `debug()`.
|
|
22290
|
+
*/
|
|
22542
22291
|
|
|
22543
|
-
function
|
|
22544
|
-
|
|
22545
|
-
|
|
22292
|
+
function setup(env) {
|
|
22293
|
+
createDebug.debug = createDebug;
|
|
22294
|
+
createDebug.default = createDebug;
|
|
22295
|
+
createDebug.coerce = coerce;
|
|
22296
|
+
createDebug.disable = disable;
|
|
22297
|
+
createDebug.enable = enable;
|
|
22298
|
+
createDebug.enabled = enabled;
|
|
22299
|
+
createDebug.humanize = requireMs();
|
|
22300
|
+
createDebug.destroy = destroy;
|
|
22546
22301
|
|
|
22547
|
-
|
|
22548
|
-
|
|
22549
|
-
}
|
|
22302
|
+
Object.keys(env).forEach(key => {
|
|
22303
|
+
createDebug[key] = env[key];
|
|
22304
|
+
});
|
|
22550
22305
|
|
|
22551
|
-
|
|
22552
|
-
|
|
22553
|
-
|
|
22306
|
+
/**
|
|
22307
|
+
* The currently active debug mode names, and names to skip.
|
|
22308
|
+
*/
|
|
22554
22309
|
|
|
22555
|
-
|
|
22556
|
-
|
|
22557
|
-
return global$1.navigator.appVersion;
|
|
22558
|
-
}
|
|
22559
|
-
return '';
|
|
22560
|
-
}
|
|
22310
|
+
createDebug.names = [];
|
|
22311
|
+
createDebug.skips = [];
|
|
22561
22312
|
|
|
22562
|
-
|
|
22563
|
-
|
|
22564
|
-
|
|
22313
|
+
/**
|
|
22314
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
22315
|
+
*
|
|
22316
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
22317
|
+
*/
|
|
22318
|
+
createDebug.formatters = {};
|
|
22565
22319
|
|
|
22566
|
-
|
|
22567
|
-
|
|
22568
|
-
}
|
|
22320
|
+
/**
|
|
22321
|
+
* Selects a color for a debug namespace
|
|
22322
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
22323
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
22324
|
+
* @api private
|
|
22325
|
+
*/
|
|
22326
|
+
function selectColor(namespace) {
|
|
22327
|
+
let hash = 0;
|
|
22569
22328
|
|
|
22570
|
-
|
|
22571
|
-
|
|
22572
|
-
|
|
22329
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
22330
|
+
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
22331
|
+
hash |= 0; // Convert to 32bit integer
|
|
22332
|
+
}
|
|
22573
22333
|
|
|
22574
|
-
|
|
22575
|
-
|
|
22576
|
-
|
|
22334
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
22335
|
+
}
|
|
22336
|
+
createDebug.selectColor = selectColor;
|
|
22577
22337
|
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22581
|
-
|
|
22338
|
+
/**
|
|
22339
|
+
* Create a debugger with the given `namespace`.
|
|
22340
|
+
*
|
|
22341
|
+
* @param {String} namespace
|
|
22342
|
+
* @return {Function}
|
|
22343
|
+
* @api public
|
|
22344
|
+
*/
|
|
22345
|
+
function createDebug(namespace) {
|
|
22346
|
+
let prevTime;
|
|
22347
|
+
let enableOverride = null;
|
|
22348
|
+
let namespacesCache;
|
|
22349
|
+
let enabledCache;
|
|
22582
22350
|
|
|
22583
|
-
|
|
22351
|
+
function debug(...args) {
|
|
22352
|
+
// Disabled?
|
|
22353
|
+
if (!debug.enabled) {
|
|
22354
|
+
return;
|
|
22355
|
+
}
|
|
22584
22356
|
|
|
22585
|
-
|
|
22586
|
-
return '$HOME'
|
|
22587
|
-
}
|
|
22357
|
+
const self = debug;
|
|
22588
22358
|
|
|
22589
|
-
|
|
22590
|
-
|
|
22591
|
-
|
|
22592
|
-
|
|
22593
|
-
|
|
22594
|
-
|
|
22595
|
-
|
|
22596
|
-
networkInterfaces:networkInterfaces,
|
|
22597
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
22598
|
-
release: release,
|
|
22599
|
-
type: type,
|
|
22600
|
-
cpus: cpus,
|
|
22601
|
-
totalmem: totalmem,
|
|
22602
|
-
freemem: freemem,
|
|
22603
|
-
uptime: uptime,
|
|
22604
|
-
loadavg: loadavg,
|
|
22605
|
-
hostname: hostname,
|
|
22606
|
-
endianness: endianness,
|
|
22607
|
-
};
|
|
22359
|
+
// Set `diff` timestamp
|
|
22360
|
+
const curr = Number(new Date());
|
|
22361
|
+
const ms = curr - (prevTime || curr);
|
|
22362
|
+
self.diff = ms;
|
|
22363
|
+
self.prev = prevTime;
|
|
22364
|
+
self.curr = curr;
|
|
22365
|
+
prevTime = curr;
|
|
22608
22366
|
|
|
22609
|
-
|
|
22610
|
-
__proto__: null,
|
|
22611
|
-
EOL: EOL,
|
|
22612
|
-
arch: arch,
|
|
22613
|
-
cpus: cpus,
|
|
22614
|
-
default: _polyfillNode_os,
|
|
22615
|
-
endianness: endianness,
|
|
22616
|
-
freemem: freemem,
|
|
22617
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
22618
|
-
homedir: homedir,
|
|
22619
|
-
hostname: hostname,
|
|
22620
|
-
loadavg: loadavg,
|
|
22621
|
-
networkInterfaces: networkInterfaces,
|
|
22622
|
-
platform: platform,
|
|
22623
|
-
release: release,
|
|
22624
|
-
tmpDir: tmpDir,
|
|
22625
|
-
tmpdir: tmpdir,
|
|
22626
|
-
totalmem: totalmem,
|
|
22627
|
-
type: type,
|
|
22628
|
-
uptime: uptime
|
|
22629
|
-
});
|
|
22367
|
+
args[0] = createDebug.coerce(args[0]);
|
|
22630
22368
|
|
|
22631
|
-
|
|
22369
|
+
if (typeof args[0] !== 'string') {
|
|
22370
|
+
// Anything else let's inspect with %O
|
|
22371
|
+
args.unshift('%O');
|
|
22372
|
+
}
|
|
22632
22373
|
|
|
22633
|
-
|
|
22634
|
-
|
|
22374
|
+
// Apply any `formatters` transformations
|
|
22375
|
+
let index = 0;
|
|
22376
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
22377
|
+
// If we encounter an escaped % then don't increase the array index
|
|
22378
|
+
if (match === '%%') {
|
|
22379
|
+
return '%';
|
|
22380
|
+
}
|
|
22381
|
+
index++;
|
|
22382
|
+
const formatter = createDebug.formatters[format];
|
|
22383
|
+
if (typeof formatter === 'function') {
|
|
22384
|
+
const val = args[index];
|
|
22385
|
+
match = formatter.call(self, val);
|
|
22635
22386
|
|
|
22636
|
-
|
|
22637
|
-
|
|
22638
|
-
|
|
22639
|
-
|
|
22640
|
-
|
|
22641
|
-
|
|
22642
|
-
const pos = argv.indexOf(prefix + flag);
|
|
22643
|
-
const terminatorPos = argv.indexOf('--');
|
|
22644
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
22645
|
-
};
|
|
22646
|
-
return hasFlag;
|
|
22647
|
-
}
|
|
22387
|
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
22388
|
+
args.splice(index, 1);
|
|
22389
|
+
index--;
|
|
22390
|
+
}
|
|
22391
|
+
return match;
|
|
22392
|
+
});
|
|
22648
22393
|
|
|
22649
|
-
|
|
22650
|
-
|
|
22394
|
+
// Apply env-specific formatting (colors, etc.)
|
|
22395
|
+
createDebug.formatArgs.call(self, args);
|
|
22651
22396
|
|
|
22652
|
-
|
|
22653
|
-
|
|
22654
|
-
|
|
22655
|
-
const os = require$$0;
|
|
22656
|
-
const hasFlag = requireHasFlag();
|
|
22397
|
+
const logFn = self.log || createDebug.log;
|
|
22398
|
+
logFn.apply(self, args);
|
|
22399
|
+
}
|
|
22657
22400
|
|
|
22658
|
-
|
|
22401
|
+
debug.namespace = namespace;
|
|
22402
|
+
debug.useColors = createDebug.useColors();
|
|
22403
|
+
debug.color = createDebug.selectColor(namespace);
|
|
22404
|
+
debug.extend = extend;
|
|
22405
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
22659
22406
|
|
|
22660
|
-
|
|
22661
|
-
|
|
22662
|
-
|
|
22663
|
-
|
|
22664
|
-
|
|
22665
|
-
|
|
22666
|
-
|
|
22667
|
-
|
|
22668
|
-
|
|
22669
|
-
|
|
22670
|
-
|
|
22671
|
-
if ('FORCE_COLOR' in env) {
|
|
22672
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
22673
|
-
}
|
|
22407
|
+
Object.defineProperty(debug, 'enabled', {
|
|
22408
|
+
enumerable: true,
|
|
22409
|
+
configurable: false,
|
|
22410
|
+
get: () => {
|
|
22411
|
+
if (enableOverride !== null) {
|
|
22412
|
+
return enableOverride;
|
|
22413
|
+
}
|
|
22414
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
22415
|
+
namespacesCache = createDebug.namespaces;
|
|
22416
|
+
enabledCache = createDebug.enabled(namespace);
|
|
22417
|
+
}
|
|
22674
22418
|
|
|
22675
|
-
|
|
22676
|
-
|
|
22677
|
-
|
|
22678
|
-
|
|
22419
|
+
return enabledCache;
|
|
22420
|
+
},
|
|
22421
|
+
set: v => {
|
|
22422
|
+
enableOverride = v;
|
|
22423
|
+
}
|
|
22424
|
+
});
|
|
22679
22425
|
|
|
22680
|
-
|
|
22681
|
-
|
|
22682
|
-
|
|
22683
|
-
|
|
22684
|
-
has16m: level >= 3
|
|
22685
|
-
};
|
|
22686
|
-
}
|
|
22426
|
+
// Env-specific initialization logic for debug instances
|
|
22427
|
+
if (typeof createDebug.init === 'function') {
|
|
22428
|
+
createDebug.init(debug);
|
|
22429
|
+
}
|
|
22687
22430
|
|
|
22688
|
-
|
|
22689
|
-
if (forceColor === false) {
|
|
22690
|
-
return 0;
|
|
22431
|
+
return debug;
|
|
22691
22432
|
}
|
|
22692
22433
|
|
|
22693
|
-
|
|
22694
|
-
|
|
22695
|
-
|
|
22696
|
-
return
|
|
22434
|
+
function extend(namespace, delimiter) {
|
|
22435
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
22436
|
+
newDebug.log = this.log;
|
|
22437
|
+
return newDebug;
|
|
22697
22438
|
}
|
|
22698
22439
|
|
|
22699
|
-
|
|
22700
|
-
|
|
22701
|
-
|
|
22440
|
+
/**
|
|
22441
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
22442
|
+
* separated by a colon and wildcards.
|
|
22443
|
+
*
|
|
22444
|
+
* @param {String} namespaces
|
|
22445
|
+
* @api public
|
|
22446
|
+
*/
|
|
22447
|
+
function enable(namespaces) {
|
|
22448
|
+
createDebug.save(namespaces);
|
|
22449
|
+
createDebug.namespaces = namespaces;
|
|
22702
22450
|
|
|
22703
|
-
|
|
22704
|
-
|
|
22705
|
-
}
|
|
22451
|
+
createDebug.names = [];
|
|
22452
|
+
createDebug.skips = [];
|
|
22706
22453
|
|
|
22707
|
-
|
|
22454
|
+
let i;
|
|
22455
|
+
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
22456
|
+
const len = split.length;
|
|
22708
22457
|
|
|
22709
|
-
|
|
22710
|
-
|
|
22711
|
-
|
|
22712
|
-
|
|
22713
|
-
|
|
22714
|
-
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
22715
|
-
// that supports 16m/TrueColor.
|
|
22716
|
-
const osRelease = os.release().split('.');
|
|
22717
|
-
if (
|
|
22718
|
-
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
22719
|
-
Number(osRelease[0]) >= 10 &&
|
|
22720
|
-
Number(osRelease[2]) >= 10586
|
|
22721
|
-
) {
|
|
22722
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
22723
|
-
}
|
|
22458
|
+
for (i = 0; i < len; i++) {
|
|
22459
|
+
if (!split[i]) {
|
|
22460
|
+
// ignore empty strings
|
|
22461
|
+
continue;
|
|
22462
|
+
}
|
|
22724
22463
|
|
|
22725
|
-
|
|
22726
|
-
}
|
|
22464
|
+
namespaces = split[i].replace(/\*/g, '.*?');
|
|
22727
22465
|
|
|
22728
|
-
|
|
22729
|
-
|
|
22730
|
-
|
|
22466
|
+
if (namespaces[0] === '-') {
|
|
22467
|
+
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
|
22468
|
+
} else {
|
|
22469
|
+
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
22470
|
+
}
|
|
22731
22471
|
}
|
|
22732
|
-
|
|
22733
|
-
return min;
|
|
22734
22472
|
}
|
|
22735
22473
|
|
|
22736
|
-
|
|
22737
|
-
|
|
22474
|
+
/**
|
|
22475
|
+
* Disable debug output.
|
|
22476
|
+
*
|
|
22477
|
+
* @return {String} namespaces
|
|
22478
|
+
* @api public
|
|
22479
|
+
*/
|
|
22480
|
+
function disable() {
|
|
22481
|
+
const namespaces = [
|
|
22482
|
+
...createDebug.names.map(toNamespace),
|
|
22483
|
+
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
22484
|
+
].join(',');
|
|
22485
|
+
createDebug.enable('');
|
|
22486
|
+
return namespaces;
|
|
22738
22487
|
}
|
|
22739
22488
|
|
|
22740
|
-
|
|
22741
|
-
|
|
22742
|
-
|
|
22489
|
+
/**
|
|
22490
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
22491
|
+
*
|
|
22492
|
+
* @param {String} name
|
|
22493
|
+
* @return {Boolean}
|
|
22494
|
+
* @api public
|
|
22495
|
+
*/
|
|
22496
|
+
function enabled(name) {
|
|
22497
|
+
if (name[name.length - 1] === '*') {
|
|
22498
|
+
return true;
|
|
22499
|
+
}
|
|
22743
22500
|
|
|
22744
|
-
|
|
22745
|
-
|
|
22501
|
+
let i;
|
|
22502
|
+
let len;
|
|
22746
22503
|
|
|
22747
|
-
|
|
22748
|
-
|
|
22749
|
-
return
|
|
22750
|
-
|
|
22751
|
-
return 2;
|
|
22752
|
-
// No default
|
|
22504
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
22505
|
+
if (createDebug.skips[i].test(name)) {
|
|
22506
|
+
return false;
|
|
22507
|
+
}
|
|
22753
22508
|
}
|
|
22754
|
-
}
|
|
22755
22509
|
|
|
22756
|
-
|
|
22757
|
-
|
|
22510
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
22511
|
+
if (createDebug.names[i].test(name)) {
|
|
22512
|
+
return true;
|
|
22513
|
+
}
|
|
22514
|
+
}
|
|
22515
|
+
|
|
22516
|
+
return false;
|
|
22758
22517
|
}
|
|
22759
22518
|
|
|
22760
|
-
|
|
22761
|
-
|
|
22519
|
+
/**
|
|
22520
|
+
* Convert regexp to namespace
|
|
22521
|
+
*
|
|
22522
|
+
* @param {RegExp} regxep
|
|
22523
|
+
* @return {String} namespace
|
|
22524
|
+
* @api private
|
|
22525
|
+
*/
|
|
22526
|
+
function toNamespace(regexp) {
|
|
22527
|
+
return regexp.toString()
|
|
22528
|
+
.substring(2, regexp.toString().length - 2)
|
|
22529
|
+
.replace(/\.\*\?$/, '*');
|
|
22762
22530
|
}
|
|
22763
22531
|
|
|
22764
|
-
|
|
22765
|
-
|
|
22532
|
+
/**
|
|
22533
|
+
* Coerce `val`.
|
|
22534
|
+
*
|
|
22535
|
+
* @param {Mixed} val
|
|
22536
|
+
* @return {Mixed}
|
|
22537
|
+
* @api private
|
|
22538
|
+
*/
|
|
22539
|
+
function coerce(val) {
|
|
22540
|
+
if (val instanceof Error) {
|
|
22541
|
+
return val.stack || val.message;
|
|
22542
|
+
}
|
|
22543
|
+
return val;
|
|
22766
22544
|
}
|
|
22767
22545
|
|
|
22768
|
-
|
|
22769
|
-
|
|
22546
|
+
/**
|
|
22547
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
22548
|
+
* XXX It WILL be removed in the next major release.
|
|
22549
|
+
*/
|
|
22550
|
+
function destroy() {
|
|
22551
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22770
22552
|
}
|
|
22771
22553
|
|
|
22772
|
-
|
|
22773
|
-
}
|
|
22554
|
+
createDebug.enable(createDebug.load());
|
|
22774
22555
|
|
|
22775
|
-
|
|
22776
|
-
const level = supportsColor(stream);
|
|
22777
|
-
return translateLevel(level);
|
|
22556
|
+
return createDebug;
|
|
22778
22557
|
}
|
|
22779
22558
|
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
stdout: getSupportLevel(process.stdout),
|
|
22783
|
-
stderr: getSupportLevel(process.stderr)
|
|
22784
|
-
};
|
|
22785
|
-
return supportsColor_1;
|
|
22559
|
+
common = setup;
|
|
22560
|
+
return common;
|
|
22786
22561
|
}
|
|
22787
22562
|
|
|
22788
22563
|
/**
|
|
@@ -22909,83 +22684,352 @@ function requireNode () {
|
|
|
22909
22684
|
}
|
|
22910
22685
|
|
|
22911
22686
|
/**
|
|
22912
|
-
* Build up the default `inspectOpts` object from the environment variables.
|
|
22687
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
|
22688
|
+
*
|
|
22689
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
22690
|
+
*/
|
|
22691
|
+
|
|
22692
|
+
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
|
22693
|
+
return /^debug_/i.test(key);
|
|
22694
|
+
}).reduce((obj, key) => {
|
|
22695
|
+
// Camel-case
|
|
22696
|
+
const prop = key
|
|
22697
|
+
.substring(6)
|
|
22698
|
+
.toLowerCase()
|
|
22699
|
+
.replace(/_([a-z])/g, (_, k) => {
|
|
22700
|
+
return k.toUpperCase();
|
|
22701
|
+
});
|
|
22702
|
+
|
|
22703
|
+
// Coerce string value into JS value
|
|
22704
|
+
let val = process.env[key];
|
|
22705
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
22706
|
+
val = true;
|
|
22707
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
22708
|
+
val = false;
|
|
22709
|
+
} else if (val === 'null') {
|
|
22710
|
+
val = null;
|
|
22711
|
+
} else {
|
|
22712
|
+
val = Number(val);
|
|
22713
|
+
}
|
|
22714
|
+
|
|
22715
|
+
obj[prop] = val;
|
|
22716
|
+
return obj;
|
|
22717
|
+
}, {});
|
|
22718
|
+
|
|
22719
|
+
/**
|
|
22720
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
22721
|
+
*/
|
|
22722
|
+
|
|
22723
|
+
function useColors() {
|
|
22724
|
+
return 'colors' in exports.inspectOpts ?
|
|
22725
|
+
Boolean(exports.inspectOpts.colors) :
|
|
22726
|
+
tty.isatty(process.stderr.fd);
|
|
22727
|
+
}
|
|
22728
|
+
|
|
22729
|
+
/**
|
|
22730
|
+
* Adds ANSI color escape codes if enabled.
|
|
22731
|
+
*
|
|
22732
|
+
* @api public
|
|
22733
|
+
*/
|
|
22734
|
+
|
|
22735
|
+
function formatArgs(args) {
|
|
22736
|
+
const {namespace: name, useColors} = this;
|
|
22737
|
+
|
|
22738
|
+
if (useColors) {
|
|
22739
|
+
const c = this.color;
|
|
22740
|
+
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
|
22741
|
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
22742
|
+
|
|
22743
|
+
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
|
22744
|
+
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
|
22745
|
+
} else {
|
|
22746
|
+
args[0] = getDate() + name + ' ' + args[0];
|
|
22747
|
+
}
|
|
22748
|
+
}
|
|
22749
|
+
|
|
22750
|
+
function getDate() {
|
|
22751
|
+
if (exports.inspectOpts.hideDate) {
|
|
22752
|
+
return '';
|
|
22753
|
+
}
|
|
22754
|
+
return new Date().toISOString() + ' ';
|
|
22755
|
+
}
|
|
22756
|
+
|
|
22757
|
+
/**
|
|
22758
|
+
* Invokes `util.format()` with the specified arguments and writes to stderr.
|
|
22759
|
+
*/
|
|
22760
|
+
|
|
22761
|
+
function log(...args) {
|
|
22762
|
+
return process.stderr.write(util.format(...args) + '\n');
|
|
22763
|
+
}
|
|
22764
|
+
|
|
22765
|
+
/**
|
|
22766
|
+
* Save `namespaces`.
|
|
22767
|
+
*
|
|
22768
|
+
* @param {String} namespaces
|
|
22769
|
+
* @api private
|
|
22770
|
+
*/
|
|
22771
|
+
function save(namespaces) {
|
|
22772
|
+
if (namespaces) {
|
|
22773
|
+
process.env.DEBUG = namespaces;
|
|
22774
|
+
} else {
|
|
22775
|
+
// If you set a process.env field to null or undefined, it gets cast to the
|
|
22776
|
+
// string 'null' or 'undefined'. Just delete instead.
|
|
22777
|
+
delete process.env.DEBUG;
|
|
22778
|
+
}
|
|
22779
|
+
}
|
|
22780
|
+
|
|
22781
|
+
/**
|
|
22782
|
+
* Load `namespaces`.
|
|
22783
|
+
*
|
|
22784
|
+
* @return {String} returns the previously persisted debug modes
|
|
22785
|
+
* @api private
|
|
22786
|
+
*/
|
|
22787
|
+
|
|
22788
|
+
function load() {
|
|
22789
|
+
return process.env.DEBUG;
|
|
22790
|
+
}
|
|
22791
|
+
|
|
22792
|
+
/**
|
|
22793
|
+
* Init logic for `debug` instances.
|
|
22794
|
+
*
|
|
22795
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
|
22796
|
+
* differently for a particular `debug` instance.
|
|
22797
|
+
*/
|
|
22798
|
+
|
|
22799
|
+
function init(debug) {
|
|
22800
|
+
debug.inspectOpts = {};
|
|
22801
|
+
|
|
22802
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
22803
|
+
for (let i = 0; i < keys.length; i++) {
|
|
22804
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
22805
|
+
}
|
|
22806
|
+
}
|
|
22807
|
+
|
|
22808
|
+
module.exports = requireCommon()(exports);
|
|
22809
|
+
|
|
22810
|
+
const {formatters} = module.exports;
|
|
22811
|
+
|
|
22812
|
+
/**
|
|
22813
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
22814
|
+
*/
|
|
22815
|
+
|
|
22816
|
+
formatters.o = function (v) {
|
|
22817
|
+
this.inspectOpts.colors = this.useColors;
|
|
22818
|
+
return util.inspect(v, this.inspectOpts)
|
|
22819
|
+
.split('\n')
|
|
22820
|
+
.map(str => str.trim())
|
|
22821
|
+
.join(' ');
|
|
22822
|
+
};
|
|
22823
|
+
|
|
22824
|
+
/**
|
|
22825
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
22826
|
+
*/
|
|
22827
|
+
|
|
22828
|
+
formatters.O = function (v) {
|
|
22829
|
+
this.inspectOpts.colors = this.useColors;
|
|
22830
|
+
return util.inspect(v, this.inspectOpts);
|
|
22831
|
+
};
|
|
22832
|
+
} (node, node.exports));
|
|
22833
|
+
return node.exports;
|
|
22834
|
+
}
|
|
22835
|
+
|
|
22836
|
+
var browser = {exports: {}};
|
|
22837
|
+
|
|
22838
|
+
/* eslint-env browser */
|
|
22839
|
+
|
|
22840
|
+
var hasRequiredBrowser;
|
|
22841
|
+
|
|
22842
|
+
function requireBrowser () {
|
|
22843
|
+
if (hasRequiredBrowser) return browser.exports;
|
|
22844
|
+
hasRequiredBrowser = 1;
|
|
22845
|
+
(function (module, exports) {
|
|
22846
|
+
/**
|
|
22847
|
+
* This is the web browser implementation of `debug()`.
|
|
22848
|
+
*/
|
|
22849
|
+
|
|
22850
|
+
exports.formatArgs = formatArgs;
|
|
22851
|
+
exports.save = save;
|
|
22852
|
+
exports.load = load;
|
|
22853
|
+
exports.useColors = useColors;
|
|
22854
|
+
exports.storage = localstorage();
|
|
22855
|
+
exports.destroy = (() => {
|
|
22856
|
+
let warned = false;
|
|
22857
|
+
|
|
22858
|
+
return () => {
|
|
22859
|
+
if (!warned) {
|
|
22860
|
+
warned = true;
|
|
22861
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22862
|
+
}
|
|
22863
|
+
};
|
|
22864
|
+
})();
|
|
22865
|
+
|
|
22866
|
+
/**
|
|
22867
|
+
* Colors.
|
|
22868
|
+
*/
|
|
22869
|
+
|
|
22870
|
+
exports.colors = [
|
|
22871
|
+
'#0000CC',
|
|
22872
|
+
'#0000FF',
|
|
22873
|
+
'#0033CC',
|
|
22874
|
+
'#0033FF',
|
|
22875
|
+
'#0066CC',
|
|
22876
|
+
'#0066FF',
|
|
22877
|
+
'#0099CC',
|
|
22878
|
+
'#0099FF',
|
|
22879
|
+
'#00CC00',
|
|
22880
|
+
'#00CC33',
|
|
22881
|
+
'#00CC66',
|
|
22882
|
+
'#00CC99',
|
|
22883
|
+
'#00CCCC',
|
|
22884
|
+
'#00CCFF',
|
|
22885
|
+
'#3300CC',
|
|
22886
|
+
'#3300FF',
|
|
22887
|
+
'#3333CC',
|
|
22888
|
+
'#3333FF',
|
|
22889
|
+
'#3366CC',
|
|
22890
|
+
'#3366FF',
|
|
22891
|
+
'#3399CC',
|
|
22892
|
+
'#3399FF',
|
|
22893
|
+
'#33CC00',
|
|
22894
|
+
'#33CC33',
|
|
22895
|
+
'#33CC66',
|
|
22896
|
+
'#33CC99',
|
|
22897
|
+
'#33CCCC',
|
|
22898
|
+
'#33CCFF',
|
|
22899
|
+
'#6600CC',
|
|
22900
|
+
'#6600FF',
|
|
22901
|
+
'#6633CC',
|
|
22902
|
+
'#6633FF',
|
|
22903
|
+
'#66CC00',
|
|
22904
|
+
'#66CC33',
|
|
22905
|
+
'#9900CC',
|
|
22906
|
+
'#9900FF',
|
|
22907
|
+
'#9933CC',
|
|
22908
|
+
'#9933FF',
|
|
22909
|
+
'#99CC00',
|
|
22910
|
+
'#99CC33',
|
|
22911
|
+
'#CC0000',
|
|
22912
|
+
'#CC0033',
|
|
22913
|
+
'#CC0066',
|
|
22914
|
+
'#CC0099',
|
|
22915
|
+
'#CC00CC',
|
|
22916
|
+
'#CC00FF',
|
|
22917
|
+
'#CC3300',
|
|
22918
|
+
'#CC3333',
|
|
22919
|
+
'#CC3366',
|
|
22920
|
+
'#CC3399',
|
|
22921
|
+
'#CC33CC',
|
|
22922
|
+
'#CC33FF',
|
|
22923
|
+
'#CC6600',
|
|
22924
|
+
'#CC6633',
|
|
22925
|
+
'#CC9900',
|
|
22926
|
+
'#CC9933',
|
|
22927
|
+
'#CCCC00',
|
|
22928
|
+
'#CCCC33',
|
|
22929
|
+
'#FF0000',
|
|
22930
|
+
'#FF0033',
|
|
22931
|
+
'#FF0066',
|
|
22932
|
+
'#FF0099',
|
|
22933
|
+
'#FF00CC',
|
|
22934
|
+
'#FF00FF',
|
|
22935
|
+
'#FF3300',
|
|
22936
|
+
'#FF3333',
|
|
22937
|
+
'#FF3366',
|
|
22938
|
+
'#FF3399',
|
|
22939
|
+
'#FF33CC',
|
|
22940
|
+
'#FF33FF',
|
|
22941
|
+
'#FF6600',
|
|
22942
|
+
'#FF6633',
|
|
22943
|
+
'#FF9900',
|
|
22944
|
+
'#FF9933',
|
|
22945
|
+
'#FFCC00',
|
|
22946
|
+
'#FFCC33'
|
|
22947
|
+
];
|
|
22948
|
+
|
|
22949
|
+
/**
|
|
22950
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
22951
|
+
* and the Firebug extension (any Firefox version) are known
|
|
22952
|
+
* to support "%c" CSS customizations.
|
|
22913
22953
|
*
|
|
22914
|
-
*
|
|
22954
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
22915
22955
|
*/
|
|
22916
22956
|
|
|
22917
|
-
|
|
22918
|
-
|
|
22919
|
-
|
|
22920
|
-
//
|
|
22921
|
-
|
|
22922
|
-
|
|
22923
|
-
|
|
22924
|
-
.replace(/_([a-z])/g, (_, k) => {
|
|
22925
|
-
return k.toUpperCase();
|
|
22926
|
-
});
|
|
22927
|
-
|
|
22928
|
-
// Coerce string value into JS value
|
|
22929
|
-
let val = process.env[key];
|
|
22930
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
22931
|
-
val = true;
|
|
22932
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
22933
|
-
val = false;
|
|
22934
|
-
} else if (val === 'null') {
|
|
22935
|
-
val = null;
|
|
22936
|
-
} else {
|
|
22937
|
-
val = Number(val);
|
|
22957
|
+
// eslint-disable-next-line complexity
|
|
22958
|
+
function useColors() {
|
|
22959
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
|
22960
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
22961
|
+
// explicitly
|
|
22962
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
22963
|
+
return true;
|
|
22938
22964
|
}
|
|
22939
22965
|
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
22943
|
-
|
|
22944
|
-
/**
|
|
22945
|
-
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
22946
|
-
*/
|
|
22966
|
+
// Internet Explorer and Edge do not support colors.
|
|
22967
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
22968
|
+
return false;
|
|
22969
|
+
}
|
|
22947
22970
|
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
22971
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
22972
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
22973
|
+
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
22974
|
+
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
22975
|
+
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
22976
|
+
// Is firefox >= v31?
|
|
22977
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
22978
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
22979
|
+
// Double check webkit in userAgent just in case we are in a worker
|
|
22980
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
22952
22981
|
}
|
|
22953
22982
|
|
|
22954
22983
|
/**
|
|
22955
|
-
*
|
|
22984
|
+
* Colorize log arguments if enabled.
|
|
22956
22985
|
*
|
|
22957
22986
|
* @api public
|
|
22958
22987
|
*/
|
|
22959
22988
|
|
|
22960
22989
|
function formatArgs(args) {
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
|
|
22964
|
-
|
|
22965
|
-
|
|
22966
|
-
|
|
22990
|
+
args[0] = (this.useColors ? '%c' : '') +
|
|
22991
|
+
this.namespace +
|
|
22992
|
+
(this.useColors ? ' %c' : ' ') +
|
|
22993
|
+
args[0] +
|
|
22994
|
+
(this.useColors ? '%c ' : ' ') +
|
|
22995
|
+
'+' + module.exports.humanize(this.diff);
|
|
22967
22996
|
|
|
22968
|
-
|
|
22969
|
-
|
|
22970
|
-
} else {
|
|
22971
|
-
args[0] = getDate() + name + ' ' + args[0];
|
|
22997
|
+
if (!this.useColors) {
|
|
22998
|
+
return;
|
|
22972
22999
|
}
|
|
22973
|
-
}
|
|
22974
23000
|
|
|
22975
|
-
|
|
22976
|
-
|
|
22977
|
-
|
|
22978
|
-
|
|
22979
|
-
|
|
23001
|
+
const c = 'color: ' + this.color;
|
|
23002
|
+
args.splice(1, 0, c, 'color: inherit');
|
|
23003
|
+
|
|
23004
|
+
// The final "%c" is somewhat tricky, because there could be other
|
|
23005
|
+
// arguments passed either before or after the %c, so we need to
|
|
23006
|
+
// figure out the correct index to insert the CSS into
|
|
23007
|
+
let index = 0;
|
|
23008
|
+
let lastC = 0;
|
|
23009
|
+
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
23010
|
+
if (match === '%%') {
|
|
23011
|
+
return;
|
|
23012
|
+
}
|
|
23013
|
+
index++;
|
|
23014
|
+
if (match === '%c') {
|
|
23015
|
+
// We only are interested in the *last* %c
|
|
23016
|
+
// (the user may have provided their own)
|
|
23017
|
+
lastC = index;
|
|
23018
|
+
}
|
|
23019
|
+
});
|
|
23020
|
+
|
|
23021
|
+
args.splice(lastC, 0, c);
|
|
22980
23022
|
}
|
|
22981
23023
|
|
|
22982
23024
|
/**
|
|
22983
|
-
* Invokes `
|
|
23025
|
+
* Invokes `console.debug()` when available.
|
|
23026
|
+
* No-op when `console.debug` is not a "function".
|
|
23027
|
+
* If `console.debug` is not available, falls back
|
|
23028
|
+
* to `console.log`.
|
|
23029
|
+
*
|
|
23030
|
+
* @api public
|
|
22984
23031
|
*/
|
|
22985
|
-
|
|
22986
|
-
function log(...args) {
|
|
22987
|
-
return process.stderr.write(util.format(...args) + '\n');
|
|
22988
|
-
}
|
|
23032
|
+
exports.log = console.debug || console.log || (() => {});
|
|
22989
23033
|
|
|
22990
23034
|
/**
|
|
22991
23035
|
* Save `namespaces`.
|
|
@@ -22994,12 +23038,15 @@ function requireNode () {
|
|
|
22994
23038
|
* @api private
|
|
22995
23039
|
*/
|
|
22996
23040
|
function save(namespaces) {
|
|
22997
|
-
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
|
|
23001
|
-
|
|
23002
|
-
|
|
23041
|
+
try {
|
|
23042
|
+
if (namespaces) {
|
|
23043
|
+
exports.storage.setItem('debug', namespaces);
|
|
23044
|
+
} else {
|
|
23045
|
+
exports.storage.removeItem('debug');
|
|
23046
|
+
}
|
|
23047
|
+
} catch (error) {
|
|
23048
|
+
// Swallow
|
|
23049
|
+
// XXX (@Qix-) should we be logging these?
|
|
23003
23050
|
}
|
|
23004
23051
|
}
|
|
23005
23052
|
|
|
@@ -23009,24 +23056,42 @@ function requireNode () {
|
|
|
23009
23056
|
* @return {String} returns the previously persisted debug modes
|
|
23010
23057
|
* @api private
|
|
23011
23058
|
*/
|
|
23012
|
-
|
|
23013
23059
|
function load() {
|
|
23014
|
-
|
|
23060
|
+
let r;
|
|
23061
|
+
try {
|
|
23062
|
+
r = exports.storage.getItem('debug');
|
|
23063
|
+
} catch (error) {
|
|
23064
|
+
// Swallow
|
|
23065
|
+
// XXX (@Qix-) should we be logging these?
|
|
23066
|
+
}
|
|
23067
|
+
|
|
23068
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
23069
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
23070
|
+
r = process.env.DEBUG;
|
|
23071
|
+
}
|
|
23072
|
+
|
|
23073
|
+
return r;
|
|
23015
23074
|
}
|
|
23016
23075
|
|
|
23017
23076
|
/**
|
|
23018
|
-
*
|
|
23077
|
+
* Localstorage attempts to return the localstorage.
|
|
23019
23078
|
*
|
|
23020
|
-
*
|
|
23021
|
-
*
|
|
23079
|
+
* This is necessary because safari throws
|
|
23080
|
+
* when a user disables cookies/localstorage
|
|
23081
|
+
* and you attempt to access it.
|
|
23082
|
+
*
|
|
23083
|
+
* @return {LocalStorage}
|
|
23084
|
+
* @api private
|
|
23022
23085
|
*/
|
|
23023
23086
|
|
|
23024
|
-
function
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
|
|
23087
|
+
function localstorage() {
|
|
23088
|
+
try {
|
|
23089
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
23090
|
+
// The Browser also has localStorage in the global context.
|
|
23091
|
+
return localStorage;
|
|
23092
|
+
} catch (error) {
|
|
23093
|
+
// Swallow
|
|
23094
|
+
// XXX (@Qix-) should we be logging these?
|
|
23030
23095
|
}
|
|
23031
23096
|
}
|
|
23032
23097
|
|
|
@@ -23035,27 +23100,18 @@ function requireNode () {
|
|
|
23035
23100
|
const {formatters} = module.exports;
|
|
23036
23101
|
|
|
23037
23102
|
/**
|
|
23038
|
-
* Map %
|
|
23039
|
-
*/
|
|
23040
|
-
|
|
23041
|
-
formatters.o = function (v) {
|
|
23042
|
-
this.inspectOpts.colors = this.useColors;
|
|
23043
|
-
return util.inspect(v, this.inspectOpts)
|
|
23044
|
-
.split('\n')
|
|
23045
|
-
.map(str => str.trim())
|
|
23046
|
-
.join(' ');
|
|
23047
|
-
};
|
|
23048
|
-
|
|
23049
|
-
/**
|
|
23050
|
-
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
23103
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
23051
23104
|
*/
|
|
23052
23105
|
|
|
23053
|
-
formatters.
|
|
23054
|
-
|
|
23055
|
-
|
|
23106
|
+
formatters.j = function (v) {
|
|
23107
|
+
try {
|
|
23108
|
+
return JSON.stringify(v);
|
|
23109
|
+
} catch (error) {
|
|
23110
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
23111
|
+
}
|
|
23056
23112
|
};
|
|
23057
|
-
} (
|
|
23058
|
-
return
|
|
23113
|
+
} (browser, browser.exports));
|
|
23114
|
+
return browser.exports;
|
|
23059
23115
|
}
|
|
23060
23116
|
|
|
23061
23117
|
/**
|
|
@@ -23132,6 +23188,9 @@ var WriteAfterEndError = createErrorType(
|
|
|
23132
23188
|
"write after end"
|
|
23133
23189
|
);
|
|
23134
23190
|
|
|
23191
|
+
// istanbul ignore next
|
|
23192
|
+
var destroy = Writable.prototype.destroy || noop;
|
|
23193
|
+
|
|
23135
23194
|
// An HTTP(S) request that can be redirected
|
|
23136
23195
|
function RedirectableRequest(options, responseCallback) {
|
|
23137
23196
|
// Initialize the request
|
|
@@ -23162,10 +23221,17 @@ function RedirectableRequest(options, responseCallback) {
|
|
|
23162
23221
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
23163
23222
|
|
|
23164
23223
|
RedirectableRequest.prototype.abort = function () {
|
|
23165
|
-
|
|
23224
|
+
destroyRequest(this._currentRequest);
|
|
23225
|
+
this._currentRequest.abort();
|
|
23166
23226
|
this.emit("abort");
|
|
23167
23227
|
};
|
|
23168
23228
|
|
|
23229
|
+
RedirectableRequest.prototype.destroy = function (error) {
|
|
23230
|
+
destroyRequest(this._currentRequest, error);
|
|
23231
|
+
destroy.call(this, error);
|
|
23232
|
+
return this;
|
|
23233
|
+
};
|
|
23234
|
+
|
|
23169
23235
|
// Writes buffered data to the current native request
|
|
23170
23236
|
RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
|
23171
23237
|
// Writing is not allowed if end has been called
|
|
@@ -23278,6 +23344,7 @@ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
|
|
|
23278
23344
|
self.removeListener("abort", clearTimer);
|
|
23279
23345
|
self.removeListener("error", clearTimer);
|
|
23280
23346
|
self.removeListener("response", clearTimer);
|
|
23347
|
+
self.removeListener("close", clearTimer);
|
|
23281
23348
|
if (callback) {
|
|
23282
23349
|
self.removeListener("timeout", callback);
|
|
23283
23350
|
}
|
|
@@ -23304,6 +23371,7 @@ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
|
|
|
23304
23371
|
this.on("abort", clearTimer);
|
|
23305
23372
|
this.on("error", clearTimer);
|
|
23306
23373
|
this.on("response", clearTimer);
|
|
23374
|
+
this.on("close", clearTimer);
|
|
23307
23375
|
|
|
23308
23376
|
return this;
|
|
23309
23377
|
};
|
|
@@ -23455,7 +23523,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
|
|
|
23455
23523
|
}
|
|
23456
23524
|
|
|
23457
23525
|
// The response is a redirect, so abort the current request
|
|
23458
|
-
|
|
23526
|
+
destroyRequest(this._currentRequest);
|
|
23459
23527
|
// Discard the remainder of the response to avoid waiting for data
|
|
23460
23528
|
response.destroy();
|
|
23461
23529
|
|
|
@@ -23684,12 +23752,12 @@ function createErrorType(code, message, baseClass) {
|
|
|
23684
23752
|
return CustomError;
|
|
23685
23753
|
}
|
|
23686
23754
|
|
|
23687
|
-
function
|
|
23755
|
+
function destroyRequest(request, error) {
|
|
23688
23756
|
for (var event of events) {
|
|
23689
23757
|
request.removeListener(event, eventHandlers[event]);
|
|
23690
23758
|
}
|
|
23691
23759
|
request.on("error", noop);
|
|
23692
|
-
request.
|
|
23760
|
+
request.destroy(error);
|
|
23693
23761
|
}
|
|
23694
23762
|
|
|
23695
23763
|
function isSubdomain(subdomain, domain) {
|
|
@@ -29238,7 +29306,7 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29238
29306
|
throw new Error('Unknown mode ' + this.mode);
|
|
29239
29307
|
}
|
|
29240
29308
|
|
|
29241
|
-
if (status
|
|
29309
|
+
if (!this._checkError(status, strm, flush)) {
|
|
29242
29310
|
this._error(status);
|
|
29243
29311
|
}
|
|
29244
29312
|
|
|
@@ -29246,6 +29314,27 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29246
29314
|
return [strm.avail_in, strm.avail_out];
|
|
29247
29315
|
};
|
|
29248
29316
|
|
|
29317
|
+
Zlib$1.prototype._checkError = function (status, strm, flush) {
|
|
29318
|
+
// Acceptable error states depend on the type of zlib stream.
|
|
29319
|
+
switch (status) {
|
|
29320
|
+
case Z_OK:
|
|
29321
|
+
case Z_BUF_ERROR:
|
|
29322
|
+
if (strm.avail_out !== 0 && flush === Z_FINISH) {
|
|
29323
|
+
return false
|
|
29324
|
+
}
|
|
29325
|
+
break
|
|
29326
|
+
case Z_STREAM_END:
|
|
29327
|
+
// normal statuses, not fatal
|
|
29328
|
+
break
|
|
29329
|
+
case Z_NEED_DICT:
|
|
29330
|
+
return false
|
|
29331
|
+
default:
|
|
29332
|
+
return false
|
|
29333
|
+
}
|
|
29334
|
+
|
|
29335
|
+
return true
|
|
29336
|
+
};
|
|
29337
|
+
|
|
29249
29338
|
Zlib$1.prototype.close = function() {
|
|
29250
29339
|
if (this.write_in_progress) {
|
|
29251
29340
|
this.pending_close = true;
|
|
@@ -29660,7 +29749,7 @@ function Zlib(opts, mode) {
|
|
|
29660
29749
|
|
|
29661
29750
|
var error = new Error(message);
|
|
29662
29751
|
error.errno = errno;
|
|
29663
|
-
error.code =
|
|
29752
|
+
error.code = codes[errno];
|
|
29664
29753
|
self.emit('error', error);
|
|
29665
29754
|
};
|
|
29666
29755
|
|
|
@@ -29940,7 +30029,7 @@ var zlib = {
|
|
|
29940
30029
|
Zlib: Zlib
|
|
29941
30030
|
};
|
|
29942
30031
|
|
|
29943
|
-
const VERSION = "1.
|
|
30032
|
+
const VERSION = "1.6.2";
|
|
29944
30033
|
|
|
29945
30034
|
function parseProtocol(url) {
|
|
29946
30035
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
@@ -30081,7 +30170,7 @@ const kInternals = Symbol('internals');
|
|
|
30081
30170
|
|
|
30082
30171
|
class AxiosTransformStream extends Stream$3.Transform{
|
|
30083
30172
|
constructor(options) {
|
|
30084
|
-
options = utils.toFlatObject(options, {
|
|
30173
|
+
options = utils$1.toFlatObject(options, {
|
|
30085
30174
|
maxRate: 0,
|
|
30086
30175
|
chunkSize: 64 * 1024,
|
|
30087
30176
|
minChunkSize: 100,
|
|
@@ -30089,7 +30178,7 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30089
30178
|
ticksRate: 2,
|
|
30090
30179
|
samplesCount: 15
|
|
30091
30180
|
}, null, (prop, source) => {
|
|
30092
|
-
return !utils.isUndefined(source[prop]);
|
|
30181
|
+
return !utils$1.isUndefined(source[prop]);
|
|
30093
30182
|
});
|
|
30094
30183
|
|
|
30095
30184
|
super({
|
|
@@ -30278,7 +30367,7 @@ const readBlob = async function* (blob) {
|
|
|
30278
30367
|
|
|
30279
30368
|
var readBlob$1 = readBlob;
|
|
30280
30369
|
|
|
30281
|
-
const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
|
|
30370
|
+
const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
|
|
30282
30371
|
|
|
30283
30372
|
const textEncoder = new text_min.TextEncoder();
|
|
30284
30373
|
|
|
@@ -30289,7 +30378,7 @@ const CRLF_BYTES_COUNT = 2;
|
|
|
30289
30378
|
class FormDataPart {
|
|
30290
30379
|
constructor(name, value) {
|
|
30291
30380
|
const {escapeName} = this.constructor;
|
|
30292
|
-
const isStringValue = utils.isString(value);
|
|
30381
|
+
const isStringValue = utils$1.isString(value);
|
|
30293
30382
|
|
|
30294
30383
|
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
|
|
30295
30384
|
!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
|
|
@@ -30316,7 +30405,7 @@ class FormDataPart {
|
|
|
30316
30405
|
|
|
30317
30406
|
const {value} = this;
|
|
30318
30407
|
|
|
30319
|
-
if(utils.isTypedArray(value)) {
|
|
30408
|
+
if(utils$1.isTypedArray(value)) {
|
|
30320
30409
|
yield value;
|
|
30321
30410
|
} else {
|
|
30322
30411
|
yield* readBlob$1(value);
|
|
@@ -30338,10 +30427,10 @@ const formDataToStream = (form, headersHandler, options) => {
|
|
|
30338
30427
|
const {
|
|
30339
30428
|
tag = 'form-data-boundary',
|
|
30340
30429
|
size = 25,
|
|
30341
|
-
boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)
|
|
30430
|
+
boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
|
|
30342
30431
|
} = options || {};
|
|
30343
30432
|
|
|
30344
|
-
if(!utils.isFormData(form)) {
|
|
30433
|
+
if(!utils$1.isFormData(form)) {
|
|
30345
30434
|
throw TypeError('FormData instance required');
|
|
30346
30435
|
}
|
|
30347
30436
|
|
|
@@ -30361,7 +30450,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
|
|
30361
30450
|
|
|
30362
30451
|
contentLength += boundaryBytes.byteLength * parts.length;
|
|
30363
30452
|
|
|
30364
|
-
contentLength = utils.toFiniteNumber(contentLength);
|
|
30453
|
+
contentLength = utils$1.toFiniteNumber(contentLength);
|
|
30365
30454
|
|
|
30366
30455
|
const computedHeaders = {
|
|
30367
30456
|
'Content-Type': `multipart/form-data; boundary=${boundary}`
|
|
@@ -30411,7 +30500,7 @@ class ZlibHeaderTransformStream extends Stream$3.Transform {
|
|
|
30411
30500
|
var ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
|
|
30412
30501
|
|
|
30413
30502
|
const callbackify = (fn, reducer) => {
|
|
30414
|
-
return utils.isAsyncFn(fn) ? function (...args) {
|
|
30503
|
+
return utils$1.isAsyncFn(fn) ? function (...args) {
|
|
30415
30504
|
const cb = args.pop();
|
|
30416
30505
|
fn.apply(this, args).then((value) => {
|
|
30417
30506
|
try {
|
|
@@ -30435,7 +30524,7 @@ const brotliOptions = {
|
|
|
30435
30524
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
30436
30525
|
};
|
|
30437
30526
|
|
|
30438
|
-
const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
|
|
30527
|
+
const isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
|
|
30439
30528
|
|
|
30440
30529
|
const {http: httpFollow, https: httpsFollow} = followRedirects;
|
|
30441
30530
|
|
|
@@ -30515,7 +30604,7 @@ function setProxy(options, configProxy, location) {
|
|
|
30515
30604
|
};
|
|
30516
30605
|
}
|
|
30517
30606
|
|
|
30518
|
-
const isHttpAdapterSupported = typeof browser$1$1 !== 'undefined' && utils.kindOf(browser$1$1) === 'process';
|
|
30607
|
+
const isHttpAdapterSupported = typeof browser$1$1 !== 'undefined' && utils$1.kindOf(browser$1$1) === 'process';
|
|
30519
30608
|
|
|
30520
30609
|
// temporary hotfix
|
|
30521
30610
|
|
|
@@ -30544,6 +30633,18 @@ const wrapAsync = (asyncExecutor) => {
|
|
|
30544
30633
|
})
|
|
30545
30634
|
};
|
|
30546
30635
|
|
|
30636
|
+
const resolveFamily = ({address, family}) => {
|
|
30637
|
+
if (!utils$1.isString(address)) {
|
|
30638
|
+
throw TypeError('address must be a string');
|
|
30639
|
+
}
|
|
30640
|
+
return ({
|
|
30641
|
+
address,
|
|
30642
|
+
family: family || (address.indexOf('.') < 0 ? 6 : 4)
|
|
30643
|
+
});
|
|
30644
|
+
};
|
|
30645
|
+
|
|
30646
|
+
const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family});
|
|
30647
|
+
|
|
30547
30648
|
/*eslint consistent-return:0*/
|
|
30548
30649
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
30549
30650
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
@@ -30554,15 +30655,16 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30554
30655
|
let rejected = false;
|
|
30555
30656
|
let req;
|
|
30556
30657
|
|
|
30557
|
-
if (lookup
|
|
30558
|
-
|
|
30559
|
-
|
|
30560
|
-
|
|
30561
|
-
|
|
30562
|
-
|
|
30563
|
-
|
|
30564
|
-
|
|
30565
|
-
|
|
30658
|
+
if (lookup) {
|
|
30659
|
+
const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
|
|
30660
|
+
// hotfix to support opt.all option which is required for node 20.x
|
|
30661
|
+
lookup = (hostname, opt, cb) => {
|
|
30662
|
+
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
30663
|
+
const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
30664
|
+
|
|
30665
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
30666
|
+
});
|
|
30667
|
+
};
|
|
30566
30668
|
}
|
|
30567
30669
|
|
|
30568
30670
|
// temporary internal emitter until the AxiosRequest class will be implemented
|
|
@@ -30630,7 +30732,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30630
30732
|
convertedData = convertedData.toString(responseEncoding);
|
|
30631
30733
|
|
|
30632
30734
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
30633
|
-
convertedData = utils.stripBOM(convertedData);
|
|
30735
|
+
convertedData = utils$1.stripBOM(convertedData);
|
|
30634
30736
|
}
|
|
30635
30737
|
} else if (responseType === 'stream') {
|
|
30636
30738
|
convertedData = Stream$3.Readable.from(convertedData);
|
|
@@ -30668,7 +30770,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30668
30770
|
let maxDownloadRate = undefined;
|
|
30669
30771
|
|
|
30670
30772
|
// support for spec compliant FormData objects
|
|
30671
|
-
if (utils.isSpecCompliantForm(data)) {
|
|
30773
|
+
if (utils$1.isSpecCompliantForm(data)) {
|
|
30672
30774
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
30673
30775
|
|
|
30674
30776
|
data = formDataToStream$1(data, (formHeaders) => {
|
|
@@ -30678,7 +30780,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30678
30780
|
boundary: userBoundary && userBoundary[1] || undefined
|
|
30679
30781
|
});
|
|
30680
30782
|
// support for https://www.npmjs.com/package/form-data api
|
|
30681
|
-
} else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
|
|
30783
|
+
} else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
|
|
30682
30784
|
headers.set(data.getHeaders());
|
|
30683
30785
|
|
|
30684
30786
|
if (!headers.hasContentLength()) {
|
|
@@ -30689,14 +30791,14 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30689
30791
|
} catch (e) {
|
|
30690
30792
|
}
|
|
30691
30793
|
}
|
|
30692
|
-
} else if (utils.isBlob(data)) {
|
|
30794
|
+
} else if (utils$1.isBlob(data)) {
|
|
30693
30795
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
|
30694
30796
|
headers.setContentLength(data.size || 0);
|
|
30695
30797
|
data = Stream$3.Readable.from(readBlob$1(data));
|
|
30696
|
-
} else if (data && !utils.isStream(data)) {
|
|
30697
|
-
if (Buffer.isBuffer(data)) ; else if (utils.isArrayBuffer(data)) {
|
|
30798
|
+
} else if (data && !utils$1.isStream(data)) {
|
|
30799
|
+
if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) {
|
|
30698
30800
|
data = Buffer.from(new Uint8Array(data));
|
|
30699
|
-
} else if (utils.isString(data)) {
|
|
30801
|
+
} else if (utils$1.isString(data)) {
|
|
30700
30802
|
data = Buffer.from(data, 'utf-8');
|
|
30701
30803
|
} else {
|
|
30702
30804
|
return reject(new AxiosError(
|
|
@@ -30718,9 +30820,9 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30718
30820
|
}
|
|
30719
30821
|
}
|
|
30720
30822
|
|
|
30721
|
-
const contentLength = utils.toFiniteNumber(headers.getContentLength());
|
|
30823
|
+
const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
|
|
30722
30824
|
|
|
30723
|
-
if (utils.isArray(maxRate)) {
|
|
30825
|
+
if (utils$1.isArray(maxRate)) {
|
|
30724
30826
|
maxUploadRate = maxRate[0];
|
|
30725
30827
|
maxDownloadRate = maxRate[1];
|
|
30726
30828
|
} else {
|
|
@@ -30728,14 +30830,14 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30728
30830
|
}
|
|
30729
30831
|
|
|
30730
30832
|
if (data && (onUploadProgress || maxUploadRate)) {
|
|
30731
|
-
if (!utils.isStream(data)) {
|
|
30833
|
+
if (!utils$1.isStream(data)) {
|
|
30732
30834
|
data = Stream$3.Readable.from(data, {objectMode: false});
|
|
30733
30835
|
}
|
|
30734
30836
|
|
|
30735
30837
|
data = Stream$3.pipeline([data, new AxiosTransformStream$1({
|
|
30736
30838
|
length: contentLength,
|
|
30737
|
-
maxRate: utils.toFiniteNumber(maxUploadRate)
|
|
30738
|
-
})], utils.noop);
|
|
30839
|
+
maxRate: utils$1.toFiniteNumber(maxUploadRate)
|
|
30840
|
+
})], utils$1.noop);
|
|
30739
30841
|
|
|
30740
30842
|
onUploadProgress && data.on('progress', progress => {
|
|
30741
30843
|
onUploadProgress(Object.assign(progress, {
|
|
@@ -30794,7 +30896,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30794
30896
|
};
|
|
30795
30897
|
|
|
30796
30898
|
// cacheable-lookup integration hotfix
|
|
30797
|
-
!utils.isUndefined(lookup) && (options.lookup = lookup);
|
|
30899
|
+
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
30798
30900
|
|
|
30799
30901
|
if (config.socketPath) {
|
|
30800
30902
|
options.socketPath = config.socketPath;
|
|
@@ -30842,8 +30944,8 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30842
30944
|
|
|
30843
30945
|
if (onDownloadProgress) {
|
|
30844
30946
|
const transformStream = new AxiosTransformStream$1({
|
|
30845
|
-
length: utils.toFiniteNumber(responseLength),
|
|
30846
|
-
maxRate: utils.toFiniteNumber(maxDownloadRate)
|
|
30947
|
+
length: utils$1.toFiniteNumber(responseLength),
|
|
30948
|
+
maxRate: utils$1.toFiniteNumber(maxDownloadRate)
|
|
30847
30949
|
});
|
|
30848
30950
|
|
|
30849
30951
|
onDownloadProgress && transformStream.on('progress', progress => {
|
|
@@ -30898,7 +31000,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30898
31000
|
}
|
|
30899
31001
|
}
|
|
30900
31002
|
|
|
30901
|
-
responseStream = streams.length > 1 ? Stream$3.pipeline(streams, utils.noop) : streams[0];
|
|
31003
|
+
responseStream = streams.length > 1 ? Stream$3.pipeline(streams, utils$1.noop) : streams[0];
|
|
30902
31004
|
|
|
30903
31005
|
const offListeners = Stream$3.finished(responseStream, () => {
|
|
30904
31006
|
offListeners();
|
|
@@ -30960,12 +31062,12 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30960
31062
|
if (responseType !== 'arraybuffer') {
|
|
30961
31063
|
responseData = responseData.toString(responseEncoding);
|
|
30962
31064
|
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
30963
|
-
responseData = utils.stripBOM(responseData);
|
|
31065
|
+
responseData = utils$1.stripBOM(responseData);
|
|
30964
31066
|
}
|
|
30965
31067
|
}
|
|
30966
31068
|
response.data = responseData;
|
|
30967
31069
|
} catch (err) {
|
|
30968
|
-
reject(AxiosError.from(err, null, config, response.request, response));
|
|
31070
|
+
return reject(AxiosError.from(err, null, config, response.request, response));
|
|
30969
31071
|
}
|
|
30970
31072
|
settle(resolve, reject, response);
|
|
30971
31073
|
});
|
|
@@ -31037,7 +31139,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31037
31139
|
|
|
31038
31140
|
|
|
31039
31141
|
// Send the request
|
|
31040
|
-
if (utils.isStream(data)) {
|
|
31142
|
+
if (utils$1.isStream(data)) {
|
|
31041
31143
|
let ended = false;
|
|
31042
31144
|
let errored = false;
|
|
31043
31145
|
|
|
@@ -31063,55 +31165,46 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31063
31165
|
});
|
|
31064
31166
|
};
|
|
31065
31167
|
|
|
31066
|
-
var cookies = platform$1.
|
|
31168
|
+
var cookies = platform$1.hasStandardBrowserEnv ?
|
|
31067
31169
|
|
|
31068
|
-
// Standard browser envs support document.cookie
|
|
31069
|
-
|
|
31070
|
-
|
|
31071
|
-
|
|
31072
|
-
const cookie = [];
|
|
31073
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
31170
|
+
// Standard browser envs support document.cookie
|
|
31171
|
+
{
|
|
31172
|
+
write(name, value, expires, path, domain, secure) {
|
|
31173
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
31074
31174
|
|
|
31075
|
-
|
|
31076
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
31077
|
-
}
|
|
31175
|
+
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
31078
31176
|
|
|
31079
|
-
|
|
31080
|
-
cookie.push('path=' + path);
|
|
31081
|
-
}
|
|
31177
|
+
utils$1.isString(path) && cookie.push('path=' + path);
|
|
31082
31178
|
|
|
31083
|
-
|
|
31084
|
-
cookie.push('domain=' + domain);
|
|
31085
|
-
}
|
|
31179
|
+
utils$1.isString(domain) && cookie.push('domain=' + domain);
|
|
31086
31180
|
|
|
31087
|
-
|
|
31088
|
-
cookie.push('secure');
|
|
31089
|
-
}
|
|
31181
|
+
secure === true && cookie.push('secure');
|
|
31090
31182
|
|
|
31091
|
-
|
|
31092
|
-
|
|
31183
|
+
document.cookie = cookie.join('; ');
|
|
31184
|
+
},
|
|
31093
31185
|
|
|
31094
|
-
|
|
31095
|
-
|
|
31096
|
-
|
|
31097
|
-
|
|
31186
|
+
read(name) {
|
|
31187
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
31188
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
31189
|
+
},
|
|
31098
31190
|
|
|
31099
|
-
|
|
31100
|
-
|
|
31101
|
-
|
|
31102
|
-
|
|
31103
|
-
})() :
|
|
31191
|
+
remove(name) {
|
|
31192
|
+
this.write(name, '', Date.now() - 86400000);
|
|
31193
|
+
}
|
|
31194
|
+
}
|
|
31104
31195
|
|
|
31105
|
-
|
|
31106
|
-
|
|
31107
|
-
|
|
31108
|
-
|
|
31109
|
-
|
|
31110
|
-
|
|
31111
|
-
|
|
31112
|
-
|
|
31196
|
+
:
|
|
31197
|
+
|
|
31198
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
31199
|
+
{
|
|
31200
|
+
write() {},
|
|
31201
|
+
read() {
|
|
31202
|
+
return null;
|
|
31203
|
+
},
|
|
31204
|
+
remove() {}
|
|
31205
|
+
};
|
|
31113
31206
|
|
|
31114
|
-
var isURLSameOrigin = platform$1.
|
|
31207
|
+
var isURLSameOrigin = platform$1.hasStandardBrowserEnv ?
|
|
31115
31208
|
|
|
31116
31209
|
// Standard browser envs have full support of the APIs needed to test
|
|
31117
31210
|
// whether the request URL is of the same origin as current location.
|
|
@@ -31121,7 +31214,7 @@ var isURLSameOrigin = platform$1.isStandardBrowserEnv ?
|
|
|
31121
31214
|
let originURL;
|
|
31122
31215
|
|
|
31123
31216
|
/**
|
|
31124
|
-
* Parse a URL to discover
|
|
31217
|
+
* Parse a URL to discover its components
|
|
31125
31218
|
*
|
|
31126
31219
|
* @param {String} url The URL to be parsed
|
|
31127
31220
|
* @returns {Object}
|
|
@@ -31161,7 +31254,7 @@ var isURLSameOrigin = platform$1.isStandardBrowserEnv ?
|
|
|
31161
31254
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
31162
31255
|
*/
|
|
31163
31256
|
return function isURLSameOrigin(requestURL) {
|
|
31164
|
-
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
31257
|
+
const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
31165
31258
|
return (parsed.protocol === originURL.protocol &&
|
|
31166
31259
|
parsed.host === originURL.host);
|
|
31167
31260
|
};
|
|
@@ -31209,7 +31302,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31209
31302
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
31210
31303
|
let requestData = config.data;
|
|
31211
31304
|
const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
|
|
31212
|
-
|
|
31305
|
+
let {responseType, withXSRFToken} = config;
|
|
31213
31306
|
let onCanceled;
|
|
31214
31307
|
function done() {
|
|
31215
31308
|
if (config.cancelToken) {
|
|
@@ -31223,14 +31316,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31223
31316
|
|
|
31224
31317
|
let contentType;
|
|
31225
31318
|
|
|
31226
|
-
if (utils.isFormData(requestData)) {
|
|
31227
|
-
if (platform$1.
|
|
31319
|
+
if (utils$1.isFormData(requestData)) {
|
|
31320
|
+
if (platform$1.hasStandardBrowserEnv || platform$1.hasStandardBrowserWebWorkerEnv) {
|
|
31228
31321
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
31229
|
-
} else if(
|
|
31230
|
-
requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
|
|
31231
|
-
} else if(utils.isString(contentType = requestHeaders.getContentType())){
|
|
31322
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
31232
31323
|
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
31233
|
-
|
|
31324
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
31325
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
31234
31326
|
}
|
|
31235
31327
|
}
|
|
31236
31328
|
|
|
@@ -31346,13 +31438,16 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31346
31438
|
// Add xsrf header
|
|
31347
31439
|
// This is only done if running in a standard browser environment.
|
|
31348
31440
|
// Specifically not if we're in a web worker, or react-native.
|
|
31349
|
-
if
|
|
31350
|
-
|
|
31351
|
-
const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
|
|
31352
|
-
&& config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
31441
|
+
if(platform$1.hasStandardBrowserEnv) {
|
|
31442
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
31353
31443
|
|
|
31354
|
-
if (
|
|
31355
|
-
|
|
31444
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
|
|
31445
|
+
// Add xsrf header
|
|
31446
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
31447
|
+
|
|
31448
|
+
if (xsrfValue) {
|
|
31449
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
31450
|
+
}
|
|
31356
31451
|
}
|
|
31357
31452
|
}
|
|
31358
31453
|
|
|
@@ -31361,13 +31456,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
31361
31456
|
|
|
31362
31457
|
// Add headers to the request
|
|
31363
31458
|
if ('setRequestHeader' in request) {
|
|
31364
|
-
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
31459
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
31365
31460
|
request.setRequestHeader(key, val);
|
|
31366
31461
|
});
|
|
31367
31462
|
}
|
|
31368
31463
|
|
|
31369
31464
|
// Add withCredentials to request if needed
|
|
31370
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
|
31465
|
+
if (!utils$1.isUndefined(config.withCredentials)) {
|
|
31371
31466
|
request.withCredentials = !!config.withCredentials;
|
|
31372
31467
|
}
|
|
31373
31468
|
|
|
@@ -31422,7 +31517,7 @@ const knownAdapters = {
|
|
|
31422
31517
|
xhr: xhrAdapter
|
|
31423
31518
|
};
|
|
31424
31519
|
|
|
31425
|
-
utils.forEach(knownAdapters, (fn, value) => {
|
|
31520
|
+
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
31426
31521
|
if (fn) {
|
|
31427
31522
|
try {
|
|
31428
31523
|
Object.defineProperty(fn, 'name', {value});
|
|
@@ -31435,11 +31530,11 @@ utils.forEach(knownAdapters, (fn, value) => {
|
|
|
31435
31530
|
|
|
31436
31531
|
const renderReason = (reason) => `- ${reason}`;
|
|
31437
31532
|
|
|
31438
|
-
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
|
31533
|
+
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
31439
31534
|
|
|
31440
31535
|
var adapters = {
|
|
31441
31536
|
getAdapter: (adapters) => {
|
|
31442
|
-
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
31537
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
31443
31538
|
|
|
31444
31539
|
const {length} = adapters;
|
|
31445
31540
|
let nameOrAdapter;
|
|
@@ -31580,11 +31675,11 @@ function mergeConfig(config1, config2) {
|
|
|
31580
31675
|
const config = {};
|
|
31581
31676
|
|
|
31582
31677
|
function getMergedValue(target, source, caseless) {
|
|
31583
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
31584
|
-
return utils.merge.call({caseless}, target, source);
|
|
31585
|
-
} else if (utils.isPlainObject(source)) {
|
|
31586
|
-
return utils.merge({}, source);
|
|
31587
|
-
} else if (utils.isArray(source)) {
|
|
31678
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
31679
|
+
return utils$1.merge.call({caseless}, target, source);
|
|
31680
|
+
} else if (utils$1.isPlainObject(source)) {
|
|
31681
|
+
return utils$1.merge({}, source);
|
|
31682
|
+
} else if (utils$1.isArray(source)) {
|
|
31588
31683
|
return source.slice();
|
|
31589
31684
|
}
|
|
31590
31685
|
return source;
|
|
@@ -31592,25 +31687,25 @@ function mergeConfig(config1, config2) {
|
|
|
31592
31687
|
|
|
31593
31688
|
// eslint-disable-next-line consistent-return
|
|
31594
31689
|
function mergeDeepProperties(a, b, caseless) {
|
|
31595
|
-
if (!utils.isUndefined(b)) {
|
|
31690
|
+
if (!utils$1.isUndefined(b)) {
|
|
31596
31691
|
return getMergedValue(a, b, caseless);
|
|
31597
|
-
} else if (!utils.isUndefined(a)) {
|
|
31692
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
31598
31693
|
return getMergedValue(undefined, a, caseless);
|
|
31599
31694
|
}
|
|
31600
31695
|
}
|
|
31601
31696
|
|
|
31602
31697
|
// eslint-disable-next-line consistent-return
|
|
31603
31698
|
function valueFromConfig2(a, b) {
|
|
31604
|
-
if (!utils.isUndefined(b)) {
|
|
31699
|
+
if (!utils$1.isUndefined(b)) {
|
|
31605
31700
|
return getMergedValue(undefined, b);
|
|
31606
31701
|
}
|
|
31607
31702
|
}
|
|
31608
31703
|
|
|
31609
31704
|
// eslint-disable-next-line consistent-return
|
|
31610
31705
|
function defaultToConfig2(a, b) {
|
|
31611
|
-
if (!utils.isUndefined(b)) {
|
|
31706
|
+
if (!utils$1.isUndefined(b)) {
|
|
31612
31707
|
return getMergedValue(undefined, b);
|
|
31613
|
-
} else if (!utils.isUndefined(a)) {
|
|
31708
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
31614
31709
|
return getMergedValue(undefined, a);
|
|
31615
31710
|
}
|
|
31616
31711
|
}
|
|
@@ -31635,6 +31730,7 @@ function mergeConfig(config1, config2) {
|
|
|
31635
31730
|
timeout: defaultToConfig2,
|
|
31636
31731
|
timeoutMessage: defaultToConfig2,
|
|
31637
31732
|
withCredentials: defaultToConfig2,
|
|
31733
|
+
withXSRFToken: defaultToConfig2,
|
|
31638
31734
|
adapter: defaultToConfig2,
|
|
31639
31735
|
responseType: defaultToConfig2,
|
|
31640
31736
|
xsrfCookieName: defaultToConfig2,
|
|
@@ -31655,10 +31751,10 @@ function mergeConfig(config1, config2) {
|
|
|
31655
31751
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
31656
31752
|
};
|
|
31657
31753
|
|
|
31658
|
-
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
31754
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
31659
31755
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
31660
31756
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
31661
|
-
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
31757
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
31662
31758
|
});
|
|
31663
31759
|
|
|
31664
31760
|
return config;
|
|
@@ -31800,7 +31896,7 @@ class Axios {
|
|
|
31800
31896
|
}
|
|
31801
31897
|
|
|
31802
31898
|
if (paramsSerializer != null) {
|
|
31803
|
-
if (utils.isFunction(paramsSerializer)) {
|
|
31899
|
+
if (utils$1.isFunction(paramsSerializer)) {
|
|
31804
31900
|
config.paramsSerializer = {
|
|
31805
31901
|
serialize: paramsSerializer
|
|
31806
31902
|
};
|
|
@@ -31816,12 +31912,12 @@ class Axios {
|
|
|
31816
31912
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
31817
31913
|
|
|
31818
31914
|
// Flatten headers
|
|
31819
|
-
let contextHeaders = headers && utils.merge(
|
|
31915
|
+
let contextHeaders = headers && utils$1.merge(
|
|
31820
31916
|
headers.common,
|
|
31821
31917
|
headers[config.method]
|
|
31822
31918
|
);
|
|
31823
31919
|
|
|
31824
|
-
headers && utils.forEach(
|
|
31920
|
+
headers && utils$1.forEach(
|
|
31825
31921
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
31826
31922
|
(method) => {
|
|
31827
31923
|
delete headers[method];
|
|
@@ -31908,7 +32004,7 @@ class Axios {
|
|
|
31908
32004
|
}
|
|
31909
32005
|
|
|
31910
32006
|
// Provide aliases for supported request methods
|
|
31911
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
32007
|
+
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
31912
32008
|
/*eslint func-names:0*/
|
|
31913
32009
|
Axios.prototype[method] = function(url, config) {
|
|
31914
32010
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -31919,7 +32015,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
31919
32015
|
};
|
|
31920
32016
|
});
|
|
31921
32017
|
|
|
31922
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
32018
|
+
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
31923
32019
|
/*eslint func-names:0*/
|
|
31924
32020
|
|
|
31925
32021
|
function generateHTTPMethod(isForm) {
|
|
@@ -32095,7 +32191,7 @@ function spread(callback) {
|
|
|
32095
32191
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
32096
32192
|
*/
|
|
32097
32193
|
function isAxiosError(payload) {
|
|
32098
|
-
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
32194
|
+
return utils$1.isObject(payload) && (payload.isAxiosError === true);
|
|
32099
32195
|
}
|
|
32100
32196
|
|
|
32101
32197
|
const HttpStatusCode = {
|
|
@@ -32182,10 +32278,10 @@ function createInstance(defaultConfig) {
|
|
|
32182
32278
|
const instance = bind(Axios$1.prototype.request, context);
|
|
32183
32279
|
|
|
32184
32280
|
// Copy axios.prototype to instance
|
|
32185
|
-
utils.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
32281
|
+
utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
32186
32282
|
|
|
32187
32283
|
// Copy context to instance
|
|
32188
|
-
utils.extend(instance, context, null, {allOwnKeys: true});
|
|
32284
|
+
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
|
32189
32285
|
|
|
32190
32286
|
// Factory for creating new instances
|
|
32191
32287
|
instance.create = function create(instanceConfig) {
|
|
@@ -32229,7 +32325,7 @@ axios.mergeConfig = mergeConfig;
|
|
|
32229
32325
|
|
|
32230
32326
|
axios.AxiosHeaders = AxiosHeaders$1;
|
|
32231
32327
|
|
|
32232
|
-
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
32328
|
+
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
32233
32329
|
|
|
32234
32330
|
axios.getAdapter = adapters.getAdapter;
|
|
32235
32331
|
|