@stonecrop/stonecrop 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stonecrop.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var vr = Object.defineProperty;
2
2
  var yr = (e, t, n) => t in e ? vr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var x = (e, t, n) => yr(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { effectScope as _n, ref as se, markRaw as fe, toRaw as Ce, watch as Me, unref as de, hasInjectionContext as _r, inject as pe, getCurrentInstance as wt, reactive as En, isRef as Ae, isReactive as bt, toRef as Xe, nextTick as ct, computed as z, getCurrentScope as Er, onScopeDispose as wr, toRefs as jt, onBeforeMount as br, shallowRef as Sr, shallowReactive as Or, defineComponent as wn, h as bn, provide as Ze, watchEffect as Nr } from "vue";
4
+ import { effectScope as _n, ref as se, markRaw as fe, toRaw as Ce, watch as Me, unref as de, hasInjectionContext as _r, inject as pe, getCurrentInstance as bt, reactive as En, isRef as Ae, isReactive as wt, toRef as Xe, nextTick as ct, computed as z, getCurrentScope as Er, onScopeDispose as br, toRefs as jt, onBeforeMount as wr, shallowRef as Sr, shallowReactive as Or, defineComponent as bn, h as wn, provide as Ze, watchEffect as Nr } from "vue";
5
5
  function ut(e) {
6
6
  this.message = e || "";
7
7
  }
@@ -14,7 +14,7 @@ ut.prototype = Object.create(Error.prototype, {
14
14
  }
15
15
  }
16
16
  });
17
- const be = class be {
17
+ const we = class we {
18
18
  /**
19
19
  * @constructor
20
20
  * @param {Registry} registry - The immutable registry
@@ -88,9 +88,9 @@ const be = class be {
88
88
  * @description The Pinia store that manages the mutable records
89
89
  */
90
90
  x(this, "store");
91
- if (be._root)
92
- return be._root;
93
- be._root = this, this.registry = t, this.store = n, this.schema = r, this.workflow = o, this.actions = s;
91
+ if (we._root)
92
+ return we._root;
93
+ we._root = this, this.registry = t, this.store = n, this.schema = r, this.workflow = o, this.actions = s;
94
94
  }
95
95
  /**
96
96
  * @method setup
@@ -209,8 +209,8 @@ const be = class be {
209
209
  * @property {Stonecrop} _root
210
210
  * @description The root Stonecrop instance
211
211
  */
212
- x(be, "_root");
213
- let lt = be;
212
+ x(we, "_root");
213
+ let lt = we;
214
214
  var Sn = !1;
215
215
  function je(e, t, n) {
216
216
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
@@ -888,7 +888,7 @@ function Dn(e, t) {
888
888
  if (!(n in e))
889
889
  continue;
890
890
  const o = e[n];
891
- me(o) && me(r) && !Ae(r) && !bt(r) ? e[n] = Dn(o, r) : e[n] = r;
891
+ me(o) && me(r) && !Ae(r) && !wt(r) ? e[n] = Dn(o, r) : e[n] = r;
892
892
  }
893
893
  return e;
894
894
  }
@@ -900,7 +900,7 @@ function Ut(e, t, n, r = Mn) {
900
900
  const s = e.indexOf(t);
901
901
  s > -1 && (e.splice(s, 1), r());
902
902
  };
903
- return !n && Er() && wr(o), o;
903
+ return !n && Er() && br(o), o;
904
904
  }
