@wssto2/vue-core 0.4.12 → 0.4.14

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 (43) hide show
  1. package/dist/{Activity-DdnEG7EW.js → Activity-BdSvn0GP.js} +3 -3
  2. package/dist/{Changes-CBM8york.js → Changes-BQO--N9F.js} +3 -3
  3. package/dist/{DeadLetters-DBUALYXL.js → DeadLetters-OmeiADEi.js} +3 -3
  4. package/dist/{General-Cvb-tLsE.js → General-CBwFLiKQ.js} +3 -3
  5. package/dist/{NewRolePage-Dm7urTx0.js → NewRolePage-CblUW2gA.js} +3 -3
  6. package/dist/{ProfilePage-B1-66cXB.js → ProfilePage-BOoDDbmB.js} +3 -3
  7. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CDZjkiU5.js → RoleEditor.vue_vue_type_script_setup_true_lang-BCE5yrwy.js} +1 -1
  8. package/dist/{RolePage-CQc_wV3b.js → RolePage-xDsFL_eC.js} +4 -4
  9. package/dist/{RolesPage-CG7InZ_u.js → RolesPage-C39wsF6X.js} +2 -2
  10. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-ROl9_pdO.js → SectionNavigator.vue_vue_type_script_setup_true_lang-D5Cnb4_O.js} +102 -102
  11. package/dist/{Sessions-CIVLL9X4.js → Sessions-m_i4aTfw.js} +3 -3
  12. package/dist/{SettingsPage-BNdeH-_0.js → SettingsPage-ktKvQQnE.js} +3 -3
  13. package/dist/{SignIn-B8FbIWMH.js → SignIn-CkoEixY4.js} +3 -3
  14. package/dist/{SignInPage-DIo9fK1d.js → SignInPage-DVcpFz3G.js} +1 -1
  15. package/dist/{SignIns-nH3zghoi.js → SignIns-BnVAtncZ.js} +3 -3
  16. package/dist/{UserRecord-DVm0mIrA.js → UserRecord-Cg69_mbU.js} +7 -7
  17. package/dist/{UsersList-C3cNr0MI.js → UsersList-BFmBDGs7.js} +3 -3
  18. package/dist/access/index.js +1 -1
  19. package/dist/app/application.d.ts +7 -0
  20. package/dist/app/index.js +143 -142
  21. package/dist/{describeError-Ctga6GcS.js → describeError-CvGmajU0.js} +20 -13
  22. package/dist/{fieldMessages-C3Rpbktw.js → fieldMessages-D_dpSe19.js} +1 -1
  23. package/dist/i18n/describeError.d.ts +11 -1
  24. package/dist/i18n/index.d.ts +2 -2
  25. package/dist/i18n/index.js +7 -6
  26. package/dist/identity/index.js +1 -1
  27. package/dist/{index-Cz4LtYKa.js → index-B416VXmR.js} +2 -2
  28. package/dist/{index-BesWsiIg.js → index-KcCoCfr-.js} +5 -5
  29. package/dist/{index-CM_Uh_xF.js → index-RNF5-9uf.js} +12 -12
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/notifications/index.js +1 -1
  33. package/dist/page/SectionNavigator.vue.d.ts +5 -4
  34. package/dist/page/index.js +1 -1
  35. package/dist/resource/index.js +1 -1
  36. package/dist/resource/resource.d.ts +1 -1
  37. package/dist/{routeResource-DstM0hvf.js → routeResource-BwEFXzIX.js} +36 -32
  38. package/dist/state/index.js +1 -1
  39. package/dist/state/useLoad.d.ts +7 -0
  40. package/dist/{status-cZWwrYGN.js → status-OZUHZpWl.js} +1 -1
  41. package/dist/useLoad-DuEsLECT.js +43 -0
  42. package/package.json +1 -1
  43. package/dist/useLoad-CYRVx6HW.js +0 -39
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as g, ref as m, watch as p, openBlock as c, createElementBlock as v, createVNode as i, unref as e, withCtx as w, createBlock as x, createCommentVNode as y, createElementVNode as V, toDisplayString as $ } from "vue";
2
2
  import { useI18n as N } from "vue-i18n";
3
- import { P as S, i as b } from "./index-CM_Uh_xF.js";
3
+ import { P as S, i as b } from "./index-RNF5-9uf.js";
4
4
  import { u as k } from "./platform-q3cjODLx.js";
5
- import { b as I } from "./routeResource-DstM0hvf.js";
5
+ import { b as I } from "./routeResource-BwEFXzIX.js";
6
6
  import { _ as R } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
7
- import { u as C } from "./useLoad-CYRVx6HW.js";
7
+ import { u as C } from "./useLoad-DuEsLECT.js";
8
8
  import { _ as E } from "./PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js";
9
9
  import { _ as B } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
10
10
  import { _ as P } from "./SignInTable.vue_vue_type_script_setup_true_lang-CIv34nRn.js";
