@cratis/stage.runtime 4.191.0 → 4.193.0

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
@@ -3,8 +3,8 @@ 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
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
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 O, attachmentFor as oe, coreComponents as se, createBrowserDispatcher as ce, createHashSceneHistory as le, createIconAdapterRegistry as k, sliceDialogParameters as ue, useInteractionScope as de, useOptionalSceneNavigation as A, useSceneNavigation as fe, useSceneOutlets as pe, useSceneTheme as me } from "@cratis/scene.react";
7
- import { ApplicationHost as he, ColorScheme as ge, ComponentName as j, LayoutThemeProvider as _e, SlotName as M, blueprintPackageCatalog as ve, composeApplicationScreen as ye, defaultBlueprintComponents as be, defaultBlueprintName as xe, defaultBlueprintThemes as Se, effectiveShellOf as Ce, externalComponent as N, galleryScreenTemplates as we, layoutModes as Te, menuThemes as Ee, navigationElement as De, previewComponents as Oe, previewProfile as ke, useLayoutConfig as Ae } from "@cratis/scene.blueprint.default";
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";
8
8
  import "@cratis/scene.blueprint.default/styles.css";
9
9
  import { ArcContext as je } from "@cratis/arc.react";
10
10
  import { ObservableQueryFor as Me, Paging as Ne, QueryFor as Pe } from "@cratis/arc/queries";
@@ -268,27 +268,27 @@ function Rt({ routes: e, routesReady: t = !0, parameters: n = Lt, locale: i, loc
268
268
  [e]: t
269
269
  };
270
270
  });
