ui-process-h5 0.1.14 → 0.1.20

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/lib/index.umd.js DELETED
@@ -1,3760 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("vue"));
4
- else if(typeof define === 'function' && define.amd)
5
- define([], factory);
6
- else if(typeof exports === 'object')
7
- exports["index"] = factory(require("vue"));
8
- else
9
- root["index"] = factory(root["Vue"]);
10
- })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__203__) {
11
- return /******/ (function() { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ 744:
16
- /***/ (function(__unused_webpack_module, exports) {
17
-
18
- var __webpack_unused_export__;
19
-
20
- __webpack_unused_export__ = ({ value: true });
21
- // runtime helper for setting properties on components
22
- // in a tree-shakable way
23
- exports.Z = (sfc, props) => {
24
- const target = sfc.__vccOpts || sfc;
25
- for (const [key, val] of props) {
26
- target[key] = val;
27
- }
28
- return target;
29
- };
30
-
31
-
32
- /***/ }),
33
-
34
- /***/ 203:
35
- /***/ (function(module) {
36
-
37
- module.exports = __WEBPACK_EXTERNAL_MODULE__203__;
38
-
39
- /***/ })
40
-
41
- /******/ });
42
- /************************************************************************/
43
- /******/ // The module cache
44
- /******/ var __webpack_module_cache__ = {};
45
- /******/
46
- /******/ // The require function
47
- /******/ function __webpack_require__(moduleId) {
48
- /******/ // Check if module is in cache
49
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
50
- /******/ if (cachedModule !== undefined) {
51
- /******/ return cachedModule.exports;
52
- /******/ }
53
- /******/ // Create a new module (and put it into the cache)
54
- /******/ var module = __webpack_module_cache__[moduleId] = {
55
- /******/ // no module.id needed
56
- /******/ // no module.loaded needed
57
- /******/ exports: {}
58
- /******/ };
59
- /******/
60
- /******/ // Execute the module function
61
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
62
- /******/
63
- /******/ // Return the exports of the module
64
- /******/ return module.exports;
65
- /******/ }
66
- /******/
67
- /************************************************************************/
68
- /******/ /* webpack/runtime/define property getters */
69
- /******/ !function() {
70
- /******/ // define getter functions for harmony exports
71
- /******/ __webpack_require__.d = function(exports, definition) {
72
- /******/ for(var key in definition) {
73
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
74
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
75
- /******/ }
76
- /******/ }
77
- /******/ };
78
- /******/ }();
79
- /******/
80
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
81
- /******/ !function() {
82
- /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
83
- /******/ }();
84
- /******/
85
- /******/ /* webpack/runtime/make namespace object */
86
- /******/ !function() {
87
- /******/ // define __esModule on exports
88
- /******/ __webpack_require__.r = function(exports) {
89
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
90
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
91
- /******/ }
92
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
93
- /******/ };
94
- /******/ }();
95
- /******/
96
- /******/ /* webpack/runtime/publicPath */
97
- /******/ !function() {
98
- /******/ __webpack_require__.p = "";
99
- /******/ }();
100
- /******/
101
- /************************************************************************/
102
- var __webpack_exports__ = {};
103
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
104
- !function() {
105
- // ESM COMPAT FLAG
106
- __webpack_require__.r(__webpack_exports__);
107
-
108
- // EXPORTS
109
- __webpack_require__.d(__webpack_exports__, {
110
- "TopsProcess": function() { return /* reexport */ packages_process; },
111
- "TopsTap": function() { return /* reexport */ Tab; },
112
- "default": function() { return /* binding */ entry_lib; }
113
- });
114
-
115
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
116
- /* eslint-disable no-var */
117
- // This file is imported into lib/wc client bundles.
118
-
119
- if (typeof window !== 'undefined') {
120
- var currentScript = window.document.currentScript
121
- if (false) { var getCurrentScript; }
122
-
123
- var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
124
- if (src) {
125
- __webpack_require__.p = src[1] // eslint-disable-line
126
- }
127
- }
128
-
129
- // Indicate to webpack that this file can be concatenated
130
- /* harmony default export */ var setPublicPath = (null);
131
-
132
- // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
133
- var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(203);
134
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/process/src/process.vue?vue&type=template&id=fd1f1ce4&scoped=true&ts=true
135
-
136
- const _withScopeId = n => ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.pushScopeId)("data-v-fd1f1ce4"), n = n(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.popScopeId)(), n);
137
- const _hoisted_1 = {
138
- class: "process-warp"
139
- };
140
- const _hoisted_2 = {
141
- key: 0,
142
- class: "process-main"
143
- };
144
- const _hoisted_3 = {
145
- class: "process-ml-item border"
146
- };
147
- const _hoisted_4 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
148
- class: "process-mli-name"
149
- }, "流程状态", -1));
150
- const _hoisted_5 = {
151
- class: "process-mli-value"
152
- };
153
- const _hoisted_6 = {
154
- class: "process-ml-item border"
155
- };
156
- const _hoisted_7 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
157
- class: "process-mli-name"
158
- }, "流程发起时间", -1));
159
- const _hoisted_8 = {
160
- class: "process-mli-value"
161
- };
162
- const _hoisted_9 = {
163
- key: 0,
164
- class: "process-ml-item"
165
- };
166
- const _hoisted_10 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
167
- class: "process-mli-name"
168
- }, "审批节点", -1));
169
- const _hoisted_11 = {
170
- class: "process-mli-value"
171
- };
172
- const _hoisted_12 = {
173
- class: "process-mliv-jd"
174
- };
175
- function render(_ctx, _cache, $props, $setup, $data, $options) {
176
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", _hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($setup.HOST) + " " + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($setup.BASE) + " ", 1), $setup.processStatus.status ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", _hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", _hoisted_3, [_hoisted_4, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", _hoisted_5, [$setup.processStatus.status || $setup.processStatus.bizStatusName ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
177
- key: 0,
178
- class: "process-mliv-dd",
179
- style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)({
180
- background: $options.getColor($setup.processStatus.status)
181
- })
182
- }, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($setup.processStatus.bizStatusName ? $setup.processStatus.bizStatusName : $setup.processStatus.status), 5)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", _hoisted_6, [_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", _hoisted_8, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($setup.processStatus.createTime), 1)])]), $setup.processStatus.allUserNames && $setup.processStatus.allUserNames.length ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", _hoisted_9, [_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", _hoisted_11, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", _hoisted_12, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(`${$setup.processStatus.taskState == 4 ? $setup.processStatus.currUserName : $setup.processStatus.allUserNames.toString()}审批中`), 1)])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]);
183
- }
184
- ;// CONCATENATED MODULE: ./packages/process/src/process.vue?vue&type=template&id=fd1f1ce4&scoped=true&ts=true
185
-
186
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
187
-
188
-
189
- function bind(fn, thisArg) {
190
- return function wrap() {
191
- return fn.apply(thisArg, arguments);
192
- };
193
- }
194
-
195
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/utils.js
196
-
197
-
198
-
199
-
200
- // utils is a library of generic helper functions non-specific to axios
201
-
202
- const {toString: utils_toString} = Object.prototype;
203
- const {getPrototypeOf} = Object;
204
-
205
- const kindOf = (cache => thing => {
206
- const str = utils_toString.call(thing);
207
- return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
208
- })(Object.create(null));
209
-
210
- const kindOfTest = (type) => {
211
- type = type.toLowerCase();
212
- return (thing) => kindOf(thing) === type
213
- }
214
-
215
- const typeOfTest = type => thing => typeof thing === type;
216
-
217
- /**
218
- * Determine if a value is an Array
219
- *
220
- * @param {Object} val The value to test
221
- *
222
- * @returns {boolean} True if value is an Array, otherwise false
223
- */
224
- const {isArray} = Array;
225
-
226
- /**
227
- * Determine if a value is undefined
228
- *
229
- * @param {*} val The value to test
230
- *
231
- * @returns {boolean} True if the value is undefined, otherwise false
232
- */
233
- const isUndefined = typeOfTest('undefined');
234
-
235
- /**
236
- * Determine if a value is a Buffer
237
- *
238
- * @param {*} val The value to test
239
- *
240
- * @returns {boolean} True if value is a Buffer, otherwise false
241
- */
242
- function isBuffer(val) {
243
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
244
- && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
245
- }
246
-
247
- /**
248
- * Determine if a value is an ArrayBuffer
249
- *
250
- * @param {*} val The value to test
251
- *
252
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
253
- */
254
- const isArrayBuffer = kindOfTest('ArrayBuffer');
255
-
256
-
257
- /**
258
- * Determine if a value is a view on an ArrayBuffer
259
- *
260
- * @param {*} val The value to test
261
- *
262
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
263
- */
264
- function isArrayBufferView(val) {
265
- let result;
266
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
267
- result = ArrayBuffer.isView(val);
268
- } else {
269
- result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
270
- }
271
- return result;
272
- }
273
-
274
- /**
275
- * Determine if a value is a String
276
- *
277
- * @param {*} val The value to test
278
- *
279
- * @returns {boolean} True if value is a String, otherwise false
280
- */
281
- const isString = typeOfTest('string');
282
-
283
- /**
284
- * Determine if a value is a Function
285
- *
286
- * @param {*} val The value to test
287
- * @returns {boolean} True if value is a Function, otherwise false
288
- */
289
- const isFunction = typeOfTest('function');
290
-
291
- /**
292
- * Determine if a value is a Number
293
- *
294
- * @param {*} val The value to test
295
- *
296
- * @returns {boolean} True if value is a Number, otherwise false
297
- */
298
- const isNumber = typeOfTest('number');
299
-
300
- /**
301
- * Determine if a value is an Object
302
- *
303
- * @param {*} thing The value to test
304
- *
305
- * @returns {boolean} True if value is an Object, otherwise false
306
- */
307
- const isObject = (thing) => thing !== null && typeof thing === 'object';
308
-
309
- /**
310
- * Determine if a value is a Boolean
311
- *
312
- * @param {*} thing The value to test
313
- * @returns {boolean} True if value is a Boolean, otherwise false
314
- */
315
- const isBoolean = thing => thing === true || thing === false;
316
-
317
- /**
318
- * Determine if a value is a plain Object
319
- *
320
- * @param {*} val The value to test
321
- *
322
- * @returns {boolean} True if value is a plain Object, otherwise false
323
- */
324
- const isPlainObject = (val) => {
325
- if (kindOf(val) !== 'object') {
326
- return false;
327
- }
328
-
329
- const prototype = getPrototypeOf(val);
330
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
331
- }
332
-
333
- /**
334
- * Determine if a value is a Date
335
- *
336
- * @param {*} val The value to test
337
- *
338
- * @returns {boolean} True if value is a Date, otherwise false
339
- */
340
- const isDate = kindOfTest('Date');
341
-
342
- /**
343
- * Determine if a value is a File
344
- *
345
- * @param {*} val The value to test
346
- *
347
- * @returns {boolean} True if value is a File, otherwise false
348
- */
349
- const isFile = kindOfTest('File');
350
-
351
- /**
352
- * Determine if a value is a Blob
353
- *
354
- * @param {*} val The value to test
355
- *
356
- * @returns {boolean} True if value is a Blob, otherwise false
357
- */
358
- const isBlob = kindOfTest('Blob');
359
-
360
- /**
361
- * Determine if a value is a FileList
362
- *
363
- * @param {*} val The value to test
364
- *
365
- * @returns {boolean} True if value is a File, otherwise false
366
- */
367
- const isFileList = kindOfTest('FileList');
368
-
369
- /**
370
- * Determine if a value is a Stream
371
- *
372
- * @param {*} val The value to test
373
- *
374
- * @returns {boolean} True if value is a Stream, otherwise false
375
- */
376
- const isStream = (val) => isObject(val) && isFunction(val.pipe);
377
-
378
- /**
379
- * Determine if a value is a FormData
380
- *
381
- * @param {*} thing The value to test
382
- *
383
- * @returns {boolean} True if value is an FormData, otherwise false
384
- */
385
- const isFormData = (thing) => {
386
- const pattern = '[object FormData]';
387
- return thing && (
388
- (typeof FormData === 'function' && thing instanceof FormData) ||
389
- utils_toString.call(thing) === pattern ||
390
- (isFunction(thing.toString) && thing.toString() === pattern)
391
- );
392
- }
393
-
394
- /**
395
- * Determine if a value is a URLSearchParams object
396
- *
397
- * @param {*} val The value to test
398
- *
399
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
400
- */
401
- const isURLSearchParams = kindOfTest('URLSearchParams');
402
-
403
- /**
404
- * Trim excess whitespace off the beginning and end of a string
405
- *
406
- * @param {String} str The String to trim
407
- *
408
- * @returns {String} The String freed of excess whitespace
409
- */
410
- const trim = (str) => str.trim ?
411
- str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
412
-
413
- /**
414
- * Iterate over an Array or an Object invoking a function for each item.
415
- *
416
- * If `obj` is an Array callback will be called passing
417
- * the value, index, and complete array for each item.
418
- *
419
- * If 'obj' is an Object callback will be called passing
420
- * the value, key, and complete object for each property.
421
- *
422
- * @param {Object|Array} obj The object to iterate
423
- * @param {Function} fn The callback to invoke for each item
424
- *
425
- * @param {Boolean} [allOwnKeys = false]
426
- * @returns {any}
427
- */
428
- function forEach(obj, fn, {allOwnKeys = false} = {}) {
429
- // Don't bother if no value provided
430
- if (obj === null || typeof obj === 'undefined') {
431
- return;
432
- }
433
-
434
- let i;
435
- let l;
436
-
437
- // Force an array if not already something iterable
438
- if (typeof obj !== 'object') {
439
- /*eslint no-param-reassign:0*/
440
- obj = [obj];
441
- }
442
-
443
- if (isArray(obj)) {
444
- // Iterate over array values
445
- for (i = 0, l = obj.length; i < l; i++) {
446
- fn.call(null, obj[i], i, obj);
447
- }
448
- } else {
449
- // Iterate over object keys
450
- const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
451
- const len = keys.length;
452
- let key;
453
-
454
- for (i = 0; i < len; i++) {
455
- key = keys[i];
456
- fn.call(null, obj[key], key, obj);
457
- }
458
- }
459
- }
460
-
461
- function findKey(obj, key) {
462
- key = key.toLowerCase();
463
- const keys = Object.keys(obj);
464
- let i = keys.length;
465
- let _key;
466
- while (i-- > 0) {
467
- _key = keys[i];
468
- if (key === _key.toLowerCase()) {
469
- return _key;
470
- }
471
- }
472
- return null;
473
- }
474
-
475
- const _global = (() => {
476
- /*eslint no-undef:0*/
477
- if (typeof globalThis !== "undefined") return globalThis;
478
- return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
479
- })();
480
-
481
- const isContextDefined = (context) => !isUndefined(context) && context !== _global;
482
-
483
- /**
484
- * Accepts varargs expecting each argument to be an object, then
485
- * immutably merges the properties of each object and returns result.
486
- *
487
- * When multiple objects contain the same key the later object in
488
- * the arguments list will take precedence.
489
- *
490
- * Example:
491
- *
492
- * ```js
493
- * var result = merge({foo: 123}, {foo: 456});
494
- * console.log(result.foo); // outputs 456
495
- * ```
496
- *
497
- * @param {Object} obj1 Object to merge
498
- *
499
- * @returns {Object} Result of all merge properties
500
- */
501
- function merge(/* obj1, obj2, obj3, ... */) {
502
- const {caseless} = isContextDefined(this) && this || {};
503
- const result = {};
504
- const assignValue = (val, key) => {
505
- const targetKey = caseless && findKey(result, key) || key;
506
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
507
- result[targetKey] = merge(result[targetKey], val);
508
- } else if (isPlainObject(val)) {
509
- result[targetKey] = merge({}, val);
510
- } else if (isArray(val)) {
511
- result[targetKey] = val.slice();
512
- } else {
513
- result[targetKey] = val;
514
- }
515
- }
516
-
517
- for (let i = 0, l = arguments.length; i < l; i++) {
518
- arguments[i] && forEach(arguments[i], assignValue);
519
- }
520
- return result;
521
- }
522
-
523
- /**
524
- * Extends object a by mutably adding to it the properties of object b.
525
- *
526
- * @param {Object} a The object to be extended
527
- * @param {Object} b The object to copy properties from
528
- * @param {Object} thisArg The object to bind function to
529
- *
530
- * @param {Boolean} [allOwnKeys]
531
- * @returns {Object} The resulting value of object a
532
- */
533
- const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
534
- forEach(b, (val, key) => {
535
- if (thisArg && isFunction(val)) {
536
- a[key] = bind(val, thisArg);
537
- } else {
538
- a[key] = val;
539
- }
540
- }, {allOwnKeys});
541
- return a;
542
- }
543
-
544
- /**
545
- * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
546
- *
547
- * @param {string} content with BOM
548
- *
549
- * @returns {string} content value without BOM
550
- */
551
- const stripBOM = (content) => {
552
- if (content.charCodeAt(0) === 0xFEFF) {
553
- content = content.slice(1);
554
- }
555
- return content;
556
- }
557
-
558
- /**
559
- * Inherit the prototype methods from one constructor into another
560
- * @param {function} constructor
561
- * @param {function} superConstructor
562
- * @param {object} [props]
563
- * @param {object} [descriptors]
564
- *
565
- * @returns {void}
566
- */
567
- const inherits = (constructor, superConstructor, props, descriptors) => {
568
- constructor.prototype = Object.create(superConstructor.prototype, descriptors);
569
- constructor.prototype.constructor = constructor;
570
- Object.defineProperty(constructor, 'super', {
571
- value: superConstructor.prototype
572
- });
573
- props && Object.assign(constructor.prototype, props);
574
- }
575
-
576
- /**
577
- * Resolve object with deep prototype chain to a flat object
578
- * @param {Object} sourceObj source object
579
- * @param {Object} [destObj]
580
- * @param {Function|Boolean} [filter]
581
- * @param {Function} [propFilter]
582
- *
583
- * @returns {Object}
584
- */
585
- const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
586
- let props;
587
- let i;
588
- let prop;
589
- const merged = {};
590
-
591
- destObj = destObj || {};
592
- // eslint-disable-next-line no-eq-null,eqeqeq
593
- if (sourceObj == null) return destObj;
594
-
595
- do {
596
- props = Object.getOwnPropertyNames(sourceObj);
597
- i = props.length;
598
- while (i-- > 0) {
599
- prop = props[i];
600
- if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
601
- destObj[prop] = sourceObj[prop];
602
- merged[prop] = true;
603
- }
604
- }
605
- sourceObj = filter !== false && getPrototypeOf(sourceObj);
606
- } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
607
-
608
- return destObj;
609
- }
610
-
611
- /**
612
- * Determines whether a string ends with the characters of a specified string
613
- *
614
- * @param {String} str
615
- * @param {String} searchString
616
- * @param {Number} [position= 0]
617
- *
618
- * @returns {boolean}
619
- */
620
- const endsWith = (str, searchString, position) => {
621
- str = String(str);
622
- if (position === undefined || position > str.length) {
623
- position = str.length;
624
- }
625
- position -= searchString.length;
626
- const lastIndex = str.indexOf(searchString, position);
627
- return lastIndex !== -1 && lastIndex === position;
628
- }
629
-
630
-
631
- /**
632
- * Returns new array from array like object or null if failed
633
- *
634
- * @param {*} [thing]
635
- *
636
- * @returns {?Array}
637
- */
638
- const toArray = (thing) => {
639
- if (!thing) return null;
640
- if (isArray(thing)) return thing;
641
- let i = thing.length;
642
- if (!isNumber(i)) return null;
643
- const arr = new Array(i);
644
- while (i-- > 0) {
645
- arr[i] = thing[i];
646
- }
647
- return arr;
648
- }
649
-
650
- /**
651
- * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
652
- * thing passed in is an instance of Uint8Array
653
- *
654
- * @param {TypedArray}
655
- *
656
- * @returns {Array}
657
- */
658
- // eslint-disable-next-line func-names
659
- const isTypedArray = (TypedArray => {
660
- // eslint-disable-next-line func-names
661
- return thing => {
662
- return TypedArray && thing instanceof TypedArray;
663
- };
664
- })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
665
-
666
- /**
667
- * For each entry in the object, call the function with the key and value.
668
- *
669
- * @param {Object<any, any>} obj - The object to iterate over.
670
- * @param {Function} fn - The function to call for each entry.
671
- *
672
- * @returns {void}
673
- */
674
- const forEachEntry = (obj, fn) => {
675
- const generator = obj && obj[Symbol.iterator];
676
-
677
- const iterator = generator.call(obj);
678
-
679
- let result;
680
-
681
- while ((result = iterator.next()) && !result.done) {
682
- const pair = result.value;
683
- fn.call(obj, pair[0], pair[1]);
684
- }
685
- }
686
-
687
- /**
688
- * It takes a regular expression and a string, and returns an array of all the matches
689
- *
690
- * @param {string} regExp - The regular expression to match against.
691
- * @param {string} str - The string to search.
692
- *
693
- * @returns {Array<boolean>}
694
- */
695
- const matchAll = (regExp, str) => {
696
- let matches;
697
- const arr = [];
698
-
699
- while ((matches = regExp.exec(str)) !== null) {
700
- arr.push(matches);
701
- }
702
-
703
- return arr;
704
- }
705
-
706
- /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
707
- const isHTMLForm = kindOfTest('HTMLFormElement');
708
-
709
- const toCamelCase = str => {
710
- return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
711
- function replacer(m, p1, p2) {
712
- return p1.toUpperCase() + p2;
713
- }
714
- );
715
- };
716
-
717
- /* Creating a function that will check if an object has a property. */
718
- const utils_hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
719
-
720
- /**
721
- * Determine if a value is a RegExp object
722
- *
723
- * @param {*} val The value to test
724
- *
725
- * @returns {boolean} True if value is a RegExp object, otherwise false
726
- */
727
- const isRegExp = kindOfTest('RegExp');
728
-
729
- const reduceDescriptors = (obj, reducer) => {
730
- const descriptors = Object.getOwnPropertyDescriptors(obj);
731
- const reducedDescriptors = {};
732
-
733
- forEach(descriptors, (descriptor, name) => {
734
- if (reducer(descriptor, name, obj) !== false) {
735
- reducedDescriptors[name] = descriptor;
736
- }
737
- });
738
-
739
- Object.defineProperties(obj, reducedDescriptors);
740
- }
741
-
742
- /**
743
- * Makes all methods read-only
744
- * @param {Object} obj
745
- */
746
-
747
- const freezeMethods = (obj) => {
748
- reduceDescriptors(obj, (descriptor, name) => {
749
- // skip restricted props in strict mode
750
- if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
751
- return false;
752
- }
753
-
754
- const value = obj[name];
755
-
756
- if (!isFunction(value)) return;
757
-
758
- descriptor.enumerable = false;
759
-
760
- if ('writable' in descriptor) {
761
- descriptor.writable = false;
762
- return;
763
- }
764
-
765
- if (!descriptor.set) {
766
- descriptor.set = () => {
767
- throw Error('Can not rewrite read-only method \'' + name + '\'');
768
- };
769
- }
770
- });
771
- }
772
-
773
- const toObjectSet = (arrayOrString, delimiter) => {
774
- const obj = {};
775
-
776
- const define = (arr) => {
777
- arr.forEach(value => {
778
- obj[value] = true;
779
- });
780
- }
781
-
782
- isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
783
-
784
- return obj;
785
- }
786
-
787
- const noop = () => {}
788
-
789
- const toFiniteNumber = (value, defaultValue) => {
790
- value = +value;
791
- return Number.isFinite(value) ? value : defaultValue;
792
- }
793
-
794
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
795
-
796
- const DIGIT = '0123456789';
797
-
798
- const ALPHABET = {
799
- DIGIT,
800
- ALPHA,
801
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
802
- }
803
-
804
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
805
- let str = '';
806
- const {length} = alphabet;
807
- while (size--) {
808
- str += alphabet[Math.random() * length|0]
809
- }
810
-
811
- return str;
812
- }
813
-
814
- /**
815
- * If the thing is a FormData object, return true, otherwise return false.
816
- *
817
- * @param {unknown} thing - The thing to check.
818
- *
819
- * @returns {boolean}
820
- */
821
- function isSpecCompliantForm(thing) {
822
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
823
- }
824
-
825
- const toJSONObject = (obj) => {
826
- const stack = new Array(10);
827
-
828
- const visit = (source, i) => {
829
-
830
- if (isObject(source)) {
831
- if (stack.indexOf(source) >= 0) {
832
- return;
833
- }
834
-
835
- if(!('toJSON' in source)) {
836
- stack[i] = source;
837
- const target = isArray(source) ? [] : {};
838
-
839
- forEach(source, (value, key) => {
840
- const reducedValue = visit(value, i + 1);
841
- !isUndefined(reducedValue) && (target[key] = reducedValue);
842
- });
843
-
844
- stack[i] = undefined;
845
-
846
- return target;
847
- }
848
- }
849
-
850
- return source;
851
- }
852
-
853
- return visit(obj, 0);
854
- }
855
-
856
- /* harmony default export */ var utils = ({
857
- isArray,
858
- isArrayBuffer,
859
- isBuffer,
860
- isFormData,
861
- isArrayBufferView,
862
- isString,
863
- isNumber,
864
- isBoolean,
865
- isObject,
866
- isPlainObject,
867
- isUndefined,
868
- isDate,
869
- isFile,
870
- isBlob,
871
- isRegExp,
872
- isFunction,
873
- isStream,
874
- isURLSearchParams,
875
- isTypedArray,
876
- isFileList,
877
- forEach,
878
- merge,
879
- extend,
880
- trim,
881
- stripBOM,
882
- inherits,
883
- toFlatObject,
884
- kindOf,
885
- kindOfTest,
886
- endsWith,
887
- toArray,
888
- forEachEntry,
889
- matchAll,
890
- isHTMLForm,
891
- hasOwnProperty: utils_hasOwnProperty,
892
- hasOwnProp: utils_hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
893
- reduceDescriptors,
894
- freezeMethods,
895
- toObjectSet,
896
- toCamelCase,
897
- noop,
898
- toFiniteNumber,
899
- findKey,
900
- global: _global,
901
- isContextDefined,
902
- ALPHABET,
903
- generateString,
904
- isSpecCompliantForm,
905
- toJSONObject
906
- });
907
-
908
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosError.js
909
-
910
-
911
-
912
-
913
- /**
914
- * Create an Error with the specified message, config, error code, request and response.
915
- *
916
- * @param {string} message The error message.
917
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
918
- * @param {Object} [config] The config.
919
- * @param {Object} [request] The request.
920
- * @param {Object} [response] The response.
921
- *
922
- * @returns {Error} The created error.
923
- */
924
- function AxiosError(message, code, config, request, response) {
925
- Error.call(this);
926
-
927
- if (Error.captureStackTrace) {
928
- Error.captureStackTrace(this, this.constructor);
929
- } else {
930
- this.stack = (new Error()).stack;
931
- }
932
-
933
- this.message = message;
934
- this.name = 'AxiosError';
935
- code && (this.code = code);
936
- config && (this.config = config);
937
- request && (this.request = request);
938
- response && (this.response = response);
939
- }
940
-
941
- utils.inherits(AxiosError, Error, {
942
- toJSON: function toJSON() {
943
- return {
944
- // Standard
945
- message: this.message,
946
- name: this.name,
947
- // Microsoft
948
- description: this.description,
949
- number: this.number,
950
- // Mozilla
951
- fileName: this.fileName,
952
- lineNumber: this.lineNumber,
953
- columnNumber: this.columnNumber,
954
- stack: this.stack,
955
- // Axios
956
- config: utils.toJSONObject(this.config),
957
- code: this.code,
958
- status: this.response && this.response.status ? this.response.status : null
959
- };
960
- }
961
- });
962
-
963
- const AxiosError_prototype = AxiosError.prototype;
964
- const descriptors = {};
965
-
966
- [
967
- 'ERR_BAD_OPTION_VALUE',
968
- 'ERR_BAD_OPTION',
969
- 'ECONNABORTED',
970
- 'ETIMEDOUT',
971
- 'ERR_NETWORK',
972
- 'ERR_FR_TOO_MANY_REDIRECTS',
973
- 'ERR_DEPRECATED',
974
- 'ERR_BAD_RESPONSE',
975
- 'ERR_BAD_REQUEST',
976
- 'ERR_CANCELED',
977
- 'ERR_NOT_SUPPORT',
978
- 'ERR_INVALID_URL'
979
- // eslint-disable-next-line func-names
980
- ].forEach(code => {
981
- descriptors[code] = {value: code};
982
- });
983
-
984
- Object.defineProperties(AxiosError, descriptors);
985
- Object.defineProperty(AxiosError_prototype, 'isAxiosError', {value: true});
986
-
987
- // eslint-disable-next-line func-names
988
- AxiosError.from = (error, code, config, request, response, customProps) => {
989
- const axiosError = Object.create(AxiosError_prototype);
990
-
991
- utils.toFlatObject(error, axiosError, function filter(obj) {
992
- return obj !== Error.prototype;
993
- }, prop => {
994
- return prop !== 'isAxiosError';
995
- });
996
-
997
- AxiosError.call(axiosError, error.message, code, config, request, response);
998
-
999
- axiosError.cause = error;
1000
-
1001
- axiosError.name = error.name;
1002
-
1003
- customProps && Object.assign(axiosError, customProps);
1004
-
1005
- return axiosError;
1006
- };
1007
-
1008
- /* harmony default export */ var core_AxiosError = (AxiosError);
1009
-
1010
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/null.js
1011
- // eslint-disable-next-line strict
1012
- /* harmony default export */ var helpers_null = (null);
1013
-
1014
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toFormData.js
1015
-
1016
-
1017
-
1018
-
1019
- // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
1020
-
1021
-
1022
- /**
1023
- * Determines if the given thing is a array or js object.
1024
- *
1025
- * @param {string} thing - The object or array to be visited.
1026
- *
1027
- * @returns {boolean}
1028
- */
1029
- function isVisitable(thing) {
1030
- return utils.isPlainObject(thing) || utils.isArray(thing);
1031
- }
1032
-
1033
- /**
1034
- * It removes the brackets from the end of a string
1035
- *
1036
- * @param {string} key - The key of the parameter.
1037
- *
1038
- * @returns {string} the key without the brackets.
1039
- */
1040
- function removeBrackets(key) {
1041
- return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
1042
- }
1043
-
1044
- /**
1045
- * It takes a path, a key, and a boolean, and returns a string
1046
- *
1047
- * @param {string} path - The path to the current key.
1048
- * @param {string} key - The key of the current object being iterated over.
1049
- * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
1050
- *
1051
- * @returns {string} The path to the current key.
1052
- */
1053
- function renderKey(path, key, dots) {
1054
- if (!path) return key;
1055
- return path.concat(key).map(function each(token, i) {
1056
- // eslint-disable-next-line no-param-reassign
1057
- token = removeBrackets(token);
1058
- return !dots && i ? '[' + token + ']' : token;
1059
- }).join(dots ? '.' : '');
1060
- }
1061
-
1062
- /**
1063
- * If the array is an array and none of its elements are visitable, then it's a flat array.
1064
- *
1065
- * @param {Array<any>} arr - The array to check
1066
- *
1067
- * @returns {boolean}
1068
- */
1069
- function isFlatArray(arr) {
1070
- return utils.isArray(arr) && !arr.some(isVisitable);
1071
- }
1072
-
1073
- const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
1074
- return /^is[A-Z]/.test(prop);
1075
- });
1076
-
1077
- /**
1078
- * Convert a data object to FormData
1079
- *
1080
- * @param {Object} obj
1081
- * @param {?Object} [formData]
1082
- * @param {?Object} [options]
1083
- * @param {Function} [options.visitor]
1084
- * @param {Boolean} [options.metaTokens = true]
1085
- * @param {Boolean} [options.dots = false]
1086
- * @param {?Boolean} [options.indexes = false]
1087
- *
1088
- * @returns {Object}
1089
- **/
1090
-
1091
- /**
1092
- * It converts an object into a FormData object
1093
- *
1094
- * @param {Object<any, any>} obj - The object to convert to form data.
1095
- * @param {string} formData - The FormData object to append to.
1096
- * @param {Object<string, any>} options
1097
- *
1098
- * @returns
1099
- */
1100
- function toFormData(obj, formData, options) {
1101
- if (!utils.isObject(obj)) {
1102
- throw new TypeError('target must be an object');
1103
- }
1104
-
1105
- // eslint-disable-next-line no-param-reassign
1106
- formData = formData || new (helpers_null || FormData)();
1107
-
1108
- // eslint-disable-next-line no-param-reassign
1109
- options = utils.toFlatObject(options, {
1110
- metaTokens: true,
1111
- dots: false,
1112
- indexes: false
1113
- }, false, function defined(option, source) {
1114
- // eslint-disable-next-line no-eq-null,eqeqeq
1115
- return !utils.isUndefined(source[option]);
1116
- });
1117
-
1118
- const metaTokens = options.metaTokens;
1119
- // eslint-disable-next-line no-use-before-define
1120
- const visitor = options.visitor || defaultVisitor;
1121
- const dots = options.dots;
1122
- const indexes = options.indexes;
1123
- const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
1124
- const useBlob = _Blob && utils.isSpecCompliantForm(formData);
1125
-
1126
- if (!utils.isFunction(visitor)) {
1127
- throw new TypeError('visitor must be a function');
1128
- }
1129
-
1130
- function convertValue(value) {
1131
- if (value === null) return '';
1132
-
1133
- if (utils.isDate(value)) {
1134
- return value.toISOString();
1135
- }
1136
-
1137
- if (!useBlob && utils.isBlob(value)) {
1138
- throw new core_AxiosError('Blob is not supported. Use a Buffer instead.');
1139
- }
1140
-
1141
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
1142
- return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1143
- }
1144
-
1145
- return value;
1146
- }
1147
-
1148
- /**
1149
- * Default visitor.
1150
- *
1151
- * @param {*} value
1152
- * @param {String|Number} key
1153
- * @param {Array<String|Number>} path
1154
- * @this {FormData}
1155
- *
1156
- * @returns {boolean} return true to visit the each prop of the value recursively
1157
- */
1158
- function defaultVisitor(value, key, path) {
1159
- let arr = value;
1160
-
1161
- if (value && !path && typeof value === 'object') {
1162
- if (utils.endsWith(key, '{}')) {
1163
- // eslint-disable-next-line no-param-reassign
1164
- key = metaTokens ? key : key.slice(0, -2);
1165
- // eslint-disable-next-line no-param-reassign
1166
- value = JSON.stringify(value);
1167
- } else if (
1168
- (utils.isArray(value) && isFlatArray(value)) ||
1169
- ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
1170
- )) {
1171
- // eslint-disable-next-line no-param-reassign
1172
- key = removeBrackets(key);
1173
-
1174
- arr.forEach(function each(el, index) {
1175
- !(utils.isUndefined(el) || el === null) && formData.append(
1176
- // eslint-disable-next-line no-nested-ternary
1177
- indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
1178
- convertValue(el)
1179
- );
1180
- });
1181
- return false;
1182
- }
1183
- }
1184
-
1185
- if (isVisitable(value)) {
1186
- return true;
1187
- }
1188
-
1189
- formData.append(renderKey(path, key, dots), convertValue(value));
1190
-
1191
- return false;
1192
- }
1193
-
1194
- const stack = [];
1195
-
1196
- const exposedHelpers = Object.assign(predicates, {
1197
- defaultVisitor,
1198
- convertValue,
1199
- isVisitable
1200
- });
1201
-
1202
- function build(value, path) {
1203
- if (utils.isUndefined(value)) return;
1204
-
1205
- if (stack.indexOf(value) !== -1) {
1206
- throw Error('Circular reference detected in ' + path.join('.'));
1207
- }
1208
-
1209
- stack.push(value);
1210
-
1211
- utils.forEach(value, function each(el, key) {
1212
- const result = !(utils.isUndefined(el) || el === null) && visitor.call(
1213
- formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
1214
- );
1215
-
1216
- if (result === true) {
1217
- build(el, path ? path.concat(key) : [key]);
1218
- }
1219
- });
1220
-
1221
- stack.pop();
1222
- }
1223
-
1224
- if (!utils.isObject(obj)) {
1225
- throw new TypeError('data must be an object');
1226
- }
1227
-
1228
- build(obj);
1229
-
1230
- return formData;
1231
- }
1232
-
1233
- /* harmony default export */ var helpers_toFormData = (toFormData);
1234
-
1235
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js
1236
-
1237
-
1238
-
1239
-
1240
- /**
1241
- * It encodes a string by replacing all characters that are not in the unreserved set with
1242
- * their percent-encoded equivalents
1243
- *
1244
- * @param {string} str - The string to encode.
1245
- *
1246
- * @returns {string} The encoded string.
1247
- */
1248
- function encode(str) {
1249
- const charMap = {
1250
- '!': '%21',
1251
- "'": '%27',
1252
- '(': '%28',
1253
- ')': '%29',
1254
- '~': '%7E',
1255
- '%20': '+',
1256
- '%00': '\x00'
1257
- };
1258
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1259
- return charMap[match];
1260
- });
1261
- }
1262
-
1263
- /**
1264
- * It takes a params object and converts it to a FormData object
1265
- *
1266
- * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1267
- * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1268
- *
1269
- * @returns {void}
1270
- */
1271
- function AxiosURLSearchParams(params, options) {
1272
- this._pairs = [];
1273
-
1274
- params && helpers_toFormData(params, this, options);
1275
- }
1276
-
1277
- const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
1278
-
1279
- AxiosURLSearchParams_prototype.append = function append(name, value) {
1280
- this._pairs.push([name, value]);
1281
- };
1282
-
1283
- AxiosURLSearchParams_prototype.toString = function toString(encoder) {
1284
- const _encode = encoder ? function(value) {
1285
- return encoder.call(this, value, encode);
1286
- } : encode;
1287
-
1288
- return this._pairs.map(function each(pair) {
1289
- return _encode(pair[0]) + '=' + _encode(pair[1]);
1290
- }, '').join('&');
1291
- };
1292
-
1293
- /* harmony default export */ var helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
1294
-
1295
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/buildURL.js
1296
-
1297
-
1298
-
1299
-
1300
-
1301
- /**
1302
- * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1303
- * URI encoded counterparts
1304
- *
1305
- * @param {string} val The value to be encoded.
1306
- *
1307
- * @returns {string} The encoded value.
1308
- */
1309
- function buildURL_encode(val) {
1310
- return encodeURIComponent(val).
1311
- replace(/%3A/gi, ':').
1312
- replace(/%24/g, '$').
1313
- replace(/%2C/gi, ',').
1314
- replace(/%20/g, '+').
1315
- replace(/%5B/gi, '[').
1316
- replace(/%5D/gi, ']');
1317
- }
1318
-
1319
- /**
1320
- * Build a URL by appending params to the end
1321
- *
1322
- * @param {string} url The base of the url (e.g., http://www.google.com)
1323
- * @param {object} [params] The params to be appended
1324
- * @param {?object} options
1325
- *
1326
- * @returns {string} The formatted url
1327
- */
1328
- function buildURL(url, params, options) {
1329
- /*eslint no-param-reassign:0*/
1330
- if (!params) {
1331
- return url;
1332
- }
1333
-
1334
- const _encode = options && options.encode || buildURL_encode;
1335
-
1336
- const serializeFn = options && options.serialize;
1337
-
1338
- let serializedParams;
1339
-
1340
- if (serializeFn) {
1341
- serializedParams = serializeFn(params, options);
1342
- } else {
1343
- serializedParams = utils.isURLSearchParams(params) ?
1344
- params.toString() :
1345
- new helpers_AxiosURLSearchParams(params, options).toString(_encode);
1346
- }
1347
-
1348
- if (serializedParams) {
1349
- const hashmarkIndex = url.indexOf("#");
1350
-
1351
- if (hashmarkIndex !== -1) {
1352
- url = url.slice(0, hashmarkIndex);
1353
- }
1354
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1355
- }
1356
-
1357
- return url;
1358
- }
1359
-
1360
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/InterceptorManager.js
1361
-
1362
-
1363
-
1364
-
1365
- class InterceptorManager {
1366
- constructor() {
1367
- this.handlers = [];
1368
- }
1369
-
1370
- /**
1371
- * Add a new interceptor to the stack
1372
- *
1373
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
1374
- * @param {Function} rejected The function to handle `reject` for a `Promise`
1375
- *
1376
- * @return {Number} An ID used to remove interceptor later
1377
- */
1378
- use(fulfilled, rejected, options) {
1379
- this.handlers.push({
1380
- fulfilled,
1381
- rejected,
1382
- synchronous: options ? options.synchronous : false,
1383
- runWhen: options ? options.runWhen : null
1384
- });
1385
- return this.handlers.length - 1;
1386
- }
1387
-
1388
- /**
1389
- * Remove an interceptor from the stack
1390
- *
1391
- * @param {Number} id The ID that was returned by `use`
1392
- *
1393
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1394
- */
1395
- eject(id) {
1396
- if (this.handlers[id]) {
1397
- this.handlers[id] = null;
1398
- }
1399
- }
1400
-
1401
- /**
1402
- * Clear all interceptors from the stack
1403
- *
1404
- * @returns {void}
1405
- */
1406
- clear() {
1407
- if (this.handlers) {
1408
- this.handlers = [];
1409
- }
1410
- }
1411
-
1412
- /**
1413
- * Iterate over all the registered interceptors
1414
- *
1415
- * This method is particularly useful for skipping over any
1416
- * interceptors that may have become `null` calling `eject`.
1417
- *
1418
- * @param {Function} fn The function to call for each interceptor
1419
- *
1420
- * @returns {void}
1421
- */
1422
- forEach(fn) {
1423
- utils.forEach(this.handlers, function forEachHandler(h) {
1424
- if (h !== null) {
1425
- fn(h);
1426
- }
1427
- });
1428
- }
1429
- }
1430
-
1431
- /* harmony default export */ var core_InterceptorManager = (InterceptorManager);
1432
-
1433
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/transitional.js
1434
-
1435
-
1436
- /* harmony default export */ var defaults_transitional = ({
1437
- silentJSONParsing: true,
1438
- forcedJSONParsing: true,
1439
- clarifyTimeoutError: false
1440
- });
1441
-
1442
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
1443
-
1444
-
1445
-
1446
- /* harmony default export */ var classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams);
1447
-
1448
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/FormData.js
1449
-
1450
-
1451
- /* harmony default export */ var classes_FormData = (typeof FormData !== 'undefined' ? FormData : null);
1452
-
1453
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/Blob.js
1454
-
1455
-
1456
- /* harmony default export */ var classes_Blob = (typeof Blob !== 'undefined' ? Blob : null);
1457
-
1458
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/index.js
1459
-
1460
-
1461
-
1462
-
1463
- /**
1464
- * Determine if we're running in a standard browser environment
1465
- *
1466
- * This allows axios to run in a web worker, and react-native.
1467
- * Both environments support XMLHttpRequest, but not fully standard globals.
1468
- *
1469
- * web workers:
1470
- * typeof window -> undefined
1471
- * typeof document -> undefined
1472
- *
1473
- * react-native:
1474
- * navigator.product -> 'ReactNative'
1475
- * nativescript
1476
- * navigator.product -> 'NativeScript' or 'NS'
1477
- *
1478
- * @returns {boolean}
1479
- */
1480
- const isStandardBrowserEnv = (() => {
1481
- let product;
1482
- if (typeof navigator !== 'undefined' && (
1483
- (product = navigator.product) === 'ReactNative' ||
1484
- product === 'NativeScript' ||
1485
- product === 'NS')
1486
- ) {
1487
- return false;
1488
- }
1489
-
1490
- return typeof window !== 'undefined' && typeof document !== 'undefined';
1491
- })();
1492
-
1493
- /**
1494
- * Determine if we're running in a standard browser webWorker environment
1495
- *
1496
- * Although the `isStandardBrowserEnv` method indicates that
1497
- * `allows axios to run in a web worker`, the WebWorker will still be
1498
- * filtered out due to its judgment standard
1499
- * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1500
- * This leads to a problem when axios post `FormData` in webWorker
1501
- */
1502
- const isStandardBrowserWebWorkerEnv = (() => {
1503
- return (
1504
- typeof WorkerGlobalScope !== 'undefined' &&
1505
- // eslint-disable-next-line no-undef
1506
- self instanceof WorkerGlobalScope &&
1507
- typeof self.importScripts === 'function'
1508
- );
1509
- })();
1510
-
1511
-
1512
- /* harmony default export */ var browser = ({
1513
- isBrowser: true,
1514
- classes: {
1515
- URLSearchParams: classes_URLSearchParams,
1516
- FormData: classes_FormData,
1517
- Blob: classes_Blob
1518
- },
1519
- isStandardBrowserEnv,
1520
- isStandardBrowserWebWorkerEnv,
1521
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1522
- });
1523
-
1524
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toURLEncodedForm.js
1525
-
1526
-
1527
-
1528
-
1529
-
1530
-
1531
- function toURLEncodedForm(data, options) {
1532
- return helpers_toFormData(data, new browser.classes.URLSearchParams(), Object.assign({
1533
- visitor: function(value, key, path, helpers) {
1534
- if (browser.isNode && utils.isBuffer(value)) {
1535
- this.append(key, value.toString('base64'));
1536
- return false;
1537
- }
1538
-
1539
- return helpers.defaultVisitor.apply(this, arguments);
1540
- }
1541
- }, options));
1542
- }
1543
-
1544
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/formDataToJSON.js
1545
-
1546
-
1547
-
1548
-
1549
- /**
1550
- * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
1551
- *
1552
- * @param {string} name - The name of the property to get.
1553
- *
1554
- * @returns An array of strings.
1555
- */
1556
- function parsePropPath(name) {
1557
- // foo[x][y][z]
1558
- // foo.x.y.z
1559
- // foo-x-y-z
1560
- // foo x y z
1561
- return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1562
- return match[0] === '[]' ? '' : match[1] || match[0];
1563
- });
1564
- }
1565
-
1566
- /**
1567
- * Convert an array to an object.
1568
- *
1569
- * @param {Array<any>} arr - The array to convert to an object.
1570
- *
1571
- * @returns An object with the same keys and values as the array.
1572
- */
1573
- function arrayToObject(arr) {
1574
- const obj = {};
1575
- const keys = Object.keys(arr);
1576
- let i;
1577
- const len = keys.length;
1578
- let key;
1579
- for (i = 0; i < len; i++) {
1580
- key = keys[i];
1581
- obj[key] = arr[key];
1582
- }
1583
- return obj;
1584
- }
1585
-
1586
- /**
1587
- * It takes a FormData object and returns a JavaScript object
1588
- *
1589
- * @param {string} formData The FormData object to convert to JSON.
1590
- *
1591
- * @returns {Object<string, any> | null} The converted object.
1592
- */
1593
- function formDataToJSON(formData) {
1594
- function buildPath(path, value, target, index) {
1595
- let name = path[index++];
1596
- const isNumericKey = Number.isFinite(+name);
1597
- const isLast = index >= path.length;
1598
- name = !name && utils.isArray(target) ? target.length : name;
1599
-
1600
- if (isLast) {
1601
- if (utils.hasOwnProp(target, name)) {
1602
- target[name] = [target[name], value];
1603
- } else {
1604
- target[name] = value;
1605
- }
1606
-
1607
- return !isNumericKey;
1608
- }
1609
-
1610
- if (!target[name] || !utils.isObject(target[name])) {
1611
- target[name] = [];
1612
- }
1613
-
1614
- const result = buildPath(path, value, target[name], index);
1615
-
1616
- if (result && utils.isArray(target[name])) {
1617
- target[name] = arrayToObject(target[name]);
1618
- }
1619
-
1620
- return !isNumericKey;
1621
- }
1622
-
1623
- if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
1624
- const obj = {};
1625
-
1626
- utils.forEachEntry(formData, (name, value) => {
1627
- buildPath(parsePropPath(name), value, obj, 0);
1628
- });
1629
-
1630
- return obj;
1631
- }
1632
-
1633
- return null;
1634
- }
1635
-
1636
- /* harmony default export */ var helpers_formDataToJSON = (formDataToJSON);
1637
-
1638
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/index.js
1639
-
1640
-
1641
-
1642
-
1643
-
1644
-
1645
-
1646
-
1647
-
1648
-
1649
- const DEFAULT_CONTENT_TYPE = {
1650
- 'Content-Type': undefined
1651
- };
1652
-
1653
- /**
1654
- * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1655
- * of the input
1656
- *
1657
- * @param {any} rawValue - The value to be stringified.
1658
- * @param {Function} parser - A function that parses a string into a JavaScript object.
1659
- * @param {Function} encoder - A function that takes a value and returns a string.
1660
- *
1661
- * @returns {string} A stringified version of the rawValue.
1662
- */
1663
- function stringifySafely(rawValue, parser, encoder) {
1664
- if (utils.isString(rawValue)) {
1665
- try {
1666
- (parser || JSON.parse)(rawValue);
1667
- return utils.trim(rawValue);
1668
- } catch (e) {
1669
- if (e.name !== 'SyntaxError') {
1670
- throw e;
1671
- }
1672
- }
1673
- }
1674
-
1675
- return (encoder || JSON.stringify)(rawValue);
1676
- }
1677
-
1678
- const defaults = {
1679
-
1680
- transitional: defaults_transitional,
1681
-
1682
- adapter: ['xhr', 'http'],
1683
-
1684
- transformRequest: [function transformRequest(data, headers) {
1685
- const contentType = headers.getContentType() || '';
1686
- const hasJSONContentType = contentType.indexOf('application/json') > -1;
1687
- const isObjectPayload = utils.isObject(data);
1688
-
1689
- if (isObjectPayload && utils.isHTMLForm(data)) {
1690
- data = new FormData(data);
1691
- }
1692
-
1693
- const isFormData = utils.isFormData(data);
1694
-
1695
- if (isFormData) {
1696
- if (!hasJSONContentType) {
1697
- return data;
1698
- }
1699
- return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
1700
- }
1701
-
1702
- if (utils.isArrayBuffer(data) ||
1703
- utils.isBuffer(data) ||
1704
- utils.isStream(data) ||
1705
- utils.isFile(data) ||
1706
- utils.isBlob(data)
1707
- ) {
1708
- return data;
1709
- }
1710
- if (utils.isArrayBufferView(data)) {
1711
- return data.buffer;
1712
- }
1713
- if (utils.isURLSearchParams(data)) {
1714
- headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1715
- return data.toString();
1716
- }
1717
-
1718
- let isFileList;
1719
-
1720
- if (isObjectPayload) {
1721
- if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
1722
- return toURLEncodedForm(data, this.formSerializer).toString();
1723
- }
1724
-
1725
- if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1726
- const _FormData = this.env && this.env.FormData;
1727
-
1728
- return helpers_toFormData(
1729
- isFileList ? {'files[]': data} : data,
1730
- _FormData && new _FormData(),
1731
- this.formSerializer
1732
- );
1733
- }
1734
- }
1735
-
1736
- if (isObjectPayload || hasJSONContentType ) {
1737
- headers.setContentType('application/json', false);
1738
- return stringifySafely(data);
1739
- }
1740
-
1741
- return data;
1742
- }],
1743
-
1744
- transformResponse: [function transformResponse(data) {
1745
- const transitional = this.transitional || defaults.transitional;
1746
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1747
- const JSONRequested = this.responseType === 'json';
1748
-
1749
- if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1750
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
1751
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
1752
-
1753
- try {
1754
- return JSON.parse(data);
1755
- } catch (e) {
1756
- if (strictJSONParsing) {
1757
- if (e.name === 'SyntaxError') {
1758
- throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
1759
- }
1760
- throw e;
1761
- }
1762
- }
1763
- }
1764
-
1765
- return data;
1766
- }],
1767
-
1768
- /**
1769
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
1770
- * timeout is not created.
1771
- */
1772
- timeout: 0,
1773
-
1774
- xsrfCookieName: 'XSRF-TOKEN',
1775
- xsrfHeaderName: 'X-XSRF-TOKEN',
1776
-
1777
- maxContentLength: -1,
1778
- maxBodyLength: -1,
1779
-
1780
- env: {
1781
- FormData: browser.classes.FormData,
1782
- Blob: browser.classes.Blob
1783
- },
1784
-
1785
- validateStatus: function validateStatus(status) {
1786
- return status >= 200 && status < 300;
1787
- },
1788
-
1789
- headers: {
1790
- common: {
1791
- 'Accept': 'application/json, text/plain, */*'
1792
- }
1793
- }
1794
- };
1795
-
1796
- utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1797
- defaults.headers[method] = {};
1798
- });
1799
-
1800
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1801
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1802
- });
1803
-
1804
- /* harmony default export */ var lib_defaults = (defaults);
1805
-
1806
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseHeaders.js
1807
-
1808
-
1809
-
1810
-
1811
- // RawAxiosHeaders whose duplicates are ignored by node
1812
- // c.f. https://nodejs.org/api/http.html#http_message_headers
1813
- const ignoreDuplicateOf = utils.toObjectSet([
1814
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
1815
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1816
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1817
- 'referer', 'retry-after', 'user-agent'
1818
- ]);
1819
-
1820
- /**
1821
- * Parse headers into an object
1822
- *
1823
- * ```
1824
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
1825
- * Content-Type: application/json
1826
- * Connection: keep-alive
1827
- * Transfer-Encoding: chunked
1828
- * ```
1829
- *
1830
- * @param {String} rawHeaders Headers needing to be parsed
1831
- *
1832
- * @returns {Object} Headers parsed into an object
1833
- */
1834
- /* harmony default export */ var parseHeaders = (rawHeaders => {
1835
- const parsed = {};
1836
- let key;
1837
- let val;
1838
- let i;
1839
-
1840
- rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
1841
- i = line.indexOf(':');
1842
- key = line.substring(0, i).trim().toLowerCase();
1843
- val = line.substring(i + 1).trim();
1844
-
1845
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
1846
- return;
1847
- }
1848
-
1849
- if (key === 'set-cookie') {
1850
- if (parsed[key]) {
1851
- parsed[key].push(val);
1852
- } else {
1853
- parsed[key] = [val];
1854
- }
1855
- } else {
1856
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1857
- }
1858
- });
1859
-
1860
- return parsed;
1861
- });
1862
-
1863
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosHeaders.js
1864
-
1865
-
1866
-
1867
-
1868
-
1869
- const $internals = Symbol('internals');
1870
-
1871
- function normalizeHeader(header) {
1872
- return header && String(header).trim().toLowerCase();
1873
- }
1874
-
1875
- function normalizeValue(value) {
1876
- if (value === false || value == null) {
1877
- return value;
1878
- }
1879
-
1880
- return utils.isArray(value) ? value.map(normalizeValue) : String(value);
1881
- }
1882
-
1883
- function parseTokens(str) {
1884
- const tokens = Object.create(null);
1885
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1886
- let match;
1887
-
1888
- while ((match = tokensRE.exec(str))) {
1889
- tokens[match[1]] = match[2];
1890
- }
1891
-
1892
- return tokens;
1893
- }
1894
-
1895
- const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1896
-
1897
- function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1898
- if (utils.isFunction(filter)) {
1899
- return filter.call(this, value, header);
1900
- }
1901
-
1902
- if (isHeaderNameFilter) {
1903
- value = header;
1904
- }
1905
-
1906
- if (!utils.isString(value)) return;
1907
-
1908
- if (utils.isString(filter)) {
1909
- return value.indexOf(filter) !== -1;
1910
- }
1911
-
1912
- if (utils.isRegExp(filter)) {
1913
- return filter.test(value);
1914
- }
1915
- }
1916
-
1917
- function formatHeader(header) {
1918
- return header.trim()
1919
- .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1920
- return char.toUpperCase() + str;
1921
- });
1922
- }
1923
-
1924
- function buildAccessors(obj, header) {
1925
- const accessorName = utils.toCamelCase(' ' + header);
1926
-
1927
- ['get', 'set', 'has'].forEach(methodName => {
1928
- Object.defineProperty(obj, methodName + accessorName, {
1929
- value: function(arg1, arg2, arg3) {
1930
- return this[methodName].call(this, header, arg1, arg2, arg3);
1931
- },
1932
- configurable: true
1933
- });
1934
- });
1935
- }
1936
-
1937
- class AxiosHeaders {
1938
- constructor(headers) {
1939
- headers && this.set(headers);
1940
- }
1941
-
1942
- set(header, valueOrRewrite, rewrite) {
1943
- const self = this;
1944
-
1945
- function setHeader(_value, _header, _rewrite) {
1946
- const lHeader = normalizeHeader(_header);
1947
-
1948
- if (!lHeader) {
1949
- throw new Error('header name must be a non-empty string');
1950
- }
1951
-
1952
- const key = utils.findKey(self, lHeader);
1953
-
1954
- if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
1955
- self[key || _header] = normalizeValue(_value);
1956
- }
1957
- }
1958
-
1959
- const setHeaders = (headers, _rewrite) =>
1960
- utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1961
-
1962
- if (utils.isPlainObject(header) || header instanceof this.constructor) {
1963
- setHeaders(header, valueOrRewrite)
1964
- } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1965
- setHeaders(parseHeaders(header), valueOrRewrite);
1966
- } else {
1967
- header != null && setHeader(valueOrRewrite, header, rewrite);
1968
- }
1969
-
1970
- return this;
1971
- }
1972
-
1973
- get(header, parser) {
1974
- header = normalizeHeader(header);
1975
-
1976
- if (header) {
1977
- const key = utils.findKey(this, header);
1978
-
1979
- if (key) {
1980
- const value = this[key];
1981
-
1982
- if (!parser) {
1983
- return value;
1984
- }
1985
-
1986
- if (parser === true) {
1987
- return parseTokens(value);
1988
- }
1989
-
1990
- if (utils.isFunction(parser)) {
1991
- return parser.call(this, value, key);
1992
- }
1993
-
1994
- if (utils.isRegExp(parser)) {
1995
- return parser.exec(value);
1996
- }
1997
-
1998
- throw new TypeError('parser must be boolean|regexp|function');
1999
- }
2000
- }
2001
- }
2002
-
2003
- has(header, matcher) {
2004
- header = normalizeHeader(header);
2005
-
2006
- if (header) {
2007
- const key = utils.findKey(this, header);
2008
-
2009
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
2010
- }
2011
-
2012
- return false;
2013
- }
2014
-
2015
- delete(header, matcher) {
2016
- const self = this;
2017
- let deleted = false;
2018
-
2019
- function deleteHeader(_header) {
2020
- _header = normalizeHeader(_header);
2021
-
2022
- if (_header) {
2023
- const key = utils.findKey(self, _header);
2024
-
2025
- if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
2026
- delete self[key];
2027
-
2028
- deleted = true;
2029
- }
2030
- }
2031
- }
2032
-
2033
- if (utils.isArray(header)) {
2034
- header.forEach(deleteHeader);
2035
- } else {
2036
- deleteHeader(header);
2037
- }
2038
-
2039
- return deleted;
2040
- }
2041
-
2042
- clear(matcher) {
2043
- const keys = Object.keys(this);
2044
- let i = keys.length;
2045
- let deleted = false;
2046
-
2047
- while (i--) {
2048
- const key = keys[i];
2049
- if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
2050
- delete this[key];
2051
- deleted = true;
2052
- }
2053
- }
2054
-
2055
- return deleted;
2056
- }
2057
-
2058
- normalize(format) {
2059
- const self = this;
2060
- const headers = {};
2061
-
2062
- utils.forEach(this, (value, header) => {
2063
- const key = utils.findKey(headers, header);
2064
-
2065
- if (key) {
2066
- self[key] = normalizeValue(value);
2067
- delete self[header];
2068
- return;
2069
- }
2070
-
2071
- const normalized = format ? formatHeader(header) : String(header).trim();
2072
-
2073
- if (normalized !== header) {
2074
- delete self[header];
2075
- }
2076
-
2077
- self[normalized] = normalizeValue(value);
2078
-
2079
- headers[normalized] = true;
2080
- });
2081
-
2082
- return this;
2083
- }
2084
-
2085
- concat(...targets) {
2086
- return this.constructor.concat(this, ...targets);
2087
- }
2088
-
2089
- toJSON(asStrings) {
2090
- const obj = Object.create(null);
2091
-
2092
- utils.forEach(this, (value, header) => {
2093
- value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
2094
- });
2095
-
2096
- return obj;
2097
- }
2098
-
2099
- [Symbol.iterator]() {
2100
- return Object.entries(this.toJSON())[Symbol.iterator]();
2101
- }
2102
-
2103
- toString() {
2104
- return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
2105
- }
2106
-
2107
- get [Symbol.toStringTag]() {
2108
- return 'AxiosHeaders';
2109
- }
2110
-
2111
- static from(thing) {
2112
- return thing instanceof this ? thing : new this(thing);
2113
- }
2114
-
2115
- static concat(first, ...targets) {
2116
- const computed = new this(first);
2117
-
2118
- targets.forEach((target) => computed.set(target));
2119
-
2120
- return computed;
2121
- }
2122
-
2123
- static accessor(header) {
2124
- const internals = this[$internals] = (this[$internals] = {
2125
- accessors: {}
2126
- });
2127
-
2128
- const accessors = internals.accessors;
2129
- const prototype = this.prototype;
2130
-
2131
- function defineAccessor(_header) {
2132
- const lHeader = normalizeHeader(_header);
2133
-
2134
- if (!accessors[lHeader]) {
2135
- buildAccessors(prototype, _header);
2136
- accessors[lHeader] = true;
2137
- }
2138
- }
2139
-
2140
- utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2141
-
2142
- return this;
2143
- }
2144
- }
2145
-
2146
- AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
2147
-
2148
- utils.freezeMethods(AxiosHeaders.prototype);
2149
- utils.freezeMethods(AxiosHeaders);
2150
-
2151
- /* harmony default export */ var core_AxiosHeaders = (AxiosHeaders);
2152
-
2153
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/transformData.js
2154
-
2155
-
2156
-
2157
-
2158
-
2159
-
2160
- /**
2161
- * Transform the data for a request or a response
2162
- *
2163
- * @param {Array|Function} fns A single function or Array of functions
2164
- * @param {?Object} response The response object
2165
- *
2166
- * @returns {*} The resulting transformed data
2167
- */
2168
- function transformData(fns, response) {
2169
- const config = this || lib_defaults;
2170
- const context = response || config;
2171
- const headers = core_AxiosHeaders.from(context.headers);
2172
- let data = context.data;
2173
-
2174
- utils.forEach(fns, function transform(fn) {
2175
- data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
2176
- });
2177
-
2178
- headers.normalize();
2179
-
2180
- return data;
2181
- }
2182
-
2183
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/isCancel.js
2184
-
2185
-
2186
- function isCancel(value) {
2187
- return !!(value && value.__CANCEL__);
2188
- }
2189
-
2190
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CanceledError.js
2191
-
2192
-
2193
-
2194
-
2195
-
2196
- /**
2197
- * A `CanceledError` is an object that is thrown when an operation is canceled.
2198
- *
2199
- * @param {string=} message The message.
2200
- * @param {Object=} config The config.
2201
- * @param {Object=} request The request.
2202
- *
2203
- * @returns {CanceledError} The created error.
2204
- */
2205
- function CanceledError(message, config, request) {
2206
- // eslint-disable-next-line no-eq-null,eqeqeq
2207
- core_AxiosError.call(this, message == null ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
2208
- this.name = 'CanceledError';
2209
- }
2210
-
2211
- utils.inherits(CanceledError, core_AxiosError, {
2212
- __CANCEL__: true
2213
- });
2214
-
2215
- /* harmony default export */ var cancel_CanceledError = (CanceledError);
2216
-
2217
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/settle.js
2218
-
2219
-
2220
-
2221
-
2222
- /**
2223
- * Resolve or reject a Promise based on response status.
2224
- *
2225
- * @param {Function} resolve A function that resolves the promise.
2226
- * @param {Function} reject A function that rejects the promise.
2227
- * @param {object} response The response.
2228
- *
2229
- * @returns {object} The response.
2230
- */
2231
- function settle(resolve, reject, response) {
2232
- const validateStatus = response.config.validateStatus;
2233
- if (!response.status || !validateStatus || validateStatus(response.status)) {
2234
- resolve(response);
2235
- } else {
2236
- reject(new core_AxiosError(
2237
- 'Request failed with status code ' + response.status,
2238
- [core_AxiosError.ERR_BAD_REQUEST, core_AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
2239
- response.config,
2240
- response.request,
2241
- response
2242
- ));
2243
- }
2244
- }
2245
-
2246
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/cookies.js
2247
-
2248
-
2249
-
2250
-
2251
-
2252
- /* harmony default export */ var cookies = (browser.isStandardBrowserEnv ?
2253
-
2254
- // Standard browser envs support document.cookie
2255
- (function standardBrowserEnv() {
2256
- return {
2257
- write: function write(name, value, expires, path, domain, secure) {
2258
- const cookie = [];
2259
- cookie.push(name + '=' + encodeURIComponent(value));
2260
-
2261
- if (utils.isNumber(expires)) {
2262
- cookie.push('expires=' + new Date(expires).toGMTString());
2263
- }
2264
-
2265
- if (utils.isString(path)) {
2266
- cookie.push('path=' + path);
2267
- }
2268
-
2269
- if (utils.isString(domain)) {
2270
- cookie.push('domain=' + domain);
2271
- }
2272
-
2273
- if (secure === true) {
2274
- cookie.push('secure');
2275
- }
2276
-
2277
- document.cookie = cookie.join('; ');
2278
- },
2279
-
2280
- read: function read(name) {
2281
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2282
- return (match ? decodeURIComponent(match[3]) : null);
2283
- },
2284
-
2285
- remove: function remove(name) {
2286
- this.write(name, '', Date.now() - 86400000);
2287
- }
2288
- };
2289
- })() :
2290
-
2291
- // Non standard browser env (web workers, react-native) lack needed support.
2292
- (function nonStandardBrowserEnv() {
2293
- return {
2294
- write: function write() {},
2295
- read: function read() { return null; },
2296
- remove: function remove() {}
2297
- };
2298
- })());
2299
-
2300
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAbsoluteURL.js
2301
-
2302
-
2303
- /**
2304
- * Determines whether the specified URL is absolute
2305
- *
2306
- * @param {string} url The URL to test
2307
- *
2308
- * @returns {boolean} True if the specified URL is absolute, otherwise false
2309
- */
2310
- function isAbsoluteURL(url) {
2311
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2312
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2313
- // by any combination of letters, digits, plus, period, or hyphen.
2314
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2315
- }
2316
-
2317
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/combineURLs.js
2318
-
2319
-
2320
- /**
2321
- * Creates a new URL by combining the specified URLs
2322
- *
2323
- * @param {string} baseURL The base URL
2324
- * @param {string} relativeURL The relative URL
2325
- *
2326
- * @returns {string} The combined URL
2327
- */
2328
- function combineURLs(baseURL, relativeURL) {
2329
- return relativeURL
2330
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2331
- : baseURL;
2332
- }
2333
-
2334
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/buildFullPath.js
2335
-
2336
-
2337
-
2338
-
2339
-
2340
- /**
2341
- * Creates a new URL by combining the baseURL with the requestedURL,
2342
- * only when the requestedURL is not already an absolute URL.
2343
- * If the requestURL is absolute, this function returns the requestedURL untouched.
2344
- *
2345
- * @param {string} baseURL The base URL
2346
- * @param {string} requestedURL Absolute or relative URL to combine
2347
- *
2348
- * @returns {string} The combined full path
2349
- */
2350
- function buildFullPath(baseURL, requestedURL) {
2351
- if (baseURL && !isAbsoluteURL(requestedURL)) {
2352
- return combineURLs(baseURL, requestedURL);
2353
- }
2354
- return requestedURL;
2355
- }
2356
-
2357
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
2358
-
2359
-
2360
-
2361
-
2362
-
2363
- /* harmony default export */ var isURLSameOrigin = (browser.isStandardBrowserEnv ?
2364
-
2365
- // Standard browser envs have full support of the APIs needed to test
2366
- // whether the request URL is of the same origin as current location.
2367
- (function standardBrowserEnv() {
2368
- const msie = /(msie|trident)/i.test(navigator.userAgent);
2369
- const urlParsingNode = document.createElement('a');
2370
- let originURL;
2371
-
2372
- /**
2373
- * Parse a URL to discover it's components
2374
- *
2375
- * @param {String} url The URL to be parsed
2376
- * @returns {Object}
2377
- */
2378
- function resolveURL(url) {
2379
- let href = url;
2380
-
2381
- if (msie) {
2382
- // IE needs attribute set twice to normalize properties
2383
- urlParsingNode.setAttribute('href', href);
2384
- href = urlParsingNode.href;
2385
- }
2386
-
2387
- urlParsingNode.setAttribute('href', href);
2388
-
2389
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2390
- return {
2391
- href: urlParsingNode.href,
2392
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2393
- host: urlParsingNode.host,
2394
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2395
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2396
- hostname: urlParsingNode.hostname,
2397
- port: urlParsingNode.port,
2398
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
2399
- urlParsingNode.pathname :
2400
- '/' + urlParsingNode.pathname
2401
- };
2402
- }
2403
-
2404
- originURL = resolveURL(window.location.href);
2405
-
2406
- /**
2407
- * Determine if a URL shares the same origin as the current location
2408
- *
2409
- * @param {String} requestURL The URL to test
2410
- * @returns {boolean} True if URL shares the same origin, otherwise false
2411
- */
2412
- return function isURLSameOrigin(requestURL) {
2413
- const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2414
- return (parsed.protocol === originURL.protocol &&
2415
- parsed.host === originURL.host);
2416
- };
2417
- })() :
2418
-
2419
- // Non standard browser envs (web workers, react-native) lack needed support.
2420
- (function nonStandardBrowserEnv() {
2421
- return function isURLSameOrigin() {
2422
- return true;
2423
- };
2424
- })());
2425
-
2426
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js
2427
-
2428
-
2429
- function parseProtocol(url) {
2430
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2431
- return match && match[1] || '';
2432
- }
2433
-
2434
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/speedometer.js
2435
-
2436
-
2437
- /**
2438
- * Calculate data maxRate
2439
- * @param {Number} [samplesCount= 10]
2440
- * @param {Number} [min= 1000]
2441
- * @returns {Function}
2442
- */
2443
- function speedometer(samplesCount, min) {
2444
- samplesCount = samplesCount || 10;
2445
- const bytes = new Array(samplesCount);
2446
- const timestamps = new Array(samplesCount);
2447
- let head = 0;
2448
- let tail = 0;
2449
- let firstSampleTS;
2450
-
2451
- min = min !== undefined ? min : 1000;
2452
-
2453
- return function push(chunkLength) {
2454
- const now = Date.now();
2455
-
2456
- const startedAt = timestamps[tail];
2457
-
2458
- if (!firstSampleTS) {
2459
- firstSampleTS = now;
2460
- }
2461
-
2462
- bytes[head] = chunkLength;
2463
- timestamps[head] = now;
2464
-
2465
- let i = tail;
2466
- let bytesCount = 0;
2467
-
2468
- while (i !== head) {
2469
- bytesCount += bytes[i++];
2470
- i = i % samplesCount;
2471
- }
2472
-
2473
- head = (head + 1) % samplesCount;
2474
-
2475
- if (head === tail) {
2476
- tail = (tail + 1) % samplesCount;
2477
- }
2478
-
2479
- if (now - firstSampleTS < min) {
2480
- return;
2481
- }
2482
-
2483
- const passed = startedAt && now - startedAt;
2484
-
2485
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2486
- };
2487
- }
2488
-
2489
- /* harmony default export */ var helpers_speedometer = (speedometer);
2490
-
2491
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/xhr.js
2492
-
2493
-
2494
-
2495
-
2496
-
2497
-
2498
-
2499
-
2500
-
2501
-
2502
-
2503
-
2504
-
2505
-
2506
-
2507
-
2508
- function progressEventReducer(listener, isDownloadStream) {
2509
- let bytesNotified = 0;
2510
- const _speedometer = helpers_speedometer(50, 250);
2511
-
2512
- return e => {
2513
- const loaded = e.loaded;
2514
- const total = e.lengthComputable ? e.total : undefined;
2515
- const progressBytes = loaded - bytesNotified;
2516
- const rate = _speedometer(progressBytes);
2517
- const inRange = loaded <= total;
2518
-
2519
- bytesNotified = loaded;
2520
-
2521
- const data = {
2522
- loaded,
2523
- total,
2524
- progress: total ? (loaded / total) : undefined,
2525
- bytes: progressBytes,
2526
- rate: rate ? rate : undefined,
2527
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2528
- event: e
2529
- };
2530
-
2531
- data[isDownloadStream ? 'download' : 'upload'] = true;
2532
-
2533
- listener(data);
2534
- };
2535
- }
2536
-
2537
- const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2538
-
2539
- /* harmony default export */ var xhr = (isXHRAdapterSupported && function (config) {
2540
- return new Promise(function dispatchXhrRequest(resolve, reject) {
2541
- let requestData = config.data;
2542
- const requestHeaders = core_AxiosHeaders.from(config.headers).normalize();
2543
- const responseType = config.responseType;
2544
- let onCanceled;
2545
- function done() {
2546
- if (config.cancelToken) {
2547
- config.cancelToken.unsubscribe(onCanceled);
2548
- }
2549
-
2550
- if (config.signal) {
2551
- config.signal.removeEventListener('abort', onCanceled);
2552
- }
2553
- }
2554
-
2555
- if (utils.isFormData(requestData) && (browser.isStandardBrowserEnv || browser.isStandardBrowserWebWorkerEnv)) {
2556
- requestHeaders.setContentType(false); // Let the browser set it
2557
- }
2558
-
2559
- let request = new XMLHttpRequest();
2560
-
2561
- // HTTP basic authentication
2562
- if (config.auth) {
2563
- const username = config.auth.username || '';
2564
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
2565
- requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
2566
- }
2567
-
2568
- const fullPath = buildFullPath(config.baseURL, config.url);
2569
-
2570
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
2571
-
2572
- // Set the request timeout in MS
2573
- request.timeout = config.timeout;
2574
-
2575
- function onloadend() {
2576
- if (!request) {
2577
- return;
2578
- }
2579
- // Prepare the response
2580
- const responseHeaders = core_AxiosHeaders.from(
2581
- 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
2582
- );
2583
- const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
2584
- request.responseText : request.response;
2585
- const response = {
2586
- data: responseData,
2587
- status: request.status,
2588
- statusText: request.statusText,
2589
- headers: responseHeaders,
2590
- config,
2591
- request
2592
- };
2593
-
2594
- settle(function _resolve(value) {
2595
- resolve(value);
2596
- done();
2597
- }, function _reject(err) {
2598
- reject(err);
2599
- done();
2600
- }, response);
2601
-
2602
- // Clean up request
2603
- request = null;
2604
- }
2605
-
2606
- if ('onloadend' in request) {
2607
- // Use onloadend if available
2608
- request.onloadend = onloadend;
2609
- } else {
2610
- // Listen for ready state to emulate onloadend
2611
- request.onreadystatechange = function handleLoad() {
2612
- if (!request || request.readyState !== 4) {
2613
- return;
2614
- }
2615
-
2616
- // The request errored out and we didn't get a response, this will be
2617
- // handled by onerror instead
2618
- // With one exception: request that using file: protocol, most browsers
2619
- // will return status as 0 even though it's a successful request
2620
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
2621
- return;
2622
- }
2623
- // readystate handler is calling before onerror or ontimeout handlers,
2624
- // so we should call onloadend on the next 'tick'
2625
- setTimeout(onloadend);
2626
- };
2627
- }
2628
-
2629
- // Handle browser request cancellation (as opposed to a manual cancellation)
2630
- request.onabort = function handleAbort() {
2631
- if (!request) {
2632
- return;
2633
- }
2634
-
2635
- reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
2636
-
2637
- // Clean up request
2638
- request = null;
2639
- };
2640
-
2641
- // Handle low level network errors
2642
- request.onerror = function handleError() {
2643
- // Real errors are hidden from us by the browser
2644
- // onerror should only fire if it's a network error
2645
- reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request));
2646
-
2647
- // Clean up request
2648
- request = null;
2649
- };
2650
-
2651
- // Handle timeout
2652
- request.ontimeout = function handleTimeout() {
2653
- let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
2654
- const transitional = config.transitional || defaults_transitional;
2655
- if (config.timeoutErrorMessage) {
2656
- timeoutErrorMessage = config.timeoutErrorMessage;
2657
- }
2658
- reject(new core_AxiosError(
2659
- timeoutErrorMessage,
2660
- transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED,
2661
- config,
2662
- request));
2663
-
2664
- // Clean up request
2665
- request = null;
2666
- };
2667
-
2668
- // Add xsrf header
2669
- // This is only done if running in a standard browser environment.
2670
- // Specifically not if we're in a web worker, or react-native.
2671
- if (browser.isStandardBrowserEnv) {
2672
- // Add xsrf header
2673
- const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
2674
- && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2675
-
2676
- if (xsrfValue) {
2677
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2678
- }
2679
- }
2680
-
2681
- // Remove Content-Type if data is undefined
2682
- requestData === undefined && requestHeaders.setContentType(null);
2683
-
2684
- // Add headers to the request
2685
- if ('setRequestHeader' in request) {
2686
- utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2687
- request.setRequestHeader(key, val);
2688
- });
2689
- }
2690
-
2691
- // Add withCredentials to request if needed
2692
- if (!utils.isUndefined(config.withCredentials)) {
2693
- request.withCredentials = !!config.withCredentials;
2694
- }
2695
-
2696
- // Add responseType to request if needed
2697
- if (responseType && responseType !== 'json') {
2698
- request.responseType = config.responseType;
2699
- }
2700
-
2701
- // Handle progress if needed
2702
- if (typeof config.onDownloadProgress === 'function') {
2703
- request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
2704
- }
2705
-
2706
- // Not all browsers support upload events
2707
- if (typeof config.onUploadProgress === 'function' && request.upload) {
2708
- request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
2709
- }
2710
-
2711
- if (config.cancelToken || config.signal) {
2712
- // Handle cancellation
2713
- // eslint-disable-next-line func-names
2714
- onCanceled = cancel => {
2715
- if (!request) {
2716
- return;
2717
- }
2718
- reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
2719
- request.abort();
2720
- request = null;
2721
- };
2722
-
2723
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
2724
- if (config.signal) {
2725
- config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
2726
- }
2727
- }
2728
-
2729
- const protocol = parseProtocol(fullPath);
2730
-
2731
- if (protocol && browser.protocols.indexOf(protocol) === -1) {
2732
- reject(new core_AxiosError('Unsupported protocol ' + protocol + ':', core_AxiosError.ERR_BAD_REQUEST, config));
2733
- return;
2734
- }
2735
-
2736
-
2737
- // Send the request
2738
- request.send(requestData || null);
2739
- });
2740
- });
2741
-
2742
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/adapters.js
2743
-
2744
-
2745
-
2746
-
2747
-
2748
- const knownAdapters = {
2749
- http: helpers_null,
2750
- xhr: xhr
2751
- }
2752
-
2753
- utils.forEach(knownAdapters, (fn, value) => {
2754
- if(fn) {
2755
- try {
2756
- Object.defineProperty(fn, 'name', {value});
2757
- } catch (e) {
2758
- // eslint-disable-next-line no-empty
2759
- }
2760
- Object.defineProperty(fn, 'adapterName', {value});
2761
- }
2762
- });
2763
-
2764
- /* harmony default export */ var adapters = ({
2765
- getAdapter: (adapters) => {
2766
- adapters = utils.isArray(adapters) ? adapters : [adapters];
2767
-
2768
- const {length} = adapters;
2769
- let nameOrAdapter;
2770
- let adapter;
2771
-
2772
- for (let i = 0; i < length; i++) {
2773
- nameOrAdapter = adapters[i];
2774
- if((adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
2775
- break;
2776
- }
2777
- }
2778
-
2779
- if (!adapter) {
2780
- if (adapter === false) {
2781
- throw new core_AxiosError(
2782
- `Adapter ${nameOrAdapter} is not supported by the environment`,
2783
- 'ERR_NOT_SUPPORT'
2784
- );
2785
- }
2786
-
2787
- throw new Error(
2788
- utils.hasOwnProp(knownAdapters, nameOrAdapter) ?
2789
- `Adapter '${nameOrAdapter}' is not available in the build` :
2790
- `Unknown adapter '${nameOrAdapter}'`
2791
- );
2792
- }
2793
-
2794
- if (!utils.isFunction(adapter)) {
2795
- throw new TypeError('adapter is not a function');
2796
- }
2797
-
2798
- return adapter;
2799
- },
2800
- adapters: knownAdapters
2801
- });
2802
-
2803
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/dispatchRequest.js
2804
-
2805
-
2806
-
2807
-
2808
-
2809
-
2810
-
2811
-
2812
-
2813
- /**
2814
- * Throws a `CanceledError` if cancellation has been requested.
2815
- *
2816
- * @param {Object} config The config that is to be used for the request
2817
- *
2818
- * @returns {void}
2819
- */
2820
- function throwIfCancellationRequested(config) {
2821
- if (config.cancelToken) {
2822
- config.cancelToken.throwIfRequested();
2823
- }
2824
-
2825
- if (config.signal && config.signal.aborted) {
2826
- throw new cancel_CanceledError(null, config);
2827
- }
2828
- }
2829
-
2830
- /**
2831
- * Dispatch a request to the server using the configured adapter.
2832
- *
2833
- * @param {object} config The config that is to be used for the request
2834
- *
2835
- * @returns {Promise} The Promise to be fulfilled
2836
- */
2837
- function dispatchRequest(config) {
2838
- throwIfCancellationRequested(config);
2839
-
2840
- config.headers = core_AxiosHeaders.from(config.headers);
2841
-
2842
- // Transform request data
2843
- config.data = transformData.call(
2844
- config,
2845
- config.transformRequest
2846
- );
2847
-
2848
- if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
2849
- config.headers.setContentType('application/x-www-form-urlencoded', false);
2850
- }
2851
-
2852
- const adapter = adapters.getAdapter(config.adapter || lib_defaults.adapter);
2853
-
2854
- return adapter(config).then(function onAdapterResolution(response) {
2855
- throwIfCancellationRequested(config);
2856
-
2857
- // Transform response data
2858
- response.data = transformData.call(
2859
- config,
2860
- config.transformResponse,
2861
- response
2862
- );
2863
-
2864
- response.headers = core_AxiosHeaders.from(response.headers);
2865
-
2866
- return response;
2867
- }, function onAdapterRejection(reason) {
2868
- if (!isCancel(reason)) {
2869
- throwIfCancellationRequested(config);
2870
-
2871
- // Transform response data
2872
- if (reason && reason.response) {
2873
- reason.response.data = transformData.call(
2874
- config,
2875
- config.transformResponse,
2876
- reason.response
2877
- );
2878
- reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
2879
- }
2880
- }
2881
-
2882
- return Promise.reject(reason);
2883
- });
2884
- }
2885
-
2886
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/mergeConfig.js
2887
-
2888
-
2889
-
2890
-
2891
-
2892
- const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? thing.toJSON() : thing;
2893
-
2894
- /**
2895
- * Config-specific merge-function which creates a new config-object
2896
- * by merging two configuration objects together.
2897
- *
2898
- * @param {Object} config1
2899
- * @param {Object} config2
2900
- *
2901
- * @returns {Object} New object resulting from merging config2 to config1
2902
- */
2903
- function mergeConfig(config1, config2) {
2904
- // eslint-disable-next-line no-param-reassign
2905
- config2 = config2 || {};
2906
- const config = {};
2907
-
2908
- function getMergedValue(target, source, caseless) {
2909
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
2910
- return utils.merge.call({caseless}, target, source);
2911
- } else if (utils.isPlainObject(source)) {
2912
- return utils.merge({}, source);
2913
- } else if (utils.isArray(source)) {
2914
- return source.slice();
2915
- }
2916
- return source;
2917
- }
2918
-
2919
- // eslint-disable-next-line consistent-return
2920
- function mergeDeepProperties(a, b, caseless) {
2921
- if (!utils.isUndefined(b)) {
2922
- return getMergedValue(a, b, caseless);
2923
- } else if (!utils.isUndefined(a)) {
2924
- return getMergedValue(undefined, a, caseless);
2925
- }
2926
- }
2927
-
2928
- // eslint-disable-next-line consistent-return
2929
- function valueFromConfig2(a, b) {
2930
- if (!utils.isUndefined(b)) {
2931
- return getMergedValue(undefined, b);
2932
- }
2933
- }
2934
-
2935
- // eslint-disable-next-line consistent-return
2936
- function defaultToConfig2(a, b) {
2937
- if (!utils.isUndefined(b)) {
2938
- return getMergedValue(undefined, b);
2939
- } else if (!utils.isUndefined(a)) {
2940
- return getMergedValue(undefined, a);
2941
- }
2942
- }
2943
-
2944
- // eslint-disable-next-line consistent-return
2945
- function mergeDirectKeys(a, b, prop) {
2946
- if (prop in config2) {
2947
- return getMergedValue(a, b);
2948
- } else if (prop in config1) {
2949
- return getMergedValue(undefined, a);
2950
- }
2951
- }
2952
-
2953
- const mergeMap = {
2954
- url: valueFromConfig2,
2955
- method: valueFromConfig2,
2956
- data: valueFromConfig2,
2957
- baseURL: defaultToConfig2,
2958
- transformRequest: defaultToConfig2,
2959
- transformResponse: defaultToConfig2,
2960
- paramsSerializer: defaultToConfig2,
2961
- timeout: defaultToConfig2,
2962
- timeoutMessage: defaultToConfig2,
2963
- withCredentials: defaultToConfig2,
2964
- adapter: defaultToConfig2,
2965
- responseType: defaultToConfig2,
2966
- xsrfCookieName: defaultToConfig2,
2967
- xsrfHeaderName: defaultToConfig2,
2968
- onUploadProgress: defaultToConfig2,
2969
- onDownloadProgress: defaultToConfig2,
2970
- decompress: defaultToConfig2,
2971
- maxContentLength: defaultToConfig2,
2972
- maxBodyLength: defaultToConfig2,
2973
- beforeRedirect: defaultToConfig2,
2974
- transport: defaultToConfig2,
2975
- httpAgent: defaultToConfig2,
2976
- httpsAgent: defaultToConfig2,
2977
- cancelToken: defaultToConfig2,
2978
- socketPath: defaultToConfig2,
2979
- responseEncoding: defaultToConfig2,
2980
- validateStatus: mergeDirectKeys,
2981
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
2982
- };
2983
-
2984
- utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
2985
- const merge = mergeMap[prop] || mergeDeepProperties;
2986
- const configValue = merge(config1[prop], config2[prop], prop);
2987
- (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
2988
- });
2989
-
2990
- return config;
2991
- }
2992
-
2993
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
2994
- const VERSION = "1.3.5";
2995
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/validator.js
2996
-
2997
-
2998
-
2999
-
3000
-
3001
- const validators = {};
3002
-
3003
- // eslint-disable-next-line func-names
3004
- ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
3005
- validators[type] = function validator(thing) {
3006
- return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
3007
- };
3008
- });
3009
-
3010
- const deprecatedWarnings = {};
3011
-
3012
- /**
3013
- * Transitional option validator
3014
- *
3015
- * @param {function|boolean?} validator - set to false if the transitional option has been removed
3016
- * @param {string?} version - deprecated version / removed since version
3017
- * @param {string?} message - some message with additional info
3018
- *
3019
- * @returns {function}
3020
- */
3021
- validators.transitional = function transitional(validator, version, message) {
3022
- function formatMessage(opt, desc) {
3023
- return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
3024
- }
3025
-
3026
- // eslint-disable-next-line func-names
3027
- return (value, opt, opts) => {
3028
- if (validator === false) {
3029
- throw new core_AxiosError(
3030
- formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
3031
- core_AxiosError.ERR_DEPRECATED
3032
- );
3033
- }
3034
-
3035
- if (version && !deprecatedWarnings[opt]) {
3036
- deprecatedWarnings[opt] = true;
3037
- // eslint-disable-next-line no-console
3038
- console.warn(
3039
- formatMessage(
3040
- opt,
3041
- ' has been deprecated since v' + version + ' and will be removed in the near future'
3042
- )
3043
- );
3044
- }
3045
-
3046
- return validator ? validator(value, opt, opts) : true;
3047
- };
3048
- };
3049
-
3050
- /**
3051
- * Assert object's properties type
3052
- *
3053
- * @param {object} options
3054
- * @param {object} schema
3055
- * @param {boolean?} allowUnknown
3056
- *
3057
- * @returns {object}
3058
- */
3059
-
3060
- function assertOptions(options, schema, allowUnknown) {
3061
- if (typeof options !== 'object') {
3062
- throw new core_AxiosError('options must be an object', core_AxiosError.ERR_BAD_OPTION_VALUE);
3063
- }
3064
- const keys = Object.keys(options);
3065
- let i = keys.length;
3066
- while (i-- > 0) {
3067
- const opt = keys[i];
3068
- const validator = schema[opt];
3069
- if (validator) {
3070
- const value = options[opt];
3071
- const result = value === undefined || validator(value, opt, options);
3072
- if (result !== true) {
3073
- throw new core_AxiosError('option ' + opt + ' must be ' + result, core_AxiosError.ERR_BAD_OPTION_VALUE);
3074
- }
3075
- continue;
3076
- }
3077
- if (allowUnknown !== true) {
3078
- throw new core_AxiosError('Unknown option ' + opt, core_AxiosError.ERR_BAD_OPTION);
3079
- }
3080
- }
3081
- }
3082
-
3083
- /* harmony default export */ var validator = ({
3084
- assertOptions,
3085
- validators
3086
- });
3087
-
3088
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/core/Axios.js
3089
-
3090
-
3091
-
3092
-
3093
-
3094
-
3095
-
3096
-
3097
-
3098
-
3099
-
3100
- const Axios_validators = validator.validators;
3101
-
3102
- /**
3103
- * Create a new instance of Axios
3104
- *
3105
- * @param {Object} instanceConfig The default config for the instance
3106
- *
3107
- * @return {Axios} A new instance of Axios
3108
- */
3109
- class Axios {
3110
- constructor(instanceConfig) {
3111
- this.defaults = instanceConfig;
3112
- this.interceptors = {
3113
- request: new core_InterceptorManager(),
3114
- response: new core_InterceptorManager()
3115
- };
3116
- }
3117
-
3118
- /**
3119
- * Dispatch a request
3120
- *
3121
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
3122
- * @param {?Object} config
3123
- *
3124
- * @returns {Promise} The Promise to be fulfilled
3125
- */
3126
- request(configOrUrl, config) {
3127
- /*eslint no-param-reassign:0*/
3128
- // Allow for axios('example/url'[, config]) a la fetch API
3129
- if (typeof configOrUrl === 'string') {
3130
- config = config || {};
3131
- config.url = configOrUrl;
3132
- } else {
3133
- config = configOrUrl || {};
3134
- }
3135
-
3136
- config = mergeConfig(this.defaults, config);
3137
-
3138
- const {transitional, paramsSerializer, headers} = config;
3139
-
3140
- if (transitional !== undefined) {
3141
- validator.assertOptions(transitional, {
3142
- silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
3143
- forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
3144
- clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
3145
- }, false);
3146
- }
3147
-
3148
- if (paramsSerializer != null) {
3149
- if (utils.isFunction(paramsSerializer)) {
3150
- config.paramsSerializer = {
3151
- serialize: paramsSerializer
3152
- }
3153
- } else {
3154
- validator.assertOptions(paramsSerializer, {
3155
- encode: Axios_validators.function,
3156
- serialize: Axios_validators.function
3157
- }, true);
3158
- }
3159
- }
3160
-
3161
- // Set config.method
3162
- config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3163
-
3164
- let contextHeaders;
3165
-
3166
- // Flatten headers
3167
- contextHeaders = headers && utils.merge(
3168
- headers.common,
3169
- headers[config.method]
3170
- );
3171
-
3172
- contextHeaders && utils.forEach(
3173
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3174
- (method) => {
3175
- delete headers[method];
3176
- }
3177
- );
3178
-
3179
- config.headers = core_AxiosHeaders.concat(contextHeaders, headers);
3180
-
3181
- // filter out skipped interceptors
3182
- const requestInterceptorChain = [];
3183
- let synchronousRequestInterceptors = true;
3184
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
3185
- if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
3186
- return;
3187
- }
3188
-
3189
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
3190
-
3191
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
3192
- });
3193
-
3194
- const responseInterceptorChain = [];
3195
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
3196
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3197
- });
3198
-
3199
- let promise;
3200
- let i = 0;
3201
- let len;
3202
-
3203
- if (!synchronousRequestInterceptors) {
3204
- const chain = [dispatchRequest.bind(this), undefined];
3205
- chain.unshift.apply(chain, requestInterceptorChain);
3206
- chain.push.apply(chain, responseInterceptorChain);
3207
- len = chain.length;
3208
-
3209
- promise = Promise.resolve(config);
3210
-
3211
- while (i < len) {
3212
- promise = promise.then(chain[i++], chain[i++]);
3213
- }
3214
-
3215
- return promise;
3216
- }
3217
-
3218
- len = requestInterceptorChain.length;
3219
-
3220
- let newConfig = config;
3221
-
3222
- i = 0;
3223
-
3224
- while (i < len) {
3225
- const onFulfilled = requestInterceptorChain[i++];
3226
- const onRejected = requestInterceptorChain[i++];
3227
- try {
3228
- newConfig = onFulfilled(newConfig);
3229
- } catch (error) {
3230
- onRejected.call(this, error);
3231
- break;
3232
- }
3233
- }
3234
-
3235
- try {
3236
- promise = dispatchRequest.call(this, newConfig);
3237
- } catch (error) {
3238
- return Promise.reject(error);
3239
- }
3240
-
3241
- i = 0;
3242
- len = responseInterceptorChain.length;
3243
-
3244
- while (i < len) {
3245
- promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
3246
- }
3247
-
3248
- return promise;
3249
- }
3250
-
3251
- getUri(config) {
3252
- config = mergeConfig(this.defaults, config);
3253
- const fullPath = buildFullPath(config.baseURL, config.url);
3254
- return buildURL(fullPath, config.params, config.paramsSerializer);
3255
- }
3256
- }
3257
-
3258
- // Provide aliases for supported request methods
3259
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3260
- /*eslint func-names:0*/
3261
- Axios.prototype[method] = function(url, config) {
3262
- return this.request(mergeConfig(config || {}, {
3263
- method,
3264
- url,
3265
- data: (config || {}).data
3266
- }));
3267
- };
3268
- });
3269
-
3270
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3271
- /*eslint func-names:0*/
3272
-
3273
- function generateHTTPMethod(isForm) {
3274
- return function httpMethod(url, data, config) {
3275
- return this.request(mergeConfig(config || {}, {
3276
- method,
3277
- headers: isForm ? {
3278
- 'Content-Type': 'multipart/form-data'
3279
- } : {},
3280
- url,
3281
- data
3282
- }));
3283
- };
3284
- }
3285
-
3286
- Axios.prototype[method] = generateHTTPMethod();
3287
-
3288
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
3289
- });
3290
-
3291
- /* harmony default export */ var core_Axios = (Axios);
3292
-
3293
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CancelToken.js
3294
-
3295
-
3296
-
3297
-
3298
- /**
3299
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
3300
- *
3301
- * @param {Function} executor The executor function.
3302
- *
3303
- * @returns {CancelToken}
3304
- */
3305
- class CancelToken {
3306
- constructor(executor) {
3307
- if (typeof executor !== 'function') {
3308
- throw new TypeError('executor must be a function.');
3309
- }
3310
-
3311
- let resolvePromise;
3312
-
3313
- this.promise = new Promise(function promiseExecutor(resolve) {
3314
- resolvePromise = resolve;
3315
- });
3316
-
3317
- const token = this;
3318
-
3319
- // eslint-disable-next-line func-names
3320
- this.promise.then(cancel => {
3321
- if (!token._listeners) return;
3322
-
3323
- let i = token._listeners.length;
3324
-
3325
- while (i-- > 0) {
3326
- token._listeners[i](cancel);
3327
- }
3328
- token._listeners = null;
3329
- });
3330
-
3331
- // eslint-disable-next-line func-names
3332
- this.promise.then = onfulfilled => {
3333
- let _resolve;
3334
- // eslint-disable-next-line func-names
3335
- const promise = new Promise(resolve => {
3336
- token.subscribe(resolve);
3337
- _resolve = resolve;
3338
- }).then(onfulfilled);
3339
-
3340
- promise.cancel = function reject() {
3341
- token.unsubscribe(_resolve);
3342
- };
3343
-
3344
- return promise;
3345
- };
3346
-
3347
- executor(function cancel(message, config, request) {
3348
- if (token.reason) {
3349
- // Cancellation has already been requested
3350
- return;
3351
- }
3352
-
3353
- token.reason = new cancel_CanceledError(message, config, request);
3354
- resolvePromise(token.reason);
3355
- });
3356
- }
3357
-
3358
- /**
3359
- * Throws a `CanceledError` if cancellation has been requested.
3360
- */
3361
- throwIfRequested() {
3362
- if (this.reason) {
3363
- throw this.reason;
3364
- }
3365
- }
3366
-
3367
- /**
3368
- * Subscribe to the cancel signal
3369
- */
3370
-
3371
- subscribe(listener) {
3372
- if (this.reason) {
3373
- listener(this.reason);
3374
- return;
3375
- }
3376
-
3377
- if (this._listeners) {
3378
- this._listeners.push(listener);
3379
- } else {
3380
- this._listeners = [listener];
3381
- }
3382
- }
3383
-
3384
- /**
3385
- * Unsubscribe from the cancel signal
3386
- */
3387
-
3388
- unsubscribe(listener) {
3389
- if (!this._listeners) {
3390
- return;
3391
- }
3392
- const index = this._listeners.indexOf(listener);
3393
- if (index !== -1) {
3394
- this._listeners.splice(index, 1);
3395
- }
3396
- }
3397
-
3398
- /**
3399
- * Returns an object that contains a new `CancelToken` and a function that, when called,
3400
- * cancels the `CancelToken`.
3401
- */
3402
- static source() {
3403
- let cancel;
3404
- const token = new CancelToken(function executor(c) {
3405
- cancel = c;
3406
- });
3407
- return {
3408
- token,
3409
- cancel
3410
- };
3411
- }
3412
- }
3413
-
3414
- /* harmony default export */ var cancel_CancelToken = (CancelToken);
3415
-
3416
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/spread.js
3417
-
3418
-
3419
- /**
3420
- * Syntactic sugar for invoking a function and expanding an array for arguments.
3421
- *
3422
- * Common use case would be to use `Function.prototype.apply`.
3423
- *
3424
- * ```js
3425
- * function f(x, y, z) {}
3426
- * var args = [1, 2, 3];
3427
- * f.apply(null, args);
3428
- * ```
3429
- *
3430
- * With `spread` this example can be re-written.
3431
- *
3432
- * ```js
3433
- * spread(function(x, y, z) {})([1, 2, 3]);
3434
- * ```
3435
- *
3436
- * @param {Function} callback
3437
- *
3438
- * @returns {Function}
3439
- */
3440
- function spread(callback) {
3441
- return function wrap(arr) {
3442
- return callback.apply(null, arr);
3443
- };
3444
- }
3445
-
3446
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAxiosError.js
3447
-
3448
-
3449
-
3450
-
3451
- /**
3452
- * Determines whether the payload is an error thrown by Axios
3453
- *
3454
- * @param {*} payload The value to test
3455
- *
3456
- * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3457
- */
3458
- function isAxiosError(payload) {
3459
- return utils.isObject(payload) && (payload.isAxiosError === true);
3460
- }
3461
-
3462
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/HttpStatusCode.js
3463
- const HttpStatusCode = {
3464
- Continue: 100,
3465
- SwitchingProtocols: 101,
3466
- Processing: 102,
3467
- EarlyHints: 103,
3468
- Ok: 200,
3469
- Created: 201,
3470
- Accepted: 202,
3471
- NonAuthoritativeInformation: 203,
3472
- NoContent: 204,
3473
- ResetContent: 205,
3474
- PartialContent: 206,
3475
- MultiStatus: 207,
3476
- AlreadyReported: 208,
3477
- ImUsed: 226,
3478
- MultipleChoices: 300,
3479
- MovedPermanently: 301,
3480
- Found: 302,
3481
- SeeOther: 303,
3482
- NotModified: 304,
3483
- UseProxy: 305,
3484
- Unused: 306,
3485
- TemporaryRedirect: 307,
3486
- PermanentRedirect: 308,
3487
- BadRequest: 400,
3488
- Unauthorized: 401,
3489
- PaymentRequired: 402,
3490
- Forbidden: 403,
3491
- NotFound: 404,
3492
- MethodNotAllowed: 405,
3493
- NotAcceptable: 406,
3494
- ProxyAuthenticationRequired: 407,
3495
- RequestTimeout: 408,
3496
- Conflict: 409,
3497
- Gone: 410,
3498
- LengthRequired: 411,
3499
- PreconditionFailed: 412,
3500
- PayloadTooLarge: 413,
3501
- UriTooLong: 414,
3502
- UnsupportedMediaType: 415,
3503
- RangeNotSatisfiable: 416,
3504
- ExpectationFailed: 417,
3505
- ImATeapot: 418,
3506
- MisdirectedRequest: 421,
3507
- UnprocessableEntity: 422,
3508
- Locked: 423,
3509
- FailedDependency: 424,
3510
- TooEarly: 425,
3511
- UpgradeRequired: 426,
3512
- PreconditionRequired: 428,
3513
- TooManyRequests: 429,
3514
- RequestHeaderFieldsTooLarge: 431,
3515
- UnavailableForLegalReasons: 451,
3516
- InternalServerError: 500,
3517
- NotImplemented: 501,
3518
- BadGateway: 502,
3519
- ServiceUnavailable: 503,
3520
- GatewayTimeout: 504,
3521
- HttpVersionNotSupported: 505,
3522
- VariantAlsoNegotiates: 506,
3523
- InsufficientStorage: 507,
3524
- LoopDetected: 508,
3525
- NotExtended: 510,
3526
- NetworkAuthenticationRequired: 511,
3527
- };
3528
-
3529
- Object.entries(HttpStatusCode).forEach(([key, value]) => {
3530
- HttpStatusCode[value] = key;
3531
- });
3532
-
3533
- /* harmony default export */ var helpers_HttpStatusCode = (HttpStatusCode);
3534
-
3535
- ;// CONCATENATED MODULE: ./node_modules/axios/lib/axios.js
3536
-
3537
-
3538
-
3539
-
3540
-
3541
-
3542
-
3543
-
3544
-
3545
-
3546
-
3547
-
3548
-
3549
-
3550
-
3551
-
3552
-
3553
-
3554
-
3555
- /**
3556
- * Create an instance of Axios
3557
- *
3558
- * @param {Object} defaultConfig The default config for the instance
3559
- *
3560
- * @returns {Axios} A new instance of Axios
3561
- */
3562
- function createInstance(defaultConfig) {
3563
- const context = new core_Axios(defaultConfig);
3564
- const instance = bind(core_Axios.prototype.request, context);
3565
-
3566
- // Copy axios.prototype to instance
3567
- utils.extend(instance, core_Axios.prototype, context, {allOwnKeys: true});
3568
-
3569
- // Copy context to instance
3570
- utils.extend(instance, context, null, {allOwnKeys: true});
3571
-
3572
- // Factory for creating new instances
3573
- instance.create = function create(instanceConfig) {
3574
- return createInstance(mergeConfig(defaultConfig, instanceConfig));
3575
- };
3576
-
3577
- return instance;
3578
- }
3579
-
3580
- // Create the default instance to be exported
3581
- const axios = createInstance(lib_defaults);
3582
-
3583
- // Expose Axios class to allow class inheritance
3584
- axios.Axios = core_Axios;
3585
-
3586
- // Expose Cancel & CancelToken
3587
- axios.CanceledError = cancel_CanceledError;
3588
- axios.CancelToken = cancel_CancelToken;
3589
- axios.isCancel = isCancel;
3590
- axios.VERSION = VERSION;
3591
- axios.toFormData = helpers_toFormData;
3592
-
3593
- // Expose AxiosError class
3594
- axios.AxiosError = core_AxiosError;
3595
-
3596
- // alias for CanceledError for backward compatibility
3597
- axios.Cancel = axios.CanceledError;
3598
-
3599
- // Expose all/spread
3600
- axios.all = function all(promises) {
3601
- return Promise.all(promises);
3602
- };
3603
-
3604
- axios.spread = spread;
3605
-
3606
- // Expose isAxiosError
3607
- axios.isAxiosError = isAxiosError;
3608
-
3609
- // Expose mergeConfig
3610
- axios.mergeConfig = mergeConfig;
3611
-
3612
- axios.AxiosHeaders = core_AxiosHeaders;
3613
-
3614
- axios.formToJSON = thing => helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
3615
-
3616
- axios.HttpStatusCode = helpers_HttpStatusCode;
3617
-
3618
- axios.default = axios;
3619
-
3620
- // this module should only have a default export
3621
- /* harmony default export */ var lib_axios = (axios);
3622
-
3623
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/process/src/process.vue?vue&type=script&lang=ts
3624
-
3625
-
3626
- /* harmony default export */ var processvue_type_script_lang_ts = ({
3627
- name: "tops-process",
3628
- props: {
3629
- processId: {
3630
- require: true,
3631
- default: "",
3632
- type: String
3633
- },
3634
- processDefId: {
3635
- require: true,
3636
- default: "",
3637
- type: String
3638
- },
3639
- taskId: {
3640
- require: true,
3641
- default: "",
3642
- type: String
3643
- }
3644
- },
3645
- setup(props) {
3646
- const processStatus = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)({});
3647
- const BASE = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(({"NODE_ENV":"production","BASE_URL":"/"}).VUE_APP_BASE_URL || "process.env.VUE_APP_BASE_URL ");
3648
- const HOST = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(({"NODE_ENV":"production","BASE_URL":"/"}).VUE_APP_H5_HOST || "process.env.VUE_APP_H5_HOST");
3649
- lib_axios.get(`${HOST}${BASE}/aws/pis/getProcessStatus?processInstId=44cdbdaa-b349-44ec-94d9-04827e0a11f2&taskId=80781ede-b00b-4d07-9d46-8893846a0c7a`).then(response => {
3650
- console.log("res:::", response);
3651
- processStatus.value = response.data;
3652
- });
3653
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.processId, (val, preVal) => {
3654
- if (val) {}
3655
- });
3656
- return {
3657
- processStatus,
3658
- BASE,
3659
- HOST
3660
- };
3661
- },
3662
- methods: {
3663
- getColor(status) {
3664
- if (status == "审核中") return "#FFA52D";
3665
- if (status == "已驳回") return "#F14B4C";
3666
- if (status == "已撤销") return "#CECECE";
3667
- if (status == "已完成") return "#6DC743";
3668
- return "#1389FF";
3669
- }
3670
- }
3671
- });
3672
- ;// CONCATENATED MODULE: ./packages/process/src/process.vue?vue&type=script&lang=ts
3673
-
3674
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-57.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-57.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-57.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/process/src/process.vue?vue&type=style&index=0&id=fd1f1ce4&scoped=true&lang=css
3675
- // extracted by mini-css-extract-plugin
3676
-
3677
- ;// CONCATENATED MODULE: ./packages/process/src/process.vue?vue&type=style&index=0&id=fd1f1ce4&scoped=true&lang=css
3678
-
3679
- // EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
3680
- var exportHelper = __webpack_require__(744);
3681
- ;// CONCATENATED MODULE: ./packages/process/src/process.vue
3682
-
3683
-
3684
-
3685
-
3686
- ;
3687
-
3688
-
3689
- const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.Z)(processvue_type_script_lang_ts, [['render',render],['__scopeId',"data-v-fd1f1ce4"]])
3690
-
3691
- /* harmony default export */ var process = (__exports__);
3692
- ;// CONCATENATED MODULE: ./packages/process/index.ts
3693
-
3694
- /* Process.install = (app: App): void => {
3695
- app.component(Process.name, Process);
3696
- }; */
3697
- /* harmony default export */ var packages_process = (process);
3698
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/Tab/src/tab.vue?vue&type=template&id=188ebdfc&ts=true
3699
-
3700
- const tabvue_type_template_id_188ebdfc_ts_true_hoisted_1 = {
3701
- class: "tops-tab"
3702
- };
3703
- function tabvue_type_template_id_188ebdfc_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
3704
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", tabvue_type_template_id_188ebdfc_ts_true_hoisted_1, "tops-tab");
3705
- }
3706
- ;// CONCATENATED MODULE: ./packages/Tab/src/tab.vue?vue&type=template&id=188ebdfc&ts=true
3707
-
3708
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/Tab/src/tab.vue?vue&type=script&lang=ts
3709
- /* harmony default export */ var tabvue_type_script_lang_ts = ({
3710
- name: "tops-tab",
3711
- props: {
3712
- tapList: {
3713
- type: Array,
3714
- default: () => []
3715
- }
3716
- }
3717
- });
3718
- ;// CONCATENATED MODULE: ./packages/Tab/src/tab.vue?vue&type=script&lang=ts
3719
-
3720
- ;// CONCATENATED MODULE: ./packages/Tab/src/tab.vue
3721
-
3722
-
3723
-
3724
-
3725
- ;
3726
- const tab_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(tabvue_type_script_lang_ts, [['render',tabvue_type_template_id_188ebdfc_ts_true_render]])
3727
-
3728
- /* harmony default export */ var tab = (tab_exports_);
3729
- ;// CONCATENATED MODULE: ./packages/Tab/index.ts
3730
-
3731
- /* Process.install = (app: App): void => {
3732
- app.component(Process.name, Process);
3733
- }; */
3734
- /* harmony default export */ var Tab = (tab);
3735
- ;// CONCATENATED MODULE: ./packages/index.ts
3736
-
3737
-
3738
- // 所有组件列表
3739
- const components = [packages_process, Tab];
3740
- // 定义 install 方法
3741
- const install = app => {
3742
- // 遍历注册所有组件
3743
- components.map(component => app.component(component.name, component));
3744
- };
3745
-
3746
- /* harmony default export */ var packages_0 = ({
3747
- install
3748
- });
3749
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
3750
-
3751
-
3752
- /* harmony default export */ var entry_lib = (packages_0);
3753
-
3754
-
3755
- }();
3756
- /******/ return __webpack_exports__;
3757
- /******/ })()
3758
- ;
3759
- });
3760
- //# sourceMappingURL=index.umd.js.map