instaui 0.1.18__py2.py3-none-any.whl → 0.2.0__py2.py3-none-any.whl

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