@kosdev-code/kos-ui-sdk 0.1.0-dev.5264 → 0.1.0-dev.5344

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/index.js CHANGED
@@ -5,12 +5,12 @@ import C from "loglevel";
5
5
  import { runInAction as J, makeAutoObservable as Pe, observable as ee, makeObservable as ro, action as no, createAtom as Mu, autorun as Ds, observe as ea, isComputedProp as _u, reaction as xs, when as Ps, ObservableMap as oo, computed as ta, isObservable as Tu } from "mobx";
6
6
  import { makeAutoObservable as HT, makeObservable as zT } from "mobx";
7
7
  import { createMachine as ms, invoke as De, state as Q, transition as D, action as z, interpret as ys, immediate as Dt } from "robot3";
8
- import { format as at, parseISO as $u } from "date-fns";
8
+ import { format as ct, parseISO as $u } from "date-fns";
9
9
  import { jsx as w, jsxs as bs, Fragment as Iu } from "@emotion/react/jsx-runtime";
10
10
  import io from "@emotion/styled";
11
11
  import { createPortal as sa } from "react-dom";
12
- import { keyframes as Su, css as $t } from "@emotion/react";
13
- import pt, { createContext as As, useContext as lt, useState as _, useCallback as se, useMemo as G, Suspense as Ou, useEffect as O, useRef as Kr, useReducer as Cu } from "react";
12
+ import { keyframes as Su, css as It } from "@emotion/react";
13
+ import gt, { createContext as As, useContext as ut, useState as _, useCallback as se, useMemo as Y, Suspense as Ou, useEffect as O, useRef as Kr, useReducer as Cu } from "react";
14
14
  import { observer as ra } from "mobx-react-lite";
15
15
  import { observer as KT } from "mobx-react-lite";
16
16
  import { useGesture as Du } from "@use-gesture/react";
@@ -900,7 +900,7 @@ const gd = window.KosFeatureFlags, md = (t, e, s) => {
900
900
  J(() => {
901
901
  Object.assign(e, r);
902
902
  });
903
- }, ie = Symbol("SubscriptionHandlers"), N = Symbol("DependencyModels"), or = Symbol("FutureService"), ct = Symbol("ChildModels"), ir = Symbol("ParentModel"), ar = Symbol("LogConfig"), vn = Symbol("ReferenceConfig"), La = Symbol("KosModelSymbol"), xt = Symbol("ModelEffects"), ut = Symbol("CompanionParentModel"), Fa = Symbol("FutureContainerSetup"), Na = Symbol(
903
+ }, ie = Symbol("SubscriptionHandlers"), N = Symbol("DependencyModels"), or = Symbol("FutureService"), lt = Symbol("ChildModels"), ir = Symbol("ParentModel"), ar = Symbol("LogConfig"), vn = Symbol("ReferenceConfig"), La = Symbol("KosModelSymbol"), xt = Symbol("ModelEffects"), dt = Symbol("CompanionParentModel"), Fa = Symbol("FutureContainerSetup"), Na = Symbol(
904
904
  "MultipleFutureContainerSetup"
905
905
  ), cr = Symbol("FutureAliases"), Ua = Symbol("TroubleAwareSetup"), ja = Symbol("LoggerSetup"), Ba = Symbol("ContainerAwareSetup"), Jr = Symbol("StateMachineSetup"), ps = Symbol("StateEntryHandlers"), lr = Symbol("StateExitHandlers"), iM = Symbol("StateActionHandlers"), Xr = Symbol("OptionsRequired"), wd = g.createLogger({ group: "decorators", name: "fsm-injection" });
906
906
  function Ed(t) {
@@ -1074,7 +1074,7 @@ function Hd(t, e) {
1074
1074
  r && typeof t[r] == "function" && t[r]();
1075
1075
  }
1076
1076
  const Ve = (t, e) => {
1077
- t[ct] = t[ct] || {}, t[ct][e] = !0;
1077
+ t[lt] = t[lt] || {}, t[lt][e] = !0;
1078
1078
  }, Vt = (t) => `{PROP_${String(t)}}`, aM = (t) => `{PROP_${String(t)}}`, zd = Vt("kosParentId"), mo = (t) => (e) => {
1079
1079
  e[ir] = e[ir] || {};
1080
1080
  const s = (t == null ? void 0 : t.parentId) || zd;
@@ -1083,7 +1083,7 @@ const Ve = (t, e) => {
1083
1083
  function cM(t) {
1084
1084
  return (e) => {
1085
1085
  const s = (t == null ? void 0 : t.mode) || "decorator", r = (t == null ? void 0 : t.parentProperty) || "companionParent", n = (t == null ? void 0 : t.excludeProperties) || [], o = t == null ? void 0 : t.lifecycle;
1086
- return mo()(e), e.prototype[ut] = {
1086
+ return mo()(e), e.prototype[dt] = {
1087
1087
  mode: s,
1088
1088
  parentProperty: r,
1089
1089
  excludeProperties: n,
@@ -1133,11 +1133,11 @@ function dM(t) {
1133
1133
  }, e;
1134
1134
  };
1135
1135
  }
1136
- var x = /* @__PURE__ */ ((t) => (t.INIT = "init", t.LOAD = "load", t.READY = "ready", t.ACTIVATE = "activate", t.ONLINE = "online", t))(x || {}), nt = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.CONTINUE = "continue", t.FAIL = "fail", t))(nt || {});
1136
+ var x = /* @__PURE__ */ ((t) => (t.INIT = "init", t.LOAD = "load", t.READY = "ready", t.ACTIVATE = "activate", t.ONLINE = "online", t))(x || {}), ot = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.CONTINUE = "continue", t.FAIL = "fail", t))(ot || {});
1137
1137
  const hM = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1138
1138
  __proto__: null,
1139
1139
  DependencyLifecycle: x,
1140
- DependencyResolutionPolicy: nt
1140
+ DependencyResolutionPolicy: ot
1141
1141
  }, Symbol.toStringTag, { value: "Module" })), We = Symbol("HttpRouteHandlers"), Xo = "__httpBrowserRouter";
1142
1142
  function en(t) {
1143
1143
  return function(s) {
@@ -1239,8 +1239,8 @@ const mM = (t) => (e, s) => {
1239
1239
  u
1240
1240
  )) {
1241
1241
  const h = s[u];
1242
- return h ? (wn.debug(`Resolved ${c} to ${h}`), h) : (wn[a ? "debug" : "warn"](
1243
- `Property ${u} is falsy${a ? "" : " in composite string"}, marking for undefined return`
1242
+ return h != null ? (wn.debug(`Resolved ${c} to ${h}`), h) : (wn[a ? "debug" : "warn"](
1243
+ `Property ${u} is null or undefined${a ? "" : " in composite string"}, marking for undefined return`
1244
1244
  ), i = !0, c);
1245
1245
  }
1246
1246
  return wn[a ? "debug" : "warn"](
@@ -2590,7 +2590,7 @@ function vh(t, e) {
2590
2590
  // If parentId is not provided, use the modelId (first constructor parameter)
2591
2591
  parentId: a.parentId || e
2592
2592
  }, d = new Ge(u);
2593
- t[r] = d, t[ct] || (t[ct] = {}), t[ct][r] = d, n && (t.getModel = (h) => d.getModel(h), t.addModel = (h) => {
2593
+ t[r] = d, t[lt] || (t[lt] = {}), t[lt][r] = d, n && (t.getModel = (h) => d.getModel(h), t.addModel = (h) => {
2594
2594
  d.addModel(h);
2595
2595
  }, t.removeModel = (h) => {
2596
2596
  d.removeModel(h);
@@ -2613,7 +2613,7 @@ function vh(t, e) {
2613
2613
  }));
2614
2614
  }
2615
2615
  function wh(t, e) {
2616
- const s = t.constructor.prototype[ut];
2616
+ const s = t.constructor.prototype[dt];
2617
2617
  if (!s)
2618
2618
  return;
2619
2619
  const { mode: r, parentProperty: n, excludeProperties: o } = s, i = e.companionParent;
@@ -3123,7 +3123,7 @@ class zh {
3123
3123
  const s = this.registry.models[e];
3124
3124
  if (!(s != null && s.class))
3125
3125
  return;
3126
- const r = s.class.prototype[ut];
3126
+ const r = s.class.prototype[dt];
3127
3127
  return r == null ? void 0 : r.lifecycle;
3128
3128
  }
3129
3129
  /**
@@ -3185,7 +3185,7 @@ class zh {
3185
3185
  * Attach companion to parent model
3186
3186
  */
3187
3187
  attachCompanionToParent(e, s) {
3188
- e[ut] = s, s.addCompanionModel(e);
3188
+ e[dt] = s, s.addCompanionModel(e);
3189
3189
  }
3190
3190
  }
3191
3191
  function qh(t, e) {
@@ -3259,7 +3259,7 @@ const Qa = (t, e, s) => {
3259
3259
  value: s,
3260
3260
  modelData: t.modelData,
3261
3261
  modelId: t.modelId
3262
- }), n = e.resolutionPolicy || nt.CREATE;
3262
+ }), n = e.resolutionPolicy || ot.CREATE;
3263
3263
  g.debug(
3264
3264
  `Resolving dependent model ${e.modelType} with id ${r} (policy: ${n})`
3265
3265
  );
@@ -3281,7 +3281,7 @@ const Qa = (t, e, s) => {
3281
3281
  - Parent Model: ${t.modelTypeName}
3282
3282
  - Parent Model ID: ${t.modelId}
3283
3283
  - Error: ${p}`
3284
- ), n === nt.CONTINUE)
3284
+ ), n === ot.CONTINUE)
3285
3285
  return g.warn(
3286
3286
  `Model type not registered (policy: CONTINUE) - Model ${t.modelId} will continue without dependency ${e.modelType} [${r}]`
3287
3287
  ), { dependentModel: null, dataModelId: r, success: !1 };
@@ -3302,7 +3302,7 @@ const Qa = (t, e, s) => {
3302
3302
  - Parent Model ID: ${t.modelId}
3303
3303
  - Found Model Type: ${c.modelTypeName}
3304
3304
  - Error: ${p}`
3305
- ), n === nt.CONTINUE)
3305
+ ), n === ot.CONTINUE)
3306
3306
  return g.warn(
3307
3307
  `Model type mismatch (policy: CONTINUE) - Model ${t.modelId} will continue without dependency`
3308
3308
  ), { dependentModel: null, dataModelId: r, success: !1 };
@@ -3320,7 +3320,7 @@ const Qa = (t, e, s) => {
3320
3320
  }
3321
3321
  if (g.debug(
3322
3322
  `Model ${e.modelType} [${r}] does not exist. Applying resolution policy: ${n}`
3323
- ), n === nt.CONTINUE)
3323
+ ), n === ot.CONTINUE)
3324
3324
  return g.warn(
3325
3325
  `Model ${e.modelType} [${r}] not found (policy: CONTINUE) - Model ${t.modelId} will continue without this dependency`
3326
3326
  ), { dependentModel: null, dataModelId: r, success: !1 };
