yuang-framework-ui-pc 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,24 +1,3663 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as ft, getCurrentInstance as dt, openBlock as Yn, createElementBlock as Zn, createElementVNode as er, shallowRef as tr, unref as oe, shallowReactive as nr, nextTick as rr, reactive as or, inject as ye, computed as H, h as nn, provide as Me, ref as sr, watch as rn, watchEffect as ir } from "vue";
|
|
2
|
+
const ar = /* @__PURE__ */ ft({
|
|
3
3
|
__name: "index",
|
|
4
4
|
setup(e) {
|
|
5
|
-
const { proxy: t } =
|
|
5
|
+
const { proxy: t } = dt(), n = () => {
|
|
6
6
|
t.$message.success("我是测试按钮");
|
|
7
7
|
};
|
|
8
|
-
return (
|
|
9
|
-
|
|
8
|
+
return (r, o) => (Yn(), Zn("div", null, [
|
|
9
|
+
er("button", { onClick: n }, "我是测试按钮")
|
|
10
10
|
]));
|
|
11
11
|
}
|
|
12
|
-
}),
|
|
12
|
+
}), cr = (e, t) => {
|
|
13
13
|
const n = e.__vccOpts || e;
|
|
14
|
-
for (const [
|
|
15
|
-
n[
|
|
14
|
+
for (const [r, o] of t)
|
|
15
|
+
n[r] = o;
|
|
16
16
|
return n;
|
|
17
|
-
},
|
|
18
|
-
|
|
17
|
+
}, lr = /* @__PURE__ */ cr(ar, [["__scopeId", "data-v-842edfb2"]]);
|
|
18
|
+
function on(e, t) {
|
|
19
|
+
return function() {
|
|
20
|
+
return e.apply(t, arguments);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const { toString: ur } = Object.prototype, { getPrototypeOf: ht } = Object, Ce = /* @__PURE__ */ ((e) => (t) => {
|
|
24
|
+
const n = ur.call(t);
|
|
25
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
26
|
+
})(/* @__PURE__ */ Object.create(null)), q = (e) => (e = e.toLowerCase(), (t) => Ce(t) === e), xe = (e) => (t) => typeof t === e, { isArray: ae } = Array, Ee = xe("undefined");
|
|
27
|
+
function fr(e) {
|
|
28
|
+
return e !== null && !Ee(e) && e.constructor !== null && !Ee(e.constructor) && F(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
29
|
+
}
|
|
30
|
+
const sn = q("ArrayBuffer");
|
|
31
|
+
function dr(e) {
|
|
32
|
+
let t;
|
|
33
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && sn(e.buffer), t;
|
|
34
|
+
}
|
|
35
|
+
const hr = xe("string"), F = xe("function"), an = xe("number"), De = (e) => e !== null && typeof e == "object", pr = (e) => e === !0 || e === !1, Ae = (e) => {
|
|
36
|
+
if (Ce(e) !== "object")
|
|
37
|
+
return !1;
|
|
38
|
+
const t = ht(e);
|
|
39
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
40
|
+
}, mr = q("Date"), gr = q("File"), yr = q("Blob"), Er = q("FileList"), vr = (e) => De(e) && F(e.pipe), wr = (e) => {
|
|
41
|
+
let t;
|
|
42
|
+
return e && (typeof FormData == "function" && e instanceof FormData || F(e.append) && ((t = Ce(e)) === "formdata" || // detect form-data instance
|
|
43
|
+
t === "object" && F(e.toString) && e.toString() === "[object FormData]"));
|
|
44
|
+
}, br = q("URLSearchParams"), [Rr, _r, Sr, Or] = ["ReadableStream", "Request", "Response", "Headers"].map(q), Ar = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
45
|
+
function we(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
46
|
+
if (e === null || typeof e > "u")
|
|
47
|
+
return;
|
|
48
|
+
let r, o;
|
|
49
|
+
if (typeof e != "object" && (e = [e]), ae(e))
|
|
50
|
+
for (r = 0, o = e.length; r < o; r++)
|
|
51
|
+
t.call(null, e[r], r, e);
|
|
52
|
+
else {
|
|
53
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = i.length;
|
|
54
|
+
let a;
|
|
55
|
+
for (r = 0; r < s; r++)
|
|
56
|
+
a = i[r], t.call(null, e[a], a, e);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function cn(e, t) {
|
|
60
|
+
t = t.toLowerCase();
|
|
61
|
+
const n = Object.keys(e);
|
|
62
|
+
let r = n.length, o;
|
|
63
|
+
for (; r-- > 0; )
|
|
64
|
+
if (o = n[r], t === o.toLowerCase())
|
|
65
|
+
return o;
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const Z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ln = (e) => !Ee(e) && e !== Z;
|
|
69
|
+
function Qe() {
|
|
70
|
+
const { caseless: e } = ln(this) && this || {}, t = {}, n = (r, o) => {
|
|
71
|
+
const i = e && cn(t, o) || o;
|
|
72
|
+
Ae(t[i]) && Ae(r) ? t[i] = Qe(t[i], r) : Ae(r) ? t[i] = Qe({}, r) : ae(r) ? t[i] = r.slice() : t[i] = r;
|
|
73
|
+
};
|
|
74
|
+
for (let r = 0, o = arguments.length; r < o; r++)
|
|
75
|
+
arguments[r] && we(arguments[r], n);
|
|
76
|
+
return t;
|
|
77
|
+
}
|
|
78
|
+
const Tr = (e, t, n, { allOwnKeys: r } = {}) => (we(t, (o, i) => {
|
|
79
|
+
n && F(o) ? e[i] = on(o, n) : e[i] = o;
|
|
80
|
+
}, { allOwnKeys: r }), e), Pr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Nr = (e, t, n, r) => {
|
|
81
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
82
|
+
value: t.prototype
|
|
83
|
+
}), n && Object.assign(e.prototype, n);
|
|
84
|
+
}, kr = (e, t, n, r) => {
|
|
85
|
+
let o, i, s;
|
|
86
|
+
const a = {};
|
|
87
|
+
if (t = t || {}, e == null) return t;
|
|
88
|
+
do {
|
|
89
|
+
for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0; )
|
|
90
|
+
s = o[i], (!r || r(s, e, t)) && !a[s] && (t[s] = e[s], a[s] = !0);
|
|
91
|
+
e = n !== !1 && ht(e);
|
|
92
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
93
|
+
return t;
|
|
94
|
+
}, Cr = (e, t, n) => {
|
|
95
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
96
|
+
const r = e.indexOf(t, n);
|
|
97
|
+
return r !== -1 && r === n;
|
|
98
|
+
}, xr = (e) => {
|
|
99
|
+
if (!e) return null;
|
|
100
|
+
if (ae(e)) return e;
|
|
101
|
+
let t = e.length;
|
|
102
|
+
if (!an(t)) return null;
|
|
103
|
+
const n = new Array(t);
|
|
104
|
+
for (; t-- > 0; )
|
|
105
|
+
n[t] = e[t];
|
|
106
|
+
return n;
|
|
107
|
+
}, Dr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ht(Uint8Array)), Ir = (e, t) => {
|
|
108
|
+
const r = (e && e[Symbol.iterator]).call(e);
|
|
109
|
+
let o;
|
|
110
|
+
for (; (o = r.next()) && !o.done; ) {
|
|
111
|
+
const i = o.value;
|
|
112
|
+
t.call(e, i[0], i[1]);
|
|
113
|
+
}
|
|
114
|
+
}, Lr = (e, t) => {
|
|
115
|
+
let n;
|
|
116
|
+
const r = [];
|
|
117
|
+
for (; (n = e.exec(t)) !== null; )
|
|
118
|
+
r.push(n);
|
|
119
|
+
return r;
|
|
120
|
+
}, $r = q("HTMLFormElement"), Ur = (e) => e.toLowerCase().replace(
|
|
121
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
122
|
+
function(n, r, o) {
|
|
123
|
+
return r.toUpperCase() + o;
|
|
124
|
+
}
|
|
125
|
+
), Ot = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Br = q("RegExp"), un = (e, t) => {
|
|
126
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
127
|
+
we(n, (o, i) => {
|
|
128
|
+
let s;
|
|
129
|
+
(s = t(o, i, e)) !== !1 && (r[i] = s || o);
|
|
130
|
+
}), Object.defineProperties(e, r);
|
|
131
|
+
}, jr = (e) => {
|
|
132
|
+
un(e, (t, n) => {
|
|
133
|
+
if (F(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
134
|
+
return !1;
|
|
135
|
+
const r = e[n];
|
|
136
|
+
if (F(r)) {
|
|
137
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
138
|
+
t.writable = !1;
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
t.set || (t.set = () => {
|
|
142
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}, Fr = (e, t) => {
|
|
147
|
+
const n = {}, r = (o) => {
|
|
148
|
+
o.forEach((i) => {
|
|
149
|
+
n[i] = !0;
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
return ae(e) ? r(e) : r(String(e).split(t)), n;
|
|
153
|
+
}, Vr = () => {
|
|
154
|
+
}, Mr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, qe = "abcdefghijklmnopqrstuvwxyz", At = "0123456789", fn = {
|
|
155
|
+
DIGIT: At,
|
|
156
|
+
ALPHA: qe,
|
|
157
|
+
ALPHA_DIGIT: qe + qe.toUpperCase() + At
|
|
158
|
+
}, qr = (e = 16, t = fn.ALPHA_DIGIT) => {
|
|
159
|
+
let n = "";
|
|
160
|
+
const { length: r } = t;
|
|
161
|
+
for (; e--; )
|
|
162
|
+
n += t[Math.random() * r | 0];
|
|
163
|
+
return n;
|
|
164
|
+
};
|
|
165
|
+
function Hr(e) {
|
|
166
|
+
return !!(e && F(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
167
|
+
}
|
|
168
|
+
const zr = (e) => {
|
|
169
|
+
const t = new Array(10), n = (r, o) => {
|
|
170
|
+
if (De(r)) {
|
|
171
|
+
if (t.indexOf(r) >= 0)
|
|
172
|
+
return;
|
|
173
|
+
if (!("toJSON" in r)) {
|
|
174
|
+
t[o] = r;
|
|
175
|
+
const i = ae(r) ? [] : {};
|
|
176
|
+
return we(r, (s, a) => {
|
|
177
|
+
const u = n(s, o + 1);
|
|
178
|
+
!Ee(u) && (i[a] = u);
|
|
179
|
+
}), t[o] = void 0, i;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return r;
|
|
183
|
+
};
|
|
184
|
+
return n(e, 0);
|
|
185
|
+
}, Kr = q("AsyncFunction"), Wr = (e) => e && (De(e) || F(e)) && F(e.then) && F(e.catch), dn = ((e, t) => e ? setImmediate : t ? ((n, r) => (Z.addEventListener("message", ({ source: o, data: i }) => {
|
|
186
|
+
o === Z && i === n && r.length && r.shift()();
|
|
187
|
+
}, !1), (o) => {
|
|
188
|
+
r.push(o), Z.postMessage(n, "*");
|
|
189
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
190
|
+
typeof setImmediate == "function",
|
|
191
|
+
F(Z.postMessage)
|
|
192
|
+
), Gr = typeof queueMicrotask < "u" ? queueMicrotask.bind(Z) : typeof process < "u" && process.nextTick || dn, h = {
|
|
193
|
+
isArray: ae,
|
|
194
|
+
isArrayBuffer: sn,
|
|
195
|
+
isBuffer: fr,
|
|
196
|
+
isFormData: wr,
|
|
197
|
+
isArrayBufferView: dr,
|
|
198
|
+
isString: hr,
|
|
199
|
+
isNumber: an,
|
|
200
|
+
isBoolean: pr,
|
|
201
|
+
isObject: De,
|
|
202
|
+
isPlainObject: Ae,
|
|
203
|
+
isReadableStream: Rr,
|
|
204
|
+
isRequest: _r,
|
|
205
|
+
isResponse: Sr,
|
|
206
|
+
isHeaders: Or,
|
|
207
|
+
isUndefined: Ee,
|
|
208
|
+
isDate: mr,
|
|
209
|
+
isFile: gr,
|
|
210
|
+
isBlob: yr,
|
|
211
|
+
isRegExp: Br,
|
|
212
|
+
isFunction: F,
|
|
213
|
+
isStream: vr,
|
|
214
|
+
isURLSearchParams: br,
|
|
215
|
+
isTypedArray: Dr,
|
|
216
|
+
isFileList: Er,
|
|
217
|
+
forEach: we,
|
|
218
|
+
merge: Qe,
|
|
219
|
+
extend: Tr,
|
|
220
|
+
trim: Ar,
|
|
221
|
+
stripBOM: Pr,
|
|
222
|
+
inherits: Nr,
|
|
223
|
+
toFlatObject: kr,
|
|
224
|
+
kindOf: Ce,
|
|
225
|
+
kindOfTest: q,
|
|
226
|
+
endsWith: Cr,
|
|
227
|
+
toArray: xr,
|
|
228
|
+
forEachEntry: Ir,
|
|
229
|
+
matchAll: Lr,
|
|
230
|
+
isHTMLForm: $r,
|
|
231
|
+
hasOwnProperty: Ot,
|
|
232
|
+
hasOwnProp: Ot,
|
|
233
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
234
|
+
reduceDescriptors: un,
|
|
235
|
+
freezeMethods: jr,
|
|
236
|
+
toObjectSet: Fr,
|
|
237
|
+
toCamelCase: Ur,
|
|
238
|
+
noop: Vr,
|
|
239
|
+
toFiniteNumber: Mr,
|
|
240
|
+
findKey: cn,
|
|
241
|
+
global: Z,
|
|
242
|
+
isContextDefined: ln,
|
|
243
|
+
ALPHABET: fn,
|
|
244
|
+
generateString: qr,
|
|
245
|
+
isSpecCompliantForm: Hr,
|
|
246
|
+
toJSONObject: zr,
|
|
247
|
+
isAsyncFn: Kr,
|
|
248
|
+
isThenable: Wr,
|
|
249
|
+
setImmediate: dn,
|
|
250
|
+
asap: Gr
|
|
251
|
+
};
|
|
252
|
+
function S(e, t, n, r, o) {
|
|
253
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o);
|
|
254
|
+
}
|
|
255
|
+
h.inherits(S, Error, {
|
|
256
|
+
toJSON: function() {
|
|
257
|
+
return {
|
|
258
|
+
// Standard
|
|
259
|
+
message: this.message,
|
|
260
|
+
name: this.name,
|
|
261
|
+
// Microsoft
|
|
262
|
+
description: this.description,
|
|
263
|
+
number: this.number,
|
|
264
|
+
// Mozilla
|
|
265
|
+
fileName: this.fileName,
|
|
266
|
+
lineNumber: this.lineNumber,
|
|
267
|
+
columnNumber: this.columnNumber,
|
|
268
|
+
stack: this.stack,
|
|
269
|
+
// Axios
|
|
270
|
+
config: h.toJSONObject(this.config),
|
|
271
|
+
code: this.code,
|
|
272
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
const hn = S.prototype, pn = {};
|
|
277
|
+
[
|
|
278
|
+
"ERR_BAD_OPTION_VALUE",
|
|
279
|
+
"ERR_BAD_OPTION",
|
|
280
|
+
"ECONNABORTED",
|
|
281
|
+
"ETIMEDOUT",
|
|
282
|
+
"ERR_NETWORK",
|
|
283
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
284
|
+
"ERR_DEPRECATED",
|
|
285
|
+
"ERR_BAD_RESPONSE",
|
|
286
|
+
"ERR_BAD_REQUEST",
|
|
287
|
+
"ERR_CANCELED",
|
|
288
|
+
"ERR_NOT_SUPPORT",
|
|
289
|
+
"ERR_INVALID_URL"
|
|
290
|
+
// eslint-disable-next-line func-names
|
|
291
|
+
].forEach((e) => {
|
|
292
|
+
pn[e] = { value: e };
|
|
293
|
+
});
|
|
294
|
+
Object.defineProperties(S, pn);
|
|
295
|
+
Object.defineProperty(hn, "isAxiosError", { value: !0 });
|
|
296
|
+
S.from = (e, t, n, r, o, i) => {
|
|
297
|
+
const s = Object.create(hn);
|
|
298
|
+
return h.toFlatObject(e, s, function(u) {
|
|
299
|
+
return u !== Error.prototype;
|
|
300
|
+
}, (a) => a !== "isAxiosError"), S.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, i && Object.assign(s, i), s;
|
|
301
|
+
};
|
|
302
|
+
const Jr = null;
|
|
303
|
+
function Xe(e) {
|
|
304
|
+
return h.isPlainObject(e) || h.isArray(e);
|
|
305
|
+
}
|
|
306
|
+
function mn(e) {
|
|
307
|
+
return h.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
308
|
+
}
|
|
309
|
+
function Tt(e, t, n) {
|
|
310
|
+
return e ? e.concat(t).map(function(o, i) {
|
|
311
|
+
return o = mn(o), !n && i ? "[" + o + "]" : o;
|
|
312
|
+
}).join(n ? "." : "") : t;
|
|
313
|
+
}
|
|
314
|
+
function Qr(e) {
|
|
315
|
+
return h.isArray(e) && !e.some(Xe);
|
|
316
|
+
}
|
|
317
|
+
const Xr = h.toFlatObject(h, {}, null, function(t) {
|
|
318
|
+
return /^is[A-Z]/.test(t);
|
|
319
|
+
});
|
|
320
|
+
function Ie(e, t, n) {
|
|
321
|
+
if (!h.isObject(e))
|
|
322
|
+
throw new TypeError("target must be an object");
|
|
323
|
+
t = t || new FormData(), n = h.toFlatObject(n, {
|
|
324
|
+
metaTokens: !0,
|
|
325
|
+
dots: !1,
|
|
326
|
+
indexes: !1
|
|
327
|
+
}, !1, function(E, y) {
|
|
328
|
+
return !h.isUndefined(y[E]);
|
|
329
|
+
});
|
|
330
|
+
const r = n.metaTokens, o = n.visitor || c, i = n.dots, s = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && h.isSpecCompliantForm(t);
|
|
331
|
+
if (!h.isFunction(o))
|
|
332
|
+
throw new TypeError("visitor must be a function");
|
|
333
|
+
function f(g) {
|
|
334
|
+
if (g === null) return "";
|
|
335
|
+
if (h.isDate(g))
|
|
336
|
+
return g.toISOString();
|
|
337
|
+
if (!u && h.isBlob(g))
|
|
338
|
+
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
339
|
+
return h.isArrayBuffer(g) || h.isTypedArray(g) ? u && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
340
|
+
}
|
|
341
|
+
function c(g, E, y) {
|
|
342
|
+
let O = g;
|
|
343
|
+
if (g && !y && typeof g == "object") {
|
|
344
|
+
if (h.endsWith(E, "{}"))
|
|
345
|
+
E = r ? E : E.slice(0, -2), g = JSON.stringify(g);
|
|
346
|
+
else if (h.isArray(g) && Qr(g) || (h.isFileList(g) || h.endsWith(E, "[]")) && (O = h.toArray(g)))
|
|
347
|
+
return E = mn(E), O.forEach(function(w, C) {
|
|
348
|
+
!(h.isUndefined(w) || w === null) && t.append(
|
|
349
|
+
// eslint-disable-next-line no-nested-ternary
|
|
350
|
+
s === !0 ? Tt([E], C, i) : s === null ? E : E + "[]",
|
|
351
|
+
f(w)
|
|
352
|
+
);
|
|
353
|
+
}), !1;
|
|
354
|
+
}
|
|
355
|
+
return Xe(g) ? !0 : (t.append(Tt(y, E, i), f(g)), !1);
|
|
356
|
+
}
|
|
357
|
+
const l = [], d = Object.assign(Xr, {
|
|
358
|
+
defaultVisitor: c,
|
|
359
|
+
convertValue: f,
|
|
360
|
+
isVisitable: Xe
|
|
361
|
+
});
|
|
362
|
+
function m(g, E) {
|
|
363
|
+
if (!h.isUndefined(g)) {
|
|
364
|
+
if (l.indexOf(g) !== -1)
|
|
365
|
+
throw Error("Circular reference detected in " + E.join("."));
|
|
366
|
+
l.push(g), h.forEach(g, function(O, _) {
|
|
367
|
+
(!(h.isUndefined(O) || O === null) && o.call(
|
|
368
|
+
t,
|
|
369
|
+
O,
|
|
370
|
+
h.isString(_) ? _.trim() : _,
|
|
371
|
+
E,
|
|
372
|
+
d
|
|
373
|
+
)) === !0 && m(O, E ? E.concat(_) : [_]);
|
|
374
|
+
}), l.pop();
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
if (!h.isObject(e))
|
|
378
|
+
throw new TypeError("data must be an object");
|
|
379
|
+
return m(e), t;
|
|
380
|
+
}
|
|
381
|
+
function Pt(e) {
|
|
382
|
+
const t = {
|
|
383
|
+
"!": "%21",
|
|
384
|
+
"'": "%27",
|
|
385
|
+
"(": "%28",
|
|
386
|
+
")": "%29",
|
|
387
|
+
"~": "%7E",
|
|
388
|
+
"%20": "+",
|
|
389
|
+
"%00": "\0"
|
|
390
|
+
};
|
|
391
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
392
|
+
return t[r];
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
function pt(e, t) {
|
|
396
|
+
this._pairs = [], e && Ie(e, this, t);
|
|
397
|
+
}
|
|
398
|
+
const gn = pt.prototype;
|
|
399
|
+
gn.append = function(t, n) {
|
|
400
|
+
this._pairs.push([t, n]);
|
|
401
|
+
};
|
|
402
|
+
gn.toString = function(t) {
|
|
403
|
+
const n = t ? function(r) {
|
|
404
|
+
return t.call(this, r, Pt);
|
|
405
|
+
} : Pt;
|
|
406
|
+
return this._pairs.map(function(o) {
|
|
407
|
+
return n(o[0]) + "=" + n(o[1]);
|
|
408
|
+
}, "").join("&");
|
|
409
|
+
};
|
|
410
|
+
function Yr(e) {
|
|
411
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
412
|
+
}
|
|
413
|
+
function yn(e, t, n) {
|
|
414
|
+
if (!t)
|
|
415
|
+
return e;
|
|
416
|
+
const r = n && n.encode || Yr, o = n && n.serialize;
|
|
417
|
+
let i;
|
|
418
|
+
if (o ? i = o(t, n) : i = h.isURLSearchParams(t) ? t.toString() : new pt(t, n).toString(r), i) {
|
|
419
|
+
const s = e.indexOf("#");
|
|
420
|
+
s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
421
|
+
}
|
|
422
|
+
return e;
|
|
423
|
+
}
|
|
424
|
+
class Nt {
|
|
425
|
+
constructor() {
|
|
426
|
+
this.handlers = [];
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Add a new interceptor to the stack
|
|
430
|
+
*
|
|
431
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
432
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
433
|
+
*
|
|
434
|
+
* @return {Number} An ID used to remove interceptor later
|
|
435
|
+
*/
|
|
436
|
+
use(t, n, r) {
|
|
437
|
+
return this.handlers.push({
|
|
438
|
+
fulfilled: t,
|
|
439
|
+
rejected: n,
|
|
440
|
+
synchronous: r ? r.synchronous : !1,
|
|
441
|
+
runWhen: r ? r.runWhen : null
|
|
442
|
+
}), this.handlers.length - 1;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Remove an interceptor from the stack
|
|
446
|
+
*
|
|
447
|
+
* @param {Number} id The ID that was returned by `use`
|
|
448
|
+
*
|
|
449
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
450
|
+
*/
|
|
451
|
+
eject(t) {
|
|
452
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Clear all interceptors from the stack
|
|
456
|
+
*
|
|
457
|
+
* @returns {void}
|
|
458
|
+
*/
|
|
459
|
+
clear() {
|
|
460
|
+
this.handlers && (this.handlers = []);
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Iterate over all the registered interceptors
|
|
464
|
+
*
|
|
465
|
+
* This method is particularly useful for skipping over any
|
|
466
|
+
* interceptors that may have become `null` calling `eject`.
|
|
467
|
+
*
|
|
468
|
+
* @param {Function} fn The function to call for each interceptor
|
|
469
|
+
*
|
|
470
|
+
* @returns {void}
|
|
471
|
+
*/
|
|
472
|
+
forEach(t) {
|
|
473
|
+
h.forEach(this.handlers, function(r) {
|
|
474
|
+
r !== null && t(r);
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
const En = {
|
|
479
|
+
silentJSONParsing: !0,
|
|
480
|
+
forcedJSONParsing: !0,
|
|
481
|
+
clarifyTimeoutError: !1
|
|
482
|
+
}, Zr = typeof URLSearchParams < "u" ? URLSearchParams : pt, eo = typeof FormData < "u" ? FormData : null, to = typeof Blob < "u" ? Blob : null, no = {
|
|
483
|
+
isBrowser: !0,
|
|
484
|
+
classes: {
|
|
485
|
+
URLSearchParams: Zr,
|
|
486
|
+
FormData: eo,
|
|
487
|
+
Blob: to
|
|
488
|
+
},
|
|
489
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
490
|
+
}, mt = typeof window < "u" && typeof document < "u", ro = ((e) => mt && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), oo = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
491
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", so = mt && window.location.href || "http://localhost", io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
492
|
+
__proto__: null,
|
|
493
|
+
hasBrowserEnv: mt,
|
|
494
|
+
hasStandardBrowserEnv: ro,
|
|
495
|
+
hasStandardBrowserWebWorkerEnv: oo,
|
|
496
|
+
origin: so
|
|
497
|
+
}, Symbol.toStringTag, { value: "Module" })), M = {
|
|
498
|
+
...io,
|
|
499
|
+
...no
|
|
500
|
+
};
|
|
501
|
+
function ao(e, t) {
|
|
502
|
+
return Ie(e, new M.classes.URLSearchParams(), Object.assign({
|
|
503
|
+
visitor: function(n, r, o, i) {
|
|
504
|
+
return M.isNode && h.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
505
|
+
}
|
|
506
|
+
}, t));
|
|
507
|
+
}
|
|
508
|
+
function co(e) {
|
|
509
|
+
return h.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
510
|
+
}
|
|
511
|
+
function lo(e) {
|
|
512
|
+
const t = {}, n = Object.keys(e);
|
|
513
|
+
let r;
|
|
514
|
+
const o = n.length;
|
|
515
|
+
let i;
|
|
516
|
+
for (r = 0; r < o; r++)
|
|
517
|
+
i = n[r], t[i] = e[i];
|
|
518
|
+
return t;
|
|
519
|
+
}
|
|
520
|
+
function vn(e) {
|
|
521
|
+
function t(n, r, o, i) {
|
|
522
|
+
let s = n[i++];
|
|
523
|
+
if (s === "__proto__") return !0;
|
|
524
|
+
const a = Number.isFinite(+s), u = i >= n.length;
|
|
525
|
+
return s = !s && h.isArray(o) ? o.length : s, u ? (h.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !a) : ((!o[s] || !h.isObject(o[s])) && (o[s] = []), t(n, r, o[s], i) && h.isArray(o[s]) && (o[s] = lo(o[s])), !a);
|
|
526
|
+
}
|
|
527
|
+
if (h.isFormData(e) && h.isFunction(e.entries)) {
|
|
528
|
+
const n = {};
|
|
529
|
+
return h.forEachEntry(e, (r, o) => {
|
|
530
|
+
t(co(r), o, n, 0);
|
|
531
|
+
}), n;
|
|
532
|
+
}
|
|
533
|
+
return null;
|
|
534
|
+
}
|
|
535
|
+
function uo(e, t, n) {
|
|
536
|
+
if (h.isString(e))
|
|
537
|
+
try {
|
|
538
|
+
return (t || JSON.parse)(e), h.trim(e);
|
|
539
|
+
} catch (r) {
|
|
540
|
+
if (r.name !== "SyntaxError")
|
|
541
|
+
throw r;
|
|
542
|
+
}
|
|
543
|
+
return (n || JSON.stringify)(e);
|
|
544
|
+
}
|
|
545
|
+
const be = {
|
|
546
|
+
transitional: En,
|
|
547
|
+
adapter: ["xhr", "http", "fetch"],
|
|
548
|
+
transformRequest: [function(t, n) {
|
|
549
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, i = h.isObject(t);
|
|
550
|
+
if (i && h.isHTMLForm(t) && (t = new FormData(t)), h.isFormData(t))
|
|
551
|
+
return o ? JSON.stringify(vn(t)) : t;
|
|
552
|
+
if (h.isArrayBuffer(t) || h.isBuffer(t) || h.isStream(t) || h.isFile(t) || h.isBlob(t) || h.isReadableStream(t))
|
|
553
|
+
return t;
|
|
554
|
+
if (h.isArrayBufferView(t))
|
|
555
|
+
return t.buffer;
|
|
556
|
+
if (h.isURLSearchParams(t))
|
|
557
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
558
|
+
let a;
|
|
559
|
+
if (i) {
|
|
560
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
561
|
+
return ao(t, this.formSerializer).toString();
|
|
562
|
+
if ((a = h.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
563
|
+
const u = this.env && this.env.FormData;
|
|
564
|
+
return Ie(
|
|
565
|
+
a ? { "files[]": t } : t,
|
|
566
|
+
u && new u(),
|
|
567
|
+
this.formSerializer
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
return i || o ? (n.setContentType("application/json", !1), uo(t)) : t;
|
|
572
|
+
}],
|
|
573
|
+
transformResponse: [function(t) {
|
|
574
|
+
const n = this.transitional || be.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
575
|
+
if (h.isResponse(t) || h.isReadableStream(t))
|
|
576
|
+
return t;
|
|
577
|
+
if (t && h.isString(t) && (r && !this.responseType || o)) {
|
|
578
|
+
const s = !(n && n.silentJSONParsing) && o;
|
|
579
|
+
try {
|
|
580
|
+
return JSON.parse(t);
|
|
581
|
+
} catch (a) {
|
|
582
|
+
if (s)
|
|
583
|
+
throw a.name === "SyntaxError" ? S.from(a, S.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return t;
|
|
587
|
+
}],
|
|
588
|
+
/**
|
|
589
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
590
|
+
* timeout is not created.
|
|
591
|
+
*/
|
|
592
|
+
timeout: 0,
|
|
593
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
594
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
595
|
+
maxContentLength: -1,
|
|
596
|
+
maxBodyLength: -1,
|
|
597
|
+
env: {
|
|
598
|
+
FormData: M.classes.FormData,
|
|
599
|
+
Blob: M.classes.Blob
|
|
600
|
+
},
|
|
601
|
+
validateStatus: function(t) {
|
|
602
|
+
return t >= 200 && t < 300;
|
|
603
|
+
},
|
|
604
|
+
headers: {
|
|
605
|
+
common: {
|
|
606
|
+
Accept: "application/json, text/plain, */*",
|
|
607
|
+
"Content-Type": void 0
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
h.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
612
|
+
be.headers[e] = {};
|
|
613
|
+
});
|
|
614
|
+
const fo = h.toObjectSet([
|
|
615
|
+
"age",
|
|
616
|
+
"authorization",
|
|
617
|
+
"content-length",
|
|
618
|
+
"content-type",
|
|
619
|
+
"etag",
|
|
620
|
+
"expires",
|
|
621
|
+
"from",
|
|
622
|
+
"host",
|
|
623
|
+
"if-modified-since",
|
|
624
|
+
"if-unmodified-since",
|
|
625
|
+
"last-modified",
|
|
626
|
+
"location",
|
|
627
|
+
"max-forwards",
|
|
628
|
+
"proxy-authorization",
|
|
629
|
+
"referer",
|
|
630
|
+
"retry-after",
|
|
631
|
+
"user-agent"
|
|
632
|
+
]), ho = (e) => {
|
|
633
|
+
const t = {};
|
|
634
|
+
let n, r, o;
|
|
635
|
+
return e && e.split(`
|
|
636
|
+
`).forEach(function(s) {
|
|
637
|
+
o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && fo[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
638
|
+
}), t;
|
|
639
|
+
}, kt = Symbol("internals");
|
|
640
|
+
function de(e) {
|
|
641
|
+
return e && String(e).trim().toLowerCase();
|
|
642
|
+
}
|
|
643
|
+
function Te(e) {
|
|
644
|
+
return e === !1 || e == null ? e : h.isArray(e) ? e.map(Te) : String(e);
|
|
645
|
+
}
|
|
646
|
+
function po(e) {
|
|
647
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
648
|
+
let r;
|
|
649
|
+
for (; r = n.exec(e); )
|
|
650
|
+
t[r[1]] = r[2];
|
|
651
|
+
return t;
|
|
652
|
+
}
|
|
653
|
+
const mo = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
654
|
+
function He(e, t, n, r, o) {
|
|
655
|
+
if (h.isFunction(r))
|
|
656
|
+
return r.call(this, t, n);
|
|
657
|
+
if (o && (t = n), !!h.isString(t)) {
|
|
658
|
+
if (h.isString(r))
|
|
659
|
+
return t.indexOf(r) !== -1;
|
|
660
|
+
if (h.isRegExp(r))
|
|
661
|
+
return r.test(t);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
function go(e) {
|
|
665
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
666
|
+
}
|
|
667
|
+
function yo(e, t) {
|
|
668
|
+
const n = h.toCamelCase(" " + t);
|
|
669
|
+
["get", "set", "has"].forEach((r) => {
|
|
670
|
+
Object.defineProperty(e, r + n, {
|
|
671
|
+
value: function(o, i, s) {
|
|
672
|
+
return this[r].call(this, t, o, i, s);
|
|
673
|
+
},
|
|
674
|
+
configurable: !0
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
class j {
|
|
679
|
+
constructor(t) {
|
|
680
|
+
t && this.set(t);
|
|
681
|
+
}
|
|
682
|
+
set(t, n, r) {
|
|
683
|
+
const o = this;
|
|
684
|
+
function i(a, u, f) {
|
|
685
|
+
const c = de(u);
|
|
686
|
+
if (!c)
|
|
687
|
+
throw new Error("header name must be a non-empty string");
|
|
688
|
+
const l = h.findKey(o, c);
|
|
689
|
+
(!l || o[l] === void 0 || f === !0 || f === void 0 && o[l] !== !1) && (o[l || u] = Te(a));
|
|
690
|
+
}
|
|
691
|
+
const s = (a, u) => h.forEach(a, (f, c) => i(f, c, u));
|
|
692
|
+
if (h.isPlainObject(t) || t instanceof this.constructor)
|
|
693
|
+
s(t, n);
|
|
694
|
+
else if (h.isString(t) && (t = t.trim()) && !mo(t))
|
|
695
|
+
s(ho(t), n);
|
|
696
|
+
else if (h.isHeaders(t))
|
|
697
|
+
for (const [a, u] of t.entries())
|
|
698
|
+
i(u, a, r);
|
|
699
|
+
else
|
|
700
|
+
t != null && i(n, t, r);
|
|
701
|
+
return this;
|
|
702
|
+
}
|
|
703
|
+
get(t, n) {
|
|
704
|
+
if (t = de(t), t) {
|
|
705
|
+
const r = h.findKey(this, t);
|
|
706
|
+
if (r) {
|
|
707
|
+
const o = this[r];
|
|
708
|
+
if (!n)
|
|
709
|
+
return o;
|
|
710
|
+
if (n === !0)
|
|
711
|
+
return po(o);
|
|
712
|
+
if (h.isFunction(n))
|
|
713
|
+
return n.call(this, o, r);
|
|
714
|
+
if (h.isRegExp(n))
|
|
715
|
+
return n.exec(o);
|
|
716
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
has(t, n) {
|
|
721
|
+
if (t = de(t), t) {
|
|
722
|
+
const r = h.findKey(this, t);
|
|
723
|
+
return !!(r && this[r] !== void 0 && (!n || He(this, this[r], r, n)));
|
|
724
|
+
}
|
|
725
|
+
return !1;
|
|
726
|
+
}
|
|
727
|
+
delete(t, n) {
|
|
728
|
+
const r = this;
|
|
729
|
+
let o = !1;
|
|
730
|
+
function i(s) {
|
|
731
|
+
if (s = de(s), s) {
|
|
732
|
+
const a = h.findKey(r, s);
|
|
733
|
+
a && (!n || He(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
return h.isArray(t) ? t.forEach(i) : i(t), o;
|
|
737
|
+
}
|
|
738
|
+
clear(t) {
|
|
739
|
+
const n = Object.keys(this);
|
|
740
|
+
let r = n.length, o = !1;
|
|
741
|
+
for (; r--; ) {
|
|
742
|
+
const i = n[r];
|
|
743
|
+
(!t || He(this, this[i], i, t, !0)) && (delete this[i], o = !0);
|
|
744
|
+
}
|
|
745
|
+
return o;
|
|
746
|
+
}
|
|
747
|
+
normalize(t) {
|
|
748
|
+
const n = this, r = {};
|
|
749
|
+
return h.forEach(this, (o, i) => {
|
|
750
|
+
const s = h.findKey(r, i);
|
|
751
|
+
if (s) {
|
|
752
|
+
n[s] = Te(o), delete n[i];
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
const a = t ? go(i) : String(i).trim();
|
|
756
|
+
a !== i && delete n[i], n[a] = Te(o), r[a] = !0;
|
|
757
|
+
}), this;
|
|
758
|
+
}
|
|
759
|
+
concat(...t) {
|
|
760
|
+
return this.constructor.concat(this, ...t);
|
|
761
|
+
}
|
|
762
|
+
toJSON(t) {
|
|
763
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
764
|
+
return h.forEach(this, (r, o) => {
|
|
765
|
+
r != null && r !== !1 && (n[o] = t && h.isArray(r) ? r.join(", ") : r);
|
|
766
|
+
}), n;
|
|
767
|
+
}
|
|
768
|
+
[Symbol.iterator]() {
|
|
769
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
770
|
+
}
|
|
771
|
+
toString() {
|
|
772
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
773
|
+
`);
|
|
774
|
+
}
|
|
775
|
+
get [Symbol.toStringTag]() {
|
|
776
|
+
return "AxiosHeaders";
|
|
777
|
+
}
|
|
778
|
+
static from(t) {
|
|
779
|
+
return t instanceof this ? t : new this(t);
|
|
780
|
+
}
|
|
781
|
+
static concat(t, ...n) {
|
|
782
|
+
const r = new this(t);
|
|
783
|
+
return n.forEach((o) => r.set(o)), r;
|
|
784
|
+
}
|
|
785
|
+
static accessor(t) {
|
|
786
|
+
const r = (this[kt] = this[kt] = {
|
|
787
|
+
accessors: {}
|
|
788
|
+
}).accessors, o = this.prototype;
|
|
789
|
+
function i(s) {
|
|
790
|
+
const a = de(s);
|
|
791
|
+
r[a] || (yo(o, s), r[a] = !0);
|
|
792
|
+
}
|
|
793
|
+
return h.isArray(t) ? t.forEach(i) : i(t), this;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
j.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
797
|
+
h.reduceDescriptors(j.prototype, ({ value: e }, t) => {
|
|
798
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
799
|
+
return {
|
|
800
|
+
get: () => e,
|
|
801
|
+
set(r) {
|
|
802
|
+
this[n] = r;
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
});
|
|
806
|
+
h.freezeMethods(j);
|
|
807
|
+
function ze(e, t) {
|
|
808
|
+
const n = this || be, r = t || n, o = j.from(r.headers);
|
|
809
|
+
let i = r.data;
|
|
810
|
+
return h.forEach(e, function(a) {
|
|
811
|
+
i = a.call(n, i, o.normalize(), t ? t.status : void 0);
|
|
812
|
+
}), o.normalize(), i;
|
|
813
|
+
}
|
|
814
|
+
function wn(e) {
|
|
815
|
+
return !!(e && e.__CANCEL__);
|
|
816
|
+
}
|
|
817
|
+
function ce(e, t, n) {
|
|
818
|
+
S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
819
|
+
}
|
|
820
|
+
h.inherits(ce, S, {
|
|
821
|
+
__CANCEL__: !0
|
|
822
|
+
});
|
|
823
|
+
function bn(e, t, n) {
|
|
824
|
+
const r = n.config.validateStatus;
|
|
825
|
+
!n.status || !r || r(n.status) ? e(n) : t(new S(
|
|
826
|
+
"Request failed with status code " + n.status,
|
|
827
|
+
[S.ERR_BAD_REQUEST, S.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
828
|
+
n.config,
|
|
829
|
+
n.request,
|
|
830
|
+
n
|
|
831
|
+
));
|
|
832
|
+
}
|
|
833
|
+
function Eo(e) {
|
|
834
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
835
|
+
return t && t[1] || "";
|
|
836
|
+
}
|
|
837
|
+
function vo(e, t) {
|
|
838
|
+
e = e || 10;
|
|
839
|
+
const n = new Array(e), r = new Array(e);
|
|
840
|
+
let o = 0, i = 0, s;
|
|
841
|
+
return t = t !== void 0 ? t : 1e3, function(u) {
|
|
842
|
+
const f = Date.now(), c = r[i];
|
|
843
|
+
s || (s = f), n[o] = u, r[o] = f;
|
|
844
|
+
let l = i, d = 0;
|
|
845
|
+
for (; l !== o; )
|
|
846
|
+
d += n[l++], l = l % e;
|
|
847
|
+
if (o = (o + 1) % e, o === i && (i = (i + 1) % e), f - s < t)
|
|
848
|
+
return;
|
|
849
|
+
const m = c && f - c;
|
|
850
|
+
return m ? Math.round(d * 1e3 / m) : void 0;
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
function wo(e, t) {
|
|
854
|
+
let n = 0, r = 1e3 / t, o, i;
|
|
855
|
+
const s = (f, c = Date.now()) => {
|
|
856
|
+
n = c, o = null, i && (clearTimeout(i), i = null), e.apply(null, f);
|
|
857
|
+
};
|
|
858
|
+
return [(...f) => {
|
|
859
|
+
const c = Date.now(), l = c - n;
|
|
860
|
+
l >= r ? s(f, c) : (o = f, i || (i = setTimeout(() => {
|
|
861
|
+
i = null, s(o);
|
|
862
|
+
}, r - l)));
|
|
863
|
+
}, () => o && s(o)];
|
|
864
|
+
}
|
|
865
|
+
const Pe = (e, t, n = 3) => {
|
|
866
|
+
let r = 0;
|
|
867
|
+
const o = vo(50, 250);
|
|
868
|
+
return wo((i) => {
|
|
869
|
+
const s = i.loaded, a = i.lengthComputable ? i.total : void 0, u = s - r, f = o(u), c = s <= a;
|
|
870
|
+
r = s;
|
|
871
|
+
const l = {
|
|
872
|
+
loaded: s,
|
|
873
|
+
total: a,
|
|
874
|
+
progress: a ? s / a : void 0,
|
|
875
|
+
bytes: u,
|
|
876
|
+
rate: f || void 0,
|
|
877
|
+
estimated: f && a && c ? (a - s) / f : void 0,
|
|
878
|
+
event: i,
|
|
879
|
+
lengthComputable: a != null,
|
|
880
|
+
[t ? "download" : "upload"]: !0
|
|
881
|
+
};
|
|
882
|
+
e(l);
|
|
883
|
+
}, n);
|
|
884
|
+
}, Ct = (e, t) => {
|
|
885
|
+
const n = e != null;
|
|
886
|
+
return [(r) => t[0]({
|
|
887
|
+
lengthComputable: n,
|
|
888
|
+
total: e,
|
|
889
|
+
loaded: r
|
|
890
|
+
}), t[1]];
|
|
891
|
+
}, xt = (e) => (...t) => h.asap(() => e(...t)), bo = M.hasStandardBrowserEnv ? (
|
|
892
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
893
|
+
// whether the request URL is of the same origin as current location.
|
|
894
|
+
function() {
|
|
895
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
896
|
+
let r;
|
|
897
|
+
function o(i) {
|
|
898
|
+
let s = i;
|
|
899
|
+
return t && (n.setAttribute("href", s), s = n.href), n.setAttribute("href", s), {
|
|
900
|
+
href: n.href,
|
|
901
|
+
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
902
|
+
host: n.host,
|
|
903
|
+
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
904
|
+
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
905
|
+
hostname: n.hostname,
|
|
906
|
+
port: n.port,
|
|
907
|
+
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
return r = o(window.location.href), function(s) {
|
|
911
|
+
const a = h.isString(s) ? o(s) : s;
|
|
912
|
+
return a.protocol === r.protocol && a.host === r.host;
|
|
913
|
+
};
|
|
914
|
+
}()
|
|
915
|
+
) : (
|
|
916
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
917
|
+
/* @__PURE__ */ function() {
|
|
918
|
+
return function() {
|
|
919
|
+
return !0;
|
|
920
|
+
};
|
|
921
|
+
}()
|
|
922
|
+
), Ro = M.hasStandardBrowserEnv ? (
|
|
923
|
+
// Standard browser envs support document.cookie
|
|
924
|
+
{
|
|
925
|
+
write(e, t, n, r, o, i) {
|
|
926
|
+
const s = [e + "=" + encodeURIComponent(t)];
|
|
927
|
+
h.isNumber(n) && s.push("expires=" + new Date(n).toGMTString()), h.isString(r) && s.push("path=" + r), h.isString(o) && s.push("domain=" + o), i === !0 && s.push("secure"), document.cookie = s.join("; ");
|
|
928
|
+
},
|
|
929
|
+
read(e) {
|
|
930
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
931
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
932
|
+
},
|
|
933
|
+
remove(e) {
|
|
934
|
+
this.write(e, "", Date.now() - 864e5);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
) : (
|
|
938
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
939
|
+
{
|
|
940
|
+
write() {
|
|
941
|
+
},
|
|
942
|
+
read() {
|
|
943
|
+
return null;
|
|
944
|
+
},
|
|
945
|
+
remove() {
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
);
|
|
949
|
+
function _o(e) {
|
|
950
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
951
|
+
}
|
|
952
|
+
function So(e, t) {
|
|
953
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
954
|
+
}
|
|
955
|
+
function Rn(e, t) {
|
|
956
|
+
return e && !_o(t) ? So(e, t) : t;
|
|
957
|
+
}
|
|
958
|
+
const Dt = (e) => e instanceof j ? { ...e } : e;
|
|
959
|
+
function te(e, t) {
|
|
960
|
+
t = t || {};
|
|
961
|
+
const n = {};
|
|
962
|
+
function r(f, c, l) {
|
|
963
|
+
return h.isPlainObject(f) && h.isPlainObject(c) ? h.merge.call({ caseless: l }, f, c) : h.isPlainObject(c) ? h.merge({}, c) : h.isArray(c) ? c.slice() : c;
|
|
964
|
+
}
|
|
965
|
+
function o(f, c, l) {
|
|
966
|
+
if (h.isUndefined(c)) {
|
|
967
|
+
if (!h.isUndefined(f))
|
|
968
|
+
return r(void 0, f, l);
|
|
969
|
+
} else return r(f, c, l);
|
|
970
|
+
}
|
|
971
|
+
function i(f, c) {
|
|
972
|
+
if (!h.isUndefined(c))
|
|
973
|
+
return r(void 0, c);
|
|
974
|
+
}
|
|
975
|
+
function s(f, c) {
|
|
976
|
+
if (h.isUndefined(c)) {
|
|
977
|
+
if (!h.isUndefined(f))
|
|
978
|
+
return r(void 0, f);
|
|
979
|
+
} else return r(void 0, c);
|
|
980
|
+
}
|
|
981
|
+
function a(f, c, l) {
|
|
982
|
+
if (l in t)
|
|
983
|
+
return r(f, c);
|
|
984
|
+
if (l in e)
|
|
985
|
+
return r(void 0, f);
|
|
986
|
+
}
|
|
987
|
+
const u = {
|
|
988
|
+
url: i,
|
|
989
|
+
method: i,
|
|
990
|
+
data: i,
|
|
991
|
+
baseURL: s,
|
|
992
|
+
transformRequest: s,
|
|
993
|
+
transformResponse: s,
|
|
994
|
+
paramsSerializer: s,
|
|
995
|
+
timeout: s,
|
|
996
|
+
timeoutMessage: s,
|
|
997
|
+
withCredentials: s,
|
|
998
|
+
withXSRFToken: s,
|
|
999
|
+
adapter: s,
|
|
1000
|
+
responseType: s,
|
|
1001
|
+
xsrfCookieName: s,
|
|
1002
|
+
xsrfHeaderName: s,
|
|
1003
|
+
onUploadProgress: s,
|
|
1004
|
+
onDownloadProgress: s,
|
|
1005
|
+
decompress: s,
|
|
1006
|
+
maxContentLength: s,
|
|
1007
|
+
maxBodyLength: s,
|
|
1008
|
+
beforeRedirect: s,
|
|
1009
|
+
transport: s,
|
|
1010
|
+
httpAgent: s,
|
|
1011
|
+
httpsAgent: s,
|
|
1012
|
+
cancelToken: s,
|
|
1013
|
+
socketPath: s,
|
|
1014
|
+
responseEncoding: s,
|
|
1015
|
+
validateStatus: a,
|
|
1016
|
+
headers: (f, c) => o(Dt(f), Dt(c), !0)
|
|
1017
|
+
};
|
|
1018
|
+
return h.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
|
|
1019
|
+
const l = u[c] || o, d = l(e[c], t[c], c);
|
|
1020
|
+
h.isUndefined(d) && l !== a || (n[c] = d);
|
|
1021
|
+
}), n;
|
|
1022
|
+
}
|
|
1023
|
+
const _n = (e) => {
|
|
1024
|
+
const t = te({}, e);
|
|
1025
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: i, headers: s, auth: a } = t;
|
|
1026
|
+
t.headers = s = j.from(s), t.url = yn(Rn(t.baseURL, t.url), e.params, e.paramsSerializer), a && s.set(
|
|
1027
|
+
"Authorization",
|
|
1028
|
+
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1029
|
+
);
|
|
1030
|
+
let u;
|
|
1031
|
+
if (h.isFormData(n)) {
|
|
1032
|
+
if (M.hasStandardBrowserEnv || M.hasStandardBrowserWebWorkerEnv)
|
|
1033
|
+
s.setContentType(void 0);
|
|
1034
|
+
else if ((u = s.getContentType()) !== !1) {
|
|
1035
|
+
const [f, ...c] = u ? u.split(";").map((l) => l.trim()).filter(Boolean) : [];
|
|
1036
|
+
s.setContentType([f || "multipart/form-data", ...c].join("; "));
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
if (M.hasStandardBrowserEnv && (r && h.isFunction(r) && (r = r(t)), r || r !== !1 && bo(t.url))) {
|
|
1040
|
+
const f = o && i && Ro.read(i);
|
|
1041
|
+
f && s.set(o, f);
|
|
1042
|
+
}
|
|
1043
|
+
return t;
|
|
1044
|
+
}, Oo = typeof XMLHttpRequest < "u", Ao = Oo && function(e) {
|
|
1045
|
+
return new Promise(function(n, r) {
|
|
1046
|
+
const o = _n(e);
|
|
1047
|
+
let i = o.data;
|
|
1048
|
+
const s = j.from(o.headers).normalize();
|
|
1049
|
+
let { responseType: a, onUploadProgress: u, onDownloadProgress: f } = o, c, l, d, m, g;
|
|
1050
|
+
function E() {
|
|
1051
|
+
m && m(), g && g(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
|
|
1052
|
+
}
|
|
1053
|
+
let y = new XMLHttpRequest();
|
|
1054
|
+
y.open(o.method.toUpperCase(), o.url, !0), y.timeout = o.timeout;
|
|
1055
|
+
function O() {
|
|
1056
|
+
if (!y)
|
|
1057
|
+
return;
|
|
1058
|
+
const w = j.from(
|
|
1059
|
+
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
1060
|
+
), U = {
|
|
1061
|
+
data: !a || a === "text" || a === "json" ? y.responseText : y.response,
|
|
1062
|
+
status: y.status,
|
|
1063
|
+
statusText: y.statusText,
|
|
1064
|
+
headers: w,
|
|
1065
|
+
config: e,
|
|
1066
|
+
request: y
|
|
1067
|
+
};
|
|
1068
|
+
bn(function(x) {
|
|
1069
|
+
n(x), E();
|
|
1070
|
+
}, function(x) {
|
|
1071
|
+
r(x), E();
|
|
1072
|
+
}, U), y = null;
|
|
1073
|
+
}
|
|
1074
|
+
"onloadend" in y ? y.onloadend = O : y.onreadystatechange = function() {
|
|
1075
|
+
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(O);
|
|
1076
|
+
}, y.onabort = function() {
|
|
1077
|
+
y && (r(new S("Request aborted", S.ECONNABORTED, e, y)), y = null);
|
|
1078
|
+
}, y.onerror = function() {
|
|
1079
|
+
r(new S("Network Error", S.ERR_NETWORK, e, y)), y = null;
|
|
1080
|
+
}, y.ontimeout = function() {
|
|
1081
|
+
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1082
|
+
const U = o.transitional || En;
|
|
1083
|
+
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new S(
|
|
1084
|
+
C,
|
|
1085
|
+
U.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1086
|
+
e,
|
|
1087
|
+
y
|
|
1088
|
+
)), y = null;
|
|
1089
|
+
}, i === void 0 && s.setContentType(null), "setRequestHeader" in y && h.forEach(s.toJSON(), function(C, U) {
|
|
1090
|
+
y.setRequestHeader(U, C);
|
|
1091
|
+
}), h.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), a && a !== "json" && (y.responseType = o.responseType), f && ([d, g] = Pe(f, !0), y.addEventListener("progress", d)), u && y.upload && ([l, m] = Pe(u), y.upload.addEventListener("progress", l), y.upload.addEventListener("loadend", m)), (o.cancelToken || o.signal) && (c = (w) => {
|
|
1092
|
+
y && (r(!w || w.type ? new ce(null, e, y) : w), y.abort(), y = null);
|
|
1093
|
+
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
|
|
1094
|
+
const _ = Eo(o.url);
|
|
1095
|
+
if (_ && M.protocols.indexOf(_) === -1) {
|
|
1096
|
+
r(new S("Unsupported protocol " + _ + ":", S.ERR_BAD_REQUEST, e));
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
y.send(i || null);
|
|
1100
|
+
});
|
|
1101
|
+
}, To = (e, t) => {
|
|
1102
|
+
let n = new AbortController(), r;
|
|
1103
|
+
const o = function(u) {
|
|
1104
|
+
if (!r) {
|
|
1105
|
+
r = !0, s();
|
|
1106
|
+
const f = u instanceof Error ? u : this.reason;
|
|
1107
|
+
n.abort(f instanceof S ? f : new ce(f instanceof Error ? f.message : f));
|
|
1108
|
+
}
|
|
1109
|
+
};
|
|
1110
|
+
let i = t && setTimeout(() => {
|
|
1111
|
+
o(new S(`timeout ${t} of ms exceeded`, S.ETIMEDOUT));
|
|
1112
|
+
}, t);
|
|
1113
|
+
const s = () => {
|
|
1114
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1115
|
+
u && (u.removeEventListener ? u.removeEventListener("abort", o) : u.unsubscribe(o));
|
|
1116
|
+
}), e = null);
|
|
1117
|
+
};
|
|
1118
|
+
e.forEach((u) => u && u.addEventListener && u.addEventListener("abort", o));
|
|
1119
|
+
const { signal: a } = n;
|
|
1120
|
+
return a.unsubscribe = s, [a, () => {
|
|
1121
|
+
i && clearTimeout(i), i = null;
|
|
1122
|
+
}];
|
|
1123
|
+
}, Po = function* (e, t) {
|
|
1124
|
+
let n = e.byteLength;
|
|
1125
|
+
if (!t || n < t) {
|
|
1126
|
+
yield e;
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1129
|
+
let r = 0, o;
|
|
1130
|
+
for (; r < n; )
|
|
1131
|
+
o = r + t, yield e.slice(r, o), r = o;
|
|
1132
|
+
}, No = async function* (e, t, n) {
|
|
1133
|
+
for await (const r of e)
|
|
1134
|
+
yield* Po(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1135
|
+
}, It = (e, t, n, r, o) => {
|
|
1136
|
+
const i = No(e, t, o);
|
|
1137
|
+
let s = 0, a, u = (f) => {
|
|
1138
|
+
a || (a = !0, r && r(f));
|
|
1139
|
+
};
|
|
1140
|
+
return new ReadableStream({
|
|
1141
|
+
async pull(f) {
|
|
1142
|
+
try {
|
|
1143
|
+
const { done: c, value: l } = await i.next();
|
|
1144
|
+
if (c) {
|
|
1145
|
+
u(), f.close();
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
let d = l.byteLength;
|
|
1149
|
+
if (n) {
|
|
1150
|
+
let m = s += d;
|
|
1151
|
+
n(m);
|
|
1152
|
+
}
|
|
1153
|
+
f.enqueue(new Uint8Array(l));
|
|
1154
|
+
} catch (c) {
|
|
1155
|
+
throw u(c), c;
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
cancel(f) {
|
|
1159
|
+
return u(f), i.return();
|
|
1160
|
+
}
|
|
1161
|
+
}, {
|
|
1162
|
+
highWaterMark: 2
|
|
1163
|
+
});
|
|
1164
|
+
}, Le = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Sn = Le && typeof ReadableStream == "function", Ye = Le && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), On = (e, ...t) => {
|
|
1165
|
+
try {
|
|
1166
|
+
return !!e(...t);
|
|
1167
|
+
} catch {
|
|
1168
|
+
return !1;
|
|
1169
|
+
}
|
|
1170
|
+
}, ko = Sn && On(() => {
|
|
1171
|
+
let e = !1;
|
|
1172
|
+
const t = new Request(M.origin, {
|
|
1173
|
+
body: new ReadableStream(),
|
|
1174
|
+
method: "POST",
|
|
1175
|
+
get duplex() {
|
|
1176
|
+
return e = !0, "half";
|
|
1177
|
+
}
|
|
1178
|
+
}).headers.has("Content-Type");
|
|
1179
|
+
return e && !t;
|
|
1180
|
+
}), Lt = 64 * 1024, Ze = Sn && On(() => h.isReadableStream(new Response("").body)), Ne = {
|
|
1181
|
+
stream: Ze && ((e) => e.body)
|
|
1182
|
+
};
|
|
1183
|
+
Le && ((e) => {
|
|
1184
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1185
|
+
!Ne[t] && (Ne[t] = h.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1186
|
+
throw new S(`Response type '${t}' is not supported`, S.ERR_NOT_SUPPORT, r);
|
|
1187
|
+
});
|
|
1188
|
+
});
|
|
1189
|
+
})(new Response());
|
|
1190
|
+
const Co = async (e) => {
|
|
1191
|
+
if (e == null)
|
|
1192
|
+
return 0;
|
|
1193
|
+
if (h.isBlob(e))
|
|
1194
|
+
return e.size;
|
|
1195
|
+
if (h.isSpecCompliantForm(e))
|
|
1196
|
+
return (await new Request(e).arrayBuffer()).byteLength;
|
|
1197
|
+
if (h.isArrayBufferView(e) || h.isArrayBuffer(e))
|
|
1198
|
+
return e.byteLength;
|
|
1199
|
+
if (h.isURLSearchParams(e) && (e = e + ""), h.isString(e))
|
|
1200
|
+
return (await Ye(e)).byteLength;
|
|
1201
|
+
}, xo = async (e, t) => {
|
|
1202
|
+
const n = h.toFiniteNumber(e.getContentLength());
|
|
1203
|
+
return n ?? Co(t);
|
|
1204
|
+
}, Do = Le && (async (e) => {
|
|
1205
|
+
let {
|
|
1206
|
+
url: t,
|
|
1207
|
+
method: n,
|
|
1208
|
+
data: r,
|
|
1209
|
+
signal: o,
|
|
1210
|
+
cancelToken: i,
|
|
1211
|
+
timeout: s,
|
|
1212
|
+
onDownloadProgress: a,
|
|
1213
|
+
onUploadProgress: u,
|
|
1214
|
+
responseType: f,
|
|
1215
|
+
headers: c,
|
|
1216
|
+
withCredentials: l = "same-origin",
|
|
1217
|
+
fetchOptions: d
|
|
1218
|
+
} = _n(e);
|
|
1219
|
+
f = f ? (f + "").toLowerCase() : "text";
|
|
1220
|
+
let [m, g] = o || i || s ? To([o, i], s) : [], E, y;
|
|
1221
|
+
const O = () => {
|
|
1222
|
+
!E && setTimeout(() => {
|
|
1223
|
+
m && m.unsubscribe();
|
|
1224
|
+
}), E = !0;
|
|
1225
|
+
};
|
|
1226
|
+
let _;
|
|
1227
|
+
try {
|
|
1228
|
+
if (u && ko && n !== "get" && n !== "head" && (_ = await xo(c, r)) !== 0) {
|
|
1229
|
+
let $ = new Request(t, {
|
|
1230
|
+
method: "POST",
|
|
1231
|
+
body: r,
|
|
1232
|
+
duplex: "half"
|
|
1233
|
+
}), x;
|
|
1234
|
+
if (h.isFormData(r) && (x = $.headers.get("content-type")) && c.setContentType(x), $.body) {
|
|
1235
|
+
const [le, W] = Ct(
|
|
1236
|
+
_,
|
|
1237
|
+
Pe(xt(u))
|
|
1238
|
+
);
|
|
1239
|
+
r = It($.body, Lt, le, W, Ye);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
h.isString(l) || (l = l ? "include" : "omit"), y = new Request(t, {
|
|
1243
|
+
...d,
|
|
1244
|
+
signal: m,
|
|
1245
|
+
method: n.toUpperCase(),
|
|
1246
|
+
headers: c.normalize().toJSON(),
|
|
1247
|
+
body: r,
|
|
1248
|
+
duplex: "half",
|
|
1249
|
+
credentials: l
|
|
1250
|
+
});
|
|
1251
|
+
let w = await fetch(y);
|
|
1252
|
+
const C = Ze && (f === "stream" || f === "response");
|
|
1253
|
+
if (Ze && (a || C)) {
|
|
1254
|
+
const $ = {};
|
|
1255
|
+
["status", "statusText", "headers"].forEach((ue) => {
|
|
1256
|
+
$[ue] = w[ue];
|
|
1257
|
+
});
|
|
1258
|
+
const x = h.toFiniteNumber(w.headers.get("content-length")), [le, W] = a && Ct(
|
|
1259
|
+
x,
|
|
1260
|
+
Pe(xt(a), !0)
|
|
1261
|
+
) || [];
|
|
1262
|
+
w = new Response(
|
|
1263
|
+
It(w.body, Lt, le, () => {
|
|
1264
|
+
W && W(), C && O();
|
|
1265
|
+
}, Ye),
|
|
1266
|
+
$
|
|
1267
|
+
);
|
|
1268
|
+
}
|
|
1269
|
+
f = f || "text";
|
|
1270
|
+
let U = await Ne[h.findKey(Ne, f) || "text"](w, e);
|
|
1271
|
+
return !C && O(), g && g(), await new Promise(($, x) => {
|
|
1272
|
+
bn($, x, {
|
|
1273
|
+
data: U,
|
|
1274
|
+
headers: j.from(w.headers),
|
|
1275
|
+
status: w.status,
|
|
1276
|
+
statusText: w.statusText,
|
|
1277
|
+
config: e,
|
|
1278
|
+
request: y
|
|
1279
|
+
});
|
|
1280
|
+
});
|
|
1281
|
+
} catch (w) {
|
|
1282
|
+
throw O(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1283
|
+
new S("Network Error", S.ERR_NETWORK, e, y),
|
|
1284
|
+
{
|
|
1285
|
+
cause: w.cause || w
|
|
1286
|
+
}
|
|
1287
|
+
) : S.from(w, w && w.code, e, y);
|
|
1288
|
+
}
|
|
1289
|
+
}), et = {
|
|
1290
|
+
http: Jr,
|
|
1291
|
+
xhr: Ao,
|
|
1292
|
+
fetch: Do
|
|
1293
|
+
};
|
|
1294
|
+
h.forEach(et, (e, t) => {
|
|
1295
|
+
if (e) {
|
|
1296
|
+
try {
|
|
1297
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1298
|
+
} catch {
|
|
1299
|
+
}
|
|
1300
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1301
|
+
}
|
|
1302
|
+
});
|
|
1303
|
+
const $t = (e) => `- ${e}`, Io = (e) => h.isFunction(e) || e === null || e === !1, An = {
|
|
1304
|
+
getAdapter: (e) => {
|
|
1305
|
+
e = h.isArray(e) ? e : [e];
|
|
1306
|
+
const { length: t } = e;
|
|
1307
|
+
let n, r;
|
|
1308
|
+
const o = {};
|
|
1309
|
+
for (let i = 0; i < t; i++) {
|
|
1310
|
+
n = e[i];
|
|
1311
|
+
let s;
|
|
1312
|
+
if (r = n, !Io(n) && (r = et[(s = String(n)).toLowerCase()], r === void 0))
|
|
1313
|
+
throw new S(`Unknown adapter '${s}'`);
|
|
1314
|
+
if (r)
|
|
1315
|
+
break;
|
|
1316
|
+
o[s || "#" + i] = r;
|
|
1317
|
+
}
|
|
1318
|
+
if (!r) {
|
|
1319
|
+
const i = Object.entries(o).map(
|
|
1320
|
+
([a, u]) => `adapter ${a} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1321
|
+
);
|
|
1322
|
+
let s = t ? i.length > 1 ? `since :
|
|
1323
|
+
` + i.map($t).join(`
|
|
1324
|
+
`) : " " + $t(i[0]) : "as no adapter specified";
|
|
1325
|
+
throw new S(
|
|
1326
|
+
"There is no suitable adapter to dispatch the request " + s,
|
|
1327
|
+
"ERR_NOT_SUPPORT"
|
|
1328
|
+
);
|
|
1329
|
+
}
|
|
1330
|
+
return r;
|
|
1331
|
+
},
|
|
1332
|
+
adapters: et
|
|
1333
|
+
};
|
|
1334
|
+
function Ke(e) {
|
|
1335
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1336
|
+
throw new ce(null, e);
|
|
1337
|
+
}
|
|
1338
|
+
function Ut(e) {
|
|
1339
|
+
return Ke(e), e.headers = j.from(e.headers), e.data = ze.call(
|
|
1340
|
+
e,
|
|
1341
|
+
e.transformRequest
|
|
1342
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(e.adapter || be.adapter)(e).then(function(r) {
|
|
1343
|
+
return Ke(e), r.data = ze.call(
|
|
1344
|
+
e,
|
|
1345
|
+
e.transformResponse,
|
|
1346
|
+
r
|
|
1347
|
+
), r.headers = j.from(r.headers), r;
|
|
1348
|
+
}, function(r) {
|
|
1349
|
+
return wn(r) || (Ke(e), r && r.response && (r.response.data = ze.call(
|
|
1350
|
+
e,
|
|
1351
|
+
e.transformResponse,
|
|
1352
|
+
r.response
|
|
1353
|
+
), r.response.headers = j.from(r.response.headers))), Promise.reject(r);
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
const Tn = "1.7.3", gt = {};
|
|
1357
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1358
|
+
gt[e] = function(r) {
|
|
1359
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1360
|
+
};
|
|
1361
|
+
});
|
|
1362
|
+
const Bt = {};
|
|
1363
|
+
gt.transitional = function(t, n, r) {
|
|
1364
|
+
function o(i, s) {
|
|
1365
|
+
return "[Axios v" + Tn + "] Transitional option '" + i + "'" + s + (r ? ". " + r : "");
|
|
1366
|
+
}
|
|
1367
|
+
return (i, s, a) => {
|
|
1368
|
+
if (t === !1)
|
|
1369
|
+
throw new S(
|
|
1370
|
+
o(s, " has been removed" + (n ? " in " + n : "")),
|
|
1371
|
+
S.ERR_DEPRECATED
|
|
1372
|
+
);
|
|
1373
|
+
return n && !Bt[s] && (Bt[s] = !0, console.warn(
|
|
1374
|
+
o(
|
|
1375
|
+
s,
|
|
1376
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1377
|
+
)
|
|
1378
|
+
)), t ? t(i, s, a) : !0;
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
function Lo(e, t, n) {
|
|
1382
|
+
if (typeof e != "object")
|
|
1383
|
+
throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
|
|
1384
|
+
const r = Object.keys(e);
|
|
1385
|
+
let o = r.length;
|
|
1386
|
+
for (; o-- > 0; ) {
|
|
1387
|
+
const i = r[o], s = t[i];
|
|
1388
|
+
if (s) {
|
|
1389
|
+
const a = e[i], u = a === void 0 || s(a, i, e);
|
|
1390
|
+
if (u !== !0)
|
|
1391
|
+
throw new S("option " + i + " must be " + u, S.ERR_BAD_OPTION_VALUE);
|
|
1392
|
+
continue;
|
|
1393
|
+
}
|
|
1394
|
+
if (n !== !0)
|
|
1395
|
+
throw new S("Unknown option " + i, S.ERR_BAD_OPTION);
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
const tt = {
|
|
1399
|
+
assertOptions: Lo,
|
|
1400
|
+
validators: gt
|
|
1401
|
+
}, G = tt.validators;
|
|
1402
|
+
class ee {
|
|
1403
|
+
constructor(t) {
|
|
1404
|
+
this.defaults = t, this.interceptors = {
|
|
1405
|
+
request: new Nt(),
|
|
1406
|
+
response: new Nt()
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Dispatch a request
|
|
1411
|
+
*
|
|
1412
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1413
|
+
* @param {?Object} config
|
|
1414
|
+
*
|
|
1415
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1416
|
+
*/
|
|
1417
|
+
async request(t, n) {
|
|
1418
|
+
try {
|
|
1419
|
+
return await this._request(t, n);
|
|
1420
|
+
} catch (r) {
|
|
1421
|
+
if (r instanceof Error) {
|
|
1422
|
+
let o;
|
|
1423
|
+
Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error();
|
|
1424
|
+
const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1425
|
+
try {
|
|
1426
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1427
|
+
` + i) : r.stack = i;
|
|
1428
|
+
} catch {
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
throw r;
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
_request(t, n) {
|
|
1435
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = te(this.defaults, n);
|
|
1436
|
+
const { transitional: r, paramsSerializer: o, headers: i } = n;
|
|
1437
|
+
r !== void 0 && tt.assertOptions(r, {
|
|
1438
|
+
silentJSONParsing: G.transitional(G.boolean),
|
|
1439
|
+
forcedJSONParsing: G.transitional(G.boolean),
|
|
1440
|
+
clarifyTimeoutError: G.transitional(G.boolean)
|
|
1441
|
+
}, !1), o != null && (h.isFunction(o) ? n.paramsSerializer = {
|
|
1442
|
+
serialize: o
|
|
1443
|
+
} : tt.assertOptions(o, {
|
|
1444
|
+
encode: G.function,
|
|
1445
|
+
serialize: G.function
|
|
1446
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1447
|
+
let s = i && h.merge(
|
|
1448
|
+
i.common,
|
|
1449
|
+
i[n.method]
|
|
1450
|
+
);
|
|
1451
|
+
i && h.forEach(
|
|
1452
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1453
|
+
(g) => {
|
|
1454
|
+
delete i[g];
|
|
1455
|
+
}
|
|
1456
|
+
), n.headers = j.concat(s, i);
|
|
1457
|
+
const a = [];
|
|
1458
|
+
let u = !0;
|
|
1459
|
+
this.interceptors.request.forEach(function(E) {
|
|
1460
|
+
typeof E.runWhen == "function" && E.runWhen(n) === !1 || (u = u && E.synchronous, a.unshift(E.fulfilled, E.rejected));
|
|
1461
|
+
});
|
|
1462
|
+
const f = [];
|
|
1463
|
+
this.interceptors.response.forEach(function(E) {
|
|
1464
|
+
f.push(E.fulfilled, E.rejected);
|
|
1465
|
+
});
|
|
1466
|
+
let c, l = 0, d;
|
|
1467
|
+
if (!u) {
|
|
1468
|
+
const g = [Ut.bind(this), void 0];
|
|
1469
|
+
for (g.unshift.apply(g, a), g.push.apply(g, f), d = g.length, c = Promise.resolve(n); l < d; )
|
|
1470
|
+
c = c.then(g[l++], g[l++]);
|
|
1471
|
+
return c;
|
|
1472
|
+
}
|
|
1473
|
+
d = a.length;
|
|
1474
|
+
let m = n;
|
|
1475
|
+
for (l = 0; l < d; ) {
|
|
1476
|
+
const g = a[l++], E = a[l++];
|
|
1477
|
+
try {
|
|
1478
|
+
m = g(m);
|
|
1479
|
+
} catch (y) {
|
|
1480
|
+
E.call(this, y);
|
|
1481
|
+
break;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
try {
|
|
1485
|
+
c = Ut.call(this, m);
|
|
1486
|
+
} catch (g) {
|
|
1487
|
+
return Promise.reject(g);
|
|
1488
|
+
}
|
|
1489
|
+
for (l = 0, d = f.length; l < d; )
|
|
1490
|
+
c = c.then(f[l++], f[l++]);
|
|
1491
|
+
return c;
|
|
1492
|
+
}
|
|
1493
|
+
getUri(t) {
|
|
1494
|
+
t = te(this.defaults, t);
|
|
1495
|
+
const n = Rn(t.baseURL, t.url);
|
|
1496
|
+
return yn(n, t.params, t.paramsSerializer);
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
h.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1500
|
+
ee.prototype[t] = function(n, r) {
|
|
1501
|
+
return this.request(te(r || {}, {
|
|
1502
|
+
method: t,
|
|
1503
|
+
url: n,
|
|
1504
|
+
data: (r || {}).data
|
|
1505
|
+
}));
|
|
1506
|
+
};
|
|
1507
|
+
});
|
|
1508
|
+
h.forEach(["post", "put", "patch"], function(t) {
|
|
1509
|
+
function n(r) {
|
|
1510
|
+
return function(i, s, a) {
|
|
1511
|
+
return this.request(te(a || {}, {
|
|
1512
|
+
method: t,
|
|
1513
|
+
headers: r ? {
|
|
1514
|
+
"Content-Type": "multipart/form-data"
|
|
1515
|
+
} : {},
|
|
1516
|
+
url: i,
|
|
1517
|
+
data: s
|
|
1518
|
+
}));
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
ee.prototype[t] = n(), ee.prototype[t + "Form"] = n(!0);
|
|
1522
|
+
});
|
|
1523
|
+
class yt {
|
|
1524
|
+
constructor(t) {
|
|
1525
|
+
if (typeof t != "function")
|
|
1526
|
+
throw new TypeError("executor must be a function.");
|
|
1527
|
+
let n;
|
|
1528
|
+
this.promise = new Promise(function(i) {
|
|
1529
|
+
n = i;
|
|
1530
|
+
});
|
|
1531
|
+
const r = this;
|
|
1532
|
+
this.promise.then((o) => {
|
|
1533
|
+
if (!r._listeners) return;
|
|
1534
|
+
let i = r._listeners.length;
|
|
1535
|
+
for (; i-- > 0; )
|
|
1536
|
+
r._listeners[i](o);
|
|
1537
|
+
r._listeners = null;
|
|
1538
|
+
}), this.promise.then = (o) => {
|
|
1539
|
+
let i;
|
|
1540
|
+
const s = new Promise((a) => {
|
|
1541
|
+
r.subscribe(a), i = a;
|
|
1542
|
+
}).then(o);
|
|
1543
|
+
return s.cancel = function() {
|
|
1544
|
+
r.unsubscribe(i);
|
|
1545
|
+
}, s;
|
|
1546
|
+
}, t(function(i, s, a) {
|
|
1547
|
+
r.reason || (r.reason = new ce(i, s, a), n(r.reason));
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1552
|
+
*/
|
|
1553
|
+
throwIfRequested() {
|
|
1554
|
+
if (this.reason)
|
|
1555
|
+
throw this.reason;
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Subscribe to the cancel signal
|
|
1559
|
+
*/
|
|
1560
|
+
subscribe(t) {
|
|
1561
|
+
if (this.reason) {
|
|
1562
|
+
t(this.reason);
|
|
1563
|
+
return;
|
|
1564
|
+
}
|
|
1565
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* Unsubscribe from the cancel signal
|
|
1569
|
+
*/
|
|
1570
|
+
unsubscribe(t) {
|
|
1571
|
+
if (!this._listeners)
|
|
1572
|
+
return;
|
|
1573
|
+
const n = this._listeners.indexOf(t);
|
|
1574
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1575
|
+
}
|
|
1576
|
+
/**
|
|
1577
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1578
|
+
* cancels the `CancelToken`.
|
|
1579
|
+
*/
|
|
1580
|
+
static source() {
|
|
1581
|
+
let t;
|
|
1582
|
+
return {
|
|
1583
|
+
token: new yt(function(o) {
|
|
1584
|
+
t = o;
|
|
1585
|
+
}),
|
|
1586
|
+
cancel: t
|
|
1587
|
+
};
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
function $o(e) {
|
|
1591
|
+
return function(n) {
|
|
1592
|
+
return e.apply(null, n);
|
|
1593
|
+
};
|
|
1594
|
+
}
|
|
1595
|
+
function Uo(e) {
|
|
1596
|
+
return h.isObject(e) && e.isAxiosError === !0;
|
|
1597
|
+
}
|
|
1598
|
+
const nt = {
|
|
1599
|
+
Continue: 100,
|
|
1600
|
+
SwitchingProtocols: 101,
|
|
1601
|
+
Processing: 102,
|
|
1602
|
+
EarlyHints: 103,
|
|
1603
|
+
Ok: 200,
|
|
1604
|
+
Created: 201,
|
|
1605
|
+
Accepted: 202,
|
|
1606
|
+
NonAuthoritativeInformation: 203,
|
|
1607
|
+
NoContent: 204,
|
|
1608
|
+
ResetContent: 205,
|
|
1609
|
+
PartialContent: 206,
|
|
1610
|
+
MultiStatus: 207,
|
|
1611
|
+
AlreadyReported: 208,
|
|
1612
|
+
ImUsed: 226,
|
|
1613
|
+
MultipleChoices: 300,
|
|
1614
|
+
MovedPermanently: 301,
|
|
1615
|
+
Found: 302,
|
|
1616
|
+
SeeOther: 303,
|
|
1617
|
+
NotModified: 304,
|
|
1618
|
+
UseProxy: 305,
|
|
1619
|
+
Unused: 306,
|
|
1620
|
+
TemporaryRedirect: 307,
|
|
1621
|
+
PermanentRedirect: 308,
|
|
1622
|
+
BadRequest: 400,
|
|
1623
|
+
Unauthorized: 401,
|
|
1624
|
+
PaymentRequired: 402,
|
|
1625
|
+
Forbidden: 403,
|
|
1626
|
+
NotFound: 404,
|
|
1627
|
+
MethodNotAllowed: 405,
|
|
1628
|
+
NotAcceptable: 406,
|
|
1629
|
+
ProxyAuthenticationRequired: 407,
|
|
1630
|
+
RequestTimeout: 408,
|
|
1631
|
+
Conflict: 409,
|
|
1632
|
+
Gone: 410,
|
|
1633
|
+
LengthRequired: 411,
|
|
1634
|
+
PreconditionFailed: 412,
|
|
1635
|
+
PayloadTooLarge: 413,
|
|
1636
|
+
UriTooLong: 414,
|
|
1637
|
+
UnsupportedMediaType: 415,
|
|
1638
|
+
RangeNotSatisfiable: 416,
|
|
1639
|
+
ExpectationFailed: 417,
|
|
1640
|
+
ImATeapot: 418,
|
|
1641
|
+
MisdirectedRequest: 421,
|
|
1642
|
+
UnprocessableEntity: 422,
|
|
1643
|
+
Locked: 423,
|
|
1644
|
+
FailedDependency: 424,
|
|
1645
|
+
TooEarly: 425,
|
|
1646
|
+
UpgradeRequired: 426,
|
|
1647
|
+
PreconditionRequired: 428,
|
|
1648
|
+
TooManyRequests: 429,
|
|
1649
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1650
|
+
UnavailableForLegalReasons: 451,
|
|
1651
|
+
InternalServerError: 500,
|
|
1652
|
+
NotImplemented: 501,
|
|
1653
|
+
BadGateway: 502,
|
|
1654
|
+
ServiceUnavailable: 503,
|
|
1655
|
+
GatewayTimeout: 504,
|
|
1656
|
+
HttpVersionNotSupported: 505,
|
|
1657
|
+
VariantAlsoNegotiates: 506,
|
|
1658
|
+
InsufficientStorage: 507,
|
|
1659
|
+
LoopDetected: 508,
|
|
1660
|
+
NotExtended: 510,
|
|
1661
|
+
NetworkAuthenticationRequired: 511
|
|
1662
|
+
};
|
|
1663
|
+
Object.entries(nt).forEach(([e, t]) => {
|
|
1664
|
+
nt[t] = e;
|
|
1665
|
+
});
|
|
1666
|
+
function Pn(e) {
|
|
1667
|
+
const t = new ee(e), n = on(ee.prototype.request, t);
|
|
1668
|
+
return h.extend(n, ee.prototype, t, { allOwnKeys: !0 }), h.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1669
|
+
return Pn(te(e, o));
|
|
1670
|
+
}, n;
|
|
1671
|
+
}
|
|
1672
|
+
const L = Pn(be);
|
|
1673
|
+
L.Axios = ee;
|
|
1674
|
+
L.CanceledError = ce;
|
|
1675
|
+
L.CancelToken = yt;
|
|
1676
|
+
L.isCancel = wn;
|
|
1677
|
+
L.VERSION = Tn;
|
|
1678
|
+
L.toFormData = Ie;
|
|
1679
|
+
L.AxiosError = S;
|
|
1680
|
+
L.Cancel = L.CanceledError;
|
|
1681
|
+
L.all = function(t) {
|
|
1682
|
+
return Promise.all(t);
|
|
1683
|
+
};
|
|
1684
|
+
L.spread = $o;
|
|
1685
|
+
L.isAxiosError = Uo;
|
|
1686
|
+
L.mergeConfig = te;
|
|
1687
|
+
L.AxiosHeaders = j;
|
|
1688
|
+
L.formToJSON = (e) => vn(h.isHTMLForm(e) ? new FormData(e) : e);
|
|
1689
|
+
L.getAdapter = An.getAdapter;
|
|
1690
|
+
L.HttpStatusCode = nt;
|
|
1691
|
+
L.default = L;
|
|
1692
|
+
function Bo() {
|
|
1693
|
+
return Nn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1694
|
+
}
|
|
1695
|
+
function Nn() {
|
|
1696
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1697
|
+
}
|
|
1698
|
+
const jo = typeof Proxy == "function", Fo = "devtools-plugin:setup", Vo = "plugin:settings:set";
|
|
1699
|
+
let re, rt;
|
|
1700
|
+
function Mo() {
|
|
1701
|
+
var e;
|
|
1702
|
+
return re !== void 0 || (typeof window < "u" && window.performance ? (re = !0, rt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (re = !0, rt = globalThis.perf_hooks.performance) : re = !1), re;
|
|
1703
|
+
}
|
|
1704
|
+
function qo() {
|
|
1705
|
+
return Mo() ? rt.now() : Date.now();
|
|
1706
|
+
}
|
|
1707
|
+
class Ho {
|
|
1708
|
+
constructor(t, n) {
|
|
1709
|
+
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
1710
|
+
const r = {};
|
|
1711
|
+
if (t.settings)
|
|
1712
|
+
for (const s in t.settings) {
|
|
1713
|
+
const a = t.settings[s];
|
|
1714
|
+
r[s] = a.defaultValue;
|
|
1715
|
+
}
|
|
1716
|
+
const o = `__vue-devtools-plugin-settings__${t.id}`;
|
|
1717
|
+
let i = Object.assign({}, r);
|
|
1718
|
+
try {
|
|
1719
|
+
const s = localStorage.getItem(o), a = JSON.parse(s);
|
|
1720
|
+
Object.assign(i, a);
|
|
1721
|
+
} catch {
|
|
1722
|
+
}
|
|
1723
|
+
this.fallbacks = {
|
|
1724
|
+
getSettings() {
|
|
1725
|
+
return i;
|
|
1726
|
+
},
|
|
1727
|
+
setSettings(s) {
|
|
1728
|
+
try {
|
|
1729
|
+
localStorage.setItem(o, JSON.stringify(s));
|
|
1730
|
+
} catch {
|
|
1731
|
+
}
|
|
1732
|
+
i = s;
|
|
1733
|
+
},
|
|
1734
|
+
now() {
|
|
1735
|
+
return qo();
|
|
1736
|
+
}
|
|
1737
|
+
}, n && n.on(Vo, (s, a) => {
|
|
1738
|
+
s === this.plugin.id && this.fallbacks.setSettings(a);
|
|
1739
|
+
}), this.proxiedOn = new Proxy({}, {
|
|
1740
|
+
get: (s, a) => this.target ? this.target.on[a] : (...u) => {
|
|
1741
|
+
this.onQueue.push({
|
|
1742
|
+
method: a,
|
|
1743
|
+
args: u
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
}), this.proxiedTarget = new Proxy({}, {
|
|
1747
|
+
get: (s, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...u) => (this.targetQueue.push({
|
|
1748
|
+
method: a,
|
|
1749
|
+
args: u,
|
|
1750
|
+
resolve: () => {
|
|
1751
|
+
}
|
|
1752
|
+
}), this.fallbacks[a](...u)) : (...u) => new Promise((f) => {
|
|
1753
|
+
this.targetQueue.push({
|
|
1754
|
+
method: a,
|
|
1755
|
+
args: u,
|
|
1756
|
+
resolve: f
|
|
1757
|
+
});
|
|
1758
|
+
})
|
|
1759
|
+
});
|
|
1760
|
+
}
|
|
1761
|
+
async setRealTarget(t) {
|
|
1762
|
+
this.target = t;
|
|
1763
|
+
for (const n of this.onQueue)
|
|
1764
|
+
this.target.on[n.method](...n.args);
|
|
1765
|
+
for (const n of this.targetQueue)
|
|
1766
|
+
n.resolve(await this.target[n.method](...n.args));
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
function zo(e, t) {
|
|
1770
|
+
const n = e, r = Nn(), o = Bo(), i = jo && n.enableEarlyProxy;
|
|
1771
|
+
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
1772
|
+
o.emit(Fo, e, t);
|
|
1773
|
+
else {
|
|
1774
|
+
const s = i ? new Ho(n, o) : null;
|
|
1775
|
+
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1776
|
+
pluginDescriptor: n,
|
|
1777
|
+
setupFn: t,
|
|
1778
|
+
proxy: s
|
|
1779
|
+
}), s && t(s.proxiedTarget);
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
/*!
|
|
1783
|
+
* vue-router v4.4.3
|
|
1784
|
+
* (c) 2024 Eduardo San Martin Morote
|
|
1785
|
+
* @license MIT
|
|
1786
|
+
*/
|
|
1787
|
+
const K = typeof document < "u";
|
|
1788
|
+
function Ko(e) {
|
|
1789
|
+
return e.__esModule || e[Symbol.toStringTag] === "Module";
|
|
1790
|
+
}
|
|
1791
|
+
const k = Object.assign;
|
|
1792
|
+
function We(e, t) {
|
|
1793
|
+
const n = {};
|
|
1794
|
+
for (const r in t) {
|
|
1795
|
+
const o = t[r];
|
|
1796
|
+
n[r] = V(o) ? o.map(e) : e(o);
|
|
1797
|
+
}
|
|
1798
|
+
return n;
|
|
1799
|
+
}
|
|
1800
|
+
const me = () => {
|
|
1801
|
+
}, V = Array.isArray;
|
|
1802
|
+
function A(e) {
|
|
1803
|
+
const t = Array.from(arguments).slice(1);
|
|
1804
|
+
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
|
1805
|
+
}
|
|
1806
|
+
const kn = /#/g, Wo = /&/g, Go = /\//g, Jo = /=/g, Qo = /\?/g, Cn = /\+/g, Xo = /%5B/g, Yo = /%5D/g, xn = /%5E/g, Zo = /%60/g, Dn = /%7B/g, es = /%7C/g, In = /%7D/g, ts = /%20/g;
|
|
1807
|
+
function Et(e) {
|
|
1808
|
+
return encodeURI("" + e).replace(es, "|").replace(Xo, "[").replace(Yo, "]");
|
|
1809
|
+
}
|
|
1810
|
+
function ns(e) {
|
|
1811
|
+
return Et(e).replace(Dn, "{").replace(In, "}").replace(xn, "^");
|
|
1812
|
+
}
|
|
1813
|
+
function ot(e) {
|
|
1814
|
+
return Et(e).replace(Cn, "%2B").replace(ts, "+").replace(kn, "%23").replace(Wo, "%26").replace(Zo, "`").replace(Dn, "{").replace(In, "}").replace(xn, "^");
|
|
1815
|
+
}
|
|
1816
|
+
function rs(e) {
|
|
1817
|
+
return ot(e).replace(Jo, "%3D");
|
|
1818
|
+
}
|
|
1819
|
+
function os(e) {
|
|
1820
|
+
return Et(e).replace(kn, "%23").replace(Qo, "%3F");
|
|
1821
|
+
}
|
|
1822
|
+
function ss(e) {
|
|
1823
|
+
return e == null ? "" : os(e).replace(Go, "%2F");
|
|
1824
|
+
}
|
|
1825
|
+
function se(e) {
|
|
1826
|
+
try {
|
|
1827
|
+
return decodeURIComponent("" + e);
|
|
1828
|
+
} catch {
|
|
1829
|
+
process.env.NODE_ENV !== "production" && A(`Error decoding "${e}". Using original value`);
|
|
1830
|
+
}
|
|
1831
|
+
return "" + e;
|
|
1832
|
+
}
|
|
1833
|
+
const is = /\/$/, as = (e) => e.replace(is, "");
|
|
1834
|
+
function Ge(e, t, n = "/") {
|
|
1835
|
+
let r, o = {}, i = "", s = "";
|
|
1836
|
+
const a = t.indexOf("#");
|
|
1837
|
+
let u = t.indexOf("?");
|
|
1838
|
+
return a < u && a >= 0 && (u = -1), u > -1 && (r = t.slice(0, u), i = t.slice(u + 1, a > -1 ? a : t.length), o = e(i)), a > -1 && (r = r || t.slice(0, a), s = t.slice(a, t.length)), r = us(r ?? t, n), {
|
|
1839
|
+
fullPath: r + (i && "?") + i + s,
|
|
1840
|
+
path: r,
|
|
1841
|
+
query: o,
|
|
1842
|
+
hash: se(s)
|
|
1843
|
+
};
|
|
1844
|
+
}
|
|
1845
|
+
function cs(e, t) {
|
|
1846
|
+
const n = t.query ? e(t.query) : "";
|
|
1847
|
+
return t.path + (n && "?") + n + (t.hash || "");
|
|
1848
|
+
}
|
|
1849
|
+
function jt(e, t) {
|
|
1850
|
+
return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
|
|
1851
|
+
}
|
|
1852
|
+
function Ft(e, t, n) {
|
|
1853
|
+
const r = t.matched.length - 1, o = n.matched.length - 1;
|
|
1854
|
+
return r > -1 && r === o && X(t.matched[r], n.matched[o]) && Ln(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
|
|
1855
|
+
}
|
|
1856
|
+
function X(e, t) {
|
|
1857
|
+
return (e.aliasOf || e) === (t.aliasOf || t);
|
|
1858
|
+
}
|
|
1859
|
+
function Ln(e, t) {
|
|
1860
|
+
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1861
|
+
return !1;
|
|
1862
|
+
for (const n in e)
|
|
1863
|
+
if (!ls(e[n], t[n]))
|
|
1864
|
+
return !1;
|
|
1865
|
+
return !0;
|
|
1866
|
+
}
|
|
1867
|
+
function ls(e, t) {
|
|
1868
|
+
return V(e) ? Vt(e, t) : V(t) ? Vt(t, e) : e === t;
|
|
1869
|
+
}
|
|
1870
|
+
function Vt(e, t) {
|
|
1871
|
+
return V(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
|
|
1872
|
+
}
|
|
1873
|
+
function us(e, t) {
|
|
1874
|
+
if (e.startsWith("/"))
|
|
1875
|
+
return e;
|
|
1876
|
+
if (process.env.NODE_ENV !== "production" && !t.startsWith("/"))
|
|
1877
|
+
return A(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e;
|
|
1878
|
+
if (!e)
|
|
1879
|
+
return t;
|
|
1880
|
+
const n = t.split("/"), r = e.split("/"), o = r[r.length - 1];
|
|
1881
|
+
(o === ".." || o === ".") && r.push("");
|
|
1882
|
+
let i = n.length - 1, s, a;
|
|
1883
|
+
for (s = 0; s < r.length; s++)
|
|
1884
|
+
if (a = r[s], a !== ".")
|
|
1885
|
+
if (a === "..")
|
|
1886
|
+
i > 1 && i--;
|
|
1887
|
+
else
|
|
1888
|
+
break;
|
|
1889
|
+
return n.slice(0, i).join("/") + "/" + r.slice(s).join("/");
|
|
1890
|
+
}
|
|
1891
|
+
const J = {
|
|
1892
|
+
path: "/",
|
|
1893
|
+
// TODO: could we use a symbol in the future?
|
|
1894
|
+
name: void 0,
|
|
1895
|
+
params: {},
|
|
1896
|
+
query: {},
|
|
1897
|
+
hash: "",
|
|
1898
|
+
fullPath: "/",
|
|
1899
|
+
matched: [],
|
|
1900
|
+
meta: {},
|
|
1901
|
+
redirectedFrom: void 0
|
|
1902
|
+
};
|
|
1903
|
+
var ve;
|
|
1904
|
+
(function(e) {
|
|
1905
|
+
e.pop = "pop", e.push = "push";
|
|
1906
|
+
})(ve || (ve = {}));
|
|
1907
|
+
var ge;
|
|
1908
|
+
(function(e) {
|
|
1909
|
+
e.back = "back", e.forward = "forward", e.unknown = "";
|
|
1910
|
+
})(ge || (ge = {}));
|
|
1911
|
+
function fs(e) {
|
|
1912
|
+
if (!e)
|
|
1913
|
+
if (K) {
|
|
1914
|
+
const t = document.querySelector("base");
|
|
1915
|
+
e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
|
|
1916
|
+
} else
|
|
1917
|
+
e = "/";
|
|
1918
|
+
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), as(e);
|
|
1919
|
+
}
|
|
1920
|
+
const ds = /^[^#]+#/;
|
|
1921
|
+
function hs(e, t) {
|
|
1922
|
+
return e.replace(ds, "#") + t;
|
|
1923
|
+
}
|
|
1924
|
+
function ps(e, t) {
|
|
1925
|
+
const n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
1926
|
+
return {
|
|
1927
|
+
behavior: t.behavior,
|
|
1928
|
+
left: r.left - n.left - (t.left || 0),
|
|
1929
|
+
top: r.top - n.top - (t.top || 0)
|
|
1930
|
+
};
|
|
1931
|
+
}
|
|
1932
|
+
const $e = () => ({
|
|
1933
|
+
left: window.scrollX,
|
|
1934
|
+
top: window.scrollY
|
|
1935
|
+
});
|
|
1936
|
+
function ms(e) {
|
|
1937
|
+
let t;
|
|
1938
|
+
if ("el" in e) {
|
|
1939
|
+
const n = e.el, r = typeof n == "string" && n.startsWith("#");
|
|
1940
|
+
if (process.env.NODE_ENV !== "production" && typeof e.el == "string" && (!r || !document.getElementById(e.el.slice(1))))
|
|
1941
|
+
try {
|
|
1942
|
+
const i = document.querySelector(e.el);
|
|
1943
|
+
if (r && i) {
|
|
1944
|
+
A(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);
|
|
1945
|
+
return;
|
|
1946
|
+
}
|
|
1947
|
+
} catch {
|
|
1948
|
+
A(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
|
|
1949
|
+
return;
|
|
1950
|
+
}
|
|
1951
|
+
const o = typeof n == "string" ? r ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
|
|
1952
|
+
if (!o) {
|
|
1953
|
+
process.env.NODE_ENV !== "production" && A(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
|
|
1954
|
+
return;
|
|
1955
|
+
}
|
|
1956
|
+
t = ps(o, e);
|
|
1957
|
+
} else
|
|
1958
|
+
t = e;
|
|
1959
|
+
"scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
|
|
1960
|
+
}
|
|
1961
|
+
function Mt(e, t) {
|
|
1962
|
+
return (history.state ? history.state.position - t : -1) + e;
|
|
1963
|
+
}
|
|
1964
|
+
const st = /* @__PURE__ */ new Map();
|
|
1965
|
+
function gs(e, t) {
|
|
1966
|
+
st.set(e, t);
|
|
1967
|
+
}
|
|
1968
|
+
function ys(e) {
|
|
1969
|
+
const t = st.get(e);
|
|
1970
|
+
return st.delete(e), t;
|
|
1971
|
+
}
|
|
1972
|
+
let Es = () => location.protocol + "//" + location.host;
|
|
1973
|
+
function $n(e, t) {
|
|
1974
|
+
const { pathname: n, search: r, hash: o } = t, i = e.indexOf("#");
|
|
1975
|
+
if (i > -1) {
|
|
1976
|
+
let a = o.includes(e.slice(i)) ? e.slice(i).length : 1, u = o.slice(a);
|
|
1977
|
+
return u[0] !== "/" && (u = "/" + u), jt(u, "");
|
|
1978
|
+
}
|
|
1979
|
+
return jt(n, e) + r + o;
|
|
1980
|
+
}
|
|
1981
|
+
function vs(e, t, n, r) {
|
|
1982
|
+
let o = [], i = [], s = null;
|
|
1983
|
+
const a = ({ state: d }) => {
|
|
1984
|
+
const m = $n(e, location), g = n.value, E = t.value;
|
|
1985
|
+
let y = 0;
|
|
1986
|
+
if (d) {
|
|
1987
|
+
if (n.value = m, t.value = d, s && s === g) {
|
|
1988
|
+
s = null;
|
|
1989
|
+
return;
|
|
1990
|
+
}
|
|
1991
|
+
y = E ? d.position - E.position : 0;
|
|
1992
|
+
} else
|
|
1993
|
+
r(m);
|
|
1994
|
+
o.forEach((O) => {
|
|
1995
|
+
O(n.value, g, {
|
|
1996
|
+
delta: y,
|
|
1997
|
+
type: ve.pop,
|
|
1998
|
+
direction: y ? y > 0 ? ge.forward : ge.back : ge.unknown
|
|
1999
|
+
});
|
|
2000
|
+
});
|
|
2001
|
+
};
|
|
2002
|
+
function u() {
|
|
2003
|
+
s = n.value;
|
|
2004
|
+
}
|
|
2005
|
+
function f(d) {
|
|
2006
|
+
o.push(d);
|
|
2007
|
+
const m = () => {
|
|
2008
|
+
const g = o.indexOf(d);
|
|
2009
|
+
g > -1 && o.splice(g, 1);
|
|
2010
|
+
};
|
|
2011
|
+
return i.push(m), m;
|
|
2012
|
+
}
|
|
2013
|
+
function c() {
|
|
2014
|
+
const { history: d } = window;
|
|
2015
|
+
d.state && d.replaceState(k({}, d.state, { scroll: $e() }), "");
|
|
2016
|
+
}
|
|
2017
|
+
function l() {
|
|
2018
|
+
for (const d of i)
|
|
2019
|
+
d();
|
|
2020
|
+
i = [], window.removeEventListener("popstate", a), window.removeEventListener("beforeunload", c);
|
|
2021
|
+
}
|
|
2022
|
+
return window.addEventListener("popstate", a), window.addEventListener("beforeunload", c, {
|
|
2023
|
+
passive: !0
|
|
2024
|
+
}), {
|
|
2025
|
+
pauseListeners: u,
|
|
2026
|
+
listen: f,
|
|
2027
|
+
destroy: l
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
function qt(e, t, n, r = !1, o = !1) {
|
|
2031
|
+
return {
|
|
2032
|
+
back: e,
|
|
2033
|
+
current: t,
|
|
2034
|
+
forward: n,
|
|
2035
|
+
replaced: r,
|
|
2036
|
+
position: window.history.length,
|
|
2037
|
+
scroll: o ? $e() : null
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2040
|
+
function ws(e) {
|
|
2041
|
+
const { history: t, location: n } = window, r = {
|
|
2042
|
+
value: $n(e, n)
|
|
2043
|
+
}, o = { value: t.state };
|
|
2044
|
+
o.value || i(r.value, {
|
|
2045
|
+
back: null,
|
|
2046
|
+
current: r.value,
|
|
2047
|
+
forward: null,
|
|
2048
|
+
// the length is off by one, we need to decrease it
|
|
2049
|
+
position: t.length - 1,
|
|
2050
|
+
replaced: !0,
|
|
2051
|
+
// don't add a scroll as the user may have an anchor, and we want
|
|
2052
|
+
// scrollBehavior to be triggered without a saved position
|
|
2053
|
+
scroll: null
|
|
2054
|
+
}, !0);
|
|
2055
|
+
function i(u, f, c) {
|
|
2056
|
+
const l = e.indexOf("#"), d = l > -1 ? (n.host && document.querySelector("base") ? e : e.slice(l)) + u : Es() + e + u;
|
|
2057
|
+
try {
|
|
2058
|
+
t[c ? "replaceState" : "pushState"](f, "", d), o.value = f;
|
|
2059
|
+
} catch (m) {
|
|
2060
|
+
process.env.NODE_ENV !== "production" ? A("Error with push/replace State", m) : console.error(m), n[c ? "replace" : "assign"](d);
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
function s(u, f) {
|
|
2064
|
+
const c = k({}, t.state, qt(
|
|
2065
|
+
o.value.back,
|
|
2066
|
+
// keep back and forward entries but override current position
|
|
2067
|
+
u,
|
|
2068
|
+
o.value.forward,
|
|
2069
|
+
!0
|
|
2070
|
+
), f, { position: o.value.position });
|
|
2071
|
+
i(u, c, !0), r.value = u;
|
|
2072
|
+
}
|
|
2073
|
+
function a(u, f) {
|
|
2074
|
+
const c = k(
|
|
2075
|
+
{},
|
|
2076
|
+
// use current history state to gracefully handle a wrong call to
|
|
2077
|
+
// history.replaceState
|
|
2078
|
+
// https://github.com/vuejs/router/issues/366
|
|
2079
|
+
o.value,
|
|
2080
|
+
t.state,
|
|
2081
|
+
{
|
|
2082
|
+
forward: u,
|
|
2083
|
+
scroll: $e()
|
|
2084
|
+
}
|
|
2085
|
+
);
|
|
2086
|
+
process.env.NODE_ENV !== "production" && !t.state && A(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
|
2087
|
+
|
|
2088
|
+
history.replaceState(history.state, '', url)
|
|
2089
|
+
|
|
2090
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), i(c.current, c, !0);
|
|
2091
|
+
const l = k({}, qt(r.value, u, null), { position: c.position + 1 }, f);
|
|
2092
|
+
i(u, l, !1), r.value = u;
|
|
2093
|
+
}
|
|
2094
|
+
return {
|
|
2095
|
+
location: r,
|
|
2096
|
+
state: o,
|
|
2097
|
+
push: a,
|
|
2098
|
+
replace: s
|
|
2099
|
+
};
|
|
2100
|
+
}
|
|
2101
|
+
function bs(e) {
|
|
2102
|
+
e = fs(e);
|
|
2103
|
+
const t = ws(e), n = vs(e, t.state, t.location, t.replace);
|
|
2104
|
+
function r(i, s = !0) {
|
|
2105
|
+
s || n.pauseListeners(), history.go(i);
|
|
2106
|
+
}
|
|
2107
|
+
const o = k({
|
|
2108
|
+
// it's overridden right after
|
|
2109
|
+
location: "",
|
|
2110
|
+
base: e,
|
|
2111
|
+
go: r,
|
|
2112
|
+
createHref: hs.bind(null, e)
|
|
2113
|
+
}, t, n);
|
|
2114
|
+
return Object.defineProperty(o, "location", {
|
|
2115
|
+
enumerable: !0,
|
|
2116
|
+
get: () => t.location.value
|
|
2117
|
+
}), Object.defineProperty(o, "state", {
|
|
2118
|
+
enumerable: !0,
|
|
2119
|
+
get: () => t.state.value
|
|
2120
|
+
}), o;
|
|
2121
|
+
}
|
|
2122
|
+
function ke(e) {
|
|
2123
|
+
return typeof e == "string" || e && typeof e == "object";
|
|
2124
|
+
}
|
|
2125
|
+
function Un(e) {
|
|
2126
|
+
return typeof e == "string" || typeof e == "symbol";
|
|
2127
|
+
}
|
|
2128
|
+
const it = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
|
|
2129
|
+
var Ht;
|
|
2130
|
+
(function(e) {
|
|
2131
|
+
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
|
2132
|
+
})(Ht || (Ht = {}));
|
|
2133
|
+
const Rs = {
|
|
2134
|
+
1({ location: e, currentLocation: t }) {
|
|
2135
|
+
return `No match for
|
|
2136
|
+
${JSON.stringify(e)}${t ? `
|
|
2137
|
+
while being at
|
|
2138
|
+
` + JSON.stringify(t) : ""}`;
|
|
2139
|
+
},
|
|
2140
|
+
2({ from: e, to: t }) {
|
|
2141
|
+
return `Redirected from "${e.fullPath}" to "${Ss(t)}" via a navigation guard.`;
|
|
2142
|
+
},
|
|
2143
|
+
4({ from: e, to: t }) {
|
|
2144
|
+
return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
|
|
2145
|
+
},
|
|
2146
|
+
8({ from: e, to: t }) {
|
|
2147
|
+
return `Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`;
|
|
2148
|
+
},
|
|
2149
|
+
16({ from: e, to: t }) {
|
|
2150
|
+
return `Avoided redundant navigation to current location: "${e.fullPath}".`;
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
function ie(e, t) {
|
|
2154
|
+
return process.env.NODE_ENV !== "production" ? k(new Error(Rs[e](t)), {
|
|
2155
|
+
type: e,
|
|
2156
|
+
[it]: !0
|
|
2157
|
+
}, t) : k(new Error(), {
|
|
2158
|
+
type: e,
|
|
2159
|
+
[it]: !0
|
|
2160
|
+
}, t);
|
|
2161
|
+
}
|
|
2162
|
+
function z(e, t) {
|
|
2163
|
+
return e instanceof Error && it in e && (t == null || !!(e.type & t));
|
|
2164
|
+
}
|
|
2165
|
+
const _s = ["params", "query", "hash"];
|
|
2166
|
+
function Ss(e) {
|
|
2167
|
+
if (typeof e == "string")
|
|
2168
|
+
return e;
|
|
2169
|
+
if (e.path != null)
|
|
2170
|
+
return e.path;
|
|
2171
|
+
const t = {};
|
|
2172
|
+
for (const n of _s)
|
|
2173
|
+
n in e && (t[n] = e[n]);
|
|
2174
|
+
return JSON.stringify(t, null, 2);
|
|
2175
|
+
}
|
|
2176
|
+
const zt = "[^/]+?", Os = {
|
|
2177
|
+
sensitive: !1,
|
|
2178
|
+
strict: !1,
|
|
2179
|
+
start: !0,
|
|
2180
|
+
end: !0
|
|
2181
|
+
}, As = /[.+*?^${}()[\]/\\]/g;
|
|
2182
|
+
function Ts(e, t) {
|
|
2183
|
+
const n = k({}, Os, t), r = [];
|
|
2184
|
+
let o = n.start ? "^" : "";
|
|
2185
|
+
const i = [];
|
|
2186
|
+
for (const f of e) {
|
|
2187
|
+
const c = f.length ? [] : [
|
|
2188
|
+
90
|
|
2189
|
+
/* PathScore.Root */
|
|
2190
|
+
];
|
|
2191
|
+
n.strict && !f.length && (o += "/");
|
|
2192
|
+
for (let l = 0; l < f.length; l++) {
|
|
2193
|
+
const d = f[l];
|
|
2194
|
+
let m = 40 + (n.sensitive ? 0.25 : 0);
|
|
2195
|
+
if (d.type === 0)
|
|
2196
|
+
l || (o += "/"), o += d.value.replace(As, "\\$&"), m += 40;
|
|
2197
|
+
else if (d.type === 1) {
|
|
2198
|
+
const { value: g, repeatable: E, optional: y, regexp: O } = d;
|
|
2199
|
+
i.push({
|
|
2200
|
+
name: g,
|
|
2201
|
+
repeatable: E,
|
|
2202
|
+
optional: y
|
|
2203
|
+
});
|
|
2204
|
+
const _ = O || zt;
|
|
2205
|
+
if (_ !== zt) {
|
|
2206
|
+
m += 10;
|
|
2207
|
+
try {
|
|
2208
|
+
new RegExp(`(${_})`);
|
|
2209
|
+
} catch (C) {
|
|
2210
|
+
throw new Error(`Invalid custom RegExp for param "${g}" (${_}): ` + C.message);
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
let w = E ? `((?:${_})(?:/(?:${_}))*)` : `(${_})`;
|
|
2214
|
+
l || (w = // avoid an optional / if there are more segments e.g. /:p?-static
|
|
2215
|
+
// or /:p?-:p2
|
|
2216
|
+
y && f.length < 2 ? `(?:/${w})` : "/" + w), y && (w += "?"), o += w, m += 20, y && (m += -8), E && (m += -20), _ === ".*" && (m += -50);
|
|
2217
|
+
}
|
|
2218
|
+
c.push(m);
|
|
2219
|
+
}
|
|
2220
|
+
r.push(c);
|
|
2221
|
+
}
|
|
2222
|
+
if (n.strict && n.end) {
|
|
2223
|
+
const f = r.length - 1;
|
|
2224
|
+
r[f][r[f].length - 1] += 0.7000000000000001;
|
|
2225
|
+
}
|
|
2226
|
+
n.strict || (o += "/?"), n.end ? o += "$" : n.strict && (o += "(?:/|$)");
|
|
2227
|
+
const s = new RegExp(o, n.sensitive ? "" : "i");
|
|
2228
|
+
function a(f) {
|
|
2229
|
+
const c = f.match(s), l = {};
|
|
2230
|
+
if (!c)
|
|
2231
|
+
return null;
|
|
2232
|
+
for (let d = 1; d < c.length; d++) {
|
|
2233
|
+
const m = c[d] || "", g = i[d - 1];
|
|
2234
|
+
l[g.name] = m && g.repeatable ? m.split("/") : m;
|
|
2235
|
+
}
|
|
2236
|
+
return l;
|
|
2237
|
+
}
|
|
2238
|
+
function u(f) {
|
|
2239
|
+
let c = "", l = !1;
|
|
2240
|
+
for (const d of e) {
|
|
2241
|
+
(!l || !c.endsWith("/")) && (c += "/"), l = !1;
|
|
2242
|
+
for (const m of d)
|
|
2243
|
+
if (m.type === 0)
|
|
2244
|
+
c += m.value;
|
|
2245
|
+
else if (m.type === 1) {
|
|
2246
|
+
const { value: g, repeatable: E, optional: y } = m, O = g in f ? f[g] : "";
|
|
2247
|
+
if (V(O) && !E)
|
|
2248
|
+
throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);
|
|
2249
|
+
const _ = V(O) ? O.join("/") : O;
|
|
2250
|
+
if (!_)
|
|
2251
|
+
if (y)
|
|
2252
|
+
d.length < 2 && (c.endsWith("/") ? c = c.slice(0, -1) : l = !0);
|
|
2253
|
+
else
|
|
2254
|
+
throw new Error(`Missing required param "${g}"`);
|
|
2255
|
+
c += _;
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
return c || "/";
|
|
2259
|
+
}
|
|
2260
|
+
return {
|
|
2261
|
+
re: s,
|
|
2262
|
+
score: r,
|
|
2263
|
+
keys: i,
|
|
2264
|
+
parse: a,
|
|
2265
|
+
stringify: u
|
|
2266
|
+
};
|
|
2267
|
+
}
|
|
2268
|
+
function Ps(e, t) {
|
|
2269
|
+
let n = 0;
|
|
2270
|
+
for (; n < e.length && n < t.length; ) {
|
|
2271
|
+
const r = t[n] - e[n];
|
|
2272
|
+
if (r)
|
|
2273
|
+
return r;
|
|
2274
|
+
n++;
|
|
2275
|
+
}
|
|
2276
|
+
return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
|
|
2277
|
+
}
|
|
2278
|
+
function Bn(e, t) {
|
|
2279
|
+
let n = 0;
|
|
2280
|
+
const r = e.score, o = t.score;
|
|
2281
|
+
for (; n < r.length && n < o.length; ) {
|
|
2282
|
+
const i = Ps(r[n], o[n]);
|
|
2283
|
+
if (i)
|
|
2284
|
+
return i;
|
|
2285
|
+
n++;
|
|
2286
|
+
}
|
|
2287
|
+
if (Math.abs(o.length - r.length) === 1) {
|
|
2288
|
+
if (Kt(r))
|
|
2289
|
+
return 1;
|
|
2290
|
+
if (Kt(o))
|
|
2291
|
+
return -1;
|
|
2292
|
+
}
|
|
2293
|
+
return o.length - r.length;
|
|
2294
|
+
}
|
|
2295
|
+
function Kt(e) {
|
|
2296
|
+
const t = e[e.length - 1];
|
|
2297
|
+
return e.length > 0 && t[t.length - 1] < 0;
|
|
2298
|
+
}
|
|
2299
|
+
const Ns = {
|
|
2300
|
+
type: 0,
|
|
2301
|
+
value: ""
|
|
2302
|
+
}, ks = /[a-zA-Z0-9_]/;
|
|
2303
|
+
function Cs(e) {
|
|
2304
|
+
if (!e)
|
|
2305
|
+
return [[]];
|
|
2306
|
+
if (e === "/")
|
|
2307
|
+
return [[Ns]];
|
|
2308
|
+
if (!e.startsWith("/"))
|
|
2309
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
|
|
2310
|
+
function t(m) {
|
|
2311
|
+
throw new Error(`ERR (${n})/"${f}": ${m}`);
|
|
2312
|
+
}
|
|
2313
|
+
let n = 0, r = n;
|
|
2314
|
+
const o = [];
|
|
2315
|
+
let i;
|
|
2316
|
+
function s() {
|
|
2317
|
+
i && o.push(i), i = [];
|
|
2318
|
+
}
|
|
2319
|
+
let a = 0, u, f = "", c = "";
|
|
2320
|
+
function l() {
|
|
2321
|
+
f && (n === 0 ? i.push({
|
|
2322
|
+
type: 0,
|
|
2323
|
+
value: f
|
|
2324
|
+
}) : n === 1 || n === 2 || n === 3 ? (i.length > 1 && (u === "*" || u === "+") && t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`), i.push({
|
|
2325
|
+
type: 1,
|
|
2326
|
+
value: f,
|
|
2327
|
+
regexp: c,
|
|
2328
|
+
repeatable: u === "*" || u === "+",
|
|
2329
|
+
optional: u === "*" || u === "?"
|
|
2330
|
+
})) : t("Invalid state to consume buffer"), f = "");
|
|
2331
|
+
}
|
|
2332
|
+
function d() {
|
|
2333
|
+
f += u;
|
|
2334
|
+
}
|
|
2335
|
+
for (; a < e.length; ) {
|
|
2336
|
+
if (u = e[a++], u === "\\" && n !== 2) {
|
|
2337
|
+
r = n, n = 4;
|
|
2338
|
+
continue;
|
|
2339
|
+
}
|
|
2340
|
+
switch (n) {
|
|
2341
|
+
case 0:
|
|
2342
|
+
u === "/" ? (f && l(), s()) : u === ":" ? (l(), n = 1) : d();
|
|
2343
|
+
break;
|
|
2344
|
+
case 4:
|
|
2345
|
+
d(), n = r;
|
|
2346
|
+
break;
|
|
2347
|
+
case 1:
|
|
2348
|
+
u === "(" ? n = 2 : ks.test(u) ? d() : (l(), n = 0, u !== "*" && u !== "?" && u !== "+" && a--);
|
|
2349
|
+
break;
|
|
2350
|
+
case 2:
|
|
2351
|
+
u === ")" ? c[c.length - 1] == "\\" ? c = c.slice(0, -1) + u : n = 3 : c += u;
|
|
2352
|
+
break;
|
|
2353
|
+
case 3:
|
|
2354
|
+
l(), n = 0, u !== "*" && u !== "?" && u !== "+" && a--, c = "";
|
|
2355
|
+
break;
|
|
2356
|
+
default:
|
|
2357
|
+
t("Unknown state");
|
|
2358
|
+
break;
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
return n === 2 && t(`Unfinished custom RegExp for param "${f}"`), l(), s(), o;
|
|
2362
|
+
}
|
|
2363
|
+
function xs(e, t, n) {
|
|
2364
|
+
const r = Ts(Cs(e.path), n);
|
|
2365
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2366
|
+
const i = /* @__PURE__ */ new Set();
|
|
2367
|
+
for (const s of r.keys)
|
|
2368
|
+
i.has(s.name) && A(`Found duplicated params with name "${s.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), i.add(s.name);
|
|
2369
|
+
}
|
|
2370
|
+
const o = k(r, {
|
|
2371
|
+
record: e,
|
|
2372
|
+
parent: t,
|
|
2373
|
+
// these needs to be populated by the parent
|
|
2374
|
+
children: [],
|
|
2375
|
+
alias: []
|
|
2376
|
+
});
|
|
2377
|
+
return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
|
|
2378
|
+
}
|
|
2379
|
+
function Ds(e, t) {
|
|
2380
|
+
const n = [], r = /* @__PURE__ */ new Map();
|
|
2381
|
+
t = Jt({ strict: !1, end: !0, sensitive: !1 }, t);
|
|
2382
|
+
function o(l) {
|
|
2383
|
+
return r.get(l);
|
|
2384
|
+
}
|
|
2385
|
+
function i(l, d, m) {
|
|
2386
|
+
const g = !m, E = Is(l);
|
|
2387
|
+
process.env.NODE_ENV !== "production" && Bs(E, d), E.aliasOf = m && m.record;
|
|
2388
|
+
const y = Jt(t, l), O = [
|
|
2389
|
+
E
|
|
2390
|
+
];
|
|
2391
|
+
if ("alias" in l) {
|
|
2392
|
+
const C = typeof l.alias == "string" ? [l.alias] : l.alias;
|
|
2393
|
+
for (const U of C)
|
|
2394
|
+
O.push(k({}, E, {
|
|
2395
|
+
// this allows us to hold a copy of the `components` option
|
|
2396
|
+
// so that async components cache is hold on the original record
|
|
2397
|
+
components: m ? m.record.components : E.components,
|
|
2398
|
+
path: U,
|
|
2399
|
+
// we might be the child of an alias
|
|
2400
|
+
aliasOf: m ? m.record : E
|
|
2401
|
+
// the aliases are always of the same kind as the original since they
|
|
2402
|
+
// are defined on the same record
|
|
2403
|
+
}));
|
|
2404
|
+
}
|
|
2405
|
+
let _, w;
|
|
2406
|
+
for (const C of O) {
|
|
2407
|
+
const { path: U } = C;
|
|
2408
|
+
if (d && U[0] !== "/") {
|
|
2409
|
+
const $ = d.record.path, x = $[$.length - 1] === "/" ? "" : "/";
|
|
2410
|
+
C.path = d.record.path + (U && x + U);
|
|
2411
|
+
}
|
|
2412
|
+
if (process.env.NODE_ENV !== "production" && C.path === "*")
|
|
2413
|
+
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
2414
|
+
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
|
|
2415
|
+
if (_ = xs(C, d, y), process.env.NODE_ENV !== "production" && d && U[0] === "/" && js(_, d), m ? (m.alias.push(_), process.env.NODE_ENV !== "production" && Us(m, _)) : (w = w || _, w !== _ && w.alias.push(_), g && l.name && !Gt(_) && s(l.name)), jn(_) && u(_), E.children) {
|
|
2416
|
+
const $ = E.children;
|
|
2417
|
+
for (let x = 0; x < $.length; x++)
|
|
2418
|
+
i($[x], _, m && m.children[x]);
|
|
2419
|
+
}
|
|
2420
|
+
m = m || _;
|
|
2421
|
+
}
|
|
2422
|
+
return w ? () => {
|
|
2423
|
+
s(w);
|
|
2424
|
+
} : me;
|
|
2425
|
+
}
|
|
2426
|
+
function s(l) {
|
|
2427
|
+
if (Un(l)) {
|
|
2428
|
+
const d = r.get(l);
|
|
2429
|
+
d && (r.delete(l), n.splice(n.indexOf(d), 1), d.children.forEach(s), d.alias.forEach(s));
|
|
2430
|
+
} else {
|
|
2431
|
+
const d = n.indexOf(l);
|
|
2432
|
+
d > -1 && (n.splice(d, 1), l.record.name && r.delete(l.record.name), l.children.forEach(s), l.alias.forEach(s));
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
function a() {
|
|
2436
|
+
return n;
|
|
2437
|
+
}
|
|
2438
|
+
function u(l) {
|
|
2439
|
+
const d = Fs(l, n);
|
|
2440
|
+
n.splice(d, 0, l), l.record.name && !Gt(l) && r.set(l.record.name, l);
|
|
2441
|
+
}
|
|
2442
|
+
function f(l, d) {
|
|
2443
|
+
let m, g = {}, E, y;
|
|
2444
|
+
if ("name" in l && l.name) {
|
|
2445
|
+
if (m = r.get(l.name), !m)
|
|
2446
|
+
throw ie(1, {
|
|
2447
|
+
location: l
|
|
2448
|
+
});
|
|
2449
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2450
|
+
const w = Object.keys(l.params || {}).filter((C) => !m.keys.find((U) => U.name === C));
|
|
2451
|
+
w.length && A(`Discarded invalid param(s) "${w.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
|
2452
|
+
}
|
|
2453
|
+
y = m.record.name, g = k(
|
|
2454
|
+
// paramsFromLocation is a new object
|
|
2455
|
+
Wt(
|
|
2456
|
+
d.params,
|
|
2457
|
+
// only keep params that exist in the resolved location
|
|
2458
|
+
// only keep optional params coming from a parent record
|
|
2459
|
+
m.keys.filter((w) => !w.optional).concat(m.parent ? m.parent.keys.filter((w) => w.optional) : []).map((w) => w.name)
|
|
2460
|
+
),
|
|
2461
|
+
// discard any existing params in the current location that do not exist here
|
|
2462
|
+
// #1497 this ensures better active/exact matching
|
|
2463
|
+
l.params && Wt(l.params, m.keys.map((w) => w.name))
|
|
2464
|
+
), E = m.stringify(g);
|
|
2465
|
+
} else if (l.path != null)
|
|
2466
|
+
E = l.path, process.env.NODE_ENV !== "production" && !E.startsWith("/") && A(`The Matcher cannot resolve relative paths but received "${E}". Unless you directly called \`matcher.resolve("${E}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), m = n.find((w) => w.re.test(E)), m && (g = m.parse(E), y = m.record.name);
|
|
2467
|
+
else {
|
|
2468
|
+
if (m = d.name ? r.get(d.name) : n.find((w) => w.re.test(d.path)), !m)
|
|
2469
|
+
throw ie(1, {
|
|
2470
|
+
location: l,
|
|
2471
|
+
currentLocation: d
|
|
2472
|
+
});
|
|
2473
|
+
y = m.record.name, g = k({}, d.params, l.params), E = m.stringify(g);
|
|
2474
|
+
}
|
|
2475
|
+
const O = [];
|
|
2476
|
+
let _ = m;
|
|
2477
|
+
for (; _; )
|
|
2478
|
+
O.unshift(_.record), _ = _.parent;
|
|
2479
|
+
return {
|
|
2480
|
+
name: y,
|
|
2481
|
+
path: E,
|
|
2482
|
+
params: g,
|
|
2483
|
+
matched: O,
|
|
2484
|
+
meta: $s(O)
|
|
2485
|
+
};
|
|
2486
|
+
}
|
|
2487
|
+
e.forEach((l) => i(l));
|
|
2488
|
+
function c() {
|
|
2489
|
+
n.length = 0, r.clear();
|
|
2490
|
+
}
|
|
2491
|
+
return {
|
|
2492
|
+
addRoute: i,
|
|
2493
|
+
resolve: f,
|
|
2494
|
+
removeRoute: s,
|
|
2495
|
+
clearRoutes: c,
|
|
2496
|
+
getRoutes: a,
|
|
2497
|
+
getRecordMatcher: o
|
|
2498
|
+
};
|
|
2499
|
+
}
|
|
2500
|
+
function Wt(e, t) {
|
|
2501
|
+
const n = {};
|
|
2502
|
+
for (const r of t)
|
|
2503
|
+
r in e && (n[r] = e[r]);
|
|
2504
|
+
return n;
|
|
2505
|
+
}
|
|
2506
|
+
function Is(e) {
|
|
2507
|
+
return {
|
|
2508
|
+
path: e.path,
|
|
2509
|
+
redirect: e.redirect,
|
|
2510
|
+
name: e.name,
|
|
2511
|
+
meta: e.meta || {},
|
|
2512
|
+
aliasOf: void 0,
|
|
2513
|
+
beforeEnter: e.beforeEnter,
|
|
2514
|
+
props: Ls(e),
|
|
2515
|
+
children: e.children || [],
|
|
2516
|
+
instances: {},
|
|
2517
|
+
leaveGuards: /* @__PURE__ */ new Set(),
|
|
2518
|
+
updateGuards: /* @__PURE__ */ new Set(),
|
|
2519
|
+
enterCallbacks: {},
|
|
2520
|
+
components: "components" in e ? e.components || null : e.component && { default: e.component }
|
|
2521
|
+
};
|
|
2522
|
+
}
|
|
2523
|
+
function Ls(e) {
|
|
2524
|
+
const t = {}, n = e.props || !1;
|
|
2525
|
+
if ("component" in e)
|
|
2526
|
+
t.default = n;
|
|
2527
|
+
else
|
|
2528
|
+
for (const r in e.components)
|
|
2529
|
+
t[r] = typeof n == "object" ? n[r] : n;
|
|
2530
|
+
return t;
|
|
2531
|
+
}
|
|
2532
|
+
function Gt(e) {
|
|
2533
|
+
for (; e; ) {
|
|
2534
|
+
if (e.record.aliasOf)
|
|
2535
|
+
return !0;
|
|
2536
|
+
e = e.parent;
|
|
2537
|
+
}
|
|
2538
|
+
return !1;
|
|
2539
|
+
}
|
|
2540
|
+
function $s(e) {
|
|
2541
|
+
return e.reduce((t, n) => k(t, n.meta), {});
|
|
2542
|
+
}
|
|
2543
|
+
function Jt(e, t) {
|
|
2544
|
+
const n = {};
|
|
2545
|
+
for (const r in e)
|
|
2546
|
+
n[r] = r in t ? t[r] : e[r];
|
|
2547
|
+
return n;
|
|
2548
|
+
}
|
|
2549
|
+
function at(e, t) {
|
|
2550
|
+
return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
|
|
2551
|
+
}
|
|
2552
|
+
function Us(e, t) {
|
|
2553
|
+
for (const n of e.keys)
|
|
2554
|
+
if (!n.optional && !t.keys.find(at.bind(null, n)))
|
|
2555
|
+
return A(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
|
2556
|
+
for (const n of t.keys)
|
|
2557
|
+
if (!n.optional && !e.keys.find(at.bind(null, n)))
|
|
2558
|
+
return A(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
|
2559
|
+
}
|
|
2560
|
+
function Bs(e, t) {
|
|
2561
|
+
t && t.record.name && !e.name && !e.path && A(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
|
|
2562
|
+
}
|
|
2563
|
+
function js(e, t) {
|
|
2564
|
+
for (const n of t.keys)
|
|
2565
|
+
if (!e.keys.find(at.bind(null, n)))
|
|
2566
|
+
return A(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
|
|
2567
|
+
}
|
|
2568
|
+
function Fs(e, t) {
|
|
2569
|
+
let n = 0, r = t.length;
|
|
2570
|
+
for (; n !== r; ) {
|
|
2571
|
+
const i = n + r >> 1;
|
|
2572
|
+
Bn(e, t[i]) < 0 ? r = i : n = i + 1;
|
|
2573
|
+
}
|
|
2574
|
+
const o = Vs(e);
|
|
2575
|
+
return o && (r = t.lastIndexOf(o, r - 1), process.env.NODE_ENV !== "production" && r < 0 && A(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
|
|
2576
|
+
}
|
|
2577
|
+
function Vs(e) {
|
|
2578
|
+
let t = e;
|
|
2579
|
+
for (; t = t.parent; )
|
|
2580
|
+
if (jn(t) && Bn(e, t) === 0)
|
|
2581
|
+
return t;
|
|
2582
|
+
}
|
|
2583
|
+
function jn({ record: e }) {
|
|
2584
|
+
return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
|
|
2585
|
+
}
|
|
2586
|
+
function Ms(e) {
|
|
2587
|
+
const t = {};
|
|
2588
|
+
if (e === "" || e === "?")
|
|
2589
|
+
return t;
|
|
2590
|
+
const r = (e[0] === "?" ? e.slice(1) : e).split("&");
|
|
2591
|
+
for (let o = 0; o < r.length; ++o) {
|
|
2592
|
+
const i = r[o].replace(Cn, " "), s = i.indexOf("="), a = se(s < 0 ? i : i.slice(0, s)), u = s < 0 ? null : se(i.slice(s + 1));
|
|
2593
|
+
if (a in t) {
|
|
2594
|
+
let f = t[a];
|
|
2595
|
+
V(f) || (f = t[a] = [f]), f.push(u);
|
|
2596
|
+
} else
|
|
2597
|
+
t[a] = u;
|
|
2598
|
+
}
|
|
2599
|
+
return t;
|
|
2600
|
+
}
|
|
2601
|
+
function Qt(e) {
|
|
2602
|
+
let t = "";
|
|
2603
|
+
for (let n in e) {
|
|
2604
|
+
const r = e[n];
|
|
2605
|
+
if (n = rs(n), r == null) {
|
|
2606
|
+
r !== void 0 && (t += (t.length ? "&" : "") + n);
|
|
2607
|
+
continue;
|
|
2608
|
+
}
|
|
2609
|
+
(V(r) ? r.map((i) => i && ot(i)) : [r && ot(r)]).forEach((i) => {
|
|
2610
|
+
i !== void 0 && (t += (t.length ? "&" : "") + n, i != null && (t += "=" + i));
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
return t;
|
|
2614
|
+
}
|
|
2615
|
+
function qs(e) {
|
|
2616
|
+
const t = {};
|
|
2617
|
+
for (const n in e) {
|
|
2618
|
+
const r = e[n];
|
|
2619
|
+
r !== void 0 && (t[n] = V(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
|
|
2620
|
+
}
|
|
2621
|
+
return t;
|
|
2622
|
+
}
|
|
2623
|
+
const Hs = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), Xt = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), vt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), Fn = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), ct = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
2624
|
+
function he() {
|
|
2625
|
+
let e = [];
|
|
2626
|
+
function t(r) {
|
|
2627
|
+
return e.push(r), () => {
|
|
2628
|
+
const o = e.indexOf(r);
|
|
2629
|
+
o > -1 && e.splice(o, 1);
|
|
2630
|
+
};
|
|
2631
|
+
}
|
|
2632
|
+
function n() {
|
|
2633
|
+
e = [];
|
|
2634
|
+
}
|
|
2635
|
+
return {
|
|
2636
|
+
add: t,
|
|
2637
|
+
list: () => e.slice(),
|
|
2638
|
+
reset: n
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
function Q(e, t, n, r, o, i = (s) => s()) {
|
|
2642
|
+
const s = r && // name is defined if record is because of the function overload
|
|
2643
|
+
(r.enterCallbacks[o] = r.enterCallbacks[o] || []);
|
|
2644
|
+
return () => new Promise((a, u) => {
|
|
2645
|
+
const f = (d) => {
|
|
2646
|
+
d === !1 ? u(ie(4, {
|
|
2647
|
+
from: n,
|
|
2648
|
+
to: t
|
|
2649
|
+
})) : d instanceof Error ? u(d) : ke(d) ? u(ie(2, {
|
|
2650
|
+
from: t,
|
|
2651
|
+
to: d
|
|
2652
|
+
})) : (s && // since enterCallbackArray is truthy, both record and name also are
|
|
2653
|
+
r.enterCallbacks[o] === s && typeof d == "function" && s.push(d), a());
|
|
2654
|
+
}, c = i(() => e.call(r && r.instances[o], t, n, process.env.NODE_ENV !== "production" ? zs(f, t, n) : f));
|
|
2655
|
+
let l = Promise.resolve(c);
|
|
2656
|
+
if (e.length < 3 && (l = l.then(f)), process.env.NODE_ENV !== "production" && e.length > 2) {
|
|
2657
|
+
const d = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
|
|
2658
|
+
${e.toString()}
|
|
2659
|
+
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
|
|
2660
|
+
if (typeof c == "object" && "then" in c)
|
|
2661
|
+
l = l.then((m) => f._called ? m : (A(d), Promise.reject(new Error("Invalid navigation guard"))));
|
|
2662
|
+
else if (c !== void 0 && !f._called) {
|
|
2663
|
+
A(d), u(new Error("Invalid navigation guard"));
|
|
2664
|
+
return;
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
l.catch((d) => u(d));
|
|
2668
|
+
});
|
|
2669
|
+
}
|
|
2670
|
+
function zs(e, t, n) {
|
|
2671
|
+
let r = 0;
|
|
2672
|
+
return function() {
|
|
2673
|
+
r++ === 1 && A(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, r === 1 && e.apply(null, arguments);
|
|
2674
|
+
};
|
|
2675
|
+
}
|
|
2676
|
+
function Je(e, t, n, r, o = (i) => i()) {
|
|
2677
|
+
const i = [];
|
|
2678
|
+
for (const s of e) {
|
|
2679
|
+
process.env.NODE_ENV !== "production" && !s.components && !s.children.length && A(`Record with path "${s.path}" is either missing a "component(s)" or "children" property.`);
|
|
2680
|
+
for (const a in s.components) {
|
|
2681
|
+
let u = s.components[a];
|
|
2682
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2683
|
+
if (!u || typeof u != "object" && typeof u != "function")
|
|
2684
|
+
throw A(`Component "${a}" in record with path "${s.path}" is not a valid component. Received "${String(u)}".`), new Error("Invalid route component");
|
|
2685
|
+
if ("then" in u) {
|
|
2686
|
+
A(`Component "${a}" in record with path "${s.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
|
|
2687
|
+
const f = u;
|
|
2688
|
+
u = () => f;
|
|
2689
|
+
} else u.__asyncLoader && // warn only once per component
|
|
2690
|
+
!u.__warnedDefineAsync && (u.__warnedDefineAsync = !0, A(`Component "${a}" in record with path "${s.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
|
|
2691
|
+
}
|
|
2692
|
+
if (!(t !== "beforeRouteEnter" && !s.instances[a]))
|
|
2693
|
+
if (Ks(u)) {
|
|
2694
|
+
const c = (u.__vccOpts || u)[t];
|
|
2695
|
+
c && i.push(Q(c, n, r, s, a, o));
|
|
2696
|
+
} else {
|
|
2697
|
+
let f = u();
|
|
2698
|
+
process.env.NODE_ENV !== "production" && !("catch" in f) && (A(`Component "${a}" in record with path "${s.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), f = Promise.resolve(f)), i.push(() => f.then((c) => {
|
|
2699
|
+
if (!c)
|
|
2700
|
+
return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${s.path}"`));
|
|
2701
|
+
const l = Ko(c) ? c.default : c;
|
|
2702
|
+
s.components[a] = l;
|
|
2703
|
+
const m = (l.__vccOpts || l)[t];
|
|
2704
|
+
return m && Q(m, n, r, s, a, o)();
|
|
2705
|
+
}));
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
return i;
|
|
2710
|
+
}
|
|
2711
|
+
function Ks(e) {
|
|
2712
|
+
return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
|
|
2713
|
+
}
|
|
2714
|
+
function Yt(e) {
|
|
2715
|
+
const t = ye(vt), n = ye(Fn);
|
|
2716
|
+
let r = !1, o = null;
|
|
2717
|
+
const i = H(() => {
|
|
2718
|
+
const c = oe(e.to);
|
|
2719
|
+
return process.env.NODE_ENV !== "production" && (!r || c !== o) && (ke(c) || (r ? A(`Invalid value for prop "to" in useLink()
|
|
2720
|
+
- to:`, c, `
|
|
2721
|
+
- previous to:`, o, `
|
|
2722
|
+
- props:`, e) : A(`Invalid value for prop "to" in useLink()
|
|
2723
|
+
- to:`, c, `
|
|
2724
|
+
- props:`, e)), o = c, r = !0), t.resolve(c);
|
|
2725
|
+
}), s = H(() => {
|
|
2726
|
+
const { matched: c } = i.value, { length: l } = c, d = c[l - 1], m = n.matched;
|
|
2727
|
+
if (!d || !m.length)
|
|
2728
|
+
return -1;
|
|
2729
|
+
const g = m.findIndex(X.bind(null, d));
|
|
2730
|
+
if (g > -1)
|
|
2731
|
+
return g;
|
|
2732
|
+
const E = Zt(c[l - 2]);
|
|
2733
|
+
return (
|
|
2734
|
+
// we are dealing with nested routes
|
|
2735
|
+
l > 1 && // if the parent and matched route have the same path, this link is
|
|
2736
|
+
// referring to the empty child. Or we currently are on a different
|
|
2737
|
+
// child of the same parent
|
|
2738
|
+
Zt(d) === E && // avoid comparing the child with its parent
|
|
2739
|
+
m[m.length - 1].path !== E ? m.findIndex(X.bind(null, c[l - 2])) : g
|
|
2740
|
+
);
|
|
2741
|
+
}), a = H(() => s.value > -1 && Qs(n.params, i.value.params)), u = H(() => s.value > -1 && s.value === n.matched.length - 1 && Ln(n.params, i.value.params));
|
|
2742
|
+
function f(c = {}) {
|
|
2743
|
+
return Js(c) ? t[oe(e.replace) ? "replace" : "push"](
|
|
2744
|
+
oe(e.to)
|
|
2745
|
+
// avoid uncaught errors are they are logged anyway
|
|
2746
|
+
).catch(me) : Promise.resolve();
|
|
2747
|
+
}
|
|
2748
|
+
if (process.env.NODE_ENV !== "production" && K) {
|
|
2749
|
+
const c = dt();
|
|
2750
|
+
if (c) {
|
|
2751
|
+
const l = {
|
|
2752
|
+
route: i.value,
|
|
2753
|
+
isActive: a.value,
|
|
2754
|
+
isExactActive: u.value,
|
|
2755
|
+
error: null
|
|
2756
|
+
};
|
|
2757
|
+
c.__vrl_devtools = c.__vrl_devtools || [], c.__vrl_devtools.push(l), ir(() => {
|
|
2758
|
+
l.route = i.value, l.isActive = a.value, l.isExactActive = u.value, l.error = ke(oe(e.to)) ? null : 'Invalid "to" value';
|
|
2759
|
+
}, { flush: "post" });
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
return {
|
|
2763
|
+
route: i,
|
|
2764
|
+
href: H(() => i.value.href),
|
|
2765
|
+
isActive: a,
|
|
2766
|
+
isExactActive: u,
|
|
2767
|
+
navigate: f
|
|
2768
|
+
};
|
|
2769
|
+
}
|
|
2770
|
+
const Ws = /* @__PURE__ */ ft({
|
|
2771
|
+
name: "RouterLink",
|
|
2772
|
+
compatConfig: { MODE: 3 },
|
|
2773
|
+
props: {
|
|
2774
|
+
to: {
|
|
2775
|
+
type: [String, Object],
|
|
2776
|
+
required: !0
|
|
2777
|
+
},
|
|
2778
|
+
replace: Boolean,
|
|
2779
|
+
activeClass: String,
|
|
2780
|
+
// inactiveClass: String,
|
|
2781
|
+
exactActiveClass: String,
|
|
2782
|
+
custom: Boolean,
|
|
2783
|
+
ariaCurrentValue: {
|
|
2784
|
+
type: String,
|
|
2785
|
+
default: "page"
|
|
2786
|
+
}
|
|
2787
|
+
},
|
|
2788
|
+
useLink: Yt,
|
|
2789
|
+
setup(e, { slots: t }) {
|
|
2790
|
+
const n = or(Yt(e)), { options: r } = ye(vt), o = H(() => ({
|
|
2791
|
+
[en(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
|
|
2792
|
+
// [getLinkClass(
|
|
2793
|
+
// props.inactiveClass,
|
|
2794
|
+
// options.linkInactiveClass,
|
|
2795
|
+
// 'router-link-inactive'
|
|
2796
|
+
// )]: !link.isExactActive,
|
|
2797
|
+
[en(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
|
|
2798
|
+
}));
|
|
2799
|
+
return () => {
|
|
2800
|
+
const i = t.default && t.default(n);
|
|
2801
|
+
return e.custom ? i : nn("a", {
|
|
2802
|
+
"aria-current": n.isExactActive ? e.ariaCurrentValue : null,
|
|
2803
|
+
href: n.href,
|
|
2804
|
+
// this would override user added attrs but Vue will still add
|
|
2805
|
+
// the listener, so we end up triggering both
|
|
2806
|
+
onClick: n.navigate,
|
|
2807
|
+
class: o.value
|
|
2808
|
+
}, i);
|
|
2809
|
+
};
|
|
2810
|
+
}
|
|
2811
|
+
}), Gs = Ws;
|
|
2812
|
+
function Js(e) {
|
|
2813
|
+
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
|
|
2814
|
+
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
2815
|
+
const t = e.currentTarget.getAttribute("target");
|
|
2816
|
+
if (/\b_blank\b/i.test(t))
|
|
2817
|
+
return;
|
|
2818
|
+
}
|
|
2819
|
+
return e.preventDefault && e.preventDefault(), !0;
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
function Qs(e, t) {
|
|
2823
|
+
for (const n in t) {
|
|
2824
|
+
const r = t[n], o = e[n];
|
|
2825
|
+
if (typeof r == "string") {
|
|
2826
|
+
if (r !== o)
|
|
2827
|
+
return !1;
|
|
2828
|
+
} else if (!V(o) || o.length !== r.length || r.some((i, s) => i !== o[s]))
|
|
2829
|
+
return !1;
|
|
2830
|
+
}
|
|
2831
|
+
return !0;
|
|
2832
|
+
}
|
|
2833
|
+
function Zt(e) {
|
|
2834
|
+
return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
|
|
2835
|
+
}
|
|
2836
|
+
const en = (e, t, n) => e ?? t ?? n, Xs = /* @__PURE__ */ ft({
|
|
2837
|
+
name: "RouterView",
|
|
2838
|
+
// #674 we manually inherit them
|
|
2839
|
+
inheritAttrs: !1,
|
|
2840
|
+
props: {
|
|
2841
|
+
name: {
|
|
2842
|
+
type: String,
|
|
2843
|
+
default: "default"
|
|
2844
|
+
},
|
|
2845
|
+
route: Object
|
|
2846
|
+
},
|
|
2847
|
+
// Better compat for @vue/compat users
|
|
2848
|
+
// https://github.com/vuejs/router/issues/1315
|
|
2849
|
+
compatConfig: { MODE: 3 },
|
|
2850
|
+
setup(e, { attrs: t, slots: n }) {
|
|
2851
|
+
process.env.NODE_ENV !== "production" && Zs();
|
|
2852
|
+
const r = ye(ct), o = H(() => e.route || r.value), i = ye(Xt, 0), s = H(() => {
|
|
2853
|
+
let f = oe(i);
|
|
2854
|
+
const { matched: c } = o.value;
|
|
2855
|
+
let l;
|
|
2856
|
+
for (; (l = c[f]) && !l.components; )
|
|
2857
|
+
f++;
|
|
2858
|
+
return f;
|
|
2859
|
+
}), a = H(() => o.value.matched[s.value]);
|
|
2860
|
+
Me(Xt, H(() => s.value + 1)), Me(Hs, a), Me(ct, o);
|
|
2861
|
+
const u = sr();
|
|
2862
|
+
return rn(() => [u.value, a.value, e.name], ([f, c, l], [d, m, g]) => {
|
|
2863
|
+
c && (c.instances[l] = f, m && m !== c && f && f === d && (c.leaveGuards.size || (c.leaveGuards = m.leaveGuards), c.updateGuards.size || (c.updateGuards = m.updateGuards))), f && c && // if there is no instance but to and from are the same this might be
|
|
2864
|
+
// the first visit
|
|
2865
|
+
(!m || !X(c, m) || !d) && (c.enterCallbacks[l] || []).forEach((E) => E(f));
|
|
2866
|
+
}, { flush: "post" }), () => {
|
|
2867
|
+
const f = o.value, c = e.name, l = a.value, d = l && l.components[c];
|
|
2868
|
+
if (!d)
|
|
2869
|
+
return tn(n.default, { Component: d, route: f });
|
|
2870
|
+
const m = l.props[c], g = m ? m === !0 ? f.params : typeof m == "function" ? m(f) : m : null, y = nn(d, k({}, g, t, {
|
|
2871
|
+
onVnodeUnmounted: (O) => {
|
|
2872
|
+
O.component.isUnmounted && (l.instances[c] = null);
|
|
2873
|
+
},
|
|
2874
|
+
ref: u
|
|
2875
|
+
}));
|
|
2876
|
+
if (process.env.NODE_ENV !== "production" && K && y.ref) {
|
|
2877
|
+
const O = {
|
|
2878
|
+
depth: s.value,
|
|
2879
|
+
name: l.name,
|
|
2880
|
+
path: l.path,
|
|
2881
|
+
meta: l.meta
|
|
2882
|
+
};
|
|
2883
|
+
(V(y.ref) ? y.ref.map((w) => w.i) : [y.ref.i]).forEach((w) => {
|
|
2884
|
+
w.__vrv_devtools = O;
|
|
2885
|
+
});
|
|
2886
|
+
}
|
|
2887
|
+
return (
|
|
2888
|
+
// pass the vnode to the slot as a prop.
|
|
2889
|
+
// h and <component :is="..."> both accept vnodes
|
|
2890
|
+
tn(n.default, { Component: y, route: f }) || y
|
|
2891
|
+
);
|
|
2892
|
+
};
|
|
2893
|
+
}
|
|
2894
|
+
});
|
|
2895
|
+
function tn(e, t) {
|
|
2896
|
+
if (!e)
|
|
2897
|
+
return null;
|
|
2898
|
+
const n = e(t);
|
|
2899
|
+
return n.length === 1 ? n[0] : n;
|
|
2900
|
+
}
|
|
2901
|
+
const Ys = Xs;
|
|
2902
|
+
function Zs() {
|
|
2903
|
+
const e = dt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
|
|
2904
|
+
if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
|
|
2905
|
+
const r = t === "KeepAlive" ? "keep-alive" : "transition";
|
|
2906
|
+
A(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
|
2907
|
+
Use slot props instead:
|
|
2908
|
+
|
|
2909
|
+
<router-view v-slot="{ Component }">
|
|
2910
|
+
<${r}>
|
|
2911
|
+
<component :is="Component" />
|
|
2912
|
+
</${r}>
|
|
2913
|
+
</router-view>`);
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
function pe(e, t) {
|
|
2917
|
+
const n = k({}, e, {
|
|
2918
|
+
// remove variables that can contain vue instances
|
|
2919
|
+
matched: e.matched.map((r) => ui(r, ["instances", "children", "aliasOf"]))
|
|
2920
|
+
});
|
|
2921
|
+
return {
|
|
2922
|
+
_custom: {
|
|
2923
|
+
type: null,
|
|
2924
|
+
readOnly: !0,
|
|
2925
|
+
display: e.fullPath,
|
|
2926
|
+
tooltip: t,
|
|
2927
|
+
value: n
|
|
2928
|
+
}
|
|
2929
|
+
};
|
|
2930
|
+
}
|
|
2931
|
+
function Se(e) {
|
|
2932
|
+
return {
|
|
2933
|
+
_custom: {
|
|
2934
|
+
display: e
|
|
2935
|
+
}
|
|
2936
|
+
};
|
|
2937
|
+
}
|
|
2938
|
+
let ei = 0;
|
|
2939
|
+
function ti(e, t, n) {
|
|
2940
|
+
if (t.__hasDevtools)
|
|
2941
|
+
return;
|
|
2942
|
+
t.__hasDevtools = !0;
|
|
2943
|
+
const r = ei++;
|
|
2944
|
+
zo({
|
|
2945
|
+
id: "org.vuejs.router" + (r ? "." + r : ""),
|
|
2946
|
+
label: "Vue Router",
|
|
2947
|
+
packageName: "vue-router",
|
|
2948
|
+
homepage: "https://router.vuejs.org",
|
|
2949
|
+
logo: "https://router.vuejs.org/logo.png",
|
|
2950
|
+
componentStateTypes: ["Routing"],
|
|
2951
|
+
app: e
|
|
2952
|
+
}, (o) => {
|
|
2953
|
+
typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((c, l) => {
|
|
2954
|
+
c.instanceData && c.instanceData.state.push({
|
|
2955
|
+
type: "Routing",
|
|
2956
|
+
key: "$route",
|
|
2957
|
+
editable: !1,
|
|
2958
|
+
value: pe(t.currentRoute.value, "Current Route")
|
|
2959
|
+
});
|
|
2960
|
+
}), o.on.visitComponentTree(({ treeNode: c, componentInstance: l }) => {
|
|
2961
|
+
if (l.__vrv_devtools) {
|
|
2962
|
+
const d = l.__vrv_devtools;
|
|
2963
|
+
c.tags.push({
|
|
2964
|
+
label: (d.name ? `${d.name.toString()}: ` : "") + d.path,
|
|
2965
|
+
textColor: 0,
|
|
2966
|
+
tooltip: "This component is rendered by <router-view>",
|
|
2967
|
+
backgroundColor: Vn
|
|
2968
|
+
});
|
|
2969
|
+
}
|
|
2970
|
+
V(l.__vrl_devtools) && (l.__devtoolsApi = o, l.__vrl_devtools.forEach((d) => {
|
|
2971
|
+
let m = d.route.path, g = Hn, E = "", y = 0;
|
|
2972
|
+
d.error ? (m = d.error, g = ii, y = ai) : d.isExactActive ? (g = qn, E = "This is exactly active") : d.isActive && (g = Mn, E = "This link is active"), c.tags.push({
|
|
2973
|
+
label: m,
|
|
2974
|
+
textColor: y,
|
|
2975
|
+
tooltip: E,
|
|
2976
|
+
backgroundColor: g
|
|
2977
|
+
});
|
|
2978
|
+
}));
|
|
2979
|
+
}), rn(t.currentRoute, () => {
|
|
2980
|
+
u(), o.notifyComponentUpdate(), o.sendInspectorTree(a), o.sendInspectorState(a);
|
|
2981
|
+
});
|
|
2982
|
+
const i = "router:navigations:" + r;
|
|
2983
|
+
o.addTimelineLayer({
|
|
2984
|
+
id: i,
|
|
2985
|
+
label: `Router${r ? " " + r : ""} Navigations`,
|
|
2986
|
+
color: 4237508
|
|
2987
|
+
}), t.onError((c, l) => {
|
|
2988
|
+
o.addTimelineEvent({
|
|
2989
|
+
layerId: i,
|
|
2990
|
+
event: {
|
|
2991
|
+
title: "Error during Navigation",
|
|
2992
|
+
subtitle: l.fullPath,
|
|
2993
|
+
logType: "error",
|
|
2994
|
+
time: o.now(),
|
|
2995
|
+
data: { error: c },
|
|
2996
|
+
groupId: l.meta.__navigationId
|
|
2997
|
+
}
|
|
2998
|
+
});
|
|
2999
|
+
});
|
|
3000
|
+
let s = 0;
|
|
3001
|
+
t.beforeEach((c, l) => {
|
|
3002
|
+
const d = {
|
|
3003
|
+
guard: Se("beforeEach"),
|
|
3004
|
+
from: pe(l, "Current Location during this navigation"),
|
|
3005
|
+
to: pe(c, "Target location")
|
|
3006
|
+
};
|
|
3007
|
+
Object.defineProperty(c.meta, "__navigationId", {
|
|
3008
|
+
value: s++
|
|
3009
|
+
}), o.addTimelineEvent({
|
|
3010
|
+
layerId: i,
|
|
3011
|
+
event: {
|
|
3012
|
+
time: o.now(),
|
|
3013
|
+
title: "Start of navigation",
|
|
3014
|
+
subtitle: c.fullPath,
|
|
3015
|
+
data: d,
|
|
3016
|
+
groupId: c.meta.__navigationId
|
|
3017
|
+
}
|
|
3018
|
+
});
|
|
3019
|
+
}), t.afterEach((c, l, d) => {
|
|
3020
|
+
const m = {
|
|
3021
|
+
guard: Se("afterEach")
|
|
3022
|
+
};
|
|
3023
|
+
d ? (m.failure = {
|
|
3024
|
+
_custom: {
|
|
3025
|
+
type: Error,
|
|
3026
|
+
readOnly: !0,
|
|
3027
|
+
display: d ? d.message : "",
|
|
3028
|
+
tooltip: "Navigation Failure",
|
|
3029
|
+
value: d
|
|
3030
|
+
}
|
|
3031
|
+
}, m.status = Se("❌")) : m.status = Se("✅"), m.from = pe(l, "Current Location during this navigation"), m.to = pe(c, "Target location"), o.addTimelineEvent({
|
|
3032
|
+
layerId: i,
|
|
3033
|
+
event: {
|
|
3034
|
+
title: "End of navigation",
|
|
3035
|
+
subtitle: c.fullPath,
|
|
3036
|
+
time: o.now(),
|
|
3037
|
+
data: m,
|
|
3038
|
+
logType: d ? "warning" : "default",
|
|
3039
|
+
groupId: c.meta.__navigationId
|
|
3040
|
+
}
|
|
3041
|
+
});
|
|
3042
|
+
});
|
|
3043
|
+
const a = "router-inspector:" + r;
|
|
3044
|
+
o.addInspector({
|
|
3045
|
+
id: a,
|
|
3046
|
+
label: "Routes" + (r ? " " + r : ""),
|
|
3047
|
+
icon: "book",
|
|
3048
|
+
treeFilterPlaceholder: "Search routes"
|
|
3049
|
+
});
|
|
3050
|
+
function u() {
|
|
3051
|
+
if (!f)
|
|
3052
|
+
return;
|
|
3053
|
+
const c = f;
|
|
3054
|
+
let l = n.getRoutes().filter((d) => !d.parent || // these routes have a parent with no component which will not appear in the view
|
|
3055
|
+
// therefore we still need to include them
|
|
3056
|
+
!d.parent.record.components);
|
|
3057
|
+
l.forEach(Wn), c.filter && (l = l.filter((d) => (
|
|
3058
|
+
// save matches state based on the payload
|
|
3059
|
+
lt(d, c.filter.toLowerCase())
|
|
3060
|
+
))), l.forEach((d) => Kn(d, t.currentRoute.value)), c.rootNodes = l.map(zn);
|
|
3061
|
+
}
|
|
3062
|
+
let f;
|
|
3063
|
+
o.on.getInspectorTree((c) => {
|
|
3064
|
+
f = c, c.app === e && c.inspectorId === a && u();
|
|
3065
|
+
}), o.on.getInspectorState((c) => {
|
|
3066
|
+
if (c.app === e && c.inspectorId === a) {
|
|
3067
|
+
const d = n.getRoutes().find((m) => m.record.__vd_id === c.nodeId);
|
|
3068
|
+
d && (c.state = {
|
|
3069
|
+
options: ri(d)
|
|
3070
|
+
});
|
|
3071
|
+
}
|
|
3072
|
+
}), o.sendInspectorTree(a), o.sendInspectorState(a);
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
function ni(e) {
|
|
3076
|
+
return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
|
|
3077
|
+
}
|
|
3078
|
+
function ri(e) {
|
|
3079
|
+
const { record: t } = e, n = [
|
|
3080
|
+
{ editable: !1, key: "path", value: t.path }
|
|
3081
|
+
];
|
|
3082
|
+
return t.name != null && n.push({
|
|
3083
|
+
editable: !1,
|
|
3084
|
+
key: "name",
|
|
3085
|
+
value: t.name
|
|
3086
|
+
}), n.push({ editable: !1, key: "regexp", value: e.re }), e.keys.length && n.push({
|
|
3087
|
+
editable: !1,
|
|
3088
|
+
key: "keys",
|
|
3089
|
+
value: {
|
|
3090
|
+
_custom: {
|
|
3091
|
+
type: null,
|
|
3092
|
+
readOnly: !0,
|
|
3093
|
+
display: e.keys.map((r) => `${r.name}${ni(r)}`).join(" "),
|
|
3094
|
+
tooltip: "Param keys",
|
|
3095
|
+
value: e.keys
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
}), t.redirect != null && n.push({
|
|
3099
|
+
editable: !1,
|
|
3100
|
+
key: "redirect",
|
|
3101
|
+
value: t.redirect
|
|
3102
|
+
}), e.alias.length && n.push({
|
|
3103
|
+
editable: !1,
|
|
3104
|
+
key: "aliases",
|
|
3105
|
+
value: e.alias.map((r) => r.record.path)
|
|
3106
|
+
}), Object.keys(e.record.meta).length && n.push({
|
|
3107
|
+
editable: !1,
|
|
3108
|
+
key: "meta",
|
|
3109
|
+
value: e.record.meta
|
|
3110
|
+
}), n.push({
|
|
3111
|
+
key: "score",
|
|
3112
|
+
editable: !1,
|
|
3113
|
+
value: {
|
|
3114
|
+
_custom: {
|
|
3115
|
+
type: null,
|
|
3116
|
+
readOnly: !0,
|
|
3117
|
+
display: e.score.map((r) => r.join(", ")).join(" | "),
|
|
3118
|
+
tooltip: "Score used to sort routes",
|
|
3119
|
+
value: e.score
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
}), n;
|
|
3123
|
+
}
|
|
3124
|
+
const Vn = 15485081, Mn = 2450411, qn = 8702998, oi = 2282478, Hn = 16486972, si = 6710886, ii = 16704226, ai = 12131356;
|
|
3125
|
+
function zn(e) {
|
|
3126
|
+
const t = [], { record: n } = e;
|
|
3127
|
+
n.name != null && t.push({
|
|
3128
|
+
label: String(n.name),
|
|
3129
|
+
textColor: 0,
|
|
3130
|
+
backgroundColor: oi
|
|
3131
|
+
}), n.aliasOf && t.push({
|
|
3132
|
+
label: "alias",
|
|
3133
|
+
textColor: 0,
|
|
3134
|
+
backgroundColor: Hn
|
|
3135
|
+
}), e.__vd_match && t.push({
|
|
3136
|
+
label: "matches",
|
|
3137
|
+
textColor: 0,
|
|
3138
|
+
backgroundColor: Vn
|
|
3139
|
+
}), e.__vd_exactActive && t.push({
|
|
3140
|
+
label: "exact",
|
|
3141
|
+
textColor: 0,
|
|
3142
|
+
backgroundColor: qn
|
|
3143
|
+
}), e.__vd_active && t.push({
|
|
3144
|
+
label: "active",
|
|
3145
|
+
textColor: 0,
|
|
3146
|
+
backgroundColor: Mn
|
|
3147
|
+
}), n.redirect && t.push({
|
|
3148
|
+
label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
|
|
3149
|
+
textColor: 16777215,
|
|
3150
|
+
backgroundColor: si
|
|
3151
|
+
});
|
|
3152
|
+
let r = n.__vd_id;
|
|
3153
|
+
return r == null && (r = String(ci++), n.__vd_id = r), {
|
|
3154
|
+
id: r,
|
|
3155
|
+
label: n.path,
|
|
3156
|
+
tags: t,
|
|
3157
|
+
children: e.children.map(zn)
|
|
3158
|
+
};
|
|
3159
|
+
}
|
|
3160
|
+
let ci = 0;
|
|
3161
|
+
const li = /^\/(.*)\/([a-z]*)$/;
|
|
3162
|
+
function Kn(e, t) {
|
|
3163
|
+
const n = t.matched.length && X(t.matched[t.matched.length - 1], e.record);
|
|
3164
|
+
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => X(r, e.record))), e.children.forEach((r) => Kn(r, t));
|
|
3165
|
+
}
|
|
3166
|
+
function Wn(e) {
|
|
3167
|
+
e.__vd_match = !1, e.children.forEach(Wn);
|
|
3168
|
+
}
|
|
3169
|
+
function lt(e, t) {
|
|
3170
|
+
const n = String(e.re).match(li);
|
|
3171
|
+
if (e.__vd_match = !1, !n || n.length < 3)
|
|
3172
|
+
return !1;
|
|
3173
|
+
if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
|
|
3174
|
+
return e.children.forEach((s) => lt(s, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
|
|
3175
|
+
const o = e.record.path.toLowerCase(), i = se(o);
|
|
3176
|
+
return !t.startsWith("/") && (i.includes(t) || o.includes(t)) || i.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((s) => lt(s, t));
|
|
3177
|
+
}
|
|
3178
|
+
function ui(e, t) {
|
|
3179
|
+
const n = {};
|
|
3180
|
+
for (const r in e)
|
|
3181
|
+
t.includes(r) || (n[r] = e[r]);
|
|
3182
|
+
return n;
|
|
3183
|
+
}
|
|
3184
|
+
function fi(e) {
|
|
3185
|
+
const t = Ds(e.routes, e), n = e.parseQuery || Ms, r = e.stringifyQuery || Qt, o = e.history;
|
|
3186
|
+
if (process.env.NODE_ENV !== "production" && !o)
|
|
3187
|
+
throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
|
|
3188
|
+
const i = he(), s = he(), a = he(), u = tr(J);
|
|
3189
|
+
let f = J;
|
|
3190
|
+
K && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
|
3191
|
+
const c = We.bind(null, (p) => "" + p), l = We.bind(null, ss), d = (
|
|
3192
|
+
// @ts-expect-error: intentionally avoid the type check
|
|
3193
|
+
We.bind(null, se)
|
|
3194
|
+
);
|
|
3195
|
+
function m(p, b) {
|
|
3196
|
+
let v, R;
|
|
3197
|
+
return Un(p) ? (v = t.getRecordMatcher(p), process.env.NODE_ENV !== "production" && !v && A(`Parent route "${String(p)}" not found when adding child route`, b), R = b) : R = p, t.addRoute(R, v);
|
|
3198
|
+
}
|
|
3199
|
+
function g(p) {
|
|
3200
|
+
const b = t.getRecordMatcher(p);
|
|
3201
|
+
b ? t.removeRoute(b) : process.env.NODE_ENV !== "production" && A(`Cannot remove non-existent route "${String(p)}"`);
|
|
3202
|
+
}
|
|
3203
|
+
function E() {
|
|
3204
|
+
return t.getRoutes().map((p) => p.record);
|
|
3205
|
+
}
|
|
3206
|
+
function y(p) {
|
|
3207
|
+
return !!t.getRecordMatcher(p);
|
|
3208
|
+
}
|
|
3209
|
+
function O(p, b) {
|
|
3210
|
+
if (b = k({}, b || u.value), typeof p == "string") {
|
|
3211
|
+
const T = Ge(n, p, b.path), D = t.resolve({ path: T.path }, b), Y = o.createHref(T.fullPath);
|
|
3212
|
+
return process.env.NODE_ENV !== "production" && (Y.startsWith("//") ? A(`Location "${p}" resolved to "${Y}". A resolved location cannot start with multiple slashes.`) : D.matched.length || A(`No match found for location with path "${p}"`)), k(T, D, {
|
|
3213
|
+
params: d(D.params),
|
|
3214
|
+
hash: se(T.hash),
|
|
3215
|
+
redirectedFrom: void 0,
|
|
3216
|
+
href: Y
|
|
3217
|
+
});
|
|
3218
|
+
}
|
|
3219
|
+
if (process.env.NODE_ENV !== "production" && !ke(p))
|
|
3220
|
+
return A(`router.resolve() was passed an invalid location. This will fail in production.
|
|
3221
|
+
- Location:`, p), O({});
|
|
3222
|
+
let v;
|
|
3223
|
+
if (p.path != null)
|
|
3224
|
+
process.env.NODE_ENV !== "production" && "params" in p && !("name" in p) && // @ts-expect-error: the type is never
|
|
3225
|
+
Object.keys(p.params).length && A(`Path "${p.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), v = k({}, p, {
|
|
3226
|
+
path: Ge(n, p.path, b.path).path
|
|
3227
|
+
});
|
|
3228
|
+
else {
|
|
3229
|
+
const T = k({}, p.params);
|
|
3230
|
+
for (const D in T)
|
|
3231
|
+
T[D] == null && delete T[D];
|
|
3232
|
+
v = k({}, p, {
|
|
3233
|
+
params: l(T)
|
|
3234
|
+
}), b.params = l(b.params);
|
|
3235
|
+
}
|
|
3236
|
+
const R = t.resolve(v, b), N = p.hash || "";
|
|
3237
|
+
process.env.NODE_ENV !== "production" && N && !N.startsWith("#") && A(`A \`hash\` should always start with the character "#". Replace "${N}" with "#${N}".`), R.params = c(d(R.params));
|
|
3238
|
+
const I = cs(r, k({}, p, {
|
|
3239
|
+
hash: ns(N),
|
|
3240
|
+
path: R.path
|
|
3241
|
+
})), P = o.createHref(I);
|
|
3242
|
+
return process.env.NODE_ENV !== "production" && (P.startsWith("//") ? A(`Location "${p}" resolved to "${P}". A resolved location cannot start with multiple slashes.`) : R.matched.length || A(`No match found for location with path "${p.path != null ? p.path : p}"`)), k({
|
|
3243
|
+
fullPath: I,
|
|
3244
|
+
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
|
3245
|
+
// hash
|
|
3246
|
+
hash: N,
|
|
3247
|
+
query: (
|
|
3248
|
+
// if the user is using a custom query lib like qs, we might have
|
|
3249
|
+
// nested objects, so we keep the query as is, meaning it can contain
|
|
3250
|
+
// numbers at `$route.query`, but at the point, the user will have to
|
|
3251
|
+
// use their own type anyway.
|
|
3252
|
+
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
|
3253
|
+
r === Qt ? qs(p.query) : p.query || {}
|
|
3254
|
+
)
|
|
3255
|
+
}, R, {
|
|
3256
|
+
redirectedFrom: void 0,
|
|
3257
|
+
href: P
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
function _(p) {
|
|
3261
|
+
return typeof p == "string" ? Ge(n, p, u.value.path) : k({}, p);
|
|
3262
|
+
}
|
|
3263
|
+
function w(p, b) {
|
|
3264
|
+
if (f !== p)
|
|
3265
|
+
return ie(8, {
|
|
3266
|
+
from: b,
|
|
3267
|
+
to: p
|
|
3268
|
+
});
|
|
3269
|
+
}
|
|
3270
|
+
function C(p) {
|
|
3271
|
+
return x(p);
|
|
3272
|
+
}
|
|
3273
|
+
function U(p) {
|
|
3274
|
+
return C(k(_(p), { replace: !0 }));
|
|
3275
|
+
}
|
|
3276
|
+
function $(p) {
|
|
3277
|
+
const b = p.matched[p.matched.length - 1];
|
|
3278
|
+
if (b && b.redirect) {
|
|
3279
|
+
const { redirect: v } = b;
|
|
3280
|
+
let R = typeof v == "function" ? v(p) : v;
|
|
3281
|
+
if (typeof R == "string" && (R = R.includes("?") || R.includes("#") ? R = _(R) : (
|
|
3282
|
+
// force empty params
|
|
3283
|
+
{ path: R }
|
|
3284
|
+
), R.params = {}), process.env.NODE_ENV !== "production" && R.path == null && !("name" in R))
|
|
3285
|
+
throw A(`Invalid redirect found:
|
|
3286
|
+
${JSON.stringify(R, null, 2)}
|
|
3287
|
+
when navigating to "${p.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
|
|
3288
|
+
return k({
|
|
3289
|
+
query: p.query,
|
|
3290
|
+
hash: p.hash,
|
|
3291
|
+
// avoid transferring params if the redirect has a path
|
|
3292
|
+
params: R.path != null ? {} : p.params
|
|
3293
|
+
}, R);
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
3296
|
+
function x(p, b) {
|
|
3297
|
+
const v = f = O(p), R = u.value, N = p.state, I = p.force, P = p.replace === !0, T = $(v);
|
|
3298
|
+
if (T)
|
|
3299
|
+
return x(
|
|
3300
|
+
k(_(T), {
|
|
3301
|
+
state: typeof T == "object" ? k({}, N, T.state) : N,
|
|
3302
|
+
force: I,
|
|
3303
|
+
replace: P
|
|
3304
|
+
}),
|
|
3305
|
+
// keep original redirectedFrom if it exists
|
|
3306
|
+
b || v
|
|
3307
|
+
);
|
|
3308
|
+
const D = v;
|
|
3309
|
+
D.redirectedFrom = b;
|
|
3310
|
+
let Y;
|
|
3311
|
+
return !I && Ft(r, R, v) && (Y = ie(16, { to: D, from: R }), St(
|
|
3312
|
+
R,
|
|
3313
|
+
R,
|
|
3314
|
+
// this is a push, the only way for it to be triggered from a
|
|
3315
|
+
// history.listen is with a redirect, which makes it become a push
|
|
3316
|
+
!0,
|
|
3317
|
+
// This cannot be the first navigation because the initial location
|
|
3318
|
+
// cannot be manually navigated to
|
|
3319
|
+
!1
|
|
3320
|
+
)), (Y ? Promise.resolve(Y) : ue(D, R)).catch((B) => z(B) ? (
|
|
3321
|
+
// navigation redirects still mark the router as ready
|
|
3322
|
+
z(
|
|
3323
|
+
B,
|
|
3324
|
+
2
|
|
3325
|
+
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
3326
|
+
) ? B : je(B)
|
|
3327
|
+
) : (
|
|
3328
|
+
// reject any unknown error
|
|
3329
|
+
Be(B, D, R)
|
|
3330
|
+
)).then((B) => {
|
|
3331
|
+
if (B) {
|
|
3332
|
+
if (z(
|
|
3333
|
+
B,
|
|
3334
|
+
2
|
|
3335
|
+
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
3336
|
+
))
|
|
3337
|
+
return process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
|
|
3338
|
+
Ft(r, O(B.to), D) && // and we have done it a couple of times
|
|
3339
|
+
b && // @ts-expect-error: added only in dev
|
|
3340
|
+
(b._count = b._count ? (
|
|
3341
|
+
// @ts-expect-error
|
|
3342
|
+
b._count + 1
|
|
3343
|
+
) : 1) > 30 ? (A(`Detected a possibly infinite redirection in a navigation guard when going from "${R.fullPath}" to "${D.fullPath}". Aborting to avoid a Stack Overflow.
|
|
3344
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : x(
|
|
3345
|
+
// keep options
|
|
3346
|
+
k({
|
|
3347
|
+
// preserve an existing replacement but allow the redirect to override it
|
|
3348
|
+
replace: P
|
|
3349
|
+
}, _(B.to), {
|
|
3350
|
+
state: typeof B.to == "object" ? k({}, N, B.to.state) : N,
|
|
3351
|
+
force: I
|
|
3352
|
+
}),
|
|
3353
|
+
// preserve the original redirectedFrom if any
|
|
3354
|
+
b || D
|
|
3355
|
+
);
|
|
3356
|
+
} else
|
|
3357
|
+
B = Rt(D, R, !0, P, N);
|
|
3358
|
+
return bt(D, R, B), B;
|
|
3359
|
+
});
|
|
3360
|
+
}
|
|
3361
|
+
function le(p, b) {
|
|
3362
|
+
const v = w(p, b);
|
|
3363
|
+
return v ? Promise.reject(v) : Promise.resolve();
|
|
3364
|
+
}
|
|
3365
|
+
function W(p) {
|
|
3366
|
+
const b = _e.values().next().value;
|
|
3367
|
+
return b && typeof b.runWithContext == "function" ? b.runWithContext(p) : p();
|
|
3368
|
+
}
|
|
3369
|
+
function ue(p, b) {
|
|
3370
|
+
let v;
|
|
3371
|
+
const [R, N, I] = di(p, b);
|
|
3372
|
+
v = Je(R.reverse(), "beforeRouteLeave", p, b);
|
|
3373
|
+
for (const T of R)
|
|
3374
|
+
T.leaveGuards.forEach((D) => {
|
|
3375
|
+
v.push(Q(D, p, b));
|
|
3376
|
+
});
|
|
3377
|
+
const P = le.bind(null, p, b);
|
|
3378
|
+
return v.push(P), ne(v).then(() => {
|
|
3379
|
+
v = [];
|
|
3380
|
+
for (const T of i.list())
|
|
3381
|
+
v.push(Q(T, p, b));
|
|
3382
|
+
return v.push(P), ne(v);
|
|
3383
|
+
}).then(() => {
|
|
3384
|
+
v = Je(N, "beforeRouteUpdate", p, b);
|
|
3385
|
+
for (const T of N)
|
|
3386
|
+
T.updateGuards.forEach((D) => {
|
|
3387
|
+
v.push(Q(D, p, b));
|
|
3388
|
+
});
|
|
3389
|
+
return v.push(P), ne(v);
|
|
3390
|
+
}).then(() => {
|
|
3391
|
+
v = [];
|
|
3392
|
+
for (const T of I)
|
|
3393
|
+
if (T.beforeEnter)
|
|
3394
|
+
if (V(T.beforeEnter))
|
|
3395
|
+
for (const D of T.beforeEnter)
|
|
3396
|
+
v.push(Q(D, p, b));
|
|
3397
|
+
else
|
|
3398
|
+
v.push(Q(T.beforeEnter, p, b));
|
|
3399
|
+
return v.push(P), ne(v);
|
|
3400
|
+
}).then(() => (p.matched.forEach((T) => T.enterCallbacks = {}), v = Je(I, "beforeRouteEnter", p, b, W), v.push(P), ne(v))).then(() => {
|
|
3401
|
+
v = [];
|
|
3402
|
+
for (const T of s.list())
|
|
3403
|
+
v.push(Q(T, p, b));
|
|
3404
|
+
return v.push(P), ne(v);
|
|
3405
|
+
}).catch((T) => z(
|
|
3406
|
+
T,
|
|
3407
|
+
8
|
|
3408
|
+
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
3409
|
+
) ? T : Promise.reject(T));
|
|
3410
|
+
}
|
|
3411
|
+
function bt(p, b, v) {
|
|
3412
|
+
a.list().forEach((R) => W(() => R(p, b, v)));
|
|
3413
|
+
}
|
|
3414
|
+
function Rt(p, b, v, R, N) {
|
|
3415
|
+
const I = w(p, b);
|
|
3416
|
+
if (I)
|
|
3417
|
+
return I;
|
|
3418
|
+
const P = b === J, T = K ? history.state : {};
|
|
3419
|
+
v && (R || P ? o.replace(p.fullPath, k({
|
|
3420
|
+
scroll: P && T && T.scroll
|
|
3421
|
+
}, N)) : o.push(p.fullPath, N)), u.value = p, St(p, b, v, P), je();
|
|
3422
|
+
}
|
|
3423
|
+
let fe;
|
|
3424
|
+
function Jn() {
|
|
3425
|
+
fe || (fe = o.listen((p, b, v) => {
|
|
3426
|
+
const R = O(p), N = $(R);
|
|
3427
|
+
if (N) {
|
|
3428
|
+
x(k(N, { replace: !0 }), R).catch(me);
|
|
3429
|
+
return;
|
|
3430
|
+
}
|
|
3431
|
+
f = R;
|
|
3432
|
+
const I = u.value;
|
|
3433
|
+
K && gs(Mt(I.fullPath, v.delta), $e()), ue(R, I).catch((P) => z(
|
|
3434
|
+
P,
|
|
3435
|
+
12
|
|
3436
|
+
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
3437
|
+
) ? P : z(
|
|
3438
|
+
P,
|
|
3439
|
+
2
|
|
3440
|
+
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
3441
|
+
) ? (x(
|
|
3442
|
+
P.to,
|
|
3443
|
+
R
|
|
3444
|
+
// avoid an uncaught rejection, let push call triggerError
|
|
3445
|
+
).then((T) => {
|
|
3446
|
+
z(
|
|
3447
|
+
T,
|
|
3448
|
+
20
|
|
3449
|
+
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
|
3450
|
+
) && !v.delta && v.type === ve.pop && o.go(-1, !1);
|
|
3451
|
+
}).catch(me), Promise.reject()) : (v.delta && o.go(-v.delta, !1), Be(P, R, I))).then((P) => {
|
|
3452
|
+
P = P || Rt(
|
|
3453
|
+
// after navigation, all matched components are resolved
|
|
3454
|
+
R,
|
|
3455
|
+
I,
|
|
3456
|
+
!1
|
|
3457
|
+
), P && (v.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
|
|
3458
|
+
// entry while a different route is displayed
|
|
3459
|
+
!z(
|
|
3460
|
+
P,
|
|
3461
|
+
8
|
|
3462
|
+
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
3463
|
+
) ? o.go(-v.delta, !1) : v.type === ve.pop && z(
|
|
3464
|
+
P,
|
|
3465
|
+
20
|
|
3466
|
+
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
|
3467
|
+
) && o.go(-1, !1)), bt(R, I, P);
|
|
3468
|
+
}).catch(me);
|
|
3469
|
+
}));
|
|
3470
|
+
}
|
|
3471
|
+
let Ue = he(), _t = he(), Re;
|
|
3472
|
+
function Be(p, b, v) {
|
|
3473
|
+
je(p);
|
|
3474
|
+
const R = _t.list();
|
|
3475
|
+
return R.length ? R.forEach((N) => N(p, b, v)) : (process.env.NODE_ENV !== "production" && A("uncaught error during route navigation:"), console.error(p)), Promise.reject(p);
|
|
3476
|
+
}
|
|
3477
|
+
function Qn() {
|
|
3478
|
+
return Re && u.value !== J ? Promise.resolve() : new Promise((p, b) => {
|
|
3479
|
+
Ue.add([p, b]);
|
|
3480
|
+
});
|
|
3481
|
+
}
|
|
3482
|
+
function je(p) {
|
|
3483
|
+
return Re || (Re = !p, Jn(), Ue.list().forEach(([b, v]) => p ? v(p) : b()), Ue.reset()), p;
|
|
3484
|
+
}
|
|
3485
|
+
function St(p, b, v, R) {
|
|
3486
|
+
const { scrollBehavior: N } = e;
|
|
3487
|
+
if (!K || !N)
|
|
3488
|
+
return Promise.resolve();
|
|
3489
|
+
const I = !v && ys(Mt(p.fullPath, 0)) || (R || !v) && history.state && history.state.scroll || null;
|
|
3490
|
+
return rr().then(() => N(p, b, I)).then((P) => P && ms(P)).catch((P) => Be(P, p, b));
|
|
3491
|
+
}
|
|
3492
|
+
const Fe = (p) => o.go(p);
|
|
3493
|
+
let Ve;
|
|
3494
|
+
const _e = /* @__PURE__ */ new Set(), Xn = {
|
|
3495
|
+
currentRoute: u,
|
|
3496
|
+
listening: !0,
|
|
3497
|
+
addRoute: m,
|
|
3498
|
+
removeRoute: g,
|
|
3499
|
+
clearRoutes: t.clearRoutes,
|
|
3500
|
+
hasRoute: y,
|
|
3501
|
+
getRoutes: E,
|
|
3502
|
+
resolve: O,
|
|
3503
|
+
options: e,
|
|
3504
|
+
push: C,
|
|
3505
|
+
replace: U,
|
|
3506
|
+
go: Fe,
|
|
3507
|
+
back: () => Fe(-1),
|
|
3508
|
+
forward: () => Fe(1),
|
|
3509
|
+
beforeEach: i.add,
|
|
3510
|
+
beforeResolve: s.add,
|
|
3511
|
+
afterEach: a.add,
|
|
3512
|
+
onError: _t.add,
|
|
3513
|
+
isReady: Qn,
|
|
3514
|
+
install(p) {
|
|
3515
|
+
const b = this;
|
|
3516
|
+
p.component("RouterLink", Gs), p.component("RouterView", Ys), p.config.globalProperties.$router = b, Object.defineProperty(p.config.globalProperties, "$route", {
|
|
3517
|
+
enumerable: !0,
|
|
3518
|
+
get: () => oe(u)
|
|
3519
|
+
}), K && // used for the initial navigation client side to avoid pushing
|
|
3520
|
+
// multiple times when the router is used in multiple apps
|
|
3521
|
+
!Ve && u.value === J && (Ve = !0, C(o.location).catch((N) => {
|
|
3522
|
+
process.env.NODE_ENV !== "production" && A("Unexpected error when starting the router:", N);
|
|
3523
|
+
}));
|
|
3524
|
+
const v = {};
|
|
3525
|
+
for (const N in J)
|
|
3526
|
+
Object.defineProperty(v, N, {
|
|
3527
|
+
get: () => u.value[N],
|
|
3528
|
+
enumerable: !0
|
|
3529
|
+
});
|
|
3530
|
+
p.provide(vt, b), p.provide(Fn, nr(v)), p.provide(ct, u);
|
|
3531
|
+
const R = p.unmount;
|
|
3532
|
+
_e.add(p), p.unmount = function() {
|
|
3533
|
+
_e.delete(p), _e.size < 1 && (f = J, fe && fe(), fe = null, u.value = J, Ve = !1, Re = !1), R();
|
|
3534
|
+
}, process.env.NODE_ENV !== "production" && K && ti(p, b, t);
|
|
3535
|
+
}
|
|
3536
|
+
};
|
|
3537
|
+
function ne(p) {
|
|
3538
|
+
return p.reduce((b, v) => b.then(() => W(v)), Promise.resolve());
|
|
3539
|
+
}
|
|
3540
|
+
return Xn;
|
|
3541
|
+
}
|
|
3542
|
+
function di(e, t) {
|
|
3543
|
+
const n = [], r = [], o = [], i = Math.max(t.matched.length, e.matched.length);
|
|
3544
|
+
for (let s = 0; s < i; s++) {
|
|
3545
|
+
const a = t.matched[s];
|
|
3546
|
+
a && (e.matched.find((f) => X(f, a)) ? r.push(a) : n.push(a));
|
|
3547
|
+
const u = e.matched[s];
|
|
3548
|
+
u && (t.matched.find((f) => X(f, u)) || o.push(u));
|
|
3549
|
+
}
|
|
3550
|
+
return [n, r, o];
|
|
3551
|
+
}
|
|
3552
|
+
const Gn = fi({
|
|
3553
|
+
history: bs("/framework-ui-pc"),
|
|
3554
|
+
routes: []
|
|
3555
|
+
});
|
|
3556
|
+
Gn.beforeEach(async (e, t, n) => {
|
|
3557
|
+
n();
|
|
3558
|
+
});
|
|
3559
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
3560
|
+
function Oe(e) {
|
|
3561
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
3562
|
+
var n = arguments[t];
|
|
3563
|
+
for (var r in n)
|
|
3564
|
+
e[r] = n[r];
|
|
3565
|
+
}
|
|
3566
|
+
return e;
|
|
3567
|
+
}
|
|
3568
|
+
var hi = {
|
|
3569
|
+
read: function(e) {
|
|
3570
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3571
|
+
},
|
|
3572
|
+
write: function(e) {
|
|
3573
|
+
return encodeURIComponent(e).replace(
|
|
3574
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
3575
|
+
decodeURIComponent
|
|
3576
|
+
);
|
|
3577
|
+
}
|
|
3578
|
+
};
|
|
3579
|
+
function ut(e, t) {
|
|
3580
|
+
function n(o, i, s) {
|
|
3581
|
+
if (!(typeof document > "u")) {
|
|
3582
|
+
s = Oe({}, t, s), typeof s.expires == "number" && (s.expires = new Date(Date.now() + s.expires * 864e5)), s.expires && (s.expires = s.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
3583
|
+
var a = "";
|
|
3584
|
+
for (var u in s)
|
|
3585
|
+
s[u] && (a += "; " + u, s[u] !== !0 && (a += "=" + s[u].split(";")[0]));
|
|
3586
|
+
return document.cookie = o + "=" + e.write(i, o) + a;
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
function r(o) {
|
|
3590
|
+
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
3591
|
+
for (var i = document.cookie ? document.cookie.split("; ") : [], s = {}, a = 0; a < i.length; a++) {
|
|
3592
|
+
var u = i[a].split("="), f = u.slice(1).join("=");
|
|
3593
|
+
try {
|
|
3594
|
+
var c = decodeURIComponent(u[0]);
|
|
3595
|
+
if (s[c] = e.read(f, c), o === c)
|
|
3596
|
+
break;
|
|
3597
|
+
} catch {
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
return o ? s[o] : s;
|
|
3601
|
+
}
|
|
3602
|
+
}
|
|
3603
|
+
return Object.create(
|
|
3604
|
+
{
|
|
3605
|
+
set: n,
|
|
3606
|
+
get: r,
|
|
3607
|
+
remove: function(o, i) {
|
|
3608
|
+
n(
|
|
3609
|
+
o,
|
|
3610
|
+
"",
|
|
3611
|
+
Oe({}, i, {
|
|
3612
|
+
expires: -1
|
|
3613
|
+
})
|
|
3614
|
+
);
|
|
3615
|
+
},
|
|
3616
|
+
withAttributes: function(o) {
|
|
3617
|
+
return ut(this.converter, Oe({}, this.attributes, o));
|
|
3618
|
+
},
|
|
3619
|
+
withConverter: function(o) {
|
|
3620
|
+
return ut(Oe({}, this.converter, o), this.attributes);
|
|
3621
|
+
}
|
|
3622
|
+
},
|
|
3623
|
+
{
|
|
3624
|
+
attributes: { value: Object.freeze(t) },
|
|
3625
|
+
converter: { value: Object.freeze(e) }
|
|
3626
|
+
}
|
|
3627
|
+
);
|
|
3628
|
+
}
|
|
3629
|
+
var pi = ut(hi, { path: "/" });
|
|
3630
|
+
const mi = "Sso-Access-Token", gi = "ssoAccessToken", yi = "ssoRefreshToken", Ei = function() {
|
|
3631
|
+
pi.remove(mi), localStorage.removeItem(gi), localStorage.removeItem(yi);
|
|
3632
|
+
}, wt = L.create({
|
|
3633
|
+
baseURL: "/gateway-api/",
|
|
3634
|
+
timeout: 5e3,
|
|
3635
|
+
headers: {}
|
|
3636
|
+
});
|
|
3637
|
+
wt.interceptors.request.use((e) => {
|
|
3638
|
+
let t = localStorage.getItem("gatewayAccessToken") ?? "", n = localStorage.getItem("ssoAccessToken") ?? "";
|
|
3639
|
+
return t && (e.headers["Gateway-Access-Token"] = t), n && (e.headers["Sso-Access-Token"] = n), e.headers["Request-Id"] = "test", e;
|
|
3640
|
+
}, (e) => Promise.reject(e));
|
|
3641
|
+
wt.interceptors.response.use((e) => e.data.statusCode === 401 ? (Ei(), Gn.push("/sso/login"), Promise.reject(new Error(e.data.message))) : e, (e) => Promise.reject(e));
|
|
3642
|
+
const vi = () => new Promise(async (e) => {
|
|
3643
|
+
if (!localStorage.getItem("gatewayAccessToken")) {
|
|
3644
|
+
let n = await wt.get("/server/gateway/getGatewayAccessToken");
|
|
3645
|
+
if (n.data.statusCode != 200)
|
|
3646
|
+
return EleMessage.error(n.data.message);
|
|
3647
|
+
localStorage.setItem("gatewayAccessToken", n.data.data.gatewayAccessToken);
|
|
3648
|
+
}
|
|
3649
|
+
e();
|
|
3650
|
+
}), wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3651
|
+
__proto__: null,
|
|
3652
|
+
initGateway: vi
|
|
3653
|
+
}, Symbol.toStringTag, { value: "Module" })), bi = [lr], Ri = function(e) {
|
|
3654
|
+
bi.forEach((t) => {
|
|
19
3655
|
e.component(t.name, t);
|
|
20
3656
|
});
|
|
3657
|
+
}, Si = {
|
|
3658
|
+
install: Ri,
|
|
3659
|
+
gatewayUtils: wi
|
|
21
3660
|
};
|
|
22
3661
|
export {
|
|
23
|
-
|
|
3662
|
+
Si as default
|
|
24
3663
|
};
|