tenghui-ui 2.3.2 → 2.3.4

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.
@@ -19,6 +19,1877 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import Vue from "vue";
21
21
  var index$1 = "";
22
+ function bind$2(fn, thisArg) {
23
+ return function wrap() {
24
+ return fn.apply(thisArg, arguments);
25
+ };
26
+ }
27
+ const { toString } = Object.prototype;
28
+ const { getPrototypeOf } = Object;
29
+ const kindOf = ((cache) => (thing) => {
30
+ const str = toString.call(thing);
31
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
32
+ })(Object.create(null));
33
+ const kindOfTest = (type) => {
34
+ type = type.toLowerCase();
35
+ return (thing) => kindOf(thing) === type;
36
+ };
37
+ const typeOfTest = (type) => (thing) => typeof thing === type;
38
+ const { isArray: isArray$4 } = Array;
39
+ const isUndefined = typeOfTest("undefined");
40
+ function isBuffer$1(val) {
41
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
42
+ }
43
+ const isArrayBuffer = kindOfTest("ArrayBuffer");
44
+ function isArrayBufferView(val) {
45
+ let result;
46
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
47
+ result = ArrayBuffer.isView(val);
48
+ } else {
49
+ result = val && val.buffer && isArrayBuffer(val.buffer);
50
+ }
51
+ return result;
52
+ }
53
+ const isString$1 = typeOfTest("string");
54
+ const isFunction = typeOfTest("function");
55
+ const isNumber$1 = typeOfTest("number");
56
+ const isObject = (thing) => thing !== null && typeof thing === "object";
57
+ const isBoolean$1 = (thing) => thing === true || thing === false;
58
+ const isPlainObject = (val) => {
59
+ if (kindOf(val) !== "object") {
60
+ return false;
61
+ }
62
+ const prototype2 = getPrototypeOf(val);
63
+ return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
64
+ };
65
+ const isDate$1 = kindOfTest("Date");
66
+ const isFile = kindOfTest("File");
67
+ const isBlob = kindOfTest("Blob");
68
+ const isFileList = kindOfTest("FileList");
69
+ const isStream = (val) => isObject(val) && isFunction(val.pipe);
70
+ const isFormData = (thing) => {
71
+ let kind;
72
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
73
+ };
74
+ const isURLSearchParams = kindOfTest("URLSearchParams");
75
+ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
76
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
77
+ if (obj === null || typeof obj === "undefined") {
78
+ return;
79
+ }
80
+ let i;
81
+ let l;
82
+ if (typeof obj !== "object") {
83
+ obj = [obj];
84
+ }
85
+ if (isArray$4(obj)) {
86
+ for (i = 0, l = obj.length; i < l; i++) {
87
+ fn.call(null, obj[i], i, obj);
88
+ }
89
+ } else {
90
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
91
+ const len = keys.length;
92
+ let key;
93
+ for (i = 0; i < len; i++) {
94
+ key = keys[i];
95
+ fn.call(null, obj[key], key, obj);
96
+ }
97
+ }
98
+ }
99
+ function findKey(obj, key) {
100
+ key = key.toLowerCase();
101
+ const keys = Object.keys(obj);
102
+ let i = keys.length;
103
+ let _key;
104
+ while (i-- > 0) {
105
+ _key = keys[i];
106
+ if (key === _key.toLowerCase()) {
107
+ return _key;
108
+ }
109
+ }
110
+ return null;
111
+ }
112
+ const _global = (() => {
113
+ if (typeof globalThis !== "undefined")
114
+ return globalThis;
115
+ return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
116
+ })();
117
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
118
+ function merge$1() {
119
+ const { caseless } = isContextDefined(this) && this || {};
120
+ const result = {};
121
+ const assignValue = (val, key) => {
122
+ const targetKey = caseless && findKey(result, key) || key;
123
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
124
+ result[targetKey] = merge$1(result[targetKey], val);
125
+ } else if (isPlainObject(val)) {
126
+ result[targetKey] = merge$1({}, val);
127
+ } else if (isArray$4(val)) {
128
+ result[targetKey] = val.slice();
129
+ } else {
130
+ result[targetKey] = val;
131
+ }
132
+ };
133
+ for (let i = 0, l = arguments.length; i < l; i++) {
134
+ arguments[i] && forEach(arguments[i], assignValue);
135
+ }
136
+ return result;
137
+ }
138
+ const extend$1 = (a, b, thisArg, { allOwnKeys } = {}) => {
139
+ forEach(b, (val, key) => {
140
+ if (thisArg && isFunction(val)) {
141
+ a[key] = bind$2(val, thisArg);
142
+ } else {
143
+ a[key] = val;
144
+ }
145
+ }, { allOwnKeys });
146
+ return a;
147
+ };
148
+ const stripBOM = (content) => {
149
+ if (content.charCodeAt(0) === 65279) {
150
+ content = content.slice(1);
151
+ }
152
+ return content;
153
+ };
154
+ const inherits = (constructor, superConstructor, props, descriptors2) => {
155
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
156
+ constructor.prototype.constructor = constructor;
157
+ Object.defineProperty(constructor, "super", {
158
+ value: superConstructor.prototype
159
+ });
160
+ props && Object.assign(constructor.prototype, props);
161
+ };
162
+ const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
163
+ let props;
164
+ let i;
165
+ let prop;
166
+ const merged = {};
167
+ destObj = destObj || {};
168
+ if (sourceObj == null)
169
+ return destObj;
170
+ do {
171
+ props = Object.getOwnPropertyNames(sourceObj);
172
+ i = props.length;
173
+ while (i-- > 0) {
174
+ prop = props[i];
175
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
176
+ destObj[prop] = sourceObj[prop];
177
+ merged[prop] = true;
178
+ }
179
+ }
180
+ sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
181
+ } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
182
+ return destObj;
183
+ };
184
+ const endsWith = (str, searchString, position) => {
185
+ str = String(str);
186
+ if (position === void 0 || position > str.length) {
187
+ position = str.length;
188
+ }
189
+ position -= searchString.length;
190
+ const lastIndex = str.indexOf(searchString, position);
191
+ return lastIndex !== -1 && lastIndex === position;
192
+ };
193
+ const toArray = (thing) => {
194
+ if (!thing)
195
+ return null;
196
+ if (isArray$4(thing))
197
+ return thing;
198
+ let i = thing.length;
199
+ if (!isNumber$1(i))
200
+ return null;
201
+ const arr = new Array(i);
202
+ while (i-- > 0) {
203
+ arr[i] = thing[i];
204
+ }
205
+ return arr;
206
+ };
207
+ const isTypedArray = ((TypedArray2) => {
208
+ return (thing) => {
209
+ return TypedArray2 && thing instanceof TypedArray2;
210
+ };
211
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
212
+ const forEachEntry = (obj, fn) => {
213
+ const generator = obj && obj[Symbol.iterator];
214
+ const iterator = generator.call(obj);
215
+ let result;
216
+ while ((result = iterator.next()) && !result.done) {
217
+ const pair = result.value;
218
+ fn.call(obj, pair[0], pair[1]);
219
+ }
220
+ };
221
+ const matchAll = (regExp, str) => {
222
+ let matches2;
223
+ const arr = [];
224
+ while ((matches2 = regExp.exec(str)) !== null) {
225
+ arr.push(matches2);
226
+ }
227
+ return arr;
228
+ };
229
+ const isHTMLForm = kindOfTest("HTMLFormElement");
230
+ const toCamelCase = (str) => {
231
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
232
+ return p1.toUpperCase() + p2;
233
+ });
234
+ };
235
+ const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
236
+ const isRegExp$2 = kindOfTest("RegExp");
237
+ const reduceDescriptors = (obj, reducer) => {
238
+ const descriptors2 = Object.getOwnPropertyDescriptors(obj);
239
+ const reducedDescriptors = {};
240
+ forEach(descriptors2, (descriptor, name) => {
241
+ let ret;
242
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
243
+ reducedDescriptors[name] = ret || descriptor;
244
+ }
245
+ });
246
+ Object.defineProperties(obj, reducedDescriptors);
247
+ };
248
+ const freezeMethods = (obj) => {
249
+ reduceDescriptors(obj, (descriptor, name) => {
250
+ if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
251
+ return false;
252
+ }
253
+ const value = obj[name];
254
+ if (!isFunction(value))
255
+ return;
256
+ descriptor.enumerable = false;
257
+ if ("writable" in descriptor) {
258
+ descriptor.writable = false;
259
+ return;
260
+ }
261
+ if (!descriptor.set) {
262
+ descriptor.set = () => {
263
+ throw Error("Can not rewrite read-only method '" + name + "'");
264
+ };
265
+ }
266
+ });
267
+ };
268
+ const toObjectSet = (arrayOrString, delimiter) => {
269
+ const obj = {};
270
+ const define = (arr) => {
271
+ arr.forEach((value) => {
272
+ obj[value] = true;
273
+ });
274
+ };
275
+ isArray$4(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
276
+ return obj;
277
+ };
278
+ const noop = () => {
279
+ };
280
+ const toFiniteNumber = (value, defaultValue) => {
281
+ value = +value;
282
+ return Number.isFinite(value) ? value : defaultValue;
283
+ };
284
+ const ALPHA = "abcdefghijklmnopqrstuvwxyz";
285
+ const DIGIT = "0123456789";
286
+ const ALPHABET = {
287
+ DIGIT,
288
+ ALPHA,
289
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
290
+ };
291
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
292
+ let str = "";
293
+ const { length } = alphabet;
294
+ while (size--) {
295
+ str += alphabet[Math.random() * length | 0];
296
+ }
297
+ return str;
298
+ };
299
+ function isSpecCompliantForm(thing) {
300
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
301
+ }
302
+ const toJSONObject = (obj) => {
303
+ const stack = new Array(10);
304
+ const visit = (source, i) => {
305
+ if (isObject(source)) {
306
+ if (stack.indexOf(source) >= 0) {
307
+ return;
308
+ }
309
+ if (!("toJSON" in source)) {
310
+ stack[i] = source;
311
+ const target = isArray$4(source) ? [] : {};
312
+ forEach(source, (value, key) => {
313
+ const reducedValue = visit(value, i + 1);
314
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
315
+ });
316
+ stack[i] = void 0;
317
+ return target;
318
+ }
319
+ }
320
+ return source;
321
+ };
322
+ return visit(obj, 0);
323
+ };
324
+ const isAsyncFn = kindOfTest("AsyncFunction");
325
+ const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
326
+ var utils$4 = {
327
+ isArray: isArray$4,
328
+ isArrayBuffer,
329
+ isBuffer: isBuffer$1,
330
+ isFormData,
331
+ isArrayBufferView,
332
+ isString: isString$1,
333
+ isNumber: isNumber$1,
334
+ isBoolean: isBoolean$1,
335
+ isObject,
336
+ isPlainObject,
337
+ isUndefined,
338
+ isDate: isDate$1,
339
+ isFile,
340
+ isBlob,
341
+ isRegExp: isRegExp$2,
342
+ isFunction,
343
+ isStream,
344
+ isURLSearchParams,
345
+ isTypedArray,
346
+ isFileList,
347
+ forEach,
348
+ merge: merge$1,
349
+ extend: extend$1,
350
+ trim,
351
+ stripBOM,
352
+ inherits,
353
+ toFlatObject,
354
+ kindOf,
355
+ kindOfTest,
356
+ endsWith,
357
+ toArray,
358
+ forEachEntry,
359
+ matchAll,
360
+ isHTMLForm,
361
+ hasOwnProperty,
362
+ hasOwnProp: hasOwnProperty,
363
+ reduceDescriptors,
364
+ freezeMethods,
365
+ toObjectSet,
366
+ toCamelCase,
367
+ noop,
368
+ toFiniteNumber,
369
+ findKey,
370
+ global: _global,
371
+ isContextDefined,
372
+ ALPHABET,
373
+ generateString,
374
+ isSpecCompliantForm,
375
+ toJSONObject,
376
+ isAsyncFn,
377
+ isThenable
378
+ };
379
+ function AxiosError(message, code, config, request, response) {
380
+ Error.call(this);
381
+ if (Error.captureStackTrace) {
382
+ Error.captureStackTrace(this, this.constructor);
383
+ } else {
384
+ this.stack = new Error().stack;
385
+ }
386
+ this.message = message;
387
+ this.name = "AxiosError";
388
+ code && (this.code = code);
389
+ config && (this.config = config);
390
+ request && (this.request = request);
391
+ response && (this.response = response);
392
+ }
393
+ utils$4.inherits(AxiosError, Error, {
394
+ toJSON: function toJSON() {
395
+ return {
396
+ message: this.message,
397
+ name: this.name,
398
+ description: this.description,
399
+ number: this.number,
400
+ fileName: this.fileName,
401
+ lineNumber: this.lineNumber,
402
+ columnNumber: this.columnNumber,
403
+ stack: this.stack,
404
+ config: utils$4.toJSONObject(this.config),
405
+ code: this.code,
406
+ status: this.response && this.response.status ? this.response.status : null
407
+ };
408
+ }
409
+ });
410
+ const prototype$1 = AxiosError.prototype;
411
+ const descriptors = {};
412
+ [
413
+ "ERR_BAD_OPTION_VALUE",
414
+ "ERR_BAD_OPTION",
415
+ "ECONNABORTED",
416
+ "ETIMEDOUT",
417
+ "ERR_NETWORK",
418
+ "ERR_FR_TOO_MANY_REDIRECTS",
419
+ "ERR_DEPRECATED",
420
+ "ERR_BAD_RESPONSE",
421
+ "ERR_BAD_REQUEST",
422
+ "ERR_CANCELED",
423
+ "ERR_NOT_SUPPORT",
424
+ "ERR_INVALID_URL"
425
+ ].forEach((code) => {
426
+ descriptors[code] = { value: code };
427
+ });
428
+ Object.defineProperties(AxiosError, descriptors);
429
+ Object.defineProperty(prototype$1, "isAxiosError", { value: true });
430
+ AxiosError.from = (error, code, config, request, response, customProps) => {
431
+ const axiosError = Object.create(prototype$1);
432
+ utils$4.toFlatObject(error, axiosError, function filter2(obj) {
433
+ return obj !== Error.prototype;
434
+ }, (prop) => {
435
+ return prop !== "isAxiosError";
436
+ });
437
+ AxiosError.call(axiosError, error.message, code, config, request, response);
438
+ axiosError.cause = error;
439
+ axiosError.name = error.name;
440
+ customProps && Object.assign(axiosError, customProps);
441
+ return axiosError;
442
+ };
443
+ var httpAdapter = null;
444
+ function isVisitable(thing) {
445
+ return utils$4.isPlainObject(thing) || utils$4.isArray(thing);
446
+ }
447
+ function removeBrackets(key) {
448
+ return utils$4.endsWith(key, "[]") ? key.slice(0, -2) : key;
449
+ }
450
+ function renderKey(path, key, dots) {
451
+ if (!path)
452
+ return key;
453
+ return path.concat(key).map(function each(token, i) {
454
+ token = removeBrackets(token);
455
+ return !dots && i ? "[" + token + "]" : token;
456
+ }).join(dots ? "." : "");
457
+ }
458
+ function isFlatArray(arr) {
459
+ return utils$4.isArray(arr) && !arr.some(isVisitable);
460
+ }
461
+ const predicates = utils$4.toFlatObject(utils$4, {}, null, function filter(prop) {
462
+ return /^is[A-Z]/.test(prop);
463
+ });
464
+ function toFormData(obj, formData, options) {
465
+ if (!utils$4.isObject(obj)) {
466
+ throw new TypeError("target must be an object");
467
+ }
468
+ formData = formData || new FormData();
469
+ options = utils$4.toFlatObject(options, {
470
+ metaTokens: true,
471
+ dots: false,
472
+ indexes: false
473
+ }, false, function defined(option2, source) {
474
+ return !utils$4.isUndefined(source[option2]);
475
+ });
476
+ const metaTokens = options.metaTokens;
477
+ const visitor = options.visitor || defaultVisitor;
478
+ const dots = options.dots;
479
+ const indexes = options.indexes;
480
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
481
+ const useBlob = _Blob && utils$4.isSpecCompliantForm(formData);
482
+ if (!utils$4.isFunction(visitor)) {
483
+ throw new TypeError("visitor must be a function");
484
+ }
485
+ function convertValue(value) {
486
+ if (value === null)
487
+ return "";
488
+ if (utils$4.isDate(value)) {
489
+ return value.toISOString();
490
+ }
491
+ if (!useBlob && utils$4.isBlob(value)) {
492
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.");
493
+ }
494
+ if (utils$4.isArrayBuffer(value) || utils$4.isTypedArray(value)) {
495
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
496
+ }
497
+ return value;
498
+ }
499
+ function defaultVisitor(value, key, path) {
500
+ let arr = value;
501
+ if (value && !path && typeof value === "object") {
502
+ if (utils$4.endsWith(key, "{}")) {
503
+ key = metaTokens ? key : key.slice(0, -2);
504
+ value = JSON.stringify(value);
505
+ } else if (utils$4.isArray(value) && isFlatArray(value) || (utils$4.isFileList(value) || utils$4.endsWith(key, "[]")) && (arr = utils$4.toArray(value))) {
506
+ key = removeBrackets(key);
507
+ arr.forEach(function each(el, index2) {
508
+ !(utils$4.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]", convertValue(el));
509
+ });
510
+ return false;
511
+ }
512
+ }
513
+ if (isVisitable(value)) {
514
+ return true;
515
+ }
516
+ formData.append(renderKey(path, key, dots), convertValue(value));
517
+ return false;
518
+ }
519
+ const stack = [];
520
+ const exposedHelpers = Object.assign(predicates, {
521
+ defaultVisitor,
522
+ convertValue,
523
+ isVisitable
524
+ });
525
+ function build(value, path) {
526
+ if (utils$4.isUndefined(value))
527
+ return;
528
+ if (stack.indexOf(value) !== -1) {
529
+ throw Error("Circular reference detected in " + path.join("."));
530
+ }
531
+ stack.push(value);
532
+ utils$4.forEach(value, function each(el, key) {
533
+ const result = !(utils$4.isUndefined(el) || el === null) && visitor.call(formData, el, utils$4.isString(key) ? key.trim() : key, path, exposedHelpers);
534
+ if (result === true) {
535
+ build(el, path ? path.concat(key) : [key]);
536
+ }
537
+ });
538
+ stack.pop();
539
+ }
540
+ if (!utils$4.isObject(obj)) {
541
+ throw new TypeError("data must be an object");
542
+ }
543
+ build(obj);
544
+ return formData;
545
+ }
546
+ function encode$2(str) {
547
+ const charMap = {
548
+ "!": "%21",
549
+ "'": "%27",
550
+ "(": "%28",
551
+ ")": "%29",
552
+ "~": "%7E",
553
+ "%20": "+",
554
+ "%00": "\0"
555
+ };
556
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
557
+ return charMap[match];
558
+ });
559
+ }
560
+ function AxiosURLSearchParams(params, options) {
561
+ this._pairs = [];
562
+ params && toFormData(params, this, options);
563
+ }
564
+ const prototype = AxiosURLSearchParams.prototype;
565
+ prototype.append = function append(name, value) {
566
+ this._pairs.push([name, value]);
567
+ };
568
+ prototype.toString = function toString2(encoder) {
569
+ const _encode = encoder ? function(value) {
570
+ return encoder.call(this, value, encode$2);
571
+ } : encode$2;
572
+ return this._pairs.map(function each(pair) {
573
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
574
+ }, "").join("&");
575
+ };
576
+ function encode$1(val) {
577
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
578
+ }
579
+ function buildURL(url, params, options) {
580
+ if (!params) {
581
+ return url;
582
+ }
583
+ const _encode = options && options.encode || encode$1;
584
+ const serializeFn = options && options.serialize;
585
+ let serializedParams;
586
+ if (serializeFn) {
587
+ serializedParams = serializeFn(params, options);
588
+ } else {
589
+ serializedParams = utils$4.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
590
+ }
591
+ if (serializedParams) {
592
+ const hashmarkIndex = url.indexOf("#");
593
+ if (hashmarkIndex !== -1) {
594
+ url = url.slice(0, hashmarkIndex);
595
+ }
596
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
597
+ }
598
+ return url;
599
+ }
600
+ class InterceptorManager {
601
+ constructor() {
602
+ this.handlers = [];
603
+ }
604
+ use(fulfilled, rejected, options) {
605
+ this.handlers.push({
606
+ fulfilled,
607
+ rejected,
608
+ synchronous: options ? options.synchronous : false,
609
+ runWhen: options ? options.runWhen : null
610
+ });
611
+ return this.handlers.length - 1;
612
+ }
613
+ eject(id) {
614
+ if (this.handlers[id]) {
615
+ this.handlers[id] = null;
616
+ }
617
+ }
618
+ clear() {
619
+ if (this.handlers) {
620
+ this.handlers = [];
621
+ }
622
+ }
623
+ forEach(fn) {
624
+ utils$4.forEach(this.handlers, function forEachHandler(h) {
625
+ if (h !== null) {
626
+ fn(h);
627
+ }
628
+ });
629
+ }
630
+ }
631
+ var InterceptorManager$1 = InterceptorManager;
632
+ var transitionalDefaults = {
633
+ silentJSONParsing: true,
634
+ forcedJSONParsing: true,
635
+ clarifyTimeoutError: false
636
+ };
637
+ var URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
638
+ var FormData$1 = typeof FormData !== "undefined" ? FormData : null;
639
+ var Blob$1 = typeof Blob !== "undefined" ? Blob : null;
640
+ var platform$1 = {
641
+ isBrowser: true,
642
+ classes: {
643
+ URLSearchParams: URLSearchParams$1,
644
+ FormData: FormData$1,
645
+ Blob: Blob$1
646
+ },
647
+ protocols: ["http", "https", "file", "blob", "url", "data"]
648
+ };
649
+ const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
650
+ const hasStandardBrowserEnv = ((product) => {
651
+ return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
652
+ })(typeof navigator !== "undefined" && navigator.product);
653
+ const hasStandardBrowserWebWorkerEnv = (() => {
654
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
655
+ })();
656
+ var utils$3 = /* @__PURE__ */ Object.freeze({
657
+ __proto__: null,
658
+ [Symbol.toStringTag]: "Module",
659
+ hasBrowserEnv,
660
+ hasStandardBrowserWebWorkerEnv,
661
+ hasStandardBrowserEnv
662
+ });
663
+ var platform = __spreadValues(__spreadValues({}, utils$3), platform$1);
664
+ function toURLEncodedForm(data, options) {
665
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
666
+ visitor: function(value, key, path, helpers) {
667
+ if (platform.isNode && utils$4.isBuffer(value)) {
668
+ this.append(key, value.toString("base64"));
669
+ return false;
670
+ }
671
+ return helpers.defaultVisitor.apply(this, arguments);
672
+ }
673
+ }, options));
674
+ }
675
+ function parsePropPath(name) {
676
+ return utils$4.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
677
+ return match[0] === "[]" ? "" : match[1] || match[0];
678
+ });
679
+ }
680
+ function arrayToObject$1(arr) {
681
+ const obj = {};
682
+ const keys = Object.keys(arr);
683
+ let i;
684
+ const len = keys.length;
685
+ let key;
686
+ for (i = 0; i < len; i++) {
687
+ key = keys[i];
688
+ obj[key] = arr[key];
689
+ }
690
+ return obj;
691
+ }
692
+ function formDataToJSON(formData) {
693
+ function buildPath(path, value, target, index2) {
694
+ let name = path[index2++];
695
+ const isNumericKey = Number.isFinite(+name);
696
+ const isLast = index2 >= path.length;
697
+ name = !name && utils$4.isArray(target) ? target.length : name;
698
+ if (isLast) {
699
+ if (utils$4.hasOwnProp(target, name)) {
700
+ target[name] = [target[name], value];
701
+ } else {
702
+ target[name] = value;
703
+ }
704
+ return !isNumericKey;
705
+ }
706
+ if (!target[name] || !utils$4.isObject(target[name])) {
707
+ target[name] = [];
708
+ }
709
+ const result = buildPath(path, value, target[name], index2);
710
+ if (result && utils$4.isArray(target[name])) {
711
+ target[name] = arrayToObject$1(target[name]);
712
+ }
713
+ return !isNumericKey;
714
+ }
715
+ if (utils$4.isFormData(formData) && utils$4.isFunction(formData.entries)) {
716
+ const obj = {};
717
+ utils$4.forEachEntry(formData, (name, value) => {
718
+ buildPath(parsePropPath(name), value, obj, 0);
719
+ });
720
+ return obj;
721
+ }
722
+ return null;
723
+ }
724
+ function stringifySafely(rawValue, parser, encoder) {
725
+ if (utils$4.isString(rawValue)) {
726
+ try {
727
+ (parser || JSON.parse)(rawValue);
728
+ return utils$4.trim(rawValue);
729
+ } catch (e) {
730
+ if (e.name !== "SyntaxError") {
731
+ throw e;
732
+ }
733
+ }
734
+ }
735
+ return (encoder || JSON.stringify)(rawValue);
736
+ }
737
+ const defaults$4 = {
738
+ transitional: transitionalDefaults,
739
+ adapter: ["xhr", "http"],
740
+ transformRequest: [function transformRequest(data, headers) {
741
+ const contentType = headers.getContentType() || "";
742
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
743
+ const isObjectPayload = utils$4.isObject(data);
744
+ if (isObjectPayload && utils$4.isHTMLForm(data)) {
745
+ data = new FormData(data);
746
+ }
747
+ const isFormData2 = utils$4.isFormData(data);
748
+ if (isFormData2) {
749
+ if (!hasJSONContentType) {
750
+ return data;
751
+ }
752
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
753
+ }
754
+ if (utils$4.isArrayBuffer(data) || utils$4.isBuffer(data) || utils$4.isStream(data) || utils$4.isFile(data) || utils$4.isBlob(data)) {
755
+ return data;
756
+ }
757
+ if (utils$4.isArrayBufferView(data)) {
758
+ return data.buffer;
759
+ }
760
+ if (utils$4.isURLSearchParams(data)) {
761
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
762
+ return data.toString();
763
+ }
764
+ let isFileList2;
765
+ if (isObjectPayload) {
766
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
767
+ return toURLEncodedForm(data, this.formSerializer).toString();
768
+ }
769
+ if ((isFileList2 = utils$4.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
770
+ const _FormData = this.env && this.env.FormData;
771
+ return toFormData(isFileList2 ? { "files[]": data } : data, _FormData && new _FormData(), this.formSerializer);
772
+ }
773
+ }
774
+ if (isObjectPayload || hasJSONContentType) {
775
+ headers.setContentType("application/json", false);
776
+ return stringifySafely(data);
777
+ }
778
+ return data;
779
+ }],
780
+ transformResponse: [function transformResponse(data) {
781
+ const transitional2 = this.transitional || defaults$4.transitional;
782
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
783
+ const JSONRequested = this.responseType === "json";
784
+ if (data && utils$4.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
785
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
786
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
787
+ try {
788
+ return JSON.parse(data);
789
+ } catch (e) {
790
+ if (strictJSONParsing) {
791
+ if (e.name === "SyntaxError") {
792
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
793
+ }
794
+ throw e;
795
+ }
796
+ }
797
+ }
798
+ return data;
799
+ }],
800
+ timeout: 0,
801
+ xsrfCookieName: "XSRF-TOKEN",
802
+ xsrfHeaderName: "X-XSRF-TOKEN",
803
+ maxContentLength: -1,
804
+ maxBodyLength: -1,
805
+ env: {
806
+ FormData: platform.classes.FormData,
807
+ Blob: platform.classes.Blob
808
+ },
809
+ validateStatus: function validateStatus(status) {
810
+ return status >= 200 && status < 300;
811
+ },
812
+ headers: {
813
+ common: {
814
+ "Accept": "application/json, text/plain, */*",
815
+ "Content-Type": void 0
816
+ }
817
+ }
818
+ };
819
+ utils$4.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
820
+ defaults$4.headers[method] = {};
821
+ });
822
+ var defaults$5 = defaults$4;
823
+ const ignoreDuplicateOf = utils$4.toObjectSet([
824
+ "age",
825
+ "authorization",
826
+ "content-length",
827
+ "content-type",
828
+ "etag",
829
+ "expires",
830
+ "from",
831
+ "host",
832
+ "if-modified-since",
833
+ "if-unmodified-since",
834
+ "last-modified",
835
+ "location",
836
+ "max-forwards",
837
+ "proxy-authorization",
838
+ "referer",
839
+ "retry-after",
840
+ "user-agent"
841
+ ]);
842
+ var parseHeaders = (rawHeaders) => {
843
+ const parsed = {};
844
+ let key;
845
+ let val;
846
+ let i;
847
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
848
+ i = line.indexOf(":");
849
+ key = line.substring(0, i).trim().toLowerCase();
850
+ val = line.substring(i + 1).trim();
851
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
852
+ return;
853
+ }
854
+ if (key === "set-cookie") {
855
+ if (parsed[key]) {
856
+ parsed[key].push(val);
857
+ } else {
858
+ parsed[key] = [val];
859
+ }
860
+ } else {
861
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
862
+ }
863
+ });
864
+ return parsed;
865
+ };
866
+ const $internals = Symbol("internals");
867
+ function normalizeHeader(header) {
868
+ return header && String(header).trim().toLowerCase();
869
+ }
870
+ function normalizeValue(value) {
871
+ if (value === false || value == null) {
872
+ return value;
873
+ }
874
+ return utils$4.isArray(value) ? value.map(normalizeValue) : String(value);
875
+ }
876
+ function parseTokens(str) {
877
+ const tokens = Object.create(null);
878
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
879
+ let match;
880
+ while (match = tokensRE.exec(str)) {
881
+ tokens[match[1]] = match[2];
882
+ }
883
+ return tokens;
884
+ }
885
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
886
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
887
+ if (utils$4.isFunction(filter2)) {
888
+ return filter2.call(this, value, header);
889
+ }
890
+ if (isHeaderNameFilter) {
891
+ value = header;
892
+ }
893
+ if (!utils$4.isString(value))
894
+ return;
895
+ if (utils$4.isString(filter2)) {
896
+ return value.indexOf(filter2) !== -1;
897
+ }
898
+ if (utils$4.isRegExp(filter2)) {
899
+ return filter2.test(value);
900
+ }
901
+ }
902
+ function formatHeader(header) {
903
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
904
+ return char.toUpperCase() + str;
905
+ });
906
+ }
907
+ function buildAccessors(obj, header) {
908
+ const accessorName = utils$4.toCamelCase(" " + header);
909
+ ["get", "set", "has"].forEach((methodName) => {
910
+ Object.defineProperty(obj, methodName + accessorName, {
911
+ value: function(arg1, arg2, arg3) {
912
+ return this[methodName].call(this, header, arg1, arg2, arg3);
913
+ },
914
+ configurable: true
915
+ });
916
+ });
917
+ }
918
+ class AxiosHeaders {
919
+ constructor(headers) {
920
+ headers && this.set(headers);
921
+ }
922
+ set(header, valueOrRewrite, rewrite) {
923
+ const self2 = this;
924
+ function setHeader(_value, _header, _rewrite) {
925
+ const lHeader = normalizeHeader(_header);
926
+ if (!lHeader) {
927
+ throw new Error("header name must be a non-empty string");
928
+ }
929
+ const key = utils$4.findKey(self2, lHeader);
930
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
931
+ self2[key || _header] = normalizeValue(_value);
932
+ }
933
+ }
934
+ const setHeaders = (headers, _rewrite) => utils$4.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
935
+ if (utils$4.isPlainObject(header) || header instanceof this.constructor) {
936
+ setHeaders(header, valueOrRewrite);
937
+ } else if (utils$4.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
938
+ setHeaders(parseHeaders(header), valueOrRewrite);
939
+ } else {
940
+ header != null && setHeader(valueOrRewrite, header, rewrite);
941
+ }
942
+ return this;
943
+ }
944
+ get(header, parser) {
945
+ header = normalizeHeader(header);
946
+ if (header) {
947
+ const key = utils$4.findKey(this, header);
948
+ if (key) {
949
+ const value = this[key];
950
+ if (!parser) {
951
+ return value;
952
+ }
953
+ if (parser === true) {
954
+ return parseTokens(value);
955
+ }
956
+ if (utils$4.isFunction(parser)) {
957
+ return parser.call(this, value, key);
958
+ }
959
+ if (utils$4.isRegExp(parser)) {
960
+ return parser.exec(value);
961
+ }
962
+ throw new TypeError("parser must be boolean|regexp|function");
963
+ }
964
+ }
965
+ }
966
+ has(header, matcher) {
967
+ header = normalizeHeader(header);
968
+ if (header) {
969
+ const key = utils$4.findKey(this, header);
970
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
971
+ }
972
+ return false;
973
+ }
974
+ delete(header, matcher) {
975
+ const self2 = this;
976
+ let deleted = false;
977
+ function deleteHeader(_header) {
978
+ _header = normalizeHeader(_header);
979
+ if (_header) {
980
+ const key = utils$4.findKey(self2, _header);
981
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
982
+ delete self2[key];
983
+ deleted = true;
984
+ }
985
+ }
986
+ }
987
+ if (utils$4.isArray(header)) {
988
+ header.forEach(deleteHeader);
989
+ } else {
990
+ deleteHeader(header);
991
+ }
992
+ return deleted;
993
+ }
994
+ clear(matcher) {
995
+ const keys = Object.keys(this);
996
+ let i = keys.length;
997
+ let deleted = false;
998
+ while (i--) {
999
+ const key = keys[i];
1000
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1001
+ delete this[key];
1002
+ deleted = true;
1003
+ }
1004
+ }
1005
+ return deleted;
1006
+ }
1007
+ normalize(format) {
1008
+ const self2 = this;
1009
+ const headers = {};
1010
+ utils$4.forEach(this, (value, header) => {
1011
+ const key = utils$4.findKey(headers, header);
1012
+ if (key) {
1013
+ self2[key] = normalizeValue(value);
1014
+ delete self2[header];
1015
+ return;
1016
+ }
1017
+ const normalized = format ? formatHeader(header) : String(header).trim();
1018
+ if (normalized !== header) {
1019
+ delete self2[header];
1020
+ }
1021
+ self2[normalized] = normalizeValue(value);
1022
+ headers[normalized] = true;
1023
+ });
1024
+ return this;
1025
+ }
1026
+ concat(...targets) {
1027
+ return this.constructor.concat(this, ...targets);
1028
+ }
1029
+ toJSON(asStrings) {
1030
+ const obj = Object.create(null);
1031
+ utils$4.forEach(this, (value, header) => {
1032
+ value != null && value !== false && (obj[header] = asStrings && utils$4.isArray(value) ? value.join(", ") : value);
1033
+ });
1034
+ return obj;
1035
+ }
1036
+ [Symbol.iterator]() {
1037
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1038
+ }
1039
+ toString() {
1040
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
1041
+ }
1042
+ get [Symbol.toStringTag]() {
1043
+ return "AxiosHeaders";
1044
+ }
1045
+ static from(thing) {
1046
+ return thing instanceof this ? thing : new this(thing);
1047
+ }
1048
+ static concat(first, ...targets) {
1049
+ const computed = new this(first);
1050
+ targets.forEach((target) => computed.set(target));
1051
+ return computed;
1052
+ }
1053
+ static accessor(header) {
1054
+ const internals = this[$internals] = this[$internals] = {
1055
+ accessors: {}
1056
+ };
1057
+ const accessors = internals.accessors;
1058
+ const prototype2 = this.prototype;
1059
+ function defineAccessor(_header) {
1060
+ const lHeader = normalizeHeader(_header);
1061
+ if (!accessors[lHeader]) {
1062
+ buildAccessors(prototype2, _header);
1063
+ accessors[lHeader] = true;
1064
+ }
1065
+ }
1066
+ utils$4.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1067
+ return this;
1068
+ }
1069
+ }
1070
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1071
+ utils$4.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
1072
+ let mapped = key[0].toUpperCase() + key.slice(1);
1073
+ return {
1074
+ get: () => value,
1075
+ set(headerValue) {
1076
+ this[mapped] = headerValue;
1077
+ }
1078
+ };
1079
+ });
1080
+ utils$4.freezeMethods(AxiosHeaders);
1081
+ var AxiosHeaders$1 = AxiosHeaders;
1082
+ function transformData(fns, response) {
1083
+ const config = this || defaults$5;
1084
+ const context = response || config;
1085
+ const headers = AxiosHeaders$1.from(context.headers);
1086
+ let data = context.data;
1087
+ utils$4.forEach(fns, function transform(fn) {
1088
+ data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
1089
+ });
1090
+ headers.normalize();
1091
+ return data;
1092
+ }
1093
+ function isCancel(value) {
1094
+ return !!(value && value.__CANCEL__);
1095
+ }
1096
+ function CanceledError(message, config, request) {
1097
+ AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
1098
+ this.name = "CanceledError";
1099
+ }
1100
+ utils$4.inherits(CanceledError, AxiosError, {
1101
+ __CANCEL__: true
1102
+ });
1103
+ function settle(resolve, reject, response) {
1104
+ const validateStatus2 = response.config.validateStatus;
1105
+ if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
1106
+ resolve(response);
1107
+ } else {
1108
+ reject(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
1109
+ }
1110
+ }
1111
+ var cookies = platform.hasStandardBrowserEnv ? {
1112
+ write(name, value, expires, path, domain, secure) {
1113
+ const cookie = [name + "=" + encodeURIComponent(value)];
1114
+ utils$4.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
1115
+ utils$4.isString(path) && cookie.push("path=" + path);
1116
+ utils$4.isString(domain) && cookie.push("domain=" + domain);
1117
+ secure === true && cookie.push("secure");
1118
+ document.cookie = cookie.join("; ");
1119
+ },
1120
+ read(name) {
1121
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
1122
+ return match ? decodeURIComponent(match[3]) : null;
1123
+ },
1124
+ remove(name) {
1125
+ this.write(name, "", Date.now() - 864e5);
1126
+ }
1127
+ } : {
1128
+ write() {
1129
+ },
1130
+ read() {
1131
+ return null;
1132
+ },
1133
+ remove() {
1134
+ }
1135
+ };
1136
+ function isAbsoluteURL(url) {
1137
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1138
+ }
1139
+ function combineURLs(baseURL, relativeURL) {
1140
+ return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
1141
+ }
1142
+ function buildFullPath(baseURL, requestedURL) {
1143
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
1144
+ return combineURLs(baseURL, requestedURL);
1145
+ }
1146
+ return requestedURL;
1147
+ }
1148
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? function standardBrowserEnv() {
1149
+ const msie = /(msie|trident)/i.test(navigator.userAgent);
1150
+ const urlParsingNode = document.createElement("a");
1151
+ let originURL;
1152
+ function resolveURL(url) {
1153
+ let href = url;
1154
+ if (msie) {
1155
+ urlParsingNode.setAttribute("href", href);
1156
+ href = urlParsingNode.href;
1157
+ }
1158
+ urlParsingNode.setAttribute("href", href);
1159
+ return {
1160
+ href: urlParsingNode.href,
1161
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
1162
+ host: urlParsingNode.host,
1163
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
1164
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
1165
+ hostname: urlParsingNode.hostname,
1166
+ port: urlParsingNode.port,
1167
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
1168
+ };
1169
+ }
1170
+ originURL = resolveURL(window.location.href);
1171
+ return function isURLSameOrigin2(requestURL) {
1172
+ const parsed = utils$4.isString(requestURL) ? resolveURL(requestURL) : requestURL;
1173
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
1174
+ };
1175
+ }() : function nonStandardBrowserEnv() {
1176
+ return function isURLSameOrigin2() {
1177
+ return true;
1178
+ };
1179
+ }();
1180
+ function parseProtocol(url) {
1181
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1182
+ return match && match[1] || "";
1183
+ }
1184
+ function speedometer(samplesCount, min) {
1185
+ samplesCount = samplesCount || 10;
1186
+ const bytes = new Array(samplesCount);
1187
+ const timestamps = new Array(samplesCount);
1188
+ let head = 0;
1189
+ let tail = 0;
1190
+ let firstSampleTS;
1191
+ min = min !== void 0 ? min : 1e3;
1192
+ return function push2(chunkLength) {
1193
+ const now = Date.now();
1194
+ const startedAt = timestamps[tail];
1195
+ if (!firstSampleTS) {
1196
+ firstSampleTS = now;
1197
+ }
1198
+ bytes[head] = chunkLength;
1199
+ timestamps[head] = now;
1200
+ let i = tail;
1201
+ let bytesCount = 0;
1202
+ while (i !== head) {
1203
+ bytesCount += bytes[i++];
1204
+ i = i % samplesCount;
1205
+ }
1206
+ head = (head + 1) % samplesCount;
1207
+ if (head === tail) {
1208
+ tail = (tail + 1) % samplesCount;
1209
+ }
1210
+ if (now - firstSampleTS < min) {
1211
+ return;
1212
+ }
1213
+ const passed = startedAt && now - startedAt;
1214
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
1215
+ };
1216
+ }
1217
+ function progressEventReducer(listener, isDownloadStream) {
1218
+ let bytesNotified = 0;
1219
+ const _speedometer = speedometer(50, 250);
1220
+ return (e) => {
1221
+ const loaded = e.loaded;
1222
+ const total = e.lengthComputable ? e.total : void 0;
1223
+ const progressBytes = loaded - bytesNotified;
1224
+ const rate = _speedometer(progressBytes);
1225
+ const inRange = loaded <= total;
1226
+ bytesNotified = loaded;
1227
+ const data = {
1228
+ loaded,
1229
+ total,
1230
+ progress: total ? loaded / total : void 0,
1231
+ bytes: progressBytes,
1232
+ rate: rate ? rate : void 0,
1233
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
1234
+ event: e
1235
+ };
1236
+ data[isDownloadStream ? "download" : "upload"] = true;
1237
+ listener(data);
1238
+ };
1239
+ }
1240
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
1241
+ var xhrAdapter = isXHRAdapterSupported && function(config) {
1242
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
1243
+ let requestData = config.data;
1244
+ const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
1245
+ let { responseType, withXSRFToken } = config;
1246
+ let onCanceled;
1247
+ function done() {
1248
+ if (config.cancelToken) {
1249
+ config.cancelToken.unsubscribe(onCanceled);
1250
+ }
1251
+ if (config.signal) {
1252
+ config.signal.removeEventListener("abort", onCanceled);
1253
+ }
1254
+ }
1255
+ let contentType;
1256
+ if (utils$4.isFormData(requestData)) {
1257
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
1258
+ requestHeaders.setContentType(false);
1259
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
1260
+ const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
1261
+ requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
1262
+ }
1263
+ }
1264
+ let request = new XMLHttpRequest();
1265
+ if (config.auth) {
1266
+ const username = config.auth.username || "";
1267
+ const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
1268
+ requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
1269
+ }
1270
+ const fullPath = buildFullPath(config.baseURL, config.url);
1271
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
1272
+ request.timeout = config.timeout;
1273
+ function onloadend() {
1274
+ if (!request) {
1275
+ return;
1276
+ }
1277
+ const responseHeaders = AxiosHeaders$1.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
1278
+ const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
1279
+ const response = {
1280
+ data: responseData,
1281
+ status: request.status,
1282
+ statusText: request.statusText,
1283
+ headers: responseHeaders,
1284
+ config,
1285
+ request
1286
+ };
1287
+ settle(function _resolve(value) {
1288
+ resolve(value);
1289
+ done();
1290
+ }, function _reject(err) {
1291
+ reject(err);
1292
+ done();
1293
+ }, response);
1294
+ request = null;
1295
+ }
1296
+ if ("onloadend" in request) {
1297
+ request.onloadend = onloadend;
1298
+ } else {
1299
+ request.onreadystatechange = function handleLoad() {
1300
+ if (!request || request.readyState !== 4) {
1301
+ return;
1302
+ }
1303
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
1304
+ return;
1305
+ }
1306
+ setTimeout(onloadend);
1307
+ };
1308
+ }
1309
+ request.onabort = function handleAbort() {
1310
+ if (!request) {
1311
+ return;
1312
+ }
1313
+ reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
1314
+ request = null;
1315
+ };
1316
+ request.onerror = function handleError() {
1317
+ reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
1318
+ request = null;
1319
+ };
1320
+ request.ontimeout = function handleTimeout() {
1321
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
1322
+ const transitional2 = config.transitional || transitionalDefaults;
1323
+ if (config.timeoutErrorMessage) {
1324
+ timeoutErrorMessage = config.timeoutErrorMessage;
1325
+ }
1326
+ reject(new AxiosError(timeoutErrorMessage, transitional2.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
1327
+ request = null;
1328
+ };
1329
+ if (platform.hasStandardBrowserEnv) {
1330
+ withXSRFToken && utils$4.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
1331
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
1332
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
1333
+ if (xsrfValue) {
1334
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
1335
+ }
1336
+ }
1337
+ }
1338
+ requestData === void 0 && requestHeaders.setContentType(null);
1339
+ if ("setRequestHeader" in request) {
1340
+ utils$4.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
1341
+ request.setRequestHeader(key, val);
1342
+ });
1343
+ }
1344
+ if (!utils$4.isUndefined(config.withCredentials)) {
1345
+ request.withCredentials = !!config.withCredentials;
1346
+ }
1347
+ if (responseType && responseType !== "json") {
1348
+ request.responseType = config.responseType;
1349
+ }
1350
+ if (typeof config.onDownloadProgress === "function") {
1351
+ request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
1352
+ }
1353
+ if (typeof config.onUploadProgress === "function" && request.upload) {
1354
+ request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
1355
+ }
1356
+ if (config.cancelToken || config.signal) {
1357
+ onCanceled = (cancel) => {
1358
+ if (!request) {
1359
+ return;
1360
+ }
1361
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
1362
+ request.abort();
1363
+ request = null;
1364
+ };
1365
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
1366
+ if (config.signal) {
1367
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
1368
+ }
1369
+ }
1370
+ const protocol = parseProtocol(fullPath);
1371
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
1372
+ reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
1373
+ return;
1374
+ }
1375
+ request.send(requestData || null);
1376
+ });
1377
+ };
1378
+ const knownAdapters = {
1379
+ http: httpAdapter,
1380
+ xhr: xhrAdapter
1381
+ };
1382
+ utils$4.forEach(knownAdapters, (fn, value) => {
1383
+ if (fn) {
1384
+ try {
1385
+ Object.defineProperty(fn, "name", { value });
1386
+ } catch (e) {
1387
+ }
1388
+ Object.defineProperty(fn, "adapterName", { value });
1389
+ }
1390
+ });
1391
+ const renderReason = (reason) => `- ${reason}`;
1392
+ const isResolvedHandle = (adapter) => utils$4.isFunction(adapter) || adapter === null || adapter === false;
1393
+ var adapters = {
1394
+ getAdapter: (adapters2) => {
1395
+ adapters2 = utils$4.isArray(adapters2) ? adapters2 : [adapters2];
1396
+ const { length } = adapters2;
1397
+ let nameOrAdapter;
1398
+ let adapter;
1399
+ const rejectedReasons = {};
1400
+ for (let i = 0; i < length; i++) {
1401
+ nameOrAdapter = adapters2[i];
1402
+ let id;
1403
+ adapter = nameOrAdapter;
1404
+ if (!isResolvedHandle(nameOrAdapter)) {
1405
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
1406
+ if (adapter === void 0) {
1407
+ throw new AxiosError(`Unknown adapter '${id}'`);
1408
+ }
1409
+ }
1410
+ if (adapter) {
1411
+ break;
1412
+ }
1413
+ rejectedReasons[id || "#" + i] = adapter;
1414
+ }
1415
+ if (!adapter) {
1416
+ const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
1417
+ let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
1418
+ throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
1419
+ }
1420
+ return adapter;
1421
+ },
1422
+ adapters: knownAdapters
1423
+ };
1424
+ function throwIfCancellationRequested(config) {
1425
+ if (config.cancelToken) {
1426
+ config.cancelToken.throwIfRequested();
1427
+ }
1428
+ if (config.signal && config.signal.aborted) {
1429
+ throw new CanceledError(null, config);
1430
+ }
1431
+ }
1432
+ function dispatchRequest(config) {
1433
+ throwIfCancellationRequested(config);
1434
+ config.headers = AxiosHeaders$1.from(config.headers);
1435
+ config.data = transformData.call(config, config.transformRequest);
1436
+ if (["post", "put", "patch"].indexOf(config.method) !== -1) {
1437
+ config.headers.setContentType("application/x-www-form-urlencoded", false);
1438
+ }
1439
+ const adapter = adapters.getAdapter(config.adapter || defaults$5.adapter);
1440
+ return adapter(config).then(function onAdapterResolution(response) {
1441
+ throwIfCancellationRequested(config);
1442
+ response.data = transformData.call(config, config.transformResponse, response);
1443
+ response.headers = AxiosHeaders$1.from(response.headers);
1444
+ return response;
1445
+ }, function onAdapterRejection(reason) {
1446
+ if (!isCancel(reason)) {
1447
+ throwIfCancellationRequested(config);
1448
+ if (reason && reason.response) {
1449
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
1450
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
1451
+ }
1452
+ }
1453
+ return Promise.reject(reason);
1454
+ });
1455
+ }
1456
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
1457
+ function mergeConfig(config1, config2) {
1458
+ config2 = config2 || {};
1459
+ const config = {};
1460
+ function getMergedValue(target, source, caseless) {
1461
+ if (utils$4.isPlainObject(target) && utils$4.isPlainObject(source)) {
1462
+ return utils$4.merge.call({ caseless }, target, source);
1463
+ } else if (utils$4.isPlainObject(source)) {
1464
+ return utils$4.merge({}, source);
1465
+ } else if (utils$4.isArray(source)) {
1466
+ return source.slice();
1467
+ }
1468
+ return source;
1469
+ }
1470
+ function mergeDeepProperties(a, b, caseless) {
1471
+ if (!utils$4.isUndefined(b)) {
1472
+ return getMergedValue(a, b, caseless);
1473
+ } else if (!utils$4.isUndefined(a)) {
1474
+ return getMergedValue(void 0, a, caseless);
1475
+ }
1476
+ }
1477
+ function valueFromConfig2(a, b) {
1478
+ if (!utils$4.isUndefined(b)) {
1479
+ return getMergedValue(void 0, b);
1480
+ }
1481
+ }
1482
+ function defaultToConfig2(a, b) {
1483
+ if (!utils$4.isUndefined(b)) {
1484
+ return getMergedValue(void 0, b);
1485
+ } else if (!utils$4.isUndefined(a)) {
1486
+ return getMergedValue(void 0, a);
1487
+ }
1488
+ }
1489
+ function mergeDirectKeys(a, b, prop) {
1490
+ if (prop in config2) {
1491
+ return getMergedValue(a, b);
1492
+ } else if (prop in config1) {
1493
+ return getMergedValue(void 0, a);
1494
+ }
1495
+ }
1496
+ const mergeMap = {
1497
+ url: valueFromConfig2,
1498
+ method: valueFromConfig2,
1499
+ data: valueFromConfig2,
1500
+ baseURL: defaultToConfig2,
1501
+ transformRequest: defaultToConfig2,
1502
+ transformResponse: defaultToConfig2,
1503
+ paramsSerializer: defaultToConfig2,
1504
+ timeout: defaultToConfig2,
1505
+ timeoutMessage: defaultToConfig2,
1506
+ withCredentials: defaultToConfig2,
1507
+ withXSRFToken: defaultToConfig2,
1508
+ adapter: defaultToConfig2,
1509
+ responseType: defaultToConfig2,
1510
+ xsrfCookieName: defaultToConfig2,
1511
+ xsrfHeaderName: defaultToConfig2,
1512
+ onUploadProgress: defaultToConfig2,
1513
+ onDownloadProgress: defaultToConfig2,
1514
+ decompress: defaultToConfig2,
1515
+ maxContentLength: defaultToConfig2,
1516
+ maxBodyLength: defaultToConfig2,
1517
+ beforeRedirect: defaultToConfig2,
1518
+ transport: defaultToConfig2,
1519
+ httpAgent: defaultToConfig2,
1520
+ httpsAgent: defaultToConfig2,
1521
+ cancelToken: defaultToConfig2,
1522
+ socketPath: defaultToConfig2,
1523
+ responseEncoding: defaultToConfig2,
1524
+ validateStatus: mergeDirectKeys,
1525
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
1526
+ };
1527
+ utils$4.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
1528
+ const merge3 = mergeMap[prop] || mergeDeepProperties;
1529
+ const configValue = merge3(config1[prop], config2[prop], prop);
1530
+ utils$4.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config[prop] = configValue);
1531
+ });
1532
+ return config;
1533
+ }
1534
+ const VERSION = "1.6.2";
1535
+ const validators$1 = {};
1536
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
1537
+ validators$1[type] = function validator2(thing) {
1538
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
1539
+ };
1540
+ });
1541
+ const deprecatedWarnings = {};
1542
+ validators$1.transitional = function transitional(validator2, version2, message) {
1543
+ function formatMessage(opt, desc) {
1544
+ return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
1545
+ }
1546
+ return (value, opt, opts) => {
1547
+ if (validator2 === false) {
1548
+ throw new AxiosError(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")), AxiosError.ERR_DEPRECATED);
1549
+ }
1550
+ if (version2 && !deprecatedWarnings[opt]) {
1551
+ deprecatedWarnings[opt] = true;
1552
+ console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
1553
+ }
1554
+ return validator2 ? validator2(value, opt, opts) : true;
1555
+ };
1556
+ };
1557
+ function assertOptions(options, schema, allowUnknown) {
1558
+ if (typeof options !== "object") {
1559
+ throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
1560
+ }
1561
+ const keys = Object.keys(options);
1562
+ let i = keys.length;
1563
+ while (i-- > 0) {
1564
+ const opt = keys[i];
1565
+ const validator2 = schema[opt];
1566
+ if (validator2) {
1567
+ const value = options[opt];
1568
+ const result = value === void 0 || validator2(value, opt, options);
1569
+ if (result !== true) {
1570
+ throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
1571
+ }
1572
+ continue;
1573
+ }
1574
+ if (allowUnknown !== true) {
1575
+ throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
1576
+ }
1577
+ }
1578
+ }
1579
+ var validator = {
1580
+ assertOptions,
1581
+ validators: validators$1
1582
+ };
1583
+ const validators = validator.validators;
1584
+ class Axios {
1585
+ constructor(instanceConfig) {
1586
+ this.defaults = instanceConfig;
1587
+ this.interceptors = {
1588
+ request: new InterceptorManager$1(),
1589
+ response: new InterceptorManager$1()
1590
+ };
1591
+ }
1592
+ request(configOrUrl, config) {
1593
+ if (typeof configOrUrl === "string") {
1594
+ config = config || {};
1595
+ config.url = configOrUrl;
1596
+ } else {
1597
+ config = configOrUrl || {};
1598
+ }
1599
+ config = mergeConfig(this.defaults, config);
1600
+ const { transitional: transitional2, paramsSerializer, headers } = config;
1601
+ if (transitional2 !== void 0) {
1602
+ validator.assertOptions(transitional2, {
1603
+ silentJSONParsing: validators.transitional(validators.boolean),
1604
+ forcedJSONParsing: validators.transitional(validators.boolean),
1605
+ clarifyTimeoutError: validators.transitional(validators.boolean)
1606
+ }, false);
1607
+ }
1608
+ if (paramsSerializer != null) {
1609
+ if (utils$4.isFunction(paramsSerializer)) {
1610
+ config.paramsSerializer = {
1611
+ serialize: paramsSerializer
1612
+ };
1613
+ } else {
1614
+ validator.assertOptions(paramsSerializer, {
1615
+ encode: validators.function,
1616
+ serialize: validators.function
1617
+ }, true);
1618
+ }
1619
+ }
1620
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
1621
+ let contextHeaders = headers && utils$4.merge(headers.common, headers[config.method]);
1622
+ headers && utils$4.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
1623
+ delete headers[method];
1624
+ });
1625
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
1626
+ const requestInterceptorChain = [];
1627
+ let synchronousRequestInterceptors = true;
1628
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
1629
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
1630
+ return;
1631
+ }
1632
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
1633
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
1634
+ });
1635
+ const responseInterceptorChain = [];
1636
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
1637
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
1638
+ });
1639
+ let promise;
1640
+ let i = 0;
1641
+ let len;
1642
+ if (!synchronousRequestInterceptors) {
1643
+ const chain = [dispatchRequest.bind(this), void 0];
1644
+ chain.unshift.apply(chain, requestInterceptorChain);
1645
+ chain.push.apply(chain, responseInterceptorChain);
1646
+ len = chain.length;
1647
+ promise = Promise.resolve(config);
1648
+ while (i < len) {
1649
+ promise = promise.then(chain[i++], chain[i++]);
1650
+ }
1651
+ return promise;
1652
+ }
1653
+ len = requestInterceptorChain.length;
1654
+ let newConfig = config;
1655
+ i = 0;
1656
+ while (i < len) {
1657
+ const onFulfilled = requestInterceptorChain[i++];
1658
+ const onRejected = requestInterceptorChain[i++];
1659
+ try {
1660
+ newConfig = onFulfilled(newConfig);
1661
+ } catch (error) {
1662
+ onRejected.call(this, error);
1663
+ break;
1664
+ }
1665
+ }
1666
+ try {
1667
+ promise = dispatchRequest.call(this, newConfig);
1668
+ } catch (error) {
1669
+ return Promise.reject(error);
1670
+ }
1671
+ i = 0;
1672
+ len = responseInterceptorChain.length;
1673
+ while (i < len) {
1674
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
1675
+ }
1676
+ return promise;
1677
+ }
1678
+ getUri(config) {
1679
+ config = mergeConfig(this.defaults, config);
1680
+ const fullPath = buildFullPath(config.baseURL, config.url);
1681
+ return buildURL(fullPath, config.params, config.paramsSerializer);
1682
+ }
1683
+ }
1684
+ utils$4.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
1685
+ Axios.prototype[method] = function(url, config) {
1686
+ return this.request(mergeConfig(config || {}, {
1687
+ method,
1688
+ url,
1689
+ data: (config || {}).data
1690
+ }));
1691
+ };
1692
+ });
1693
+ utils$4.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
1694
+ function generateHTTPMethod(isForm) {
1695
+ return function httpMethod(url, data, config) {
1696
+ return this.request(mergeConfig(config || {}, {
1697
+ method,
1698
+ headers: isForm ? {
1699
+ "Content-Type": "multipart/form-data"
1700
+ } : {},
1701
+ url,
1702
+ data
1703
+ }));
1704
+ };
1705
+ }
1706
+ Axios.prototype[method] = generateHTTPMethod();
1707
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
1708
+ });
1709
+ var Axios$1 = Axios;
1710
+ class CancelToken {
1711
+ constructor(executor) {
1712
+ if (typeof executor !== "function") {
1713
+ throw new TypeError("executor must be a function.");
1714
+ }
1715
+ let resolvePromise;
1716
+ this.promise = new Promise(function promiseExecutor(resolve) {
1717
+ resolvePromise = resolve;
1718
+ });
1719
+ const token = this;
1720
+ this.promise.then((cancel) => {
1721
+ if (!token._listeners)
1722
+ return;
1723
+ let i = token._listeners.length;
1724
+ while (i-- > 0) {
1725
+ token._listeners[i](cancel);
1726
+ }
1727
+ token._listeners = null;
1728
+ });
1729
+ this.promise.then = (onfulfilled) => {
1730
+ let _resolve;
1731
+ const promise = new Promise((resolve) => {
1732
+ token.subscribe(resolve);
1733
+ _resolve = resolve;
1734
+ }).then(onfulfilled);
1735
+ promise.cancel = function reject() {
1736
+ token.unsubscribe(_resolve);
1737
+ };
1738
+ return promise;
1739
+ };
1740
+ executor(function cancel(message, config, request) {
1741
+ if (token.reason) {
1742
+ return;
1743
+ }
1744
+ token.reason = new CanceledError(message, config, request);
1745
+ resolvePromise(token.reason);
1746
+ });
1747
+ }
1748
+ throwIfRequested() {
1749
+ if (this.reason) {
1750
+ throw this.reason;
1751
+ }
1752
+ }
1753
+ subscribe(listener) {
1754
+ if (this.reason) {
1755
+ listener(this.reason);
1756
+ return;
1757
+ }
1758
+ if (this._listeners) {
1759
+ this._listeners.push(listener);
1760
+ } else {
1761
+ this._listeners = [listener];
1762
+ }
1763
+ }
1764
+ unsubscribe(listener) {
1765
+ if (!this._listeners) {
1766
+ return;
1767
+ }
1768
+ const index2 = this._listeners.indexOf(listener);
1769
+ if (index2 !== -1) {
1770
+ this._listeners.splice(index2, 1);
1771
+ }
1772
+ }
1773
+ static source() {
1774
+ let cancel;
1775
+ const token = new CancelToken(function executor(c) {
1776
+ cancel = c;
1777
+ });
1778
+ return {
1779
+ token,
1780
+ cancel
1781
+ };
1782
+ }
1783
+ }
1784
+ var CancelToken$1 = CancelToken;
1785
+ function spread(callback) {
1786
+ return function wrap(arr) {
1787
+ return callback.apply(null, arr);
1788
+ };
1789
+ }
1790
+ function isAxiosError(payload) {
1791
+ return utils$4.isObject(payload) && payload.isAxiosError === true;
1792
+ }
1793
+ const HttpStatusCode = {
1794
+ Continue: 100,
1795
+ SwitchingProtocols: 101,
1796
+ Processing: 102,
1797
+ EarlyHints: 103,
1798
+ Ok: 200,
1799
+ Created: 201,
1800
+ Accepted: 202,
1801
+ NonAuthoritativeInformation: 203,
1802
+ NoContent: 204,
1803
+ ResetContent: 205,
1804
+ PartialContent: 206,
1805
+ MultiStatus: 207,
1806
+ AlreadyReported: 208,
1807
+ ImUsed: 226,
1808
+ MultipleChoices: 300,
1809
+ MovedPermanently: 301,
1810
+ Found: 302,
1811
+ SeeOther: 303,
1812
+ NotModified: 304,
1813
+ UseProxy: 305,
1814
+ Unused: 306,
1815
+ TemporaryRedirect: 307,
1816
+ PermanentRedirect: 308,
1817
+ BadRequest: 400,
1818
+ Unauthorized: 401,
1819
+ PaymentRequired: 402,
1820
+ Forbidden: 403,
1821
+ NotFound: 404,
1822
+ MethodNotAllowed: 405,
1823
+ NotAcceptable: 406,
1824
+ ProxyAuthenticationRequired: 407,
1825
+ RequestTimeout: 408,
1826
+ Conflict: 409,
1827
+ Gone: 410,
1828
+ LengthRequired: 411,
1829
+ PreconditionFailed: 412,
1830
+ PayloadTooLarge: 413,
1831
+ UriTooLong: 414,
1832
+ UnsupportedMediaType: 415,
1833
+ RangeNotSatisfiable: 416,
1834
+ ExpectationFailed: 417,
1835
+ ImATeapot: 418,
1836
+ MisdirectedRequest: 421,
1837
+ UnprocessableEntity: 422,
1838
+ Locked: 423,
1839
+ FailedDependency: 424,
1840
+ TooEarly: 425,
1841
+ UpgradeRequired: 426,
1842
+ PreconditionRequired: 428,
1843
+ TooManyRequests: 429,
1844
+ RequestHeaderFieldsTooLarge: 431,
1845
+ UnavailableForLegalReasons: 451,
1846
+ InternalServerError: 500,
1847
+ NotImplemented: 501,
1848
+ BadGateway: 502,
1849
+ ServiceUnavailable: 503,
1850
+ GatewayTimeout: 504,
1851
+ HttpVersionNotSupported: 505,
1852
+ VariantAlsoNegotiates: 506,
1853
+ InsufficientStorage: 507,
1854
+ LoopDetected: 508,
1855
+ NotExtended: 510,
1856
+ NetworkAuthenticationRequired: 511
1857
+ };
1858
+ Object.entries(HttpStatusCode).forEach(([key, value]) => {
1859
+ HttpStatusCode[value] = key;
1860
+ });
1861
+ var HttpStatusCode$1 = HttpStatusCode;
1862
+ function createInstance(defaultConfig2) {
1863
+ const context = new Axios$1(defaultConfig2);
1864
+ const instance2 = bind$2(Axios$1.prototype.request, context);
1865
+ utils$4.extend(instance2, Axios$1.prototype, context, { allOwnKeys: true });
1866
+ utils$4.extend(instance2, context, null, { allOwnKeys: true });
1867
+ instance2.create = function create(instanceConfig) {
1868
+ return createInstance(mergeConfig(defaultConfig2, instanceConfig));
1869
+ };
1870
+ return instance2;
1871
+ }
1872
+ const axios = createInstance(defaults$5);
1873
+ axios.Axios = Axios$1;
1874
+ axios.CanceledError = CanceledError;
1875
+ axios.CancelToken = CancelToken$1;
1876
+ axios.isCancel = isCancel;
1877
+ axios.VERSION = VERSION;
1878
+ axios.toFormData = toFormData;
1879
+ axios.AxiosError = AxiosError;
1880
+ axios.Cancel = axios.CanceledError;
1881
+ axios.all = function all(promises) {
1882
+ return Promise.all(promises);
1883
+ };
1884
+ axios.spread = spread;
1885
+ axios.isAxiosError = isAxiosError;
1886
+ axios.mergeConfig = mergeConfig;
1887
+ axios.AxiosHeaders = AxiosHeaders$1;
1888
+ axios.formToJSON = (thing) => formDataToJSON(utils$4.isHTMLForm(thing) ? new FormData(thing) : thing);
1889
+ axios.getAdapter = adapters.getAdapter;
1890
+ axios.HttpStatusCode = HttpStatusCode$1;
1891
+ axios.default = axios;
1892
+ var axios$1 = axios;
22
1893
  var render$g = function() {
23
1894
  var _vm = this;
24
1895
  var _h = _vm.$createElement;
@@ -710,7 +2581,7 @@ var evEmitter = { exports: {} };
710
2581
  window2.Draggabilly = factory(window2, window2.getSize, window2.Unidragger);
711
2582
  }
