@fox-js/fox 3.0.1-13 → 3.0.1-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/index.cjs.js +2 -2
- package/libs/index.esm.d.ts +162 -22
- package/libs/index.esm.js +2041 -1693
- package/libs/index.umd.js +3 -3
- package/package.json +1 -1
package/libs/index.esm.js
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as dr, getCurrentInstance as jt, onUnmounted as tt, shallowReactive as Nr, effectScope as Ir, watch as Dr, shallowRef as Hr, defineComponent as yr, inject as G, provide as ee, h as ae } from "vue";
|
|
2
2
|
/*!
|
|
3
|
-
* fox v3.0.0
|
|
3
|
+
* fox v3.0.0 Sun Jan 29 2023 23:14:02 GMT+0800 (中国标准时间)
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return r.__esModule ||
|
|
8
|
-
}
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
for (typeof
|
|
13
|
-
if (r[
|
|
14
|
-
let
|
|
15
|
-
for (let o in
|
|
16
|
-
let
|
|
17
|
-
if (
|
|
18
|
-
if (
|
|
19
|
-
let
|
|
20
|
-
Array.isArray(
|
|
5
|
+
const es = Array.isArray, ts = (r) => Ot(r) === "[object Map]", rs = (r) => Ot(r) === "[object Set]", ns = (r) => r instanceof Date, S = (r) => typeof r == "function", ss = (r) => typeof r == "string", is = (r) => typeof r == "symbol", Vr = (r) => r !== null && typeof r == "object", os = (r) => Vr(r) && S(r.then) && S(r.catch), Br = Object.prototype.toString, Ot = (r) => Br.call(r), Vt = (r) => Ot(r) === "[object Object]", Ur = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
|
|
6
|
+
function kr(r) {
|
|
7
|
+
return r.__esModule || Ur && r[Symbol.toStringTag] === "Module";
|
|
8
|
+
}
|
|
9
|
+
const Wr = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
|
|
10
|
+
function $(...r) {
|
|
11
|
+
let e = r[0] !== void 0 && r[0] !== null ? r[0] : {}, t = 1, n = r.length, s = !1;
|
|
12
|
+
for (typeof e == "boolean" && (s = e, e = r[t] ?? {}, t++), typeof e != "object" && (e = {}); t < n; t++)
|
|
13
|
+
if (r[t] !== null && r[t] !== void 0) {
|
|
14
|
+
let i = r[t];
|
|
15
|
+
for (let o in i) {
|
|
16
|
+
let a = e[o], l = i[o];
|
|
17
|
+
if (a !== l)
|
|
18
|
+
if (s === !0 && l && typeof l == "object") {
|
|
19
|
+
let u;
|
|
20
|
+
Array.isArray(l) ? u = a && Array.isArray(a) ? a : [] : u = a && typeof a == "object" ? a : {}, e[o] = $(s, u, l);
|
|
21
21
|
} else
|
|
22
|
-
|
|
22
|
+
l !== void 0 && (e[o] = l);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
if (!
|
|
29
|
-
|
|
27
|
+
function Xe(r, e, t = !1) {
|
|
28
|
+
if (!t)
|
|
29
|
+
$(!0, r, e);
|
|
30
30
|
else {
|
|
31
|
-
if (typeof
|
|
31
|
+
if (typeof e != "object")
|
|
32
32
|
return {};
|
|
33
33
|
typeof r != "object" && (r = {});
|
|
34
|
-
for (let
|
|
35
|
-
let
|
|
36
|
-
if (
|
|
34
|
+
for (let s in e) {
|
|
35
|
+
let i = r[s], o = e[s];
|
|
36
|
+
if (i !== o)
|
|
37
37
|
if (typeof o == "object") {
|
|
38
|
-
if (!Array.isArray(o) && !
|
|
38
|
+
if (!Array.isArray(o) && !Vt(o))
|
|
39
39
|
continue;
|
|
40
|
-
|
|
40
|
+
i = Xe(i, o, t), r[s] = i;
|
|
41
41
|
} else {
|
|
42
42
|
if (typeof o == "function")
|
|
43
43
|
continue;
|
|
44
|
-
r[
|
|
44
|
+
r[s] = o;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
const n = Object.getOwnPropertySymbols(
|
|
48
|
-
for (let
|
|
49
|
-
let
|
|
50
|
-
if (
|
|
47
|
+
const n = Object.getOwnPropertySymbols(e);
|
|
48
|
+
for (let s of n) {
|
|
49
|
+
let i = r[s], o = e[s];
|
|
50
|
+
if (i !== o)
|
|
51
51
|
if (typeof o == "object") {
|
|
52
|
-
if (!Array.isArray(o) && !
|
|
52
|
+
if (!Array.isArray(o) && !Vt(o))
|
|
53
53
|
continue;
|
|
54
|
-
|
|
54
|
+
i = Xe(i, o, t), r[s] = i;
|
|
55
55
|
} else {
|
|
56
56
|
if (typeof o == "function")
|
|
57
57
|
continue;
|
|
58
|
-
r[
|
|
58
|
+
r[s] = o;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
return r;
|
|
63
63
|
}
|
|
64
|
-
class
|
|
64
|
+
class se {
|
|
65
65
|
static seed = new Date().getTime();
|
|
66
66
|
static get() {
|
|
67
|
-
let
|
|
68
|
-
return
|
|
67
|
+
let e = ++se.seed;
|
|
68
|
+
return e >= Number.MAX_VALUE && (se.seed = 0), e;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
function Ke(r, ...
|
|
73
|
-
|
|
74
|
-
r(
|
|
75
|
-
}) :
|
|
76
|
-
r(
|
|
71
|
+
const ot = Wr ? Promise.resolve() : null;
|
|
72
|
+
function Ke(r, ...e) {
|
|
73
|
+
ot !== null ? e && e.length > 0 ? ot.then(() => {
|
|
74
|
+
r(e);
|
|
75
|
+
}) : ot.then(r) : e && e.length > 0 ? setTimeout(() => {
|
|
76
|
+
r(e);
|
|
77
77
|
}) : setTimeout(r);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function pr(r) {
|
|
80
80
|
return r == null ? !1 : typeof r == "boolean" ? r : typeof r == "string" ? r.toLocaleLowerCase() === "true" : Boolean(r);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function ls(r) {
|
|
83
83
|
return typeof r == "number" ? r : Number(r);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const zr = {
|
|
86
86
|
"[object Boolean]": "boolean",
|
|
87
87
|
"[object Number]": "number",
|
|
88
88
|
"[object String]": "string",
|
|
@@ -92,250 +92,221 @@ const Ur = {
|
|
|
92
92
|
"[object RegExp]": "regExp",
|
|
93
93
|
"[object Object]": "object"
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
let
|
|
97
|
-
return r == null ? String(r) :
|
|
98
|
-
}
|
|
99
|
-
function hr(r) {
|
|
100
|
-
return r && typeof r == "object" && "setInterval" in r;
|
|
101
|
-
}
|
|
102
|
-
function Mt(r) {
|
|
103
|
-
let t = !!r && "length" in r && r.length, e = Je(r);
|
|
104
|
-
return e === "function" || hr(r) ? !1 : e === "array" || t === 0 || typeof t == "number" && t > 0 && t - 1 in r;
|
|
105
|
-
}
|
|
106
|
-
function yr(r, t) {
|
|
107
|
-
let e = +t.length, n = 0, i = r.length;
|
|
108
|
-
for (; n < e; n++)
|
|
109
|
-
r[i++] = t[n];
|
|
110
|
-
return r.length = i, r;
|
|
111
|
-
}
|
|
112
|
-
function Wr(r, t = []) {
|
|
113
|
-
let e = t;
|
|
114
|
-
return r != null && (Mt(Object(r)) ? yr(e, typeof r == "string" ? [r] : r) : e.push(r)), e;
|
|
115
|
-
}
|
|
116
|
-
function zr(r, t, e) {
|
|
117
|
-
if (Mt(r))
|
|
118
|
-
Reflect.apply([].forEach, r, [t]);
|
|
119
|
-
else
|
|
120
|
-
for (let n in r)
|
|
121
|
-
if (e && r.hasOwnProperty(n)) {
|
|
122
|
-
if (Reflect.apply(t, r, [r[n]]) === !1)
|
|
123
|
-
break;
|
|
124
|
-
} else if (Reflect.apply(t, r, [r[n]]) === !1)
|
|
125
|
-
break;
|
|
126
|
-
return r;
|
|
95
|
+
function Bt(r) {
|
|
96
|
+
let t = Object.prototype.toString.call(r);
|
|
97
|
+
return r == null ? String(r) : zr[t] || "object";
|
|
127
98
|
}
|
|
128
|
-
function
|
|
129
|
-
if (r ==
|
|
99
|
+
function Ut(r, e) {
|
|
100
|
+
if (r == e)
|
|
130
101
|
return !0;
|
|
131
|
-
if (r === void 0 ||
|
|
102
|
+
if (r === void 0 || e === void 0)
|
|
132
103
|
return !1;
|
|
133
|
-
let
|
|
134
|
-
if (
|
|
104
|
+
let t = Bt(r), n = Bt(e);
|
|
105
|
+
if (t !== n)
|
|
135
106
|
return !1;
|
|
136
|
-
if (
|
|
137
|
-
let
|
|
138
|
-
if (
|
|
107
|
+
if (t === "object") {
|
|
108
|
+
let s = Object.keys(r), i = Object.keys(e);
|
|
109
|
+
if (s.length !== i.length)
|
|
139
110
|
return !1;
|
|
140
|
-
for (let o = 0; o <
|
|
141
|
-
let
|
|
142
|
-
if (!
|
|
111
|
+
for (let o = 0; o < s.length; o++) {
|
|
112
|
+
let a = s[o], l = r[a], u = e[a];
|
|
113
|
+
if (!Ut(l, u))
|
|
143
114
|
return !1;
|
|
144
115
|
}
|
|
145
116
|
return !0;
|
|
146
|
-
} else if (
|
|
147
|
-
if (r.length !==
|
|
117
|
+
} else if (t === "array") {
|
|
118
|
+
if (r.length !== e.length)
|
|
148
119
|
return !1;
|
|
149
|
-
for (let
|
|
150
|
-
let
|
|
151
|
-
if (!
|
|
120
|
+
for (let s = 0; s < r.length; s++) {
|
|
121
|
+
let i = r[s], o = e[s];
|
|
122
|
+
if (!Ut(i, o))
|
|
152
123
|
return !1;
|
|
153
124
|
}
|
|
154
125
|
return !0;
|
|
155
126
|
}
|
|
156
127
|
return !1;
|
|
157
128
|
}
|
|
158
|
-
const
|
|
159
|
-
class
|
|
160
|
-
[
|
|
161
|
-
[
|
|
162
|
-
[
|
|
163
|
-
[
|
|
164
|
-
constructor(
|
|
165
|
-
this[
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
class
|
|
169
|
-
get(
|
|
170
|
-
if (
|
|
171
|
-
return
|
|
172
|
-
if (
|
|
173
|
-
return
|
|
174
|
-
let n =
|
|
129
|
+
const kt = Symbol("idKey"), fe = Symbol("valueKey"), R = Symbol("childrenKey"), Q = Symbol("growKey");
|
|
130
|
+
class mr {
|
|
131
|
+
[Q] = !0;
|
|
132
|
+
[kt];
|
|
133
|
+
[fe] = dr();
|
|
134
|
+
[R] = /* @__PURE__ */ new Map();
|
|
135
|
+
constructor(e) {
|
|
136
|
+
this[kt] = e;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
class Jr {
|
|
140
|
+
get(e, t) {
|
|
141
|
+
if (t == "value")
|
|
142
|
+
return e[fe].value;
|
|
143
|
+
if (t === "grow")
|
|
144
|
+
return e[Q];
|
|
145
|
+
let n = e[R].get(t);
|
|
175
146
|
if (n)
|
|
176
147
|
return qe(n);
|
|
177
|
-
if (
|
|
178
|
-
return n =
|
|
148
|
+
if (e[Q])
|
|
149
|
+
return n = Mt(t), n[Q] = e[Q], e[R].set(t, n), qe(n);
|
|
179
150
|
}
|
|
180
|
-
set(
|
|
181
|
-
return
|
|
151
|
+
set(e, t, n) {
|
|
152
|
+
return t == "value" ? (e[fe].value = n, !0) : t === "grow" ? (e[Q] = pr(n), !0) : n == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
|
|
182
153
|
}
|
|
183
|
-
deleteProperty(
|
|
184
|
-
return
|
|
154
|
+
deleteProperty(e, t) {
|
|
155
|
+
return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
185
156
|
}
|
|
186
157
|
}
|
|
187
|
-
const
|
|
188
|
-
function
|
|
189
|
-
let
|
|
190
|
-
return Reflect.set(
|
|
158
|
+
const Lt = "__proxy__";
|
|
159
|
+
function Mt(r) {
|
|
160
|
+
let e = new mr(r);
|
|
161
|
+
return Reflect.set(e, Lt, new Proxy(e, new Jr())), e;
|
|
191
162
|
}
|
|
192
163
|
function qe(r) {
|
|
193
|
-
return Reflect.get(r,
|
|
164
|
+
return Reflect.get(r, Lt);
|
|
194
165
|
}
|
|
195
|
-
class vr extends
|
|
166
|
+
class vr extends mr {
|
|
196
167
|
constructor() {
|
|
197
168
|
super("__root__");
|
|
198
169
|
}
|
|
199
|
-
put(...
|
|
200
|
-
let
|
|
201
|
-
if (
|
|
170
|
+
put(...e) {
|
|
171
|
+
let t = e.length;
|
|
172
|
+
if (t < 2)
|
|
202
173
|
return console.error("参数至少包括一个(key, value)"), !1;
|
|
203
174
|
let n = this;
|
|
204
|
-
for (let
|
|
205
|
-
let
|
|
206
|
-
n[
|
|
175
|
+
for (let s = 0; s < t - 1; s++) {
|
|
176
|
+
let i = e[s], o;
|
|
177
|
+
n[R].has(i) ? o = n[R].get(i) : (o = Mt(i), n[R].set(i, o)), n = o;
|
|
207
178
|
}
|
|
208
|
-
return n[
|
|
179
|
+
return n[fe].value = e[t - 1], !0;
|
|
209
180
|
}
|
|
210
|
-
get(...
|
|
211
|
-
let
|
|
212
|
-
if (
|
|
181
|
+
get(...e) {
|
|
182
|
+
let t = e.length;
|
|
183
|
+
if (t === 0)
|
|
213
184
|
return;
|
|
214
185
|
let n = this;
|
|
215
|
-
for (let
|
|
216
|
-
let
|
|
217
|
-
if (n[
|
|
218
|
-
n = n[
|
|
186
|
+
for (let s = 0; s < t; s++) {
|
|
187
|
+
let i = e[s];
|
|
188
|
+
if (n[R].has(i))
|
|
189
|
+
n = n[R].get(i);
|
|
219
190
|
else
|
|
220
191
|
return;
|
|
221
192
|
}
|
|
222
|
-
return n[
|
|
193
|
+
return n[fe].value;
|
|
223
194
|
}
|
|
224
|
-
remove(...
|
|
225
|
-
let
|
|
226
|
-
if (
|
|
195
|
+
remove(...e) {
|
|
196
|
+
let t = e.length;
|
|
197
|
+
if (t == 0)
|
|
227
198
|
return !1;
|
|
228
199
|
let n = this;
|
|
229
|
-
for (let
|
|
230
|
-
let o =
|
|
231
|
-
if (n[
|
|
232
|
-
n = n[
|
|
200
|
+
for (let i = 0; i < t - 1; i++) {
|
|
201
|
+
let o = e[i];
|
|
202
|
+
if (n[R].has(o))
|
|
203
|
+
n = n[R].get(o);
|
|
233
204
|
else
|
|
234
205
|
return !1;
|
|
235
206
|
}
|
|
236
|
-
let
|
|
237
|
-
return n[
|
|
207
|
+
let s = e[t - 1];
|
|
208
|
+
return n[R].has(s) ? (n[R].delete(s), !0) : !1;
|
|
238
209
|
}
|
|
239
|
-
contains(...
|
|
240
|
-
let
|
|
241
|
-
if (
|
|
210
|
+
contains(...e) {
|
|
211
|
+
let t = e.length;
|
|
212
|
+
if (t == 0)
|
|
242
213
|
return !1;
|
|
243
214
|
let n = this;
|
|
244
|
-
for (let
|
|
245
|
-
let o =
|
|
246
|
-
if (n[
|
|
247
|
-
n = n[
|
|
215
|
+
for (let i = 0; i < t - 1; i++) {
|
|
216
|
+
let o = e[i];
|
|
217
|
+
if (n[R].has(o))
|
|
218
|
+
n = n[R].get(o);
|
|
248
219
|
else
|
|
249
220
|
return !1;
|
|
250
221
|
}
|
|
251
|
-
let
|
|
252
|
-
return n[
|
|
222
|
+
let s = e[t - 1];
|
|
223
|
+
return n[R].has(s);
|
|
253
224
|
}
|
|
254
225
|
clear() {
|
|
255
|
-
this[
|
|
226
|
+
this[R].clear();
|
|
256
227
|
}
|
|
257
228
|
}
|
|
258
|
-
const
|
|
259
|
-
function
|
|
260
|
-
return
|
|
229
|
+
const Gr = ["put", "get", "contains", "remove", "clear"];
|
|
230
|
+
function Wt(r) {
|
|
231
|
+
return Gr.includes(r);
|
|
261
232
|
}
|
|
262
233
|
class Qr {
|
|
263
|
-
get(
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
266
|
-
if (
|
|
267
|
-
return
|
|
268
|
-
if (
|
|
269
|
-
return
|
|
270
|
-
if (typeof
|
|
271
|
-
return t
|
|
272
|
-
let n = String(
|
|
273
|
-
if (
|
|
274
|
-
return qe(
|
|
275
|
-
if (
|
|
276
|
-
return
|
|
277
|
-
}
|
|
278
|
-
set(
|
|
279
|
-
return
|
|
280
|
-
}
|
|
281
|
-
deleteProperty(
|
|
282
|
-
return
|
|
234
|
+
get(e, t) {
|
|
235
|
+
if (t == "value")
|
|
236
|
+
return e[fe].value;
|
|
237
|
+
if (t === "grow")
|
|
238
|
+
return e[Q];
|
|
239
|
+
if (t === R)
|
|
240
|
+
return e[R];
|
|
241
|
+
if (typeof t == "string" && Wt(t))
|
|
242
|
+
return e[t];
|
|
243
|
+
let n = String(t), s = e[R].get(n);
|
|
244
|
+
if (s)
|
|
245
|
+
return qe(s);
|
|
246
|
+
if (e[Q])
|
|
247
|
+
return s = Mt(n), s[Q] = e[Q], e[R].set(n, s), qe(s);
|
|
248
|
+
}
|
|
249
|
+
set(e, t, n) {
|
|
250
|
+
return t == "value" ? (e[fe].value = n, !0) : t === "grow" ? (e[Q] = pr(n), !0) : Wt(t) ? !1 : n == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
|
|
251
|
+
}
|
|
252
|
+
deleteProperty(e, t) {
|
|
253
|
+
return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
283
254
|
}
|
|
284
255
|
}
|
|
285
256
|
function Xr() {
|
|
286
|
-
let r = new vr(),
|
|
257
|
+
let r = new vr(), e = new Qr(), t = new Proxy(r, e);
|
|
287
258
|
return Object.assign({
|
|
288
|
-
put(...
|
|
289
|
-
return Reflect.apply(r.put, r,
|
|
259
|
+
put(...s) {
|
|
260
|
+
return Reflect.apply(r.put, r, s);
|
|
290
261
|
},
|
|
291
|
-
get(...
|
|
292
|
-
return Reflect.apply(r.get, r,
|
|
262
|
+
get(...s) {
|
|
263
|
+
return Reflect.apply(r.get, r, s);
|
|
293
264
|
},
|
|
294
|
-
remove(...
|
|
295
|
-
return Reflect.apply(r.remove, r,
|
|
265
|
+
remove(...s) {
|
|
266
|
+
return Reflect.apply(r.remove, r, s);
|
|
296
267
|
},
|
|
297
|
-
contains(...
|
|
298
|
-
return Reflect.apply(r.contains, r,
|
|
268
|
+
contains(...s) {
|
|
269
|
+
return Reflect.apply(r.contains, r, s);
|
|
299
270
|
},
|
|
300
271
|
clear() {
|
|
301
272
|
return Reflect.apply(r.clear, r, []);
|
|
302
273
|
}
|
|
303
|
-
},
|
|
274
|
+
}, t), Reflect.set(r, Lt, t), r;
|
|
304
275
|
}
|
|
305
|
-
let
|
|
306
|
-
construct(r, ...
|
|
307
|
-
let
|
|
308
|
-
return qe(
|
|
276
|
+
let zt = new Proxy(vr, {
|
|
277
|
+
construct(r, ...e) {
|
|
278
|
+
let t = Xr();
|
|
279
|
+
return qe(t);
|
|
309
280
|
}
|
|
310
281
|
});
|
|
311
|
-
const
|
|
312
|
-
function
|
|
313
|
-
let
|
|
314
|
-
return function(...
|
|
315
|
-
if (!
|
|
316
|
-
return
|
|
282
|
+
const Z = "default", gr = Symbol("sync"), I = Symbol("resolveRoute");
|
|
283
|
+
function Jt(r) {
|
|
284
|
+
let e = !1;
|
|
285
|
+
return function(...t) {
|
|
286
|
+
if (!e)
|
|
287
|
+
return e = !0, Reflect.apply(r, {}, t);
|
|
317
288
|
};
|
|
318
289
|
}
|
|
319
290
|
function Yr(r) {
|
|
320
|
-
let
|
|
321
|
-
return new Promise((
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
}),
|
|
325
|
-
console.debug("reject load async module"), n(
|
|
291
|
+
let e = r.src;
|
|
292
|
+
return new Promise((t, n) => {
|
|
293
|
+
const s = Jt((a) => {
|
|
294
|
+
kr(a) && (a = a.default), r.component = a, console.debug("success load async module"), t();
|
|
295
|
+
}), i = Jt((a) => {
|
|
296
|
+
console.debug("reject load async module"), n(a);
|
|
326
297
|
});
|
|
327
298
|
let o;
|
|
328
299
|
try {
|
|
329
|
-
o =
|
|
330
|
-
} catch (
|
|
331
|
-
|
|
300
|
+
o = e(s, i);
|
|
301
|
+
} catch (a) {
|
|
302
|
+
i(a);
|
|
332
303
|
}
|
|
333
304
|
if (o)
|
|
334
305
|
if (typeof o.then == "function")
|
|
335
|
-
o.then(
|
|
306
|
+
o.then(s, i);
|
|
336
307
|
else {
|
|
337
|
-
const
|
|
338
|
-
|
|
308
|
+
const a = o.component;
|
|
309
|
+
a && typeof a.then == "function" && a.then(s, i);
|
|
339
310
|
}
|
|
340
311
|
});
|
|
341
312
|
}
|
|
@@ -344,28 +315,28 @@ class Zr {
|
|
|
344
315
|
level;
|
|
345
316
|
rootName;
|
|
346
317
|
rootIndex = 0;
|
|
347
|
-
constructor(
|
|
348
|
-
this.name =
|
|
318
|
+
constructor(e, t, n, s) {
|
|
319
|
+
this.name = e, this.level = t, this.rootName = n, this.rootIndex = s;
|
|
349
320
|
}
|
|
350
321
|
}
|
|
351
|
-
class
|
|
322
|
+
class Ye {
|
|
352
323
|
to;
|
|
353
324
|
routeModel;
|
|
354
325
|
from;
|
|
355
326
|
data = {};
|
|
356
|
-
constructor(
|
|
357
|
-
this.to =
|
|
327
|
+
constructor(e, t) {
|
|
328
|
+
this.to = e, this.from = t;
|
|
358
329
|
}
|
|
359
|
-
static from(
|
|
360
|
-
let
|
|
361
|
-
return
|
|
330
|
+
static from(e) {
|
|
331
|
+
let t = new Ye(e.to, e.from), n = e.data ?? {};
|
|
332
|
+
return $(!0, t.data, n), t;
|
|
362
333
|
}
|
|
363
334
|
}
|
|
364
|
-
class
|
|
335
|
+
class j {
|
|
365
336
|
path;
|
|
366
337
|
get fullPath() {
|
|
367
|
-
const
|
|
368
|
-
return `${this.root ??
|
|
338
|
+
const e = this.path ?? `/${this.name}`;
|
|
339
|
+
return `${this.root ?? Z}!${e}`;
|
|
369
340
|
}
|
|
370
341
|
name;
|
|
371
342
|
root;
|
|
@@ -383,30 +354,30 @@ class $ {
|
|
|
383
354
|
active;
|
|
384
355
|
slot;
|
|
385
356
|
session;
|
|
386
|
-
static clone(
|
|
387
|
-
let n = new
|
|
388
|
-
return
|
|
357
|
+
static clone(e, t) {
|
|
358
|
+
let n = new j();
|
|
359
|
+
return Xe(n, e, t), n;
|
|
389
360
|
}
|
|
390
|
-
static isSame(
|
|
391
|
-
return
|
|
361
|
+
static isSame(e, t) {
|
|
362
|
+
return e === t ? !0 : !(e == null || t == null || e.path && e.path !== t.path || e.name && e.name !== t.name || e.root !== t.root || e.index !== t.index);
|
|
392
363
|
}
|
|
393
|
-
static isSameForRouteModel(
|
|
394
|
-
return
|
|
364
|
+
static isSameForRouteModel(e, t) {
|
|
365
|
+
return e === t ? !0 : !(e == null || t == null || e.path && e.path != t.path || e.name && e.name != t.name);
|
|
395
366
|
}
|
|
396
|
-
static from(
|
|
397
|
-
let
|
|
398
|
-
if (
|
|
399
|
-
return
|
|
400
|
-
let n =
|
|
401
|
-
for (let
|
|
402
|
-
let o =
|
|
403
|
-
n[
|
|
404
|
-
}
|
|
405
|
-
const
|
|
406
|
-
if (Array.isArray(
|
|
407
|
-
for (let
|
|
408
|
-
n[
|
|
409
|
-
return
|
|
367
|
+
static from(e) {
|
|
368
|
+
let t = new j();
|
|
369
|
+
if (e == null)
|
|
370
|
+
return t;
|
|
371
|
+
let n = t;
|
|
372
|
+
for (let i in e) {
|
|
373
|
+
let o = e[i];
|
|
374
|
+
n[i] = o;
|
|
375
|
+
}
|
|
376
|
+
const s = Object.getOwnPropertySymbols(e);
|
|
377
|
+
if (Array.isArray(s) && s.length > 0)
|
|
378
|
+
for (let i of s)
|
|
379
|
+
n[i] = e[i];
|
|
380
|
+
return t;
|
|
410
381
|
}
|
|
411
382
|
}
|
|
412
383
|
class en {
|
|
@@ -416,8 +387,8 @@ class en {
|
|
|
416
387
|
meta;
|
|
417
388
|
src;
|
|
418
389
|
component;
|
|
419
|
-
constructor(
|
|
420
|
-
this.id =
|
|
390
|
+
constructor(e, t, n, s) {
|
|
391
|
+
this.id = se.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = n, this.meta = s;
|
|
421
392
|
}
|
|
422
393
|
get isResolved() {
|
|
423
394
|
return this.component !== void 0;
|
|
@@ -426,192 +397,192 @@ class en {
|
|
|
426
397
|
return Yr(this);
|
|
427
398
|
}
|
|
428
399
|
}
|
|
429
|
-
class
|
|
400
|
+
class Gt {
|
|
430
401
|
models = [];
|
|
431
402
|
}
|
|
432
|
-
class
|
|
403
|
+
class lt {
|
|
433
404
|
path;
|
|
434
405
|
match;
|
|
435
406
|
redirect;
|
|
436
407
|
name;
|
|
437
408
|
layers = [];
|
|
438
409
|
}
|
|
439
|
-
const H = Symbol("chainKey"),
|
|
440
|
-
class
|
|
410
|
+
const H = Symbol("chainKey"), N = Symbol("cursorKey"), at = Symbol("$persistentModeKey"), E = Symbol("statusKey"), X = Symbol("argsKey"), Oe = Symbol("exArgsKey"), he = Symbol("successFnsKey"), Se = Symbol("errorFnsKey"), ie = Symbol("sessionKey"), Y = Symbol("_go");
|
|
411
|
+
class Ze {
|
|
441
412
|
[H] = [];
|
|
442
|
-
[
|
|
443
|
-
[
|
|
413
|
+
[N] = 0;
|
|
414
|
+
[at] = !1;
|
|
444
415
|
[E] = "Free";
|
|
445
|
-
[
|
|
446
|
-
[
|
|
447
|
-
[
|
|
448
|
-
[
|
|
416
|
+
[X] = [];
|
|
417
|
+
[Oe] = [];
|
|
418
|
+
[he] = [];
|
|
419
|
+
[Se] = [];
|
|
449
420
|
[ie];
|
|
450
421
|
get session() {
|
|
451
422
|
return this[ie];
|
|
452
423
|
}
|
|
453
|
-
constructor(
|
|
454
|
-
this[ie] =
|
|
424
|
+
constructor(e, t = !1) {
|
|
425
|
+
this[ie] = e, this[at] = t;
|
|
455
426
|
}
|
|
456
|
-
[
|
|
427
|
+
[Y](e, ...t) {
|
|
457
428
|
let n = this[E];
|
|
458
|
-
if (this[E] = "Busy", this[
|
|
459
|
-
let
|
|
429
|
+
if (this[E] = "Busy", this[N] += e, this[N] < 0 && (this[N] = 0), this[X] = t, n === "Exception" || n === "Reject") {
|
|
430
|
+
let a = [{
|
|
460
431
|
session: this[ie]
|
|
461
|
-
}, ...this[
|
|
462
|
-
for (; this[
|
|
432
|
+
}, ...this[Oe]];
|
|
433
|
+
for (; this[Se].length > 0; )
|
|
463
434
|
try {
|
|
464
|
-
let
|
|
465
|
-
typeof
|
|
466
|
-
Reflect.apply(
|
|
435
|
+
let l = this[Se].shift();
|
|
436
|
+
typeof l == "function" && Ke(() => {
|
|
437
|
+
Reflect.apply(l, {}, a);
|
|
467
438
|
});
|
|
468
|
-
} catch (
|
|
469
|
-
console.error(
|
|
439
|
+
} catch (l) {
|
|
440
|
+
console.error(l.message, l);
|
|
470
441
|
}
|
|
471
|
-
return this[E] = n, this[H] = [], this[
|
|
472
|
-
} else if (n === "Finished" || this[
|
|
473
|
-
let
|
|
442
|
+
return this[E] = n, this[H] = [], this[N] = 0, this;
|
|
443
|
+
} else if (n === "Finished" || this[N] >= this[H].length) {
|
|
444
|
+
let a = [{
|
|
474
445
|
session: this[ie]
|
|
475
|
-
}, ...this[
|
|
476
|
-
for (; this[
|
|
477
|
-
let
|
|
478
|
-
typeof
|
|
479
|
-
Reflect.apply(
|
|
446
|
+
}, ...this[X]];
|
|
447
|
+
for (; this[he].length > 0; ) {
|
|
448
|
+
let l = this[he].shift();
|
|
449
|
+
typeof l == "function" && Ke(() => {
|
|
450
|
+
Reflect.apply(l, {}, a);
|
|
480
451
|
});
|
|
481
452
|
}
|
|
482
453
|
return this[E] = "Free", this;
|
|
483
454
|
}
|
|
484
|
-
if (this[
|
|
455
|
+
if (this[N] >= this[H].length)
|
|
485
456
|
return this[E] = "Free", this;
|
|
486
|
-
let
|
|
487
|
-
this[
|
|
488
|
-
let
|
|
457
|
+
let s = this[H][this[N]];
|
|
458
|
+
this[at] || (this[H].splice(0, this[N] + 1), this[N] = -1);
|
|
459
|
+
let i = this[N] + 1;
|
|
489
460
|
try {
|
|
490
|
-
let o = !1,
|
|
491
|
-
go: (
|
|
492
|
-
o || (o = !0, Reflect.apply(this[
|
|
461
|
+
let o = !1, a = {
|
|
462
|
+
go: (l, ...u) => {
|
|
463
|
+
o || (o = !0, Reflect.apply(this[Y], this, [l, ...u]));
|
|
493
464
|
},
|
|
494
|
-
resolve: (...
|
|
495
|
-
o || (o = !0, Reflect.apply(this[
|
|
465
|
+
resolve: (...l) => {
|
|
466
|
+
o || (o = !0, Reflect.apply(this[Y], this, [1, ...l]));
|
|
496
467
|
},
|
|
497
|
-
reject: (...
|
|
498
|
-
o || (o = !0, Reflect.apply(this.reject, this, [...
|
|
468
|
+
reject: (...l) => {
|
|
469
|
+
o || (o = !0, Reflect.apply(this.reject, this, [...l]));
|
|
499
470
|
},
|
|
500
|
-
insert: (
|
|
501
|
-
o || (this[H].splice(
|
|
471
|
+
insert: (l) => {
|
|
472
|
+
o || (this[H].splice(i, 0, l), i++);
|
|
502
473
|
},
|
|
503
474
|
session: this[ie]
|
|
504
475
|
};
|
|
505
476
|
Ke(() => {
|
|
506
|
-
Reflect.apply(
|
|
477
|
+
Reflect.apply(s, {}, [a, ...this[X]]);
|
|
507
478
|
});
|
|
508
479
|
} catch (o) {
|
|
509
480
|
this.throw(o);
|
|
510
481
|
}
|
|
511
482
|
return this;
|
|
512
483
|
}
|
|
513
|
-
go(
|
|
514
|
-
return Reflect.apply(this[
|
|
484
|
+
go(e, ...t) {
|
|
485
|
+
return Reflect.apply(this[Y], this, [e, ...t]);
|
|
515
486
|
}
|
|
516
|
-
finish(...
|
|
517
|
-
return this[E] = "Finished", this[
|
|
487
|
+
finish(...e) {
|
|
488
|
+
return this[E] = "Finished", this[X] = e, Reflect.apply(this[Y], this, [0]);
|
|
518
489
|
}
|
|
519
|
-
reject(...
|
|
520
|
-
return this[E] = "Reject", this[
|
|
490
|
+
reject(...e) {
|
|
491
|
+
return this[E] = "Reject", this[Oe] = e, Reflect.apply(this[Y], this, [0]);
|
|
521
492
|
}
|
|
522
|
-
throw(...
|
|
523
|
-
return this[E] = "Exception", this[
|
|
493
|
+
throw(...e) {
|
|
494
|
+
return this[E] = "Exception", this[Oe] = e, Reflect.apply(this[Y], this, [0]);
|
|
524
495
|
}
|
|
525
|
-
reset(...
|
|
526
|
-
this[E] = "Busy", this[
|
|
496
|
+
reset(...e) {
|
|
497
|
+
this[E] = "Busy", this[X] = e, this[H] = [], this[N] = 0;
|
|
527
498
|
let n = [{
|
|
528
499
|
session: this[ie]
|
|
529
|
-
}, ...this[
|
|
530
|
-
for (; this[
|
|
531
|
-
let
|
|
500
|
+
}, ...this[X]];
|
|
501
|
+
for (; this[he].length > 0; ) {
|
|
502
|
+
let s = this[he].shift();
|
|
532
503
|
Ke(() => {
|
|
533
|
-
Reflect.apply(
|
|
504
|
+
Reflect.apply(s, this, n);
|
|
534
505
|
});
|
|
535
506
|
}
|
|
536
507
|
return this[E] = "Free", this;
|
|
537
508
|
}
|
|
538
|
-
post(
|
|
539
|
-
return this[E] === "Reject" || this[E] === "Exception" ? this : (Array.isArray(
|
|
509
|
+
post(e) {
|
|
510
|
+
return this[E] === "Reject" || this[E] === "Exception" ? this : (Array.isArray(e) ? this[H] = [...this[H], ...e] : this[H].push(e), this[E] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this));
|
|
540
511
|
}
|
|
541
|
-
wait(
|
|
542
|
-
return
|
|
512
|
+
wait(e, t) {
|
|
513
|
+
return e && typeof e == "function" && this[he].push(e), t && typeof t == "function" && this[Se].push(t), this[E] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this);
|
|
543
514
|
}
|
|
544
|
-
exception(
|
|
545
|
-
return
|
|
515
|
+
exception(e) {
|
|
516
|
+
return e && typeof e == "function" && this[Se].push(e), this[E] === "Busy" ? this : Reflect.apply(this[Y], this, [0, ...this[X]]);
|
|
546
517
|
}
|
|
547
518
|
isFinish() {
|
|
548
|
-
return this[E] == "Reject" || this[E] == "Free" && this[
|
|
519
|
+
return this[E] == "Reject" || this[E] == "Free" && this[N] >= this[H].length;
|
|
549
520
|
}
|
|
550
521
|
}
|
|
551
|
-
const
|
|
522
|
+
const de = Symbol("registerKey");
|
|
552
523
|
class tn {
|
|
553
524
|
policy;
|
|
554
525
|
callback;
|
|
555
|
-
constructor(
|
|
556
|
-
this.callback =
|
|
526
|
+
constructor(e, t) {
|
|
527
|
+
this.callback = e, this.policy = t;
|
|
557
528
|
}
|
|
558
529
|
}
|
|
559
|
-
class
|
|
560
|
-
[
|
|
530
|
+
class Qt {
|
|
531
|
+
[de] = /* @__PURE__ */ new Map();
|
|
561
532
|
constructor() {
|
|
562
533
|
}
|
|
563
|
-
on(
|
|
564
|
-
let
|
|
565
|
-
|
|
566
|
-
let
|
|
567
|
-
return
|
|
534
|
+
on(e, t, n = !1) {
|
|
535
|
+
let s = this[de].get(e);
|
|
536
|
+
s || (s = new Array(), this[de].set(e, s));
|
|
537
|
+
let i = n === !0 ? 1 : 0, o = new tn(t, i);
|
|
538
|
+
return s.push(o), this;
|
|
568
539
|
}
|
|
569
|
-
off(
|
|
570
|
-
if (!
|
|
571
|
-
return this[
|
|
572
|
-
let n = this[
|
|
540
|
+
off(e, t) {
|
|
541
|
+
if (!t)
|
|
542
|
+
return this[de].delete(e), this;
|
|
543
|
+
let n = this[de].get(e);
|
|
573
544
|
if (n) {
|
|
574
|
-
for (let
|
|
575
|
-
if (n[
|
|
576
|
-
n.splice(
|
|
545
|
+
for (let s = 0; s < n.length; s++)
|
|
546
|
+
if (n[s].callback === t) {
|
|
547
|
+
n.splice(s, 1);
|
|
577
548
|
break;
|
|
578
549
|
}
|
|
579
550
|
}
|
|
580
551
|
return this;
|
|
581
552
|
}
|
|
582
|
-
bind(
|
|
583
|
-
return this.on(
|
|
553
|
+
bind(e, t, n = !1) {
|
|
554
|
+
return this.on(e, t, n);
|
|
584
555
|
}
|
|
585
|
-
unbind(
|
|
586
|
-
return this.off(
|
|
556
|
+
unbind(e, t) {
|
|
557
|
+
return this.off(e, t);
|
|
587
558
|
}
|
|
588
|
-
once(
|
|
589
|
-
return this.on(
|
|
559
|
+
once(e, t) {
|
|
560
|
+
return this.on(e, t, !0);
|
|
590
561
|
}
|
|
591
|
-
all(...
|
|
592
|
-
let
|
|
593
|
-
if (
|
|
562
|
+
all(...e) {
|
|
563
|
+
let t = e.length;
|
|
564
|
+
if (t < 1)
|
|
594
565
|
return this;
|
|
595
|
-
let n = t
|
|
566
|
+
let n = e[t - 1];
|
|
596
567
|
if (typeof n != "function")
|
|
597
568
|
return console.error("callback can not benn empty"), this;
|
|
598
|
-
let
|
|
599
|
-
for (let
|
|
600
|
-
this.once(o[
|
|
601
|
-
|
|
569
|
+
let s = t - 1, i = new Array(s), o = [].splice.call(e, 0, s);
|
|
570
|
+
for (let a = 0; a < o.length; a++)
|
|
571
|
+
this.once(o[a], (l) => {
|
|
572
|
+
i[a] = l, s -= 1, s == 0 && Reflect.apply(n, {}, i);
|
|
602
573
|
});
|
|
603
574
|
return this;
|
|
604
575
|
}
|
|
605
|
-
emit(
|
|
606
|
-
let n = this[
|
|
576
|
+
emit(e, ...t) {
|
|
577
|
+
let n = this[de].get(e);
|
|
607
578
|
if (!n)
|
|
608
579
|
return this;
|
|
609
|
-
for (let
|
|
610
|
-
let
|
|
611
|
-
if (
|
|
580
|
+
for (let s = 0; s < n.length; ) {
|
|
581
|
+
let i = n[s];
|
|
582
|
+
if (i.policy == 1 ? n.splice(s, 1) : s++, typeof i.callback == "function")
|
|
612
583
|
try {
|
|
613
584
|
Ke(() => {
|
|
614
|
-
Reflect.apply(
|
|
585
|
+
Reflect.apply(i.callback, {}, t);
|
|
615
586
|
});
|
|
616
587
|
} catch (o) {
|
|
617
588
|
console.error(o.message, o);
|
|
@@ -619,130 +590,130 @@ class zt {
|
|
|
619
590
|
}
|
|
620
591
|
return this;
|
|
621
592
|
}
|
|
622
|
-
trigger(
|
|
623
|
-
return Reflect.apply(this.emit, this, [
|
|
593
|
+
trigger(e, ...t) {
|
|
594
|
+
return Reflect.apply(this.emit, this, [e, ...t]);
|
|
624
595
|
}
|
|
625
596
|
}
|
|
626
|
-
const
|
|
597
|
+
const Pe = Symbol("registerKey");
|
|
627
598
|
class rn {
|
|
628
|
-
[
|
|
599
|
+
[Pe] = /* @__PURE__ */ new Map();
|
|
629
600
|
constructor() {
|
|
630
601
|
}
|
|
631
|
-
set(
|
|
632
|
-
this[
|
|
602
|
+
set(e, t) {
|
|
603
|
+
this[Pe].set(e, t);
|
|
633
604
|
}
|
|
634
|
-
get(
|
|
635
|
-
return this[
|
|
605
|
+
get(e) {
|
|
606
|
+
return this[Pe].get(e);
|
|
636
607
|
}
|
|
637
|
-
has(
|
|
638
|
-
return this[
|
|
608
|
+
has(e) {
|
|
609
|
+
return this[Pe].has(e);
|
|
639
610
|
}
|
|
640
|
-
delete(
|
|
641
|
-
return this[
|
|
611
|
+
delete(e) {
|
|
612
|
+
return this[Pe].delete(e);
|
|
642
613
|
}
|
|
643
614
|
}
|
|
644
|
-
const
|
|
645
|
-
function
|
|
646
|
-
let
|
|
615
|
+
const Et = Symbol("lc");
|
|
616
|
+
function ze(r, e = !1) {
|
|
617
|
+
let t = r, n = t[Et];
|
|
647
618
|
if (!n)
|
|
648
|
-
if (
|
|
649
|
-
n = new rn(),
|
|
619
|
+
if (e)
|
|
620
|
+
n = new rn(), t[Et] = n;
|
|
650
621
|
else
|
|
651
622
|
return null;
|
|
652
623
|
return n;
|
|
653
624
|
}
|
|
654
|
-
function
|
|
655
|
-
let
|
|
656
|
-
for (;
|
|
657
|
-
const n =
|
|
658
|
-
if (n && n.has(
|
|
659
|
-
return n.get(
|
|
660
|
-
|
|
625
|
+
function wr(r, e) {
|
|
626
|
+
let t = r;
|
|
627
|
+
for (; t !== null; ) {
|
|
628
|
+
const n = t[Et];
|
|
629
|
+
if (n && n.has(e))
|
|
630
|
+
return n.get(e);
|
|
631
|
+
t = t.$parent;
|
|
661
632
|
}
|
|
662
633
|
return null;
|
|
663
634
|
}
|
|
664
|
-
function
|
|
635
|
+
function Xt(r) {
|
|
665
636
|
if (Array.isArray(r.children) && r.children.length > 0) {
|
|
666
|
-
let
|
|
667
|
-
if (
|
|
668
|
-
return
|
|
637
|
+
let e = r.children[0];
|
|
638
|
+
if (e != null && e.component != null && e.component.proxy != null)
|
|
639
|
+
return ze(e.component.proxy, !1);
|
|
669
640
|
}
|
|
670
641
|
return null;
|
|
671
642
|
}
|
|
672
|
-
const
|
|
643
|
+
const et = Symbol("hooksKey");
|
|
673
644
|
function nn(r) {
|
|
674
|
-
let
|
|
675
|
-
|
|
676
|
-
}
|
|
677
|
-
function
|
|
678
|
-
let
|
|
679
|
-
if (
|
|
680
|
-
for (let n =
|
|
681
|
-
let
|
|
682
|
-
if (
|
|
645
|
+
let e = r.get(et);
|
|
646
|
+
e || (e = [], r.set(et, e));
|
|
647
|
+
}
|
|
648
|
+
function Yt(r, e) {
|
|
649
|
+
let t = r.get(et);
|
|
650
|
+
if (t != null)
|
|
651
|
+
for (let n = t.length - 1; n >= 0; n--) {
|
|
652
|
+
let s = t[n];
|
|
653
|
+
if (s.type === e)
|
|
683
654
|
try {
|
|
684
|
-
Reflect.apply(
|
|
685
|
-
} catch (
|
|
686
|
-
console.error(
|
|
655
|
+
Reflect.apply(s.hook, s.target, []);
|
|
656
|
+
} catch (i) {
|
|
657
|
+
console.error(i.message, i);
|
|
687
658
|
}
|
|
688
659
|
}
|
|
689
660
|
}
|
|
690
|
-
var
|
|
661
|
+
var Ft = /* @__PURE__ */ ((r) => (r.DEACTIVATED = "da", r.ACTIVATED = "a", r))(Ft || {});
|
|
691
662
|
class sn {
|
|
692
663
|
type;
|
|
693
664
|
hook;
|
|
694
665
|
target;
|
|
695
|
-
constructor(
|
|
696
|
-
this.target = n, this.hook =
|
|
666
|
+
constructor(e, t, n) {
|
|
667
|
+
this.target = n, this.hook = t, this.type = e;
|
|
697
668
|
}
|
|
698
669
|
}
|
|
699
|
-
function on(r,
|
|
700
|
-
let
|
|
701
|
-
return r.push(
|
|
670
|
+
function on(r, e, t, n) {
|
|
671
|
+
let s = new sn(e, t, n);
|
|
672
|
+
return r.push(s), !0;
|
|
702
673
|
}
|
|
703
|
-
function ln(r,
|
|
704
|
-
let
|
|
705
|
-
for (let
|
|
706
|
-
let o = r[
|
|
707
|
-
if (o.type ===
|
|
708
|
-
|
|
674
|
+
function ln(r, e, t, n) {
|
|
675
|
+
let s = -1;
|
|
676
|
+
for (let i = 0; i < r.length; i++) {
|
|
677
|
+
let o = r[i];
|
|
678
|
+
if (o.type === e && o.hook === t && o.target === n) {
|
|
679
|
+
s = i;
|
|
709
680
|
break;
|
|
710
681
|
}
|
|
711
682
|
}
|
|
712
|
-
return
|
|
683
|
+
return s != -1 ? (r.splice(s, 1), !0) : !1;
|
|
713
684
|
}
|
|
714
|
-
function
|
|
715
|
-
return (
|
|
685
|
+
function br(r) {
|
|
686
|
+
return (e, t) => {
|
|
716
687
|
let n;
|
|
717
|
-
if (
|
|
718
|
-
n =
|
|
688
|
+
if (t)
|
|
689
|
+
n = t;
|
|
719
690
|
else {
|
|
720
|
-
let
|
|
721
|
-
if (
|
|
691
|
+
let i = jt();
|
|
692
|
+
if (i == null || i.proxy == null) {
|
|
722
693
|
console.error("can not get current instance or proxy");
|
|
723
694
|
return;
|
|
724
695
|
}
|
|
725
|
-
n =
|
|
696
|
+
n = i.proxy;
|
|
726
697
|
}
|
|
727
|
-
let
|
|
728
|
-
if (
|
|
698
|
+
let s = wr(n, et);
|
|
699
|
+
if (s == null) {
|
|
729
700
|
console.warn("can not get hooks context");
|
|
730
701
|
return;
|
|
731
702
|
}
|
|
732
|
-
|
|
733
|
-
ln(
|
|
734
|
-
}), on(
|
|
703
|
+
tt(() => {
|
|
704
|
+
ln(s, r, e, n);
|
|
705
|
+
}), on(s, r, e, n);
|
|
735
706
|
};
|
|
736
707
|
}
|
|
737
|
-
let
|
|
738
|
-
function
|
|
739
|
-
let r = new
|
|
740
|
-
return r.path = "", r.name = "", r.params = {}, r.index = -1,
|
|
708
|
+
let as = br("a"), us = br("da");
|
|
709
|
+
function an() {
|
|
710
|
+
let r = new j();
|
|
711
|
+
return r.path = "", r.name = "", r.params = {}, r.index = -1, Nr(r);
|
|
741
712
|
}
|
|
742
|
-
const
|
|
743
|
-
function
|
|
744
|
-
let
|
|
745
|
-
if (
|
|
713
|
+
const Tt = Symbol("routeKey");
|
|
714
|
+
function ut(r, e) {
|
|
715
|
+
let t = r.get(Tt);
|
|
716
|
+
if (t) {
|
|
746
717
|
let n = {
|
|
747
718
|
path: "",
|
|
748
719
|
name: "",
|
|
@@ -750,200 +721,200 @@ function ot(r, t) {
|
|
|
750
721
|
index: -1,
|
|
751
722
|
session: {}
|
|
752
723
|
};
|
|
753
|
-
Object.assign(n,
|
|
724
|
+
Object.assign(n, e), Object.assign(t, n);
|
|
754
725
|
} else
|
|
755
|
-
|
|
726
|
+
t = an(), Object.assign(t, e), r.set(Tt, t);
|
|
756
727
|
}
|
|
757
|
-
function
|
|
758
|
-
let
|
|
759
|
-
return
|
|
728
|
+
function xr(r) {
|
|
729
|
+
let e = wr(r, Tt);
|
|
730
|
+
return e ?? null;
|
|
760
731
|
}
|
|
761
|
-
const
|
|
762
|
-
function
|
|
763
|
-
for (var
|
|
764
|
-
var n = r[
|
|
732
|
+
const rt = Symbol("rk"), ft = Symbol("vd"), Zt = Symbol("rv"), ct = Symbol("rvi"), er = Symbol("pv"), ht = Symbol("pvi");
|
|
733
|
+
function un(r) {
|
|
734
|
+
for (var e = [], t = 0; t < r.length; ) {
|
|
735
|
+
var n = r[t];
|
|
765
736
|
if (n === "*" || n === "+" || n === "?") {
|
|
766
|
-
|
|
737
|
+
e.push({ type: "MODIFIER", index: t, value: r[t++] });
|
|
767
738
|
continue;
|
|
768
739
|
}
|
|
769
740
|
if (n === "\\") {
|
|
770
|
-
|
|
741
|
+
e.push({ type: "ESCAPED_CHAR", index: t++, value: r[t++] });
|
|
771
742
|
continue;
|
|
772
743
|
}
|
|
773
744
|
if (n === "{") {
|
|
774
|
-
|
|
745
|
+
e.push({ type: "OPEN", index: t, value: r[t++] });
|
|
775
746
|
continue;
|
|
776
747
|
}
|
|
777
748
|
if (n === "}") {
|
|
778
|
-
|
|
749
|
+
e.push({ type: "CLOSE", index: t, value: r[t++] });
|
|
779
750
|
continue;
|
|
780
751
|
}
|
|
781
752
|
if (n === ":") {
|
|
782
|
-
for (var
|
|
783
|
-
var o = r.charCodeAt(
|
|
753
|
+
for (var s = "", i = t + 1; i < r.length; ) {
|
|
754
|
+
var o = r.charCodeAt(i);
|
|
784
755
|
if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
|
|
785
|
-
|
|
756
|
+
s += r[i++];
|
|
786
757
|
continue;
|
|
787
758
|
}
|
|
788
759
|
break;
|
|
789
760
|
}
|
|
790
|
-
if (!
|
|
791
|
-
throw new TypeError("Missing parameter name at ".concat(
|
|
792
|
-
|
|
761
|
+
if (!s)
|
|
762
|
+
throw new TypeError("Missing parameter name at ".concat(t));
|
|
763
|
+
e.push({ type: "NAME", index: t, value: s }), t = i;
|
|
793
764
|
continue;
|
|
794
765
|
}
|
|
795
766
|
if (n === "(") {
|
|
796
|
-
var
|
|
797
|
-
if (r[
|
|
798
|
-
throw new TypeError('Pattern cannot start with "?" at '.concat(
|
|
799
|
-
for (;
|
|
800
|
-
if (r[
|
|
801
|
-
|
|
767
|
+
var a = 1, l = "", i = t + 1;
|
|
768
|
+
if (r[i] === "?")
|
|
769
|
+
throw new TypeError('Pattern cannot start with "?" at '.concat(i));
|
|
770
|
+
for (; i < r.length; ) {
|
|
771
|
+
if (r[i] === "\\") {
|
|
772
|
+
l += r[i++] + r[i++];
|
|
802
773
|
continue;
|
|
803
774
|
}
|
|
804
|
-
if (r[
|
|
805
|
-
if (
|
|
806
|
-
|
|
775
|
+
if (r[i] === ")") {
|
|
776
|
+
if (a--, a === 0) {
|
|
777
|
+
i++;
|
|
807
778
|
break;
|
|
808
779
|
}
|
|
809
|
-
} else if (r[
|
|
810
|
-
throw new TypeError("Capturing groups are not allowed at ".concat(
|
|
811
|
-
|
|
780
|
+
} else if (r[i] === "(" && (a++, r[i + 1] !== "?"))
|
|
781
|
+
throw new TypeError("Capturing groups are not allowed at ".concat(i));
|
|
782
|
+
l += r[i++];
|
|
812
783
|
}
|
|
813
|
-
if (
|
|
814
|
-
throw new TypeError("Unbalanced pattern at ".concat(
|
|
815
|
-
if (!
|
|
816
|
-
throw new TypeError("Missing pattern at ".concat(
|
|
817
|
-
|
|
784
|
+
if (a)
|
|
785
|
+
throw new TypeError("Unbalanced pattern at ".concat(t));
|
|
786
|
+
if (!l)
|
|
787
|
+
throw new TypeError("Missing pattern at ".concat(t));
|
|
788
|
+
e.push({ type: "PATTERN", index: t, value: l }), t = i;
|
|
818
789
|
continue;
|
|
819
790
|
}
|
|
820
|
-
|
|
791
|
+
e.push({ type: "CHAR", index: t, value: r[t++] });
|
|
821
792
|
}
|
|
822
|
-
return
|
|
793
|
+
return e.push({ type: "END", index: t, value: "" }), e;
|
|
823
794
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
826
|
-
for (var
|
|
827
|
-
if (
|
|
828
|
-
return
|
|
829
|
-
},
|
|
830
|
-
var
|
|
831
|
-
if (
|
|
832
|
-
return
|
|
833
|
-
var T =
|
|
834
|
-
throw new TypeError("Unexpected ".concat(_, " at ").concat(
|
|
835
|
-
},
|
|
836
|
-
for (var
|
|
837
|
-
|
|
838
|
-
return
|
|
839
|
-
};
|
|
840
|
-
var
|
|
841
|
-
if (
|
|
842
|
-
var
|
|
843
|
-
|
|
844
|
-
name:
|
|
845
|
-
prefix:
|
|
795
|
+
function Rr(r, e) {
|
|
796
|
+
e === void 0 && (e = {});
|
|
797
|
+
for (var t = un(r), n = e.prefixes, s = n === void 0 ? "./" : n, i = "[^".concat(ge(e.delimiter || "/#?"), "]+?"), o = [], a = 0, l = 0, u = "", f = function(x) {
|
|
798
|
+
if (l < t.length && t[l].type === x)
|
|
799
|
+
return t[l++].value;
|
|
800
|
+
}, c = function(x) {
|
|
801
|
+
var K = f(x);
|
|
802
|
+
if (K !== void 0)
|
|
803
|
+
return K;
|
|
804
|
+
var T = t[l], _ = T.type, L = T.index;
|
|
805
|
+
throw new TypeError("Unexpected ".concat(_, " at ").concat(L, ", expected ").concat(x));
|
|
806
|
+
}, h = function() {
|
|
807
|
+
for (var x = "", K; K = f("CHAR") || f("ESCAPED_CHAR"); )
|
|
808
|
+
x += K;
|
|
809
|
+
return x;
|
|
810
|
+
}; l < t.length; ) {
|
|
811
|
+
var d = f("CHAR"), y = f("NAME"), v = f("PATTERN");
|
|
812
|
+
if (y || v) {
|
|
813
|
+
var p = d || "";
|
|
814
|
+
s.indexOf(p) === -1 && (u += p, p = ""), u && (o.push(u), u = ""), o.push({
|
|
815
|
+
name: y || a++,
|
|
816
|
+
prefix: p,
|
|
846
817
|
suffix: "",
|
|
847
|
-
pattern:
|
|
818
|
+
pattern: v || i,
|
|
848
819
|
modifier: f("MODIFIER") || ""
|
|
849
820
|
});
|
|
850
821
|
continue;
|
|
851
822
|
}
|
|
852
|
-
var m =
|
|
823
|
+
var m = d || f("ESCAPED_CHAR");
|
|
853
824
|
if (m) {
|
|
854
|
-
|
|
825
|
+
u += m;
|
|
855
826
|
continue;
|
|
856
827
|
}
|
|
857
|
-
|
|
828
|
+
u && (o.push(u), u = "");
|
|
858
829
|
var w = f("OPEN");
|
|
859
830
|
if (w) {
|
|
860
|
-
var
|
|
861
|
-
|
|
862
|
-
name: F || (b ?
|
|
863
|
-
pattern: F && !b ?
|
|
864
|
-
prefix:
|
|
831
|
+
var p = h(), F = f("NAME") || "", b = f("PATTERN") || "", P = h();
|
|
832
|
+
c("CLOSE"), o.push({
|
|
833
|
+
name: F || (b ? a++ : ""),
|
|
834
|
+
pattern: F && !b ? i : b,
|
|
835
|
+
prefix: p,
|
|
865
836
|
suffix: P,
|
|
866
837
|
modifier: f("MODIFIER") || ""
|
|
867
838
|
});
|
|
868
839
|
continue;
|
|
869
840
|
}
|
|
870
|
-
|
|
841
|
+
c("END");
|
|
871
842
|
}
|
|
872
843
|
return o;
|
|
873
844
|
}
|
|
874
|
-
function fn(r,
|
|
875
|
-
return cn(
|
|
845
|
+
function fn(r, e) {
|
|
846
|
+
return cn(Rr(r, e), e);
|
|
876
847
|
}
|
|
877
|
-
function cn(r,
|
|
878
|
-
|
|
879
|
-
var
|
|
880
|
-
return
|
|
881
|
-
} : n,
|
|
882
|
-
if (typeof
|
|
883
|
-
return new RegExp("^(?:".concat(
|
|
848
|
+
function cn(r, e) {
|
|
849
|
+
e === void 0 && (e = {});
|
|
850
|
+
var t = Nt(e), n = e.encode, s = n === void 0 ? function(l) {
|
|
851
|
+
return l;
|
|
852
|
+
} : n, i = e.validate, o = i === void 0 ? !0 : i, a = r.map(function(l) {
|
|
853
|
+
if (typeof l == "object")
|
|
854
|
+
return new RegExp("^(?:".concat(l.pattern, ")$"), t);
|
|
884
855
|
});
|
|
885
|
-
return function(
|
|
886
|
-
for (var
|
|
887
|
-
var
|
|
888
|
-
if (typeof
|
|
889
|
-
|
|
856
|
+
return function(l) {
|
|
857
|
+
for (var u = "", f = 0; f < r.length; f++) {
|
|
858
|
+
var c = r[f];
|
|
859
|
+
if (typeof c == "string") {
|
|
860
|
+
u += c;
|
|
890
861
|
continue;
|
|
891
862
|
}
|
|
892
|
-
var
|
|
893
|
-
if (Array.isArray(
|
|
894
|
-
if (!
|
|
895
|
-
throw new TypeError('Expected "'.concat(
|
|
896
|
-
if (
|
|
897
|
-
if (
|
|
863
|
+
var h = l ? l[c.name] : void 0, d = c.modifier === "?" || c.modifier === "*", y = c.modifier === "*" || c.modifier === "+";
|
|
864
|
+
if (Array.isArray(h)) {
|
|
865
|
+
if (!y)
|
|
866
|
+
throw new TypeError('Expected "'.concat(c.name, '" to not repeat, but got an array'));
|
|
867
|
+
if (h.length === 0) {
|
|
868
|
+
if (d)
|
|
898
869
|
continue;
|
|
899
|
-
throw new TypeError('Expected "'.concat(
|
|
870
|
+
throw new TypeError('Expected "'.concat(c.name, '" to not be empty'));
|
|
900
871
|
}
|
|
901
|
-
for (var
|
|
902
|
-
var
|
|
903
|
-
if (o && !
|
|
904
|
-
throw new TypeError('Expected all "'.concat(
|
|
905
|
-
|
|
872
|
+
for (var v = 0; v < h.length; v++) {
|
|
873
|
+
var p = s(h[v], c);
|
|
874
|
+
if (o && !a[f].test(p))
|
|
875
|
+
throw new TypeError('Expected all "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
|
|
876
|
+
u += c.prefix + p + c.suffix;
|
|
906
877
|
}
|
|
907
878
|
continue;
|
|
908
879
|
}
|
|
909
|
-
if (typeof
|
|
910
|
-
var
|
|
911
|
-
if (o && !
|
|
912
|
-
throw new TypeError('Expected "'.concat(
|
|
913
|
-
|
|
880
|
+
if (typeof h == "string" || typeof h == "number") {
|
|
881
|
+
var p = s(String(h), c);
|
|
882
|
+
if (o && !a[f].test(p))
|
|
883
|
+
throw new TypeError('Expected "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
|
|
884
|
+
u += c.prefix + p + c.suffix;
|
|
914
885
|
continue;
|
|
915
886
|
}
|
|
916
|
-
if (!
|
|
917
|
-
var m =
|
|
918
|
-
throw new TypeError('Expected "'.concat(
|
|
887
|
+
if (!d) {
|
|
888
|
+
var m = y ? "an array" : "a string";
|
|
889
|
+
throw new TypeError('Expected "'.concat(c.name, '" to be ').concat(m));
|
|
919
890
|
}
|
|
920
891
|
}
|
|
921
|
-
return
|
|
892
|
+
return u;
|
|
922
893
|
};
|
|
923
894
|
}
|
|
924
|
-
function hn(r,
|
|
925
|
-
var
|
|
926
|
-
return
|
|
895
|
+
function hn(r, e) {
|
|
896
|
+
var t = [], n = Sr(r, t, e);
|
|
897
|
+
return dn(n, t, e);
|
|
927
898
|
}
|
|
928
|
-
function
|
|
929
|
-
|
|
930
|
-
var n =
|
|
931
|
-
return
|
|
899
|
+
function dn(r, e, t) {
|
|
900
|
+
t === void 0 && (t = {});
|
|
901
|
+
var n = t.decode, s = n === void 0 ? function(i) {
|
|
902
|
+
return i;
|
|
932
903
|
} : n;
|
|
933
|
-
return function(
|
|
934
|
-
var o = r.exec(
|
|
904
|
+
return function(i) {
|
|
905
|
+
var o = r.exec(i);
|
|
935
906
|
if (!o)
|
|
936
907
|
return !1;
|
|
937
|
-
for (var
|
|
938
|
-
if (o[
|
|
908
|
+
for (var a = o[0], l = o.index, u = /* @__PURE__ */ Object.create(null), f = function(h) {
|
|
909
|
+
if (o[h] === void 0)
|
|
939
910
|
return "continue";
|
|
940
|
-
var
|
|
941
|
-
|
|
942
|
-
return
|
|
943
|
-
}) :
|
|
944
|
-
},
|
|
945
|
-
f(
|
|
946
|
-
return { path:
|
|
911
|
+
var d = e[h - 1];
|
|
912
|
+
d.modifier === "*" || d.modifier === "+" ? u[d.name] = o[h].split(d.prefix + d.suffix).map(function(y) {
|
|
913
|
+
return s(y, d);
|
|
914
|
+
}) : u[d.name] = s(o[h], d);
|
|
915
|
+
}, c = 1; c < o.length; c++)
|
|
916
|
+
f(c);
|
|
917
|
+
return { path: a, index: l, params: u };
|
|
947
918
|
};
|
|
948
919
|
}
|
|
949
920
|
function ge(r) {
|
|
@@ -952,127 +923,127 @@ function ge(r) {
|
|
|
952
923
|
function Nt(r) {
|
|
953
924
|
return r && r.sensitive ? "" : "i";
|
|
954
925
|
}
|
|
955
|
-
function
|
|
956
|
-
if (!
|
|
926
|
+
function yn(r, e) {
|
|
927
|
+
if (!e)
|
|
957
928
|
return r;
|
|
958
|
-
for (var
|
|
959
|
-
|
|
960
|
-
name:
|
|
929
|
+
for (var t = /\((?:\?<(.*?)>)?(?!\?)/g, n = 0, s = t.exec(r.source); s; )
|
|
930
|
+
e.push({
|
|
931
|
+
name: s[1] || n++,
|
|
961
932
|
prefix: "",
|
|
962
933
|
suffix: "",
|
|
963
934
|
modifier: "",
|
|
964
935
|
pattern: ""
|
|
965
|
-
}),
|
|
936
|
+
}), s = t.exec(r.source);
|
|
966
937
|
return r;
|
|
967
938
|
}
|
|
968
|
-
function
|
|
969
|
-
var n = r.map(function(
|
|
970
|
-
return
|
|
939
|
+
function pn(r, e, t) {
|
|
940
|
+
var n = r.map(function(s) {
|
|
941
|
+
return Sr(s, e, t).source;
|
|
971
942
|
});
|
|
972
|
-
return new RegExp("(?:".concat(n.join("|"), ")"), Nt(
|
|
943
|
+
return new RegExp("(?:".concat(n.join("|"), ")"), Nt(t));
|
|
973
944
|
}
|
|
974
|
-
function mn(r,
|
|
975
|
-
return
|
|
945
|
+
function mn(r, e, t) {
|
|
946
|
+
return vn(Rr(r, t), e, t);
|
|
976
947
|
}
|
|
977
|
-
function
|
|
978
|
-
|
|
979
|
-
for (var n =
|
|
980
|
-
return
|
|
981
|
-
} :
|
|
948
|
+
function vn(r, e, t) {
|
|
949
|
+
t === void 0 && (t = {});
|
|
950
|
+
for (var n = t.strict, s = n === void 0 ? !1 : n, i = t.start, o = i === void 0 ? !0 : i, a = t.end, l = a === void 0 ? !0 : a, u = t.encode, f = u === void 0 ? function(L) {
|
|
951
|
+
return L;
|
|
952
|
+
} : u, c = t.delimiter, h = c === void 0 ? "/#?" : c, d = t.endsWith, y = d === void 0 ? "" : d, v = "[".concat(ge(y), "]|$"), p = "[".concat(ge(h), "]"), m = o ? "^" : "", w = 0, F = r; w < F.length; w++) {
|
|
982
953
|
var b = F[w];
|
|
983
954
|
if (typeof b == "string")
|
|
984
955
|
m += ge(f(b));
|
|
985
956
|
else {
|
|
986
|
-
var P = ge(f(b.prefix)),
|
|
957
|
+
var P = ge(f(b.prefix)), x = ge(f(b.suffix));
|
|
987
958
|
if (b.pattern)
|
|
988
|
-
if (
|
|
959
|
+
if (e && e.push(b), P || x)
|
|
989
960
|
if (b.modifier === "+" || b.modifier === "*") {
|
|
990
|
-
var
|
|
991
|
-
m += "(?:".concat(P, "((?:").concat(b.pattern, ")(?:").concat(
|
|
961
|
+
var K = b.modifier === "*" ? "?" : "";
|
|
962
|
+
m += "(?:".concat(P, "((?:").concat(b.pattern, ")(?:").concat(x).concat(P, "(?:").concat(b.pattern, "))*)").concat(x, ")").concat(K);
|
|
992
963
|
} else
|
|
993
|
-
m += "(?:".concat(P, "(").concat(b.pattern, ")").concat(
|
|
964
|
+
m += "(?:".concat(P, "(").concat(b.pattern, ")").concat(x, ")").concat(b.modifier);
|
|
994
965
|
else
|
|
995
966
|
b.modifier === "+" || b.modifier === "*" ? m += "((?:".concat(b.pattern, ")").concat(b.modifier, ")") : m += "(".concat(b.pattern, ")").concat(b.modifier);
|
|
996
967
|
else
|
|
997
|
-
m += "(?:".concat(P).concat(
|
|
968
|
+
m += "(?:".concat(P).concat(x, ")").concat(b.modifier);
|
|
998
969
|
}
|
|
999
970
|
}
|
|
1000
|
-
if (
|
|
1001
|
-
|
|
971
|
+
if (l)
|
|
972
|
+
s || (m += "".concat(p, "?")), m += t.endsWith ? "(?=".concat(v, ")") : "$";
|
|
1002
973
|
else {
|
|
1003
|
-
var T = r[r.length - 1], _ = typeof T == "string" ?
|
|
1004
|
-
|
|
974
|
+
var T = r[r.length - 1], _ = typeof T == "string" ? p.indexOf(T[T.length - 1]) > -1 : T === void 0;
|
|
975
|
+
s || (m += "(?:".concat(p, "(?=").concat(v, "))?")), _ || (m += "(?=".concat(p, "|").concat(v, ")"));
|
|
1005
976
|
}
|
|
1006
|
-
return new RegExp(m, Nt(
|
|
977
|
+
return new RegExp(m, Nt(t));
|
|
1007
978
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return r instanceof RegExp ?
|
|
979
|
+
function Sr(r, e, t) {
|
|
980
|
+
return r instanceof RegExp ? yn(r, e) : Array.isArray(r) ? pn(r, e, t) : mn(r, e, t);
|
|
1010
981
|
}
|
|
1011
|
-
var
|
|
1012
|
-
const
|
|
1013
|
-
class
|
|
982
|
+
var A = /* @__PURE__ */ ((r) => (r[r.Push = 0] = "Push", r[r.Replace = 1] = "Replace", r[r.Put = 2] = "Put", r[r.Append = 3] = "Append", r[r.Open = 4] = "Open", r))(A || {}), Je = /* @__PURE__ */ ((r) => (r[r.Part = 0] = "Part", r[r.All = 1] = "All", r))(Je || {});
|
|
983
|
+
const J = Symbol("rootKey"), z = Symbol("rootNodeKey"), ue = Symbol("parentNodeKey"), Ge = Symbol("nameKey");
|
|
984
|
+
class te {
|
|
1014
985
|
instance = null;
|
|
1015
986
|
model;
|
|
1016
987
|
route;
|
|
1017
988
|
active = !0;
|
|
1018
989
|
index = 0;
|
|
1019
|
-
constructor(
|
|
1020
|
-
this.route =
|
|
990
|
+
constructor(e, t, n = 0, s = !0) {
|
|
991
|
+
this.route = e, this.model = t, this.index = n, this.active = s;
|
|
1021
992
|
}
|
|
1022
993
|
}
|
|
1023
|
-
class
|
|
994
|
+
class Ce {
|
|
1024
995
|
scope = null;
|
|
1025
|
-
set compensation(
|
|
1026
|
-
this.scope !== null && this.scope.stop(), this.scope =
|
|
1027
|
-
|
|
1028
|
-
let
|
|
996
|
+
set compensation(e) {
|
|
997
|
+
this.scope !== null && this.scope.stop(), this.scope = Ir(), this.scope.run(() => {
|
|
998
|
+
Dr(this.slots, () => {
|
|
999
|
+
let t = !1;
|
|
1029
1000
|
try {
|
|
1030
|
-
|
|
1001
|
+
t = e();
|
|
1031
1002
|
} catch (n) {
|
|
1032
1003
|
console.error(n);
|
|
1033
1004
|
}
|
|
1034
|
-
|
|
1005
|
+
t && this.scope !== null && (this.scope.stop(), this.scope = null);
|
|
1035
1006
|
});
|
|
1036
1007
|
});
|
|
1037
1008
|
}
|
|
1038
1009
|
_slots;
|
|
1039
1010
|
get slots() {
|
|
1040
|
-
return this._slots == null && (this._slots =
|
|
1011
|
+
return this._slots == null && (this._slots = Hr([])), this._slots;
|
|
1041
1012
|
}
|
|
1042
1013
|
get empty() {
|
|
1043
1014
|
return this._slots == null || this._slots.value.length == 0;
|
|
1044
1015
|
}
|
|
1045
|
-
[
|
|
1046
|
-
[
|
|
1047
|
-
[
|
|
1016
|
+
[Ge];
|
|
1017
|
+
[J];
|
|
1018
|
+
[z] = null;
|
|
1048
1019
|
[ue] = null;
|
|
1049
1020
|
get name() {
|
|
1050
|
-
return this[
|
|
1021
|
+
return this[Ge];
|
|
1051
1022
|
}
|
|
1052
|
-
constructor(
|
|
1053
|
-
this[
|
|
1023
|
+
constructor(e, t, n) {
|
|
1024
|
+
this[Ge] = e, this[J] = t, n && (this[z] = n);
|
|
1054
1025
|
}
|
|
1055
1026
|
}
|
|
1056
|
-
class
|
|
1027
|
+
class V {
|
|
1057
1028
|
view;
|
|
1058
1029
|
index;
|
|
1059
1030
|
level;
|
|
1060
|
-
constructor(
|
|
1061
|
-
this.view =
|
|
1031
|
+
constructor(e, t, n) {
|
|
1032
|
+
this.view = e, this.index = t, this.level = n;
|
|
1062
1033
|
}
|
|
1063
|
-
static include(
|
|
1064
|
-
for (let n = 0; n <
|
|
1065
|
-
let
|
|
1066
|
-
if (
|
|
1034
|
+
static include(e, t) {
|
|
1035
|
+
for (let n = 0; n < e.length; n++) {
|
|
1036
|
+
let s = e[n];
|
|
1037
|
+
if (s.view === t.view && (t.index == -1 || s.index === t.index) && s.level === t.level)
|
|
1067
1038
|
return !0;
|
|
1068
1039
|
}
|
|
1069
1040
|
return !1;
|
|
1070
1041
|
}
|
|
1071
1042
|
}
|
|
1072
|
-
class
|
|
1043
|
+
class dt {
|
|
1073
1044
|
views = [];
|
|
1074
1045
|
}
|
|
1075
|
-
class
|
|
1046
|
+
class gn {
|
|
1076
1047
|
layers = [];
|
|
1077
1048
|
}
|
|
1078
1049
|
class wn {
|
|
@@ -1082,54 +1053,55 @@ class wn {
|
|
|
1082
1053
|
class bn {
|
|
1083
1054
|
forbidTime = 300;
|
|
1084
1055
|
submitRecorder = new wn();
|
|
1085
|
-
isSameRoute(
|
|
1086
|
-
return
|
|
1056
|
+
isSameRoute(e, t) {
|
|
1057
|
+
return e == null || t == null ? !1 : e.name === t.name && e.path === t.path && e.root === t.root;
|
|
1087
1058
|
}
|
|
1088
|
-
acquire(
|
|
1089
|
-
let
|
|
1090
|
-
if (this.isSameRoute(
|
|
1091
|
-
this.submitRecorder.time =
|
|
1059
|
+
acquire(e) {
|
|
1060
|
+
let t = new Date().getTime();
|
|
1061
|
+
if (this.isSameRoute(e, this.submitRecorder.route) && this.submitRecorder.time && t - this.submitRecorder.time <= this.forbidTime) {
|
|
1062
|
+
this.submitRecorder.time = t;
|
|
1092
1063
|
return;
|
|
1093
1064
|
}
|
|
1094
|
-
return this.submitRecorder.route =
|
|
1065
|
+
return this.submitRecorder.route = e, this.submitRecorder.time = t, t;
|
|
1095
1066
|
}
|
|
1096
|
-
release(
|
|
1097
|
-
this.submitRecorder.time ===
|
|
1067
|
+
release(e) {
|
|
1068
|
+
this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
|
|
1098
1069
|
}
|
|
1099
1070
|
}
|
|
1100
|
-
const
|
|
1101
|
-
class
|
|
1071
|
+
const we = Symbol("_notifyChange");
|
|
1072
|
+
class tr {
|
|
1102
1073
|
currentRoute;
|
|
1103
1074
|
routes;
|
|
1104
|
-
constructor(
|
|
1105
|
-
this.currentRoute =
|
|
1075
|
+
constructor(e, t) {
|
|
1076
|
+
this.currentRoute = e, this.routes = t;
|
|
1106
1077
|
}
|
|
1107
1078
|
}
|
|
1108
|
-
const
|
|
1079
|
+
const je = typeof window < "u", M = function() {
|
|
1109
1080
|
return window;
|
|
1081
|
+
}, Le = function() {
|
|
1082
|
+
return window.document;
|
|
1110
1083
|
};
|
|
1111
|
-
function
|
|
1112
|
-
let
|
|
1113
|
-
return
|
|
1084
|
+
function xn(r) {
|
|
1085
|
+
let e = r, t = e.lastIndexOf("/");
|
|
1086
|
+
return t > 0 && t < e.length - 1 ? e = e.substring(0, t + 1) : t === 0 && e.indexOf(".") !== -1 ? e = "/" : t === -1 && (e.indexOf(".") == -1 ? e = `/${e}/` : e = "/"), e.indexOf("/") !== 0 && (e = `/${e}`), e;
|
|
1114
1087
|
}
|
|
1115
|
-
function
|
|
1116
|
-
if (
|
|
1088
|
+
function yt() {
|
|
1089
|
+
if (!je)
|
|
1117
1090
|
return "/";
|
|
1118
|
-
let r =
|
|
1119
|
-
return
|
|
1091
|
+
let r = M().location, e = `${r.protocol}//${r.host}`;
|
|
1092
|
+
return e += xn(r.pathname), e;
|
|
1120
1093
|
}
|
|
1121
|
-
function
|
|
1122
|
-
r.addEventListener ? r.addEventListener(
|
|
1094
|
+
function _t(r, e, t) {
|
|
1095
|
+
r.addEventListener ? r.addEventListener(e, t, !1) : r.attachEvent ? r.attachEvent(`on${e}`, t) : r[`on${e}`] = t;
|
|
1123
1096
|
}
|
|
1124
|
-
function
|
|
1125
|
-
r.removeEventListener ? r.removeEventListener(
|
|
1097
|
+
function $t(r, e, t) {
|
|
1098
|
+
r.removeEventListener ? r.removeEventListener(e, t) : r.detachEvent ? r.detachEvent(`on${e}`, t) : r[`on${e}`] = null;
|
|
1126
1099
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
function
|
|
1130
|
-
return typeof r == "function" ? Reflect.apply(r, null, [...t]) : r;
|
|
1100
|
+
const Me = Symbol("ignoreHistoryChangeOnceKey"), rr = Symbol("_navigateFirstRoute"), Ne = Symbol("_getRouteMark"), nr = Symbol("_getUrlSearch"), pt = Symbol("_generateLocation"), Ae = Symbol("_setRouteMarkRecorder"), sr = "Symbol(_fox_restore_point)";
|
|
1101
|
+
function mt(r, ...e) {
|
|
1102
|
+
return typeof r == "function" ? Reflect.apply(r, null, [...e]) : r;
|
|
1131
1103
|
}
|
|
1132
|
-
class
|
|
1104
|
+
class Pr {
|
|
1133
1105
|
base;
|
|
1134
1106
|
storage;
|
|
1135
1107
|
mode;
|
|
@@ -1140,129 +1112,129 @@ class xr {
|
|
|
1140
1112
|
changeHandler;
|
|
1141
1113
|
historyChange;
|
|
1142
1114
|
[Me] = !1;
|
|
1143
|
-
constructor(
|
|
1144
|
-
this.mode =
|
|
1115
|
+
constructor(e = "hash", t = "", n = "", s = !0, i = !0, o = !1, a) {
|
|
1116
|
+
this.mode = e, this.base = t, this.query = n, this.firstNavigate = s, this.historyMonitor = i, this.traceless = o, this.storage = a ?? M().sessionStorage;
|
|
1145
1117
|
}
|
|
1146
|
-
init(
|
|
1147
|
-
const
|
|
1118
|
+
init(e = !0) {
|
|
1119
|
+
const t = M();
|
|
1148
1120
|
return typeof this.historyChange != "function" && (this.historyChange = () => {
|
|
1149
1121
|
if (this[Me]) {
|
|
1150
1122
|
this[Me] = !1;
|
|
1151
1123
|
return;
|
|
1152
1124
|
}
|
|
1153
|
-
if (
|
|
1154
|
-
const n =
|
|
1155
|
-
this[
|
|
1125
|
+
if (mt(this.historyMonitor)) {
|
|
1126
|
+
const n = t.history.state;
|
|
1127
|
+
this[we](n);
|
|
1156
1128
|
try {
|
|
1157
|
-
let
|
|
1158
|
-
if (typeof n == "string" ?
|
|
1159
|
-
const
|
|
1160
|
-
this[Ae](
|
|
1129
|
+
let s = [];
|
|
1130
|
+
if (typeof n == "string" ? s = JSON.parse(n) : s = n, Array.isArray(s) && s.length > 0) {
|
|
1131
|
+
const i = this[Ne]() ?? "/";
|
|
1132
|
+
this[Ae](i, s);
|
|
1161
1133
|
}
|
|
1162
1134
|
} catch {
|
|
1163
1135
|
}
|
|
1164
1136
|
}
|
|
1165
|
-
}),
|
|
1137
|
+
}), _t(t, "popstate", this.historyChange), this.firstNavigate && e && this[rr](), Promise.resolve();
|
|
1166
1138
|
}
|
|
1167
1139
|
destroy() {
|
|
1168
1140
|
if (this.historyChange) {
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1141
|
+
const e = M();
|
|
1142
|
+
$t(e, "popstate", this.historyChange);
|
|
1171
1143
|
}
|
|
1172
1144
|
}
|
|
1173
|
-
[
|
|
1174
|
-
const
|
|
1175
|
-
if (
|
|
1145
|
+
[rr]() {
|
|
1146
|
+
const e = this[Ne]() ?? "/", t = this.storage.getItem(sr);
|
|
1147
|
+
if (t)
|
|
1176
1148
|
try {
|
|
1177
|
-
const o = JSON.parse(
|
|
1178
|
-
if (o.mark ===
|
|
1179
|
-
this[
|
|
1149
|
+
const o = JSON.parse(t);
|
|
1150
|
+
if (o.mark === e) {
|
|
1151
|
+
this[we](o.routes);
|
|
1180
1152
|
return;
|
|
1181
1153
|
}
|
|
1182
1154
|
} catch {
|
|
1183
1155
|
}
|
|
1184
|
-
const n =
|
|
1185
|
-
let
|
|
1186
|
-
n != -1 ?
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1156
|
+
const n = e.indexOf("!");
|
|
1157
|
+
let s;
|
|
1158
|
+
n != -1 ? s = e.substring(n + 1) : s = e;
|
|
1159
|
+
const i = new j();
|
|
1160
|
+
i.path = s, i.query = this[nr](), this[we]([i]);
|
|
1189
1161
|
}
|
|
1190
|
-
[Ae](
|
|
1162
|
+
[Ae](e, t) {
|
|
1191
1163
|
try {
|
|
1192
1164
|
const n = {
|
|
1193
|
-
mark:
|
|
1194
|
-
routes:
|
|
1195
|
-
},
|
|
1196
|
-
this.storage.setItem(
|
|
1165
|
+
mark: e,
|
|
1166
|
+
routes: t
|
|
1167
|
+
}, s = JSON.stringify(n);
|
|
1168
|
+
this.storage.setItem(sr, s);
|
|
1197
1169
|
} catch (n) {
|
|
1198
1170
|
console.error(n.message, n);
|
|
1199
1171
|
}
|
|
1200
1172
|
}
|
|
1201
|
-
setRestorePoint(
|
|
1202
|
-
const
|
|
1203
|
-
this[Ae](
|
|
1173
|
+
setRestorePoint(e) {
|
|
1174
|
+
const t = this[Ne]() ?? "/";
|
|
1175
|
+
this[Ae](t, e);
|
|
1204
1176
|
}
|
|
1205
|
-
[
|
|
1206
|
-
typeof this.changeHandler == "function" && this.changeHandler(
|
|
1177
|
+
[we](e) {
|
|
1178
|
+
typeof this.changeHandler == "function" && this.changeHandler(e);
|
|
1207
1179
|
}
|
|
1208
|
-
[
|
|
1209
|
-
const
|
|
1180
|
+
[Ne]() {
|
|
1181
|
+
const e = M();
|
|
1210
1182
|
if (this.mode === "path") {
|
|
1211
|
-
let
|
|
1212
|
-
return this.base &&
|
|
1183
|
+
let t = e.location.pathname;
|
|
1184
|
+
return this.base && t.indexOf(this.base) === 0 && (t = t.substring(this.base.length)), t;
|
|
1213
1185
|
} else {
|
|
1214
|
-
const
|
|
1186
|
+
const t = e.location.hash, n = t.indexOf("#");
|
|
1215
1187
|
if (n != -1)
|
|
1216
|
-
return
|
|
1188
|
+
return t.substring(n + 1);
|
|
1217
1189
|
}
|
|
1218
1190
|
return null;
|
|
1219
1191
|
}
|
|
1220
|
-
[
|
|
1221
|
-
return
|
|
1192
|
+
[nr]() {
|
|
1193
|
+
return M().location.search;
|
|
1222
1194
|
}
|
|
1223
|
-
listen(
|
|
1224
|
-
this.changeHandler =
|
|
1195
|
+
listen(e) {
|
|
1196
|
+
this.changeHandler = e;
|
|
1225
1197
|
}
|
|
1226
|
-
go(
|
|
1227
|
-
const n =
|
|
1228
|
-
this[Me] = !
|
|
1198
|
+
go(e, t = !0) {
|
|
1199
|
+
const n = M();
|
|
1200
|
+
this[Me] = !t, n.history.go(e);
|
|
1229
1201
|
}
|
|
1230
|
-
push(
|
|
1231
|
-
let
|
|
1232
|
-
|
|
1202
|
+
push(e) {
|
|
1203
|
+
let t = this[pt](e.currentRoute);
|
|
1204
|
+
mt(this.traceless, e.currentRoute) || M().history.pushState(e.routes, "", t), this[Ae](e.currentRoute.fullPath, e.routes);
|
|
1233
1205
|
}
|
|
1234
|
-
replace(
|
|
1235
|
-
let
|
|
1236
|
-
|
|
1206
|
+
replace(e) {
|
|
1207
|
+
let t = this[pt](e.currentRoute);
|
|
1208
|
+
mt(this.traceless, e.currentRoute) || M().history.replaceState(e.routes, "", t), this[Ae](e.currentRoute.fullPath, e.routes);
|
|
1237
1209
|
}
|
|
1238
|
-
[
|
|
1239
|
-
const
|
|
1210
|
+
[pt](e) {
|
|
1211
|
+
const t = M();
|
|
1240
1212
|
let n = "";
|
|
1241
|
-
if (
|
|
1242
|
-
let
|
|
1243
|
-
if (typeof
|
|
1244
|
-
for (let
|
|
1245
|
-
let
|
|
1246
|
-
|
|
1213
|
+
if (e.query) {
|
|
1214
|
+
let a = "";
|
|
1215
|
+
if (typeof e.query == "object")
|
|
1216
|
+
for (let l in e.query) {
|
|
1217
|
+
let u = encodeURIComponent(e.query[l]), f = `${encodeURIComponent(l)}=${u}`;
|
|
1218
|
+
a.length > 0 && (a += "&"), a += f;
|
|
1247
1219
|
}
|
|
1248
1220
|
else
|
|
1249
|
-
|
|
1250
|
-
this.query ? (n = `${this.query}&${
|
|
1221
|
+
a = e.query;
|
|
1222
|
+
this.query ? (n = `${this.query}&${a}`, n.charAt(0) !== "?" && (n = `?${n}`)) : n = `?${a}`;
|
|
1251
1223
|
}
|
|
1252
|
-
const
|
|
1253
|
-
let
|
|
1254
|
-
|
|
1224
|
+
const s = t.location;
|
|
1225
|
+
let i = e.fullPath;
|
|
1226
|
+
i.startsWith(Z) && (i = i.substring(Z.length + 1));
|
|
1255
1227
|
let o;
|
|
1256
|
-
return n ? this.mode == "path" ? o = `${this.base}/${
|
|
1228
|
+
return n ? this.mode == "path" ? o = `${this.base}/${i}${n}` : o = `${s.pathname}${n}#${i}` : this.mode == "path" ? o = `${this.base}/${i}` : o = `${s.pathname}#${i}`, `${s.origin}${o}`;
|
|
1257
1229
|
}
|
|
1258
1230
|
}
|
|
1259
|
-
function
|
|
1260
|
-
return
|
|
1231
|
+
function fs(r = !0, e = null, t = "", n = !0, s = !1, i) {
|
|
1232
|
+
return e !== null && (e = M().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new Pr("path", e ?? "", t, r, n, s, i);
|
|
1261
1233
|
}
|
|
1262
|
-
function
|
|
1263
|
-
return new
|
|
1234
|
+
function Rn(r = !0, e = "", t = !0, n = !1, s) {
|
|
1235
|
+
return new Pr("hash", "", e, r, t, n, s);
|
|
1264
1236
|
}
|
|
1265
|
-
class
|
|
1237
|
+
class Sn {
|
|
1266
1238
|
maxSize = 50;
|
|
1267
1239
|
cursor = -1;
|
|
1268
1240
|
queue = [];
|
|
@@ -1270,1147 +1242,1147 @@ class Pn {
|
|
|
1270
1242
|
base;
|
|
1271
1243
|
historyMonitor = !1;
|
|
1272
1244
|
traceless = !1;
|
|
1273
|
-
constructor(
|
|
1274
|
-
this.base =
|
|
1245
|
+
constructor(e, t = 50) {
|
|
1246
|
+
this.base = e, this.maxSize = t;
|
|
1275
1247
|
}
|
|
1276
|
-
init(
|
|
1248
|
+
init(e = !0) {
|
|
1277
1249
|
return Promise.resolve();
|
|
1278
1250
|
}
|
|
1279
1251
|
destroy() {
|
|
1280
1252
|
this.queue = [];
|
|
1281
1253
|
}
|
|
1282
|
-
listen(
|
|
1283
|
-
this.changeHandler =
|
|
1254
|
+
listen(e) {
|
|
1255
|
+
this.changeHandler = e;
|
|
1284
1256
|
}
|
|
1285
|
-
[
|
|
1286
|
-
typeof this.changeHandler == "function" && this.changeHandler(
|
|
1257
|
+
[we](e) {
|
|
1258
|
+
typeof this.changeHandler == "function" && this.changeHandler(e);
|
|
1287
1259
|
}
|
|
1288
|
-
go(
|
|
1260
|
+
go(e, t = !0) {
|
|
1289
1261
|
if (this.queue.length == 0 || this.cursor <= 0 || this.cursor >= this.queue.length - 1)
|
|
1290
1262
|
return;
|
|
1291
|
-
let n = this.cursor +
|
|
1292
|
-
if (n < 0 ? n = 0 : n > this.queue.length - 1 && (n = this.queue.length - 1), n != this.cursor && (this.cursor = n,
|
|
1293
|
-
const
|
|
1294
|
-
this[
|
|
1263
|
+
let n = this.cursor + e;
|
|
1264
|
+
if (n < 0 ? n = 0 : n > this.queue.length - 1 && (n = this.queue.length - 1), n != this.cursor && (this.cursor = n, t)) {
|
|
1265
|
+
const s = this.queue[n];
|
|
1266
|
+
this[we](s.routes);
|
|
1295
1267
|
}
|
|
1296
1268
|
}
|
|
1297
|
-
push(
|
|
1298
|
-
this.queue.length >= this.maxSize && this.queue.splice(0, 1), this.queue.push(
|
|
1269
|
+
push(e) {
|
|
1270
|
+
this.queue.length >= this.maxSize && this.queue.splice(0, 1), this.queue.push(e), this.cursor = this.queue.length - 1;
|
|
1299
1271
|
}
|
|
1300
|
-
replace(
|
|
1301
|
-
let
|
|
1302
|
-
this.queue.splice(this.cursor,
|
|
1272
|
+
replace(e) {
|
|
1273
|
+
let t = this.queue.length - this.cursor;
|
|
1274
|
+
this.queue.splice(this.cursor, t), this.queue[this.cursor] = e;
|
|
1303
1275
|
}
|
|
1304
|
-
setRestorePoint(
|
|
1276
|
+
setRestorePoint(e) {
|
|
1305
1277
|
}
|
|
1306
1278
|
}
|
|
1307
|
-
function
|
|
1308
|
-
return new
|
|
1279
|
+
function Pn(r = "", e = 50) {
|
|
1280
|
+
return new Sn(r, e);
|
|
1309
1281
|
}
|
|
1310
|
-
const
|
|
1282
|
+
const Ie = Symbol("_constructRouteModel"), De = Symbol("_findRouteModel"), vt = Symbol("_findRootView"), ir = Symbol("_getFirstView"), oe = Symbol("_removeView"), or = Symbol("_buildPage"), lr = Symbol("_resolveComponent"), ar = Symbol("_update"), re = Symbol("_merge"), gt = Symbol("_handleHistoryChange"), He = Symbol("_handleRouteUpdated"), Ve = Symbol("routeUpdatedCallback"), g = Symbol("currentRoutes"), ye = Symbol("current"), ur = Symbol("_addRouteRecorder"), pe = Symbol("_removeRouteRecorder"), Be = Symbol("_cloneRouteRecorder"), O = Symbol("_handleError"), Ue = Symbol("errorCallback"), B = Symbol("registerKey"), ke = Symbol("notFoundKey"), wt = Symbol("notFoundPathKey"), U = Symbol("forestKey"), C = Symbol("historyKey"), Ee = Symbol("beforeFiltersKey"), Fe = Symbol("afterFiltersKey"), Te = Symbol("destroyFiltersKey"), me = Symbol("mainDispatcherKey"), bt = Symbol("initKey"), le = Symbol("readyKey"), xt = Symbol("readyHandlersKey"), We = Symbol("_markReady"), fr = Symbol("_createNextFn"), Rt = Symbol("_start"), St = Symbol("_before"), Pt = Symbol("_after"), cr = Symbol("_destroy"), Ct = Symbol("_load"), _e = Symbol("_unload"), $e = Symbol("routerGuardKey");
|
|
1311
1283
|
function Cn(r) {
|
|
1312
1284
|
return r.layers.length == 0 || r.layers[0].views.length == 0;
|
|
1313
1285
|
}
|
|
1314
|
-
function
|
|
1315
|
-
let
|
|
1316
|
-
return r.layers.forEach((
|
|
1317
|
-
|
|
1286
|
+
function An(r) {
|
|
1287
|
+
let e = [];
|
|
1288
|
+
return r.layers.forEach((t) => {
|
|
1289
|
+
t.models == null || t.models == null || t.models.forEach((n) => {
|
|
1318
1290
|
if (!(n == null || n == null))
|
|
1319
1291
|
if (typeof n.meta == "object") {
|
|
1320
|
-
let
|
|
1321
|
-
|
|
1292
|
+
let s = $(!0, {}, n.meta);
|
|
1293
|
+
e.push(s);
|
|
1322
1294
|
} else
|
|
1323
|
-
n.meta &&
|
|
1295
|
+
n.meta && e.push(n.meta);
|
|
1324
1296
|
});
|
|
1325
|
-
}),
|
|
1326
|
-
}
|
|
1327
|
-
class
|
|
1328
|
-
[
|
|
1329
|
-
[
|
|
1330
|
-
[
|
|
1331
|
-
[
|
|
1332
|
-
[
|
|
1333
|
-
[
|
|
1334
|
-
[
|
|
1335
|
-
[
|
|
1297
|
+
}), e;
|
|
1298
|
+
}
|
|
1299
|
+
class En {
|
|
1300
|
+
[B] = new Array();
|
|
1301
|
+
[ke];
|
|
1302
|
+
[wt] = "*";
|
|
1303
|
+
[le] = !1;
|
|
1304
|
+
[xt] = [];
|
|
1305
|
+
[U] = new gn();
|
|
1306
|
+
[C];
|
|
1307
|
+
[g] = new Array();
|
|
1308
|
+
[Ue] = null;
|
|
1336
1309
|
[Ve] = null;
|
|
1337
|
-
[Ie] = null;
|
|
1338
|
-
[Ce] = new Array();
|
|
1339
1310
|
[Ee] = new Array();
|
|
1340
1311
|
[Fe] = new Array();
|
|
1341
|
-
[
|
|
1342
|
-
[
|
|
1343
|
-
[
|
|
1344
|
-
[
|
|
1312
|
+
[Te] = new Array();
|
|
1313
|
+
[me] = new Ze();
|
|
1314
|
+
[$e] = new bn();
|
|
1315
|
+
[bt] = !1;
|
|
1316
|
+
[ye] = dr(null);
|
|
1345
1317
|
get current() {
|
|
1346
1318
|
return this[ye].value;
|
|
1347
1319
|
}
|
|
1348
1320
|
options;
|
|
1349
|
-
constructor(
|
|
1350
|
-
this.options =
|
|
1351
|
-
let
|
|
1352
|
-
this.addRoutes(
|
|
1353
|
-
let
|
|
1321
|
+
constructor(e) {
|
|
1322
|
+
this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
|
|
1323
|
+
let t = this.options.routes || [];
|
|
1324
|
+
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[C] = e.history : this[C] = je ? Rn() : Pn(), this[C]?.listen(async (n) => {
|
|
1325
|
+
let s = !0;
|
|
1354
1326
|
try {
|
|
1355
1327
|
if (typeof n == "string") {
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1328
|
+
const i = this[I](n);
|
|
1329
|
+
i && await this[gt]([i]);
|
|
1358
1330
|
} else
|
|
1359
|
-
await this[
|
|
1360
|
-
} catch (
|
|
1361
|
-
console.error(
|
|
1331
|
+
await this[gt](n);
|
|
1332
|
+
} catch (i) {
|
|
1333
|
+
console.error(i.message, i), s = !1;
|
|
1362
1334
|
}
|
|
1363
|
-
this[
|
|
1335
|
+
this[le] === !1 && this[We](s);
|
|
1364
1336
|
});
|
|
1365
1337
|
}
|
|
1366
|
-
[
|
|
1367
|
-
if (
|
|
1338
|
+
[O](e = "error", t) {
|
|
1339
|
+
if (t && typeof t.error == "function")
|
|
1368
1340
|
try {
|
|
1369
|
-
|
|
1341
|
+
t.error(e);
|
|
1370
1342
|
} catch {
|
|
1371
1343
|
}
|
|
1372
|
-
if (typeof this[
|
|
1344
|
+
if (typeof this[Ue] == "function")
|
|
1373
1345
|
try {
|
|
1374
|
-
this[
|
|
1346
|
+
this[Ue](e, t);
|
|
1375
1347
|
} catch {
|
|
1376
1348
|
}
|
|
1377
|
-
console.error(
|
|
1349
|
+
console.error(e);
|
|
1378
1350
|
}
|
|
1379
1351
|
init() {
|
|
1380
|
-
this[
|
|
1352
|
+
this[bt] !== !0 && (this[C]?.init(!this[le]), this[bt] = !0);
|
|
1381
1353
|
}
|
|
1382
1354
|
isReady() {
|
|
1383
|
-
return this[
|
|
1384
|
-
this[
|
|
1355
|
+
return this[le] ? Promise.resolve() : new Promise((e, t) => {
|
|
1356
|
+
this[xt].push([e, t]);
|
|
1385
1357
|
});
|
|
1386
1358
|
}
|
|
1387
|
-
[
|
|
1388
|
-
this[
|
|
1359
|
+
[We](e) {
|
|
1360
|
+
this[le] = !0, this[xt].forEach(([t, n]) => {
|
|
1389
1361
|
try {
|
|
1390
|
-
|
|
1391
|
-
} catch (
|
|
1392
|
-
console.error(
|
|
1362
|
+
e ? t() : n();
|
|
1363
|
+
} catch (s) {
|
|
1364
|
+
console.error(s.message, s);
|
|
1393
1365
|
}
|
|
1394
1366
|
});
|
|
1395
1367
|
}
|
|
1396
|
-
[
|
|
1368
|
+
[gt](e) {
|
|
1397
1369
|
try {
|
|
1398
|
-
if (!
|
|
1399
|
-
let o = [...this[
|
|
1400
|
-
return this[
|
|
1370
|
+
if (!e) {
|
|
1371
|
+
let o = [...this[g]].reverse();
|
|
1372
|
+
return this[_e](o), je && M().location.reload(), Promise.resolve();
|
|
1401
1373
|
}
|
|
1402
|
-
let
|
|
1403
|
-
for (;
|
|
1404
|
-
|
|
1405
|
-
if (
|
|
1406
|
-
if (
|
|
1407
|
-
return this.restore([
|
|
1408
|
-
} else if (
|
|
1409
|
-
if (this[
|
|
1374
|
+
let t = null, n = [], s = [], i = 0;
|
|
1375
|
+
for (; i < e.length && i < this[g].length && j.isSame(e[i], this[g][i]); i++)
|
|
1376
|
+
e[i].opsType === A.Open && e[i].active === !0 && e[i].active !== this[g][i].active && (t = e[i]);
|
|
1377
|
+
if (i < e.length && (n = e.slice(i)), i < this[g].length && (s = this[g].slice(i).reverse()), s.length == 0 && n.length == 0) {
|
|
1378
|
+
if (t !== null)
|
|
1379
|
+
return this.restore([t]);
|
|
1380
|
+
} else if (s.length > 0) {
|
|
1381
|
+
if (this[_e](s)) {
|
|
1410
1382
|
if (n.length > 0)
|
|
1411
1383
|
return this.restore(n);
|
|
1412
|
-
if (
|
|
1413
|
-
return this.restore([
|
|
1384
|
+
if (t !== null)
|
|
1385
|
+
return this.restore([t]);
|
|
1414
1386
|
}
|
|
1415
1387
|
} else
|
|
1416
1388
|
return this.restore(n);
|
|
1417
|
-
} catch (
|
|
1418
|
-
this[
|
|
1389
|
+
} catch (t) {
|
|
1390
|
+
this[O](t);
|
|
1419
1391
|
}
|
|
1420
1392
|
return Promise.resolve();
|
|
1421
1393
|
}
|
|
1422
|
-
[He](
|
|
1423
|
-
if (
|
|
1424
|
-
this[ye].value =
|
|
1394
|
+
[He](e) {
|
|
1395
|
+
if (e)
|
|
1396
|
+
this[ye].value = e;
|
|
1425
1397
|
else {
|
|
1426
|
-
let
|
|
1427
|
-
|
|
1398
|
+
let t = this[g].length;
|
|
1399
|
+
t > 0 ? this[ye].value = this[g][t - 1] : this[ye].value = null;
|
|
1428
1400
|
}
|
|
1429
|
-
if (typeof this[
|
|
1401
|
+
if (typeof this[Ve] == "function")
|
|
1430
1402
|
try {
|
|
1431
|
-
this[
|
|
1403
|
+
this[Ve](this[ye].value);
|
|
1432
1404
|
} catch {
|
|
1433
1405
|
}
|
|
1434
1406
|
}
|
|
1435
|
-
[
|
|
1436
|
-
|
|
1407
|
+
[ur](e, t = -1) {
|
|
1408
|
+
t < 0 || t >= this[g].length ? this[g].push(e) : this[g].splice(t, 0, e);
|
|
1437
1409
|
}
|
|
1438
|
-
[
|
|
1439
|
-
let
|
|
1440
|
-
for (let
|
|
1441
|
-
let n =
|
|
1442
|
-
|
|
1410
|
+
[Be]() {
|
|
1411
|
+
let e = [];
|
|
1412
|
+
for (let t of this[g]) {
|
|
1413
|
+
let n = j.clone(t, !0);
|
|
1414
|
+
e.push(n);
|
|
1443
1415
|
}
|
|
1444
|
-
return
|
|
1416
|
+
return e;
|
|
1445
1417
|
}
|
|
1446
|
-
[
|
|
1447
|
-
if (!this[
|
|
1418
|
+
[pe](e) {
|
|
1419
|
+
if (!this[g])
|
|
1448
1420
|
return;
|
|
1449
|
-
let
|
|
1450
|
-
for (let n = 0; n < this[
|
|
1451
|
-
if (
|
|
1452
|
-
|
|
1421
|
+
let t = -1;
|
|
1422
|
+
for (let n = 0; n < this[g].length; n++)
|
|
1423
|
+
if (j.isSame(this[g][n], e)) {
|
|
1424
|
+
t = n;
|
|
1453
1425
|
break;
|
|
1454
1426
|
}
|
|
1455
|
-
if (
|
|
1456
|
-
let n = this[
|
|
1457
|
-
this[
|
|
1427
|
+
if (t != -1) {
|
|
1428
|
+
let n = this[g][t];
|
|
1429
|
+
this[g].splice(t, 1), this[cr](n, n.session);
|
|
1458
1430
|
}
|
|
1459
1431
|
}
|
|
1460
|
-
set historyMonitor(
|
|
1461
|
-
this[
|
|
1432
|
+
set historyMonitor(e) {
|
|
1433
|
+
this[C] && (this[C].historyMonitor = e);
|
|
1462
1434
|
}
|
|
1463
1435
|
get historyMonitor() {
|
|
1464
|
-
return this[
|
|
1436
|
+
return this[C] ? this[C].historyMonitor : !1;
|
|
1465
1437
|
}
|
|
1466
|
-
set traceless(
|
|
1467
|
-
this[
|
|
1438
|
+
set traceless(e) {
|
|
1439
|
+
this[C] && (this[C].traceless = e);
|
|
1468
1440
|
}
|
|
1469
1441
|
get traceless() {
|
|
1470
|
-
return this[
|
|
1442
|
+
return this[C] ? this[C].traceless : !1;
|
|
1471
1443
|
}
|
|
1472
1444
|
setRestorePoint() {
|
|
1473
|
-
const
|
|
1474
|
-
this[
|
|
1445
|
+
const e = this[Be]();
|
|
1446
|
+
this[C]?.setRestorePoint(e);
|
|
1475
1447
|
}
|
|
1476
|
-
onRouteUpdated(
|
|
1477
|
-
this[
|
|
1448
|
+
onRouteUpdated(e) {
|
|
1449
|
+
this[Ve] = e;
|
|
1478
1450
|
}
|
|
1479
|
-
onError(
|
|
1480
|
-
this[
|
|
1451
|
+
onError(e) {
|
|
1452
|
+
this[Ue] = e;
|
|
1481
1453
|
}
|
|
1482
|
-
beforeEach(
|
|
1483
|
-
this[
|
|
1454
|
+
beforeEach(e) {
|
|
1455
|
+
this[Ee].push(e);
|
|
1484
1456
|
}
|
|
1485
|
-
removeBeforeEach(
|
|
1486
|
-
const
|
|
1487
|
-
return
|
|
1457
|
+
removeBeforeEach(e) {
|
|
1458
|
+
const t = this[Ee].indexOf(e);
|
|
1459
|
+
return t !== -1 ? (this[Ee].splice(t, 1), !0) : !1;
|
|
1488
1460
|
}
|
|
1489
|
-
afterEach(
|
|
1490
|
-
this[
|
|
1461
|
+
afterEach(e) {
|
|
1462
|
+
this[Fe].push(e);
|
|
1491
1463
|
}
|
|
1492
|
-
removeAfterEach(
|
|
1493
|
-
const
|
|
1494
|
-
return
|
|
1464
|
+
removeAfterEach(e) {
|
|
1465
|
+
const t = this[Fe].indexOf(e);
|
|
1466
|
+
return t !== -1 ? (this[Fe].splice(t, 1), !0) : !1;
|
|
1495
1467
|
}
|
|
1496
|
-
destroyEach(
|
|
1497
|
-
this[
|
|
1468
|
+
destroyEach(e) {
|
|
1469
|
+
this[Te].push(e);
|
|
1498
1470
|
}
|
|
1499
|
-
removeDestroyEach(
|
|
1500
|
-
const
|
|
1501
|
-
return
|
|
1471
|
+
removeDestroyEach(e) {
|
|
1472
|
+
const t = this[Te].indexOf(e);
|
|
1473
|
+
return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
|
|
1502
1474
|
}
|
|
1503
|
-
addRoutes(
|
|
1504
|
-
for (let
|
|
1505
|
-
this.addRoute(
|
|
1475
|
+
addRoutes(e) {
|
|
1476
|
+
for (let t of e)
|
|
1477
|
+
this.addRoute(t);
|
|
1506
1478
|
}
|
|
1507
|
-
addRoute(
|
|
1508
|
-
if (
|
|
1509
|
-
this.setNotFoundRoute(
|
|
1479
|
+
addRoute(e, t = -1) {
|
|
1480
|
+
if (e.path === this[wt]) {
|
|
1481
|
+
this.setNotFoundRoute(e);
|
|
1510
1482
|
return;
|
|
1511
1483
|
}
|
|
1512
|
-
const n = this[
|
|
1513
|
-
if (
|
|
1514
|
-
this[
|
|
1484
|
+
const n = this[Ie](e);
|
|
1485
|
+
if (t == -1)
|
|
1486
|
+
this[B] = [...this[B], ...n];
|
|
1515
1487
|
else
|
|
1516
|
-
for (let
|
|
1517
|
-
this[
|
|
1518
|
-
}
|
|
1519
|
-
removeRoute(
|
|
1520
|
-
const
|
|
1521
|
-
if (
|
|
1522
|
-
return console.warn("route格式错误",
|
|
1523
|
-
for (let n = 0; n < this[
|
|
1524
|
-
const
|
|
1525
|
-
if (
|
|
1526
|
-
return this[
|
|
1527
|
-
if (
|
|
1528
|
-
return this[
|
|
1488
|
+
for (let s = n.length - 1; s >= 0; s--)
|
|
1489
|
+
this[B].splice(t, 0, n[s]);
|
|
1490
|
+
}
|
|
1491
|
+
removeRoute(e) {
|
|
1492
|
+
const t = this[I](e);
|
|
1493
|
+
if (t === null)
|
|
1494
|
+
return console.warn("route格式错误", e), !1;
|
|
1495
|
+
for (let n = 0; n < this[B].length; n++) {
|
|
1496
|
+
const s = this[B][n];
|
|
1497
|
+
if (t?.path && s.path === t.path)
|
|
1498
|
+
return this[B].splice(n, 1), !0;
|
|
1499
|
+
if (t?.name && s.name === t.name)
|
|
1500
|
+
return this[B].splice(n, 1), !0;
|
|
1529
1501
|
}
|
|
1530
1502
|
return !1;
|
|
1531
1503
|
}
|
|
1532
|
-
hasRoute(
|
|
1533
|
-
const
|
|
1534
|
-
return
|
|
1535
|
-
if (
|
|
1504
|
+
hasRoute(e) {
|
|
1505
|
+
const t = this[I](e);
|
|
1506
|
+
return t === null ? (console.warn("route格式错误", e), !1) : this[B].findIndex((s) => {
|
|
1507
|
+
if (t?.path && s.path === t.path || t?.name && s.name === t.name)
|
|
1536
1508
|
return !0;
|
|
1537
1509
|
}) !== -1;
|
|
1538
1510
|
}
|
|
1539
|
-
setNotFoundPath(
|
|
1540
|
-
this[
|
|
1511
|
+
setNotFoundPath(e) {
|
|
1512
|
+
this[wt] = e;
|
|
1541
1513
|
}
|
|
1542
|
-
setNotFoundRoute(
|
|
1543
|
-
const
|
|
1544
|
-
this[
|
|
1514
|
+
setNotFoundRoute(e) {
|
|
1515
|
+
const t = this[Ie](e);
|
|
1516
|
+
this[ke] = t[0];
|
|
1545
1517
|
}
|
|
1546
1518
|
getRoutes() {
|
|
1547
|
-
return [...this[
|
|
1519
|
+
return [...this[B]];
|
|
1548
1520
|
}
|
|
1549
|
-
[
|
|
1550
|
-
let
|
|
1551
|
-
|
|
1552
|
-
let n =
|
|
1521
|
+
[Ie](e) {
|
|
1522
|
+
let t = e.path ?? "";
|
|
1523
|
+
t.length > 0 && t.charAt(0) !== "/" && (t = `/${t}`);
|
|
1524
|
+
let n = e.components ?? (e.component && { "": e.component });
|
|
1553
1525
|
if (n == null) {
|
|
1554
|
-
let
|
|
1555
|
-
return
|
|
1556
|
-
}
|
|
1557
|
-
let
|
|
1558
|
-
for (let
|
|
1559
|
-
let
|
|
1560
|
-
|
|
1561
|
-
let
|
|
1562
|
-
|
|
1563
|
-
}
|
|
1564
|
-
let
|
|
1565
|
-
if (
|
|
1566
|
-
for (let
|
|
1567
|
-
let
|
|
1568
|
-
for (let
|
|
1569
|
-
let f = new
|
|
1570
|
-
f.name =
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1526
|
+
let a = new lt();
|
|
1527
|
+
return a.path = t, a.redirect = e.redirect, [a];
|
|
1528
|
+
}
|
|
1529
|
+
let s = [];
|
|
1530
|
+
for (let a in n) {
|
|
1531
|
+
let l = n[a];
|
|
1532
|
+
a.length === 0 && (a = Z);
|
|
1533
|
+
let u = new en(a, l, e.props, e.meta);
|
|
1534
|
+
s.push(u);
|
|
1535
|
+
}
|
|
1536
|
+
let i = !1, o = [];
|
|
1537
|
+
if (e.children)
|
|
1538
|
+
for (let a of e.children) {
|
|
1539
|
+
let l = this[Ie](a);
|
|
1540
|
+
for (let u of l) {
|
|
1541
|
+
let f = new lt();
|
|
1542
|
+
f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (i = !0, f.path = t);
|
|
1543
|
+
let c = new Gt();
|
|
1544
|
+
c.models = [...s], f.layers = [c, ...u.layers], o.push(f);
|
|
1573
1545
|
}
|
|
1574
1546
|
}
|
|
1575
|
-
if (!
|
|
1576
|
-
let
|
|
1577
|
-
|
|
1578
|
-
let
|
|
1579
|
-
|
|
1547
|
+
if (!i) {
|
|
1548
|
+
let a = new Gt();
|
|
1549
|
+
a.models = s;
|
|
1550
|
+
let l = new lt();
|
|
1551
|
+
l.name = e.name, l.path = t, l.layers = [a], o.splice(0, 0, l);
|
|
1580
1552
|
}
|
|
1581
1553
|
return o;
|
|
1582
1554
|
}
|
|
1583
|
-
[
|
|
1584
|
-
const
|
|
1555
|
+
[De](e) {
|
|
1556
|
+
const t = e.route;
|
|
1585
1557
|
try {
|
|
1586
|
-
for (let n of this[
|
|
1587
|
-
if (
|
|
1588
|
-
let
|
|
1589
|
-
|
|
1590
|
-
let
|
|
1591
|
-
if (!
|
|
1558
|
+
for (let n of this[B])
|
|
1559
|
+
if (t.path && n.path) {
|
|
1560
|
+
let s = n.match;
|
|
1561
|
+
s || (s = n.match = hn(n.path));
|
|
1562
|
+
let i = s(t.path);
|
|
1563
|
+
if (!i)
|
|
1592
1564
|
continue;
|
|
1593
1565
|
if (n.redirect) {
|
|
1594
|
-
let o = new
|
|
1595
|
-
|
|
1596
|
-
let
|
|
1566
|
+
let o = new j();
|
|
1567
|
+
$(!0, o, t), o.path = n.redirect;
|
|
1568
|
+
let a = {
|
|
1597
1569
|
route: o,
|
|
1598
1570
|
find: void 0
|
|
1599
1571
|
};
|
|
1600
|
-
return this[
|
|
1572
|
+
return this[De](a) ? (e.route = a.route, e.find = a.find, !0) : !1;
|
|
1601
1573
|
}
|
|
1602
|
-
if (
|
|
1603
|
-
let o =
|
|
1574
|
+
if (t.params = t.params ?? {}, $(!0, t.params, i.params), t.query) {
|
|
1575
|
+
let o = t.query;
|
|
1604
1576
|
if (typeof o == "string") {
|
|
1605
|
-
let
|
|
1606
|
-
for (let
|
|
1607
|
-
let f =
|
|
1577
|
+
let a = {}, l = o.split("&");
|
|
1578
|
+
for (let u of l) {
|
|
1579
|
+
let f = u.split("=");
|
|
1608
1580
|
if (f.length !== 2)
|
|
1609
1581
|
continue;
|
|
1610
|
-
let
|
|
1611
|
-
|
|
1582
|
+
let c = decodeURIComponent(f[0].trim()), h = decodeURIComponent(f[1].trim());
|
|
1583
|
+
a[c] = h;
|
|
1612
1584
|
}
|
|
1613
|
-
|
|
1585
|
+
$(!0, t.params, a);
|
|
1614
1586
|
} else
|
|
1615
|
-
typeof o == "object" &&
|
|
1587
|
+
typeof o == "object" && $(!0, t.params, o);
|
|
1616
1588
|
}
|
|
1617
|
-
return
|
|
1618
|
-
} else if (
|
|
1619
|
-
|
|
1620
|
-
let
|
|
1621
|
-
return
|
|
1589
|
+
return e.find = n, !0;
|
|
1590
|
+
} else if (t.name === n.name) {
|
|
1591
|
+
t.params = t.params ?? {};
|
|
1592
|
+
let s = fn(n.path);
|
|
1593
|
+
return t.path = s(t.params), e.find = n, !0;
|
|
1622
1594
|
}
|
|
1623
1595
|
} catch (n) {
|
|
1624
|
-
console.error(n.message, n), typeof
|
|
1596
|
+
console.error(n.message, n), typeof t.error == "function" && t.error(n.message);
|
|
1625
1597
|
}
|
|
1626
1598
|
return !1;
|
|
1627
1599
|
}
|
|
1628
|
-
[
|
|
1629
|
-
let
|
|
1630
|
-
if (Array.isArray(
|
|
1631
|
-
if (
|
|
1632
|
-
|
|
1600
|
+
[I](e) {
|
|
1601
|
+
let t = null;
|
|
1602
|
+
if (Array.isArray(e))
|
|
1603
|
+
if (t = new j(), typeof e[0] == "object")
|
|
1604
|
+
t = j.from(e[0]);
|
|
1633
1605
|
else
|
|
1634
|
-
for (let n = 0; n <
|
|
1635
|
-
n === 0 ?
|
|
1606
|
+
for (let n = 0; n < e.length; n++)
|
|
1607
|
+
n === 0 ? e[n].charAt(0) === "/" ? t.path = e[n] : t.name = e[n] : n === 1 ? t.params = e[n] : n === 2 ? t.root = e[n] : n === 3 && $(!1, t, e[n]);
|
|
1636
1608
|
else
|
|
1637
|
-
typeof
|
|
1638
|
-
if (
|
|
1639
|
-
if (
|
|
1640
|
-
let n =
|
|
1641
|
-
n !== -1 && n <
|
|
1609
|
+
typeof e == "object" ? t = j.from(e) : typeof e == "string" && (t = new j(), e.charAt(0) == "/" ? t.path = e : t.name = e);
|
|
1610
|
+
if (t) {
|
|
1611
|
+
if (t.path) {
|
|
1612
|
+
let n = t.path.indexOf("?");
|
|
1613
|
+
n !== -1 && n < t.path.length - 1 && (t.query = t.path.substring(n + 1), t.path = t.path.substring(0, n));
|
|
1642
1614
|
}
|
|
1643
|
-
|
|
1615
|
+
t.root = t.root ?? Z, t.opsType = t.opsType ?? this.options.defaultOperationType ?? A.Push;
|
|
1644
1616
|
}
|
|
1645
|
-
return
|
|
1617
|
+
return t;
|
|
1646
1618
|
}
|
|
1647
|
-
push(...
|
|
1648
|
-
let
|
|
1649
|
-
return
|
|
1619
|
+
push(...e) {
|
|
1620
|
+
let t = this[I](e);
|
|
1621
|
+
return t ? (t.opsType = t.opsType || A.Push, this.to(t)) : (this[O]("resolve route fail", t), this);
|
|
1650
1622
|
}
|
|
1651
|
-
put(...
|
|
1652
|
-
let
|
|
1653
|
-
return
|
|
1623
|
+
put(...e) {
|
|
1624
|
+
let t = this[I](e);
|
|
1625
|
+
return t ? (t.opsType = A.Put, this.to(t)) : (this[O]("resolve route fail", t), this);
|
|
1654
1626
|
}
|
|
1655
|
-
replace(...
|
|
1656
|
-
let
|
|
1657
|
-
return
|
|
1627
|
+
replace(...e) {
|
|
1628
|
+
let t = this[I](e);
|
|
1629
|
+
return t ? (t.opsType = A.Replace, this.to(t)) : (this[O]("resolve route fail", t), this);
|
|
1658
1630
|
}
|
|
1659
|
-
append(...
|
|
1660
|
-
let
|
|
1661
|
-
return
|
|
1631
|
+
append(...e) {
|
|
1632
|
+
let t = this[I](e);
|
|
1633
|
+
return t ? (t.opsType = A.Append, this.to(t)) : (this[O]("resolve route fail", t), this);
|
|
1662
1634
|
}
|
|
1663
|
-
remove(
|
|
1664
|
-
return new Promise((
|
|
1665
|
-
this[
|
|
1635
|
+
remove(e) {
|
|
1636
|
+
return new Promise((t) => {
|
|
1637
|
+
this[me].post((n) => {
|
|
1666
1638
|
try {
|
|
1667
|
-
if (this[
|
|
1668
|
-
n.resolve(),
|
|
1639
|
+
if (this[g].length === 0) {
|
|
1640
|
+
n.resolve(), t(!1);
|
|
1669
1641
|
return;
|
|
1670
1642
|
}
|
|
1671
|
-
let
|
|
1672
|
-
if (
|
|
1673
|
-
if (
|
|
1674
|
-
for (let
|
|
1675
|
-
let
|
|
1676
|
-
|
|
1643
|
+
let s = -1, i, o = [];
|
|
1644
|
+
if (e) {
|
|
1645
|
+
if (e.root ? i = e.root : i = this[g][0].root ?? Z, e.all)
|
|
1646
|
+
for (let l = this[g].length - 1; l > 0; l--) {
|
|
1647
|
+
let u = this[g][l];
|
|
1648
|
+
u.opsType === A.Append && u.root === i && (o.splice(0, 0, u), s = l - 1);
|
|
1677
1649
|
}
|
|
1678
|
-
else if (
|
|
1679
|
-
for (let
|
|
1680
|
-
let
|
|
1681
|
-
if (
|
|
1682
|
-
if (
|
|
1683
|
-
|
|
1650
|
+
else if (e.until)
|
|
1651
|
+
for (let l = this[g].length - 1; l > 0; l--) {
|
|
1652
|
+
let u = this[g][l];
|
|
1653
|
+
if (u.opsType === A.Append && u.root === i) {
|
|
1654
|
+
if (e.until.charAt(0) === "/" && e.until === u.path) {
|
|
1655
|
+
s = l;
|
|
1684
1656
|
break;
|
|
1685
|
-
} else if (
|
|
1686
|
-
|
|
1657
|
+
} else if (e.until === u.name) {
|
|
1658
|
+
s = l;
|
|
1687
1659
|
break;
|
|
1688
1660
|
}
|
|
1689
|
-
o.splice(0, 0,
|
|
1661
|
+
o.splice(0, 0, u);
|
|
1690
1662
|
}
|
|
1691
1663
|
}
|
|
1692
1664
|
} else {
|
|
1693
|
-
|
|
1694
|
-
let
|
|
1695
|
-
|
|
1696
|
-
for (let
|
|
1697
|
-
let f = this[
|
|
1698
|
-
if (f.opsType ===
|
|
1699
|
-
o.push(f),
|
|
1665
|
+
i = Z;
|
|
1666
|
+
let l = this[ir](this[U]);
|
|
1667
|
+
l && (i = l.name);
|
|
1668
|
+
for (let u = this[g].length - 1; u > 0; u--) {
|
|
1669
|
+
let f = this[g][u];
|
|
1670
|
+
if (f.opsType === A.Append && f.root === i) {
|
|
1671
|
+
o.push(f), s = u - 1;
|
|
1700
1672
|
break;
|
|
1701
1673
|
}
|
|
1702
1674
|
}
|
|
1703
1675
|
}
|
|
1704
1676
|
if (o.length === 0) {
|
|
1705
|
-
let
|
|
1706
|
-
console.warn(
|
|
1677
|
+
let l = "can not find route";
|
|
1678
|
+
console.warn(l), n.resolve(l), t(!1);
|
|
1707
1679
|
return;
|
|
1708
1680
|
}
|
|
1709
|
-
let
|
|
1710
|
-
if (this[
|
|
1711
|
-
|
|
1712
|
-
}), this[
|
|
1713
|
-
let
|
|
1714
|
-
this[
|
|
1715
|
-
f.opsType !==
|
|
1681
|
+
let a = 0;
|
|
1682
|
+
if (this[g].forEach((l) => {
|
|
1683
|
+
l.opsType !== A.Put && a++;
|
|
1684
|
+
}), this[_e](o)) {
|
|
1685
|
+
let l = 0;
|
|
1686
|
+
this[g].forEach((f) => {
|
|
1687
|
+
f.opsType !== A.Put && l++;
|
|
1716
1688
|
});
|
|
1717
|
-
const
|
|
1718
|
-
this[
|
|
1689
|
+
const u = l - a;
|
|
1690
|
+
this[C]?.go(u, !1), n.resolve(), t(!0);
|
|
1719
1691
|
}
|
|
1720
|
-
} catch (
|
|
1721
|
-
this[
|
|
1692
|
+
} catch (s) {
|
|
1693
|
+
this[O](s), n.resolve(), t(!1);
|
|
1722
1694
|
}
|
|
1723
1695
|
});
|
|
1724
1696
|
});
|
|
1725
1697
|
}
|
|
1726
|
-
open(...
|
|
1727
|
-
let
|
|
1728
|
-
return
|
|
1698
|
+
open(...e) {
|
|
1699
|
+
let t = this[I](e);
|
|
1700
|
+
return t ? (t.opsType = A.Open, this.to(t)) : (this[O]("resolve route fail", t), this);
|
|
1729
1701
|
}
|
|
1730
|
-
close(
|
|
1731
|
-
return this[
|
|
1702
|
+
close(e) {
|
|
1703
|
+
return this[me].post((t) => {
|
|
1732
1704
|
try {
|
|
1733
|
-
let n = this[
|
|
1705
|
+
let n = this[I](e);
|
|
1734
1706
|
if (!n) {
|
|
1735
|
-
|
|
1707
|
+
t.reject("resolve route fail");
|
|
1736
1708
|
return;
|
|
1737
1709
|
}
|
|
1738
|
-
let
|
|
1739
|
-
for (let
|
|
1740
|
-
let o = this[
|
|
1710
|
+
let s = [];
|
|
1711
|
+
for (let i = 0; i < this[g].length; i++) {
|
|
1712
|
+
let o = this[g][i];
|
|
1741
1713
|
if (o.root === n.root) {
|
|
1742
1714
|
if (!n.path && !n.name) {
|
|
1743
|
-
|
|
1715
|
+
s.push(o);
|
|
1744
1716
|
continue;
|
|
1745
1717
|
}
|
|
1746
1718
|
if (n.path && n.path === o.path) {
|
|
1747
|
-
|
|
1719
|
+
s.push(o);
|
|
1748
1720
|
break;
|
|
1749
1721
|
} else if (n.name && n.name === o.name) {
|
|
1750
|
-
|
|
1722
|
+
s.push(o);
|
|
1751
1723
|
break;
|
|
1752
1724
|
}
|
|
1753
1725
|
}
|
|
1754
1726
|
}
|
|
1755
|
-
if (
|
|
1756
|
-
|
|
1727
|
+
if (s.length === 0) {
|
|
1728
|
+
t.resolve();
|
|
1757
1729
|
return;
|
|
1758
1730
|
}
|
|
1759
|
-
this[
|
|
1731
|
+
this[_e](s) && this[He](), t.resolve();
|
|
1760
1732
|
} catch (n) {
|
|
1761
|
-
this[
|
|
1733
|
+
this[O](n), t.resolve();
|
|
1762
1734
|
}
|
|
1763
1735
|
}), this;
|
|
1764
1736
|
}
|
|
1765
|
-
to(...
|
|
1766
|
-
let
|
|
1767
|
-
if (!
|
|
1768
|
-
return this[
|
|
1769
|
-
console.debug("route to",
|
|
1770
|
-
let n = this[
|
|
1771
|
-
return n == null ? (this[
|
|
1737
|
+
to(...e) {
|
|
1738
|
+
let t = this[I](e);
|
|
1739
|
+
if (!t)
|
|
1740
|
+
return this[O]("resolve route fail", t), this;
|
|
1741
|
+
console.debug("route to", t.path, t.root);
|
|
1742
|
+
let n = this[$e].acquire(t);
|
|
1743
|
+
return n == null ? (this[O]("route forbid", t), this) : (this[me].post((s) => {
|
|
1772
1744
|
try {
|
|
1773
|
-
let
|
|
1774
|
-
this[
|
|
1775
|
-
(o,
|
|
1776
|
-
const
|
|
1745
|
+
let i = this[Rt](t);
|
|
1746
|
+
this[St](i), this[Ct](i), this[Pt](i), i.wait(
|
|
1747
|
+
(o, a) => {
|
|
1748
|
+
const l = o.session.to;
|
|
1777
1749
|
try {
|
|
1778
|
-
let
|
|
1779
|
-
const f = new
|
|
1780
|
-
|
|
1781
|
-
} catch (
|
|
1782
|
-
console.error(
|
|
1750
|
+
let u = j.clone(l, !0);
|
|
1751
|
+
const f = new tr(u, this[Be]());
|
|
1752
|
+
l.opsType === A.Replace ? this[C]?.replace(f) : this[C]?.push(f);
|
|
1753
|
+
} catch (u) {
|
|
1754
|
+
console.error(u.message, u);
|
|
1783
1755
|
}
|
|
1784
|
-
if (this[
|
|
1756
|
+
if (this[$e].release(n), this[He](l), typeof t.success == "function")
|
|
1785
1757
|
try {
|
|
1786
|
-
Reflect.apply(
|
|
1787
|
-
} catch (
|
|
1788
|
-
console.error(
|
|
1758
|
+
Reflect.apply(t.success, {}, []);
|
|
1759
|
+
} catch (u) {
|
|
1760
|
+
console.error(u.message, u);
|
|
1789
1761
|
}
|
|
1790
|
-
this[
|
|
1762
|
+
this[le] === !1 && this[We](!0), s.resolve();
|
|
1791
1763
|
},
|
|
1792
|
-
(o,
|
|
1793
|
-
this[
|
|
1764
|
+
(o, a) => {
|
|
1765
|
+
this[$e].release(n), a !== null && this[O](a, t), this[le] === !1 && this[We](!1), s.resolve();
|
|
1794
1766
|
}
|
|
1795
1767
|
);
|
|
1796
|
-
} catch (
|
|
1797
|
-
this[
|
|
1768
|
+
} catch (i) {
|
|
1769
|
+
this[$e].release(n), this[O](i, t), s.resolve();
|
|
1798
1770
|
}
|
|
1799
1771
|
}), this);
|
|
1800
1772
|
}
|
|
1801
|
-
back(
|
|
1802
|
-
this[
|
|
1803
|
-
}
|
|
1804
|
-
[
|
|
1805
|
-
return (
|
|
1806
|
-
if (typeof
|
|
1807
|
-
|
|
1808
|
-
else if (
|
|
1809
|
-
const
|
|
1810
|
-
if (
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1773
|
+
back(e = 1) {
|
|
1774
|
+
this[C]?.go(-e);
|
|
1775
|
+
}
|
|
1776
|
+
[fr](e) {
|
|
1777
|
+
return (t, n) => {
|
|
1778
|
+
if (typeof t == "boolean")
|
|
1779
|
+
e.session.redirect = !1, t ? e.resolve() : e.reject(n ?? null);
|
|
1780
|
+
else if (t) {
|
|
1781
|
+
const s = this[I](t);
|
|
1782
|
+
if (s) {
|
|
1783
|
+
const i = e.session.to;
|
|
1784
|
+
s.success = i.success, s.error = i.error, e.session.to = s, e.session.redirect = !0, e.session.routeModel = null, e.resolve();
|
|
1813
1785
|
} else
|
|
1814
|
-
|
|
1786
|
+
e.session.redirect = !1, e.reject("route resolve fail");
|
|
1815
1787
|
} else
|
|
1816
|
-
|
|
1788
|
+
e.session.redirect = !1, e.resolve();
|
|
1817
1789
|
};
|
|
1818
1790
|
}
|
|
1819
|
-
[
|
|
1820
|
-
let
|
|
1821
|
-
route:
|
|
1791
|
+
[Rt](e) {
|
|
1792
|
+
let t = this[g].length > 0 ? this[g][0] : void 0, n = new Ye(e, t), s = {
|
|
1793
|
+
route: e,
|
|
1822
1794
|
find: null
|
|
1823
1795
|
};
|
|
1824
|
-
return this[
|
|
1796
|
+
return this[De](s), s.find && (n.routeModel = s.find, e.matched = An(s.find), Array.isArray(e.matched) && e.matched.length > 0 && (e.meta = s.find.layers[0].models[0].meta)), new Ze(n);
|
|
1825
1797
|
}
|
|
1826
|
-
[
|
|
1827
|
-
for (let
|
|
1828
|
-
|
|
1829
|
-
let
|
|
1830
|
-
Reflect.apply(
|
|
1798
|
+
[St](e) {
|
|
1799
|
+
for (let t of this[Ee])
|
|
1800
|
+
e.post((n) => {
|
|
1801
|
+
let s = this[fr](n);
|
|
1802
|
+
Reflect.apply(t, {}, [n.session.to, n.session.from, s, n.session]);
|
|
1831
1803
|
});
|
|
1832
1804
|
}
|
|
1833
|
-
[
|
|
1834
|
-
|
|
1835
|
-
for (let n of this[
|
|
1805
|
+
[Pt](e) {
|
|
1806
|
+
e.post((t) => {
|
|
1807
|
+
for (let n of this[Fe])
|
|
1836
1808
|
try {
|
|
1837
|
-
Reflect.apply(n, {}, [
|
|
1838
|
-
} catch (
|
|
1839
|
-
console.error(
|
|
1809
|
+
Reflect.apply(n, {}, [t.session.to, t.session.from, t.session]);
|
|
1810
|
+
} catch (s) {
|
|
1811
|
+
console.error(s.message, s);
|
|
1840
1812
|
}
|
|
1841
|
-
|
|
1813
|
+
t.resolve();
|
|
1842
1814
|
});
|
|
1843
1815
|
}
|
|
1844
|
-
[
|
|
1845
|
-
for (let n of this[
|
|
1816
|
+
[cr](e, t) {
|
|
1817
|
+
for (let n of this[Te])
|
|
1846
1818
|
try {
|
|
1847
|
-
Reflect.apply(n, {}, [
|
|
1848
|
-
} catch (
|
|
1849
|
-
console.error(
|
|
1819
|
+
Reflect.apply(n, {}, [e, t]);
|
|
1820
|
+
} catch (s) {
|
|
1821
|
+
console.error(s.message, s);
|
|
1850
1822
|
}
|
|
1851
|
-
typeof
|
|
1823
|
+
typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
|
|
1852
1824
|
}
|
|
1853
|
-
[
|
|
1854
|
-
|
|
1855
|
-
let n =
|
|
1856
|
-
if (
|
|
1825
|
+
[Ct](e) {
|
|
1826
|
+
e.post((t) => {
|
|
1827
|
+
let n = t.session.to, s = t.session.routeModel;
|
|
1828
|
+
if (s == null) {
|
|
1857
1829
|
let o = {
|
|
1858
1830
|
route: n,
|
|
1859
1831
|
find: null
|
|
1860
1832
|
};
|
|
1861
|
-
if (this[
|
|
1862
|
-
|
|
1863
|
-
else if (this[
|
|
1864
|
-
|
|
1833
|
+
if (this[De](o))
|
|
1834
|
+
s = o.find, t.session.routeModel = s;
|
|
1835
|
+
else if (this[ke])
|
|
1836
|
+
s = this[ke];
|
|
1865
1837
|
else {
|
|
1866
|
-
|
|
1838
|
+
t.reject(`not find route model, path:${n.path ?? n.name}`);
|
|
1867
1839
|
return;
|
|
1868
1840
|
}
|
|
1869
1841
|
}
|
|
1870
|
-
let
|
|
1871
|
-
this[
|
|
1842
|
+
let i = Ye.from(t.session);
|
|
1843
|
+
this[or](n, s, i).then(
|
|
1872
1844
|
(o) => {
|
|
1873
|
-
this[
|
|
1845
|
+
this[U], t.resolve();
|
|
1874
1846
|
},
|
|
1875
1847
|
(o) => {
|
|
1876
|
-
|
|
1848
|
+
t.reject(o);
|
|
1877
1849
|
}
|
|
1878
1850
|
);
|
|
1879
1851
|
});
|
|
1880
1852
|
}
|
|
1881
|
-
[
|
|
1882
|
-
if (
|
|
1853
|
+
[_e](e) {
|
|
1854
|
+
if (e.length == 0)
|
|
1883
1855
|
return !0;
|
|
1884
|
-
let
|
|
1885
|
-
for (let
|
|
1886
|
-
let
|
|
1887
|
-
|
|
1888
|
-
...
|
|
1889
|
-
route:
|
|
1856
|
+
let t = this[U], n = [];
|
|
1857
|
+
for (let s of e) {
|
|
1858
|
+
let i = this[vt](t, s);
|
|
1859
|
+
i != null && n.push({
|
|
1860
|
+
...i,
|
|
1861
|
+
route: s
|
|
1890
1862
|
});
|
|
1891
1863
|
}
|
|
1892
1864
|
if (n.length == 0) {
|
|
1893
|
-
let
|
|
1894
|
-
return this[
|
|
1865
|
+
let s = "can not find view index";
|
|
1866
|
+
return this[O](s), !1;
|
|
1895
1867
|
}
|
|
1896
|
-
for (let
|
|
1897
|
-
this[
|
|
1868
|
+
for (let s of n.reverse())
|
|
1869
|
+
this[oe](t, { x: s.x, y: s.y }, [s.route.index ?? 0], !0);
|
|
1898
1870
|
return !0;
|
|
1899
1871
|
}
|
|
1900
|
-
[
|
|
1901
|
-
const n =
|
|
1902
|
-
let
|
|
1903
|
-
for (let
|
|
1904
|
-
const o =
|
|
1905
|
-
for (let
|
|
1906
|
-
const
|
|
1907
|
-
if (
|
|
1908
|
-
return
|
|
1872
|
+
[vt](e, t) {
|
|
1873
|
+
const n = t.root ?? Z;
|
|
1874
|
+
let s;
|
|
1875
|
+
for (let i = 0; i < e.layers.length; i++) {
|
|
1876
|
+
const o = e.layers[i];
|
|
1877
|
+
for (let a = o.views.length - 1; a >= 0; a--) {
|
|
1878
|
+
const l = o.views[a];
|
|
1879
|
+
if (l[J] && l[Ge] === n)
|
|
1880
|
+
return s = { x: a, y: i }, s;
|
|
1909
1881
|
}
|
|
1910
1882
|
}
|
|
1911
1883
|
return null;
|
|
1912
1884
|
}
|
|
1913
|
-
[
|
|
1914
|
-
return
|
|
1885
|
+
[ir](e) {
|
|
1886
|
+
return e.layers.length > 0 && e.layers[0].views.length > 0 ? e.layers[0].views[0] : null;
|
|
1915
1887
|
}
|
|
1916
|
-
[
|
|
1917
|
-
if (
|
|
1888
|
+
[oe](e, t, n = null, s = !0) {
|
|
1889
|
+
if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length)
|
|
1918
1890
|
return;
|
|
1919
|
-
let
|
|
1920
|
-
for (let
|
|
1921
|
-
let
|
|
1922
|
-
(!n || n.indexOf(
|
|
1891
|
+
let i = e.layers[t.y].views[t.x], o = !1, a = [], l = !1, u = [...i.slots.value];
|
|
1892
|
+
for (let c = u.length - 1; c >= 0; c--) {
|
|
1893
|
+
let h = u[c];
|
|
1894
|
+
(!n || n.indexOf(h.index) != -1) && (h.route && i[J] && (this[pe](h.route), h.active === !0 && h.route.opsType == A.Append && (l = !0)), a.push(new V(i, h.index, t.y)), u.splice(c, 1));
|
|
1923
1895
|
}
|
|
1924
|
-
if (
|
|
1925
|
-
|
|
1896
|
+
if (u.length == 0)
|
|
1897
|
+
s ? i.slots.value = u : e.layers[t.y].views.splice(t.x, 1);
|
|
1926
1898
|
else {
|
|
1927
|
-
if (
|
|
1928
|
-
let
|
|
1929
|
-
|
|
1899
|
+
if (l) {
|
|
1900
|
+
let c = u.length - 1, h = u[c];
|
|
1901
|
+
h.active = !0, h.route && (h.route.active = h.active);
|
|
1930
1902
|
}
|
|
1931
|
-
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
let f =
|
|
1935
|
-
for (; f <
|
|
1936
|
-
let
|
|
1937
|
-
for (let
|
|
1938
|
-
let
|
|
1939
|
-
if (
|
|
1940
|
-
let
|
|
1941
|
-
for (let
|
|
1942
|
-
let m =
|
|
1943
|
-
m.route &&
|
|
1903
|
+
i.slots.value = u;
|
|
1904
|
+
}
|
|
1905
|
+
e.layers[t.y].views.length == 0 && (o = !0);
|
|
1906
|
+
let f = t.y + 1;
|
|
1907
|
+
for (; f < e.layers.length; f++) {
|
|
1908
|
+
let c = e.layers[f].views, h = [];
|
|
1909
|
+
for (let d = c.length - 1; (o || a.length > 0) && d >= 0; d--) {
|
|
1910
|
+
let y = c[d];
|
|
1911
|
+
if (y[ue] && (o || V.include(a, y[ue]))) {
|
|
1912
|
+
let v = y.slots.value;
|
|
1913
|
+
for (let p = v.length - 1; p >= 0; p--) {
|
|
1914
|
+
let m = v[p];
|
|
1915
|
+
m.route && y[J] && this[pe](m.route), h.push(new V(y, m.index, f)), v.splice(p, 1);
|
|
1944
1916
|
}
|
|
1945
|
-
|
|
1917
|
+
e.layers[f].views.splice(d, 1);
|
|
1946
1918
|
}
|
|
1947
1919
|
}
|
|
1948
|
-
|
|
1920
|
+
a = h, e.layers[f].views.length == 0 && (o = !0);
|
|
1949
1921
|
}
|
|
1950
1922
|
}
|
|
1951
|
-
restore(
|
|
1952
|
-
if (!
|
|
1953
|
-
let
|
|
1954
|
-
if (
|
|
1955
|
-
let n =
|
|
1923
|
+
restore(e) {
|
|
1924
|
+
if (!e || this[B].length == 0) {
|
|
1925
|
+
let t = this[U];
|
|
1926
|
+
if (t.layers.length > 0) {
|
|
1927
|
+
let n = t.layers[0].views;
|
|
1956
1928
|
n.length > 0 && (n[0].slots.value = []);
|
|
1957
1929
|
}
|
|
1958
|
-
return this[
|
|
1930
|
+
return this[g] = [], this[He](), Promise.resolve();
|
|
1959
1931
|
} else
|
|
1960
|
-
return new Promise((n,
|
|
1961
|
-
let
|
|
1962
|
-
for (let
|
|
1963
|
-
let
|
|
1964
|
-
this[
|
|
1965
|
-
let f = this[
|
|
1966
|
-
this[
|
|
1967
|
-
(
|
|
1968
|
-
|
|
1932
|
+
return new Promise((n, s) => {
|
|
1933
|
+
let i = null, o = !1;
|
|
1934
|
+
for (let a = 0; a < e.length; a++) {
|
|
1935
|
+
let l = e[a];
|
|
1936
|
+
this[me].post((u) => {
|
|
1937
|
+
let f = this[Rt](l);
|
|
1938
|
+
this[St](f), this[Ct](f), this[Pt](f), f.wait(
|
|
1939
|
+
(c, h) => {
|
|
1940
|
+
i = c.session.to, o = c.session.redirect, u.resolve();
|
|
1969
1941
|
},
|
|
1970
|
-
(
|
|
1971
|
-
|
|
1942
|
+
(c, h) => {
|
|
1943
|
+
i = null, h !== null && this[O](h), u.resolve();
|
|
1972
1944
|
}
|
|
1973
1945
|
);
|
|
1974
1946
|
});
|
|
1975
1947
|
}
|
|
1976
|
-
this[
|
|
1977
|
-
if (
|
|
1978
|
-
const
|
|
1979
|
-
this[
|
|
1948
|
+
this[me].post((a) => {
|
|
1949
|
+
if (i && o === !0) {
|
|
1950
|
+
const l = j.clone(i, !0), u = new tr(l, this[Be]());
|
|
1951
|
+
this[C]?.replace(u);
|
|
1980
1952
|
}
|
|
1981
|
-
|
|
1953
|
+
a.resolve(), n();
|
|
1982
1954
|
});
|
|
1983
1955
|
});
|
|
1984
1956
|
}
|
|
1985
|
-
[
|
|
1986
|
-
let
|
|
1987
|
-
return this[
|
|
1988
|
-
this[
|
|
1957
|
+
[or](e, t, n) {
|
|
1958
|
+
let s = e.updateType ?? Je.Part;
|
|
1959
|
+
return this[lr](t).then(() => {
|
|
1960
|
+
this[ar](t, e, n, s);
|
|
1989
1961
|
});
|
|
1990
1962
|
}
|
|
1991
|
-
[
|
|
1992
|
-
let
|
|
1993
|
-
for (let n = 0; n <
|
|
1994
|
-
let
|
|
1995
|
-
for (let
|
|
1996
|
-
let o =
|
|
1997
|
-
o.isResolved ||
|
|
1963
|
+
[lr](e) {
|
|
1964
|
+
let t = [];
|
|
1965
|
+
for (let n = 0; n < e.layers.length; n++) {
|
|
1966
|
+
let s = e.layers[n];
|
|
1967
|
+
for (let i = 0; i < s.models.length; i++) {
|
|
1968
|
+
let o = s.models[i];
|
|
1969
|
+
o.isResolved || t.push(o.resolve());
|
|
1998
1970
|
}
|
|
1999
1971
|
}
|
|
2000
|
-
return
|
|
1972
|
+
return t.length > 0 ? Promise.all(t) : Promise.resolve();
|
|
2001
1973
|
}
|
|
2002
|
-
[
|
|
2003
|
-
if (
|
|
1974
|
+
[ar](e, t, n, s) {
|
|
1975
|
+
if (e.layers[0].models.length !== 1)
|
|
2004
1976
|
return Promise.reject("illegal route structure(multi root node)");
|
|
2005
|
-
const
|
|
2006
|
-
let o = this[
|
|
2007
|
-
!
|
|
2008
|
-
let f,
|
|
2009
|
-
if (
|
|
2010
|
-
if (
|
|
2011
|
-
if (o.layers.length == 0 && (o.layers[0] = new
|
|
2012
|
-
let
|
|
2013
|
-
f = new
|
|
1977
|
+
const i = e.layers[0].models[0];
|
|
1978
|
+
let o = this[U], a = Cn(o), l = t.root ?? Z, u;
|
|
1979
|
+
!a && s == Je.Part && (u = this[vt](o, t));
|
|
1980
|
+
let f, c = 0;
|
|
1981
|
+
if (u == null || u == null)
|
|
1982
|
+
if (a || s === Je.All) {
|
|
1983
|
+
if (o.layers.length == 0 && (o.layers[0] = new dt()), o.layers[0].views.length == 0) {
|
|
1984
|
+
let h = t.root ?? Z;
|
|
1985
|
+
f = new Ce(h, !0, null), o.layers[0].views = [f];
|
|
2014
1986
|
} else
|
|
2015
1987
|
f = o.layers[0].views[0];
|
|
2016
|
-
|
|
1988
|
+
u = { x: 0, y: 0 };
|
|
2017
1989
|
} else {
|
|
2018
|
-
let
|
|
2019
|
-
if (!
|
|
1990
|
+
let h = t.slot;
|
|
1991
|
+
if (!h)
|
|
2020
1992
|
return Promise.reject("can not rebuild view(because not route slot)");
|
|
2021
|
-
let
|
|
2022
|
-
if (
|
|
1993
|
+
let d = h.level;
|
|
1994
|
+
if (d > o.layers.length)
|
|
2023
1995
|
return Promise.reject("can not insert view(override level)");
|
|
2024
|
-
let
|
|
2025
|
-
if (
|
|
2026
|
-
let
|
|
2027
|
-
for (let
|
|
2028
|
-
if (
|
|
2029
|
-
|
|
1996
|
+
let y;
|
|
1997
|
+
if (h.rootName) {
|
|
1998
|
+
let v = o.layers[d - 1];
|
|
1999
|
+
for (let p of v.views) {
|
|
2000
|
+
if (p[J] && p.name === h.rootName) {
|
|
2001
|
+
y = new V(p, h.rootIndex ?? 0, d - 1);
|
|
2030
2002
|
break;
|
|
2031
2003
|
}
|
|
2032
|
-
if (
|
|
2033
|
-
|
|
2004
|
+
if (p[z] && p[z].view.name === h.rootName && p[z].index === h.rootIndex) {
|
|
2005
|
+
y = p[z];
|
|
2034
2006
|
break;
|
|
2035
2007
|
}
|
|
2036
2008
|
}
|
|
2037
2009
|
}
|
|
2038
|
-
if (!
|
|
2010
|
+
if (!y)
|
|
2039
2011
|
return Promise.reject("can not insert view(not find root node ref)");
|
|
2040
|
-
f = new
|
|
2012
|
+
f = new Ce(l, !0, y), o.layers[d].views.push(f), u = { x: o.layers[d].views.length - 1, y: d };
|
|
2041
2013
|
}
|
|
2042
2014
|
else
|
|
2043
|
-
f = o.layers[
|
|
2044
|
-
if (
|
|
2045
|
-
|
|
2046
|
-
let
|
|
2047
|
-
if (
|
|
2048
|
-
let m =
|
|
2015
|
+
f = o.layers[u.y].views[u.x];
|
|
2016
|
+
if (c = u.y, f[J] = !0, t.opsType === A.Append) {
|
|
2017
|
+
t.index = se.get();
|
|
2018
|
+
let h = f.slots.value;
|
|
2019
|
+
if (h.length > 0) {
|
|
2020
|
+
let m = h[h.length - 1];
|
|
2049
2021
|
m.active = !1, m.route && (m.route.active = m.active);
|
|
2050
2022
|
}
|
|
2051
|
-
let
|
|
2052
|
-
f.slots.value = [...
|
|
2053
|
-
let
|
|
2054
|
-
this[
|
|
2055
|
-
} else if (
|
|
2056
|
-
let
|
|
2057
|
-
for (let
|
|
2058
|
-
if (
|
|
2059
|
-
if (
|
|
2060
|
-
return
|
|
2061
|
-
|
|
2023
|
+
let d = new te(t, i, t.index, !0);
|
|
2024
|
+
f.slots.value = [...h, d];
|
|
2025
|
+
let y = c + 1, v = 1, p = new V(f, t.index, c);
|
|
2026
|
+
this[re](o, y, e, v, p);
|
|
2027
|
+
} else if (t.opsType === A.Open) {
|
|
2028
|
+
let h = f.slots.value, d = !1;
|
|
2029
|
+
for (let y of h) {
|
|
2030
|
+
if (y.route !== null && j.isSameForRouteModel(y.route, t)) {
|
|
2031
|
+
if (y.active == !0)
|
|
2032
|
+
return t.index = y.index, t.active = y.active, y.route = t, Promise.resolve();
|
|
2033
|
+
y.active = !0, d = !0, t.index = y.index, t.active = y.active, y.route = t, this[pe](y.route);
|
|
2062
2034
|
} else
|
|
2063
|
-
|
|
2064
|
-
|
|
2035
|
+
y.active = !1;
|
|
2036
|
+
y.route && (y.route.active = y.active);
|
|
2065
2037
|
}
|
|
2066
|
-
if (!
|
|
2067
|
-
|
|
2068
|
-
let
|
|
2069
|
-
|
|
2070
|
-
let
|
|
2071
|
-
this[
|
|
2038
|
+
if (!d) {
|
|
2039
|
+
t.index = se.get(), t.active = !0;
|
|
2040
|
+
let y = new te(t, i, t.index, !0);
|
|
2041
|
+
h.push(y);
|
|
2042
|
+
let v = c + 1, p = 1, m = new V(f, t.index, c);
|
|
2043
|
+
this[re](o, v, e, p, m);
|
|
2072
2044
|
}
|
|
2073
|
-
f.slots.value = [...
|
|
2045
|
+
f.slots.value = [...h];
|
|
2074
2046
|
} else {
|
|
2075
|
-
let
|
|
2076
|
-
if (
|
|
2077
|
-
|
|
2078
|
-
let
|
|
2079
|
-
this[
|
|
2047
|
+
let h = f.slots.value;
|
|
2048
|
+
if (h.length == 0) {
|
|
2049
|
+
t.index = se.get(), f.slots.value = [new te(t, i, t.index)];
|
|
2050
|
+
let d = c + 1, y = 1, v = new V(f, t.index, c);
|
|
2051
|
+
this[re](o, d, e, y, v);
|
|
2080
2052
|
} else {
|
|
2081
|
-
let
|
|
2082
|
-
if (
|
|
2083
|
-
this[
|
|
2084
|
-
let
|
|
2085
|
-
this[
|
|
2053
|
+
let d = h[0];
|
|
2054
|
+
if (d.model !== i) {
|
|
2055
|
+
this[oe](o, u, null, !0), t.index = se.get(), f.slots.value = [new te(t, i, t.index)];
|
|
2056
|
+
let y = c + 1, v = 1, p = new V(f, t.index, c);
|
|
2057
|
+
this[re](o, y, e, v, p);
|
|
2086
2058
|
} else {
|
|
2087
|
-
|
|
2088
|
-
let
|
|
2089
|
-
for (let F = 1; F <
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
let
|
|
2093
|
-
for (;
|
|
2059
|
+
d.route !== null && this[pe](d.route);
|
|
2060
|
+
let y = [];
|
|
2061
|
+
for (let F = 1; F < h.length; F++)
|
|
2062
|
+
y.push(h[F].index);
|
|
2063
|
+
y.length > 0 && this[oe](o, u, y, !0), t.index = d.index, d.route = t;
|
|
2064
|
+
let v = [new V(f, t.index, c)], p = c + 1, m = 1, w = new V(f, t.index, c);
|
|
2065
|
+
for (; v.length > 0 && p < o.layers.length && m < e.layers.length; p++, m++) {
|
|
2094
2066
|
let F = [];
|
|
2095
|
-
for (let P = 0; P < o.layers[
|
|
2096
|
-
let
|
|
2097
|
-
|
|
2067
|
+
for (let P = 0; P < o.layers[p].views.length; P++) {
|
|
2068
|
+
let x = o.layers[p].views[P];
|
|
2069
|
+
x[ue] && V.include(v, x[ue]) && F.unshift(P);
|
|
2098
2070
|
}
|
|
2099
2071
|
let b = [];
|
|
2100
2072
|
for (let P of F) {
|
|
2101
|
-
let
|
|
2102
|
-
for (let _ = 0; _ <
|
|
2103
|
-
if (
|
|
2104
|
-
T =
|
|
2073
|
+
let x = o.layers[p].views[P], K = e.layers[m].models, T;
|
|
2074
|
+
for (let _ = 0; _ < K.length; _++)
|
|
2075
|
+
if (x.name === K[_].name) {
|
|
2076
|
+
T = K[_];
|
|
2105
2077
|
break;
|
|
2106
2078
|
}
|
|
2107
2079
|
if (!T)
|
|
2108
|
-
this[
|
|
2080
|
+
this[oe](o, { x: P, y: p }, null, !1);
|
|
2109
2081
|
else {
|
|
2110
|
-
let _ =
|
|
2082
|
+
let _ = x.slots.value;
|
|
2111
2083
|
if (_.length == 0) {
|
|
2112
|
-
let
|
|
2113
|
-
|
|
2114
|
-
let
|
|
2115
|
-
this[
|
|
2084
|
+
let L = 0;
|
|
2085
|
+
x.slots.value = [new te(null, T, L)];
|
|
2086
|
+
let k = p + 1, W = m + 1;
|
|
2087
|
+
this[re](o, k, e, W, w);
|
|
2116
2088
|
} else {
|
|
2117
|
-
let
|
|
2118
|
-
if (
|
|
2119
|
-
this[
|
|
2120
|
-
let
|
|
2121
|
-
this[
|
|
2089
|
+
let L = _[0];
|
|
2090
|
+
if (L.model !== T) {
|
|
2091
|
+
this[oe](o, { x: P, y: p }, null, !0), x.slots.value = [new te(null, T, 0)];
|
|
2092
|
+
let k = p + 1, W = m + 1;
|
|
2093
|
+
this[re](o, k, e, W, w);
|
|
2122
2094
|
} else {
|
|
2123
|
-
|
|
2124
|
-
let
|
|
2125
|
-
for (let
|
|
2126
|
-
|
|
2127
|
-
|
|
2095
|
+
x[J] && L.route !== null && this[pe](L.route);
|
|
2096
|
+
let k = [];
|
|
2097
|
+
for (let W = 1; W < _.length; W++)
|
|
2098
|
+
k.push(_[W].index);
|
|
2099
|
+
k.length > 0 && this[oe](o, { x: P, y: p }, k, !0), b.push(new V(x, L.index, p));
|
|
2128
2100
|
}
|
|
2129
2101
|
}
|
|
2130
|
-
|
|
2102
|
+
x[J] = !1;
|
|
2131
2103
|
}
|
|
2132
2104
|
}
|
|
2133
|
-
|
|
2105
|
+
v = b;
|
|
2134
2106
|
}
|
|
2135
|
-
this[
|
|
2107
|
+
this[re](o, p, e, m, w);
|
|
2136
2108
|
}
|
|
2137
2109
|
}
|
|
2138
2110
|
}
|
|
2139
|
-
if (f && f[
|
|
2140
|
-
let
|
|
2141
|
-
|
|
2111
|
+
if (f && f[z]) {
|
|
2112
|
+
let h = f[z];
|
|
2113
|
+
h && (t.slot = new Zr(l, c, h?.view.name, h?.index ?? 0));
|
|
2142
2114
|
}
|
|
2143
|
-
n.to = void 0, n.routeModel = void 0,
|
|
2115
|
+
n.to = void 0, n.routeModel = void 0, t.session = n, this[ur](t);
|
|
2144
2116
|
}
|
|
2145
|
-
[
|
|
2146
|
-
let o =
|
|
2147
|
-
for (;
|
|
2148
|
-
let
|
|
2149
|
-
for (let
|
|
2150
|
-
let f = new
|
|
2151
|
-
f.slots.value = [
|
|
2117
|
+
[re](e, t, n, s, i) {
|
|
2118
|
+
let o = s, a = t;
|
|
2119
|
+
for (; a < e.layers.length && o < n.layers.length; a++, o++) {
|
|
2120
|
+
let l = e.layers[a].views;
|
|
2121
|
+
for (let u of n.layers[o].models) {
|
|
2122
|
+
let f = new Ce(u.name, !1, i), c = new te(null, u);
|
|
2123
|
+
f.slots.value = [c], l.push(f);
|
|
2152
2124
|
}
|
|
2153
2125
|
}
|
|
2154
2126
|
for (; o < n.layers.length; o++) {
|
|
2155
|
-
let
|
|
2156
|
-
|
|
2157
|
-
for (let
|
|
2158
|
-
let f = new
|
|
2159
|
-
f.slots.value = [
|
|
2127
|
+
let l = new dt();
|
|
2128
|
+
l.views = [];
|
|
2129
|
+
for (let u of n.layers[o].models) {
|
|
2130
|
+
let f = new Ce(u.name, !1, i), c = new te(null, u);
|
|
2131
|
+
f.slots.value = [c], l.views.push(f);
|
|
2160
2132
|
}
|
|
2161
|
-
|
|
2133
|
+
e.layers.push(l);
|
|
2162
2134
|
}
|
|
2163
2135
|
}
|
|
2164
|
-
[
|
|
2165
|
-
if (
|
|
2136
|
+
[gr](e, t, n, s, i, o) {
|
|
2137
|
+
if (t < 0 || t > this[U].layers.length)
|
|
2166
2138
|
return null;
|
|
2167
|
-
if (
|
|
2168
|
-
let f = this[
|
|
2169
|
-
for (let
|
|
2170
|
-
let
|
|
2171
|
-
if (n !== null ? (
|
|
2172
|
-
|
|
2173
|
-
view:
|
|
2139
|
+
if (t < this[U].layers.length) {
|
|
2140
|
+
let f = this[U].layers[t], c = null;
|
|
2141
|
+
for (let h of f.views) {
|
|
2142
|
+
let d = !1;
|
|
2143
|
+
if (n !== null ? (d = h.name === e && h[z]?.view === n, d && s !== -1 && (d = h[z]?.index === s)) : d = h.name === e, !!d) {
|
|
2144
|
+
i !== null && (h[ue] = {
|
|
2145
|
+
view: i,
|
|
2174
2146
|
index: o,
|
|
2175
|
-
level:
|
|
2176
|
-
}),
|
|
2147
|
+
level: t - 1
|
|
2148
|
+
}), c = h;
|
|
2177
2149
|
break;
|
|
2178
2150
|
}
|
|
2179
2151
|
}
|
|
2180
|
-
if (
|
|
2181
|
-
return
|
|
2152
|
+
if (c !== null)
|
|
2153
|
+
return c;
|
|
2182
2154
|
}
|
|
2183
|
-
let
|
|
2184
|
-
|
|
2185
|
-
view:
|
|
2155
|
+
let a = null, l = null;
|
|
2156
|
+
i !== null && (i[J] ? a = {
|
|
2157
|
+
view: i,
|
|
2186
2158
|
index: o,
|
|
2187
|
-
level:
|
|
2188
|
-
} :
|
|
2189
|
-
view:
|
|
2159
|
+
level: t - 1
|
|
2160
|
+
} : a = i[z], l = {
|
|
2161
|
+
view: i,
|
|
2190
2162
|
index: o,
|
|
2191
|
-
level:
|
|
2163
|
+
level: t - 1
|
|
2192
2164
|
});
|
|
2193
|
-
let
|
|
2194
|
-
if (
|
|
2195
|
-
let f = new
|
|
2196
|
-
f.views = [
|
|
2165
|
+
let u = new Ce(e, !0, a);
|
|
2166
|
+
if (u[ue] = l, t == this[U].layers.length) {
|
|
2167
|
+
let f = new dt();
|
|
2168
|
+
f.views = [u], this[U].layers.push(f);
|
|
2197
2169
|
} else
|
|
2198
|
-
this[
|
|
2199
|
-
return
|
|
2170
|
+
this[U].layers[t].views.push(u);
|
|
2171
|
+
return u;
|
|
2200
2172
|
}
|
|
2201
2173
|
}
|
|
2202
|
-
const
|
|
2203
|
-
function
|
|
2204
|
-
let
|
|
2205
|
-
return
|
|
2174
|
+
const Fn = "fox-router-view", Tn = "fox-router-link";
|
|
2175
|
+
function Cr(r, e = !1) {
|
|
2176
|
+
let t = null;
|
|
2177
|
+
return e ? t = r.showFromClass ?? r.enterFromClass : t = r.enterFromClass, t || (t = r.transitionName, t ? e ? `${t}-show-from` : `${t}-enter-from` : null);
|
|
2206
2178
|
}
|
|
2207
|
-
function
|
|
2208
|
-
let
|
|
2209
|
-
return
|
|
2179
|
+
function Ar(r, e = !1) {
|
|
2180
|
+
let t = null;
|
|
2181
|
+
return e ? t = r.showActiveClass ?? r.enterActiveClass : t = r.enterActiveClass, t || (t = r.transitionName, t ? e ? `${t}-show-active` : `${t}-enter-active` : null);
|
|
2210
2182
|
}
|
|
2211
|
-
function
|
|
2212
|
-
let
|
|
2213
|
-
return
|
|
2183
|
+
function _n(r, e = !1) {
|
|
2184
|
+
let t = null;
|
|
2185
|
+
return e ? t = r.showToClass ?? r.enterToClass : t = r.enterToClass, t || (t = r.transitionName, t ? e ? `${t}-show-to` : `${t}-enter-to` : null);
|
|
2214
2186
|
}
|
|
2215
|
-
function
|
|
2216
|
-
let
|
|
2217
|
-
return
|
|
2187
|
+
function $n(r, e = !1) {
|
|
2188
|
+
let t = null;
|
|
2189
|
+
return e ? t = r.hideFromClass ?? r.leaveFromClass : t = r.leaveFromClass, t || (t = r.transitionName, t ? e ? `${t}-hide-from` : `${t}-leave-from` : null);
|
|
2218
2190
|
}
|
|
2219
|
-
function
|
|
2220
|
-
let
|
|
2221
|
-
return
|
|
2191
|
+
function Kn(r, e = !1) {
|
|
2192
|
+
let t = null;
|
|
2193
|
+
return e ? t = r.hideActiveClass ?? r.leaveActiveClass : t = r.leaveActiveClass, t || (t = r.transitionName, t ? e ? `${t}-hide-active` : `${t}-leave-active` : null);
|
|
2222
2194
|
}
|
|
2223
|
-
function
|
|
2224
|
-
let
|
|
2225
|
-
return
|
|
2195
|
+
function qn(r, e = !1) {
|
|
2196
|
+
let t = null;
|
|
2197
|
+
return e ? t = r.hideToClass ?? r.leaveToClass : t = r.leaveToClass, t || (t = r.transitionName, t ? e ? `${t}-hide-to` : `${t}-leave-to` : null);
|
|
2226
2198
|
}
|
|
2227
|
-
function
|
|
2228
|
-
let
|
|
2229
|
-
return
|
|
2199
|
+
function jn(r, e = !1) {
|
|
2200
|
+
let t = null;
|
|
2201
|
+
return e ? t = r.beforeShow ?? r.beforeEnter : t = r.beforeEnter, t;
|
|
2230
2202
|
}
|
|
2231
|
-
function On(r,
|
|
2232
|
-
let
|
|
2233
|
-
return
|
|
2203
|
+
function On(r, e = !1) {
|
|
2204
|
+
let t = null;
|
|
2205
|
+
return e ? t = r.show ?? r.enter : t = r.enter, t;
|
|
2234
2206
|
}
|
|
2235
|
-
function Ln(r,
|
|
2236
|
-
let
|
|
2237
|
-
return
|
|
2207
|
+
function Ln(r, e = !1) {
|
|
2208
|
+
let t = null;
|
|
2209
|
+
return e ? t = r.afterShow ?? r.afterEnter : t = r.afterEnter, t;
|
|
2238
2210
|
}
|
|
2239
|
-
function
|
|
2240
|
-
let
|
|
2241
|
-
return
|
|
2211
|
+
function Mn(r, e = !1) {
|
|
2212
|
+
let t = null;
|
|
2213
|
+
return e ? t = r.showCancelled ?? r.enterCancelled : t = r.enterCancelled, t;
|
|
2242
2214
|
}
|
|
2243
|
-
function
|
|
2244
|
-
let
|
|
2245
|
-
return
|
|
2215
|
+
function Nn(r, e = !1) {
|
|
2216
|
+
let t = null;
|
|
2217
|
+
return e ? t = r.hide ?? r.leave : t = r.leave, t;
|
|
2246
2218
|
}
|
|
2247
|
-
function In(r,
|
|
2248
|
-
let
|
|
2249
|
-
return
|
|
2219
|
+
function In(r, e = !1) {
|
|
2220
|
+
let t = null;
|
|
2221
|
+
return e ? t = r.afterHide ?? r.afterLeave : t = r.afterLeave, t;
|
|
2250
2222
|
}
|
|
2251
|
-
function
|
|
2252
|
-
let
|
|
2253
|
-
return
|
|
2223
|
+
function Dn(r, e = !1) {
|
|
2224
|
+
let t = null;
|
|
2225
|
+
return e ? t = r.hideCancelled ?? r.leaveCancelled : t = r.leaveCancelled, t;
|
|
2254
2226
|
}
|
|
2255
|
-
function Ht(r) {
|
|
2256
|
-
let t, e = r.duration;
|
|
2257
|
-
return typeof e == "object" ? t = {
|
|
2258
|
-
enter: e.enter ?? -1,
|
|
2259
|
-
leave: e.leave ?? -1,
|
|
2260
|
-
show: e.show ?? -1,
|
|
2261
|
-
hide: e.hide ?? -1
|
|
2262
|
-
} : (typeof e == "string" && (e = e.length == 0 ? -1 : Number(e)), t = {
|
|
2263
|
-
enter: e,
|
|
2264
|
-
leave: e,
|
|
2265
|
-
show: e,
|
|
2266
|
-
hide: e
|
|
2267
|
-
}), t;
|
|
2268
|
-
}
|
|
2269
|
-
function we(r, t) {
|
|
2270
|
-
r.classList.contains(t) || r.classList.add(t);
|
|
2271
|
-
}
|
|
2272
|
-
function be(r, t) {
|
|
2273
|
-
r.classList.remove(t);
|
|
2274
|
-
}
|
|
2275
|
-
const Vn = $e && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
|
|
2276
2227
|
function It(r) {
|
|
2277
|
-
|
|
2228
|
+
let e, t = r.duration;
|
|
2229
|
+
return typeof t == "object" ? e = {
|
|
2230
|
+
enter: t.enter ?? -1,
|
|
2231
|
+
leave: t.leave ?? -1,
|
|
2232
|
+
show: t.show ?? -1,
|
|
2233
|
+
hide: t.hide ?? -1
|
|
2234
|
+
} : (typeof t == "string" && (t = t.length == 0 ? -1 : Number(t)), e = {
|
|
2235
|
+
enter: t,
|
|
2236
|
+
leave: t,
|
|
2237
|
+
show: t,
|
|
2238
|
+
hide: t
|
|
2239
|
+
}), e;
|
|
2240
|
+
}
|
|
2241
|
+
function be(r, e) {
|
|
2242
|
+
r.classList.contains(e) || r.classList.add(e);
|
|
2243
|
+
}
|
|
2244
|
+
function xe(r, e) {
|
|
2245
|
+
r.classList.remove(e);
|
|
2246
|
+
}
|
|
2247
|
+
const Hn = je && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
|
|
2248
|
+
function Dt(r) {
|
|
2249
|
+
Hn(r);
|
|
2278
2250
|
}
|
|
2279
|
-
function
|
|
2280
|
-
S(
|
|
2251
|
+
function D(r, e, t) {
|
|
2252
|
+
S(e) && (r == null && (r = {}), Reflect.apply(e, r, t));
|
|
2281
2253
|
}
|
|
2282
|
-
function
|
|
2283
|
-
if (S(
|
|
2284
|
-
if (
|
|
2254
|
+
function Er(r, e, t, n = -1, s, i, o, a) {
|
|
2255
|
+
if (S(i)) {
|
|
2256
|
+
if (s !== void 0 && s >= 0) {
|
|
2285
2257
|
setTimeout(() => {
|
|
2286
|
-
Reflect.apply(
|
|
2287
|
-
},
|
|
2258
|
+
Reflect.apply(i, r, [e, t, n]), S(a) && Reflect.apply(a, r, []);
|
|
2259
|
+
}, s);
|
|
2288
2260
|
return;
|
|
2289
2261
|
}
|
|
2290
|
-
const
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
}), Reflect.apply(
|
|
2262
|
+
const l = ["animationend", "transitionend"], u = (f) => {
|
|
2263
|
+
l.forEach((c) => {
|
|
2264
|
+
$t(e, c, u);
|
|
2265
|
+
}), Reflect.apply(i, r, [e, t, n]), a && Reflect.apply(a, r, []);
|
|
2294
2266
|
};
|
|
2295
|
-
|
|
2296
|
-
|
|
2267
|
+
l.forEach((f) => {
|
|
2268
|
+
_t(e, f, u);
|
|
2297
2269
|
});
|
|
2298
2270
|
}
|
|
2299
2271
|
if (S(o)) {
|
|
2300
|
-
const
|
|
2301
|
-
Reflect.apply(o, r, [
|
|
2272
|
+
const l = "animationcancel", u = (f) => {
|
|
2273
|
+
Reflect.apply(o, r, [e, t, n]), $t(e, l, u);
|
|
2302
2274
|
};
|
|
2303
|
-
|
|
2275
|
+
_t(e, l, u);
|
|
2304
2276
|
}
|
|
2305
2277
|
}
|
|
2306
|
-
function
|
|
2307
|
-
return
|
|
2278
|
+
function Ht(r) {
|
|
2279
|
+
return !je || r === null ? !1 : r.opsType === A.Append || r.opsType === A.Open;
|
|
2308
2280
|
}
|
|
2309
|
-
function
|
|
2310
|
-
if (
|
|
2311
|
-
const o =
|
|
2312
|
-
o &&
|
|
2313
|
-
const
|
|
2314
|
-
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2281
|
+
function Fr(r, e, t, n = {}, s, i = -1) {
|
|
2282
|
+
if (e || Ht(s)) {
|
|
2283
|
+
const o = Cr(n, e);
|
|
2284
|
+
o && be(t, o);
|
|
2285
|
+
const a = Ar(n, e);
|
|
2286
|
+
a && be(t, a);
|
|
2287
|
+
const l = jn(n, e);
|
|
2288
|
+
D(r, l, [t, e, s, i]);
|
|
2317
2289
|
}
|
|
2318
2290
|
}
|
|
2319
|
-
function
|
|
2320
|
-
if (!
|
|
2321
|
-
S(
|
|
2291
|
+
function Tr(r, e, t, n = {}, s, i, o, a) {
|
|
2292
|
+
if (!Ht(i) && !e) {
|
|
2293
|
+
S(a) && a(r, a, [t]);
|
|
2322
2294
|
return;
|
|
2323
2295
|
}
|
|
2324
|
-
const
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2296
|
+
const l = Cr(n, e), u = Ar(n, e), f = _n(n, e), c = On(n, e), h = Ln(n, e), d = Mn(n, e);
|
|
2297
|
+
Dt(() => {
|
|
2298
|
+
Er(r, t, i, o, s, () => {
|
|
2299
|
+
u && xe(t, u), f && xe(t, f), S(h) && D(r, h, [t, e, i, o]), S(a) && a(r, a, [t]);
|
|
2328
2300
|
}, () => {
|
|
2329
|
-
S(
|
|
2330
|
-
}),
|
|
2301
|
+
S(d) && D(r, d, [t, e, i, o]);
|
|
2302
|
+
}), l && xe(t, l), f && be(t, f), S(c) && D(r, c, [t, e, i, o]);
|
|
2331
2303
|
});
|
|
2332
2304
|
}
|
|
2333
|
-
function
|
|
2334
|
-
if (!
|
|
2335
|
-
!
|
|
2305
|
+
function _r(r, e, t, n = {}, s, i, o, a, l) {
|
|
2306
|
+
if (!Ht(o) && !e) {
|
|
2307
|
+
!e && S(i) && i();
|
|
2336
2308
|
return;
|
|
2337
2309
|
}
|
|
2338
|
-
const
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
f &&
|
|
2310
|
+
const u = $n(n, e), f = Kn(n, e), c = qn(n, e), h = Nn(n, e), d = In(n, e), y = Dn(n, e);
|
|
2311
|
+
u && be(t, u), f && be(t, f), S(h) && D(r, h, [t, e, o, a]), Dt(() => {
|
|
2312
|
+
Er(r, t, o, a, s, () => {
|
|
2313
|
+
f && xe(t, f), c && xe(t, c), S(d) && D(r, d, [t, e, o, a]), S(l) && D(r, l, [t]), !e && S(i) && i();
|
|
2342
2314
|
}, () => {
|
|
2343
|
-
S(
|
|
2344
|
-
}),
|
|
2315
|
+
S(y) && D(r, y, [t, e, o, a]), S(l) && D(r, l, [t]), !e && S(i) && i();
|
|
2316
|
+
}), u && xe(t, u), c && be(t, c);
|
|
2345
2317
|
});
|
|
2346
2318
|
}
|
|
2347
|
-
function Kt(r,
|
|
2348
|
-
const
|
|
2319
|
+
function Kt(r, e = {}, t, n = -1) {
|
|
2320
|
+
const s = e.mode ?? "default", i = It(e);
|
|
2349
2321
|
return {
|
|
2350
|
-
mode:
|
|
2322
|
+
mode: s,
|
|
2351
2323
|
persisted: !1,
|
|
2352
|
-
beforeEnter: (
|
|
2353
|
-
|
|
2324
|
+
beforeEnter: (a) => {
|
|
2325
|
+
Fr(r, !1, a, e, t, n);
|
|
2354
2326
|
},
|
|
2355
|
-
enter: (
|
|
2356
|
-
|
|
2327
|
+
enter: (a) => {
|
|
2328
|
+
Tr(r, !1, a, e, i.enter, t, n);
|
|
2357
2329
|
},
|
|
2358
|
-
leave: (
|
|
2359
|
-
|
|
2330
|
+
leave: (a, l) => {
|
|
2331
|
+
_r(r, !1, a, e, i.leave, l, t, n);
|
|
2360
2332
|
},
|
|
2361
|
-
clone: (
|
|
2333
|
+
clone: (a) => Kt(r, e, t, n)
|
|
2362
2334
|
};
|
|
2363
2335
|
}
|
|
2364
|
-
function
|
|
2336
|
+
function $r(r) {
|
|
2365
2337
|
return r.el;
|
|
2366
2338
|
}
|
|
2367
|
-
function
|
|
2368
|
-
if (
|
|
2369
|
-
const
|
|
2370
|
-
if (
|
|
2339
|
+
function Vn(r, e, t = {}, n, s, i, o) {
|
|
2340
|
+
if (i) {
|
|
2341
|
+
const a = $r(e);
|
|
2342
|
+
if (a == null)
|
|
2371
2343
|
return;
|
|
2372
|
-
const
|
|
2373
|
-
|
|
2374
|
-
S(o) &&
|
|
2344
|
+
const l = It(t);
|
|
2345
|
+
Fr(r, !0, a, t, n, s), Tr(r, !0, a, t, l.show, n, s, (u) => {
|
|
2346
|
+
S(o) && D(r, o, [u]);
|
|
2375
2347
|
});
|
|
2376
2348
|
} else
|
|
2377
|
-
S(o) &&
|
|
2349
|
+
S(o) && D(r, o, []);
|
|
2378
2350
|
}
|
|
2379
|
-
function Bn(r,
|
|
2380
|
-
if (
|
|
2381
|
-
const
|
|
2382
|
-
if (
|
|
2351
|
+
function Bn(r, e, t = {}, n, s, i, o) {
|
|
2352
|
+
if (i) {
|
|
2353
|
+
const a = $r(e);
|
|
2354
|
+
if (a == null)
|
|
2383
2355
|
return;
|
|
2384
|
-
const
|
|
2385
|
-
|
|
2386
|
-
S(o) &&
|
|
2356
|
+
const l = It(t);
|
|
2357
|
+
_r(r, !0, a, t, l.hide, null, n, s, (u) => {
|
|
2358
|
+
S(o) && D(r, o, [u]);
|
|
2387
2359
|
});
|
|
2388
2360
|
} else
|
|
2389
|
-
S(o) &&
|
|
2361
|
+
S(o) && D(r, o, []);
|
|
2390
2362
|
}
|
|
2391
|
-
function Un(r,
|
|
2392
|
-
|
|
2393
|
-
for (let
|
|
2394
|
-
Reflect.apply(r[
|
|
2363
|
+
function Un(r, e = {}) {
|
|
2364
|
+
Dt(() => {
|
|
2365
|
+
for (let t = 0; t < r.length; t++)
|
|
2366
|
+
Reflect.apply(r[t], e, []);
|
|
2395
2367
|
});
|
|
2396
2368
|
}
|
|
2397
|
-
function
|
|
2398
|
-
return typeof r == "function" ? Reflect.apply(r, {}, [
|
|
2369
|
+
function ne(r, e, t) {
|
|
2370
|
+
return typeof r == "function" ? Reflect.apply(r, {}, [e, t]) : r;
|
|
2399
2371
|
}
|
|
2400
|
-
function
|
|
2372
|
+
function At(r, e) {
|
|
2401
2373
|
if (!r)
|
|
2402
2374
|
return null;
|
|
2403
|
-
const
|
|
2404
|
-
return
|
|
2375
|
+
const t = r(e);
|
|
2376
|
+
return t.length === 1 ? t[0] : t;
|
|
2405
2377
|
}
|
|
2406
|
-
class
|
|
2378
|
+
class kn {
|
|
2407
2379
|
node;
|
|
2408
2380
|
state;
|
|
2409
|
-
constructor(
|
|
2410
|
-
this.node =
|
|
2381
|
+
constructor(e, t) {
|
|
2382
|
+
this.node = e, this.state = t;
|
|
2411
2383
|
}
|
|
2412
2384
|
}
|
|
2413
|
-
const qt =
|
|
2385
|
+
const qt = yr({
|
|
2414
2386
|
name: "RouterView",
|
|
2415
2387
|
inheritAttrs: !1,
|
|
2416
2388
|
props: {
|
|
@@ -2579,48 +2551,48 @@ const qt = fr({
|
|
|
2579
2551
|
required: !1
|
|
2580
2552
|
}
|
|
2581
2553
|
},
|
|
2582
|
-
setup(r,
|
|
2583
|
-
const
|
|
2584
|
-
if (
|
|
2554
|
+
setup(r, e) {
|
|
2555
|
+
const t = jt();
|
|
2556
|
+
if (t === null || t.proxy === null) {
|
|
2585
2557
|
console.error("instance or instance.proxy not exist");
|
|
2586
2558
|
return;
|
|
2587
2559
|
}
|
|
2588
|
-
const n = r.multi === !0,
|
|
2589
|
-
let
|
|
2590
|
-
const
|
|
2591
|
-
if (
|
|
2592
|
-
|
|
2593
|
-
const
|
|
2594
|
-
if (!
|
|
2560
|
+
const n = r.multi === !0, s = G(rt, null), i = G(ft, 0), o = G(Zt, null), a = G(ct, -1);
|
|
2561
|
+
let l = null;
|
|
2562
|
+
const u = r.modelSlot;
|
|
2563
|
+
if (u) {
|
|
2564
|
+
ee(ft, i + 1), ee(ct, u.index), ee(ht, u.index);
|
|
2565
|
+
const c = u.route;
|
|
2566
|
+
if (!c) {
|
|
2595
2567
|
console.warn("child view render error, route not exist");
|
|
2596
2568
|
return;
|
|
2597
2569
|
}
|
|
2598
|
-
const
|
|
2599
|
-
nn(
|
|
2570
|
+
const h = ze(t.proxy, !0);
|
|
2571
|
+
nn(h), ut(h, c);
|
|
2600
2572
|
} else {
|
|
2601
|
-
if (
|
|
2573
|
+
if (s == null) {
|
|
2602
2574
|
console.error("router is not been injected");
|
|
2603
2575
|
return;
|
|
2604
2576
|
}
|
|
2605
|
-
const
|
|
2606
|
-
if (
|
|
2577
|
+
const c = r.name, h = G(er, null), d = G(ht, 0);
|
|
2578
|
+
if (l = s[gr](c, i, o, a, h, d), l === null)
|
|
2607
2579
|
return;
|
|
2608
|
-
if (
|
|
2609
|
-
|
|
2610
|
-
const
|
|
2611
|
-
if (
|
|
2612
|
-
const
|
|
2613
|
-
if (
|
|
2614
|
-
const m =
|
|
2615
|
-
|
|
2580
|
+
if (ee(er, l), l[J] === !0 && ee(Zt, l), !n) {
|
|
2581
|
+
ee(ct, -1), ee(ft, i + 1), ee(ht, -1);
|
|
2582
|
+
const v = l.slots.value;
|
|
2583
|
+
if (v.length > 0) {
|
|
2584
|
+
const p = v[0].route;
|
|
2585
|
+
if (p) {
|
|
2586
|
+
const m = ze(t.proxy, !0);
|
|
2587
|
+
ut(m, p);
|
|
2616
2588
|
}
|
|
2617
2589
|
} else {
|
|
2618
|
-
const
|
|
2619
|
-
|
|
2620
|
-
const m =
|
|
2590
|
+
const p = ze(t.proxy, !0);
|
|
2591
|
+
l.compensation = () => {
|
|
2592
|
+
const m = l.slots.value;
|
|
2621
2593
|
if (m.length > 0) {
|
|
2622
2594
|
const w = m[0].route;
|
|
2623
|
-
return w &&
|
|
2595
|
+
return w && ut(p, w), !0;
|
|
2624
2596
|
}
|
|
2625
2597
|
return !1;
|
|
2626
2598
|
};
|
|
@@ -2628,93 +2600,93 @@ const qt = fr({
|
|
|
2628
2600
|
}
|
|
2629
2601
|
}
|
|
2630
2602
|
const f = { value: /* @__PURE__ */ new Map() };
|
|
2631
|
-
return
|
|
2603
|
+
return tt(() => {
|
|
2632
2604
|
f.value && f.value.clear();
|
|
2633
2605
|
}), () => {
|
|
2634
2606
|
if (n) {
|
|
2635
|
-
const
|
|
2636
|
-
for (let m = 0; m <
|
|
2637
|
-
const w =
|
|
2638
|
-
let
|
|
2639
|
-
|
|
2640
|
-
const
|
|
2641
|
-
typeof T == "string" && T.length > 0 && (
|
|
2642
|
-
const _ =
|
|
2643
|
-
if (typeof _ == "string" && _.length > 0 && (
|
|
2644
|
-
const
|
|
2645
|
-
w.active ?
|
|
2646
|
-
const
|
|
2647
|
-
let Re =
|
|
2648
|
-
Re != null &&
|
|
2607
|
+
const c = /* @__PURE__ */ new Map(), h = [], d = l?.slots.value, y = [];
|
|
2608
|
+
for (let m = 0; m < d.length; m++) {
|
|
2609
|
+
const w = d[m], F = `${r.name}-${w.index}`, b = ne(r.transition, w.route, m) ?? !0, P = { modelSlot: w };
|
|
2610
|
+
let x;
|
|
2611
|
+
e.slots.default ? x = ae(qt, P, { default: e.slots.default }) : x = ae(qt, P);
|
|
2612
|
+
const K = {}, T = ne(r.viewClass, w.route, m);
|
|
2613
|
+
typeof T == "string" && T.length > 0 && (K[T] = !0);
|
|
2614
|
+
const _ = ne(r.viewActiveClass, w.route, m), L = ne(r.viewInactiveClass, w.route, m), k = f.value.get(F);
|
|
2615
|
+
if (typeof _ == "string" && _.length > 0 && (K[_] = w.active), typeof L == "string" && L.length > 0 && (K[L] = !w.active), k && w.active !== k.state) {
|
|
2616
|
+
const ce = k.node;
|
|
2617
|
+
w.active ? y.unshift(() => {
|
|
2618
|
+
const it = () => {
|
|
2619
|
+
let Re = Xt(ce);
|
|
2620
|
+
Re != null && Yt(Re, Ft.ACTIVATED);
|
|
2649
2621
|
};
|
|
2650
|
-
|
|
2651
|
-
}) :
|
|
2652
|
-
const
|
|
2653
|
-
const Re =
|
|
2654
|
-
Re != null &&
|
|
2622
|
+
Vn(t, ce, r, w.route, m, b, it);
|
|
2623
|
+
}) : y.push(() => {
|
|
2624
|
+
const it = () => {
|
|
2625
|
+
const Re = Xt(ce);
|
|
2626
|
+
Re != null && Yt(Re, Ft.DEACTIVATED);
|
|
2655
2627
|
};
|
|
2656
|
-
Bn(
|
|
2628
|
+
Bn(t, ce, r, w.route, m, b, it);
|
|
2657
2629
|
});
|
|
2658
2630
|
}
|
|
2659
|
-
const
|
|
2660
|
-
class:
|
|
2631
|
+
const W = {
|
|
2632
|
+
class: K,
|
|
2661
2633
|
key: F
|
|
2662
|
-
},
|
|
2663
|
-
|
|
2664
|
-
const
|
|
2665
|
-
if (
|
|
2666
|
-
const
|
|
2667
|
-
|
|
2634
|
+
}, nt = ne(r.viewTagProps, w.route, m);
|
|
2635
|
+
nt !== null && typeof nt == "object" && $(!0, W, nt), w.route?.viewTagAttrs && typeof w.route?.viewTagAttrs == "object" && $(!0, W, w.route.viewTagAttrs);
|
|
2636
|
+
const Mr = ne(r.viewTag, w.route, m), st = ae(Mr, W, { default: () => [x] });
|
|
2637
|
+
if (c.set(F, new kn(st, w.active)), f.value.delete(F), b) {
|
|
2638
|
+
const ce = Kt(t, r, w.route, m);
|
|
2639
|
+
st.transition = ce;
|
|
2668
2640
|
}
|
|
2669
|
-
|
|
2641
|
+
h.push(st);
|
|
2670
2642
|
}
|
|
2671
2643
|
f.value.forEach((m) => {
|
|
2672
2644
|
m.node.transition = null;
|
|
2673
|
-
}), f.value =
|
|
2674
|
-
const
|
|
2675
|
-
return Object.assign(
|
|
2676
|
-
} else if (
|
|
2677
|
-
const
|
|
2678
|
-
|
|
2679
|
-
const
|
|
2680
|
-
return
|
|
2645
|
+
}), f.value = c, Un(y, t);
|
|
2646
|
+
const v = ne(r.tag, null, -1), p = {};
|
|
2647
|
+
return Object.assign(p, e.attrs), ae(v, p, { default: () => h });
|
|
2648
|
+
} else if (u != null) {
|
|
2649
|
+
const c = u.model, h = {};
|
|
2650
|
+
c.props && (typeof c.props == "object" ? $(!1, h, c.props) : c.props === !0 && typeof u.route?.params == "object" && $(!1, h, u.route?.params));
|
|
2651
|
+
const d = ae(c.component, h);
|
|
2652
|
+
return At(e.slots.default, { Component: d, route: u.route }) ?? d;
|
|
2681
2653
|
} else {
|
|
2682
|
-
const
|
|
2683
|
-
if (
|
|
2684
|
-
const
|
|
2685
|
-
|
|
2686
|
-
const
|
|
2687
|
-
if (
|
|
2688
|
-
const m = Kt(
|
|
2689
|
-
|
|
2654
|
+
const c = l.slots.value;
|
|
2655
|
+
if (c.length > 0) {
|
|
2656
|
+
const h = c[0], d = h.model, y = {};
|
|
2657
|
+
d.props && (typeof d.props == "object" ? $(!1, y, d.props) : d.props === !0 && typeof h.route?.params == "object" && $(!1, y, h.route?.params));
|
|
2658
|
+
const v = ae(d.component, y);
|
|
2659
|
+
if (ne(r.transition, h.route, -1) ?? !0) {
|
|
2660
|
+
const m = Kt(t, r, h.route, -1);
|
|
2661
|
+
v.transition = m;
|
|
2690
2662
|
}
|
|
2691
|
-
return
|
|
2663
|
+
return At(e.slots.default, { Component: v, route: h.route }) ?? v;
|
|
2692
2664
|
} else
|
|
2693
|
-
return
|
|
2665
|
+
return At(e.slots.fallback, {});
|
|
2694
2666
|
}
|
|
2695
2667
|
};
|
|
2696
2668
|
}
|
|
2697
2669
|
});
|
|
2698
|
-
function
|
|
2670
|
+
function Wn(r) {
|
|
2699
2671
|
if (!(r.metaKey || r.altKey || r.ctrlKey || r.shiftKey) && !r.defaultPrevented && !(r.button != null && r.button !== 0)) {
|
|
2700
2672
|
if (r.currentTarget && r.currentTarget.getAttribute) {
|
|
2701
|
-
const
|
|
2702
|
-
if (/\b_blank\b/i.test(
|
|
2673
|
+
const e = r.currentTarget.getAttribute("target");
|
|
2674
|
+
if (/\b_blank\b/i.test(e))
|
|
2703
2675
|
return;
|
|
2704
2676
|
}
|
|
2705
2677
|
return r.preventDefault && r.preventDefault(), !0;
|
|
2706
2678
|
}
|
|
2707
2679
|
}
|
|
2708
|
-
function
|
|
2709
|
-
return r == null ||
|
|
2680
|
+
function zn(r, e) {
|
|
2681
|
+
return r == null || e == null ? !1 : !!(r === e || r.path && r.path === e.path || r.name && r.name === e.name);
|
|
2710
2682
|
}
|
|
2711
|
-
function Jn(r,
|
|
2712
|
-
return r == null ||
|
|
2683
|
+
function Jn(r, e) {
|
|
2684
|
+
return r == null || e == null ? !1 : !!(r.path && e.path && e.path.startsWith(r.path) || r.name && r.name == e.name);
|
|
2713
2685
|
}
|
|
2714
|
-
function
|
|
2715
|
-
return typeof r == "function" ? Reflect.apply(r, {}, [
|
|
2686
|
+
function ve(r, e) {
|
|
2687
|
+
return typeof r == "function" ? Reflect.apply(r, {}, [e]) : r;
|
|
2716
2688
|
}
|
|
2717
|
-
let
|
|
2689
|
+
let Gn = yr({
|
|
2718
2690
|
name: "RouterLink",
|
|
2719
2691
|
inheritAttrs: !1,
|
|
2720
2692
|
props: {
|
|
@@ -2750,235 +2722,611 @@ let Qn = fr({
|
|
|
2750
2722
|
default: "onClick"
|
|
2751
2723
|
}
|
|
2752
2724
|
},
|
|
2753
|
-
setup(r,
|
|
2754
|
-
const
|
|
2725
|
+
setup(r, e) {
|
|
2726
|
+
const t = G(rt, null);
|
|
2755
2727
|
return () => {
|
|
2756
|
-
let n =
|
|
2757
|
-
if (
|
|
2728
|
+
let n = ve(r.to, null), s = ve(r.tag, n);
|
|
2729
|
+
if (s == null) {
|
|
2758
2730
|
console.warn("can not resolve link tag");
|
|
2759
2731
|
return;
|
|
2760
2732
|
}
|
|
2761
|
-
let
|
|
2762
|
-
|
|
2763
|
-
let
|
|
2764
|
-
if (typeof
|
|
2765
|
-
let
|
|
2766
|
-
typeof
|
|
2733
|
+
let i = null, o = null;
|
|
2734
|
+
t !== null && (i = t[I](n), r.root && (i.root = r.root), o = t.current);
|
|
2735
|
+
let a = {}, l = ve(r.activeClass, i);
|
|
2736
|
+
if (typeof l == "string" && l.length > 0 && (a[l] = Jn(i, o)), ve(r.exact, i) === !0) {
|
|
2737
|
+
let h = ve(r.exactActiveClass, i);
|
|
2738
|
+
typeof h == "string" && h.length > 0 && (a[h] = zn(i, o));
|
|
2767
2739
|
}
|
|
2768
2740
|
let f = {
|
|
2769
|
-
class:
|
|
2741
|
+
class: a
|
|
2770
2742
|
};
|
|
2771
|
-
(
|
|
2772
|
-
let
|
|
2773
|
-
if (typeof
|
|
2774
|
-
const
|
|
2775
|
-
if (
|
|
2743
|
+
(s === "a" || s === "A") && (f.href = i?.path ?? i?.name ?? "#"), $(!0, f, e.attrs);
|
|
2744
|
+
let c = ve(r.event, i);
|
|
2745
|
+
if (typeof c == "string") {
|
|
2746
|
+
const h = (d) => {
|
|
2747
|
+
if (t == null) {
|
|
2776
2748
|
console.warn("router is not been injected");
|
|
2777
2749
|
return;
|
|
2778
2750
|
}
|
|
2779
|
-
if (
|
|
2751
|
+
if (i == null) {
|
|
2780
2752
|
console.warn("route is not been resolved");
|
|
2781
2753
|
return;
|
|
2782
2754
|
}
|
|
2783
|
-
|
|
2755
|
+
Wn(d) && t.to(i);
|
|
2784
2756
|
};
|
|
2785
|
-
f[
|
|
2757
|
+
f[c] = h;
|
|
2786
2758
|
}
|
|
2787
|
-
return
|
|
2759
|
+
return ae(s, f, e.slots);
|
|
2788
2760
|
};
|
|
2789
2761
|
}
|
|
2790
|
-
})
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
return Je;
|
|
2796
|
-
},
|
|
2797
|
-
get isFunction() {
|
|
2798
|
-
return S;
|
|
2799
|
-
},
|
|
2800
|
-
get isArray() {
|
|
2801
|
-
return Hr;
|
|
2802
|
-
},
|
|
2803
|
-
get isArrayLike() {
|
|
2804
|
-
return Mt;
|
|
2805
|
-
},
|
|
2806
|
-
get makeArray() {
|
|
2807
|
-
return Wr;
|
|
2808
|
-
},
|
|
2809
|
-
get merge() {
|
|
2810
|
-
return yr;
|
|
2811
|
-
},
|
|
2812
|
-
get isWindow() {
|
|
2813
|
-
return hr;
|
|
2814
|
-
},
|
|
2815
|
-
get isPlainObject() {
|
|
2816
|
-
return St;
|
|
2817
|
-
},
|
|
2818
|
-
get isEqual() {
|
|
2819
|
-
return Pt;
|
|
2762
|
+
});
|
|
2763
|
+
var q = /* @__PURE__ */ ((r) => (r[r.Loading = 0] = "Loading", r[r.Loaded = 1] = "Loaded", r[r.Defining = 2] = "Defining", r[r.Defined = 3] = "Defined", r))(q || {}), Qe = /* @__PURE__ */ ((r) => (r[r.normal = 0] = "normal", r[r.factory = 1] = "factory", r))(Qe || {});
|
|
2764
|
+
class Qn {
|
|
2765
|
+
register = /* @__PURE__ */ new Map();
|
|
2766
|
+
constructor() {
|
|
2820
2767
|
}
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2768
|
+
get(e) {
|
|
2769
|
+
return this.register.get(e) ?? null;
|
|
2770
|
+
}
|
|
2771
|
+
set(e, t) {
|
|
2772
|
+
this.register.set(e, t);
|
|
2773
|
+
}
|
|
2774
|
+
remove(e) {
|
|
2775
|
+
let t = this.register.get(e);
|
|
2776
|
+
return this.register.delete(e), t ?? null;
|
|
2777
|
+
}
|
|
2778
|
+
has(e) {
|
|
2779
|
+
return this.register.has(e);
|
|
2780
|
+
}
|
|
2781
|
+
clear() {
|
|
2782
|
+
this.register.clear();
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
class hr {
|
|
2786
|
+
moduleManager = new Qn();
|
|
2787
|
+
options = {
|
|
2788
|
+
paths: {},
|
|
2789
|
+
alias: {},
|
|
2790
|
+
nature: [],
|
|
2791
|
+
timeout: 3e3
|
|
2792
|
+
};
|
|
2793
|
+
set paths(e) {
|
|
2794
|
+
this.options.paths = e;
|
|
2795
|
+
}
|
|
2796
|
+
get paths() {
|
|
2797
|
+
return this.options.paths;
|
|
2798
|
+
}
|
|
2799
|
+
set alias(e) {
|
|
2800
|
+
this.options.alias = e;
|
|
2801
|
+
}
|
|
2802
|
+
get alias() {
|
|
2803
|
+
return this.options.alias;
|
|
2804
|
+
}
|
|
2805
|
+
set naturePaths(e) {
|
|
2806
|
+
this.options.nature = e;
|
|
2807
|
+
}
|
|
2808
|
+
get naturePaths() {
|
|
2809
|
+
return this.options.nature;
|
|
2810
|
+
}
|
|
2811
|
+
set timeout(e) {
|
|
2812
|
+
this.options.timeout = e;
|
|
2813
|
+
}
|
|
2814
|
+
get timeout() {
|
|
2815
|
+
return this.options.timeout;
|
|
2816
|
+
}
|
|
2817
|
+
_query;
|
|
2818
|
+
set query(e) {
|
|
2819
|
+
this._query = e;
|
|
2820
|
+
}
|
|
2821
|
+
get query() {
|
|
2822
|
+
return this._query;
|
|
2823
|
+
}
|
|
2824
|
+
get head() {
|
|
2825
|
+
return Le().head;
|
|
2826
|
+
}
|
|
2827
|
+
constructor() {
|
|
2828
|
+
}
|
|
2829
|
+
setModule(e, t) {
|
|
2830
|
+
const n = {
|
|
2831
|
+
id: e,
|
|
2832
|
+
src: "",
|
|
2833
|
+
status: q.Defined
|
|
2834
|
+
};
|
|
2835
|
+
typeof t == "function" ? (n.exports = t, n.type = Qe.factory) : n.exports = t, this.moduleManager.set(e, n);
|
|
2836
|
+
}
|
|
2837
|
+
removeModule(e) {
|
|
2838
|
+
this.moduleManager.remove(e);
|
|
2839
|
+
}
|
|
2840
|
+
ensure(...e) {
|
|
2841
|
+
const t = [];
|
|
2842
|
+
let n = e.length - 1;
|
|
2843
|
+
const s = {};
|
|
2844
|
+
typeof e[n] == "object" && (Object.assign(s, e[n]), n--);
|
|
2845
|
+
let i = null;
|
|
2846
|
+
typeof e[n] == "function" && (i = e[n], n--);
|
|
2847
|
+
for (let l = 0; l <= n; l++)
|
|
2848
|
+
if (Array.isArray(e[l])) {
|
|
2849
|
+
let u = e[l];
|
|
2850
|
+
for (let f = 0; f < u.length; f++)
|
|
2851
|
+
u[f] && t.push(this.resolvePath(u[f]));
|
|
2852
|
+
} else if (typeof e[l] == "string") {
|
|
2853
|
+
let u = e[l].split(",");
|
|
2854
|
+
for (let f = 0; f < u.length; f++)
|
|
2855
|
+
u[f] && t.push(this.resolvePath(u[f]));
|
|
2856
|
+
}
|
|
2857
|
+
const o = new Xn(t.length, (l, u) => {
|
|
2858
|
+
if (o.isOK())
|
|
2859
|
+
try {
|
|
2860
|
+
typeof i == "function" && Reflect.apply(i, {}, u);
|
|
2861
|
+
} catch (f) {
|
|
2862
|
+
console.error(f.message, f);
|
|
2863
|
+
}
|
|
2864
|
+
else
|
|
2865
|
+
try {
|
|
2866
|
+
console.error(l), typeof i == "function" && Reflect.apply(i, {}, []);
|
|
2867
|
+
} catch (f) {
|
|
2868
|
+
console.error(f.message, f);
|
|
2869
|
+
}
|
|
2870
|
+
}), a = new Ze();
|
|
2871
|
+
for (let l = 0; l < t.length; l++) {
|
|
2872
|
+
const u = new Yn(l, t[l], s, o);
|
|
2873
|
+
this.mount(a, u);
|
|
2874
|
+
}
|
|
2875
|
+
return this;
|
|
2876
|
+
}
|
|
2877
|
+
remove(...e) {
|
|
2878
|
+
let t = [], n = e.length - 1, s = {};
|
|
2879
|
+
typeof e[n] == "object" && (Object.assign(s, e[n]), n--);
|
|
2880
|
+
let i = null;
|
|
2881
|
+
typeof e[n] == "function" && (i = e[n], n--);
|
|
2882
|
+
for (let o = 0; o <= n; o++)
|
|
2883
|
+
if (Array.isArray(e[o])) {
|
|
2884
|
+
let a = e[o];
|
|
2885
|
+
for (let l = 0; l < a.length; l++)
|
|
2886
|
+
a[l] && t.push(this.resolvePath(a[l]));
|
|
2887
|
+
} else {
|
|
2888
|
+
let a = e[o].split(",");
|
|
2889
|
+
for (let l = 0; l < a.length; l++)
|
|
2890
|
+
a[l] && t.push(this.resolvePath(a[l]));
|
|
2891
|
+
}
|
|
2892
|
+
return t.forEach((o) => {
|
|
2893
|
+
this.unmount(o, s);
|
|
2894
|
+
}), typeof i == "function" && Reflect.apply(i, {}, []), this;
|
|
2895
|
+
}
|
|
2896
|
+
mount(e, t) {
|
|
2897
|
+
if (this.isNaturePath(t.src)) {
|
|
2898
|
+
let s = t.params.jsPoint;
|
|
2899
|
+
s || (s = this.head), this.mountJS(e, t, s);
|
|
2900
|
+
return;
|
|
2901
|
+
} else if (this.isNaturePath(t.src)) {
|
|
2902
|
+
let s = t.params.cssPoint;
|
|
2903
|
+
s || (s = this.head), this.mountCSS(e, t, s);
|
|
2904
|
+
return;
|
|
2905
|
+
}
|
|
2906
|
+
let n = this.getFileNamePostfix(t.src);
|
|
2907
|
+
if (n === "js" || n.length === 0) {
|
|
2908
|
+
let s = t.params.jsPoint;
|
|
2909
|
+
s || (s = this.head), this.mountJS(e, t, s);
|
|
2910
|
+
return;
|
|
2911
|
+
} else if (n === "css") {
|
|
2912
|
+
let s = t.params.cssPoint;
|
|
2913
|
+
s || (s = this.head), this.mountCSS(e, t, s);
|
|
2914
|
+
return;
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
mountCSS(e, t, n) {
|
|
2918
|
+
e.post((s) => {
|
|
2919
|
+
const i = t.src, o = this.moduleManager.get(i);
|
|
2920
|
+
if (o && (o.status == q.Defined || o.status == q.Loaded) && o.exports) {
|
|
2921
|
+
o.type === Qe.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), s.resolve();
|
|
2922
|
+
return;
|
|
2923
|
+
}
|
|
2924
|
+
const a = Le(), l = a.createElement("link");
|
|
2925
|
+
if (Reflect.has(l, "onload"))
|
|
2926
|
+
l.onload = () => {
|
|
2927
|
+
l.onload = null, l.onerror = null, t.progress.work(!0, t.index, t.src), s.resolve();
|
|
2928
|
+
}, l.onerror = () => {
|
|
2929
|
+
try {
|
|
2930
|
+
n.removeChild(l);
|
|
2931
|
+
} catch (c) {
|
|
2932
|
+
console.error(c.message, c);
|
|
2933
|
+
}
|
|
2934
|
+
l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null), s.reject();
|
|
2935
|
+
};
|
|
2936
|
+
else {
|
|
2937
|
+
const c = {
|
|
2938
|
+
timeout: this.options.timeout ?? 3e3,
|
|
2939
|
+
time: 0,
|
|
2940
|
+
success: () => {
|
|
2941
|
+
t.progress.work(!0, t.index, t.src), s.resolve();
|
|
2942
|
+
},
|
|
2943
|
+
error: () => {
|
|
2944
|
+
try {
|
|
2945
|
+
n.removeChild(l);
|
|
2946
|
+
} catch (h) {
|
|
2947
|
+
console.error(h.message, h);
|
|
2948
|
+
}
|
|
2949
|
+
t.progress.work(!1, t.index, null), s.resolve();
|
|
2950
|
+
}
|
|
2951
|
+
};
|
|
2952
|
+
setTimeout(() => {
|
|
2953
|
+
Kr(l, c);
|
|
2954
|
+
}, 1);
|
|
2955
|
+
}
|
|
2956
|
+
let f = a.getElementById(i);
|
|
2957
|
+
f && f.parentNode && f.parentNode.removeChild(f), l.rel = "stylesheet", l.type = "text/css", l.id = i, l.href = i, n.appendChild(l);
|
|
2958
|
+
});
|
|
2959
|
+
}
|
|
2960
|
+
mountJS(e, t, n) {
|
|
2961
|
+
e.post((s) => {
|
|
2962
|
+
const i = t.src;
|
|
2963
|
+
if (i === "exports") {
|
|
2964
|
+
const c = {
|
|
2965
|
+
exports: {},
|
|
2966
|
+
id: i,
|
|
2967
|
+
src: i,
|
|
2968
|
+
status: q.Loading
|
|
2969
|
+
};
|
|
2970
|
+
t.progress.work(!0, t.index, c.exports), s.resolve();
|
|
2971
|
+
return;
|
|
2972
|
+
} else if (i === "module") {
|
|
2973
|
+
const c = {
|
|
2974
|
+
exports: {},
|
|
2975
|
+
id: i,
|
|
2976
|
+
src: i,
|
|
2977
|
+
status: q.Loading
|
|
2978
|
+
};
|
|
2979
|
+
t.progress.work(!0, t.index, c), s.resolve();
|
|
2980
|
+
return;
|
|
2981
|
+
}
|
|
2982
|
+
let o = this.moduleManager.get(i);
|
|
2983
|
+
if (o && (o.status == q.Defined || o.status == q.Loaded)) {
|
|
2984
|
+
if (o.exports) {
|
|
2985
|
+
o.type === Qe.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), s.resolve();
|
|
2986
|
+
return;
|
|
2987
|
+
}
|
|
2988
|
+
if (document.querySelector(`script[src='${i}`)) {
|
|
2989
|
+
t.progress.work(!0, t.index, o.exports), s.resolve();
|
|
2990
|
+
return;
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
o = {
|
|
2994
|
+
id: i,
|
|
2995
|
+
src: i,
|
|
2996
|
+
status: q.Loading
|
|
2997
|
+
}, this.moduleManager.set(i, o);
|
|
2998
|
+
const l = Le().createElement("script");
|
|
2999
|
+
if ("onload" in l)
|
|
3000
|
+
l.onload = () => {
|
|
3001
|
+
l.onload = null, l.onerror = null, o.status == q.Loading && (o.status = q.Loaded, t.progress.work(!0, t.index, i)), s.resolve();
|
|
3002
|
+
}, l.onerror = () => {
|
|
3003
|
+
try {
|
|
3004
|
+
n.removeChild(l);
|
|
3005
|
+
} catch (c) {
|
|
3006
|
+
console.error(c.message, c);
|
|
3007
|
+
}
|
|
3008
|
+
l.onload = null, l.onerror = null, this.moduleManager.remove(i), t.progress.work(!1, t.index, null), s.resolve();
|
|
3009
|
+
};
|
|
3010
|
+
else {
|
|
3011
|
+
const c = l;
|
|
3012
|
+
c.onreadystatechange = () => {
|
|
3013
|
+
/loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, o.status == q.Loading && (o.status = q.Loaded, t.progress.work(!0, t.index, i)), s.resolve());
|
|
3014
|
+
};
|
|
3015
|
+
}
|
|
3016
|
+
l.defer = !0, l.src = i;
|
|
3017
|
+
const f = M();
|
|
3018
|
+
f.define = this.createDefine(o, t), n.appendChild(l);
|
|
3019
|
+
});
|
|
3020
|
+
}
|
|
3021
|
+
unmount(e, t = {}) {
|
|
3022
|
+
const n = Le(), s = this.getFileNamePostfix(e);
|
|
3023
|
+
if (s === "js" || s.length === 0) {
|
|
3024
|
+
const i = n.querySelector(`script[src="${e}"]`);
|
|
3025
|
+
i && i.parentNode && i.parentNode.removeChild(i), this.moduleManager.remove(e);
|
|
3026
|
+
return;
|
|
3027
|
+
} else if (s === "css") {
|
|
3028
|
+
const i = n.querySelector(`style[href="${e}"]`);
|
|
3029
|
+
i && i.parentNode && i.parentNode.removeChild(i);
|
|
3030
|
+
return;
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
trimEmptyElement(e) {
|
|
3034
|
+
let t = [];
|
|
3035
|
+
for (let n = 0; n < e.length; n++) {
|
|
3036
|
+
if (e[n] === void 0 || e[n] === null)
|
|
3037
|
+
continue;
|
|
3038
|
+
const s = e[n].trim();
|
|
3039
|
+
s.length !== 0 && t.push(s);
|
|
3040
|
+
}
|
|
3041
|
+
return t;
|
|
3042
|
+
}
|
|
3043
|
+
createDefine(e, t) {
|
|
3044
|
+
const n = this, s = function(...i) {
|
|
3045
|
+
e.status = q.Defining;
|
|
3046
|
+
let o, a, l, u = i.length;
|
|
3047
|
+
u === 1 ? (l = i[0], o = void 0) : u === 2 ? (l = i[1], Array.isArray(i[0]) ? (a = n.trimEmptyElement(i[0]), o = void 0) : a = void 0) : (o = i[0], a = n.trimEmptyElement(i[1]), l = i[2]), o && (e.id = o, n.options.alias[o] = e.src), a && a.length > 0 ? n.ensure(a, (...f) => {
|
|
3048
|
+
if (typeof l == "function") {
|
|
3049
|
+
const c = Reflect.apply(l, e, f);
|
|
3050
|
+
c && typeof c == "object" && (e.exports = c);
|
|
3051
|
+
} else
|
|
3052
|
+
e.exports = l;
|
|
3053
|
+
e.status = q.Defined, t.progress.work(!0, t.index, e.exports);
|
|
3054
|
+
}) : (typeof l == "function" ? e.exports = Reflect.apply(l, e, []) : e.exports = l, e.status = q.Defined, t.progress.work(!0, t.index, e.exports));
|
|
3055
|
+
};
|
|
3056
|
+
return s.amd = !0, s;
|
|
3057
|
+
}
|
|
3058
|
+
resolvePath(e) {
|
|
3059
|
+
try {
|
|
3060
|
+
if (this.isNaturePath(e))
|
|
3061
|
+
return e;
|
|
3062
|
+
e = this.parserPath(e, !0);
|
|
3063
|
+
let t = this.getFileNamePostfix(e);
|
|
3064
|
+
t = t.toLowerCase();
|
|
3065
|
+
let n = this.createSearch(this.query);
|
|
3066
|
+
return e.indexOf("?") == -1 ? (t !== "js" && t !== "css" && (e += ".js"), n.length > 0 && (e += `?${n}`)) : n.length > 0 && (e += `&${n}`), e;
|
|
3067
|
+
} catch (t) {
|
|
3068
|
+
throw console.error(`resolve path[${e}] fail`, t), t;
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
createSearch(e) {
|
|
3072
|
+
let t = "";
|
|
3073
|
+
if (e) {
|
|
3074
|
+
for (let n in e) {
|
|
3075
|
+
let s = `${e[n]}`;
|
|
3076
|
+
t += `${encodeURIComponent(n)}=${encodeURIComponent(s)}&`;
|
|
3077
|
+
}
|
|
3078
|
+
t.length > 0 && (t = t.substring(0, t.length - 1));
|
|
3079
|
+
}
|
|
3080
|
+
return t;
|
|
3081
|
+
}
|
|
3082
|
+
getFileNamePostfix(e) {
|
|
3083
|
+
let t = e.lastIndexOf("?");
|
|
3084
|
+
t == -1 && (t = e.length);
|
|
3085
|
+
let n = e.lastIndexOf(".", t);
|
|
3086
|
+
return n == -1 ? "" : e.substring(n + 1, t);
|
|
3087
|
+
}
|
|
3088
|
+
isNaturePath(e) {
|
|
3089
|
+
if (!this.options.nature)
|
|
3090
|
+
return !1;
|
|
3091
|
+
if (typeof this.options.nature == "function")
|
|
3092
|
+
return this.options.nature(e);
|
|
3093
|
+
const t = this.options.nature;
|
|
3094
|
+
if (t && Array.isArray(t))
|
|
3095
|
+
for (let n = 0; n < t.length; n++) {
|
|
3096
|
+
const s = t[n];
|
|
3097
|
+
if (e.indexOf(s) === 0)
|
|
3098
|
+
return !0;
|
|
3099
|
+
}
|
|
3100
|
+
return !1;
|
|
3101
|
+
}
|
|
3102
|
+
parserPath(e, t) {
|
|
3103
|
+
if (e.indexOf("http://") == 0 || e.indexOf("https://") == 0 || e.indexOf("file:///") == 0)
|
|
3104
|
+
return e;
|
|
3105
|
+
if (e.indexOf("/") == 0)
|
|
3106
|
+
return `${yt()}${e.slice(1)}`;
|
|
3107
|
+
if (e.indexOf("./") == 0)
|
|
3108
|
+
return `${yt()}${e.slice(2)}`;
|
|
3109
|
+
if (e.indexOf("//") == 0)
|
|
3110
|
+
return `${M().location.protocol}${e}`;
|
|
3111
|
+
if (t) {
|
|
3112
|
+
let s = this.options.alias[e];
|
|
3113
|
+
if (!s) {
|
|
3114
|
+
let i = e.indexOf("/");
|
|
3115
|
+
if (i == -1)
|
|
3116
|
+
s = e;
|
|
3117
|
+
else {
|
|
3118
|
+
let o = e.slice(0, i), a = this.options.paths[o];
|
|
3119
|
+
a ? s = a + e.slice(i) : s = e;
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
return this.parserPath(s, !1);
|
|
3123
|
+
}
|
|
3124
|
+
return `${yt()}${e}`;
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
function Kr(r, e) {
|
|
3128
|
+
let t = r.sheet, n = !1;
|
|
3129
|
+
if (e.isOldWebKit)
|
|
3130
|
+
t && (n = !0);
|
|
3131
|
+
else if (t)
|
|
3132
|
+
try {
|
|
3133
|
+
t.cssRules && (n = !0);
|
|
3134
|
+
} catch (s) {
|
|
3135
|
+
s.name === "NS_ERROR_DOM_SECURITY_ERR" && (n = !0);
|
|
3136
|
+
}
|
|
3137
|
+
setTimeout(() => {
|
|
3138
|
+
e.time += 20, n ? e.success() : e.timeout > e.timeout ? e.error() : Kr(r, e);
|
|
3139
|
+
}, 20);
|
|
3140
|
+
}
|
|
3141
|
+
class Xn {
|
|
3142
|
+
callback;
|
|
3143
|
+
values;
|
|
3144
|
+
status;
|
|
3145
|
+
size;
|
|
3146
|
+
lastIndex;
|
|
3147
|
+
constructor(e, t) {
|
|
3148
|
+
this.size = e, this.callback = t, this.status = !0, this.values = [], this.lastIndex = -1;
|
|
3149
|
+
}
|
|
3150
|
+
work(e, t, n) {
|
|
3151
|
+
if (this.status = e, this.status === !0 && (this.lastIndex !== t && this.size--, this.lastIndex = t, this.values.push(n)), this.size === 0 || this.status === !1)
|
|
3152
|
+
try {
|
|
3153
|
+
Reflect.apply(this.callback, this, [this.status, this.values]);
|
|
3154
|
+
} catch (s) {
|
|
3155
|
+
console.error(s.message, s);
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
isOK() {
|
|
3159
|
+
return this.status;
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
class Yn {
|
|
3163
|
+
index;
|
|
3164
|
+
src;
|
|
3165
|
+
params;
|
|
3166
|
+
progress;
|
|
3167
|
+
constructor(e, t, n, s) {
|
|
3168
|
+
this.index = e, this.src = t, this.params = n, this.progress = s;
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
const qr = Symbol("fk"), jr = Symbol("fbk"), Or = Symbol("fepk");
|
|
3172
|
+
function cs(r = {}) {
|
|
3173
|
+
const e = new En(r), t = new zt(), n = new Qt(), s = new hr(), i = {
|
|
2826
3174
|
get router() {
|
|
2827
|
-
return
|
|
3175
|
+
return e;
|
|
2828
3176
|
},
|
|
2829
3177
|
get bus() {
|
|
2830
|
-
return
|
|
3178
|
+
return t;
|
|
2831
3179
|
},
|
|
2832
3180
|
get Bus() {
|
|
2833
|
-
return
|
|
3181
|
+
return zt;
|
|
3182
|
+
},
|
|
3183
|
+
get EventProxy() {
|
|
3184
|
+
return Qt;
|
|
2834
3185
|
},
|
|
2835
3186
|
get eventproxy() {
|
|
2836
3187
|
return n;
|
|
2837
3188
|
},
|
|
2838
|
-
get EventProxy() {
|
|
2839
|
-
return zt;
|
|
2840
|
-
},
|
|
2841
3189
|
get EventChain() {
|
|
2842
|
-
return
|
|
3190
|
+
return Ze;
|
|
2843
3191
|
},
|
|
2844
|
-
get
|
|
2845
|
-
return
|
|
3192
|
+
get Require() {
|
|
3193
|
+
return hr;
|
|
2846
3194
|
},
|
|
2847
|
-
get
|
|
2848
|
-
return
|
|
3195
|
+
get require() {
|
|
3196
|
+
return s;
|
|
2849
3197
|
},
|
|
2850
3198
|
get extend() {
|
|
2851
|
-
return
|
|
3199
|
+
return $;
|
|
2852
3200
|
},
|
|
2853
3201
|
get clone() {
|
|
2854
|
-
return
|
|
3202
|
+
return Xe;
|
|
2855
3203
|
},
|
|
2856
|
-
install(
|
|
2857
|
-
|
|
3204
|
+
install(o) {
|
|
3205
|
+
o.provide(rt, e), o.provide(qr, i), o.provide(jr, t), o.provide(Or, n), o.component(Fn, qt), o.component(Tn, Gn), Reflect.defineProperty(o.config.globalProperties, "$fox", {
|
|
2858
3206
|
get() {
|
|
2859
3207
|
return i;
|
|
2860
3208
|
}
|
|
2861
|
-
}), Reflect.defineProperty(
|
|
3209
|
+
}), Reflect.defineProperty(o.config.globalProperties, "$router", {
|
|
2862
3210
|
get() {
|
|
2863
|
-
return
|
|
3211
|
+
return e;
|
|
2864
3212
|
}
|
|
2865
|
-
}), Reflect.defineProperty(
|
|
3213
|
+
}), Reflect.defineProperty(o.config.globalProperties, "$bus", {
|
|
2866
3214
|
get() {
|
|
2867
|
-
return
|
|
3215
|
+
return t;
|
|
2868
3216
|
}
|
|
2869
|
-
}), Reflect.defineProperty(
|
|
3217
|
+
}), Reflect.defineProperty(o.config.globalProperties, "$bus", {
|
|
2870
3218
|
get() {
|
|
2871
|
-
return
|
|
3219
|
+
return t;
|
|
2872
3220
|
}
|
|
2873
|
-
}), Reflect.defineProperty(
|
|
3221
|
+
}), Reflect.defineProperty(o.config.globalProperties, "$eventProxy", {
|
|
2874
3222
|
get() {
|
|
2875
3223
|
return n;
|
|
2876
3224
|
}
|
|
2877
|
-
}),
|
|
2878
|
-
n.on(
|
|
2879
|
-
},
|
|
2880
|
-
n.off(
|
|
2881
|
-
},
|
|
2882
|
-
n.once(
|
|
2883
|
-
},
|
|
3225
|
+
}), o.config.globalProperties.$fox_on = function(a, l, u = !1) {
|
|
3226
|
+
n.on(a, l, u);
|
|
3227
|
+
}, o.config.globalProperties.$fox_off = function(a, l) {
|
|
3228
|
+
n.off(a, l);
|
|
3229
|
+
}, o.config.globalProperties.$fox_once = function(a, l) {
|
|
3230
|
+
n.once(a, l);
|
|
3231
|
+
}, o.config.globalProperties.$fox_all = function(...a) {
|
|
2884
3232
|
let l = n;
|
|
2885
|
-
Reflect.apply(l.all, l,
|
|
2886
|
-
},
|
|
3233
|
+
Reflect.apply(l.all, l, a);
|
|
3234
|
+
}, o.config.globalProperties.$fox_trigger = function(a, ...l) {
|
|
2887
3235
|
let u = n;
|
|
2888
|
-
Reflect.apply(u.trigger, u, [
|
|
2889
|
-
},
|
|
3236
|
+
Reflect.apply(u.trigger, u, [a, ...l]);
|
|
3237
|
+
}, o.config.globalProperties.$fox_emit = function(a, ...l) {
|
|
2890
3238
|
let u = n;
|
|
2891
|
-
Reflect.apply(u.trigger, u, [
|
|
2892
|
-
},
|
|
3239
|
+
Reflect.apply(u.trigger, u, [a, ...l]);
|
|
3240
|
+
}, o.mixin({
|
|
2893
3241
|
computed: {
|
|
2894
3242
|
$route() {
|
|
2895
|
-
return
|
|
3243
|
+
return xr(this);
|
|
2896
3244
|
}
|
|
2897
3245
|
}
|
|
2898
|
-
}),
|
|
3246
|
+
}), e.init();
|
|
2899
3247
|
}
|
|
2900
3248
|
};
|
|
2901
3249
|
return i;
|
|
2902
3250
|
}
|
|
2903
|
-
function
|
|
2904
|
-
return r ? r.$router : G(
|
|
3251
|
+
function Lr(r) {
|
|
3252
|
+
return r ? r.$router : G(rt);
|
|
2905
3253
|
}
|
|
2906
|
-
function
|
|
2907
|
-
return r || (r =
|
|
3254
|
+
function hs(r) {
|
|
3255
|
+
return r || (r = jt()?.proxy ?? void 0), r ? xr(r) : null;
|
|
2908
3256
|
}
|
|
2909
|
-
function
|
|
2910
|
-
return r ? r.$fox : G(
|
|
3257
|
+
function ds(r) {
|
|
3258
|
+
return r ? r.$fox : G(qr);
|
|
2911
3259
|
}
|
|
2912
|
-
function
|
|
2913
|
-
return r ? r.$bus : G(
|
|
3260
|
+
function ys(r) {
|
|
3261
|
+
return r ? r.$bus : G(jr);
|
|
2914
3262
|
}
|
|
2915
|
-
function
|
|
2916
|
-
return r ? r.$eventProxy : G(
|
|
3263
|
+
function ps(r) {
|
|
3264
|
+
return r ? r.$eventProxy : G(Or);
|
|
2917
3265
|
}
|
|
2918
|
-
function
|
|
2919
|
-
const
|
|
3266
|
+
function ms(r) {
|
|
3267
|
+
const e = Lr(), t = (n, s, i) => {
|
|
2920
3268
|
try {
|
|
2921
|
-
Reflect.apply(r, {}, [n,
|
|
3269
|
+
Reflect.apply(r, {}, [n, s]);
|
|
2922
3270
|
} catch (o) {
|
|
2923
3271
|
console.error(o);
|
|
2924
3272
|
}
|
|
2925
|
-
|
|
3273
|
+
i();
|
|
2926
3274
|
};
|
|
2927
|
-
|
|
2928
|
-
|
|
3275
|
+
e.beforeEach(t), tt(() => {
|
|
3276
|
+
e.removeBeforeEach(t);
|
|
2929
3277
|
});
|
|
2930
3278
|
}
|
|
2931
|
-
function
|
|
2932
|
-
const
|
|
3279
|
+
function vs(r) {
|
|
3280
|
+
const e = Lr(), t = (n, s, i) => {
|
|
2933
3281
|
try {
|
|
2934
|
-
Reflect.apply(r, {}, [n,
|
|
3282
|
+
Reflect.apply(r, {}, [n, s]);
|
|
2935
3283
|
} catch (o) {
|
|
2936
3284
|
console.error(o);
|
|
2937
3285
|
}
|
|
2938
|
-
|
|
3286
|
+
i();
|
|
2939
3287
|
};
|
|
2940
|
-
|
|
2941
|
-
|
|
3288
|
+
e.afterEach(t), tt(() => {
|
|
3289
|
+
e.removeAfterEach(t);
|
|
2942
3290
|
});
|
|
2943
3291
|
}
|
|
2944
3292
|
export {
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
3293
|
+
zt as Bus,
|
|
3294
|
+
Ze as EventChain,
|
|
3295
|
+
Qt as EventProxy,
|
|
3296
|
+
j as Route,
|
|
3297
|
+
Xe as clone,
|
|
3298
|
+
cs as createFox,
|
|
3299
|
+
Pn as createMemoryHistory,
|
|
3300
|
+
Rn as createWebHashHistory,
|
|
3301
|
+
fs as createWebHistory,
|
|
3302
|
+
$ as extend,
|
|
3303
|
+
jr as foxBusKey,
|
|
3304
|
+
Or as foxEventProxyKey,
|
|
3305
|
+
qr as foxKey,
|
|
3306
|
+
es as isArray,
|
|
3307
|
+
ns as isDate,
|
|
3308
|
+
kr as isESModule,
|
|
3309
|
+
Ut as isEqual,
|
|
2962
3310
|
S as isFunction,
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
3311
|
+
ts as isMap,
|
|
3312
|
+
Vr as isObject,
|
|
3313
|
+
Vt as isPlainObject,
|
|
3314
|
+
os as isPromise,
|
|
3315
|
+
rs as isSet,
|
|
3316
|
+
ss as isString,
|
|
3317
|
+
is as isSymbol,
|
|
3318
|
+
vs as onAfterRouteUpdate,
|
|
3319
|
+
ms as onBeforeRouteUpdate,
|
|
3320
|
+
as as onFoxActivated,
|
|
3321
|
+
us as onFoxInactivated,
|
|
2974
3322
|
ie as sessionKey,
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
3323
|
+
pr as toBoolean,
|
|
3324
|
+
ls as toNumber,
|
|
3325
|
+
Ot as toTypeString,
|
|
3326
|
+
Bt as typeOf,
|
|
3327
|
+
ys as useBus,
|
|
3328
|
+
ps as useEventProxy,
|
|
3329
|
+
ds as useFox,
|
|
3330
|
+
hs as useRoute,
|
|
3331
|
+
Lr as useRouter
|
|
2984
3332
|
};
|