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