271
- }, []), D = n, O = s(() => Nt(), [m]), oe = s(() => ({
271
+ }, []), D = n, oe = s(() => Nt(), [m]), se = s(() => ({
272
272
  name: u,
273
273
  keys: {
274
- ...O,
274
+ ...oe,
275
275
  ...n
276
276
  }
277
277
  }), [
278
278
  n,
279
279
  u,
280
- O
281
- ]), se = r((e, t) => {
280
+ oe
281
+ ]), ce = r((e, t) => {
282
282
  _((n) => ({
283
283
  ...n,
284
284
  [e]: t
285
285
  })), b(t ? e : (t) => t === e ? void 0 : t);
286
- }, []), ce = r((e) => {
286
+ }, []), le = r((e) => {
287
287
  _((t) => ({
288
288
  ...t,
289
289
  [e]: void 0
290
290
  })), b((t) => t === e ? void 0 : t);
291
- }, []), le = r((e, t, n) => {
291
+ }, []), ue = r((e, t, n) => {
292
292
  te((r) => {
293
293
  let i = H(r[e]) ? r[e] : {};
294
294
  return {
@@ -296,28 +296,28 @@ function Rt({ routes: e, routesReady: t = !0, parameters: n = Lt, locale: i, loc
296
296
  [e]: Ut(i, t.split(".").filter(Boolean), n)
297
297
  };
298
298
  });
299
- }, []), k = r((e) => ie((t) => ({
299
+ }, []), O = r((e) => ie((t) => ({
300
300
  query: e,
301
301
  version: t.version + 1
302
- })), []), ue = c([]), de = r(() => {
303
- h((e) => e + 1), k();
304
- for (let e of It) ue.current.push(setTimeout(() => k(), e));
305
- }, [k]);
306
- a(() => () => ue.current.forEach(clearTimeout), []), a(() => {
307
- let e = () => k(), t = (e) => k(e.detail?.query);
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
308
  return globalThis.addEventListener(Pt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
309
309
  globalThis.removeEventListener(Pt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
310
310
  };
311
- }, [k]);
312
- let A = v ? g[v] : void 0, fe = r((e) => {
311
+ }, [O]);
312
+ let k = v ? g[v] : void 0, pe = r((e) => {
313
313
  if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
314
- if (typeof e == "string") return Gt(e, A, g, f, S, D, oe, i, o);
315
- let t = Bt(A, f, S, {
314
+ if (typeof e == "string") return Gt(e, k, g, f, S, D, se, i, o);
315
+ let t = Bt(k, f, S, {
316
316
  ...E,
317
317
  ...w
318
318
  }, g);
319
319
  if (!e.kind && e.path.startsWith("component.")) return x(e.path, t);
320
- if (!e.kind) return Gt(e.path, A, g, f, S, D, oe, i, o);
320
+ if (!e.kind) return Gt(e.path, k, g, f, S, D, se, i, o);
321
321
  let n = ee(e, t);
322
322
  return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), y(t)(e);
323
323
  }, [
@@ -328,10 +328,10 @@ function Rt({ routes: e, routesReady: t = !0, parameters: n = Lt, locale: i, loc
328
328
  D,
329
329
  E,
330
330
  f,
331
- oe,
332
- A,
331
+ se,
332
+ k,
333
333
  g
334
- ]), pe = r((e) => e ? x(e, Bt(A, f, S, {
334
+ ]), me = r((e) => e ? x(e, Bt(k, f, S, {
335
335
  ...E,
336
336
  ...w
337
337
  }, g)) : void 0, [
@@ -339,67 +339,67 @@ function Rt({ routes: e, routesReady: t = !0, parameters: n = Lt, locale: i, loc
339
339
  S,
340
340
  E,
341
341
  f,
342
- A,
342
+ k,
343
343
  g
344
- ]), me = r((e, t) => re((n) => ({
344
+ ]), he = r((e, t) => re((n) => ({
345
345
  ...n,
346
346
  [e]: t
347
- })), []), he = r((e) => re((t) => {
347
+ })), []), ge = r((e) => re((t) => {
348
348
  if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
349
349
  let n = { ...t };
350
350
  return delete n[e], n;
351
- }), []), ge = s(() => Bt(void 0, f, {}, {}, {}).queryResults, [f]), j = s(() => ({
351
+ }), []), _e = s(() => Bt(void 0, f, {}, {}, {}).queryResults, [f]), A = s(() => ({
352
352
  locale: i,
353
353
  locales: o,
354
354
  screen: u,
355
355
  routes: e,
356
356
  routesReady: t,
357
357
  parameters: D,
358
- session: O,
358
+ session: oe,
359
359
  queries: f,
360
- selected: A,
360
+ selected: k,
361
361
  selections: g,
362
- selectRow: se,
363
- clearSelection: ce,
362
+ selectRow: ce,
363
+ clearSelection: le,
364
364
  setState: (e, t) => C((n) => Ut(n, e.split(".").filter(Boolean), t)),
365
- setComponentOutput: le,
366
- publishComponentOutputs: me,
367
- withdrawComponentOutputs: he,
368
- queryResults: ge,
369
- refreshQuery: k,
370
- refreshAfterCommand: de,
371
- resolveBinding: fe,
372
- resolveArgument: pe,
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
373
  registerQueryResult: ae,
374
374
  refreshVersion: T.version,
375
375
  refreshQueryName: T.query
376
376
  }), [
377
- ce,
377
+ le,
378
378
  i,
379
379
  o,
380
380
  f,
381
- de,
382
- k,
381
+ fe,
382
+ O,
383
383
  T.query,
384
384
  T.version,
385
385
  ae,
386
- me,
387
386
  he,
388
387
  ge,
388
+ _e,
389
+ me,
389
390
  pe,
390
- fe,
391
391
  e,
392
392
  t,
393
393
  D,
394
- O,
394
+ oe,
395
395
  u,
396
- se,
397
- A,
396
+ ce,
397
+ k,
398
398
  g,
399
- le
399
+ ue
400
400
  ]);
401
401
  return /* @__PURE__ */ P(Ft.Provider, {
402
- value: j,
402
+ value: A,
403
403
  children: d
404
404
  });
405
405
  }
@@ -920,7 +920,7 @@ function Sn(e) {
920
920
  //#region src/StageCommandForm.tsx
921
921
  var Cn = t(void 0);
922
922
  function q({ element: e }) {
923
- let t = z(), n = i(je), r = i(Cn), a = s(() => Tn(e), [e]), o = s(() => nr(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(() => ({
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(() => ({
924
924
  ...h,
925
925
  ...Mn(u, o, t.parameters, g, _, v),
926
926
  ...jn(u, t.parameters)
@@ -936,11 +936,11 @@ function q({ element: e }) {
936
936
  a,
937
937
  u,
938
938
  o
939
- ]), x = s(() => a ? er(u, o) : [], [
939
+ ]), x = s(() => a ? tr(u, o) : [], [
940
940
  a,
941
941
  u,
942
942
  o
943
- ]), S = s(() => a ? tr(a.layout, u) : [], [a, u]), [C, w] = l([]);
943
+ ]), S = s(() => a ? nr(a.layout, u) : [], [a, u]), [C, w] = l([]);
944
944
  return a ? !d && !t.routesReady ? /* @__PURE__ */ F("p", {
945
945
  className: "stage-note",
946
946
  children: [
@@ -965,8 +965,8 @@ function q({ element: e }) {
965
965
  validateOn: "both",
966
966
  validateAllFieldsOnChange: !0,
967
967
  onBeforeExecute: (e) => Qt(e, n.apiBasePath),
968
- onFieldValidate: (e, t, n, r) => $n(u, o, t, r),
969
- onValidationFailure: (e) => w(e.map((e) => e.message)),
968
+ onFieldValidate: (e, t, n, r) => er(u, o, t, r),
969
+ onValidationFailure: (e) => w($n(u, e)),
970
970
  onException: (e) => w(e),
971
971
  onFailed: (e) => w(en(a.command, e).messages),
972
972
  onSuccess: () => {
@@ -1031,7 +1031,7 @@ function Tn(e) {
1031
1031
  function En(e, t) {
1032
1032
  return e.generationMode === f.Manual || e.fields.length > 0 ? e.fields : t.filter((e) => !e.unsupportedReason).map((e) => ({
1033
1033
  name: e.name,
1034
- label: e.name
1034
+ label: K(e.name)
1035
1035
  }));
1036
1036
  }
1037
1037
  function Dn(e, t, n) {
@@ -1237,15 +1237,15 @@ function Jn(e) {
1237
1237
  if (!X(e)) return;
1238
1238
  let t = e;
1239
1239
  return {
1240
- columns: Array.isArray(t.columns) ? t.columns.filter(rr) : [],
1241
- placements: Array.isArray(t.placements) ? t.placements.filter(ir) : [],
1242
- columnGap: ar(t.columnGap) ? t.columnGap : void 0,
1243
- rowGap: ar(t.rowGap) ? t.rowGap : void 0
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
1244
1244
  };
1245
1245
  }
1246
1246
  function Yn(e, t) {
1247
1247
  let n = new Map(e.placements.map((e) => [e.field, e]));
1248
- for (let e of t) !n.has(e.name) && ir(e.placement) && n.set(e.name, e.placement);
1248
+ for (let e of t) !n.has(e.name) && ar(e.placement) && n.set(e.name, e.placement);
1249
1249
  return [...n.values()].sort((e, t) => e.row - t.row || e.column - t.column || e.field.localeCompare(t.field));
1250
1250
  }
1251
1251
  function Xn(e, t) {
@@ -1270,36 +1270,40 @@ function J(e) {
1270
1270
  case p.Auto: return "auto";
1271
1271
  }
1272
1272
  }
1273
- function $n(e, t, n, r) {
1273
+ function $n(e, t) {
1274
+ 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
+ return [...new Set(t.filter((e) => !r.has(e)).map((e) => e.message))];
1276
+ }
1277
+ function er(e, t, n, r) {
1274
1278
  let i = e.find((e) => (e.sourceProperty ?? e.name) === n), a = t.find((e) => e.name === n);
1275
1279
  if (a?.required ?? !0) return r == null || r === "" ? `${i?.label ?? n} is required` : a ? dn(a, r, i?.label ?? n) : void 0;
1276
1280
  }
1277
- function er(e, t) {
1281
+ function tr(e, t) {
1278
1282
  let n = new Map(t.map((e) => [e.name, e]));
1279
1283
  return e.flatMap((e) => {
1280
1284
  let t = n.get(e.sourceProperty ?? e.name);
1281
1285
  return t?.unsupportedReason ? [`The field “${e.label ?? e.name}” uses unsupported schema metadata: ${t.unsupportedReason}.`] : [];
1282
1286
  });
1283
1287
  }
1284
- function tr(e, t) {
1288
+ function nr(e, t) {
1285
1289
  if (!e) return [];
1286
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.`);
1287
1291
  return [...n, ...r];
1288
1292
  }
1289
- function nr(e) {
1293
+ function rr(e) {
1290
1294
  return G(Y(e, "schema"));
1291
1295
  }
1292
1296
  function Y(e, t, n = "") {
1293
1297
  let r = e.properties[t];
1294
1298
  return typeof r == "string" ? r : n;
1295
1299
  }
1296
- function rr(e) {
1300
+ function ir(e) {
1297
1301
  return X(e) && typeof e.index == "number" && Number.isInteger(e.index) && e.index > 0;
1298
1302
  }
1299
- function ir(e) {
1303
+ function ar(e) {
1300
1304
  return X(e) && typeof e.field == "string" && typeof e.row == "number" && typeof e.column == "number" && e.row > 0 && e.column > 0;
1301
1305
  }
1302
- function ar(e) {
1306
+ function or(e) {
1303
1307
  return X(e) && Object.values(p).includes(e.unit);
1304
1308
  }
1305
1309
  function X(e) {
@@ -1307,20 +1311,20 @@ function X(e) {
1307
1311
  }
1308
1312
  //#endregion
1309
1313
  //#region src/StageGuardedAction.tsx
1310
- function or(e) {
1314
+ function sr(e) {
1311
1315
  return typeof e == "object" && !!e && !Array.isArray(e);
1312
1316
  }
1313
- function sr(e, t) {
1317
+ function cr(e, t) {
1314
1318
  let n = e.properties[t];
1315
1319
  return typeof n == "string" ? n : "";
1316
1320
  }
1317
- function cr(e) {
1321
+ function lr(e) {
1318
1322
  return e.componentName === "core:action" && (Array.isArray(e.properties.alternatives) || e.properties.otherwise !== void 0);
1319
1323
  }
1320
- function lr(e) {
1321
- let t = z(), n = sr(e, "itemQuery"), r = (n ? t.routes?.queries?.[n] : void 0) ?? sr(e, "itemRoute"), i = or(e.properties.itemArguments) ? e.properties.itemArguments : {}, a = {}, o = !0;
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;
1322
1326
  for (let [e, n] of Object.entries(i)) {
1323
- let r = or(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1327
+ let r = sr(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
1324
1328
  a[e] = r, (r == null || r === "") && (o = !1);
1325
1329
  }
1326
1330
  let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = B({
@@ -1339,11 +1343,11 @@ function lr(e) {
1339
1343
  item: l.rows.length === 1 ? l.rows[0] : void 0
1340
1344
  };
1341
1345
  }
1342
- function ur(e, t) {
1346
+ function dr(e, t) {
1343
1347
  return Object.fromEntries(Object.entries(e.arguments ?? {}).map(([e, n]) => [e, kt(vt(n) ?? "", t)]));
1344
1348
  }
1345
- function dr({ element: e, interactions: t }) {
1346
- let n = z(), r = lr(e), i = tn(), [a, o] = l([]), [c, u] = l(!1), d = sr(e, "label"), f = s(() => Array.isArray(e.properties.alternatives) ? e.properties.alternatives : [], [e]), p = or(e.properties.otherwise) ? e.properties.otherwise : void 0, m = f.map((e) => e.condition), h = !p || p.outcome === "Hidden" || p.outcome === "Execute" && !!p.command;
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;
1347
1351
  if (!Et(m) || !h || !r.hasSource) {
1348
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.`;
1349
1353
  return /* @__PURE__ */ F("div", {
@@ -1368,10 +1372,10 @@ function dr({ element: e, interactions: t }) {
1368
1372
  let v = _.command, y = U(v), b = r.item, x = async () => {
1369
1373
  if (!y) return;
1370
1374
  u(!0);
1371
- let t = await i(v, ur(_, b));
1375
+ let t = await i(v, dr(_, b));
1372
1376
  if (u(!1), o(t.messages), !t.isSuccess) return;
1373
1377
  n.refreshAfterCommand();
1374
- let r = sr(e, "navigateToScreen"), a = sr(e, "navigateByParameter"), s = a ? kt(`item.${a}`, b) : void 0;
1378
+ let r = cr(e, "navigateToScreen"), a = cr(e, "navigateByParameter"), s = a ? kt(`item.${a}`, b) : void 0;
1375
1379
  r && W(r, a && s != null ? { [a]: String(s) } : {});
1376
1380
  };
1377
1381
  return /* @__PURE__ */ F("div", {
@@ -1392,8 +1396,8 @@ function dr({ element: e, interactions: t }) {
1392
1396
  }, e))]
1393
1397
  });
1394
1398
  }
1395
- function fr(e) {
1396
- let t = de(), n = c(void 0), i = s(() => S(oe(e.id, e.behaviors), m.DoubleClick), [e.behaviors, e.id]);
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]);
1397
1401
  a(() => () => clearTimeout(n.current), []);
1398
1402
  let o = r((e) => {
1399
1403
  if (clearTimeout(n.current), n.current = void 0, !t) return;
@@ -1420,12 +1424,12 @@ function fr(e) {
1420
1424
  }
1421
1425
  //#endregion
1422
1426
  //#region src/stageDialogScreens.ts
1423
- var pr = "Stage:confirmDialog", mr = "ConfirmDialog";
1424
- function hr(e, t) {
1427
+ var mr = "Stage:confirmDialog", hr = "ConfirmDialog";
1428
+ function gr(e, t) {
1425
1429
  let n = new Set(t.map((e) => e.name));
1426
1430
  return e.map((t) => {
1427
- if (t.screenTemplate !== mr || n.has(mr)) return t;
1428
- let r = gr(t), i = e.find((e) => e.name !== t.name)?.name, a = N(`confirm-dialog-${t.name}`, pr, {
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, {
1429
1433
  title: t.name,
1430
1434
  decisions: r,
1431
1435
  home: i
@@ -1438,39 +1442,39 @@ function hr(e, t) {
1438
1442
  };
1439
1443
  });
1440
1444
  }
1441
- function gr(e) {
1445
+ function _r(e) {
1442
1446
  let t = [];
1443
- for (let n of _r(Object.values(e.slotContent).flat())) {
1444
- let r = vr(n.properties.command);
1447
+ for (let n of vr(Object.values(e.slotContent).flat())) {
1448
+ let r = yr(n.properties.command);
1445
1449
  r && !t.some((e) => e.command === r) && t.push({
1446
1450
  command: r,
1447
- label: vr(n.properties.label),
1448
- navigateToScreen: vr(n.properties.navigateToScreen),
1449
- typeName: vr(n.properties.typeName),
1450
- route: vr(n.properties.route),
1451
+ label: yr(n.properties.label),
1452
+ navigateToScreen: yr(n.properties.navigateToScreen),
1453
+ typeName: yr(n.properties.typeName),
1454
+ route: yr(n.properties.route),
1451
1455
  form: e.forms.find((e) => e.forCommand === r)
1452
1456
  });
1453
1457
  }
1454
1458
  return t;
1455
1459
  }
1456
- function _r(e) {
1460
+ function vr(e) {
1457
1461
  return e.flatMap((e) => {
1458
1462
  let t = e;
1459
- return t.componentName === "core:action" ? [t] : _r(Object.values(t.slots ?? {}).flat());
1463
+ return t.componentName === "core:action" ? [t] : vr(Object.values(t.slots ?? {}).flat());
1460
1464
  });
1461
1465
  }
1462
- function vr(e) {
1466
+ function yr(e) {
1463
1467
  return typeof e == "string" && e !== "" ? e : void 0;
1464
1468
  }
1465
1469
  //#endregion
1466
1470
  //#region src/StageConfirmDialog.tsx
1467
- function yr({ element: e }) {
1471
+ function br({ element: e }) {
1468
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);
1469
1473
  return a(() => u.current?.focus(), []), /* @__PURE__ */ F("section", {
1470
1474
  className: "scene-slice-dialog stage-confirm-dialog",
1471
1475
  role: "dialog",
1472
1476
  "aria-label": K(d),
1473
- "data-stage-component": pr,
1477
+ "data-stage-component": mr,
1474
1478
  children: [
1475
1479
  /* @__PURE__ */ P("header", {
1476
1480
  className: "scene-slice-dialog-header",
@@ -1488,50 +1492,50 @@ function yr({ element: e }) {
1488
1492
  "data-emphasis": t === 0 ? "primary" : "secondary",
1489
1493
  "aria-pressed": e.command === o,
1490
1494
  onClick: () => s(e.command),
1491
- children: xr(e)
1495
+ children: Sr(e)
1492
1496
  }, e.command))
1493
1497
  }),
1494
- m && /* @__PURE__ */ P(q, { element: wr(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command),
1498
+ m && /* @__PURE__ */ P(q, { element: Tr(m, t?.commandSchemas?.[m.command] ?? "", n, h) }, m.command),
1495
1499
  /* @__PURE__ */ P("footer", {
1496
1500
  className: "scene-slice-dialog-footer",
1497
1501
  children: /* @__PURE__ */ P("button", {
1498
1502
  type: "button",
1499
1503
  className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
1500
- onClick: () => br(f, p),
1504
+ onClick: () => xr(f, p),
1501
1505
  children: "Cancel"
1502
1506
  })
1503
1507
  })
1504
1508
  ]
1505
1509
  });
1506
1510
  }
1507
- function br(e, t) {
1511
+ function xr(e, t) {
1508
1512
  let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
1509
1513
  r && W(r, {});
1510
1514
  }
1511
- function xr(e) {
1515
+ function Sr(e) {
1512
1516
  return e.label ?? K(e.command);
1513
1517
  }
1514
- function Sr(e, t, n) {
1518
+ function Cr(e, t, n) {
1515
1519
  return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Fn(e, n) !== void 0;
1516
1520
  }
1517
- function Cr(e, t, n, r) {
1521
+ function wr(e, t, n, r) {
1518
1522
  let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
1519
1523
  name: e.name,
1520
1524
  label: e.name
1521
- })), o = new Set(t.filter((e) => Sr(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));
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));
1522
1526
  return [...s, ...l.map((e) => ({
1523
1527
  name: e.name,
1524
1528
  label: K(e.name)
1525
1529
  }))];
1526
1530
  }
1527
- function wr(e, t, n, r) {
1528
- let i = Cr(e, G(t), n, r);
1531
+ function Tr(e, t, n, r) {
1532
+ let i = wr(e, G(t), n, r);
1529
1533
  return {
1530
1534
  id: `confirm-${e.command}`,
1531
- componentName: pr,
1535
+ componentName: mr,
1532
1536
  properties: {
1533
1537
  command: e.command,
1534
- label: xr(e),
1538
+ label: Sr(e),
1535
1539
  submitLabel: "Confirm",
1536
1540
  typeName: e.typeName,
1537
1541
  route: e.route,
@@ -1547,8 +1551,8 @@ function wr(e, t, n, r) {
1547
1551
  }
1548
1552
  //#endregion
1549
1553
  //#region src/stageComponents.tsx
1550
- var Tr = "Stage:commandForm";
1551
- function Er(e, t, n = {}) {
1554
+ var Er = "Stage:commandForm";
1555
+ function Dr(e, t, n = {}) {
1552
1556
  return {
1553
1557
  id: e,
1554
1558
  componentName: "",
@@ -1560,19 +1564,19 @@ function Z(e, t, n = "") {
1560
1564
  let r = e.properties[t];
1561
1565
  return typeof r == "string" ? r : n;
1562
1566
  }
1563
- function Dr(e, t, n) {
1567
+ function Or(e, t, n) {
1564
1568
  let r = typeof e == "number" && Number.isInteger(e) ? n && n.length === t?.length ? t?.[n.indexOf(e)] : t?.[e] : e;
1565
1569
  return typeof r == "string" && t?.includes(r) ? K(r) : String(e ?? "");
1566
1570
  }
1567
- function Or(e, t) {
1571
+ function kr(e, t) {
1568
1572
  let n = e.properties.queryArguments;
1569
- if (!Mr(n)) return {
1573
+ if (!Nr(n)) return {
1570
1574
  values: {},
1571
1575
  ready: !0
1572
1576
  };
1573
1577
  let r = {}, i = !0;
1574
1578
  for (let [e, a] of Object.entries(n)) {
1575
- let n = jr(a) ? t.resolveBinding(a) : a;
1579
+ let n = Mr(a) ? t.resolveBinding(a) : a;
1576
1580
  r[e] = n, (n == null || n === "") && (i = !1);
1577
1581
  }
1578
1582
  return {
@@ -1580,7 +1584,7 @@ function Or(e, t) {
1580
1584
  ready: i
1581
1585
  };
1582
1586
  }
1583
- function kr(e, t) {
1587
+ function Ar(e, t) {
1584
1588
  let n = (e.slots.columns ?? []).map((e) => {
1585
1589
  let t = e.properties;
1586
1590
  return {
@@ -1598,14 +1602,14 @@ function kr(e, t) {
1598
1602
  function Q(e, t) {
1599
1603
  return e[t] ?? e.id ?? e.key;
1600
1604
  }
1601
- function Ar({ element: e, slots: t }) {
1602
- 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(() => Or(e, n), [n, e]), { rows: c, error: l, loading: u } = B({
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({
1603
1607
  scope: e.id,
1604
1608
  name: r,
1605
1609
  route: i || void 0,
1606
1610
  arguments: o.values,
1607
1611
  ready: o.ready
1608
- }), d = kr(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, _ = fr(e);
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);
1609
1613
  a(() => {
1610
1614
  if (!h) return;
1611
1615
  let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
@@ -1697,7 +1701,7 @@ function Ar({ element: e, slots: t }) {
1697
1701
  onKeyDown: (t) => {
1698
1702
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v(e));
1699
1703
  },
1700
- children: d.map((t) => /* @__PURE__ */ P("td", { children: Dr(e[t.property], t.options, t.optionValues) }, t.property))
1704
+ children: d.map((t) => /* @__PURE__ */ P("td", { children: Or(e[t.property], t.options, t.optionValues) }, t.property))
1701
1705
  }, String(Q(e, m) ?? t))), c.length === 0 && !u && /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", {
1702
1706
  colSpan: Math.max(d.length, 1),
1703
1707
  children: "No records found"
@@ -1706,25 +1710,25 @@ function Ar({ element: e, slots: t }) {
1706
1710
  ]
1707
1711
  });
1708
1712
  }
1709
- function jr(e) {
1710
- return Mr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1711
- }
1712
1713
  function Mr(e) {
1714
+ return Nr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1715
+ }
1716
+ function Nr(e) {
1713
1717
  return typeof e == "object" && !!e && !Array.isArray(e);
1714
1718
  }
1715
- function Nr({ element: e, interactions: t, slots: n }) {
1716
- return cr(e) ? /* @__PURE__ */ P(dr, {
1719
+ function Pr({ element: e, interactions: t, slots: n }) {
1720
+ return lr(e) ? /* @__PURE__ */ P(fr, {
1717
1721
  element: e,
1718
1722
  interactions: t
1719
- }) : /* @__PURE__ */ P(Pr, {
1723
+ }) : /* @__PURE__ */ P(Fr, {
1720
1724
  element: e,
1721
1725
  interactions: t,
1722
1726
  slots: n
1723
1727
  });
1724
1728
  }
1725
- function Pr({ element: e, interactions: t }) {
1729
+ function Fr({ element: e, interactions: t }) {
1726
1730
  let n = Z(e, "label", Z(e, "command"));
1727
- return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ P(Fr, {
1731
+ return U(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ P(Ir, {
1728
1732
  element: e,
1729
1733
  label: n
1730
1734
  }) : /* @__PURE__ */ P(I, {
@@ -1736,7 +1740,7 @@ function Pr({ element: e, interactions: t }) {
1736
1740
  children: n
1737
1741
  });
1738
1742
  }
1739
- function Fr({ element: e, label: t }) {
1743
+ function Ir({ element: e, label: t }) {
1740
1744
  let [n, i] = l(0), [a, o] = l(!1), s = r(() => {
1741
1745
  o(!1), i((e) => e + 1);
1742
1746
  }, []), c = /* @__PURE__ */ P(Cn.Provider, {
@@ -1760,13 +1764,13 @@ function Fr({ element: e, label: t }) {
1760
1764
  })]
1761
1765
  });
1762
1766
  }
1763
- function Ir(e) {
1764
- let t = e.element ?? Er("slice-dialog", {}), n = A(), { routes: i, parameters: a, queries: o, selections: c } = z(), l = ue(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;
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;
1765
1769
  if (!f || !(p.some((e) => e.options || e.members || e.item) || p.some(_))) return e.element ? /* @__PURE__ */ P(te, {
1766
1770
  element: e.element,
1767
1771
  slots: e.slots ?? {}
1768
1772
  }) : /* @__PURE__ */ P(D, {});
1769
- let v = p.filter((e) => !Nn(e, a) && !_(e)), y = Er(`slice-dialog-${u}`, {
1773
+ let v = p.filter((e) => !Nn(e, a) && !_(e)), y = Dr(`slice-dialog-${u}`, {
1770
1774
  command: u,
1771
1775
  label: d,
1772
1776
  schema: f,
@@ -1804,11 +1808,11 @@ function Ir(e) {
1804
1808
  ]
1805
1809
  });
1806
1810
  }
1807
- function Lr(e) {
1811
+ function Rr(e) {
1808
1812
  let { element: t } = e;
1809
- return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ P(zr, { ...e }) : /* @__PURE__ */ P(ne, { ...e }) : /* @__PURE__ */ P(Rr, { ...e });
1813
+ return Z(t, "slice") === "" ? Z(t, "kind").toLowerCase() === "action" ? /* @__PURE__ */ P(Br, { ...e }) : /* @__PURE__ */ P(ne, { ...e }) : /* @__PURE__ */ P(zr, { ...e });
1810
1814
  }
1811
- function Rr(e) {
1815
+ function zr(e) {
1812
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]);
1813
1817
  if (Vn(u, r, s(() => Bn(a, i), [a, i]), d).length === 0) return /* @__PURE__ */ P(ne, { ...e });
1814
1818
  let f = Z(t, "label", Z(t, "name", t.id));
@@ -1825,7 +1829,7 @@ function Rr(e) {
1825
1829
  })
1826
1830
  });
1827
1831
  }
1828
- function zr(e) {
1832
+ function Br(e) {
1829
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 ? {
1830
1834
  schema: u,
1831
1835
  fields: m.map((e) => ({
@@ -1853,25 +1857,25 @@ function zr(e) {
1853
1857
  title: "Select a row first",
1854
1858
  ...e.interactions,
1855
1859
  children: l
1856
- }) : /* @__PURE__ */ P(Nr, {
1860
+ }) : /* @__PURE__ */ P(Pr, {
1857
1861
  element: g,
1858
1862
  interactions: e.interactions,
1859
1863
  slots: e.slots
1860
1864
  })
1861
1865
  });
1862
1866
  }
1863
- var Br = {
1864
- ...se,
1865
- "core:table": Ar,
1866
- "core:action": Nr,
1867
- "core:toolbarItem": Lr,
1868
- "core:sliceDialog": Ir,
1869
- [Tr]: q,
1870
- [pr]: yr
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
1871
1875
  };
1872
1876
  //#endregion
1873
1877
  //#region src/useStrings.ts
1874
- function Vr() {
1878
+ function Hr() {
1875
1879
  let e = it(), [t, n] = l([]), [r, i] = l(""), [o, s] = l({});
1876
1880
  return a(() => {
1877
1881
  let t = new AbortController();
@@ -1889,11 +1893,11 @@ function Vr() {
1889
1893
  dictionary: o
1890
1894
  };
1891
1895
  }
1892
- var Hr = /* @__PURE__ */ new Set(["core:table"]);
1893
- function Ur(e) {
1894
- return Wr(e, /* @__PURE__ */ new Map(), void 0);
1896
+ var Ur = /* @__PURE__ */ new Set(["core:table"]);
1897
+ function Wr(e) {
1898
+ return Gr(e, /* @__PURE__ */ new Map(), void 0);
1895
1899
  }
1896
- function Wr(e, t, n) {
1900
+ function Gr(e, t, n) {
1897
1901
  let r = e;
1898
1902
  if (!r.slots) return e;
1899
1903
  let i = !1, a = {};
@@ -1902,7 +1906,7 @@ function Wr(e, t, n) {
1902
1906
  a[e] = o.map((e) => {
1903
1907
  let t = e, n = $(t, "typeName");
1904
1908
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
1905
- let a = Wr(Kr(Gr(t, r), s), r, s);
1909
+ let a = Gr(qr(Kr(t, r), s), r, s);
1906
1910
  return a !== e && (i = !0), a;
1907
1911
  });
1908
1912
  }
@@ -1911,8 +1915,8 @@ function Wr(e, t, n) {
1911
1915
  slots: a
1912
1916
  } : e;
1913
1917
  }
1914
- function Gr(e, t) {
1915
- if (!Hr.has(e.componentName)) return e;
1918
+ function Kr(e, t) {
1919
+ if (!Ur.has(e.componentName)) return e;
1916
1920
  let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
1917
1921
  if (!r || e.properties.queryArguments !== void 0) return e;
1918
1922
  let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
@@ -1921,7 +1925,7 @@ function Gr(e, t) {
1921
1925
  properties: a
1922
1926
  };
1923
1927
  }
1924
- function Kr(e, t) {
1928
+ function qr(e, t) {
1925
1929
  if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
1926
1930
  let n = { ...e.properties };
1927
1931
  if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
@@ -1940,7 +1944,7 @@ function $(e, t) {
1940
1944
  }
1941
1945
  //#endregion
1942
1946
  //#region src/stageQueryBindings.tsx
1943
- function qr(e) {
1947
+ function Jr(e) {
1944
1948
  let t = /* @__PURE__ */ new Set(), n = (e) => {
1945
1949
  if (Array.isArray(e)) {
1946
1950
  e.forEach(n);
@@ -1960,7 +1964,7 @@ function qr(e) {
1960
1964
  };
1961
1965
  return r(e), [...t];
1962
1966
  }
1963
- function Jr(e) {
1967
+ function Yr(e) {
1964
1968
  let t = /* @__PURE__ */ new Map(), n = (e, t) => {
1965
1969
  let n = e.properties?.[t];
1966
1970
  return typeof n == "string" && n.length > 0 ? n : void 0;
@@ -1979,7 +1983,7 @@ function Jr(e) {
1979
1983
  };
1980
1984
  return r(e), [...t.values()];
1981
1985
  }
1982
- function Yr({ source: e }) {
1986
+ function Xr({ source: e }) {
1983
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 } : {} : {
1984
1988
  ...i,
1985
1989
  ...r
@@ -1999,7 +2003,7 @@ function Yr({ source: e }) {
1999
2003
  list: !0
2000
2004
  }), null;
2001
2005
  }
2002
- function Xr({ name: e }) {
2006
+ function Zr({ name: e }) {
2003
2007
  let { routes: t, routesReady: n, parameters: r, session: i } = z(), a = s(() => ({
2004
2008
  ...i,
2005
2009
  ...r
@@ -2013,11 +2017,11 @@ function Xr({ name: e }) {
2013
2017
  list: !0
2014
2018
  }), null;
2015
2019
  }
2016
- function Zr({ element: e }) {
2017
- let t = s(() => qr(e), [e]), n = s(() => Jr(e), [e]);
2018
- return /* @__PURE__ */ F(Le, { children: [t.map((e) => /* @__PURE__ */ P(Xr, { name: e }, e)), n.map((e) => /* @__PURE__ */ P(Yr, { source: e }, e.typeName))] });
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))] });
2019
2023
  }
2020
- function Qr(e) {
2024
+ function $r(e) {
2021
2025
  let t = /* @__PURE__ */ new Set(), n = [];
2022
2026
  for (let r of e) for (let e of r.contributions ?? []) {
2023
2027
  if (e.contributionPointName !== "Navigation") continue;
@@ -2030,7 +2034,7 @@ function Qr(e) {
2030
2034
  ]);
2031
2035
  if (t.has(s)) continue;
2032
2036
  t.add(s);
2033
- let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = ti(r.destination) ? r.destination : void 0;
2037
+ let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = ni(r.destination) ? r.destination : void 0;
2034
2038
  n.push({
2035
2039
  label: i,
2036
2040
  targetScreen: a,
@@ -2038,7 +2042,7 @@ function Qr(e) {
2038
2042
  order: c,
2039
2043
  ...typeof r.icon == "string" ? { icon: r.icon } : {},
2040
2044
  ...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
2041
- ...l && ni(l) ? { destination: l } : {}
2045
+ ...l && ri(l) ? { destination: l } : {}
2042
2046
  });
2043
2047
  }
2044
2048
  return n.map((e, t) => ({
@@ -2046,7 +2050,7 @@ function Qr(e) {
2046
2050
  index: t
2047
2051
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
2048
2052
  }
2049
- function $r(e) {
2053
+ function ei(e) {
2050
2054
  let t = {
2051
2055
  label: "",
2052
2056
  children: []
@@ -2071,21 +2075,21 @@ function $r(e) {
2071
2075
  }
2072
2076
  return t.children;
2073
2077
  }
2074
- function ei(e, t) {
2078
+ function ti(e, t) {
2075
2079
  for (let n of e) {
2076
2080
  if (n.screen === t) return [n.label];
2077
- let e = ei(n.children, t);
2081
+ let e = ti(n.children, t);
2078
2082
  if (e.length > 0) return [n.label, ...e];
2079
2083
  }
2080
2084
  return [];
2081
2085
  }
2082
- function ti(e) {
2086
+ function ni(e) {
2083
2087
  return typeof e == "object" && !!e && !Array.isArray(e);
2084
2088
  }
2085
- function ni(e) {
2089
+ function ri(e) {
2086
2090
  return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
2087
2091
  }
2088
- function ri(e, t, n) {
2092
+ function ii(e, t, n) {
2089
2093
  return e.filter((e) => !t.has(e.name)).map((e) => ({
2090
2094
  label: e.name,
2091
2095
  targetScreen: e.name,
@@ -2094,93 +2098,93 @@ function ri(e, t, n) {
2094
2098
  }
2095
2099
  //#endregion
2096
2100
  //#region src/blueprint.ts
2097
- var ii = "Stage:locale", ai = "Cratis.Components", oi = "PrimeReact", si = /* @__PURE__ */ new Map();
2098
- function ci(e) {
2099
- return ke(e).packages.includes(oi);
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);
2100
2104
  }
2101
- function li(e, t) {
2102
- si.set(e, t);
2105
+ function ui(e, t) {
2106
+ ci.set(e, t);
2103
2107
  }
2104
- function ui(e) {
2108
+ function di(e) {
2105
2109
  let t = ke(e);
2106
2110
  return {
2107
2111
  ...t,
2108
2112
  name: e?.length ? t.name : "Stage",
2109
2113
  packages: b(t.packages, {
2110
- baseline: ai,
2111
- catalog: { [xe]: h.Blueprint }
2114
+ baseline: oi,
2115
+ catalog: { [Se]: h.Blueprint }
2112
2116
  })
2113
2117
  };
2114
2118
  }
2115
- var di = {
2116
- ...ve,
2117
- [ai]: Qe.components
2119
+ var fi = {
2120
+ ...ye,
2121
+ [oi]: Qe.components
2118
2122
  };
2119
- function fi(e) {
2120
- let t = [...si.values()].reduce((e, t) => ({
2123
+ function pi(e) {
2124
+ let t = [...ci.values()].reduce((e, t) => ({
2121
2125
  ...e,
2122
2126
  ...t.components
2123
2127
  }), {});
2124
2128
  return {
2125
- ...se,
2129
+ ...ce,
2126
2130
  ...Ze,
2127
2131
  ...t,
2128
- ...be,
2132
+ ...xe,
2129
2133
  ...Oe,
2130
2134
  ...e
2131
2135
  };
2132
2136
  }
2133
- function pi(e) {
2134
- let t = Object.fromEntries([...si].map(([e, t]) => [e, t.declared]));
2137
+ function mi(e) {
2138
+ let t = Object.fromEntries([...ci].map(([e, t]) => [e, t.declared]));
2135
2139
  return {
2136
2140
  ...e,
2137
- ...di,
2141
+ ...fi,
2138
2142
  ...t
2139
2143
  };
2140
2144
  }
2141
- var mi = "Stage:navigationTree";
2142
- function hi(e, t, n) {
2143
- return N(e, j.Logo, {
2145
+ var hi = "Stage:navigationTree";
2146
+ function gi(e, t, n) {
2147
+ return M(e, A.Logo, {
2144
2148
  label: t,
2145
2149
  initials: t.slice(0, 1).toUpperCase() || "S",
2146
2150
  targetScreen: "",
2147
2151
  ...n ? { lightImageUrl: n } : {}
2148
2152
  });
2149
2153
  }
2150
- function gi(e, t, n, r, i, a = !1, o = !0) {
2151
- let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = Qr(e), u = ri(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = $r([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => De({
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({
2152
2156
  label: e.name,
2153
2157
  targetScreen: e.name,
2154
2158
  icon: "pi pi-table",
2155
2159
  group: "Screens",
2156
2160
  order: n
2157
- }, t)), p = ei($r(l), t), m = e.find((e) => e.name === t)?.path?.length ? ei(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? N("menu-hierarchy", mi, {
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, {
2158
2162
  nodes: d,
2159
2163
  activeScreen: t
2160
- }) : N("menu-screens", j.Menu, {
2164
+ }) : M("menu-screens", A.Menu, {
2161
2165
  title: "Screens",
2162
2166
  label: "Screens"
2163
2167
  }, { items: f }), _ = [];
2164
- n.length > 1 && _.push(N("topbar-locale", ii, {
2168
+ n.length > 1 && _.push(M("topbar-locale", ai, {
2165
2169
  locales: n,
2166
2170
  locale: r
2167
- })), _.push(N("topbar-theme", j.ThemeSwitcher, { label: "Theme" }));
2171
+ })), _.push(M("topbar-theme", A.ThemeSwitcher, { label: "Theme" }));
2168
2172
  let v = { regionNavigation: a };
2169
2173
  return {
2170
- [M.Topbar]: [N("topbar", j.Topbar, v, {
2171
- logo: [hi("topbar-logo", c, i?.image)],
2174
+ [j.Topbar]: [M("topbar", A.Topbar, v, {
2175
+ logo: [gi("topbar-logo", c, i?.image)],
2172
2176
  end: _
2173
2177
  })],
2174
- [M.Sidebar]: [N("sidebar", j.Sidebar, v, { logo: [hi("sidebar-logo", c, i?.image)] })],
2175
- ...a ? {} : { [M.Menu]: [g] },
2176
- [M.Breadcrumb]: [N("breadcrumb", j.Breadcrumb, {
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, {
2177
2181
  homeTargetScreen: s,
2178
2182
  items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
2179
2183
  })],
2180
- ...o ? { [M.Footer]: [N("footer", j.Footer, { text: `${c} · rendered from your model` })] } : {},
2181
- [M.ConfigPanel]: [N(j.ConfigPanel, j.ConfigPanel, {
2184
+ ...o ? { [j.Footer]: [M("footer", A.Footer, { text: `${c} · rendered from your model` })] } : {},
2185
+ [j.ConfigPanel]: [M(A.ConfigPanel, A.ConfigPanel, {
2182
2186
  title: "Settings",
2183
- themes: Se.map((e) => ({
2187
+ themes: Ce.map((e) => ({
2184
2188
  name: e.name,
2185
2189
  label: e.name,
2186
2190
  isDark: e.isDark ?? !1
@@ -2188,26 +2192,26 @@ function gi(e, t, n, r, i, a = !1, o = !0) {
2188
2192
  })]
2189
2193
  };
2190
2194
  }
2191
- function _i(e) {
2195
+ function vi(e) {
2192
2196
  return `#/${encodeURIComponent(e)}`;
2193
2197
  }
2194
2198
  //#endregion
2195
2199
  //#region src/StageChrome.tsx
2196
- var vi = t({
2200
+ var yi = t({
2197
2201
  locales: [],
2198
2202
  locale: "",
2199
2203
  setLocale: () => void 0,
2200
2204
  activity: ""
2201
2205
  });
2202
- function yi({ state: e, children: t }) {
2203
- return /* @__PURE__ */ P(vi.Provider, {
2206
+ function bi({ state: e, children: t }) {
2207
+ return /* @__PURE__ */ P(yi.Provider, {
2204
2208
  value: e,
2205
2209
  children: t
2206
2210
  });
2207
2211
  }
2208
- var bi = "Stage:activity";
2209
- function xi() {
2210
- let { locales: e, locale: t, setLocale: n } = i(vi);
2212
+ var xi = "Stage:activity";
2213
+ function Si() {
2214
+ let { locales: e, locale: t, setLocale: n } = i(yi);
2211
2215
  return e.length < 2 ? null : /* @__PURE__ */ P("select", {
2212
2216
  className: "stage-locale",
2213
2217
  "aria-label": "Locale",
@@ -2219,19 +2223,19 @@ function xi() {
2219
2223
  }, e))
2220
2224
  });
2221
2225
  }
2222
- function Si({ element: e }) {
2226
+ function Ci({ element: e }) {
2223
2227
  let t = e.properties ?? {};
2224
2228
  return /* @__PURE__ */ P("nav", {
2225
2229
  className: "stage-navigation-tree",
2226
2230
  "aria-label": "Navigation",
2227
2231
  "data-scene-id": e.id,
2228
- children: /* @__PURE__ */ P(Ci, {
2232
+ children: /* @__PURE__ */ P(wi, {
2229
2233
  nodes: t.nodes ?? [],
2230
2234
  activeScreen: t.activeScreen
2231
2235
  })
2232
2236
  });
2233
2237
  }
2234
- function Ci({ nodes: e, activeScreen: t }) {
2238
+ function wi({ nodes: e, activeScreen: t }) {
2235
2239
  return /* @__PURE__ */ P("ul", {
2236
2240
  role: "tree",
2237
2241
  children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ F("li", {
@@ -2240,13 +2244,13 @@ function Ci({ nodes: e, activeScreen: t }) {
2240
2244
  children: [/* @__PURE__ */ P("span", {
2241
2245
  className: "stage-navigation-group",
2242
2246
  children: e.label
2243
- }), /* @__PURE__ */ P(Ci, {
2247
+ }), /* @__PURE__ */ P(wi, {
2244
2248
  nodes: e.children,
2245
2249
  activeScreen: t
2246
2250
  })]
2247
2251
  }, e.label) : /* @__PURE__ */ P("li", {
2248
2252
  role: "treeitem",
2249
- children: /* @__PURE__ */ P(wi, {
2253
+ children: /* @__PURE__ */ P(Ti, {
2250
2254
  node: e,
2251
2255
  screen: e.screen,
2252
2256
  activeScreen: t
@@ -2254,12 +2258,12 @@ function Ci({ nodes: e, activeScreen: t }) {
2254
2258
  }, `${e.screen}:${e.label}`))
2255
2259
  });
2256
2260
  }
2257
- function wi({ node: e, screen: t, activeScreen: n }) {
2258
- 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 && ni(o) ? (e) => {
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) => {
2259
2263
  e.preventDefault(), r.navigate(o);
2260
2264
  } : void 0;
2261
2265
  return /* @__PURE__ */ F("a", {
2262
- href: s ? o.route : _i(t),
2266
+ href: s ? o.route : vi(t),
2263
2267
  rel: s ? "noreferrer" : void 0,
2264
2268
  "aria-current": t === n ? "page" : void 0,
2265
2269
  "aria-label": a === "icon" ? e.label : void 0,
@@ -2273,8 +2277,8 @@ function wi({ node: e, screen: t, activeScreen: n }) {
2273
2277
  }), a !== "icon" && e.label]
2274
2278
  });
2275
2279
  }
2276
- function Ti({ element: e }) {
2277
- let t = typeof e.properties.name == "string" ? e.properties.name : "", n = i(E), r = pe(), a = z(), o = n?.outlets[t], s = o && r ? r.screens[o] : void 0, c = e.properties.closable === !0;
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;
2278
2282
  return /* @__PURE__ */ F("div", {
2279
2283
  "data-scene-outlet": t,
2280
2284
  "data-scene-outlet-screen": o,
@@ -2294,16 +2298,16 @@ function Ti({ element: e }) {
2294
2298
  })]
2295
2299
  });
2296
2300
  }
2297
- function Ei() {
2298
- let { activity: e } = i(vi);
2301
+ function Di() {
2302
+ let { activity: e } = i(yi);
2299
2303
  return e ? /* @__PURE__ */ P("p", {
2300
2304
  className: "stage-activity",
2301
2305
  role: "status",
2302
2306
  children: e
2303
2307
  }) : null;
2304
2308
  }
2305
- function Di() {
2306
- let e = me(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2309
+ function Oi() {
2310
+ let e = he(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2307
2311
  return a(() => {
2308
2312
  let r = e?.isDark ? "dark" : "light";
2309
2313
  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 ?? "";
@@ -2313,25 +2317,25 @@ function Di() {
2313
2317
  n
2314
2318
  ]), null;
2315
2319
  }
2316
- var Oi = {
2317
- [ii]: xi,
2318
- [mi]: Si,
2319
- [bi]: Ei,
2320
- "core:outlet": Ti
2321
- }, ki = [
2320
+ var ki = {
2321
+ [ai]: Si,
2322
+ [hi]: Ci,
2323
+ [xi]: Di,
2324
+ "core:outlet": Ei
2325
+ }, Ai = [
2322
2326
  "navigationMode",
2323
2327
  "menuTheme",
2324
2328
  "showFooter"
2325
- ], Ai = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2326
- function ji(e, t, n = !1) {
2329
+ ], ji = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2330
+ function Mi(e, t, n = !1) {
2327
2331
  let r = [], i = t.options ?? {}, a = {
2328
2332
  showFooter: !0,
2329
2333
  followsSystem: !1,
2330
2334
  problems: r
2331
2335
  };
2332
2336
  for (let [e, n] of Object.entries(i)) {
2333
- if (!ki.includes(e)) {
2334
- r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${ki.join(", ")}.`);
2337
+ if (!Ai.includes(e)) {
2338
+ r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${Ai.join(", ")}.`);
2335
2339
  continue;
2336
2340
  }
2337
2341
  if (e === "navigationMode") {
@@ -2346,11 +2350,11 @@ function ji(e, t, n = !1) {
2346
2350
  if (o?.colorScheme !== void 0) {
2347
2351
  a.followsSystem = o.colorScheme === u.System;
2348
2352
  let e = a.followsSystem ? n : o.colorScheme === u.Dark;
2349
- a.colorScheme = e ? ge.Dark : ge.Light, a.themeName = Se.find((t) => (t.isDark ?? !1) === e)?.name;
2353
+ a.colorScheme = e ? _e.Dark : _e.Light, a.themeName = Ce.find((t) => (t.isDark ?? !1) === e)?.name;
2350
2354
  }
2351
- return o?.accent !== void 0 && (Ai.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
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;
2352
2356
  }
2353
- function Mi(e, t) {
2357
+ function Ni(e, t) {
2354
2358
  if (e?.root === void 0) return [];
2355
2359
  let n = /* @__PURE__ */ new Set([
2356
2360
  _.RootTemplateUnknown,
@@ -2362,7 +2366,7 @@ function Mi(e, t) {
2362
2366
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
2363
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;
2364
2368
  }
2365
- function Ni(e) {
2369
+ function Pi(e) {
2366
2370
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
2367
2371
  0,
2368
2372
  2,
@@ -2370,7 +2374,7 @@ function Ni(e) {
2370
2374
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
2371
2375
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
2372
2376
  }
2373
- function Pi(e, t) {
2377
+ function Fi(e, t) {
2374
2378
  if (t === void 0) return e;
2375
2379
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
2376
2380
  0,
@@ -2382,18 +2386,18 @@ function Pi(e, t) {
2382
2386
  tokens: {
2383
2387
  ...e.tokens,
2384
2388
  "primary.color": t,
2385
- "primary.contrastColor": Ni(t),
2389
+ "primary.contrastColor": Pi(t),
2386
2390
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
2387
2391
  }
2388
2392
  }));
2389
2393
  }
2390
2394
  //#endregion
2391
2395
  //#region src/StageShellSettings.tsx
2392
- var Fi = "(prefers-color-scheme: dark)";
2393
- function Ii() {
2396
+ var Ii = "(prefers-color-scheme: dark)";
2397
+ function Li() {
2394
2398
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
2395
2399
  }
2396
- function Li({ settings: e, onSystemSchemeChange: t }) {
2400
+ function Ri({ settings: e, onSystemSchemeChange: t }) {
2397
2401
  let n = c(Ae());
2398
2402
  n.current = Ae();
2399
2403
  let { mode: r, menuTheme: i, colorScheme: o, themeName: s } = e;
@@ -2407,16 +2411,16 @@ function Li({ settings: e, onSystemSchemeChange: t }) {
2407
2411
  s
2408
2412
  ]), a(() => {
2409
2413
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
2410
- let n = globalThis.matchMedia(Fi), r = (e) => t(e.matches);
2414
+ let n = globalThis.matchMedia(Ii), r = (e) => t(e.matches);
2411
2415
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
2412
2416
  }, [e.followsSystem, t]), null;
2413
2417
  }
2414
2418
  //#endregion
2415
2419
  //#region src/stageNavigationModel.ts
2416
- function Ri(e) {
2420
+ function zi(e) {
2417
2421
  return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
2418
2422
  }
2419
- function zi(e) {
2423
+ function Bi(e) {
2420
2424
  let t = /* @__PURE__ */ new Map();
2421
2425
  for (let n of e) {
2422
2426
  let e = (n.path ?? []).join(".");
@@ -2429,35 +2433,35 @@ function zi(e) {
2429
2433
  return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
2430
2434
  };
2431
2435
  }
2432
- function Bi(e) {
2436
+ function Vi(e) {
2433
2437
  return (t) => e.find((e) => e.name === t)?.path?.[0];
2434
2438
  }
2435
- function Vi(e, t) {
2439
+ function Hi(e, t) {
2436
2440
  return {
2437
2441
  structure: e.structure ?? { modules: [] },
2438
2442
  navigation: e.navigation ?? {
2439
2443
  application: { regions: [] },
2440
2444
  modules: []
2441
2445
  },
2442
- screenFor: zi(e.screens),
2443
- moduleOf: Bi(e.screens),
2446
+ screenFor: Bi(e.screens),
2447
+ moduleOf: Vi(e.screens),
2444
2448
  ...t ? { isVisible: t } : {}
2445
2449
  };
2446
2450
  }
2447
2451
  //#endregion
2448
2452
  //#region src/stageSlices.ts
2449
- function Hi(e) {
2453
+ function Ui(e) {
2450
2454
  return (t) => G(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2451
2455
  name: e.name,
2452
2456
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
2453
- label: Ui(e.name),
2457
+ label: Wi(e.name),
2454
2458
  required: e.required
2455
2459
  }));
2456
2460
  }
2457
- function Ui(e) {
2461
+ function Wi(e) {
2458
2462
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
2459
2463
  }
2460
- function Wi(e, t, n) {
2464
+ function Gi(e, t, n) {
2461
2465
  return { invoke: async (r, i, a) => {
2462
2466
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
2463
2467
  if (!U(o)) return {
@@ -2478,7 +2482,7 @@ function Wi(e, t, n) {
2478
2482
  }
2479
2483
  //#endregion
2480
2484
  //#region src/standaloneScreenTemplates.ts
2481
- function Gi(e) {
2485
+ function Ki(e) {
2482
2486
  let t = new Set(e.map((e) => e.name));
2483
2487
  return e.map((e) => {
2484
2488
  let n = e.fitsSlot, r = n?.includes(".") ? n.slice(0, n.lastIndexOf(".")) : void 0;
@@ -2490,7 +2494,7 @@ function Gi(e) {
2490
2494
  }
2491
2495
  //#endregion
2492
2496
  //#region src/withoutSeededSlots.ts
2493
- function Ki(e, t) {
2497
+ function qi(e, t) {
2494
2498
  let n = /* @__PURE__ */ new Map();
2495
2499
  for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
2496
2500
  return e.map((e) => {
@@ -2508,7 +2512,7 @@ function Ki(e, t) {
2508
2512
  }
2509
2513
  //#endregion
2510
2514
  //#region src/stageIcons.ts
2511
- var qi = /* @__PURE__ */ new Map([
2515
+ var Ji = /* @__PURE__ */ new Map([
2512
2516
  ["chart", "chart-column"],
2513
2517
  ["add", "plus"],
2514
2518
  ["dollar", "dollar-sign"],
@@ -2516,24 +2520,24 @@ var qi = /* @__PURE__ */ new Map([
2516
2520
  ["refresh", "refresh-cw"],
2517
2521
  ["invoice", "receipt-text"],
2518
2522
  ["batch", "layers"]
2519
- ]), Ji = (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(), Yi = k([{
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([{
2520
2524
  library: g,
2521
2525
  loadGlyph: async ({ key: e }) => {
2522
- let t = Ji(e), n = qi.get(t) ?? t;
2526
+ let t = Yi(e), n = Ji.get(t) ?? t;
2523
2527
  if (Object.hasOwn($e, n)) return (await $e[n]())?.default;
2524
2528
  }
2525
2529
  }]);
2526
2530
  //#endregion
2527
2531
  //#region src/App.tsx
2528
- function Xi(e = {}) {
2529
- return fi({
2532
+ function Zi(e = {}) {
2533
+ return pi({
2530
2534
  ...e,
2531
- ...Br,
2532
- ...Oi
2535
+ ...Vr,
2536
+ ...ki
2533
2537
  });
2534
2538
  }
2535
- function Zi(e, t) {
2536
- return N(`form-${e}-${t.name}`, Tr, {
2539
+ function Qi(e, t) {
2540
+ return M(`form-${e}-${t.name}`, Er, {
2537
2541
  command: t.forCommand,
2538
2542
  label: t.name,
2539
2543
  generationMode: t.generationMode,
@@ -2541,47 +2545,47 @@ function Zi(e, t) {
2541
2545
  fields: t.fields
2542
2546
  });
2543
2547
  }
2544
- function Qi(e, t) {
2548
+ function $i(e, t) {
2545
2549
  let n = e.screens[0];
2546
- return Ce(e, n, {
2547
- profile: ui(e.uiProfiles),
2548
- blueprintTemplates: Gi(t?.length ? [...we, ...t] : we)
2550
+ return we(e, n, {
2551
+ profile: di(e.uiProfiles),
2552
+ blueprintTemplates: Ki(t?.length ? [...N, ...t] : N)
2549
2553
  });
2550
2554
  }
2551
- function $i(e, t, n, r, i, a, o = !0) {
2552
- let s = Ri(e.navigation), c = e.navigation?.application.logo ? {
2555
+ function ea(e, t, n, r, i, a, o = !0) {
2556
+ let s = zi(e.navigation), c = e.navigation?.application.logo ? {
2553
2557
  title: e.navigation.application.logo.title,
2554
2558
  image: e.navigation.application.logo.image || void 0
2555
2559
  } : void 0;
2556
2560
  return {
2557
- profile: ui(e.uiProfiles),
2558
- catalog: pi(r),
2559
- blueprintTemplates: Gi(a?.length ? [...we, ...a] : we),
2560
- chrome: (r, i) => i === j.FullPageShell ? { [M.ConfigPanel]: gi(e.screens, r.name, t, n, c, s, o)[M.ConfigPanel] } : gi(e.screens, r.name, t, n, c, s, o),
2561
- form: Zi,
2562
- trailing: [N("activity", bi)],
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)],
2563
2567
  decorate: (e) => {
2564
- let t = Ur(e);
2568
+ let t = Wr(e);
2565
2569
  return i ? C(t, i) : t;
2566
2570
  }
2567
2571
  };
2568
2572
  }
2569
- function ea(e, t, n, r, i, a) {
2570
- let [o] = hr([t], ta(e));
2571
- return ye(e, o, $i(e, n, r, i, void 0, a)).element;
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;
2572
2576
  }
2573
- function ta(e) {
2577
+ function na(e) {
2574
2578
  return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
2575
2579
  }
2576
- function na() {
2580
+ function ra() {
2577
2581
  try {
2578
2582
  return globalThis.localStorage ?? null;
2579
2583
  } catch {
2580
2584
  return null;
2581
2585
  }
2582
2586
  }
2583
- function ra({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: i } = {}) {
2584
- let o = it(), [c, u] = l(), [d, f] = l(""), p = s(() => Xi(e), [e, c]), m = at(), h = Vr();
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();
2585
2589
  return a(() => {
2586
2590
  let e = new AbortController();
2587
2591
  return o.scene(e.signal).then((e) => u(r?.length ? {
@@ -2593,7 +2597,7 @@ function ra({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2593
2597
  }, [o, r]), d ? /* @__PURE__ */ F("main", {
2594
2598
  className: "stage-message",
2595
2599
  children: [/* @__PURE__ */ P("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ P("p", { children: d })]
2596
- }) : c ? /* @__PURE__ */ P(ia, {
2600
+ }) : c ? /* @__PURE__ */ P(aa, {
2597
2601
  scene: c,
2598
2602
  registry: p,
2599
2603
  routeState: m,
@@ -2606,16 +2610,16 @@ function ra({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2606
2610
  children: /* @__PURE__ */ P("h1", { children: "Preparing the Stage" })
2607
2611
  });
2608
2612
  }
2609
- function ia({ scene: e, registry: t, routeState: n, strings: i, packageCatalog: a, screenTemplates: o, isVisible: c }) {
2610
- let u = s(() => le(), []), [d, f] = l(Ii), p = e.screens[0]?.name ?? "", m = s(() => ui(e.uiProfiles), [e]), h = s(() => p ? Qi(e, o) : void 0, [
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, [
2611
2615
  e,
2612
2616
  o,
2613
2617
  p
2614
- ]), g = s(() => h ? Mi(m, h) : [], [m, h]), _ = s(() => h ? ji(m, h, d) : void 0, [
2618
+ ]), g = s(() => h ? Ni(m, h) : [], [m, h]), _ = s(() => h ? Mi(m, h, d) : void 0, [
2615
2619
  m,
2616
2620
  h,
2617
2621
  d
2618
- ]), v = s(() => Pi(Se, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = s(() => $i(e, i.locales, i.locale, a, i.dictionary, o, y), [
2622
+ ]), v = s(() => Fi(Ce, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = s(() => ea(e, i.locales, i.locale, a, i.dictionary, o, y), [
2619
2623
  e,
2620
2624
  i.locales,
2621
2625
  i.locale,
@@ -2623,14 +2627,14 @@ function ia({ scene: e, registry: t, routeState: n, strings: i, packageCatalog:
2623
2627
  a,
2624
2628
  o,
2625
2629
  y
2626
- ]), x = r((e) => f(e), []), S = s(() => Vi(e, c), [e, c]), C = s(() => ({
2630
+ ]), x = r((e) => f(e), []), S = s(() => Hi(e, c), [e, c]), C = s(() => ({
2627
2631
  ...e,
2628
- screens: hr(Ki(e.screens, [
2632
+ screens: gr(qi(e.screens, [
2629
2633
  ...e.screenTemplates,
2630
2634
  ...e.dialogTemplates ?? [],
2631
- ...we,
2635
+ ...N,
2632
2636
  ...o ?? []
2633
- ]), ta(e))
2637
+ ]), na(e))
2634
2638
  }), [e, o]);
2635
2639
  return p ? g.length > 0 ? /* @__PURE__ */ F("main", {
2636
2640
  className: "stage-message",
@@ -2641,15 +2645,15 @@ function ia({ scene: e, registry: t, routeState: n, strings: i, packageCatalog:
2641
2645
  /* @__PURE__ */ P("p", { children: "The ui profile's root template cannot be the application's shell." }),
2642
2646
  /* @__PURE__ */ P("ul", { children: g.map((e) => /* @__PURE__ */ P("li", { children: e }, e)) })
2643
2647
  ]
2644
- }) : /* @__PURE__ */ P(he, {
2648
+ }) : /* @__PURE__ */ P(ge, {
2645
2649
  application: C,
2646
2650
  composition: b,
2647
2651
  navigationModel: S,
2648
2652
  registry: t,
2649
2653
  initialScreen: p,
2650
2654
  history: u,
2651
- layoutConfigStorage: na(),
2652
- scope: (t, r) => /* @__PURE__ */ P(aa, {
2655
+ layoutConfigStorage: ra(),
2656
+ scope: (t, r) => /* @__PURE__ */ P(oa, {
2653
2657
  scene: e,
2654
2658
  routeState: n,
2655
2659
  strings: i,
@@ -2659,13 +2663,13 @@ function ia({ scene: e, registry: t, routeState: n, strings: i, packageCatalog:
2659
2663
  onSystemSchemeChange: x,
2660
2664
  children: r
2661
2665
  }),
2662
- renderScreen: (e, n) => /* @__PURE__ */ P(sa, {
2666
+ renderScreen: (e, n) => /* @__PURE__ */ P(ca, {
2663
2667
  element: e,
2664
2668
  configuration: n,
2665
2669
  registry: t
2666
2670
  }),
2667
- renderDialog: () => /* @__PURE__ */ P(Ir, {}),
2668
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ P(ca, {
2671
+ renderDialog: () => /* @__PURE__ */ P(Lr, {}),
2672
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ P(la, {
2669
2673
  template: e,
2670
2674
  content: n,
2671
2675
  registry: t,
@@ -2677,7 +2681,7 @@ function ia({ scene: e, registry: t, routeState: n, strings: i, packageCatalog:
2677
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." })]
2678
2682
  });
2679
2683
  }
2680
- function aa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, shellSettings: o, onSystemSchemeChange: s, children: c }) {
2684
+ function oa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, shellSettings: o, onSystemSchemeChange: s, children: c }) {
2681
2685
  let [u, f] = l(""), { navigate: p } = r;
2682
2686
  return a(() => f(""), [r.currentScreen, r.currentDialog]), a(() => {
2683
2687
  let e = (e) => {
@@ -2695,15 +2699,15 @@ function aa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
2695
2699
  };
2696
2700
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
2697
2701
  }, [p, e]), /* @__PURE__ */ P(re, {
2698
- registry: Yi,
2699
- children: /* @__PURE__ */ F(_e, {
2702
+ registry: Xi,
2703
+ children: /* @__PURE__ */ F(ve, {
2700
2704
  themes: i,
2701
2705
  children: [
2702
- o && /* @__PURE__ */ P(Li, {
2706
+ o && /* @__PURE__ */ P(Ri, {
2703
2707
  settings: o,
2704
2708
  onSystemSchemeChange: s
2705
2709
  }),
2706
- /* @__PURE__ */ P(Di, {}),
2710
+ /* @__PURE__ */ P(Oi, {}),
2707
2711
  /* @__PURE__ */ P(Rt, {
2708
2712
  routes: t.routes,
2709
2713
  routesReady: t.ready,
@@ -2711,7 +2715,7 @@ function aa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
2711
2715
  locale: n.locale,
2712
2716
  locales: n.locales,
2713
2717
  screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
2714
- children: /* @__PURE__ */ P(oa, {
2718
+ children: /* @__PURE__ */ P(sa, {
2715
2719
  activity: u,
2716
2720
  routesReady: t.ready,
2717
2721
  scene: e,
@@ -2724,12 +2728,12 @@ function aa({ scene: e, routeState: t, strings: n, navigation: r, themes: i, she
2724
2728
  })
2725
2729
  });
2726
2730
  }
2727
- function oa({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2728
- let o = z(), c = fe(), l = tn(), u = s(() => Wi(l, t, o.refreshAfterCommand), [
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), [
2729
2733
  l,
2730
2734
  t,
2731
2735
  o.refreshAfterCommand
2732
- ]), f = s(() => Hi(n.commandSchemas), [n.commandSchemas]), p = ce({
2736
+ ]), f = s(() => Ui(n.commandSchemas), [n.commandSchemas]), p = le({
2733
2737
  executeCommand: async (e, n) => {
2734
2738
  let i = U(e);
2735
2739
  if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
@@ -2765,14 +2769,14 @@ function oa({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2765
2769
  refreshQuery: async (e) => o.refreshQuery(e),
2766
2770
  raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
2767
2771
  });
2768
- return /* @__PURE__ */ P(yi, {
2772
+ return /* @__PURE__ */ P(bi, {
2769
2773
  state: {
2770
2774
  locales: i.locales,
2771
2775
  locale: i.locale,
2772
2776
  setLocale: i.setLocale,
2773
2777
  activity: e
2774
2778
  },
2775
- children: /* @__PURE__ */ P(O, {
2779
+ children: /* @__PURE__ */ P(oe, {
2776
2780
  invoker: u,
2777
2781
  children: /* @__PURE__ */ P(ae, {
2778
2782
  fieldsFor: f,
@@ -2790,9 +2794,9 @@ function oa({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2790
2794
  })
2791
2795
  });
2792
2796
  }
2793
- function sa({ element: e, configuration: t, registry: n }) {
2797
+ function ca({ element: e, configuration: t, registry: n }) {
2794
2798
  let r = z(), i = Xt();
2795
- return /* @__PURE__ */ F(Le, { children: [/* @__PURE__ */ P(Zr, { element: e }), /* @__PURE__ */ P(ie, {
2799
+ return /* @__PURE__ */ F(Le, { children: [/* @__PURE__ */ P(Qr, { element: e }), /* @__PURE__ */ P(ie, {
2796
2800
  element: e,
2797
2801
  registry: n,
2798
2802
  resolveBinding: r.resolveBinding,
@@ -2801,7 +2805,7 @@ function sa({ element: e, configuration: t, registry: n }) {
2801
2805
  configuration: t
2802
2806
  })] });
2803
2807
  }
2804
- function ca({ template: e, content: t, registry: n, strings: r, close: i }) {
2808
+ function la({ template: e, content: t, registry: n, strings: r, close: i }) {
2805
2809
  let o = z(), s = Xt(), c = C(t, r.dictionary);
2806
2810
  return a(() => {
2807
2811
  let e = (e) => {
@@ -2830,4 +2834,4 @@ function ca({ template: e, content: t, registry: n, strings: r, close: i }) {
2830
2834
  });
2831
2835
  }
2832
2836
  //#endregion
2833
- export { ra as App, ra as StageApplication, q as StageCommandForm, Rt as StageDataProvider, dr as StageGuardedAction, rt as StageSourceProvider, ea as composeStageScreen, Wi as createStageSliceInvoker, zt as dataChanged, $t as executeRegisteredCommand, lt as hostedBasePath, ci as listsPrimeReact, gt as performQuery, ft as registerQueryRouteResolver, li as registerStageLibrary, U as registeredCommand, pt as registeredQuery, Hi as sliceFieldsFrom, Xi as stageApplicationRegistry, $i as stageComposition, e as stageDarkSelector, tt as stageEndpoints, Qi as stageShellOf, et as staticStageSource, _t as subscribeQuery, tn as useStageCommandExecutor, z as useStageData, B as useStageQuery, it as useStageSource };
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 };