905
905
  function _e(e, ...t) {
906
906
  e.slice().forEach((n) => {
@@ -914,7 +914,7 @@ function dt(e, t) {
914
914
  if (!t.hasOwnProperty(n))
915
915
  continue;
916
916
  const r = t[n], o = e[n];
917
- me(o) && me(r) && e.hasOwnProperty(n) && !Ae(r) && !bt(r) ? e[n] = dt(o, r) : e[n] = r;
917
+ me(o) && me(r) && e.hasOwnProperty(n) && !Ae(r) && !wt(r) ? e[n] = dt(o, r) : e[n] = r;
918
918
  }
919
919
  return e;
920
920
  }
@@ -953,11 +953,11 @@ function ht(e, t, n = {}, r, o, s) {
953
953
  throw new Error("Pinia destroyed");
954
954
  const c = { deep: !0 };
955
955
  process.env.NODE_ENV !== "production" && !Sn && (c.onTrigger = (y) => {
956
- l ? p = y : l == !1 && !b._hotUpdating && (Array.isArray(p) ? p.push(y) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
956
+ l ? p = y : l == !1 && !w._hotUpdating && (Array.isArray(p) ? p.push(y) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
957
957
  });
958
958
  let l, f, u = [], d = [], p;
959
- const w = r.state.value[e];
960
- !s && !w && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
959
+ const b = r.state.value[e];
960
+ !s && !b && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
961
961
  const S = se({});
962
962
  let E;
963
963
  function R(y) {
@@ -1006,13 +1006,13 @@ function ht(e, t, n = {}, r, o, s) {
1006
1006
  _e(d, {
1007
1007
  args: V,
1008
1008
  name: A[tt],
1009
- store: b,
1009
+ store: w,
1010
1010
  after: Ve,
1011
1011
  onError: ge
1012
1012
  });
1013
1013
  let Q;
1014
1014
  try {
1015
- Q = y.apply(this && this.$id === e ? this : b, V);
1015
+ Q = y.apply(this && this.$id === e ? this : w, V);
1016
1016
  } catch (F) {
1017
1017
  throw _e(ce, F), F;
1018
1018
  }
@@ -1042,7 +1042,7 @@ function ht(e, t, n = {}, r, o, s) {
1042
1042
  return A;
1043
1043
  },
1044
1044
  $dispose: P
1045
- }, b = En(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && re ? G(
1045
+ }, w = En(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && re ? G(
1046
1046
  {
1047
1047
  _hmrPayload: B,
1048
1048
  _customProperties: fe(/* @__PURE__ */ new Set())
@@ -1052,12 +1052,12 @@ function ht(e, t, n = {}, r, o, s) {
1052
1052
  // must be added later
1053
1053
  // setupStore
1054
1054
  ) : q);
1055
- r._s.set(e, b);
1055
+ r._s.set(e, w);
1056
1056
  const W = (r._a && r._a.runWithContext || Yr)(() => r._e.run(() => (i = _n()).run(() => t({ action: M }))));
1057
1057
  for (const y in W) {
1058
1058
  const v = W[y];
1059
- if (Ae(v) && !Ht(v) || bt(v))
1060
- process.env.NODE_ENV !== "production" && o ? je(S.value, y, Xe(W, y)) : s || (w && Zr(v) && (Ae(v) ? v.value = w[y] : dt(v, w[y])), r.state.value[e][y] = v), process.env.NODE_ENV !== "production" && B.state.push(y);
1059
+ if (Ae(v) && !Ht(v) || wt(v))
1060
+ process.env.NODE_ENV !== "production" && o ? je(S.value, y, Xe(W, y)) : s || (b && Zr(v) && (Ae(v) ? v.value = b[y] : dt(v, b[y])), r.state.value[e][y] = v), process.env.NODE_ENV !== "production" && B.state.push(y);
1061
1061
  else if (typeof v == "function") {
1062
1062
  const A = process.env.NODE_ENV !== "production" && o ? v : M(v, y);
1063
1063
  W[y] = A, process.env.NODE_ENV !== "production" && (B.actions[y] = v), a.actions[y] = v;
@@ -1067,7 +1067,7 @@ function ht(e, t, n = {}, r, o, s) {
1067
1067
  ) : v, re && (W._getters || // @ts-expect-error: same
1068
1068
  (W._getters = fe([]))).push(y));
1069
1069
  }
1070
- if (G(b, W), G(Ce(b), W), Object.defineProperty(b, "$state", {
1070
+ if (G(w, W), G(Ce(w), W), Object.defineProperty(w, "$state", {
1071
1071
  get: () => process.env.NODE_ENV !== "production" && o ? S.value : r.state.value[e],
1072
1072
  set: (y) => {
1073
1073
  if (process.env.NODE_ENV !== "production" && o)
@@ -1076,34 +1076,34 @@ function ht(e, t, n = {}, r, o, s) {
1076
1076
  G(v, y);
1077
1077
  });
1078
1078
  }
1079
- }), process.env.NODE_ENV !== "production" && (b._hotUpdate = fe((y) => {
1080
- b._hotUpdating = !0, y._hmrPayload.state.forEach((v) => {
1081
- if (v in b.$state) {
1082
- const A = y.$state[v], V = b.$state[v];
1079
+ }), process.env.NODE_ENV !== "production" && (w._hotUpdate = fe((y) => {
1080
+ w._hotUpdating = !0, y._hmrPayload.state.forEach((v) => {
1081
+ if (v in w.$state) {
1082
+ const A = y.$state[v], V = w.$state[v];
1083
1083
  typeof A == "object" && me(A) && me(V) ? Dn(A, V) : y.$state[v] = V;
1084
1084
  }
1085
- je(b, v, Xe(y.$state, v));
1086
- }), Object.keys(b.$state).forEach((v) => {
1087
- v in y.$state || et(b, v);
1085
+ je(w, v, Xe(y.$state, v));
1086
+ }), Object.keys(w.$state).forEach((v) => {
1087
+ v in y.$state || et(w, v);
1088
1088
  }), l = !1, f = !1, r.state.value[e] = Xe(y._hmrPayload, "hotState"), f = !0, ct().then(() => {
1089
1089
  l = !0;
1090
1090
  });
1091
1091
  for (const v in y._hmrPayload.actions) {
1092
1092
  const A = y[v];
1093
- je(b, v, M(A, v));
1093
+ je(w, v, M(A, v));
1094
1094
  }
1095
1095
  for (const v in y._hmrPayload.getters) {
1096
1096
  const A = y._hmrPayload.getters[v], V = s ? (
1097
1097
  // special handling of options api
1098
- z(() => (Te(r), A.call(b, b)))
1098
+ z(() => (Te(r), A.call(w, w)))
1099
1099
  ) : A;
1100
- je(b, v, V);
1100
+ je(w, v, V);
1101
1101
  }
1102
- Object.keys(b._hmrPayload.getters).forEach((v) => {
1103
- v in y._hmrPayload.getters || et(b, v);
1104
- }), Object.keys(b._hmrPayload.actions).forEach((v) => {
1105
- v in y._hmrPayload.actions || et(b, v);
1106
- }), b._hmrPayload = y._hmrPayload, b._getters = y._getters, b._hotUpdating = !1;
1102
+ Object.keys(w._hmrPayload.getters).forEach((v) => {
1103
+ v in y._hmrPayload.getters || et(w, v);
1104
+ }), Object.keys(w._hmrPayload.actions).forEach((v) => {
1105
+ v in y._hmrPayload.actions || et(w, v);
1106
+ }), w._hmrPayload = y._hmrPayload, w._getters = y._getters, w._hotUpdating = !1;
1107
1107
  })), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && re) {
1108
1108
  const y = {
1109
1109
  writable: !0,
@@ -1112,28 +1112,28 @@ function ht(e, t, n = {}, r, o, s) {
1112
1112
  enumerable: !1
1113
1113
  };
1114
1114
  ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((v) => {
1115
- Object.defineProperty(b, v, G({ value: b[v] }, y));
1115
+ Object.defineProperty(w, v, G({ value: w[v] }, y));
1116
1116
  });
1117
1117
  }
1118
1118
  return r._p.forEach((y) => {
1119
1119
  if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && re) {
1120
1120
  const v = i.run(() => y({
1121
- store: b,
1121
+ store: w,
1122
1122
  app: r._a,
1123
1123
  pinia: r,
1124
1124
  options: a
1125
1125
  }));
1126
- Object.keys(v || {}).forEach((A) => b._customProperties.add(A)), G(b, v);
1126
+ Object.keys(v || {}).forEach((A) => w._customProperties.add(A)), G(w, v);
1127
1127
  } else
1128
- G(b, i.run(() => y({
1129
- store: b,
1128
+ G(w, i.run(() => y({
1129
+ store: w,
1130
1130
  app: r._a,
1131
1131
  pinia: r,
1132
1132
  options: a
1133
1133
  })));
1134
- }), process.env.NODE_ENV !== "production" && b.$state && typeof b.$state == "object" && typeof b.$state.constructor == "function" && !b.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
1134
+ }), process.env.NODE_ENV !== "production" && w.$state && typeof w.$state == "object" && typeof w.$state.constructor == "function" && !w.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
1135
1135
  state: () => new MyClass()
1136
- Found in store "${b.$id}".`), w && s && n.hydrate && n.hydrate(b.$state, w), l = !0, f = !0, b;
1136
+ Found in store "${w.$id}".`), b && s && n.hydrate && n.hydrate(w.$state, b), l = !0, f = !0, w;
1137
1137
  }
1138
1138
  /*! #__NO_SIDE_EFFECTS__ */
1139
1139
  // @__NO_SIDE_EFFECTS__
@@ -1156,7 +1156,7 @@ This will fail in production.`);
1156
1156
  c._hotUpdate(d), delete a.state.value[u], a._s.delete(u);
1157
1157
  }
1158
1158
  if (process.env.NODE_ENV !== "production" && re) {
1159
- const u = wt();
1159
+ const u = bt();
1160
1160
  if (u && u.proxy && // avoid adding stores that are just built for hot module replacement
1161
1161
  !c) {
1162
1162
  const d = u.proxy, p = "_pStores" in d ? d._pStores : d._pStores = {};
@@ -1173,8 +1173,14 @@ const to = /* @__PURE__ */ eo("data", () => {
1173
1173
  });
1174
1174
  function Mi(e) {
1175
1175
  e || (e = pe("$registry"));
1176
- const t = to(), n = se(new lt(e, t)), r = se(!1);
1177
- return br(async () => {
1176
+ let t;
1177
+ try {
1178
+ t = to();
1179
+ } catch {
1180
+ throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable");
1181
+ }
1182
+ const n = se(new lt(e, t)), r = se(!1);
1183
+ return wr(async () => {
1178
1184
  var c, l;
1179
1185
  const o = e.router.currentRoute.value, s = (c = o.params.records) == null ? void 0 : c.toString().toLowerCase(), i = (l = o.params.record) == null ? void 0 : l.toString().toLowerCase();
1180
1186
  if (!s && !i)
@@ -1282,7 +1288,7 @@ function rt(e, t, n = "/") {
1282
1288
  let r, o = {}, s = "", i = "";
1283
1289
  const a = t.indexOf("#");
1284
1290
  let c = t.indexOf("?");
1285
- return a < c && a >= 0 && (c = -1), c > -1 && (r = t.slice(0, c), s = t.slice(c + 1, a > -1 ? a : t.length), o = e(s)), a > -1 && (r = r || t.slice(0, a), i = t.slice(a, t.length)), r = wo(r ?? t, n), {
1291
+ return a < c && a >= 0 && (c = -1), c > -1 && (r = t.slice(0, c), s = t.slice(c + 1, a > -1 ? a : t.length), o = e(s)), a > -1 && (r = r || t.slice(0, a), i = t.slice(a, t.length)), r = bo(r ?? t, n), {
1286
1292
  fullPath: r + (s && "?") + s + i,
1287
1293
  path: r,
1288
1294
  query: o,
@@ -1317,7 +1323,7 @@ function Eo(e, t) {
1317
1323
  function qt(e, t) {
1318
1324
  return H(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
1319
1325
  }
1320
- function wo(e, t) {
1326
+ function bo(e, t) {
1321
1327
  if (e.startsWith("/"))
1322
1328
  return e;
1323
1329
  if (process.env.NODE_ENV !== "production" && !t.startsWith("/"))
@@ -1355,7 +1361,7 @@ var Ie;
1355
1361
  (function(e) {
1356
1362
  e.back = "back", e.forward = "forward", e.unknown = "";
1357
1363
  })(Ie || (Ie = {}));
1358
- function bo(e) {
1364
+ function wo(e) {
1359
1365
  if (!e)
1360
1366
  if (Z) {
1361
1367
  const t = document.querySelector("base");
@@ -1428,10 +1434,10 @@ function Hn(e, t) {
1428
1434
  function Io(e, t, n, r) {
1429
1435
  let o = [], s = [], i = null;
1430
1436
  const a = ({ state: d }) => {
1431
- const p = Hn(e, location), w = n.value, S = t.value;
1437
+ const p = Hn(e, location), b = n.value, S = t.value;
1432
1438
  let E = 0;
1433
1439
  if (d) {
1434
- if (n.value = p, t.value = d, i && i === w) {
1440
+ if (n.value = p, t.value = d, i && i === b) {
1435
1441
  i = null;
1436
1442
  return;
1437
1443
  }
@@ -1439,7 +1445,7 @@ function Io(e, t, n, r) {
1439
1445
  } else
1440
1446
  r(p);
1441
1447
  o.forEach((R) => {
1442
- R(n.value, w, {
1448
+ R(n.value, b, {
1443
1449
  delta: E,
1444
1450
  type: De.pop,
1445
1451
  direction: E ? E > 0 ? Ie.forward : Ie.back : Ie.unknown
@@ -1452,8 +1458,8 @@ function Io(e, t, n, r) {
1452
1458
  function l(d) {
1453
1459
  o.push(d);
1454
1460
  const p = () => {
1455
- const w = o.indexOf(d);
1456
- w > -1 && o.splice(w, 1);
1461
+ const b = o.indexOf(d);
1462
+ b > -1 && o.splice(b, 1);
1457
1463
  };
1458
1464
  return s.push(p), p;
1459
1465
  }
@@ -1546,7 +1552,7 @@ You can find more information at https://router.vuejs.org/guide/migration/#Usage
1546
1552
  };
1547
1553
  }
1548
1554
  function Ao(e) {
1549
- e = bo(e);
1555
+ e = wo(e);
1550
1556
  const t = Co(e), n = Io(e, t.state, t.location, t.replace);
1551
1557
  function r(s, i = !0) {
1552
1558
  i || n.pauseListeners(), history.go(s);
@@ -1642,9 +1648,9 @@ function jo(e, t) {
1642
1648
  if (d.type === 0)
1643
1649
  u || (o += "/"), o += d.value.replace(xo, "\\$&"), p += 40;
1644
1650
  else if (d.type === 1) {
1645
- const { value: w, repeatable: S, optional: E, regexp: R } = d;
1651
+ const { value: b, repeatable: S, optional: E, regexp: R } = d;
1646
1652
  s.push({
1647
- name: w,
1653
+ name: b,
1648
1654
  repeatable: S,
1649
1655
  optional: E
1650
1656
  });
@@ -1654,7 +1660,7 @@ function jo(e, t) {
1654
1660
  try {
1655
1661
  new RegExp(`(${k})`);
1656
1662
  } catch (M) {
1657
- throw new Error(`Invalid custom RegExp for param "${w}" (${k}): ` + M.message);
1663
+ throw new Error(`Invalid custom RegExp for param "${b}" (${k}): ` + M.message);
1658
1664
  }
1659
1665
  }
1660
1666
  let P = S ? `((?:${k})(?:/(?:${k}))*)` : `(${k})`;
@@ -1677,8 +1683,8 @@ function jo(e, t) {
1677
1683
  if (!f)
1678
1684
  return null;
1679
1685
  for (let d = 1; d < f.length; d++) {
1680
- const p = f[d] || "", w = s[d - 1];
1681
- u[w.name] = p && w.repeatable ? p.split("/") : p;
1686
+ const p = f[d] || "", b = s[d - 1];
1687
+ u[b.name] = p && b.repeatable ? p.split("/") : p;
1682
1688
  }
1683
1689
  return u;
1684
1690
  }
@@ -1690,15 +1696,15 @@ function jo(e, t) {
1690
1696
  if (p.type === 0)
1691
1697
  f += p.value;
1692
1698
  else if (p.type === 1) {
1693
- const { value: w, repeatable: S, optional: E } = p, R = w in l ? l[w] : "";
1699
+ const { value: b, repeatable: S, optional: E } = p, R = b in l ? l[b] : "";
1694
1700
  if (H(R) && !S)
1695
- throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);
1701
+ throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);
1696
1702
  const k = H(R) ? R.join("/") : R;
1697
1703
  if (!k)
1698
1704
  if (E)
1699
1705
  d.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : u = !0);
1700
1706
  else
1701
- throw new Error(`Missing required param "${w}"`);
1707
+ throw new Error(`Missing required param "${b}"`);
1702
1708
  f += k;
1703
1709
  }
1704
1710
  }
@@ -1830,7 +1836,7 @@ function Wo(e, t) {
1830
1836
  return r.get(u);
1831
1837
  }
1832
1838
  function s(u, d, p) {
1833
- const w = !p, S = en(u);
1839
+ const b = !p, S = en(u);
1834
1840
  process.env.NODE_ENV !== "production" && Jo(S, d), S.aliasOf = p && p.record;
1835
1841
  const E = nn(t, u), R = [S];
1836
1842
  if ("alias" in u) {
@@ -1855,16 +1861,16 @@ function Wo(e, t) {
1855
1861
  for (const M of R) {
1856
1862
  const { path: B } = M;
1857
1863
  if (d && B[0] !== "/") {
1858
- const q = d.record.path, b = q[q.length - 1] === "/" ? "" : "/";
1859
- M.path = d.record.path + (B && b + B);
1864
+ const q = d.record.path, w = q[q.length - 1] === "/" ? "" : "/";
1865
+ M.path = d.record.path + (B && w + B);
1860
1866
  }
1861
1867
  if (process.env.NODE_ENV !== "production" && M.path === "*")
1862
1868
  throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
1863
1869
  See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
1864
- if (k = Ho(M, d, E), process.env.NODE_ENV !== "production" && d && B[0] === "/" && Qo(k, d), p ? (p.alias.push(k), process.env.NODE_ENV !== "production" && qo(p, k)) : (P = P || k, P !== k && P.alias.push(k), w && u.name && !tn(k) && (process.env.NODE_ENV !== "production" && Ko(u, d), i(u.name))), zn(k) && c(k), S.children) {
1870
+ if (k = Ho(M, d, E), process.env.NODE_ENV !== "production" && d && B[0] === "/" && Qo(k, d), p ? (p.alias.push(k), process.env.NODE_ENV !== "production" && qo(p, k)) : (P = P || k, P !== k && P.alias.push(k), b && u.name && !tn(k) && (process.env.NODE_ENV !== "production" && Ko(u, d), i(u.name))), zn(k) && c(k), S.children) {
1865
1871
  const q = S.children;
1866
- for (let b = 0; b < q.length; b++)
1867
- s(q[b], k, p && p.children[b]);
1872
+ for (let w = 0; w < q.length; w++)
1873
+ s(q[w], k, p && p.children[w]);
1868
1874
  }
1869
1875
  p = p || k;
1870
1876
  }
@@ -1889,7 +1895,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
1889
1895
  n.splice(d, 0, u), u.record.name && !tn(u) && r.set(u.record.name, u);
1890
1896
  }
1891
1897
  function l(u, d) {
1892
- let p, w = {}, S, E;
1898
+ let p, b = {}, S, E;
1893
1899
  if ("name" in u && u.name) {
1894
1900
  if (p = r.get(u.name), !p)
1895
1901
  throw Ne(1, {
@@ -1899,7 +1905,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
1899
1905
  const P = Object.keys(u.params || {}).filter((M) => !p.keys.find((B) => B.name === M));
1900
1906
  P.length && O(`Discarded invalid param(s) "${P.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
1901
1907
  }
1902
- E = p.record.name, w = I(
1908
+ E = p.record.name, b = I(
1903
1909
  // paramsFromLocation is a new object
1904
1910
  Zt(
1905
1911
  d.params,
@@ -1910,16 +1916,16 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
1910
1916
  // discard any existing params in the current location that do not exist here
1911
1917
  // #1497 this ensures better active/exact matching
1912
1918
  u.params && Zt(u.params, p.keys.map((P) => P.name))
1913
- ), S = p.stringify(w);
1919
+ ), S = p.stringify(b);
1914
1920
  } else if (u.path != null)
1915
- S = u.path, process.env.NODE_ENV !== "production" && !S.startsWith("/") && O(`The Matcher cannot resolve relative paths but received "${S}". Unless you directly called \`matcher.resolve("${S}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), p = n.find((P) => P.re.test(S)), p && (w = p.parse(S), E = p.record.name);
1921
+ S = u.path, process.env.NODE_ENV !== "production" && !S.startsWith("/") && O(`The Matcher cannot resolve relative paths but received "${S}". Unless you directly called \`matcher.resolve("${S}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), p = n.find((P) => P.re.test(S)), p && (b = p.parse(S), E = p.record.name);
1916
1922
  else {
1917
1923
  if (p = d.name ? r.get(d.name) : n.find((P) => P.re.test(d.path)), !p)
1918
1924
  throw Ne(1, {
1919
1925
  location: u,
1920
1926
  currentLocation: d
1921
1927
  });
1922
- E = p.record.name, w = I({}, d.params, u.params), S = p.stringify(w);
1928
+ E = p.record.name, b = I({}, d.params, u.params), S = p.stringify(b);
1923
1929
  }
1924
1930
  const R = [];
1925
1931
  let k = p;
@@ -1928,7 +1934,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
1928
1934
  return {
1929
1935
  name: E,
1930
1936
  path: S,
1931
- params: w,
1937
+ params: b,
1932
1938
  matched: R,
1933
1939
  meta: zo(R)
1934
1940
  };
@@ -2182,9 +2188,9 @@ function sn(e) {
2182
2188
  const { matched: f } = s.value, { length: u } = f, d = f[u - 1], p = n.matched;
2183
2189
  if (!d || !p.length)
2184
2190
  return -1;
2185
- const w = p.findIndex(ie.bind(null, d));
2186
- if (w > -1)
2187
- return w;
2191
+ const b = p.findIndex(ie.bind(null, d));
2192
+ if (b > -1)
2193
+ return b;
2188
2194
  const S = an(f[u - 2]);
2189
2195
  return (
2190
2196
  // we are dealing with nested routes
@@ -2192,7 +2198,7 @@ function sn(e) {
2192
2198
  // referring to the empty child. Or we currently are on a different
2193
2199
  // child of the same parent
2194
2200
  an(d) === S && // avoid comparing the child with its parent
2195
- p[p.length - 1].path !== S ? p.findIndex(ie.bind(null, f[u - 2])) : w
2201
+ p[p.length - 1].path !== S ? p.findIndex(ie.bind(null, f[u - 2])) : b
2196
2202
  );
2197
2203
  }), a = z(() => i.value > -1 && as(n.params, s.value.params)), c = z(() => i.value > -1 && i.value === n.matched.length - 1 && Fn(n.params, s.value.params));
2198
2204
  function l(f = {}) {
@@ -2206,7 +2212,7 @@ function sn(e) {
2206
2212
  return Promise.resolve();
2207
2213
  }
2208
2214
  if (process.env.NODE_ENV !== "production" && Z) {
2209
- const f = wt();
2215
+ const f = bt();
2210
2216
  if (f) {
2211
2217
  const u = {
2212
2218
  route: s.value,
@@ -2230,7 +2236,7 @@ function sn(e) {
2230
2236
  function rs(e) {
2231
2237
  return e.length === 1 ? e[0] : e;
2232
2238
  }
2233
- const os = /* @__PURE__ */ wn({
2239
+ const os = /* @__PURE__ */ bn({
2234
2240
  name: "RouterLink",
2235
2241
  compatConfig: { MODE: 3 },
2236
2242
  props: {
@@ -2261,7 +2267,7 @@ const os = /* @__PURE__ */ wn({
2261
2267
  }));
2262
2268
  return () => {
2263
2269
  const s = t.default && rs(t.default(n));
2264
- return e.custom ? s : bn("a", {
2270
+ return e.custom ? s : wn("a", {
2265
2271
  "aria-current": n.isExactActive ? e.ariaCurrentValue : null,
2266
2272
  href: n.href,
2267
2273
  // this would override user added attrs but Vue will still add
@@ -2296,7 +2302,7 @@ function as(e, t) {
2296
2302
  function an(e) {
2297
2303
  return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
2298
2304
  }
2299
- const cn = (e, t, n) => e ?? t ?? n, cs = /* @__PURE__ */ wn({
2305
+ const cn = (e, t, n) => e ?? t ?? n, cs = /* @__PURE__ */ bn({
2300
2306
  name: "RouterView",
2301
2307
  // #674 we manually inherit them
2302
2308
  inheritAttrs: !1,
@@ -2322,7 +2328,7 @@ const cn = (e, t, n) => e ?? t ?? n, cs = /* @__PURE__ */ wn({
2322
2328
  }), a = z(() => o.value.matched[i.value]);
2323
2329
  Ze(on, z(() => i.value + 1)), Ze(ts, a), Ze(_t, o);
2324
2330
  const c = se();
2325
- return Me(() => [c.value, a.value, e.name], ([l, f, u], [d, p, w]) => {
2331
+ return Me(() => [c.value, a.value, e.name], ([l, f, u], [d, p, b]) => {
2326
2332
  f && (f.instances[u] = l, p && p !== f && l && l === d && (f.leaveGuards.size || (f.leaveGuards = p.leaveGuards), f.updateGuards.size || (f.updateGuards = p.updateGuards))), l && f && // if there is no instance but to and from are the same this might be
2327
2333
  // the first visit
2328
2334
  (!p || !ie(f, p) || !d) && (f.enterCallbacks[u] || []).forEach((S) => S(l));
@@ -2330,7 +2336,7 @@ const cn = (e, t, n) => e ?? t ?? n, cs = /* @__PURE__ */ wn({
2330
2336
  const l = o.value, f = e.name, u = a.value, d = u && u.components[f];
2331
2337
  if (!d)
2332
2338
  return un(n.default, { Component: d, route: l });
2333
- const p = u.props[f], w = p ? p === !0 ? l.params : typeof p == "function" ? p(l) : p : null, E = bn(d, I({}, w, t, {
2339
+ const p = u.props[f], b = p ? p === !0 ? l.params : typeof p == "function" ? p(l) : p : null, E = wn(d, I({}, b, t, {
2334
2340
  onVnodeUnmounted: (R) => {
2335
2341
  R.component.isUnmounted && (u.instances[f] = null);
2336
2342
  },
@@ -2363,7 +2369,7 @@ function un(e, t) {
2363
2369
  }
2364
2370
  const us = cs;
2365
2371
  function ls() {
2366
- const e = wt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
2372
+ const e = bt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
2367
2373
  if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
2368
2374
  const r = t === "KeepAlive" ? "keep-alive" : "transition";
2369
2375
  O(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
@@ -2379,7 +2385,7 @@ Use slot props instead:
2379
2385
  function Pe(e, t) {
2380
2386
  const n = I({}, e, {
2381
2387
  // remove variables that can contain vue instances
2382
- matched: e.matched.map((r) => ws(r, ["instances", "children", "aliasOf"]))
2388
+ matched: e.matched.map((r) => bs(r, ["instances", "children", "aliasOf"]))
2383
2389
  });
2384
2390
  return {
2385
2391
  _custom: {
@@ -2431,12 +2437,12 @@ function ds(e, t, n) {
2431
2437
  });
2432
2438
  }
2433
2439
  H(u.__vrl_devtools) && (u.__devtoolsApi = o, u.__vrl_devtools.forEach((d) => {
2434
- let p = d.route.path, w = Yn, S = "", E = 0;
2435
- d.error ? (p = d.error, w = vs, E = ys) : d.isExactActive ? (w = Qn, S = "This is exactly active") : d.isActive && (w = Kn, S = "This link is active"), f.tags.push({
2440
+ let p = d.route.path, b = Yn, S = "", E = 0;
2441
+ d.error ? (p = d.error, b = vs, E = ys) : d.isExactActive ? (b = Qn, S = "This is exactly active") : d.isActive && (b = Kn, S = "This link is active"), f.tags.push({
2436
2442
  label: p,
2437
2443
  textColor: E,
2438
2444
  tooltip: S,
2439
- backgroundColor: w
2445
+ backgroundColor: b
2440
2446
  });
2441
2447
  }));
2442
2448
  }), Me(t.currentRoute, () => {
@@ -2638,13 +2644,13 @@ function Et(e, t) {
2638
2644
  const o = e.record.path.toLowerCase(), s = Oe(o);
2639
2645
  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) => Et(i, t));
2640
2646
  }
2641
- function ws(e, t) {
2647
+ function bs(e, t) {
2642
2648
  const n = {};
2643
2649
  for (const r in e)
2644
2650
  t.includes(r) || (n[r] = e[r]);
2645
2651
  return n;
2646
2652
  }
2647
- function bs(e) {
2653
+ function ws(e) {
2648
2654
  const t = Wo(e.routes, e), n = e.parseQuery || Zo, r = e.stringifyQuery || rn, o = e.history;
2649
2655
  if (process.env.NODE_ENV !== "production" && !o)
2650
2656
  throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
@@ -2659,7 +2665,7 @@ function bs(e) {
2659
2665
  let m, _;
2660
2666
  return Wn(h) ? (m = t.getRecordMatcher(h), process.env.NODE_ENV !== "production" && !m && O(`Parent route "${String(h)}" not found when adding child route`, g), _ = g) : _ = h, t.addRoute(_, m);
2661
2667
  }
2662
- function w(h) {
2668
+ function b(h) {
2663
2669
  const g = t.getRecordMatcher(h);
2664
2670
  g ? t.removeRoute(g) : process.env.NODE_ENV !== "production" && O(`Cannot remove non-existent route "${String(h)}"`);
2665
2671
  }
@@ -2731,7 +2737,7 @@ function bs(e) {
2731
2737
  });
2732
2738
  }
2733
2739
  function M(h) {
2734
- return b(h);
2740
+ return w(h);
2735
2741
  }
2736
2742
  function B(h) {
2737
2743
  return M(I(k(h), { replace: !0 }));
@@ -2756,10 +2762,10 @@ ${JSON.stringify(_, null, 2)}
2756
2762
  }, _);
2757
2763
  }
2758
2764
  }
2759
- function b(h, g) {
2765
+ function w(h, g) {
2760
2766
  const m = l = R(h), _ = c.value, C = h.state, D = h.force, $ = h.replace === !0, N = q(m);
2761
2767
  if (N)
2762
- return b(
2768
+ return w(
2763
2769
  I(k(N), {
2764
2770
  state: typeof N == "object" ? I({}, C, N.state) : C,
2765
2771
  force: D,
@@ -2804,7 +2810,7 @@ ${JSON.stringify(_, null, 2)}
2804
2810
  // @ts-expect-error
2805
2811
  g._count + 1
2806
2812
  ) : 1) > 30 ? (O(`Detected a possibly infinite redirection in a navigation guard when going from "${_.fullPath}" to "${T.fullPath}". Aborting to avoid a Stack Overflow.
2807
- 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"))) : b(
2813
+ 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"))) : w(
2808
2814
  // keep options
2809
2815
  I({
2810
2816
  // preserve an existing replacement but allow the redirect to override it
@@ -2890,7 +2896,7 @@ ${JSON.stringify(_, null, 2)}
2890
2896
  return;
2891
2897
  const _ = R(h), C = q(_);
2892
2898
  if (C) {
2893
- b(I(C, { replace: !0, force: !0 }), _).catch(Re);
2899
+ w(I(C, { replace: !0, force: !0 }), _).catch(Re);
2894
2900
  return;
2895
2901
  }
2896
2902
  l = _;
@@ -2903,7 +2909,7 @@ ${JSON.stringify(_, null, 2)}
2903
2909
  $,
2904
2910
  2
2905
2911
  /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
2906
- ) ? (b(
2912
+ ) ? (w(
2907
2913
  I(k($.to), {
2908
2914
  force: !0
2909
2915
  }),
@@ -2962,7 +2968,7 @@ ${JSON.stringify(_, null, 2)}
2962
2968
  currentRoute: c,
2963
2969
  listening: !0,
2964
2970
  addRoute: p,
2965
- removeRoute: w,
2971
+ removeRoute: b,
2966
2972
  clearRoutes: t.clearRoutes,
2967
2973
  hasRoute: E,
2968
2974
  getRoutes: S,
@@ -3016,7 +3022,7 @@ function Ss(e, t) {
3016
3022
  }
3017
3023
  return [n, r, o];
3018
3024
  }
3019
- const Os = bs({
3025
+ const Os = ws({
3020
3026
  history: Ao(),
3021
3027
  routes: []
3022
3028
  });
@@ -3469,11 +3475,11 @@ function Ei(e) {
3469
3475
  return o.type;
3470
3476
  })));
3471
3477
  }
3472
- var lr = /* @__PURE__ */ new Set(), wi = 0, At = function(t, n) {
3473
- this.id = wi++, lr.add(this), this.name = t, dn && (n = dn), this.options = Rt(n), this.method = Ei(this.options), this._iL = !1, this._onML = null, this._addEL = {
3478
+ var lr = /* @__PURE__ */ new Set(), bi = 0, At = function(t, n) {
3479
+ this.id = bi++, lr.add(this), this.name = t, dn && (n = dn), this.options = Rt(n), this.method = Ei(this.options), this._iL = !1, this._onML = null, this._addEL = {
3474
3480
  message: [],
3475
3481
  internal: []
3476
- }, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, bi(this);
3482
+ }, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, wi(this);
3477
3483
  };
3478
3484
  At._pubkey = !0;
3479
3485
  var dn;
@@ -3547,7 +3553,7 @@ function hn(e, t, n) {
3547
3553
  }), i;
3548
3554
  });
3549
3555
  }
3550
- function bi(e) {
3556
+ function wi(e) {
3551
3557
  var t = e.method.create(e.name, e.options);
3552
3558
  Ns(t) ? (e._prepP = t, t.then(function(n) {
3553
3559
  e._state = n;
@@ -3633,7 +3639,7 @@ function $i(e) {
3633
3639
  return e < " " ? `\\u${e.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
3634
3640
  }
3635
3641
  }
3636
- function we(e) {
3642
+ function be(e) {
3637
3643
  let t = "", n = 0;
3638
3644
  const r = e.length;
3639
3645
  for (let o = 0; o < r; o += 1) {
@@ -3740,9 +3746,9 @@ function yn(e, t) {
3740
3746
  const f = i++;
3741
3747
  r.set(l, f);
3742
3748
  for (const { key: d, fn: p } of o) {
3743
- const w = p(l);
3744
- if (w)
3745
- return n[f] = `["${d}",${a(w)}]`, f;
3749
+ const b = p(l);
3750
+ if (b)
3751
+ return n[f] = `["${d}",${a(b)}]`, f;
3746
3752
  }
3747
3753
  let u = "";
3748
3754
  if (gn(l))
@@ -3761,8 +3767,8 @@ function yn(e, t) {
3761
3767
  u = `["Date","${!isNaN(l.getDate()) ? l.toISOString() : ""}"]`;
3762
3768
  break;
3763
3769
  case "RegExp":
3764
- const { source: w, flags: S } = l;
3765
- u = S ? `["RegExp",${we(w)},"${S}"]` : `["RegExp",${we(w)}]`;
3770
+ const { source: b, flags: S } = l;
3771
+ u = S ? `["RegExp",${be(b)},"${S}"]` : `["RegExp",${be(b)}]`;
3766
3772
  break;
3767
3773
  case "Array":
3768
3774
  u = "[";
@@ -3798,13 +3804,13 @@ function yn(e, t) {
3798
3804
  if (Object.getPrototypeOf(l) === null) {
3799
3805
  u = '["null"';
3800
3806
  for (const E in l)
3801
- s.push(`.${E}`), u += `,${we(E)},${a(l[E])}`, s.pop();
3807
+ s.push(`.${E}`), u += `,${be(E)},${a(l[E])}`, s.pop();
3802
3808
  u += "]";
3803
3809
  } else {
3804
3810
  u = "{";
3805
3811
  let E = !1;
3806
3812
  for (const R in l)
3807
- E && (u += ","), E = !0, s.push(`.${R}`), u += `${we(R)}:${a(l[R])}`, s.pop();
3813
+ E && (u += ","), E = !0, s.push(`.${R}`), u += `${be(R)}:${a(l[R])}`, s.pop();
3808
3814
  u += "}";
3809
3815
  }
3810
3816
  }
@@ -3815,7 +3821,7 @@ function yn(e, t) {
3815
3821
  }
3816
3822
  function at(e) {
3817
3823
  const t = typeof e;
3818
- return t === "string" ? we(e) : e instanceof String ? we(e.toString()) : e === void 0 ? Tt.toString() : e === 0 && 1 / e < 0 ? Dt.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e);
3824
+ return t === "string" ? be(e) : e instanceof String ? be(e.toString()) : e === void 0 ? Tt.toString() : e === 0 && 1 / e < 0 ? Dt.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e);
3819
3825
  }
3820
3826
  function Ii(e, t, { initialize: n, type: r }) {
3821
3827
  let o = `${t.$id}-${e.toString()}`, s = new At(o, { type: r }), i = !1, a = 0;