@@ -3361,7 +3361,7 @@ const Qa = (t, e, s) => {
3361
3361
  - Parent Model ID: ${t.modelId}
3362
3362
  - Provided Options: ${JSON.stringify(o, null, 2)}
3363
3363
  - Error: ${m}`
3364
- ), n === nt.FAIL ? new Error(
3364
+ ), n === ot.FAIL ? new Error(
3365
3365
  `Dependency resolution failed (policy: FAIL) - Model ${t.modelId} cannot resolve dependency ${e.modelType} [${r}]: ${m}`
3366
3366
  ) : p;
3367
3367
  }
@@ -3636,7 +3636,7 @@ class of {
3636
3636
  }
3637
3637
  getResolvedDecoratedChildren() {
3638
3638
  var s;
3639
- const e = ((s = this.model.modelData) == null ? void 0 : s[ct]) || {};
3639
+ const e = ((s = this.model.modelData) == null ? void 0 : s[lt]) || {};
3640
3640
  return Object.keys(e).map((r) => Jh(this.model.modelData[r])).filter((r) => !!r).flat();
3641
3641
  }
3642
3642
  getAdditionalChildren() {
@@ -4787,7 +4787,7 @@ const Pf = ({
4787
4787
  }), c += `${Ke}:${i ? "fos" : "kos"}.http.request
4788
4788
  `, c += `
4789
4789
  `, c;
4790
- }, gt = (t, e) => {
4790
+ }, mt = (t, e) => {
4791
4791
  let s = t;
4792
4792
  return e && (s += e), s;
4793
4793
  };
@@ -4873,7 +4873,7 @@ const kf = ({
4873
4873
  }), n += `
4874
4874
  `, n;
4875
4875
  }, AM = (t, e) => {
4876
- const s = t, r = gt(
4876
+ const s = t, r = mt(
4877
4877
  Lf(e),
4878
4878
  typeof s == "string" ? s : JSON.stringify(s)
4879
4879
  ), n = T.getInstance().transport.socket;
@@ -4894,13 +4894,13 @@ const kf = ({
4894
4894
  `, n += `
4895
4895
  `, n;
4896
4896
  }, RM = (t, e) => {
4897
- const s = t, r = gt(
4897
+ const s = t, r = mt(
4898
4898
  kf(e),
4899
4899
  JSON.stringify(s)
4900
4900
  ), n = T.getInstance().transport.socket;
4901
4901
  n ? n.socket.send(r) : g.error("socket transport is not initialized");
4902
4902
  }, kM = (t, e) => {
4903
- const s = e.responseId ? { status: e.status, data: t } : t, r = gt(
4903
+ const s = e.responseId ? { status: e.status, data: t } : t, r = mt(
4904
4904
  Ff(e),
4905
4905
  JSON.stringify(s)
4906
4906
  ), n = T.getInstance().transport.socket;
@@ -4947,7 +4947,7 @@ const kf = ({
4947
4947
  msg: t,
4948
4948
  options: e
4949
4949
  }) => {
4950
- const s = t, r = gt(
4950
+ const s = t, r = mt(
4951
4951
  Nf(e),
4952
4952
  JSON.stringify(s)
4953
4953
  ), n = T.getInstance().transport.socket;
@@ -4956,7 +4956,7 @@ const kf = ({
4956
4956
  msg: t,
4957
4957
  options: e
4958
4958
  }) => {
4959
- const s = t, r = gt(
4959
+ const s = t, r = mt(
4960
4960
  jf(e),
4961
4961
  JSON.stringify(s)
4962
4962
  ), n = T.getInstance().transport.socket;
@@ -4965,7 +4965,7 @@ const kf = ({
4965
4965
  msg: t,
4966
4966
  options: e
4967
4967
  }) => {
4968
- const s = t, r = gt(
4968
+ const s = t, r = mt(
4969
4969
  Uf(e),
4970
4970
  JSON.stringify(s)
4971
4971
  ), n = T.getInstance().transport.socket;
@@ -5912,7 +5912,7 @@ class Jf {
5912
5912
  );
5913
5913
  }
5914
5914
  }
5915
- function wt(t, e) {
5915
+ function Et(t, e) {
5916
5916
  const s = `[Model:${e}]`;
5917
5917
  return {
5918
5918
  debug: (...r) => t.debug(s, ...r),
@@ -6186,8 +6186,8 @@ class ap {
6186
6186
  const { modelId: s, modelTypeName: r, modelData: n } = e, o = za.create({
6187
6187
  modelId: s,
6188
6188
  modelTypeName: r
6189
- }), i = new gf(e, wt(o, "fsm")), a = new mf(
6190
- wt(o, "offline-queue")
6189
+ }), i = new gf(e, Et(o, "fsm")), a = new mf(
6190
+ Et(o, "offline-queue")
6191
6191
  ), c = new af(e), u = new of(e), d = new ip();
6192
6192
  n.serviceResponses = d;
6193
6193
  const h = {
@@ -6201,9 +6201,9 @@ class ap {
6201
6201
  r,
6202
6202
  s,
6203
6203
  n,
6204
- wt(o, "effect")
6204
+ Et(o, "effect")
6205
6205
  )), ep(n)) {
6206
- const f = wt(o, "subscription");
6206
+ const f = Et(o, "subscription");
6207
6207
  h.subscriptionManager = new Jf(
6208
6208
  e,
6209
6209
  n,
@@ -6212,12 +6212,12 @@ class ap {
6212
6212
  f
6213
6213
  ), h.onlineLifecycleManager = new yf(
6214
6214
  e,
6215
- wt(o, "online")
6215
+ Et(o, "online")
6216
6216
  );
6217
6217
  }
6218
6218
  return tp(n) && (h.httpRouteManager = new Xa(
6219
6219
  n,
6220
- wt(o, "http-routes")
6220
+ Et(o, "http-routes")
6221
6221
  )), sp(n) && (h.serviceRequestManager = new Df(
6222
6222
  n,
6223
6223
  d
@@ -6412,7 +6412,7 @@ class lp {
6412
6412
  }
6413
6413
  async load() {
6414
6414
  var n, o, i, a, c, u;
6415
- const e = this[ut];
6415
+ const e = this[dt];
6416
6416
  e && await e.whenLoaded();
6417
6417
  const { modelTypeName: s, modelId: r } = this;
6418
6418
  if (this.fsm.current === y.LOADED) {
@@ -6472,7 +6472,7 @@ class lp {
6472
6472
  }
6473
6473
  async init() {
6474
6474
  var o, i, a, c;
6475
- const e = this[ut];
6475
+ const e = this[dt];
6476
6476
  e && await e.whenInitialized();
6477
6477
  const { modelId: s, modelTypeName: r } = this, n = Z.getContext(s);
6478
6478
  F.debug(`Initializing model ${r} with id ${s}`), await Ks(this, x.INIT);
@@ -6952,7 +6952,7 @@ class fp {
6952
6952
  this._registry.registerModel(e);
6953
6953
  }
6954
6954
  }
6955
- var pr = /* @__PURE__ */ ((t) => (t.CREATING = "creating", t.CREATED = "created", t.INITIALIZING = "initializing", t.INITIALIZED = "initialized", t.LOADING = "loading", t.LOADED = "loaded", t.ONLINE = "online", t.READYING = "readying", t.READY = "ready", t.OFFLINE = "offline", t.UNLOADING = "unloading", t.UNLOADED = "unloaded", t.RELOADING = "reloading", t))(pr || {}), It = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.INITIALIZE = "init", t.READY = "ready", t.GO_ONLINE = "go_online", t.GO_OFFLINE = "go_offline", t.UNLOAD = "unload", t.RELOAD = "reload", t))(It || {});
6955
+ var pr = /* @__PURE__ */ ((t) => (t.CREATING = "creating", t.CREATED = "created", t.INITIALIZING = "initializing", t.INITIALIZED = "initialized", t.LOADING = "loading", t.LOADED = "loaded", t.ONLINE = "online", t.READYING = "readying", t.READY = "ready", t.OFFLINE = "offline", t.UNLOADING = "unloading", t.UNLOADED = "unloaded", t.RELOADING = "reloading", t))(pr || {}), nt = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.INITIALIZE = "init", t.READY = "ready", t.GO_ONLINE = "go_online", t.GO_OFFLINE = "go_offline", t.UNLOAD = "unload", t.RELOAD = "reload", t))(nt || {});
6956
6956
  const pp = (t) => {
6957
6957
  const e = ms("offline", {
6958
6958
  online: Q(
@@ -7081,7 +7081,7 @@ const pp = (t) => {
7081
7081
  r,
7082
7082
  (o) => C.debug(o.machine.current)
7083
7083
  ), online: s };
7084
- }, W = g.createLogger({ name: "kos-core" }), gp = () => {
7084
+ }, G = g.createLogger({ name: "kos-core" }), gp = () => {
7085
7085
  const t = Se(), e = t == null ? void 0 : t.alias, s = process.env.KOS_CONNECTION_ALIAS;
7086
7086
  return e || s || void 0;
7087
7087
  }, mp = () => {
@@ -7141,22 +7141,22 @@ class T {
7141
7141
  this.initialized = !1, this.connectionAlias = e, this.loaded = !1, this.isOnline = !1, this.status = pr.CREATED, this.authState = "logged_out", this._reloading = !1, this._unloading = !1, Pe(this), S("token", (a) => {
7142
7142
  a && (this.transport.token = a.body);
7143
7143
  }), S(fr.CONNECTED, async () => {
7144
- await this.whenReady(), this.fsmService.service.send(It.GO_ONLINE);
7144
+ await this.whenReady(), this.fsmService.service.send(nt.GO_ONLINE);
7145
7145
  }), S(fr.DISCONNECTED, async () => {
7146
- this.fsmService.service.send(It.GO_OFFLINE);
7146
+ this.fsmService.service.send(nt.GO_OFFLINE);
7147
7147
  }), S("/studioServer/auth/LOGGED_IN", () => {
7148
- this.authState = "logged_in", this.transport.authorized = !0;
7148
+ this.authState = "logged_in", this.transport.authorized = !0, this.fsmService.service.send(nt.RELOAD);
7149
7149
  }), S("/studioServer/auth/LOGIN_REQUIRED", () => {
7150
7150
  this.authState = "logged_out", this.transport.authorized = !1;
7151
7151
  }), S(fr.RELOAD, () => {
7152
- W.warn("WebSocket requested reload"), this.fsmService.service.send(It.RELOAD);
7152
+ G.warn("WebSocket requested reload"), this.fsmService.service.send(nt.RELOAD);
7153
7153
  }), S("/studio/project/reload", () => {
7154
- W.warn("Project requested reload"), this.fsmService.service.send(It.RELOAD);
7154
+ G.warn("Project requested reload"), this.fsmService.service.send(nt.RELOAD);
7155
7155
  });
7156
7156
  const s = vs.getInstance(), r = yp(), n = bp(), o = mp();
7157
7157
  s.host = r, s.port = Number.parseInt(n), s.protocol = o, process.env.KOS_ALLOW_ANONYMOUS === "true" && (s.authorized = !0);
7158
7158
  const i = gp() ?? e;
7159
- i && (s.alias = i.replace("{{TIMESTAMP}}", Date.now().toString())), this._transport = s.init(), this.fsmService = pp(this), this.fsmService.service.send(It.CREATE);
7159
+ i && (s.alias = i.replace("{{TIMESTAMP}}", Date.now().toString())), this._transport = s.init(), this.fsmService = pp(this), this.fsmService.service.send(nt.CREATE);
7160
7160
  }
7161
7161
  get onlineStatus() {
7162
7162
  return this.isOnline && !this._reloading && !this._unloading;
@@ -7171,33 +7171,33 @@ class T {
7171
7171
  var n, o, i, a;
7172
7172
  const e = Date.now();
7173
7173
  if (this._reloading) {
7174
- W.info("reload already in progress");
7174
+ G.info("reload already in progress");
7175
7175
  return;
7176
7176
  }
7177
- this._reloading = !0, W.warn("reloading KOS Core"), W.warn("reloading preloaded models");
7177
+ this._reloading = !0, G.warn("reloading KOS Core"), G.warn("reloading preloaded models");
7178
7178
  const s = this.modelManager;
7179
7179
  for (const c of s.preloadedModels)
7180
- fi(c.modelData) && (W.info(`reloading model ${c.modelId}`), (n = c.unload) == null || n.call(c), await c.modelData.reload(), (o = c.registerSubscribers) == null || o.call(c), W.info(`reloading model ${c.modelId} complete`));
7180
+ fi(c.modelData) && (G.info(`reloading model ${c.modelId}`), (n = c.unload) == null || n.call(c), await c.modelData.reload(), (o = c.registerSubscribers) == null || o.call(c), G.info(`reloading model ${c.modelId} complete`));
7181
7181
  for (const c of s.models)
7182
- !s.preloadedModels.includes(c) && fi(c.modelData) && ((i = c.unload) == null || i.call(c), await c.modelData.reload(), (a = c.registerSubscribers) == null || a.call(c));
7182
+ !s.preloadedModels.includes(c) && fi(c.modelData) && (G.warn(`reloading model ${c.modelId}`), (i = c.unload) == null || i.call(c), await c.modelData.reload(), (a = c.registerSubscribers) == null || a.call(c));
7183
7183
  const r = Date.now() - e;
7184
7184
  setTimeout(() => {
7185
7185
  J(() => {
7186
- W.warn("reloading KOS Core complete"), this._reloading = !1;
7186
+ G.warn("reloading KOS Core complete"), this._reloading = !1;
7187
7187
  });
7188
7188
  }, 1e3 - r);
7189
7189
  }
7190
7190
  async online() {
7191
- W.debug("KOS Core going online"), await this._transport.whenReady(), W.debug("KOS Transport Ready. Calling online() for models"), K("/kosCore/online", "/kosCore/online"), console.timeEnd("kosCore:startup");
7191
+ G.debug("KOS Core going online"), await this._transport.whenReady(), G.debug("KOS Transport Ready. Calling online() for models"), K("/kosCore/online", "/kosCore/online"), console.timeEnd("kosCore:startup");
7192
7192
  }
7193
7193
  async offline() {
7194
- W.debug("KOS Core going offline"), K("/kosCore/offline", "/kosCore/offline");
7194
+ G.debug("KOS Core going offline"), K("/kosCore/offline", "/kosCore/offline");
7195
7195
  }
7196
7196
  async unload() {
7197
7197
  var n;
7198
- W.debug("Unloading KOS Core");
7198
+ G.debug("Unloading KOS Core");
7199
7199
  const e = Date.now();
7200
- this._unloading = !0, W.debug("unloading KOS Core");
7200
+ this._unloading = !0, G.debug("unloading KOS Core");
7201
7201
  const s = this.modelManager;
7202
7202
  for (const o of s.models)
7203
7203
  wp(o.modelData) && ((n = o.unload) == null || n.call(o));
@@ -7212,7 +7212,7 @@ class T {
7212
7212
  await Ps(() => this.status === pr.READY);
7213
7213
  }
7214
7214
  async ready() {
7215
- W.debug("Readying KOS Core"), await this._transport.whenReady();
7215
+ G.debug("Readying KOS Core"), await this._transport.whenReady();
7216
7216
  const e = this.modelManager.preloadedModels.map((n) => ({
7217
7217
  modelId: n.modelId,
7218
7218
  model: n,
@@ -7229,12 +7229,12 @@ class T {
7229
7229
  })
7230
7230
  )).filter((n) => n.status === "rejected");
7231
7231
  if (r.length)
7232
- throw W.error(
7232
+ throw G.error(
7233
7233
  `There were ${r.length} failed models on model preloading`
7234
7234
  ), Error(
7235
7235
  `There were ${r.length} failed models on model preloading`
7236
7236
  );
7237
- W.debug("leaving kos-core ready() ");
7237
+ G.debug("leaving kos-core ready() ");
7238
7238
  }
7239
7239
  get isReady() {
7240
7240
  return this.status === pr.READY;
@@ -7252,10 +7252,10 @@ class T {
7252
7252
  return this.loaded;
7253
7253
  }
7254
7254
  async init() {
7255
- W.debug("entering kos-core init()"), console.time("kosCore:startup"), console.time("kosCore:init"), await this._transport.whenReady(), this.initialized = !0, W.debug("initialized - leaving kos-core init()"), console.timeEnd("kosCore:init");
7255
+ G.debug("entering kos-core init()"), console.time("kosCore:startup"), console.time("kosCore:init"), await this._transport.whenReady(), this.initialized = !0, G.debug("initialized - leaving kos-core init()"), console.timeEnd("kosCore:init");
7256
7256
  }
7257
7257
  async load() {
7258
- W.debug("entering kos-core load()"), console.time("kosCore:load"), this.loaded = !0, W.debug("loaded - leaving kos-core load()"), console.timeEnd("kosCore:load");
7258
+ G.debug("entering kos-core load()"), console.time("kosCore:load"), this.loaded = !0, G.debug("loaded - leaving kos-core load()"), console.timeEnd("kosCore:load");
7259
7259
  }
7260
7260
  static create(e, s, r) {
7261
7261
  var i, a, c;
@@ -7289,7 +7289,7 @@ class T {
7289
7289
  if (typeof h == "string") {
7290
7290
  const p = e.models[h];
7291
7291
  if (p != null && p.class) {
7292
- const m = p.class.prototype[ut];
7292
+ const m = p.class.prototype[dt];
7293
7293
  f = m == null ? void 0 : m.lifecycle;
7294
7294
  }
7295
7295
  }
@@ -7396,7 +7396,7 @@ const Qs = g.createLogger({ name: "kos-fetch" }), Op = process.env.KOS_WS_TIMEOU
7396
7396
  Qs.debug(`path: ${o}`);
7397
7397
  const i = (e == null ? void 0 : e.timeout) || Op, a = Dp(e), c = await Sp(e == null ? void 0 : e.body), u = {};
7398
7398
  c.contentType && (u["content-type"] = c.contentType), c.encoding && (u["content-encoding"] = c.encoding);
7399
- const d = gt(
7399
+ const d = mt(
7400
7400
  a({
7401
7401
  path: o,
7402
7402
  requestId: r,
@@ -7508,8 +7508,8 @@ const Qs = g.createLogger({ name: "kos-fetch" }), Op = process.env.KOS_WS_TIMEOU
7508
7508
  if (U === "base64" && $)
7509
7509
  try {
7510
7510
  M = Mp($);
7511
- } catch (Y) {
7512
- Qs.error("Failed to decode base64 response", Y);
7511
+ } catch (W) {
7512
+ Qs.error("Failed to decode base64 response", W);
7513
7513
  }
7514
7514
  const te = {
7515
7515
  headers: Ys(E),
@@ -7531,28 +7531,28 @@ const Qs = g.createLogger({ name: "kos-fetch" }), Op = process.env.KOS_WS_TIMEOU
7531
7531
  arrayBuffer: async () => M instanceof ArrayBuffer ? M : new TextEncoder().encode(M).buffer,
7532
7532
  blob: async () => M instanceof ArrayBuffer ? Tp(M, L) : new Blob([M], { type: L }),
7533
7533
  formData: async () => {
7534
- const Y = new FormData();
7534
+ const W = new FormData();
7535
7535
  if (L === "multipart/form-data" && typeof M == "string")
7536
7536
  try {
7537
7537
  const fe = JSON.parse(M);
7538
7538
  fe.fields && Object.entries(fe.fields).forEach(([ts, ss]) => {
7539
- Y.append(ts, ss);
7539
+ W.append(ts, ss);
7540
7540
  }), fe.files && Qs.warn(
7541
7541
  "File reconstruction in FormData not fully implemented"
7542
7542
  );
7543
7543
  } catch {
7544
7544
  throw new Error("Failed to parse FormData");
7545
7545
  }
7546
- return Y;
7546
+ return W;
7547
7547
  },
7548
- body: e != null && e.stream ? Ip(async (Y) => {
7548
+ body: e != null && e.stream ? Ip(async (W) => {
7549
7549
  if (M instanceof ArrayBuffer)
7550
- Y.enqueue(new Uint8Array(M));
7550
+ W.enqueue(new Uint8Array(M));
7551
7551
  else {
7552
7552
  const fe = new TextEncoder();
7553
- Y.enqueue(fe.encode(M));
7553
+ W.enqueue(fe.encode(M));
7554
7554
  }
7555
- Y.close();
7555
+ W.close();
7556
7556
  }) : Ws(typeof M == "string" ? M : ""),
7557
7557
  redirected: !1,
7558
7558
  statusText: "",
@@ -9512,30 +9512,30 @@ function wi({
9512
9512
  n.push(o.toFixed(r)), o += s;
9513
9513
  return n[n.length - 1] !== e.toString() && n.push(e.toString()), n;
9514
9514
  }
9515
- const Et = (t, e) => (s) => !t || !e ? s : Mo(s) ? mc(Number(s), t, e) : s, pg = (t, e, s, r) => {
9515
+ const Mt = (t, e) => (s) => !t || !e ? s : Mo(s) ? mc(Number(s), t, e) : s, pg = (t, e, s, r) => {
9516
9516
  if ((t == null ? void 0 : t.type) === "enum" || !(t != null && t.options))
9517
9517
  return [];
9518
9518
  if (t.options.type === "rangeCount")
9519
9519
  return vi(t.options).map(
9520
- Et(s, r)
9520
+ Mt(s, r)
9521
9521
  );
9522
9522
  if (t.options.type === "rangeInterval")
9523
- return wi(t.options).map(Et(s, r));
9523
+ return wi(t.options).map(Mt(s, r));
9524
9524
  if (t.options.type === "list") {
9525
9525
  const { list: n } = t.options;
9526
- return n.map(Et(s, r));
9526
+ return n.map(Mt(s, r));
9527
9527
  } else {
9528
9528
  if (t.options.type === "unitSystemRangeCount" && e)
9529
9529
  return vi(
9530
9530
  t.options.unitSystems[e]
9531
- ).map(Et(s, r));
9531
+ ).map(Mt(s, r));
9532
9532
  if (t.options.type === "unitSystemRangeInterval" && e)
9533
9533
  return wi(
9534
9534
  t.options.unitSystems[e]
9535
- ).map(Et(s, r));
9535
+ ).map(Mt(s, r));
9536
9536
  if (t.options.type === "unitSystemList" && e) {
9537
9537
  const { list: n } = t.options.unitSystems[e];
9538
- return n.map(Et(s, r));
9538
+ return n.map(Mt(s, r));
9539
9539
  }
9540
9540
  }
9541
9541
  return [];
@@ -9591,9 +9591,9 @@ function wg(t, e) {
9591
9591
  const s = /* @__PURE__ */ new Date();
9592
9592
  s.setHours(0, 0, 0, 0);
9593
9593
  const r = new Date(s.getTime() + t * 1e3);
9594
- return at(r, e);
9594
+ return ct(r, e);
9595
9595
  }
9596
- const yr = "config-bean-prop-model", Mt = g.createLogger({ name: "config-bean-prop-model" }), Eg = Vt("path"), Mg = Vt("serviceBasePath");
9596
+ const yr = "config-bean-prop-model", _t = g.createLogger({ name: "config-bean-prop-model" }), Eg = Vt("path"), Mg = Vt("serviceBasePath");
9597
9597
  let Es = class {
9598
9598
  constructor(t, e) {
9599
9599
  l(this, "id");
@@ -9747,7 +9747,7 @@ let Es = class {
9747
9747
  return u = c.formatToParts(Number(t))[0].value, Number(u);
9748
9748
  }
9749
9749
  } catch (c) {
9750
- Mt.info(`error formatting value ${t}`, c);
9750
+ _t.info(`error formatting value ${t}`, c);
9751
9751
  }
9752
9752
  return Number(t).toFixed(i);
9753
9753
  }
@@ -9782,7 +9782,7 @@ let Es = class {
9782
9782
  * @internal
9783
9783
  */
9784
9784
  async activate() {
9785
- Mt.debug(`activating config bean ${this.id}`);
9785
+ _t.debug(`activating config bean ${this.id}`);
9786
9786
  }
9787
9787
  /**
9788
9788
  * Gets the formatted display string with units and localization.
@@ -9811,7 +9811,7 @@ let Es = class {
9811
9811
  return r = s.format(Number(t)), r;
9812
9812
  }
9813
9813
  } catch (e) {
9814
- Mt.error(`error formatting value ${t}`, e);
9814
+ _t.error(`error formatting value ${t}`, e);
9815
9815
  }
9816
9816
  return String(t);
9817
9817
  }
@@ -9889,13 +9889,13 @@ let Es = class {
9889
9889
  try {
9890
9890
  n = new Intl.NumberFormat(r, { ...d });
9891
9891
  } catch (h) {
9892
- Mt.error(
9892
+ _t.error(
9893
9893
  `error creating formatter ${d}. Returning the raw value`,
9894
9894
  h
9895
9895
  );
9896
9896
  }
9897
9897
  } else
9898
- Mt.debug(
9898
+ _t.debug(
9899
9899
  `no formatter found for config bean prop ${this.id}. Returning the raw value`
9900
9900
  );
9901
9901
  }
@@ -9951,7 +9951,7 @@ let Es = class {
9951
9951
  * ```
9952
9952
  */
9953
9953
  async updateProperty(t) {
9954
- Mt.debug(`updating property ${this.attribute} with value ${t}`);
9954
+ _t.debug(`updating property ${this.attribute} with value ${t}`);
9955
9955
  let e = t;
9956
9956
  if (this.getConverter() && !isNaN(e)) {
9957
9957
  const { backend: n, display: o } = this.getConverterUnits();
@@ -10012,7 +10012,7 @@ function d_(t) {
10012
10012
  const _g = "future-model", Fs = Ls(
10013
10013
  _g
10014
10014
  ), sn = g.createLogger({ name: "future-service", group: "Services" }), { isMock: Tg, URL: Ns } = ve();
10015
- var dt = /* @__PURE__ */ ((t) => (t.Success = "SUCCESS", t.Fail = "FAIL", t.Aborted = "ABORT", t.Canceled = "CANCEL", t))(dt || {});
10015
+ var ht = /* @__PURE__ */ ((t) => (t.Success = "SUCCESS", t.Fail = "FAIL", t.Aborted = "ABORT", t.Canceled = "CANCEL", t))(ht || {});
10016
10016
  const { getAll: $g, modifyModel: Ig, addModel: Sg, deleteModel: Og, postModel: Cg } = he.build({
10017
10017
  destinationAddress: "",
10018
10018
  basePath: `${Ns}/api/future`,
@@ -10075,7 +10075,7 @@ let Tr = class {
10075
10075
  l(this, "_cancelFuture");
10076
10076
  l(this, "futureId");
10077
10077
  Object.assign(this, e), this.logger = s.logger, this.id = t, this.futureId = e.id, this.namespace = e.namespace || "kos", this._cancelFuture = Pg, yi(
10078
- () => this.status === dt.Success || this.status === dt.Fail,
10078
+ () => this.status === ht.Success || this.status === ht.Fail,
10079
10079
  () => {
10080
10080
  On.info(`Future ${this.id} has completed with status ${this.status}`), Ue(this);
10081
10081
  }
@@ -10290,14 +10290,14 @@ $r = Ec([
10290
10290
  const _c = new Re({
10291
10291
  class: $r,
10292
10292
  type: Mc
10293
- }), Hg = "future-container-model", ht = Ls(Hg), Tc = (t) => vc(Fs)(t), zg = (t) => {
10293
+ }), Hg = "future-container-model", ft = Ls(Hg), Tc = (t) => vc(Fs)(t), zg = (t) => {
10294
10294
  const e = Tc(t);
10295
- return ht.build(
10296
- ht.type,
10295
+ return ft.build(
10296
+ ft.type,
10297
10297
  {}
10298
10298
  ).addFutureModel(e), e;
10299
- }, qg = (t) => ht.build(
10300
- ht.type,
10299
+ }, qg = (t) => ft.build(
10300
+ ft.type,
10301
10301
  {}
10302
10302
  ).getFuture(String(t)), Lt = {
10303
10303
  buildFutureModel: Tc,
@@ -10309,7 +10309,7 @@ var Kg = Object.defineProperty, Vg = Object.getOwnPropertyDescriptor, So = (t, e
10309
10309
  (i = t[o]) && (n = (r ? i(e, s, n) : i(n)) || n);
10310
10310
  return r && n && Kg(e, s, n), n;
10311
10311
  };
10312
- const Js = g.getLogger(ht.type);
10312
+ const Js = g.getLogger(ft.type);
10313
10313
  let Ms = class {
10314
10314
  constructor(t, e, s) {
10315
10315
  l(this, "id");
@@ -10462,7 +10462,7 @@ So([
10462
10462
  })
10463
10463
  ], Ms.prototype, "handleFutureUpdated", 1);
10464
10464
  Ms = So([
10465
- R(ht.type)
10465
+ R(ft.type)
10466
10466
  ], Ms);
10467
10467
  const Gg = Ms, { URL: Us } = ve(), { getOne: Yg, postModel: Wg, deleteModel: $c } = he.build({
10468
10468
  basePath: `${Us}/api/keyVal`
@@ -10578,7 +10578,7 @@ const Dc = new Oe({
10578
10578
  class: _s,
10579
10579
  type: Cc
10580
10580
  });
10581
- var Ee = "INUMBER", Qt = "IOP1", Zt = "IOP2", Jt = "IOP3", He = "IVAR", ft = "IVARNAME", Ft = "IFUNCALL", rn = "IFUNDEF", de = "IEXPR", Co = "IEXPREVAL", mt = "IMEMBER", nn = "IENDSTATEMENT", Nt = "IARRAY";
10581
+ var Ee = "INUMBER", Qt = "IOP1", Zt = "IOP2", Jt = "IOP3", He = "IVAR", pt = "IVARNAME", Ft = "IFUNCALL", rn = "IFUNDEF", de = "IEXPR", Co = "IEXPREVAL", yt = "IMEMBER", nn = "IENDSTATEMENT", Nt = "IARRAY";
10582
10582
  function A(t, e) {
10583
10583
  this.type = t, this.value = e ?? 0;
10584
10584
  }
@@ -10589,7 +10589,7 @@ A.prototype.toString = function() {
10589
10589
  case Zt:
10590
10590
  case Jt:
10591
10591
  case He:
10592
- case ft:
10592
+ case pt:
10593
10593
  case nn:
10594
10594
  return this.value;
10595
10595
  case Ft:
@@ -10598,7 +10598,7 @@ A.prototype.toString = function() {
10598
10598
  return "DEF " + this.value;
10599
10599
  case Nt:
10600
10600
  return "ARRAY " + this.value;
10601
- case mt:
10601
+ case yt:
10602
10602
  return "." + this.value;
10603
10603
  default:
10604
10604
  return "Invalid Instruction";
@@ -10616,7 +10616,7 @@ function xc(t) {
10616
10616
  function Hn(t, e, s, r, n) {
10617
10617
  for (var o = [], i = [], a, c, u, d, h = 0; h < t.length; h++) {
10618
10618
  var f = t[h], p = f.type;
10619
- if (p === Ee || p === ft)
10619
+ if (p === Ee || p === pt)
10620
10620
  Array.isArray(f.value) ? o.push.apply(o, Hn(f.value.map(function(m) {
10621
10621
  return new A(Ee, m);
10622
10622
  }).concat(new A(Nt, f.value.length)), e, s, r, n)) : o.push(f);
@@ -10632,7 +10632,7 @@ function Hn(t, e, s, r, n) {
10632
10632
  for (; o.length > 0; )
10633
10633
  i.push(o.shift());
10634
10634
  i.push(new A(de, Hn(f.value, e, s, r, n)));
10635
- } else if (p === mt && o.length > 0)
10635
+ } else if (p === yt && o.length > 0)
10636
10636
  a = o.pop(), o.push(new A(Ee, a.value[f.value]));
10637
10637
  else {
10638
10638
  for (; o.length > 0; )
@@ -10657,18 +10657,18 @@ function Pc(t, e, s) {
10657
10657
  }
10658
10658
  return r;
10659
10659
  }
10660
- function ot(t, e, s) {
10660
+ function it(t, e, s) {
10661
10661
  var r = [], n, o, i, a, c, u;
10662
10662
  if (Do(t))
10663
10663
  return Fe(t, s);
10664
10664
  for (var d = t.length, h = 0; h < d; h++) {
10665
10665
  var f = t[h], p = f.type;
10666
- if (p === Ee || p === ft)
10666
+ if (p === Ee || p === pt)
10667
10667
  r.push(f.value);
10668
10668
  else if (p === Zt)
10669
- o = r.pop(), n = r.pop(), f.value === "and" ? r.push(n ? !!ot(o, e, s) : !1) : f.value === "or" ? r.push(n ? !0 : !!ot(o, e, s)) : f.value === "=" ? (a = e.binaryOps[f.value], r.push(a(n, ot(o, e, s), s))) : (a = e.binaryOps[f.value], r.push(a(Fe(n, s), Fe(o, s))));
10669
+ o = r.pop(), n = r.pop(), f.value === "and" ? r.push(n ? !!it(o, e, s) : !1) : f.value === "or" ? r.push(n ? !0 : !!it(o, e, s)) : f.value === "=" ? (a = e.binaryOps[f.value], r.push(a(n, it(o, e, s), s))) : (a = e.binaryOps[f.value], r.push(a(Fe(n, s), Fe(o, s))));
10670
10670
  else if (p === Jt)
10671
- i = r.pop(), o = r.pop(), n = r.pop(), f.value === "?" ? r.push(ot(n ? o : i, e, s)) : (a = e.ternaryOps[f.value], r.push(a(Fe(n, s), Fe(o, s), Fe(i, s))));
10671
+ i = r.pop(), o = r.pop(), n = r.pop(), f.value === "?" ? r.push(it(n ? o : i, e, s)) : (a = e.ternaryOps[f.value], r.push(a(Fe(n, s), Fe(o, s), Fe(i, s))));
10672
10672
  else if (p === He)
10673
10673
  if (f.value in e.functions)
10674
10674
  r.push(e.functions[f.value]);
@@ -10697,7 +10697,7 @@ function ot(t, e, s) {
10697
10697
  var L = r.pop(), U = function() {
10698
10698
  for (var $ = Object.assign({}, s), M = 0, te = v.length; M < te; M++)
10699
10699
  $[v[M]] = arguments[M];
10700
- return ot(b, e, $);
10700
+ return it(b, e, $);
10701
10701
  };
10702
10702
  return Object.defineProperty(U, "name", {
10703
10703
  value: L,
@@ -10708,7 +10708,7 @@ function ot(t, e, s) {
10708
10708
  r.push(Xg(f, e));
10709
10709
  else if (p === Co)
10710
10710
  r.push(f);
10711
- else if (p === mt)
10711
+ else if (p === yt)
10712
10712
  n = r.pop(), r.push(n[f.value]);
10713
10713
  else if (p === nn)
10714
10714
  r.pop();
@@ -10727,7 +10727,7 @@ function Xg(t, e, s) {
10727
10727
  return Do(t) ? t : {
10728
10728
  type: Co,
10729
10729
  value: function(r) {
10730
- return ot(t.value, e, r);
10730
+ return it(t.value, e, r);
10731
10731
  }
10732
10732
  };
10733
10733
  }
@@ -10749,7 +10749,7 @@ function xo(t, e) {
10749
10749
  s.push("(" + r + " ? " + n + " : " + o + ")");
10750
10750
  else
10751
10751
  throw new Error("invalid Expression");
10752
- else if (h === He || h === ft)
10752
+ else if (h === He || h === pt)
10753
10753
  s.push(d.value);
10754
10754
  else if (h === Qt)
10755
10755
  r = s.pop(), i = d.value, i === "-" || i === "+" ? s.push("(" + i + r + ")") : e ? i === "not" ? s.push("(!" + r + ")") : i === "!" ? s.push("fac(" + r + ")") : s.push(i + "(" + r + ")") : i === "!" ? s.push("(" + r + "!)") : s.push("(" + i + " " + r + ")");
@@ -10761,7 +10761,7 @@ function xo(t, e) {
10761
10761
  for (n = s.pop(), c = d.value, a = []; c-- > 0; )
10762
10762
  a.unshift(s.pop());
10763
10763
  r = s.pop(), e ? s.push("(" + r + " = function(" + a.join(", ") + ") { return " + n + " })") : s.push("(" + r + "(" + a.join(", ") + ") = " + n + ")");
10764
- } else if (h === mt)
10764
+ } else if (h === yt)
10765
10765
  r = s.pop(), s.push(r + "." + d.value);
10766
10766
  else if (h === Nt) {
10767
10767
  for (c = d.value, a = []; c-- > 0; )
@@ -10787,7 +10787,7 @@ function Po(t, e, s) {
10787
10787
  s = s || {};
10788
10788
  for (var r = !!s.withMembers, n = null, o = 0; o < t.length; o++) {
10789
10789
  var i = t[o];
10790
- i.type === He || i.type === ft ? !r && !Ct(e, i.value) ? e.push(i.value) : (n !== null && (Ct(e, n) || e.push(n)), n = i.value) : i.type === mt && r && n !== null ? n += "." + i.value : i.type === de ? Po(i.value, e, s) : n !== null && (Ct(e, n) || e.push(n), n = null);
10790
+ i.type === He || i.type === pt ? !r && !Ct(e, i.value) ? e.push(i.value) : (n !== null && (Ct(e, n) || e.push(n)), n = i.value) : i.type === yt && r && n !== null ? n += "." + i.value : i.type === de ? Po(i.value, e, s) : n !== null && (Ct(e, n) || e.push(n), n = null);
10791
10791
  }
10792
10792
  n !== null && !Ct(e, n) && e.push(n);
10793
10793
  }
@@ -10801,7 +10801,7 @@ Te.prototype.substitute = function(t, e) {
10801
10801
  return e instanceof Te || (e = this.parser.parse(String(e))), new Te(Pc(this.tokens, t, e), this.parser);
10802
10802
  };
10803
10803
  Te.prototype.evaluate = function(t) {
10804
- return t = t || {}, ot(this.tokens, this, t);
10804
+ return t = t || {}, it(this.tokens, this, t);
10805
10805
  };
10806
10806
  Te.prototype.toString = function() {
10807
10807
  return xo(this.tokens, !1);
@@ -11138,14 +11138,14 @@ H.prototype.parseVariableAssignmentExpression = function(t) {
11138
11138
  throw new Error("function definition is not permitted");
11139
11139
  for (var n = 0, o = e.value + 1; n < o; n++) {
11140
11140
  var i = r - n;
11141
- t[i].type === He && (t[i] = new A(ft, t[i].value));
11141
+ t[i].type === He && (t[i] = new A(pt, t[i].value));
11142
11142
  }
11143
11143
  this.parseVariableAssignmentExpression(s), t.push(new A(de, s)), t.push(new A(rn, e.value));
11144
11144
  continue;
11145
11145
  }
11146
- if (e.type !== He && e.type !== mt)
11146
+ if (e.type !== He && e.type !== yt)
11147
11147
  throw new Error("expected variable for assignment");
11148
- this.parseVariableAssignmentExpression(s), t.push(new A(ft, e.value)), t.push(new A(de, s)), t.push(Ye("="));
11148
+ this.parseVariableAssignmentExpression(s), t.push(new A(pt, e.value)), t.push(new A(de, s)), t.push(Ye("="));
11149
11149
  }
11150
11150
  };
11151
11151
  H.prototype.parseConditionalExpression = function(t) {
@@ -11244,7 +11244,7 @@ H.prototype.parseMemberExpression = function(t) {
11244
11244
  if (e.value === ".") {
11245
11245
  if (!this.allowMemberAccess)
11246
11246
  throw new Error('unexpected ".", member access is not permitted');
11247
- this.expect(Ao), t.push(new A(mt, this.current.value));
11247
+ this.expect(Ao), t.push(new A(yt, this.current.value));
11248
11248
  } else if (e.value === "[") {
11249
11249
  if (!this.tokens.isOperatorEnabled("["))
11250
11250
  throw new Error('unexpected "[]", arrays are disabled');
@@ -11459,7 +11459,7 @@ function Km(t) {
11459
11459
  function Vm(t) {
11460
11460
  return Math.log(t) / Math.LN2;
11461
11461
  }
11462
- function yt(t) {
11462
+ function bt(t) {
11463
11463
  this.options = t || {}, this.unaryOps = {
11464
11464
  sin: Math.sin,
11465
11465
  cos: Math.cos,
@@ -11540,7 +11540,7 @@ function yt(t) {
11540
11540
  false: !1
11541
11541
  };
11542
11542
  }
11543
- yt.prototype.parse = function(t) {
11543
+ bt.prototype.parse = function(t) {
11544
11544
  var e = [], s = new H(
11545
11545
  this,
11546
11546
  new V(this, t),
@@ -11548,14 +11548,14 @@ yt.prototype.parse = function(t) {
11548
11548
  );
11549
11549
  return s.parseExpression(e), s.expect(Ts, "EOF"), new Te(e, this);
11550
11550
  };
11551
- yt.prototype.evaluate = function(t, e) {
11551
+ bt.prototype.evaluate = function(t, e) {
11552
11552
  return this.parse(t).evaluate(e);
11553
11553
  };
11554
- var kc = new yt();
11555
- yt.parse = function(t) {
11554
+ var kc = new bt();
11555
+ bt.parse = function(t) {
11556
11556
  return kc.parse(t);
11557
11557
  };
11558
- yt.evaluate = function(t, e) {
11558
+ bt.evaluate = function(t, e) {
11559
11559
  return kc.parse(t).evaluate(e);
11560
11560
  };
11561
11561
  var Si = {
@@ -11585,7 +11585,7 @@ var Si = {
11585
11585
  function Gm(t) {
11586
11586
  return Si.hasOwnProperty(t) ? Si[t] : t;
11587
11587
  }
11588
- yt.prototype.isOperatorEnabled = function(t) {
11588
+ bt.prototype.isOperatorEnabled = function(t) {
11589
11589
  var e = Gm(t), s = this.options.operators || {};
11590
11590
  return !(e in s) || !!s[e];
11591
11591
  };
@@ -11642,7 +11642,7 @@ let Ir = class {
11642
11642
  // Use ObservableData for results to handle dynamic properties properly
11643
11643
  l(this, "_results");
11644
11644
  l(this, "_contextRevision", 0);
11645
- this.id = t, this.logger = s.logger, this._data = je(), this._results = je(), this.parser = new yt();
11645
+ this.id = t, this.logger = s.logger, this._data = je(), this._results = je(), this.parser = new bt();
11646
11646
  }
11647
11647
  /**
11648
11648
  * Get the current context data that expressions are evaluated against.
@@ -12547,7 +12547,7 @@ const br = new Oe({
12547
12547
  class: Cr,
12548
12548
  type: Jc
12549
12549
  });
12550
- var $y = Object.defineProperty, Iy = Object.getOwnPropertyDescriptor, bt = (t, e, s, r) => {
12550
+ var $y = Object.defineProperty, Iy = Object.getOwnPropertyDescriptor, vt = (t, e, s, r) => {
12551
12551
  for (var n = r > 1 ? void 0 : r ? Iy(e, s) : e, o = t.length - 1, i; o >= 0; o--)
12552
12552
  (i = t[o]) && (n = (r ? i(e, s, n) : i(n)) || n);
12553
12553
  return r && n && $y(e, s, n), n;
@@ -12646,40 +12646,40 @@ let qe = class {
12646
12646
  });
12647
12647
  }
12648
12648
  };
12649
- bt([
12649
+ vt([
12650
12650
  Ve
12651
12651
  ], qe.prototype, "_models", 2);
12652
- bt([
12652
+ vt([
12653
12653
  B({
12654
12654
  topic: [el],
12655
12655
  websocket: !0
12656
12656
  })
12657
12657
  ], qe.prototype, "handleStreamAdded", 1);
12658
- bt([
12658
+ vt([
12659
12659
  B({
12660
12660
  topic: [Sy],
12661
12661
  websocket: !0
12662
12662
  })
12663
12663
  ], qe.prototype, "handleAddBlock", 1);
12664
- bt([
12664
+ vt([
12665
12665
  B({
12666
12666
  topic: [Cy],
12667
12667
  websocket: !0
12668
12668
  })
12669
12669
  ], qe.prototype, "handleRemoveBlock", 1);
12670
- bt([
12670
+ vt([
12671
12671
  B({
12672
12672
  topic: [Oy],
12673
12673
  websocket: !0
12674
12674
  })
12675
12675
  ], qe.prototype, "handleUpdateBlock", 1);
12676
- bt([
12676
+ vt([
12677
12677
  B({
12678
12678
  topic: [Dy],
12679
12679
  websocket: !0
12680
12680
  })
12681
12681
  ], qe.prototype, "handleLogLine", 1);
12682
- qe = bt([
12682
+ qe = vt([
12683
12683
  R(Xc)
12684
12684
  ], qe);
12685
12685
  const dn = new Re({
@@ -12713,7 +12713,7 @@ const xy = (t) => t.rank !== void 0, Py = (t) => t.visibleRole !== void 0, Ay =
12713
12713
  } catch {
12714
12714
  const n = {
12715
12715
  id: s || "",
12716
- endState: dt.Fail,
12716
+ endState: ht.Fail,
12717
12717
  tracker: s,
12718
12718
  reason: "Failed to resolve trouble"
12719
12719
  };
@@ -12730,7 +12730,7 @@ const xy = (t) => t.rank !== void 0, Py = (t) => t.visibleRole !== void 0, Ay =
12730
12730
  } catch {
12731
12731
  const n = {
12732
12732
  id: s || "",
12733
- endState: dt.Fail,
12733
+ endState: ht.Fail,
12734
12734
  tracker: s,
12735
12735
  reason: "Failed to resolve troubles"
12736
12736
  };
@@ -12817,7 +12817,7 @@ class Hy {
12817
12817
  l(this, "subtitle", "Trouble");
12818
12818
  }
12819
12819
  }
12820
- class _t {
12820
+ class Tt {
12821
12821
  static getHandler(e) {
12822
12822
  switch (e) {
12823
12823
  case "ResolvableTrouble":
@@ -12878,12 +12878,12 @@ let Dr = class {
12878
12878
  // -------------------LIFECYCLE----------------------------
12879
12879
  getTitleWithContext(t) {
12880
12880
  var s, r;
12881
- const e = t ? (r = (s = _t.getHandler(this.type)) == null ? void 0 : s.context) == null ? void 0 : r[t] : _t.getHandler(this.type);
12881
+ const e = t ? (r = (s = Tt.getHandler(this.type)) == null ? void 0 : s.context) == null ? void 0 : r[t] : Tt.getHandler(this.type);
12882
12882
  return (e == null ? void 0 : e.title) || "Trouble";
12883
12883
  }
12884
12884
  getSubtitleWithContext(t) {
12885
12885
  var s, r;
12886
- const e = t ? (r = (s = _t.getHandler(this.type)) == null ? void 0 : s.context) == null ? void 0 : r[t] : _t.getHandler(this.type);
12886
+ const e = t ? (r = (s = Tt.getHandler(this.type)) == null ? void 0 : s.context) == null ? void 0 : r[t] : Tt.getHandler(this.type);
12887
12887
  return (e == null ? void 0 : e.subtitle) || "Trouble";
12888
12888
  }
12889
12889
  get rawId() {
@@ -12891,11 +12891,11 @@ let Dr = class {
12891
12891
  }
12892
12892
  get title() {
12893
12893
  var t;
12894
- return ((t = _t.getHandler(this.type)) == null ? void 0 : t.title) || "Trouble";
12894
+ return ((t = Tt.getHandler(this.type)) == null ? void 0 : t.title) || "Trouble";
12895
12895
  }
12896
12896
  get subtitle() {
12897
12897
  var t;
12898
- return ((t = _t.getHandler(this.type)) == null ? void 0 : t.subtitle) || "Trouble";
12898
+ return ((t = Tt.getHandler(this.type)) == null ? void 0 : t.subtitle) || "Trouble";
12899
12899
  }
12900
12900
  get troubleId() {
12901
12901
  return this._troubleId;
@@ -13704,7 +13704,7 @@ let Qn = class {
13704
13704
  const { defaultValue: s, context: r, data: n } = wb(e), { namespace: o, key: i } = Ai(this.namespace, t), a = `${i}_${r}`;
13705
13705
  if (o !== this.namespace) {
13706
13706
  const c = this.context.getModel(o);
13707
- return c ? c.resolveKey(i, e) : i;
13707
+ return c ? c.resolveKey(i, e) : s ?? i;
13708
13708
  }
13709
13709
  if (r && this.data[a]) {
13710
13710
  const c = this.data[a];
@@ -14410,7 +14410,7 @@ class kb extends Rb {
14410
14410
  return n;
14411
14411
  }
14412
14412
  }
14413
- class vt {
14413
+ class wt {
14414
14414
  constructor() {
14415
14415
  l(this, "canvas");
14416
14416
  l(this, "ctx");
@@ -14471,7 +14471,7 @@ function Ho(t) {
14471
14471
  }
14472
14472
  return e;
14473
14473
  }
14474
- const Lb = Ho(vt);
14474
+ const Lb = Ho(wt);
14475
14475
  class Fb extends Lb {
14476
14476
  constructor({
14477
14477
  colors: s = ["red", "yellow", "green"],
@@ -14500,7 +14500,7 @@ class Fb extends Lb {
14500
14500
  }), this.ctx.fillStyle = i, this.ctx.fillRect(0, 0, s, r), !this.loop && !this.isOneShotDone && this.signalDoneIfNeeded();
14501
14501
  }
14502
14502
  }
14503
- const Nb = Ho(vt);
14503
+ const Nb = Ho(wt);
14504
14504
  class Tl extends Nb {
14505
14505
  constructor({ src: s }) {
14506
14506
  super();
@@ -14563,7 +14563,7 @@ function Fr(t) {
14563
14563
  const e = $l(t);
14564
14564
  return `rgb(${e.r},${e.g},${e.b})`;
14565
14565
  }
14566
- class Bb extends vt {
14566
+ class Bb extends wt {
14567
14567
  /**
14568
14568
  * Constructs a Matrix-style renderer.
14569
14569
  *
@@ -14757,7 +14757,7 @@ class Hb {
14757
14757
  return this.persistOverlaysOnComplete ? !1 : "isOneShot" in this.baseRenderer && typeof this.baseRenderer.isOneShot == "function" ? this.baseRenderer.isOneShot() : !1;
14758
14758
  }
14759
14759
  }
14760
- class Il extends vt {
14760
+ class Il extends wt {
14761
14761
  constructor(s) {
14762
14762
  super();
14763
14763
  l(this, "img");
@@ -14958,7 +14958,7 @@ class Il extends vt {
14958
14958
  this.img.removeAttribute("src"), this.completionCallback = null, this.originalSvgData = null;
14959
14959
  }
14960
14960
  }
14961
- class zb extends vt {
14961
+ class zb extends wt {
14962
14962
  constructor(s) {
14963
14963
  super();
14964
14964
  l(this, "text");
@@ -15230,7 +15230,7 @@ class qb {
15230
15230
  this.patternStore = e, this.patterns.length > 0 && this.loadCurrentPattern();
15231
15231
  }
15232
15232
  }
15233
- const Kb = Ho(vt);
15233
+ const Kb = Ho(wt);
15234
15234
  class Vb extends Kb {
15235
15235
  constructor(s = { r: 0, g: 0, b: 0 }) {
15236
15236
  super();
@@ -15248,7 +15248,7 @@ class Vb extends Kb {
15248
15248
  this.isOneShotDone || (this.canvas.width = s, this.canvas.height = r, this.ctx.fillStyle = this.color, this.ctx.fillRect(0, 0, s, r), this.signalDoneIfNeeded());
15249
15249
  }
15250
15250
  }
15251
- class Gb extends vt {
15251
+ class Gb extends wt {
15252
15252
  /**
15253
15253
  * Constructs a sweep renderer.
15254
15254
  *
@@ -16281,7 +16281,7 @@ const Mv = () => ({ ...{
16281
16281
  [Fs.type]: {
16282
16282
  class: Lg
16283
16283
  },
16284
- [ht.type]: {
16284
+ [ft.type]: {
16285
16285
  class: Gg,
16286
16286
  singleton: !0
16287
16287
  },
@@ -16557,7 +16557,7 @@ class Av {
16557
16557
  });
16558
16558
  }
16559
16559
  }
16560
- const fs = /* @__PURE__ */ new Map(), Tt = (t, e) => {
16560
+ const fs = /* @__PURE__ */ new Map(), $t = (t, e) => {
16561
16561
  const s = fs.get(t);
16562
16562
  if (!s) {
16563
16563
  hs.error(`Timer ${t} not found`);
@@ -16602,21 +16602,21 @@ const fs = /* @__PURE__ */ new Map(), Tt = (t, e) => {
16602
16602
  * @param name - The name of the timer.
16603
16603
  */
16604
16604
  clearTimer(t) {
16605
- Tt(t, (e) => e.pause());
16605
+ $t(t, (e) => e.pause());
16606
16606
  },
16607
16607
  /**
16608
16608
  * Restarts an existing timer to its initial state by name. The timer will continue to run from its initial state.
16609
16609
  * @param name - The name of the timer.
16610
16610
  */
16611
16611
  restartTimer(t) {
16612
- Tt(t, (e) => e.restart());
16612
+ $t(t, (e) => e.restart());
16613
16613
  },
16614
16614
  /**
16615
16615
  * Resets an existing timer to its initial state by name.
16616
16616
  * @param name - The name of the timer.
16617
16617
  */
16618
16618
  resetTimer(t) {
16619
- Tt(t, (e) => e.reset());
16619
+ $t(t, (e) => e.reset());
16620
16620
  },
16621
16621
  /**
16622
16622
  * Adds a timeout action to an existing timer by name.
@@ -16624,7 +16624,7 @@ const fs = /* @__PURE__ */ new Map(), Tt = (t, e) => {
16624
16624
  * @param action - The timer action configuration to add.
16625
16625
  */
16626
16626
  addTimeoutAction(t, e) {
16627
- Tt(t, (s) => s.addTimeoutAction(e));
16627
+ $t(t, (s) => s.addTimeoutAction(e));
16628
16628
  },
16629
16629
  /**
16630
16630
  * Removes a timeout action from an existing timer by name and action name.
@@ -16632,14 +16632,14 @@ const fs = /* @__PURE__ */ new Map(), Tt = (t, e) => {
16632
16632
  * @param actionName - The name of the action to remove.
16633
16633
  */
16634
16634
  removeTimeoutAction(t, e) {
16635
- Tt(t, (s) => s.removeTimeoutAction(e));
16635
+ $t(t, (s) => s.removeTimeoutAction(e));
16636
16636
  },
16637
16637
  /**
16638
16638
  * Starts an existing timer by name.
16639
16639
  * @param name - The name of the timer.
16640
16640
  */
16641
16641
  startTimer(t) {
16642
- Tt(t, (e) => e.start());
16642
+ $t(t, (e) => e.start());
16643
16643
  }
16644
16644
  }, Xl = "kos:service:region:settings", eu = "timeZone", kv = `${Xl}-${eu}`, Yi = async (t) => {
16645
16645
  const e = Wt.factory(kv)({
@@ -16671,11 +16671,11 @@ function tu(t = {}) {
16671
16671
  s && (m.namespace = s), g.debug(`waiting for future ${m.id} to be ready`), await Me(m), g.debug(`future ${m.id} is ready`), ne(() => {
16672
16672
  g.debug(`Adding future ${m.id} to futureHandler`), this.futureHandler.addFuture(m, e);
16673
16673
  }), r && f && (p = X(() => {
16674
- (m.status === "CANCELLED" || m.endState === dt.Canceled) && (g.debug(`Future ${m.id} cancelled, aborting request`), f == null || f.abort());
16674
+ (m.status === "CANCELLED" || m.endState === ht.Canceled) && (g.debug(`Future ${m.id} cancelled, aborting request`), f == null || f.abort());
16675
16675
  }), f.signal.addEventListener(
16676
16676
  "abort",
16677
16677
  async () => {
16678
- if (m.status !== "CANCELLED" && m.endState !== dt.Canceled && !m.endState) {
16678
+ if (m.status !== "CANCELLED" && m.endState !== ht.Canceled && !m.endState) {
16679
16679
  g.debug(
16680
16680
  `AbortController aborted, cancelling future ${m.id}`
16681
16681
  );
@@ -16891,7 +16891,7 @@ const Bv = Su`
16891
16891
  left: 90px;
16892
16892
  color: #eee;
16893
16893
  }
16894
- `, Hv = $t`
16894
+ `, Hv = It`
16895
16895
  font-size: 100px;
16896
16896
  margin-top: -80px;
16897
16897
  position: relative;
@@ -16922,7 +16922,7 @@ const Kv = io.div`
16922
16922
  color: ${({ theme: t }) => t === "light" ? "black" : "white"};
16923
16923
  z-index: 10000;
16924
16924
  `;
16925
- class Vv extends pt.Component {
16925
+ class Vv extends gt.Component {
16926
16926
  constructor(e) {
16927
16927
  super(e), this.state = { error: null, errorInfo: null };
16928
16928
  }
@@ -16953,31 +16953,31 @@ const Gv = {
16953
16953
  status: s = "normal",
16954
16954
  subtitle: r
16955
16955
  }) => {
16956
- const n = $t`
16956
+ const n = It`
16957
16957
  display: flex;
16958
16958
  flex-direction: column;
16959
- `, o = $t`
16959
+ `, o = It`
16960
16960
  position: relative;
16961
16961
  height: 18px;
16962
16962
  width: 100%;
16963
16963
  background-color: #ddd;
16964
16964
  border-radius: 5px;
16965
16965
  overflow: hidden;
16966
- `, i = $t`
16966
+ `, i = It`
16967
16967
  position: absolute;
16968
16968
  top: 50%; /* position the top edge of the element at the middle of the parent */
16969
16969
  left: 50%; /* position the left edge of the element at the middle of the parent */
16970
16970
  z-index: 5;
16971
16971
  transform: translate(-50%, -50%);
16972
16972
  font-size: smaller;
16973
- `, a = $t`
16973
+ `, a = It`
16974
16974
  width: ${t}%;
16975
16975
  height: 35px;
16976
16976
  background-color: ${Gv[s]};
16977
16977
  text-align: center;
16978
16978
  line-height: 32px;
16979
16979
  color: black;
16980
- `, c = $t`
16980
+ `, c = It`
16981
16981
  animation: indeterminateAnimation 1s infinite linear;
16982
16982
  transform-origin: 0% 50%;
16983
16983
  @keyframes indeterminateAnimation {
@@ -17002,7 +17002,7 @@ const Gv = {
17002
17002
  }, Yv = {
17003
17003
  setModel: () => !1
17004
17004
  }, Vo = As(Yv), G_ = () => {
17005
- const t = lt(Vo);
17005
+ const t = ut(Vo);
17006
17006
  if (t == null)
17007
17007
  throw new Error("useModels must be used within a KosModelProvider");
17008
17008
  return t.model;
@@ -17028,13 +17028,13 @@ const Gv = {
17028
17028
  );
17029
17029
  return /* @__PURE__ */ w(Go.Provider, { value: { models: e, addModel: r }, children: t });
17030
17030
  }, Zv = () => !0, Jv = (t) => {
17031
- const e = lt(Go);
17031
+ const e = ut(Go);
17032
17032
  if (!e)
17033
17033
  throw new Error(
17034
17034
  "useContextModelHierarchy must be used within a KosModelCollectionProvider"
17035
17035
  );
17036
17036
  const s = (t == null ? void 0 : t.filter) || Zv;
17037
- return G(
17037
+ return Y(
17038
17038
  () => e.models.filter(s),
17039
17039
  [e.models, s]
17040
17040
  );
@@ -17044,7 +17044,7 @@ const Gv = {
17044
17044
  return (r == null ? void 0 : r.type) === t;
17045
17045
  }
17046
17046
  })[0], Xv = g.createLogger({ name: "kos-model-loader" }), ew = () => /* @__PURE__ */ w("div", {}), tw = ({ fallback: t, children: e, ...s }) => /* @__PURE__ */ w(Wv, { children: /* @__PURE__ */ w(Vv, { fallback: t, children: /* @__PURE__ */ w(Ou, { children: /* @__PURE__ */ w(sw, { ...s, children: e }) }) }) }), sw = (t) => {
17047
- const [e, s] = _(), [r, n] = _(!1), { setModel: o } = lt(Vo), i = lt(Go);
17047
+ const [e, s] = _(), [r, n] = _(!1), { setModel: o } = ut(Vo), i = ut(Go);
17048
17048
  if (O(() => {
17049
17049
  t.model && (s(t.model), o(t.model), n(!0), i && i.addModel(t.model));
17050
17050
  }, [i, t.model, o]), t.error)
@@ -17062,7 +17062,7 @@ const Gv = {
17062
17062
  cancelText: "Cancel",
17063
17063
  title: "Create New Model"
17064
17064
  }
17065
- }, rw = pt.createContext(vr), Q_ = ({
17065
+ }, rw = gt.createContext(vr), Q_ = ({
17066
17066
  translations: t = vr,
17067
17067
  children: e
17068
17068
  }) => {
@@ -17079,10 +17079,10 @@ function nw(t, e) {
17079
17079
  const s = T.create(t, !1, e), r = s.whenReady().then(() => s);
17080
17080
  return Ta(r);
17081
17081
  }
17082
- const ru = pt.createContext(void 0), Z_ = (t = { models: {}, preloadModels: [] }, e) => {
17082
+ const ru = gt.createContext(void 0), Z_ = (t = { models: {}, preloadModels: [] }, e) => {
17083
17083
  const s = nw(t, e);
17084
17084
  return { KosCoreContextProvider: ra(({ children: n }) => {
17085
- const o = s.read(), [i, a] = pt.useState(o.isOnline);
17085
+ const o = s.read(), [i, a] = gt.useState(o.isOnline);
17086
17086
  return O(() => {
17087
17087
  const c = X(() => {
17088
17088
  a(o.isOnline);
@@ -17093,7 +17093,7 @@ const ru = pt.createContext(void 0), Z_ = (t = { models: {}, preloadModels: [] }
17093
17093
  }, [o]), /* @__PURE__ */ w(ru.Provider, { value: { kosCore: o, online: i }, children: n });
17094
17094
  }) };
17095
17095
  }, ow = () => {
17096
- const t = pt.useContext(ru);
17096
+ const t = gt.useContext(ru);
17097
17097
  if (t === void 0)
17098
17098
  throw new Error("useKosCore must be used within a KosCoreContextProvider");
17099
17099
  return t;
@@ -17101,10 +17101,10 @@ const ru = pt.createContext(void 0), Z_ = (t = { models: {}, preloadModels: [] }
17101
17101
  setTimeout(() => {
17102
17102
  e(!0);
17103
17103
  }, 2 ** t * 10);
17104
- }), it = /* @__PURE__ */ new Map();
17104
+ }), at = /* @__PURE__ */ new Map();
17105
17105
  function cw(t, e) {
17106
- if (it.has(t)) {
17107
- const s = it.get(t);
17106
+ if (at.has(t)) {
17107
+ const s = at.get(t);
17108
17108
  if (s.status === "finished") {
17109
17109
  const r = T.getInstance().modelManager.getModelById(t);
17110
17110
  return { kosModel: r, model: r == null ? void 0 : r.modelData };
@@ -17113,13 +17113,13 @@ function cw(t, e) {
17113
17113
  } else {
17114
17114
  const s = e().then(
17115
17115
  () => {
17116
- it.set(t, { status: "finished", key: t });
17116
+ at.set(t, { status: "finished", key: t });
17117
17117
  },
17118
17118
  (n) => {
17119
- throw it.set(t, { status: "error", error: n }), n;
17119
+ throw at.set(t, { status: "error", error: n }), n;
17120
17120
  }
17121
17121
  ), r = { status: "pending", promise: s };
17122
- throw it.set(t, r), s;
17122
+ throw at.set(t, r), s;
17123
17123
  }
17124
17124
  }
17125
17125
  function lw(t, e) {
@@ -17180,14 +17180,14 @@ const re = (t) => {
17180
17180
  if (n) {
17181
17181
  const b = h.id;
17182
17182
  Ue(h).then(() => {
17183
- it.delete(b), p == null || p();
17183
+ at.delete(b), p == null || p();
17184
17184
  });
17185
17185
  }
17186
17186
  });
17187
17187
  }
17188
17188
  } else
17189
17189
  n && h && Ue(h).then(() => {
17190
- it.delete(e), p == null || p();
17190
+ at.delete(e), p == null || p();
17191
17191
  });
17192
17192
  };
17193
17193
  }, [
@@ -17216,10 +17216,10 @@ const re = (t) => {
17216
17216
  options: {}
17217
17217
  });
17218
17218
  }, ou = As(void 0), J_ = ({ children: t }) => {
17219
- const { model: e, ready: s } = nu(), r = G(() => s && e ? { model: e } : {}, [s, e]);
17219
+ const { model: e, ready: s } = nu(), r = Y(() => s && e ? { model: e } : {}, [s, e]);
17220
17220
  return /* @__PURE__ */ w(ou.Provider, { value: r, children: t });
17221
17221
  }, X_ = () => {
17222
- const t = lt(ou);
17222
+ const t = ut(ou);
17223
17223
  if (!t)
17224
17224
  throw new Error("useKosTimeContext must be used within a KosTimeProvider");
17225
17225
  return t;
@@ -17240,16 +17240,16 @@ function eT(t) {
17240
17240
  const au = As(
17241
17241
  void 0
17242
17242
  ), tT = ({ children: t }) => {
17243
- const { model: e, ready: s } = iu(), r = G(() => s && e ? { model: e } : {}, [s, e]);
17243
+ const { model: e, ready: s } = iu(), r = Y(() => s && e ? { model: e } : {}, [s, e]);
17244
17244
  return /* @__PURE__ */ w(au.Provider, { value: r, children: t });
17245
17245
  }, sT = () => {
17246
- const t = lt(au);
17246
+ const t = ut(au);
17247
17247
  if (!t)
17248
17248
  throw new Error(
17249
17249
  "useSoftwareInfoContext must be used within a SoftwareInfoProvider"
17250
17250
  );
17251
17251
  return t;
17252
- }, cu = new qp(), dw = pt.createContext(cu);
17252
+ }, cu = new qp(), dw = gt.createContext(cu);
17253
17253
  function rT({ children: t }) {
17254
17254
  return /* @__PURE__ */ w(dw.Provider, { value: cu, children: t });
17255
17255
  }
@@ -17264,7 +17264,7 @@ const lu = As(void 0), hw = () => {
17264
17264
  rootUrl: n,
17265
17265
  descriptorResolver: o
17266
17266
  }) => {
17267
- const [i, a] = _(!1), [c, u] = _(), [d, h] = _(), f = n || hw(), p = G(() => e ?? "app/system", [e]);
17267
+ const [i, a] = _(!1), [c, u] = _(), [d, h] = _(), f = n || hw(), p = Y(() => e ?? "app/system", [e]);
17268
17268
  O(() => {
17269
17269
  async function v() {
17270
17270
  const L = (Array.isArray(p) ? p : [p]).map((te) => (o || yb(te))()), M = (await Promise.allSettled(L)).map((te) => {
@@ -17273,14 +17273,14 @@ const lu = As(void 0), hw = () => {
17273
17273
  return;
17274
17274
  }
17275
17275
  return te.value;
17276
- }).filter((te) => !!te).reverse().reduce((te, Y) => {
17277
- const fe = Y.path;
17278
- return Object.keys(Y.namespaces).forEach((ts) => {
17279
- const ss = Y.namespaces[ts];
17276
+ }).filter((te) => !!te).reverse().reduce((te, W) => {
17277
+ const fe = W.path;
17278
+ return Object.keys(W.namespaces).forEach((ts) => {
17279
+ const ss = W.namespaces[ts];
17280
17280
  ss.basePath = fe;
17281
17281
  }), {
17282
17282
  ...te,
17283
- namespaces: { ...te.namespaces, ...Y.namespaces }
17283
+ namespaces: { ...te.namespaces, ...W.namespaces }
17284
17284
  };
17285
17285
  }, {});
17286
17286
  u(M);
@@ -17301,7 +17301,7 @@ const lu = As(void 0), hw = () => {
17301
17301
  }
17302
17302
  v();
17303
17303
  }, [s, c, r, f]);
17304
- const m = G(() => i ? {
17304
+ const m = Y(() => i ? {
17305
17305
  setLocale: (v) => {
17306
17306
  d && (d.currentLocale = v);
17307
17307
  }
@@ -17312,7 +17312,7 @@ const lu = As(void 0), hw = () => {
17312
17312
  }, [i, d]), b = i ? t : null;
17313
17313
  return /* @__PURE__ */ w(lu.Provider, { value: m, children: b });
17314
17314
  }, oT = () => {
17315
- const t = lt(lu);
17315
+ const t = ut(lu);
17316
17316
  if (!t)
17317
17317
  throw new Error(
17318
17318
  "useTranslationContainerContext must be used within a TranslationContainerProvider"
@@ -17605,7 +17605,7 @@ function xw(t, e) {
17605
17605
  let s = t;
17606
17606
  return Object.entries(e).forEach(([r, n]) => {
17607
17607
  const o = new RegExp(`<${r}>(.*?)</${r}>|<${r}/>`, "g");
17608
- s = Dw(s, o, (i, a) => n.type === "br" ? /* @__PURE__ */ w("br", {}) : pt.cloneElement(n, { key: `${r}-${a}` }, i));
17608
+ s = Dw(s, o, (i, a) => n.type === "br" ? /* @__PURE__ */ w("br", {}) : gt.cloneElement(n, { key: `${r}-${a}` }, i));
17609
17609
  }), s;
17610
17610
  }
17611
17611
  const mT = (t) => {
@@ -17656,7 +17656,7 @@ const Aw = async () => {
17656
17656
  ), i = s.join("__"), a = Wi(
17657
17657
  i,
17658
17658
  () => Rw(o, r, n)
17659
- ), c = G(() => ({
17659
+ ), c = Y(() => ({
17660
17660
  exists: (d) => {
17661
17661
  const h = e != null && e.keyPrefix ? `${e.keyPrefix}.${d}` : d;
17662
17662
  return a ? a.exists(h) : !1;
@@ -17940,14 +17940,14 @@ function Vw({
17940
17940
  };
17941
17941
  }
17942
17942
  function hu(t = "long", e = [2018, 2028]) {
17943
- return G(
17943
+ return Y(
17944
17944
  () => zw(t, e),
17945
17945
  [t, e]
17946
17946
  );
17947
17947
  }
17948
17948
  function Gw(t = "long", e = [2018, 2028], s = "en-US") {
17949
17949
  const r = hu(t, e);
17950
- return G(
17950
+ return Y(
17951
17951
  () => r.map((o) => ({
17952
17952
  label: o.toLocaleString(s).replace(",", ""),
17953
17953
  value: o
@@ -17956,17 +17956,17 @@ function Gw(t = "long", e = [2018, 2028], s = "en-US") {
17956
17956
  );
17957
17957
  }
17958
17958
  function Yw(t, e = "en-US") {
17959
- return G(
17959
+ return Y(
17960
17960
  () => du(t, e),
17961
17961
  [t, e]
17962
17962
  );
17963
17963
  }
17964
17964
  function Ww(t, e = "en-US") {
17965
- const s = G(() => Bw(), []), r = G(
17965
+ const s = Y(() => Bw(), []), r = Y(
17966
17966
  () => du(t, e),
17967
17967
  [t, e]
17968
17968
  );
17969
- return G(
17969
+ return Y(
17970
17970
  () => [...Array(12).keys()].map((o) => ({
17971
17971
  label: r[o],
17972
17972
  value: Number(s[o])
@@ -17976,7 +17976,7 @@ function Ww(t, e = "en-US") {
17976
17976
  }
17977
17977
  function fu(t, e) {
17978
17978
  const s = Ce(t);
17979
- return G(
17979
+ return Y(
17980
17980
  () => jw(s, e),
17981
17981
  [e, s]
17982
17982
  );
@@ -17987,7 +17987,7 @@ const Qw = (t, e, s, r = []) => {
17987
17987
  };
17988
17988
  function Zw(t, e, s = "en-US", r = []) {
17989
17989
  const n = fu(t, e);
17990
- return G(
17990
+ return Y(
17991
17991
  () => n.map((i) => ({
17992
17992
  label: i.toLocaleString(s),
17993
17993
  value: i,
@@ -17997,7 +17997,7 @@ function Zw(t, e, s = "en-US", r = []) {
17997
17997
  );
17998
17998
  }
17999
17999
  function Jw(t = "en-US", e = "short") {
18000
- return G(
18000
+ return Y(
18001
18001
  () => Kw(t, e),
18002
18002
  [t, e]
18003
18003
  );
@@ -18009,10 +18009,10 @@ function Xw({
18009
18009
  formatString: r
18010
18010
  }) {
18011
18011
  const n = e, o = new Date(t, n, s);
18012
- return { formattedDate: at(o, r) };
18012
+ return { formattedDate: ct(o, r) };
18013
18013
  }
18014
18014
  function eE(t, e, s) {
18015
- return G(
18015
+ return Y(
18016
18016
  () => qw(t, e, s),
18017
18017
  [t, e, s]
18018
18018
  );
@@ -18054,7 +18054,7 @@ function ST({
18054
18054
  monthsArray: $,
18055
18055
  monthsOptionsArray: M,
18056
18056
  daysArray: te,
18057
- daysOptionsArray: Y,
18057
+ daysOptionsArray: W,
18058
18058
  calendarDayArray: fe,
18059
18059
  dayNamesArray: ts
18060
18060
  } = Vw({
@@ -18125,7 +18125,7 @@ function ST({
18125
18125
  monthsArray: $,
18126
18126
  monthsOptionsArray: M,
18127
18127
  daysArray: te,
18128
- daysOptionsArray: Y,
18128
+ daysOptionsArray: W,
18129
18129
  calendarDayNames: ts,
18130
18130
  calendarDayArray: fe,
18131
18131
  formattedDate: ss
@@ -18144,15 +18144,15 @@ function sE({
18144
18144
  options: {}
18145
18145
  }), h = typeof t == "string" ? $u(t) : t;
18146
18146
  return O(() => {
18147
- c ? a("") : e ? a(at(h, e)) : d && a(
18148
- at(
18147
+ c ? a("") : e ? a(ct(h, e)) : d && a(
18148
+ ct(
18149
18149
  h,
18150
18150
  u != null && u.selectedDateFormat ? u == null ? void 0 : u.selectedDateFormat : ""
18151
18151
  )
18152
18152
  );
18153
18153
  }, [c, t, e, h, u, d]), O(() => {
18154
- s ? o(at(h, s)) : d && o(
18155
- at(
18154
+ s ? o(ct(h, s)) : d && o(
18155
+ ct(
18156
18156
  h,
18157
18157
  u != null && u.selectedTimeFormat ? u == null ? void 0 : u.selectedTimeFormat : ""
18158
18158
  )
@@ -18398,7 +18398,7 @@ const nE = (t) => /* @__PURE__ */ w("option", { title: t.id, value: t.format, ch
18398
18398
  options: e
18399
18399
  }
18400
18400
  };
18401
- }, AT = (t, e) => G(() => oc(t), e), dE = {
18401
+ }, AT = (t, e) => Y(() => oc(t), e), dE = {
18402
18402
  config: { attributes: !0, childList: !0, subtree: !0 }
18403
18403
  };
18404
18404
  function RT(t, e, s = dE) {
@@ -18480,7 +18480,7 @@ const fE = () => {
18480
18480
  }, [s, t]), [t];
18481
18481
  };
18482
18482
  function pE(t = !1, e = "2-digit") {
18483
- return G(() => {
18483
+ return Y(() => {
18484
18484
  const s = t ? 12 : 24;
18485
18485
  return Array.from({ length: s }, (r, n) => {
18486
18486
  const o = t && n === 0 ? 12 : n % s;
@@ -18492,7 +18492,7 @@ function pE(t = !1, e = "2-digit") {
18492
18492
  }, [e, t]);
18493
18493
  }
18494
18494
  function Qi(t, e = "2-digit", s = 0, r = 0) {
18495
- return G(
18495
+ return Y(
18496
18496
  () => Array.from({ length: t }, (n, o) => {
18497
18497
  const i = String(o + s);
18498
18498
  return {
@@ -18504,7 +18504,7 @@ function Qi(t, e = "2-digit", s = 0, r = 0) {
18504
18504
  );
18505
18505
  }
18506
18506
  function gE(t = "en-US") {
18507
- return G(
18507
+ return Y(
18508
18508
  () => ["AM", "PM"].map((e) => {
18509
18509
  const s = new Intl.DateTimeFormat(t, {
18510
18510
  hour: "2-digit",
@@ -18533,7 +18533,7 @@ function mE({
18533
18533
  };
18534
18534
  }
18535
18535
  function yE(t, e) {
18536
- return at(t, e);
18536
+ return ct(t, e);
18537
18537
  }
18538
18538
  function bE({
18539
18539
  formatOptions: t,
@@ -18577,7 +18577,7 @@ function bE({
18577
18577
  };
18578
18578
  }
18579
18579
  const LT = (t) => {
18580
- const { regionModel: e } = lE(), s = G(() => ({ hour12: e == null ? void 0 : e.is12HourTimeFormat }), [e == null ? void 0 : e.is12HourTimeFormat]);
18580
+ const { regionModel: e } = lE(), s = Y(() => ({ hour12: e == null ? void 0 : e.is12HourTimeFormat }), [e == null ? void 0 : e.is12HourTimeFormat]);
18581
18581
  return bE({
18582
18582
  ...t,
18583
18583
  locale: e == null ? void 0 : e.regionId,
@@ -18712,8 +18712,8 @@ export {
18712
18712
  Ml as CanvasRenderer,
18713
18713
  iT as CanvasStreamer,
18714
18714
  bw as CanvasStreamerBase,
18715
- ct as ChildModels,
18716
- ut as CompanionParentModel,
18715
+ lt as ChildModels,
18716
+ dt as CompanionParentModel,
18717
18717
  Mr as ConfigBean,
18718
18718
  Ba as ContainerAwareSetup,
18719
18719
  x_ as CoreExtensionManager,
@@ -18724,7 +18724,7 @@ export {
18724
18724
  ZE as DateHelpers,
18725
18725
  x as DependencyLifecycle,
18726
18726
  N as DependencyModels,
18727
- nt as DependencyResolutionPolicy,
18727
+ ot as DependencyResolutionPolicy,
18728
18728
  Jn as Device,
18729
18729
  I_ as DeviceServices,
18730
18730
  hE as DomIntersectionStrategy,
@@ -18746,10 +18746,10 @@ export {
18746
18746
  pd as FeatureFlagService,
18747
18747
  $e as FetchError,
18748
18748
  cr as FutureAliases,
18749
- ht as FutureContainerFactory,
18749
+ ft as FutureContainerFactory,
18750
18750
  Gg as FutureContainerModel,
18751
18751
  Fa as FutureContainerSetup,
18752
- dt as FutureEndState,
18752
+ ht as FutureEndState,
18753
18753
  Fs as FutureFactory,
18754
18754
  bo as FutureHandler,
18755
18755
  Lt as FutureManager,
@@ -18946,7 +18946,7 @@ export {
18946
18946
  Uf as createKosHtpMessageResponse,
18947
18947
  Lf as createKosMessage,
18948
18948
  jf as createKosMessageResponse,
18949
- gt as createMessageBody,
18949
+ mt as createMessageBody,
18950
18950
  Xh as createModelDependency,
18951
18951
  aM as createOptionKey,
18952
18952
  Vt as createPropKey,