instaui 0.1.18__py2.py3-none-any.whl → 0.2.0__py2.py3-none-any.whl
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.
- instaui/components/component.py +4 -7
- instaui/components/element.py +0 -16
- instaui/components/html/button.py +2 -2
- instaui/components/html/input.py +2 -2
- instaui/components/html/select.py +3 -2
- instaui/components/html/textarea.py +2 -2
- instaui/components/match.py +4 -6
- instaui/components/mixins.py +12 -0
- instaui/components/vfor.py +2 -4
- instaui/components/vif.py +2 -4
- instaui/event/js_event.py +0 -2
- instaui/event/vue_event.py +0 -3
- instaui/event/web_event.py +25 -5
- instaui/fastapi_server/middlewares.py +12 -0
- instaui/fastapi_server/server.py +5 -1
- instaui/js/fn.py +5 -1
- instaui/pre_setup.py +45 -0
- instaui/runtime/_app.py +7 -3
- instaui/runtime/scope.py +74 -33
- instaui/spa_router/_route_model.py +5 -6
- instaui/static/insta-ui.esm-browser.prod.js +1523 -1504
- instaui/static/insta-ui.js.map +1 -1
- instaui/static/templates/web.html +5 -3
- instaui/static/templates/webview.html +4 -2
- instaui/static/templates/zero.html +4 -2
- instaui/template/web_template.py +1 -0
- instaui/template/webview_template.py +1 -0
- instaui/template/zero_template.py +1 -0
- instaui/ui/__init__.py +2 -0
- instaui/ui/__init__.pyi +2 -0
- instaui/ui_functions/server.py +10 -1
- instaui/vars/data.py +5 -7
- instaui/vars/js_computed.py +6 -22
- instaui/vars/mixin_types/element_binding.py +1 -13
- instaui/vars/ref.py +5 -7
- instaui/vars/vue_computed.py +6 -21
- instaui/vars/web_computed.py +6 -23
- instaui/watch/js_watch.py +0 -2
- instaui/watch/web_watch.py +11 -2
- instaui/webview/resource.py +2 -0
- instaui/zero/func.py +2 -0
- {instaui-0.1.18.dist-info → instaui-0.2.0.dist-info}/METADATA +4 -3
- {instaui-0.1.18.dist-info → instaui-0.2.0.dist-info}/RECORD +45 -44
- instaui/webview/func.py +0 -114
- {instaui-0.1.18.dist-info → instaui-0.2.0.dist-info}/WHEEL +0 -0
- {instaui-0.1.18.dist-info → instaui-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,17 +1,17 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var B = (e, t, n) =>
|
4
|
-
import * as
|
5
|
-
import { toRaw as
|
6
|
-
let
|
1
|
+
var Ln = Object.defineProperty;
|
2
|
+
var Wn = (e, t, n) => t in e ? Ln(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
+
var B = (e, t, n) => Wn(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import * as Un from "vue";
|
5
|
+
import { toRaw as Gn, customRef as Ce, toValue as q, unref as M, watch as H, nextTick as Ie, isRef as Ht, shallowRef as X, ref as K, watchEffect as zt, computed as G, readonly as qn, provide as Ne, inject as Z, shallowReactive as Kn, defineComponent as U, reactive as Hn, h as A, getCurrentInstance as Qt, normalizeStyle as zn, normalizeClass as Je, toDisplayString as lt, onUnmounted as ft, Fragment as xe, vModelDynamic as Qn, vShow as Jn, resolveDynamicComponent as Yn, normalizeProps as Xn, withDirectives as Zn, onErrorCaptured as er, openBlock as ie, createElementBlock as pe, createElementVNode as tr, createVNode as nr, withCtx as rr, renderList as or, createBlock as sr, createCommentVNode as ir, TransitionGroup as Jt, KeepAlive as ar } from "vue";
|
6
|
+
let Yt;
|
7
7
|
function cr(e) {
|
8
|
-
|
8
|
+
Yt = e;
|
9
9
|
}
|
10
|
-
function
|
11
|
-
return
|
10
|
+
function Ye() {
|
11
|
+
return Yt;
|
12
12
|
}
|
13
|
-
function
|
14
|
-
const { queryPath: e, pathParams: t, queryParams: n } =
|
13
|
+
function Te() {
|
14
|
+
const { queryPath: e, pathParams: t, queryParams: n } = Ye();
|
15
15
|
return {
|
16
16
|
path: e,
|
17
17
|
...t === void 0 ? {} : { params: t },
|
@@ -30,42 +30,42 @@ class ur extends Map {
|
|
30
30
|
return super.get(t);
|
31
31
|
}
|
32
32
|
}
|
33
|
-
function
|
33
|
+
function Se(e) {
|
34
34
|
return new ur(e);
|
35
35
|
}
|
36
|
-
function
|
36
|
+
function bt(e, t) {
|
37
37
|
Object.entries(e).forEach(([n, r]) => t(r, n));
|
38
38
|
}
|
39
|
-
function
|
40
|
-
return
|
39
|
+
function je(e, t) {
|
40
|
+
return Xt(e, {
|
41
41
|
valueFn: t
|
42
42
|
});
|
43
43
|
}
|
44
|
-
function
|
44
|
+
function Xt(e, t) {
|
45
45
|
const { valueFn: n, keyFn: r } = t;
|
46
46
|
return Object.fromEntries(
|
47
|
-
Object.entries(e).map(([o,
|
48
|
-
r ? r(o,
|
49
|
-
n(
|
47
|
+
Object.entries(e).map(([o, i], s) => [
|
48
|
+
r ? r(o, i) : o,
|
49
|
+
n(i, o, s)
|
50
50
|
])
|
51
51
|
);
|
52
52
|
}
|
53
|
-
function
|
53
|
+
function Zt(e, t, n) {
|
54
54
|
if (Array.isArray(t)) {
|
55
|
-
const [o, ...
|
55
|
+
const [o, ...i] = t;
|
56
56
|
switch (o) {
|
57
57
|
case "!":
|
58
58
|
return !e;
|
59
59
|
case "+":
|
60
|
-
return e +
|
60
|
+
return e + i[0];
|
61
61
|
case "~+":
|
62
|
-
return
|
62
|
+
return i[0] + e;
|
63
63
|
}
|
64
64
|
}
|
65
|
-
const r =
|
65
|
+
const r = en(t, n);
|
66
66
|
return e[r];
|
67
67
|
}
|
68
|
-
function
|
68
|
+
function en(e, t) {
|
69
69
|
if (typeof e == "string" || typeof e == "number")
|
70
70
|
return e;
|
71
71
|
if (!Array.isArray(e))
|
@@ -82,33 +82,33 @@ function tn(e, t) {
|
|
82
82
|
}
|
83
83
|
function be(e, t, n) {
|
84
84
|
return t.reduce(
|
85
|
-
(r, o) =>
|
85
|
+
(r, o) => Zt(r, o, n),
|
86
86
|
e
|
87
87
|
);
|
88
88
|
}
|
89
|
-
function
|
90
|
-
t.reduce((o,
|
91
|
-
if (
|
92
|
-
o[
|
89
|
+
function Xe(e, t, n, r) {
|
90
|
+
t.reduce((o, i, s) => {
|
91
|
+
if (s === t.length - 1)
|
92
|
+
o[en(i, r)] = n;
|
93
93
|
else
|
94
|
-
return
|
94
|
+
return Zt(o, i, r);
|
95
95
|
}, e);
|
96
96
|
}
|
97
|
-
function
|
98
|
-
return JSON.parse(JSON.stringify(e));
|
97
|
+
function tn(e) {
|
98
|
+
return typeof e == "function" ? e : JSON.parse(JSON.stringify(e));
|
99
99
|
}
|
100
100
|
class lr {
|
101
101
|
toString() {
|
102
102
|
return "";
|
103
103
|
}
|
104
104
|
}
|
105
|
-
const
|
106
|
-
function
|
107
|
-
return
|
105
|
+
const Ee = new lr();
|
106
|
+
function _e(e) {
|
107
|
+
return Gn(e) === Ee;
|
108
108
|
}
|
109
109
|
function Ot(e, t, n) {
|
110
|
-
const { paths: r, getBindableValueFn: o } = t, { paths:
|
111
|
-
return r === void 0 || r.length === 0 ? e :
|
110
|
+
const { paths: r, getBindableValueFn: o } = t, { paths: i, getBindableValueFn: s } = t;
|
111
|
+
return r === void 0 || r.length === 0 ? e : Ce(() => ({
|
112
112
|
get() {
|
113
113
|
try {
|
114
114
|
return be(
|
@@ -120,194 +120,194 @@ function Ot(e, t, n) {
|
|
120
120
|
return;
|
121
121
|
}
|
122
122
|
},
|
123
|
-
set(
|
124
|
-
|
123
|
+
set(c) {
|
124
|
+
Xe(
|
125
125
|
q(e),
|
126
|
-
|
127
|
-
|
128
|
-
|
126
|
+
i || r,
|
127
|
+
c,
|
128
|
+
s
|
129
129
|
);
|
130
130
|
}
|
131
131
|
}));
|
132
132
|
}
|
133
|
-
function
|
134
|
-
return
|
133
|
+
function dt(e) {
|
134
|
+
return Ce((t, n) => ({
|
135
135
|
get() {
|
136
136
|
return t(), e;
|
137
137
|
},
|
138
138
|
set(r) {
|
139
|
-
!
|
139
|
+
!_e(e) && JSON.stringify(r) === JSON.stringify(e) || (e = r, n());
|
140
140
|
}
|
141
141
|
}));
|
142
142
|
}
|
143
|
-
function
|
144
|
-
return typeof e == "function" ? e() :
|
143
|
+
function me(e) {
|
144
|
+
return typeof e == "function" ? e() : M(e);
|
145
145
|
}
|
146
146
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
147
|
-
const
|
147
|
+
const Ze = () => {
|
148
148
|
};
|
149
|
-
function
|
149
|
+
function et(e, t = !1, n = "Timeout") {
|
150
150
|
return new Promise((r, o) => {
|
151
151
|
setTimeout(t ? () => o(n) : r, e);
|
152
152
|
});
|
153
153
|
}
|
154
|
-
function
|
155
|
-
function n(a, { flush: f = "sync", deep:
|
154
|
+
function tt(e, t = !1) {
|
155
|
+
function n(a, { flush: f = "sync", deep: h = !1, timeout: v, throwOnTimeout: p } = {}) {
|
156
156
|
let g = null;
|
157
|
-
const _ = [new Promise((
|
158
|
-
g =
|
157
|
+
const _ = [new Promise((b) => {
|
158
|
+
g = H(
|
159
159
|
e,
|
160
|
-
(
|
161
|
-
a(
|
160
|
+
(V) => {
|
161
|
+
a(V) !== t && (g ? g() : Ie(() => g == null ? void 0 : g()), b(V));
|
162
162
|
},
|
163
163
|
{
|
164
164
|
flush: f,
|
165
|
-
deep:
|
165
|
+
deep: h,
|
166
166
|
immediate: !0
|
167
167
|
}
|
168
168
|
);
|
169
169
|
})];
|
170
170
|
return v != null && _.push(
|
171
|
-
|
171
|
+
et(v, p).then(() => me(e)).finally(() => g == null ? void 0 : g())
|
172
172
|
), Promise.race(_);
|
173
173
|
}
|
174
174
|
function r(a, f) {
|
175
175
|
if (!Ht(a))
|
176
|
-
return n((
|
177
|
-
const { flush:
|
176
|
+
return n((V) => V === a, f);
|
177
|
+
const { flush: h = "sync", deep: v = !1, timeout: p, throwOnTimeout: g } = f ?? {};
|
178
178
|
let y = null;
|
179
|
-
const
|
180
|
-
y =
|
179
|
+
const b = [new Promise((V) => {
|
180
|
+
y = H(
|
181
181
|
[e, a],
|
182
|
-
([
|
183
|
-
t !== (
|
182
|
+
([C, j]) => {
|
183
|
+
t !== (C === j) && (y ? y() : Ie(() => y == null ? void 0 : y()), V(C));
|
184
184
|
},
|
185
185
|
{
|
186
|
-
flush:
|
186
|
+
flush: h,
|
187
187
|
deep: v,
|
188
188
|
immediate: !0
|
189
189
|
}
|
190
190
|
);
|
191
191
|
})];
|
192
|
-
return p != null &&
|
193
|
-
|
194
|
-
), Promise.race(
|
192
|
+
return p != null && b.push(
|
193
|
+
et(p, g).then(() => me(e)).finally(() => (y == null || y(), me(e)))
|
194
|
+
), Promise.race(b);
|
195
195
|
}
|
196
196
|
function o(a) {
|
197
197
|
return n((f) => !!f, a);
|
198
198
|
}
|
199
|
-
function
|
199
|
+
function i(a) {
|
200
200
|
return r(null, a);
|
201
201
|
}
|
202
|
-
function
|
202
|
+
function s(a) {
|
203
203
|
return r(void 0, a);
|
204
204
|
}
|
205
|
-
function
|
205
|
+
function c(a) {
|
206
206
|
return n(Number.isNaN, a);
|
207
207
|
}
|
208
208
|
function l(a, f) {
|
209
|
-
return n((
|
210
|
-
const v = Array.from(
|
211
|
-
return v.includes(a) || v.includes(
|
209
|
+
return n((h) => {
|
210
|
+
const v = Array.from(h);
|
211
|
+
return v.includes(a) || v.includes(me(a));
|
212
212
|
}, f);
|
213
213
|
}
|
214
|
-
function
|
215
|
-
return
|
214
|
+
function d(a) {
|
215
|
+
return u(1, a);
|
216
216
|
}
|
217
|
-
function
|
218
|
-
let
|
219
|
-
return n(() => (
|
217
|
+
function u(a = 1, f) {
|
218
|
+
let h = -1;
|
219
|
+
return n(() => (h += 1, h >= a), f);
|
220
220
|
}
|
221
|
-
return Array.isArray(
|
221
|
+
return Array.isArray(me(e)) ? {
|
222
222
|
toMatch: n,
|
223
223
|
toContains: l,
|
224
|
-
changed:
|
225
|
-
changedTimes:
|
224
|
+
changed: d,
|
225
|
+
changedTimes: u,
|
226
226
|
get not() {
|
227
|
-
return
|
227
|
+
return tt(e, !t);
|
228
228
|
}
|
229
229
|
} : {
|
230
230
|
toMatch: n,
|
231
231
|
toBe: r,
|
232
232
|
toBeTruthy: o,
|
233
|
-
toBeNull:
|
234
|
-
toBeNaN:
|
235
|
-
toBeUndefined:
|
236
|
-
changed:
|
237
|
-
changedTimes:
|
233
|
+
toBeNull: i,
|
234
|
+
toBeNaN: c,
|
235
|
+
toBeUndefined: s,
|
236
|
+
changed: d,
|
237
|
+
changedTimes: u,
|
238
238
|
get not() {
|
239
|
-
return
|
239
|
+
return tt(e, !t);
|
240
240
|
}
|
241
241
|
};
|
242
242
|
}
|
243
243
|
function fr(e) {
|
244
|
-
return
|
244
|
+
return tt(e);
|
245
245
|
}
|
246
|
-
function
|
246
|
+
function dr(e, t, n) {
|
247
247
|
let r;
|
248
248
|
Ht(n) ? r = {
|
249
249
|
evaluating: n
|
250
250
|
} : r = n || {};
|
251
251
|
const {
|
252
252
|
lazy: o = !1,
|
253
|
-
evaluating:
|
254
|
-
shallow:
|
255
|
-
onError:
|
256
|
-
} = r, l =
|
257
|
-
let
|
253
|
+
evaluating: i = void 0,
|
254
|
+
shallow: s = !0,
|
255
|
+
onError: c = Ze
|
256
|
+
} = r, l = K(!o), d = s ? X(t) : K(t);
|
257
|
+
let u = 0;
|
258
258
|
return zt(async (a) => {
|
259
259
|
if (!l.value)
|
260
260
|
return;
|
261
|
-
|
262
|
-
const f =
|
263
|
-
let
|
264
|
-
|
265
|
-
|
261
|
+
u++;
|
262
|
+
const f = u;
|
263
|
+
let h = !1;
|
264
|
+
i && Promise.resolve().then(() => {
|
265
|
+
i.value = !0;
|
266
266
|
});
|
267
267
|
try {
|
268
268
|
const v = await e((p) => {
|
269
269
|
a(() => {
|
270
|
-
|
270
|
+
i && (i.value = !1), h || p();
|
271
271
|
});
|
272
272
|
});
|
273
|
-
f ===
|
273
|
+
f === u && (d.value = v);
|
274
274
|
} catch (v) {
|
275
|
-
|
275
|
+
c(v);
|
276
276
|
} finally {
|
277
|
-
|
277
|
+
i && f === u && (i.value = !1), h = !0;
|
278
278
|
}
|
279
|
-
}), o ?
|
279
|
+
}), o ? G(() => (l.value = !0, d.value)) : d;
|
280
280
|
}
|
281
|
-
function
|
281
|
+
function hr(e, t, n) {
|
282
282
|
const {
|
283
283
|
immediate: r = !0,
|
284
284
|
delay: o = 0,
|
285
|
-
onError:
|
286
|
-
onSuccess:
|
287
|
-
resetOnExecute:
|
285
|
+
onError: i = Ze,
|
286
|
+
onSuccess: s = Ze,
|
287
|
+
resetOnExecute: c = !0,
|
288
288
|
shallow: l = !0,
|
289
|
-
throwError:
|
290
|
-
} = {},
|
289
|
+
throwError: d
|
290
|
+
} = {}, u = l ? X(t) : K(t), a = K(!1), f = K(!1), h = X(void 0);
|
291
291
|
async function v(y = 0, ..._) {
|
292
|
-
|
293
|
-
const
|
292
|
+
c && (u.value = t), h.value = void 0, a.value = !1, f.value = !0, y > 0 && await et(y);
|
293
|
+
const b = typeof e == "function" ? e(..._) : e;
|
294
294
|
try {
|
295
|
-
const
|
296
|
-
|
297
|
-
} catch (
|
298
|
-
if (
|
299
|
-
throw
|
295
|
+
const V = await b;
|
296
|
+
u.value = V, a.value = !0, s(V);
|
297
|
+
} catch (V) {
|
298
|
+
if (h.value = V, i(V), d)
|
299
|
+
throw V;
|
300
300
|
} finally {
|
301
301
|
f.value = !1;
|
302
302
|
}
|
303
|
-
return
|
303
|
+
return u.value;
|
304
304
|
}
|
305
305
|
r && v(o);
|
306
306
|
const p = {
|
307
|
-
state:
|
307
|
+
state: u,
|
308
308
|
isReady: a,
|
309
309
|
isLoading: f,
|
310
|
-
error:
|
310
|
+
error: h,
|
311
311
|
execute: v
|
312
312
|
};
|
313
313
|
function g() {
|
@@ -322,9 +322,9 @@ function dr(e, t, n) {
|
|
322
322
|
}
|
323
323
|
};
|
324
324
|
}
|
325
|
-
function
|
325
|
+
function L(e, t) {
|
326
326
|
t = t || {};
|
327
|
-
const n = [...Object.keys(t), "__Vue"], r = [...Object.values(t),
|
327
|
+
const n = [...Object.keys(t), "__Vue"], r = [...Object.values(t), Un];
|
328
328
|
try {
|
329
329
|
return new Function(...n, `return (${e})`)(...r);
|
330
330
|
} catch (o) {
|
@@ -335,116 +335,116 @@ function pr(e) {
|
|
335
335
|
if (e.startsWith(":")) {
|
336
336
|
e = e.slice(1);
|
337
337
|
try {
|
338
|
-
return
|
338
|
+
return L(e);
|
339
339
|
} catch (t) {
|
340
340
|
throw new Error(t + " in function code: " + e);
|
341
341
|
}
|
342
342
|
}
|
343
343
|
}
|
344
|
-
function
|
344
|
+
function nn(e) {
|
345
345
|
return e.constructor.name === "AsyncFunction";
|
346
346
|
}
|
347
347
|
function mr(e, t) {
|
348
348
|
const { deepCompare: n = !1 } = e;
|
349
|
-
return n ?
|
349
|
+
return n ? dt(e.value) : K(e.value);
|
350
350
|
}
|
351
351
|
function gr(e, t, n) {
|
352
|
-
const { bind: r = {}, code: o, const:
|
353
|
-
if (
|
354
|
-
return
|
352
|
+
const { bind: r = {}, code: o, const: i = [] } = e, s = Object.values(r).map((u, a) => i[a] === 1 ? u : t.getVueRefObjectOrValue(u));
|
353
|
+
if (nn(new Function(o)))
|
354
|
+
return dr(
|
355
355
|
async () => {
|
356
|
-
const
|
357
|
-
Object.keys(r).map((a, f) => [a,
|
356
|
+
const u = Object.fromEntries(
|
357
|
+
Object.keys(r).map((a, f) => [a, s[f]])
|
358
358
|
);
|
359
|
-
return await
|
359
|
+
return await L(o, u)();
|
360
360
|
},
|
361
361
|
null,
|
362
362
|
{ lazy: !0 }
|
363
363
|
);
|
364
|
-
const
|
365
|
-
Object.keys(r).map((
|
366
|
-
), l =
|
367
|
-
return
|
364
|
+
const c = Object.fromEntries(
|
365
|
+
Object.keys(r).map((u, a) => [u, s[a]])
|
366
|
+
), l = L(o, c);
|
367
|
+
return G(l);
|
368
368
|
}
|
369
369
|
function vr(e, t, n) {
|
370
370
|
const {
|
371
371
|
inputs: r = [],
|
372
372
|
code: o,
|
373
|
-
slient:
|
374
|
-
data:
|
375
|
-
asyncInit:
|
373
|
+
slient: i,
|
374
|
+
data: s,
|
375
|
+
asyncInit: c = null,
|
376
376
|
deepEqOnInput: l = 0
|
377
|
-
} = e,
|
377
|
+
} = e, d = i || Array(r.length).fill(0), u = s || Array(r.length).fill(0), a = r.filter((g, y) => d[y] === 0 && u[y] === 0).map((g) => t.getVueRefObject(g));
|
378
378
|
function f() {
|
379
379
|
return r.map(
|
380
|
-
(g, y) =>
|
380
|
+
(g, y) => u[y] === 1 ? g : t.getObjectToValue(g)
|
381
381
|
);
|
382
382
|
}
|
383
|
-
const
|
384
|
-
return
|
383
|
+
const h = L(o), v = l === 0 ? X(Ee) : dt(Ee), p = { immediate: !0, deep: !0 };
|
384
|
+
return nn(h) ? (v.value = c, H(
|
385
385
|
a,
|
386
386
|
async () => {
|
387
|
-
f().some(
|
387
|
+
f().some(_e) || (v.value = await h(...f()));
|
388
388
|
},
|
389
389
|
p
|
390
|
-
)) :
|
390
|
+
)) : H(
|
391
391
|
a,
|
392
392
|
() => {
|
393
393
|
const g = f();
|
394
|
-
g.some(
|
394
|
+
g.some(_e) || (v.value = h(...g));
|
395
395
|
},
|
396
396
|
p
|
397
|
-
),
|
397
|
+
), qn(v);
|
398
398
|
}
|
399
399
|
function yr() {
|
400
400
|
return [];
|
401
401
|
}
|
402
|
-
const
|
403
|
-
function
|
404
|
-
var
|
405
|
-
const n =
|
402
|
+
const Oe = Se(yr);
|
403
|
+
function wr(e, t) {
|
404
|
+
var i, s, c, l, d;
|
405
|
+
const n = Oe.getOrDefault(e.id), r = /* @__PURE__ */ new Map();
|
406
406
|
n.push(r), t.replaceSnapshot({
|
407
|
-
scopeSnapshot:
|
407
|
+
scopeSnapshot: rn()
|
408
408
|
});
|
409
|
-
const o = (
|
410
|
-
r.set(
|
409
|
+
const o = (u, a) => {
|
410
|
+
r.set(u.id, a);
|
411
411
|
};
|
412
|
-
return (
|
413
|
-
o(
|
414
|
-
}), (
|
415
|
-
const { init: a } =
|
416
|
-
o(
|
417
|
-
}), (
|
412
|
+
return (i = e.refs) == null || i.forEach((u) => {
|
413
|
+
o(u, mr(u));
|
414
|
+
}), (s = e.web_computed) == null || s.forEach((u) => {
|
415
|
+
const { init: a } = u, f = u.deepEqOnInput === void 0 ? X(a ?? Ee) : dt(a ?? Ee);
|
416
|
+
o(u, f);
|
417
|
+
}), (c = e.vue_computed) == null || c.forEach((u) => {
|
418
418
|
o(
|
419
|
-
|
420
|
-
gr(
|
419
|
+
u,
|
420
|
+
gr(u, t)
|
421
421
|
);
|
422
|
-
}), (l = e.js_computed) == null || l.forEach((
|
422
|
+
}), (l = e.js_computed) == null || l.forEach((u) => {
|
423
423
|
o(
|
424
|
-
|
425
|
-
vr(
|
424
|
+
u,
|
425
|
+
vr(u, t)
|
426
426
|
);
|
427
|
-
}), (
|
428
|
-
o(
|
427
|
+
}), (d = e.data) == null || d.forEach((u) => {
|
428
|
+
o(u, u.value);
|
429
429
|
}), n.length - 1;
|
430
430
|
}
|
431
|
-
function
|
431
|
+
function rn() {
|
432
432
|
const e = /* @__PURE__ */ new Map();
|
433
|
-
for (const [n, r] of
|
433
|
+
for (const [n, r] of Oe) {
|
434
434
|
const o = r[r.length - 1];
|
435
435
|
e.set(n, [o]);
|
436
436
|
}
|
437
437
|
function t(n) {
|
438
|
-
return
|
438
|
+
return on(n, e);
|
439
439
|
}
|
440
440
|
return {
|
441
441
|
getVueRef: t
|
442
442
|
};
|
443
443
|
}
|
444
|
-
function
|
445
|
-
return
|
444
|
+
function Er(e) {
|
445
|
+
return on(e, Oe);
|
446
446
|
}
|
447
|
-
function
|
447
|
+
function on(e, t) {
|
448
448
|
const n = t.get(e.sid);
|
449
449
|
if (!n)
|
450
450
|
throw new Error(`Scope ${e.sid} not found`);
|
@@ -453,29 +453,29 @@ function an(e, t) {
|
|
453
453
|
throw new Error(`Var ${e.id} not found in scope ${e.sid}`);
|
454
454
|
return o;
|
455
455
|
}
|
456
|
-
function
|
457
|
-
|
456
|
+
function _r(e) {
|
457
|
+
Oe.delete(e);
|
458
458
|
}
|
459
|
-
function
|
460
|
-
const n =
|
459
|
+
function Sr(e, t) {
|
460
|
+
const n = Oe.get(e);
|
461
461
|
n && n.splice(t, 1);
|
462
462
|
}
|
463
|
-
const
|
464
|
-
function
|
463
|
+
const ht = Se(() => []);
|
464
|
+
function br(e) {
|
465
465
|
var r;
|
466
|
-
const t = /* @__PURE__ */ new Map(), n =
|
466
|
+
const t = /* @__PURE__ */ new Map(), n = ht.getOrDefault(e.id).push(t);
|
467
467
|
return (r = e.eRefs) == null || r.forEach((o) => {
|
468
|
-
const
|
469
|
-
t.set(o.id,
|
468
|
+
const i = X();
|
469
|
+
t.set(o.id, i);
|
470
470
|
}), n;
|
471
471
|
}
|
472
|
-
function
|
473
|
-
const n =
|
472
|
+
function Or(e, t) {
|
473
|
+
const n = ht.get(e);
|
474
474
|
n && n.splice(t, 1);
|
475
475
|
}
|
476
|
-
function
|
476
|
+
function sn() {
|
477
477
|
const e = new Map(
|
478
|
-
Array.from(
|
478
|
+
Array.from(ht.entries()).map(([n, r]) => [
|
479
479
|
n,
|
480
480
|
r[r.length - 1]
|
481
481
|
])
|
@@ -505,45 +505,45 @@ var N;
|
|
505
505
|
return a.type === "jsFn";
|
506
506
|
}
|
507
507
|
e.isJsFn = o;
|
508
|
-
function
|
508
|
+
function i(a) {
|
509
509
|
return a.type === "vf";
|
510
510
|
}
|
511
|
-
e.isVForItem =
|
512
|
-
function
|
511
|
+
e.isVForItem = i;
|
512
|
+
function s(a) {
|
513
513
|
return a.type === "vf-i";
|
514
514
|
}
|
515
|
-
e.isVForIndex =
|
516
|
-
function
|
515
|
+
e.isVForIndex = s;
|
516
|
+
function c(a) {
|
517
517
|
return a.type === "sp";
|
518
518
|
}
|
519
|
-
e.isSlotProp =
|
519
|
+
e.isSlotProp = c;
|
520
520
|
function l(a) {
|
521
521
|
return a.type === "event";
|
522
522
|
}
|
523
523
|
e.isEventContext = l;
|
524
|
-
function
|
524
|
+
function d(a) {
|
525
525
|
return a.type === "ele_ref";
|
526
526
|
}
|
527
|
-
e.isElementRef =
|
528
|
-
function
|
527
|
+
e.isElementRef = d;
|
528
|
+
function u(a) {
|
529
529
|
return a.type !== void 0;
|
530
530
|
}
|
531
|
-
e.IsBinding =
|
531
|
+
e.IsBinding = u;
|
532
532
|
})(N || (N = {}));
|
533
|
-
const
|
534
|
-
function
|
535
|
-
const t =
|
536
|
-
return t.push(
|
533
|
+
const De = Se(() => []);
|
534
|
+
function Rr(e) {
|
535
|
+
const t = De.getOrDefault(e);
|
536
|
+
return t.push(X({})), t.length - 1;
|
537
537
|
}
|
538
|
-
function
|
539
|
-
|
538
|
+
function Vr(e, t, n) {
|
539
|
+
De.get(e)[t].value = n;
|
540
540
|
}
|
541
|
-
function
|
542
|
-
|
541
|
+
function Pr(e) {
|
542
|
+
De.delete(e);
|
543
543
|
}
|
544
|
-
function
|
544
|
+
function kr() {
|
545
545
|
const e = /* @__PURE__ */ new Map();
|
546
|
-
for (const [n, r] of
|
546
|
+
for (const [n, r] of De) {
|
547
547
|
const o = r[r.length - 1];
|
548
548
|
e.set(n, o);
|
549
549
|
}
|
@@ -554,47 +554,47 @@ function Pr() {
|
|
554
554
|
getPropsValue: t
|
555
555
|
};
|
556
556
|
}
|
557
|
-
const
|
558
|
-
function
|
559
|
-
const t =
|
560
|
-
Ne(
|
557
|
+
const an = /* @__PURE__ */ new Map(), pt = Se(() => /* @__PURE__ */ new Map()), cn = /* @__PURE__ */ new Set(), un = Symbol("vfor");
|
558
|
+
function Nr(e) {
|
559
|
+
const t = ln() ?? {};
|
560
|
+
Ne(un, { ...t, [e.fid]: e.key });
|
561
561
|
}
|
562
|
-
function
|
563
|
-
return
|
562
|
+
function ln() {
|
563
|
+
return Z(un, void 0);
|
564
564
|
}
|
565
|
-
function
|
566
|
-
const e =
|
565
|
+
function Ir() {
|
566
|
+
const e = ln(), t = /* @__PURE__ */ new Map();
|
567
567
|
return e === void 0 || Object.keys(e).forEach((n) => {
|
568
568
|
t.set(n, e[n]);
|
569
569
|
}), t;
|
570
570
|
}
|
571
|
-
function
|
571
|
+
function Tr(e, t, n, r) {
|
572
572
|
if (r) {
|
573
|
-
|
573
|
+
cn.add(e);
|
574
574
|
return;
|
575
575
|
}
|
576
576
|
let o;
|
577
577
|
if (n)
|
578
|
-
o = new
|
578
|
+
o = new Mr(t);
|
579
579
|
else {
|
580
|
-
const
|
581
|
-
o = new
|
580
|
+
const i = Array.isArray(t) ? t : Object.entries(t).map(([s, c], l) => [c, s, l]);
|
581
|
+
o = new Dr(i);
|
582
582
|
}
|
583
|
-
|
583
|
+
an.set(e, o);
|
584
584
|
}
|
585
|
-
function
|
585
|
+
function Ar(e, t, n) {
|
586
586
|
const r = pt.getOrDefault(e);
|
587
|
-
r.has(t) || r.set(t,
|
587
|
+
r.has(t) || r.set(t, K(n)), r.get(t).value = n;
|
588
588
|
}
|
589
|
-
function
|
589
|
+
function $r(e) {
|
590
590
|
const t = /* @__PURE__ */ new Set();
|
591
591
|
function n(o) {
|
592
592
|
t.add(o);
|
593
593
|
}
|
594
594
|
function r() {
|
595
595
|
const o = pt.get(e);
|
596
|
-
o !== void 0 && o.forEach((
|
597
|
-
t.has(
|
596
|
+
o !== void 0 && o.forEach((i, s) => {
|
597
|
+
t.has(s) || o.delete(s);
|
598
598
|
});
|
599
599
|
}
|
600
600
|
return {
|
@@ -602,32 +602,32 @@ function Tr(e) {
|
|
602
602
|
removeUnusedKeys: r
|
603
603
|
};
|
604
604
|
}
|
605
|
-
function
|
606
|
-
const t = e, n =
|
605
|
+
function Cr(e) {
|
606
|
+
const t = e, n = Ir();
|
607
607
|
function r(o) {
|
608
|
-
const
|
609
|
-
return pt.get(o).get(
|
608
|
+
const i = n.get(o) ?? t;
|
609
|
+
return pt.get(o).get(i).value;
|
610
610
|
}
|
611
611
|
return {
|
612
612
|
getVForIndex: r
|
613
613
|
};
|
614
614
|
}
|
615
|
-
function
|
616
|
-
return
|
615
|
+
function xr(e) {
|
616
|
+
return an.get(e.binding.fid).createRefObjectWithPaths(e);
|
617
617
|
}
|
618
618
|
function jr(e) {
|
619
|
-
return
|
619
|
+
return cn.has(e);
|
620
620
|
}
|
621
|
-
class
|
621
|
+
class Dr {
|
622
622
|
constructor(t) {
|
623
623
|
this.array = t;
|
624
624
|
}
|
625
625
|
createRefObjectWithPaths(t) {
|
626
|
-
const { binding: n } = t, { snapshot: r } = t, { path: o = [] } = n,
|
627
|
-
return
|
626
|
+
const { binding: n } = t, { snapshot: r } = t, { path: o = [] } = n, i = [...o], s = r.getVForIndex(n.fid);
|
627
|
+
return i.unshift(s), Ce(() => ({
|
628
628
|
get: () => be(
|
629
629
|
this.array,
|
630
|
-
|
630
|
+
i,
|
631
631
|
r.getObjectToValue
|
632
632
|
),
|
633
633
|
set: () => {
|
@@ -636,7 +636,7 @@ class Cr {
|
|
636
636
|
}));
|
637
637
|
}
|
638
638
|
}
|
639
|
-
class
|
639
|
+
class Mr {
|
640
640
|
constructor(t) {
|
641
641
|
B(this, "_isDictSource");
|
642
642
|
this.binding = t;
|
@@ -649,44 +649,44 @@ class xr {
|
|
649
649
|
return this._isDictSource;
|
650
650
|
}
|
651
651
|
createRefObjectWithPaths(t) {
|
652
|
-
const { binding: n } = t, { path: r = [] } = n, o = [...r], { snapshot:
|
653
|
-
return o.unshift(l, ...
|
652
|
+
const { binding: n } = t, { path: r = [] } = n, o = [...r], { snapshot: i } = t, s = i.getVueRefObject(this.binding), c = this.isDictSource(s), l = i.getVForIndex(n.fid), d = c && o.length === 0 ? [0] : [];
|
653
|
+
return o.unshift(l, ...d), Ce(() => ({
|
654
654
|
get: () => {
|
655
|
-
const
|
656
|
-
|
655
|
+
const u = q(s), a = c ? Object.entries(u).map(([f, h], v) => [
|
656
|
+
h,
|
657
657
|
f,
|
658
658
|
v
|
659
|
-
]) :
|
659
|
+
]) : u;
|
660
660
|
try {
|
661
661
|
return be(
|
662
662
|
q(a),
|
663
663
|
o,
|
664
|
-
|
664
|
+
i.getObjectToValue
|
665
665
|
);
|
666
666
|
} catch {
|
667
667
|
return;
|
668
668
|
}
|
669
669
|
},
|
670
|
-
set: (
|
671
|
-
const a = q(
|
672
|
-
if (
|
670
|
+
set: (u) => {
|
671
|
+
const a = q(s);
|
672
|
+
if (c) {
|
673
673
|
const f = Object.keys(a);
|
674
674
|
if (l >= f.length)
|
675
675
|
throw new Error("Cannot set value to a non-existent key");
|
676
|
-
const
|
677
|
-
|
676
|
+
const h = f[l];
|
677
|
+
Xe(
|
678
678
|
a,
|
679
|
-
[
|
680
|
-
|
681
|
-
|
679
|
+
[h],
|
680
|
+
u,
|
681
|
+
i.getObjectToValue
|
682
682
|
);
|
683
683
|
return;
|
684
684
|
}
|
685
|
-
|
685
|
+
Xe(
|
686
686
|
a,
|
687
687
|
o,
|
688
|
-
|
689
|
-
|
688
|
+
u,
|
689
|
+
i.getObjectToValue
|
690
690
|
);
|
691
691
|
}
|
692
692
|
}));
|
@@ -695,71 +695,71 @@ class xr {
|
|
695
695
|
function Rt(e) {
|
696
696
|
return e == null;
|
697
697
|
}
|
698
|
-
function
|
699
|
-
return
|
698
|
+
function Fr() {
|
699
|
+
return fn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
700
700
|
}
|
701
|
-
function
|
701
|
+
function fn() {
|
702
702
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
703
703
|
}
|
704
|
-
const
|
705
|
-
let
|
706
|
-
function
|
704
|
+
const Br = typeof Proxy == "function", Lr = "devtools-plugin:setup", Wr = "plugin:settings:set";
|
705
|
+
let ae, nt;
|
706
|
+
function Ur() {
|
707
707
|
var e;
|
708
|
-
return
|
708
|
+
return ae !== void 0 || (typeof window < "u" && window.performance ? (ae = !0, nt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ae = !0, nt = globalThis.perf_hooks.performance) : ae = !1), ae;
|
709
709
|
}
|
710
|
-
function
|
711
|
-
return
|
710
|
+
function Gr() {
|
711
|
+
return Ur() ? nt.now() : Date.now();
|
712
712
|
}
|
713
|
-
class
|
713
|
+
class qr {
|
714
714
|
constructor(t, n) {
|
715
715
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
716
716
|
const r = {};
|
717
717
|
if (t.settings)
|
718
|
-
for (const
|
719
|
-
const
|
720
|
-
r[
|
718
|
+
for (const s in t.settings) {
|
719
|
+
const c = t.settings[s];
|
720
|
+
r[s] = c.defaultValue;
|
721
721
|
}
|
722
722
|
const o = `__vue-devtools-plugin-settings__${t.id}`;
|
723
|
-
let
|
723
|
+
let i = Object.assign({}, r);
|
724
724
|
try {
|
725
|
-
const
|
726
|
-
Object.assign(
|
725
|
+
const s = localStorage.getItem(o), c = JSON.parse(s);
|
726
|
+
Object.assign(i, c);
|
727
727
|
} catch {
|
728
728
|
}
|
729
729
|
this.fallbacks = {
|
730
730
|
getSettings() {
|
731
|
-
return
|
731
|
+
return i;
|
732
732
|
},
|
733
|
-
setSettings(
|
733
|
+
setSettings(s) {
|
734
734
|
try {
|
735
|
-
localStorage.setItem(o, JSON.stringify(
|
735
|
+
localStorage.setItem(o, JSON.stringify(s));
|
736
736
|
} catch {
|
737
737
|
}
|
738
|
-
|
738
|
+
i = s;
|
739
739
|
},
|
740
740
|
now() {
|
741
|
-
return
|
741
|
+
return Gr();
|
742
742
|
}
|
743
|
-
}, n && n.on(
|
744
|
-
|
743
|
+
}, n && n.on(Wr, (s, c) => {
|
744
|
+
s === this.plugin.id && this.fallbacks.setSettings(c);
|
745
745
|
}), this.proxiedOn = new Proxy({}, {
|
746
|
-
get: (
|
746
|
+
get: (s, c) => this.target ? this.target.on[c] : (...l) => {
|
747
747
|
this.onQueue.push({
|
748
|
-
method:
|
748
|
+
method: c,
|
749
749
|
args: l
|
750
750
|
});
|
751
751
|
}
|
752
752
|
}), this.proxiedTarget = new Proxy({}, {
|
753
|
-
get: (
|
754
|
-
method:
|
753
|
+
get: (s, c) => this.target ? this.target[c] : c === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(c) ? (...l) => (this.targetQueue.push({
|
754
|
+
method: c,
|
755
755
|
args: l,
|
756
756
|
resolve: () => {
|
757
757
|
}
|
758
|
-
}), this.fallbacks[
|
758
|
+
}), this.fallbacks[c](...l)) : (...l) => new Promise((d) => {
|
759
759
|
this.targetQueue.push({
|
760
|
-
method:
|
760
|
+
method: c,
|
761
761
|
args: l,
|
762
|
-
resolve:
|
762
|
+
resolve: d
|
763
763
|
});
|
764
764
|
})
|
765
765
|
});
|
@@ -773,129 +773,129 @@ class Ur {
|
|
773
773
|
}
|
774
774
|
}
|
775
775
|
function Kr(e, t) {
|
776
|
-
const n = e, r =
|
777
|
-
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !
|
778
|
-
o.emit(
|
776
|
+
const n = e, r = fn(), o = Fr(), i = Br && n.enableEarlyProxy;
|
777
|
+
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
778
|
+
o.emit(Lr, e, t);
|
779
779
|
else {
|
780
|
-
const
|
780
|
+
const s = i ? new qr(n, o) : null;
|
781
781
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
782
782
|
pluginDescriptor: n,
|
783
783
|
setupFn: t,
|
784
|
-
proxy:
|
785
|
-
}),
|
784
|
+
proxy: s
|
785
|
+
}), s && t(s.proxiedTarget);
|
786
786
|
}
|
787
787
|
}
|
788
788
|
var O = {};
|
789
|
-
const
|
790
|
-
function
|
789
|
+
const Q = typeof document < "u";
|
790
|
+
function dn(e) {
|
791
791
|
return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
|
792
792
|
}
|
793
|
-
function
|
793
|
+
function Hr(e) {
|
794
794
|
return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
|
795
795
|
// add the Module string tag
|
796
|
-
e.default &&
|
796
|
+
e.default && dn(e.default);
|
797
797
|
}
|
798
798
|
const I = Object.assign;
|
799
|
-
function
|
799
|
+
function Ke(e, t) {
|
800
800
|
const n = {};
|
801
801
|
for (const r in t) {
|
802
802
|
const o = t[r];
|
803
|
-
n[r] =
|
803
|
+
n[r] = W(o) ? o.map(e) : e(o);
|
804
804
|
}
|
805
805
|
return n;
|
806
806
|
}
|
807
|
-
const
|
808
|
-
},
|
809
|
-
function
|
807
|
+
const we = () => {
|
808
|
+
}, W = Array.isArray;
|
809
|
+
function R(e) {
|
810
810
|
const t = Array.from(arguments).slice(1);
|
811
811
|
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
812
812
|
}
|
813
|
-
const
|
813
|
+
const hn = /#/g, zr = /&/g, Qr = /\//g, Jr = /=/g, Yr = /\?/g, pn = /\+/g, Xr = /%5B/g, Zr = /%5D/g, mn = /%5E/g, eo = /%60/g, gn = /%7B/g, to = /%7C/g, vn = /%7D/g, no = /%20/g;
|
814
814
|
function mt(e) {
|
815
|
-
return encodeURI("" + e).replace(
|
815
|
+
return encodeURI("" + e).replace(to, "|").replace(Xr, "[").replace(Zr, "]");
|
816
816
|
}
|
817
|
-
function
|
818
|
-
return mt(e).replace(
|
817
|
+
function ro(e) {
|
818
|
+
return mt(e).replace(gn, "{").replace(vn, "}").replace(mn, "^");
|
819
819
|
}
|
820
|
-
function
|
821
|
-
return mt(e).replace(
|
820
|
+
function rt(e) {
|
821
|
+
return mt(e).replace(pn, "%2B").replace(no, "+").replace(hn, "%23").replace(zr, "%26").replace(eo, "`").replace(gn, "{").replace(vn, "}").replace(mn, "^");
|
822
822
|
}
|
823
|
-
function
|
824
|
-
return
|
823
|
+
function oo(e) {
|
824
|
+
return rt(e).replace(Jr, "%3D");
|
825
825
|
}
|
826
|
-
function
|
827
|
-
return mt(e).replace(
|
826
|
+
function so(e) {
|
827
|
+
return mt(e).replace(hn, "%23").replace(Yr, "%3F");
|
828
828
|
}
|
829
|
-
function
|
830
|
-
return e == null ? "" :
|
829
|
+
function io(e) {
|
830
|
+
return e == null ? "" : so(e).replace(Qr, "%2F");
|
831
831
|
}
|
832
|
-
function
|
832
|
+
function ce(e) {
|
833
833
|
try {
|
834
834
|
return decodeURIComponent("" + e);
|
835
835
|
} catch {
|
836
|
-
O.NODE_ENV !== "production" &&
|
836
|
+
O.NODE_ENV !== "production" && R(`Error decoding "${e}". Using original value`);
|
837
837
|
}
|
838
838
|
return "" + e;
|
839
839
|
}
|
840
|
-
const
|
841
|
-
function
|
842
|
-
let r, o = {},
|
843
|
-
const
|
840
|
+
const ao = /\/$/, co = (e) => e.replace(ao, "");
|
841
|
+
function He(e, t, n = "/") {
|
842
|
+
let r, o = {}, i = "", s = "";
|
843
|
+
const c = t.indexOf("#");
|
844
844
|
let l = t.indexOf("?");
|
845
|
-
return
|
846
|
-
fullPath: r + (
|
845
|
+
return c < l && c >= 0 && (l = -1), l > -1 && (r = t.slice(0, l), i = t.slice(l + 1, c > -1 ? c : t.length), o = e(i)), c > -1 && (r = r || t.slice(0, c), s = t.slice(c, t.length)), r = fo(r ?? t, n), {
|
846
|
+
fullPath: r + (i && "?") + i + s,
|
847
847
|
path: r,
|
848
848
|
query: o,
|
849
|
-
hash:
|
849
|
+
hash: ce(s)
|
850
850
|
};
|
851
851
|
}
|
852
|
-
function
|
852
|
+
function uo(e, t) {
|
853
853
|
const n = t.query ? e(t.query) : "";
|
854
854
|
return t.path + (n && "?") + n + (t.hash || "");
|
855
855
|
}
|
856
|
-
function
|
856
|
+
function Vt(e, t) {
|
857
857
|
return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
|
858
858
|
}
|
859
|
-
function
|
859
|
+
function Pt(e, t, n) {
|
860
860
|
const r = t.matched.length - 1, o = n.matched.length - 1;
|
861
|
-
return r > -1 && r === o &&
|
861
|
+
return r > -1 && r === o && ee(t.matched[r], n.matched[o]) && yn(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
|
862
862
|
}
|
863
|
-
function
|
863
|
+
function ee(e, t) {
|
864
864
|
return (e.aliasOf || e) === (t.aliasOf || t);
|
865
865
|
}
|
866
|
-
function
|
866
|
+
function yn(e, t) {
|
867
867
|
if (Object.keys(e).length !== Object.keys(t).length)
|
868
868
|
return !1;
|
869
869
|
for (const n in e)
|
870
|
-
if (!
|
870
|
+
if (!lo(e[n], t[n]))
|
871
871
|
return !1;
|
872
872
|
return !0;
|
873
873
|
}
|
874
|
-
function
|
875
|
-
return
|
874
|
+
function lo(e, t) {
|
875
|
+
return W(e) ? kt(e, t) : W(t) ? kt(t, e) : e === t;
|
876
876
|
}
|
877
|
-
function
|
878
|
-
return
|
877
|
+
function kt(e, t) {
|
878
|
+
return W(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
|
879
879
|
}
|
880
|
-
function
|
880
|
+
function fo(e, t) {
|
881
881
|
if (e.startsWith("/"))
|
882
882
|
return e;
|
883
883
|
if (O.NODE_ENV !== "production" && !t.startsWith("/"))
|
884
|
-
return
|
884
|
+
return R(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e;
|
885
885
|
if (!e)
|
886
886
|
return t;
|
887
887
|
const n = t.split("/"), r = e.split("/"), o = r[r.length - 1];
|
888
888
|
(o === ".." || o === ".") && r.push("");
|
889
|
-
let
|
890
|
-
for (
|
891
|
-
if (
|
892
|
-
if (
|
893
|
-
|
889
|
+
let i = n.length - 1, s, c;
|
890
|
+
for (s = 0; s < r.length; s++)
|
891
|
+
if (c = r[s], c !== ".")
|
892
|
+
if (c === "..")
|
893
|
+
i > 1 && i--;
|
894
894
|
else
|
895
895
|
break;
|
896
|
-
return n.slice(0,
|
896
|
+
return n.slice(0, i).join("/") + "/" + r.slice(s).join("/");
|
897
897
|
}
|
898
|
-
const
|
898
|
+
const J = {
|
899
899
|
path: "/",
|
900
900
|
// TODO: could we use a symbol in the future?
|
901
901
|
name: void 0,
|
@@ -907,29 +907,29 @@ const Y = {
|
|
907
907
|
meta: {},
|
908
908
|
redirectedFrom: void 0
|
909
909
|
};
|
910
|
-
var
|
910
|
+
var ue;
|
911
911
|
(function(e) {
|
912
912
|
e.pop = "pop", e.push = "push";
|
913
|
-
})(
|
914
|
-
var
|
913
|
+
})(ue || (ue = {}));
|
914
|
+
var ne;
|
915
915
|
(function(e) {
|
916
916
|
e.back = "back", e.forward = "forward", e.unknown = "";
|
917
|
-
})(
|
918
|
-
const
|
919
|
-
function
|
917
|
+
})(ne || (ne = {}));
|
918
|
+
const ze = "";
|
919
|
+
function wn(e) {
|
920
920
|
if (!e)
|
921
|
-
if (
|
921
|
+
if (Q) {
|
922
922
|
const t = document.querySelector("base");
|
923
923
|
e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
|
924
924
|
} else
|
925
925
|
e = "/";
|
926
|
-
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e),
|
926
|
+
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), co(e);
|
927
927
|
}
|
928
|
-
const
|
929
|
-
function
|
930
|
-
return e.replace(
|
928
|
+
const ho = /^[^#]+#/;
|
929
|
+
function En(e, t) {
|
930
|
+
return e.replace(ho, "#") + t;
|
931
931
|
}
|
932
|
-
function
|
932
|
+
function po(e, t) {
|
933
933
|
const n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
|
934
934
|
return {
|
935
935
|
behavior: t.behavior,
|
@@ -937,31 +937,31 @@ function fo(e, t) {
|
|
937
937
|
top: r.top - n.top - (t.top || 0)
|
938
938
|
};
|
939
939
|
}
|
940
|
-
const
|
940
|
+
const Me = () => ({
|
941
941
|
left: window.scrollX,
|
942
942
|
top: window.scrollY
|
943
943
|
});
|
944
|
-
function
|
944
|
+
function mo(e) {
|
945
945
|
let t;
|
946
946
|
if ("el" in e) {
|
947
947
|
const n = e.el, r = typeof n == "string" && n.startsWith("#");
|
948
948
|
if (O.NODE_ENV !== "production" && typeof e.el == "string" && (!r || !document.getElementById(e.el.slice(1))))
|
949
949
|
try {
|
950
|
-
const
|
951
|
-
if (r &&
|
952
|
-
|
950
|
+
const i = document.querySelector(e.el);
|
951
|
+
if (r && i) {
|
952
|
+
R(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);
|
953
953
|
return;
|
954
954
|
}
|
955
955
|
} catch {
|
956
|
-
|
956
|
+
R(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
|
957
957
|
return;
|
958
958
|
}
|
959
959
|
const o = typeof n == "string" ? r ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
|
960
960
|
if (!o) {
|
961
|
-
O.NODE_ENV !== "production" &&
|
961
|
+
O.NODE_ENV !== "production" && R(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
|
962
962
|
return;
|
963
963
|
}
|
964
|
-
t =
|
964
|
+
t = po(o, e);
|
965
965
|
} else
|
966
966
|
t = e;
|
967
967
|
"scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
|
@@ -969,69 +969,69 @@ function ho(e) {
|
|
969
969
|
function Nt(e, t) {
|
970
970
|
return (history.state ? history.state.position - t : -1) + e;
|
971
971
|
}
|
972
|
-
const
|
973
|
-
function
|
974
|
-
|
972
|
+
const ot = /* @__PURE__ */ new Map();
|
973
|
+
function go(e, t) {
|
974
|
+
ot.set(e, t);
|
975
975
|
}
|
976
|
-
function
|
977
|
-
const t =
|
978
|
-
return
|
976
|
+
function vo(e) {
|
977
|
+
const t = ot.get(e);
|
978
|
+
return ot.delete(e), t;
|
979
979
|
}
|
980
|
-
let
|
981
|
-
function
|
982
|
-
const { pathname: n, search: r, hash: o } = t,
|
983
|
-
if (
|
984
|
-
let
|
985
|
-
return l[0] !== "/" && (l = "/" + l),
|
980
|
+
let yo = () => location.protocol + "//" + location.host;
|
981
|
+
function _n(e, t) {
|
982
|
+
const { pathname: n, search: r, hash: o } = t, i = e.indexOf("#");
|
983
|
+
if (i > -1) {
|
984
|
+
let c = o.includes(e.slice(i)) ? e.slice(i).length : 1, l = o.slice(c);
|
985
|
+
return l[0] !== "/" && (l = "/" + l), Vt(l, "");
|
986
986
|
}
|
987
|
-
return
|
987
|
+
return Vt(n, e) + r + o;
|
988
988
|
}
|
989
|
-
function
|
990
|
-
let o = [],
|
991
|
-
const
|
992
|
-
const
|
989
|
+
function wo(e, t, n, r) {
|
990
|
+
let o = [], i = [], s = null;
|
991
|
+
const c = ({ state: f }) => {
|
992
|
+
const h = _n(e, location), v = n.value, p = t.value;
|
993
993
|
let g = 0;
|
994
994
|
if (f) {
|
995
|
-
if (n.value =
|
996
|
-
|
995
|
+
if (n.value = h, t.value = f, s && s === v) {
|
996
|
+
s = null;
|
997
997
|
return;
|
998
998
|
}
|
999
999
|
g = p ? f.position - p.position : 0;
|
1000
1000
|
} else
|
1001
|
-
r(
|
1001
|
+
r(h);
|
1002
1002
|
o.forEach((y) => {
|
1003
1003
|
y(n.value, v, {
|
1004
1004
|
delta: g,
|
1005
|
-
type:
|
1006
|
-
direction: g ? g > 0 ?
|
1005
|
+
type: ue.pop,
|
1006
|
+
direction: g ? g > 0 ? ne.forward : ne.back : ne.unknown
|
1007
1007
|
});
|
1008
1008
|
});
|
1009
1009
|
};
|
1010
1010
|
function l() {
|
1011
|
-
|
1011
|
+
s = n.value;
|
1012
1012
|
}
|
1013
|
-
function
|
1013
|
+
function d(f) {
|
1014
1014
|
o.push(f);
|
1015
|
-
const
|
1015
|
+
const h = () => {
|
1016
1016
|
const v = o.indexOf(f);
|
1017
1017
|
v > -1 && o.splice(v, 1);
|
1018
1018
|
};
|
1019
|
-
return
|
1019
|
+
return i.push(h), h;
|
1020
1020
|
}
|
1021
|
-
function
|
1021
|
+
function u() {
|
1022
1022
|
const { history: f } = window;
|
1023
|
-
f.state && f.replaceState(I({}, f.state, { scroll:
|
1023
|
+
f.state && f.replaceState(I({}, f.state, { scroll: Me() }), "");
|
1024
1024
|
}
|
1025
1025
|
function a() {
|
1026
|
-
for (const f of
|
1026
|
+
for (const f of i)
|
1027
1027
|
f();
|
1028
|
-
|
1028
|
+
i = [], window.removeEventListener("popstate", c), window.removeEventListener("beforeunload", u);
|
1029
1029
|
}
|
1030
|
-
return window.addEventListener("popstate",
|
1030
|
+
return window.addEventListener("popstate", c), window.addEventListener("beforeunload", u, {
|
1031
1031
|
passive: !0
|
1032
1032
|
}), {
|
1033
1033
|
pauseListeners: l,
|
1034
|
-
listen:
|
1034
|
+
listen: d,
|
1035
1035
|
destroy: a
|
1036
1036
|
};
|
1037
1037
|
}
|
@@ -1042,14 +1042,14 @@ function It(e, t, n, r = !1, o = !1) {
|
|
1042
1042
|
forward: n,
|
1043
1043
|
replaced: r,
|
1044
1044
|
position: window.history.length,
|
1045
|
-
scroll: o ?
|
1045
|
+
scroll: o ? Me() : null
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
|
-
function
|
1048
|
+
function Eo(e) {
|
1049
1049
|
const { history: t, location: n } = window, r = {
|
1050
|
-
value:
|
1050
|
+
value: _n(e, n)
|
1051
1051
|
}, o = { value: t.state };
|
1052
|
-
o.value ||
|
1052
|
+
o.value || i(r.value, {
|
1053
1053
|
back: null,
|
1054
1054
|
current: r.value,
|
1055
1055
|
forward: null,
|
@@ -1060,26 +1060,26 @@ function yo(e) {
|
|
1060
1060
|
// scrollBehavior to be triggered without a saved position
|
1061
1061
|
scroll: null
|
1062
1062
|
}, !0);
|
1063
|
-
function
|
1064
|
-
const a = e.indexOf("#"), f = a > -1 ? (n.host && document.querySelector("base") ? e : e.slice(a)) + l :
|
1063
|
+
function i(l, d, u) {
|
1064
|
+
const a = e.indexOf("#"), f = a > -1 ? (n.host && document.querySelector("base") ? e : e.slice(a)) + l : yo() + e + l;
|
1065
1065
|
try {
|
1066
|
-
t[
|
1067
|
-
} catch (
|
1068
|
-
O.NODE_ENV !== "production" ?
|
1066
|
+
t[u ? "replaceState" : "pushState"](d, "", f), o.value = d;
|
1067
|
+
} catch (h) {
|
1068
|
+
O.NODE_ENV !== "production" ? R("Error with push/replace State", h) : console.error(h), n[u ? "replace" : "assign"](f);
|
1069
1069
|
}
|
1070
1070
|
}
|
1071
|
-
function
|
1072
|
-
const
|
1071
|
+
function s(l, d) {
|
1072
|
+
const u = I({}, t.state, It(
|
1073
1073
|
o.value.back,
|
1074
1074
|
// keep back and forward entries but override current position
|
1075
1075
|
l,
|
1076
1076
|
o.value.forward,
|
1077
1077
|
!0
|
1078
|
-
),
|
1079
|
-
|
1078
|
+
), d, { position: o.value.position });
|
1079
|
+
i(l, u, !0), r.value = l;
|
1080
1080
|
}
|
1081
|
-
function
|
1082
|
-
const
|
1081
|
+
function c(l, d) {
|
1082
|
+
const u = I(
|
1083
1083
|
{},
|
1084
1084
|
// use current history state to gracefully handle a wrong call to
|
1085
1085
|
// history.replaceState
|
@@ -1088,36 +1088,36 @@ function yo(e) {
|
|
1088
1088
|
t.state,
|
1089
1089
|
{
|
1090
1090
|
forward: l,
|
1091
|
-
scroll:
|
1091
|
+
scroll: Me()
|
1092
1092
|
}
|
1093
1093
|
);
|
1094
|
-
O.NODE_ENV !== "production" && !t.state &&
|
1094
|
+
O.NODE_ENV !== "production" && !t.state && R(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
1095
1095
|
|
1096
1096
|
history.replaceState(history.state, '', url)
|
1097
1097
|
|
1098
|
-
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),
|
1099
|
-
const a = I({}, It(r.value, l, null), { position:
|
1100
|
-
|
1098
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), i(u.current, u, !0);
|
1099
|
+
const a = I({}, It(r.value, l, null), { position: u.position + 1 }, d);
|
1100
|
+
i(l, a, !1), r.value = l;
|
1101
1101
|
}
|
1102
1102
|
return {
|
1103
1103
|
location: r,
|
1104
1104
|
state: o,
|
1105
|
-
push:
|
1106
|
-
replace:
|
1105
|
+
push: c,
|
1106
|
+
replace: s
|
1107
1107
|
};
|
1108
1108
|
}
|
1109
|
-
function
|
1110
|
-
e =
|
1111
|
-
const t =
|
1112
|
-
function r(
|
1113
|
-
|
1109
|
+
function Sn(e) {
|
1110
|
+
e = wn(e);
|
1111
|
+
const t = Eo(e), n = wo(e, t.state, t.location, t.replace);
|
1112
|
+
function r(i, s = !0) {
|
1113
|
+
s || n.pauseListeners(), history.go(i);
|
1114
1114
|
}
|
1115
1115
|
const o = I({
|
1116
1116
|
// it's overridden right after
|
1117
1117
|
location: "",
|
1118
1118
|
base: e,
|
1119
1119
|
go: r,
|
1120
|
-
createHref:
|
1120
|
+
createHref: En.bind(null, e)
|
1121
1121
|
}, t, n);
|
1122
1122
|
return Object.defineProperty(o, "location", {
|
1123
1123
|
enumerable: !0,
|
@@ -1127,77 +1127,77 @@ function Rn(e) {
|
|
1127
1127
|
get: () => t.state.value
|
1128
1128
|
}), o;
|
1129
1129
|
}
|
1130
|
-
function
|
1131
|
-
let t = [], n = [
|
1132
|
-
e =
|
1133
|
-
function o(
|
1134
|
-
r++, r !== n.length && n.splice(r), n.push(
|
1130
|
+
function _o(e = "") {
|
1131
|
+
let t = [], n = [ze], r = 0;
|
1132
|
+
e = wn(e);
|
1133
|
+
function o(c) {
|
1134
|
+
r++, r !== n.length && n.splice(r), n.push(c);
|
1135
1135
|
}
|
1136
|
-
function
|
1136
|
+
function i(c, l, { direction: d, delta: u }) {
|
1137
1137
|
const a = {
|
1138
|
-
direction:
|
1139
|
-
delta:
|
1140
|
-
type:
|
1138
|
+
direction: d,
|
1139
|
+
delta: u,
|
1140
|
+
type: ue.pop
|
1141
1141
|
};
|
1142
1142
|
for (const f of t)
|
1143
|
-
f(
|
1143
|
+
f(c, l, a);
|
1144
1144
|
}
|
1145
|
-
const
|
1145
|
+
const s = {
|
1146
1146
|
// rewritten by Object.defineProperty
|
1147
|
-
location:
|
1147
|
+
location: ze,
|
1148
1148
|
// TODO: should be kept in queue
|
1149
1149
|
state: {},
|
1150
1150
|
base: e,
|
1151
|
-
createHref:
|
1152
|
-
replace(
|
1153
|
-
n.splice(r--, 1), o(
|
1151
|
+
createHref: En.bind(null, e),
|
1152
|
+
replace(c) {
|
1153
|
+
n.splice(r--, 1), o(c);
|
1154
1154
|
},
|
1155
|
-
push(
|
1156
|
-
o(
|
1155
|
+
push(c, l) {
|
1156
|
+
o(c);
|
1157
1157
|
},
|
1158
|
-
listen(
|
1159
|
-
return t.push(
|
1160
|
-
const l = t.indexOf(
|
1158
|
+
listen(c) {
|
1159
|
+
return t.push(c), () => {
|
1160
|
+
const l = t.indexOf(c);
|
1161
1161
|
l > -1 && t.splice(l, 1);
|
1162
1162
|
};
|
1163
1163
|
},
|
1164
1164
|
destroy() {
|
1165
|
-
t = [], n = [
|
1165
|
+
t = [], n = [ze], r = 0;
|
1166
1166
|
},
|
1167
|
-
go(
|
1168
|
-
const
|
1167
|
+
go(c, l = !0) {
|
1168
|
+
const d = this.location, u = (
|
1169
1169
|
// we are considering delta === 0 going forward, but in abstract mode
|
1170
1170
|
// using 0 for the delta doesn't make sense like it does in html5 where
|
1171
1171
|
// it reloads the page
|
1172
|
-
|
1172
|
+
c < 0 ? ne.back : ne.forward
|
1173
1173
|
);
|
1174
|
-
r = Math.max(0, Math.min(r +
|
1175
|
-
direction:
|
1176
|
-
delta:
|
1174
|
+
r = Math.max(0, Math.min(r + c, n.length - 1)), l && i(this.location, d, {
|
1175
|
+
direction: u,
|
1176
|
+
delta: c
|
1177
1177
|
});
|
1178
1178
|
}
|
1179
1179
|
};
|
1180
|
-
return Object.defineProperty(
|
1180
|
+
return Object.defineProperty(s, "location", {
|
1181
1181
|
enumerable: !0,
|
1182
1182
|
get: () => n[r]
|
1183
|
-
}),
|
1183
|
+
}), s;
|
1184
1184
|
}
|
1185
|
-
function
|
1186
|
-
return e = location.host ? e || location.pathname + location.search : "", e.includes("#") || (e += "#"), O.NODE_ENV !== "production" && !e.endsWith("#/") && !e.endsWith("#") &&
|
1187
|
-
"${e}" should be "${e.replace(/#.*$/, "#")}".`),
|
1185
|
+
function So(e) {
|
1186
|
+
return e = location.host ? e || location.pathname + location.search : "", e.includes("#") || (e += "#"), O.NODE_ENV !== "production" && !e.endsWith("#/") && !e.endsWith("#") && R(`A hash base must end with a "#":
|
1187
|
+
"${e}" should be "${e.replace(/#.*$/, "#")}".`), Sn(e);
|
1188
1188
|
}
|
1189
|
-
function
|
1189
|
+
function Ae(e) {
|
1190
1190
|
return typeof e == "string" || e && typeof e == "object";
|
1191
1191
|
}
|
1192
|
-
function
|
1192
|
+
function bn(e) {
|
1193
1193
|
return typeof e == "string" || typeof e == "symbol";
|
1194
1194
|
}
|
1195
|
-
const
|
1195
|
+
const st = Symbol(O.NODE_ENV !== "production" ? "navigation failure" : "");
|
1196
1196
|
var Tt;
|
1197
1197
|
(function(e) {
|
1198
1198
|
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
1199
1199
|
})(Tt || (Tt = {}));
|
1200
|
-
const
|
1200
|
+
const bo = {
|
1201
1201
|
1({ location: e, currentLocation: t }) {
|
1202
1202
|
return `No match for
|
1203
1203
|
${JSON.stringify(e)}${t ? `
|
@@ -1205,7 +1205,7 @@ while being at
|
|
1205
1205
|
` + JSON.stringify(t) : ""}`;
|
1206
1206
|
},
|
1207
1207
|
2({ from: e, to: t }) {
|
1208
|
-
return `Redirected from "${e.fullPath}" to "${
|
1208
|
+
return `Redirected from "${e.fullPath}" to "${Ro(t)}" via a navigation guard.`;
|
1209
1209
|
},
|
1210
1210
|
4({ from: e, to: t }) {
|
1211
1211
|
return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
|
@@ -1217,122 +1217,122 @@ while being at
|
|
1217
1217
|
return `Avoided redundant navigation to current location: "${e.fullPath}".`;
|
1218
1218
|
}
|
1219
1219
|
};
|
1220
|
-
function
|
1221
|
-
return O.NODE_ENV !== "production" ? I(new Error(
|
1220
|
+
function le(e, t) {
|
1221
|
+
return O.NODE_ENV !== "production" ? I(new Error(bo[e](t)), {
|
1222
1222
|
type: e,
|
1223
|
-
[
|
1223
|
+
[st]: !0
|
1224
1224
|
}, t) : I(new Error(), {
|
1225
1225
|
type: e,
|
1226
|
-
[
|
1226
|
+
[st]: !0
|
1227
1227
|
}, t);
|
1228
1228
|
}
|
1229
|
-
function
|
1230
|
-
return e instanceof Error &&
|
1229
|
+
function z(e, t) {
|
1230
|
+
return e instanceof Error && st in e && (t == null || !!(e.type & t));
|
1231
1231
|
}
|
1232
|
-
const
|
1233
|
-
function
|
1232
|
+
const Oo = ["params", "query", "hash"];
|
1233
|
+
function Ro(e) {
|
1234
1234
|
if (typeof e == "string")
|
1235
1235
|
return e;
|
1236
1236
|
if (e.path != null)
|
1237
1237
|
return e.path;
|
1238
1238
|
const t = {};
|
1239
|
-
for (const n of
|
1239
|
+
for (const n of Oo)
|
1240
1240
|
n in e && (t[n] = e[n]);
|
1241
1241
|
return JSON.stringify(t, null, 2);
|
1242
1242
|
}
|
1243
|
-
const At = "[^/]+?",
|
1243
|
+
const At = "[^/]+?", Vo = {
|
1244
1244
|
sensitive: !1,
|
1245
1245
|
strict: !1,
|
1246
1246
|
start: !0,
|
1247
1247
|
end: !0
|
1248
|
-
},
|
1249
|
-
function
|
1250
|
-
const n = I({},
|
1248
|
+
}, Po = /[.+*?^${}()[\]/\\]/g;
|
1249
|
+
function ko(e, t) {
|
1250
|
+
const n = I({}, Vo, t), r = [];
|
1251
1251
|
let o = n.start ? "^" : "";
|
1252
|
-
const
|
1253
|
-
for (const
|
1254
|
-
const
|
1252
|
+
const i = [];
|
1253
|
+
for (const d of e) {
|
1254
|
+
const u = d.length ? [] : [
|
1255
1255
|
90
|
1256
1256
|
/* PathScore.Root */
|
1257
1257
|
];
|
1258
|
-
n.strict && !
|
1259
|
-
for (let a = 0; a <
|
1260
|
-
const f =
|
1261
|
-
let
|
1258
|
+
n.strict && !d.length && (o += "/");
|
1259
|
+
for (let a = 0; a < d.length; a++) {
|
1260
|
+
const f = d[a];
|
1261
|
+
let h = 40 + (n.sensitive ? 0.25 : 0);
|
1262
1262
|
if (f.type === 0)
|
1263
|
-
a || (o += "/"), o += f.value.replace(
|
1263
|
+
a || (o += "/"), o += f.value.replace(Po, "\\$&"), h += 40;
|
1264
1264
|
else if (f.type === 1) {
|
1265
1265
|
const { value: v, repeatable: p, optional: g, regexp: y } = f;
|
1266
|
-
|
1266
|
+
i.push({
|
1267
1267
|
name: v,
|
1268
1268
|
repeatable: p,
|
1269
1269
|
optional: g
|
1270
1270
|
});
|
1271
1271
|
const _ = y || At;
|
1272
1272
|
if (_ !== At) {
|
1273
|
-
|
1273
|
+
h += 10;
|
1274
1274
|
try {
|
1275
1275
|
new RegExp(`(${_})`);
|
1276
|
-
} catch (
|
1277
|
-
throw new Error(`Invalid custom RegExp for param "${v}" (${_}): ` +
|
1276
|
+
} catch (V) {
|
1277
|
+
throw new Error(`Invalid custom RegExp for param "${v}" (${_}): ` + V.message);
|
1278
1278
|
}
|
1279
1279
|
}
|
1280
|
-
let
|
1281
|
-
a || (
|
1280
|
+
let b = p ? `((?:${_})(?:/(?:${_}))*)` : `(${_})`;
|
1281
|
+
a || (b = // avoid an optional / if there are more segments e.g. /:p?-static
|
1282
1282
|
// or /:p?-:p2
|
1283
|
-
g &&
|
1283
|
+
g && d.length < 2 ? `(?:/${b})` : "/" + b), g && (b += "?"), o += b, h += 20, g && (h += -8), p && (h += -20), _ === ".*" && (h += -50);
|
1284
1284
|
}
|
1285
|
-
|
1285
|
+
u.push(h);
|
1286
1286
|
}
|
1287
|
-
r.push(
|
1287
|
+
r.push(u);
|
1288
1288
|
}
|
1289
1289
|
if (n.strict && n.end) {
|
1290
|
-
const
|
1291
|
-
r[
|
1290
|
+
const d = r.length - 1;
|
1291
|
+
r[d][r[d].length - 1] += 0.7000000000000001;
|
1292
1292
|
}
|
1293
1293
|
n.strict || (o += "/?"), n.end ? o += "$" : n.strict && !o.endsWith("/") && (o += "(?:/|$)");
|
1294
|
-
const
|
1295
|
-
function
|
1296
|
-
const
|
1297
|
-
if (!
|
1294
|
+
const s = new RegExp(o, n.sensitive ? "" : "i");
|
1295
|
+
function c(d) {
|
1296
|
+
const u = d.match(s), a = {};
|
1297
|
+
if (!u)
|
1298
1298
|
return null;
|
1299
|
-
for (let f = 1; f <
|
1300
|
-
const
|
1301
|
-
a[v.name] =
|
1299
|
+
for (let f = 1; f < u.length; f++) {
|
1300
|
+
const h = u[f] || "", v = i[f - 1];
|
1301
|
+
a[v.name] = h && v.repeatable ? h.split("/") : h;
|
1302
1302
|
}
|
1303
1303
|
return a;
|
1304
1304
|
}
|
1305
|
-
function l(
|
1306
|
-
let
|
1305
|
+
function l(d) {
|
1306
|
+
let u = "", a = !1;
|
1307
1307
|
for (const f of e) {
|
1308
|
-
(!a || !
|
1309
|
-
for (const
|
1310
|
-
if (
|
1311
|
-
|
1312
|
-
else if (
|
1313
|
-
const { value: v, repeatable: p, optional: g } =
|
1314
|
-
if (
|
1308
|
+
(!a || !u.endsWith("/")) && (u += "/"), a = !1;
|
1309
|
+
for (const h of f)
|
1310
|
+
if (h.type === 0)
|
1311
|
+
u += h.value;
|
1312
|
+
else if (h.type === 1) {
|
1313
|
+
const { value: v, repeatable: p, optional: g } = h, y = v in d ? d[v] : "";
|
1314
|
+
if (W(y) && !p)
|
1315
1315
|
throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);
|
1316
|
-
const _ =
|
1316
|
+
const _ = W(y) ? y.join("/") : y;
|
1317
1317
|
if (!_)
|
1318
1318
|
if (g)
|
1319
|
-
f.length < 2 && (
|
1319
|
+
f.length < 2 && (u.endsWith("/") ? u = u.slice(0, -1) : a = !0);
|
1320
1320
|
else
|
1321
1321
|
throw new Error(`Missing required param "${v}"`);
|
1322
|
-
|
1322
|
+
u += _;
|
1323
1323
|
}
|
1324
1324
|
}
|
1325
|
-
return
|
1325
|
+
return u || "/";
|
1326
1326
|
}
|
1327
1327
|
return {
|
1328
|
-
re:
|
1328
|
+
re: s,
|
1329
1329
|
score: r,
|
1330
|
-
keys:
|
1331
|
-
parse:
|
1330
|
+
keys: i,
|
1331
|
+
parse: c,
|
1332
1332
|
stringify: l
|
1333
1333
|
};
|
1334
1334
|
}
|
1335
|
-
function
|
1335
|
+
function No(e, t) {
|
1336
1336
|
let n = 0;
|
1337
1337
|
for (; n < e.length && n < t.length; ) {
|
1338
1338
|
const r = t[n] - e[n];
|
@@ -1342,13 +1342,13 @@ function ko(e, t) {
|
|
1342
1342
|
}
|
1343
1343
|
return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
|
1344
1344
|
}
|
1345
|
-
function
|
1345
|
+
function On(e, t) {
|
1346
1346
|
let n = 0;
|
1347
1347
|
const r = e.score, o = t.score;
|
1348
1348
|
for (; n < r.length && n < o.length; ) {
|
1349
|
-
const
|
1350
|
-
if (
|
1351
|
-
return
|
1349
|
+
const i = No(r[n], o[n]);
|
1350
|
+
if (i)
|
1351
|
+
return i;
|
1352
1352
|
n++;
|
1353
1353
|
}
|
1354
1354
|
if (Math.abs(o.length - r.length) === 1) {
|
@@ -1363,76 +1363,76 @@ function $t(e) {
|
|
1363
1363
|
const t = e[e.length - 1];
|
1364
1364
|
return e.length > 0 && t[t.length - 1] < 0;
|
1365
1365
|
}
|
1366
|
-
const
|
1366
|
+
const Io = {
|
1367
1367
|
type: 0,
|
1368
1368
|
value: ""
|
1369
|
-
},
|
1370
|
-
function
|
1369
|
+
}, To = /[a-zA-Z0-9_]/;
|
1370
|
+
function Ao(e) {
|
1371
1371
|
if (!e)
|
1372
1372
|
return [[]];
|
1373
1373
|
if (e === "/")
|
1374
|
-
return [[
|
1374
|
+
return [[Io]];
|
1375
1375
|
if (!e.startsWith("/"))
|
1376
1376
|
throw new Error(O.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
|
1377
|
-
function t(
|
1378
|
-
throw new Error(`ERR (${n})/"${
|
1377
|
+
function t(h) {
|
1378
|
+
throw new Error(`ERR (${n})/"${d}": ${h}`);
|
1379
1379
|
}
|
1380
1380
|
let n = 0, r = n;
|
1381
1381
|
const o = [];
|
1382
|
-
let
|
1383
|
-
function
|
1384
|
-
|
1382
|
+
let i;
|
1383
|
+
function s() {
|
1384
|
+
i && o.push(i), i = [];
|
1385
1385
|
}
|
1386
|
-
let
|
1386
|
+
let c = 0, l, d = "", u = "";
|
1387
1387
|
function a() {
|
1388
|
-
|
1388
|
+
d && (n === 0 ? i.push({
|
1389
1389
|
type: 0,
|
1390
|
-
value:
|
1391
|
-
}) : n === 1 || n === 2 || n === 3 ? (
|
1390
|
+
value: d
|
1391
|
+
}) : n === 1 || n === 2 || n === 3 ? (i.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`), i.push({
|
1392
1392
|
type: 1,
|
1393
|
-
value:
|
1394
|
-
regexp:
|
1393
|
+
value: d,
|
1394
|
+
regexp: u,
|
1395
1395
|
repeatable: l === "*" || l === "+",
|
1396
1396
|
optional: l === "*" || l === "?"
|
1397
|
-
})) : t("Invalid state to consume buffer"),
|
1397
|
+
})) : t("Invalid state to consume buffer"), d = "");
|
1398
1398
|
}
|
1399
1399
|
function f() {
|
1400
|
-
|
1400
|
+
d += l;
|
1401
1401
|
}
|
1402
|
-
for (;
|
1403
|
-
if (l = e[
|
1402
|
+
for (; c < e.length; ) {
|
1403
|
+
if (l = e[c++], l === "\\" && n !== 2) {
|
1404
1404
|
r = n, n = 4;
|
1405
1405
|
continue;
|
1406
1406
|
}
|
1407
1407
|
switch (n) {
|
1408
1408
|
case 0:
|
1409
|
-
l === "/" ? (
|
1409
|
+
l === "/" ? (d && a(), s()) : l === ":" ? (a(), n = 1) : f();
|
1410
1410
|
break;
|
1411
1411
|
case 4:
|
1412
1412
|
f(), n = r;
|
1413
1413
|
break;
|
1414
1414
|
case 1:
|
1415
|
-
l === "(" ? n = 2 :
|
1415
|
+
l === "(" ? n = 2 : To.test(l) ? f() : (a(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--);
|
1416
1416
|
break;
|
1417
1417
|
case 2:
|
1418
|
-
l === ")" ?
|
1418
|
+
l === ")" ? u[u.length - 1] == "\\" ? u = u.slice(0, -1) + l : n = 3 : u += l;
|
1419
1419
|
break;
|
1420
1420
|
case 3:
|
1421
|
-
a(), n = 0, l !== "*" && l !== "?" && l !== "+" &&
|
1421
|
+
a(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--, u = "";
|
1422
1422
|
break;
|
1423
1423
|
default:
|
1424
1424
|
t("Unknown state");
|
1425
1425
|
break;
|
1426
1426
|
}
|
1427
1427
|
}
|
1428
|
-
return n === 2 && t(`Unfinished custom RegExp for param "${
|
1428
|
+
return n === 2 && t(`Unfinished custom RegExp for param "${d}"`), a(), s(), o;
|
1429
1429
|
}
|
1430
|
-
function
|
1431
|
-
const r =
|
1430
|
+
function $o(e, t, n) {
|
1431
|
+
const r = ko(Ao(e.path), n);
|
1432
1432
|
if (O.NODE_ENV !== "production") {
|
1433
|
-
const
|
1434
|
-
for (const
|
1435
|
-
|
1433
|
+
const i = /* @__PURE__ */ new Set();
|
1434
|
+
for (const s of r.keys)
|
1435
|
+
i.has(s.name) && R(`Found duplicated params with name "${s.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), i.add(s.name);
|
1436
1436
|
}
|
1437
1437
|
const o = I(r, {
|
1438
1438
|
record: e,
|
@@ -1443,106 +1443,106 @@ function To(e, t, n) {
|
|
1443
1443
|
});
|
1444
1444
|
return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
|
1445
1445
|
}
|
1446
|
-
function
|
1446
|
+
function Co(e, t) {
|
1447
1447
|
const n = [], r = /* @__PURE__ */ new Map();
|
1448
1448
|
t = Dt({ strict: !1, end: !0, sensitive: !1 }, t);
|
1449
1449
|
function o(a) {
|
1450
1450
|
return r.get(a);
|
1451
1451
|
}
|
1452
|
-
function
|
1453
|
-
const v = !
|
1454
|
-
O.NODE_ENV !== "production" &&
|
1452
|
+
function i(a, f, h) {
|
1453
|
+
const v = !h, p = xt(a);
|
1454
|
+
O.NODE_ENV !== "production" && Mo(p, f), p.aliasOf = h && h.record;
|
1455
1455
|
const g = Dt(t, a), y = [p];
|
1456
1456
|
if ("alias" in a) {
|
1457
|
-
const
|
1458
|
-
for (const
|
1457
|
+
const V = typeof a.alias == "string" ? [a.alias] : a.alias;
|
1458
|
+
for (const C of V)
|
1459
1459
|
y.push(
|
1460
1460
|
// we need to normalize again to ensure the `mods` property
|
1461
1461
|
// being non enumerable
|
1462
|
-
|
1462
|
+
xt(I({}, p, {
|
1463
1463
|
// this allows us to hold a copy of the `components` option
|
1464
1464
|
// so that async components cache is hold on the original record
|
1465
|
-
components:
|
1466
|
-
path:
|
1465
|
+
components: h ? h.record.components : p.components,
|
1466
|
+
path: C,
|
1467
1467
|
// we might be the child of an alias
|
1468
|
-
aliasOf:
|
1468
|
+
aliasOf: h ? h.record : p
|
1469
1469
|
// the aliases are always of the same kind as the original since they
|
1470
1470
|
// are defined on the same record
|
1471
1471
|
}))
|
1472
1472
|
);
|
1473
1473
|
}
|
1474
|
-
let _,
|
1475
|
-
for (const
|
1476
|
-
const { path:
|
1477
|
-
if (f &&
|
1478
|
-
const
|
1479
|
-
|
1474
|
+
let _, b;
|
1475
|
+
for (const V of y) {
|
1476
|
+
const { path: C } = V;
|
1477
|
+
if (f && C[0] !== "/") {
|
1478
|
+
const j = f.record.path, D = j[j.length - 1] === "/" ? "" : "/";
|
1479
|
+
V.path = f.record.path + (C && D + C);
|
1480
1480
|
}
|
1481
|
-
if (O.NODE_ENV !== "production" &&
|
1481
|
+
if (O.NODE_ENV !== "production" && V.path === "*")
|
1482
1482
|
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
1483
1483
|
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
|
1484
|
-
if (_ =
|
1485
|
-
const
|
1486
|
-
for (let
|
1487
|
-
|
1484
|
+
if (_ = $o(V, f, g), O.NODE_ENV !== "production" && f && C[0] === "/" && Bo(_, f), h ? (h.alias.push(_), O.NODE_ENV !== "production" && Do(h, _)) : (b = b || _, b !== _ && b.alias.push(_), v && a.name && !jt(_) && (O.NODE_ENV !== "production" && Fo(a, f), s(a.name))), Rn(_) && l(_), p.children) {
|
1485
|
+
const j = p.children;
|
1486
|
+
for (let D = 0; D < j.length; D++)
|
1487
|
+
i(j[D], _, h && h.children[D]);
|
1488
1488
|
}
|
1489
|
-
|
1489
|
+
h = h || _;
|
1490
1490
|
}
|
1491
|
-
return
|
1492
|
-
|
1493
|
-
} :
|
1491
|
+
return b ? () => {
|
1492
|
+
s(b);
|
1493
|
+
} : we;
|
1494
1494
|
}
|
1495
|
-
function
|
1496
|
-
if (
|
1495
|
+
function s(a) {
|
1496
|
+
if (bn(a)) {
|
1497
1497
|
const f = r.get(a);
|
1498
|
-
f && (r.delete(a), n.splice(n.indexOf(f), 1), f.children.forEach(
|
1498
|
+
f && (r.delete(a), n.splice(n.indexOf(f), 1), f.children.forEach(s), f.alias.forEach(s));
|
1499
1499
|
} else {
|
1500
1500
|
const f = n.indexOf(a);
|
1501
|
-
f > -1 && (n.splice(f, 1), a.record.name && r.delete(a.record.name), a.children.forEach(
|
1501
|
+
f > -1 && (n.splice(f, 1), a.record.name && r.delete(a.record.name), a.children.forEach(s), a.alias.forEach(s));
|
1502
1502
|
}
|
1503
1503
|
}
|
1504
|
-
function
|
1504
|
+
function c() {
|
1505
1505
|
return n;
|
1506
1506
|
}
|
1507
1507
|
function l(a) {
|
1508
|
-
const f =
|
1509
|
-
n.splice(f, 0, a), a.record.name && !
|
1508
|
+
const f = Lo(a, n);
|
1509
|
+
n.splice(f, 0, a), a.record.name && !jt(a) && r.set(a.record.name, a);
|
1510
1510
|
}
|
1511
|
-
function
|
1512
|
-
let
|
1511
|
+
function d(a, f) {
|
1512
|
+
let h, v = {}, p, g;
|
1513
1513
|
if ("name" in a && a.name) {
|
1514
|
-
if (
|
1515
|
-
throw
|
1514
|
+
if (h = r.get(a.name), !h)
|
1515
|
+
throw le(1, {
|
1516
1516
|
location: a
|
1517
1517
|
});
|
1518
1518
|
if (O.NODE_ENV !== "production") {
|
1519
|
-
const
|
1520
|
-
|
1519
|
+
const b = Object.keys(a.params || {}).filter((V) => !h.keys.find((C) => C.name === V));
|
1520
|
+
b.length && R(`Discarded invalid param(s) "${b.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
1521
1521
|
}
|
1522
|
-
g =
|
1522
|
+
g = h.record.name, v = I(
|
1523
1523
|
// paramsFromLocation is a new object
|
1524
|
-
|
1524
|
+
Ct(
|
1525
1525
|
f.params,
|
1526
1526
|
// only keep params that exist in the resolved location
|
1527
1527
|
// only keep optional params coming from a parent record
|
1528
|
-
|
1528
|
+
h.keys.filter((b) => !b.optional).concat(h.parent ? h.parent.keys.filter((b) => b.optional) : []).map((b) => b.name)
|
1529
1529
|
),
|
1530
1530
|
// discard any existing params in the current location that do not exist here
|
1531
1531
|
// #1497 this ensures better active/exact matching
|
1532
|
-
a.params &&
|
1533
|
-
), p =
|
1532
|
+
a.params && Ct(a.params, h.keys.map((b) => b.name))
|
1533
|
+
), p = h.stringify(v);
|
1534
1534
|
} else if (a.path != null)
|
1535
|
-
p = a.path, O.NODE_ENV !== "production" && !p.startsWith("/") &&
|
1535
|
+
p = a.path, O.NODE_ENV !== "production" && !p.startsWith("/") && R(`The Matcher cannot resolve relative paths but received "${p}". Unless you directly called \`matcher.resolve("${p}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), h = n.find((b) => b.re.test(p)), h && (v = h.parse(p), g = h.record.name);
|
1536
1536
|
else {
|
1537
|
-
if (
|
1538
|
-
throw
|
1537
|
+
if (h = f.name ? r.get(f.name) : n.find((b) => b.re.test(f.path)), !h)
|
1538
|
+
throw le(1, {
|
1539
1539
|
location: a,
|
1540
1540
|
currentLocation: f
|
1541
1541
|
});
|
1542
|
-
g =
|
1542
|
+
g = h.record.name, v = I({}, f.params, a.params), p = h.stringify(v);
|
1543
1543
|
}
|
1544
1544
|
const y = [];
|
1545
|
-
let _ =
|
1545
|
+
let _ = h;
|
1546
1546
|
for (; _; )
|
1547
1547
|
y.unshift(_.record), _ = _.parent;
|
1548
1548
|
return {
|
@@ -1553,26 +1553,26 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
|
|
1553
1553
|
meta: jo(y)
|
1554
1554
|
};
|
1555
1555
|
}
|
1556
|
-
e.forEach((a) =>
|
1557
|
-
function
|
1556
|
+
e.forEach((a) => i(a));
|
1557
|
+
function u() {
|
1558
1558
|
n.length = 0, r.clear();
|
1559
1559
|
}
|
1560
1560
|
return {
|
1561
|
-
addRoute:
|
1562
|
-
resolve:
|
1563
|
-
removeRoute:
|
1564
|
-
clearRoutes:
|
1565
|
-
getRoutes:
|
1561
|
+
addRoute: i,
|
1562
|
+
resolve: d,
|
1563
|
+
removeRoute: s,
|
1564
|
+
clearRoutes: u,
|
1565
|
+
getRoutes: c,
|
1566
1566
|
getRecordMatcher: o
|
1567
1567
|
};
|
1568
1568
|
}
|
1569
|
-
function
|
1569
|
+
function Ct(e, t) {
|
1570
1570
|
const n = {};
|
1571
1571
|
for (const r of t)
|
1572
1572
|
r in e && (n[r] = e[r]);
|
1573
1573
|
return n;
|
1574
1574
|
}
|
1575
|
-
function
|
1575
|
+
function xt(e) {
|
1576
1576
|
const t = {
|
1577
1577
|
path: e.path,
|
1578
1578
|
redirect: e.redirect,
|
@@ -1580,7 +1580,7 @@ function Ct(e) {
|
|
1580
1580
|
meta: e.meta || {},
|
1581
1581
|
aliasOf: e.aliasOf,
|
1582
1582
|
beforeEnter: e.beforeEnter,
|
1583
|
-
props:
|
1583
|
+
props: xo(e),
|
1584
1584
|
children: e.children || [],
|
1585
1585
|
instances: {},
|
1586
1586
|
leaveGuards: /* @__PURE__ */ new Set(),
|
@@ -1594,7 +1594,7 @@ function Ct(e) {
|
|
1594
1594
|
value: {}
|
1595
1595
|
}), t;
|
1596
1596
|
}
|
1597
|
-
function
|
1597
|
+
function xo(e) {
|
1598
1598
|
const t = {}, n = e.props || !1;
|
1599
1599
|
if ("component" in e)
|
1600
1600
|
t.default = n;
|
@@ -1603,7 +1603,7 @@ function $o(e) {
|
|
1603
1603
|
t[r] = typeof n == "object" ? n[r] : n;
|
1604
1604
|
return t;
|
1605
1605
|
}
|
1606
|
-
function
|
1606
|
+
function jt(e) {
|
1607
1607
|
for (; e; ) {
|
1608
1608
|
if (e.record.aliasOf)
|
1609
1609
|
return !0;
|
@@ -1620,60 +1620,60 @@ function Dt(e, t) {
|
|
1620
1620
|
n[r] = r in t ? t[r] : e[r];
|
1621
1621
|
return n;
|
1622
1622
|
}
|
1623
|
-
function
|
1623
|
+
function it(e, t) {
|
1624
1624
|
return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
|
1625
1625
|
}
|
1626
|
-
function
|
1626
|
+
function Do(e, t) {
|
1627
1627
|
for (const n of e.keys)
|
1628
|
-
if (!n.optional && !t.keys.find(
|
1629
|
-
return
|
1628
|
+
if (!n.optional && !t.keys.find(it.bind(null, n)))
|
1629
|
+
return R(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
1630
1630
|
for (const n of t.keys)
|
1631
|
-
if (!n.optional && !e.keys.find(
|
1632
|
-
return
|
1631
|
+
if (!n.optional && !e.keys.find(it.bind(null, n)))
|
1632
|
+
return R(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
1633
1633
|
}
|
1634
|
-
function
|
1635
|
-
t && t.record.name && !e.name && !e.path &&
|
1634
|
+
function Mo(e, t) {
|
1635
|
+
t && t.record.name && !e.name && !e.path && R(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
|
1636
1636
|
}
|
1637
|
-
function
|
1637
|
+
function Fo(e, t) {
|
1638
1638
|
for (let n = t; n; n = n.parent)
|
1639
1639
|
if (n.record.name === e.name)
|
1640
1640
|
throw new Error(`A route named "${String(e.name)}" has been added as a ${t === n ? "child" : "descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);
|
1641
1641
|
}
|
1642
|
-
function
|
1642
|
+
function Bo(e, t) {
|
1643
1643
|
for (const n of t.keys)
|
1644
|
-
if (!e.keys.find(
|
1645
|
-
return
|
1644
|
+
if (!e.keys.find(it.bind(null, n)))
|
1645
|
+
return R(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
|
1646
1646
|
}
|
1647
|
-
function
|
1647
|
+
function Lo(e, t) {
|
1648
1648
|
let n = 0, r = t.length;
|
1649
1649
|
for (; n !== r; ) {
|
1650
|
-
const
|
1651
|
-
|
1650
|
+
const i = n + r >> 1;
|
1651
|
+
On(e, t[i]) < 0 ? r = i : n = i + 1;
|
1652
1652
|
}
|
1653
|
-
const o =
|
1654
|
-
return o && (r = t.lastIndexOf(o, r - 1), O.NODE_ENV !== "production" && r < 0 &&
|
1653
|
+
const o = Wo(e);
|
1654
|
+
return o && (r = t.lastIndexOf(o, r - 1), O.NODE_ENV !== "production" && r < 0 && R(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
|
1655
1655
|
}
|
1656
|
-
function
|
1656
|
+
function Wo(e) {
|
1657
1657
|
let t = e;
|
1658
1658
|
for (; t = t.parent; )
|
1659
|
-
if (
|
1659
|
+
if (Rn(t) && On(e, t) === 0)
|
1660
1660
|
return t;
|
1661
1661
|
}
|
1662
|
-
function
|
1662
|
+
function Rn({ record: e }) {
|
1663
1663
|
return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
|
1664
1664
|
}
|
1665
|
-
function
|
1665
|
+
function Uo(e) {
|
1666
1666
|
const t = {};
|
1667
1667
|
if (e === "" || e === "?")
|
1668
1668
|
return t;
|
1669
1669
|
const r = (e[0] === "?" ? e.slice(1) : e).split("&");
|
1670
1670
|
for (let o = 0; o < r.length; ++o) {
|
1671
|
-
const
|
1672
|
-
if (
|
1673
|
-
let
|
1674
|
-
|
1671
|
+
const i = r[o].replace(pn, " "), s = i.indexOf("="), c = ce(s < 0 ? i : i.slice(0, s)), l = s < 0 ? null : ce(i.slice(s + 1));
|
1672
|
+
if (c in t) {
|
1673
|
+
let d = t[c];
|
1674
|
+
W(d) || (d = t[c] = [d]), d.push(l);
|
1675
1675
|
} else
|
1676
|
-
t[
|
1676
|
+
t[c] = l;
|
1677
1677
|
}
|
1678
1678
|
return t;
|
1679
1679
|
}
|
@@ -1681,26 +1681,26 @@ function Mt(e) {
|
|
1681
1681
|
let t = "";
|
1682
1682
|
for (let n in e) {
|
1683
1683
|
const r = e[n];
|
1684
|
-
if (n =
|
1684
|
+
if (n = oo(n), r == null) {
|
1685
1685
|
r !== void 0 && (t += (t.length ? "&" : "") + n);
|
1686
1686
|
continue;
|
1687
1687
|
}
|
1688
|
-
(
|
1689
|
-
|
1688
|
+
(W(r) ? r.map((i) => i && rt(i)) : [r && rt(r)]).forEach((i) => {
|
1689
|
+
i !== void 0 && (t += (t.length ? "&" : "") + n, i != null && (t += "=" + i));
|
1690
1690
|
});
|
1691
1691
|
}
|
1692
1692
|
return t;
|
1693
1693
|
}
|
1694
|
-
function
|
1694
|
+
function Go(e) {
|
1695
1695
|
const t = {};
|
1696
1696
|
for (const n in e) {
|
1697
1697
|
const r = e[n];
|
1698
|
-
r !== void 0 && (t[n] =
|
1698
|
+
r !== void 0 && (t[n] = W(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
|
1699
1699
|
}
|
1700
1700
|
return t;
|
1701
1701
|
}
|
1702
|
-
const
|
1703
|
-
function
|
1702
|
+
const qo = Symbol(O.NODE_ENV !== "production" ? "router view location matched" : ""), Ft = Symbol(O.NODE_ENV !== "production" ? "router view depth" : ""), Fe = Symbol(O.NODE_ENV !== "production" ? "router" : ""), gt = Symbol(O.NODE_ENV !== "production" ? "route location" : ""), at = Symbol(O.NODE_ENV !== "production" ? "router view location" : "");
|
1703
|
+
function ge() {
|
1704
1704
|
let e = [];
|
1705
1705
|
function t(r) {
|
1706
1706
|
return e.push(r), () => {
|
@@ -1717,29 +1717,29 @@ function pe() {
|
|
1717
1717
|
reset: n
|
1718
1718
|
};
|
1719
1719
|
}
|
1720
|
-
function
|
1721
|
-
const
|
1720
|
+
function Y(e, t, n, r, o, i = (s) => s()) {
|
1721
|
+
const s = r && // name is defined if record is because of the function overload
|
1722
1722
|
(r.enterCallbacks[o] = r.enterCallbacks[o] || []);
|
1723
|
-
return () => new Promise((
|
1724
|
-
const
|
1725
|
-
f === !1 ? l(
|
1723
|
+
return () => new Promise((c, l) => {
|
1724
|
+
const d = (f) => {
|
1725
|
+
f === !1 ? l(le(4, {
|
1726
1726
|
from: n,
|
1727
1727
|
to: t
|
1728
|
-
})) : f instanceof Error ? l(f) :
|
1728
|
+
})) : f instanceof Error ? l(f) : Ae(f) ? l(le(2, {
|
1729
1729
|
from: t,
|
1730
1730
|
to: f
|
1731
|
-
})) : (
|
1732
|
-
r.enterCallbacks[o] ===
|
1733
|
-
},
|
1734
|
-
let a = Promise.resolve(
|
1735
|
-
if (e.length < 3 && (a = a.then(
|
1731
|
+
})) : (s && // since enterCallbackArray is truthy, both record and name also are
|
1732
|
+
r.enterCallbacks[o] === s && typeof f == "function" && s.push(f), c());
|
1733
|
+
}, u = i(() => e.call(r && r.instances[o], t, n, O.NODE_ENV !== "production" ? Ko(d, t, n) : d));
|
1734
|
+
let a = Promise.resolve(u);
|
1735
|
+
if (e.length < 3 && (a = a.then(d)), O.NODE_ENV !== "production" && e.length > 2) {
|
1736
1736
|
const f = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
|
1737
1737
|
${e.toString()}
|
1738
1738
|
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
|
1739
|
-
if (typeof
|
1740
|
-
a = a.then((
|
1741
|
-
else if (
|
1742
|
-
|
1739
|
+
if (typeof u == "object" && "then" in u)
|
1740
|
+
a = a.then((h) => d._called ? h : (R(f), Promise.reject(new Error("Invalid navigation guard"))));
|
1741
|
+
else if (u !== void 0 && !d._called) {
|
1742
|
+
R(f), l(new Error("Invalid navigation guard"));
|
1743
1743
|
return;
|
1744
1744
|
}
|
1745
1745
|
}
|
@@ -1749,108 +1749,108 @@ ${e.toString()}
|
|
1749
1749
|
function Ko(e, t, n) {
|
1750
1750
|
let r = 0;
|
1751
1751
|
return function() {
|
1752
|
-
r++ === 1 &&
|
1752
|
+
r++ === 1 && R(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, r === 1 && e.apply(null, arguments);
|
1753
1753
|
};
|
1754
1754
|
}
|
1755
|
-
function Qe(e, t, n, r, o = (
|
1756
|
-
const
|
1757
|
-
for (const
|
1758
|
-
O.NODE_ENV !== "production" && !
|
1759
|
-
for (const
|
1760
|
-
let l =
|
1755
|
+
function Qe(e, t, n, r, o = (i) => i()) {
|
1756
|
+
const i = [];
|
1757
|
+
for (const s of e) {
|
1758
|
+
O.NODE_ENV !== "production" && !s.components && !s.children.length && R(`Record with path "${s.path}" is either missing a "component(s)" or "children" property.`);
|
1759
|
+
for (const c in s.components) {
|
1760
|
+
let l = s.components[c];
|
1761
1761
|
if (O.NODE_ENV !== "production") {
|
1762
1762
|
if (!l || typeof l != "object" && typeof l != "function")
|
1763
|
-
throw
|
1763
|
+
throw R(`Component "${c}" in record with path "${s.path}" is not a valid component. Received "${String(l)}".`), new Error("Invalid route component");
|
1764
1764
|
if ("then" in l) {
|
1765
|
-
|
1766
|
-
const
|
1767
|
-
l = () =>
|
1765
|
+
R(`Component "${c}" in record with path "${s.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
|
1766
|
+
const d = l;
|
1767
|
+
l = () => d;
|
1768
1768
|
} else l.__asyncLoader && // warn only once per component
|
1769
|
-
!l.__warnedDefineAsync && (l.__warnedDefineAsync = !0,
|
1769
|
+
!l.__warnedDefineAsync && (l.__warnedDefineAsync = !0, R(`Component "${c}" in record with path "${s.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
|
1770
1770
|
}
|
1771
|
-
if (!(t !== "beforeRouteEnter" && !
|
1772
|
-
if (
|
1773
|
-
const
|
1774
|
-
|
1771
|
+
if (!(t !== "beforeRouteEnter" && !s.instances[c]))
|
1772
|
+
if (dn(l)) {
|
1773
|
+
const u = (l.__vccOpts || l)[t];
|
1774
|
+
u && i.push(Y(u, n, r, s, c, o));
|
1775
1775
|
} else {
|
1776
|
-
let
|
1777
|
-
O.NODE_ENV !== "production" && !("catch" in
|
1778
|
-
if (!
|
1779
|
-
throw new Error(`Couldn't resolve component "${
|
1780
|
-
const a =
|
1781
|
-
|
1782
|
-
const
|
1783
|
-
return
|
1776
|
+
let d = l();
|
1777
|
+
O.NODE_ENV !== "production" && !("catch" in d) && (R(`Component "${c}" in record with path "${s.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), d = Promise.resolve(d)), i.push(() => d.then((u) => {
|
1778
|
+
if (!u)
|
1779
|
+
throw new Error(`Couldn't resolve component "${c}" at "${s.path}"`);
|
1780
|
+
const a = Hr(u) ? u.default : u;
|
1781
|
+
s.mods[c] = u, s.components[c] = a;
|
1782
|
+
const h = (a.__vccOpts || a)[t];
|
1783
|
+
return h && Y(h, n, r, s, c, o)();
|
1784
1784
|
}));
|
1785
1785
|
}
|
1786
1786
|
}
|
1787
1787
|
}
|
1788
|
-
return
|
1788
|
+
return i;
|
1789
1789
|
}
|
1790
1790
|
function Bt(e) {
|
1791
|
-
const t =
|
1791
|
+
const t = Z(Fe), n = Z(gt);
|
1792
1792
|
let r = !1, o = null;
|
1793
|
-
const
|
1794
|
-
const
|
1795
|
-
return O.NODE_ENV !== "production" && (!r ||
|
1796
|
-
- to:`,
|
1793
|
+
const i = G(() => {
|
1794
|
+
const u = M(e.to);
|
1795
|
+
return O.NODE_ENV !== "production" && (!r || u !== o) && (Ae(u) || (r ? R(`Invalid value for prop "to" in useLink()
|
1796
|
+
- to:`, u, `
|
1797
1797
|
- previous to:`, o, `
|
1798
|
-
- props:`, e) :
|
1799
|
-
- to:`,
|
1800
|
-
- props:`, e)), o =
|
1801
|
-
}),
|
1802
|
-
const { matched:
|
1803
|
-
if (!f || !
|
1798
|
+
- props:`, e) : R(`Invalid value for prop "to" in useLink()
|
1799
|
+
- to:`, u, `
|
1800
|
+
- props:`, e)), o = u, r = !0), t.resolve(u);
|
1801
|
+
}), s = G(() => {
|
1802
|
+
const { matched: u } = i.value, { length: a } = u, f = u[a - 1], h = n.matched;
|
1803
|
+
if (!f || !h.length)
|
1804
1804
|
return -1;
|
1805
|
-
const v =
|
1805
|
+
const v = h.findIndex(ee.bind(null, f));
|
1806
1806
|
if (v > -1)
|
1807
1807
|
return v;
|
1808
|
-
const p = Lt(
|
1808
|
+
const p = Lt(u[a - 2]);
|
1809
1809
|
return (
|
1810
1810
|
// we are dealing with nested routes
|
1811
1811
|
a > 1 && // if the parent and matched route have the same path, this link is
|
1812
1812
|
// referring to the empty child. Or we currently are on a different
|
1813
1813
|
// child of the same parent
|
1814
1814
|
Lt(f) === p && // avoid comparing the child with its parent
|
1815
|
-
|
1815
|
+
h[h.length - 1].path !== p ? h.findIndex(ee.bind(null, u[a - 2])) : v
|
1816
1816
|
);
|
1817
|
-
}),
|
1818
|
-
function
|
1819
|
-
if (
|
1820
|
-
const a = t[
|
1821
|
-
|
1817
|
+
}), c = G(() => s.value > -1 && Yo(n.params, i.value.params)), l = G(() => s.value > -1 && s.value === n.matched.length - 1 && yn(n.params, i.value.params));
|
1818
|
+
function d(u = {}) {
|
1819
|
+
if (Jo(u)) {
|
1820
|
+
const a = t[M(e.replace) ? "replace" : "push"](
|
1821
|
+
M(e.to)
|
1822
1822
|
// avoid uncaught errors are they are logged anyway
|
1823
|
-
).catch(
|
1823
|
+
).catch(we);
|
1824
1824
|
return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => a), a;
|
1825
1825
|
}
|
1826
1826
|
return Promise.resolve();
|
1827
1827
|
}
|
1828
|
-
if (O.NODE_ENV !== "production" &&
|
1829
|
-
const
|
1830
|
-
if (
|
1828
|
+
if (O.NODE_ENV !== "production" && Q) {
|
1829
|
+
const u = Qt();
|
1830
|
+
if (u) {
|
1831
1831
|
const a = {
|
1832
|
-
route:
|
1833
|
-
isActive:
|
1832
|
+
route: i.value,
|
1833
|
+
isActive: c.value,
|
1834
1834
|
isExactActive: l.value,
|
1835
1835
|
error: null
|
1836
1836
|
};
|
1837
|
-
|
1838
|
-
a.route =
|
1837
|
+
u.__vrl_devtools = u.__vrl_devtools || [], u.__vrl_devtools.push(a), zt(() => {
|
1838
|
+
a.route = i.value, a.isActive = c.value, a.isExactActive = l.value, a.error = Ae(M(e.to)) ? null : 'Invalid "to" value';
|
1839
1839
|
}, { flush: "post" });
|
1840
1840
|
}
|
1841
1841
|
}
|
1842
1842
|
return {
|
1843
|
-
route:
|
1844
|
-
href:
|
1845
|
-
isActive:
|
1843
|
+
route: i,
|
1844
|
+
href: G(() => i.value.href),
|
1845
|
+
isActive: c,
|
1846
1846
|
isExactActive: l,
|
1847
|
-
navigate:
|
1847
|
+
navigate: d
|
1848
1848
|
};
|
1849
1849
|
}
|
1850
|
-
function
|
1850
|
+
function Ho(e) {
|
1851
1851
|
return e.length === 1 ? e[0] : e;
|
1852
1852
|
}
|
1853
|
-
const
|
1853
|
+
const zo = /* @__PURE__ */ U({
|
1854
1854
|
name: "RouterLink",
|
1855
1855
|
compatConfig: { MODE: 3 },
|
1856
1856
|
props: {
|
@@ -1870,7 +1870,7 @@ const qo = /* @__PURE__ */ F({
|
|
1870
1870
|
},
|
1871
1871
|
useLink: Bt,
|
1872
1872
|
setup(e, { slots: t }) {
|
1873
|
-
const n =
|
1873
|
+
const n = Hn(Bt(e)), { options: r } = Z(Fe), o = G(() => ({
|
1874
1874
|
[Wt(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
|
1875
1875
|
// [getLinkClass(
|
1876
1876
|
// props.inactiveClass,
|
@@ -1880,19 +1880,19 @@ const qo = /* @__PURE__ */ F({
|
|
1880
1880
|
[Wt(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
|
1881
1881
|
}));
|
1882
1882
|
return () => {
|
1883
|
-
const
|
1884
|
-
return e.custom ?
|
1883
|
+
const i = t.default && Ho(t.default(n));
|
1884
|
+
return e.custom ? i : A("a", {
|
1885
1885
|
"aria-current": n.isExactActive ? e.ariaCurrentValue : null,
|
1886
1886
|
href: n.href,
|
1887
1887
|
// this would override user added attrs but Vue will still add
|
1888
1888
|
// the listener, so we end up triggering both
|
1889
1889
|
onClick: n.navigate,
|
1890
1890
|
class: o.value
|
1891
|
-
},
|
1891
|
+
}, i);
|
1892
1892
|
};
|
1893
1893
|
}
|
1894
|
-
}),
|
1895
|
-
function
|
1894
|
+
}), Qo = zo;
|
1895
|
+
function Jo(e) {
|
1896
1896
|
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
|
1897
1897
|
if (e.currentTarget && e.currentTarget.getAttribute) {
|
1898
1898
|
const t = e.currentTarget.getAttribute("target");
|
@@ -1902,13 +1902,13 @@ function zo(e) {
|
|
1902
1902
|
return e.preventDefault && e.preventDefault(), !0;
|
1903
1903
|
}
|
1904
1904
|
}
|
1905
|
-
function
|
1905
|
+
function Yo(e, t) {
|
1906
1906
|
for (const n in t) {
|
1907
1907
|
const r = t[n], o = e[n];
|
1908
1908
|
if (typeof r == "string") {
|
1909
1909
|
if (r !== o)
|
1910
1910
|
return !1;
|
1911
|
-
} else if (!
|
1911
|
+
} else if (!W(o) || o.length !== r.length || r.some((i, s) => i !== o[s]))
|
1912
1912
|
return !1;
|
1913
1913
|
}
|
1914
1914
|
return !0;
|
@@ -1916,7 +1916,7 @@ function Jo(e, t) {
|
|
1916
1916
|
function Lt(e) {
|
1917
1917
|
return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
|
1918
1918
|
}
|
1919
|
-
const Wt = (e, t, n) => e ?? t ?? n,
|
1919
|
+
const Wt = (e, t, n) => e ?? t ?? n, Xo = /* @__PURE__ */ U({
|
1920
1920
|
name: "RouterView",
|
1921
1921
|
// #674 we manually inherit them
|
1922
1922
|
inheritAttrs: !1,
|
@@ -1931,46 +1931,46 @@ const Wt = (e, t, n) => e ?? t ?? n, Qo = /* @__PURE__ */ F({
|
|
1931
1931
|
// https://github.com/vuejs/router/issues/1315
|
1932
1932
|
compatConfig: { MODE: 3 },
|
1933
1933
|
setup(e, { attrs: t, slots: n }) {
|
1934
|
-
O.NODE_ENV !== "production" &&
|
1935
|
-
const r =
|
1936
|
-
let
|
1937
|
-
const { matched:
|
1934
|
+
O.NODE_ENV !== "production" && es();
|
1935
|
+
const r = Z(at), o = G(() => e.route || r.value), i = Z(Ft, 0), s = G(() => {
|
1936
|
+
let d = M(i);
|
1937
|
+
const { matched: u } = o.value;
|
1938
1938
|
let a;
|
1939
|
-
for (; (a =
|
1940
|
-
|
1941
|
-
return
|
1942
|
-
}),
|
1943
|
-
Ne(Ft,
|
1944
|
-
const l =
|
1945
|
-
return
|
1946
|
-
|
1939
|
+
for (; (a = u[d]) && !a.components; )
|
1940
|
+
d++;
|
1941
|
+
return d;
|
1942
|
+
}), c = G(() => o.value.matched[s.value]);
|
1943
|
+
Ne(Ft, G(() => s.value + 1)), Ne(qo, c), Ne(at, o);
|
1944
|
+
const l = K();
|
1945
|
+
return H(() => [l.value, c.value, e.name], ([d, u, a], [f, h, v]) => {
|
1946
|
+
u && (u.instances[a] = d, h && h !== u && d && d === f && (u.leaveGuards.size || (u.leaveGuards = h.leaveGuards), u.updateGuards.size || (u.updateGuards = h.updateGuards))), d && u && // if there is no instance but to and from are the same this might be
|
1947
1947
|
// the first visit
|
1948
|
-
(!
|
1948
|
+
(!h || !ee(u, h) || !f) && (u.enterCallbacks[a] || []).forEach((p) => p(d));
|
1949
1949
|
}, { flush: "post" }), () => {
|
1950
|
-
const
|
1950
|
+
const d = o.value, u = e.name, a = c.value, f = a && a.components[u];
|
1951
1951
|
if (!f)
|
1952
|
-
return Ut(n.default, { Component: f, route:
|
1953
|
-
const
|
1952
|
+
return Ut(n.default, { Component: f, route: d });
|
1953
|
+
const h = a.props[u], v = h ? h === !0 ? d.params : typeof h == "function" ? h(d) : h : null, g = A(f, I({}, v, t, {
|
1954
1954
|
onVnodeUnmounted: (y) => {
|
1955
|
-
y.component.isUnmounted && (a.instances[
|
1955
|
+
y.component.isUnmounted && (a.instances[u] = null);
|
1956
1956
|
},
|
1957
1957
|
ref: l
|
1958
1958
|
}));
|
1959
|
-
if (O.NODE_ENV !== "production" &&
|
1959
|
+
if (O.NODE_ENV !== "production" && Q && g.ref) {
|
1960
1960
|
const y = {
|
1961
|
-
depth:
|
1961
|
+
depth: s.value,
|
1962
1962
|
name: a.name,
|
1963
1963
|
path: a.path,
|
1964
1964
|
meta: a.meta
|
1965
1965
|
};
|
1966
|
-
(
|
1967
|
-
|
1966
|
+
(W(g.ref) ? g.ref.map((b) => b.i) : [g.ref.i]).forEach((b) => {
|
1967
|
+
b.__vrv_devtools = y;
|
1968
1968
|
});
|
1969
1969
|
}
|
1970
1970
|
return (
|
1971
1971
|
// pass the vnode to the slot as a prop.
|
1972
1972
|
// h and <component :is="..."> both accept vnodes
|
1973
|
-
Ut(n.default, { Component: g, route:
|
1973
|
+
Ut(n.default, { Component: g, route: d }) || g
|
1974
1974
|
);
|
1975
1975
|
};
|
1976
1976
|
}
|
@@ -1981,12 +1981,12 @@ function Ut(e, t) {
|
|
1981
1981
|
const n = e(t);
|
1982
1982
|
return n.length === 1 ? n[0] : n;
|
1983
1983
|
}
|
1984
|
-
const
|
1985
|
-
function
|
1986
|
-
const e =
|
1984
|
+
const Zo = Xo;
|
1985
|
+
function es() {
|
1986
|
+
const e = Qt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
|
1987
1987
|
if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
|
1988
1988
|
const r = t === "KeepAlive" ? "keep-alive" : "transition";
|
1989
|
-
|
1989
|
+
R(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
1990
1990
|
Use slot props instead:
|
1991
1991
|
|
1992
1992
|
<router-view v-slot="{ Component }">
|
@@ -1996,10 +1996,10 @@ Use slot props instead:
|
|
1996
1996
|
</router-view>`);
|
1997
1997
|
}
|
1998
1998
|
}
|
1999
|
-
function
|
1999
|
+
function ve(e, t) {
|
2000
2000
|
const n = I({}, e, {
|
2001
2001
|
// remove variables that can contain vue instances
|
2002
|
-
matched: e.matched.map((r) =>
|
2002
|
+
matched: e.matched.map((r) => fs(r, ["instances", "children", "aliasOf"]))
|
2003
2003
|
});
|
2004
2004
|
return {
|
2005
2005
|
_custom: {
|
@@ -2011,19 +2011,19 @@ function me(e, t) {
|
|
2011
2011
|
}
|
2012
2012
|
};
|
2013
2013
|
}
|
2014
|
-
function
|
2014
|
+
function ke(e) {
|
2015
2015
|
return {
|
2016
2016
|
_custom: {
|
2017
2017
|
display: e
|
2018
2018
|
}
|
2019
2019
|
};
|
2020
2020
|
}
|
2021
|
-
let
|
2022
|
-
function
|
2021
|
+
let ts = 0;
|
2022
|
+
function ns(e, t, n) {
|
2023
2023
|
if (t.__hasDevtools)
|
2024
2024
|
return;
|
2025
2025
|
t.__hasDevtools = !0;
|
2026
|
-
const r =
|
2026
|
+
const r = ts++;
|
2027
2027
|
Kr({
|
2028
2028
|
id: "org.vuejs.router" + (r ? "." + r : ""),
|
2029
2029
|
label: "Vue Router",
|
@@ -2033,77 +2033,77 @@ function es(e, t, n) {
|
|
2033
2033
|
componentStateTypes: ["Routing"],
|
2034
2034
|
app: e
|
2035
2035
|
}, (o) => {
|
2036
|
-
typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((
|
2037
|
-
|
2036
|
+
typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((u, a) => {
|
2037
|
+
u.instanceData && u.instanceData.state.push({
|
2038
2038
|
type: "Routing",
|
2039
2039
|
key: "$route",
|
2040
2040
|
editable: !1,
|
2041
|
-
value:
|
2041
|
+
value: ve(t.currentRoute.value, "Current Route")
|
2042
2042
|
});
|
2043
|
-
}), o.on.visitComponentTree(({ treeNode:
|
2043
|
+
}), o.on.visitComponentTree(({ treeNode: u, componentInstance: a }) => {
|
2044
2044
|
if (a.__vrv_devtools) {
|
2045
2045
|
const f = a.__vrv_devtools;
|
2046
|
-
|
2046
|
+
u.tags.push({
|
2047
2047
|
label: (f.name ? `${f.name.toString()}: ` : "") + f.path,
|
2048
2048
|
textColor: 0,
|
2049
2049
|
tooltip: "This component is rendered by <router-view>",
|
2050
|
-
backgroundColor:
|
2050
|
+
backgroundColor: Vn
|
2051
2051
|
});
|
2052
2052
|
}
|
2053
|
-
|
2054
|
-
let
|
2055
|
-
f.error ? (
|
2056
|
-
label:
|
2053
|
+
W(a.__vrl_devtools) && (a.__devtoolsApi = o, a.__vrl_devtools.forEach((f) => {
|
2054
|
+
let h = f.route.path, v = Nn, p = "", g = 0;
|
2055
|
+
f.error ? (h = f.error, v = as, g = cs) : f.isExactActive ? (v = kn, p = "This is exactly active") : f.isActive && (v = Pn, p = "This link is active"), u.tags.push({
|
2056
|
+
label: h,
|
2057
2057
|
textColor: g,
|
2058
2058
|
tooltip: p,
|
2059
2059
|
backgroundColor: v
|
2060
2060
|
});
|
2061
2061
|
}));
|
2062
|
-
}),
|
2063
|
-
l(), o.notifyComponentUpdate(), o.sendInspectorTree(
|
2062
|
+
}), H(t.currentRoute, () => {
|
2063
|
+
l(), o.notifyComponentUpdate(), o.sendInspectorTree(c), o.sendInspectorState(c);
|
2064
2064
|
});
|
2065
|
-
const
|
2065
|
+
const i = "router:navigations:" + r;
|
2066
2066
|
o.addTimelineLayer({
|
2067
|
-
id:
|
2067
|
+
id: i,
|
2068
2068
|
label: `Router${r ? " " + r : ""} Navigations`,
|
2069
2069
|
color: 4237508
|
2070
|
-
}), t.onError((
|
2070
|
+
}), t.onError((u, a) => {
|
2071
2071
|
o.addTimelineEvent({
|
2072
|
-
layerId:
|
2072
|
+
layerId: i,
|
2073
2073
|
event: {
|
2074
2074
|
title: "Error during Navigation",
|
2075
2075
|
subtitle: a.fullPath,
|
2076
2076
|
logType: "error",
|
2077
2077
|
time: o.now(),
|
2078
|
-
data: { error:
|
2078
|
+
data: { error: u },
|
2079
2079
|
groupId: a.meta.__navigationId
|
2080
2080
|
}
|
2081
2081
|
});
|
2082
2082
|
});
|
2083
|
-
let
|
2084
|
-
t.beforeEach((
|
2083
|
+
let s = 0;
|
2084
|
+
t.beforeEach((u, a) => {
|
2085
2085
|
const f = {
|
2086
|
-
guard:
|
2087
|
-
from:
|
2088
|
-
to:
|
2086
|
+
guard: ke("beforeEach"),
|
2087
|
+
from: ve(a, "Current Location during this navigation"),
|
2088
|
+
to: ve(u, "Target location")
|
2089
2089
|
};
|
2090
|
-
Object.defineProperty(
|
2091
|
-
value:
|
2090
|
+
Object.defineProperty(u.meta, "__navigationId", {
|
2091
|
+
value: s++
|
2092
2092
|
}), o.addTimelineEvent({
|
2093
|
-
layerId:
|
2093
|
+
layerId: i,
|
2094
2094
|
event: {
|
2095
2095
|
time: o.now(),
|
2096
2096
|
title: "Start of navigation",
|
2097
|
-
subtitle:
|
2097
|
+
subtitle: u.fullPath,
|
2098
2098
|
data: f,
|
2099
|
-
groupId:
|
2099
|
+
groupId: u.meta.__navigationId
|
2100
2100
|
}
|
2101
2101
|
});
|
2102
|
-
}), t.afterEach((
|
2103
|
-
const
|
2104
|
-
guard:
|
2102
|
+
}), t.afterEach((u, a, f) => {
|
2103
|
+
const h = {
|
2104
|
+
guard: ke("afterEach")
|
2105
2105
|
};
|
2106
|
-
f ? (
|
2106
|
+
f ? (h.failure = {
|
2107
2107
|
_custom: {
|
2108
2108
|
type: Error,
|
2109
2109
|
readOnly: !0,
|
@@ -2111,54 +2111,54 @@ function es(e, t, n) {
|
|
2111
2111
|
tooltip: "Navigation Failure",
|
2112
2112
|
value: f
|
2113
2113
|
}
|
2114
|
-
},
|
2115
|
-
layerId:
|
2114
|
+
}, h.status = ke("❌")) : h.status = ke("✅"), h.from = ve(a, "Current Location during this navigation"), h.to = ve(u, "Target location"), o.addTimelineEvent({
|
2115
|
+
layerId: i,
|
2116
2116
|
event: {
|
2117
2117
|
title: "End of navigation",
|
2118
|
-
subtitle:
|
2118
|
+
subtitle: u.fullPath,
|
2119
2119
|
time: o.now(),
|
2120
|
-
data:
|
2120
|
+
data: h,
|
2121
2121
|
logType: f ? "warning" : "default",
|
2122
|
-
groupId:
|
2122
|
+
groupId: u.meta.__navigationId
|
2123
2123
|
}
|
2124
2124
|
});
|
2125
2125
|
});
|
2126
|
-
const
|
2126
|
+
const c = "router-inspector:" + r;
|
2127
2127
|
o.addInspector({
|
2128
|
-
id:
|
2128
|
+
id: c,
|
2129
2129
|
label: "Routes" + (r ? " " + r : ""),
|
2130
2130
|
icon: "book",
|
2131
2131
|
treeFilterPlaceholder: "Search routes"
|
2132
2132
|
});
|
2133
2133
|
function l() {
|
2134
|
-
if (!
|
2134
|
+
if (!d)
|
2135
2135
|
return;
|
2136
|
-
const
|
2136
|
+
const u = d;
|
2137
2137
|
let a = n.getRoutes().filter((f) => !f.parent || // these routes have a parent with no component which will not appear in the view
|
2138
2138
|
// therefore we still need to include them
|
2139
2139
|
!f.parent.record.components);
|
2140
|
-
a.forEach(
|
2140
|
+
a.forEach(An), u.filter && (a = a.filter((f) => (
|
2141
2141
|
// save matches state based on the payload
|
2142
|
-
|
2143
|
-
))), a.forEach((f) =>
|
2142
|
+
ct(f, u.filter.toLowerCase())
|
2143
|
+
))), a.forEach((f) => Tn(f, t.currentRoute.value)), u.rootNodes = a.map(In);
|
2144
2144
|
}
|
2145
|
-
let
|
2146
|
-
o.on.getInspectorTree((
|
2147
|
-
|
2148
|
-
}), o.on.getInspectorState((
|
2149
|
-
if (
|
2150
|
-
const f = n.getRoutes().find((
|
2151
|
-
f && (
|
2152
|
-
options:
|
2145
|
+
let d;
|
2146
|
+
o.on.getInspectorTree((u) => {
|
2147
|
+
d = u, u.app === e && u.inspectorId === c && l();
|
2148
|
+
}), o.on.getInspectorState((u) => {
|
2149
|
+
if (u.app === e && u.inspectorId === c) {
|
2150
|
+
const f = n.getRoutes().find((h) => h.record.__vd_id === u.nodeId);
|
2151
|
+
f && (u.state = {
|
2152
|
+
options: os(f)
|
2153
2153
|
});
|
2154
2154
|
}
|
2155
|
-
}), o.sendInspectorTree(
|
2155
|
+
}), o.sendInspectorTree(c), o.sendInspectorState(c);
|
2156
2156
|
});
|
2157
2157
|
}
|
2158
|
-
function
|
2158
|
+
function rs(e) {
|
2159
2159
|
return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
|
2160
2160
|
}
|
2161
|
-
function
|
2161
|
+
function os(e) {
|
2162
2162
|
const { record: t } = e, n = [
|
2163
2163
|
{ editable: !1, key: "path", value: t.path }
|
2164
2164
|
];
|
@@ -2173,7 +2173,7 @@ function ns(e) {
|
|
2173
2173
|
_custom: {
|
2174
2174
|
type: null,
|
2175
2175
|
readOnly: !0,
|
2176
|
-
display: e.keys.map((r) => `${r.name}${
|
2176
|
+
display: e.keys.map((r) => `${r.name}${rs(r)}`).join(" "),
|
2177
2177
|
tooltip: "Param keys",
|
2178
2178
|
value: e.keys
|
2179
2179
|
}
|
@@ -2204,84 +2204,84 @@ function ns(e) {
|
|
2204
2204
|
}
|
2205
2205
|
}), n;
|
2206
2206
|
}
|
2207
|
-
const
|
2208
|
-
function
|
2207
|
+
const Vn = 15485081, Pn = 2450411, kn = 8702998, ss = 2282478, Nn = 16486972, is = 6710886, as = 16704226, cs = 12131356;
|
2208
|
+
function In(e) {
|
2209
2209
|
const t = [], { record: n } = e;
|
2210
2210
|
n.name != null && t.push({
|
2211
2211
|
label: String(n.name),
|
2212
2212
|
textColor: 0,
|
2213
|
-
backgroundColor:
|
2213
|
+
backgroundColor: ss
|
2214
2214
|
}), n.aliasOf && t.push({
|
2215
2215
|
label: "alias",
|
2216
2216
|
textColor: 0,
|
2217
|
-
backgroundColor:
|
2217
|
+
backgroundColor: Nn
|
2218
2218
|
}), e.__vd_match && t.push({
|
2219
2219
|
label: "matches",
|
2220
2220
|
textColor: 0,
|
2221
|
-
backgroundColor:
|
2221
|
+
backgroundColor: Vn
|
2222
2222
|
}), e.__vd_exactActive && t.push({
|
2223
2223
|
label: "exact",
|
2224
2224
|
textColor: 0,
|
2225
|
-
backgroundColor:
|
2225
|
+
backgroundColor: kn
|
2226
2226
|
}), e.__vd_active && t.push({
|
2227
2227
|
label: "active",
|
2228
2228
|
textColor: 0,
|
2229
|
-
backgroundColor:
|
2229
|
+
backgroundColor: Pn
|
2230
2230
|
}), n.redirect && t.push({
|
2231
2231
|
label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
|
2232
2232
|
textColor: 16777215,
|
2233
|
-
backgroundColor:
|
2233
|
+
backgroundColor: is
|
2234
2234
|
});
|
2235
2235
|
let r = n.__vd_id;
|
2236
|
-
return r == null && (r = String(
|
2236
|
+
return r == null && (r = String(us++), n.__vd_id = r), {
|
2237
2237
|
id: r,
|
2238
2238
|
label: n.path,
|
2239
2239
|
tags: t,
|
2240
|
-
children: e.children.map(
|
2240
|
+
children: e.children.map(In)
|
2241
2241
|
};
|
2242
2242
|
}
|
2243
|
-
let
|
2244
|
-
const
|
2245
|
-
function
|
2246
|
-
const n = t.matched.length &&
|
2247
|
-
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) =>
|
2243
|
+
let us = 0;
|
2244
|
+
const ls = /^\/(.*)\/([a-z]*)$/;
|
2245
|
+
function Tn(e, t) {
|
2246
|
+
const n = t.matched.length && ee(t.matched[t.matched.length - 1], e.record);
|
2247
|
+
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => ee(r, e.record))), e.children.forEach((r) => Tn(r, t));
|
2248
2248
|
}
|
2249
|
-
function
|
2250
|
-
e.__vd_match = !1, e.children.forEach(
|
2249
|
+
function An(e) {
|
2250
|
+
e.__vd_match = !1, e.children.forEach(An);
|
2251
2251
|
}
|
2252
|
-
function
|
2253
|
-
const n = String(e.re).match(
|
2252
|
+
function ct(e, t) {
|
2253
|
+
const n = String(e.re).match(ls);
|
2254
2254
|
if (e.__vd_match = !1, !n || n.length < 3)
|
2255
2255
|
return !1;
|
2256
2256
|
if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
|
2257
|
-
return e.children.forEach((
|
2258
|
-
const o = e.record.path.toLowerCase(),
|
2259
|
-
return !t.startsWith("/") && (
|
2257
|
+
return e.children.forEach((s) => ct(s, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
|
2258
|
+
const o = e.record.path.toLowerCase(), i = ce(o);
|
2259
|
+
return !t.startsWith("/") && (i.includes(t) || o.includes(t)) || i.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((s) => ct(s, t));
|
2260
2260
|
}
|
2261
|
-
function
|
2261
|
+
function fs(e, t) {
|
2262
2262
|
const n = {};
|
2263
2263
|
for (const r in e)
|
2264
2264
|
t.includes(r) || (n[r] = e[r]);
|
2265
2265
|
return n;
|
2266
2266
|
}
|
2267
|
-
function
|
2268
|
-
const t =
|
2267
|
+
function ds(e) {
|
2268
|
+
const t = Co(e.routes, e), n = e.parseQuery || Uo, r = e.stringifyQuery || Mt, o = e.history;
|
2269
2269
|
if (O.NODE_ENV !== "production" && !o)
|
2270
2270
|
throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
|
2271
|
-
const
|
2272
|
-
let
|
2273
|
-
|
2274
|
-
const
|
2271
|
+
const i = ge(), s = ge(), c = ge(), l = X(J);
|
2272
|
+
let d = J;
|
2273
|
+
Q && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
2274
|
+
const u = Ke.bind(null, (m) => "" + m), a = Ke.bind(null, io), f = (
|
2275
2275
|
// @ts-expect-error: intentionally avoid the type check
|
2276
|
-
|
2276
|
+
Ke.bind(null, ce)
|
2277
2277
|
);
|
2278
|
-
function
|
2279
|
-
let w,
|
2280
|
-
return
|
2278
|
+
function h(m, E) {
|
2279
|
+
let w, S;
|
2280
|
+
return bn(m) ? (w = t.getRecordMatcher(m), O.NODE_ENV !== "production" && !w && R(`Parent route "${String(m)}" not found when adding child route`, E), S = E) : S = m, t.addRoute(S, w);
|
2281
2281
|
}
|
2282
2282
|
function v(m) {
|
2283
2283
|
const E = t.getRecordMatcher(m);
|
2284
|
-
E ? t.removeRoute(E) : O.NODE_ENV !== "production" &&
|
2284
|
+
E ? t.removeRoute(E) : O.NODE_ENV !== "production" && R(`Cannot remove non-existent route "${String(m)}"`);
|
2285
2285
|
}
|
2286
2286
|
function p() {
|
2287
2287
|
return t.getRoutes().map((m) => m.record);
|
@@ -2291,39 +2291,39 @@ function ls(e) {
|
|
2291
2291
|
}
|
2292
2292
|
function y(m, E) {
|
2293
2293
|
if (E = I({}, E || l.value), typeof m == "string") {
|
2294
|
-
const
|
2295
|
-
return O.NODE_ENV !== "production" && (
|
2294
|
+
const P = He(n, m, E.path), $ = t.resolve({ path: P.path }, E), te = o.createHref(P.fullPath);
|
2295
|
+
return O.NODE_ENV !== "production" && (te.startsWith("//") ? R(`Location "${m}" resolved to "${te}". A resolved location cannot start with multiple slashes.`) : $.matched.length || R(`No match found for location with path "${m}"`)), I(P, $, {
|
2296
2296
|
params: f($.params),
|
2297
|
-
hash:
|
2297
|
+
hash: ce(P.hash),
|
2298
2298
|
redirectedFrom: void 0,
|
2299
|
-
href:
|
2299
|
+
href: te
|
2300
2300
|
});
|
2301
2301
|
}
|
2302
|
-
if (O.NODE_ENV !== "production" && !
|
2303
|
-
return
|
2302
|
+
if (O.NODE_ENV !== "production" && !Ae(m))
|
2303
|
+
return R(`router.resolve() was passed an invalid location. This will fail in production.
|
2304
2304
|
- Location:`, m), y({});
|
2305
2305
|
let w;
|
2306
2306
|
if (m.path != null)
|
2307
2307
|
O.NODE_ENV !== "production" && "params" in m && !("name" in m) && // @ts-expect-error: the type is never
|
2308
|
-
Object.keys(m.params).length &&
|
2309
|
-
path:
|
2308
|
+
Object.keys(m.params).length && R(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), w = I({}, m, {
|
2309
|
+
path: He(n, m.path, E.path).path
|
2310
2310
|
});
|
2311
2311
|
else {
|
2312
|
-
const
|
2313
|
-
for (const $ in
|
2314
|
-
|
2312
|
+
const P = I({}, m.params);
|
2313
|
+
for (const $ in P)
|
2314
|
+
P[$] == null && delete P[$];
|
2315
2315
|
w = I({}, m, {
|
2316
|
-
params: a(
|
2316
|
+
params: a(P)
|
2317
2317
|
}), E.params = a(E.params);
|
2318
2318
|
}
|
2319
|
-
const
|
2320
|
-
O.NODE_ENV !== "production" && T && !T.startsWith("#") &&
|
2321
|
-
const
|
2322
|
-
hash:
|
2323
|
-
path:
|
2324
|
-
})),
|
2325
|
-
return O.NODE_ENV !== "production" && (
|
2326
|
-
fullPath:
|
2319
|
+
const S = t.resolve(w, E), T = m.hash || "";
|
2320
|
+
O.NODE_ENV !== "production" && T && !T.startsWith("#") && R(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`), S.params = u(f(S.params));
|
2321
|
+
const x = uo(r, I({}, m, {
|
2322
|
+
hash: ro(T),
|
2323
|
+
path: S.path
|
2324
|
+
})), k = o.createHref(x);
|
2325
|
+
return O.NODE_ENV !== "production" && (k.startsWith("//") ? R(`Location "${m}" resolved to "${k}". A resolved location cannot start with multiple slashes.`) : S.matched.length || R(`No match found for location with path "${m.path != null ? m.path : m}"`)), I({
|
2326
|
+
fullPath: x,
|
2327
2327
|
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
2328
2328
|
// hash
|
2329
2329
|
hash: T,
|
@@ -2333,357 +2333,359 @@ function ls(e) {
|
|
2333
2333
|
// numbers at `$route.query`, but at the point, the user will have to
|
2334
2334
|
// use their own type anyway.
|
2335
2335
|
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
2336
|
-
r === Mt ?
|
2336
|
+
r === Mt ? Go(m.query) : m.query || {}
|
2337
2337
|
)
|
2338
|
-
},
|
2338
|
+
}, S, {
|
2339
2339
|
redirectedFrom: void 0,
|
2340
|
-
href:
|
2340
|
+
href: k
|
2341
2341
|
});
|
2342
2342
|
}
|
2343
2343
|
function _(m) {
|
2344
|
-
return typeof m == "string" ?
|
2344
|
+
return typeof m == "string" ? He(n, m, l.value.path) : I({}, m);
|
2345
2345
|
}
|
2346
|
-
function
|
2347
|
-
if (
|
2348
|
-
return
|
2346
|
+
function b(m, E) {
|
2347
|
+
if (d !== m)
|
2348
|
+
return le(8, {
|
2349
2349
|
from: E,
|
2350
2350
|
to: m
|
2351
2351
|
});
|
2352
2352
|
}
|
2353
|
-
function
|
2354
|
-
return
|
2355
|
-
}
|
2356
|
-
function D(m) {
|
2357
|
-
return R(I(_(m), { replace: !0 }));
|
2353
|
+
function V(m) {
|
2354
|
+
return D(m);
|
2358
2355
|
}
|
2359
2356
|
function C(m) {
|
2357
|
+
return V(I(_(m), { replace: !0 }));
|
2358
|
+
}
|
2359
|
+
function j(m) {
|
2360
2360
|
const E = m.matched[m.matched.length - 1];
|
2361
2361
|
if (E && E.redirect) {
|
2362
2362
|
const { redirect: w } = E;
|
2363
|
-
let
|
2364
|
-
if (typeof
|
2363
|
+
let S = typeof w == "function" ? w(m) : w;
|
2364
|
+
if (typeof S == "string" && (S = S.includes("?") || S.includes("#") ? S = _(S) : (
|
2365
2365
|
// force empty params
|
2366
|
-
{ path:
|
2367
|
-
),
|
2368
|
-
throw
|
2369
|
-
${JSON.stringify(
|
2366
|
+
{ path: S }
|
2367
|
+
), S.params = {}), O.NODE_ENV !== "production" && S.path == null && !("name" in S))
|
2368
|
+
throw R(`Invalid redirect found:
|
2369
|
+
${JSON.stringify(S, null, 2)}
|
2370
2370
|
when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
|
2371
2371
|
return I({
|
2372
2372
|
query: m.query,
|
2373
2373
|
hash: m.hash,
|
2374
2374
|
// avoid transferring params if the redirect has a path
|
2375
|
-
params:
|
2376
|
-
},
|
2375
|
+
params: S.path != null ? {} : m.params
|
2376
|
+
}, S);
|
2377
2377
|
}
|
2378
2378
|
}
|
2379
|
-
function
|
2380
|
-
const w =
|
2381
|
-
if (
|
2382
|
-
return
|
2383
|
-
I(_(
|
2384
|
-
state: typeof
|
2385
|
-
force:
|
2386
|
-
replace:
|
2379
|
+
function D(m, E) {
|
2380
|
+
const w = d = y(m), S = l.value, T = m.state, x = m.force, k = m.replace === !0, P = j(w);
|
2381
|
+
if (P)
|
2382
|
+
return D(
|
2383
|
+
I(_(P), {
|
2384
|
+
state: typeof P == "object" ? I({}, T, P.state) : T,
|
2385
|
+
force: x,
|
2386
|
+
replace: k
|
2387
2387
|
}),
|
2388
2388
|
// keep original redirectedFrom if it exists
|
2389
2389
|
E || w
|
2390
2390
|
);
|
2391
2391
|
const $ = w;
|
2392
2392
|
$.redirectedFrom = E;
|
2393
|
-
let
|
2394
|
-
return !
|
2395
|
-
|
2396
|
-
|
2393
|
+
let te;
|
2394
|
+
return !x && Pt(r, S, w) && (te = le(16, { to: $, from: S }), _t(
|
2395
|
+
S,
|
2396
|
+
S,
|
2397
2397
|
// this is a push, the only way for it to be triggered from a
|
2398
2398
|
// history.listen is with a redirect, which makes it become a push
|
2399
2399
|
!0,
|
2400
2400
|
// This cannot be the first navigation because the initial location
|
2401
2401
|
// cannot be manually navigated to
|
2402
2402
|
!1
|
2403
|
-
)), (
|
2403
|
+
)), (te ? Promise.resolve(te) : vt($, S)).catch((F) => z(F) ? (
|
2404
2404
|
// navigation redirects still mark the router as ready
|
2405
|
-
|
2406
|
-
|
2405
|
+
z(
|
2406
|
+
F,
|
2407
2407
|
2
|
2408
2408
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2409
|
-
) ?
|
2409
|
+
) ? F : Ue(F)
|
2410
2410
|
) : (
|
2411
2411
|
// reject any unknown error
|
2412
|
-
|
2413
|
-
)).then((
|
2414
|
-
if (
|
2415
|
-
if (
|
2416
|
-
|
2412
|
+
We(F, $, S)
|
2413
|
+
)).then((F) => {
|
2414
|
+
if (F) {
|
2415
|
+
if (z(
|
2416
|
+
F,
|
2417
2417
|
2
|
2418
2418
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2419
2419
|
))
|
2420
2420
|
return O.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
|
2421
|
-
|
2421
|
+
Pt(r, y(F.to), $) && // and we have done it a couple of times
|
2422
2422
|
E && // @ts-expect-error: added only in dev
|
2423
2423
|
(E._count = E._count ? (
|
2424
2424
|
// @ts-expect-error
|
2425
2425
|
E._count + 1
|
2426
|
-
) : 1) > 30 ? (
|
2427
|
-
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) :
|
2426
|
+
) : 1) > 30 ? (R(`Detected a possibly infinite redirection in a navigation guard when going from "${S.fullPath}" to "${$.fullPath}". Aborting to avoid a Stack Overflow.
|
2427
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : D(
|
2428
2428
|
// keep options
|
2429
2429
|
I({
|
2430
2430
|
// preserve an existing replacement but allow the redirect to override it
|
2431
|
-
replace:
|
2432
|
-
}, _(
|
2433
|
-
state: typeof
|
2434
|
-
force:
|
2431
|
+
replace: k
|
2432
|
+
}, _(F.to), {
|
2433
|
+
state: typeof F.to == "object" ? I({}, T, F.to.state) : T,
|
2434
|
+
force: x
|
2435
2435
|
}),
|
2436
2436
|
// preserve the original redirectedFrom if any
|
2437
2437
|
E || $
|
2438
2438
|
);
|
2439
2439
|
} else
|
2440
|
-
|
2441
|
-
return yt($,
|
2440
|
+
F = wt($, S, !0, k, T);
|
2441
|
+
return yt($, S, F), F;
|
2442
2442
|
});
|
2443
2443
|
}
|
2444
|
-
function
|
2445
|
-
const w =
|
2444
|
+
function Be(m, E) {
|
2445
|
+
const w = b(m, E);
|
2446
2446
|
return w ? Promise.reject(w) : Promise.resolve();
|
2447
2447
|
}
|
2448
|
-
function
|
2448
|
+
function de(m) {
|
2449
2449
|
const E = Pe.values().next().value;
|
2450
2450
|
return E && typeof E.runWithContext == "function" ? E.runWithContext(m) : m();
|
2451
2451
|
}
|
2452
2452
|
function vt(m, E) {
|
2453
2453
|
let w;
|
2454
|
-
const [
|
2455
|
-
w = Qe(
|
2456
|
-
for (const
|
2457
|
-
|
2458
|
-
w.push(
|
2454
|
+
const [S, T, x] = hs(m, E);
|
2455
|
+
w = Qe(S.reverse(), "beforeRouteLeave", m, E);
|
2456
|
+
for (const P of S)
|
2457
|
+
P.leaveGuards.forEach(($) => {
|
2458
|
+
w.push(Y($, m, E));
|
2459
2459
|
});
|
2460
|
-
const
|
2461
|
-
return w.push(
|
2460
|
+
const k = Be.bind(null, m, E);
|
2461
|
+
return w.push(k), se(w).then(() => {
|
2462
2462
|
w = [];
|
2463
|
-
for (const
|
2464
|
-
w.push(
|
2465
|
-
return w.push(
|
2463
|
+
for (const P of i.list())
|
2464
|
+
w.push(Y(P, m, E));
|
2465
|
+
return w.push(k), se(w);
|
2466
2466
|
}).then(() => {
|
2467
2467
|
w = Qe(T, "beforeRouteUpdate", m, E);
|
2468
|
-
for (const
|
2469
|
-
|
2470
|
-
w.push(
|
2468
|
+
for (const P of T)
|
2469
|
+
P.updateGuards.forEach(($) => {
|
2470
|
+
w.push(Y($, m, E));
|
2471
2471
|
});
|
2472
|
-
return w.push(
|
2472
|
+
return w.push(k), se(w);
|
2473
2473
|
}).then(() => {
|
2474
2474
|
w = [];
|
2475
|
-
for (const
|
2476
|
-
if (
|
2477
|
-
if (
|
2478
|
-
for (const $ of
|
2479
|
-
w.push(
|
2475
|
+
for (const P of x)
|
2476
|
+
if (P.beforeEnter)
|
2477
|
+
if (W(P.beforeEnter))
|
2478
|
+
for (const $ of P.beforeEnter)
|
2479
|
+
w.push(Y($, m, E));
|
2480
2480
|
else
|
2481
|
-
w.push(
|
2482
|
-
return w.push(
|
2483
|
-
}).then(() => (m.matched.forEach((
|
2481
|
+
w.push(Y(P.beforeEnter, m, E));
|
2482
|
+
return w.push(k), se(w);
|
2483
|
+
}).then(() => (m.matched.forEach((P) => P.enterCallbacks = {}), w = Qe(x, "beforeRouteEnter", m, E, de), w.push(k), se(w))).then(() => {
|
2484
2484
|
w = [];
|
2485
|
-
for (const
|
2486
|
-
w.push(
|
2487
|
-
return w.push(
|
2488
|
-
}).catch((
|
2489
|
-
|
2485
|
+
for (const P of s.list())
|
2486
|
+
w.push(Y(P, m, E));
|
2487
|
+
return w.push(k), se(w);
|
2488
|
+
}).catch((P) => z(
|
2489
|
+
P,
|
2490
2490
|
8
|
2491
2491
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2492
|
-
) ?
|
2492
|
+
) ? P : Promise.reject(P));
|
2493
2493
|
}
|
2494
2494
|
function yt(m, E, w) {
|
2495
|
-
|
2496
|
-
}
|
2497
|
-
function wt(m, E, w,
|
2498
|
-
const
|
2499
|
-
if (
|
2500
|
-
return
|
2501
|
-
const
|
2502
|
-
w && (
|
2503
|
-
scroll:
|
2504
|
-
}, T)) : o.push(m.fullPath, T)), l.value = m, _t(m, E, w,
|
2505
|
-
}
|
2506
|
-
let
|
2507
|
-
function
|
2508
|
-
|
2509
|
-
if (!
|
2495
|
+
c.list().forEach((S) => de(() => S(m, E, w)));
|
2496
|
+
}
|
2497
|
+
function wt(m, E, w, S, T) {
|
2498
|
+
const x = b(m, E);
|
2499
|
+
if (x)
|
2500
|
+
return x;
|
2501
|
+
const k = E === J, P = Q ? history.state : {};
|
2502
|
+
w && (S || k ? o.replace(m.fullPath, I({
|
2503
|
+
scroll: k && P && P.scroll
|
2504
|
+
}, T)) : o.push(m.fullPath, T)), l.value = m, _t(m, E, w, k), Ue();
|
2505
|
+
}
|
2506
|
+
let he;
|
2507
|
+
function Fn() {
|
2508
|
+
he || (he = o.listen((m, E, w) => {
|
2509
|
+
if (!St.listening)
|
2510
2510
|
return;
|
2511
|
-
const
|
2511
|
+
const S = y(m), T = j(S);
|
2512
2512
|
if (T) {
|
2513
|
-
|
2513
|
+
D(I(T, { replace: !0, force: !0 }), S).catch(we);
|
2514
2514
|
return;
|
2515
2515
|
}
|
2516
|
-
|
2517
|
-
const
|
2518
|
-
|
2519
|
-
|
2516
|
+
d = S;
|
2517
|
+
const x = l.value;
|
2518
|
+
Q && go(Nt(x.fullPath, w.delta), Me()), vt(S, x).catch((k) => z(
|
2519
|
+
k,
|
2520
2520
|
12
|
2521
2521
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2522
|
-
) ?
|
2523
|
-
|
2522
|
+
) ? k : z(
|
2523
|
+
k,
|
2524
2524
|
2
|
2525
2525
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2526
|
-
) ? (
|
2527
|
-
I(_(
|
2526
|
+
) ? (D(
|
2527
|
+
I(_(k.to), {
|
2528
2528
|
force: !0
|
2529
2529
|
}),
|
2530
|
-
|
2530
|
+
S
|
2531
2531
|
// avoid an uncaught rejection, let push call triggerError
|
2532
|
-
).then((
|
2533
|
-
|
2534
|
-
|
2532
|
+
).then((P) => {
|
2533
|
+
z(
|
2534
|
+
P,
|
2535
2535
|
20
|
2536
2536
|
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
2537
|
-
) && !w.delta && w.type ===
|
2538
|
-
}).catch(
|
2539
|
-
|
2537
|
+
) && !w.delta && w.type === ue.pop && o.go(-1, !1);
|
2538
|
+
}).catch(we), Promise.reject()) : (w.delta && o.go(-w.delta, !1), We(k, S, x))).then((k) => {
|
2539
|
+
k = k || wt(
|
2540
2540
|
// after navigation, all matched components are resolved
|
2541
|
-
|
2542
|
-
|
2541
|
+
S,
|
2542
|
+
x,
|
2543
2543
|
!1
|
2544
|
-
),
|
2544
|
+
), k && (w.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
|
2545
2545
|
// entry while a different route is displayed
|
2546
|
-
!
|
2547
|
-
|
2546
|
+
!z(
|
2547
|
+
k,
|
2548
2548
|
8
|
2549
2549
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2550
|
-
) ? o.go(-w.delta, !1) : w.type ===
|
2551
|
-
|
2550
|
+
) ? o.go(-w.delta, !1) : w.type === ue.pop && z(
|
2551
|
+
k,
|
2552
2552
|
20
|
2553
2553
|
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
2554
|
-
) && o.go(-1, !1)), yt(
|
2555
|
-
}).catch(
|
2554
|
+
) && o.go(-1, !1)), yt(S, x, k);
|
2555
|
+
}).catch(we);
|
2556
2556
|
}));
|
2557
2557
|
}
|
2558
|
-
let
|
2559
|
-
function
|
2560
|
-
|
2561
|
-
const
|
2562
|
-
return
|
2558
|
+
let Le = ge(), Et = ge(), Ve;
|
2559
|
+
function We(m, E, w) {
|
2560
|
+
Ue(m);
|
2561
|
+
const S = Et.list();
|
2562
|
+
return S.length ? S.forEach((T) => T(m, E, w)) : (O.NODE_ENV !== "production" && R("uncaught error during route navigation:"), console.error(m)), Promise.reject(m);
|
2563
2563
|
}
|
2564
|
-
function
|
2565
|
-
return
|
2566
|
-
|
2564
|
+
function Bn() {
|
2565
|
+
return Ve && l.value !== J ? Promise.resolve() : new Promise((m, E) => {
|
2566
|
+
Le.add([m, E]);
|
2567
2567
|
});
|
2568
2568
|
}
|
2569
|
-
function
|
2570
|
-
return
|
2569
|
+
function Ue(m) {
|
2570
|
+
return Ve || (Ve = !m, Fn(), Le.list().forEach(([E, w]) => m ? w(m) : E()), Le.reset()), m;
|
2571
2571
|
}
|
2572
|
-
function _t(m, E, w,
|
2572
|
+
function _t(m, E, w, S) {
|
2573
2573
|
const { scrollBehavior: T } = e;
|
2574
|
-
if (!
|
2574
|
+
if (!Q || !T)
|
2575
2575
|
return Promise.resolve();
|
2576
|
-
const
|
2577
|
-
return Ie().then(() => T(m, E,
|
2576
|
+
const x = !w && vo(Nt(m.fullPath, 0)) || (S || !w) && history.state && history.state.scroll || null;
|
2577
|
+
return Ie().then(() => T(m, E, x)).then((k) => k && mo(k)).catch((k) => We(k, m, E));
|
2578
2578
|
}
|
2579
2579
|
const Ge = (m) => o.go(m);
|
2580
2580
|
let qe;
|
2581
|
-
const Pe = /* @__PURE__ */ new Set(),
|
2581
|
+
const Pe = /* @__PURE__ */ new Set(), St = {
|
2582
2582
|
currentRoute: l,
|
2583
2583
|
listening: !0,
|
2584
|
-
addRoute:
|
2584
|
+
addRoute: h,
|
2585
2585
|
removeRoute: v,
|
2586
2586
|
clearRoutes: t.clearRoutes,
|
2587
2587
|
hasRoute: g,
|
2588
2588
|
getRoutes: p,
|
2589
2589
|
resolve: y,
|
2590
2590
|
options: e,
|
2591
|
-
push:
|
2592
|
-
replace:
|
2591
|
+
push: V,
|
2592
|
+
replace: C,
|
2593
2593
|
go: Ge,
|
2594
2594
|
back: () => Ge(-1),
|
2595
2595
|
forward: () => Ge(1),
|
2596
|
-
beforeEach:
|
2597
|
-
beforeResolve:
|
2598
|
-
afterEach:
|
2596
|
+
beforeEach: i.add,
|
2597
|
+
beforeResolve: s.add,
|
2598
|
+
afterEach: c.add,
|
2599
2599
|
onError: Et.add,
|
2600
|
-
isReady:
|
2600
|
+
isReady: Bn,
|
2601
2601
|
install(m) {
|
2602
2602
|
const E = this;
|
2603
|
-
m.component("RouterLink",
|
2603
|
+
m.component("RouterLink", Qo), m.component("RouterView", Zo), m.config.globalProperties.$router = E, Object.defineProperty(m.config.globalProperties, "$route", {
|
2604
2604
|
enumerable: !0,
|
2605
|
-
get: () =>
|
2606
|
-
}),
|
2605
|
+
get: () => M(l)
|
2606
|
+
}), Q && // used for the initial navigation client side to avoid pushing
|
2607
2607
|
// multiple times when the router is used in multiple apps
|
2608
|
-
!qe && l.value ===
|
2609
|
-
O.NODE_ENV !== "production" &&
|
2608
|
+
!qe && l.value === J && (qe = !0, V(o.location).catch((T) => {
|
2609
|
+
O.NODE_ENV !== "production" && R("Unexpected error when starting the router:", T);
|
2610
2610
|
}));
|
2611
2611
|
const w = {};
|
2612
|
-
for (const T in
|
2612
|
+
for (const T in J)
|
2613
2613
|
Object.defineProperty(w, T, {
|
2614
2614
|
get: () => l.value[T],
|
2615
2615
|
enumerable: !0
|
2616
2616
|
});
|
2617
|
-
m.provide(
|
2618
|
-
const
|
2617
|
+
m.provide(Fe, E), m.provide(gt, Kn(w)), m.provide(at, l);
|
2618
|
+
const S = m.unmount;
|
2619
2619
|
Pe.add(m), m.unmount = function() {
|
2620
|
-
Pe.delete(m), Pe.size < 1 && (
|
2621
|
-
}, O.NODE_ENV !== "production" &&
|
2620
|
+
Pe.delete(m), Pe.size < 1 && (d = J, he && he(), he = null, l.value = J, qe = !1, Ve = !1), S();
|
2621
|
+
}, O.NODE_ENV !== "production" && Q && ns(m, E, t);
|
2622
2622
|
}
|
2623
2623
|
};
|
2624
2624
|
function se(m) {
|
2625
|
-
return m.reduce((E, w) => E.then(() =>
|
2625
|
+
return m.reduce((E, w) => E.then(() => de(w)), Promise.resolve());
|
2626
2626
|
}
|
2627
|
-
return
|
2627
|
+
return St;
|
2628
2628
|
}
|
2629
|
-
function
|
2630
|
-
const n = [], r = [], o = [],
|
2631
|
-
for (let
|
2632
|
-
const
|
2633
|
-
|
2634
|
-
const l = e.matched[
|
2635
|
-
l && (t.matched.find((
|
2629
|
+
function hs(e, t) {
|
2630
|
+
const n = [], r = [], o = [], i = Math.max(t.matched.length, e.matched.length);
|
2631
|
+
for (let s = 0; s < i; s++) {
|
2632
|
+
const c = t.matched[s];
|
2633
|
+
c && (e.matched.find((d) => ee(d, c)) ? r.push(c) : n.push(c));
|
2634
|
+
const l = e.matched[s];
|
2635
|
+
l && (t.matched.find((d) => ee(d, l)) || o.push(l));
|
2636
2636
|
}
|
2637
2637
|
return [n, r, o];
|
2638
2638
|
}
|
2639
|
-
function
|
2640
|
-
return
|
2639
|
+
function ps() {
|
2640
|
+
return Z(Fe);
|
2641
2641
|
}
|
2642
|
-
function
|
2643
|
-
return
|
2642
|
+
function ms(e) {
|
2643
|
+
return Z(gt);
|
2644
2644
|
}
|
2645
|
-
const
|
2646
|
-
function
|
2645
|
+
const $n = /* @__PURE__ */ new Map();
|
2646
|
+
function gs(e) {
|
2647
2647
|
var t;
|
2648
2648
|
(t = e.jsFn) == null || t.forEach((n) => {
|
2649
|
-
|
2649
|
+
const { immediately: r = !1 } = n;
|
2650
|
+
let o = L(n.code);
|
2651
|
+
r && (o = o()), $n.set(n.id, o);
|
2650
2652
|
});
|
2651
2653
|
}
|
2652
|
-
function
|
2653
|
-
return
|
2654
|
+
function vs(e) {
|
2655
|
+
return $n.get(e);
|
2654
2656
|
}
|
2655
|
-
function
|
2656
|
-
let t =
|
2657
|
-
function
|
2658
|
-
p.scopeSnapshot && (t = p.scopeSnapshot), p.slotSnapshot && (n = p.slotSnapshot), p.vforSnapshot && (r = p.vforSnapshot), p.elementRefSnapshot && (o = p.elementRefSnapshot), p.routerSnapshot && (
|
2657
|
+
function re(e) {
|
2658
|
+
let t = rn(), n = kr(), r = Cr(e), o = sn(), i = ps(), s = ms();
|
2659
|
+
function c(p) {
|
2660
|
+
p.scopeSnapshot && (t = p.scopeSnapshot), p.slotSnapshot && (n = p.slotSnapshot), p.vforSnapshot && (r = p.vforSnapshot), p.elementRefSnapshot && (o = p.elementRefSnapshot), p.routerSnapshot && (i = p.routerSnapshot);
|
2659
2661
|
}
|
2660
2662
|
function l(p) {
|
2661
2663
|
if (N.isVar(p))
|
2662
|
-
return q(
|
2664
|
+
return q(d(p));
|
2663
2665
|
if (N.isVForItem(p))
|
2664
|
-
return jr(p.fid) ? r.getVForIndex(p.fid) : q(
|
2666
|
+
return jr(p.fid) ? r.getVForIndex(p.fid) : q(d(p));
|
2665
2667
|
if (N.isVForIndex(p))
|
2666
2668
|
return r.getVForIndex(p.fid);
|
2667
2669
|
if (N.isJsFn(p)) {
|
2668
2670
|
const { id: g } = p;
|
2669
|
-
return
|
2671
|
+
return vs(g);
|
2670
2672
|
}
|
2671
2673
|
if (N.isSlotProp(p))
|
2672
2674
|
return n.getPropsValue(p);
|
2673
2675
|
if (N.isRouterParams(p))
|
2674
|
-
return q(
|
2676
|
+
return q(d(p));
|
2675
2677
|
throw new Error(`Invalid binding: ${p}`);
|
2676
2678
|
}
|
2677
|
-
function
|
2679
|
+
function d(p) {
|
2678
2680
|
if (N.isVar(p)) {
|
2679
|
-
const g = t.getVueRef(p) ||
|
2681
|
+
const g = t.getVueRef(p) || Er(p);
|
2680
2682
|
return Ot(g, {
|
2681
2683
|
paths: p.path,
|
2682
2684
|
getBindableValueFn: l
|
2683
2685
|
});
|
2684
2686
|
}
|
2685
2687
|
if (N.isVForItem(p))
|
2686
|
-
return
|
2688
|
+
return xr({
|
2687
2689
|
binding: p,
|
2688
2690
|
snapshot: v
|
2689
2691
|
});
|
@@ -2691,20 +2693,20 @@ function ne(e) {
|
|
2691
2693
|
return () => l(p);
|
2692
2694
|
if (N.isRouterParams(p)) {
|
2693
2695
|
const { prop: g = "params" } = p;
|
2694
|
-
return Ot(() =>
|
2696
|
+
return Ot(() => s[g], {
|
2695
2697
|
paths: p.path,
|
2696
2698
|
getBindableValueFn: l
|
2697
2699
|
});
|
2698
2700
|
}
|
2699
2701
|
throw new Error(`Invalid binding: ${p}`);
|
2700
2702
|
}
|
2701
|
-
function
|
2703
|
+
function u(p) {
|
2702
2704
|
if (N.isVar(p) || N.isVForItem(p))
|
2703
|
-
return
|
2705
|
+
return d(p);
|
2704
2706
|
if (N.isVForIndex(p) || N.isJsFn(p))
|
2705
2707
|
return l(p);
|
2706
2708
|
if (N.isRouterParams(p))
|
2707
|
-
return
|
2709
|
+
return d(p);
|
2708
2710
|
throw new Error(`Invalid binding: ${p}`);
|
2709
2711
|
}
|
2710
2712
|
function a(p) {
|
@@ -2730,7 +2732,7 @@ function ne(e) {
|
|
2730
2732
|
function f(p) {
|
2731
2733
|
var g, y;
|
2732
2734
|
(g = p.vars) == null || g.forEach((_) => {
|
2733
|
-
|
2735
|
+
d({ type: "var", ..._ }).value = _.val;
|
2734
2736
|
}), (y = p.ele_refs) == null || y.forEach((_) => {
|
2735
2737
|
o.getRef({
|
2736
2738
|
sid: _.sid,
|
@@ -2738,50 +2740,50 @@ function ne(e) {
|
|
2738
2740
|
}).value[_.method](..._.args);
|
2739
2741
|
});
|
2740
2742
|
}
|
2741
|
-
function
|
2743
|
+
function h(p, g) {
|
2742
2744
|
if (Rt(g) || Rt(p.values))
|
2743
2745
|
return;
|
2744
2746
|
g = g;
|
2745
2747
|
const y = p.values, _ = p.skips || new Array(g.length).fill(0);
|
2746
|
-
g.forEach((
|
2747
|
-
if (_[
|
2748
|
+
g.forEach((b, V) => {
|
2749
|
+
if (_[V] === 1)
|
2748
2750
|
return;
|
2749
|
-
if (N.isVar(
|
2750
|
-
const
|
2751
|
-
|
2751
|
+
if (N.isVar(b)) {
|
2752
|
+
const j = d(b);
|
2753
|
+
j.value = y[V];
|
2752
2754
|
return;
|
2753
2755
|
}
|
2754
|
-
if (N.isRouterAction(
|
2755
|
-
const
|
2756
|
-
|
2756
|
+
if (N.isRouterAction(b)) {
|
2757
|
+
const j = y[V], D = i[j.fn];
|
2758
|
+
D(...j.args);
|
2757
2759
|
return;
|
2758
2760
|
}
|
2759
|
-
if (N.isElementRef(
|
2760
|
-
const
|
2761
|
-
|
2761
|
+
if (N.isElementRef(b)) {
|
2762
|
+
const j = o.getRef(b).value, D = y[V], { method: Be, args: de = [] } = D;
|
2763
|
+
j[Be](...de);
|
2762
2764
|
return;
|
2763
2765
|
}
|
2764
|
-
const
|
2765
|
-
|
2766
|
+
const C = d(b);
|
2767
|
+
C.value = y[V];
|
2766
2768
|
});
|
2767
2769
|
}
|
2768
2770
|
const v = {
|
2769
2771
|
getVForIndex: r.getVForIndex,
|
2770
2772
|
getObjectToValue: l,
|
2771
|
-
getVueRefObject:
|
2772
|
-
getVueRefObjectOrValue:
|
2773
|
+
getVueRefObject: d,
|
2774
|
+
getVueRefObjectOrValue: u,
|
2773
2775
|
getBindingServerInfo: a,
|
2774
2776
|
updateRefFromServer: f,
|
2775
|
-
updateOutputsRefFromServer:
|
2776
|
-
replaceSnapshot:
|
2777
|
+
updateOutputsRefFromServer: h,
|
2778
|
+
replaceSnapshot: c
|
2777
2779
|
};
|
2778
2780
|
return v;
|
2779
2781
|
}
|
2780
|
-
class
|
2782
|
+
class ys {
|
2781
2783
|
async eventSend(t, n) {
|
2782
|
-
const { fType: r, hKey: o, key:
|
2783
|
-
let
|
2784
|
-
const
|
2784
|
+
const { fType: r, hKey: o, key: i } = t, s = Ye().webServerInfo, c = i !== void 0 ? { key: i } : {}, l = r === "sync" ? s.event_url : s.event_async_url;
|
2785
|
+
let d = {};
|
2786
|
+
const u = await fetch(l, {
|
2785
2787
|
method: "POST",
|
2786
2788
|
headers: {
|
2787
2789
|
"Content-Type": "application/json"
|
@@ -2789,22 +2791,22 @@ class gs {
|
|
2789
2791
|
body: JSON.stringify({
|
2790
2792
|
bind: n,
|
2791
2793
|
hKey: o,
|
2792
|
-
...
|
2793
|
-
page:
|
2794
|
-
...
|
2794
|
+
...c,
|
2795
|
+
page: Te(),
|
2796
|
+
...d
|
2795
2797
|
})
|
2796
2798
|
});
|
2797
|
-
if (!
|
2798
|
-
throw new Error(`HTTP error! status: ${
|
2799
|
-
return await
|
2799
|
+
if (!u.ok)
|
2800
|
+
throw new Error(`HTTP error! status: ${u.status}`);
|
2801
|
+
return await u.json();
|
2800
2802
|
}
|
2801
2803
|
async watchSend(t) {
|
2802
|
-
const { outputs: n, fType: r, key: o } = t.watchConfig,
|
2804
|
+
const { outputs: n, fType: r, key: o } = t.watchConfig, i = Ye().webServerInfo, s = r === "sync" ? i.watch_url : i.watch_async_url, c = t.getServerInputs(), l = {
|
2803
2805
|
key: o,
|
2804
|
-
input:
|
2805
|
-
page:
|
2806
|
+
input: c,
|
2807
|
+
page: Te()
|
2806
2808
|
};
|
2807
|
-
return await (await fetch(
|
2809
|
+
return await (await fetch(s, {
|
2808
2810
|
method: "POST",
|
2809
2811
|
headers: {
|
2810
2812
|
"Content-Type": "application/json"
|
@@ -2813,45 +2815,45 @@ class gs {
|
|
2813
2815
|
})).json();
|
2814
2816
|
}
|
2815
2817
|
}
|
2816
|
-
class
|
2818
|
+
class ws {
|
2817
2819
|
async eventSend(t, n) {
|
2818
|
-
const { fType: r, hKey: o, key:
|
2819
|
-
let
|
2820
|
+
const { fType: r, hKey: o, key: i } = t, s = i !== void 0 ? { key: i } : {};
|
2821
|
+
let c = {};
|
2820
2822
|
const l = {
|
2821
2823
|
bind: n,
|
2822
2824
|
fType: r,
|
2823
2825
|
hKey: o,
|
2824
|
-
...
|
2825
|
-
page:
|
2826
|
-
...
|
2826
|
+
...s,
|
2827
|
+
page: Te(),
|
2828
|
+
...c
|
2827
2829
|
};
|
2828
2830
|
return await window.pywebview.api.event_call(l);
|
2829
2831
|
}
|
2830
2832
|
async watchSend(t) {
|
2831
|
-
const { outputs: n, fType: r, key: o } = t.watchConfig,
|
2833
|
+
const { outputs: n, fType: r, key: o } = t.watchConfig, i = t.getServerInputs(), s = {
|
2832
2834
|
key: o,
|
2833
|
-
input:
|
2835
|
+
input: i,
|
2834
2836
|
fType: r,
|
2835
|
-
page:
|
2837
|
+
page: Te()
|
2836
2838
|
};
|
2837
|
-
return await window.pywebview.api.watch_call(
|
2839
|
+
return await window.pywebview.api.watch_call(s);
|
2838
2840
|
}
|
2839
2841
|
}
|
2840
|
-
let
|
2841
|
-
function
|
2842
|
-
switch (e
|
2842
|
+
let ut;
|
2843
|
+
function Es(e) {
|
2844
|
+
switch (e) {
|
2843
2845
|
case "web":
|
2844
|
-
|
2846
|
+
ut = new ys();
|
2845
2847
|
break;
|
2846
2848
|
case "webview":
|
2847
|
-
|
2849
|
+
ut = new ws();
|
2848
2850
|
break;
|
2849
2851
|
}
|
2850
2852
|
}
|
2851
|
-
function
|
2852
|
-
return
|
2853
|
+
function Cn() {
|
2854
|
+
return ut;
|
2853
2855
|
}
|
2854
|
-
function
|
2856
|
+
function _s(e) {
|
2855
2857
|
const t = {
|
2856
2858
|
type: "var",
|
2857
2859
|
sid: e.sid,
|
@@ -2863,50 +2865,92 @@ function ws(e) {
|
|
2863
2865
|
outputs: [t, ...e.outputs || []]
|
2864
2866
|
};
|
2865
2867
|
}
|
2866
|
-
function
|
2867
|
-
|
2868
|
+
function xn(e) {
|
2869
|
+
const { config: t, snapshot: n } = e;
|
2870
|
+
if (!t)
|
2871
|
+
return {
|
2872
|
+
run: () => {
|
2873
|
+
},
|
2874
|
+
tryReset: () => {
|
2875
|
+
}
|
2876
|
+
};
|
2877
|
+
const r = t.map((s) => {
|
2878
|
+
const c = n.getVueRefObject(s.target);
|
2879
|
+
return s.type === "const" ? {
|
2880
|
+
refObj: c,
|
2881
|
+
preValue: c.value,
|
2882
|
+
newValue: s.value,
|
2883
|
+
reset: !0
|
2884
|
+
} : Ss(c, s, n);
|
2885
|
+
});
|
2886
|
+
return {
|
2887
|
+
run: () => {
|
2888
|
+
r.forEach((s) => {
|
2889
|
+
s.newValue !== s.preValue && (s.refObj.value = s.newValue);
|
2890
|
+
});
|
2891
|
+
},
|
2892
|
+
tryReset: () => {
|
2893
|
+
r.forEach((s) => {
|
2894
|
+
s.reset && (s.refObj.value = s.preValue);
|
2895
|
+
});
|
2896
|
+
}
|
2897
|
+
};
|
2898
|
+
}
|
2899
|
+
function Ss(e, t, n) {
|
2900
|
+
const r = L(t.code), o = t.inputs.map(
|
2901
|
+
(i) => n.getObjectToValue(i)
|
2902
|
+
);
|
2903
|
+
return {
|
2904
|
+
refObj: e,
|
2905
|
+
preValue: e.value,
|
2906
|
+
reset: t.reset ?? !0,
|
2907
|
+
newValue: r(...o)
|
2908
|
+
};
|
2909
|
+
}
|
2910
|
+
function bs(e, t, n) {
|
2911
|
+
return new Os(e, t, n);
|
2868
2912
|
}
|
2869
|
-
class
|
2913
|
+
class Os {
|
2870
2914
|
constructor(t, n, r) {
|
2871
2915
|
B(this, "taskQueue", []);
|
2872
2916
|
B(this, "id2TaskMap", /* @__PURE__ */ new Map());
|
2873
|
-
B(this, "input2TaskIdMap",
|
2917
|
+
B(this, "input2TaskIdMap", Se(() => []));
|
2874
2918
|
this.snapshots = r;
|
2875
|
-
const o = [],
|
2919
|
+
const o = [], i = (s) => {
|
2876
2920
|
var l;
|
2877
|
-
const
|
2878
|
-
return this.id2TaskMap.set(
|
2879
|
-
var f,
|
2880
|
-
if (((f =
|
2881
|
-
const v = `${
|
2882
|
-
this.input2TaskIdMap.getOrDefault(v).push(
|
2921
|
+
const c = new Rs(s, r);
|
2922
|
+
return this.id2TaskMap.set(c.id, c), (l = s.inputs) == null || l.forEach((d, u) => {
|
2923
|
+
var f, h;
|
2924
|
+
if (((f = s.data) == null ? void 0 : f[u]) === 0 && ((h = s.slient) == null ? void 0 : h[u]) === 0) {
|
2925
|
+
const v = `${d.sid}-${d.id}`;
|
2926
|
+
this.input2TaskIdMap.getOrDefault(v).push(c.id);
|
2883
2927
|
}
|
2884
|
-
}),
|
2928
|
+
}), c;
|
2885
2929
|
};
|
2886
|
-
t == null || t.forEach((
|
2887
|
-
const
|
2888
|
-
o.push(
|
2889
|
-
}), n == null || n.forEach((
|
2890
|
-
const
|
2891
|
-
|
2930
|
+
t == null || t.forEach((s) => {
|
2931
|
+
const c = i(s);
|
2932
|
+
o.push(c);
|
2933
|
+
}), n == null || n.forEach((s) => {
|
2934
|
+
const c = i(
|
2935
|
+
_s(s)
|
2892
2936
|
);
|
2893
|
-
o.push(
|
2894
|
-
}), o.forEach((
|
2937
|
+
o.push(c);
|
2938
|
+
}), o.forEach((s) => {
|
2895
2939
|
const {
|
2896
|
-
deep:
|
2940
|
+
deep: c = !0,
|
2897
2941
|
once: l,
|
2898
|
-
flush:
|
2899
|
-
immediate:
|
2900
|
-
} =
|
2901
|
-
immediate:
|
2902
|
-
deep:
|
2942
|
+
flush: d,
|
2943
|
+
immediate: u = !0
|
2944
|
+
} = s.watchConfig, a = {
|
2945
|
+
immediate: u,
|
2946
|
+
deep: c,
|
2903
2947
|
once: l,
|
2904
|
-
flush:
|
2905
|
-
}, f = this._getWatchTargets(
|
2906
|
-
|
2948
|
+
flush: d
|
2949
|
+
}, f = this._getWatchTargets(s);
|
2950
|
+
H(
|
2907
2951
|
f,
|
2908
|
-
(
|
2909
|
-
|
2952
|
+
(h) => {
|
2953
|
+
h.some(_e) || (s.modify = !0, this.taskQueue.push(new Vs(s)), this._scheduleNextTick());
|
2910
2954
|
},
|
2911
2955
|
a
|
2912
2956
|
);
|
@@ -2917,8 +2961,8 @@ class _s {
|
|
2917
2961
|
return [];
|
2918
2962
|
const n = t.slientInputs, r = t.constDataInputs;
|
2919
2963
|
return t.watchConfig.inputs.filter(
|
2920
|
-
(
|
2921
|
-
).map((
|
2964
|
+
(i, s) => !r[s] && (N.isVar(i) || N.isVForItem(i) || N.isRouterParams(i)) && !n[s]
|
2965
|
+
).map((i) => this.snapshots.getVueRefObjectOrValue(i));
|
2922
2966
|
}
|
2923
2967
|
_scheduleNextTick() {
|
2924
2968
|
Ie(() => this._runAllTasks());
|
@@ -2945,18 +2989,18 @@ class _s {
|
|
2945
2989
|
t.watchTask.watchConfig.outputs
|
2946
2990
|
);
|
2947
2991
|
return n.filter(
|
2948
|
-
(
|
2992
|
+
(i) => o.has(i.watchTask.id) && i.watchTask.id !== t.watchTask.id
|
2949
2993
|
);
|
2950
2994
|
}
|
2951
2995
|
_getCalculatorTasksByOutput(t) {
|
2952
2996
|
const n = /* @__PURE__ */ new Set();
|
2953
2997
|
return t == null || t.forEach((r) => {
|
2954
2998
|
const o = `${r.sid}-${r.id}`;
|
2955
|
-
(this.input2TaskIdMap.get(o) || []).forEach((
|
2999
|
+
(this.input2TaskIdMap.get(o) || []).forEach((s) => n.add(s));
|
2956
3000
|
}), n;
|
2957
3001
|
}
|
2958
3002
|
}
|
2959
|
-
class
|
3003
|
+
class Rs {
|
2960
3004
|
constructor(t, n) {
|
2961
3005
|
B(this, "modify", !0);
|
2962
3006
|
B(this, "_running", !1);
|
@@ -3012,7 +3056,7 @@ class bs {
|
|
3012
3056
|
}
|
3013
3057
|
}
|
3014
3058
|
}
|
3015
|
-
class
|
3059
|
+
class Vs {
|
3016
3060
|
/**
|
3017
3061
|
*
|
3018
3062
|
*/
|
@@ -3057,181 +3101,203 @@ class Ss {
|
|
3057
3101
|
if (this.watchTask.modify) {
|
3058
3102
|
this.watchTask.modify = !1, this.watchTask.setRunning();
|
3059
3103
|
try {
|
3060
|
-
await
|
3104
|
+
await Ps(this.watchTask);
|
3061
3105
|
} finally {
|
3062
3106
|
this.watchTask.taskDone();
|
3063
3107
|
}
|
3064
3108
|
}
|
3065
3109
|
}
|
3066
3110
|
}
|
3067
|
-
async function
|
3068
|
-
const { snapshot: t } = e, { outputs: n } = e.watchConfig,
|
3069
|
-
|
3111
|
+
async function Ps(e) {
|
3112
|
+
const { snapshot: t } = e, { outputs: n, preSetup: r } = e.watchConfig, o = xn({
|
3113
|
+
config: r,
|
3114
|
+
snapshot: t
|
3115
|
+
});
|
3116
|
+
try {
|
3117
|
+
o.run();
|
3118
|
+
const i = await Cn().watchSend(e);
|
3119
|
+
if (!i)
|
3120
|
+
return;
|
3121
|
+
t.updateOutputsRefFromServer(i, n);
|
3122
|
+
} finally {
|
3123
|
+
o.tryReset();
|
3124
|
+
}
|
3070
3125
|
}
|
3071
|
-
function
|
3126
|
+
function ks(e, t) {
|
3072
3127
|
const {
|
3073
3128
|
on: n,
|
3074
3129
|
code: r,
|
3075
3130
|
immediate: o,
|
3076
|
-
deep:
|
3077
|
-
once:
|
3078
|
-
flush:
|
3131
|
+
deep: i,
|
3132
|
+
once: s,
|
3133
|
+
flush: c,
|
3079
3134
|
bind: l = {},
|
3080
|
-
onData:
|
3081
|
-
bindData:
|
3082
|
-
} = e, a =
|
3135
|
+
onData: d,
|
3136
|
+
bindData: u
|
3137
|
+
} = e, a = d || new Array(n.length).fill(0), f = u || new Array(Object.keys(l).length).fill(0), h = je(
|
3083
3138
|
l,
|
3084
3139
|
(g, y, _) => f[_] === 0 ? t.getVueRefObject(g) : g
|
3085
|
-
), v =
|
3086
|
-
(g, y) =>
|
3140
|
+
), v = L(r, h), p = n.length === 1 ? Gt(a[0] === 1, n[0], t) : n.map(
|
3141
|
+
(g, y) => Gt(a[y] === 1, g, t)
|
3087
3142
|
);
|
3088
|
-
return
|
3143
|
+
return H(p, v, { immediate: o, deep: i, once: s, flush: c });
|
3089
3144
|
}
|
3090
|
-
function
|
3145
|
+
function Gt(e, t, n) {
|
3091
3146
|
return e ? () => t : n.getVueRefObject(t);
|
3092
3147
|
}
|
3093
|
-
function
|
3148
|
+
function Ns(e, t) {
|
3094
3149
|
const {
|
3095
3150
|
inputs: n = [],
|
3096
3151
|
outputs: r,
|
3097
3152
|
slient: o,
|
3098
|
-
data:
|
3099
|
-
code:
|
3100
|
-
immediate:
|
3153
|
+
data: i,
|
3154
|
+
code: s,
|
3155
|
+
immediate: c = !0,
|
3101
3156
|
deep: l,
|
3102
|
-
once:
|
3103
|
-
flush:
|
3104
|
-
} = e, a = o || new Array(n.length).fill(0), f =
|
3157
|
+
once: d,
|
3158
|
+
flush: u
|
3159
|
+
} = e, a = o || new Array(n.length).fill(0), f = i || new Array(n.length).fill(0), h = L(s), v = n.filter((g, y) => a[y] === 0 && f[y] === 0).map((g) => t.getVueRefObject(g));
|
3105
3160
|
function p() {
|
3106
|
-
return n.map((g, y) => f[y] === 0 ?
|
3161
|
+
return n.map((g, y) => f[y] === 0 ? tn(q(t.getVueRefObject(g))) : g);
|
3107
3162
|
}
|
3108
|
-
|
3163
|
+
H(
|
3109
3164
|
v,
|
3110
3165
|
() => {
|
3111
|
-
let g =
|
3166
|
+
let g = h(...p());
|
3112
3167
|
if (!r)
|
3113
3168
|
return;
|
3114
|
-
const _ = r.length === 1 ? [g] : g,
|
3169
|
+
const _ = r.length === 1 ? [g] : g, b = _.map((V) => V === void 0 ? 1 : 0);
|
3115
3170
|
t.updateOutputsRefFromServer(
|
3116
|
-
{ values: _, skips:
|
3171
|
+
{ values: _, skips: b },
|
3117
3172
|
r
|
3118
3173
|
);
|
3119
3174
|
},
|
3120
|
-
{ immediate:
|
3175
|
+
{ immediate: c, deep: l, once: d, flush: u }
|
3121
3176
|
);
|
3122
3177
|
}
|
3123
|
-
function
|
3178
|
+
function Is(e, t) {
|
3124
3179
|
return Object.assign(
|
3125
3180
|
{},
|
3126
3181
|
...Object.entries(e ?? {}).map(([n, r]) => {
|
3127
|
-
const o = r.map((
|
3128
|
-
if (
|
3129
|
-
const l =
|
3130
|
-
return
|
3182
|
+
const o = r.map((c) => {
|
3183
|
+
if (c.type === "web") {
|
3184
|
+
const l = Ts(c.bind, t);
|
3185
|
+
return As(c, l, t);
|
3131
3186
|
} else {
|
3132
|
-
if (
|
3133
|
-
return
|
3134
|
-
if (
|
3135
|
-
return
|
3187
|
+
if (c.type === "vue")
|
3188
|
+
return Cs(c, t);
|
3189
|
+
if (c.type === "js")
|
3190
|
+
return $s(c, t);
|
3136
3191
|
}
|
3137
|
-
throw new Error(`unknown event type ${
|
3138
|
-
}),
|
3192
|
+
throw new Error(`unknown event type ${c}`);
|
3193
|
+
}), s = L(
|
3139
3194
|
" (...args)=> Promise.all(promises(...args))",
|
3140
3195
|
{
|
3141
|
-
promises: (...
|
3142
|
-
await l(...
|
3196
|
+
promises: (...c) => o.map(async (l) => {
|
3197
|
+
await l(...c);
|
3143
3198
|
})
|
3144
3199
|
}
|
3145
3200
|
);
|
3146
|
-
return { [n]:
|
3201
|
+
return { [n]: s };
|
3147
3202
|
})
|
3148
3203
|
);
|
3149
3204
|
}
|
3150
|
-
function
|
3205
|
+
function Ts(e, t) {
|
3151
3206
|
return (...n) => (e ?? []).map((r) => {
|
3152
3207
|
if (N.isEventContext(r)) {
|
3153
3208
|
if (r.path.startsWith(":")) {
|
3154
3209
|
const o = r.path.slice(1);
|
3155
|
-
return
|
3210
|
+
return L(o)(...n);
|
3156
3211
|
}
|
3157
3212
|
return be(n[0], r.path.split("."));
|
3158
3213
|
}
|
3159
3214
|
return N.IsBinding(r) ? t.getObjectToValue(r) : r;
|
3160
3215
|
});
|
3161
3216
|
}
|
3162
|
-
function
|
3217
|
+
function As(e, t, n) {
|
3163
3218
|
async function r(...o) {
|
3164
|
-
const
|
3165
|
-
|
3219
|
+
const i = t(...o), s = xn({
|
3220
|
+
config: e.preSetup,
|
3221
|
+
snapshot: n
|
3222
|
+
});
|
3223
|
+
try {
|
3224
|
+
s.run();
|
3225
|
+
const c = await Cn().eventSend(e, i);
|
3226
|
+
if (!c)
|
3227
|
+
return;
|
3228
|
+
n.updateOutputsRefFromServer(c, e.set);
|
3229
|
+
} finally {
|
3230
|
+
s.tryReset();
|
3231
|
+
}
|
3166
3232
|
}
|
3167
3233
|
return r;
|
3168
3234
|
}
|
3169
|
-
function
|
3170
|
-
const { code: n, inputs: r = [], set: o } = e,
|
3171
|
-
function
|
3172
|
-
const l = (r ?? []).map((
|
3173
|
-
if (N.isEventContext(
|
3174
|
-
if (
|
3175
|
-
const a =
|
3176
|
-
return
|
3235
|
+
function $s(e, t) {
|
3236
|
+
const { code: n, inputs: r = [], set: o } = e, i = L(n);
|
3237
|
+
function s(...c) {
|
3238
|
+
const l = (r ?? []).map((u) => {
|
3239
|
+
if (N.isEventContext(u)) {
|
3240
|
+
if (u.path.startsWith(":")) {
|
3241
|
+
const a = u.path.slice(1);
|
3242
|
+
return L(a)(...c);
|
3177
3243
|
}
|
3178
|
-
return be(
|
3244
|
+
return be(c[0], u.path.split("."));
|
3179
3245
|
}
|
3180
|
-
return N.IsBinding(
|
3181
|
-
}),
|
3246
|
+
return N.IsBinding(u) ? tn(t.getObjectToValue(u)) : u;
|
3247
|
+
}), d = i(...l);
|
3182
3248
|
if (o !== void 0) {
|
3183
|
-
const a = o.length === 1 ? [
|
3249
|
+
const a = o.length === 1 ? [d] : d, f = a.map((h) => h === void 0 ? 1 : 0);
|
3184
3250
|
t.updateOutputsRefFromServer({ values: a, skips: f }, o);
|
3185
3251
|
}
|
3186
3252
|
}
|
3187
|
-
return
|
3253
|
+
return s;
|
3188
3254
|
}
|
3189
|
-
function
|
3190
|
-
const { code: n, bind: r = {}, bindData: o } = e,
|
3255
|
+
function Cs(e, t) {
|
3256
|
+
const { code: n, bind: r = {}, bindData: o } = e, i = o || new Array(Object.keys(r).length).fill(0), s = je(
|
3191
3257
|
r,
|
3192
|
-
(
|
3193
|
-
),
|
3194
|
-
function l(...
|
3195
|
-
|
3258
|
+
(d, u, a) => i[a] === 0 ? t.getVueRefObject(d) : d
|
3259
|
+
), c = L(n, s);
|
3260
|
+
function l(...d) {
|
3261
|
+
c(...d);
|
3196
3262
|
}
|
3197
3263
|
return l;
|
3198
3264
|
}
|
3199
|
-
function
|
3265
|
+
function xs(e, t) {
|
3200
3266
|
const n = [];
|
3201
|
-
(e.bStyle || []).forEach((
|
3202
|
-
Array.isArray(
|
3203
|
-
...
|
3267
|
+
(e.bStyle || []).forEach((i) => {
|
3268
|
+
Array.isArray(i) ? n.push(
|
3269
|
+
...i.map((s) => t.getObjectToValue(s))
|
3204
3270
|
) : n.push(
|
3205
|
-
|
3206
|
-
|
3207
|
-
(
|
3271
|
+
je(
|
3272
|
+
i,
|
3273
|
+
(s) => t.getObjectToValue(s)
|
3208
3274
|
)
|
3209
3275
|
);
|
3210
3276
|
});
|
3211
|
-
const r =
|
3277
|
+
const r = zn([e.style || {}, n]);
|
3212
3278
|
return {
|
3213
3279
|
hasStyle: r && Object.keys(r).length > 0,
|
3214
3280
|
styles: r
|
3215
3281
|
};
|
3216
3282
|
}
|
3217
|
-
function
|
3283
|
+
function js(e, t) {
|
3218
3284
|
const n = e.classes;
|
3219
3285
|
if (!n)
|
3220
3286
|
return null;
|
3221
3287
|
if (typeof n == "string")
|
3222
|
-
return
|
3223
|
-
const { str: r, map: o, bind:
|
3224
|
-
return r &&
|
3225
|
-
|
3288
|
+
return Je(n);
|
3289
|
+
const { str: r, map: o, bind: i } = n, s = [];
|
3290
|
+
return r && s.push(r), o && s.push(
|
3291
|
+
je(
|
3226
3292
|
o,
|
3227
|
-
(
|
3293
|
+
(c) => t.getObjectToValue(c)
|
3228
3294
|
)
|
3229
|
-
),
|
3295
|
+
), i && s.push(...i.map((c) => t.getObjectToValue(c))), Je(s);
|
3230
3296
|
}
|
3231
|
-
function
|
3297
|
+
function $e(e, t = !0) {
|
3232
3298
|
if (!(typeof e != "object" || e === null)) {
|
3233
3299
|
if (Array.isArray(e)) {
|
3234
|
-
t && e.forEach((n) =>
|
3300
|
+
t && e.forEach((n) => $e(n, !0));
|
3235
3301
|
return;
|
3236
3302
|
}
|
3237
3303
|
for (const [n, r] of Object.entries(e))
|
@@ -3245,153 +3311,166 @@ function Ae(e, t = !0) {
|
|
3245
3311
|
);
|
3246
3312
|
}
|
3247
3313
|
else
|
3248
|
-
t &&
|
3314
|
+
t && $e(r, !0);
|
3249
3315
|
}
|
3250
3316
|
}
|
3251
|
-
function
|
3317
|
+
function Ds(e, t) {
|
3252
3318
|
const n = e.startsWith(":");
|
3253
|
-
return n && (e = e.slice(1), t =
|
3319
|
+
return n && (e = e.slice(1), t = L(t)), { name: e, value: t, isFunc: n };
|
3254
3320
|
}
|
3255
|
-
function
|
3321
|
+
function Ms(e, t, n) {
|
3256
3322
|
var o;
|
3257
3323
|
const r = {};
|
3258
|
-
return
|
3259
|
-
const
|
3260
|
-
|
3261
|
-
}), (o = e.proxyProps) == null || o.forEach((
|
3262
|
-
const
|
3263
|
-
typeof
|
3264
|
-
const { name:
|
3265
|
-
r[
|
3324
|
+
return bt(e.bProps || {}, (i, s) => {
|
3325
|
+
const c = n.getObjectToValue(i);
|
3326
|
+
_e(c) || ($e(c), r[s] = Fs(c, s));
|
3327
|
+
}), (o = e.proxyProps) == null || o.forEach((i) => {
|
3328
|
+
const s = n.getObjectToValue(i);
|
3329
|
+
typeof s == "object" && bt(s, (c, l) => {
|
3330
|
+
const { name: d, value: u } = Ds(l, c);
|
3331
|
+
r[d] = u;
|
3266
3332
|
});
|
3267
3333
|
}), { ...t || {}, ...r };
|
3268
3334
|
}
|
3269
|
-
function
|
3270
|
-
return t === "innerText" ?
|
3335
|
+
function Fs(e, t) {
|
3336
|
+
return t === "innerText" ? lt(e) : e;
|
3271
3337
|
}
|
3272
|
-
function
|
3273
|
-
const { id: n, use: r } = e.propsInfo, o =
|
3274
|
-
return
|
3275
|
-
|
3338
|
+
function Bs(e, { slots: t }) {
|
3339
|
+
const { id: n, use: r } = e.propsInfo, o = Rr(n);
|
3340
|
+
return ft(() => {
|
3341
|
+
Pr(n);
|
3276
3342
|
}), () => {
|
3277
|
-
const
|
3278
|
-
return
|
3343
|
+
const i = e.propsValue;
|
3344
|
+
return Vr(
|
3279
3345
|
n,
|
3280
3346
|
o,
|
3281
3347
|
Object.fromEntries(
|
3282
|
-
r.map((
|
3348
|
+
r.map((s) => [s, i[s]])
|
3283
3349
|
)
|
3284
3350
|
), A(xe, null, t.default());
|
3285
3351
|
};
|
3286
3352
|
}
|
3287
|
-
const
|
3353
|
+
const Ls = U(Bs, {
|
3288
3354
|
props: ["propsInfo", "propsValue"]
|
3289
|
-
});
|
3290
|
-
function
|
3355
|
+
}), jn = /* @__PURE__ */ new Map();
|
3356
|
+
function Ws(e) {
|
3357
|
+
var t;
|
3358
|
+
(t = e.scopes) == null || t.forEach((n) => {
|
3359
|
+
jn.set(n.id, n);
|
3360
|
+
});
|
3361
|
+
}
|
3362
|
+
function fe(e) {
|
3363
|
+
return jn.get(e);
|
3364
|
+
}
|
3365
|
+
function Us(e, t) {
|
3291
3366
|
if (!e.slots)
|
3292
3367
|
return null;
|
3293
3368
|
const n = e.slots ?? {};
|
3294
|
-
return Array.isArray(n) ? t ?
|
3295
|
-
const { items:
|
3369
|
+
return Array.isArray(n) ? t ? ye(n) : () => ye(n) : Xt(n, { keyFn: (s) => s === ":" ? "default" : s, valueFn: (s) => {
|
3370
|
+
const { items: c } = s;
|
3296
3371
|
return (l) => {
|
3297
|
-
if (
|
3298
|
-
const
|
3299
|
-
return A(
|
3372
|
+
if (s.scopeId) {
|
3373
|
+
const d = () => s.props ? qt(s.props, l, c) : ye(c);
|
3374
|
+
return A(
|
3375
|
+
Re,
|
3376
|
+
{ scope: fe(s.scopeId) },
|
3377
|
+
d
|
3378
|
+
);
|
3300
3379
|
}
|
3301
|
-
return
|
3380
|
+
return s.props ? qt(s.props, l, c) : ye(c);
|
3302
3381
|
};
|
3303
3382
|
} });
|
3304
3383
|
}
|
3305
|
-
function
|
3384
|
+
function qt(e, t, n) {
|
3306
3385
|
return A(
|
3307
|
-
|
3386
|
+
Ls,
|
3308
3387
|
{ propsInfo: e, propsValue: t },
|
3309
|
-
() =>
|
3388
|
+
() => ye(n)
|
3310
3389
|
);
|
3311
3390
|
}
|
3312
|
-
function
|
3313
|
-
const t = (e ?? []).map((n) => A(
|
3391
|
+
function ye(e) {
|
3392
|
+
const t = (e ?? []).map((n) => A(oe, {
|
3314
3393
|
component: n
|
3315
3394
|
}));
|
3316
3395
|
return t.length <= 0 ? null : t;
|
3317
3396
|
}
|
3318
|
-
function
|
3397
|
+
function Gs(e, t) {
|
3319
3398
|
const n = {}, r = [];
|
3320
3399
|
return (e || []).forEach((o) => {
|
3321
|
-
const { sys:
|
3322
|
-
if (
|
3323
|
-
const
|
3324
|
-
if (n[`onUpdate:${
|
3325
|
-
|
3326
|
-
},
|
3327
|
-
const a =
|
3328
|
-
r.push([
|
3400
|
+
const { sys: i, name: s, arg: c, value: l, mf: d } = o;
|
3401
|
+
if (s === "vmodel") {
|
3402
|
+
const u = t.getVueRefObject(l);
|
3403
|
+
if (n[`onUpdate:${c}`] = (a) => {
|
3404
|
+
u.value = a;
|
3405
|
+
}, i === 1) {
|
3406
|
+
const a = d ? Object.fromEntries(d.map((f) => [f, !0])) : {};
|
3407
|
+
r.push([Qn, u.value, void 0, a]);
|
3329
3408
|
} else
|
3330
|
-
n[
|
3331
|
-
} else if (
|
3332
|
-
const
|
3333
|
-
r.push([
|
3409
|
+
n[c] = u.value;
|
3410
|
+
} else if (s === "vshow") {
|
3411
|
+
const u = t.getVueRefObject(l);
|
3412
|
+
r.push([Jn, u.value]);
|
3334
3413
|
} else
|
3335
|
-
console.warn(`Directive ${
|
3414
|
+
console.warn(`Directive ${s} is not supported yet`);
|
3336
3415
|
}), {
|
3337
3416
|
newProps: n,
|
3338
3417
|
directiveArray: r
|
3339
3418
|
};
|
3340
3419
|
}
|
3341
|
-
function
|
3420
|
+
function qs(e, t) {
|
3342
3421
|
const { eRef: n } = e;
|
3343
3422
|
return n === void 0 ? {} : { ref: t.getRef(n) };
|
3344
3423
|
}
|
3345
|
-
function
|
3346
|
-
const t =
|
3347
|
-
return
|
3348
|
-
const { tag: o } = e.component,
|
3424
|
+
function Ks(e) {
|
3425
|
+
const t = re(), n = sn(), r = e.component.props ?? {};
|
3426
|
+
return $e(r, !0), () => {
|
3427
|
+
const { tag: o } = e.component, i = N.IsBinding(o) ? t.getObjectToValue(o) : o, s = Yn(i), c = typeof s == "string", l = js(e.component, t), { styles: d, hasStyle: u } = xs(e.component, t), a = Is(e.component.events ?? {}, t), f = Us(e.component, c), h = Ms(e.component, r, t), { newProps: v, directiveArray: p } = Gs(
|
3349
3428
|
e.component.dir,
|
3350
3429
|
t
|
3351
|
-
), g =
|
3430
|
+
), g = qs(
|
3352
3431
|
e.component,
|
3353
3432
|
n
|
3354
|
-
), y =
|
3355
|
-
...
|
3433
|
+
), y = Xn({
|
3434
|
+
...h,
|
3356
3435
|
...a,
|
3357
3436
|
...v,
|
3358
3437
|
...g
|
3359
3438
|
}) || {};
|
3360
|
-
|
3361
|
-
const _ = A(
|
3362
|
-
return p.length > 0 ?
|
3439
|
+
u && (y.style = d), l && (y.class = l);
|
3440
|
+
const _ = A(s, { ...y }, f);
|
3441
|
+
return p.length > 0 ? Zn(
|
3363
3442
|
// @ts-ignore
|
3364
3443
|
_,
|
3365
3444
|
p
|
3366
3445
|
) : _;
|
3367
3446
|
};
|
3368
3447
|
}
|
3369
|
-
const
|
3448
|
+
const oe = U(Ks, {
|
3370
3449
|
props: ["component"]
|
3371
3450
|
});
|
3372
|
-
function
|
3451
|
+
function Dn(e, t) {
|
3373
3452
|
var n, r;
|
3374
3453
|
if (e) {
|
3375
|
-
const o =
|
3376
|
-
|
3377
|
-
|
3454
|
+
const o = br(e), i = wr(e, re(t)), s = re(t);
|
3455
|
+
bs(e.py_watch, e.web_computed, s), (n = e.vue_watch) == null || n.forEach((c) => ks(c, s)), (r = e.js_watch) == null || r.forEach((c) => Ns(c, s)), ft(() => {
|
3456
|
+
Sr(e.id, i), Or(e.id, o);
|
3378
3457
|
});
|
3379
3458
|
}
|
3380
3459
|
}
|
3381
|
-
function
|
3460
|
+
function Hs(e, { slots: t }) {
|
3382
3461
|
const { scope: n } = e;
|
3383
|
-
return
|
3462
|
+
return Dn(n), () => A(xe, null, t.default());
|
3384
3463
|
}
|
3385
|
-
const
|
3464
|
+
const Re = U(Hs, {
|
3386
3465
|
props: ["scope"]
|
3387
|
-
}),
|
3466
|
+
}), zs = U(
|
3388
3467
|
(e) => {
|
3389
3468
|
const { scope: t, items: n, vforInfo: r } = e;
|
3390
|
-
return
|
3469
|
+
return Nr(r), Dn(t, r.key), n.length === 1 ? () => A(oe, {
|
3391
3470
|
component: n[0]
|
3392
3471
|
}) : () => n.map(
|
3393
|
-
(
|
3394
|
-
component:
|
3472
|
+
(i) => A(oe, {
|
3473
|
+
component: i
|
3395
3474
|
})
|
3396
3475
|
);
|
3397
3476
|
},
|
@@ -3399,316 +3478,256 @@ const Oe = F(Us, {
|
|
3399
3478
|
props: ["scope", "items", "vforInfo"]
|
3400
3479
|
}
|
3401
3480
|
);
|
3402
|
-
function
|
3403
|
-
const { state: n, isReady: r, isLoading: o } =
|
3404
|
-
let
|
3405
|
-
const
|
3406
|
-
if (!
|
3481
|
+
function Qs(e, t) {
|
3482
|
+
const { state: n, isReady: r, isLoading: o } = hr(async () => {
|
3483
|
+
let i = e;
|
3484
|
+
const s = t;
|
3485
|
+
if (!i && !s)
|
3407
3486
|
throw new Error("Either config or configUrl must be provided");
|
3408
|
-
if (!
|
3487
|
+
if (!i && s && (i = await (await fetch(s)).json()), !i)
|
3409
3488
|
throw new Error("Failed to load config");
|
3410
|
-
return
|
3489
|
+
return i;
|
3411
3490
|
}, {});
|
3412
3491
|
return { config: n, isReady: r, isLoading: o };
|
3413
3492
|
}
|
3414
|
-
function
|
3415
|
-
|
3416
|
-
|
3493
|
+
function Js(e) {
|
3494
|
+
const t = K(!1), n = K("");
|
3495
|
+
function r(o, i) {
|
3496
|
+
let s;
|
3497
|
+
return i.component ? s = `Error captured from component:tag: ${i.component.tag} ; id: ${i.component.id} ` : s = "Error captured from app init", console.group(s), console.error("Component:", i.component), console.error("Error:", o), console.groupEnd(), e && (t.value = !0, n.value = `${s} ${o.message}`), !1;
|
3498
|
+
}
|
3499
|
+
return er(r), { hasError: t, errorMessage: n };
|
3417
3500
|
}
|
3418
|
-
const
|
3501
|
+
const Ys = { class: "app-box" }, Xs = {
|
3419
3502
|
key: 0,
|
3420
3503
|
style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }
|
3421
|
-
},
|
3504
|
+
}, Zs = {
|
3505
|
+
key: 0,
|
3506
|
+
style: { color: "red", "font-size": "1.2em", margin: "1rem", border: "1px dashed red", padding: "1rem" }
|
3507
|
+
}, ei = /* @__PURE__ */ U({
|
3422
3508
|
__name: "App",
|
3423
3509
|
props: {
|
3424
3510
|
config: {},
|
3511
|
+
meta: {},
|
3425
3512
|
configUrl: {}
|
3426
3513
|
},
|
3427
3514
|
setup(e) {
|
3428
|
-
const t = e, {
|
3515
|
+
const t = e, { debug: n = !1 } = t.meta, { config: r, isLoading: o } = Qs(
|
3429
3516
|
t.config,
|
3430
3517
|
t.configUrl
|
3431
3518
|
);
|
3432
|
-
let
|
3433
|
-
|
3434
|
-
|
3435
|
-
mode:
|
3436
|
-
version:
|
3437
|
-
queryPath:
|
3438
|
-
pathParams:
|
3439
|
-
webServerInfo:
|
3440
|
-
}),
|
3441
|
-
})
|
3442
|
-
|
3443
|
-
|
3444
|
-
|
3519
|
+
let i = null;
|
3520
|
+
H(r, (l) => {
|
3521
|
+
i = l, l.url && (cr({
|
3522
|
+
mode: t.meta.mode,
|
3523
|
+
version: t.meta.version,
|
3524
|
+
queryPath: l.url.path,
|
3525
|
+
pathParams: l.url.params,
|
3526
|
+
webServerInfo: l.webInfo
|
3527
|
+
}), Es(t.meta.mode)), Ws(l), gs(l);
|
3528
|
+
});
|
3529
|
+
const { hasError: s, errorMessage: c } = Js(n);
|
3530
|
+
return (l, d) => (ie(), pe("div", Ys, [
|
3531
|
+
M(o) ? (ie(), pe("div", Xs, d[0] || (d[0] = [
|
3532
|
+
tr("p", { style: { margin: "auto" } }, "Loading ...", -1)
|
3533
|
+
]))) : (ie(), pe("div", {
|
3445
3534
|
key: 1,
|
3446
|
-
class:
|
3535
|
+
class: Je(["insta-main", M(r).class])
|
3447
3536
|
}, [
|
3448
|
-
|
3449
|
-
scope:
|
3537
|
+
nr(M(Re), {
|
3538
|
+
scope: M(fe)(M(i).scopeId)
|
3450
3539
|
}, {
|
3451
|
-
default:
|
3452
|
-
(
|
3540
|
+
default: rr(() => [
|
3541
|
+
(ie(!0), pe(xe, null, or(M(i).items, (u) => (ie(), sr(M(oe), { component: u }, null, 8, ["component"]))), 256))
|
3453
3542
|
]),
|
3454
3543
|
_: 1
|
3455
|
-
}, 8, ["scope"])
|
3544
|
+
}, 8, ["scope"]),
|
3545
|
+
M(s) ? (ie(), pe("div", Zs, lt(M(c)), 1)) : ir("", !0)
|
3456
3546
|
], 2))
|
3457
3547
|
]));
|
3458
3548
|
}
|
3459
3549
|
});
|
3460
|
-
function
|
3461
|
-
const { on: t,
|
3550
|
+
function ti(e) {
|
3551
|
+
const { on: t, scopeId: n, items: r } = e, o = fe(n), i = re();
|
3462
3552
|
return () => {
|
3463
|
-
const s = typeof t == "boolean" ? t :
|
3464
|
-
return A(
|
3465
|
-
(
|
3553
|
+
const s = typeof t == "boolean" ? t : i.getObjectToValue(t);
|
3554
|
+
return A(Re, { scope: o }, () => s ? r.map(
|
3555
|
+
(l) => A(oe, { component: l })
|
3466
3556
|
) : void 0);
|
3467
3557
|
};
|
3468
3558
|
}
|
3469
|
-
const
|
3470
|
-
props: ["on", "
|
3559
|
+
const ni = U(ti, {
|
3560
|
+
props: ["on", "scopeId", "items"]
|
3471
3561
|
});
|
3472
|
-
function
|
3562
|
+
function ri(e) {
|
3473
3563
|
const { start: t = 0, end: n, step: r = 1 } = e;
|
3474
3564
|
let o = [];
|
3475
3565
|
if (r > 0)
|
3476
|
-
for (let
|
3477
|
-
o.push(
|
3566
|
+
for (let i = t; i < n; i += r)
|
3567
|
+
o.push(i);
|
3478
3568
|
else
|
3479
|
-
for (let
|
3480
|
-
o.push(
|
3569
|
+
for (let i = t; i > n; i += r)
|
3570
|
+
o.push(i);
|
3481
3571
|
return o;
|
3482
3572
|
}
|
3483
|
-
function
|
3484
|
-
const { array: t, bArray: n, items: r, fkey: o, fid:
|
3485
|
-
|
3486
|
-
const v =
|
3487
|
-
|
3488
|
-
|
3489
|
-
})
|
3490
|
-
|
3491
|
-
|
3492
|
-
|
3573
|
+
function oi(e) {
|
3574
|
+
const { array: t, bArray: n, items: r, fkey: o, fid: i, scopeId: s, num: c, tsGroup: l = {} } = e, d = t === void 0, u = c !== void 0, a = d ? n : t, f = re();
|
3575
|
+
Tr(i, a, d, u);
|
3576
|
+
const v = ui(o ?? "index");
|
3577
|
+
ft(() => {
|
3578
|
+
_r(s);
|
3579
|
+
});
|
3580
|
+
const p = fe(s);
|
3581
|
+
return () => {
|
3582
|
+
const g = ii(
|
3583
|
+
u,
|
3584
|
+
d,
|
3493
3585
|
a,
|
3494
3586
|
f,
|
3495
|
-
|
3496
|
-
),
|
3497
|
-
const
|
3498
|
-
return
|
3499
|
-
scope:
|
3587
|
+
c
|
3588
|
+
), y = $r(i), _ = g.map((b, V) => {
|
3589
|
+
const C = v(b, V);
|
3590
|
+
return y.add(C), Ar(i, C, V), A(zs, {
|
3591
|
+
scope: p,
|
3500
3592
|
items: r,
|
3501
3593
|
vforInfo: {
|
3502
|
-
fid:
|
3503
|
-
key:
|
3594
|
+
fid: i,
|
3595
|
+
key: C
|
3504
3596
|
},
|
3505
|
-
key:
|
3597
|
+
key: C
|
3506
3598
|
});
|
3507
3599
|
});
|
3508
|
-
return
|
3509
|
-
default: () =>
|
3510
|
-
}) :
|
3600
|
+
return y.removeUnusedKeys(), l && Object.keys(l).length > 0 ? A(Jt, l, {
|
3601
|
+
default: () => _
|
3602
|
+
}) : _;
|
3511
3603
|
};
|
3512
3604
|
}
|
3513
|
-
const
|
3514
|
-
props: [
|
3605
|
+
const si = U(oi, {
|
3606
|
+
props: [
|
3607
|
+
"array",
|
3608
|
+
"items",
|
3609
|
+
"fid",
|
3610
|
+
"bArray",
|
3611
|
+
"scopeId",
|
3612
|
+
"num",
|
3613
|
+
"fkey",
|
3614
|
+
"tsGroup"
|
3615
|
+
]
|
3515
3616
|
});
|
3516
|
-
function
|
3617
|
+
function ii(e, t, n, r, o) {
|
3517
3618
|
if (e) {
|
3518
|
-
let
|
3519
|
-
return typeof o == "number" ?
|
3520
|
-
end: Math.max(0,
|
3619
|
+
let s = 0;
|
3620
|
+
return typeof o == "number" ? s = o : s = r.getObjectToValue(o) ?? 0, ri({
|
3621
|
+
end: Math.max(0, s)
|
3521
3622
|
});
|
3522
3623
|
}
|
3523
|
-
const
|
3524
|
-
return typeof
|
3624
|
+
const i = t ? r.getObjectToValue(n) || [] : n;
|
3625
|
+
return typeof i == "object" ? Object.values(i) : i;
|
3525
3626
|
}
|
3526
|
-
const
|
3527
|
-
function
|
3627
|
+
const ai = (e) => e, ci = (e, t) => t;
|
3628
|
+
function ui(e) {
|
3528
3629
|
const t = pr(e);
|
3529
|
-
return typeof t == "function" ? t : e === "item" ?
|
3530
|
-
}
|
3531
|
-
function si(e) {
|
3532
|
-
return e.map((n) => {
|
3533
|
-
if (n.tag)
|
3534
|
-
return A(Q, { component: n });
|
3535
|
-
const r = ft(Fn);
|
3536
|
-
return A(r, {
|
3537
|
-
scope: n
|
3538
|
-
});
|
3539
|
-
});
|
3540
|
-
}
|
3541
|
-
const Fn = F(
|
3542
|
-
(e) => {
|
3543
|
-
const t = e.scope;
|
3544
|
-
return () => si(t.items ?? []);
|
3545
|
-
},
|
3546
|
-
{
|
3547
|
-
props: ["scope"]
|
3548
|
-
}
|
3549
|
-
);
|
3550
|
-
function ii(e) {
|
3551
|
-
return e.map((t) => {
|
3552
|
-
if (t.tag)
|
3553
|
-
return A(Q, { component: t });
|
3554
|
-
const n = ft(Fn);
|
3555
|
-
return A(n, {
|
3556
|
-
scope: t
|
3557
|
-
});
|
3558
|
-
});
|
3630
|
+
return typeof t == "function" ? t : e === "item" ? ai : ci;
|
3559
3631
|
}
|
3560
|
-
|
3561
|
-
|
3562
|
-
const { scope: t, on: n, items: r } = e, o = J(r), s = on(t), i = ne();
|
3563
|
-
return $e.createDynamicWatchRefresh(n, i, async () => {
|
3564
|
-
const { items: u, on: l } = await $e.fetchRemote(e, i);
|
3565
|
-
return o.value = u, l;
|
3566
|
-
}), Ce(() => {
|
3567
|
-
cn(t.id, s);
|
3568
|
-
}), () => ii(o.value);
|
3569
|
-
},
|
3570
|
-
{
|
3571
|
-
props: ["sid", "url", "hKey", "on", "bind", "items", "scope"]
|
3572
|
-
}
|
3573
|
-
);
|
3574
|
-
var $e;
|
3575
|
-
((e) => {
|
3576
|
-
function t(r, o, s) {
|
3577
|
-
let i = null, u = r, l = u.map((c) => o.getVueRefObject(c));
|
3578
|
-
function h() {
|
3579
|
-
i && i(), i = G(
|
3580
|
-
l,
|
3581
|
-
async () => {
|
3582
|
-
u = await s(), l = u.map((c) => o.getVueRefObject(c)), h();
|
3583
|
-
},
|
3584
|
-
{ deep: !0 }
|
3585
|
-
);
|
3586
|
-
}
|
3587
|
-
return h(), () => {
|
3588
|
-
i && i();
|
3589
|
-
};
|
3590
|
-
}
|
3591
|
-
e.createDynamicWatchRefresh = t;
|
3592
|
-
async function n(r, o) {
|
3593
|
-
const s = Object.values(r.bind).map((c) => ({
|
3594
|
-
sid: c.sid,
|
3595
|
-
id: c.id,
|
3596
|
-
value: o.getObjectToValue(c)
|
3597
|
-
})), i = {
|
3598
|
-
sid: r.sid,
|
3599
|
-
bind: s,
|
3600
|
-
hKey: r.hKey,
|
3601
|
-
page: ye()
|
3602
|
-
}, u = {
|
3603
|
-
method: "POST",
|
3604
|
-
headers: {
|
3605
|
-
"Content-Type": "application/json"
|
3606
|
-
},
|
3607
|
-
body: JSON.stringify(i)
|
3608
|
-
}, l = await fetch(r.url, u);
|
3609
|
-
if (!l.ok)
|
3610
|
-
throw new Error("Failed to fetch data");
|
3611
|
-
return await l.json();
|
3612
|
-
}
|
3613
|
-
e.fetchRemote = n;
|
3614
|
-
})($e || ($e = {}));
|
3615
|
-
function ci(e) {
|
3616
|
-
const { scope: t, items: n } = e;
|
3632
|
+
function li(e) {
|
3633
|
+
const { scopeId: t, items: n } = e, r = fe(t);
|
3617
3634
|
return () => {
|
3618
|
-
const
|
3619
|
-
return A(
|
3635
|
+
const o = n.map((i) => A(oe, { component: i }));
|
3636
|
+
return A(Re, { scope: r }, () => o);
|
3620
3637
|
};
|
3621
3638
|
}
|
3622
|
-
const
|
3623
|
-
props: ["
|
3639
|
+
const Kt = U(li, {
|
3640
|
+
props: ["scopeId", "items"]
|
3624
3641
|
});
|
3625
|
-
function
|
3626
|
-
const { on: t, case: n, default: r } = e, o =
|
3642
|
+
function fi(e) {
|
3643
|
+
const { on: t, case: n, default: r } = e, o = re();
|
3627
3644
|
return () => {
|
3628
|
-
const
|
3629
|
-
const { value: l, items:
|
3630
|
-
if (
|
3631
|
-
return A(
|
3632
|
-
|
3633
|
-
items:
|
3645
|
+
const i = o.getObjectToValue(t), s = n.map((c) => {
|
3646
|
+
const { value: l, items: d, scopeId: u } = c.props;
|
3647
|
+
if (i === l)
|
3648
|
+
return A(Kt, {
|
3649
|
+
scopeId: u,
|
3650
|
+
items: d,
|
3634
3651
|
key: ["case", l].join("-")
|
3635
3652
|
});
|
3636
|
-
}).filter((
|
3637
|
-
if (r && !
|
3638
|
-
const { items:
|
3639
|
-
|
3653
|
+
}).filter((c) => c);
|
3654
|
+
if (r && !s.length) {
|
3655
|
+
const { items: c, scopeId: l } = r.props;
|
3656
|
+
s.push(A(Kt, { scopeId: l, items: c, key: "default" }));
|
3640
3657
|
}
|
3641
|
-
return A(xe,
|
3658
|
+
return A(xe, s);
|
3642
3659
|
};
|
3643
3660
|
}
|
3644
|
-
const
|
3661
|
+
const di = U(fi, {
|
3645
3662
|
props: ["case", "on", "default"]
|
3646
3663
|
});
|
3647
|
-
function
|
3664
|
+
function hi(e, { slots: t }) {
|
3648
3665
|
const { name: n = "fade", tag: r } = e;
|
3649
3666
|
return () => A(
|
3650
|
-
|
3667
|
+
Jt,
|
3651
3668
|
{ name: n, tag: r },
|
3652
3669
|
{
|
3653
3670
|
default: t.default
|
3654
3671
|
}
|
3655
3672
|
);
|
3656
3673
|
}
|
3657
|
-
const
|
3674
|
+
const pi = U(hi, {
|
3658
3675
|
props: ["name", "tag"]
|
3659
3676
|
});
|
3660
|
-
function
|
3661
|
-
const { content: t, r: n = 0 } = e, r =
|
3662
|
-
return () =>
|
3677
|
+
function mi(e) {
|
3678
|
+
const { content: t, r: n = 0 } = e, r = re(), o = n === 1 ? () => r.getObjectToValue(t) : () => t;
|
3679
|
+
return () => lt(o());
|
3663
3680
|
}
|
3664
|
-
const
|
3681
|
+
const gi = U(mi, {
|
3665
3682
|
props: ["content", "r"]
|
3666
3683
|
});
|
3667
|
-
function
|
3684
|
+
function vi(e) {
|
3668
3685
|
if (!e.router)
|
3669
3686
|
throw new Error("Router config is not provided.");
|
3670
3687
|
const { routes: t, kAlive: n = !1 } = e.router;
|
3671
3688
|
return t.map(
|
3672
|
-
(o) =>
|
3689
|
+
(o) => Mn(o, n)
|
3673
3690
|
);
|
3674
3691
|
}
|
3675
|
-
function
|
3692
|
+
function Mn(e, t) {
|
3676
3693
|
var l;
|
3677
|
-
const { server: n = !1, vueItem: r,
|
3694
|
+
const { server: n = !1, vueItem: r, scopeId: o } = e, i = () => {
|
3678
3695
|
if (n)
|
3679
3696
|
throw new Error("Server-side rendering is not supported yet.");
|
3680
|
-
return Promise.resolve(
|
3681
|
-
|
3682
|
-
|
3683
|
-
|
3697
|
+
return Promise.resolve(
|
3698
|
+
yi(r, fe(o), t)
|
3699
|
+
);
|
3700
|
+
}, s = (l = r.children) == null ? void 0 : l.map(
|
3701
|
+
(d) => Mn(d, t)
|
3702
|
+
), c = {
|
3684
3703
|
...r,
|
3685
|
-
children:
|
3686
|
-
component:
|
3704
|
+
children: s,
|
3705
|
+
component: i
|
3687
3706
|
};
|
3688
|
-
return r.component.length === 0 && delete
|
3707
|
+
return r.component.length === 0 && delete c.component, s === void 0 && delete c.children, c;
|
3689
3708
|
}
|
3690
|
-
function
|
3691
|
-
const { path: r, component: o } = e,
|
3692
|
-
|
3709
|
+
function yi(e, t, n) {
|
3710
|
+
const { path: r, component: o } = e, i = A(
|
3711
|
+
Re,
|
3693
3712
|
{ scope: t, key: r },
|
3694
|
-
() => o.map((
|
3713
|
+
() => o.map((c) => A(oe, { component: c }))
|
3695
3714
|
);
|
3696
|
-
return n ? A(ar, null, () =>
|
3715
|
+
return n ? A(ar, null, () => i) : i;
|
3697
3716
|
}
|
3698
|
-
function
|
3699
|
-
const { mode: n = "hash" } = t.router, r = n === "hash" ?
|
3717
|
+
function wi(e, t) {
|
3718
|
+
const { mode: n = "hash" } = t.router, r = n === "hash" ? So() : n === "memory" ? _o() : Sn();
|
3700
3719
|
e.use(
|
3701
|
-
|
3720
|
+
ds({
|
3702
3721
|
history: r,
|
3703
|
-
routes:
|
3722
|
+
routes: vi(t)
|
3704
3723
|
})
|
3705
3724
|
);
|
3706
3725
|
}
|
3707
|
-
function
|
3708
|
-
e.component("insta-ui",
|
3726
|
+
function Si(e, t) {
|
3727
|
+
e.component("insta-ui", ei), e.component("vif", ni), e.component("vfor", si), e.component("match", di), e.component("ts-group", pi), e.component("content", gi), t.router && wi(e, t);
|
3709
3728
|
}
|
3710
3729
|
export {
|
3711
|
-
|
3712
|
-
|
3730
|
+
$e as convertDynamicProperties,
|
3731
|
+
Si as install
|
3713
3732
|
};
|
3714
3733
|
//# sourceMappingURL=insta-ui.js.map
|