@fox-js/fox 3.1.1-21 → 3.1.1-22
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 +1 -1
- package/libs/index.esm.d.ts +104 -80
- package/libs/index.esm.js +1355 -1331
- package/libs/index.umd.js +1 -1
- package/package.json +1 -1
package/libs/index.esm.js
CHANGED
|
@@ -1,94 +1,82 @@
|
|
|
1
|
-
import { defineComponent as Fr, effectScope as
|
|
2
|
-
var
|
|
1
|
+
import { defineComponent as Fr, effectScope as as, getCurrentInstance as Vt, h as ce, inject as G, onUnmounted as ct, provide as te, reactive as us, readonly as fs, ref as cs, shallowReactive as hs, shallowRef as Ar, toRaw as Ot, watch as ys } from "vue";
|
|
2
|
+
var Pe = typeof window < "u", F = function() {
|
|
3
3
|
return window;
|
|
4
|
-
},
|
|
4
|
+
}, Ue = function() {
|
|
5
5
|
return window.document;
|
|
6
6
|
};
|
|
7
|
-
function
|
|
8
|
-
let t = e, r = t.lastIndexOf("/");
|
|
9
|
-
return r > 0 && r < t.length - 1 ? t = t.substring(0, r + 1) : r === 0 && t.indexOf(".") !== -1 ? t = "/" : r === -1 && (t.indexOf(".") == -1 ? t = `/${t}/` : t = "/"), t.indexOf("/") !== 0 && (t = `/${t}`), t;
|
|
10
|
-
}
|
|
11
|
-
function vt() {
|
|
12
|
-
if (!me) return "/";
|
|
13
|
-
let e = A().location, t = `${e.protocol}//${e.host}`;
|
|
14
|
-
return t += ms(e.pathname), t;
|
|
15
|
-
}
|
|
16
|
-
function nt(e, t, r, s = !1) {
|
|
7
|
+
function ot(e, t, r, s = !1) {
|
|
17
8
|
e.addEventListener ? e.addEventListener(t, r, s) : e.attachEvent ? e.attachEvent(`on${t}`, r) : e[`on${t}`] = r;
|
|
18
9
|
}
|
|
19
|
-
function
|
|
10
|
+
function Wt(e, t, r) {
|
|
20
11
|
e.removeEventListener ? e.removeEventListener(t, r) : e.detachEvent ? e.detachEvent(`on${t}`, r) : e[`on${t}`] = null;
|
|
21
12
|
}
|
|
22
|
-
var
|
|
13
|
+
var Ve = (e, t, r) => {
|
|
23
14
|
t = t ?? {
|
|
24
15
|
bubbles: !1,
|
|
25
16
|
cancelable: !1,
|
|
26
17
|
detail: void 0
|
|
27
18
|
};
|
|
28
19
|
const s = document.createEvent("Events");
|
|
29
|
-
let
|
|
30
|
-
for (let a in t) a === "bubbles" ?
|
|
31
|
-
s.initEvent(e,
|
|
32
|
-
},
|
|
33
|
-
function
|
|
34
|
-
return e.__esModule ||
|
|
35
|
-
}
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
let t = e[0] !== void 0 && e[0] !== null ? e[0] : {}, r = 1, s = e.length,
|
|
39
|
-
for (typeof t == "boolean" && (
|
|
40
|
-
let
|
|
41
|
-
for (let a in
|
|
42
|
-
let
|
|
43
|
-
if (
|
|
44
|
-
if (
|
|
20
|
+
let i = !0, n = !0;
|
|
21
|
+
for (let a in t) a === "bubbles" ? i = !!t[a] : a === "cancelable" ? n = !!t[a] : s[a] = t[a];
|
|
22
|
+
s.initEvent(e, i, n), (r ?? document).dispatchEvent(s);
|
|
23
|
+
}, er = Array.isArray, Ai = (e) => Jt(e) === "[object Map]", Ki = (e) => Jt(e) === "[object Set]", $i = (e) => e instanceof Date, b = (e) => typeof e == "function", qi = (e) => typeof e == "string", ji = (e) => typeof e == "symbol", ds = (e) => e !== null && typeof e == "object", Mi = (e) => ds(e) && b(e.then) && b(e.catch), He = (e) => e == null, ms = Object.prototype.toString, Jt = (e) => ms.call(e), vs = (e) => Jt(e) === "[object Object]", ps = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
|
|
24
|
+
function zt(e) {
|
|
25
|
+
return e.__esModule || ps && e[Symbol.toStringTag] === "Module";
|
|
26
|
+
}
|
|
27
|
+
var gs = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
|
|
28
|
+
function q(...e) {
|
|
29
|
+
let t = e[0] !== void 0 && e[0] !== null ? e[0] : {}, r = 1, s = e.length, i = !1;
|
|
30
|
+
for (typeof t == "boolean" && (i = t, t = e[r] ?? {}, r++), typeof t != "object" && (t = {}); r < s; r++) if (e[r] !== null && e[r] !== void 0) {
|
|
31
|
+
let n = e[r];
|
|
32
|
+
for (let a in n) {
|
|
33
|
+
let l = t[a], o = n[a];
|
|
34
|
+
if (l !== o)
|
|
35
|
+
if (i === !0 && o && typeof o == "object") {
|
|
45
36
|
let u;
|
|
46
|
-
Array.isArray(
|
|
47
|
-
} else
|
|
37
|
+
Array.isArray(o) ? u = l && Array.isArray(l) ? l : [] : u = l && typeof l == "object" ? l : {}, t[a] = q(i, u, o);
|
|
38
|
+
} else o !== void 0 && (t[a] = o);
|
|
48
39
|
}
|
|
49
40
|
}
|
|
50
41
|
return t;
|
|
51
42
|
}
|
|
52
|
-
function
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
e[s] = i;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
43
|
+
function Kr(e, t, r = !1) {
|
|
44
|
+
if (typeof t != "object") return {};
|
|
45
|
+
typeof e != "object" && (e = {});
|
|
46
|
+
for (let s of Reflect.ownKeys(t)) {
|
|
47
|
+
let i = e[s], n = t[s];
|
|
48
|
+
if (i !== n)
|
|
49
|
+
if (typeof n == "object") {
|
|
50
|
+
if (!Array.isArray(n) && !vs(n)) continue;
|
|
51
|
+
i = Kr(i, n, r), e[s] = i;
|
|
52
|
+
} else {
|
|
53
|
+
if (typeof n == "function") continue;
|
|
54
|
+
e[s] = n;
|
|
55
|
+
}
|
|
68
56
|
}
|
|
69
57
|
return e;
|
|
70
58
|
}
|
|
71
|
-
var
|
|
59
|
+
var Oe = class Bt {
|
|
72
60
|
static seed = (/* @__PURE__ */ new Date()).getTime();
|
|
73
61
|
static get() {
|
|
74
62
|
let t = ++Bt.seed;
|
|
75
63
|
return t >= Number.MAX_VALUE && (Bt.seed = 0), t;
|
|
76
64
|
}
|
|
77
|
-
},
|
|
78
|
-
function
|
|
79
|
-
|
|
65
|
+
}, vt = gs ? Promise.resolve() : null;
|
|
66
|
+
function Be(e, ...t) {
|
|
67
|
+
vt !== null ? t && t.length > 0 ? vt.then(() => {
|
|
80
68
|
e(t);
|
|
81
|
-
}) :
|
|
69
|
+
}) : vt.then(e) : t && t.length > 0 ? setTimeout(() => {
|
|
82
70
|
e(t);
|
|
83
71
|
}) : setTimeout(e);
|
|
84
72
|
}
|
|
85
|
-
function
|
|
73
|
+
function $r(e) {
|
|
86
74
|
return e == null ? !1 : typeof e == "boolean" ? e : typeof e == "string" ? e.toLocaleLowerCase() === "true" : !!e;
|
|
87
75
|
}
|
|
88
76
|
function Li(e) {
|
|
89
77
|
return typeof e == "number" ? e : Number(e);
|
|
90
78
|
}
|
|
91
|
-
var
|
|
79
|
+
var ws = {
|
|
92
80
|
"[object Boolean]": "boolean",
|
|
93
81
|
"[object Number]": "number",
|
|
94
82
|
"[object String]": "string",
|
|
@@ -98,28 +86,28 @@ var Rs = {
|
|
|
98
86
|
"[object RegExp]": "regExp",
|
|
99
87
|
"[object Object]": "object"
|
|
100
88
|
};
|
|
101
|
-
function
|
|
89
|
+
function tr(e) {
|
|
102
90
|
let t = Object.prototype.toString.call(e);
|
|
103
|
-
return e == null ? String(e) :
|
|
91
|
+
return e == null ? String(e) : ws[t] || "object";
|
|
104
92
|
}
|
|
105
|
-
function
|
|
93
|
+
function rr(e, t) {
|
|
106
94
|
if (e == t) return !0;
|
|
107
95
|
if (e === void 0 || t === void 0) return !1;
|
|
108
|
-
let r =
|
|
109
|
-
if (r !==
|
|
96
|
+
let r = tr(e);
|
|
97
|
+
if (r !== tr(t)) return !1;
|
|
110
98
|
if (r === "object") {
|
|
111
|
-
let s = Object.keys(e),
|
|
112
|
-
if (s.length !==
|
|
113
|
-
for (let
|
|
114
|
-
let a = s[
|
|
115
|
-
if (!
|
|
99
|
+
let s = Object.keys(e), i = Object.keys(t);
|
|
100
|
+
if (s.length !== i.length) return !1;
|
|
101
|
+
for (let n = 0; n < s.length; n++) {
|
|
102
|
+
let a = s[n], l = e[a], o = t[a];
|
|
103
|
+
if (!rr(l, o)) return !1;
|
|
116
104
|
}
|
|
117
105
|
return !0;
|
|
118
106
|
} else if (r === "array") {
|
|
119
107
|
if (e.length !== t.length) return !1;
|
|
120
108
|
for (let s = 0; s < e.length; s++) {
|
|
121
|
-
let
|
|
122
|
-
if (!
|
|
109
|
+
let i = e[s], n = t[s];
|
|
110
|
+
if (!rr(i, n)) return !1;
|
|
123
111
|
}
|
|
124
112
|
return !0;
|
|
125
113
|
}
|
|
@@ -132,20 +120,20 @@ var qr = (e) => {
|
|
|
132
120
|
s && !Array.isArray(s) && typeof s == "object" && (s = qr(s)), typeof r == "symbol" ? t[String(r)] = s : t[r] = s;
|
|
133
121
|
}
|
|
134
122
|
return t;
|
|
135
|
-
},
|
|
123
|
+
}, bs = /^Symbol\((.*)\)$/, jr = (e) => {
|
|
136
124
|
const t = {};
|
|
137
125
|
for (let r of Reflect.ownKeys(e)) {
|
|
138
126
|
let s = e[r];
|
|
139
127
|
s && !Array.isArray(s) && typeof s == "object" && (s = jr(s));
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
const
|
|
143
|
-
t[
|
|
128
|
+
const i = bs.exec(r);
|
|
129
|
+
if (i && i[1]) {
|
|
130
|
+
const n = Symbol.for(i[1]);
|
|
131
|
+
t[n] = s;
|
|
144
132
|
} else t[r] = s;
|
|
145
133
|
}
|
|
146
134
|
return t;
|
|
147
135
|
};
|
|
148
|
-
function
|
|
136
|
+
function Mr(e, t) {
|
|
149
137
|
let r = null;
|
|
150
138
|
return function(...s) {
|
|
151
139
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -153,45 +141,45 @@ function Tr(e, t) {
|
|
|
153
141
|
}, t);
|
|
154
142
|
};
|
|
155
143
|
}
|
|
156
|
-
var
|
|
144
|
+
var sr = Symbol("idKey"), me = Symbol("valueKey"), R = Symbol("childrenKey"), X = Symbol("growKey"), Lr = class {
|
|
157
145
|
[X] = !0;
|
|
158
|
-
[
|
|
159
|
-
[
|
|
146
|
+
[sr];
|
|
147
|
+
[me] = cs();
|
|
160
148
|
[R] = /* @__PURE__ */ new Map();
|
|
161
149
|
constructor(e) {
|
|
162
|
-
this[
|
|
150
|
+
this[sr] = e;
|
|
163
151
|
}
|
|
164
|
-
},
|
|
152
|
+
}, Rs = class {
|
|
165
153
|
get(e, t) {
|
|
166
|
-
if (t == "value") return e[
|
|
154
|
+
if (t == "value") return e[me].value;
|
|
167
155
|
if (t === "grow") return e[X];
|
|
168
156
|
let r = e[R].get(t);
|
|
169
|
-
if (r) return
|
|
157
|
+
if (r) return De(r);
|
|
170
158
|
if (e[X])
|
|
171
|
-
return r =
|
|
159
|
+
return r = Xt(t), r[X] = e[X], e[R].set(t, r), De(r);
|
|
172
160
|
}
|
|
173
161
|
set(e, t, r) {
|
|
174
|
-
return t == "value" ? (e[
|
|
162
|
+
return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = $r(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
|
|
175
163
|
}
|
|
176
164
|
deleteProperty(e, t) {
|
|
177
165
|
return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
178
166
|
}
|
|
179
|
-
},
|
|
180
|
-
function
|
|
167
|
+
}, Gt = "__proxy__";
|
|
168
|
+
function Xt(e) {
|
|
181
169
|
const t = new Lr(e);
|
|
182
|
-
return Reflect.set(t,
|
|
170
|
+
return Reflect.set(t, Gt, new Proxy(t, new Rs())), t;
|
|
183
171
|
}
|
|
184
|
-
function
|
|
185
|
-
return Reflect.get(e,
|
|
172
|
+
function De(e) {
|
|
173
|
+
return Reflect.get(e, Gt);
|
|
186
174
|
}
|
|
187
|
-
var
|
|
175
|
+
var Ss = class {
|
|
188
176
|
name = "";
|
|
189
177
|
persistPolicy = "memory";
|
|
190
178
|
storage;
|
|
191
179
|
initFlag = !1;
|
|
192
180
|
state = {};
|
|
193
181
|
constructor(e = {}, t) {
|
|
194
|
-
if (e.persistPolicy && e.persistPolicy !== "memory" &&
|
|
182
|
+
if (e.persistPolicy && e.persistPolicy !== "memory" && He(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
|
|
195
183
|
this.name = e.name ?? "", this.persistPolicy = e.persistPolicy ?? "memory", this.storage = e.storage, t && typeof t == "object" && Object.assign(this.state, t);
|
|
196
184
|
}
|
|
197
185
|
init(e) {
|
|
@@ -201,8 +189,8 @@ var Ps = class {
|
|
|
201
189
|
if (!this.persistPolicy || this.persistPolicy === "memory") return null;
|
|
202
190
|
let e = null;
|
|
203
191
|
if (this.persistPolicy === "custom") e = this.storage;
|
|
204
|
-
else if (
|
|
205
|
-
const t =
|
|
192
|
+
else if (Pe) {
|
|
193
|
+
const t = F();
|
|
206
194
|
e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
|
|
207
195
|
}
|
|
208
196
|
return e;
|
|
@@ -227,11 +215,11 @@ var Ps = class {
|
|
|
227
215
|
if (t === null) return;
|
|
228
216
|
const r = `_bus_${this.name}`, s = t.getItem(r);
|
|
229
217
|
if (s) {
|
|
230
|
-
const
|
|
231
|
-
Object.assign(this.state,
|
|
232
|
-
if (typeof
|
|
233
|
-
const a = this.state[
|
|
234
|
-
|
|
218
|
+
const i = JSON.parse(s);
|
|
219
|
+
Object.assign(this.state, i), Reflect.ownKeys(this.state).forEach((n) => {
|
|
220
|
+
if (typeof n != "string") return;
|
|
221
|
+
const a = this.state[n], l = n.split(/\//g);
|
|
222
|
+
l.push(a), Reflect.apply(e.put, e, l);
|
|
235
223
|
});
|
|
236
224
|
}
|
|
237
225
|
}
|
|
@@ -248,8 +236,8 @@ var Ps = class {
|
|
|
248
236
|
if (this.initFlag && this.persistPolicy !== "memory")
|
|
249
237
|
try {
|
|
250
238
|
const t = e.length, r = e.slice(0, t - 1).join("/"), s = {};
|
|
251
|
-
Reflect.ownKeys(this.state).forEach((
|
|
252
|
-
typeof
|
|
239
|
+
Reflect.ownKeys(this.state).forEach((i) => {
|
|
240
|
+
typeof i == "string" && (i === r || i.startsWith(r) || (s[i] = this.state[i]));
|
|
253
241
|
}), this.state = s, this.saveState();
|
|
254
242
|
} catch (t) {
|
|
255
243
|
console.error(t);
|
|
@@ -263,10 +251,10 @@ var Ps = class {
|
|
|
263
251
|
console.error(e);
|
|
264
252
|
}
|
|
265
253
|
}
|
|
266
|
-
},
|
|
254
|
+
}, Tr = class extends Lr {
|
|
267
255
|
_persistHandler;
|
|
268
256
|
constructor(e = {}, t) {
|
|
269
|
-
super("__root__"), this._persistHandler = new
|
|
257
|
+
super("__root__"), this._persistHandler = new Ss(e, t), this._persistHandler.init(this);
|
|
270
258
|
}
|
|
271
259
|
put(...e) {
|
|
272
260
|
let t = e.length;
|
|
@@ -274,29 +262,29 @@ var Ps = class {
|
|
|
274
262
|
return console.error("参数至少包括一个(key, value)"), !1;
|
|
275
263
|
let r = this;
|
|
276
264
|
for (let s = 0; s < t - 1; s++) {
|
|
277
|
-
let
|
|
278
|
-
r[R].has(
|
|
265
|
+
let i = e[s], n;
|
|
266
|
+
r[R].has(i) ? n = r[R].get(i) : (n = Xt(i), r[R].set(i, n)), r = n;
|
|
279
267
|
}
|
|
280
|
-
return r[
|
|
268
|
+
return r[me].value = e[t - 1], this._persistHandler.put(e), !0;
|
|
281
269
|
}
|
|
282
270
|
get(...e) {
|
|
283
271
|
let t = e.length;
|
|
284
272
|
if (t === 0) return;
|
|
285
273
|
let r = this;
|
|
286
274
|
for (let s = 0; s < t; s++) {
|
|
287
|
-
let
|
|
288
|
-
if (r[R].has(
|
|
275
|
+
let i = e[s];
|
|
276
|
+
if (r[R].has(i)) r = r[R].get(i);
|
|
289
277
|
else return;
|
|
290
278
|
}
|
|
291
|
-
return r[
|
|
279
|
+
return r[me].value;
|
|
292
280
|
}
|
|
293
281
|
remove(...e) {
|
|
294
282
|
let t = e.length;
|
|
295
283
|
if (t == 0) return !1;
|
|
296
284
|
let r = this;
|
|
297
|
-
for (let
|
|
298
|
-
const
|
|
299
|
-
if (r[R].has(
|
|
285
|
+
for (let i = 0; i < t - 1; i++) {
|
|
286
|
+
const n = e[i];
|
|
287
|
+
if (r[R].has(n)) r = r[R].get(n);
|
|
300
288
|
else return !1;
|
|
301
289
|
}
|
|
302
290
|
const s = e[t - 1];
|
|
@@ -306,9 +294,9 @@ var Ps = class {
|
|
|
306
294
|
const t = e.length;
|
|
307
295
|
if (t == 0) return !1;
|
|
308
296
|
let r = this;
|
|
309
|
-
for (let
|
|
310
|
-
let
|
|
311
|
-
if (r[R].has(
|
|
297
|
+
for (let i = 0; i < t - 1; i++) {
|
|
298
|
+
let n = e[i];
|
|
299
|
+
if (r[R].has(n)) r = r[R].get(n);
|
|
312
300
|
else return !1;
|
|
313
301
|
}
|
|
314
302
|
const s = e[t - 1];
|
|
@@ -317,7 +305,7 @@ var Ps = class {
|
|
|
317
305
|
clear() {
|
|
318
306
|
this[R].clear(), this._persistHandler.clear();
|
|
319
307
|
}
|
|
320
|
-
},
|
|
308
|
+
}, xs = [
|
|
321
309
|
"put",
|
|
322
310
|
"get",
|
|
323
311
|
"contains",
|
|
@@ -325,49 +313,49 @@ var Ps = class {
|
|
|
325
313
|
"clear",
|
|
326
314
|
"_persistHandler"
|
|
327
315
|
];
|
|
328
|
-
function
|
|
329
|
-
return
|
|
316
|
+
function ir(e) {
|
|
317
|
+
return xs.includes(e);
|
|
330
318
|
}
|
|
331
|
-
var
|
|
319
|
+
var Ps = class {
|
|
332
320
|
get(e, t) {
|
|
333
|
-
if (t == "value") return e[
|
|
321
|
+
if (t == "value") return e[me].value;
|
|
334
322
|
if (t === "grow") return e[X];
|
|
335
323
|
if (t === R) return e[R];
|
|
336
|
-
if (typeof t == "string" &&
|
|
324
|
+
if (typeof t == "string" && ir(t)) return e[t];
|
|
337
325
|
const r = String(t);
|
|
338
326
|
let s = e[R].get(r);
|
|
339
|
-
if (s) return
|
|
327
|
+
if (s) return De(s);
|
|
340
328
|
if (e[X])
|
|
341
|
-
return s =
|
|
329
|
+
return s = Xt(r), s[X] = e[X], e[R].set(r, s), De(s);
|
|
342
330
|
}
|
|
343
331
|
set(e, t, r) {
|
|
344
|
-
return t == "value" ? (e[
|
|
332
|
+
return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = $r(r), !0) : ir(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
|
|
345
333
|
}
|
|
346
334
|
deleteProperty(e, t) {
|
|
347
335
|
return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
348
336
|
}
|
|
349
337
|
};
|
|
350
|
-
function
|
|
351
|
-
const r = new
|
|
352
|
-
return Reflect.set(r,
|
|
338
|
+
function Es(e, t) {
|
|
339
|
+
const r = new Tr(e, t), s = new Ps(), i = new Proxy(r, s);
|
|
340
|
+
return Reflect.set(r, Gt, i), r;
|
|
353
341
|
}
|
|
354
|
-
var
|
|
342
|
+
var nr = new Proxy(Tr, { construct(e, t) {
|
|
355
343
|
const r = t[0] ?? {}, s = t[1];
|
|
356
|
-
return
|
|
357
|
-
} }),
|
|
344
|
+
return De(Es(r, s));
|
|
345
|
+
} }), Qt = (e) => !e || typeof e != "object" ? !0 : Reflect.ownKeys(e).length === 0, kr = class {
|
|
358
346
|
name = "";
|
|
359
347
|
persistPolicy = "memory";
|
|
360
348
|
storage;
|
|
361
349
|
constructor(e = {}) {
|
|
362
|
-
if (e.persistPolicy && e.persistPolicy !== "memory" &&
|
|
350
|
+
if (e.persistPolicy && e.persistPolicy !== "memory" && He(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
|
|
363
351
|
this.name = e.name ?? "", this.persistPolicy = e.persistPolicy ?? "memory", this.storage = e.storage;
|
|
364
352
|
}
|
|
365
353
|
getStorage() {
|
|
366
354
|
if (!this.persistPolicy || this.persistPolicy === "memory") return null;
|
|
367
355
|
let e = null;
|
|
368
356
|
if (this.persistPolicy === "custom") e = this.storage;
|
|
369
|
-
else if (
|
|
370
|
-
const t =
|
|
357
|
+
else if (Pe) {
|
|
358
|
+
const t = F();
|
|
371
359
|
e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
|
|
372
360
|
}
|
|
373
361
|
return e;
|
|
@@ -375,7 +363,7 @@ var or = new Proxy(Or, { construct(e, t) {
|
|
|
375
363
|
saveState(e) {
|
|
376
364
|
if (!this.persistPolicy || this.persistPolicy === "memory") return;
|
|
377
365
|
let t = this.getStorage();
|
|
378
|
-
if (t === null ||
|
|
366
|
+
if (t === null || Qt(e)) return;
|
|
379
367
|
const r = `_state_${this.name}`, s = JSON.stringify(e ?? {});
|
|
380
368
|
t.setItem(r, s);
|
|
381
369
|
}
|
|
@@ -392,92 +380,92 @@ var or = new Proxy(Or, { construct(e, t) {
|
|
|
392
380
|
if (t === null) return;
|
|
393
381
|
const r = `_state_${this.name}`, s = t.getItem(r);
|
|
394
382
|
if (s) {
|
|
395
|
-
const
|
|
396
|
-
Object.assign(e,
|
|
383
|
+
const i = JSON.parse(s);
|
|
384
|
+
Object.assign(e, i);
|
|
397
385
|
}
|
|
398
386
|
}
|
|
399
387
|
};
|
|
400
388
|
function Ir(e, t, r) {
|
|
401
389
|
const s = new kr(r);
|
|
402
390
|
s.restore(t);
|
|
403
|
-
const
|
|
404
|
-
const
|
|
405
|
-
for (let f in
|
|
406
|
-
const c =
|
|
407
|
-
|
|
391
|
+
const i = (l) => {
|
|
392
|
+
const o = Ot(l), u = {};
|
|
393
|
+
for (let f in o) {
|
|
394
|
+
const c = o[f];
|
|
395
|
+
He(c) || (u[f] = c);
|
|
408
396
|
}
|
|
409
|
-
|
|
397
|
+
Qt(u) ? s.removeState() : s.saveState(u);
|
|
410
398
|
};
|
|
411
|
-
let
|
|
412
|
-
r && r.debounce === !1 ?
|
|
413
|
-
const a = e ?
|
|
414
|
-
return
|
|
415
|
-
|
|
416
|
-
const
|
|
417
|
-
|
|
399
|
+
let n = null;
|
|
400
|
+
r && r.debounce === !1 ? n = i : n = Mr(i, r && r.debounceDelay ? r.debounceDelay : 250);
|
|
401
|
+
const a = e ? hs(t) : us(t);
|
|
402
|
+
return as(!0).run(() => {
|
|
403
|
+
ys(a, (l) => {
|
|
404
|
+
const o = Ot(l);
|
|
405
|
+
n(o);
|
|
418
406
|
});
|
|
419
407
|
}), a;
|
|
420
408
|
}
|
|
421
|
-
function
|
|
409
|
+
function Ti(e, t) {
|
|
422
410
|
return Ir(!1, e, t);
|
|
423
411
|
}
|
|
424
412
|
function ki(e, t) {
|
|
425
413
|
return Ir(!0, e, t);
|
|
426
414
|
}
|
|
427
|
-
function
|
|
415
|
+
function _s(e, t) {
|
|
428
416
|
const r = new kr(t);
|
|
429
417
|
r.restore(e);
|
|
430
|
-
const s = (
|
|
431
|
-
const a =
|
|
432
|
-
for (let
|
|
433
|
-
const u = a[
|
|
434
|
-
|
|
418
|
+
const s = (n) => {
|
|
419
|
+
const a = Ot(n), l = {};
|
|
420
|
+
for (let o in a) {
|
|
421
|
+
const u = a[o];
|
|
422
|
+
He(u) || (l[o] = u);
|
|
435
423
|
}
|
|
436
|
-
|
|
424
|
+
Qt(l) ? r.removeState() : r.saveState(l);
|
|
437
425
|
};
|
|
438
|
-
let
|
|
439
|
-
return t && t.debounce === !1 ?
|
|
440
|
-
get(
|
|
441
|
-
return
|
|
426
|
+
let i = null;
|
|
427
|
+
return t && t.debounce === !1 ? i = s : i = Mr(s, t && t.debounceDelay ? t.debounceDelay : 250), new Proxy(e, {
|
|
428
|
+
get(n, a) {
|
|
429
|
+
return n[a];
|
|
442
430
|
},
|
|
443
|
-
set(
|
|
444
|
-
return
|
|
431
|
+
set(n, a, l) {
|
|
432
|
+
return n[a] = l, i(n), !0;
|
|
445
433
|
}
|
|
446
434
|
});
|
|
447
435
|
}
|
|
448
436
|
function Ii(e, t) {
|
|
449
|
-
return
|
|
437
|
+
return _s(e, t);
|
|
450
438
|
}
|
|
451
|
-
var
|
|
452
|
-
function
|
|
439
|
+
var Or = "default", Br = Symbol("sync"), I = Symbol("normalizeRoute");
|
|
440
|
+
function or(e) {
|
|
453
441
|
let t = !1;
|
|
454
442
|
return function(...r) {
|
|
455
443
|
if (!t)
|
|
456
444
|
return t = !0, Reflect.apply(e, {}, r);
|
|
457
445
|
};
|
|
458
446
|
}
|
|
459
|
-
function
|
|
447
|
+
function Cs(e) {
|
|
460
448
|
let t = e.src;
|
|
461
449
|
return new Promise((r, s) => {
|
|
462
|
-
const
|
|
463
|
-
|
|
464
|
-
}),
|
|
465
|
-
`${
|
|
450
|
+
const i = or((l) => {
|
|
451
|
+
zt(l) && (l = l.default), e.component = l, console.debug("success load async module"), r();
|
|
452
|
+
}), n = or((l) => {
|
|
453
|
+
`${l}`, console.debug("reject load async module"), s(l);
|
|
466
454
|
});
|
|
467
455
|
let a;
|
|
468
456
|
try {
|
|
469
|
-
a = t(
|
|
470
|
-
} catch (
|
|
471
|
-
|
|
457
|
+
a = t(i, n);
|
|
458
|
+
} catch (l) {
|
|
459
|
+
n(l);
|
|
472
460
|
}
|
|
473
|
-
if (a) if (typeof a.then == "function") a.then(
|
|
461
|
+
if (a) if (typeof a.then == "function") a.then(i, n);
|
|
474
462
|
else {
|
|
475
|
-
const
|
|
476
|
-
|
|
463
|
+
const l = a.component;
|
|
464
|
+
l && typeof l.then == "function" && l.then(i, n);
|
|
477
465
|
}
|
|
478
466
|
});
|
|
479
467
|
}
|
|
480
|
-
var
|
|
468
|
+
var Fs = class {
|
|
481
469
|
name;
|
|
482
470
|
level;
|
|
483
471
|
rootName;
|
|
@@ -485,7 +473,7 @@ var $s = class {
|
|
|
485
473
|
constructor(e, t, r, s) {
|
|
486
474
|
this.name = e, this.level = t, this.rootName = r, this.rootIndex = s;
|
|
487
475
|
}
|
|
488
|
-
},
|
|
476
|
+
}, We = class Dr {
|
|
489
477
|
to;
|
|
490
478
|
routeModel;
|
|
491
479
|
from;
|
|
@@ -494,13 +482,13 @@ var $s = class {
|
|
|
494
482
|
this.to = t, this.from = r;
|
|
495
483
|
}
|
|
496
484
|
static from(t) {
|
|
497
|
-
const r = new
|
|
498
|
-
return
|
|
485
|
+
const r = new Dr(t.to, t.from), s = t.data ?? {};
|
|
486
|
+
return q(!0, r.data, s), r;
|
|
499
487
|
}
|
|
500
488
|
static clear(t) {
|
|
501
489
|
for (let r in t) t[r] = void 0;
|
|
502
490
|
}
|
|
503
|
-
}, x = class
|
|
491
|
+
}, x = class Dt {
|
|
504
492
|
path;
|
|
505
493
|
get fullPath() {
|
|
506
494
|
const t = this.path ?? `/${this.name}`;
|
|
@@ -526,8 +514,8 @@ var $s = class {
|
|
|
526
514
|
active;
|
|
527
515
|
slot;
|
|
528
516
|
static clone(t, r) {
|
|
529
|
-
let s = new
|
|
530
|
-
return
|
|
517
|
+
let s = new Dt();
|
|
518
|
+
return Kr(s, t, r), s;
|
|
531
519
|
}
|
|
532
520
|
static isSame(t, r) {
|
|
533
521
|
return !t || !r ? !1 : t === r ? !0 : t.root !== r.root || t.index !== r.index ? !1 : t.path && r.path && t.path === r.path ? !0 : !!(t.name && r.name && t.name === r.name);
|
|
@@ -536,32 +524,32 @@ var $s = class {
|
|
|
536
524
|
return !t || !r ? !1 : t === r || t.path && r.path && t.path === r.path ? !0 : !!(t.name && r.name && t.name === r.name);
|
|
537
525
|
}
|
|
538
526
|
static from(t) {
|
|
539
|
-
let r = new
|
|
527
|
+
let r = new Dt();
|
|
540
528
|
if (t == null) return r;
|
|
541
529
|
let s = r;
|
|
542
|
-
for (let
|
|
543
|
-
const
|
|
544
|
-
if (Array.isArray(
|
|
530
|
+
for (let n in t) s[n] = t[n];
|
|
531
|
+
const i = Object.getOwnPropertySymbols(t);
|
|
532
|
+
if (Array.isArray(i) && i.length > 0) for (let n of i) s[n] = t[n];
|
|
545
533
|
return r;
|
|
546
534
|
}
|
|
547
|
-
},
|
|
535
|
+
}, As = class {
|
|
548
536
|
id;
|
|
549
537
|
name;
|
|
550
538
|
props;
|
|
551
539
|
src;
|
|
552
540
|
component;
|
|
553
541
|
constructor(e, t, r) {
|
|
554
|
-
this.id =
|
|
542
|
+
this.id = Oe.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = r;
|
|
555
543
|
}
|
|
556
544
|
get isResolved() {
|
|
557
545
|
return this.component !== void 0;
|
|
558
546
|
}
|
|
559
547
|
resolve() {
|
|
560
|
-
return
|
|
548
|
+
return Cs(this);
|
|
561
549
|
}
|
|
562
|
-
},
|
|
550
|
+
}, lr = class {
|
|
563
551
|
models = [];
|
|
564
|
-
},
|
|
552
|
+
}, pt = class {
|
|
565
553
|
path;
|
|
566
554
|
match;
|
|
567
555
|
redirect;
|
|
@@ -569,9 +557,9 @@ var $s = class {
|
|
|
569
557
|
meta;
|
|
570
558
|
matchedRoutes;
|
|
571
559
|
layers = [];
|
|
572
|
-
},
|
|
560
|
+
}, C = /* @__PURE__ */ (function(e) {
|
|
573
561
|
return e[e.Push = 0] = "Push", e[e.Replace = 1] = "Replace", e[e.Put = 2] = "Put", e[e.Append = 3] = "Append", e[e.Open = 4] = "Open", e;
|
|
574
|
-
})({}),
|
|
562
|
+
})({}), Ks = "FoxBeforeEnter", $s = "FoxEnter", qs = "FoxLeave", js = "FoxLeave", Ht = "FoxLeaveEnd", ht = Symbol("rk"), gt = Symbol("vd"), ar = Symbol("rv"), wt = Symbol("rvi"), ur = Symbol("pv"), bt = Symbol("pvi"), Fe = Symbol("registerKey"), Ms = class {
|
|
575
563
|
[Fe] = /* @__PURE__ */ new Map();
|
|
576
564
|
constructor() {
|
|
577
565
|
}
|
|
@@ -588,26 +576,26 @@ var $s = class {
|
|
|
588
576
|
return this[Fe].delete(e);
|
|
589
577
|
}
|
|
590
578
|
}, de = Symbol("lc");
|
|
591
|
-
function
|
|
579
|
+
function lt(e, t = !1) {
|
|
592
580
|
let r = e;
|
|
593
581
|
if (Reflect.has(r, de)) return r[de];
|
|
594
582
|
if (t) {
|
|
595
|
-
const s = new
|
|
583
|
+
const s = new Ms();
|
|
596
584
|
return r[de] = s, s;
|
|
597
585
|
}
|
|
598
586
|
return null;
|
|
599
587
|
}
|
|
600
|
-
function
|
|
588
|
+
function Hr(e, t = !1) {
|
|
601
589
|
let r = null, s = e;
|
|
602
590
|
for (; s && !(Reflect.has(s, de) && (r = s[de], r)); )
|
|
603
591
|
s = s.$parent;
|
|
604
592
|
if (!r && t) {
|
|
605
|
-
const
|
|
606
|
-
|
|
593
|
+
const i = e;
|
|
594
|
+
i && i.$parent && (r = lt(i.$parent, t));
|
|
607
595
|
}
|
|
608
596
|
return r;
|
|
609
597
|
}
|
|
610
|
-
function
|
|
598
|
+
function Nr(e, t) {
|
|
611
599
|
let r = e;
|
|
612
600
|
for (; r; ) {
|
|
613
601
|
if (Reflect.has(r, de)) {
|
|
@@ -618,40 +606,40 @@ function Hr(e, t) {
|
|
|
618
606
|
}
|
|
619
607
|
return null;
|
|
620
608
|
}
|
|
621
|
-
function
|
|
622
|
-
|
|
609
|
+
function Oi(e, t, r) {
|
|
610
|
+
Hr(e, !0)?.set(t, r);
|
|
623
611
|
}
|
|
624
|
-
function
|
|
625
|
-
|
|
612
|
+
function Bi(e, t) {
|
|
613
|
+
Hr(e, !0)?.delete(t);
|
|
626
614
|
}
|
|
627
|
-
function
|
|
615
|
+
function fr(e) {
|
|
628
616
|
if (Array.isArray(e.children) && e.children.length > 0) {
|
|
629
617
|
let t = e.children[0];
|
|
630
|
-
if (t != null && t.component != null && t.component.proxy != null) return
|
|
618
|
+
if (t != null && t.component != null && t.component.proxy != null) return lt(t.component.proxy, !1);
|
|
631
619
|
}
|
|
632
620
|
return null;
|
|
633
621
|
}
|
|
634
|
-
var
|
|
635
|
-
function
|
|
636
|
-
let t = e.get(
|
|
637
|
-
t || (t = [], e.set(
|
|
622
|
+
var at = Symbol("hooksKey");
|
|
623
|
+
function Ls(e) {
|
|
624
|
+
let t = e.get(at);
|
|
625
|
+
t || (t = [], e.set(at, t));
|
|
638
626
|
}
|
|
639
|
-
function
|
|
640
|
-
let r = e.get(
|
|
627
|
+
function cr(e, t) {
|
|
628
|
+
let r = e.get(at);
|
|
641
629
|
if (r != null)
|
|
642
630
|
for (let s = r.length - 1; s >= 0; s--) {
|
|
643
|
-
let
|
|
644
|
-
if (
|
|
631
|
+
let i = r[s];
|
|
632
|
+
if (i.type === t)
|
|
645
633
|
try {
|
|
646
|
-
Reflect.apply(
|
|
647
|
-
} catch (
|
|
648
|
-
console.error(
|
|
634
|
+
Reflect.apply(i.hook, i.target, []);
|
|
635
|
+
} catch (n) {
|
|
636
|
+
console.error(n.message, n);
|
|
649
637
|
}
|
|
650
638
|
}
|
|
651
639
|
}
|
|
652
|
-
var
|
|
640
|
+
var ut = /* @__PURE__ */ (function(e) {
|
|
653
641
|
return e.DEACTIVATED = "da", e.ACTIVATED = "a", e;
|
|
654
|
-
})({}),
|
|
642
|
+
})({}), Ts = class {
|
|
655
643
|
type;
|
|
656
644
|
hook;
|
|
657
645
|
target;
|
|
@@ -659,49 +647,49 @@ var at = /* @__PURE__ */ (function(e) {
|
|
|
659
647
|
this.target = r, this.hook = t, this.type = e;
|
|
660
648
|
}
|
|
661
649
|
};
|
|
662
|
-
function
|
|
663
|
-
let
|
|
664
|
-
return e.push(
|
|
665
|
-
}
|
|
666
|
-
function
|
|
667
|
-
let
|
|
668
|
-
for (let
|
|
669
|
-
let a = e[
|
|
650
|
+
function ks(e, t, r, s) {
|
|
651
|
+
let i = new Ts(t, r, s);
|
|
652
|
+
return e.push(i), !0;
|
|
653
|
+
}
|
|
654
|
+
function Is(e, t, r, s) {
|
|
655
|
+
let i = -1;
|
|
656
|
+
for (let n = 0; n < e.length; n++) {
|
|
657
|
+
let a = e[n];
|
|
670
658
|
if (a.type === t && a.hook === r && a.target === s) {
|
|
671
|
-
|
|
659
|
+
i = n;
|
|
672
660
|
break;
|
|
673
661
|
}
|
|
674
662
|
}
|
|
675
|
-
return
|
|
663
|
+
return i != -1 ? (e.splice(i, 1), !0) : !1;
|
|
676
664
|
}
|
|
677
665
|
function Ur(e) {
|
|
678
666
|
return (t, r) => {
|
|
679
667
|
let s;
|
|
680
668
|
if (r) s = r;
|
|
681
669
|
else {
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
670
|
+
const n = Vt();
|
|
671
|
+
if (n == null || n.proxy == null) {
|
|
684
672
|
console.error("can not get current instance or proxy");
|
|
685
673
|
return;
|
|
686
674
|
}
|
|
687
|
-
s =
|
|
675
|
+
s = n.proxy;
|
|
688
676
|
}
|
|
689
|
-
const
|
|
690
|
-
if (
|
|
677
|
+
const i = Nr(s, at);
|
|
678
|
+
if (i == null) {
|
|
691
679
|
console.warn("hooks context not found");
|
|
692
680
|
return;
|
|
693
681
|
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
}),
|
|
682
|
+
ct(() => {
|
|
683
|
+
Is(i, e, t, s);
|
|
684
|
+
}), ks(i, e, t, s);
|
|
697
685
|
};
|
|
698
686
|
}
|
|
699
|
-
var
|
|
700
|
-
function
|
|
687
|
+
var Di = Ur(ut.ACTIVATED), Hi = Ur(ut.DEACTIVATED), Vr = Symbol("routeKey");
|
|
688
|
+
function hr(e, t) {
|
|
701
689
|
e.set(Vr, t);
|
|
702
690
|
}
|
|
703
691
|
function Zt(e) {
|
|
704
|
-
let t =
|
|
692
|
+
let t = Nr(e, Vr);
|
|
705
693
|
return typeof t == "function" ? t() : t ?? null;
|
|
706
694
|
}
|
|
707
695
|
function Wr(e, t = !1) {
|
|
@@ -712,7 +700,7 @@ function Jr(e, t = !1) {
|
|
|
712
700
|
let r = null;
|
|
713
701
|
return t ? r = e.showActiveClass ?? e.enterActiveClass : r = e.enterActiveClass, r || (r = e.transitionName, r ? t ? `${r}-show-active` : `${r}-enter-active` : null);
|
|
714
702
|
}
|
|
715
|
-
function
|
|
703
|
+
function Os(e, t = !1) {
|
|
716
704
|
let r = null;
|
|
717
705
|
return t ? r = e.showToClass ?? e.enterToClass : r = e.enterToClass, r || (r = e.transitionName, r ? t ? `${r}-show-to` : `${r}-enter-to` : null);
|
|
718
706
|
}
|
|
@@ -724,43 +712,43 @@ function Gr(e, t = !1) {
|
|
|
724
712
|
let r = null;
|
|
725
713
|
return t ? r = e.hideActiveClass ?? e.leaveActiveClass : r = e.leaveActiveClass, r || (r = e.transitionName, r ? t ? `${r}-hide-active` : `${r}-leave-active` : null);
|
|
726
714
|
}
|
|
727
|
-
function
|
|
715
|
+
function Bs(e, t = !1) {
|
|
728
716
|
let r = null;
|
|
729
717
|
return t ? r = e.hideToClass ?? e.leaveToClass : r = e.leaveToClass, r || (r = e.transitionName, r ? t ? `${r}-hide-to` : `${r}-leave-to` : null);
|
|
730
718
|
}
|
|
731
|
-
function
|
|
719
|
+
function Ds(e, t = !1) {
|
|
732
720
|
let r = null;
|
|
733
721
|
return t ? r = e.beforeShow ?? e.beforeEnter : r = e.beforeEnter, r;
|
|
734
722
|
}
|
|
735
|
-
function
|
|
723
|
+
function Hs(e, t = !1) {
|
|
736
724
|
let r = null;
|
|
737
725
|
return t ? r = e.show ?? e.enter : r = e.enter, r;
|
|
738
726
|
}
|
|
739
|
-
function
|
|
727
|
+
function Ns(e, t = !1) {
|
|
740
728
|
let r = null;
|
|
741
729
|
return t ? r = e.afterShow ?? e.afterEnter : r = e.afterEnter, r;
|
|
742
730
|
}
|
|
743
|
-
function
|
|
731
|
+
function Us(e, t = !1) {
|
|
744
732
|
let r = null;
|
|
745
733
|
return t ? r = e.showCancelled ?? e.enterCancelled : r = e.enterCancelled, r;
|
|
746
734
|
}
|
|
747
|
-
function
|
|
735
|
+
function Vs(e, t = !1) {
|
|
748
736
|
let r = null;
|
|
749
737
|
return t ? r = e.beforeHide ?? e.beforeLeave : r = e.beforeLeave, r;
|
|
750
738
|
}
|
|
751
|
-
function
|
|
739
|
+
function Ws(e, t = !1) {
|
|
752
740
|
let r = null;
|
|
753
741
|
return t ? r = e.hide ?? e.leave : r = e.leave, r;
|
|
754
742
|
}
|
|
755
|
-
function
|
|
743
|
+
function Js(e, t = !1) {
|
|
756
744
|
let r = null;
|
|
757
745
|
return t ? r = e.afterHide ?? e.afterLeave : r = e.afterLeave, r;
|
|
758
746
|
}
|
|
759
|
-
function
|
|
747
|
+
function zs(e, t = !1) {
|
|
760
748
|
let r = null;
|
|
761
749
|
return t ? r = e.hideCancelled ?? e.leaveCancelled : r = e.leaveCancelled, r;
|
|
762
750
|
}
|
|
763
|
-
function
|
|
751
|
+
function Yt(e) {
|
|
764
752
|
let t, r = e.transitionDuration;
|
|
765
753
|
return typeof r == "object" ? t = {
|
|
766
754
|
enter: r.enter ?? -1,
|
|
@@ -777,31 +765,31 @@ function er(e) {
|
|
|
777
765
|
function Ee(e, t) {
|
|
778
766
|
e.classList.contains(t) || e.classList.add(t);
|
|
779
767
|
}
|
|
780
|
-
function
|
|
768
|
+
function xe(e, t) {
|
|
781
769
|
e.classList.remove(t);
|
|
782
770
|
}
|
|
783
|
-
var
|
|
771
|
+
var Gs = Pe && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
|
|
784
772
|
function yt(e) {
|
|
785
|
-
|
|
773
|
+
Gs(e);
|
|
786
774
|
}
|
|
787
|
-
function
|
|
788
|
-
|
|
775
|
+
function A(e, t, r) {
|
|
776
|
+
b(t) && (e == null && (e = {}), Reflect.apply(t, e, r));
|
|
789
777
|
}
|
|
790
|
-
function Xr(e, t, r, s = -1,
|
|
791
|
-
let
|
|
792
|
-
const
|
|
793
|
-
for (let u of
|
|
794
|
-
|
|
778
|
+
function Xr(e, t, r, s = -1, i, n, a) {
|
|
779
|
+
let l = [];
|
|
780
|
+
const o = () => {
|
|
781
|
+
for (let u of l) Wt(t, u.type, u.listener);
|
|
782
|
+
l = [];
|
|
795
783
|
};
|
|
796
|
-
if (
|
|
797
|
-
if (
|
|
784
|
+
if (b(n)) {
|
|
785
|
+
if (i !== void 0 && i >= 0) {
|
|
798
786
|
setTimeout(() => {
|
|
799
|
-
Reflect.apply(
|
|
787
|
+
Reflect.apply(n, e, [
|
|
800
788
|
t,
|
|
801
789
|
r,
|
|
802
790
|
s
|
|
803
791
|
]);
|
|
804
|
-
},
|
|
792
|
+
}, i);
|
|
805
793
|
return;
|
|
806
794
|
}
|
|
807
795
|
const u = [
|
|
@@ -809,205 +797,205 @@ function Xr(e, t, r, s = -1, n, i, a) {
|
|
|
809
797
|
"transitionend",
|
|
810
798
|
Ht
|
|
811
799
|
], f = (c) => {
|
|
812
|
-
(c.target || c.srcElement) === c.currentTarget && (
|
|
800
|
+
(c.target || c.srcElement) === c.currentTarget && (o(), Reflect.apply(n, e, [
|
|
813
801
|
t,
|
|
814
802
|
r,
|
|
815
803
|
s
|
|
816
804
|
]));
|
|
817
805
|
};
|
|
818
806
|
u.forEach((c) => {
|
|
819
|
-
|
|
807
|
+
ot(t, c, f), l.push({
|
|
820
808
|
type: c,
|
|
821
809
|
listener: f
|
|
822
810
|
});
|
|
823
811
|
});
|
|
824
812
|
}
|
|
825
|
-
if (
|
|
813
|
+
if (b(a)) {
|
|
826
814
|
const u = "animationcancel", f = (c) => {
|
|
827
|
-
(c.target || c.srcElement) === c.currentTarget && (
|
|
815
|
+
(c.target || c.srcElement) === c.currentTarget && (o(), Reflect.apply(a, e, [
|
|
828
816
|
t,
|
|
829
817
|
r,
|
|
830
818
|
s
|
|
831
819
|
]));
|
|
832
820
|
};
|
|
833
|
-
|
|
821
|
+
ot(t, u, f), l.push({
|
|
834
822
|
type: u,
|
|
835
823
|
listener: f
|
|
836
824
|
});
|
|
837
825
|
}
|
|
838
826
|
}
|
|
839
827
|
function dt(e) {
|
|
840
|
-
return !
|
|
828
|
+
return !Pe || e === null ? !1 : e.opsType === C.Append || e.opsType === C.Open;
|
|
841
829
|
}
|
|
842
|
-
function Qr(e, t, r, s = {},
|
|
843
|
-
if (t || dt(
|
|
830
|
+
function Qr(e, t, r, s = {}, i, n = -1) {
|
|
831
|
+
if (t || dt(i)) {
|
|
844
832
|
const a = Wr(s, t);
|
|
845
833
|
a && Ee(r, a);
|
|
846
|
-
const
|
|
847
|
-
|
|
834
|
+
const l = Jr(s, t);
|
|
835
|
+
l && Ee(r, l), A(e, Ds(s, t), [
|
|
848
836
|
r,
|
|
849
837
|
t,
|
|
850
|
-
|
|
851
|
-
|
|
838
|
+
i,
|
|
839
|
+
n
|
|
852
840
|
]);
|
|
853
841
|
}
|
|
854
842
|
}
|
|
855
|
-
function
|
|
856
|
-
if (!dt(
|
|
857
|
-
|
|
843
|
+
function Zr(e, t, r, s = {}, i, n, a, l) {
|
|
844
|
+
if (!dt(n) && !t) {
|
|
845
|
+
b(l) && l(e, l, [r]);
|
|
858
846
|
return;
|
|
859
847
|
}
|
|
860
|
-
const
|
|
861
|
-
if (!
|
|
862
|
-
|
|
848
|
+
const o = Wr(s, t), u = Jr(s, t), f = Os(s, t), c = Hs(s, t), h = Ns(s, t), y = Us(s, t);
|
|
849
|
+
if (!o && !u && !f && !c) {
|
|
850
|
+
b(l) && l(e, l, [r]);
|
|
863
851
|
return;
|
|
864
852
|
}
|
|
865
853
|
yt(() => {
|
|
866
|
-
Xr(e, r,
|
|
867
|
-
u &&
|
|
854
|
+
Xr(e, r, n, a, i, () => {
|
|
855
|
+
u && xe(r, u), f && xe(r, f), b(h) && A(e, h, [
|
|
868
856
|
r,
|
|
869
857
|
t,
|
|
870
|
-
|
|
858
|
+
n,
|
|
871
859
|
a
|
|
872
|
-
]),
|
|
860
|
+
]), b(l) && l(e, l, [r]);
|
|
873
861
|
}, () => {
|
|
874
|
-
|
|
862
|
+
b(y) && A(e, y, [
|
|
875
863
|
r,
|
|
876
864
|
t,
|
|
877
|
-
|
|
865
|
+
n,
|
|
878
866
|
a
|
|
879
867
|
]);
|
|
880
|
-
}),
|
|
868
|
+
}), o && xe(r, o), f && Ee(r, f), b(c) && A(e, c, [
|
|
881
869
|
r,
|
|
882
870
|
t,
|
|
883
|
-
|
|
871
|
+
n,
|
|
884
872
|
a
|
|
885
873
|
]);
|
|
886
874
|
});
|
|
887
875
|
}
|
|
888
|
-
function
|
|
889
|
-
if (t || dt(
|
|
876
|
+
function Yr(e, t, r, s = {}, i, n = -1) {
|
|
877
|
+
if (t || dt(i)) {
|
|
890
878
|
const a = zr(s, t);
|
|
891
879
|
a && Ee(r, a);
|
|
892
|
-
const
|
|
893
|
-
|
|
880
|
+
const l = Gr(s, t);
|
|
881
|
+
l && Ee(r, l), A(e, Vs(s, t), [
|
|
894
882
|
r,
|
|
895
883
|
t,
|
|
896
|
-
|
|
897
|
-
|
|
884
|
+
i,
|
|
885
|
+
n
|
|
898
886
|
]);
|
|
899
887
|
}
|
|
900
888
|
}
|
|
901
|
-
function es(e, t, r, s = {},
|
|
889
|
+
function es(e, t, r, s = {}, i, n, a, l, o) {
|
|
902
890
|
if (!dt(a) && !t) {
|
|
903
|
-
|
|
891
|
+
b(o) && A(e, o, [r]), !t && b(n) && n();
|
|
904
892
|
return;
|
|
905
893
|
}
|
|
906
|
-
const u = zr(s, t), f = Gr(s, t), c =
|
|
894
|
+
const u = zr(s, t), f = Gr(s, t), c = Bs(s, t), h = Ws(s, t), y = Js(s, t), d = zs(s, t);
|
|
907
895
|
if (!u && !f && !c && !h) {
|
|
908
|
-
|
|
896
|
+
b(o) && A(e, o, [r]), !t && b(n) && n();
|
|
909
897
|
return;
|
|
910
898
|
}
|
|
911
899
|
yt(() => {
|
|
912
|
-
Xr(e, r, a,
|
|
900
|
+
Xr(e, r, a, l, i, () => {
|
|
913
901
|
try {
|
|
914
|
-
f &&
|
|
902
|
+
f && xe(r, f), c && xe(r, c), b(y) && A(e, y, [
|
|
915
903
|
r,
|
|
916
904
|
t,
|
|
917
905
|
a,
|
|
918
|
-
|
|
919
|
-
]),
|
|
906
|
+
l
|
|
907
|
+
]), b(o) && A(e, o, [r]);
|
|
920
908
|
} finally {
|
|
921
|
-
!t &&
|
|
909
|
+
!t && b(n) && n();
|
|
922
910
|
}
|
|
923
911
|
}, () => {
|
|
924
912
|
try {
|
|
925
|
-
|
|
913
|
+
b(d) && A(e, d, [
|
|
926
914
|
r,
|
|
927
915
|
t,
|
|
928
916
|
a,
|
|
929
|
-
|
|
930
|
-
]),
|
|
917
|
+
l
|
|
918
|
+
]), b(o) && A(e, o, [r]);
|
|
931
919
|
} finally {
|
|
932
|
-
!t &&
|
|
920
|
+
!t && b(n) && n();
|
|
933
921
|
}
|
|
934
|
-
}), u &&
|
|
922
|
+
}), u && xe(r, u), c && Ee(r, c), b(h) && A(e, h, [
|
|
935
923
|
r,
|
|
936
924
|
t,
|
|
937
925
|
a,
|
|
938
|
-
|
|
926
|
+
l
|
|
939
927
|
]);
|
|
940
928
|
});
|
|
941
929
|
}
|
|
942
|
-
function
|
|
943
|
-
const
|
|
930
|
+
function Nt(e, t, r = {}, s, i = -1) {
|
|
931
|
+
const n = r.mode ?? "default", a = Yt(r);
|
|
944
932
|
return {
|
|
945
|
-
mode:
|
|
933
|
+
mode: n,
|
|
946
934
|
persisted: !1,
|
|
947
|
-
beforeEnter: (
|
|
948
|
-
Qr(e, !1,
|
|
935
|
+
beforeEnter: (l) => {
|
|
936
|
+
Qr(e, !1, l, r, s, i);
|
|
949
937
|
},
|
|
950
|
-
enter: (
|
|
951
|
-
|
|
938
|
+
enter: (l) => {
|
|
939
|
+
Zr(e, !1, l, r, a.enter, s, i);
|
|
952
940
|
},
|
|
953
|
-
leave: (
|
|
954
|
-
|
|
941
|
+
leave: (l, o) => {
|
|
942
|
+
Yr(e, !1, l, r, s, i), es(e, !1, l, r, a.leave, o, s, i, () => {
|
|
955
943
|
t.transition = null, t = null;
|
|
956
944
|
});
|
|
957
945
|
},
|
|
958
|
-
clone: (
|
|
946
|
+
clone: (l) => Nt(e, t, r, s, i)
|
|
959
947
|
};
|
|
960
948
|
}
|
|
961
949
|
function ts(e) {
|
|
962
950
|
return e.el;
|
|
963
951
|
}
|
|
964
|
-
function
|
|
965
|
-
if (
|
|
966
|
-
const
|
|
967
|
-
if (
|
|
968
|
-
const
|
|
969
|
-
Qr(e, !0,
|
|
970
|
-
|
|
952
|
+
function Xs(e, t, r = {}, s, i, n, a) {
|
|
953
|
+
if (n === !0) {
|
|
954
|
+
const l = ts(t);
|
|
955
|
+
if (l == null) return;
|
|
956
|
+
const o = Yt(r);
|
|
957
|
+
Qr(e, !0, l, r, s, i), Zr(e, !0, l, r, o.show, s, i, (u) => {
|
|
958
|
+
b(a) && A(e, a, [u]);
|
|
971
959
|
});
|
|
972
|
-
} else
|
|
973
|
-
}
|
|
974
|
-
function
|
|
975
|
-
if (
|
|
976
|
-
const
|
|
977
|
-
if (
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
|
|
960
|
+
} else b(a) && A(e, a, []);
|
|
961
|
+
}
|
|
962
|
+
function Qs(e, t, r = {}, s, i, n, a) {
|
|
963
|
+
if (n === !0) {
|
|
964
|
+
const l = ts(t);
|
|
965
|
+
if (l == null) return;
|
|
966
|
+
const o = Yt(r);
|
|
967
|
+
Yr(e, !0, l, r, s, i), es(e, !0, l, r, o.hide, null, s, i, (u) => {
|
|
968
|
+
b(a) && A(e, a, [u]);
|
|
981
969
|
});
|
|
982
|
-
} else
|
|
970
|
+
} else b(a) && A(e, a, []);
|
|
983
971
|
}
|
|
984
|
-
function
|
|
972
|
+
function Zs(e, t = {}) {
|
|
985
973
|
yt(() => {
|
|
986
974
|
for (let r = 0; r < e.length; r++) Reflect.apply(e[r], t, []);
|
|
987
975
|
});
|
|
988
976
|
}
|
|
989
|
-
function rs(e, t, r = {}, s,
|
|
977
|
+
function rs(e, t, r = {}, s, i = -1) {
|
|
990
978
|
return {
|
|
991
979
|
mode: r.mode ?? "default",
|
|
992
980
|
persisted: !1,
|
|
993
|
-
beforeEnter: (
|
|
994
|
-
|
|
981
|
+
beforeEnter: (n) => {
|
|
982
|
+
Ve(Ks, {}, n);
|
|
995
983
|
},
|
|
996
|
-
enter: (
|
|
997
|
-
|
|
984
|
+
enter: (n) => {
|
|
985
|
+
Ve($s, {}, n);
|
|
998
986
|
},
|
|
999
|
-
leave: (
|
|
1000
|
-
|
|
1001
|
-
const
|
|
1002
|
-
(
|
|
987
|
+
leave: (n, a) => {
|
|
988
|
+
Ve(qs, {}, n), yt(() => {
|
|
989
|
+
const l = (o) => {
|
|
990
|
+
(o.target || o.srcElement) === o.currentTarget && (Wt(n, Ht, l), a && Reflect.apply(a, e, []), t.transition = null, t = null);
|
|
1003
991
|
};
|
|
1004
|
-
|
|
992
|
+
ot(n, Ht, l), Ve(js, {}, n);
|
|
1005
993
|
});
|
|
1006
994
|
},
|
|
1007
|
-
clone: (
|
|
995
|
+
clone: (n) => rs(e, t, r, s, i)
|
|
1008
996
|
};
|
|
1009
997
|
}
|
|
1010
|
-
var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey"),
|
|
998
|
+
var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey"), it = Symbol("nameKey"), re = class {
|
|
1011
999
|
instance = null;
|
|
1012
1000
|
model;
|
|
1013
1001
|
route;
|
|
@@ -1016,25 +1004,25 @@ var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey
|
|
|
1016
1004
|
constructor(e, t, r = 0, s = !0) {
|
|
1017
1005
|
this.route = e, this.model = t, this.index = r, this.active = s;
|
|
1018
1006
|
}
|
|
1019
|
-
},
|
|
1007
|
+
}, Ae = class {
|
|
1020
1008
|
_slots;
|
|
1021
1009
|
get slots() {
|
|
1022
|
-
return this._slots == null && (this._slots =
|
|
1010
|
+
return this._slots == null && (this._slots = Ar([])), this._slots;
|
|
1023
1011
|
}
|
|
1024
1012
|
get empty() {
|
|
1025
1013
|
return this._slots == null || this._slots.value.length == 0;
|
|
1026
1014
|
}
|
|
1027
|
-
[
|
|
1015
|
+
[it];
|
|
1028
1016
|
[z];
|
|
1029
1017
|
[J] = null;
|
|
1030
1018
|
[he] = null;
|
|
1031
1019
|
get name() {
|
|
1032
|
-
return this[
|
|
1020
|
+
return this[it];
|
|
1033
1021
|
}
|
|
1034
1022
|
constructor(e, t, r) {
|
|
1035
|
-
this[
|
|
1023
|
+
this[it] = e, this[z] = t, r && (this[J] = r);
|
|
1036
1024
|
}
|
|
1037
|
-
},
|
|
1025
|
+
}, O = class {
|
|
1038
1026
|
view;
|
|
1039
1027
|
index;
|
|
1040
1028
|
level;
|
|
@@ -1048,29 +1036,29 @@ var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey
|
|
|
1048
1036
|
}
|
|
1049
1037
|
return !1;
|
|
1050
1038
|
}
|
|
1051
|
-
},
|
|
1039
|
+
}, Rt = class {
|
|
1052
1040
|
views = [];
|
|
1053
|
-
},
|
|
1041
|
+
}, Ys = class {
|
|
1054
1042
|
layers = [];
|
|
1055
1043
|
};
|
|
1056
1044
|
function se(e, t, r) {
|
|
1057
1045
|
return typeof e == "function" ? Reflect.apply(e, {}, [t, r]) : e;
|
|
1058
1046
|
}
|
|
1059
|
-
function
|
|
1047
|
+
function St(e, t) {
|
|
1060
1048
|
if (!e) return null;
|
|
1061
1049
|
const r = e(t);
|
|
1062
1050
|
return r.length === 1 ? r[0] : r;
|
|
1063
1051
|
}
|
|
1064
|
-
function
|
|
1052
|
+
function pe(e, t) {
|
|
1065
1053
|
return typeof t == "function" ? t(e) : e;
|
|
1066
1054
|
}
|
|
1067
|
-
var
|
|
1055
|
+
var ei = class {
|
|
1068
1056
|
node;
|
|
1069
1057
|
state;
|
|
1070
1058
|
constructor(e, t) {
|
|
1071
1059
|
this.node = e, this.state = t;
|
|
1072
1060
|
}
|
|
1073
|
-
},
|
|
1061
|
+
}, Ut = Fr({
|
|
1074
1062
|
name: "RouterView",
|
|
1075
1063
|
inheritAttrs: !1,
|
|
1076
1064
|
props: {
|
|
@@ -1260,101 +1248,101 @@ var ri = class {
|
|
|
1260
1248
|
}
|
|
1261
1249
|
},
|
|
1262
1250
|
setup(e, t) {
|
|
1263
|
-
const r =
|
|
1251
|
+
const r = Vt();
|
|
1264
1252
|
if (r === null || r.proxy === null) {
|
|
1265
1253
|
console.error("instance or instance.proxy not exist");
|
|
1266
1254
|
return;
|
|
1267
1255
|
}
|
|
1268
|
-
const s = e.multi === !0,
|
|
1269
|
-
let
|
|
1256
|
+
const s = e.multi === !0, i = G(ht, null), n = G(gt, 0), a = G(ar, null), l = G(wt, -1);
|
|
1257
|
+
let o = null, u = e.modelSlot;
|
|
1270
1258
|
if (u) {
|
|
1271
|
-
if (te(
|
|
1259
|
+
if (te(gt, n + 1), te(wt, u.index), te(bt, u.index), !u.route) {
|
|
1272
1260
|
console.warn("child view render error, route not exist");
|
|
1273
1261
|
return;
|
|
1274
1262
|
}
|
|
1275
|
-
const c =
|
|
1276
|
-
|
|
1263
|
+
const c = lt(r.proxy, !0);
|
|
1264
|
+
Ls(c), hr(c, () => u?.route ?? null);
|
|
1277
1265
|
} else {
|
|
1278
|
-
if (
|
|
1266
|
+
if (i == null) {
|
|
1279
1267
|
console.error("router is not been injected");
|
|
1280
1268
|
return;
|
|
1281
1269
|
}
|
|
1282
|
-
const c = e.name, h = G(
|
|
1283
|
-
if (
|
|
1284
|
-
te(
|
|
1285
|
-
const d =
|
|
1286
|
-
d && te(
|
|
1287
|
-
const m =
|
|
1270
|
+
const c = e.name, h = G(ur, null), y = G(bt, 0);
|
|
1271
|
+
if (o = i[Br](c, n, a, l, h, y), o === null) return;
|
|
1272
|
+
te(ur, o);
|
|
1273
|
+
const d = o[z] === !0;
|
|
1274
|
+
d && te(ar, o), s || (te(wt, -1), te(gt, n + 1), te(bt, -1), d && hr(lt(r.proxy, !0), () => {
|
|
1275
|
+
const m = o.slots.value;
|
|
1288
1276
|
return m.length > 0 ? m[0].route : null;
|
|
1289
1277
|
}));
|
|
1290
1278
|
}
|
|
1291
1279
|
const f = { value: /* @__PURE__ */ new Map() };
|
|
1292
|
-
return
|
|
1280
|
+
return ct(() => {
|
|
1293
1281
|
if (f.value && f.value.clear(), u) {
|
|
1294
1282
|
const c = u;
|
|
1295
1283
|
c.route = null, c.model = null, c.instance = null, u = void 0;
|
|
1296
1284
|
}
|
|
1297
1285
|
}), () => {
|
|
1298
1286
|
if (s) {
|
|
1299
|
-
const c = /* @__PURE__ */ new Map(), h = [], y =
|
|
1287
|
+
const c = /* @__PURE__ */ new Map(), h = [], y = o?.slots.value, d = [];
|
|
1300
1288
|
for (let g = 0; g < y.length; g++) {
|
|
1301
|
-
const v = y[g], j = `${e.name}_${v.index}`,
|
|
1289
|
+
const v = y[g], j = `${e.name}_${v.index}`, M = se(e.transition, v.route, g) ?? !0, _e = { modelSlot: v };
|
|
1302
1290
|
let L;
|
|
1303
|
-
t.slots.default ? L = ce(
|
|
1291
|
+
t.slots.default ? L = ce(Ut, _e, { default: t.slots.default }) : L = ce(Ut, _e);
|
|
1304
1292
|
const K = {}, ne = se(e.viewClass, v.route, g);
|
|
1305
1293
|
typeof ne == "string" && ne.length > 0 && (K[ne] = !0);
|
|
1306
|
-
const ee = se(e.viewActiveClass, v.route, g),
|
|
1307
|
-
if (typeof ee == "string" && ee.length > 0 && (K[ee] = v.active), typeof
|
|
1294
|
+
const ee = se(e.viewActiveClass, v.route, g), T = se(e.viewInactiveClass, v.route, g), Q = f.value.get(j);
|
|
1295
|
+
if (typeof ee == "string" && ee.length > 0 && (K[ee] = v.active), typeof T == "string" && T.length > 0 && (K[T] = !v.active), Q && v.active !== Q.state) {
|
|
1308
1296
|
const Ne = Q.node;
|
|
1309
1297
|
v.active ? d.unshift(() => {
|
|
1310
1298
|
const mt = () => {
|
|
1311
|
-
let
|
|
1312
|
-
|
|
1299
|
+
let Ce = fr(Ne);
|
|
1300
|
+
Ce != null && cr(Ce, ut.ACTIVATED);
|
|
1313
1301
|
};
|
|
1314
|
-
|
|
1302
|
+
Xs(r, Ne, e, v.route, g, M, mt);
|
|
1315
1303
|
}) : d.push(() => {
|
|
1316
1304
|
const mt = () => {
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1305
|
+
const Ce = fr(Ne);
|
|
1306
|
+
Ce != null && cr(Ce, ut.DEACTIVATED);
|
|
1319
1307
|
};
|
|
1320
|
-
|
|
1308
|
+
Qs(r, Ne, e, v.route, g, M, mt);
|
|
1321
1309
|
});
|
|
1322
1310
|
}
|
|
1323
|
-
const
|
|
1311
|
+
const N = {
|
|
1324
1312
|
class: K,
|
|
1325
1313
|
key: j
|
|
1326
1314
|
}, U = se(e.viewTagProps, v.route, g);
|
|
1327
|
-
U !== null && typeof U == "object" &&
|
|
1328
|
-
const
|
|
1329
|
-
c.set(j, new
|
|
1315
|
+
U !== null && typeof U == "object" && q(!0, N, pe(U, i?.propsFilter)), v.route?.viewTagAttrs && typeof v.route?.viewTagAttrs == "object" && q(!0, N, pe(v.route.viewTagAttrs, i?.propsFilter));
|
|
1316
|
+
const ve = ce(se(e.viewTag, v.route, g), N, { default: () => [L] });
|
|
1317
|
+
c.set(j, new ei(ve, v.active)), f.value.delete(j), M === !0 ? ve.transition = Nt(r, ve, e, v.route, g) : M === "custom" && (ve.transition = rs(r, ve, e, v.route, g)), h.push(ve);
|
|
1330
1318
|
}
|
|
1331
|
-
f.value = c,
|
|
1332
|
-
const m = se(e.tag, null, -1),
|
|
1333
|
-
return Object.assign(
|
|
1319
|
+
f.value = c, Zs(d, r);
|
|
1320
|
+
const m = se(e.tag, null, -1), w = {};
|
|
1321
|
+
return Object.assign(w, t.attrs), ce(m, w, { default: () => h });
|
|
1334
1322
|
} else if (u != null) {
|
|
1335
1323
|
const c = u.model, h = {};
|
|
1336
|
-
c.props && (typeof c.props == "object" ?
|
|
1324
|
+
c.props && (typeof c.props == "object" ? q(!1, h, pe(c.props, i?.propsFilter)) : c.props === !0 && typeof u.route?.params == "object" && q(!1, h, pe(u.route.params, i?.propsFilter)));
|
|
1337
1325
|
const y = ce(c.component, h);
|
|
1338
|
-
return
|
|
1326
|
+
return St(t.slots.default, {
|
|
1339
1327
|
Component: y,
|
|
1340
1328
|
route: u.route
|
|
1341
1329
|
}) ?? y;
|
|
1342
1330
|
} else {
|
|
1343
|
-
const c =
|
|
1331
|
+
const c = o.slots.value;
|
|
1344
1332
|
if (c.length > 0) {
|
|
1345
1333
|
const h = c[0], y = h.route ?? (r.proxy && Zt(r.proxy)) ?? null, d = h.model, m = {};
|
|
1346
|
-
d.props && (typeof d.props == "object" ?
|
|
1347
|
-
const
|
|
1348
|
-
return (se(e.transition, y, -1) ?? !0) && (
|
|
1349
|
-
Component:
|
|
1334
|
+
d.props && (typeof d.props == "object" ? q(!1, m, pe(d.props, i?.propsFilter)) : d.props === !0 && typeof y?.params == "object" && q(!1, m, pe(y.params, i?.propsFilter)));
|
|
1335
|
+
const w = ce(d.component, m);
|
|
1336
|
+
return (se(e.transition, y, -1) ?? !0) && (w.transition = Nt(r, w, e, y, -1)), St(t.slots.default, {
|
|
1337
|
+
Component: w,
|
|
1350
1338
|
route: y
|
|
1351
|
-
}) ??
|
|
1352
|
-
} else return
|
|
1339
|
+
}) ?? w;
|
|
1340
|
+
} else return St(t.slots.fallback, {});
|
|
1353
1341
|
}
|
|
1354
1342
|
};
|
|
1355
1343
|
}
|
|
1356
1344
|
});
|
|
1357
|
-
function
|
|
1345
|
+
function ti(e) {
|
|
1358
1346
|
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button != null && e.button !== 0)) {
|
|
1359
1347
|
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
1360
1348
|
const t = e.currentTarget.getAttribute("target");
|
|
@@ -1363,16 +1351,16 @@ function si(e) {
|
|
|
1363
1351
|
return e.preventDefault && e.preventDefault(), !0;
|
|
1364
1352
|
}
|
|
1365
1353
|
}
|
|
1366
|
-
function
|
|
1354
|
+
function ri(e, t) {
|
|
1367
1355
|
return e == null || t == null ? !1 : !!(e === t || e.path && e.path === t.path || e.name && e.name === t.name);
|
|
1368
1356
|
}
|
|
1369
|
-
function
|
|
1357
|
+
function si(e, t) {
|
|
1370
1358
|
return e == null || t == null ? !1 : !!(e.path && t.path && t.path.startsWith(e.path) || e.name && e.name == t.name);
|
|
1371
1359
|
}
|
|
1372
|
-
function
|
|
1360
|
+
function ge(e, t) {
|
|
1373
1361
|
return typeof e == "function" ? Reflect.apply(e, {}, [t]) : e;
|
|
1374
1362
|
}
|
|
1375
|
-
var
|
|
1363
|
+
var ii = Fr({
|
|
1376
1364
|
name: "RouterLink",
|
|
1377
1365
|
inheritAttrs: !1,
|
|
1378
1366
|
props: {
|
|
@@ -1421,165 +1409,165 @@ var oi = Fr({
|
|
|
1421
1409
|
setup(e, t) {
|
|
1422
1410
|
const r = G(ht, null);
|
|
1423
1411
|
return () => {
|
|
1424
|
-
let s =
|
|
1425
|
-
if (
|
|
1412
|
+
let s = ge(e.to, null), i = ge(e.tag, s);
|
|
1413
|
+
if (i == null) {
|
|
1426
1414
|
console.warn("can not resolve link tag");
|
|
1427
1415
|
return;
|
|
1428
1416
|
}
|
|
1429
|
-
let
|
|
1430
|
-
r !== null && (
|
|
1431
|
-
let
|
|
1432
|
-
if (typeof
|
|
1433
|
-
let c =
|
|
1434
|
-
typeof c == "string" && c.length > 0 && (
|
|
1417
|
+
let n = null, a = null;
|
|
1418
|
+
r !== null && (n = r[I](s), e.root && (n.root = e.root), a = r.currentRoute.value);
|
|
1419
|
+
let l = {}, o = ge(e.activeClass, n);
|
|
1420
|
+
if (typeof o == "string" && o.length > 0 && (l[o] = si(n, a)), ge(e.exact, n) === !0) {
|
|
1421
|
+
let c = ge(e.exactActiveClass, n);
|
|
1422
|
+
typeof c == "string" && c.length > 0 && (l[c] = ri(n, a));
|
|
1435
1423
|
}
|
|
1436
|
-
let u = { class:
|
|
1437
|
-
(
|
|
1438
|
-
let f =
|
|
1424
|
+
let u = { class: l };
|
|
1425
|
+
(i === "a" || i === "A") && (u.href = n?.path ?? n?.name ?? "#"), q(!0, u, t.attrs);
|
|
1426
|
+
let f = ge(e.event, n);
|
|
1439
1427
|
if (typeof f == "string") {
|
|
1440
1428
|
const c = (h) => {
|
|
1441
1429
|
if (r == null) {
|
|
1442
1430
|
console.warn("router is not been injected");
|
|
1443
1431
|
return;
|
|
1444
1432
|
}
|
|
1445
|
-
if (
|
|
1433
|
+
if (n == null) {
|
|
1446
1434
|
console.warn("route is not been resolved");
|
|
1447
1435
|
return;
|
|
1448
1436
|
}
|
|
1449
|
-
|
|
1437
|
+
ti(h) && r.to(n);
|
|
1450
1438
|
};
|
|
1451
1439
|
u[f] = c;
|
|
1452
1440
|
}
|
|
1453
|
-
return ce(
|
|
1441
|
+
return ce(i, u, t.slots);
|
|
1454
1442
|
};
|
|
1455
1443
|
}
|
|
1456
1444
|
}), P = /* @__PURE__ */ (function(e) {
|
|
1457
1445
|
return e.Busy = "Busy", e.Free = "Free", e.Reject = "Reject", e.Exception = "Exception", e.Finished = "Finished", e;
|
|
1458
|
-
})(P || {}), B = Symbol("chainKey"), k = Symbol("cursorKey"),
|
|
1446
|
+
})(P || {}), B = Symbol("chainKey"), k = Symbol("cursorKey"), xt = Symbol("$persistentModeKey"), _ = Symbol("statusKey"), Z = Symbol("argsKey"), Je = Symbol("exArgsKey"), we = Symbol("successFnsKey"), Ke = Symbol("errorFnsKey"), oe = Symbol("sessionKey"), Y = Symbol("_go"), ft = class {
|
|
1459
1447
|
[B] = [];
|
|
1460
1448
|
[k] = 0;
|
|
1461
|
-
[
|
|
1462
|
-
[
|
|
1463
|
-
[
|
|
1464
|
-
[
|
|
1449
|
+
[xt] = !1;
|
|
1450
|
+
[_] = P.Free;
|
|
1451
|
+
[Z] = [];
|
|
1452
|
+
[Je] = [];
|
|
1465
1453
|
[we] = [];
|
|
1466
|
-
[
|
|
1454
|
+
[Ke] = [];
|
|
1467
1455
|
[oe];
|
|
1468
1456
|
get session() {
|
|
1469
1457
|
return this[oe];
|
|
1470
1458
|
}
|
|
1471
1459
|
constructor(e, t = !1) {
|
|
1472
|
-
this[oe] = e, this[
|
|
1473
|
-
}
|
|
1474
|
-
[
|
|
1475
|
-
let r = this[
|
|
1476
|
-
if (this[
|
|
1477
|
-
let
|
|
1478
|
-
for (; this[
|
|
1479
|
-
let a = this[
|
|
1480
|
-
typeof a == "function" &&
|
|
1481
|
-
Reflect.apply(a, {},
|
|
1460
|
+
this[oe] = e, this[xt] = t;
|
|
1461
|
+
}
|
|
1462
|
+
[Y](e, ...t) {
|
|
1463
|
+
let r = this[_];
|
|
1464
|
+
if (this[_] = P.Busy, this[k] += e, this[k] < 0 && (this[k] = 0), this[Z] = t, r === P.Exception || r === P.Reject) {
|
|
1465
|
+
let n = [{ session: this[oe] }, ...this[Je]];
|
|
1466
|
+
for (; this[Ke].length > 0; ) try {
|
|
1467
|
+
let a = this[Ke].shift();
|
|
1468
|
+
typeof a == "function" && Be(() => {
|
|
1469
|
+
Reflect.apply(a, {}, n);
|
|
1482
1470
|
});
|
|
1483
1471
|
} catch (a) {
|
|
1484
1472
|
console.error(a.message, a);
|
|
1485
1473
|
}
|
|
1486
|
-
return this[
|
|
1474
|
+
return this[_] = r, this[B] = [], this[k] = 0, this;
|
|
1487
1475
|
} else if (r === P.Finished || this[k] >= this[B].length) {
|
|
1488
|
-
let
|
|
1476
|
+
let n = [{ session: this[oe] }, ...this[Z]];
|
|
1489
1477
|
for (; this[we].length > 0; ) {
|
|
1490
1478
|
let a = this[we].shift();
|
|
1491
|
-
typeof a == "function" &&
|
|
1492
|
-
Reflect.apply(a, {},
|
|
1479
|
+
typeof a == "function" && Be(() => {
|
|
1480
|
+
Reflect.apply(a, {}, n);
|
|
1493
1481
|
});
|
|
1494
1482
|
}
|
|
1495
|
-
return this[
|
|
1483
|
+
return this[_] = P.Free, this;
|
|
1496
1484
|
}
|
|
1497
1485
|
if (this[k] >= this[B].length)
|
|
1498
|
-
return this[
|
|
1486
|
+
return this[_] = P.Free, this;
|
|
1499
1487
|
let s = this[B][this[k]];
|
|
1500
|
-
this[
|
|
1501
|
-
let
|
|
1488
|
+
this[xt] || (this[B].splice(0, this[k] + 1), this[k] = -1);
|
|
1489
|
+
let i = this[k] + 1;
|
|
1502
1490
|
try {
|
|
1503
|
-
let
|
|
1504
|
-
go: (
|
|
1505
|
-
|
|
1491
|
+
let n = !1, a = {
|
|
1492
|
+
go: (l, ...o) => {
|
|
1493
|
+
n || (n = !0, Reflect.apply(this[Y], this, [l, ...o]));
|
|
1506
1494
|
},
|
|
1507
|
-
resolve: (...
|
|
1508
|
-
|
|
1495
|
+
resolve: (...l) => {
|
|
1496
|
+
n || (n = !0, Reflect.apply(this[Y], this, [1, ...l]));
|
|
1509
1497
|
},
|
|
1510
|
-
reject: (...
|
|
1511
|
-
|
|
1498
|
+
reject: (...l) => {
|
|
1499
|
+
n || (n = !0, Reflect.apply(this.reject, this, [...l]));
|
|
1512
1500
|
},
|
|
1513
|
-
insert: (
|
|
1514
|
-
|
|
1501
|
+
insert: (l) => {
|
|
1502
|
+
n || (this[B].splice(i, 0, l), i++);
|
|
1515
1503
|
},
|
|
1516
1504
|
session: this[oe]
|
|
1517
1505
|
};
|
|
1518
|
-
|
|
1519
|
-
Reflect.apply(s, {}, [a, ...this[
|
|
1506
|
+
Be(() => {
|
|
1507
|
+
Reflect.apply(s, {}, [a, ...this[Z]]);
|
|
1520
1508
|
});
|
|
1521
|
-
} catch (
|
|
1522
|
-
this.throw(
|
|
1509
|
+
} catch (n) {
|
|
1510
|
+
this.throw(n);
|
|
1523
1511
|
}
|
|
1524
1512
|
return this;
|
|
1525
1513
|
}
|
|
1526
1514
|
go(e, ...t) {
|
|
1527
|
-
return Reflect.apply(this[
|
|
1515
|
+
return Reflect.apply(this[Y], this, [e, ...t]);
|
|
1528
1516
|
}
|
|
1529
1517
|
finish(...e) {
|
|
1530
|
-
return this[
|
|
1518
|
+
return this[_] = P.Finished, this[Z] = e, Reflect.apply(this[Y], this, [0]);
|
|
1531
1519
|
}
|
|
1532
1520
|
reject(...e) {
|
|
1533
|
-
return this[
|
|
1521
|
+
return this[_] = P.Reject, this[Je] = e, Reflect.apply(this[Y], this, [0]);
|
|
1534
1522
|
}
|
|
1535
1523
|
throw(...e) {
|
|
1536
|
-
return this[
|
|
1524
|
+
return this[_] = P.Exception, this[Je] = e, Reflect.apply(this[Y], this, [0]);
|
|
1537
1525
|
}
|
|
1538
1526
|
reset(...e) {
|
|
1539
|
-
this[
|
|
1540
|
-
let t = [{ session: this[oe] }, ...this[
|
|
1527
|
+
this[_] = P.Busy, this[Z] = e, this[B] = [], this[k] = 0;
|
|
1528
|
+
let t = [{ session: this[oe] }, ...this[Z]];
|
|
1541
1529
|
for (; this[we].length > 0; ) {
|
|
1542
1530
|
let r = this[we].shift();
|
|
1543
|
-
|
|
1531
|
+
Be(() => {
|
|
1544
1532
|
Reflect.apply(r, this, t);
|
|
1545
1533
|
});
|
|
1546
1534
|
}
|
|
1547
|
-
return this[
|
|
1535
|
+
return this[_] = P.Free, this;
|
|
1548
1536
|
}
|
|
1549
1537
|
post(e) {
|
|
1550
|
-
return this[
|
|
1538
|
+
return this[_] === P.Reject || this[_] === P.Exception ? this : (Array.isArray(e) ? this[B] = [...this[B], ...e] : this[B].push(e), this[_] === P.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this));
|
|
1551
1539
|
}
|
|
1552
1540
|
wait(e, t) {
|
|
1553
|
-
return e && typeof e == "function" && this[we].push(e), t && typeof t == "function" && this[
|
|
1541
|
+
return e && typeof e == "function" && this[we].push(e), t && typeof t == "function" && this[Ke].push(t), this[_] === P.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this);
|
|
1554
1542
|
}
|
|
1555
1543
|
exception(e) {
|
|
1556
|
-
return e && typeof e == "function" && this[
|
|
1544
|
+
return e && typeof e == "function" && this[Ke].push(e), this[_] === P.Busy ? this : Reflect.apply(this[Y], this, [0, ...this[Z]]);
|
|
1557
1545
|
}
|
|
1558
1546
|
isFinish() {
|
|
1559
|
-
return this[
|
|
1547
|
+
return this[_] == P.Reject || this[_] == P.Free && this[k] >= this[B].length;
|
|
1560
1548
|
}
|
|
1561
|
-
},
|
|
1549
|
+
}, nt = /* @__PURE__ */ (function(e) {
|
|
1562
1550
|
return e[e.limitless = 0] = "limitless", e[e.once = 1] = "once", e;
|
|
1563
|
-
})(
|
|
1551
|
+
})(nt || {}), be = Symbol("registerKey"), ni = class {
|
|
1564
1552
|
policy;
|
|
1565
1553
|
callback;
|
|
1566
1554
|
constructor(e, t) {
|
|
1567
1555
|
this.callback = e, this.policy = t;
|
|
1568
1556
|
}
|
|
1569
|
-
},
|
|
1570
|
-
[
|
|
1557
|
+
}, yr = class {
|
|
1558
|
+
[be] = /* @__PURE__ */ new Map();
|
|
1571
1559
|
constructor() {
|
|
1572
1560
|
}
|
|
1573
1561
|
on(e, t, r = !1) {
|
|
1574
|
-
let s = this[
|
|
1575
|
-
s || (s = new Array(), this[
|
|
1576
|
-
let
|
|
1577
|
-
return s.push(
|
|
1562
|
+
let s = this[be].get(e);
|
|
1563
|
+
s || (s = new Array(), this[be].set(e, s));
|
|
1564
|
+
let i = new ni(t, r === !0 ? nt.once : nt.limitless);
|
|
1565
|
+
return s.push(i), this;
|
|
1578
1566
|
}
|
|
1579
1567
|
off(e, t) {
|
|
1580
1568
|
if (!t)
|
|
1581
|
-
return this[
|
|
1582
|
-
let r = this[
|
|
1569
|
+
return this[be].delete(e), this;
|
|
1570
|
+
let r = this[be].get(e);
|
|
1583
1571
|
if (r) {
|
|
1584
1572
|
for (let s = 0; s < r.length; s++) if (r[s].callback === t) {
|
|
1585
1573
|
r.splice(s, 1);
|
|
@@ -1603,23 +1591,23 @@ var oi = Fr({
|
|
|
1603
1591
|
let r = e[t - 1];
|
|
1604
1592
|
if (typeof r != "function")
|
|
1605
1593
|
return console.error("callback can not benn empty"), this;
|
|
1606
|
-
let s = t - 1,
|
|
1607
|
-
for (let a = 0; a <
|
|
1608
|
-
|
|
1594
|
+
let s = t - 1, i = new Array(s), n = [].splice.call(e, 0, s);
|
|
1595
|
+
for (let a = 0; a < n.length; a++) this.once(n[a], (l) => {
|
|
1596
|
+
i[a] = l, s -= 1, s == 0 && Reflect.apply(r, {}, i);
|
|
1609
1597
|
});
|
|
1610
1598
|
return this;
|
|
1611
1599
|
}
|
|
1612
1600
|
emit(e, ...t) {
|
|
1613
|
-
let r = this[
|
|
1601
|
+
let r = this[be].get(e);
|
|
1614
1602
|
if (!r) return this;
|
|
1615
1603
|
for (let s = 0; s < r.length; ) {
|
|
1616
|
-
let
|
|
1617
|
-
if (
|
|
1618
|
-
|
|
1619
|
-
Reflect.apply(
|
|
1604
|
+
let i = r[s];
|
|
1605
|
+
if (i.policy == nt.once ? r.splice(s, 1) : s++, typeof i.callback == "function") try {
|
|
1606
|
+
Be(() => {
|
|
1607
|
+
Reflect.apply(i.callback, {}, t);
|
|
1620
1608
|
});
|
|
1621
|
-
} catch (
|
|
1622
|
-
console.error(
|
|
1609
|
+
} catch (n) {
|
|
1610
|
+
console.error(n.message, n);
|
|
1623
1611
|
}
|
|
1624
1612
|
}
|
|
1625
1613
|
return this;
|
|
@@ -1631,105 +1619,105 @@ var oi = Fr({
|
|
|
1631
1619
|
return e[e.Static = 0] = "Static", e[e.Param = 1] = "Param", e[e.Group = 2] = "Group", e;
|
|
1632
1620
|
})({}), E = /* @__PURE__ */ (function(e) {
|
|
1633
1621
|
return e[e.Static = 0] = "Static", e[e.Param = 1] = "Param", e[e.ParamRegExp = 2] = "ParamRegExp", e[e.ParamRegExpEnd = 3] = "ParamRegExpEnd", e[e.EscapeNext = 4] = "EscapeNext", e;
|
|
1634
|
-
})(E || {}),
|
|
1622
|
+
})(E || {}), oi = {
|
|
1635
1623
|
type: ye.Static,
|
|
1636
1624
|
value: ""
|
|
1637
|
-
},
|
|
1638
|
-
function
|
|
1625
|
+
}, li = /[a-zA-Z0-9_]/;
|
|
1626
|
+
function ai(e) {
|
|
1639
1627
|
if (!e) return [[]];
|
|
1640
|
-
if (e === "/") return [[
|
|
1628
|
+
if (e === "/") return [[oi]];
|
|
1641
1629
|
if (!e.startsWith("/")) throw new Error(`Invalid path "${e}"`);
|
|
1642
1630
|
function t(y) {
|
|
1643
1631
|
throw new Error(`ERR (${r})/"${u}": ${y}`);
|
|
1644
1632
|
}
|
|
1645
1633
|
let r = E.Static, s = r;
|
|
1646
|
-
const
|
|
1647
|
-
let
|
|
1634
|
+
const i = [];
|
|
1635
|
+
let n;
|
|
1648
1636
|
function a() {
|
|
1649
|
-
|
|
1637
|
+
n && i.push(n), n = [];
|
|
1650
1638
|
}
|
|
1651
|
-
let
|
|
1639
|
+
let l = 0, o, u = "", f = "";
|
|
1652
1640
|
function c() {
|
|
1653
|
-
u && (r === E.Static ?
|
|
1641
|
+
u && (r === E.Static ? n.push({
|
|
1654
1642
|
type: ye.Static,
|
|
1655
1643
|
value: u
|
|
1656
|
-
}) : r === E.Param || r === E.ParamRegExp || r === E.ParamRegExpEnd ? (
|
|
1644
|
+
}) : r === E.Param || r === E.ParamRegExp || r === E.ParamRegExpEnd ? (n.length > 1 && (o === "*" || o === "+") && t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`), n.push({
|
|
1657
1645
|
type: ye.Param,
|
|
1658
1646
|
value: u,
|
|
1659
1647
|
regexp: f,
|
|
1660
|
-
repeatable:
|
|
1661
|
-
optional:
|
|
1648
|
+
repeatable: o === "*" || o === "+",
|
|
1649
|
+
optional: o === "*" || o === "?"
|
|
1662
1650
|
})) : t("Invalid state to consume buffer"), u = "");
|
|
1663
1651
|
}
|
|
1664
1652
|
function h() {
|
|
1665
|
-
u +=
|
|
1653
|
+
u += o;
|
|
1666
1654
|
}
|
|
1667
|
-
for (;
|
|
1668
|
-
if (
|
|
1655
|
+
for (; l < e.length; ) {
|
|
1656
|
+
if (o = e[l++], o === "\\" && r !== E.ParamRegExp) {
|
|
1669
1657
|
s = r, r = E.EscapeNext;
|
|
1670
1658
|
continue;
|
|
1671
1659
|
}
|
|
1672
1660
|
switch (r) {
|
|
1673
1661
|
case E.Static:
|
|
1674
|
-
|
|
1662
|
+
o === "/" ? (u && c(), a()) : o === ":" ? (c(), r = E.Param) : h();
|
|
1675
1663
|
break;
|
|
1676
1664
|
case E.EscapeNext:
|
|
1677
1665
|
h(), r = s;
|
|
1678
1666
|
break;
|
|
1679
1667
|
case E.Param:
|
|
1680
|
-
|
|
1668
|
+
o === "(" ? r = E.ParamRegExp : li.test(o) ? h() : (c(), r = E.Static, o !== "*" && o !== "?" && o !== "+" && l--);
|
|
1681
1669
|
break;
|
|
1682
1670
|
case E.ParamRegExp:
|
|
1683
|
-
|
|
1671
|
+
o === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + o : r = E.ParamRegExpEnd : f += o;
|
|
1684
1672
|
break;
|
|
1685
1673
|
case E.ParamRegExpEnd:
|
|
1686
|
-
c(), r = E.Static,
|
|
1674
|
+
c(), r = E.Static, o !== "*" && o !== "?" && o !== "+" && l--, f = "";
|
|
1687
1675
|
break;
|
|
1688
1676
|
default:
|
|
1689
1677
|
t("Unknown state");
|
|
1690
1678
|
break;
|
|
1691
1679
|
}
|
|
1692
1680
|
}
|
|
1693
|
-
return r === E.ParamRegExp && t(`Unfinished custom RegExp for param "${u}"`), c(), a(),
|
|
1681
|
+
return r === E.ParamRegExp && t(`Unfinished custom RegExp for param "${u}"`), c(), a(), i;
|
|
1694
1682
|
}
|
|
1695
|
-
var
|
|
1683
|
+
var dr = "[^/]+?", ui = {
|
|
1696
1684
|
sensitive: !1,
|
|
1697
1685
|
strict: !1,
|
|
1698
1686
|
start: !0,
|
|
1699
1687
|
end: !0
|
|
1700
1688
|
}, W = /* @__PURE__ */ (function(e) {
|
|
1701
1689
|
return e[e._multiplier = 10] = "_multiplier", e[e.Root = 90] = "Root", e[e.Segment = 40] = "Segment", e[e.SubSegment = 30] = "SubSegment", e[e.Static = 40] = "Static", e[e.Dynamic = 20] = "Dynamic", e[e.BonusCustomRegExp = 10] = "BonusCustomRegExp", e[e.BonusWildcard = -50] = "BonusWildcard", e[e.BonusRepeatable = -20] = "BonusRepeatable", e[e.BonusOptional = -8] = "BonusOptional", e[e.BonusStrict = 0.7000000000000001] = "BonusStrict", e[e.BonusCaseSensitive = 0.25] = "BonusCaseSensitive", e;
|
|
1702
|
-
})(W || {}),
|
|
1703
|
-
function
|
|
1704
|
-
const r =
|
|
1705
|
-
let
|
|
1706
|
-
const
|
|
1690
|
+
})(W || {}), fi = /[.+*?^${}()[\]/\\]/g;
|
|
1691
|
+
function ci(e, t) {
|
|
1692
|
+
const r = q(!0, {}, ui, t), s = [];
|
|
1693
|
+
let i = r.start ? "^" : "";
|
|
1694
|
+
const n = [];
|
|
1707
1695
|
for (const u of e) {
|
|
1708
1696
|
const f = u.length ? [] : [W.Root];
|
|
1709
|
-
r.strict && !u.length && (
|
|
1697
|
+
r.strict && !u.length && (i += "/");
|
|
1710
1698
|
for (let c = 0; c < u.length; c++) {
|
|
1711
1699
|
const h = u[c];
|
|
1712
1700
|
let y = W.Segment + (r.sensitive ? W.BonusCaseSensitive : 0);
|
|
1713
1701
|
if (h.type === ye.Static)
|
|
1714
|
-
c || (
|
|
1702
|
+
c || (i += "/"), i += h.value.replace(fi, "\\$&"), y += W.Static;
|
|
1715
1703
|
else if (h.type === ye.Param) {
|
|
1716
|
-
const { value: d, repeatable: m, optional:
|
|
1717
|
-
|
|
1704
|
+
const { value: d, repeatable: m, optional: w, regexp: g } = h;
|
|
1705
|
+
n.push({
|
|
1718
1706
|
name: d,
|
|
1719
1707
|
repeatable: m,
|
|
1720
|
-
optional:
|
|
1708
|
+
optional: w
|
|
1721
1709
|
});
|
|
1722
|
-
const v = g ||
|
|
1723
|
-
if (v !==
|
|
1710
|
+
const v = g || dr;
|
|
1711
|
+
if (v !== dr) {
|
|
1724
1712
|
y += W.BonusCustomRegExp;
|
|
1725
1713
|
try {
|
|
1726
1714
|
new RegExp(`(${v})`);
|
|
1727
|
-
} catch (
|
|
1728
|
-
throw new Error(`Invalid custom RegExp for param "${d}" (${v}): ` +
|
|
1715
|
+
} catch (M) {
|
|
1716
|
+
throw new Error(`Invalid custom RegExp for param "${d}" (${v}): ` + M.message);
|
|
1729
1717
|
}
|
|
1730
1718
|
}
|
|
1731
1719
|
let j = m ? `((?:${v})(?:/(?:${v}))*)` : `(${v})`;
|
|
1732
|
-
c || (j =
|
|
1720
|
+
c || (j = w && u.length < 2 ? `(?:/${j})` : "/" + j), w && (j += "?"), i += j, y += W.Dynamic, w && (y += W.BonusOptional), m && (y += W.BonusRepeatable), v === ".*" && (y += W.BonusWildcard);
|
|
1733
1721
|
}
|
|
1734
1722
|
f.push(y);
|
|
1735
1723
|
}
|
|
@@ -1739,27 +1727,27 @@ function yi(e, t) {
|
|
|
1739
1727
|
const u = s.length - 1;
|
|
1740
1728
|
s[u][s[u].length - 1] += W.BonusStrict;
|
|
1741
1729
|
}
|
|
1742
|
-
r.strict || (
|
|
1743
|
-
const a = new RegExp(
|
|
1744
|
-
function
|
|
1730
|
+
r.strict || (i += "/?"), r.end ? i += "$" : r.strict && !i.endsWith("/") && (i += "(?:/|$)");
|
|
1731
|
+
const a = new RegExp(i, r.sensitive ? "" : "i");
|
|
1732
|
+
function l(u) {
|
|
1745
1733
|
const f = u.match(a), c = {};
|
|
1746
1734
|
if (!f) return null;
|
|
1747
1735
|
for (let h = 1; h < f.length; h++) {
|
|
1748
|
-
const y = f[h] || "", d =
|
|
1736
|
+
const y = f[h] || "", d = n[h - 1];
|
|
1749
1737
|
c[d.name] = y && d.repeatable ? y.split("/") : y;
|
|
1750
1738
|
}
|
|
1751
1739
|
return c;
|
|
1752
1740
|
}
|
|
1753
|
-
function
|
|
1741
|
+
function o(u) {
|
|
1754
1742
|
let f = "", c = !1;
|
|
1755
1743
|
for (const h of e) {
|
|
1756
1744
|
(!c || !f.endsWith("/")) && (f += "/"), c = !1;
|
|
1757
1745
|
for (const y of h) if (y.type === ye.Static) f += y.value;
|
|
1758
1746
|
else if (y.type === ye.Param) {
|
|
1759
|
-
const { value: d, repeatable: m, optional:
|
|
1760
|
-
if (
|
|
1761
|
-
const v =
|
|
1762
|
-
if (!v) if (
|
|
1747
|
+
const { value: d, repeatable: m, optional: w } = y, g = d in u ? u[d] : "";
|
|
1748
|
+
if (er(g) && !m) throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);
|
|
1749
|
+
const v = er(g) ? g.join("/") : g;
|
|
1750
|
+
if (!v) if (w)
|
|
1763
1751
|
h.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : c = !0);
|
|
1764
1752
|
else throw new Error(`Missing required param "${d}"`);
|
|
1765
1753
|
f += v;
|
|
@@ -1770,29 +1758,29 @@ function yi(e, t) {
|
|
|
1770
1758
|
return {
|
|
1771
1759
|
re: a,
|
|
1772
1760
|
score: s,
|
|
1773
|
-
keys:
|
|
1774
|
-
parse:
|
|
1775
|
-
stringify:
|
|
1761
|
+
keys: n,
|
|
1762
|
+
parse: l,
|
|
1763
|
+
stringify: o
|
|
1776
1764
|
};
|
|
1777
1765
|
}
|
|
1778
|
-
function
|
|
1779
|
-
const r =
|
|
1766
|
+
function hi(e, t) {
|
|
1767
|
+
const r = ci(ai(e), t);
|
|
1780
1768
|
return function(s) {
|
|
1781
|
-
const
|
|
1782
|
-
return
|
|
1769
|
+
const i = r.parse(s);
|
|
1770
|
+
return i ? {
|
|
1783
1771
|
path: s,
|
|
1784
|
-
params:
|
|
1772
|
+
params: i
|
|
1785
1773
|
} : null;
|
|
1786
1774
|
};
|
|
1787
1775
|
}
|
|
1788
|
-
var
|
|
1776
|
+
var Pt = /* @__PURE__ */ (function(e) {
|
|
1789
1777
|
return e[e.Part = 0] = "Part", e[e.All = 1] = "All", e;
|
|
1790
|
-
})({}),
|
|
1778
|
+
})({}), yi = class {
|
|
1791
1779
|
time;
|
|
1792
1780
|
route;
|
|
1793
|
-
},
|
|
1781
|
+
}, di = class {
|
|
1794
1782
|
forbidTime = 300;
|
|
1795
|
-
submitRecorder = new
|
|
1783
|
+
submitRecorder = new yi();
|
|
1796
1784
|
isSameRoute(e, t) {
|
|
1797
1785
|
return e == null || t == null ? !1 : e.name === t.name && e.path === t.path && e.root === t.root;
|
|
1798
1786
|
}
|
|
@@ -1807,13 +1795,13 @@ var Et = /* @__PURE__ */ (function(e) {
|
|
|
1807
1795
|
release(e) {
|
|
1808
1796
|
this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
|
|
1809
1797
|
}
|
|
1810
|
-
},
|
|
1798
|
+
}, Se = Symbol("_notifyChange"), mr = class {
|
|
1811
1799
|
currentRoute;
|
|
1812
1800
|
routes;
|
|
1813
1801
|
constructor(e, t) {
|
|
1814
1802
|
this.currentRoute = e, this.routes = t;
|
|
1815
1803
|
}
|
|
1816
|
-
}, le = Symbol("historyChangeConsumerKey"),
|
|
1804
|
+
}, le = Symbol("historyChangeConsumerKey"), vr = Symbol("_navigateFirstRoute"), ze = Symbol("_getRouteMark"), Et = Symbol("_getUrlSearch"), _t = Symbol("_generateLocation"), Ge = Symbol("_setRouteMarkRecorder"), $e = Symbol("beforeRestoreFiltersKey"), pr = Symbol("_beforeRestore"), gr = "Symbol(_fox_restore_point)";
|
|
1817
1805
|
function qe(e, ...t) {
|
|
1818
1806
|
return typeof e == "function" ? Reflect.apply(e, null, [...t]) : e;
|
|
1819
1807
|
}
|
|
@@ -1834,13 +1822,13 @@ var ss = class {
|
|
|
1834
1822
|
changeHandler;
|
|
1835
1823
|
historyChange;
|
|
1836
1824
|
[le] = !1;
|
|
1837
|
-
[
|
|
1825
|
+
[$e] = new Array();
|
|
1838
1826
|
backTimeout = 320;
|
|
1839
|
-
constructor(e = "hash", t = "", r = "", s = !0,
|
|
1840
|
-
this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor =
|
|
1827
|
+
constructor(e = "hash", t = "", r = "", s = !0, i = !0, n = !1, a, l) {
|
|
1828
|
+
this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor = i, this.traceless = n, this.storage = a ?? F().sessionStorage, this.backTimeout = l ?? 320;
|
|
1841
1829
|
}
|
|
1842
1830
|
init(e = !0) {
|
|
1843
|
-
const t =
|
|
1831
|
+
const t = F();
|
|
1844
1832
|
return typeof this.historyChange != "function" && (this.historyChange = () => {
|
|
1845
1833
|
if (typeof this[le] == "function") {
|
|
1846
1834
|
const r = this[le]();
|
|
@@ -1851,51 +1839,51 @@ var ss = class {
|
|
|
1851
1839
|
}
|
|
1852
1840
|
if (qe(this.historyMonitor)) {
|
|
1853
1841
|
const r = t.history.state;
|
|
1854
|
-
this[
|
|
1842
|
+
this[Se](r);
|
|
1855
1843
|
try {
|
|
1856
1844
|
let s = [];
|
|
1857
1845
|
if (typeof r == "string" ? s = JSON.parse(r) : s = r, Array.isArray(s) && s.length > 0) {
|
|
1858
|
-
const
|
|
1859
|
-
this[
|
|
1846
|
+
const i = this[ze]() ?? "/";
|
|
1847
|
+
this[Ge](i, s);
|
|
1860
1848
|
}
|
|
1861
1849
|
} catch {
|
|
1862
1850
|
}
|
|
1863
1851
|
}
|
|
1864
|
-
}),
|
|
1852
|
+
}), ot(t, "popstate", this.historyChange), this.firstNavigate && e && this[vr](), Promise.resolve();
|
|
1865
1853
|
}
|
|
1866
1854
|
destroy() {
|
|
1867
|
-
this.historyChange &&
|
|
1855
|
+
this.historyChange && Wt(F(), "popstate", this.historyChange);
|
|
1868
1856
|
}
|
|
1869
|
-
[
|
|
1870
|
-
for (let
|
|
1871
|
-
const
|
|
1857
|
+
[pr](e, t, r, s) {
|
|
1858
|
+
for (let i of this[$e]) try {
|
|
1859
|
+
const n = Reflect.apply(i, {}, [
|
|
1872
1860
|
e,
|
|
1873
1861
|
t,
|
|
1874
1862
|
r,
|
|
1875
1863
|
s
|
|
1876
1864
|
]);
|
|
1877
|
-
if (
|
|
1878
|
-
} catch (
|
|
1879
|
-
console.error(
|
|
1865
|
+
if (n === !1) return n;
|
|
1866
|
+
} catch (n) {
|
|
1867
|
+
console.error(n.message, n);
|
|
1880
1868
|
}
|
|
1881
1869
|
return !0;
|
|
1882
1870
|
}
|
|
1883
1871
|
beforeRestoreEach(e) {
|
|
1884
|
-
this[
|
|
1872
|
+
this[$e].push(e);
|
|
1885
1873
|
}
|
|
1886
1874
|
removeBeforeRestoreEach(e) {
|
|
1887
|
-
const t = this[
|
|
1888
|
-
return t !== -1 ? (this[
|
|
1875
|
+
const t = this[$e].indexOf(e);
|
|
1876
|
+
return t !== -1 ? (this[$e].splice(t, 1), !0) : !1;
|
|
1889
1877
|
}
|
|
1890
|
-
[
|
|
1891
|
-
const e = this[
|
|
1878
|
+
[vr]() {
|
|
1879
|
+
const e = this[ze]() ?? "/", t = this.storage.getItem(gr);
|
|
1892
1880
|
if (t) try {
|
|
1893
|
-
const
|
|
1894
|
-
if (
|
|
1895
|
-
const a =
|
|
1881
|
+
const n = JSON.parse(t);
|
|
1882
|
+
if (n.mark === e && Array.isArray(n.routes) && n.routes.length > 0) {
|
|
1883
|
+
const a = n.routes.filter((l, o) => (l.params = l.params ? jr(l.params) : {}, this[pr](l, o, e, n.routes)));
|
|
1896
1884
|
if (a.length > 0) {
|
|
1897
|
-
const
|
|
1898
|
-
a[
|
|
1885
|
+
const l = this[Et](), o = a.length - 1;
|
|
1886
|
+
a[o].query = l || a[o].query, this[Se](a);
|
|
1899
1887
|
return;
|
|
1900
1888
|
}
|
|
1901
1889
|
}
|
|
@@ -1904,32 +1892,32 @@ var ss = class {
|
|
|
1904
1892
|
const r = e.indexOf("!");
|
|
1905
1893
|
let s;
|
|
1906
1894
|
r != -1 ? s = e.substring(r + 1) : s = e;
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1895
|
+
const i = new x();
|
|
1896
|
+
i.path = s, i.query = this[Et](), this[Se]([i]);
|
|
1909
1897
|
}
|
|
1910
|
-
[
|
|
1898
|
+
[Ge](e, t) {
|
|
1911
1899
|
try {
|
|
1912
|
-
t.forEach((
|
|
1913
|
-
|
|
1900
|
+
t.forEach((i) => {
|
|
1901
|
+
i.params = i.params ? qr(i.params) : {};
|
|
1914
1902
|
});
|
|
1915
1903
|
const s = JSON.stringify({
|
|
1916
1904
|
mark: e,
|
|
1917
1905
|
routes: t
|
|
1918
1906
|
});
|
|
1919
|
-
this.storage.setItem(
|
|
1907
|
+
this.storage.setItem(gr, s);
|
|
1920
1908
|
} catch (r) {
|
|
1921
1909
|
console.error(r.message, r);
|
|
1922
1910
|
}
|
|
1923
1911
|
}
|
|
1924
1912
|
setRestorePoint(e) {
|
|
1925
|
-
const t = this[
|
|
1926
|
-
this[
|
|
1913
|
+
const t = this[ze]() ?? "/";
|
|
1914
|
+
this[Ge](t, e);
|
|
1927
1915
|
}
|
|
1928
|
-
[
|
|
1916
|
+
[Se](e) {
|
|
1929
1917
|
typeof this.changeHandler == "function" && this.changeHandler(e);
|
|
1930
1918
|
}
|
|
1931
|
-
[
|
|
1932
|
-
const e =
|
|
1919
|
+
[ze]() {
|
|
1920
|
+
const e = F();
|
|
1933
1921
|
if (this.mode === "path") {
|
|
1934
1922
|
let t = e.location.pathname;
|
|
1935
1923
|
return this.base && t.indexOf(this.base) === 0 && (t = t.substring(this.base.length)), t;
|
|
@@ -1939,39 +1927,39 @@ var ss = class {
|
|
|
1939
1927
|
}
|
|
1940
1928
|
return null;
|
|
1941
1929
|
}
|
|
1942
|
-
[
|
|
1943
|
-
let e =
|
|
1930
|
+
[Et]() {
|
|
1931
|
+
let e = F().location.search;
|
|
1944
1932
|
return e.length > 0 && e.indexOf("?") === 0 && (e = e.substring(1)), e;
|
|
1945
1933
|
}
|
|
1946
1934
|
listen(e) {
|
|
1947
1935
|
this.changeHandler = e;
|
|
1948
1936
|
}
|
|
1949
1937
|
go(e, t = !1) {
|
|
1950
|
-
const r =
|
|
1938
|
+
const r = F();
|
|
1951
1939
|
this[le] = t, r.history.go(e);
|
|
1952
1940
|
}
|
|
1953
1941
|
goBack(e, t) {
|
|
1954
|
-
const r =
|
|
1942
|
+
const r = F(), s = r.history.state;
|
|
1955
1943
|
if (wr(s) && s.length > 0) {
|
|
1956
|
-
let
|
|
1944
|
+
let i = !1;
|
|
1957
1945
|
for (let u = s.length - 1; u >= 0; u--) {
|
|
1958
1946
|
const f = x.from(s[u]);
|
|
1959
1947
|
if (!(f.historyUpdatePolicy === "traceless" || qe(this.traceless, f)) && x.isSame(f, e)) {
|
|
1960
|
-
|
|
1948
|
+
i = !0;
|
|
1961
1949
|
break;
|
|
1962
1950
|
}
|
|
1963
1951
|
}
|
|
1964
|
-
if (!
|
|
1952
|
+
if (!i) {
|
|
1965
1953
|
t();
|
|
1966
1954
|
return;
|
|
1967
1955
|
}
|
|
1968
|
-
const
|
|
1956
|
+
const n = this.backTimeout;
|
|
1969
1957
|
let a = null;
|
|
1970
|
-
const
|
|
1971
|
-
r.history.go(-1), a = setTimeout(
|
|
1972
|
-
},
|
|
1958
|
+
const l = () => {
|
|
1959
|
+
r.history.go(-1), a = setTimeout(l, n);
|
|
1960
|
+
}, o = () => {
|
|
1973
1961
|
clearTimeout(a);
|
|
1974
|
-
const u =
|
|
1962
|
+
const u = F().history.state;
|
|
1975
1963
|
if (wr(u) && u.length > 0) {
|
|
1976
1964
|
let f = u.length;
|
|
1977
1965
|
const c = u[f - 1], h = x.from(c);
|
|
@@ -1987,53 +1975,53 @@ var ss = class {
|
|
|
1987
1975
|
}
|
|
1988
1976
|
}
|
|
1989
1977
|
return y ? (setTimeout(() => {
|
|
1990
|
-
a = setTimeout(
|
|
1978
|
+
a = setTimeout(l, n), this.go(-1, o);
|
|
1991
1979
|
}, 0), !0) : (t(), !0);
|
|
1992
1980
|
}
|
|
1993
1981
|
}
|
|
1994
1982
|
return t(), !0;
|
|
1995
1983
|
};
|
|
1996
|
-
a = setTimeout(
|
|
1984
|
+
a = setTimeout(l, n), this.go(-1, o);
|
|
1997
1985
|
} else t();
|
|
1998
1986
|
}
|
|
1999
1987
|
setRouteMark(e) {
|
|
2000
1988
|
const t = e.currentRoute.fullPath;
|
|
2001
|
-
this[
|
|
1989
|
+
this[Ge](t, e.routes);
|
|
2002
1990
|
}
|
|
2003
1991
|
push(e) {
|
|
2004
|
-
const t = this[
|
|
2005
|
-
e.currentRoute.historyUpdatePolicy !== "traceless" && !qe(this.traceless, e.currentRoute) &&
|
|
1992
|
+
const t = this[_t](e.currentRoute);
|
|
1993
|
+
e.currentRoute.historyUpdatePolicy !== "traceless" && !qe(this.traceless, e.currentRoute) && F().history.pushState(e.routes, "", t), this.setRouteMark(e);
|
|
2006
1994
|
}
|
|
2007
1995
|
replace(e) {
|
|
2008
|
-
const t = this[
|
|
2009
|
-
(e.currentRoute.historyUpdatePolicy !== "traceless" || !qe(this.traceless, e.currentRoute)) &&
|
|
1996
|
+
const t = this[_t](e.currentRoute);
|
|
1997
|
+
(e.currentRoute.historyUpdatePolicy !== "traceless" || !qe(this.traceless, e.currentRoute)) && F().history.replaceState(e.routes, "", t), this.setRouteMark(e);
|
|
2010
1998
|
}
|
|
2011
|
-
[
|
|
2012
|
-
const t =
|
|
1999
|
+
[_t](e) {
|
|
2000
|
+
const t = F();
|
|
2013
2001
|
let r = "";
|
|
2014
2002
|
if (e.query) {
|
|
2015
2003
|
let a = "";
|
|
2016
|
-
if (typeof e.query == "object") for (let
|
|
2017
|
-
let
|
|
2004
|
+
if (typeof e.query == "object") for (let l of Reflect.ownKeys(e.query)) {
|
|
2005
|
+
let o = encodeURIComponent(e.query[l]), u = `${encodeURIComponent(String(l))}=${o}`;
|
|
2018
2006
|
a.length > 0 && (a += "&"), a += u;
|
|
2019
2007
|
}
|
|
2020
2008
|
else a = e.query;
|
|
2021
2009
|
this.query ? (r = a.length > 0 ? `${this.query}&${a}` : this.query, r.length > 0 && r.charAt(0) !== "?" && (r = `?${r}`)) : a.length > 0 && (r = `?${a}`);
|
|
2022
2010
|
}
|
|
2023
2011
|
const s = t.location;
|
|
2024
|
-
let
|
|
2025
|
-
|
|
2026
|
-
let
|
|
2027
|
-
return r ? this.mode == "path" ?
|
|
2012
|
+
let i = e.alias ?? e.fullPath;
|
|
2013
|
+
i.startsWith("default") && (i = i.substring(Or.length + 1));
|
|
2014
|
+
let n;
|
|
2015
|
+
return r ? this.mode == "path" ? i.indexOf("/") === 0 ? n = `${this.base}${i}${r}` : n = `${this.base}/${i}${r}` : n = `${s.pathname}${r}#${i}` : this.mode == "path" ? i.indexOf("/") === 0 ? n = `${this.base}${i}` : n = `${this.base}/${i}` : n = `${s.pathname}#${i}`, `${s.origin}${n}`;
|
|
2028
2016
|
}
|
|
2029
2017
|
};
|
|
2030
|
-
function
|
|
2031
|
-
return t !== null && (t =
|
|
2018
|
+
function Ni(e = !0, t = null, r = "", s = !0, i = !1, n) {
|
|
2019
|
+
return t !== null && (t = F().location.pathname), t && t.endsWith("/") && (t = t.substring(0, t.length - 1)), new ss("path", t ?? "", r, e, s, i, n);
|
|
2032
2020
|
}
|
|
2033
|
-
function
|
|
2034
|
-
return new ss("hash", "", t, e, r, s,
|
|
2021
|
+
function mi(e = !0, t = "", r = !0, s = !1, i) {
|
|
2022
|
+
return new ss("hash", "", t, e, r, s, i);
|
|
2035
2023
|
}
|
|
2036
|
-
var
|
|
2024
|
+
var vi = class {
|
|
2037
2025
|
maxSize = 50;
|
|
2038
2026
|
cursor = -1;
|
|
2039
2027
|
queue = [];
|
|
@@ -2058,7 +2046,7 @@ var gi = class {
|
|
|
2058
2046
|
listen(e) {
|
|
2059
2047
|
this.changeHandler = e;
|
|
2060
2048
|
}
|
|
2061
|
-
[
|
|
2049
|
+
[Se](e) {
|
|
2062
2050
|
typeof this.changeHandler == "function" && this.changeHandler(e);
|
|
2063
2051
|
}
|
|
2064
2052
|
go(e, t = !1) {
|
|
@@ -2068,8 +2056,8 @@ var gi = class {
|
|
|
2068
2056
|
this.cursor = r;
|
|
2069
2057
|
let s = !1;
|
|
2070
2058
|
if (typeof t == "function" ? s = t() : s = t, !s) {
|
|
2071
|
-
const
|
|
2072
|
-
this[
|
|
2059
|
+
const i = this.queue[r];
|
|
2060
|
+
this[Se](i.routes);
|
|
2073
2061
|
}
|
|
2074
2062
|
}
|
|
2075
2063
|
}
|
|
@@ -2078,8 +2066,8 @@ var gi = class {
|
|
|
2078
2066
|
let r = 0;
|
|
2079
2067
|
if (e === null) r = this.cursor + 1;
|
|
2080
2068
|
else for (let s = this.cursor; s >= 0; s--) {
|
|
2081
|
-
const
|
|
2082
|
-
if (x.isSame(
|
|
2069
|
+
const i = this.queue[s];
|
|
2070
|
+
if (x.isSame(i.currentRoute, e)) break;
|
|
2083
2071
|
r++;
|
|
2084
2072
|
}
|
|
2085
2073
|
if (r === 0) {
|
|
@@ -2100,74 +2088,74 @@ var gi = class {
|
|
|
2100
2088
|
setRestorePoint(e) {
|
|
2101
2089
|
}
|
|
2102
2090
|
};
|
|
2103
|
-
function
|
|
2104
|
-
return new
|
|
2091
|
+
function pi(e = "", t = 50) {
|
|
2092
|
+
return new vi(e, t);
|
|
2105
2093
|
}
|
|
2106
|
-
var
|
|
2107
|
-
function
|
|
2094
|
+
var Xe = Symbol("_constructRouteModel"), Qe = Symbol("_findRouteModel"), Ct = Symbol("_findRootView"), gi = Symbol("_getFirstView"), ae = Symbol("_removeView"), br = Symbol("_buildPage"), Rr = Symbol("_resolveComponent"), Sr = Symbol("_update"), ie = Symbol("_merge"), Ft = Symbol("_handleHistoryChange"), ue = Symbol("_handleRouteUpdated"), Ze = Symbol("routeUpdatedCallback"), At = Symbol("currentRoute"), p = Symbol("currentRoutes"), Ye = Symbol("routeSessionCacheKey"), xr = Symbol("_addRouteRecorder"), je = Symbol("_removeRouteRecorder"), et = Symbol("_cloneRouteRecorder"), $ = Symbol("_handleError"), tt = Symbol("errorCallback"), D = Symbol("registerKey"), rt = Symbol("notFoundKey"), Kt = Symbol("notFoundPathKey"), V = Symbol("forestKey"), S = Symbol("historyKey"), Me = Symbol("beforeFiltersKey"), Le = Symbol("afterFiltersKey"), Te = Symbol("destroyFiltersKey"), $t = Symbol("propsFilterKey"), Re = Symbol("mainDispatcherKey"), qt = Symbol("initKey"), fe = Symbol("readyKey"), jt = Symbol("readyHandlersKey"), st = Symbol("_markReady"), Pr = Symbol("_createNextFn"), Mt = Symbol("_start"), Lt = Symbol("_before"), Tt = Symbol("_after"), Er = Symbol("_destroy"), kt = Symbol("_load"), ke = Symbol("_unload"), Ie = Symbol("routerGuardKey"), Ui = Symbol.for("loadViewModel");
|
|
2095
|
+
function wi(e) {
|
|
2108
2096
|
return e.layers.length == 0 || e.layers[0].views.length == 0;
|
|
2109
2097
|
}
|
|
2110
|
-
var
|
|
2111
|
-
[
|
|
2112
|
-
[
|
|
2098
|
+
var bi = class {
|
|
2099
|
+
[D] = new Array();
|
|
2100
|
+
[rt];
|
|
2113
2101
|
[Kt] = "*";
|
|
2114
2102
|
[fe] = !1;
|
|
2115
|
-
[
|
|
2116
|
-
[V] = new
|
|
2103
|
+
[jt] = [];
|
|
2104
|
+
[V] = new Ys();
|
|
2117
2105
|
[S];
|
|
2118
2106
|
[p] = new Array();
|
|
2119
|
-
[
|
|
2107
|
+
[At] = Ar(null);
|
|
2120
2108
|
[Ye] = /* @__PURE__ */ new WeakMap();
|
|
2121
|
-
[
|
|
2122
|
-
[
|
|
2123
|
-
[
|
|
2109
|
+
[tt] = null;
|
|
2110
|
+
[Ze] = null;
|
|
2111
|
+
[Me] = new Array();
|
|
2124
2112
|
[Le] = new Array();
|
|
2125
|
-
[
|
|
2126
|
-
[
|
|
2127
|
-
[
|
|
2128
|
-
[Ie] = new
|
|
2129
|
-
[
|
|
2113
|
+
[Te] = new Array();
|
|
2114
|
+
[$t] = null;
|
|
2115
|
+
[Re] = new ft();
|
|
2116
|
+
[Ie] = new di();
|
|
2117
|
+
[qt] = !1;
|
|
2130
2118
|
get currentRoute() {
|
|
2131
|
-
return
|
|
2119
|
+
return fs(this[At]);
|
|
2132
2120
|
}
|
|
2133
2121
|
options;
|
|
2134
2122
|
constructor(e) {
|
|
2135
2123
|
this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
|
|
2136
2124
|
let t = this.options.routes || [];
|
|
2137
|
-
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[S] = e.history : this[S] =
|
|
2125
|
+
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[S] = e.history : this[S] = Pe ? mi() : pi(), this[S]?.listen(async (r) => {
|
|
2138
2126
|
let s = !0;
|
|
2139
2127
|
try {
|
|
2140
2128
|
if (typeof r == "string") {
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2143
|
-
} else await this[
|
|
2144
|
-
} catch (
|
|
2145
|
-
console.error(
|
|
2129
|
+
const i = this[I](r);
|
|
2130
|
+
i && await this[Ft]([i]);
|
|
2131
|
+
} else await this[Ft](r);
|
|
2132
|
+
} catch (i) {
|
|
2133
|
+
console.error(i.message, i), s = !1;
|
|
2146
2134
|
}
|
|
2147
|
-
this[fe] === !1 && this[
|
|
2135
|
+
this[fe] === !1 && this[st](s);
|
|
2148
2136
|
});
|
|
2149
2137
|
}
|
|
2150
|
-
[
|
|
2138
|
+
[$](e = "error", t) {
|
|
2151
2139
|
if (t && typeof t.error == "function") try {
|
|
2152
2140
|
t.error(e);
|
|
2153
2141
|
} catch {
|
|
2154
2142
|
}
|
|
2155
|
-
if (typeof this[
|
|
2156
|
-
this[
|
|
2143
|
+
if (typeof this[tt] == "function") try {
|
|
2144
|
+
this[tt](e, t);
|
|
2157
2145
|
} catch {
|
|
2158
2146
|
}
|
|
2159
2147
|
console.error(e);
|
|
2160
2148
|
}
|
|
2161
2149
|
init() {
|
|
2162
|
-
this[
|
|
2150
|
+
this[qt] !== !0 && (this[S]?.init(!this[fe]), this[qt] = !0);
|
|
2163
2151
|
}
|
|
2164
2152
|
isReady() {
|
|
2165
2153
|
return this[fe] ? Promise.resolve() : new Promise((e, t) => {
|
|
2166
|
-
this[
|
|
2154
|
+
this[jt].push([e, t]);
|
|
2167
2155
|
});
|
|
2168
2156
|
}
|
|
2169
|
-
[
|
|
2170
|
-
this[fe] = !0, this[
|
|
2157
|
+
[st](e) {
|
|
2158
|
+
this[fe] = !0, this[jt].forEach(([t, r]) => {
|
|
2171
2159
|
try {
|
|
2172
2160
|
e ? t() : r();
|
|
2173
2161
|
} catch (s) {
|
|
@@ -2175,16 +2163,16 @@ var Si = class {
|
|
|
2175
2163
|
}
|
|
2176
2164
|
});
|
|
2177
2165
|
}
|
|
2178
|
-
[
|
|
2166
|
+
[Ft](e) {
|
|
2179
2167
|
try {
|
|
2180
2168
|
if (!e) {
|
|
2181
|
-
let
|
|
2182
|
-
return this[ke](
|
|
2169
|
+
let n = [...this[p]].reverse();
|
|
2170
|
+
return this[ke](n), Pe && F().location.reload(), Promise.resolve();
|
|
2183
2171
|
}
|
|
2184
|
-
let t = null, r = [], s = [],
|
|
2185
|
-
for (;
|
|
2186
|
-
e[
|
|
2187
|
-
if (
|
|
2172
|
+
let t = null, r = [], s = [], i = 0;
|
|
2173
|
+
for (; i < e.length && i < this[p].length && x.isSame(e[i], this[p][i]); i++)
|
|
2174
|
+
e[i].active === !0 && e[i].active !== this[p][i].active && (t = e[i]);
|
|
2175
|
+
if (i < e.length && (r = e.slice(i)), i < this[p].length && (s = this[p].slice(i).reverse()), s.length === 0 && r.length === 0) {
|
|
2188
2176
|
if (t !== null) return this.restore([t]);
|
|
2189
2177
|
} else if (s.length > 0) {
|
|
2190
2178
|
if (this[ke](s)) {
|
|
@@ -2193,35 +2181,35 @@ var Si = class {
|
|
|
2193
2181
|
}
|
|
2194
2182
|
} else return this.restore(r);
|
|
2195
2183
|
} catch (t) {
|
|
2196
|
-
this[
|
|
2184
|
+
this[$](t);
|
|
2197
2185
|
}
|
|
2198
2186
|
return Promise.resolve();
|
|
2199
2187
|
}
|
|
2200
2188
|
[ue](e = null) {
|
|
2201
|
-
if (this[
|
|
2202
|
-
this[
|
|
2189
|
+
if (this[At].value = e, typeof this[Ze] == "function") try {
|
|
2190
|
+
this[Ze](e);
|
|
2203
2191
|
} catch {
|
|
2204
2192
|
}
|
|
2205
2193
|
}
|
|
2206
|
-
[
|
|
2207
|
-
if (e.opsType ===
|
|
2194
|
+
[xr](e, t) {
|
|
2195
|
+
if (e.opsType === C.Open) {
|
|
2208
2196
|
let r = !1;
|
|
2209
2197
|
const s = this[p].length - 1;
|
|
2210
|
-
for (let
|
|
2211
|
-
const
|
|
2212
|
-
if (e.root ==
|
|
2213
|
-
if (e.path ===
|
|
2214
|
-
this[p].splice(
|
|
2198
|
+
for (let i = s; i >= 0; i--) {
|
|
2199
|
+
const n = this[p][i];
|
|
2200
|
+
if (e.root == n.root) {
|
|
2201
|
+
if (e.path === n.path) {
|
|
2202
|
+
this[p].splice(i, 1, e), r = !0;
|
|
2215
2203
|
continue;
|
|
2216
2204
|
}
|
|
2217
|
-
e.active && (
|
|
2205
|
+
e.active && (n.active = !1);
|
|
2218
2206
|
}
|
|
2219
2207
|
}
|
|
2220
2208
|
r || this[p].push(e);
|
|
2221
2209
|
} else this[p].push(e);
|
|
2222
2210
|
this[Ye].set(e, t), this[ue](e);
|
|
2223
2211
|
}
|
|
2224
|
-
[
|
|
2212
|
+
[et]() {
|
|
2225
2213
|
let e = [];
|
|
2226
2214
|
for (let t of this[p]) {
|
|
2227
2215
|
let r = x.clone(t, !0);
|
|
@@ -2243,9 +2231,9 @@ var Si = class {
|
|
|
2243
2231
|
const r = this[p][t];
|
|
2244
2232
|
this[p].splice(t, 1);
|
|
2245
2233
|
const s = this[Ye].get(r);
|
|
2246
|
-
if (this[Ye].delete(r), this[
|
|
2247
|
-
const
|
|
2248
|
-
this[ue](this[p][
|
|
2234
|
+
if (this[Ye].delete(r), this[Er](r, s), r.opsType === C.Append) {
|
|
2235
|
+
const i = this[p].length - 1;
|
|
2236
|
+
this[ue](this[p][i] ?? null);
|
|
2249
2237
|
} else this[ue](null);
|
|
2250
2238
|
} else this[ue](null);
|
|
2251
2239
|
}
|
|
@@ -2262,27 +2250,27 @@ var Si = class {
|
|
|
2262
2250
|
return this[S] ? this[S].traceless : !1;
|
|
2263
2251
|
}
|
|
2264
2252
|
set propsFilter(e) {
|
|
2265
|
-
this[
|
|
2253
|
+
this[$t] = e;
|
|
2266
2254
|
}
|
|
2267
2255
|
get propsFilter() {
|
|
2268
|
-
return this[
|
|
2256
|
+
return this[$t];
|
|
2269
2257
|
}
|
|
2270
2258
|
setRestorePoint() {
|
|
2271
|
-
const e = this[
|
|
2259
|
+
const e = this[et]();
|
|
2272
2260
|
this[S]?.setRestorePoint(e);
|
|
2273
2261
|
}
|
|
2274
2262
|
onRouteUpdated(e) {
|
|
2275
|
-
this[
|
|
2263
|
+
this[Ze] = e;
|
|
2276
2264
|
}
|
|
2277
2265
|
onError(e) {
|
|
2278
|
-
this[
|
|
2266
|
+
this[tt] = e;
|
|
2279
2267
|
}
|
|
2280
2268
|
beforeEach(e) {
|
|
2281
|
-
this[
|
|
2269
|
+
this[Me].push(e);
|
|
2282
2270
|
}
|
|
2283
2271
|
removeBeforeEach(e) {
|
|
2284
|
-
const t = this[
|
|
2285
|
-
return t !== -1 ? (this[
|
|
2272
|
+
const t = this[Me].indexOf(e);
|
|
2273
|
+
return t !== -1 ? (this[Me].splice(t, 1), !0) : !1;
|
|
2286
2274
|
}
|
|
2287
2275
|
afterEach(e) {
|
|
2288
2276
|
this[Le].push(e);
|
|
@@ -2292,11 +2280,11 @@ var Si = class {
|
|
|
2292
2280
|
return t !== -1 ? (this[Le].splice(t, 1), !0) : !1;
|
|
2293
2281
|
}
|
|
2294
2282
|
destroyEach(e) {
|
|
2295
|
-
this[
|
|
2283
|
+
this[Te].push(e);
|
|
2296
2284
|
}
|
|
2297
2285
|
removeDestroyEach(e) {
|
|
2298
|
-
const t = this[
|
|
2299
|
-
return t !== -1 ? (this[
|
|
2286
|
+
const t = this[Te].indexOf(e);
|
|
2287
|
+
return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
|
|
2300
2288
|
}
|
|
2301
2289
|
beforeRestoreEach(e) {
|
|
2302
2290
|
this[S]?.beforeRestoreEach(e);
|
|
@@ -2312,26 +2300,26 @@ var Si = class {
|
|
|
2312
2300
|
this.setNotFoundRoute(e);
|
|
2313
2301
|
return;
|
|
2314
2302
|
}
|
|
2315
|
-
const r = this[
|
|
2316
|
-
if (t == -1) this[
|
|
2317
|
-
else for (let s = r.length - 1; s >= 0; s--) this[
|
|
2303
|
+
const r = this[Xe](e);
|
|
2304
|
+
if (t == -1) this[D] = [...this[D], ...r];
|
|
2305
|
+
else for (let s = r.length - 1; s >= 0; s--) this[D].splice(t, 0, r[s]);
|
|
2318
2306
|
}
|
|
2319
2307
|
removeRoute(e) {
|
|
2320
|
-
const t = this[
|
|
2308
|
+
const t = this[I](e);
|
|
2321
2309
|
if (t === null)
|
|
2322
2310
|
return console.warn("route格式错误", e), !1;
|
|
2323
|
-
for (let r = 0; r < this[
|
|
2324
|
-
const s = this[
|
|
2311
|
+
for (let r = 0; r < this[D].length; r++) {
|
|
2312
|
+
const s = this[D][r];
|
|
2325
2313
|
if (t?.path && s.path === t.path)
|
|
2326
|
-
return this[
|
|
2314
|
+
return this[D].splice(r, 1), !0;
|
|
2327
2315
|
if (t?.name && s.name === t.name)
|
|
2328
|
-
return this[
|
|
2316
|
+
return this[D].splice(r, 1), !0;
|
|
2329
2317
|
}
|
|
2330
2318
|
return !1;
|
|
2331
2319
|
}
|
|
2332
2320
|
hasRoute(e) {
|
|
2333
|
-
const t = this[
|
|
2334
|
-
return t === null ? (console.warn("route格式错误", e), !1) : this[
|
|
2321
|
+
const t = this[I](e);
|
|
2322
|
+
return t === null ? (console.warn("route格式错误", e), !1) : this[D].findIndex((r) => {
|
|
2335
2323
|
if (t?.path && r.path === t.path || t?.name && r.name === t.name) return !0;
|
|
2336
2324
|
}) !== -1;
|
|
2337
2325
|
}
|
|
@@ -2339,80 +2327,80 @@ var Si = class {
|
|
|
2339
2327
|
this[Kt] = e;
|
|
2340
2328
|
}
|
|
2341
2329
|
setNotFoundRoute(e) {
|
|
2342
|
-
this[
|
|
2330
|
+
this[rt] = this[Xe](e)[0];
|
|
2343
2331
|
}
|
|
2344
2332
|
getRoutes() {
|
|
2345
|
-
return [...this[
|
|
2333
|
+
return [...this[D]];
|
|
2346
2334
|
}
|
|
2347
|
-
[
|
|
2335
|
+
[Xe](e) {
|
|
2348
2336
|
let t = e.path ?? "";
|
|
2349
2337
|
t.length > 0 && t.charAt(0) !== "/" && (t = `/${t}`);
|
|
2350
2338
|
let r = e.components ?? (e.component && { "": e.component });
|
|
2351
2339
|
if (!r) {
|
|
2352
|
-
const
|
|
2353
|
-
return
|
|
2340
|
+
const l = new pt();
|
|
2341
|
+
return l.path = t, l.redirect = e.redirect, [l];
|
|
2354
2342
|
}
|
|
2355
2343
|
const s = new x();
|
|
2356
2344
|
s.path = t, s.name = e.name, s.meta = e.meta;
|
|
2357
|
-
let
|
|
2358
|
-
for (let
|
|
2359
|
-
const
|
|
2360
|
-
|
|
2361
|
-
const u = new
|
|
2362
|
-
|
|
2363
|
-
}
|
|
2364
|
-
let
|
|
2365
|
-
if (e.children) for (let
|
|
2366
|
-
const
|
|
2367
|
-
for (let u of
|
|
2368
|
-
let f = new
|
|
2369
|
-
f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (
|
|
2370
|
-
let c = new
|
|
2371
|
-
c.models = [...
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
if (!
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2377
|
-
const
|
|
2378
|
-
|
|
2345
|
+
let i = [];
|
|
2346
|
+
for (let l in r) {
|
|
2347
|
+
const o = r[l];
|
|
2348
|
+
l.length === 0 && (l = Or);
|
|
2349
|
+
const u = new As(l, o, e.props);
|
|
2350
|
+
i.push(u);
|
|
2351
|
+
}
|
|
2352
|
+
let n = !1, a = [];
|
|
2353
|
+
if (e.children) for (let l of e.children) {
|
|
2354
|
+
const o = this[Xe](l);
|
|
2355
|
+
for (let u of o) {
|
|
2356
|
+
let f = new pt();
|
|
2357
|
+
f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (n = !0, f.path = t);
|
|
2358
|
+
let c = new lr();
|
|
2359
|
+
c.models = [...i], f.layers = [c, ...u.layers], f.matchedRoutes = [s, ...u.matchedRoutes ?? []], a.push(f);
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
if (!n) {
|
|
2363
|
+
const l = new lr();
|
|
2364
|
+
l.models = i;
|
|
2365
|
+
const o = new pt();
|
|
2366
|
+
o.name = e.name, o.path = t, o.matchedRoutes = [s], o.layers = [l], a.splice(0, 0, o);
|
|
2379
2367
|
}
|
|
2380
2368
|
return a;
|
|
2381
2369
|
}
|
|
2382
|
-
[
|
|
2370
|
+
[Qe](e) {
|
|
2383
2371
|
const t = e.route;
|
|
2384
2372
|
try {
|
|
2385
|
-
for (let r of this[
|
|
2386
|
-
const s = t.path ? t.template ?? t.path : null,
|
|
2373
|
+
for (let r of this[D]) {
|
|
2374
|
+
const s = t.path ? t.template ?? t.path : null, i = t.name ? t.template ?? t.name : null;
|
|
2387
2375
|
if (s && r.path) {
|
|
2388
|
-
let
|
|
2389
|
-
|
|
2390
|
-
const a =
|
|
2376
|
+
let n = r.match;
|
|
2377
|
+
n || (n = r.match = hi(r.path));
|
|
2378
|
+
const a = n(s);
|
|
2391
2379
|
if (!a) continue;
|
|
2392
2380
|
if (r.redirect) {
|
|
2393
|
-
const
|
|
2394
|
-
|
|
2395
|
-
const
|
|
2396
|
-
route:
|
|
2381
|
+
const l = new x();
|
|
2382
|
+
q(!0, l, t), l.path = r.redirect;
|
|
2383
|
+
const o = {
|
|
2384
|
+
route: l,
|
|
2397
2385
|
find: void 0
|
|
2398
2386
|
};
|
|
2399
|
-
return this[
|
|
2387
|
+
return this[Qe](o) ? (e.route = o.route, e.find = o.find, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0) : !1;
|
|
2400
2388
|
}
|
|
2401
|
-
if (t.params = t.params ?? {},
|
|
2402
|
-
const
|
|
2403
|
-
if (typeof
|
|
2404
|
-
const
|
|
2389
|
+
if (t.params = t.params ?? {}, q(!0, t.params, a.params), t.query) {
|
|
2390
|
+
const l = t.query;
|
|
2391
|
+
if (typeof l == "string") {
|
|
2392
|
+
const o = {}, u = l.split("&");
|
|
2405
2393
|
for (let f of u) {
|
|
2406
2394
|
const c = f.split("=");
|
|
2407
2395
|
if (c.length !== 2) continue;
|
|
2408
2396
|
const h = decodeURIComponent(c[0].trim());
|
|
2409
|
-
|
|
2397
|
+
o[h] = decodeURIComponent(c[1].trim());
|
|
2410
2398
|
}
|
|
2411
|
-
|
|
2412
|
-
} else typeof
|
|
2399
|
+
q(!0, t.params, o);
|
|
2400
|
+
} else typeof l == "object" && q(!0, t.params, l);
|
|
2413
2401
|
}
|
|
2414
2402
|
return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0;
|
|
2415
|
-
} else if (
|
|
2403
|
+
} else if (i === r.name)
|
|
2416
2404
|
return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.name = t.name), !0;
|
|
2417
2405
|
}
|
|
2418
2406
|
} catch (r) {
|
|
@@ -2420,136 +2408,136 @@ var Si = class {
|
|
|
2420
2408
|
}
|
|
2421
2409
|
return !1;
|
|
2422
2410
|
}
|
|
2423
|
-
[
|
|
2411
|
+
[I](e) {
|
|
2424
2412
|
let t = null;
|
|
2425
2413
|
if (Array.isArray(e))
|
|
2426
2414
|
if (t = new x(), typeof e[0] == "object") t = x.from(e[0]);
|
|
2427
|
-
else for (let r = 0; r < e.length; r++) r === 0 ? e[r].charAt(0) === "/" ? t.path = e[r] : t.name = e[r] : r === 1 ? t.params = e[r] : r === 2 ? t.root = e[r] : r === 3 &&
|
|
2415
|
+
else for (let r = 0; r < e.length; r++) r === 0 ? e[r].charAt(0) === "/" ? t.path = e[r] : t.name = e[r] : r === 1 ? t.params = e[r] : r === 2 ? t.root = e[r] : r === 3 && q(!1, t, e[r]);
|
|
2428
2416
|
else typeof e == "object" ? t = x.from(e) : typeof e == "string" && (t = new x(), e.charAt(0) == "/" ? t.path = e : t.name = e);
|
|
2429
2417
|
if (t) {
|
|
2430
2418
|
if (t.path) {
|
|
2431
2419
|
let r = t.path.indexOf("?");
|
|
2432
2420
|
r !== -1 && r < t.path.length - 1 && (t.query = t.path.substring(r + 1), t.path = t.path.substring(0, r));
|
|
2433
2421
|
}
|
|
2434
|
-
t.root = t.root ?? "default", t.opsType = t.opsType ?? this.options.defaultOperationType ??
|
|
2422
|
+
t.root = t.root ?? "default", t.opsType = t.opsType ?? this.options.defaultOperationType ?? C.Push, t.traceless && !t.historyUpdatePolicy && (t.historyUpdatePolicy = "traceless");
|
|
2435
2423
|
}
|
|
2436
2424
|
return t;
|
|
2437
2425
|
}
|
|
2438
2426
|
push(...e) {
|
|
2439
|
-
const t = this[
|
|
2440
|
-
return t ? (t.opsType =
|
|
2427
|
+
const t = this[I](e);
|
|
2428
|
+
return t ? (t.opsType = C.Push, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
|
|
2441
2429
|
}
|
|
2442
2430
|
put(...e) {
|
|
2443
|
-
const t = this[
|
|
2444
|
-
return t ? (t.opsType =
|
|
2431
|
+
const t = this[I](e);
|
|
2432
|
+
return t ? (t.opsType = C.Put, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "traceless", this.to(t)) : (this[$]("resolve route fail", t), this);
|
|
2445
2433
|
}
|
|
2446
2434
|
replace(...e) {
|
|
2447
|
-
const t = this[
|
|
2448
|
-
return t ? (t.opsType =
|
|
2435
|
+
const t = this[I](e);
|
|
2436
|
+
return t ? (t.opsType = C.Replace, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "replace", this.to(t)) : (this[$]("resolve route fail", t), this);
|
|
2449
2437
|
}
|
|
2450
2438
|
append(...e) {
|
|
2451
|
-
const t = this[
|
|
2452
|
-
return t ? (t.opsType =
|
|
2439
|
+
const t = this[I](e);
|
|
2440
|
+
return t ? (t.opsType = C.Append, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
|
|
2453
2441
|
}
|
|
2454
2442
|
remove(e, t) {
|
|
2455
2443
|
return new Promise((r) => {
|
|
2456
|
-
this[
|
|
2444
|
+
this[Re].post((s) => {
|
|
2457
2445
|
try {
|
|
2458
2446
|
if (this[p].length === 0) {
|
|
2459
2447
|
s.resolve(), r(!1);
|
|
2460
2448
|
return;
|
|
2461
2449
|
}
|
|
2462
|
-
let
|
|
2450
|
+
let i = -1, n = null, a = [];
|
|
2463
2451
|
if (e) {
|
|
2464
|
-
if (
|
|
2465
|
-
const u = this[p][
|
|
2466
|
-
if (u.opsType ===
|
|
2452
|
+
if (n = e.root ?? null, e.all) for (let o = this[p].length - 1; o > 0; o--) {
|
|
2453
|
+
const u = this[p][o];
|
|
2454
|
+
if (u.opsType === C.Append) {
|
|
2467
2455
|
const f = u.root ?? "default";
|
|
2468
|
-
if (
|
|
2469
|
-
a.splice(0, 0, u),
|
|
2456
|
+
if (n && n !== f) continue;
|
|
2457
|
+
a.splice(0, 0, u), i = o - 1;
|
|
2470
2458
|
}
|
|
2471
2459
|
}
|
|
2472
|
-
else if (e.until) for (let
|
|
2473
|
-
let u = this[p][
|
|
2474
|
-
if (u.opsType ===
|
|
2460
|
+
else if (e.until) for (let o = this[p].length - 1; o > 0; o--) {
|
|
2461
|
+
let u = this[p][o];
|
|
2462
|
+
if (u.opsType === C.Append && u.root === n) {
|
|
2475
2463
|
if (e.until.charAt(0) === "/" && e.until === u.path) {
|
|
2476
|
-
|
|
2464
|
+
i = o;
|
|
2477
2465
|
break;
|
|
2478
2466
|
} else if (e.until === u.name) {
|
|
2479
|
-
|
|
2467
|
+
i = o;
|
|
2480
2468
|
break;
|
|
2481
2469
|
}
|
|
2482
2470
|
a.splice(0, 0, u);
|
|
2483
2471
|
}
|
|
2484
2472
|
}
|
|
2485
|
-
else if (e.to) for (let
|
|
2486
|
-
const u = this[p][
|
|
2487
|
-
if (u.opsType ===
|
|
2473
|
+
else if (e.to) for (let o = this[p].length - 1; o > 0; o--) {
|
|
2474
|
+
const u = this[p][o];
|
|
2475
|
+
if (u.opsType === C.Append) {
|
|
2488
2476
|
const f = u.root ?? "default";
|
|
2489
|
-
if (
|
|
2477
|
+
if (n && n !== f) continue;
|
|
2490
2478
|
if (a.splice(0, 0, u), e.to.charAt(0) === "/" && e.to === u.path) {
|
|
2491
|
-
|
|
2479
|
+
i = o - 1;
|
|
2492
2480
|
break;
|
|
2493
2481
|
} else if (e.to === u.name) {
|
|
2494
|
-
|
|
2482
|
+
i = o - 1;
|
|
2495
2483
|
break;
|
|
2496
2484
|
}
|
|
2497
2485
|
}
|
|
2498
2486
|
}
|
|
2499
|
-
} else for (let
|
|
2500
|
-
let u = this[p][
|
|
2501
|
-
if (u.opsType ===
|
|
2502
|
-
a.push(u),
|
|
2487
|
+
} else for (let o = this[p].length - 1; o > 0; o--) {
|
|
2488
|
+
let u = this[p][o];
|
|
2489
|
+
if (u.opsType === C.Append) {
|
|
2490
|
+
a.push(u), i = o - 1;
|
|
2503
2491
|
break;
|
|
2504
2492
|
}
|
|
2505
2493
|
}
|
|
2506
|
-
if (
|
|
2507
|
-
let
|
|
2508
|
-
console.warn(
|
|
2494
|
+
if (i === -1 || a.length === 0) {
|
|
2495
|
+
let o = "can not find route";
|
|
2496
|
+
console.warn(o), s.resolve(o), r(!1);
|
|
2509
2497
|
return;
|
|
2510
2498
|
}
|
|
2511
|
-
let
|
|
2512
|
-
if (
|
|
2499
|
+
let l = null;
|
|
2500
|
+
if (i !== -1 && (l = this[p][i]), this[ke](a)) {
|
|
2513
2501
|
if (t === !1)
|
|
2514
2502
|
return s.resolve(), r(!0), !0;
|
|
2515
|
-
const
|
|
2516
|
-
if (
|
|
2517
|
-
this[S]?.goBack(
|
|
2503
|
+
const o = () => (s.resolve(), r(!0), !0), u = this[p].length;
|
|
2504
|
+
if (l && x.isSame(l, this[p][u - 1])) {
|
|
2505
|
+
this[S]?.goBack(l, o);
|
|
2518
2506
|
return;
|
|
2519
2507
|
}
|
|
2520
|
-
|
|
2508
|
+
o();
|
|
2521
2509
|
}
|
|
2522
|
-
} catch (
|
|
2523
|
-
this[
|
|
2510
|
+
} catch (i) {
|
|
2511
|
+
this[$](i), s.resolve(), r(!1);
|
|
2524
2512
|
}
|
|
2525
2513
|
});
|
|
2526
2514
|
});
|
|
2527
2515
|
}
|
|
2528
2516
|
open(...e) {
|
|
2529
|
-
let t = this[
|
|
2530
|
-
return t ? (t.opsType =
|
|
2517
|
+
let t = this[I](e);
|
|
2518
|
+
return t ? (t.opsType = C.Open, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
|
|
2531
2519
|
}
|
|
2532
2520
|
close(e) {
|
|
2533
|
-
return this[
|
|
2521
|
+
return this[Re].post((t) => {
|
|
2534
2522
|
try {
|
|
2535
|
-
let r = this[
|
|
2523
|
+
let r = this[I](e);
|
|
2536
2524
|
if (!r) {
|
|
2537
2525
|
t.reject("resolve route fail");
|
|
2538
2526
|
return;
|
|
2539
2527
|
}
|
|
2540
2528
|
let s = [];
|
|
2541
|
-
for (let
|
|
2542
|
-
let
|
|
2543
|
-
if (
|
|
2529
|
+
for (let i = 0; i < this[p].length; i++) {
|
|
2530
|
+
let n = this[p][i];
|
|
2531
|
+
if (n.root === r.root) {
|
|
2544
2532
|
if (!r.path && !r.name) {
|
|
2545
|
-
s.push(
|
|
2533
|
+
s.push(n);
|
|
2546
2534
|
continue;
|
|
2547
2535
|
}
|
|
2548
|
-
if (r.path && r.path ===
|
|
2549
|
-
s.push(
|
|
2536
|
+
if (r.path && r.path === n.path) {
|
|
2537
|
+
s.push(n);
|
|
2550
2538
|
break;
|
|
2551
|
-
} else if (r.name && r.name ===
|
|
2552
|
-
s.push(
|
|
2539
|
+
} else if (r.name && r.name === n.name) {
|
|
2540
|
+
s.push(n);
|
|
2553
2541
|
break;
|
|
2554
2542
|
}
|
|
2555
2543
|
}
|
|
@@ -2560,77 +2548,77 @@ var Si = class {
|
|
|
2560
2548
|
}
|
|
2561
2549
|
this[ke](s), t.resolve();
|
|
2562
2550
|
} catch (r) {
|
|
2563
|
-
this[
|
|
2551
|
+
this[$](r), t.resolve();
|
|
2564
2552
|
}
|
|
2565
2553
|
}), this;
|
|
2566
2554
|
}
|
|
2567
2555
|
to(...e) {
|
|
2568
|
-
let t = this[
|
|
2556
|
+
let t = this[I](e);
|
|
2569
2557
|
if (!t)
|
|
2570
|
-
return this[
|
|
2558
|
+
return this[$]("resolve route fail", t), this;
|
|
2571
2559
|
let r = this[Ie].acquire(t);
|
|
2572
|
-
return r == null ? (this[
|
|
2560
|
+
return r == null ? (this[$]("route forbid", t), this) : (this[Re].post((s) => {
|
|
2573
2561
|
try {
|
|
2574
|
-
let
|
|
2575
|
-
this[
|
|
2576
|
-
const
|
|
2577
|
-
if (
|
|
2578
|
-
const
|
|
2579
|
-
|
|
2580
|
-
} catch (
|
|
2581
|
-
console.error(
|
|
2562
|
+
let i = this[Mt](t);
|
|
2563
|
+
this[Lt](i), this[kt](i), this[Tt](i), i.wait((n, a) => {
|
|
2564
|
+
const l = n.session.to;
|
|
2565
|
+
if (n.session.updateResult && n.session.updateResult.status === "success") try {
|
|
2566
|
+
const o = new mr(x.clone(l, !0), this[et]());
|
|
2567
|
+
l.historyUpdatePolicy === "replace" ? this[S]?.replace(o) : l.historyUpdatePolicy === "traceless" ? this[S]?.setRouteMark(o) : this[S]?.push(o);
|
|
2568
|
+
} catch (o) {
|
|
2569
|
+
console.error(o.message, o);
|
|
2582
2570
|
}
|
|
2583
|
-
if (
|
|
2571
|
+
if (We.clear(n.session), this[Ie].release(r), typeof t.success == "function") try {
|
|
2584
2572
|
Reflect.apply(t.success, {}, []);
|
|
2585
|
-
} catch (
|
|
2586
|
-
console.error(
|
|
2573
|
+
} catch (o) {
|
|
2574
|
+
console.error(o.message, o);
|
|
2587
2575
|
}
|
|
2588
|
-
this[fe] === !1 && this[
|
|
2589
|
-
}, (
|
|
2590
|
-
this[Ie].release(r), a !== null && this[
|
|
2576
|
+
this[fe] === !1 && this[st](!0), i = null, s.resolve();
|
|
2577
|
+
}, (n, a) => {
|
|
2578
|
+
this[Ie].release(r), a !== null && this[$](a, t), this[fe] === !1 && this[st](!1), We.clear(n.session), i = null, s.resolve();
|
|
2591
2579
|
});
|
|
2592
|
-
} catch (
|
|
2593
|
-
this[Ie].release(r), this[
|
|
2580
|
+
} catch (i) {
|
|
2581
|
+
this[Ie].release(r), this[$](i, t), s.resolve();
|
|
2594
2582
|
}
|
|
2595
2583
|
}), this);
|
|
2596
2584
|
}
|
|
2597
2585
|
back(e = 1) {
|
|
2598
2586
|
this[S]?.go(-e, !1);
|
|
2599
2587
|
}
|
|
2600
|
-
[
|
|
2588
|
+
[Pr](e) {
|
|
2601
2589
|
return (t, r) => {
|
|
2602
2590
|
if (typeof t == "boolean")
|
|
2603
2591
|
e.session.redirect = !1, t ? e.resolve() : e.reject(r ?? null);
|
|
2604
2592
|
else if (t) {
|
|
2605
|
-
const s = this[
|
|
2593
|
+
const s = this[I](t);
|
|
2606
2594
|
if (s) {
|
|
2607
|
-
const
|
|
2608
|
-
s.success =
|
|
2595
|
+
const i = e.session.to;
|
|
2596
|
+
s.success = i.success, s.error = i.error, e.session.to = s, e.session.redirect = !0, e.session.routeModel = null, e.resolve();
|
|
2609
2597
|
} else
|
|
2610
2598
|
e.session.redirect = !1, e.reject("route resolve fail");
|
|
2611
2599
|
} else
|
|
2612
2600
|
e.session.redirect = !1, e.resolve();
|
|
2613
2601
|
};
|
|
2614
2602
|
}
|
|
2615
|
-
[
|
|
2616
|
-
const t = new
|
|
2603
|
+
[Mt](e) {
|
|
2604
|
+
const t = new We(e, this[p].length > 0 ? this[p][this[p].length - 1] : void 0), r = {
|
|
2617
2605
|
route: e,
|
|
2618
2606
|
find: null
|
|
2619
2607
|
};
|
|
2620
|
-
if (this[
|
|
2608
|
+
if (this[Qe](r), r.find) {
|
|
2621
2609
|
t.routeModel = r.find, e.matched = r.find.matchedRoutes ?? [];
|
|
2622
2610
|
const s = {};
|
|
2623
|
-
if (Array.isArray(r.find?.matchedRoutes)) for (let
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2611
|
+
if (Array.isArray(r.find?.matchedRoutes)) for (let i = 0; i < r.find.matchedRoutes.length; i++) {
|
|
2612
|
+
const n = r.find.matchedRoutes[i];
|
|
2613
|
+
n.meta && typeof n.meta == "object" && Object.assign(s, n.meta);
|
|
2626
2614
|
}
|
|
2627
2615
|
e.meta && typeof e.meta == "object" && Object.assign(s, e.meta), e.meta = s;
|
|
2628
2616
|
}
|
|
2629
|
-
return new
|
|
2617
|
+
return new ft(t);
|
|
2630
2618
|
}
|
|
2631
|
-
[
|
|
2632
|
-
for (let t of this[
|
|
2633
|
-
const s = this[
|
|
2619
|
+
[Lt](e) {
|
|
2620
|
+
for (let t of this[Me]) e.post((r) => {
|
|
2621
|
+
const s = this[Pr](r);
|
|
2634
2622
|
Reflect.apply(t, {}, [
|
|
2635
2623
|
r.session.to,
|
|
2636
2624
|
r.session.from,
|
|
@@ -2639,7 +2627,7 @@ var Si = class {
|
|
|
2639
2627
|
]);
|
|
2640
2628
|
});
|
|
2641
2629
|
}
|
|
2642
|
-
[
|
|
2630
|
+
[Tt](e) {
|
|
2643
2631
|
e.post((t) => {
|
|
2644
2632
|
for (let r of this[Le]) try {
|
|
2645
2633
|
Reflect.apply(r, {}, [
|
|
@@ -2653,38 +2641,38 @@ var Si = class {
|
|
|
2653
2641
|
t.resolve();
|
|
2654
2642
|
});
|
|
2655
2643
|
}
|
|
2656
|
-
[
|
|
2657
|
-
for (let r of this[
|
|
2644
|
+
[Er](e, t) {
|
|
2645
|
+
for (let r of this[Te]) try {
|
|
2658
2646
|
Reflect.apply(r, {}, [e, t]);
|
|
2659
2647
|
} catch (s) {
|
|
2660
2648
|
console.error(s.message, s);
|
|
2661
2649
|
}
|
|
2662
2650
|
typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
|
|
2663
2651
|
}
|
|
2664
|
-
[
|
|
2652
|
+
[kt](e) {
|
|
2665
2653
|
e.post((t) => {
|
|
2666
2654
|
const r = t.session.to;
|
|
2667
2655
|
let s = t.session.routeModel;
|
|
2668
2656
|
if (s == null) {
|
|
2669
|
-
let
|
|
2657
|
+
let n = {
|
|
2670
2658
|
route: r,
|
|
2671
2659
|
find: null
|
|
2672
2660
|
};
|
|
2673
|
-
if (this[
|
|
2674
|
-
else if (this[
|
|
2661
|
+
if (this[Qe](n)) s = n.find, t.session.routeModel = s;
|
|
2662
|
+
else if (this[rt]) s = this[rt];
|
|
2675
2663
|
else {
|
|
2676
2664
|
t.reject(`not find route model, path:${r.path ?? r.name}`);
|
|
2677
2665
|
return;
|
|
2678
2666
|
}
|
|
2679
2667
|
}
|
|
2680
|
-
const
|
|
2681
|
-
this[
|
|
2682
|
-
this[V], t.session.updateResult =
|
|
2668
|
+
const i = We.from(t.session);
|
|
2669
|
+
this[br](r, s, i).then((n) => {
|
|
2670
|
+
this[V], t.session.updateResult = n ?? {
|
|
2683
2671
|
status: "success",
|
|
2684
2672
|
message: ""
|
|
2685
2673
|
}, t.resolve();
|
|
2686
|
-
}, (
|
|
2687
|
-
t.reject(
|
|
2674
|
+
}, (n) => {
|
|
2675
|
+
t.reject(n);
|
|
2688
2676
|
});
|
|
2689
2677
|
});
|
|
2690
2678
|
}
|
|
@@ -2692,74 +2680,74 @@ var Si = class {
|
|
|
2692
2680
|
if (e.length == 0) return !0;
|
|
2693
2681
|
let t = this[V], r = [];
|
|
2694
2682
|
for (let s of e) {
|
|
2695
|
-
let
|
|
2696
|
-
|
|
2697
|
-
...
|
|
2683
|
+
let i = this[Ct](t, s);
|
|
2684
|
+
i != null && r.push({
|
|
2685
|
+
...i,
|
|
2698
2686
|
route: s
|
|
2699
2687
|
});
|
|
2700
2688
|
}
|
|
2701
2689
|
if (r.length == 0)
|
|
2702
|
-
return this[
|
|
2690
|
+
return this[$]("can not find view index"), !1;
|
|
2703
2691
|
for (let s of r.reverse()) this[ae](t, {
|
|
2704
2692
|
x: s.x,
|
|
2705
2693
|
y: s.y
|
|
2706
2694
|
}, [s.route.index ?? 0], !0);
|
|
2707
2695
|
return !0;
|
|
2708
2696
|
}
|
|
2709
|
-
[
|
|
2697
|
+
[Ct](e, t) {
|
|
2710
2698
|
const r = t.root ?? "default";
|
|
2711
2699
|
let s;
|
|
2712
|
-
for (let
|
|
2713
|
-
const
|
|
2714
|
-
for (let a =
|
|
2715
|
-
const
|
|
2716
|
-
if (
|
|
2700
|
+
for (let i = 0; i < e.layers.length; i++) {
|
|
2701
|
+
const n = e.layers[i];
|
|
2702
|
+
for (let a = n.views.length - 1; a >= 0; a--) {
|
|
2703
|
+
const l = n.views[a];
|
|
2704
|
+
if (l[z] && l[it] === r)
|
|
2717
2705
|
return s = {
|
|
2718
2706
|
x: a,
|
|
2719
|
-
y:
|
|
2707
|
+
y: i
|
|
2720
2708
|
}, s;
|
|
2721
2709
|
}
|
|
2722
2710
|
}
|
|
2723
2711
|
return null;
|
|
2724
2712
|
}
|
|
2725
|
-
[
|
|
2713
|
+
[gi](e) {
|
|
2726
2714
|
return e.layers.length > 0 && e.layers[0].views.length > 0 ? e.layers[0].views[0] : null;
|
|
2727
2715
|
}
|
|
2728
2716
|
[ae](e, t, r = null, s = !0) {
|
|
2729
2717
|
if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length) return;
|
|
2730
|
-
let
|
|
2731
|
-
for (let f =
|
|
2732
|
-
let c =
|
|
2733
|
-
(!r || r.indexOf(c.index) != -1) && (c.route &&
|
|
2718
|
+
let i = e.layers[t.y].views[t.x], n = !1, a = [], l = !1, o = [...i.slots.value];
|
|
2719
|
+
for (let f = o.length - 1; f >= 0; f--) {
|
|
2720
|
+
let c = o[f];
|
|
2721
|
+
(!r || r.indexOf(c.index) != -1) && (c.route && i[z] && (this[je](c.route), c.active === !0 && c.route.opsType == C.Append && (l = !0)), a.push(new O(i, c.index, t.y)), o.splice(f, 1));
|
|
2734
2722
|
}
|
|
2735
|
-
if (
|
|
2723
|
+
if (o.length == 0) s ? i.slots.value = o : e.layers[t.y].views.splice(t.x, 1);
|
|
2736
2724
|
else {
|
|
2737
|
-
if (
|
|
2738
|
-
let f =
|
|
2725
|
+
if (l) {
|
|
2726
|
+
let f = o[o.length - 1];
|
|
2739
2727
|
f.active = !0, f.route && (f.route.active = f.active);
|
|
2740
2728
|
}
|
|
2741
|
-
|
|
2729
|
+
i.slots.value = o;
|
|
2742
2730
|
}
|
|
2743
|
-
e.layers[t.y].views.length == 0 && (
|
|
2731
|
+
e.layers[t.y].views.length == 0 && (n = !0);
|
|
2744
2732
|
let u = t.y + 1;
|
|
2745
2733
|
for (; u < e.layers.length; u++) {
|
|
2746
2734
|
let f = e.layers[u].views, c = [];
|
|
2747
|
-
for (let h = f.length - 1; (
|
|
2735
|
+
for (let h = f.length - 1; (n || a.length > 0) && h >= 0; h--) {
|
|
2748
2736
|
let y = f[h];
|
|
2749
|
-
if (y[he] && (
|
|
2737
|
+
if (y[he] && (n || O.include(a, y[he]))) {
|
|
2750
2738
|
let d = y.slots.value;
|
|
2751
2739
|
for (let m = d.length - 1; m >= 0; m--) {
|
|
2752
|
-
let
|
|
2753
|
-
|
|
2740
|
+
let w = d[m];
|
|
2741
|
+
w.route && y[z] && this[je](w.route), c.push(new O(y, w.index, u)), d.splice(m, 1);
|
|
2754
2742
|
}
|
|
2755
2743
|
e.layers[u].views.splice(h, 1);
|
|
2756
2744
|
}
|
|
2757
2745
|
}
|
|
2758
|
-
a = c, e.layers[u].views.length == 0 && (
|
|
2746
|
+
a = c, e.layers[u].views.length == 0 && (n = !0);
|
|
2759
2747
|
}
|
|
2760
2748
|
}
|
|
2761
2749
|
restore(e) {
|
|
2762
|
-
if (!e || this[
|
|
2750
|
+
if (!e || this[D].length == 0) {
|
|
2763
2751
|
let t = this[V];
|
|
2764
2752
|
if (t.layers.length > 0) {
|
|
2765
2753
|
let r = t.layers[0].views;
|
|
@@ -2767,57 +2755,57 @@ var Si = class {
|
|
|
2767
2755
|
}
|
|
2768
2756
|
return this[p] = [], this[ue](null), Promise.resolve();
|
|
2769
2757
|
} else return new Promise((t, r) => {
|
|
2770
|
-
let s = null,
|
|
2771
|
-
for (let
|
|
2772
|
-
const a = e[
|
|
2773
|
-
this[
|
|
2774
|
-
const
|
|
2775
|
-
this[
|
|
2776
|
-
s = u.session.to,
|
|
2758
|
+
let s = null, i = !1;
|
|
2759
|
+
for (let n = 0; n < e.length; n++) {
|
|
2760
|
+
const a = e[n];
|
|
2761
|
+
this[Re].post((l) => {
|
|
2762
|
+
const o = this[Mt](a);
|
|
2763
|
+
this[Lt](o), this[kt](o), this[Tt](o), o.wait((u, f) => {
|
|
2764
|
+
s = u.session.to, i = u.session.redirect, l.resolve();
|
|
2777
2765
|
}, (u, f) => {
|
|
2778
|
-
s = null, f !== null && this[
|
|
2766
|
+
s = null, f !== null && this[$](f), l.resolve();
|
|
2779
2767
|
});
|
|
2780
2768
|
});
|
|
2781
2769
|
}
|
|
2782
|
-
this[
|
|
2783
|
-
if (s &&
|
|
2784
|
-
const a = new
|
|
2770
|
+
this[Re].post((n) => {
|
|
2771
|
+
if (s && i === !0) {
|
|
2772
|
+
const a = new mr(x.clone(s, !0), this[et]());
|
|
2785
2773
|
this[S]?.replace(a);
|
|
2786
2774
|
}
|
|
2787
|
-
|
|
2775
|
+
n.resolve(), t();
|
|
2788
2776
|
});
|
|
2789
2777
|
});
|
|
2790
2778
|
}
|
|
2791
|
-
[
|
|
2792
|
-
const s = e.updateType ??
|
|
2793
|
-
return this[
|
|
2794
|
-
const
|
|
2795
|
-
if (
|
|
2796
|
-
return
|
|
2779
|
+
[br](e, t, r) {
|
|
2780
|
+
const s = e.updateType ?? Pt.Part;
|
|
2781
|
+
return this[Rr](t).then(() => {
|
|
2782
|
+
const i = this[Sr](t, e, r, s);
|
|
2783
|
+
if (i.status === "error") throw Error(i.message);
|
|
2784
|
+
return i;
|
|
2797
2785
|
});
|
|
2798
2786
|
}
|
|
2799
|
-
[
|
|
2787
|
+
[Rr](e) {
|
|
2800
2788
|
let t = [];
|
|
2801
2789
|
for (let r = 0; r < e.layers.length; r++) {
|
|
2802
2790
|
let s = e.layers[r];
|
|
2803
|
-
for (let
|
|
2804
|
-
let
|
|
2805
|
-
|
|
2791
|
+
for (let i = 0; i < s.models.length; i++) {
|
|
2792
|
+
let n = s.models[i];
|
|
2793
|
+
n.isResolved || t.push(n.resolve());
|
|
2806
2794
|
}
|
|
2807
2795
|
}
|
|
2808
2796
|
return t.length > 0 ? Promise.all(t) : Promise.resolve();
|
|
2809
2797
|
}
|
|
2810
|
-
[
|
|
2798
|
+
[Sr](e, t, r, s) {
|
|
2811
2799
|
if (e.layers[0].models.length !== 1) return {
|
|
2812
2800
|
status: "error",
|
|
2813
2801
|
message: "illegal route structure(multi root node)"
|
|
2814
2802
|
};
|
|
2815
|
-
const
|
|
2816
|
-
let
|
|
2817
|
-
!a && s ==
|
|
2803
|
+
const i = e.layers[0].models[0];
|
|
2804
|
+
let n = this[V], a = wi(n), l = t.root ?? "default", o;
|
|
2805
|
+
!a && s == Pt.Part && (o = this[Ct](n, t));
|
|
2818
2806
|
let u, f = 0;
|
|
2819
|
-
if (
|
|
2820
|
-
|
|
2807
|
+
if (o == null || o == null) if (a || s === Pt.All)
|
|
2808
|
+
n.layers.length == 0 && (n.layers[0] = new Rt()), n.layers[0].views.length == 0 ? (u = new Ae(t.root ?? "default", !0, null), n.layers[0].views = [u]) : u = n.layers[0].views[0], o = {
|
|
2821
2809
|
x: 0,
|
|
2822
2810
|
y: 0
|
|
2823
2811
|
};
|
|
@@ -2828,16 +2816,16 @@ var Si = class {
|
|
|
2828
2816
|
message: "can not rebuild view(because not route slot)"
|
|
2829
2817
|
};
|
|
2830
2818
|
let h = c.level;
|
|
2831
|
-
if (h >
|
|
2819
|
+
if (h > n.layers.length) return {
|
|
2832
2820
|
status: "error",
|
|
2833
2821
|
message: "can not insert view(override level)"
|
|
2834
2822
|
};
|
|
2835
2823
|
let y;
|
|
2836
2824
|
if (c.rootName) {
|
|
2837
|
-
let d =
|
|
2825
|
+
let d = n.layers[h - 1];
|
|
2838
2826
|
for (let m of d.views) {
|
|
2839
2827
|
if (m[z] && m.name === c.rootName) {
|
|
2840
|
-
y = new
|
|
2828
|
+
y = new O(m, c.rootIndex ?? 0, h - 1);
|
|
2841
2829
|
break;
|
|
2842
2830
|
}
|
|
2843
2831
|
if (m[J] && m[J].view.name === c.rootName && m[J].index === c.rootIndex) {
|
|
@@ -2850,24 +2838,24 @@ var Si = class {
|
|
|
2850
2838
|
status: "error",
|
|
2851
2839
|
message: "can not insert view(not find root node ref)"
|
|
2852
2840
|
};
|
|
2853
|
-
u = new
|
|
2854
|
-
x:
|
|
2841
|
+
u = new Ae(l, !0, y), n.layers[h].views.push(u), o = {
|
|
2842
|
+
x: n.layers[h].views.length - 1,
|
|
2855
2843
|
y: h
|
|
2856
2844
|
};
|
|
2857
2845
|
}
|
|
2858
|
-
else u =
|
|
2859
|
-
if (f =
|
|
2860
|
-
t.index = t.index ??
|
|
2846
|
+
else u = n.layers[o.y].views[o.x];
|
|
2847
|
+
if (f = o.y, u[z] = !0, t.opsType === C.Append) {
|
|
2848
|
+
t.index = t.index ?? Oe.get(), t.active = !0;
|
|
2861
2849
|
let c = u.slots.value;
|
|
2862
2850
|
if (c.length > 0) {
|
|
2863
|
-
let
|
|
2864
|
-
|
|
2851
|
+
let w = c[c.length - 1];
|
|
2852
|
+
w.active = !1, w.route && (w.route.active = w.active);
|
|
2865
2853
|
}
|
|
2866
|
-
let h = new re(t,
|
|
2854
|
+
let h = new re(t, i, t.index, !0);
|
|
2867
2855
|
u.slots.value = [...c, h];
|
|
2868
|
-
let y = f + 1, d = 1, m = new
|
|
2869
|
-
this[ie](
|
|
2870
|
-
} else if (t.opsType ===
|
|
2856
|
+
let y = f + 1, d = 1, m = new O(u, t.index, f);
|
|
2857
|
+
this[ie](n, y, e, d, m);
|
|
2858
|
+
} else if (t.opsType === C.Open) {
|
|
2871
2859
|
let c = u.slots.value;
|
|
2872
2860
|
const h = t.active ?? !0;
|
|
2873
2861
|
let y = !1;
|
|
@@ -2883,124 +2871,124 @@ var Si = class {
|
|
|
2883
2871
|
d.route && (d.route.active = d.active);
|
|
2884
2872
|
}
|
|
2885
2873
|
if (!y) {
|
|
2886
|
-
t.index = t.index ??
|
|
2887
|
-
let d = new re(t,
|
|
2874
|
+
t.index = t.index ?? Oe.get(), t.active = h;
|
|
2875
|
+
let d = new re(t, i, t.index, h);
|
|
2888
2876
|
c.push(d);
|
|
2889
|
-
let m = f + 1,
|
|
2890
|
-
this[ie](
|
|
2877
|
+
let m = f + 1, w = 1, g = new O(u, t.index, f);
|
|
2878
|
+
this[ie](n, m, e, w, g);
|
|
2891
2879
|
}
|
|
2892
2880
|
u.slots.value = [...c];
|
|
2893
2881
|
} else {
|
|
2894
2882
|
let c = u.slots.value;
|
|
2895
2883
|
if (c.length == 0) {
|
|
2896
|
-
t.index = t.index ??
|
|
2897
|
-
let h = f + 1, y = 1, d = new
|
|
2898
|
-
this[ie](
|
|
2884
|
+
t.index = t.index ?? Oe.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
|
|
2885
|
+
let h = f + 1, y = 1, d = new O(u, t.index, f);
|
|
2886
|
+
this[ie](n, h, e, y, d);
|
|
2899
2887
|
} else {
|
|
2900
2888
|
let h = c[0];
|
|
2901
|
-
if (h.model !==
|
|
2902
|
-
this[ae](
|
|
2903
|
-
let y = f + 1, d = 1, m = new
|
|
2904
|
-
this[ie](
|
|
2889
|
+
if (h.model !== i) {
|
|
2890
|
+
this[ae](n, o, null, !0), t.index = t.index ?? Oe.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
|
|
2891
|
+
let y = f + 1, d = 1, m = new O(u, t.index, f);
|
|
2892
|
+
this[ie](n, y, e, d, m);
|
|
2905
2893
|
} else {
|
|
2906
2894
|
h.route !== null && this[je](h.route);
|
|
2907
2895
|
let y = !1;
|
|
2908
2896
|
const d = t.active ?? !0;
|
|
2909
2897
|
h.active !== d && (h.active = d, y = !0), t.active = d, t.index = h.index, h.route = t;
|
|
2910
2898
|
let m = [];
|
|
2911
|
-
for (let
|
|
2912
|
-
m.length > 0 ? this[ae](
|
|
2913
|
-
let
|
|
2914
|
-
for (;
|
|
2915
|
-
let
|
|
2916
|
-
for (let L = 0; L <
|
|
2917
|
-
let K =
|
|
2918
|
-
K[he] &&
|
|
2899
|
+
for (let M = 1; M < c.length; M++) m.push(c[M].index);
|
|
2900
|
+
m.length > 0 ? this[ae](n, o, m, !0) : y && (u.slots.value = [...c]);
|
|
2901
|
+
let w = [new O(u, t.index, f)], g = f + 1, v = 1, j = new O(u, t.index, f);
|
|
2902
|
+
for (; w.length > 0 && g < n.layers.length && v < e.layers.length; g++, v++) {
|
|
2903
|
+
let M = [];
|
|
2904
|
+
for (let L = 0; L < n.layers[g].views.length; L++) {
|
|
2905
|
+
let K = n.layers[g].views[L];
|
|
2906
|
+
K[he] && O.include(w, K[he]) && M.unshift(L);
|
|
2919
2907
|
}
|
|
2920
|
-
let
|
|
2921
|
-
for (let L of
|
|
2922
|
-
let K =
|
|
2923
|
-
for (let
|
|
2924
|
-
ee = ne[
|
|
2908
|
+
let _e = [];
|
|
2909
|
+
for (let L of M) {
|
|
2910
|
+
let K = n.layers[g].views[L], ne = e.layers[v].models, ee;
|
|
2911
|
+
for (let T = 0; T < ne.length; T++) if (K.name === ne[T].name) {
|
|
2912
|
+
ee = ne[T];
|
|
2925
2913
|
break;
|
|
2926
2914
|
}
|
|
2927
|
-
if (!ee) this[ae](
|
|
2915
|
+
if (!ee) this[ae](n, {
|
|
2928
2916
|
x: L,
|
|
2929
2917
|
y: g
|
|
2930
2918
|
}, null, !1);
|
|
2931
2919
|
else {
|
|
2932
|
-
let
|
|
2933
|
-
if (
|
|
2920
|
+
let T = K.slots.value;
|
|
2921
|
+
if (T.length == 0) {
|
|
2934
2922
|
let Q = 0;
|
|
2935
2923
|
K.slots.value = [new re(null, ee, Q)];
|
|
2936
|
-
let
|
|
2937
|
-
this[ie](
|
|
2924
|
+
let N = g + 1, U = v + 1;
|
|
2925
|
+
this[ie](n, N, e, U, j);
|
|
2938
2926
|
} else {
|
|
2939
|
-
let Q =
|
|
2927
|
+
let Q = T[0];
|
|
2940
2928
|
if (Q.model !== ee) {
|
|
2941
|
-
this[ae](
|
|
2929
|
+
this[ae](n, {
|
|
2942
2930
|
x: L,
|
|
2943
2931
|
y: g
|
|
2944
2932
|
}, null, !0), K.slots.value = [new re(null, ee, 0)];
|
|
2945
|
-
let
|
|
2946
|
-
this[ie](
|
|
2933
|
+
let N = g + 1, U = v + 1;
|
|
2934
|
+
this[ie](n, N, e, U, j);
|
|
2947
2935
|
} else {
|
|
2948
2936
|
K[z] && Q.route !== null && this[je](Q.route);
|
|
2949
|
-
let
|
|
2950
|
-
for (let U = 1; U <
|
|
2951
|
-
|
|
2937
|
+
let N = [];
|
|
2938
|
+
for (let U = 1; U < T.length; U++) N.push(T[U].index);
|
|
2939
|
+
N.length > 0 && this[ae](n, {
|
|
2952
2940
|
x: L,
|
|
2953
2941
|
y: g
|
|
2954
|
-
},
|
|
2942
|
+
}, N, !0), _e.push(new O(K, Q.index, g));
|
|
2955
2943
|
}
|
|
2956
2944
|
}
|
|
2957
2945
|
K[z] = !1;
|
|
2958
2946
|
}
|
|
2959
2947
|
}
|
|
2960
|
-
|
|
2948
|
+
w = _e;
|
|
2961
2949
|
}
|
|
2962
|
-
this[ie](
|
|
2950
|
+
this[ie](n, g, e, v, j);
|
|
2963
2951
|
}
|
|
2964
2952
|
}
|
|
2965
2953
|
}
|
|
2966
2954
|
if (u && u[J]) {
|
|
2967
2955
|
let c = u[J];
|
|
2968
|
-
c && (t.slot = new
|
|
2956
|
+
c && (t.slot = new Fs(l, f, c?.view.name, c?.index ?? 0));
|
|
2969
2957
|
}
|
|
2970
|
-
return r.to = void 0, r.routeModel = void 0, this[
|
|
2958
|
+
return r.to = void 0, r.routeModel = void 0, this[xr](t, r), {
|
|
2971
2959
|
status: "success",
|
|
2972
2960
|
message: ""
|
|
2973
2961
|
};
|
|
2974
2962
|
}
|
|
2975
|
-
[ie](e, t, r, s,
|
|
2976
|
-
let
|
|
2977
|
-
for (; a < e.layers.length &&
|
|
2978
|
-
let
|
|
2979
|
-
for (let
|
|
2980
|
-
let u = new
|
|
2981
|
-
u.slots.value = [f],
|
|
2963
|
+
[ie](e, t, r, s, i) {
|
|
2964
|
+
let n = s, a = t;
|
|
2965
|
+
for (; a < e.layers.length && n < r.layers.length; a++, n++) {
|
|
2966
|
+
let l = e.layers[a].views;
|
|
2967
|
+
for (let o of r.layers[n].models) {
|
|
2968
|
+
let u = new Ae(o.name, !1, i), f = new re(null, o);
|
|
2969
|
+
u.slots.value = [f], l.push(u);
|
|
2982
2970
|
}
|
|
2983
2971
|
}
|
|
2984
|
-
for (;
|
|
2985
|
-
let
|
|
2986
|
-
|
|
2987
|
-
for (let
|
|
2988
|
-
let u = new
|
|
2989
|
-
u.slots.value = [f],
|
|
2972
|
+
for (; n < r.layers.length; n++) {
|
|
2973
|
+
let l = new Rt();
|
|
2974
|
+
l.views = [];
|
|
2975
|
+
for (let o of r.layers[n].models) {
|
|
2976
|
+
let u = new Ae(o.name, !1, i), f = new re(null, o);
|
|
2977
|
+
u.slots.value = [f], l.views.push(u);
|
|
2990
2978
|
}
|
|
2991
|
-
e.layers.push(
|
|
2979
|
+
e.layers.push(l);
|
|
2992
2980
|
}
|
|
2993
2981
|
}
|
|
2994
|
-
[
|
|
2982
|
+
[Br](e, t, r, s, i, n) {
|
|
2995
2983
|
if (t < 0 || t > this[V].layers.length) return null;
|
|
2996
2984
|
if (t < this[V].layers.length) {
|
|
2997
2985
|
let u = this[V].layers[t], f = null;
|
|
2998
2986
|
for (let c of u.views) {
|
|
2999
2987
|
let h = !1;
|
|
3000
2988
|
if (r !== null ? (h = c.name === e && c[J]?.view === r, h && s !== -1 && (h = c[J]?.index === s)) : h = c.name === e, !!h) {
|
|
3001
|
-
|
|
3002
|
-
view:
|
|
3003
|
-
index:
|
|
2989
|
+
i !== null && (c[he] = {
|
|
2990
|
+
view: i,
|
|
2991
|
+
index: n,
|
|
3004
2992
|
level: t - 1
|
|
3005
2993
|
}), f = c;
|
|
3006
2994
|
break;
|
|
@@ -3008,78 +2996,99 @@ var Si = class {
|
|
|
3008
2996
|
}
|
|
3009
2997
|
if (f !== null) return f;
|
|
3010
2998
|
}
|
|
3011
|
-
let a = null,
|
|
3012
|
-
|
|
3013
|
-
view:
|
|
3014
|
-
index:
|
|
2999
|
+
let a = null, l = null;
|
|
3000
|
+
i !== null && (i[z] ? a = {
|
|
3001
|
+
view: i,
|
|
3002
|
+
index: n,
|
|
3015
3003
|
level: t - 1
|
|
3016
|
-
} : a =
|
|
3017
|
-
view:
|
|
3018
|
-
index:
|
|
3004
|
+
} : a = i[J], l = {
|
|
3005
|
+
view: i,
|
|
3006
|
+
index: n,
|
|
3019
3007
|
level: t - 1
|
|
3020
3008
|
});
|
|
3021
|
-
let
|
|
3022
|
-
if (
|
|
3023
|
-
let u = new
|
|
3024
|
-
u.views = [
|
|
3025
|
-
} else this[V].layers[t].views.push(
|
|
3026
|
-
return
|
|
3027
|
-
}
|
|
3028
|
-
},
|
|
3009
|
+
let o = new Ae(e, !0, a);
|
|
3010
|
+
if (o[he] = l, t == this[V].layers.length) {
|
|
3011
|
+
let u = new Rt();
|
|
3012
|
+
u.views = [o], this[V].layers.push(u);
|
|
3013
|
+
} else this[V].layers[t].views.push(o);
|
|
3014
|
+
return o;
|
|
3015
|
+
}
|
|
3016
|
+
}, Ri = "fox-router-view", Si = "fox-router-link", H = /* @__PURE__ */ (function(e) {
|
|
3029
3017
|
return e[e.Loading = 0] = "Loading", e[e.Loaded = 1] = "Loaded", e[e.Defining = 2] = "Defining", e[e.Defined = 3] = "Defined", e;
|
|
3030
|
-
})({})
|
|
3018
|
+
})({});
|
|
3019
|
+
function xi(e) {
|
|
3020
|
+
return e == H.Loaded || e === H.Defined;
|
|
3021
|
+
}
|
|
3022
|
+
var _r = /* @__PURE__ */ (function(e) {
|
|
3031
3023
|
return e[e.normal = 0] = "normal", e[e.factory = 1] = "factory", e;
|
|
3032
|
-
})({}),
|
|
3024
|
+
})({}), Pi = class {
|
|
3033
3025
|
register = /* @__PURE__ */ new Map();
|
|
3026
|
+
regExpRegisters = [];
|
|
3034
3027
|
constructor() {
|
|
3035
3028
|
}
|
|
3036
3029
|
get(e) {
|
|
3037
|
-
|
|
3030
|
+
let t = this.register.get(e) ?? null;
|
|
3031
|
+
return t || (t = this.regExpRegisters.find((r) => r.pattern?.test(e))?.module ?? null), t;
|
|
3032
|
+
}
|
|
3033
|
+
has(e) {
|
|
3034
|
+
return !!this.get(e);
|
|
3038
3035
|
}
|
|
3039
3036
|
set(e, t) {
|
|
3040
|
-
this.register.set(e, t);
|
|
3037
|
+
if (typeof e == "string") this.register.set(e, t);
|
|
3038
|
+
else if (e instanceof RegExp) {
|
|
3039
|
+
const r = this.regExpRegisters.find((s) => (s.pattern?.source ?? "") === (e?.source ?? ""));
|
|
3040
|
+
r ? r.module = t : this.regExpRegisters.push({
|
|
3041
|
+
pattern: e,
|
|
3042
|
+
module: t
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3041
3045
|
}
|
|
3042
3046
|
remove(e) {
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3047
|
+
if (typeof e == "string") {
|
|
3048
|
+
const t = this.register.get(e);
|
|
3049
|
+
return this.register.delete(e), t ?? null;
|
|
3050
|
+
} else if (e instanceof RegExp) {
|
|
3051
|
+
const t = this.regExpRegisters.findIndex((r) => (r.pattern?.source ?? "") === (e?.source ?? ""));
|
|
3052
|
+
if (t !== -1) {
|
|
3053
|
+
const r = this.regExpRegisters[t].module ?? null;
|
|
3054
|
+
return this.regExpRegisters.splice(t, 1), r;
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
return null;
|
|
3048
3058
|
}
|
|
3049
3059
|
clear() {
|
|
3050
|
-
this.register.clear();
|
|
3051
|
-
}
|
|
3052
|
-
}, Ar = class {
|
|
3053
|
-
moduleManager = new Ei();
|
|
3054
|
-
options = {
|
|
3055
|
-
paths: {},
|
|
3056
|
-
alias: {},
|
|
3057
|
-
nature: [],
|
|
3058
|
-
timeout: 3e3
|
|
3059
|
-
};
|
|
3060
|
-
set paths(e) {
|
|
3061
|
-
this.options.paths = e;
|
|
3062
|
-
}
|
|
3063
|
-
get paths() {
|
|
3064
|
-
return this.options.paths;
|
|
3060
|
+
this.register.clear(), this.regExpRegisters = [];
|
|
3065
3061
|
}
|
|
3062
|
+
}, It = [
|
|
3063
|
+
"require",
|
|
3064
|
+
"exports",
|
|
3065
|
+
"module"
|
|
3066
|
+
];
|
|
3067
|
+
async function Ei(e) {
|
|
3068
|
+
return await new Function("url", "return import(url)")(e);
|
|
3069
|
+
}
|
|
3070
|
+
var Cr = class {
|
|
3071
|
+
moduleManager = new Pi();
|
|
3072
|
+
_alias = {};
|
|
3066
3073
|
set alias(e) {
|
|
3067
|
-
this.
|
|
3074
|
+
this._alias = e;
|
|
3068
3075
|
}
|
|
3069
3076
|
get alias() {
|
|
3070
|
-
return this.
|
|
3077
|
+
return this._alias;
|
|
3071
3078
|
}
|
|
3072
|
-
|
|
3073
|
-
|
|
3079
|
+
_resourceParser;
|
|
3080
|
+
set resourceParser(e) {
|
|
3081
|
+
this._resourceParser = e;
|
|
3074
3082
|
}
|
|
3075
|
-
get
|
|
3076
|
-
return this.
|
|
3083
|
+
get resourceParser() {
|
|
3084
|
+
return this._resourceParser;
|
|
3077
3085
|
}
|
|
3086
|
+
_timeout;
|
|
3078
3087
|
set timeout(e) {
|
|
3079
|
-
this.
|
|
3088
|
+
this._timeout = e;
|
|
3080
3089
|
}
|
|
3081
3090
|
get timeout() {
|
|
3082
|
-
return this.
|
|
3091
|
+
return this._timeout;
|
|
3083
3092
|
}
|
|
3084
3093
|
_query;
|
|
3085
3094
|
set query(e) {
|
|
@@ -3089,250 +3098,316 @@ var Si = class {
|
|
|
3089
3098
|
return this._query;
|
|
3090
3099
|
}
|
|
3091
3100
|
get head() {
|
|
3092
|
-
return
|
|
3101
|
+
return Ue().head;
|
|
3093
3102
|
}
|
|
3094
|
-
|
|
3103
|
+
_cssMountPoint = null;
|
|
3104
|
+
set cssMountPoint(e) {
|
|
3105
|
+
this._cssMountPoint = e;
|
|
3106
|
+
}
|
|
3107
|
+
get cssMountPoint() {
|
|
3108
|
+
return this._cssMountPoint;
|
|
3109
|
+
}
|
|
3110
|
+
_jsMountPoint = null;
|
|
3111
|
+
set jsMountPoint(e) {
|
|
3112
|
+
this._jsMountPoint = e;
|
|
3113
|
+
}
|
|
3114
|
+
get jsMountPoint() {
|
|
3115
|
+
return this._jsMountPoint;
|
|
3095
3116
|
}
|
|
3096
3117
|
setModule(e, t) {
|
|
3097
3118
|
const r = {
|
|
3098
|
-
id: e,
|
|
3119
|
+
id: typeof e == "string" ? e : e?.source,
|
|
3099
3120
|
src: "",
|
|
3100
|
-
status:
|
|
3121
|
+
status: H.Loaded
|
|
3101
3122
|
};
|
|
3102
|
-
typeof t == "function" ? (r.exports = t, r.type =
|
|
3123
|
+
typeof t == "function" ? (r.exports = t, r.type = _r.factory) : r.exports = t, this.moduleManager.set(e, r);
|
|
3103
3124
|
}
|
|
3104
3125
|
removeModule(e) {
|
|
3105
3126
|
this.moduleManager.remove(e);
|
|
3106
3127
|
}
|
|
3107
|
-
|
|
3108
|
-
const t =
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
typeof
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3128
|
+
getModuleExports(e) {
|
|
3129
|
+
const t = this.moduleManager.get(e);
|
|
3130
|
+
return t && xi(t.status) ? t.type === _r.factory && typeof t.exports == "function" ? t.exports() : t.exports : null;
|
|
3131
|
+
}
|
|
3132
|
+
exposeRequire(e = "__foxRequire", t, r) {
|
|
3133
|
+
const s = t ?? F();
|
|
3134
|
+
return s && typeof s == "object" ? (s[e] = (i) => {
|
|
3135
|
+
const n = this.getModuleExports(i);
|
|
3136
|
+
return r && !n && console.error(`[Fox] module:${i}, not found!`), n;
|
|
3137
|
+
}, !0) : !1;
|
|
3138
|
+
}
|
|
3139
|
+
resloveResource(e) {
|
|
3140
|
+
if (typeof e == "string") {
|
|
3141
|
+
if (It.includes(e)) return e;
|
|
3142
|
+
if (e = this.alias?.[e] ?? e, typeof this.resourceParser == "function") {
|
|
3143
|
+
const r = this.resloveResource(e);
|
|
3144
|
+
if (!r) return r;
|
|
3145
|
+
}
|
|
3146
|
+
const t = this.getResourcePathSuffix(e);
|
|
3147
|
+
if (t === "mjs") return {
|
|
3148
|
+
path: e,
|
|
3149
|
+
type: "js",
|
|
3150
|
+
format: "es"
|
|
3151
|
+
};
|
|
3152
|
+
if (t === "js") return {
|
|
3153
|
+
path: e,
|
|
3154
|
+
type: "js",
|
|
3155
|
+
format: "umd"
|
|
3156
|
+
};
|
|
3157
|
+
if (t === "css") return {
|
|
3158
|
+
path: e,
|
|
3159
|
+
type: "css"
|
|
3160
|
+
};
|
|
3138
3161
|
}
|
|
3139
|
-
return
|
|
3162
|
+
return e;
|
|
3163
|
+
}
|
|
3164
|
+
ensure(...e) {
|
|
3165
|
+
return new Promise((t, r) => {
|
|
3166
|
+
if (e.length <= 0) {
|
|
3167
|
+
r("args is empty");
|
|
3168
|
+
return;
|
|
3169
|
+
}
|
|
3170
|
+
const s = [];
|
|
3171
|
+
let i = e.length - 1, n = null;
|
|
3172
|
+
typeof e[i] == "function" && (n = e[i], i--);
|
|
3173
|
+
for (let o = 0; o <= i; o++) if (Array.isArray(e[o])) {
|
|
3174
|
+
const u = e[o];
|
|
3175
|
+
for (let f = 0; f < u.length; f++) {
|
|
3176
|
+
const c = this.resloveResource(u[f]);
|
|
3177
|
+
s.push(c);
|
|
3178
|
+
}
|
|
3179
|
+
} else if (typeof e[o] == "string") {
|
|
3180
|
+
const u = this.resloveResource(e[o]);
|
|
3181
|
+
s.push(u);
|
|
3182
|
+
}
|
|
3183
|
+
const a = new _i(s.length, (o, u) => {
|
|
3184
|
+
if (a.isOK()) try {
|
|
3185
|
+
typeof n == "function" && Reflect.apply(n, {}, u), t(u);
|
|
3186
|
+
} catch (f) {
|
|
3187
|
+
console.error(f), r(f);
|
|
3188
|
+
}
|
|
3189
|
+
else try {
|
|
3190
|
+
console.error(o), typeof n == "function" && Reflect.apply(n, {}, []), r(o);
|
|
3191
|
+
} catch (f) {
|
|
3192
|
+
console.error(f), r(f);
|
|
3193
|
+
}
|
|
3194
|
+
}), l = new ft();
|
|
3195
|
+
for (let o = 0; o < s.length; o++) {
|
|
3196
|
+
const u = new Ci(o, s[o], a);
|
|
3197
|
+
this.mount(l, u);
|
|
3198
|
+
}
|
|
3199
|
+
return this;
|
|
3200
|
+
});
|
|
3140
3201
|
}
|
|
3141
3202
|
remove(...e) {
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3203
|
+
return new Promise((t, r) => {
|
|
3204
|
+
if (e.length <= 0) {
|
|
3205
|
+
r("args is empty");
|
|
3206
|
+
return;
|
|
3207
|
+
}
|
|
3208
|
+
const s = [];
|
|
3209
|
+
let i = e.length - 1, n = null;
|
|
3210
|
+
typeof e[i] == "function" && (n = e[i], i--);
|
|
3211
|
+
for (let a = 0; a <= i; a++) if (Array.isArray(e[a])) {
|
|
3212
|
+
const l = e[a];
|
|
3213
|
+
for (let o = 0; o < l.length; o++) {
|
|
3214
|
+
const u = this.resloveResource(l[o]);
|
|
3215
|
+
s.push(u);
|
|
3216
|
+
}
|
|
3217
|
+
} else if (typeof e[a] == "string") {
|
|
3218
|
+
const l = this.resloveResource(e[a]);
|
|
3219
|
+
s.push(l);
|
|
3220
|
+
}
|
|
3221
|
+
for (let a = 0; a < s.length; a++) try {
|
|
3222
|
+
this.unmount(s[a]);
|
|
3223
|
+
} catch (l) {
|
|
3224
|
+
console.error(l);
|
|
3225
|
+
}
|
|
3226
|
+
typeof n == "function" && Reflect.apply(n, {}, [!0]), t(!0);
|
|
3227
|
+
});
|
|
3158
3228
|
}
|
|
3159
3229
|
mount(e, t) {
|
|
3160
|
-
if (t.
|
|
3161
|
-
e.post((s) => {
|
|
3162
|
-
t.progress.work(!0, t.index, "exports"), s.resolve();
|
|
3163
|
-
});
|
|
3164
|
-
return;
|
|
3165
|
-
} else if (t.src === "module") {
|
|
3230
|
+
if (!t.resource) {
|
|
3166
3231
|
e.post((s) => {
|
|
3167
|
-
t.progress.work(!
|
|
3232
|
+
t.progress.work(!1, t.index, null), s.resolve();
|
|
3168
3233
|
});
|
|
3169
3234
|
return;
|
|
3170
3235
|
}
|
|
3171
|
-
if (
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3236
|
+
if (typeof t.resource == "string") {
|
|
3237
|
+
if (It.includes(t.resource)) {
|
|
3238
|
+
e.post((i) => {
|
|
3239
|
+
t.progress.work(!0, t.index, t.resource), i.resolve();
|
|
3240
|
+
});
|
|
3241
|
+
return;
|
|
3242
|
+
}
|
|
3243
|
+
const s = this.getModuleExports(t.resource);
|
|
3244
|
+
if (s) {
|
|
3245
|
+
e.post((i) => {
|
|
3246
|
+
t.progress.work(!0, t.index, s), i.resolve();
|
|
3247
|
+
});
|
|
3248
|
+
return;
|
|
3249
|
+
}
|
|
3179
3250
|
}
|
|
3180
|
-
|
|
3181
|
-
if (r === "js"
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3251
|
+
const r = t.resource;
|
|
3252
|
+
if (r.type === "js") if (r.format === "es") this.mountCJS(e, t);
|
|
3253
|
+
else {
|
|
3254
|
+
const s = this.jsMountPoint ?? this.head;
|
|
3255
|
+
this.mountJS(e, t, s);
|
|
3256
|
+
}
|
|
3257
|
+
else {
|
|
3258
|
+
const s = this.cssMountPoint ?? this.head;
|
|
3259
|
+
this.mountCSS(e, t, s);
|
|
3189
3260
|
}
|
|
3190
3261
|
}
|
|
3191
3262
|
mountCSS(e, t, r) {
|
|
3192
3263
|
e.post((s) => {
|
|
3193
|
-
const
|
|
3194
|
-
if (
|
|
3195
|
-
|
|
3264
|
+
const i = t.resource, n = this.getModuleExports(i.path);
|
|
3265
|
+
if (n) {
|
|
3266
|
+
t.progress.work(!0, t.index, n), s.resolve();
|
|
3196
3267
|
return;
|
|
3197
3268
|
}
|
|
3198
|
-
const a =
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3269
|
+
const a = Ue(), l = a.createElement("link"), o = "onload" in l;
|
|
3270
|
+
o && (l.onload = () => {
|
|
3271
|
+
l.onload = null, l.onerror = null, t.progress.work(!0, t.index, i.path), s.resolve();
|
|
3272
|
+
}, l.onerror = () => {
|
|
3273
|
+
try {
|
|
3274
|
+
r.removeChild(l);
|
|
3275
|
+
} catch (c) {
|
|
3276
|
+
console.error(c);
|
|
3277
|
+
}
|
|
3278
|
+
l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null), s.reject();
|
|
3279
|
+
});
|
|
3280
|
+
const u = this.constructResourceUri(i.path), f = a.getElementById(i.path);
|
|
3281
|
+
f && f.parentNode && f.parentNode.removeChild(f), l.rel = "stylesheet", l.type = "text/css", l.id = i.path, l.href = u, r.appendChild(l), o || (t.progress.work(!0, t.index, i.path), s.resolve());
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3284
|
+
mountJS(e, t, r) {
|
|
3285
|
+
e.post((s) => {
|
|
3286
|
+
const i = t.resource, n = this.getModuleExports(i.path);
|
|
3287
|
+
if (n) {
|
|
3288
|
+
t.progress.work(!0, t.index, n), s.resolve();
|
|
3289
|
+
return;
|
|
3290
|
+
}
|
|
3291
|
+
const a = {
|
|
3292
|
+
id: i.path,
|
|
3293
|
+
src: i.path,
|
|
3294
|
+
status: H.Loading
|
|
3295
|
+
};
|
|
3296
|
+
this.moduleManager.set(i.path, a);
|
|
3297
|
+
const l = Ue().createElement("script");
|
|
3298
|
+
if ("onload" in l)
|
|
3299
|
+
l.onload = () => {
|
|
3300
|
+
l.onload = null, l.onerror = null, a.status === H.Loading && (a.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve();
|
|
3301
|
+
}, l.onerror = () => {
|
|
3203
3302
|
try {
|
|
3204
|
-
r.removeChild(
|
|
3205
|
-
} catch (
|
|
3206
|
-
console.error(
|
|
3303
|
+
r.removeChild(l);
|
|
3304
|
+
} catch (c) {
|
|
3305
|
+
console.error(c);
|
|
3207
3306
|
}
|
|
3208
|
-
|
|
3307
|
+
l.onload = null, l.onerror = null, this.moduleManager.remove(i.path), t.progress.work(!1, t.index, null), s.resolve();
|
|
3209
3308
|
};
|
|
3210
3309
|
else {
|
|
3211
|
-
const
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
success: () => {
|
|
3215
|
-
t.progress.work(!0, t.index, t.src), s.resolve();
|
|
3216
|
-
},
|
|
3217
|
-
error: () => {
|
|
3218
|
-
try {
|
|
3219
|
-
r.removeChild(o);
|
|
3220
|
-
} catch (f) {
|
|
3221
|
-
console.error(f.message, f);
|
|
3222
|
-
}
|
|
3223
|
-
t.progress.work(!1, t.index, null), s.resolve();
|
|
3224
|
-
}
|
|
3310
|
+
const c = l;
|
|
3311
|
+
c.onreadystatechange = () => {
|
|
3312
|
+
/loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, a.status == H.Loading && (a.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve());
|
|
3225
3313
|
};
|
|
3226
|
-
setTimeout(() => {
|
|
3227
|
-
is(o, u);
|
|
3228
|
-
}, 1);
|
|
3229
3314
|
}
|
|
3230
|
-
|
|
3231
|
-
l
|
|
3315
|
+
const o = this.constructResourceUri(i.path);
|
|
3316
|
+
l.defer = !0, l.src = o;
|
|
3317
|
+
const u = F(), f = this.createRequireLoad();
|
|
3318
|
+
u.require = f, u.define = this.createDefine(a, f, t), r.appendChild(l);
|
|
3232
3319
|
});
|
|
3233
3320
|
}
|
|
3234
|
-
|
|
3235
|
-
e.post((
|
|
3236
|
-
const
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
if (
|
|
3244
|
-
t.progress.work(!
|
|
3321
|
+
mountCJS(e, t) {
|
|
3322
|
+
e.post(async (r) => {
|
|
3323
|
+
const s = t.resource, i = this.getModuleExports(s.path);
|
|
3324
|
+
if (i) {
|
|
3325
|
+
t.progress.work(!0, t.index, i), r.resolve();
|
|
3326
|
+
return;
|
|
3327
|
+
}
|
|
3328
|
+
try {
|
|
3329
|
+
let n = await Ei(s.path);
|
|
3330
|
+
if (zt(n) && (n = n.default ?? n), He(n)) {
|
|
3331
|
+
t.progress.work(!1, t.index, n), r.resolve();
|
|
3245
3332
|
return;
|
|
3246
3333
|
}
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
}, this.moduleManager.set(n, i);
|
|
3253
|
-
const a = He().createElement("script");
|
|
3254
|
-
if ("onload" in a)
|
|
3255
|
-
a.onload = () => {
|
|
3256
|
-
a.onload = null, a.onerror = null, i.status === I.Loading && (i.status = I.Loaded, t.progress.work(!0, t.index, n)), s.resolve();
|
|
3257
|
-
}, a.onerror = () => {
|
|
3258
|
-
try {
|
|
3259
|
-
r.removeChild(a);
|
|
3260
|
-
} catch (f) {
|
|
3261
|
-
console.error(f.message, f);
|
|
3262
|
-
}
|
|
3263
|
-
a.onload = null, a.onerror = null, this.moduleManager.remove(n), t.progress.work(!1, t.index, null), s.resolve();
|
|
3264
|
-
};
|
|
3265
|
-
else {
|
|
3266
|
-
const f = a;
|
|
3267
|
-
f.onreadystatechange = () => {
|
|
3268
|
-
/loaded|complete/.test(f.readyState) && (f.onreadystatechange = null, i.status == I.Loading && (i.status = I.Loaded, t.progress.work(!0, t.index, n)), s.resolve());
|
|
3334
|
+
const a = {
|
|
3335
|
+
id: s.path,
|
|
3336
|
+
src: s.path,
|
|
3337
|
+
status: H.Loaded,
|
|
3338
|
+
exports: n
|
|
3269
3339
|
};
|
|
3340
|
+
this.moduleManager.set(s.path, a), t.progress.work(!0, t.index, n), r.resolve();
|
|
3341
|
+
} catch (n) {
|
|
3342
|
+
console.error(n), t.progress.work(!1, t.index, null), r.resolve();
|
|
3270
3343
|
}
|
|
3271
|
-
a.defer = !0, a.src = n;
|
|
3272
|
-
const o = A(), l = this.createRequireLoad(), u = this.createDefine(i, l, t);
|
|
3273
|
-
o.require = l, o.define = u, r.appendChild(a);
|
|
3274
3344
|
});
|
|
3275
3345
|
}
|
|
3276
|
-
unmount(e
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3346
|
+
unmount(e) {
|
|
3347
|
+
let t = "", r = "";
|
|
3348
|
+
typeof e == "string" ? (this.moduleManager.remove(e), r = this.getResourcePathSuffix(e), t = e) : (this.moduleManager.remove(e.path), r = e.type === "css" ? "css" : e.format ?? "", t = e.path);
|
|
3349
|
+
const s = Ue();
|
|
3350
|
+
if (r === "umd") {
|
|
3351
|
+
let i = s.getElementById(t);
|
|
3352
|
+
i || (i = s.querySelector(`script[src="${t}"]`)), i && i.remove();
|
|
3353
|
+
} else if (r === "css") {
|
|
3354
|
+
let i = s.getElementById(t);
|
|
3355
|
+
if (!i) {
|
|
3356
|
+
const n = this.constructResourceUri(t);
|
|
3357
|
+
i = s.querySelector(`link[href="${n}"]`);
|
|
3358
|
+
}
|
|
3359
|
+
i && i.remove();
|
|
3286
3360
|
}
|
|
3287
3361
|
}
|
|
3288
3362
|
trimEmptyElement(e) {
|
|
3289
|
-
|
|
3363
|
+
const t = [];
|
|
3290
3364
|
for (let r = 0; r < e.length; r++) {
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
s.length !== 0 && t.push(s);
|
|
3365
|
+
let s = e[r];
|
|
3366
|
+
s != null && (s = s.trim(), s.length !== 0 && t.push(s));
|
|
3294
3367
|
}
|
|
3295
3368
|
return t;
|
|
3296
3369
|
}
|
|
3297
3370
|
createDefine(e, t, r) {
|
|
3298
|
-
const s = this,
|
|
3299
|
-
e.status =
|
|
3300
|
-
let a,
|
|
3301
|
-
if (u === 1 ? (
|
|
3371
|
+
const s = this, i = function(...n) {
|
|
3372
|
+
e.status = H.Defining;
|
|
3373
|
+
let a, l, o, u = n.length;
|
|
3374
|
+
if (u === 1 ? (o = n[0], a = void 0) : u === 2 ? (o = n[1], Array.isArray(n[0]) ? (l = s.trimEmptyElement(n[0]), a = void 0) : l = void 0) : (a = n[0], l = s.trimEmptyElement(n[1]), o = n[2]), a && (e.id = a, typeof s._alias == "object" && (s._alias[a] = e.src)), l && l.length > 0) s.ensure(l, (...f) => {
|
|
3302
3375
|
try {
|
|
3303
3376
|
const c = f.map((h) => h === "exports" ? ((!e.exports || typeof e.exports != "object") && (e.exports = {}), e.exports) : h === "module" ? e : h === "require" ? t : h);
|
|
3304
|
-
if (typeof
|
|
3305
|
-
const h = Reflect.apply(
|
|
3377
|
+
if (typeof o == "function") {
|
|
3378
|
+
const h = Reflect.apply(o, e, c);
|
|
3306
3379
|
h && typeof h == "object" && (e.exports = h);
|
|
3307
|
-
} else e.exports =
|
|
3308
|
-
e.status =
|
|
3380
|
+
} else e.exports = o;
|
|
3381
|
+
e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
|
|
3309
3382
|
} catch (c) {
|
|
3310
3383
|
console.error(c), r.progress.work(!1, r.index, []);
|
|
3311
3384
|
}
|
|
3312
3385
|
});
|
|
3313
3386
|
else {
|
|
3314
|
-
if (typeof
|
|
3315
|
-
const f = Reflect.apply(
|
|
3387
|
+
if (typeof o == "function") {
|
|
3388
|
+
const f = Reflect.apply(o, e, []);
|
|
3316
3389
|
f && typeof f == "object" && (e.exports = e.exports ?? {}, Object.assign(e.exports, f));
|
|
3317
|
-
} else e.exports =
|
|
3318
|
-
e.status =
|
|
3390
|
+
} else e.exports = o;
|
|
3391
|
+
e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
|
|
3319
3392
|
}
|
|
3320
3393
|
};
|
|
3321
|
-
return
|
|
3394
|
+
return i.amd = !0, i;
|
|
3322
3395
|
}
|
|
3323
3396
|
createRequireLoad() {
|
|
3324
|
-
return (e) => this.
|
|
3397
|
+
return (e) => (e = this._alias?.[e] ?? e, this.getModuleExports(e));
|
|
3325
3398
|
}
|
|
3326
|
-
|
|
3399
|
+
constructResourceUri(e) {
|
|
3327
3400
|
try {
|
|
3328
|
-
return e;
|
|
3401
|
+
if (It.includes(e) || !this.query) return e;
|
|
3402
|
+
const t = this.createSearch(this.query);
|
|
3403
|
+
return e.indexOf("?") == -1 ? e += `?${t}` : t.length > 0 && (e += `&${t}`), e;
|
|
3329
3404
|
} catch (t) {
|
|
3330
|
-
throw console.error(`resolve path[${e}] fail`, t), t;
|
|
3405
|
+
throw console.error(`[Fox]resolve path[${e}] fail`, t), t;
|
|
3331
3406
|
}
|
|
3332
3407
|
}
|
|
3333
3408
|
createSearch(e) {
|
|
3334
3409
|
let t = "";
|
|
3335
|
-
if (e) {
|
|
3410
|
+
if (e && typeof e == "object") {
|
|
3336
3411
|
for (let r in e) {
|
|
3337
3412
|
let s = `${e[r]}`;
|
|
3338
3413
|
t += `${encodeURIComponent(r)}=${encodeURIComponent(s)}&`;
|
|
@@ -3341,56 +3416,13 @@ var Si = class {
|
|
|
3341
3416
|
}
|
|
3342
3417
|
return t;
|
|
3343
3418
|
}
|
|
3344
|
-
|
|
3419
|
+
getResourcePathSuffix(e) {
|
|
3345
3420
|
let t = e.lastIndexOf("?");
|
|
3346
3421
|
t == -1 && (t = e.length);
|
|
3347
3422
|
let r = e.lastIndexOf(".", t);
|
|
3348
3423
|
return r == -1 ? "" : e.substring(r + 1, t);
|
|
3349
3424
|
}
|
|
3350
|
-
|
|
3351
|
-
if (!this.options.nature) return !1;
|
|
3352
|
-
if (typeof this.options.nature == "function") return this.options.nature(e);
|
|
3353
|
-
const t = this.options.nature;
|
|
3354
|
-
if (t && Array.isArray(t)) for (let r = 0; r < t.length; r++) {
|
|
3355
|
-
const s = t[r];
|
|
3356
|
-
if (e.indexOf(s) === 0) return !0;
|
|
3357
|
-
}
|
|
3358
|
-
return !1;
|
|
3359
|
-
}
|
|
3360
|
-
parserPath(e, t) {
|
|
3361
|
-
if (e.indexOf("http://") == 0 || e.indexOf("https://") == 0 || e.indexOf("file:///") == 0) return e;
|
|
3362
|
-
if (e.indexOf("/") == 0) return `${vt()}${e.slice(1)}`;
|
|
3363
|
-
if (e.indexOf("./") == 0) return `${vt()}${e.slice(2)}`;
|
|
3364
|
-
if (e.indexOf("//") == 0) return `${A().location.protocol}${e}`;
|
|
3365
|
-
if (t) {
|
|
3366
|
-
let r = this.options.alias[e];
|
|
3367
|
-
if (!r) {
|
|
3368
|
-
let s = e.indexOf("/");
|
|
3369
|
-
if (s == -1) r = e;
|
|
3370
|
-
else {
|
|
3371
|
-
let n = e.slice(0, s), i = this.options.paths[n];
|
|
3372
|
-
i ? r = i + e.slice(s) : r = e;
|
|
3373
|
-
}
|
|
3374
|
-
}
|
|
3375
|
-
return this.parserPath(r, !1);
|
|
3376
|
-
}
|
|
3377
|
-
return `${vt()}${e}`;
|
|
3378
|
-
}
|
|
3379
|
-
};
|
|
3380
|
-
function is(e, t) {
|
|
3381
|
-
let r = e.sheet, s = !1;
|
|
3382
|
-
if (t.isOldWebKit)
|
|
3383
|
-
r && (s = !0);
|
|
3384
|
-
else if (r) try {
|
|
3385
|
-
r.cssRules && (s = !0);
|
|
3386
|
-
} catch (n) {
|
|
3387
|
-
n.name === "NS_ERROR_DOM_SECURITY_ERR" && (s = !0);
|
|
3388
|
-
}
|
|
3389
|
-
setTimeout(() => {
|
|
3390
|
-
t.time += 20, s ? t.success() : t.timeout > t.timeout ? t.error() : is(e, t);
|
|
3391
|
-
}, 20);
|
|
3392
|
-
}
|
|
3393
|
-
var Ci = class {
|
|
3425
|
+
}, _i = class {
|
|
3394
3426
|
callback;
|
|
3395
3427
|
values;
|
|
3396
3428
|
status;
|
|
@@ -3409,17 +3441,16 @@ var Ci = class {
|
|
|
3409
3441
|
isOK() {
|
|
3410
3442
|
return this.status;
|
|
3411
3443
|
}
|
|
3412
|
-
},
|
|
3444
|
+
}, Ci = class {
|
|
3413
3445
|
index;
|
|
3414
|
-
|
|
3415
|
-
params;
|
|
3446
|
+
resource;
|
|
3416
3447
|
progress;
|
|
3417
|
-
constructor(e, t, r
|
|
3418
|
-
this.index = e, this.
|
|
3448
|
+
constructor(e, t, r) {
|
|
3449
|
+
this.index = e, this.resource = t, this.progress = r;
|
|
3419
3450
|
}
|
|
3420
|
-
},
|
|
3451
|
+
}, is = Symbol("fk"), ns = Symbol("fbk"), os = Symbol("fepk");
|
|
3421
3452
|
function Vi(e = {}) {
|
|
3422
|
-
const t = new
|
|
3453
|
+
const t = new bi(e), r = new nr(), s = new yr(), i = new Cr(), n = {
|
|
3423
3454
|
get router() {
|
|
3424
3455
|
return t;
|
|
3425
3456
|
},
|
|
@@ -3427,35 +3458,29 @@ function Vi(e = {}) {
|
|
|
3427
3458
|
return r;
|
|
3428
3459
|
},
|
|
3429
3460
|
get Bus() {
|
|
3430
|
-
return
|
|
3461
|
+
return nr;
|
|
3431
3462
|
},
|
|
3432
3463
|
get EventProxy() {
|
|
3433
|
-
return
|
|
3464
|
+
return yr;
|
|
3434
3465
|
},
|
|
3435
3466
|
get eventproxy() {
|
|
3436
3467
|
return s;
|
|
3437
3468
|
},
|
|
3438
3469
|
get EventChain() {
|
|
3439
|
-
return
|
|
3470
|
+
return ft;
|
|
3440
3471
|
},
|
|
3441
3472
|
get Require() {
|
|
3442
|
-
return
|
|
3473
|
+
return Cr;
|
|
3443
3474
|
},
|
|
3444
3475
|
get require() {
|
|
3445
|
-
return
|
|
3446
|
-
},
|
|
3447
|
-
get extend() {
|
|
3448
|
-
return _;
|
|
3449
|
-
},
|
|
3450
|
-
get clone() {
|
|
3451
|
-
return Gt;
|
|
3476
|
+
return i;
|
|
3452
3477
|
},
|
|
3453
3478
|
get isESModule() {
|
|
3454
|
-
return
|
|
3479
|
+
return zt;
|
|
3455
3480
|
},
|
|
3456
3481
|
install(a) {
|
|
3457
|
-
a.provide(ht, t), a.provide(
|
|
3458
|
-
return
|
|
3482
|
+
a.provide(ht, t), a.provide(is, n), a.provide(ns, r), a.provide(os, s), a.component(Ri, Ut), a.component(Si, ii), Reflect.defineProperty(a.config.globalProperties, "$fox", { get() {
|
|
3483
|
+
return n;
|
|
3459
3484
|
} }), Reflect.defineProperty(a.config.globalProperties, "$router", { get() {
|
|
3460
3485
|
return t;
|
|
3461
3486
|
} }), Reflect.defineProperty(a.config.globalProperties, "$bus", { get() {
|
|
@@ -3464,122 +3489,121 @@ function Vi(e = {}) {
|
|
|
3464
3489
|
return r;
|
|
3465
3490
|
} }), Reflect.defineProperty(a.config.globalProperties, "$eventProxy", { get() {
|
|
3466
3491
|
return s;
|
|
3467
|
-
} }), a.config.globalProperties.$fox_on = function(
|
|
3468
|
-
s.on(
|
|
3469
|
-
}, a.config.globalProperties.$fox_off = function(
|
|
3470
|
-
s.off(
|
|
3471
|
-
}, a.config.globalProperties.$fox_once = function(
|
|
3472
|
-
s.once(
|
|
3473
|
-
}, a.config.globalProperties.$fox_all = function(...
|
|
3474
|
-
let
|
|
3475
|
-
Reflect.apply(
|
|
3476
|
-
}, a.config.globalProperties.$fox_trigger = function(
|
|
3492
|
+
} }), a.config.globalProperties.$fox_on = function(l, o, u = !1) {
|
|
3493
|
+
s.on(l, o, u);
|
|
3494
|
+
}, a.config.globalProperties.$fox_off = function(l, o) {
|
|
3495
|
+
s.off(l, o);
|
|
3496
|
+
}, a.config.globalProperties.$fox_once = function(l, o) {
|
|
3497
|
+
s.once(l, o);
|
|
3498
|
+
}, a.config.globalProperties.$fox_all = function(...l) {
|
|
3499
|
+
let o = s;
|
|
3500
|
+
Reflect.apply(o.all, o, l);
|
|
3501
|
+
}, a.config.globalProperties.$fox_trigger = function(l, ...o) {
|
|
3477
3502
|
let u = s;
|
|
3478
|
-
Reflect.apply(u.trigger, u, [
|
|
3479
|
-
}, a.config.globalProperties.$fox_emit = function(
|
|
3503
|
+
Reflect.apply(u.trigger, u, [l, ...o]);
|
|
3504
|
+
}, a.config.globalProperties.$fox_emit = function(l, ...o) {
|
|
3480
3505
|
let u = s;
|
|
3481
|
-
Reflect.apply(u.trigger, u, [
|
|
3506
|
+
Reflect.apply(u.trigger, u, [l, ...o]);
|
|
3482
3507
|
}, a.mixin({ computed: { $route() {
|
|
3483
3508
|
return Zt(this);
|
|
3484
3509
|
} } }), t.init();
|
|
3485
3510
|
}
|
|
3486
3511
|
};
|
|
3487
|
-
return
|
|
3512
|
+
return n;
|
|
3488
3513
|
}
|
|
3489
|
-
function
|
|
3514
|
+
function ls(e) {
|
|
3490
3515
|
return e ? e.$router : G(ht);
|
|
3491
3516
|
}
|
|
3492
3517
|
function Wi(e) {
|
|
3493
|
-
return e || (e =
|
|
3518
|
+
return e || (e = Vt()?.proxy ?? void 0), e ? Zt(e) : null;
|
|
3494
3519
|
}
|
|
3495
3520
|
function Ji(e) {
|
|
3496
|
-
return e ? e.$fox : G(
|
|
3521
|
+
return e ? e.$fox : G(is);
|
|
3497
3522
|
}
|
|
3498
3523
|
function zi(e) {
|
|
3499
|
-
return e ? e.$bus : G(
|
|
3524
|
+
return e ? e.$bus : G(ns);
|
|
3500
3525
|
}
|
|
3501
3526
|
function Gi(e) {
|
|
3502
|
-
return e ? e.$eventProxy : G(
|
|
3527
|
+
return e ? e.$eventProxy : G(os);
|
|
3503
3528
|
}
|
|
3504
3529
|
function Xi(e) {
|
|
3505
|
-
const t =
|
|
3530
|
+
const t = ls(), r = (s, i, n) => {
|
|
3506
3531
|
try {
|
|
3507
|
-
Reflect.apply(e, {}, [s,
|
|
3532
|
+
Reflect.apply(e, {}, [s, i]);
|
|
3508
3533
|
} catch (a) {
|
|
3509
3534
|
console.error(a);
|
|
3510
3535
|
}
|
|
3511
|
-
|
|
3536
|
+
n();
|
|
3512
3537
|
};
|
|
3513
|
-
t.beforeEach(r),
|
|
3538
|
+
t.beforeEach(r), ct(() => {
|
|
3514
3539
|
t.removeBeforeEach(r);
|
|
3515
3540
|
});
|
|
3516
3541
|
}
|
|
3517
3542
|
function Qi(e) {
|
|
3518
|
-
const t =
|
|
3543
|
+
const t = ls(), r = (s, i, n) => {
|
|
3519
3544
|
try {
|
|
3520
|
-
Reflect.apply(e, {}, [s,
|
|
3545
|
+
Reflect.apply(e, {}, [s, i]);
|
|
3521
3546
|
} catch (a) {
|
|
3522
3547
|
console.error(a);
|
|
3523
3548
|
}
|
|
3524
|
-
|
|
3549
|
+
n();
|
|
3525
3550
|
};
|
|
3526
|
-
t.afterEach(r),
|
|
3551
|
+
t.afterEach(r), ct(() => {
|
|
3527
3552
|
t.removeAfterEach(r);
|
|
3528
3553
|
});
|
|
3529
3554
|
}
|
|
3530
3555
|
export {
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3556
|
+
nr as Bus,
|
|
3557
|
+
ft as EventChain,
|
|
3558
|
+
yr as EventProxy,
|
|
3559
|
+
Ks as FoxBeforeEnter,
|
|
3560
|
+
qs as FoxBeforeLeave,
|
|
3561
|
+
$s as FoxEnter,
|
|
3562
|
+
js as FoxLeave,
|
|
3538
3563
|
Ht as FoxLeaveEnd,
|
|
3539
|
-
|
|
3564
|
+
C as OperationType,
|
|
3540
3565
|
x as Route,
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
Gt as clone,
|
|
3566
|
+
ii as RouterLink,
|
|
3567
|
+
Ut as RouterView,
|
|
3544
3568
|
Vi as createFox,
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3569
|
+
pi as createMemoryHistory,
|
|
3570
|
+
mi as createWebHashHistory,
|
|
3571
|
+
Ni as createWebHistory,
|
|
3572
|
+
Bi as deleteContextValue,
|
|
3573
|
+
q as extend,
|
|
3574
|
+
ns as foxBusKey,
|
|
3575
|
+
os as foxEventProxyKey,
|
|
3576
|
+
is as foxKey,
|
|
3577
|
+
Nr as injectContextValue,
|
|
3578
|
+
er as isArray,
|
|
3579
|
+
$i as isDate,
|
|
3580
|
+
zt as isESModule,
|
|
3581
|
+
rr as isEqual,
|
|
3582
|
+
b as isFunction,
|
|
3583
|
+
Ai as isMap,
|
|
3584
|
+
He as isNil,
|
|
3585
|
+
ds as isObject,
|
|
3586
|
+
vs as isPlainObject,
|
|
3587
|
+
Mi as isPromise,
|
|
3588
|
+
Ki as isSet,
|
|
3565
3589
|
qi as isString,
|
|
3566
3590
|
ji as isSymbol,
|
|
3567
3591
|
Qi as onAfterRouteUpdate,
|
|
3568
3592
|
Xi as onBeforeRouteUpdate,
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3593
|
+
Di as onFoxActivated,
|
|
3594
|
+
Hi as onFoxInactivated,
|
|
3595
|
+
Oi as provideContextValue,
|
|
3572
3596
|
Ii as rawState,
|
|
3573
|
-
|
|
3597
|
+
Ti as reactiveState,
|
|
3574
3598
|
oe as sessionKey,
|
|
3575
3599
|
ki as shallowReactiveState,
|
|
3576
|
-
|
|
3600
|
+
$r as toBoolean,
|
|
3577
3601
|
Li as toNumber,
|
|
3578
|
-
|
|
3579
|
-
|
|
3602
|
+
Jt as toTypeString,
|
|
3603
|
+
tr as typeOf,
|
|
3580
3604
|
zi as useBus,
|
|
3581
3605
|
Gi as useEventProxy,
|
|
3582
3606
|
Ji as useFox,
|
|
3583
3607
|
Wi as useRoute,
|
|
3584
|
-
|
|
3608
|
+
ls as useRouter
|
|
3585
3609
|
};
|