@cratis/stage.runtime 4.201.1 → 4.202.1

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/src/index.js CHANGED
@@ -1,26 +1,27 @@
1
1
  import "./app.css";
2
2
  import { t as e } from "../stageDarkSelector-DjqhPYDU.js";
3
3
  import { createContext as t, createElement as n, useCallback as r, useContext as i, useEffect as a, useId as o, useMemo as s, useRef as c, useState as l } from "react";
4
- import { ColorScheme as u, DestinationKind as d, FormGenerationMode as f, FormWidthUnit as p, InteractionTriggerKind as m, PackageKind as h, componentIconLibrary as g } from "@cratis/scene.model";
5
- import { ShellDiagnosticCode as _, ShellOrigin as v, createBindingResolver as y, hostProfilePackages as b, resolveArgumentSource as x, resolveBehaviors as S, resolveStringsInElement as C, runBindings as w, validateBindingExpression as ee } from "@cratis/scene.engine";
6
- import { CoreSliceDialog as te, CoreToolbarItem as ne, IconAdapterProvider as re, InteractionScope as T, SceneElementView as ie, SceneNavigationContextInternal as E, SliceCommandFieldsProvider as ae, SliceDialogView as D, SliceInvokerProvider as oe, attachmentFor as se, coreComponents as ce, createBrowserDispatcher as le, createHashSceneHistory as ue, createIconAdapterRegistry as O, sliceDialogParameters as de, useInteractionScope as fe, useOptionalSceneNavigation as k, useSceneNavigation as pe, useSceneOutlets as me, useSceneTheme as he } from "@cratis/scene.react";
7
- import { ApplicationHost as ge, ColorScheme as _e, ComponentName as A, LayoutThemeProvider as ve, SlotName as j, blueprintPackageCatalog as ye, composeApplicationScreen as be, defaultBlueprintComponents as xe, defaultBlueprintName as Se, defaultBlueprintThemes as Ce, effectiveShellOf as we, externalComponent as M, galleryScreenTemplates as N, layoutModes as Te, menuThemes as Ee, navigationElement as De, previewComponents as Oe, previewProfile as ke, useLayoutConfig as Ae } from "@cratis/scene.blueprint.default";
4
+ import { ColorScheme as u, DestinationKind as d, FormGenerationMode as f, FormWidthUnit as p, InteractionTriggerKind as m, LogoKind as h, PackageKind as g, componentIconLibrary as _ } from "@cratis/scene.model";
5
+ import { ShellDiagnosticCode as v, ShellOrigin as y, createBindingResolver as b, hostProfilePackages as x, resolveArgumentSource as S, resolveBehaviors as C, resolveStringsInElement as w, resolveStringsValue as ee, runBindings as te, validateBindingExpression as ne } from "@cratis/scene.engine";
6
+ import { CoreSliceDialog as re, CoreToolbarItem as T, IconAdapterProvider as ie, InteractionScope as ae, SceneElementView as oe, SceneNavigationContextInternal as E, SliceCommandFieldsProvider as se, SliceDialogView as ce, SliceInvokerProvider as le, attachmentFor as ue, coreComponents as de, createBrowserDispatcher as D, createHashSceneHistory as fe, createIconAdapterRegistry as pe, sliceDialogParameters as O, useInteractionScope as me, useOptionalSceneNavigation as he, useSceneNavigation as ge, useSceneOutlets as _e, useSceneTheme as ve } from "@cratis/scene.react";
7
+ import { ApplicationHost as ye, ColorScheme as be, ComponentName as k, LayoutThemeProvider as xe, SlotName as A, blueprintPackageCatalog as Se, composeApplicationScreen as Ce, defaultBlueprintComponents as we, defaultBlueprintName as Te, defaultBlueprintThemes as Ee, effectiveShellOf as De, externalComponent as j, galleryScreenTemplates as M, layoutModes as Oe, menuThemes as ke, navigationElement as Ae, previewComponents as je, previewProfile as Me, useLayoutConfig as Ne } from "@cratis/scene.blueprint.default";
8
+ import "@cratis/components/tokens";
8
9
  import "@cratis/scene.blueprint.default/styles.css";
9
- import { ArcContext as je } from "@cratis/arc.react";
10
- import { ObservableQueryFor as Me, Paging as Ne, QueryFor as Pe } from "@cratis/arc/queries";
11
- import { resolveCommand as Fe, resolveExactQuery as Ie } from "@cratis/scene.components";
12
- import { Fragment as Le, jsx as P, jsxs as F } from "react/jsx-runtime";
13
- import { Button as I } from "@cratis/components/Common";
14
- import { Dialog as Re } from "@cratis/components/Dialogs";
15
- import { Message as ze } from "@cratis/components/Display";
16
- import { DateOnly as Be, Guid as Ve } from "@cratis/fundamentals";
17
- import { Command as He } from "@cratis/arc/commands";
18
- import { CommandForm as Ue, asCommandFormField as We, withCommandFormFieldBinding as Ge } from "@cratis/arc.react/commands";
19
- import { CalendarField as Ke, CheckboxField as qe, DropdownField as Je, InputTextField as Ye, NumberField as Xe } from "@cratis/components/CommandForm";
20
- import { cratisComponents as Ze, cratisComponentsPackageManifest as Qe } from "@cratis/scene.components/runtime";
21
- import { dynamicIconImports as $e } from "lucide-react/dynamic";
10
+ import { ArcContext as Pe } from "@cratis/arc.react";
11
+ import { ObservableQueryFor as Fe, Paging as Ie, QueryFor as Le } from "@cratis/arc/queries";
12
+ import { resolveCommand as Re, resolveExactQuery as ze } from "@cratis/scene.components";
13
+ import { Fragment as Be, jsx as N, jsxs as P } from "react/jsx-runtime";
14
+ import { Button as F } from "@cratis/components/Common";
15
+ import { Dialog as Ve } from "@cratis/components/Dialogs";
16
+ import { Message as He } from "@cratis/components/Display";
17
+ import { DateOnly as Ue, Guid as We } from "@cratis/fundamentals";
18
+ import { Command as Ge } from "@cratis/arc/commands";
19
+ import { CommandForm as Ke, asCommandFormField as qe, withCommandFormFieldBinding as Je } from "@cratis/arc.react/commands";
20
+ import { CalendarField as Ye, CheckboxField as Xe, DropdownField as Ze, InputTextField as Qe, NumberField as $e } from "@cratis/components/CommandForm";
21
+ import { cratisComponents as et, cratisComponentsPackageManifest as tt } from "@cratis/scene.components/runtime";
22
+ import { dynamicIconImports as nt } from "lucide-react/dynamic";
22
23
  //#region src/stageSource.ts