712
2583
  })(typeof window != "undefined" ? window : commonjsGlobal, function factory(window2, getSize2, Unidragger) {
713
- function noop() {
2584
+ function noop2() {
714
2585
  }
715
2586
  let jQuery = window2.jQuery;
716
2587
  function Draggabilly2(element, options) {
@@ -953,7 +2824,7 @@ var evEmitter = { exports: {} };
953
2824
  if (this.$element)
954
2825
  this.$element.removeData("draggabilly");
955
2826
  };
956
- proto._init = noop;
2827
+ proto._init = noop2;
957
2828
  if (jQuery && jQuery.bridget) {
958
2829
  jQuery.bridget("draggabilly", Draggabilly2);
959
2830
  }
@@ -2485,7 +4356,7 @@ Sortable.prototype = {
2485
4356
  _onTapStart: function _onTapStart(evt) {
2486
4357
  if (!evt.cancelable)
2487
4358
  return;
2488
- var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === "touch" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter;
4359
+ var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === "touch" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter2 = options.filter;
2489
4360
  _saveInputCheckedState(el);
2490
4361
  if (dragEl) {
2491
4362
  return;
@@ -2505,8 +4376,8 @@ Sortable.prototype = {
2505
4376
  }
2506
4377
  oldIndex = index(target);
2507
4378
  oldDraggableIndex = index(target, options.draggable);
2508
- if (typeof filter === "function") {
2509
- if (filter.call(this, evt, target, this)) {
4379
+ if (typeof filter2 === "function") {
4380
+ if (filter2.call(this, evt, target, this)) {
2510
4381
  _dispatchEvent({
2511
4382
  sortable: _this,
2512
4383
  rootEl: originalTarget,
@@ -2521,8 +4392,8 @@ Sortable.prototype = {
2521
4392
  preventOnFilter && evt.cancelable && evt.preventDefault();
2522
4393
  return;
2523
4394
  }
2524
- } else if (filter) {
2525
- filter = filter.split(",").some(function(criteria) {
4395
+ } else if (filter2) {
4396
+ filter2 = filter2.split(",").some(function(criteria) {
2526
4397
  criteria = closest(originalTarget, criteria.trim(), el, false);
2527
4398
  if (criteria) {
2528
4399
  _dispatchEvent({
@@ -2539,7 +4410,7 @@ Sortable.prototype = {
2539
4410
  return true;
2540
4411
  }
2541
4412
  });
2542
- if (filter) {
4413
+ if (filter2) {
2543
4414
  preventOnFilter && evt.cancelable && evt.preventDefault();
2544
4415
  return;
2545
4416
  }
@@ -3206,7 +5077,7 @@ Sortable.prototype = {
3206
5077
  break;
3207
5078
  }
3208
5079
  },
3209
- toArray: function toArray() {
5080
+ toArray: function toArray2() {
3210
5081
  var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options;
3211
5082
  for (; i < n; i++) {
3212
5083
  el = children[i];
@@ -4316,7 +6187,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4316
6187
  var Iterators = __webpack_require__("84f2");
4317
6188
  var $iterCreate = __webpack_require__("41a0");
4318
6189
  var setToStringTag = __webpack_require__("7f20");
4319
- var getPrototypeOf = __webpack_require__("38fd");
6190
+ var getPrototypeOf2 = __webpack_require__("38fd");
4320
6191
  var ITERATOR = __webpack_require__("2b4c")("iterator");
4321
6192
  var BUGGY = !([].keys && "next" in [].keys());
4322
6193
  var FF_ITERATOR = "@@iterator";
@@ -4354,7 +6225,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4354
6225
  var $anyNative = NAME == "Array" ? proto.entries || $native : $native;
4355
6226
  var methods, key, IteratorPrototype;
4356
6227
  if ($anyNative) {
4357
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
6228
+ IteratorPrototype = getPrototypeOf2($anyNative.call(new Base()));
4358
6229
  if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
4359
6230
  setToStringTag(IteratorPrototype, TAG, true);
4360
6231
  if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != "function")
@@ -4526,9 +6397,9 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4526
6397
  };
4527
6398
  },
4528
6399
  "230e": function(module2, exports2, __webpack_require__) {
4529
- var isObject = __webpack_require__("d3f4");
6400
+ var isObject2 = __webpack_require__("d3f4");
4530
6401
  var document2 = __webpack_require__("7726").document;
4531
- var is2 = isObject(document2) && isObject(document2.createElement);
6402
+ var is2 = isObject2(document2) && isObject2(document2.createElement);
4532
6403
  module2.exports = function(it) {
4533
6404
  return is2 ? document2.createElement(it) : {};
4534
6405
  };
@@ -4565,12 +6436,12 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4565
6436
  return $toString.call(it);
4566
6437
  };
4567
6438
  (module2.exports = function(O, key, val, safe) {
4568
- var isFunction = typeof val == "function";
4569
- if (isFunction)
6439
+ var isFunction2 = typeof val == "function";
6440
+ if (isFunction2)
4570
6441
  has2(val, "name") || hide(val, "name", key);
4571
6442
  if (O[key] === val)
4572
6443
  return;
4573
- if (isFunction)
6444
+ if (isFunction2)
4574
6445
  has2(val, SRC) || hide(val, SRC, O[key] ? "" + O[key] : TPL.join(String(key)));
4575
6446
  if (O === global2) {
4576
6447
  O[key] = val;
@@ -4582,7 +6453,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4582
6453
  } else {
4583
6454
  hide(O, key, val);
4584
6455
  }
4585
- })(Function.prototype, TO_STRING, function toString() {
6456
+ })(Function.prototype, TO_STRING, function toString3() {
4586
6457
  return typeof this == "function" && this[SRC] || $toString.call(this);
4587
6458
  });
4588
6459
  },
@@ -4638,9 +6509,9 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4638
6509
  module2.exports = false;
4639
6510
  },
4640
6511
  "2d95": function(module2, exports2) {
4641
- var toString = {}.toString;
6512
+ var toString3 = {}.toString;
4642
6513
  module2.exports = function(it) {
4643
- return toString.call(it).slice(8, -1);
6514
+ return toString3.call(it).slice(8, -1);
4644
6515
  };
4645
6516
  },
4646
6517
  "2fdb": function(module2, exports2, __webpack_require__) {
@@ -4899,22 +6770,22 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
4899
6770
  };
4900
6771
  },
4901
6772
  "69a8": function(module2, exports2) {
4902
- var hasOwnProperty = {}.hasOwnProperty;
6773
+ var hasOwnProperty2 = {}.hasOwnProperty;
4903
6774
  module2.exports = function(it, key) {
4904
- return hasOwnProperty.call(it, key);
6775
+ return hasOwnProperty2.call(it, key);
4905
6776
  };
4906
6777
  },
4907
6778
  "6a99": function(module2, exports2, __webpack_require__) {
4908
- var isObject = __webpack_require__("d3f4");
6779
+ var isObject2 = __webpack_require__("d3f4");
4909
6780
  module2.exports = function(it, S) {
4910
- if (!isObject(it))
6781
+ if (!isObject2(it))
4911
6782
  return it;
4912
6783
  var fn, val;
4913
- if (S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
6784
+ if (S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it)))
4914
6785
  return val;
4915
- if (typeof (fn = it.valueOf) == "function" && !isObject(val = fn.call(it)))
6786
+ if (typeof (fn = it.valueOf) == "function" && !isObject2(val = fn.call(it)))
4916
6787
  return val;
4917
- if (!S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
6788
+ if (!S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it)))
4918
6789
  return val;
4919
6790
  throw TypeError("Can't convert object to primitive value");
4920
6791
  };
@@ -5183,12 +7054,12 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
5183
7054
  });
5184
7055
  },
5185
7056
  "aae3": function(module2, exports2, __webpack_require__) {
5186
- var isObject = __webpack_require__("d3f4");
7057
+ var isObject2 = __webpack_require__("d3f4");
5187
7058
  var cof = __webpack_require__("2d95");
5188
7059
  var MATCH = __webpack_require__("2b4c")("match");
5189
7060
  module2.exports = function(it) {
5190
7061
  var isRegExp3;
5191
- return isObject(it) && ((isRegExp3 = it[MATCH]) !== void 0 ? !!isRegExp3 : cof(it) == "RegExp");
7062
+ return isObject2(it) && ((isRegExp3 = it[MATCH]) !== void 0 ? !!isRegExp3 : cof(it) == "RegExp");
5192
7063
  };
5193
7064
  },
5194
7065
  "ac6a": function(module2, exports2, __webpack_require__) {
@@ -5400,9 +7271,9 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
5400
7271
  addToUnscopables("entries");
5401
7272
  },
5402
7273
  "cb7c": function(module2, exports2, __webpack_require__) {
5403
- var isObject = __webpack_require__("d3f4");
7274
+ var isObject2 = __webpack_require__("d3f4");
5404
7275
  module2.exports = function(it) {
5405
- if (!isObject(it))
7276
+ if (!isObject2(it))
5406
7277
  throw TypeError(it + " is not an object!");
5407
7278
  return it;
5408
7279
  };
@@ -6062,7 +7933,7 @@ var render$8 = function() {
6062
7933
  _vm.$refs["EditLabelTitlePopover_" + index2][0].doClose();
6063
7934
  } } }, [_vm._v("\u53D6\u6D88")]), _c("el-button", { attrs: { "type": "primary", "size": "mini" }, on: { "click": function($event) {
6064
7935
  return _vm.handleConfirmChangeLabelTitle(index2);
6065
- } } }, [_vm._v("\u786E\u5B9A")])], 1)], 1) : _vm._e()], 1), _c("div", [item.title ? _c("div", [_c("span", [_vm._v(_vm._s(item.title))])]) : _c("div", _vm._l(item.labels, function(v, index3) {
7936
+ } } }, [_vm._v("\u786E\u5B9A")])], 1)], 1) : _vm._e()], 1), _c("div", [item.title ? _c("div", { staticClass: "ui-desc__title" }, [_c("span", [_vm._v(_vm._s(item.title))])]) : _c("div", { staticClass: "ui-desc__title" }, _vm._l(item.labels, function(v, index3) {
6066
7937
  return _c("span", { key: index3 }, [_vm._v(_vm._s(v.prependLabel || v.label) + "\uFF1A" + _vm._s(v.valueLabel || v.value))]);
6067
7938
  }), 0)]), _c("el-tooltip", { staticClass: "item", attrs: { "effect": "dark", "content": "\u4FEE\u6539\u7B5B\u9009\u6807\u9898", "placement": "top-start" } }, [_c("i", { ref: "EditLabelTitle_" + index2, refInFor: true, staticClass: "el-icon-edit ui-flag--icon", on: { "click": function($event) {
6068
7939
  $event.stopPropagation();
@@ -6076,12 +7947,12 @@ var render$8 = function() {
6076
7947
  return (v.prependLabel || v.label) + "\uFF1A" + (v.valueLabel || v.value);
6077
7948
  }).join("\uFF1B") }, on: { "click": function($event) {
6078
7949
  return _vm.handleShortcut(item, index2);
6079
- } } }, [_vm._l(item, function(v, i) {
7950
+ } } }, [_c("div", { staticClass: "ui-desc__title" }, _vm._l(item, function(v, i) {
6080
7951
  return _c("span", { key: i }, [_vm._v(_vm._s(v.prependLabel || v.label) + "\uFF1A" + _vm._s(v.valueLabel || v.value))]);
6081
- }), _c("el-tooltip", { staticClass: "item", attrs: { "effect": "dark", "content": "\u6DFB\u52A0\u5230\u5E38\u7528\u7B5B\u9009", "placement": "top-start" } }, [_c("i", { staticClass: "el-icon-circle-plus ui-flag--icon", on: { "click": function($event) {
7952
+ }), 0), _c("el-tooltip", { staticClass: "item", attrs: { "effect": "dark", "content": "\u6DFB\u52A0\u5230\u5E38\u7528\u7B5B\u9009", "placement": "top-start" } }, [_c("i", { staticClass: "el-icon-circle-plus ui-flag--icon", on: { "click": function($event) {
6082
7953
  $event.stopPropagation();
6083
7954
  return _vm.handleOperation(index2, "temps");
6084
- } } })])], 2);
7955
+ } } })])], 1);
6085
7956
  }), 0)]), _c("el-button", { staticClass: "ui-search__button--more", attrs: { "slot": "reference", "type": "text" }, slot: "reference" }, [_vm._v("\u7B5B\u9009\u5386\u53F2 "), _c("i", { staticClass: "el-icon-caret-right" })])], 1)], 1);