@@ -2,23 +2,23 @@ import { defineComponent as R, openBlock as q, createBlock as P, unref as e, wit
2
2
  import { useI18n as A } from "vue-i18n";
3
3
  import { a as F } from "./neighbors-DVN_cADL.js";
4
4
  import { _ as H } from "./Avatar.vue_vue_type_script_setup_true_lang-CFIheaSr.js";
5
- import { u as J } from "./describeError-Ctga6GcS.js";
6
- import { i as w, P as Q, p as W, f as X, M as Y, g as Z, d as ee } from "./index-CM_Uh_xF.js";
5
+ import { u as J } from "./describeError-CvGmajU0.js";
6
+ import { i as w, P as Q, p as W, f as X, M as Y, g as Z, d as ee } from "./index-RNF5-9uf.js";
7
7
  import { _ as se } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
8
8
  import { t as k } from "./toast-CqSDTWRX.js";
9
- import { _ as ae } from "./SectionNavigator.vue_vue_type_script_setup_true_lang-ROl9_pdO.js";
9
+ import { _ as ae } from "./SectionNavigator.vue_vue_type_script_setup_true_lang-D5Cnb4_O.js";
10
10
  import { u as E } from "./platform-q3cjODLx.js";
11
- import { a as te } from "./routeResource-DstM0hvf.js";
11
+ import { a as te } from "./routeResource-BwEFXzIX.js";
12
12
  import { a as oe } from "./ResourcePage.vue_vue_type_script_setup_true_lang-Da0M-hen.js";
13
13
  import { A as re } from "./access-DmAceEo5.js";
14
14
  import { _ as ne } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
15
- import { u as ie } from "./useLoad-CYRVx6HW.js";
15
+ import { u as ie } from "./useLoad-DuEsLECT.js";
16
16
  import { _ as V } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
17
17
  import { _ as T } from "./FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js";
18
18
  import { e as B } from "./control-7EP4tjYy.js";
19
19
  import { u as z, _ as K } from "./useCommand-BkONMn3X.js";
20
- import { u as U } from "./fieldMessages-C3Rpbktw.js";
21
- import { u as ce, s as le } from "./status-cZWwrYGN.js";
20
+ import { u as U } from "./fieldMessages-D_dpSe19.js";
21
+ import { u as ce, s as le } from "./status-OZUHZpWl.js";
22
22
  import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js";
23
23
  const ue = /* @__PURE__ */ R({
24
24
  __name: "DeactivateDialog",
@@ -6,8 +6,8 @@ import { _ as I } from "./Avatar.vue_vue_type_script_setup_true_lang-CFIheaSr.js
6
6
  import { u as F } from "./format-B8mJm946.js";
7
7
  import { u as L } from "./platform-q3cjODLx.js";
8
8
  import { _ as G } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
9
- import { i as K, f as E, M as W } from "./index-CM_Uh_xF.js";
10
- import { U as j, u as H, s as J } from "./status-cZWwrYGN.js";
9
+ import { i as K, f as E, M as W } from "./index-RNF5-9uf.js";
10
+ import { U as j, u as H, s as J } from "./status-OZUHZpWl.js";
11
11
  import { u as O } from "./environment-Dva-SG8D.js";
12
12
  import { u as Q } from "./languages-BShG9LpE.js";
13
13
  import { _ as X } from "./FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js";
@@ -15,7 +15,7 @@ import { _ as Y } from "./SelectField.vue_vue_type_script_setup_true_lang-BJoAkB
15
15
  import { _ as d } from "./TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js";
16
16
  import { u as Z, _ as ee } from "./useCommand-BkONMn3X.js";
17
17
  import { t as se } from "./toast-CqSDTWRX.js";
18
- import { u as te } from "./fieldMessages-C3Rpbktw.js";
18
+ import { u as te } from "./fieldMessages-D_dpSe19.js";
19
19
  const oe = /* @__PURE__ */ U({
20
20
  __name: "NewUserDialog",
21
21
  emits: ["created"],
@@ -1,4 +1,4 @@
1
- import { _ as a, i as c, j as o, c as r, b as n, k as i, l as u, p as l, m as p, n as t, u as d, f as m } from "../index-BesWsiIg.js";
1
+ import { _ as a, i as c, j as o, c as r, b as n, k as i, l as u, p as l, m as p, n as t, u as d, f as m } from "../index-KcCoCfr-.js";
2
2
  export {
3
3
  a as BindingRow,
4
4
  c as PersonAccess,
@@ -7,6 +7,7 @@ import { type IconSet } from "../icon";
7
7
  import { type Platform, type SessionSnapshot } from "../platform";
8
8
  import type { NavigationCatalogue } from "../router/navigation";
9
9
  import { type ApplicationEnvironment } from "./environment";
10
+ import { type AppErrorDescriber } from "../i18n/describeError";
10
11
  import type { Feature, ShellSlot } from "./feature";
11
12
  /** A shell that says which slots it renders, so a contribution to a slot it lacks fails at startup instead of vanishing. */
12
13
  export interface ShellDefinition {
@@ -93,6 +94,12 @@ export interface ApplicationOptions {
93
94
  noAccess?: Component;
94
95
  /** Identifies a session for session effects: they restart when it changes. Default: the user's id. */
95
96
  sessionKey?: (session: SessionSnapshot) => string;
97
+ /**
98
+ * The application's own sentence for an error, asked before the library's own (`useDescribeError`, the default
99
+ * failure text of `useLoad` and `useResource`): for error types the library does not know, such as an older HTTP
100
+ * client's. Return `undefined` to leave an error to the library.
101
+ */
102
+ describeError?: AppErrorDescriber;
96
103
  /** Called with every error the application catches (component errors, unhandled rejections, failed effects and loads). Default: `console.error`. */
97
104
  onError?: (report: ApplicationErrorReport) => void;
98
105
  }
package/dist/app/index.js CHANGED
@@ -1,40 +1,41 @@
1
- var Ee = Object.defineProperty;
2
- var xe = (e, a, r) => a in e ? Ee(e, a, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[a] = r;
3
- var Z = (e, a, r) => xe(e, typeof a != "symbol" ? a + "" : a, r);
4
- import { effectScope as W, watch as B, defineComponent as fe, openBlock as Se, createElementBlock as Re, createVNode as ee, unref as K, withCtx as te, createTextVNode as Me, toDisplayString as Ae, shallowRef as je, computed as Le, h as se, createApp as Ne } from "vue";
1
+ var xe = Object.defineProperty;
2
+ var Se = (e, n, r) => n in e ? xe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[n] = r;
3
+ var Z = (e, n, r) => Se(e, typeof n != "symbol" ? n + "" : n, r);
4
+ import { effectScope as W, watch as B, defineComponent as de, openBlock as Re, createElementBlock as Me, createVNode as ee, unref as C, withCtx as te, createTextVNode as Ae, toDisplayString as je, shallowRef as Le, computed as Ne, h as se, createApp as Ke } from "vue";
5
5
  import { useI18n as Oe, createI18n as Ce } from "vue-i18n";
6
- import { createRouter as Ke, isNavigationFailure as _e } from "vue-router";
7
- import { i as Ie } from "../leaveGuard-Cc8yeLxM.js";
8
- import { c as Fe, i as Te, f as qe } from "../format-B8mJm946.js";
9
- import { coreMessages as oe, createMessageRuntime as Pe } from "../i18n/index.js";
10
- import { i as We, a as Be } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
11
- import { i as De, b as He } from "../bottomDock-BZEiOPYZ.js";
12
- import { i as Ve, p as Ge } from "../chrome-nUcmVu8G.js";
13
- import { i as Je, g as ze } from "../platform-q3cjODLx.js";
14
- import { c as Qe, A as Ue, r as re } from "../access-DmAceEo5.js";
15
- import { c as Xe, _ as Ye } from "../NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js";
16
- import { i as Ze } from "../guards-Dve61KjR.js";
17
- import { b as et, c as tt, n as ne } from "../navigation-Cm3iChlR.js";
18
- import { c as st, s as ae } from "../contributions-DsfmDoRD.js";
19
- import { S as Tt } from "../contributions-DsfmDoRD.js";
6
+ import { createRouter as _e, isNavigationFailure as Ie } from "vue-router";
7
+ import { i as Fe } from "../leaveGuard-Cc8yeLxM.js";
8
+ import { c as Te, i as qe, f as Pe } from "../format-B8mJm946.js";
9
+ import { coreMessages as oe, createMessageRuntime as We } from "../i18n/index.js";
10
+ import { i as Be, a as De } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
11
+ import { i as He, b as Ve } from "../bottomDock-BZEiOPYZ.js";
12
+ import { i as Ge, p as Je } from "../chrome-nUcmVu8G.js";
13
+ import { i as ze, g as Qe } from "../platform-q3cjODLx.js";
14
+ import { c as Ue, A as Xe, r as re } from "../access-DmAceEo5.js";
15
+ import { c as Ye, _ as Ze } from "../NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js";
16
+ import { i as et } from "../guards-Dve61KjR.js";
17
+ import { b as tt, c as st, n as ae } from "../navigation-Cm3iChlR.js";
18
+ import { c as ot, s as ne } from "../contributions-DsfmDoRD.js";
19
+ import { S as Pt } from "../contributions-DsfmDoRD.js";
20
20
  import { a as ie } from "../environment-Dva-SG8D.js";
21
- import { u as Pt } from "../environment-Dva-SG8D.js";
22
- import { _ as ot } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
23
- import { _ as rt } from "../EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js";
21
+ import { u as Bt } from "../environment-Dva-SG8D.js";
22
+ import { b as ce } from "../describeError-CvGmajU0.js";
23
+ import { _ as rt } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
24
+ import { _ as at } from "../EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js";
24
25
  import { i as nt } from "../feature-DdUAfyi4.js";
25
- import { d as Bt, p as Dt } from "../feature-DdUAfyi4.js";
26
- import { k as Vt } from "../keepAlive-CDvMQlcJ.js";
27
- function at(e) {
28
- const { platform: a } = e, r = W();
26
+ import { d as Ht, p as Vt } from "../feature-DdUAfyi4.js";
27
+ import { k as Jt } from "../keepAlive-CDvMQlcJ.js";
28
+ function it(e) {
29
+ const { platform: n } = e, r = W();
29
30
  let i = null, w = null, v = !1;
30
- function k(l, m) {
31
+ function E(l, m) {
31
32
  const h = new AbortController(), u = { controller: h, stops: [] };
32
- for (const E of l)
33
+ for (const k of l)
33
34
  try {
34
- const $ = m(E, h.signal);
35
- typeof $ == "function" && u.stops.push({ owned: E, stop: $ });
35
+ const $ = m(k, h.signal);
36
+ typeof $ == "function" && u.stops.push({ owned: k, stop: $ });
36
37
  } catch ($) {
37
- e.onError($, E);
38
+ e.onError($, k);
38
39
  }
39
40
  return u;
40
41
  }
@@ -53,20 +54,20 @@ function at(e) {
53
54
  return {
54
55
  start() {
55
56
  if (v || i) return;
56
- i = k(
57
+ i = E(
57
58
  j("app"),
58
- (m, h) => m.effect.start({ signal: h, platform: a, report: (u) => e.onError(u, m) })
59
+ (m, h) => m.effect.start({ signal: h, platform: n, report: (u) => e.onError(u, m) })
59
60
  );
60
61
  const l = j("session");
61
62
  r.run(
62
63
  () => B(
63
- () => M(a.session.state.value),
64
+ () => M(n.session.state.value),
64
65
  (m) => {
65
66
  R(w), w = null;
66
- const h = a.session.state.value;
67
- m === null || h.status !== "authenticated" || (w = k(
67
+ const h = n.session.state.value;
68
+ m === null || h.status !== "authenticated" || (w = E(
68
69
  l,
69
- (u, E) => u.effect.start({ signal: E, platform: a, user: h.user, report: ($) => e.onError($, u) })
70
+ (u, k) => u.effect.start({ signal: k, platform: n, user: h.user, report: ($) => e.onError($, u) })
70
71
  ));
71
72
  },
72
73
  { immediate: !0, flush: "sync" }
@@ -78,28 +79,28 @@ function at(e) {
78
79
  }
79
80
  };
80
81
  }
81
- const it = { class: "mx-auto flex min-h-screen max-w-content items-center justify-center p-screen-padding" }, ct = /* @__PURE__ */ fe({
82
+ const ct = { class: "mx-auto flex min-h-screen max-w-content items-center justify-center p-screen-padding" }, lt = /* @__PURE__ */ de({
82
83
  __name: "StartupFailure",
83
84
  props: {
84
85
  kind: {}
85
86
  },
86
87
  emits: ["retry"],
87
88
  setup(e) {
88
- const { t: a } = Oe();
89
- return (r, i) => (Se(), Re("div", it, [
90
- ee(K(rt), {
91
- title: K(a)("core.startup.title"),
92
- description: K(a)(e.kind === "startup" ? "core.startup.other" : `core.startup.${e.kind}`),
89
+ const { t: n } = Oe();
90
+ return (r, i) => (Re(), Me("div", ct, [
91
+ ee(C(at), {
92
+ title: C(n)("core.startup.title"),
93
+ description: C(n)(e.kind === "startup" ? "core.startup.other" : `core.startup.${e.kind}`),
93
94
  icon: "errorWarningLine"
94
95
  }, {
95
96
  actions: te(() => [
96
- ee(K(ot), {
97
+ ee(C(rt), {
97
98
  prominence: "primary",
98
99
  icon: "refreshLine",
99
100
  onClick: i[0] || (i[0] = (w) => r.$emit("retry"))
100
101
  }, {
101
102
  default: te(() => [
102
- Me(Ae(K(a)("core.actions.retry")), 1)
103
+ Ae(je(C(n)("core.actions.retry")), 1)
103
104
  ]),
104
105
  _: 1
105
106
  })
@@ -109,7 +110,7 @@ const it = { class: "mx-auto flex min-h-screen max-w-content items-center justif
109
110
  ]));
110
111
  }
111
112
  });
112
- class ce extends Error {
113
+ class le extends Error {
113
114
  constructor(r) {
114
115
  super(`The application composition is invalid:
115
116
  ${r.map((i) => ` - [${i.owner}] ${i.message}`).join(`
@@ -118,17 +119,17 @@ ${r.map((i) => ` - [${i.owner}] ${i.message}`).join(`
118
119
  this.name = "ApplicationError", this.issues = r;
119
120
  }
120
121
  }
121
- const le = "application", g = (e) => `feature "${e.id}"`;
122
- function* D(e, a = "") {
122
+ const ue = "application", g = (e) => `feature "${e.id}"`;
123
+ function* D(e, n = "") {
123
124
  for (const r of e) {
124
- const i = r.path.startsWith("/") ? r.path : `${a.replace(/\/$/, "")}/${r.path}`;
125
+ const i = r.path.startsWith("/") ? r.path : `${n.replace(/\/$/, "")}/${r.path}`;
125
126
  yield { record: r, path: i }, r.children && (yield* D(r.children, i));
126
127
  }
127
128
  }
128
- function lt(e) {
129
- const a = [], r = (o, s) => a.push({ owner: o, message: s }), i = [];
129
+ function ut(e) {
130
+ const n = [], r = (o, s) => n.push({ owner: o, message: s }), i = [];
130
131
  e.features.forEach((o, s) => {
131
- nt(o) ? i.push(o) : r(le, `features[${s}] was not created with defineFeature().`);
132
+ nt(o) ? i.push(o) : r(ue, `features[${s}] was not created with defineFeature().`);
132
133
  });
133
134
  const w = /* @__PURE__ */ new Map();
134
135
  for (const o of i)
@@ -136,11 +137,11 @@ function lt(e) {
136
137
  for (const o of i)
137
138
  for (const s of o.requires)
138
139
  w.has(s) || r(g(o), `requires the feature "${s}", which is not in the features list.`);
139
- const v = [], k = /* @__PURE__ */ new Set(), R = (o) => {
140
- if (k.has(o.id)) return;
140
+ const v = [], E = /* @__PURE__ */ new Set(), R = (o) => {
141
+ if (E.has(o.id)) return;
141
142
  const s = v.indexOf(o.id);
142
143
  if (s !== -1) {
143
- r(g(o), `requirements form a cycle: ${[...v.slice(s), o.id].join(" -> ")}.`), k.add(o.id);
144
+ r(g(o), `requirements form a cycle: ${[...v.slice(s), o.id].join(" -> ")}.`), E.add(o.id);
144
145
  return;
145
146
  }
146
147
  v.push(o.id);
@@ -148,7 +149,7 @@ function lt(e) {
148
149
  const d = w.get(c);
149
150
  d && R(d);
150
151
  }
151
- v.pop(), k.add(o.id);
152
+ v.pop(), E.add(o.id);
152
153
  };
153
154
  i.forEach(R);
154
155
  const j = new Set(e.platform.config.capabilities);
@@ -175,7 +176,7 @@ function lt(e) {
175
176
  const d = h.get(s);
176
177
  d ? r(g(o), `provides the context "${c}", which feature "${d.id}" provides too.`) : h.set(s, o);
177
178
  }
178
- const u = /* @__PURE__ */ new Map(), E = (o, s) => {
179
+ const u = /* @__PURE__ */ new Map(), k = (o, s) => {
179
180
  for (const c of s) {
180
181
  const d = u.get(c.namespace);
181
182
  d ? r(o, `declares the message namespace "${c.namespace}", which ${d} declares too.`) : u.set(c.namespace, o);
@@ -183,8 +184,8 @@ function lt(e) {
183
184
  e.supportedLocales.includes(L) || r(o, `the namespace "${c.namespace}" has a loader for "${L}", which is not a supported locale (${e.supportedLocales.join(", ")}).`);
184
185
  }
185
186
  };
186
- for (const o of i) E(g(o), o.messages);
187
- E(le, e.messages);
187
+ for (const o of i) k(g(o), o.messages);
188
+ k(ue, e.messages);
188
189
  const $ = (o) => u.has(o);
189
190
  for (const o of i)
190
191
  for (const { record: s } of D(o.routes))
@@ -206,150 +207,150 @@ function lt(e) {
206
207
  const d = s.scope;
207
208
  d !== "app" && d !== "session" && r(g(o), `the effect "${s.id}" has the scope "${d}"; use "app" or "session".`);
208
209
  }
209
- return { features: i, issues: a };
210
+ return { features: i, issues: n };
210
211
  }
211
- const ut = (e, a, r) => Ce({
212
+ const ft = (e, n, r) => Ce({
212
213
  legacy: !1,
213
214
  locale: e,
214
- fallbackLocale: a,
215
+ fallbackLocale: n,
215
216
  pluralRules: r?.pluralRules && { ...r.pluralRules },
216
217
  ...r?.missingWarn === !1 && { missingWarn: !1, fallbackWarn: !1 },
217
218
  messages: {}
218
- }), ft = (e) => typeof e == "object" && e !== null && "component" in e && "slots" in e;
219
- function de(e, a) {
219
+ }), dt = (e) => typeof e == "object" && e !== null && "component" in e && "slots" in e;
220
+ function pe(e, n) {
220
221
  return e.map((r) => ({
221
222
  ...r,
222
- meta: { ...r.meta, feature: a },
223
- ...r.children && { children: de(r.children, a) }
223
+ meta: { ...r.meta, feature: n },
224
+ ...r.children && { children: pe(r.children, n) }
224
225
  }));
225
226
  }
226
- const ue = (e) => [...new Set(e)];
227
- function _t(e) {
228
- const { platform: a } = e, r = e.locale?.supported ?? Object.keys(oe), i = e.locale?.fallback ?? "en", w = e.shell === void 0 ? void 0 : ft(e.shell) ? e.shell : { component: e.shell, slots: void 0, progress: void 0 }, v = [];
227
+ const fe = (e) => [...new Set(e)];
228
+ function Ft(e) {
229
+ const { platform: n } = e, r = e.locale?.supported ?? Object.keys(oe), i = e.locale?.fallback ?? "en", w = e.shell === void 0 ? void 0 : dt(e.shell) ? e.shell : { component: e.shell, slots: void 0, progress: void 0 }, v = [];
229
230
  r.includes(i) || v.push({ owner: "application", message: `the fallback locale "${i}" is not among the supported locales (${r.join(", ")}).` });
230
231
  for (const t of Object.keys(e.locale?.flags ?? {}))
231
232
  r.includes(t) || v.push({ owner: "application", message: `locale.flags names the locale "${t}", which is not among the supported locales (${r.join(", ")}).` });
232
- const k = e.locale?.initial ?? (r.includes(a.config.locale) ? a.config.locale : i);
233
- r.includes(k) || v.push({ owner: "application", message: `the initial locale "${k}" is not among the supported locales (${r.join(", ")}).` });
234
- const R = [ze, qe, Ge, He, Be, ne, ae, re, ie], j = lt({
233
+ const E = e.locale?.initial ?? (r.includes(n.config.locale) ? n.config.locale : i);
234
+ r.includes(E) || v.push({ owner: "application", message: `the initial locale "${E}" is not among the supported locales (${r.join(", ")}).` });
235
+ const R = [Qe, Pe, Je, Ve, De, ae, ne, re, ie, ce], j = ut({
235
236
  features: e.features,
236
- platform: a,
237
+ platform: n,
237
238
  messages: e.messages ?? [],
238
239
  reservedContexts: R,
239
240
  supportedLocales: r,
240
241
  shellSlots: w?.slots
241
- }), M = [...v, ...j.issues], l = j.features, m = et(
242
- l.flatMap((t) => t.navigation.map((n) => ({ feature: t.id, binding: n }))),
242
+ }), M = [...v, ...j.issues], l = j.features, m = tt(
243
+ l.flatMap((t) => t.navigation.map((a) => ({ feature: t.id, binding: a }))),
243
244
  e.navigation
244
245
  );
245
246
  for (const t of m.issues) M.push({ owner: "navigation", message: t });
246
- if (M.length > 0) throw new ce(M);
247
- const h = ut(k, i, e.i18n), u = h.global;
248
- for (const [t, n] of Object.entries(oe)) u.mergeLocaleMessage(t, n);
249
- for (const [t, n] of Object.entries(e.i18n?.messages ?? {})) u.mergeLocaleMessage(t, n);
250
- const E = Fe({ locale: () => u.locale.value, formatters: e.formatting }), $ = [...l.flatMap((t) => t.messages), ...e.messages ?? []], x = (t) => (e.onError ?? dt)({ ...t, route: s.currentRoute.value.matched.length > 0 ? s.currentRoute.value.fullPath : null }), A = Pe({
247
+ if (M.length > 0) throw new le(M);
248
+ const h = ft(E, i, e.i18n), u = h.global;
249
+ for (const [t, a] of Object.entries(oe)) u.mergeLocaleMessage(t, a);
250
+ for (const [t, a] of Object.entries(e.i18n?.messages ?? {})) u.mergeLocaleMessage(t, a);
251
+ const k = Te({ locale: () => u.locale.value, formatters: e.formatting }), $ = [...l.flatMap((t) => t.messages), ...e.messages ?? []], x = (t) => (e.onError ?? pt)({ ...t, route: s.currentRoute.value.matched.length > 0 ? s.currentRoute.value.fullPath : null }), A = We({
251
252
  target: u,
252
253
  namespaces: $,
253
254
  fallback: i,
254
255
  supported: r,
255
256
  onFailure: (t) => x({ source: "messages", error: t.error, detail: `${t.namespace} (${t.locale})`, feature: o.get(t.namespace) })
256
- }), o = new Map(l.flatMap((t) => t.messages.map((n) => [n.namespace, t.id]))), s = Ke({
257
- history: e.router?.history ?? Xe(),
258
- routes: l.flatMap((t) => de(t.routes, t.id)),
259
- scrollBehavior: e.router?.scrollBehavior ?? ((t, n) => t.name === n.name ? !1 : { top: 0 })
257
+ }), o = new Map(l.flatMap((t) => t.messages.map((a) => [a.namespace, t.id]))), s = _e({
258
+ history: e.router?.history ?? Ye(),
259
+ routes: l.flatMap((t) => pe(t.routes, t.id)),
260
+ scrollBehavior: e.router?.scrollBehavior ?? ((t, a) => t.name === a.name ? !1 : { top: 0 })
260
261
  }), c = e.router?.login ?? { name: "login" }, d = e.router?.home ?? { path: "/" }, L = [], H = (t) => {
261
262
  try {
262
263
  return s.resolve(t).matched.length > 0 ? null : "matches no route";
263
- } catch (n) {
264
- const f = n instanceof Error ? n.message : String(n);
264
+ } catch (a) {
265
+ const f = a instanceof Error ? a.message : String(a);
265
266
  return f.startsWith("No match for") ? "matches no route" : `cannot be resolved (${f})`;
266
267
  }
267
268
  };
268
- if (l.some((t) => t.routes.some((n) => n.meta?.public !== !0))) {
269
+ if (l.some((t) => t.routes.some((a) => a.meta?.public !== !0))) {
269
270
  const t = H(c) ?? (s.resolve(c).meta.public === !0 ? null : "is not public (meta.public: true)");
270
271
  t && L.push({ owner: "application", message: `the login route ${JSON.stringify(c)} ${t.replace("matches no route", "does not exist")}, but protected routes are installed: an anonymous visitor would have nowhere to go. Install a feature with the login route or set router.login.` });
271
272
  }
272
- for (const { feature: t, binding: n } of m.destinations.values()) {
273
- const f = H(n.to);
274
- f && L.push({ owner: `feature "${t}"`, message: `the destination "${n.destination}" is bound to ${JSON.stringify(n.to)}, which ${f}.` });
273
+ for (const { feature: t, binding: a } of m.destinations.values()) {
274
+ const f = H(a.to);
275
+ f && L.push({ owner: `feature "${t}"`, message: `the destination "${a.destination}" is bound to ${JSON.stringify(a.to)}, which ${f}.` });
275
276
  }
276
- if (L.length > 0) throw new ce(L);
277
- const N = je({ status: "idle" }), I = {
277
+ if (L.length > 0) throw new le(L);
278
+ const N = Le({ status: "idle" }), I = {
278
279
  state: N,
279
- locale: Le(() => u.locale.value),
280
+ locale: Ne(() => u.locale.value),
280
281
  locales: r,
281
282
  localeFlags: e.locale?.flags ?? {},
282
283
  setLocale: async (t) => {
283
- const n = u.locale.value, f = await A.setLocale(t);
284
- if (f && u.locale.value !== n) {
285
- const b = (C) => x({ source: "locale", error: C, detail: t });
284
+ const a = u.locale.value, f = await A.setLocale(t);
285
+ if (f && u.locale.value !== a) {
286
+ const b = (O) => x({ source: "locale", error: O, detail: t });
286
287
  try {
287
288
  Promise.resolve(e.locale?.onChange?.(t)).catch(b);
288
- } catch (C) {
289
- b(C);
289
+ } catch (O) {
290
+ b(O);
290
291
  }
291
292
  }
292
293
  return f;
293
294
  },
294
295
  retry: () => P()
295
296
  }, F = {
296
- contributions: l.flatMap((t) => t.contributions.map((n) => ({ feature: t.id, contribution: n }))),
297
- effects: l.flatMap((t) => t.effects.map((n) => ({ feature: t.id, effect: n })))
298
- }, V = at({
297
+ contributions: l.flatMap((t) => t.contributions.map((a) => ({ feature: t.id, contribution: a }))),
298
+ effects: l.flatMap((t) => t.effects.map((a) => ({ feature: t.id, effect: a })))
299
+ }, V = it({
299
300
  effects: F.effects,
300
- platform: a,
301
+ platform: n,
301
302
  sessionKey: e.sessionKey,
302
- onError: (t, n) => x({ source: "effect", error: t, feature: n.feature, detail: n.effect.id })
303
- }), pe = new Map(l.map((t) => [t.id, t.messages.map((n) => n.namespace)])), G = (t) => ue(F.contributions.filter(({ contribution: n }) => n.scope === t).flatMap(({ contribution: n }) => n.messages ?? [])), me = G("always"), he = G("authenticated");
304
- async function ge(t) {
305
- const n = t.matched.flatMap((b) => [...pe.get(b.meta.feature ?? "") ?? [], ...b.meta.messages ?? []]), f = a.session.state.value.status === "authenticated";
306
- await A.load(ue([...n, ...me, ...f ? he : []]));
303
+ onError: (t, a) => x({ source: "effect", error: t, feature: a.feature, detail: a.effect.id })
304
+ }), me = new Map(l.map((t) => [t.id, t.messages.map((a) => a.namespace)])), G = (t) => fe(F.contributions.filter(({ contribution: a }) => a.scope === t).flatMap(({ contribution: a }) => a.messages ?? [])), he = G("always"), ge = G("authenticated");
305
+ async function we(t) {
306
+ const a = t.matched.flatMap((b) => [...me.get(b.meta.feature ?? "") ?? [], ...b.meta.messages ?? []]), f = n.session.state.value.status === "authenticated";
307
+ await A.load(fe([...a, ...he, ...f ? ge : []]));
307
308
  }
308
309
  let T = null;
309
310
  function q(t) {
310
- const n = t.meta.titleKey, f = T?.documentTitle.value ?? (n && u.te(n) ? u.t(n) : null), b = (e.router?.documentTitle ?? pt)(f, a.config.appName);
311
+ const a = t.meta.titleKey, f = T?.documentTitle.value ?? (a && u.te(a) ? u.t(a) : null), b = (e.router?.documentTitle ?? mt)(f, n.config.appName);
311
312
  b !== "" && (document.title = b);
312
313
  }
313
- const we = tt({ session: a.session, router: s, i18n: u, destinations: m.destinations }), ve = st(F.contributions, a.session), ye = Qe({ router: s, access: a.access, noAccess: e.noAccess ?? Ye }), $e = fe({
314
+ const ve = st({ session: n.session, router: s, i18n: u, destinations: m.destinations }), ye = ot(F.contributions, n.session), $e = Ue({ router: s, access: n.access, noAccess: e.noAccess ?? Ze }), be = de({
314
315
  name: "ApplicationRoot",
315
316
  setup() {
316
317
  return () => {
317
318
  const t = N.value;
318
- return t.status === "failed" ? se(ct, { kind: t.kind, onRetry: () => void P() }) : t.status !== "ready" ? null : se(w?.component ?? Ue);
319
+ return t.status === "failed" ? se(lt, { kind: t.kind, onRetry: () => void P() }) : t.status !== "ready" ? null : se(w?.component ?? Xe);
319
320
  };
320
321
  }
321
- }), p = Ne($e);
322
- Je(p, a), p.use(h), Te(p, E), T = Ve(p), De(p), Ie(p), e.icons && We(p, ...Array.isArray(e.icons) ? e.icons : [e.icons]), p.provide(ie, I), p.provide(ne, we), p.provide(ae, ve), p.provide(re, ye);
323
- for (const t of l) for (const { key: n, value: f } of t.contexts) p.provide(n, f);
322
+ }), p = Ke(be);
323
+ ze(p, n), p.use(h), qe(p, k), T = Ge(p), He(p), Fe(p), e.icons && Be(p, ...Array.isArray(e.icons) ? e.icons : [e.icons]), p.provide(ie, I), e.describeError && p.provide(ce, e.describeError), p.provide(ae, ve), p.provide(ne, ye), p.provide(re, $e);
324
+ for (const t of l) for (const { key: a, value: f } of t.contexts) p.provide(a, f);
324
325
  let S = !1, J = !1, z = !1, Q = !1;
325
- const O = [];
326
- function be() {
326
+ const K = [];
327
+ function Ee() {
327
328
  const t = p.config.errorHandler;
328
329
  p.config.errorHandler = (y, ke, Y) => {
329
330
  x({ source: "vue", error: y, detail: Y }), t?.(y, ke, Y);
330
331
  };
331
- const n = (y) => x({ source: "unhandledrejection", error: y.reason }), f = (y) => {
332
+ const a = (y) => x({ source: "unhandledrejection", error: y.reason }), f = (y) => {
332
333
  y.error && x({ source: "window", error: y.error });
333
334
  };
334
- window.addEventListener("unhandledrejection", n), window.addEventListener("error", f), O.push(() => {
335
- window.removeEventListener("unhandledrejection", n), window.removeEventListener("error", f);
335
+ window.addEventListener("unhandledrejection", a), window.addEventListener("error", f), K.push(() => {
336
+ window.removeEventListener("unhandledrejection", a), window.removeEventListener("error", f);
336
337
  });
337
338
  const b = l.some((y) => y.holdsExpiredSession);
338
- a.session.holdExpired(b), O.push(() => a.session.holdExpired(!1)), O.push(
339
- Ze({
339
+ n.session.holdExpired(b), K.push(() => n.session.holdExpired(!1)), K.push(
340
+ et({
340
341
  router: s,
341
- session: a.session,
342
+ session: n.session,
342
343
  login: c,
343
344
  home: d,
344
345
  holdExpired: b,
345
- prepare: ge,
346
+ prepare: we,
346
347
  afterNavigation: q,
347
348
  progress: e.router?.progress ?? w?.progress,
348
349
  onError: (y) => x({ source: "router", error: y })
349
350
  })
350
351
  );
351
- const C = W();
352
- C.run(() => B(() => T?.documentTitle.value, () => q(s.currentRoute.value))), O.push(() => C.stop());
352
+ const O = W();
353
+ O.run(() => B(() => T?.documentTitle.value, () => q(s.currentRoute.value))), K.push(() => O.stop());
353
354
  const X = W();
354
355
  X.run(
355
356
  () => B(
@@ -359,23 +360,23 @@ function _t(e) {
359
360
  },
360
361
  { immediate: !0 }
361
362
  )
362
- ), O.push(() => X.stop());
363
+ ), K.push(() => X.stop());
363
364
  }
364
- const _ = (t, n) => {
365
- N.value = { status: "failed", kind: t, error: n };
365
+ const _ = (t, a) => {
366
+ N.value = { status: "failed", kind: t, error: a };
366
367
  };
367
368
  async function U() {
368
369
  N.value = { status: "starting" };
369
- const t = await a.session.restore();
370
+ const t = await n.session.restore();
370
371
  if (S) return;
371
372
  if (t.status === "failed") return _("session", t.error);
372
- const n = await A.loadEssential();
373
+ const a = await A.loadEssential();
373
374
  if (!S) {
374
- if (n.length > 0) return _("messages", n[0].error);
375
+ if (a.length > 0) return _("messages", a[0].error);
375
376
  try {
376
377
  const f = await s.replace(s.options.history.location);
377
378
  if (S) return;
378
- if (_e(f)) return _("startup", f);
379
+ if (Ie(f)) return _("startup", f);
379
380
  } catch (f) {
380
381
  S || _("startup", f);
381
382
  return;
@@ -396,31 +397,31 @@ function _t(e) {
396
397
  async mount(t) {
397
398
  if (S) throw new Error("This application was disposed; create a new one with createApplication().");
398
399
  if (J) throw new Error("This application is already mounted.");
399
- J = !0, be(), await U(), !S && (p.mount(t), z = !0);
400
+ J = !0, Ee(), await U(), !S && (p.mount(t), z = !0);
400
401
  },
401
402
  retry: P,
402
403
  dispose() {
403
404
  if (!S) {
404
405
  S = !0, V.dispose(), A.dispose(), z && p.unmount();
405
- for (const t of O.reverse()) t();
406
+ for (const t of K.reverse()) t();
406
407
  s.options.history.destroy();
407
408
  }
408
409
  }
409
410
  };
410
411
  }
411
- function dt(e) {
412
+ function pt(e) {
412
413
  console.error(`[vue-core] ${e.source}${e.feature ? ` (${e.feature})` : ""}${e.detail ? `: ${e.detail}` : ""}`, e.error);
413
414
  }
414
- function pt(e, a) {
415
- return [e, a].filter((r) => !!r).join(" · ");
415
+ function mt(e, n) {
416
+ return [e, n].filter((r) => !!r).join(" · ");
416
417
  }
417
418
  export {
418
- ce as ApplicationError,
419
- Tt as ShellOutlet,
419
+ le as ApplicationError,
420
+ Pt as ShellOutlet,
420
421
  ie as applicationKey,
421
- _t as createApplication,
422
- Bt as defineFeature,
423
- Vt as keepSessionAlive,
424
- Dt as provideContext,
425
- Pt as useApplication
422
+ Ft as createApplication,
423
+ Ht as defineFeature,
424
+ Jt as keepSessionAlive,
425
+ Vt as provideContext,
426
+ Bt as useApplication
426
427
  };