23
- function et(e) {
24
+ function rt(e) {
24
25
  return {
25
26
  scene: async () => e.scene,
26
27
  routes: async () => e.routes,
@@ -28,23 +29,23 @@ function et(e) {
28
29
  strings: async (t) => e.strings[t] ?? {}
29
30
  };
30
31
  }
31
- var tt = {
32
+ var it = {
32
33
  scene: "stage/scene",
33
34
  routes: "stage/routes",
34
35
  locales: "stage/locales",
35
36
  strings: (e) => `stage/strings/${encodeURIComponent(e)}`
36
- }, nt = t(void 0);
37
- function rt({ source: e, children: t }) {
38
- return n(nt.Provider, { value: e }, t);
37
+ }, at = t(void 0);
38
+ function ot({ source: e, children: t }) {
39
+ return n(at.Provider, { value: e }, t);
39
40
  }
40
- function it() {
41
- let e = i(nt);
41
+ function st() {
42
+ let e = i(at);
42
43
  if (!e) throw Error("A StageSourceProvider is required to render a Stage application.");
43
44
  return e;
44
45
  }
45
- tt.routes;
46
- function at() {
47
- let e = it(), [t, n] = l({
46
+ it.routes;
47
+ function ct() {
48
+ let e = st(), [t, n] = l({
48
49
  routes: void 0,
49
50
  ready: !1
50
51
  });
@@ -65,25 +66,25 @@ function at() {
65
66
  }
66
67
  //#endregion
67
68
  //#region src/applyQueryChangeSet.ts
68
- function L(e) {
69
+ function I(e) {
69
70
  return typeof e == "object" && e && "id" in e ? e.id : void 0;
70
71
  }
71
- function ot(e) {
72
+ function lt(e) {
72
73
  if (typeof e != "object" || !e) return e;
73
74
  let t = e.toString();
74
75
  return t === "[object Object]" ? JSON.stringify(e) : t;
75
76
  }
76
- function st(e, t) {
77
- return e === t ? !0 : e == null || t == null ? !1 : typeof e == "object" && "equals" in e && typeof e.equals == "function" ? e.equals(t) : typeof t == "object" && "equals" in t && typeof t.equals == "function" ? t.equals(e) : ot(e) === ot(t);
77
+ function ut(e, t) {
78
+ return e === t ? !0 : e == null || t == null ? !1 : typeof e == "object" && "equals" in e && typeof e.equals == "function" ? e.equals(t) : typeof t == "object" && "equals" in t && typeof t.equals == "function" ? t.equals(e) : lt(e) === lt(t);
78
79
  }
79
- function ct(e, t) {
80
- if (t.removed.length > 0 ? L(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => st(L(e), L(t)))).map((e) => t.replaced.find((t) => st(L(t), L(e))) ?? e), ...t.added];
80
+ function dt(e, t) {
81
+ if (t.removed.length > 0 ? I(t.removed[0]) !== void 0 : t.replaced.length > 0) return [...e.filter((e) => !t.removed.some((t) => ut(I(e), I(t)))).map((e) => t.replaced.find((t) => ut(I(t), I(e))) ?? e), ...t.added];
81
82
  let n = new Set(t.removed.map((e) => JSON.stringify(e)));
82
83
  return [...e.filter((e) => !n.has(JSON.stringify(e))), ...t.added];
83
84
  }
84
85
  //#endregion
85
86
  //#region src/hostedBasePath.ts
86
- function lt() {
87
+ function ft() {
87
88
  let e = globalThis.document?.baseURI ?? globalThis.location?.href;
88
89
  if (!e) return "";
89
90
  try {
@@ -92,62 +93,62 @@ function lt() {
92
93
  return "";
93
94
  }
94
95
  }
95
- function ut(e) {
96
- return e || lt();
96
+ function pt(e) {
97
+ return e || ft();
97
98
  }
98
99
  //#endregion
99
100
  //#region src/queryExecutor.ts
100
- var dt;
101
- function ft(e) {
102
- dt = e;
101
+ var mt;
102
+ function ht(e) {
103
+ mt = e;
103
104
  }
104
- function pt(e, t) {
105
- let n = Ie(e);
106
- return n === "ambiguous" && t && (n = Ie(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), mt(n) ? n : t ? dt?.(t) : void 0;
105
+ function gt(e, t) {
106
+ let n = ze(e);
107
+ return n === "ambiguous" && t && (n = ze(`${e}:${t.replace(/^\//, "").split("?")[0]}`)), _t(n) ? n : t ? mt?.(t) : void 0;
107
108
  }
108
- function mt(e) {
109
- return typeof e == "function" && (e.prototype instanceof Pe || e.prototype instanceof Me);
109
+ function _t(e) {
110
+ return typeof e == "function" && (e.prototype instanceof Le || e.prototype instanceof Fe);
110
111
  }
111
- function ht(e, t) {
112
- e.setMicroservice(t.microservice), e.setApiBasePath(ut(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = Ne.noPaging;
112
+ function vt(e, t) {
113
+ e.setMicroservice(t.microservice), e.setApiBasePath(pt(t.apiBasePath)), e.setOrigin(t.origin ?? ""), e.setHttpHeadersCallback(t.httpHeadersCallback ?? (() => ({}))), e.paging = Ie.noPaging;
113
114
  }
114
- function gt(e, t, n) {
115
+ function yt(e, t, n) {
115
116
  let r = new e();
116
- return ht(r, n), r.perform(t);
117
+ return vt(r, n), r.perform(t);
117
118
  }
118
- function _t(e, t, n, r) {
119
+ function bt(e, t, n, r) {
119
120
  let i = new e();
120
- if (i instanceof Me) return ht(i, n), i.subscribe(r, t);
121
+ if (i instanceof Fe) return vt(i, n), i.subscribe(r, t);
121
122
  }
122
- function vt(e) {
123
- if (R(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
123
+ function xt(e) {
124
+ if (L(e)) return typeof e.subject == "string" ? e.subject : typeof e.path == "string" ? e.path : void 0;
124
125
  }
125
- var yt = "STAGE-SCENE-ACTION-001", bt = "item.";
126
- function R(e) {
126
+ var St = "STAGE-SCENE-ACTION-001", Ct = "item.";
127
+ function L(e) {
127
128
  return typeof e == "object" && !!e && !Array.isArray(e);
128
129
  }
129
- function xt(e, t) {
130
+ function wt(e, t) {
130
131
  let n = e;
131
132
  for (let e of t.split(".").filter(Boolean)) {
132
- if (!R(n)) return;
133
+ if (!L(n)) return;
133
134
  n = n[e];
134
135
  }
135
136
  return n;
136
137
  }
137
- function St(e) {
138
+ function Tt(e) {
138
139
  return e === null || [
139
140
  "string",
140
141
  "number",
141
142
  "boolean"
142
143
  ].includes(typeof e);
143
144
  }
144
- function Ct(e, t) {
145
+ function Et(e, t) {
145
146
  if (typeof e == "number") return t[e];
146
147
  if (typeof e == "string") return t.find((t) => t.toLowerCase() === e.toLowerCase());
147
148
  }
148
- function wt(e, t, n, r) {
149
+ function Dt(e, t, n, r) {
149
150
  if (r !== void 0 && (t === "Equal" || t === "NotEqual")) {
150
- let i = Ct(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
151
+ let i = Et(e, r), a = typeof n == "string" ? r.find((e) => e.toLowerCase() === n.toLowerCase()) : void 0;
151
152
  return i === void 0 || a === void 0 ? !1 : t === "Equal" ? i === a : i !== a;
152
153
  }
153
154
  switch (t) {
@@ -162,57 +163,57 @@ function wt(e, t, n, r) {
162
163
  default: return;
163
164
  }
164
165
  }
165
- function Tt(e, t) {
166
- if (R(e)) {
166
+ function Ot(e, t) {
167
+ if (L(e)) {
167
168
  if (e.kind === "comparison") {
168
- let n = vt(e.left);
169
- if (typeof n != "string" || !n.startsWith(bt) || typeof e.operator != "string" || !St(e.right)) return;
169
+ let n = xt(e.left);
170
+ if (typeof n != "string" || !n.startsWith(Ct) || typeof e.operator != "string" || !Tt(e.right)) return;
170
171
  let r = Array.isArray(e.enumeration) && e.enumeration.every((e) => typeof e == "string") ? e.enumeration : void 0;
171
- return wt(xt(t, n.slice(5)), e.operator, e.right, r);
172
+ return Dt(wt(t, n.slice(5)), e.operator, e.right, r);
172
173
  }
173
174
  if (e.kind === "logical") {
174
- let n = Tt(e.left, t), r = Tt(e.right, t);
175
+ let n = Ot(e.left, t), r = Ot(e.right, t);
175
176
  return n === void 0 || r === void 0 ? void 0 : e.operator === "And" ? n && r : e.operator === "Or" ? n || r : void 0;
176
177
  }
177
178
  }
178
179
  }
179
- function Et(e) {
180
- return e.every((e) => Tt(e, {}) !== void 0);
180
+ function kt(e) {
181
+ return e.every((e) => Ot(e, {}) !== void 0);
181
182
  }
182
- function Dt(e, t) {
183
- if (Et(e)) return e.findIndex((e) => Tt(e, t) === !0);
183
+ function At(e, t) {
184
+ if (kt(e)) return e.findIndex((e) => Ot(e, t) === !0);
184
185
  }
185
- function Ot(e, t) {
186
- if (!R(e) || !Array.isArray(e.alternatives) || !R(t)) return;
187
- let n = Dt(e.alternatives, t);
186
+ function jt(e, t) {
187
+ if (!L(e) || !Array.isArray(e.alternatives) || !L(t)) return;
188
+ let n = At(e.alternatives, t);
188
189
  if (n !== void 0) {
189
190
  if (e.kind === "firstMatch" && typeof e.index == "number") return n === e.index;
190
191
  if (e.kind === "otherwise") return n === -1;
191
192
  }
192
193
  }
193
- function kt(e, t) {
194
- if (e.startsWith(bt) && R(t)) return xt(t, e.slice(5));
194
+ function Mt(e, t) {
195
+ if (e.startsWith(Ct) && L(t)) return wt(t, e.slice(5));
195
196
  }
196
197
  //#endregion
197
198
  //#region src/stageSession.ts
198
- var At = "stage.session.";
199
- function jt(e) {
199
+ var Nt = "stage.session.";
200
+ function Pt(e) {
200
201
  try {
201
202
  return globalThis.localStorage?.getItem(`stage.session.${e}`) || void 0;
202
203
  } catch {
203
204
  return;
204
205
  }
205
206
  }
206
- function Mt(e) {
207
- let t = jt(e);
207
+ function Ft(e) {
208
+ let t = Pt(e);
208
209
  if (t) return t;
209
210
  let n = globalThis.crypto.randomUUID();
210
211
  try {
211
- globalThis.localStorage?.setItem(`${At}${e}`, n);
212
+ globalThis.localStorage?.setItem(`${Nt}${e}`, n);
212
213
  } catch {}
213
214
  return n;
214
215
  }
215
- function Nt() {
216
+ function It() {
216
217
  let e = {};
217
218
  try {
218
219
  let t = globalThis.localStorage;
@@ -227,7 +228,7 @@ function Nt() {
227
228
  }
228
229
  //#endregion
229
230
  //#region src/stageData.tsx
230
- var Pt = "cratis.stage.data-changed", Ft = t({
231
+ var Lt = "cratis.stage.data-changed", Rt = t({
231
232
  locale: "",
232
233
  locales: [],
233
234
  screen: "",
@@ -251,13 +252,13 @@ var Pt = "cratis.stage.data-changed", Ft = t({
251
252
  resolveArgument: () => void 0,
252
253
  registerQueryResult: () => void 0,
253
254
  refreshVersion: 0
254
- }), It = [
255
+ }), zt = [
255
256
  500,
256
257
  1500,
257
258
  3e3
258
- ], Lt = {};
259
- function Rt({ routes: e, routesReady: t = !0, parameters: n = Lt, locale: i, locales: o, screen: u, children: d }) {
260
- let [f, p] = l({}), [m, h] = l(0), [g, _] = l({}), [v, b] = l(), [S, C] = l({}), [w, te] = l({}), [ne, re] = l({}), [T, ie] = l({ version: 0 }), E = s(() => Wt(ne), [ne]), ae = r((e, t) => {
259
+ ], Bt = {};
260
+ function Vt({ routes: e, routesReady: t = !0, parameters: n = Bt, locale: i, locales: o, screen: u, children: d }) {
261
+ let [f, p] = l({}), [m, h] = l(0), [g, _] = l({}), [v, y] = l(), [x, C] = l({}), [w, ee] = l({}), [te, re] = l({}), [T, ie] = l({ version: 0 }), ae = s(() => qt(te), [te]), oe = r((e, t) => {
261
262
  p((n) => {
262
263
  if (!t) {
263
264
  let { [e]: t, ...r } = n;
@@ -268,144 +269,144 @@ function Rt({ routes: e, routesReady: t = !0, parameters: n = Lt, locale: i, loc
268
269
  [e]: t
269
270
  };
270
271
  });
271
- }, []), D = n, oe = s(() => Nt(), [m]), se = s(() => ({
272
+ }, []), E = n, se = s(() => It(), [m]), ce = s(() => ({
272
273
  name: u,
273
274
  keys: {
274
- ...oe,
275
+ ...se,
275
276
  ...n
276
277
  }
277
278
  }), [
278
279
  n,
279
280
  u,
280
- oe
281
- ]), ce = r((e, t) => {
281
+ se
282
+ ]), le = r((e, t) => {
282
283
  _((n) => ({
283
284
  ...n,
284
285
  [e]: t
285
- })), b(t ? e : (t) => t === e ? void 0 : t);
286
- }, []), le = r((e) => {
286
+ })), y(t ? e : (t) => t === e ? void 0 : t);
287
+ }, []), ue = r((e) => {
287
288
  _((t) => ({
288
289
  ...t,
289
290
  [e]: void 0
290
- })), b((t) => t === e ? void 0 : t);
291
- }, []), ue = r((e, t, n) => {
292
- te((r) => {
293
- let i = H(r[e]) ? r[e] : {};
291
+ })), y((t) => t === e ? void 0 : t);
292
+ }, []), de = r((e, t, n) => {
293
+ ee((r) => {
294
+ let i = V(r[e]) ? r[e] : {};
294
295
  return {
295
296
  ...r,
296
- [e]: Ut(i, t.split(".").filter(Boolean), n)
297
+ [e]: Kt(i, t.split(".").filter(Boolean), n)
297
298
  };
298
299
  });
299
- }, []), O = r((e) => ie((t) => ({
300
+ }, []), D = r((e) => ie((t) => ({
300
301
  query: e,
301
302
  version: t.version + 1
302
- })), []), de = c([]), fe = r(() => {
303
- h((e) => e + 1), O();
304
- for (let e of It) de.current.push(setTimeout(() => O(), e));
305
- }, [O]);
306
- a(() => () => de.current.forEach(clearTimeout), []), a(() => {
307
- let e = () => O(), t = (e) => O(e.detail?.query);
308
- return globalThis.addEventListener(Pt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
309
- globalThis.removeEventListener(Pt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
303
+ })), []), fe = c([]), pe = r(() => {
304
+ h((e) => e + 1), D();
305
+ for (let e of zt) fe.current.push(setTimeout(() => D(), e));
306
+ }, [D]);
307
+ a(() => () => fe.current.forEach(clearTimeout), []), a(() => {
308
+ let e = () => D(), t = (e) => D(e.detail?.query);
309
+ return globalThis.addEventListener(Lt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
310
+ globalThis.removeEventListener(Lt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
310
311
  };
311
- }, [O]);
312
- let k = v ? g[v] : void 0, pe = r((e) => {
312
+ }, [D]);
313
+ let O = v ? g[v] : void 0, me = r((e) => {
313
314
  if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
314
- if (typeof e == "string") return Gt(e, k, g, f, S, D, se, i, o);
315
- let t = Bt(k, f, S, {
316
- ...E,
315
+ if (typeof e == "string") return Jt(e, O, g, f, x, E, ce, i, o);
316
+ let t = Ut(O, f, x, {
317
+ ...ae,
317
318
  ...w
318
319
  }, g);
319
- if (!e.kind && e.path.startsWith("component.")) return x(e.path, t);
320
- if (!e.kind) return Gt(e.path, k, g, f, S, D, se, i, o);
321
- let n = ee(e, t);
322
- return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), y(t)(e);
320
+ if (!e.kind && e.path.startsWith("component.")) return S(e.path, t);
321
+ if (!e.kind) return Jt(e.path, O, g, f, x, E, ce, i, o);
322
+ let n = ne(e, t);
323
+ return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), b(t)(e);
323
324
  }, [
324
325
  w,
325
326
  i,
326
327
  o,
327
- S,
328
- D,
328
+ x,
329
329
  E,
330
+ ae,
330
331
  f,
331
- se,
332
- k,
332
+ ce,
333
+ O,
333
334
  g
334
- ]), me = r((e) => e ? x(e, Bt(k, f, S, {
335
- ...E,
335
+ ]), he = r((e) => e ? S(e, Ut(O, f, x, {
336
+ ...ae,
336
337
  ...w
337
338
  }, g)) : void 0, [
338
339
  w,
339
- S,
340
- E,
340
+ x,
341
+ ae,
341
342
  f,
342
- k,
343
+ O,
343
344
  g
344
- ]), he = r((e, t) => re((n) => ({
345
+ ]), ge = r((e, t) => re((n) => ({
345
346
  ...n,
346
347
  [e]: t
347
- })), []), ge = r((e) => re((t) => {
348
+ })), []), _e = r((e) => re((t) => {
348
349
  if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
349
350
  let n = { ...t };
350
351
  return delete n[e], n;
351
- }), []), _e = s(() => Bt(void 0, f, {}, {}, {}).queryResults, [f]), A = s(() => ({
352
+ }), []), ve = s(() => Ut(void 0, f, {}, {}, {}).queryResults, [f]), ye = s(() => ({
352
353
  locale: i,
353
354
  locales: o,
354
355
  screen: u,
355
356
  routes: e,
356
357
  routesReady: t,
357
- parameters: D,
358
- session: oe,
358
+ parameters: E,
359
+ session: se,
359
360
  queries: f,
360
- selected: k,
361
+ selected: O,
361
362
  selections: g,
362
- selectRow: ce,
363
- clearSelection: le,
364
- setState: (e, t) => C((n) => Ut(n, e.split(".").filter(Boolean), t)),
365
- setComponentOutput: ue,
366
- publishComponentOutputs: he,
367
- withdrawComponentOutputs: ge,
368
- queryResults: _e,
369
- refreshQuery: O,
370
- refreshAfterCommand: fe,
371
- resolveBinding: pe,
372
- resolveArgument: me,
373
- registerQueryResult: ae,
363
+ selectRow: le,
364
+ clearSelection: ue,
365
+ setState: (e, t) => C((n) => Kt(n, e.split(".").filter(Boolean), t)),
366
+ setComponentOutput: de,
367
+ publishComponentOutputs: ge,
368
+ withdrawComponentOutputs: _e,
369
+ queryResults: ve,
370
+ refreshQuery: D,
371
+ refreshAfterCommand: pe,
372
+ resolveBinding: me,
373
+ resolveArgument: he,
374
+ registerQueryResult: oe,
374
375
  refreshVersion: T.version,
375
376
  refreshQueryName: T.query
376
377
  }), [
377
- le,
378
+ ue,
378
379
  i,
379
380
  o,
380
381
  f,
381
- fe,
382
- O,
382
+ pe,
383
+ D,
383
384
  T.query,
384
385
  T.version,
385
- ae,
386
- he,
386
+ oe,
387
387
  ge,
388
388
  _e,
389
+ ve,
390
+ he,
389
391
  me,
390
- pe,
391
392
  e,
392
393
  t,
393
- D,
394
- oe,
394
+ E,
395
+ se,
395
396
  u,
396
- ce,
397
- k,
397
+ le,
398
+ O,
398
399
  g,
399
- ue
400
+ de
400
401
  ]);
401
- return /* @__PURE__ */ P(Ft.Provider, {
402
- value: A,
402
+ return /* @__PURE__ */ N(Rt.Provider, {
403
+ value: ye,
403
404
  children: d
404
405
  });
405
406
  }
406
- var z = () => i(Ft);
407
- function B(e) {
408
- let { refreshQueryName: t, refreshVersion: n, registerQueryResult: o } = z(), s = i(je), u = e.publish !== !1, d = r((e, t) => {
407
+ var R = () => i(Rt);
408
+ function z(e) {
409
+ let { refreshQueryName: t, refreshVersion: n, registerQueryResult: o } = R(), s = i(Pe), u = e.publish !== !1, d = r((e, t) => {
409
410
  u && o(e, t);
410
411
  }, [u, o]), [f, p] = l([]), [m, h] = l(""), [g, _] = l(!1), [v, y] = l(0), b = c(0), x = c(!1), S = e.ready ?? !0, C = !!e.name && S, w = JSON.stringify(e.arguments ?? {});
411
412
  return a(() => {
@@ -415,21 +416,21 @@ function B(e) {
415
416
  }
416
417
  let t = b.current + 1;
417
418
  b.current = t;
418
- let n = new AbortController(), r = JSON.parse(w), i = pt(e.name ?? "", e.route);
419
+ let n = new AbortController(), r = JSON.parse(w), i = gt(e.name ?? "", e.route);
419
420
  _(!0), h("");
420
421
  let a = (e) => {
421
422
  b.current !== t || n.signal.aborted || (x.current = !1, p([]), h(e instanceof Error ? e.message : String(e)), _(!1));
422
423
  }, o = [], c = (e) => {
423
424
  if (b.current !== t || n.signal.aborted) return;
424
- let r = Jt(e);
425
+ let r = Zt(e);
425
426
  if (r) {
426
427
  a(Error(r));
427
428
  return;
428
429
  }
429
- e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? ct(o, e.changeSet) : e.data, p(Yt(o)), h(""), _(!1));
430
+ e.isReady !== !1 && (o = e.changeSet && Array.isArray(e.data) && e.data.length === 0 && Array.isArray(o) ? dt(o, e.changeSet) : e.data, p(Qt(o)), h(""), _(!1));
430
431
  };
431
432
  if (!i) return a(/* @__PURE__ */ Error(`The modeled query “${e.name}” is not registered by this Stage.`)), () => n.abort();
432
- let l = i.prototype instanceof Me, u = () => Promise.resolve().then(() => gt(i, l ? {
433
+ let l = i.prototype instanceof Fe, u = () => Promise.resolve().then(() => yt(i, l ? {
433
434
  ...r,
434
435
  waitForFirstResult: !0
435
436
  } : r, s)).then(c).catch(a);
@@ -439,7 +440,7 @@ function B(e) {
439
440
  b.current !== t || n.signal.aborted || (x.current = !1, f?.unsubscribe(), f = void 0, u());
440
441
  }, 15e3);
441
442
  try {
442
- f = _t(i, r, s, (e) => {
443
+ f = bt(i, r, s, (e) => {
443
444
  e.isReady !== !1 && globalThis.clearTimeout(m), c(e);
444
445
  });
445
446
  } catch {
@@ -500,29 +501,29 @@ function B(e) {
500
501
  }
501
502
  };
502
503
  }
503
- function zt() {
504
- globalThis.dispatchEvent(new CustomEvent(Pt));
504
+ function Ht() {
505
+ globalThis.dispatchEvent(new CustomEvent(Lt));
505
506
  }
506
- function Bt(e, t, n, r, i) {
507
+ function Ut(e, t, n, r, i) {
507
508
  let a = Object.entries(t).sort(([, e], [, t]) => Number(e.list === !0) - Number(t.list === !0));
508
509
  return {
509
510
  dataContext: e,
510
511
  queryResults: Object.fromEntries(a.flatMap(([e, t]) => {
511
- let n = t.list ? t.rows : Vt(t.rows);
512
+ let n = t.list ? t.rows : Wt(t.rows);
512
513
  return [
513
514
  [e, n],
514
515
  ...t.name ? [[t.name, n]] : [],
515
516
  ...t.alias ? [[t.alias, n]] : []
516
517
  ];
517
518
  })),
518
- componentOutputs: Ht(r, i),
519
+ componentOutputs: Gt(r, i),
519
520
  state: n
520
521
  };
521
522
  }
522
- function Vt(e) {
523
+ function Wt(e) {
523
524
  return e.length === 1 ? e[0] : e;
524
525
  }
525
- function Ht(e, t) {
526
+ function Gt(e, t) {
526
527
  let n = { ...e };
527
528
  for (let [e, r] of Object.entries(t)) r && (n[e] = {
528
529
  ...r,
@@ -530,17 +531,17 @@ function Ht(e, t) {
530
531
  });
531
532
  return n;
532
533
  }
533
- function Ut(e, t, n) {
534
+ function Kt(e, t, n) {
534
535
  let [r, ...i] = t;
535
536
  return r ? i.length === 0 ? {
536
537
  ...e,
537
538
  [r]: n
538
539
  } : {
539
540
  ...e,
540
- [r]: Ut(H(e[r]) ? e[r] : {}, i, n)
541
+ [r]: Kt(V(e[r]) ? e[r] : {}, i, n)
541
542
  } : e;
542
543
  }
543
- function Wt(e) {
544
+ function qt(e) {
544
545
  let t = {};
545
546
  for (let n of Object.values(e)) for (let [e, r] of Object.entries(n)) t[e] = {
546
547
  ...t[e],
@@ -548,30 +549,30 @@ function Wt(e) {
548
549
  };
549
550
  return t;
550
551
  }
551
- function Gt(e, t, n, r, i, a, o, s, c) {
552
+ function Jt(e, t, n, r, i, a, o, s, c) {
552
553
  if (!e) return;
553
554
  let l = e.replace(/^\$\.?/, "").split(".").filter(Boolean);
554
555
  if (l.length !== 0) {
555
556
  if (l[0] === "screen") {
556
557
  if (l.length === 1) return { name: o.name };
557
- let e = V(o, l.slice(1));
558
- return e === void 0 && l[1] === "keys" && l.length === 3 ? V(t, [l[2]]) : e;
558
+ let e = B(o, l.slice(1));
559
+ return e === void 0 && l[1] === "keys" && l.length === 3 ? B(t, [l[2]]) : e;
559
560
  }
560
- return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? qt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? Kt(l.slice(1).join("."), t, n) : l[0] === "state" ? V(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : V(t, l) ?? qt(r, void 0, l.join(".")) ?? V(i, l);
561
+ return l[0] === "locale" ? s : l[0] === "locales" ? c : l[0] === "query" ? Xt(r, l[1], l.slice(2).join(".")) : l[0] === "data" || l[0] === "selected" || l[0] === "current" ? Yt(l.slice(1).join("."), t, n) : l[0] === "state" ? B(i, l.slice(1)) : l[0] === "parameters" ? l.length === 1 ? a : a[l[1]] : B(t, l) ?? Xt(r, void 0, l.join(".")) ?? B(i, l);
561
562
  }
562
563
  }
563
- function Kt(e, t, n) {
564
+ function Yt(e, t, n) {
564
565
  let r = e?.split(".").filter(Boolean) ?? [];
565
- return r.length > 0 && Object.hasOwn(n, r[0]) ? V(n[r[0]], r.slice(1)) : r.length === 0 ? t : V(t, r);
566
+ return r.length > 0 && Object.hasOwn(n, r[0]) ? B(n[r[0]], r.slice(1)) : r.length === 0 ? t : B(t, r);
566
567
  }
567
- function qt(e, t, n) {
568
+ function Xt(e, t, n) {
568
569
  let r = Object.entries(e).filter(([e, n]) => t ? n.name === t || e === t : !n.list).map(([, e]) => e.rows);
569
570
  if (r.length === 0) return;
570
571
  let i = r.flat(), a = n?.split(".").filter(Boolean) ?? [];
571
- return a.length === 0 ? i : i.length === 1 ? V(i[0], a) : i.map((e) => V(e, a));
572
+ return a.length === 0 ? i : i.length === 1 ? B(i[0], a) : i.map((e) => B(e, a));
572
573
  }
573
- function Jt(e) {
574
- if (!H(e)) return "";
574
+ function Zt(e) {
575
+ if (!V(e)) return "";
575
576
  if (e.isAuthorized === !1) return "The query answered 403.";
576
577
  if (e.isValid === !1 || e.hasExceptions === !0 || e.isSuccess === !1) {
577
578
  let t = Array.isArray(e.exceptionMessages) ? e.exceptionMessages.filter((e) => typeof e == "string") : [];
@@ -579,58 +580,58 @@ function Jt(e) {
579
580
  }
580
581
  return "";
581
582
  }
582
- function Yt(e) {
583
- return Array.isArray(e) ? e.filter(H) : H(e) ? [e] : [];
583
+ function Qt(e) {
584
+ return Array.isArray(e) ? e.filter(V) : V(e) ? [e] : [];
584
585
  }
585
- function V(e, t) {
586
+ function B(e, t) {
586
587
  let n = e;
587
588
  for (let e of t) {
588
- if (!H(n)) return;
589
+ if (!V(n)) return;
589
590
  n = n[e];
590
591
  }
591
592
  return n;
592
593
  }
593
- function H(e) {
594
+ function V(e) {
594
595
  return typeof e == "object" && !!e && !Array.isArray(e);
595
596
  }
596
597
  //#endregion
597
598
  //#region src/stageComponentOutputs.ts
598
- function Xt() {
599
- let e = o(), { publishComponentOutputs: t, withdrawComponentOutputs: n } = z();
599
+ function $t() {
600
+ let e = o(), { publishComponentOutputs: t, withdrawComponentOutputs: n } = R();
600
601
  return a(() => () => n(e), [e, n]), r((n) => t(e, n), [t, e]);
601
602
  }
602
603
  //#endregion
603
604
  //#region src/commandExecutor.ts
604
- function U(e, t, n) {
605
+ function H(e, t, n) {
605
606
  for (let r of [
606
607
  t,
607
608
  n?.replace(/^\//, ""),
608
609
  e
609
610
  ]) {
610
611
  if (!r) continue;
611
- let t = Fe(r);
612
- if (Zt(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
612
+ let t = Re(r);
613
+ if (en(t) && !(r === e && n && new t().route.replace(/^\//, "") !== n.replace(/^\//, ""))) return t;
613
614
  }
614
615
  }
615
- function Zt(e) {
616
- return typeof e == "function" && e.prototype instanceof He;
616
+ function en(e) {
617
+ return typeof e == "function" && e.prototype instanceof Ge;
617
618
  }
618
- function Qt(e, t) {
619
- return e.setApiBasePath(ut(t)), e;
619
+ function tn(e, t) {
620
+ return e.setApiBasePath(pt(t)), e;
620
621
  }
621
- async function $t(e, t, n) {
622
- let r = U(e);
622
+ async function nn(e, t, n) {
623
+ let r = H(e);
623
624
  if (!r) return {
624
625
  isSuccess: !1,
625
626
  validationErrors: [],
626
627
  messages: [`The modeled command “${e}” is not registered by this Stage.`]
627
628
  };
628
629
  let i = new r();
629
- i.setMicroservice(n.microservice), i.setApiBasePath(ut(n.apiBasePath)), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
630
+ i.setMicroservice(n.microservice), i.setApiBasePath(pt(n.apiBasePath)), i.setOrigin(n.origin ?? ""), i.setHttpHeadersCallback(n.httpHeadersCallback ?? (() => ({})));
630
631
  for (let e of i.propertyDescriptors) Object.prototype.hasOwnProperty.call(t, e.name) && Reflect.set(i, e.name, t[e.name]);
631
- return en(e, await i.execute());
632
+ return rn(e, await i.execute());
632
633
  }
633
- function en(e, t) {
634
+ function rn(e, t) {
634
635
  let n = t.isSuccess && t.isAuthorized && t.isValid && !t.hasExceptions, r = t.isValid ? [] : t.validationResults.flatMap((e) => (e.members.length > 0 ? e.members : [""]).map((t) => ({
635
636
  member: t,
636
637
  message: e.message
@@ -646,53 +647,53 @@ function en(e, t) {
646
647
  messages: n || i.length > 0 ? i : [`“${e}” was not accepted.`]
647
648
  };
648
649
  }
649
- function tn() {
650
- let e = i(je);
651
- return r((t, n) => $t(t, n, e), [e]);
650
+ function an() {
651
+ let e = i(Pe);
652
+ return r((t, n) => nn(t, n, e), [e]);
652
653
  }
653
654
  //#endregion
654
655
  //#region src/stageNavigation.ts
655
- function nn(e, t = {}) {
656
+ function on(e, t = {}) {
656
657
  let n = new URLSearchParams(Object.entries(t).filter(([, e]) => e !== "")).toString();
657
658
  return n ? `#/${encodeURIComponent(e)}?${n}` : `#/${encodeURIComponent(e)}`;
658
659
  }
659
- function W(e, t = {}) {
660
+ function U(e, t = {}) {
660
661
  if (!globalThis.location) return;
661
- let n = nn(e, t);
662
+ let n = on(e, t);
662
663
  globalThis.location.hash !== n && (globalThis.location.hash = n);
663
664
  }
664
- function rn(e) {
665
- return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof Ve)).map(([e, t]) => [e, String(t)]));
665
+ function sn(e) {
666
+ return Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e != null && e !== "" && (typeof e != "object" || e instanceof We)).map(([e, t]) => [e, String(t)]));
666
667
  }
667
668
  //#endregion
668
669
  //#region src/stageFormSchema.ts
669
- var an = 8;
670
- function G(e) {
670
+ var cn = 8;
671
+ function W(e) {
671
672
  if (!e) return [];
672
673
  try {
673
- return on(JSON.parse(e), 0);
674
+ return ln(JSON.parse(e), 0);
674
675
  } catch {
675
676
  return [];
676
677
  }
677
678
  }
678
- function on(e, t) {
679
- let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i = mn(e.properties) ? e.properties : {};
680
- return Object.entries(i).map(([e, i]) => sn(e, i, !n || r.has(e), t));
679
+ function ln(e, t) {
680
+ let n = Object.prototype.hasOwnProperty.call(e, "required"), r = Array.isArray(e.required) ? new Set(e.required.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set(), i = _n(e.properties) ? e.properties : {};
681
+ return Object.entries(i).map(([e, i]) => un(e, i, !n || r.has(e), t));
681
682
  }
682
- function sn(e, t, n, r) {
683
+ function un(e, t, n, r) {
683
684
  return {
684
685
  name: e,
685
686
  identifier: t?.format === "uuid" && typeof t["x-concept"] == "string" ? t["x-concept"] : void 0,
686
687
  ...t?.["x-identity"] === !0 ? { identity: !0 } : {},
687
688
  required: n,
688
- ...cn(t, r)
689
+ ...dn(t, r)
689
690
  };
690
691
  }
691
- function cn(e, t) {
692
+ function dn(e, t) {
692
693
  let n = e?.type;
693
694
  if (Array.isArray(n)) {
694
695
  let r = n.filter((e) => e !== "null");
695
- return r.length === 1 ? cn({
696
+ return r.length === 1 ? dn({
696
697
  ...e,
697
698
  type: r[0]
698
699
  }, t) : { unsupportedReason: `union type ${JSON.stringify(n)}` };
@@ -703,8 +704,8 @@ function cn(e, t) {
703
704
  type: "date",
704
705
  withTime: e.format === "date-time"
705
706
  };
706
- if (n === "array") return ln(e, t);
707
- if (n === "object") return un(e, t);
707
+ if (n === "array") return fn(e, t);
708
+ if (n === "object") return pn(e, t);
708
709
  if (n === void 0 || n === "string") {
709
710
  let t = Array.isArray(e?.enum) ? e.enum.filter((e) => typeof e == "string") : [];
710
711
  return t.length > 0 ? {
@@ -714,77 +715,77 @@ function cn(e, t) {
714
715
  }
715
716
  return { unsupportedReason: `type ${String(n)}` };
716
717
  }
717
- function ln(e, t) {
718
+ function fn(e, t) {
718
719
  let n = { unsupportedReason: "array fields are not supported by the native Stage command form" };
719
- if (t >= an || e?.items === void 0) return n;
720
- let r = sn("", e.items, !0, t + 1);
720
+ if (t >= cn || e?.items === void 0) return n;
721
+ let r = un("", e.items, !0, t + 1);
721
722
  return r.unsupportedReason || r.item ? n : { item: r };
722
723
  }
723
- function un(e, t) {
724
+ function pn(e, t) {
724
725
  let n = { unsupportedReason: "object fields are not supported by the native Stage command form" };
725
- if (t >= an || !mn(e?.properties) || Object.keys(e.properties).length === 0) return n;
726
- let r = on(e, t + 1), i = r.find((e) => e.unsupportedReason);
726
+ if (t >= cn || !_n(e?.properties) || Object.keys(e.properties).length === 0) return n;
727
+ let r = ln(e, t + 1), i = r.find((e) => e.unsupportedReason);
727
728
  return i ? { unsupportedReason: `its member “${i.name}” is not supported: ${i.unsupportedReason}` } : { members: r };
728
729
  }
729
- function K(e) {
730
+ function G(e) {
730
731
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase();
731
732
  return t.charAt(0).toUpperCase() + t.slice(1);
732
733
  }
733
- function dn(e, t, n) {
734
+ function mn(e, t, n) {
734
735
  if (t != null) {
735
- if (e.members && mn(t)) for (let r of e.members) {
736
- let e = t[r.name], i = K(r.name);
737
- if (fn(e)) {
736
+ if (e.members && _n(t)) for (let r of e.members) {
737
+ let e = t[r.name], i = G(r.name);
738
+ if (hn(e)) {
738
739
  if (r.required) return `${n}: ${i} is required`;
739
740
  continue;
740
741
  }
741
- let a = dn(r, e, `${n} ${i.toLowerCase()}`);
742
+ let a = mn(r, e, `${n} ${i.toLowerCase()}`);
742
743
  if (a) return a;
743
744
  }
744
745
  if (e.item && Array.isArray(t)) for (let [r, i] of t.entries()) {
745
- let t = fn(i) ? `${n} ${r + 1} is required` : dn(e.item, i, `${n} ${r + 1}`);
746
+ let t = hn(i) ? `${n} ${r + 1} is required` : mn(e.item, i, `${n} ${r + 1}`);
746
747
  if (t) return t;
747
748
  }
748
749
  }
749
750
  }
750
- function fn(e) {
751
+ function hn(e) {
751
752
  return e == null || e === "";
752
753
  }
753
- function pn(e, t) {
754
- return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members && mn(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
754
+ function gn(e, t) {
755
+ return t == null ? t : e.options ? typeof t == "number" ? e.options[t] ?? t : typeof t == "string" ? e.options.find((e) => e.toLowerCase() === t.toLowerCase()) ?? t : t : e.members && _n(t) ? Object.fromEntries(Object.entries(t).map(([t, n]) => {
755
756
  let r = e.members?.find((e) => e.name === t);
756
- return [t, r ? pn(r, n) : n];
757
- })) : e.item && Array.isArray(t) ? t.map((t) => pn(e.item, t)) : t;
757
+ return [t, r ? gn(r, n) : n];
758
+ })) : e.item && Array.isArray(t) ? t.map((t) => gn(e.item, t)) : t;
758
759
  }
759
- function mn(e) {
760
+ function _n(e) {
760
761
  return typeof e == "object" && !!e && !Array.isArray(e);
761
762
  }
762
763
  //#endregion
763
764
  //#region src/StageValueFields.tsx
764
- var hn = We((e) => /* @__PURE__ */ P(gn, {
765
+ var vn = qe((e) => /* @__PURE__ */ N(yn, {
765
766
  descriptor: e.descriptor,
766
- label: e.title ?? K(e.descriptor.name),
767
+ label: e.title ?? G(e.descriptor.name),
767
768
  value: e.value,
768
769
  onChange: e.onChange,
769
770
  onBlur: e.onBlur,
770
771
  invalid: e.invalid
771
772
  }), { defaultValue: void 0 });
772
- function gn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
773
- return e.members ? /* @__PURE__ */ P(_n, {
773
+ function yn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
774
+ return e.members ? /* @__PURE__ */ N(bn, {
774
775
  descriptor: e,
775
776
  label: t,
776
777
  value: n,
777
778
  onChange: r,
778
779
  onBlur: i,
779
780
  invalid: a
780
- }) : e.item ? /* @__PURE__ */ P(vn, {
781
+ }) : e.item ? /* @__PURE__ */ N(xn, {
781
782
  descriptor: e,
782
783
  label: t,
783
784
  value: n,
784
785
  onChange: r,
785
786
  onBlur: i,
786
787
  invalid: a
787
- }) : /* @__PURE__ */ P(yn, {
788
+ }) : /* @__PURE__ */ N(Sn, {
788
789
  descriptor: e,
789
790
  label: t,
790
791
  value: n,
@@ -793,14 +794,14 @@ function gn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
793
794
  invalid: a
794
795
  });
795
796
  }
796
- function _n({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
797
- let o = Sn(n) ? n : {};
798
- return /* @__PURE__ */ F("fieldset", {
797
+ function bn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
798
+ let o = Tn(n) ? n : {};
799
+ return /* @__PURE__ */ P("fieldset", {
799
800
  className: "stage-record-field",
800
801
  "data-invalid": a ? "true" : void 0,
801
- children: [/* @__PURE__ */ P("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ P(gn, {
802
+ children: [/* @__PURE__ */ N("legend", { children: t }), (e.members ?? []).map((e) => /* @__PURE__ */ N(yn, {
802
803
  descriptor: e,
803
- label: K(e.name),
804
+ label: G(e.name),
804
805
  value: o[e.name],
805
806
  onBlur: i,
806
807
  onChange: (t) => r({
@@ -810,74 +811,74 @@ function _n({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
810
811
  }, e.name))]
811
812
  });
812
813
  }
813
- function vn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
814
+ function xn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
814
815
  let o = e.item, s = Array.isArray(n) ? n : [], c = (e) => r(e);
815
- return /* @__PURE__ */ F("fieldset", {
816
+ return /* @__PURE__ */ P("fieldset", {
816
817
  className: "stage-list-field",
817
818
  "data-invalid": a ? "true" : void 0,
818
819
  children: [
819
- /* @__PURE__ */ P("legend", { children: t }),
820
- s.length === 0 && /* @__PURE__ */ P("p", {
820
+ /* @__PURE__ */ N("legend", { children: t }),
821
+ s.length === 0 && /* @__PURE__ */ N("p", {
821
822
  className: "stage-note",
822
823
  children: "Nothing added yet."
823
824
  }),
824
- s.map((e, n) => /* @__PURE__ */ F("div", {
825
+ s.map((e, n) => /* @__PURE__ */ P("div", {
825
826
  className: "stage-list-field__row",
826
- children: [/* @__PURE__ */ P(gn, {
827
+ children: [/* @__PURE__ */ N(yn, {
827
828
  descriptor: o,
828
829
  label: `${t} ${n + 1}`,
829
830
  value: e,
830
831
  onBlur: i,
831
832
  onChange: (e) => c(s.map((t, r) => r === n ? e : t))
832
- }), /* @__PURE__ */ P("button", {
833
+ }), /* @__PURE__ */ N("button", {
833
834
  type: "button",
834
835
  "aria-label": `Remove ${t} ${n + 1}`,
835
836
  onClick: () => c(s.filter((e, t) => t !== n)),
836
837
  children: "Remove"
837
838
  })]
838
839
  }, n)),
839
- /* @__PURE__ */ P("button", {
840
+ /* @__PURE__ */ N("button", {
840
841
  type: "button",
841
842
  "aria-label": `Add ${t}`,
842
- onClick: () => c([...s, bn(o)]),
843
+ onClick: () => c([...s, Cn(o)]),
843
844
  children: "Add"
844
845
  })
845
846
  ]
846
847
  });
847
848
  }
848
- function yn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
849
+ function Sn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid: a }) {
849
850
  let o = {
850
851
  "aria-invalid": a ? !0 : void 0,
851
852
  onBlur: i
852
853
  };
853
- if (e.options) return /* @__PURE__ */ F("label", {
854
+ if (e.options) return /* @__PURE__ */ P("label", {
854
855
  className: "stage-value-field",
855
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ F("select", {
856
+ children: [/* @__PURE__ */ N("span", { children: t }), /* @__PURE__ */ P("select", {
856
857
  ...o,
857
858
  value: typeof n == "string" ? n : "",
858
859
  onChange: (e) => r(e.target.value === "" ? void 0 : e.target.value),
859
- children: [/* @__PURE__ */ P("option", {
860
+ children: [/* @__PURE__ */ N("option", {
860
861
  value: "",
861
862
  children: ""
862
- }), e.options.map((e) => /* @__PURE__ */ P("option", {
863
+ }), e.options.map((e) => /* @__PURE__ */ N("option", {
863
864
  value: e,
864
- children: K(e)
865
+ children: G(e)
865
866
  }, e))]
866
867
  })]
867
868
  });
868
869
  switch (e.type) {
869
- case "boolean": return /* @__PURE__ */ F("label", {
870
+ case "boolean": return /* @__PURE__ */ P("label", {
870
871
  className: "stage-value-field stage-value-field--check",
871
- children: [/* @__PURE__ */ P("input", {
872
+ children: [/* @__PURE__ */ N("input", {
872
873
  ...o,
873
874
  type: "checkbox",
874
875
  checked: n === !0,
875
876
  onChange: (e) => r(e.target.checked)
876
- }), /* @__PURE__ */ P("span", { children: t })]
877
+ }), /* @__PURE__ */ N("span", { children: t })]
877
878
  });
878
- case "number": return /* @__PURE__ */ F("label", {
879
+ case "number": return /* @__PURE__ */ P("label", {
879
880
  className: "stage-value-field",
880
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
881
+ children: [/* @__PURE__ */ N("span", { children: t }), /* @__PURE__ */ N("input", {
881
882
  ...o,
882
883
  type: "number",
883
884
  step: "any",
@@ -885,18 +886,18 @@ function yn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
885
886
  onChange: (e) => r(e.target.value === "" ? void 0 : Number(e.target.value))
886
887
  })]
887
888
  });
888
- case "date": return /* @__PURE__ */ F("label", {
889
+ case "date": return /* @__PURE__ */ P("label", {
889
890
  className: "stage-value-field",
890
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
891
+ children: [/* @__PURE__ */ N("span", { children: t }), /* @__PURE__ */ N("input", {
891
892
  ...o,
892
893
  type: e.withTime ? "datetime-local" : "date",
893
894
  value: typeof n == "string" ? n.slice(0, e.withTime ? 16 : 10) : "",
894
- onChange: (t) => r(t.target.value === "" ? void 0 : xn(t.target.value, e.withTime === !0))
895
+ onChange: (t) => r(t.target.value === "" ? void 0 : wn(t.target.value, e.withTime === !0))
895
896
  })]
896
897
  });
897
- default: return /* @__PURE__ */ F("label", {
898
+ default: return /* @__PURE__ */ P("label", {
898
899
  className: "stage-value-field",
899
- children: [/* @__PURE__ */ P("span", { children: t }), /* @__PURE__ */ P("input", {
900
+ children: [/* @__PURE__ */ N("span", { children: t }), /* @__PURE__ */ N("input", {
900
901
  ...o,
901
902
  type: "text",
902
903
  value: typeof n == "string" ? n : "",
@@ -905,25 +906,25 @@ function yn({ descriptor: e, label: t, value: n, onChange: r, onBlur: i, invalid
905
906
  });
906
907
  }
907
908
  }
908
- function bn(e) {
909
+ function Cn(e) {
909
910
  return e.members ? {} : void 0;
910
911
  }
911
- function xn(e, t) {
912
+ function wn(e, t) {
912
913
  if (!t) return e;
913
914
  let n = new Date(e);
914
915
  return Number.isNaN(n.getTime()) ? e : n.toISOString();
915
916
  }
916
- function Sn(e) {
917
+ function Tn(e) {
917
918
  return typeof e == "object" && !!e && !Array.isArray(e);
918
919
  }
919
920
  //#endregion
920
921
  //#region src/StageCommandForm.tsx
921
- var Cn = t(void 0);
922
- function q({ element: e }) {
923
- let t = z(), n = i(je), r = i(Cn), a = s(() => Tn(e), [e]), o = s(() => rr(e), [e]), c = typeof e.properties.schema == "string", u = s(() => a ? En(a, o) : [], [a, o]), d = a ? U(a.command, Y(e, "typeName"), Y(e, "route")) : void 0, f = Gn(e, u, t.resolveArgument), p = Un(e, o, t), m = JSON.stringify(p ?? null), h = s(() => p, [m]), g = s(() => Bn(t.selections, t.queries), [t.selections, t.queries]), _ = s(() => zn(t.queries), [t.queries]), v = e.properties.rowAction === !0, y = s(() => ({
922
+ var En = t(void 0);
923
+ function K({ element: e }) {
924
+ let t = R(), n = i(Pe), r = i(En), a = s(() => On(e), [e]), o = s(() => ar(e), [e]), c = typeof e.properties.schema == "string", u = s(() => a ? kn(a, o) : [], [a, o]), d = a ? H(a.command, Y(e, "typeName"), Y(e, "route")) : void 0, f = qn(e, u, t.resolveArgument), p = Gn(e, o, t), m = JSON.stringify(p ?? null), h = s(() => p, [m]), g = s(() => Hn(t.selections, t.queries), [t.selections, t.queries]), _ = s(() => Vn(t.queries), [t.queries]), v = e.properties.rowAction === !0, y = s(() => ({
924
925
  ...h,
925
- ...Mn(u, o, t.parameters, g, _, v),
926
- ...jn(u, t.parameters)
926
+ ...Fn(u, o, t.parameters, g, _, v),
927
+ ...Pn(u, t.parameters)
927
928
  }), [
928
929
  h,
929
930
  u,
@@ -932,91 +933,91 @@ function q({ element: e }) {
932
933
  g,
933
934
  _,
934
935
  v
935
- ]), b = s(() => a ? Dn(a, u, o) : void 0, [
936
+ ]), b = s(() => a ? An(a, u, o) : void 0, [
936
937
  a,
937
938
  u,
938
939
  o
939
- ]), x = s(() => a ? tr(u, o) : [], [
940
+ ]), x = s(() => a ? rr(u, o) : [], [
940
941
  a,
941
942
  u,
942
943
  o
943
- ]), S = s(() => a ? nr(a.layout, u) : [], [a, u]), [C, w] = l([]);
944
- return a ? !d && !t.routesReady ? /* @__PURE__ */ F("p", {
944
+ ]), S = s(() => a ? ir(a.layout, u) : [], [a, u]), [C, w] = l([]);
945
+ return a ? !d && !t.routesReady ? /* @__PURE__ */ P("p", {
945
946
  className: "stage-note",
946
947
  children: [
947
948
  "The modeled command “",
948
949
  a.command,
949
950
  "” is waiting for Stage routes."
950
951
  ]
951
- }) : d ? u.length === 0 && !c && e.properties.parameterless !== !0 ? /* @__PURE__ */ P(wn, {
952
+ }) : d ? u.length === 0 && !c && e.properties.parameterless !== !0 ? /* @__PURE__ */ N(Dn, {
952
953
  form: a,
953
954
  messages: [`The modeled command “${a.command}” has no form fields or schema metadata, so Stage will not submit an empty command body.`]
954
- }) : x.length > 0 ? /* @__PURE__ */ P(wn, {
955
+ }) : x.length > 0 ? /* @__PURE__ */ N(Dn, {
955
956
  form: a,
956
957
  messages: x
957
- }) : /* @__PURE__ */ P("section", {
958
+ }) : /* @__PURE__ */ N("section", {
958
959
  className: "stage-command-form",
959
960
  "data-command": a.command,
960
961
  "data-generation-mode": a.generationMode,
961
- children: /* @__PURE__ */ F(Ue, {
962
+ children: /* @__PURE__ */ P(Ke, {
962
963
  command: d,
963
964
  initialValues: y,
964
965
  currentValues: f,
965
966
  validateOn: "both",
966
967
  validateAllFieldsOnChange: !0,
967
- onBeforeExecute: (e) => Qt(e, n.apiBasePath),
968
- onFieldValidate: (e, t, n, r) => er(u, o, t, r),
969
- onValidationFailure: (e) => w($n(u, e)),
968
+ onBeforeExecute: (e) => tn(e, n.apiBasePath),
969
+ onFieldValidate: (e, t, n, r) => nr(u, o, t, r),
970
+ onValidationFailure: (e) => w(tr(u, e)),
970
971
  onException: (e) => w(e),
971
- onFailed: (e) => w(en(a.command, e).messages),
972
+ onFailed: (e) => w(rn(a.command, e).messages),
972
973
  onSuccess: () => {
973
974
  w([]), t.refreshAfterCommand();
974
975
  let n = Y(e, "navigateToScreen");
975
- n && W(n, {}), r?.();
976
+ n && U(n, {}), r?.();
976
977
  },
977
978
  children: [
978
- S.map((e) => /* @__PURE__ */ P("p", {
979
+ S.map((e) => /* @__PURE__ */ N("p", {
979
980
  role: "alert",
980
981
  className: "stage-form-error",
981
982
  children: e
982
983
  }, e)),
983
984
  b,
984
- C.map((e) => /* @__PURE__ */ P("p", {
985
+ C.map((e) => /* @__PURE__ */ N("p", {
985
986
  role: "alert",
986
987
  className: "stage-form-error",
987
988
  children: e
988
989
  }, e)),
989
- /* @__PURE__ */ P("button", {
990
+ /* @__PURE__ */ N("button", {
990
991
  type: "submit",
991
992
  children: Y(e, "submitLabel") || `Execute ${a.label}`
992
993
  })
993
994
  ]
994
995
  }, m)
995
- }) : /* @__PURE__ */ F("p", {
996
+ }) : /* @__PURE__ */ P("p", {
996
997
  className: "stage-note",
997
998
  children: [
998
999
  "The modeled command “",
999
1000
  a.command,
1000
1001
  "” is not registered by this Stage."
1001
1002
  ]
1002
- }) : /* @__PURE__ */ P("p", {
1003
+ }) : /* @__PURE__ */ N("p", {
1003
1004
  className: "stage-note",
1004
1005
  children: "This form is missing its command metadata."
1005
1006
  });
1006
1007
  }
1007
- function wn({ form: e, messages: t }) {
1008
- return /* @__PURE__ */ P("section", {
1008
+ function Dn({ form: e, messages: t }) {
1009
+ return /* @__PURE__ */ N("section", {
1009
1010
  className: "stage-command-form",
1010
1011
  "data-command": e.command,
1011
1012
  "data-generation-mode": e.generationMode,
1012
- children: t.map((e) => /* @__PURE__ */ P("p", {
1013
+ children: t.map((e) => /* @__PURE__ */ N("p", {
1013
1014
  role: "alert",
1014
1015
  className: "stage-form-error",
1015
1016
  children: e
1016
1017
  }, e))
1017
1018
  });
1018
1019
  }
1019
- function Tn(e) {
1020
+ function On(e) {
1020
1021
  let t = Y(e, "command");
1021
1022
  if (!t) return;
1022
1023
  let n = Array.isArray(e.properties.fields) ? e.properties.fields.filter(X) : [];
@@ -1024,41 +1025,41 @@ function Tn(e) {
1024
1025
  command: t,
1025
1026
  label: Y(e, "label", t),
1026
1027
  fields: n,
1027
- generationMode: qn(e.properties.generationMode),
1028
- layout: Jn(e.properties.layout)
1028
+ generationMode: Yn(e.properties.generationMode),
1029
+ layout: Xn(e.properties.layout)
1029
1030
  };
1030
1031
  }
1031
- function En(e, t) {
1032
+ function kn(e, t) {
1032
1033
  return e.generationMode === f.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
1033
1034
  name: e.name,
1034
- label: K(e.name)
1035
+ label: G(e.name)
1035
1036
  }));
1036
1037
  }
1037
- function Dn(e, t, n) {
1038
- let r = e.layout, i = r ? Yn(r, t) : [];
1039
- if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => On(e, n));
1040
- let a = new Map(t.map((e) => [e.name, e])), o = Xn(r, i), s = {
1041
- gridTemplateColumns: Array.from({ length: o }, (e, t) => Zn(t + 1, r.columns)).join(" "),
1038
+ function An(e, t, n) {
1039
+ let r = e.layout, i = r ? Zn(r, t) : [];
1040
+ if (!r || r.columns.length === 0 && i.length === 0) return t.map((e) => jn(e, n));
1041
+ let a = new Map(t.map((e) => [e.name, e])), o = Qn(r, i), s = {
1042
+ gridTemplateColumns: Array.from({ length: o }, (e, t) => $n(t + 1, r.columns)).join(" "),
1042
1043
  columnGap: J(r.columnGap),
1043
1044
  rowGap: J(r.rowGap)
1044
1045
  }, c = /* @__PURE__ */ new Set();
1045
- return /* @__PURE__ */ F("div", {
1046
+ return /* @__PURE__ */ P("div", {
1046
1047
  className: "stage-command-form__layout",
1047
1048
  style: s,
1048
1049
  children: [i.map((e) => {
1049
1050
  let t = a.get(e.field);
1050
- return t ? (c.add(t.name), On(t, n, e)) : null;
1051
- }), t.filter((e) => !c.has(e.name)).map((e) => On(e, n))]
1051
+ return t ? (c.add(t.name), jn(t, n, e)) : null;
1052
+ }), t.filter((e) => !c.has(e.name)).map((e) => jn(e, n))]
1052
1053
  });
1053
1054
  }
1054
- function On(e, t, n) {
1055
+ function jn(e, t, n) {
1055
1056
  let r = e.sourceProperty ?? e.name, i = t.find((e) => e.name === r), a = e.label ?? e.name, o = (e) => e[r], s = i?.required ?? !0, c = (() => {
1056
1057
  if (i?.options) {
1057
1058
  let e = i.options.map((e) => ({
1058
1059
  value: e,
1059
- label: K(e)
1060
+ label: G(e)
1060
1061
  }));
1061
- return /* @__PURE__ */ P(Je, {
1062
+ return /* @__PURE__ */ N(Ze, {
1062
1063
  value: o,
1063
1064
  fieldName: r,
1064
1065
  title: a,
@@ -1068,7 +1069,7 @@ function On(e, t, n) {
1068
1069
  optionLabel: "label"
1069
1070
  });
1070
1071
  }
1071
- if (i?.members || i?.item) return /* @__PURE__ */ P(hn, {
1072
+ if (i?.members || i?.item) return /* @__PURE__ */ N(vn, {
1072
1073
  value: o,
1073
1074
  fieldName: r,
1074
1075
  title: a,
@@ -1076,19 +1077,19 @@ function On(e, t, n) {
1076
1077
  descriptor: i
1077
1078
  });
1078
1079
  switch (i?.type ?? "text") {
1079
- case "number": return /* @__PURE__ */ P(Xe, {
1080
+ case "number": return /* @__PURE__ */ N($e, {
1080
1081
  value: o,
1081
1082
  fieldName: r,
1082
1083
  title: a,
1083
1084
  required: s
1084
1085
  });
1085
- case "boolean": return /* @__PURE__ */ P(qe, {
1086
+ case "boolean": return /* @__PURE__ */ N(Xe, {
1086
1087
  value: o,
1087
1088
  fieldName: r,
1088
1089
  label: a,
1089
1090
  required: s
1090
1091
  });
1091
- case "date": return /* @__PURE__ */ P(kn, {
1092
+ case "date": return /* @__PURE__ */ N(Mn, {
1092
1093
  value: o,
1093
1094
  fieldName: r,
1094
1095
  title: a,
@@ -1096,15 +1097,15 @@ function On(e, t, n) {
1096
1097
  showIcon: !0,
1097
1098
  showTime: i?.withTime
1098
1099
  });
1099
- default: return /* @__PURE__ */ P(Ye, {
1100
+ default: return /* @__PURE__ */ N(Qe, {
1100
1101
  value: o,
1101
1102
  fieldName: r,
1102
1103
  title: a,
1103
1104
  required: s
1104
1105
  });
1105
1106
  }
1106
- })(), l = Qn(n);
1107
- return /* @__PURE__ */ P("span", {
1107
+ })(), l = er(n);
1108
+ return /* @__PURE__ */ N("span", {
1108
1109
  className: "stage-command-form__field",
1109
1110
  "data-field": e.name,
1110
1111
  "data-row": n?.row,
@@ -1114,21 +1115,21 @@ function On(e, t, n) {
1114
1115
  children: c
1115
1116
  }, e.name);
1116
1117
  }
1117
- var kn = Ge((e) => /* @__PURE__ */ P(Ke, {
1118
+ var Mn = Je((e) => /* @__PURE__ */ N(Ye, {
1118
1119
  ...e,
1119
- currentValue: e.showTime ? e.currentValue : An(e.currentValue),
1120
- onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? Be.fromDate(t) : t)
1120
+ currentValue: e.showTime ? e.currentValue : Nn(e.currentValue),
1121
+ onValueChange: (t) => e.onValueChange?.(!e.showTime && t instanceof Date && !Number.isNaN(t.getTime()) ? Ue.fromDate(t) : t)
1121
1122
  }));
1122
- function An(e) {
1123
- if (e instanceof Be) return e.toDate();
1123
+ function Nn(e) {
1124
+ if (e instanceof Ue) return e.toDate();
1124
1125
  if (typeof e != "string") return e;
1125
1126
  try {
1126
- return Be.parse(e).toDate();
1127
+ return Ue.parse(e).toDate();
1127
1128
  } catch {
1128
1129
  return null;
1129
1130
  }
1130
1131
  }
1131
- function jn(e, t) {
1132
+ function Pn(e, t) {
1132
1133
  let n = {};
1133
1134
  for (let r of e) {
1134
1135
  let e = r.sourceProperty ?? r.name, i = t[e];
@@ -1136,35 +1137,35 @@ function jn(e, t) {
1136
1137
  }
1137
1138
  return n;
1138
1139
  }
1139
- function Mn(e, t, n, r = [], i = [], a = !1) {
1140
+ function Fn(e, t, n, r = [], i = [], a = !1) {
1140
1141
  let o = new Set(e.map((e) => e.sourceProperty ?? e.name)), s = t.some((e) => e.identity), c = {};
1141
1142
  for (let e of t) {
1142
1143
  if (!e.identifier || !e.required || o.has(e.name)) continue;
1143
- if (a && In(e, i)) {
1144
- let t = n[e.name] || Fn(e, r);
1144
+ if (a && Rn(e, i)) {
1145
+ let t = n[e.name] || q(e, r);
1145
1146
  t && (c[e.name] = t);
1146
1147
  continue;
1147
1148
  }
1148
- let t = n[e.name] || Fn(e, r) || jt(e.identifier) || (e.identity || !s && !In(e, i) ? Mt(e.identifier) : void 0);
1149
+ let t = n[e.name] || q(e, r) || Pt(e.identifier) || (e.identity || !s && !Rn(e, i) ? Ft(e.identifier) : void 0);
1149
1150
  t !== void 0 && (c[e.name] = t);
1150
1151
  }
1151
1152
  return c;
1152
1153
  }
1153
- function Nn(e, t) {
1154
- return !e.identifier || !e.required ? !1 : e.identity === !0 || Pn(e, t) !== void 0;
1154
+ function In(e, t) {
1155
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || Ln(e, t) !== void 0;
1155
1156
  }
1156
- function Pn(e, t) {
1157
- if (e.identifier) return t[e.name] || jt(e.identifier);
1157
+ function Ln(e, t) {
1158
+ if (e.identifier) return t[e.name] || Pt(e.identifier);
1158
1159
  }
1159
- function Fn(e, t) {
1160
+ function q(e, t) {
1160
1161
  if (!e.identifier) return;
1161
1162
  let n = new Set(t.map((t) => t[e.name]).filter((e) => typeof e == "string" && e !== ""));
1162
1163
  return n.size === 1 ? [...n][0] : void 0;
1163
1164
  }
1164
- function In(e, t) {
1165
+ function Rn(e, t) {
1165
1166
  return t.some((t) => Object.hasOwn(t, e.name));
1166
1167
  }
1167
- function Ln(e, t) {
1168
+ function zn(e, t) {
1168
1169
  let n = e.id;
1169
1170
  if (typeof n != "string" || n === "") return e;
1170
1171
  let r = `${t.alias ?? ""} ${t.name ?? ""}`.match(/[A-Z][a-z0-9]+/g) ?? [], i = Object.fromEntries(r.map((e) => `${e.charAt(0).toLowerCase()}${e.slice(1)}Id`).filter((t) => !Object.hasOwn(e, t)).map((e) => [e, n]));
@@ -1173,25 +1174,25 @@ function Ln(e, t) {
1173
1174
  ...e
1174
1175
  };
1175
1176
  }
1176
- function Rn(e) {
1177
- return Object.values(e).flatMap((e) => e.rows.map((t) => [t, Ln(t, e)]));
1177
+ function Bn(e) {
1178
+ return Object.values(e).flatMap((e) => e.rows.map((t) => [t, zn(t, e)]));
1178
1179
  }
1179
- function zn(e) {
1180
- return Rn(e).map(([, e]) => e);
1180
+ function Vn(e) {
1181
+ return Bn(e).map(([, e]) => e);
1181
1182
  }
1182
- function Bn(e, t) {
1183
- let n = new Map(Rn(t));
1183
+ function Hn(e, t) {
1184
+ let n = new Map(Bn(t));
1184
1185
  return Object.values(e).filter((e) => e !== void 0).map((e) => n.get(e) ?? e);
1185
1186
  }
1186
- function Vn(e, t, n, r) {
1187
- return e.filter((e) => e.identifier && e.required && In(e, r)).filter((e) => !t[e.name] && Fn(e, n) === void 0).map((e) => e.name);
1187
+ function Un(e, t, n, r) {
1188
+ return e.filter((e) => e.identifier && e.required && Rn(e, r)).filter((e) => !t[e.name] && q(e, n) === void 0).map((e) => e.name);
1188
1189
  }
1189
- function Hn(e) {
1190
+ function Wn(e) {
1190
1191
  let t = e.properties.populateSource;
1191
1192
  return X(t) ? t : void 0;
1192
1193
  }
1193
- function Un(e, t, n) {
1194
- let r = Hn(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, Wn(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = B({
1194
+ function Gn(e, t, n) {
1195
+ let r = Wn(e), i = r?.queryName, a = Object.entries(r?.parameterBindings ?? {}).map(([e, r]) => [e, Kn(e, r?.path ?? e, t, n)]), o = Object.fromEntries(a.filter(([, e]) => e !== void 0 && e !== "")), c = !!i && n.routesReady && a.every(([, e]) => e !== void 0 && e !== ""), l = z({
1195
1196
  scope: `populate:${Y(e, "command")}`,
1196
1197
  name: i,
1197
1198
  route: i ? n.routes?.queries?.[i] : void 0,
@@ -1204,58 +1205,58 @@ function Un(e, t, n) {
1204
1205
  let e = {};
1205
1206
  for (let n of t) {
1206
1207
  let t = d[n.name] ?? d[n.name.charAt(0).toLowerCase() + n.name.slice(1)];
1207
- t != null && (e[n.name] = pn(n, t));
1208
+ t != null && (e[n.name] = gn(n, t));
1208
1209
  }
1209
1210
  return Object.keys(e).length > 0 ? e : void 0;
1210
1211
  }, [d, t]);
1211
1212
  }
1212
- function Wn(e, t, n, r) {
1213
+ function Kn(e, t, n, r) {
1213
1214
  let i = r.parameters[t] ?? r.parameters[e];
1214
1215
  if (i) return i;
1215
1216
  let a = n.find((n) => n.name === t || n.name === e)?.identifier;
1216
- if (a) return Mt(a);
1217
+ if (a) return Ft(a);
1217
1218
  let o = r.resolveBinding({ path: t });
1218
1219
  return typeof o == "string" || typeof o == "number" ? o : void 0;
1219
1220
  }
1220
- function Gn(e, t, n) {
1221
- let r = s(() => Kn(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1221
+ function qn(e, t, n) {
1222
+ let r = s(() => Jn(e, t), [e, t]), i = r.map((e) => n(e.source)), a = JSON.stringify(i);
1222
1223
  return s(() => {
1223
1224
  let e = Object.fromEntries(r.map((e, t) => [e.name, i[t]]).filter(([, e]) => e != null && e !== ""));
1224
1225
  return Object.keys(e).length > 0 ? e : void 0;
1225
1226
  }, [r, a]);
1226
1227
  }
1227
- function Kn(e, t) {
1228
+ function Jn(e, t) {
1228
1229
  let n = e.properties.arguments;
1229
1230
  if (!Array.isArray(n)) return [];
1230
1231
  let r = new Set(t.map((e) => e.sourceProperty ?? e.name));
1231
1232
  return n.filter((e) => typeof e == "object" && !!e && typeof e.name == "string" && typeof e.source == "string" && r.has(e.name));
1232
1233
  }
1233
- function qn(e) {
1234
+ function Yn(e) {
1234
1235
  return e === f.Manual ? f.Manual : f.Auto;
1235
1236
  }
1236
- function Jn(e) {
1237
+ function Xn(e) {
1237
1238
  if (!X(e)) return;
1238
1239
  let t = e;
1239
1240
  return {
1240
- columns: Array.isArray(t.columns) ? t.columns.filter(ir) : [],
1241
- placements: Array.isArray(t.placements) ? t.placements.filter(ar) : [],
1242
- columnGap: or(t.columnGap) ? t.columnGap : void 0,
1243
- rowGap: or(t.rowGap) ? t.rowGap : void 0
1241
+ columns: Array.isArray(t.columns) ? t.columns.filter(or) : [],
1242
+ placements: Array.isArray(t.placements) ? t.placements.filter(sr) : [],
1243
+ columnGap: cr(t.columnGap) ? t.columnGap : void 0,
1244
+ rowGap: cr(t.rowGap) ? t.rowGap : void 0
1244
1245
  };
1245
1246
  }
1246
- function Yn(e, t) {
1247
+ function Zn(e, t) {
1247
1248
  let n = new Map(e.placements.map((e) => [e.field, e]));
1248
- for (let e of t) !n.has(e.name) && ar(e.placement) && n.set(e.name, e.placement);
1249
+ for (let e of t) !n.has(e.name) && sr(e.placement) && n.set(e.name, e.placement);
1249
1250
  return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
1250
1251
  }
1251
- function Xn(e, t) {
1252
+ function Qn(e, t) {
1252
1253
  return Math.max(1, ...e.columns.map((e) => e.index), ...t.map((e) => e.column + (e.columnSpan ?? 1) - 1));
1253
1254
  }
1254
- function Zn(e, t) {
1255
+ function $n(e, t) {
1255
1256
  let n = t.find((t) => t.index === e), r = J(n?.width), i = J(n?.minWidth), a = J(n?.maxWidth);
1256
1257
  return n?.width?.unit === p.Fraction && a ? `minmax(${i ?? "0"}, ${r ?? "1fr"})` : i || a ? `minmax(${i ?? "0"}, ${a && r ? `min(${r}, ${a})` : a ?? r ?? "1fr"})` : r ?? "1fr";
1257
1258
  }
1258
- function Qn(e) {
1259
+ function er(e) {
1259
1260
  if (e) return {
1260
1261
  gridColumn: `${e.column} / span ${e.columnSpan ?? 1}`,
1261
1262
  gridRow: `${e.row} / span ${e.rowSpan ?? 1}`,
@@ -1270,40 +1271,40 @@ function J(e) {
1270
1271
  case p.Auto: return "auto";
1271
1272
  }
1272
1273
  }
1273
- function $n(e, t) {
1274
+ function tr(e, t) {
1274
1275
  let n = (e, t) => !!e.members?.some((e) => e === t || e.startsWith(`${t}.`)), r = new Set(e.map((e) => t.find((t) => n(t, e.sourceProperty ?? e.name))).filter((e) => e !== void 0));
1275
1276
  return [...new Set(t.filter((e) => !r.has(e)).map((e) => e.message))];
1276
1277
  }
1277
- function er(e, t, n, r) {
1278
+ function nr(e, t, n, r) {
1278
1279
  let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
1279
- if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? dn(a, r, i?.label ?? n) : void 0;
1280
+ if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? mn(a, r, i?.label ?? n) : void 0;
1280
1281
  }
1281
- function tr(e, t) {
1282
+ function rr(e, t) {
1282
1283
  let n = new Map(t.map((e) => [e.name, e]));
1283
1284
  return e.flatMap((e) => {
1284
1285
  let t = n.get(e.sourceProperty ?? e.name);
1285
1286
  return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
1286
1287
  });
1287
1288
  }
1288
- function nr(e, t) {
1289
+ function ir(e, t) {
1289
1290
  if (!e) return [];
1290
- let n = Yn(e, t).filter((e) => e.width?.unit === p.Fraction).map((e) => `The field “${e.field}” uses a fractional field width, which cannot be applied to an individual form control.`), r = e.columns.filter((e) => e.width?.unit === p.Fraction && !!e.maxWidth).map((e) => `Column ${e.index} combines a fractional width with maxWidth; Stage keeps the fractional track and ignores maxWidth for that column.`);
1291
+ let n = Zn(e, t).filter((e) => e.width?.unit === p.Fraction).map((e) => `The field “${e.field}” uses a fractional field width, which cannot be applied to an individual form control.`), r = e.columns.filter((e) => e.width?.unit === p.Fraction && !!e.maxWidth).map((e) => `Column ${e.index} combines a fractional width with maxWidth; Stage keeps the fractional track and ignores maxWidth for that column.`);
1291
1292
  return [...n, ...r];
1292
1293
  }
1293
- function rr(e) {
1294
- return G(Y(e, "schema"));
1294
+ function ar(e) {
1295
+ return W(Y(e, "schema"));
1295
1296
  }
1296
1297
  function Y(e, t, n = "") {
1297
1298
  let r = e.properties[t];
1298
1299
  return typeof r == "string" ? r : n;
1299
1300
  }
1300
- function ir(e) {
1301
+ function or(e) {
1301
1302
  return X(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1302
1303
  }
1303
- function ar(e) {
1304
+ function sr(e) {
1304
1305
  return X(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1305
1306
  }
1306
- function or(e) {
1307
+ function cr(e) {
1307
1308
  return X(e) && Object.values(p).includes(e.unit);
1308
1309
  }
1309
1310
  function X(e) {
@@ -1311,23 +1312,23 @@ function X(e) {
1311
1312
  }
1312
1313
  //#endregion
1313
1314
  //#region src/StageGuardedAction.tsx
1314
- function sr(e) {
1315
+ function lr(e) {
1315
1316
  return typeof e == "object" && !!e && !Array.isArray(e);
1316
1317
  }
1317
- function cr(e, t) {
1318
+ function ur(e, t) {
1318
1319
  let n = e.properties[t];
1319
1320
  return typeof n == "string" ? n : "";
1320
1321
  }
1321
- function lr(e) {
1322
+ function dr(e) {
1322
1323
  return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
1323
1324
  }
1324
- function ur(e) {
1325
- let t = z(), n = cr(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? cr(e, "itemRoute"), i = sr(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1325
+ function fr(e) {
1326
+ let t = R(), n = ur(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? ur(e, "itemRoute"), i = lr(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
1326
1327
  for (let [e, n] of Object.entries(i)) {
1327
- let r = sr(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1328
+ let r = lr(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1328
1329
  a[e] = r, (r == null || r === "") && (o = !1);
1329
1330
  }
1330
- let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = B({
1331
+ let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = z({
1331
1332
  scope: `${e.id}:item`,
1332
1333
  name: n || void 0,
1333
1334
  route: r || void 0,
@@ -1343,23 +1344,23 @@ function ur(e) {
1343
1344
  item: l.rows.length === 1 ? l.rows[0] : void 0
1344
1345
  };
1345
1346
  }
1346
- function dr(e, t) {
1347
- return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, kt(vt(n) ?? "", t)]));
1347
+ function pr(e, t) {
1348
+ return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, Mt(xt(n) ?? "", t)]));
1348
1349
  }
1349
- function fr({ element: e, interactions: t }) {
1350
- let n = z(), r = ur(e), i = tn(), [a, o] = l([]), [c, u] = l(!1), d = cr(e, "label"), f = s(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = sr(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1351
- if (!Et(m) || !h || !r.hasSource) {
1352
- let n = r.hasSource ? `${yt}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${yt}: “${d}” has no data subject to evaluate its guard against.`;
1353
- return /* @__PURE__ */ F("div", {
1350
+ function mr({ element: e, interactions: t }) {
1351
+ let n = R(), r = fr(e), i = an(), [a, o] = l([]), [c, u] = l(!1), d = ur(e, "label"), f = s(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = lr(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
1352
+ if (!kt(m) || !h || !r.hasSource) {
1353
+ let n = r.hasSource ? `${St}: “${d}” has a guard this Stage cannot evaluate, so it stays unavailable.` : `${St}: “${d}” has no data subject to evaluate its guard against.`;
1354
+ return /* @__PURE__ */ P("div", {
1354
1355
  className: "stage-guarded-action",
1355
1356
  "data-scene-id": e.id,
1356
- children: [/* @__PURE__ */ P(I, {
1357
+ children: [/* @__PURE__ */ N(F, {
1357
1358
  type: "button",
1358
1359
  disabled: !0,
1359
1360
  title: n,
1360
1361
  ...t,
1361
1362
  children: d
1362
- }), /* @__PURE__ */ P("p", {
1363
+ }), /* @__PURE__ */ N("p", {
1363
1364
  role: "alert",
1364
1365
  className: "stage-form-error",
1365
1366
  children: n
@@ -1367,42 +1368,42 @@ function fr({ element: e, interactions: t }) {
1367
1368
  });
1368
1369
  }
1369
1370
  if (!r.item) return null;
1370
- let g = Dt(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1371
+ let g = At(m, r.item), _ = g !== void 0 && g >= 0 ? f[g] : p?.outcome === "Execute" ? p : void 0;
1371
1372
  if (!_?.command) return null;
1372
- let v = _.command, y = U(v), b = r.item, x = async () => {
1373
+ let v = _.command, y = H(v), b = r.item, x = async () => {
1373
1374
  if (!y) return;
1374
1375
  u(!0);
1375
- let t = await i(v, dr(_, b));
1376
+ let t = await i(v, pr(_, b));
1376
1377
  if (u(!1), o(t.messages), !t.isSuccess) return;
1377
1378
  n.refreshAfterCommand();
1378
- let r = cr(e, "navigateToScreen"), a = cr(e, "navigateByParameter"), s = a ? kt(`item.${a}`, b) : void 0;
1379
- r && W(r, a && s != null ? { [a]: String(s) } : {});
1379
+ let r = ur(e, "navigateToScreen"), a = ur(e, "navigateByParameter"), s = a ? Mt(`item.${a}`, b) : void 0;
1380
+ r && U(r, a && s != null ? { [a]: String(s) } : {});
1380
1381
  };
1381
- return /* @__PURE__ */ F("div", {
1382
+ return /* @__PURE__ */ P("div", {
1382
1383
  className: "stage-guarded-action",
1383
1384
  "data-scene-id": e.id,
1384
1385
  "data-command": v,
1385
- children: [/* @__PURE__ */ P(I, {
1386
+ children: [/* @__PURE__ */ N(F, {
1386
1387
  ...t,
1387
1388
  type: "button",
1388
1389
  disabled: !y || c,
1389
1390
  title: y ? void 0 : "This command is not exposed as an API yet",
1390
1391
  onClick: () => void x(),
1391
1392
  children: d
1392
- }), a.map((e) => /* @__PURE__ */ P("p", {
1393
+ }), a.map((e) => /* @__PURE__ */ N("p", {
1393
1394
  role: "alert",
1394
1395
  className: "stage-form-error",
1395
1396
  children: e
1396
1397
  }, e))]
1397
1398
  });
1398
1399
  }
1399
- function pr(e) {
1400
- let t = fe(), n = c(void 0), i = s(() => S(se(e.id, e.behaviors), m.DoubleClick), [e.behaviors, e.id]);
1400
+ function hr(e) {
1401
+ let t = me(), n = c(void 0), i = s(() => C(ue(e.id, e.behaviors), m.DoubleClick), [e.behaviors, e.id]);
1401
1402
  a(() => () => clearTimeout(n.current), []);
1402
1403
  let o = r((e) => {
1403
1404
  if (clearTimeout(n.current), n.current = void 0, !t) return;
1404
- let r = (n) => n.path === "$guard" ? Ot(n.value, e) : n.path?.startsWith("item.") ? kt(n.path, e) : t.context.resolve(n);
1405
- w(i, t.dispatcher, {
1405
+ let r = (n) => n.path === "$guard" ? jt(n.value, e) : n.path?.startsWith("item.") ? Mt(n.path, e) : t.context.resolve(n);
1406
+ te(i, t.dispatcher, {
1406
1407
  ...t.context,
1407
1408
  resolve: r
1408
1409
  }).then((e) => {
@@ -1424,12 +1425,12 @@ function pr(e) {
1424
1425
  }
1425
1426
  //#endregion
1426
1427
  //#region src/stageDialogScreens.ts
1427
- var mr = "Stage:confirmDialog", hr = "ConfirmDialog";
1428
- function gr(e, t) {
1428
+ var gr = "Stage:confirmDialog", _r = "ConfirmDialog";
1429
+ function vr(e, t) {
1429
1430
  let n = new Set(t.map((e) => e.name));
1430
1431
  return e.map((t) => {
1431
- if (t.screenTemplate !== hr || n.has(hr)) return t;
1432
- let r = _r(t), i = e.find((e) => e.name !== t.name)?.name, a = M(`confirm-dialog-${t.name}`, mr, {
1432
+ if (t.screenTemplate !== _r || n.has(_r)) return t;
1433
+ let r = yr(t), i = e.find((e) => e.name !== t.name)?.name, a = j(`confirm-dialog-${t.name}`, gr, {
1433
1434
  title: t.name,
1434
1435
  decisions: r,
1435
1436
  home: i
@@ -1442,100 +1443,100 @@ function gr(e, t) {
1442
1443
  };
1443
1444
  });
1444
1445
  }
1445
- function _r(e) {
1446
+ function yr(e) {
1446
1447
  let t = [];
1447
- for (let n of vr(Object.values(e.slotContent).flat())) {
1448
- let r = yr(n.properties.command);
1448
+ for (let n of br(Object.values(e.slotContent).flat())) {
1449
+ let r = xr(n.properties.command);
1449
1450
  r && !t.some((e) => e.command === r) && t.push({
1450
1451
  command: r,
1451
- label: yr(n.properties.label),
1452
- navigateToScreen: yr(n.properties.navigateToScreen),
1453
- typeName: yr(n.properties.typeName),
1454
- route: yr(n.properties.route),
1452
+ label: xr(n.properties.label),
1453
+ navigateToScreen: xr(n.properties.navigateToScreen),
1454
+ typeName: xr(n.properties.typeName),
1455
+ route: xr(n.properties.route),
1455
1456
  form: e.forms.find((e) => e.forCommand === r)
1456
1457
  });
1457
1458
  }
1458
1459
  return t;
1459
1460
  }
1460
- function vr(e) {
1461
+ function br(e) {
1461
1462
  return e.flatMap((e) => {
1462
1463
  let t = e;
1463
- return t.componentName === "core:action" ? [t] : vr(Object.values(t.slots ?? {}).flat());
1464
+ return t.componentName === "core:action" ? [t] : br(Object.values(t.slots ?? {}).flat());
1464
1465
  });
1465
1466
  }
1466
- function yr(e) {
1467
+ function xr(e) {
1467
1468
  return typeof e == "string" && e !== "" ? e : void 0;
1468
1469
  }
1469
1470
  //#endregion
1470
1471
  //#region src/StageConfirmDialog.tsx
1471
- function br({ element: e }) {
1472
- let { routes: t, parameters: n, queries: r, selections: i } = z(), [o, s] = l(), u = c(null), d = typeof e.properties.title == "string" ? e.properties.title : "", f = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], p = typeof e.properties.home == "string" ? e.properties.home : void 0, m = f.find((e) => e.command === o), h = Bn(i, r);
1473
- return a(() => u.current?.focus(), []), /* @__PURE__ */ F("section", {
1472
+ function Sr({ element: e }) {
1473
+ let { routes: t, parameters: n, queries: r, selections: i } = R(), [o, s] = l(), u = c(null), d = typeof e.properties.title == "string" ? e.properties.title : "", f = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], p = typeof e.properties.home == "string" ? e.properties.home : void 0, m = f.find((e) => e.command === o), h = Hn(i, r);
1474
+ return a(() => u.current?.focus(), []), /* @__PURE__ */ P("section", {
1474
1475
  className: "scene-slice-dialog stage-confirm-dialog",
1475
1476
  role: "dialog",
1476
- "aria-label": K(d),
1477
- "data-stage-component": mr,
1477
+ "aria-label": G(d),
1478
+ "data-stage-component": gr,
1478
1479
  children: [
1479
- /* @__PURE__ */ P("header", {
1480
+ /* @__PURE__ */ N("header", {
1480
1481
  className: "scene-slice-dialog-header",
1481
- children: /* @__PURE__ */ P("h2", {
1482
+ children: /* @__PURE__ */ N("h2", {
1482
1483
  className: "scene-slice-dialog-title",
1483
- children: K(d)
1484
+ children: G(d)
1484
1485
  })
1485
1486
  }),
1486
- /* @__PURE__ */ P("div", {
1487
+ /* @__PURE__ */ N("div", {
1487
1488
  className: "stage-confirm-dialog__decisions",
1488
- children: f.map((e, t) => /* @__PURE__ */ P("button", {
1489
+ children: f.map((e, t) => /* @__PURE__ */ N("button", {
1489
1490
  ref: t === 0 ? u : void 0,
1490
1491
  type: "button",
1491
1492
  className: t === 0 ? "scene-slice-dialog-submit stage-confirm-dialog__decision" : "scene-slice-dialog-cancel stage-confirm-dialog__decision",
1492
1493
  "data-emphasis": t === 0 ? "primary" : "secondary",
1493
1494
  "aria-pressed": e.command === o,
1494
1495
  onClick: () => s(e.command),
1495
- children: Sr(e)
1496
+ children: wr(e)
1496
1497
  }, e.command))
1497
1498
  }),
1498
- m && /* @__PURE__ */ P(q, { element: Tr(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command),
1499
- /* @__PURE__ */ P("footer", {
1499
+ m && /* @__PURE__ */ N(K, { element: Dr(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command),
1500
+ /* @__PURE__ */ N("footer", {
1500
1501
  className: "scene-slice-dialog-footer",
1501
- children: /* @__PURE__ */ P("button", {
1502
+ children: /* @__PURE__ */ N("button", {
1502
1503
  type: "button",
1503
1504
  className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
1504
- onClick: () => xr(f, p),
1505
+ onClick: () => Cr(f, p),
1505
1506
  children: "Cancel"
1506
1507
  })
1507
1508
  })
1508
1509
  ]
1509
1510
  });
1510
1511
  }
1511
- function xr(e, t) {
1512
+ function Cr(e, t) {
1512
1513
  let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
1513
- r && W(r, {});
1514
+ r && U(r, {});
1514
1515
  }
1515
- function Sr(e) {
1516
- return e.label ?? K(e.command);
1516
+ function wr(e) {
1517
+ return e.label ?? G(e.command);
1517
1518
  }
1518
- function Cr(e, t, n) {
1519
- return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Fn(e, n) !== void 0;
1519
+ function Tr(e, t, n) {
1520
+ return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || q(e, n) !== void 0;
1520
1521
  }
1521
- function wr(e, t, n, r) {
1522
+ function Er(e, t, n, r) {
1522
1523
  let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
1523
1524
  name: e.name,
1524
1525
  label: e.name
1525
- })), o = new Set(t.filter((e) => Cr(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
1526
+ })), o = new Set(t.filter((e) => Tr(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
1526
1527
  return [...s, ...l.map((e) => ({
1527
1528
  name: e.name,
1528
- label: K(e.name)
1529
+ label: G(e.name)
1529
1530
  }))];
1530
1531
  }
1531
- function Tr(e, t, n, r) {
1532
- let i = wr(e, G(t), n, r);
1532
+ function Dr(e, t, n, r) {
1533
+ let i = Er(e, W(t), n, r);
1533
1534
  return {
1534
1535
  id: `confirm-${e.command}`,
1535
- componentName: mr,
1536
+ componentName: gr,
1536
1537
  properties: {
1537
1538
  command: e.command,
1538
- label: Sr(e),
1539
+ label: wr(e),
1539
1540
  submitLabel: "Confirm",
1540
1541
  typeName: e.typeName,
1541
1542
  route: e.route,
@@ -1551,8 +1552,8 @@ function Tr(e, t, n, r) {
1551
1552
  }
1552
1553
  //#endregion
1553
1554
  //#region src/stageComponents.tsx
1554
- var Er = "Stage:commandForm";
1555
- function Dr(e, t, n = {}) {
1555
+ var Or = "Stage:commandForm";
1556
+ function kr(e, t, n = {}) {
1556
1557
  return {
1557
1558
  id: e,
1558
1559
  componentName: "",
@@ -1564,19 +1565,19 @@ function Z(e, t, n = "") {
1564
1565
  let r = e.properties[t];
1565
1566
  return typeof r == "string" ? r : n;
1566
1567
  }
1567
- function Or(e, t, n) {
1568
+ function Ar(e, t, n) {
1568
1569
  let r = typeof e == "number" && Number.isInteger(e) ? n && n.length === t?.length ? t?.[n.indexOf(e)] : t?.[e] : e;
1569
- return typeof r == "string" && t?.includes(r) ? K(r) : String(e ?? "");
1570
+ return typeof r == "string" && t?.includes(r) ? G(r) : String(e ?? "");
1570
1571
  }
1571
- function kr(e, t) {
1572
+ function jr(e, t) {
1572
1573
  let n = e.properties.queryArguments;
1573
- if (!Nr(n)) return {
1574
+ if (!Fr(n)) return {
1574
1575
  values: {},
1575
1576
  ready: !0
1576
1577
  };
1577
1578
  let r = {}, i = !0;
1578
1579
  for (let [e, a] of Object.entries(n)) {
1579
- let n = Mr(a) ? t.resolveBinding(a) : a;
1580
+ let n = Pr(a) ? t.resolveBinding(a) : a;
1580
1581
  r[e] = n, (n == null || n === "") && (i = !1);
1581
1582
  }
1582
1583
  return {
@@ -1584,7 +1585,7 @@ function kr(e, t) {
1584
1585
  ready: i
1585
1586
  };
1586
1587
  }
1587
- function Ar(e, t) {
1588
+ function Mr(e, t) {
1588
1589
  let n = (e.slots.columns ?? []).map((e) => {
1589
1590
  let t = e.properties;
1590
1591
  return {
@@ -1602,14 +1603,14 @@ function Ar(e, t) {
1602
1603
  function Q(e, t) {
1603
1604
  return e[t] ?? e.id ?? e.key;
1604
1605
  }
1605
- function jr({ element: e, slots: t }) {
1606
- let n = z(), r = Z(e, "query", Z(e, "typeName", e.id)), i = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), o = s(() => kr(e, n), [n, e]), { rows: c, error: l, loading: u } = B({
1606
+ function Nr({ element: e, slots: t }) {
1607
+ let n = R(), r = Z(e, "query", Z(e, "typeName", e.id)), i = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), o = s(() => jr(e, n), [n, e]), { rows: c, error: l, loading: u } = z({
1607
1608
  scope: e.id,
1608
1609
  name: r,
1609
1610
  route: i || void 0,
1610
1611
  arguments: o.values,
1611
1612
  ready: o.ready
1612
- }), d = Ar(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = pr(e);
1613
+ }), d = Mr(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = hr(e);
1613
1614
  a(() => {
1614
1615
  if (!h) return;
1615
1616
  let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
@@ -1650,15 +1651,15 @@ function jr({ element: e, slots: t }) {
1650
1651
  ...f && f !== n.screen ? {} : n.parameters,
1651
1652
  [p]: String(r)
1652
1653
  };
1653
- (!f || f === n.screen) && n.selectRow(e.id, t), W(f || n.screen, i);
1654
+ (!f || f === n.screen) && n.selectRow(e.id, t), U(f || n.screen, i);
1654
1655
  return;
1655
1656
  }
1656
1657
  n.selectRow(e.id, t);
1657
1658
  };
1658
- return !Z(e, "query") && !i && !pt(r) ? /* @__PURE__ */ F("section", {
1659
+ return !Z(e, "query") && !i && !gt(r) ? /* @__PURE__ */ P("section", {
1659
1660
  className: "stage-table",
1660
1661
  "data-scene-id": e.id,
1661
- children: [/* @__PURE__ */ F("p", {
1662
+ children: [/* @__PURE__ */ P("p", {
1662
1663
  className: "stage-note",
1663
1664
  children: [
1664
1665
  "No query is exposed for ",
@@ -1666,34 +1667,34 @@ function jr({ element: e, slots: t }) {
1666
1667
  " yet."
1667
1668
  ]
1668
1669
  }), t.columns]
1669
- }) : /* @__PURE__ */ F("section", {
1670
+ }) : /* @__PURE__ */ P("section", {
1670
1671
  className: "stage-table",
1671
1672
  "data-scene-id": e.id,
1672
1673
  children: [
1673
- u && /* @__PURE__ */ P(ze, {
1674
+ u && /* @__PURE__ */ N(He, {
1674
1675
  severity: "info",
1675
1676
  text: "Loading…"
1676
1677
  }),
1677
- l && /* @__PURE__ */ P(ze, {
1678
+ l && /* @__PURE__ */ N(He, {
1678
1679
  severity: "error",
1679
1680
  text: l
1680
1681
  }),
1681
- h && /* @__PURE__ */ P(I, {
1682
+ h && /* @__PURE__ */ N(F, {
1682
1683
  type: "button",
1683
1684
  size: "small",
1684
1685
  onClick: () => {
1685
1686
  if (n.clearSelection(e.id), !p || n.parameters[p] === void 0) return;
1686
1687
  let { [p]: t, ...r } = n.parameters;
1687
- W(n.screen, r);
1688
+ U(n.screen, r);
1688
1689
  },
1689
1690
  children: "Clear selection"
1690
1691
  }),
1691
- /* @__PURE__ */ F("table", {
1692
+ /* @__PURE__ */ P("table", {
1692
1693
  "aria-label": Z(e, "label", Z(e, "typeName", "Results")),
1693
- children: [/* @__PURE__ */ P("thead", { children: /* @__PURE__ */ P("tr", { children: d.map((e) => /* @__PURE__ */ P("th", {
1694
+ children: [/* @__PURE__ */ N("thead", { children: /* @__PURE__ */ N("tr", { children: d.map((e) => /* @__PURE__ */ N("th", {
1694
1695
  scope: "col",
1695
1696
  children: e.label
1696
- }, e.property)) }) }), /* @__PURE__ */ F("tbody", { children: [c.map((e, t) => /* @__PURE__ */ P("tr", {
1697
+ }, e.property)) }) }), /* @__PURE__ */ P("tbody", { children: [c.map((e, t) => /* @__PURE__ */ N("tr", {
1697
1698
  "aria-selected": h === e,
1698
1699
  tabIndex: 0,
1699
1700
  onClick: () => _.click(e, () => v(e)),
@@ -1701,8 +1702,8 @@ function jr({ element: e, slots: t }) {
1701
1702
  onKeyDown: (t) => {
1702
1703
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
1703
1704
  },
1704
- children: d.map((t) => /* @__PURE__ */ P("td", { children: Or(e[t.property], t.options, t.optionValues) }, t.property))
1705
- }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", {
1705
+ children: d.map((t) => /* @__PURE__ */ N("td", { children: Ar(e[t.property], t.options, t.optionValues) }, t.property))
1706
+ }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", {
1706
1707
  colSpan: Math.max(d.length, 1),
1707
1708
  children: "No records found"
1708
1709
  }) })] })]
@@ -1710,28 +1711,28 @@ function jr({ element: e, slots: t }) {
1710
1711
  ]
1711
1712
  });
1712
1713
  }
1713
- function Mr(e) {
1714
- return Nr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1714
+ function Pr(e) {
1715
+ return Fr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1715
1716
  }
1716
- function Nr(e) {
1717
+ function Fr(e) {
1717
1718
  return typeof e == "object" && !!e && !Array.isArray(e);
1718
1719
  }
1719
- function Pr({ element: e, interactions: t, slots: n }) {
1720
- return lr(e) ? /* @__PURE__ */ P(fr, {
1720
+ function Ir({ element: e, interactions: t, slots: n }) {
1721
+ return dr(e) ? /* @__PURE__ */ N(mr, {
1721
1722
  element: e,
1722
1723
  interactions: t
1723
- }) : /* @__PURE__ */ P(Fr, {
1724
+ }) : /* @__PURE__ */ N(Lr, {
1724
1725
  element: e,
1725
1726
  interactions: t,
1726
1727
  slots: n
1727
1728
  });
1728
1729
  }
1729
- function Fr({ element: e, interactions: t }) {
1730
+ function Lr({ element: e, interactions: t }) {
1730
1731
  let n = Z(e, "label", Z(e, "command"));
1731
- return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ P(Ir, {
1732
+ return H(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ N(Rr, {
1732
1733
  element: e,
1733
1734
  label: n
1734
- }) : /* @__PURE__ */ P(I, {
1735
+ }) : /* @__PURE__ */ N(F, {
1735
1736
  type: "button",
1736
1737
  "data-scene-id": e.id,
1737
1738
  disabled: !0,
@@ -1740,21 +1741,21 @@ function Fr({ element: e, interactions: t }) {
1740
1741
  children: n
1741
1742
  });
1742
1743
  }
1743
- function Ir({ element: e, label: t }) {
1744
+ function Rr({ element: e, label: t }) {
1744
1745
  let [n, i] = l(0), [a, o] = l(!1), s = r(() => {
1745
1746
  o(!1), i((e) => e + 1);
1746
- }, []), c = /* @__PURE__ */ P(Cn.Provider, {
1747
+ }, []), c = /* @__PURE__ */ N(En.Provider, {
1747
1748
  value: s,
1748
- children: /* @__PURE__ */ P(q, { element: e }, n)
1749
+ children: /* @__PURE__ */ N(K, { element: e }, n)
1749
1750
  });
1750
- return /* @__PURE__ */ F("div", {
1751
+ return /* @__PURE__ */ P("div", {
1751
1752
  className: "stage-action",
1752
1753
  "data-scene-id": e.id,
1753
- children: [/* @__PURE__ */ P(I, {
1754
+ children: [/* @__PURE__ */ N(F, {
1754
1755
  type: "button",
1755
1756
  onClick: () => o(!0),
1756
1757
  children: t
1757
- }), /* @__PURE__ */ P(Re, {
1758
+ }), /* @__PURE__ */ N(Ve, {
1758
1759
  title: t,
1759
1760
  visible: a,
1760
1761
  onClose: () => o(!1),
@@ -1764,41 +1765,41 @@ function Ir({ element: e, label: t }) {
1764
1765
  })]
1765
1766
  });
1766
1767
  }
1767
- function Lr(e) {
1768
- let t = e.element ?? Dr("slice-dialog", {}), n = k(), { routes: i, parameters: a, queries: o, selections: c } = z(), l = de(n?.currentDialogParameters), u = Z(t, "command") || l?.command || Z(t, "slice") || "", d = Z(t, "title") || l?.title || u, f = i?.commandSchemas?.[u], p = s(() => G(f ?? ""), [f]), m = s(() => zn(o), [o]), h = s(() => Bn(c, o), [c, o]), g = r(() => n?.closeDialog(), [n]), _ = (e) => e.identifier && e.required && In(e, m) && Fn(e, h) !== void 0;
1769
- if (!f || !(p.some((e) => e.options || e.members || e.item) || p.some(_))) return e.element ? /* @__PURE__ */ P(te, {
1768
+ function zr(e) {
1769
+ let t = e.element ?? kr("slice-dialog", {}), n = he(), { routes: i, parameters: a, queries: o, selections: c } = R(), l = O(n?.currentDialogParameters), u = Z(t, "command") || l?.command || Z(t, "slice") || "", d = Z(t, "title") || l?.title || u, f = i?.commandSchemas?.[u], p = s(() => W(f ?? ""), [f]), m = s(() => Vn(o), [o]), h = s(() => Hn(c, o), [c, o]), g = r(() => n?.closeDialog(), [n]), _ = (e) => e.identifier && e.required && Rn(e, m) && q(e, h) !== void 0;
1770
+ if (!f || !(p.some((e) => e.options || e.members || e.item) || p.some(_))) return e.element ? /* @__PURE__ */ N(re, {
1770
1771
  element: e.element,
1771
1772
  slots: e.slots ?? {}
1772
- }) : /* @__PURE__ */ P(D, {});
1773
- let v = p.filter((e) => !Nn(e, a) && !_(e)), y = Dr(`slice-dialog-${u}`, {
1773
+ }) : /* @__PURE__ */ N(ce, {});
1774
+ let v = p.filter((e) => !In(e, a) && !_(e)), y = kr(`slice-dialog-${u}`, {
1774
1775
  command: u,
1775
1776
  label: d,
1776
1777
  schema: f,
1777
1778
  fields: v.map((e) => ({
1778
1779
  name: e.name,
1779
- label: K(e.name)
1780
+ label: G(e.name)
1780
1781
  })),
1781
1782
  generationMode: "manual"
1782
1783
  });
1783
- return /* @__PURE__ */ F("section", {
1784
+ return /* @__PURE__ */ P("section", {
1784
1785
  className: "scene-slice-dialog",
1785
1786
  "data-scene-slice-dialog": Z(t, "slice") || l?.slice,
1786
1787
  "data-scene-command": u,
1787
1788
  children: [
1788
- /* @__PURE__ */ P("header", {
1789
+ /* @__PURE__ */ N("header", {
1789
1790
  className: "scene-slice-dialog-header",
1790
- children: /* @__PURE__ */ P("h2", {
1791
+ children: /* @__PURE__ */ N("h2", {
1791
1792
  className: "scene-slice-dialog-title",
1792
1793
  children: d
1793
1794
  })
1794
1795
  }),
1795
- /* @__PURE__ */ P(Cn.Provider, {
1796
+ /* @__PURE__ */ N(En.Provider, {
1796
1797
  value: g,
1797
- children: /* @__PURE__ */ P(q, { element: y })
1798
+ children: /* @__PURE__ */ N(K, { element: y })
1798
1799
  }),
1799
- /* @__PURE__ */ P("footer", {
1800
+ /* @__PURE__ */ N("footer", {
1800
1801
  className: "scene-slice-dialog-footer",
1801
- children: /* @__PURE__ */ P("button", {
1802
+ children: /* @__PURE__ */ N("button", {
1802
1803
  type: "button",
1803
1804
  className: "scene-slice-dialog-cancel",
1804
1805
  onClick: g,
@@ -1808,18 +1809,18 @@ function Lr(e) {
1808
1809
  ]
1809
1810
  });
1810
1811
  }
1811
- function Rr(e) {
1812
+ function Br(e) {
1812
1813
  let { element: t } = e;
1813
- return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ P(Br, { ...e }) : /* @__PURE__ */ P(ne, { ...e }) : /* @__PURE__ */ P(zr, { ...e });
1814
+ return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ N(Hr, { ...e }) : /* @__PURE__ */ N(T, { ...e }) : /* @__PURE__ */ N(Vr, { ...e });
1814
1815
  }
1815
- function zr(e) {
1816
- let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = z(), o = Z(t, "slice"), c = Z(t, "command") || o.split(".").at(-1) || "", l = n?.commandSchemas?.[c], u = s(() => G(l ?? ""), [l]), d = s(() => zn(i), [i]);
1817
- if (Vn(u, r, s(() => Bn(a, i), [a, i]), d).length === 0) return /* @__PURE__ */ P(ne, { ...e });
1816
+ function Vr(e) {
1817
+ let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = R(), o = Z(t, "slice"), c = Z(t, "command") || o.split(".").at(-1) || "", l = n?.commandSchemas?.[c], u = s(() => W(l ?? ""), [l]), d = s(() => Vn(i), [i]);
1818
+ if (Un(u, r, s(() => Hn(a, i), [a, i]), d).length === 0) return /* @__PURE__ */ N(T, { ...e });
1818
1819
  let f = Z(t, "label", Z(t, "name", t.id));
1819
- return /* @__PURE__ */ P("span", {
1820
+ return /* @__PURE__ */ N("span", {
1820
1821
  className: "stage-toolbar-action",
1821
1822
  "data-scene-toolbar-item": Z(t, "name", t.id),
1822
- children: /* @__PURE__ */ P(I, {
1823
+ children: /* @__PURE__ */ N(F, {
1823
1824
  type: "button",
1824
1825
  "data-scene-id": t.id,
1825
1826
  disabled: !0,
@@ -1829,12 +1830,12 @@ function zr(e) {
1829
1830
  })
1830
1831
  });
1831
1832
  }
1832
- function Br(e) {
1833
- let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = z(), o = Z(t, "name", t.id), c = Z(t, "target"), l = Z(t, "label", o), u = n?.commandSchemas?.[c], d = s(() => G(u ?? ""), [u]), f = s(() => zn(i), [i]), p = Vn(d, r, s(() => Bn(a, i), [a, i]), f), m = d.filter((e) => !Nn(e, r) && !(e.identifier && e.required && In(e, f))), h = u ? {
1833
+ function Hr(e) {
1834
+ let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = R(), o = Z(t, "name", t.id), c = Z(t, "target"), l = Z(t, "label", o), u = n?.commandSchemas?.[c], d = s(() => W(u ?? ""), [u]), f = s(() => Vn(i), [i]), p = Un(d, r, s(() => Hn(a, i), [a, i]), f), m = d.filter((e) => !In(e, r) && !(e.identifier && e.required && Rn(e, f))), h = u ? {
1834
1835
  schema: u,
1835
1836
  fields: m.map((e) => ({
1836
1837
  name: e.name,
1837
- label: K(e.name)
1838
+ label: G(e.name)
1838
1839
  })),
1839
1840
  generationMode: "manual"
1840
1841
  } : {}, g = {
@@ -1847,45 +1848,49 @@ function Br(e) {
1847
1848
  ...h
1848
1849
  }
1849
1850
  };
1850
- return /* @__PURE__ */ P("span", {
1851
+ return /* @__PURE__ */ N("span", {
1851
1852
  className: "stage-toolbar-action",
1852
1853
  "data-scene-toolbar-item": o,
1853
- children: p.length > 0 ? /* @__PURE__ */ P(I, {
1854
+ children: p.length > 0 ? /* @__PURE__ */ N(F, {
1854
1855
  type: "button",
1855
1856
  "data-scene-id": t.id,
1856
1857
  disabled: !0,
1857
1858
  title: "Select a row first",
1858
1859
  ...e.interactions,
1859
1860
  children: l
1860
- }) : /* @__PURE__ */ P(Pr, {
1861
+ }) : /* @__PURE__ */ N(Ir, {
1861
1862
  element: g,
1862
1863
  interactions: e.interactions,
1863
1864
  slots: e.slots
1864
1865
  })
1865
1866
  });
1866
1867
  }
1867
- var Vr = {
1868
- ...ce,
1869
- "core:table": jr,
1870
- "core:action": Pr,
1871
- "core:toolbarItem": Rr,
1872
- "core:sliceDialog": Lr,
1873
- [Er]: q,
1874
- [mr]: br
1868
+ var Ur = {
1869
+ ...de,
1870
+ "core:table": Nr,
1871
+ "core:action": Ir,
1872
+ "core:toolbarItem": Br,
1873
+ "core:sliceDialog": zr,
1874
+ [Or]: K,
1875
+ [gr]: Sr
1875
1876
  };
1876
1877
  //#endregion
1877
1878
  //#region src/useStrings.ts
1878
- function Hr() {
1879
- let e = it(), [t, n] = l([]), [r, i] = l(""), [o, s] = l({});
1879
+ function Wr() {
1880
+ let e = st(), [t, n] = l([]), [r, i] = l(""), [o, s] = l({});
1880
1881
  return a(() => {
1881
1882
  let t = new AbortController();
1882
1883
  return e.locales(t.signal).then((e) => {
1883
- n(e), i((t) => t || e[0] || "");
1884
+ t.signal.aborted || (n(e), i((t) => t || e[0] || ""));
1884
1885
  }).catch(() => {}), () => t.abort();
1885
1886
  }, [e]), a(() => {
1886
1887
  if (!r) return;
1887
1888
  let t = new AbortController();
1888
- return e.strings(r, t.signal).then(s).catch(() => s({})), () => t.abort();
1889
+ return e.strings(r, t.signal).then((e) => {
1890
+ t.signal.aborted || s(e);
1891
+ }).catch(() => {
1892
+ t.signal.aborted || s({});
1893
+ }), () => t.abort();
1889
1894
  }, [r, e]), {
1890
1895
  locales: t,
1891
1896
  locale: r,
@@ -1893,11 +1898,11 @@ function Hr() {
1893
1898
  dictionary: o
1894
1899
  };
1895
1900
  }
1896
- var Ur = /* @__PURE__ */ new Set(["core:table"]);
1897
- function Wr(e) {
1898
- return Gr(e, /* @__PURE__ */ new Map(), void 0);
1901
+ var Gr = /* @__PURE__ */ new Set(["core:table"]);
1902
+ function Kr(e) {
1903
+ return qr(e, /* @__PURE__ */ new Map(), void 0);
1899
1904
  }
1900
- function Gr(e, t, n) {
1905
+ function qr(e, t, n) {
1901
1906
  let r = e;
1902
1907
  if (!r.slots) return e;
1903
1908
  let i = !1, a = {};
@@ -1906,7 +1911,7 @@ function Gr(e, t, n) {
1906
1911
  a[e] = o.map((e) => {
1907
1912
  let t = e, n = $(t, "typeName");
1908
1913
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
1909
- let a = Gr(qr(Kr(t, r), s), r, s);
1914
+ let a = qr(Yr(Jr(t, r), s), r, s);
1910
1915
  return a !== e && (i = !0), a;
1911
1916
  });
1912
1917
  }
@@ -1915,8 +1920,8 @@ function Gr(e, t, n) {
1915
1920
  slots: a
1916
1921
  } : e;
1917
1922
  }
1918
- function Kr(e, t) {
1919
- if (!Ur.has(e.componentName)) return e;
1923
+ function Jr(e, t) {
1924
+ if (!Gr.has(e.componentName)) return e;
1920
1925
  let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
1921
1926
  if (!r || e.properties.queryArguments !== void 0) return e;
1922
1927
  let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
@@ -1925,7 +1930,7 @@ function Kr(e, t) {
1925
1930
  properties: a
1926
1931
  };
1927
1932
  }
1928
- function qr(e, t) {
1933
+ function Yr(e, t) {
1929
1934
  if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
1930
1935
  let n = { ...e.properties };
1931
1936
  if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
@@ -1944,7 +1949,7 @@ function $(e, t) {
1944
1949
  }
1945
1950
  //#endregion
1946
1951
  //#region src/stageQueryBindings.tsx
1947
- function Jr(e) {
1952
+ function Xr(e) {
1948
1953
  let t = /* @__PURE__ */ new Set(), n = (e) => {
1949
1954
  if (Array.isArray(e)) {
1950
1955
  e.forEach(n);
@@ -1964,7 +1969,7 @@ function Jr(e) {
1964
1969
  };
1965
1970
  return r(e), [...t];
1966
1971
  }
1967
- function Yr(e) {
1972
+ function Zr(e) {
1968
1973
  let t = /* @__PURE__ */ new Map(), n = (e, t) => {
1969
1974
  let n = e.properties?.[t];
1970
1975
  return typeof n == "string" && n.length > 0 ? n : void 0;
@@ -1983,8 +1988,8 @@ function Yr(e) {
1983
1988
  };
1984
1989
  return r(e), [...t.values()];
1985
1990
  }
1986
- function Xr({ source: e }) {
1987
- let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = e.by ? r[e.by] || i[e.by] : void 0, o = s(() => e.by ? a ? { [e.by]: a } : {} : {
1991
+ function Qr({ source: e }) {
1992
+ let { routes: t, routesReady: n, parameters: r, session: i } = R(), a = e.by ? r[e.by] || i[e.by] : void 0, o = s(() => e.by ? a ? { [e.by]: a } : {} : {
1988
1993
  ...i,
1989
1994
  ...r
1990
1995
  }, [
@@ -1993,7 +1998,7 @@ function Xr({ source: e }) {
1993
1998
  i,
1994
1999
  e.by
1995
2000
  ]);
1996
- return B({
2001
+ return z({
1997
2002
  scope: `data:${e.typeName}`,
1998
2003
  name: e.query,
1999
2004
  alias: e.typeName,
@@ -2003,12 +2008,12 @@ function Xr({ source: e }) {
2003
2008
  list: !0
2004
2009
  }), null;
2005
2010
  }
2006
- function Zr({ name: e }) {
2007
- let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = s(() => ({
2011
+ function $r({ name: e }) {
2012
+ let { routes: t, routesReady: n, parameters: r, session: i } = R(), a = s(() => ({
2008
2013
  ...i,
2009
2014
  ...r
2010
2015
  }), [r, i]);
2011
- return B({
2016
+ return z({
2012
2017
  scope: `binding:${e}`,
2013
2018
  name: e,
2014
2019
  route: t?.queries?.[e],
@@ -2017,11 +2022,11 @@ function Zr({ name: e }) {
2017
2022
  list: !0
2018
2023
  }), null;
2019
2024
  }
2020
- function Qr({ element: e }) {
2021
- let t = s(() => Jr(e), [e]), n = s(() => Yr(e), [e]);
2022
- return /* @__PURE__ */ F(Le, { children: [t.map((e) => /* @__PURE__ */ P(Zr, { name: e }, e)), n.map((e) => /* @__PURE__ */ P(Xr, { source: e }, e.typeName))] });
2025
+ function ei({ element: e }) {
2026
+ let t = s(() => Xr(e), [e]), n = s(() => Zr(e), [e]);
2027
+ return /* @__PURE__ */ P(Be, { children: [t.map((e) => /* @__PURE__ */ N($r, { name: e }, e)), n.map((e) => /* @__PURE__ */ N(Qr, { source: e }, e.typeName))] });
2023
2028
  }
2024
- function $r(e) {
2029
+ function ti(e) {
2025
2030
  let t = /* @__PURE__ */ new Set(), n = [];
2026
2031
  for (let r of e) for (let e of r.contributions ?? []) {
2027
2032
  if (e.contributionPointName !== "Navigation") continue;
@@ -2034,7 +2039,7 @@ function $r(e) {
2034
2039
  ]);
2035
2040
  if (t.has(s)) continue;
2036
2041
  t.add(s);
2037
- let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = ni(r.destination) ? r.destination : void 0;
2042
+ let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = ii(r.destination) ? r.destination : void 0;
2038
2043
  n.push({
2039
2044
  label: i,
2040
2045
  targetScreen: a,
@@ -2042,7 +2047,7 @@ function $r(e) {
2042
2047
  order: c,
2043
2048
  ...typeof r.icon == "string" ? { icon: r.icon } : {},
2044
2049
  ...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
2045
- ...l && ri(l) ? { destination: l } : {}
2050
+ ...l && ai(l) ? { destination: l } : {}
2046
2051
  });
2047
2052
  }
2048
2053
  return n.map((e, t) => ({
@@ -2050,7 +2055,7 @@ function $r(e) {
2050
2055
  index: t
2051
2056
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
2052
2057
  }
2053
- function ei(e) {
2058
+ function ni(e) {
2054
2059
  let t = {
2055
2060
  label: "",
2056
2061
  children: []
@@ -2075,21 +2080,21 @@ function ei(e) {
2075
2080
  }
2076
2081
  return t.children;
2077
2082
  }
2078
- function ti(e, t) {
2083
+ function ri(e, t) {
2079
2084
  for (let n of e) {
2080
2085
  if (n.screen === t) return [n.label];
2081
- let e = ti(n.children, t);
2086
+ let e = ri(n.children, t);
2082
2087
  if (e.length > 0) return [n.label, ...e];
2083
2088
  }
2084
2089
  return [];
2085
2090
  }
2086
- function ni(e) {
2091
+ function ii(e) {
2087
2092
  return typeof e == "object" && !!e && !Array.isArray(e);
2088
2093
  }
2089
- function ri(e) {
2094
+ function ai(e) {
2090
2095
  return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
2091
2096
  }
2092
- function ii(e, t, n) {
2097
+ function oi(e, t, n) {
2093
2098
  return e.filter((e) => !t.has(e.name)).map((e) => ({
2094
2099
  label: e.name,
2095
2100
  targetScreen: e.name,
@@ -2098,93 +2103,96 @@ function ii(e, t, n) {
2098
2103
  }
2099
2104
  //#endregion
2100
2105
  //#region src/blueprint.ts
2101
- var ai = "Stage:locale", oi = "Cratis.Components", si = "PrimeReact", ci = /* @__PURE__ */ new Map();
2102
- function li(e) {
2103
- return ke(e).packages.includes(si);
2106
+ var si = "Stage:locale", ci = "Cratis.Components", li = "PrimeReact", ui = /* @__PURE__ */ new Map();
2107
+ function di(e) {
2108
+ return Me(e).packages.includes(li);
2104
2109
  }
2105
- function ui(e, t) {
2106
- ci.set(e, t);
2110
+ function fi(e, t) {
2111
+ ui.set(e, t);
2107
2112
  }
2108
- function di(e) {
2109
- let t = ke(e);
2113
+ function pi(e) {
2114
+ let t = Me(e);
2110
2115
  return {
2111
2116
  ...t,
2112
2117
  name: e?.length ? t.name : "Stage",
2113
- packages: b(t.packages, {
2114
- baseline: oi,
2115
- catalog: { [Se]: h.Blueprint }
2118
+ packages: x(t.packages, {
2119
+ baseline: ci,
2120
+ catalog: { [Te]: g.Blueprint }
2116
2121
  })
2117
2122
  };
2118
2123
  }
2119
- var fi = {
2120
- ...ye,
2121
- [oi]: Qe.components
2124
+ var mi = {
2125
+ ...Se,
2126
+ [ci]: tt.components
2122
2127
  };
2123
- function pi(e) {
2124
- let t = [...ci.values()].reduce((e, t) => ({
2128
+ function hi(e) {
2129
+ let t = [...ui.values()].reduce((e, t) => ({
2125
2130
  ...e,
2126
2131
  ...t.components
2127
2132
  }), {});
2128
2133
  return {
2129
- ...ce,
2130
- ...Ze,
2134
+ ...de,
2135
+ ...et,
2131
2136
  ...t,
2132
- ...xe,
2133
- ...Oe,
2137
+ ...we,
2138
+ ...je,
2134
2139
  ...e
2135
2140
  };
2136
2141
  }
2137
- function mi(e) {
2138
- let t = Object.fromEntries([...ci].map(([e, t]) => [e, t.declared]));
2142
+ function gi(e) {
2143
+ let t = Object.fromEntries([...ui].map(([e, t]) => [e, t.declared]));
2139
2144
  return {
2140
2145
  ...e,
2141
- ...fi,
2146
+ ...mi,
2142
2147
  ...t
2143
2148
  };
2144
2149
  }
2145
- var hi = "Stage:navigationTree";
2146
- function gi(e, t, n) {
2147
- return M(e, A.Logo, {
2148
- label: t,
2149
- initials: t.slice(0, 1).toUpperCase() || "S",
2150
- targetScreen: "",
2151
- ...n ? { lightImageUrl: n } : {}
2150
+ var _i = "Stage:navigationTree";
2151
+ function vi(e, t, n) {
2152
+ let r = t?.title ?? "Cratis Stage";
2153
+ return j(e, k.Logo, {
2154
+ label: r,
2155
+ initials: r.slice(0, 1).toUpperCase() || "S",
2156
+ targetScreen: n,
2157
+ ...t?.image ? { lightImageUrl: t.image } : {},
2158
+ ...t?.icon ? { iconName: t.icon } : {},
2159
+ ...t?.showName === void 0 ? {} : { showName: t.showName }
2152
2160
  });
2153
2161
  }
2154
- function _i(e, t, n, r, i, a = !1, o = !0) {
2155
- let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = $r(e), u = ii(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = ei([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => De({
2162
+ function yi(e, t, n, r, i, a = !1, o = !0) {
2163
+ let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = ti(e), u = oi(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = ni([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => Ae({
2156
2164
  label: e.name,
2157
2165
  targetScreen: e.name,
2158
2166
  icon: "pi pi-table",
2159
2167
  group: "Screens",
2160
2168
  order: n
2161
- }, t)), p = ti(ei(l), t), m = e.find((e) => e.name === t)?.path?.length ? ti(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? M("menu-hierarchy", hi, {
2169
+ }, t)), p = ri(ni(l), t), m = e.find((e) => e.name === t)?.path?.length ? ri(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? j("menu-hierarchy", _i, {
2162
2170
  nodes: d,
2163
2171
  activeScreen: t
2164
- }) : M("menu-screens", A.Menu, {
2172
+ }) : j("menu-screens", k.Menu, {
2165
2173
  title: "Screens",
2166
2174
  label: "Screens"
2167
2175
  }, { items: f }), _ = [];
2168
- n.length > 1 && _.push(M("topbar-locale", ai, {
2176
+ n.length > 1 && _.push(j("topbar-locale", si, {
2169
2177
  locales: n,
2170
2178
  locale: r
2171
- })), _.push(M("topbar-theme", A.ThemeSwitcher, { label: "Theme" }));
2179
+ })), _.push(j("topbar-theme", k.ThemeSwitcher, { label: "Theme" }));
2172
2180
  let v = { regionNavigation: a };
2173
2181
  return {
2174
- [j.Topbar]: [M("topbar", A.Topbar, v, {
2175
- logo: [gi("topbar-logo", c, i?.image)],
2182
+ [A.Topbar]: [j("topbar", k.Topbar, v, {
2183
+ logo: [vi("topbar-logo", i, s)],
2176
2184
  end: _
2177
2185
  })],
2178
- [j.Sidebar]: [M("sidebar", A.Sidebar, v, { logo: [gi("sidebar-logo", c, i?.image)] })],
2179
- ...a ? {} : { [j.Menu]: [g] },
2180
- [j.Breadcrumb]: [M("breadcrumb", A.Breadcrumb, {
2186
+ [A.Sidebar]: [j("sidebar", k.Sidebar, v, { logo: [vi("sidebar-logo", i, s)] })],
2187
+ ...a ? {} : { [A.Menu]: [g] },
2188
+ [A.Breadcrumb]: [j("breadcrumb", k.Breadcrumb, {
2181
2189
  homeTargetScreen: s,
2182
2190
  items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
2183
2191
  })],
2184
- ...o ? { [j.Footer]: [M("footer", A.Footer, { text: `${c} · rendered from your model` })] } : {},
2185
- [j.ConfigPanel]: [M(A.ConfigPanel, A.ConfigPanel, {
2192
+ ...o ? { [A.Footer]: [j("footer", k.Footer, { text: `${c} · rendered from your model` })] } : {},
2193
+ [A.ConfigPanel]: [j(k.ConfigPanel, k.ConfigPanel, {
2186
2194
  title: "Settings",
2187
- themes: Ce.map((e) => ({
2195
+ themes: Ee.map((e) => ({
2188
2196
  name: e.name,
2189
2197
  label: e.name,
2190
2198
  isDark: e.isDark ?? !1
@@ -2192,65 +2200,65 @@ function _i(e, t, n, r, i, a = !1, o = !0) {
2192
2200
  })]
2193
2201
  };
2194
2202
  }
2195
- function vi(e) {
2203
+ function bi(e) {
2196
2204
  return `#/${encodeURIComponent(e)}`;
2197
2205
  }
2198
2206
  //#endregion
2199
2207
  //#region src/StageChrome.tsx
2200
- var yi = t({
2208
+ var xi = t({
2201
2209
  locales: [],
2202
2210
  locale: "",
2203
2211
  setLocale: () => void 0,
2204
2212
  activity: ""
2205
2213
  });
2206
- function bi({ state: e, children: t }) {
2207
- return /* @__PURE__ */ P(yi.Provider, {
2214
+ function Si({ state: e, children: t }) {
2215
+ return /* @__PURE__ */ N(xi.Provider, {
2208
2216
  value: e,
2209
2217
  children: t
2210
2218
  });
2211
2219
  }
2212
- var xi = "Stage:activity";
2213
- function Si() {
2214
- let { locales: e, locale: t, setLocale: n } = i(yi);
2215
- return e.length < 2 ? null : /* @__PURE__ */ P("select", {
2220
+ var Ci = "Stage:activity";
2221
+ function wi() {
2222
+ let { locales: e, locale: t, setLocale: n } = i(xi);
2223
+ return e.length < 2 ? null : /* @__PURE__ */ N("select", {
2216
2224
  className: "stage-locale",
2217
2225
  "aria-label": "Locale",
2218
2226
  value: t,
2219
2227
  onChange: (e) => n(e.target.value),
2220
- children: e.map((e) => /* @__PURE__ */ P("option", {
2228
+ children: e.map((e) => /* @__PURE__ */ N("option", {
2221
2229
  value: e,
2222
2230
  children: e
2223
2231
  }, e))
2224
2232
  });
2225
2233
  }
2226
- function Ci({ element: e }) {
2234
+ function Ti({ element: e }) {
2227
2235
  let t = e.properties ?? {};
2228
- return /* @__PURE__ */ P("nav", {
2236
+ return /* @__PURE__ */ N("nav", {
2229
2237
  className: "stage-navigation-tree",
2230
2238
  "aria-label": "Navigation",
2231
2239
  "data-scene-id": e.id,
2232
- children: /* @__PURE__ */ P(wi, {
2240
+ children: /* @__PURE__ */ N(Ei, {
2233
2241
  nodes: t.nodes ?? [],
2234
2242
  activeScreen: t.activeScreen
2235
2243
  })
2236
2244
  });
2237
2245
  }
2238
- function wi({ nodes: e, activeScreen: t }) {
2239
- return /* @__PURE__ */ P("ul", {
2246
+ function Ei({ nodes: e, activeScreen: t }) {
2247
+ return /* @__PURE__ */ N("ul", {
2240
2248
  role: "tree",
2241
- children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ F("li", {
2249
+ children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ P("li", {
2242
2250
  role: "treeitem",
2243
2251
  "aria-expanded": "true",
2244
- children: [/* @__PURE__ */ P("span", {
2252
+ children: [/* @__PURE__ */ N("span", {
2245
2253
  className: "stage-navigation-group",
2246
2254
  children: e.label
2247
- }), /* @__PURE__ */ P(wi, {
2255
+ }), /* @__PURE__ */ N(Ei, {
2248
2256
  nodes: e.children,
2249
2257
  activeScreen: t
2250
2258
  })]
2251
- }, e.label) : /* @__PURE__ */ P("li", {
2259
+ }, e.label) : /* @__PURE__ */ N("li", {
2252
2260
  role: "treeitem",
2253
- children: /* @__PURE__ */ P(Ti, {
2261
+ children: /* @__PURE__ */ N(Di, {
2254
2262
  node: e,
2255
2263
  screen: e.screen,
2256
2264
  activeScreen: t
@@ -2258,56 +2266,56 @@ function wi({ nodes: e, activeScreen: t }) {
2258
2266
  }, `${e.screen}:${e.label}`))
2259
2267
  });
2260
2268
  }
2261
- function Ti({ node: e, screen: t, activeScreen: n }) {
2262
- let r = i(E), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && r && !s && ri(o) ? (e) => {
2269
+ function Di({ node: e, screen: t, activeScreen: n }) {
2270
+ let r = i(E), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && r && !s && ai(o) ? (e) => {
2263
2271
  e.preventDefault(), r.navigate(o);
2264
2272
  } : void 0;
2265
- return /* @__PURE__ */ F("a", {
2266
- href: s ? o.route : vi(t),
2273
+ return /* @__PURE__ */ P("a", {
2274
+ href: s ? o.route : bi(t),
2267
2275
  rel: s ? "noreferrer" : void 0,
2268
2276
  "aria-current": t === n ? "page" : void 0,
2269
2277
  "aria-label": a === "icon" ? e.label : void 0,
2270
2278
  "data-presentation": e.presentation,
2271
2279
  "data-icon": e.icon,
2272
2280
  onClick: c,
2273
- children: [a !== "text" && e.icon && /* @__PURE__ */ P("span", {
2281
+ children: [a !== "text" && e.icon && /* @__PURE__ */ N("span", {
2274
2282
  className: "stage-navigation-icon",
2275
2283
  "aria-hidden": "true",
2276
2284
  "data-icon-name": e.icon
2277
2285
  }), a !== "icon" && e.label]
2278
2286
  });
2279
2287
  }
2280
- function Ei({ element: e }) {
2281
- let t = typeof e.properties.name == "string" ? e.properties.name : "", n = i(E), r = me(), a = z(), o = n?.outlets[t], s = o && r ? r.screens[o] : void 0, c = e.properties.closable === !0;
2282
- return /* @__PURE__ */ F("div", {
2288
+ function Oi({ element: e }) {
2289
+ let t = typeof e.properties.name == "string" ? e.properties.name : "", n = i(E), r = _e(), a = R(), o = n?.outlets[t], s = o && r ? r.screens[o] : void 0, c = e.properties.closable === !0;
2290
+ return /* @__PURE__ */ P("div", {
2283
2291
  "data-scene-outlet": t,
2284
2292
  "data-scene-outlet-screen": o,
2285
- children: [c && o && /* @__PURE__ */ P("div", {
2293
+ children: [c && o && /* @__PURE__ */ N("div", {
2286
2294
  className: "scene-outlet-bar",
2287
- children: /* @__PURE__ */ P("button", {
2295
+ children: /* @__PURE__ */ N("button", {
2288
2296
  type: "button",
2289
2297
  className: "scene-outlet-close",
2290
2298
  "aria-label": "Close",
2291
2299
  onClick: () => n?.closeOutlet(t),
2292
2300
  children: "Close"
2293
2301
  })
2294
- }), s && r && /* @__PURE__ */ P(ie, {
2302
+ }), s && r && /* @__PURE__ */ N(oe, {
2295
2303
  element: s,
2296
2304
  registry: r.registry,
2297
2305
  resolveBinding: a.resolveBinding
2298
2306
  })]
2299
2307
  });
2300
2308
  }
2301
- function Di() {
2302
- let { activity: e } = i(yi);
2303
- return e ? /* @__PURE__ */ P("p", {
2309
+ function ki() {
2310
+ let { activity: e } = i(xi);
2311
+ return e ? /* @__PURE__ */ N("p", {
2304
2312
  className: "stage-activity",
2305
2313
  role: "status",
2306
2314
  children: e
2307
2315
  }) : null;
2308
2316
  }
2309
- function Oi() {
2310
- let e = he(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2317
+ function Ai() {
2318
+ let e = ve(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2311
2319
  return a(() => {
2312
2320
  let r = e?.isDark ? "dark" : "light";
2313
2321
  document.documentElement.setAttribute("data-scene-color-scheme", r), document.body.setAttribute("data-scene-color-scheme", r), document.body.style.backgroundColor = t ?? "", document.body.style.color = n ?? "";
@@ -2317,56 +2325,56 @@ function Oi() {
2317
2325
  n
2318
2326
  ]), null;
2319
2327
  }
2320
- var ki = {
2321
- [ai]: Si,
2322
- [hi]: Ci,
2323
- [xi]: Di,
2324
- "core:outlet": Ei
2325
- }, Ai = [
2328
+ var ji = {
2329
+ [si]: wi,
2330
+ [_i]: Ti,
2331
+ [Ci]: ki,
2332
+ "core:outlet": Oi
2333
+ }, Mi = [
2326
2334
  "navigationMode",
2327
2335
  "menuTheme",
2328
2336
  "showFooter"
2329
- ], ji = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2330
- function Mi(e, t, n = !1) {
2337
+ ], Ni = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2338
+ function Pi(e, t, n = !1) {
2331
2339
  let r = [], i = t.options ?? {}, a = {
2332
2340
  showFooter: !0,
2333
2341
  followsSystem: !1,
2334
2342
  problems: r
2335
2343
  };
2336
2344
  for (let [e, n] of Object.entries(i)) {
2337
- if (!Ai.includes(e)) {
2338
- r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${Ai.join(", ")}.`);
2345
+ if (!Mi.includes(e)) {
2346
+ r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${Mi.join(", ")}.`);
2339
2347
  continue;
2340
2348
  }
2341
2349
  if (e === "navigationMode") {
2342
- let e = Te.find((e) => e === n);
2343
- e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${Te.join(", ")}.`);
2350
+ let e = Oe.find((e) => e === n);
2351
+ e ? a.mode = e : r.push(`Option 'navigationMode' is '${String(n)}'; expected one of ${Oe.join(", ")}.`);
2344
2352
  } else if (e === "menuTheme") {
2345
- let e = Ee.find((e) => e === n);
2346
- e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${Ee.join(", ")}.`);
2353
+ let e = ke.find((e) => e === n);
2354
+ e ? a.menuTheme = e : r.push(`Option 'menuTheme' is '${String(n)}'; expected one of ${ke.join(", ")}.`);
2347
2355
  } else typeof n == "boolean" ? a.showFooter = n : r.push(`Option 'showFooter' is '${String(n)}'; expected true or false.`);
2348
2356
  }
2349
2357
  let o = e?.appearance;
2350
2358
  if (o?.colorScheme !== void 0) {
2351
2359
  a.followsSystem = o.colorScheme === u.System;
2352
2360
  let e = a.followsSystem ? n : o.colorScheme === u.Dark;
2353
- a.colorScheme = e ? _e.Dark : _e.Light, a.themeName = Ce.find((t) => (t.isDark ?? !1) === e)?.name;
2361
+ a.colorScheme = e ? be.Dark : be.Light, a.themeName = Ee.find((t) => (t.isDark ?? !1) === e)?.name;
2354
2362
  }
2355
- return o?.accent !== void 0 && (ji.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2363
+ return o?.accent !== void 0 && (Ni.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2356
2364
  }
2357
- function Ni(e, t) {
2365
+ function Fi(e, t) {
2358
2366
  if (e?.root === void 0) return [];
2359
2367
  let n = /* @__PURE__ */ new Set([
2360
- _.RootTemplateUnknown,
2361
- _.RootTemplateVersionNotSatisfied,
2362
- _.RootTemplateNotApplicable,
2363
- _.RootTemplateMissingContentSlot,
2364
- _.RootTemplateCycle,
2365
- _.RootTemplateBlueprintNotInstalled
2368
+ v.RootTemplateUnknown,
2369
+ v.RootTemplateVersionNotSatisfied,
2370
+ v.RootTemplateNotApplicable,
2371
+ v.RootTemplateMissingContentSlot,
2372
+ v.RootTemplateCycle,
2373
+ v.RootTemplateBlueprintNotInstalled
2366
2374
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
2367
- return r.length === 0 && t.origin !== v.Root && r.push(`The root template '${e.root.template.id}' did not resolve, so the application would not start in the shell it names.`), r;
2375
+ return r.length === 0 && t.origin !== y.Root && r.push(`The root template '${e.root.template.id}' did not resolve, so the application would not start in the shell it names.`), r;
2368
2376
  }
2369
- function Pi(e) {
2377
+ function Ii(e) {
2370
2378
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
2371
2379
  0,
2372
2380
  2,
@@ -2374,7 +2382,7 @@ function Pi(e) {
2374
2382
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
2375
2383
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
2376
2384
  }
2377
- function Fi(e, t) {
2385
+ function Li(e, t) {
2378
2386
  if (t === void 0) return e;
2379
2387
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
2380
2388
  0,
@@ -2386,20 +2394,20 @@ function Fi(e, t) {
2386
2394
  tokens: {
2387
2395
  ...e.tokens,
2388
2396
  "primary.color": t,
2389
- "primary.contrastColor": Pi(t),
2397
+ "primary.contrastColor": Ii(t),
2390
2398
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
2391
2399
  }
2392
2400
  }));
2393
2401
  }
2394
2402
  //#endregion
2395
2403
  //#region src/StageShellSettings.tsx
2396
- var Ii = "(prefers-color-scheme: dark)";
2397
- function Li() {
2404
+ var Ri = "(prefers-color-scheme: dark)";
2405
+ function zi() {
2398
2406
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
2399
2407
  }
2400
- function Ri({ settings: e, onSystemSchemeChange: t }) {
2401
- let n = c(Ae());
2402
- n.current = Ae();
2408
+ function Bi({ settings: e, onSystemSchemeChange: t }) {
2409
+ let n = c(Ne());
2410
+ n.current = Ne();
2403
2411
  let { mode: r, menuTheme: i, colorScheme: o, themeName: s } = e;
2404
2412
  return a(() => {
2405
2413
  let { setMode: e, setMenuTheme: t, setColorScheme: a, setThemeName: c } = n.current;
@@ -2411,16 +2419,16 @@ function Ri({ settings: e, onSystemSchemeChange: t }) {
2411
2419
  s
2412
2420
  ]), a(() => {
2413
2421
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
2414
- let n = globalThis.matchMedia(Ii), r = (e) => t(e.matches);
2422
+ let n = globalThis.matchMedia(Ri), r = (e) => t(e.matches);
2415
2423
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
2416
2424
  }, [e.followsSystem, t]), null;
2417
2425
  }
2418
2426
  //#endregion
2419
2427
  //#region src/stageNavigationModel.ts
2420
- function zi(e) {
2428
+ function Vi(e) {
2421
2429
  return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
2422
2430
  }
2423
- function Bi(e) {
2431
+ function Hi(e) {
2424
2432
  let t = /* @__PURE__ */ new Map();
2425
2433
  for (let n of e) {
2426
2434
  let e = (n.path ?? []).join(".");
@@ -2433,38 +2441,42 @@ function Bi(e) {
2433
2441
  return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
2434
2442
  };
2435
2443
  }
2436
- function Vi(e) {
2444
+ function Ui(e) {
2437
2445
  return (t) => e.find((e) => e.name === t)?.path?.[0];
2438
2446
  }
2439
- function Hi(e, t) {
2447
+ function Wi(e, t, n) {
2448
+ let r = e.navigation ?? {
2449
+ application: { regions: [] },
2450
+ modules: []
2451
+ };
2440
2452
  return {
2441
2453
  structure: e.structure ?? { modules: [] },
2442
- navigation: e.navigation ?? {
2443
- application: { regions: [] },
2444
- modules: []
2445
- },
2446
- screenFor: Bi(e.screens),
2447
- moduleOf: Vi(e.screens),
2454
+ navigation: n ? Gi(r, n) : r,
2455
+ screenFor: Hi(e.screens),
2456
+ moduleOf: Ui(e.screens),
2448
2457
  ...t ? { isVisible: t } : {}
2449
2458
  };
2450
2459
  }
2460
+ function Gi(e, t) {
2461
+ return typeof e == "string" ? ee(e, t) : Array.isArray(e) ? e.map((e) => Gi(e, t)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, n]) => [e, Gi(n, t)])) : e;
2462
+ }
2451
2463
  //#endregion
2452
2464
  //#region src/stageSlices.ts
2453
- function Ui(e) {
2454
- return (t) => G(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2465
+ function Ki(e) {
2466
+ return (t) => W(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2455
2467
  name: e.name,
2456
2468
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
2457
- label: Wi(e.name),
2469
+ label: qi(e.name),
2458
2470
  required: e.required
2459
2471
  }));
2460
2472
  }
2461
- function Wi(e) {
2473
+ function qi(e) {
2462
2474
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
2463
2475
  }
2464
- function Gi(e, t, n) {
2476
+ function Ji(e, t, n) {
2465
2477
  return { invoke: async (r, i, a) => {
2466
2478
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
2467
- if (!U(o)) return {
2479
+ if (!H(o)) return {
2468
2480
  succeeded: !1,
2469
2481
  message: t ? `The modeled command “${o}” is not registered by this Stage.` : `The modeled command “${o}” is waiting for Stage routes.`
2470
2482
  };
@@ -2482,7 +2494,7 @@ function Gi(e, t, n) {
2482
2494
  }
2483
2495
  //#endregion
2484
2496
  //#region src/standaloneScreenTemplates.ts
2485
- function Ki(e) {
2497
+ function Yi(e) {
2486
2498
  let t = new Set(e.map((e) => e.name));
2487
2499
  return e.map((e) => {
2488
2500
  let n = e.fitsSlot, r = n?.includes(".") ? n.slice(0, n.lastIndexOf(".")) : void 0;
@@ -2494,7 +2506,7 @@ function Ki(e) {
2494
2506
  }
2495
2507
  //#endregion
2496
2508
  //#region src/withoutSeededSlots.ts
2497
- function qi(e, t) {
2509
+ function Xi(e, t) {
2498
2510
  let n = /* @__PURE__ */ new Map();
2499
2511
  for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
2500
2512
  return e.map((e) => {
@@ -2512,7 +2524,7 @@ function qi(e, t) {
2512
2524
  }
2513
2525
  //#endregion
2514
2526
  //#region src/stageIcons.ts
2515
- var Ji = /* @__PURE__ */ new Map([
2527
+ var Zi = /* @__PURE__ */ new Map([
2516
2528
  ["chart", "chart-column"],
2517
2529
  ["add", "plus"],
2518
2530
  ["dollar", "dollar-sign"],
@@ -2520,24 +2532,24 @@ var Ji = /* @__PURE__ */ new Map([
2520
2532
  ["refresh", "refresh-cw"],
2521
2533
  ["invoice", "receipt-text"],
2522
2534
  ["batch", "layers"]
2523
- ]), Yi = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Xi = O([{
2524
- library: g,
2535
+ ]), Qi = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), $i = pe([{
2536
+ library: _,
2525
2537
  loadGlyph: async ({ key: e }) => {
2526
- let t = Yi(e), n = Ji.get(t) ?? t;
2527
- if (Object.hasOwn($e, n)) return (await $e[n]())?.default;
2538
+ let t = Qi(e), n = Zi.get(t) ?? t;
2539
+ if (Object.hasOwn(nt, n)) return (await nt[n]())?.default;
2528
2540
  }
2529
2541
  }]);
2530
2542
  //#endregion
2531
2543
  //#region src/App.tsx
2532
- function Zi(e = {}) {
2533
- return pi({
2544
+ function ea(e = {}) {
2545
+ return hi({
2534
2546
  ...e,
2535
- ...Vr,
2536
- ...ki
2547
+ ...Ur,
2548
+ ...ji
2537
2549
  });
2538
2550
  }
2539
- function Qi(e, t) {
2540
- return M(`form-${e}-${t.name}`, Er, {
2551
+ function ta(e, t) {
2552
+ return j(`form-${e}-${t.name}`, Or, {
2541
2553
  command: t.forCommand,
2542
2554
  label: t.name,
2543
2555
  generationMode: t.generationMode,
@@ -2545,47 +2557,60 @@ function Qi(e, t) {
2545
2557
  fields: t.fields
2546
2558
  });
2547
2559
  }
2548
- function $i(e, t) {
2560
+ function na(e, t) {
2549
2561
  let n = e.screens[0];
2550
- return we(e, n, {
2551
- profile: di(e.uiProfiles),
2552
- blueprintTemplates: Ki(t?.length ? [...N, ...t] : N)
2562
+ return De(e, n, {
2563
+ profile: pi(e.uiProfiles),
2564
+ blueprintTemplates: Yi(t?.length ? [...M, ...t] : M)
2553
2565
  });
2554
2566
  }
2555
- function ea(e, t, n, r, i, a, o = !0) {
2556
- let s = zi(e.navigation), c = e.navigation?.application.logo ? {
2557
- title: e.navigation.application.logo.title,
2558
- image: e.navigation.application.logo.image || void 0
2559
- } : void 0;
2567
+ function ra(e, t, n, r, i, a, o = !0) {
2568
+ let s = Vi(e.navigation), c = ia(e);
2560
2569
  return {
2561
- profile: di(e.uiProfiles),
2562
- catalog: mi(r),
2563
- blueprintTemplates: Ki(a?.length ? [...N, ...a] : N),
2564
- chrome: (r, i) => i === A.FullPageShell ? { [j.ConfigPanel]: _i(e.screens, r.name, t, n, c, s, o)[j.ConfigPanel] } : _i(e.screens, r.name, t, n, c, s, o),
2565
- form: Qi,
2566
- trailing: [M("activity", xi)],
2570
+ profile: pi(e.uiProfiles),
2571
+ catalog: gi(r),
2572
+ blueprintTemplates: Yi(a?.length ? [...M, ...a] : M),
2573
+ chrome: (r, i) => i === k.FullPageShell ? { [A.ConfigPanel]: yi(e.screens, r.name, t, n, c, s, o)[A.ConfigPanel] } : yi(e.screens, r.name, t, n, c, s, o),
2574
+ form: ta,
2575
+ trailing: [j("activity", Ci)],
2567
2576
  decorate: (e) => {
2568
- let t = Wr(e);
2569
- return i ? C(t, i) : t;
2577
+ let t = Kr(e);
2578
+ return i ? w(t, i) : t;
2570
2579
  }
2571
2580
  };
2572
2581
  }
2573
- function ta(e, t, n, r, i, a) {
2574
- let [o] = gr([t], na(e));
2575
- return be(e, o, ea(e, n, r, i, void 0, a)).element;
2582
+ function ia(e) {
2583
+ let t = e.navigation?.application.logo;
2584
+ if (t) return {
2585
+ title: t.title,
2586
+ image: t.image || void 0
2587
+ };
2588
+ let n = pi(e.uiProfiles).identity;
2589
+ if (!n?.name) return;
2590
+ let r = n.logo;
2591
+ return {
2592
+ title: n.name,
2593
+ image: r?.kind === h.Image && r.image || void 0,
2594
+ icon: r?.kind === h.Icon ? r.icon : void 0,
2595
+ showName: n.showName
2596
+ };
2597
+ }
2598
+ function aa(e, t, n, r, i, a) {
2599
+ let [o] = vr([t], oa(e));
2600
+ return Ce(e, o, ra(e, n, r, i, void 0, a)).element;
2576
2601
  }
2577
- function na(e) {
2602
+ function oa(e) {
2578
2603
  return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
2579
2604
  }
2580
- function ra() {
2605
+ function sa() {
2581
2606
  try {
2582
2607
  return globalThis.localStorage ?? null;
2583
2608
  } catch {
2584
2609
  return null;
2585
2610
  }
2586
2611
  }
2587
- function ia({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i } = {}) {
2588
- let o = it(), [c, u] = l(), [d, f] = l(""), p = s(() => Zi(e), [e, c]), m = at(), h = Hr();
2612
+ function ca({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i } = {}) {
2613
+ let o = st(), [c, u] = l(), [d, f] = l(""), p = s(() => ea(e), [e, c]), m = ct(), h = Wr();
2589
2614
  return a(() => {
2590
2615
  let e = new AbortController();
2591
2616
  return o.scene(e.signal).then((e) => u(r?.length ? {
@@ -2594,10 +2619,10 @@ function ia({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2594
2619
  } : e)).catch((t) => {
2595
2620
  e.signal.aborted || f(t instanceof Error ? t.message : String(t));
2596
2621
  }), () => e.abort();
2597
- }, [o, r]), d ? /* @__PURE__ */ F("main", {
2622
+ }, [o, r]), d ? /* @__PURE__ */ P("main", {
2598
2623
  className: "stage-message",
2599
- children: [/* @__PURE__ */ P("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ P("p", { children: d })]
2600
- }) : c ? /* @__PURE__ */ P(aa, {
2624
+ children: [/* @__PURE__ */ N("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ N("p", { children: d })]
2625
+ }) : c ? /* @__PURE__ */ N(la, {
2601
2626
  scene: c,
2602
2627
  registry: p,
2603
2628
  routeState: m,
@@ -2605,21 +2630,21 @@ function ia({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2605
2630
  packageCatalog: t,
2606
2631
  screenTemplates: n,
2607
2632
  isVisible: i
2608
- }) : /* @__PURE__ */ P("main", {
2633
+ }) : /* @__PURE__ */ N("main", {
2609
2634
  className: "stage-message",
2610
- children: /* @__PURE__ */ P("h1", { children: "Preparing the Stage" })
2635
+ children: /* @__PURE__ */ N("h1", { children: "Preparing the Stage" })
2611
2636
  });
2612
2637
  }
2613
- function aa({ scene: e, registry: t, routeState: n, strings: i, packageCatalog: a, screenTemplates: o, isVisible: c }) {
2614
- let u = s(() => ue(), []), [d, f] = l(Li), p = e.screens[0]?.name ?? "", m = s(() => di(e.uiProfiles), [e]), h = s(() => p ? $i(e, o) : void 0, [
2638
+ function la({ scene: e, registry: t, routeState: n, strings: i, packageCatalog: a, screenTemplates: o, isVisible: c }) {
2639
+ let u = s(() => fe(), []), [d, f] = l(zi), p = e.screens[0]?.name ?? "", m = s(() => pi(e.uiProfiles), [e]), h = s(() => p ? na(e, o) : void 0, [
2615
2640
  e,
2616
2641
  o,
2617
2642
  p
2618
- ]), g = s(() => h ? Ni(m, h) : [], [m, h]), _ = s(() => h ? Mi(m, h, d) : void 0, [
2643
+ ]), g = s(() => h ? Fi(m, h) : [], [m, h]), _ = s(() => h ? Pi(m, h, d) : void 0, [
2619
2644
  m,
2620
2645
  h,
2621
2646
  d
2622
- ]), v = s(() => Fi(Ce, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = s(() => ea(e, i.locales, i.locale, a, i.dictionary, o, y), [
2647
+ ]), v = s(() => Li(Ee, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = s(() => ra(e, i.locales, i.locale, a, i.dictionary, o, y), [
2623
2648
  e,
2624
2649
  i.locales,
2625
2650
  i.locale,
@@ -2627,33 +2652,37 @@ function aa({ scene: e, registry: t, routeState: n, strings: i, packageCatalog:
2627
2652
  a,
2628
2653
  o,
2629
2654
  y
2630
- ]), x = r((e) => f(e), []), S = s(() => Hi(e, c), [e, c]), C = s(() => ({
2655
+ ]), x = r((e) => f(e), []), S = s(() => Wi(e, c, i.dictionary), [
2656
+ e,
2657
+ c,
2658
+ i.dictionary
2659
+ ]), C = s(() => ({
2631
2660
  ...e,
2632
- screens: gr(qi(e.screens, [
2661
+ screens: vr(Xi(e.screens, [
2633
2662
  ...e.screenTemplates,
2634
2663
  ...e.dialogTemplates ?? [],
2635
- ...N,
2664
+ ...M,
2636
2665
  ...o ?? []
2637
- ]), na(e))
2666
+ ]), oa(e))
2638
2667
  }), [e, o]);
2639
- return p ? g.length > 0 ? /* @__PURE__ */ F("main", {
2668
+ return p ? g.length > 0 ? /* @__PURE__ */ P("main", {
2640
2669
  className: "stage-message",
2641
2670
  role: "alert",
2642
2671
  "data-stage-startup-problem": "root-template",
2643
2672
  children: [
2644
- /* @__PURE__ */ P("h1", { children: "Unable to start this Stage" }),
2645
- /* @__PURE__ */ P("p", { children: "The ui profile's root template cannot be the application's shell." }),
2646
- /* @__PURE__ */ P("ul", { children: g.map((e) => /* @__PURE__ */ P("li", { children: e }, e)) })
2673
+ /* @__PURE__ */ N("h1", { children: "Unable to start this Stage" }),
2674
+ /* @__PURE__ */ N("p", { children: "The ui profile's root template cannot be the application's shell." }),
2675
+ /* @__PURE__ */ N("ul", { children: g.map((e) => /* @__PURE__ */ N("li", { children: e }, e)) })
2647
2676
  ]
2648
- }) : /* @__PURE__ */ P(ge, {
2677
+ }) : /* @__PURE__ */ N(ye, {
2649
2678
  application: C,
2650
2679
  composition: b,
2651
2680
  navigationModel: S,
2652
2681
  registry: t,
2653
2682
  initialScreen: p,
2654
2683
  history: u,
2655
- layoutConfigStorage: ra(),
2656
- scope: (t, r) => /* @__PURE__ */ P(oa, {
2684
+ layoutConfigStorage: sa(),
2685
+ scope: (t, r) => /* @__PURE__ */ N(ua, {
2657
2686
  scene: e,
2658
2687
  routeState: n,
2659
2688
  strings: i,
@@ -2663,25 +2692,25 @@ function aa({ scene: e, registry: t, routeState: n, strings: i, packageCatalog:
2663
2692
  onSystemSchemeChange: x,
2664
2693
  children: r
2665
2694
  }),
2666
- renderScreen: (e, n) => /* @__PURE__ */ P(ca, {
2695
+ renderScreen: (e, n) => /* @__PURE__ */ N(fa, {
2667
2696
  element: e,
2668
2697
  configuration: n,
2669
2698
  registry: t
2670
2699
  }),
2671
- renderDialog: () => /* @__PURE__ */ P(Lr, {}),
2672
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ P(la, {
2700
+ renderDialog: () => /* @__PURE__ */ N(zr, {}),
2701
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ N(pa, {
2673
2702
  template: e,
2674
2703
  content: n,
2675
2704
  registry: t,
2676
2705
  strings: i,
2677
2706
  close: () => r.closeDialog()
2678
2707
  })
2679
- }) : /* @__PURE__ */ F("main", {
2708
+ }) : /* @__PURE__ */ P("main", {
2680
2709
  className: "stage-message",
2681
- children: [/* @__PURE__ */ P("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ P("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2710
+ children: [/* @__PURE__ */ N("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ N("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2682
2711
  });
2683
2712
  }
2684
- function oa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, shellSettings: o, onSystemSchemeChange: s, children: c }) {
2713
+ function ua({ scene: e, routeState: t, strings: n, navigation: r, themes: i, shellSettings: o, onSystemSchemeChange: s, children: c }) {
2685
2714
  let [u, f] = l(""), { navigate: p } = r;
2686
2715
  return a(() => f(""), [r.currentScreen, r.currentDialog]), a(() => {
2687
2716
  let e = (e) => {
@@ -2698,24 +2727,24 @@ function oa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
2698
2727
  r && (r.dialog === void 0 ? r.screen !== void 0 && !e.screens.some((e) => e.name === r.screen) ? f(`The modeled screen “${r.screen}” is not available.`) : p(r) : e.dialogTemplates?.some((e) => e.name === r.dialog) ? p(r) : f(`The modeled dialog “${r.dialog}” is not available in this Stage runtime.`));
2699
2728
  };
2700
2729
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
2701
- }, [p, e]), /* @__PURE__ */ P(re, {
2702
- registry: Xi,
2703
- children: /* @__PURE__ */ F(ve, {
2730
+ }, [p, e]), /* @__PURE__ */ N(ie, {
2731
+ registry: $i,
2732
+ children: /* @__PURE__ */ P(xe, {
2704
2733
  themes: i,
2705
2734
  children: [
2706
- o && /* @__PURE__ */ P(Ri, {
2735
+ o && /* @__PURE__ */ N(Bi, {
2707
2736
  settings: o,
2708
2737
  onSystemSchemeChange: s
2709
2738
  }),
2710
- /* @__PURE__ */ P(Oi, {}),
2711
- /* @__PURE__ */ P(Rt, {
2739
+ /* @__PURE__ */ N(Ai, {}),
2740
+ /* @__PURE__ */ N(Vt, {
2712
2741
  routes: t.routes,
2713
2742
  routesReady: t.ready,
2714
2743
  parameters: r.currentParameters,
2715
2744
  locale: n.locale,
2716
2745
  locales: n.locales,
2717
2746
  screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
2718
- children: /* @__PURE__ */ P(sa, {
2747
+ children: /* @__PURE__ */ N(da, {
2719
2748
  activity: u,
2720
2749
  routesReady: t.ready,
2721
2750
  scene: e,
@@ -2728,14 +2757,14 @@ function oa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
2728
2757
  })
2729
2758
  });
2730
2759
  }
2731
- function sa({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2732
- let o = z(), c = pe(), l = tn(), u = s(() => Gi(l, t, o.refreshAfterCommand), [
2760
+ function da({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2761
+ let o = R(), c = ge(), l = an(), u = s(() => Ji(l, t, o.refreshAfterCommand), [
2733
2762
  l,
2734
2763
  t,
2735
2764
  o.refreshAfterCommand
2736
- ]), f = s(() => Ui(n.commandSchemas), [n.commandSchemas]), p = le({
2765
+ ]), f = s(() => Ki(n.commandSchemas), [n.commandSchemas]), p = D({
2737
2766
  executeCommand: async (e, n) => {
2738
- let i = U(e);
2767
+ let i = H(e);
2739
2768
  if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
2740
2769
  isSuccess: !1,
2741
2770
  validationErrors: []
@@ -2752,7 +2781,7 @@ function sa({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2752
2781
  };
2753
2782
  },
2754
2783
  navigate: (e, t) => {
2755
- n.screens.some((t) => t.name === e) ? W(e, rn(t)) : r(`The modeled screen “${e}” is not available.`);
2784
+ n.screens.some((t) => t.name === e) ? U(e, sn(t)) : r(`The modeled screen “${e}” is not available.`);
2756
2785
  },
2757
2786
  navigateBack: () => globalThis.history?.back(),
2758
2787
  openDialog: async (e) => {
@@ -2769,18 +2798,18 @@ function sa({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2769
2798
  refreshQuery: async (e) => o.refreshQuery(e),
2770
2799
  raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
2771
2800
  });
2772
- return /* @__PURE__ */ P(bi, {
2801
+ return /* @__PURE__ */ N(Si, {
2773
2802
  state: {
2774
2803
  locales: i.locales,
2775
2804
  locale: i.locale,
2776
2805
  setLocale: i.setLocale,
2777
2806
  activity: e
2778
2807
  },
2779
- children: /* @__PURE__ */ P(oe, {
2808
+ children: /* @__PURE__ */ N(le, {
2780
2809
  invoker: u,
2781
- children: /* @__PURE__ */ P(ae, {
2810
+ children: /* @__PURE__ */ N(se, {
2782
2811
  fieldsFor: f,
2783
- children: /* @__PURE__ */ P(T, {
2812
+ children: /* @__PURE__ */ N(ae, {
2784
2813
  dispatcher: p,
2785
2814
  context: {
2786
2815
  resolve: o.resolveBinding,
@@ -2794,9 +2823,9 @@ function sa({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2794
2823
  })
2795
2824
  });
2796
2825
  }
2797
- function ca({ element: e, configuration: t, registry: n }) {
2798
- let r = z(), i = Xt();
2799
- return /* @__PURE__ */ F(Le, { children: [/* @__PURE__ */ P(Qr, { element: e }), /* @__PURE__ */ P(ie, {
2826
+ function fa({ element: e, configuration: t, registry: n }) {
2827
+ let r = R(), i = $t();
2828
+ return /* @__PURE__ */ P(Be, { children: [/* @__PURE__ */ N(ei, { element: e }), /* @__PURE__ */ N(oe, {
2800
2829
  element: e,
2801
2830
  registry: n,
2802
2831
  resolveBinding: r.resolveBinding,
@@ -2805,25 +2834,25 @@ function ca({ element: e, configuration: t, registry: n }) {
2805
2834
  configuration: t
2806
2835
  })] });
2807
2836
  }
2808
- function la({ template: e, content: t, registry: n, strings: r, close: i }) {
2809
- let o = z(), s = Xt(), c = C(t, r.dictionary);
2837
+ function pa({ template: e, content: t, registry: n, strings: r, close: i }) {
2838
+ let o = R(), s = $t(), c = w(t, r.dictionary);
2810
2839
  return a(() => {
2811
2840
  let e = (e) => {
2812
2841
  e.key === "Escape" && i();
2813
2842
  };
2814
2843
  return globalThis.addEventListener("keydown", e), () => globalThis.removeEventListener("keydown", e);
2815
- }, [i]), /* @__PURE__ */ P("div", {
2844
+ }, [i]), /* @__PURE__ */ N("div", {
2816
2845
  className: "stage-dialog-backdrop",
2817
- children: /* @__PURE__ */ F("section", {
2846
+ children: /* @__PURE__ */ P("section", {
2818
2847
  role: "dialog",
2819
2848
  "aria-modal": "true",
2820
2849
  "aria-label": e.displayName ?? e.name,
2821
2850
  className: "stage-dialog",
2822
- children: [/* @__PURE__ */ P("button", {
2851
+ children: [/* @__PURE__ */ N("button", {
2823
2852
  type: "button",
2824
2853
  onClick: i,
2825
2854
  children: "Close"
2826
- }), /* @__PURE__ */ P(ie, {
2855
+ }), /* @__PURE__ */ N(oe, {
2827
2856
  element: c,
2828
2857
  registry: n,
2829
2858
  resolveBinding: o.resolveBinding,
@@ -2834,4 +2863,4 @@ function la({ template: e, content: t, registry: n, strings: r, close: i }) {
2834
2863
  });
2835
2864
  }
2836
2865
  //#endregion
2837
- export { ia as App, ia as StageApplication, q as StageCommandForm, Rt as StageDataProvider, fr as StageGuardedAction, rt as StageSourceProvider, ta as composeStageScreen, Gi as createStageSliceInvoker, zt as dataChanged, $t as executeRegisteredCommand, lt as hostedBasePath, li as listsPrimeReact, gt as performQuery, ft as registerQueryRouteResolver, ui as registerStageLibrary, U as registeredCommand, pt as registeredQuery, Ui as sliceFieldsFrom, Zi as stageApplicationRegistry, ea as stageComposition, e as stageDarkSelector, tt as stageEndpoints, $i as stageShellOf, et as staticStageSource, _t as subscribeQuery, tn as useStageCommandExecutor, z as useStageData, B as useStageQuery, it as useStageSource };
2866
+ export { ca as App, ca as StageApplication, K as StageCommandForm, Vt as StageDataProvider, mr as StageGuardedAction, ot as StageSourceProvider, aa as composeStageScreen, Ji as createStageSliceInvoker, Ht as dataChanged, nn as executeRegisteredCommand, ft as hostedBasePath, di as listsPrimeReact, yt as performQuery, ht as registerQueryRouteResolver, fi as registerStageLibrary, H as registeredCommand, gt as registeredQuery, Ki as sliceFieldsFrom, ea as stageApplicationRegistry, ra as stageComposition, e as stageDarkSelector, it as stageEndpoints, na as stageShellOf, rt as staticStageSource, bt as subscribeQuery, an as useStageCommandExecutor, R as useStageData, z as useStageQuery, st as useStageSource };