6086
7957
  };
6087
7958
  var staticRenderFns$8 = [];
@@ -6111,19 +7982,21 @@ const __vue2_script$9 = {
6111
7982
  changeLabelTitleItem: {}
6112
7983
  };
6113
7984
  },
6114
- created() {
6115
- let locData = localStorage.getItem(`SaveRecord_${this.configKey}`);
6116
- const recordData = locData ? JSON.parse(locData) : {
6117
- saves: [],
6118
- temps: []
6119
- };
6120
- if (recordData.saves[0] && Array.isArray(recordData.saves[0])) {
6121
- recordData.saves = recordData.saves.map((item) => ({
6122
- labels: item,
6123
- title: ""
6124
- }));
6125
- }
6126
- this.recordData = recordData;
7985
+ async mounted() {
7986
+ setTimeout(async () => {
7987
+ let locData = await this.$parent.getConfigCache(`SaveRecord_${this.configKey}`);
7988
+ const recordData = !!Object.entries(locData).length ? locData : {
7989
+ saves: [],
7990
+ temps: []
7991
+ };
7992
+ if (recordData.saves[0] && Array.isArray(recordData.saves[0])) {
7993
+ recordData.saves = recordData.saves.map((item) => ({
7994
+ labels: item,
7995
+ title: ""
7996
+ }));
7997
+ }
7998
+ this.recordData = recordData;
7999
+ }, 500);
6127
8000
  },
6128
8001
  methods: {
6129
8002
  handleOperation(index2, type) {
@@ -6185,7 +8058,7 @@ const __vue2_script$9 = {
6185
8058
  if (this.recordData.temps.length > 10) {
6186
8059
  this.recordData.temps.splice(10);
6187
8060
  }
6188
- localStorage.setItem(`SaveRecord_${this.configKey}`, JSON.stringify(this.recordData));
8061
+ this.$parent.setConfigCache(`SaveRecord_${this.configKey}`, this.recordData);
6189
8062
  },
6190
8063
  handleShowChangeLabelTitle(item) {
6191
8064
  this.changeLabelTitleShow = true;
@@ -6195,7 +8068,7 @@ const __vue2_script$9 = {
6195
8068
  this.changeLabelTitleItem.title = this.changeLabelTitleVal;
6196
8069
  this.changeLabelTitleVal = "";
6197
8070
  this.$refs[`EditLabelTitlePopover_${index2}`][0].doClose();
6198
- localStorage.setItem(`SaveRecord_${this.configKey}`, JSON.stringify(this.recordData));
8071
+ this.$parent.setConfigCache(`SaveRecord_${this.configKey}`, this.recordData);
6199
8072
  }
6200
8073
  },
6201
8074
  watch: {
@@ -6218,7 +8091,7 @@ const __vue2_script$9 = {
6218
8091
  }
6219
8092
  };
6220
8093
  const __cssModules$9 = {};
6221
- var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$8, staticRenderFns$8, false, __vue2_injectStyles$9, "baf5acdc", null, null);
8094
+ var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$8, staticRenderFns$8, false, __vue2_injectStyles$9, "47b46940", null, null);
6222
8095
  function __vue2_injectStyles$9(context) {
6223
8096
  for (let o in __cssModules$9) {
6224
8097
  this[o] = __cssModules$9[o];
@@ -6241,7 +8114,7 @@ const __vue2_script$8 = {
6241
8114
  render(h) {
6242
8115
  const vnode = this._props.vnode;
6243
8116
  const prepend = vnode.$slots.prepend;
6244
- const append = vnode.$slots.append;
8117
+ const append2 = vnode.$slots.append;
6245
8118
  const label = vnode.$slots.label;
6246
8119
  return h(this._props.vnode.constructor, {
6247
8120
  on: vnode.$listeners,
@@ -6251,7 +8124,7 @@ const __vue2_script$8 = {
6251
8124
  ref: vnode.ref
6252
8125
  }, [
6253
8126
  prepend ? [h("div", { slot: "prepend" }, prepend)] : [],
6254
- append ? [h("div", { slot: "append" }, append)] : [],
8127
+ append2 ? [h("div", { slot: "append" }, append2)] : [],
6255
8128
  label ? [h("div", { slot: "label", class: "ui-item__label" }, label)] : []
6256
8129
  ]);
6257
8130
  }
@@ -6379,7 +8252,7 @@ var render$7 = function() {
6379
8252
  var _vm = this;
6380
8253
  var _h = _vm.$createElement;
6381
8254
  var _c = _vm._self._c || _h;
6382
- return _c("div", { directives: [{ name: "loading", rawName: "v-loading", value: _vm.loadSearch, expression: "loadSearch" }], ref: "Search", staticClass: "ui-search" }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.collspase, expression: "collspase" }], staticClass: "ui-search__main" }, [!_vm.useConfig ? _vm._t("default") : _c("div", { directives: [{ name: "show", rawName: "v-show", value: false, expression: "false" }] }, [_vm._t("default")], 2), !_vm.loadSearch && _vm.useConfig ? _vm._l(_vm.childItems, function(vnode, index2) {
8255
+ return _c("div", { directives: [{ name: "loading", rawName: "v-loading", value: _vm.loadSearch, expression: "loadSearch" }], ref: "Search", staticClass: "ui-search" }, [_vm.loadingConfig ? _c("div", { directives: [{ name: "loading", rawName: "v-loading", value: true, expression: "true" }], staticClass: "ui-search--mask", attrs: { "element-loading-text": "\u52A0\u8F7D\u914D\u7F6E\u4E2D", "element-loading-background": "rgba(255, 255, 255, 1)" } }) : _vm._e(), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.collspase, expression: "collspase" }], staticClass: "ui-search__main", class: { "loaddone": _vm.loadingConfig == false } }, [!_vm.useConfig ? _vm._t("default") : _c("div", { directives: [{ name: "show", rawName: "v-show", value: false, expression: "false" }] }, [_vm._t("default")], 2), !_vm.loadSearch && _vm.useConfig ? _vm._l(_vm.childItems, function(vnode, index2) {
6383
8256
  return _c("DefaultItem", { key: index2, ref: "Config_" + (vnode.ref || vnode.$options.propsData.label || index2), refInFor: true, attrs: { "vnode": vnode } });
6384
8257
  }) : _vm._e()], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.collspase, expression: "collspase" }], staticClass: "ui-search__footer" }, [_c("el-button", { attrs: { "size": "small", "icon": "el-icon-refresh" }, on: { "click": _vm.handleReset } }, [_vm._v("\u91CD\u7F6E")]), _c("el-button", { staticStyle: { "margin-right": "10px" }, attrs: { "size": "small", "icon": "el-icon-search", "type": "primary" }, on: { "click": function($event) {
6385
8258
  return _vm.handleQuery();
@@ -6453,7 +8326,9 @@ const __vue2_script$7 = {
6453
8326
  searchHeight: "",
6454
8327
  listenerSearchTimes: "",
6455
8328
  collspase: true,
6456
- showTip: false
8329
+ showTip: false,
8330
+ localConfig: null,
8331
+ loadingConfig: null
6457
8332
  };
6458
8333
  },
6459
8334
  computed: {
@@ -6616,7 +8491,7 @@ const __vue2_script$7 = {
6616
8491
  checkItems: this.checkItems,
6617
8492
  sortItems: this.sortItems
6618
8493
  };
6619
- localStorage.setItem(`SearchCfg__${this.configKey}`, JSON.stringify(saveConfig));
8494
+ this.setConfigCache(`SearchCfg__${this.configKey}`, saveConfig);
6620
8495
  const sortItems = this.sortItems.map((item) => {
6621
8496
  const findItem = this.childItems.find((v) => v.$options.propsData.label == item);
6622
8497
  return findItem;
@@ -6635,6 +8510,34 @@ const __vue2_script$7 = {
6635
8510
  findTableRes && findTableRes.handleRefreshHeight();
6636
8511
  }
6637
8512
  }, 200);
8513
+ },
8514
+ async setConfigCache(key, value) {
8515
+ if (!this.$UICONFIG.setCacheApi) {
8516
+ localStorage.setItem(key, JSON.stringify(value));
8517
+ return;
8518
+ }
8519
+ this.localConfig[key] = JSON.stringify(value);
8520
+ await this.$http.post(this.$UICONFIG.setCacheApi, {
8521
+ code: this.configKey,
8522
+ datas: this.localConfig
8523
+ });
8524
+ },
8525
+ async getConfigCache(key) {
8526
+ if (!this.$UICONFIG.getCacheApi) {
8527
+ this.loadingConfig = false;
8528
+ return JSON.parse(localStorage.getItem(key) || "{}");
8529
+ }
8530
+ if (!this.localConfig) {
8531
+ this.loadingConfig = true;
8532
+ const { data: res } = await this.$http.post(this.$UICONFIG.getCacheApi, {
8533
+ code: this.configKey
8534
+ });
8535
+ setTimeout(() => {
8536
+ this.loadingConfig = false;
8537
+ }, 200);
8538
+ this.localConfig = !Object.entries(res.data).length ? {} : res.data;
8539
+ }
8540
+ return JSON.parse(this.localConfig[key] || "{}");
6638
8541
  }
6639
8542
  },
6640
8543
  async mounted() {
@@ -6657,11 +8560,17 @@ const __vue2_script$7 = {
6657
8560
  this.checkItems = this.childItems.map((item) => item.$options.propsData.label);
6658
8561
  this.sortItems = this.childItems.map((item) => item.$options.propsData.label);
6659
8562
  this.handleLayoutItem();
6660
- const locConfig = JSON.parse(localStorage.getItem(`SearchCfg__${this.configKey}`) || "{}");
8563
+ const locConfig = await this.getConfigCache(`SearchCfg__${this.configKey}`);
6661
8564
  if (locConfig.checkItems) {
6662
8565
  await this.$nextTick();
6663
- this.checkItems = locConfig.checkItems;
6664
- this.sortItems = locConfig.sortItems;
8566
+ const newItemInx = this.sortItems.findIndex((v) => !locConfig.sortItems.includes(v));
8567
+ if (newItemInx > -1) {
8568
+ const newItem = this.sortItems[newItemInx];
8569
+ locConfig.checkItems.push(newItem);
8570
+ locConfig.sortItems.splice(newItemInx, 0, newItem);
8571
+ }
8572
+ this.checkItems = locConfig.checkItems.filter((v) => this.sortItems.includes(v));
8573
+ this.sortItems = locConfig.sortItems.filter((v) => this.sortItems.includes(v));
6665
8574
  this.handleRenderConfig();
6666
8575
  }
6667
8576
  } else {
@@ -6704,7 +8613,7 @@ const __vue2_script$7 = {
6704
8613
  }
6705
8614
  };
6706
8615
  const __cssModules$7 = {};
6707
- var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "b0ab1066", null, null);
8616
+ var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "5325aa8b", null, null);
6708
8617
  function __vue2_injectStyles$7(context) {
6709
8618
  for (let o in __cssModules$7) {
6710
8619
  this[o] = __cssModules$7[o];
@@ -7367,10 +9276,10 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
7367
9276
  }
7368
9277
  if (!isDate(obj) && !isRegExp$1(obj)) {
7369
9278
  var ys = arrObjKeys(obj, inspect2);
7370
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
9279
+ var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
7371
9280
  var protoTag = obj instanceof Object ? "" : "null prototype";
7372
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
7373
- var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
9281
+ var stringTag = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
9282
+ var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
7374
9283
  var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
7375
9284
  if (ys.length === 0) {
7376
9285
  return tag + "{}";
@@ -8015,7 +9924,7 @@ var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
8015
9924
  return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
8016
9925
  };
8017
9926
  var sentinel = {};
8018
- var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort2, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, sideChannel2) {
9927
+ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter2, sort2, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, sideChannel2) {
8019
9928
  var obj = object;
8020
9929
  var tmpSc = sideChannel2;
8021
9930
  var step = 0;
@@ -8034,8 +9943,8 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
8034
9943
  step = 0;
8035
9944
  }
8036
9945
  }
8037
- if (typeof filter === "function") {
8038
- obj = filter(prefix, obj);
9946
+ if (typeof filter2 === "function") {
9947
+ obj = filter2(prefix, obj);
8039
9948
  } else if (obj instanceof Date) {
8040
9949
  obj = serializeDate2(obj);
8041
9950
  } else if (generateArrayPrefix === "comma" && isArray$1(obj)) {
@@ -8074,8 +9983,8 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
8074
9983
  var objKeys;
8075
9984
  if (generateArrayPrefix === "comma" && isArray$1(obj)) {
8076
9985
  objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
8077
- } else if (isArray$1(filter)) {
8078
- objKeys = filter;
9986
+ } else if (isArray$1(filter2)) {
9987
+ objKeys = filter2;
8079
9988
  } else {
8080
9989
  var keys = Object.keys(obj);
8081
9990
  objKeys = sort2 ? keys.sort(sort2) : keys;
@@ -8091,7 +10000,7 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
8091
10000
  sideChannel2.set(object, step);
8092
10001
  var valueSideChannel = getSideChannel2();
8093
10002
  valueSideChannel.set(sentinel, sideChannel2);
8094
- pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort2, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, valueSideChannel));
10003
+ pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter2, sort2, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, valueSideChannel));
8095
10004
  }
8096
10005
  return values;
8097
10006
  };
@@ -8114,9 +10023,9 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
8114
10023
  format = opts.format;
8115
10024
  }
8116
10025
  var formatter = formats$1.formatters[format];
8117
- var filter = defaults$2.filter;
10026
+ var filter2 = defaults$2.filter;
8118
10027
  if (typeof opts.filter === "function" || isArray$1(opts.filter)) {
8119
- filter = opts.filter;
10028
+ filter2 = opts.filter;
8120
10029
  }
8121
10030
  return {
8122
10031
  addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults$2.addQueryPrefix,
@@ -8127,7 +10036,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
8127
10036
  encode: typeof opts.encode === "boolean" ? opts.encode : defaults$2.encode,
8128
10037
  encoder: typeof opts.encoder === "function" ? opts.encoder : defaults$2.encoder,
8129
10038
  encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults$2.encodeValuesOnly,
8130
- filter,
10039
+ filter: filter2,
8131
10040
  format,
8132
10041
  formatter,
8133
10042
  serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults$2.serializeDate,
@@ -8140,13 +10049,13 @@ var stringify_1 = function(object, opts) {
8140
10049
  var obj = object;
8141
10050
  var options = normalizeStringifyOptions(opts);
8142
10051
  var objKeys;
8143
- var filter;
10052
+ var filter2;
8144
10053
  if (typeof options.filter === "function") {
8145
- filter = options.filter;
8146
- obj = filter("", obj);
10054
+ filter2 = options.filter;
10055
+ obj = filter2("", obj);
8147
10056
  } else if (isArray$1(options.filter)) {
8148
- filter = options.filter;
8149
- objKeys = filter;
10057
+ filter2 = options.filter;
10058
+ objKeys = filter2;
8150
10059
  }
8151
10060
  var keys = [];
8152
10061
  if (typeof obj !== "object" || obj === null) {
@@ -9569,7 +11478,7 @@ var quill = { exports: {} };
9569
11478
  }
9570
11479
  return toStr2.call(arr) === "[object Array]";
9571
11480
  };
9572
- var isPlainObject = function isPlainObject2(obj) {
11481
+ var isPlainObject2 = function isPlainObject3(obj) {
9573
11482
  if (!obj || toStr2.call(obj) !== "[object Object]") {
9574
11483
  return false;
9575
11484
  }
@@ -9626,12 +11535,12 @@ var quill = { exports: {} };
9626
11535
  src2 = getProperty(target, name);
9627
11536
  copy = getProperty(options, name);
9628
11537
  if (target !== copy) {
9629
- if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray2(copy)))) {
11538
+ if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray2(copy)))) {
9630
11539
  if (copyIsArray) {
9631
11540
  copyIsArray = false;
9632
11541
  clone2 = src2 && isArray2(src2) ? src2 : [];
9633
11542
  } else {
9634
- clone2 = src2 && isPlainObject(src2) ? src2 : {};
11543
+ clone2 = src2 && isPlainObject2(src2) ? src2 : {};
9635
11544
  }
9636
11545
  setProperty(target, { name, newValue: extend2(deep, clone2, copy) });
9637
11546
  } else if (typeof copy !== "undefined") {
@@ -12871,10 +14780,10 @@ var quill = { exports: {} };
12871
14780
  nativePromise = function() {
12872
14781
  };
12873
14782
  }
12874
- function clone3(parent, circular, depth, prototype, includeNonEnumerable) {
14783
+ function clone3(parent, circular, depth, prototype2, includeNonEnumerable) {
12875
14784
  if (typeof circular === "object") {
12876
14785
  depth = circular.depth;
12877
- prototype = circular.prototype;
14786
+ prototype2 = circular.prototype;
12878
14787
  includeNonEnumerable = circular.includeNonEnumerable;
12879
14788
  circular = circular.circular;
12880
14789
  }
@@ -12926,12 +14835,12 @@ var quill = { exports: {} };
12926
14835
  } else if (_instanceof(parent2, Error)) {
12927
14836
  child = Object.create(parent2);
12928
14837
  } else {
12929
- if (typeof prototype == "undefined") {
14838
+ if (typeof prototype2 == "undefined") {
12930
14839
  proto = Object.getPrototypeOf(parent2);
12931
14840
  child = Object.create(proto);
12932
14841
  } else {
12933
- child = Object.create(prototype);
12934
- proto = prototype;
14842
+ child = Object.create(prototype2);
14843
+ proto = prototype2;
12935
14844
  }
12936
14845
  }
12937
14846
  if (circular) {
@@ -20691,6 +22600,12 @@ const install = (Vue2, ops = { config: {} }) => {
20691
22600
  Vue2.prototype.$jump = (url, type = "_blank") => {
20692
22601
  window.open(url, type);
20693
22602
  };
22603
+ const Http = axios$1.create({
22604
+ headers: {
22605
+ ["Login-Token"]: ops.config.token
22606
+ }
22607
+ });
22608
+ Vue2.prototype.$http = Http;
20694
22609
  };
20695
22610
  const defaultConfig = {
20696
22611
  version: "dev",