@kosdev-code/kos-freestyle-sdk 2.1.32 → 2.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/extension-utils--qB2FP1I.js +237 -0
  2. package/extension-utils--qB2FP1I.js.map +1 -0
  3. package/extension-utils-DQSu9dSv.cjs +2 -0
  4. package/extension-utils-DQSu9dSv.cjs.map +1 -0
  5. package/index.cjs +1 -1
  6. package/index.js +26 -27
  7. package/models/models/ice-agitator/ice-agitator-model.d.ts +5 -4
  8. package/models/models/ice-agitator/ice-agitator-model.d.ts.map +1 -1
  9. package/models/models/ice-agitator/index.d.ts +1 -2
  10. package/models/models/ice-agitator/index.d.ts.map +1 -1
  11. package/models/models/lfcv-pump/index.d.ts +1 -3
  12. package/models/models/lfcv-pump/index.d.ts.map +1 -1
  13. package/models/models/lfcv-pump/lfcv-pump-model.d.ts +8 -7
  14. package/models/models/lfcv-pump/lfcv-pump-model.d.ts.map +1 -1
  15. package/models/utils/extension-utils.d.ts +3 -0
  16. package/models/utils/extension-utils.d.ts.map +1 -1
  17. package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +1 -2
  18. package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -1
  19. package/models/utils/extensions/trouble/trouble-utils.d.ts +10 -0
  20. package/models/utils/extensions/trouble/trouble-utils.d.ts.map +1 -0
  21. package/models/utils/services/freestyle/1.6.5/service.d.ts +8 -8
  22. package/models/utils/services/freestyle/1.8.1/service.d.ts +8 -8
  23. package/models/utils/services/freestyle/daily/service.d.ts +8 -8
  24. package/models/utils/services/handle/1.8.1/service.d.ts +8 -8
  25. package/models/utils/services/handle/daily/service.d.ts +8 -8
  26. package/models.cjs +1 -1
  27. package/models.js +16 -17
  28. package/package.json +2 -2
  29. package/{service-B5BitF77.js → service-BuugCicr.js} +534 -544
  30. package/service-BuugCicr.js.map +1 -0
  31. package/service-DSV9Dr2d.cjs +2 -0
  32. package/service-DSV9Dr2d.cjs.map +1 -0
  33. package/ui.cjs +1 -1
  34. package/ui.js +2 -2
  35. package/{use-nutrition-info-CGBsABee.js → use-nutrition-info-CPEwk_O-.js} +11 -11
  36. package/{use-nutrition-info-CGBsABee.js.map → use-nutrition-info-CPEwk_O-.js.map} +1 -1
  37. package/{use-nutrition-info-tOQ6wnpq.cjs → use-nutrition-info-C_myxRvf.cjs} +2 -2
  38. package/{use-nutrition-info-tOQ6wnpq.cjs.map → use-nutrition-info-C_myxRvf.cjs.map} +1 -1
  39. package/extension-utils-BIzRIXwB.cjs +0 -2
  40. package/extension-utils-BIzRIXwB.cjs.map +0 -1
  41. package/extension-utils-D-CdnEQJ.js +0 -220
  42. package/extension-utils-D-CdnEQJ.js.map +0 -1
  43. package/models/models/ice-agitator/ice-agitator-registration.d.ts +0 -85
  44. package/models/models/ice-agitator/ice-agitator-registration.d.ts.map +0 -1
  45. package/models/models/lfcv-pump/lfcv-pump-registration.d.ts +0 -87
  46. package/models/models/lfcv-pump/lfcv-pump-registration.d.ts.map +0 -1
  47. package/models/models/lfcv-pump/services/index.d.ts +0 -2
  48. package/models/models/lfcv-pump/services/index.d.ts.map +0 -1
  49. package/models/models/lfcv-pump/services/lfcv-pump-services.d.ts +0 -10
  50. package/models/models/lfcv-pump/services/lfcv-pump-services.d.ts.map +0 -1
  51. package/service-B5BitF77.js.map +0 -1
  52. package/service-Dlc0A1Rk.cjs +0 -2
  53. package/service-Dlc0A1Rk.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- var vt = Object.defineProperty;
2
- var Tt = (e, t, r) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var i = (e, t, r) => (Tt(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { resolveServiceUrl as A, ServiceFactory as w, KosLog as $, createPropKey as U, kosStateProp as O, kosConfigProperty as b, kosStateEntry as be, kosStateExit as _t, kosStateGuard as Pe, kosFuture as I, kosModel as f, kosLoggerAware as V, kosCompanion as ve, kosFutureAware as xe, kosStateMachine as It, DependencyLifecycle as Ue, KosModelContainer as $t, kosChild as qe, kosModelEffect as Te, EventBus as k, KosModelRegistrationFactory as E, SingletonKosModelRegistrationFactory as _e, FetchError as Ie, FutureManager as y, FutureEndState as q, FutureHandler as Ge, kosParentAware as je, KosFeatureFlags as ue, getKosCompanionModel as Ct, getKosModelSync as R, kosContainerAware as Ot, KosContextManager as Et, kosAction as Z, KOS_MODEL_ID as C, kosMultipleFutureAware as St, kosTopicHandler as At, modelTypeEventTopicFactory as wt, RegistrationManager as m, registerCoreModels as Mt, Trouble as Rt, ExtensionManager as ce, EXTENSION_TROUBLE_DATA_MAPPER as de, createClient as H, kosServiceRequest as B } from "@kosdev-code/kos-ui-sdk";
5
- import { PourState as d, Assembly as Ve, KosModelRegistry as Dt, registerDispenseModels as Ft, Nozzle as Lt, Pump as zt, Holder as Nt, PumpContainer as xt, PumpIndex as Ut } from "@kosdev-code/kos-dispense-sdk";
6
- const { URL: He } = A("ICE_AGITATOR_SERVICE"), { postModel: qt } = w.build({
1
+ var Pt = Object.defineProperty;
2
+ var vt = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var s = (e, t, r) => (vt(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { resolveServiceUrl as M, ServiceFactory as R, KosLog as C, createPropKey as G, kosStateProp as O, kosConfigProperty as b, kosStateEntry as Pe, kosStateExit as _t, kosStateGuard as ve, kosFuture as I, kosModel as f, kosLoggerAware as D, kosCompanion as oe, kosFutureAware as xe, kosStateMachine as Tt, DependencyLifecycle as qe, KosModelContainer as It, kosChild as Ge, kosModelEffect as _e, EventBus as k, KosModelRegistrationFactory as F, SingletonKosModelRegistrationFactory as Te, FetchError as Ie, FutureManager as y, FutureEndState as U, FutureHandler as Ue, kosParentAware as je, KosFeatureFlags as de, getKosCompanionModel as $t, getKosModelSync as A, kosContainerAware as Ct, KosContextManager as Ot, kosAction as Z, KOS_MODEL_ID as $, kosMultipleFutureAware as Et, kosTopicHandler as St, modelTypeEventTopicFactory as At, RegistrationManager as m, registerCoreModels as wt, Trouble as Mt, ExtensionManager as pe, EXTENSION_TROUBLE_DATA_MAPPER as ge, createClient as H, kosServiceRequest as B } from "@kosdev-code/kos-ui-sdk";
5
+ import { PourState as d, Assembly as Ve, KosModelRegistry as Rt, registerDispenseModels as Dt, Nozzle as Ft, Pump as Nt, Holder as zt, PumpContainer as Lt, PumpIndex as xt } from "@kosdev-code/kos-dispense-sdk";
6
+ const { URL: He } = M("ICE_AGITATOR_SERVICE"), { postModel: qt } = R.build({
7
7
  basePath: `${He}/api/ext/freestyle/ice`
8
8
  });
9
- $.createLogger({
9
+ C.createLogger({
10
10
  name: "carb-tank-service",
11
11
  group: "Services"
12
12
  });
@@ -20,12 +20,12 @@ const Gt = async (e, t) => {
20
20
  throw new Error("No response from server");
21
21
  return r == null ? void 0 : r.data;
22
22
  };
23
- var Be = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Vt = (e, t, r) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, P = (e, t, r, o) => {
24
- for (var a = o > 1 ? void 0 : o ? jt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
25
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
23
+ var Be = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, jt = (e, t, r) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, P = (e, t, r, o) => {
24
+ for (var a = o > 1 ? void 0 : o ? Ut(t, r) : t, n = e.length - 1, i; n >= 0; n--)
25
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
26
26
  return o && a && Be(t, r, a), a;
27
- }, Ht = (e, t, r) => (Vt(e, t + "", r), r);
28
- const Bt = "carb-agitator-model", $e = U("statePath");
27
+ }, Vt = (e, t, r) => (jt(e, t + "", r), r);
28
+ const Ht = "carb-agitator-model", $e = G("statePath");
29
29
  let g = class {
30
30
  /**
31
31
  * Creates a new carb agitator model instance.
@@ -38,23 +38,23 @@ let g = class {
38
38
  /**
39
39
  * Unique identifier for this carb agitator instance.
40
40
  */
41
- i(this, "id");
41
+ s(this, "id");
42
42
  /**
43
43
  * Display name for this carb agitator.
44
44
  */
45
- i(this, "name");
45
+ s(this, "name");
46
46
  /**
47
47
  * Device path for carb tank operations.
48
48
  */
49
- i(this, "path");
49
+ s(this, "path");
50
50
  /**
51
51
  * State path for accessing probe and filling status.
52
52
  */
53
- i(this, "statePath");
54
- i(this, "highProbeWet");
55
- i(this, "lowProbeWet");
56
- i(this, "filling");
57
- i(this, "enabled");
53
+ s(this, "statePath");
54
+ s(this, "highProbeWet");
55
+ s(this, "lowProbeWet");
56
+ s(this, "filling");
57
+ s(this, "enabled");
58
58
  var a;
59
59
  this.id = e, this.name = t.name, this.path = ((a = r.kosContext.get("assembly-feature-carbTank")) == null ? void 0 : a.path) || "";
60
60
  const o = r.kosContext.get("assembly-state-path-carbTank");
@@ -173,7 +173,7 @@ let g = class {
173
173
  return this.logger.info(`testing carb tank: ${this.id}`), Gt(this.path, e);
174
174
  }
175
175
  };
176
- Ht(g, "Registration");
176
+ Vt(g, "Registration");
177
177
  P([
178
178
  O({
179
179
  path: $e,
@@ -199,7 +199,7 @@ P([
199
199
  })
200
200
  ], g.prototype, "enabled", 2);
201
201
  P([
202
- be(
202
+ Pe(
203
203
  "ACTIVATING"
204
204
  /* ACTIVATING */
205
205
  )
@@ -211,31 +211,31 @@ P([
211
211
  )
212
212
  ], g.prototype, "handleActivationComplete", 1);
213
213
  P([
214
- be(
214
+ Pe(
215
215
  "INITIALIZED"
216
216
  /* INITIALIZED */
217
217
  )
218
218
  ], g.prototype, "handleInitialized", 1);
219
219
  P([
220
- be(
220
+ Pe(
221
221
  "SKIPPED"
222
222
  /* SKIPPED */
223
223
  )
224
224
  ], g.prototype, "handleSkipped", 1);
225
225
  P([
226
- Pe({ allowedStates: [
226
+ ve({ allowedStates: [
227
227
  "UNINITIALIZED"
228
228
  /* UNINITIALIZED */
229
229
  ] })
230
230
  ], g.prototype, "activateCarbTank", 1);
231
231
  P([
232
- Pe({ allowedStates: [
232
+ ve({ allowedStates: [
233
233
  "UNINITIALIZED"
234
234
  /* UNINITIALIZED */
235
235
  ] })
236
236
  ], g.prototype, "skip", 1);
237
237
  P([
238
- Pe({
238
+ ve({
239
239
  allowedStates: [
240
240
  "INITIALIZED",
241
241
  "SKIPPED"
@@ -247,11 +247,11 @@ P([
247
247
  I()
248
248
  ], g.prototype, "handleTestCarbTank", 1);
249
249
  g = P([
250
- f({ modelTypeId: Bt, singleton: !1 }),
251
- V(),
252
- ve({ mode: "composition", lifecycle: Ue.LOAD }),
250
+ f({ modelTypeId: Ht, singleton: !1 }),
251
+ D(),
252
+ oe({ mode: "composition", lifecycle: qe.LOAD }),
253
253
  xe(),
254
- It(
254
+ Tt(
255
255
  {
256
256
  initial: "UNINITIALIZED",
257
257
  states: {
@@ -289,18 +289,18 @@ g = P([
289
289
  )
290
290
  ], g);
291
291
  const Ke = g.Registration;
292
- var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Ye = (e, t, r, o) => {
293
- for (var a = o > 1 ? void 0 : o ? Yt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
294
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
295
- return o && a && Kt(t, r, a), a;
292
+ var Bt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, Ye = (e, t, r, o) => {
293
+ for (var a = o > 1 ? void 0 : o ? Kt(t, r) : t, n = e.length - 1, i; n >= 0; n--)
294
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
295
+ return o && a && Bt(t, r, a), a;
296
296
  };
297
297
  const We = "cartridge-agitator-container-model";
298
- let J = class {
298
+ let Q = class {
299
299
  constructor(e, t, r) {
300
- i(this, "id");
301
- i(this, "logger");
302
- i(this, "_models");
303
- this.id = e, this.logger = r.logger, this._models = new $t({
300
+ s(this, "id");
301
+ s(this, "logger");
302
+ s(this, "_models");
303
+ this.id = e, this.logger = r.logger, this._models = new It({
304
304
  parentId: e
305
305
  });
306
306
  }
@@ -332,15 +332,15 @@ let J = class {
332
332
  }
333
333
  };
334
334
  Ye([
335
- qe
336
- ], J.prototype, "_models", 2);
337
- J = Ye([
335
+ Ge
336
+ ], Q.prototype, "_models", 2);
337
+ Q = Ye([
338
338
  f(We)
339
- ], J);
340
- const { URL: Ze } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Wt } = w.build({
339
+ ], Q);
340
+ const { URL: Ze } = M("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Yt } = R.build({
341
341
  basePath: `${Ze}/api/ext/freestyle/freestyle/ice`
342
- }), Zt = async (e, t) => {
343
- const r = await Wt({
342
+ }), Wt = async (e, t) => {
343
+ const r = await Yt({
344
344
  model: {},
345
345
  tracker: t,
346
346
  urlOverride: `${Ze}/api/handle/${e}/test`
@@ -349,23 +349,23 @@ const { URL: Ze } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Wt } = w.build
349
349
  throw new Error("No response from server");
350
350
  return r.data;
351
351
  };
352
- var kt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, ae = (e, t, r, o) => {
353
- for (var a = o > 1 ? void 0 : o ? Jt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
354
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
355
- return o && a && kt(t, r, a), a;
352
+ var Zt = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, ie = (e, t, r, o) => {
353
+ for (var a = o > 1 ? void 0 : o ? kt(t, r) : t, n = e.length - 1, i; n >= 0; n--)
354
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
355
+ return o && a && Zt(t, r, a), a;
356
356
  };
357
357
  const ke = "cartridge-agitator-model";
358
- class Q {
358
+ class X {
359
359
  }
360
- i(Q, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), i(Q, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
361
- const Qt = U("statePath");
362
- let L = class {
360
+ s(X, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), s(X, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
361
+ const Qt = G("statePath");
362
+ let z = class {
363
363
  constructor(e, t) {
364
- i(this, "id");
365
- i(this, "agitating");
366
- i(this, "path");
367
- i(this, "statePath");
368
- i(this, "name");
364
+ s(this, "id");
365
+ s(this, "agitating");
366
+ s(this, "path");
367
+ s(this, "statePath");
368
+ s(this, "name");
369
369
  this.id = e, this.path = t.path, this.name = t.name, this.statePath = t.statePath;
370
370
  }
371
371
  get isAgitating() {
@@ -374,55 +374,55 @@ let L = class {
374
374
  async testAgitate(e) {
375
375
  if (!e)
376
376
  throw new Error("No tracker provided");
377
- return this.logger.info(`agitating cartridge-agitator ${this.id}`), Zt(this.path, e);
377
+ return this.logger.info(`agitating cartridge-agitator ${this.id}`), Wt(this.path, e);
378
378
  }
379
379
  handleAgitation() {
380
380
  var e;
381
- this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), k.publish(Q.TOPIC_AGITATION_STARTED, {
381
+ this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), k.publish(X.TOPIC_AGITATION_STARTED, {
382
382
  path: this.path,
383
383
  futureId: (e = this.future) == null ? void 0 : e.futureId
384
- })) : k.publish(Q.TOPIC_AGITATION_ENDED, {
384
+ })) : k.publish(X.TOPIC_AGITATION_ENDED, {
385
385
  path: this.path
386
386
  });
387
387
  }
388
388
  };
389
- ae([
389
+ ie([
390
390
  O({ path: Qt, attribute: "agitating" })
391
- ], L.prototype, "agitating", 2);
392
- ae([
391
+ ], z.prototype, "agitating", 2);
392
+ ie([
393
393
  I()
394
- ], L.prototype, "testAgitate", 1);
395
- ae([
396
- Te({
394
+ ], z.prototype, "testAgitate", 1);
395
+ ie([
396
+ _e({
397
397
  dependencies: (e) => [e.isAgitating]
398
398
  })
399
- ], L.prototype, "handleAgitation", 1);
400
- L = ae([
399
+ ], z.prototype, "handleAgitation", 1);
400
+ z = ie([
401
401
  f(ke),
402
402
  xe(),
403
- V()
404
- ], L);
405
- const Je = new E({
406
- class: L,
403
+ D()
404
+ ], z);
405
+ const Qe = new F({
406
+ class: z,
407
407
  type: ke
408
- }), Ce = new _e({
409
- class: J,
408
+ }), Ce = new Te({
409
+ class: Q,
410
410
  type: We
411
411
  });
412
- Ce.addRelatedModel(Je);
413
- var Qe = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, er = (e, t, r) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oe = (e, t, r, o) => {
414
- for (var a = o > 1 ? void 0 : o ? Xt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
415
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
416
- return o && a && Qe(t, r, a), a;
417
- }, tr = (e, t, r) => (er(e, t + "", r), r);
418
- const rr = "cgp-pump-model", Oe = U("statePath");
419
- let D = class {
412
+ Ce.addRelatedModel(Qe);
413
+ var Xe = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Jt = (e, t, r) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, se = (e, t, r, o) => {
414
+ for (var a = o > 1 ? void 0 : o ? Xt(t, r) : t, n = e.length - 1, i; n >= 0; n--)
415
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
416
+ return o && a && Xe(t, r, a), a;
417
+ }, er = (e, t, r) => (Jt(e, t + "", r), r);
418
+ const tr = "cgp-pump-model", Oe = G("statePath");
419
+ let w = class {
420
420
  constructor(e, t) {
421
- i(this, "highProbeWet");
422
- i(this, "lowProbeWet");
423
- i(this, "filling");
424
- i(this, "id");
425
- i(this, "state");
421
+ s(this, "highProbeWet");
422
+ s(this, "lowProbeWet");
423
+ s(this, "filling");
424
+ s(this, "id");
425
+ s(this, "state");
426
426
  var r;
427
427
  this.id = e, this.state = ((r = t.data) == null ? void 0 : r.state) ?? { name: "unknown", path: "" };
428
428
  }
@@ -430,66 +430,66 @@ let D = class {
430
430
  return this.state.path;
431
431
  }
432
432
  };
433
- tr(D, "Registration");
434
- oe([
433
+ er(w, "Registration");
434
+ se([
435
435
  O({
436
436
  path: Oe,
437
437
  attribute: "highProbeWet"
438
438
  })
439
- ], D.prototype, "highProbeWet", 2);
440
- oe([
439
+ ], w.prototype, "highProbeWet", 2);
440
+ se([
441
441
  O({
442
442
  path: Oe,
443
443
  attribute: "lowProbeWet"
444
444
  })
445
- ], D.prototype, "lowProbeWet", 2);
446
- oe([
445
+ ], w.prototype, "lowProbeWet", 2);
446
+ se([
447
447
  O({
448
448
  path: Oe,
449
449
  attribute: "filling"
450
450
  })
451
- ], D.prototype, "filling", 2);
452
- D = oe([
453
- f({ modelTypeId: rr, singleton: !1 }),
454
- ve({
451
+ ], w.prototype, "filling", 2);
452
+ w = se([
453
+ f({ modelTypeId: tr, singleton: !1 }),
454
+ oe({
455
455
  mode: "composition"
456
456
  }),
457
- V()
458
- ], D);
459
- const ar = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: K } = w.build({
460
- basePath: `${G}/api/fcm-pump`
461
- }), h = $.createLogger({
457
+ D()
458
+ ], w);
459
+ const rr = w.Registration, { URL: j } = M("FCM-PUMP_SERVICE"), { postModel: K } = R.build({
460
+ basePath: `${j}/api/fcm-pump`
461
+ }), h = C.createLogger({
462
462
  name: "fcm-pump-service",
463
463
  group: "Services"
464
- }), or = async (e) => {
464
+ }), ar = async (e) => {
465
465
  var t, r, o, a, n;
466
466
  h.debug(
467
467
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
468
468
  );
469
469
  try {
470
- const s = await K({
470
+ const i = await K({
471
471
  model: {},
472
- urlOverride: `${G}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
472
+ urlOverride: `${j}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
473
473
  });
474
- return h.debug("performElectricalTest - response:", s), ((s == null ? void 0 : s.status) === 200 || (s == null ? void 0 : s.status) === 499) && ((t = s.data) != null && t.error) ? [s.data.error || "unknownError", s.data] : [void 0, s == null ? void 0 : s.data];
475
- } catch (s) {
474
+ return h.debug("performElectricalTest - response:", i), ((i == null ? void 0 : i.status) === 200 || (i == null ? void 0 : i.status) === 499) && ((t = i.data) != null && t.error) ? [i.data.error || "unknownError", i.data] : [void 0, i == null ? void 0 : i.data];
475
+ } catch (i) {
476
476
  if (h.error(
477
477
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
478
- s
479
- ), s instanceof Ie) {
480
- const u = ((o = (r = s.payload) == null ? void 0 : r.data) == null ? void 0 : o.error) || ((a = s.payload) == null ? void 0 : a.error) || "unknownError";
481
- return [u, ((n = s.payload) == null ? void 0 : n.data) || { error: u }];
478
+ i
479
+ ), i instanceof Ie) {
480
+ const u = ((o = (r = i.payload) == null ? void 0 : r.data) == null ? void 0 : o.error) || ((a = i.payload) == null ? void 0 : a.error) || "unknownError";
481
+ return [u, ((n = i.payload) == null ? void 0 : n.data) || { error: u }];
482
482
  }
483
483
  }
484
484
  return ["unknownError", { error: "unknownError" }];
485
- }, ir = async (e, t) => {
485
+ }, or = async (e, t) => {
486
486
  h.debug(
487
487
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
488
488
  );
489
489
  try {
490
490
  const r = await K({
491
491
  model: {},
492
- urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
492
+ urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
493
493
  tracker: t
494
494
  });
495
495
  return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -500,20 +500,20 @@ const ar = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: K }
500
500
  );
501
501
  const o = {
502
502
  id: t || "",
503
- endState: q.Fail,
503
+ endState: U.Fail,
504
504
  tracker: t,
505
505
  reason: "Failed to resolve trouble"
506
506
  };
507
507
  return y.initiateFuture(o), o;
508
508
  }
509
- }, sr = async (e, t) => {
509
+ }, ir = async (e, t) => {
510
510
  h.debug(
511
511
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
512
512
  );
513
513
  try {
514
514
  const r = await K({
515
515
  model: {},
516
- urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
516
+ urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
517
517
  tracker: t
518
518
  });
519
519
  return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -524,20 +524,20 @@ const ar = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: K }
524
524
  );
525
525
  const o = {
526
526
  id: t || "",
527
- endState: q.Fail,
527
+ endState: U.Fail,
528
528
  tracker: t,
529
529
  reason: "Failed to resolve trouble"
530
530
  };
531
531
  return y.initiateFuture(o), o;
532
532
  }
533
- }, nr = async (e, t, r) => {
533
+ }, sr = async (e, t, r) => {
534
534
  h.debug(
535
535
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
536
536
  );
537
537
  try {
538
538
  const o = await K({
539
539
  model: {},
540
- urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
540
+ urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
541
541
  tracker: r
542
542
  });
543
543
  return h.debug("performVerify - response:", o), o != null && o.data && y.initiateFuture(o.data), o == null ? void 0 : o.data;
@@ -548,22 +548,22 @@ const ar = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: K }
548
548
  );
549
549
  const a = {
550
550
  id: r || "",
551
- endState: q.Fail,
551
+ endState: U.Fail,
552
552
  tracker: r,
553
553
  reason: "Failed to resolve trouble"
554
554
  };
555
555
  return y.initiateFuture(a), a;
556
556
  }
557
- }, lr = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", ur = async (e, t, r) => {
557
+ }, nr = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", lr = async (e, t, r) => {
558
558
  h.debug(
559
559
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
560
560
  );
561
561
  try {
562
562
  const o = await K({
563
563
  model: {},
564
- urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
564
+ urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
565
565
  });
566
- return h.debug("performPreCalibrate - response:", o), lr(o == null ? void 0 : o.data);
566
+ return h.debug("performPreCalibrate - response:", o), nr(o == null ? void 0 : o.data);
567
567
  } catch (o) {
568
568
  h.error(
569
569
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
@@ -572,19 +572,19 @@ const ar = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: K }
572
572
  return;
573
573
  }
574
574
  };
575
- var cr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, ie = (e, t, r, o) => {
576
- for (var a = o > 1 ? void 0 : o ? dr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
577
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
578
- return o && a && cr(t, r, a), a;
575
+ var ur = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, ne = (e, t, r, o) => {
576
+ for (var a = o > 1 ? void 0 : o ? cr(t, r) : t, n = e.length - 1, i; n >= 0; n--)
577
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
578
+ return o && a && ur(t, r, a), a;
579
579
  };
580
- const Xe = "fcm-pump-model", pr = $.createLogger({ name: "fcm-pump-model" });
581
- let z = class {
580
+ const Je = "fcm-pump-model", dr = C.createLogger({ name: "fcm-pump-model" });
581
+ let L = class {
582
582
  constructor(e, t, r) {
583
- i(this, "id");
584
- i(this, "logger");
585
- i(this, "pumpModel");
586
- i(this, "futureHandler");
587
- this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new Ge(this);
583
+ s(this, "id");
584
+ s(this, "logger");
585
+ s(this, "pumpModel");
586
+ s(this, "futureHandler");
587
+ this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new Ue(this);
588
588
  }
589
589
  get future() {
590
590
  return this.futureHandler.future;
@@ -605,23 +605,23 @@ let z = class {
605
605
  return this.pumpModel.performIntent(e);
606
606
  }
607
607
  async performElectricalTest() {
608
- const [e, t] = await or(this.pumpModel.path);
609
- return e && pr.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
608
+ const [e, t] = await ar(this.pumpModel.path);
609
+ return e && dr.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
610
610
  }
611
611
  getChildren() {
612
612
  return [...this.futureHandler.allFutures];
613
613
  }
614
614
  async performPreCalibrate(e) {
615
- return ir(this.pumpModel.path, e);
615
+ return or(this.pumpModel.path, e);
616
616
  }
617
617
  async performCalibrate(e) {
618
- return sr(this.pumpModel.path, e);
618
+ return ir(this.pumpModel.path, e);
619
619
  }
620
620
  async performVerify(e, t) {
621
- return nr(this.pumpModel.path, e, t);
621
+ return sr(this.pumpModel.path, e, t);
622
622
  }
623
623
  async performComplete(e, t) {
624
- return ur(this.pumpModel.path, e, t);
624
+ return lr(this.pumpModel.path, e, t);
625
625
  }
626
626
  // -------------------LIFECYCLE----------------------------
627
627
  async init() {
@@ -631,35 +631,35 @@ let z = class {
631
631
  this.logger.debug(`loading fcm-pump ${this.id}`);
632
632
  }
633
633
  };
634
- ie([
634
+ ne([
635
635
  I()
636
- ], z.prototype, "performPreCalibrate", 1);
637
- ie([
636
+ ], L.prototype, "performPreCalibrate", 1);
637
+ ne([
638
638
  I()
639
- ], z.prototype, "performCalibrate", 1);
640
- ie([
639
+ ], L.prototype, "performCalibrate", 1);
640
+ ne([
641
641
  I()
642
- ], z.prototype, "performVerify", 1);
643
- z = ie([
644
- f(Xe)
645
- ], z);
646
- const gr = new E({
647
- class: z,
648
- type: Xe
642
+ ], L.prototype, "performVerify", 1);
643
+ L = ne([
644
+ f(Je)
645
+ ], L);
646
+ const pr = new F({
647
+ class: L,
648
+ type: Je
649
649
  });
650
- var hr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, et = (e, t, r, o) => {
651
- for (var a = o > 1 ? void 0 : o ? fr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
652
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
653
- return o && a && hr(t, r, a), a;
650
+ var gr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, et = (e, t, r, o) => {
651
+ for (var a = o > 1 ? void 0 : o ? hr(t, r) : t, n = e.length - 1, i; n >= 0; n--)
652
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
653
+ return o && a && gr(t, r, a), a;
654
654
  };
655
- const tt = "freestyle-assembly-model", mr = "iceAgitator", yr = "carbTank", br = "remoteTrays";
656
- let X = class {
655
+ const tt = "freestyle-assembly-model", fr = "iceAgitator", mr = "carbTank", yr = "remoteTrays";
656
+ let J = class {
657
657
  constructor(e, t, r) {
658
- i(this, "id");
659
- i(this, "_carbTankModel");
660
- i(this, "logger");
661
- i(this, "assembly");
662
- i(this, "_remoteTrays");
658
+ s(this, "id");
659
+ s(this, "_carbTankModel");
660
+ s(this, "logger");
661
+ s(this, "assembly");
662
+ s(this, "_remoteTrays");
663
663
  this.id = e, this.logger = r.logger, this.assembly = t.companionParent;
664
664
  }
665
665
  get holderGroups() {
@@ -715,19 +715,19 @@ let X = class {
715
715
  }
716
716
  // -------------------LIFECYCLE----------------------------
717
717
  get supportsRemoteTrays() {
718
- return ue.isFeatureEnabled(br);
718
+ return de.isFeatureEnabled(yr);
719
719
  }
720
720
  get supportsIce() {
721
- return ue.isFeatureEnabled(mr);
721
+ return de.isFeatureEnabled(fr);
722
722
  }
723
723
  get supportsCarb() {
724
- return ue.isFeatureEnabled(yr);
724
+ return de.isFeatureEnabled(mr);
725
725
  }
726
726
  async init() {
727
727
  this.logger.debug(`initializing freestyle-assembly ${this.id}`);
728
728
  }
729
729
  async ready() {
730
- const e = Ct(
730
+ const e = $t(
731
731
  this.assembly,
732
732
  Ke.type
733
733
  );
@@ -735,36 +735,36 @@ let X = class {
735
735
  }
736
736
  };
737
737
  et([
738
- qe
739
- ], X.prototype, "_remoteTrays", 2);
740
- X = et([
738
+ Ge
739
+ ], J.prototype, "_remoteTrays", 2);
740
+ J = et([
741
741
  je(),
742
742
  f(tt)
743
- ], X);
744
- const ge = new _e({
745
- class: X,
743
+ ], J);
744
+ const fe = new Te({
745
+ class: J,
746
746
  type: tt
747
747
  });
748
- var Pr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, rt = (e, t, r, o) => {
749
- for (var a = o > 1 ? void 0 : o ? vr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
750
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
751
- return o && a && Pr(t, r, a), a;
748
+ var br = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, rt = (e, t, r, o) => {
749
+ for (var a = o > 1 ? void 0 : o ? Pr(t, r) : t, n = e.length - 1, i; n >= 0; n--)
750
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
751
+ return o && a && br(t, r, a), a;
752
752
  };
753
753
  const at = "remote-tray-model";
754
- U("holderPath");
755
- const Tr = U("configPath");
754
+ G("holderPath");
755
+ const vr = G("configPath");
756
756
  let ee = class {
757
757
  constructor(e, t, r) {
758
758
  /** Unique identifier for the remote tray instance */
759
- i(this, "id");
760
- i(this, "logger");
759
+ s(this, "id");
760
+ s(this, "logger");
761
761
  /** Path reference to the associated holder model */
762
- i(this, "holderPath");
762
+ s(this, "holderPath");
763
763
  /** Configuration path for tray-specific settings */
764
- i(this, "configPath");
764
+ s(this, "configPath");
765
765
  /** Display name of the remote tray */
766
- i(this, "name");
767
- i(this, "remoteTrayEnabled");
766
+ s(this, "name");
767
+ s(this, "remoteTrayEnabled");
768
768
  this.id = e, this.logger = r.logger, this.holderPath = t.holderPath, this.configPath = t.configPath, this.name = t.name;
769
769
  }
770
770
  /**
@@ -810,7 +810,7 @@ let ee = class {
810
810
  * @returns The HolderModel instance referenced by holderPath, or undefined if not found
811
811
  */
812
812
  get holder() {
813
- return R(this.holderPath).model;
813
+ return A(this.holderPath).model;
814
814
  }
815
815
  /**
816
816
  * Determines if the remote tray is currently active.
@@ -845,69 +845,69 @@ let ee = class {
845
845
  };
846
846
  rt([
847
847
  b({
848
- path: Tr,
848
+ path: vr,
849
849
  attribute: "enabled"
850
850
  })
851
851
  ], ee.prototype, "remoteTrayEnabled", 2);
852
852
  ee = rt([
853
853
  f(at)
854
854
  ], ee);
855
- const j = new E({
855
+ const V = new F({
856
856
  class: ee,
857
857
  type: at
858
858
  });
859
- var _r = Object.getOwnPropertyDescriptor, Ir = (e, t, r, o) => {
860
- for (var a = o > 1 ? void 0 : o ? _r(t, r) : t, n = e.length - 1, s; n >= 0; n--)
861
- (s = e[n]) && (a = s(a) || a);
859
+ var _r = Object.getOwnPropertyDescriptor, Tr = (e, t, r, o) => {
860
+ for (var a = o > 1 ? void 0 : o ? _r(t, r) : t, n = e.length - 1, i; n >= 0; n--)
861
+ (i = e[n]) && (a = i(a) || a);
862
862
  return a;
863
863
  };
864
864
  const ot = "remote-tray-container-model";
865
- let he = class {
865
+ let me = class {
866
866
  constructor(e) {
867
- i(this, "id");
867
+ s(this, "id");
868
868
  this.id = e;
869
869
  }
870
870
  };
871
- he = Ir([
871
+ me = Tr([
872
872
  f(ot),
873
- V(),
874
- Ot()
875
- ], he);
876
- const Ee = new _e({
877
- class: he,
873
+ D(),
874
+ Ct()
875
+ ], me);
876
+ const Ee = new Te({
877
+ class: me,
878
878
  type: ot
879
879
  });
880
- Ee.addRelatedModel(j);
881
- var $r = Object.getOwnPropertyDescriptor, Cr = (e, t, r, o) => {
882
- for (var a = o > 1 ? void 0 : o ? $r(t, r) : t, n = e.length - 1, s; n >= 0; n--)
883
- (s = e[n]) && (a = s(a) || a);
880
+ Ee.addRelatedModel(V);
881
+ var Ir = Object.getOwnPropertyDescriptor, $r = (e, t, r, o) => {
882
+ for (var a = o > 1 ? void 0 : o ? Ir(t, r) : t, n = e.length - 1, i; n >= 0; n--)
883
+ (i = e[n]) && (a = i(a) || a);
884
884
  return a;
885
885
  };
886
886
  const it = "freestyle-holder-model";
887
- function Or(e) {
888
- const t = Et.getContext(e), r = t == null ? void 0 : t.get(
889
- ge.type
887
+ function Cr(e) {
888
+ const t = Ot.getContext(e), r = t == null ? void 0 : t.get(
889
+ fe.type
890
890
  );
891
891
  if (!r) {
892
- $.error("Freestyle assembly not found");
892
+ C.error("Freestyle assembly not found");
893
893
  return;
894
894
  }
895
895
  return r;
896
896
  }
897
- async function Er(e, t) {
897
+ async function Or(e, t) {
898
898
  if (!e || !t)
899
899
  return;
900
900
  const r = await e[t]();
901
901
  if (r != null && r.tracker)
902
902
  return y.getFuture(r.tracker);
903
903
  }
904
- let fe = class {
904
+ let ye = class {
905
905
  constructor(e, t, r) {
906
- i(this, "id");
907
- i(this, "logger");
908
- i(this, "holder");
909
- i(this, "context");
910
- i(this, "future");
906
+ s(this, "id");
907
+ s(this, "logger");
908
+ s(this, "holder");
909
+ s(this, "context");
910
+ s(this, "future");
911
911
  this.id = e, this.logger = r.logger, this.context = r.kosContext, this.holder = t.companionParent;
912
912
  }
913
913
  get agitated() {
@@ -917,20 +917,20 @@ let fe = class {
917
917
  if (!this.holder.data.agitated)
918
918
  return;
919
919
  this.future = void 0;
920
- const e = Or(this.id);
920
+ const e = Cr(this.id);
921
921
  if (!e)
922
922
  return;
923
923
  if (!e.defaultCartridgeAgitator) {
924
924
  this.logger.error("Agitator not found");
925
925
  return;
926
926
  }
927
- return this.future = await Er(
927
+ return this.future = await Or(
928
928
  e.defaultCartridgeAgitator,
929
929
  "testAgitate"
930
930
  ), this.future;
931
931
  }
932
932
  get isRemote() {
933
- const e = `${j.type}-${this.holder.path}`, t = R(e);
933
+ const e = `${V.type}-${this.holder.path}`, t = A(e);
934
934
  return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
935
935
  }
936
936
  // -------------------LIFECYCLE----------------------------
@@ -941,19 +941,19 @@ let fe = class {
941
941
  this.logger.debug(`loading freestyle-holder ${this.id}`);
942
942
  }
943
943
  };
944
- fe = Cr([
944
+ ye = $r([
945
945
  f(it)
946
- ], fe);
947
- const Ae = new E({
948
- class: fe,
946
+ ], ye);
947
+ const Ae = new F({
948
+ class: ye,
949
949
  type: it
950
- }), { URL: Sr } = A("FREESTYLE-NOZZLE_SERVICE"), { getOne: Ar } = w.build({
951
- basePath: `${Sr}/api/freestyle-nozzle`
952
- }), W = $.createLogger({
950
+ }), { URL: Er } = M("FREESTYLE-NOZZLE_SERVICE"), { getOne: Sr } = R.build({
951
+ basePath: `${Er}/api/freestyle-nozzle`
952
+ }), W = C.createLogger({
953
953
  name: "freestyle-nozzle-service",
954
954
  group: "Services"
955
955
  });
956
- class wr extends Error {
956
+ class Ar extends Error {
957
957
  constructor(t) {
958
958
  super(t), this.name = "NutritionInfoError";
959
959
  }
@@ -963,12 +963,12 @@ class we extends Error {
963
963
  super(t), this.name = "InvalidRequestError";
964
964
  }
965
965
  }
966
- const Mr = async (e, t, r, o = "http://localhost:8081") => {
966
+ const wr = async (e, t, r, o = "http://localhost:8081") => {
967
967
  if (W.debug("sending GET for freestyle-nozzle"), !t)
968
968
  throw W.error("Invalid freestyle-nozzle request: beverageId is required"), new we("No beverageId provided");
969
969
  if (!r || r.length === 0)
970
970
  throw W.error("Invalid freestyle-nozzle request: volumes are required"), new we("No volumes provided");
971
- const a = await Ar({
971
+ const a = await Sr({
972
972
  urlOverride: `${o}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
973
973
  ","
974
974
  )}`
@@ -976,22 +976,22 @@ const Mr = async (e, t, r, o = "http://localhost:8081") => {
976
976
  if (!(a != null && a.data))
977
977
  throw W.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
978
978
  if (a.data.error)
979
- throw new wr(a.data.error);
979
+ throw new Ar(a.data.error);
980
980
  return a.data;
981
981
  };
982
- var Rr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, st = (e, t, r, o) => {
983
- for (var a = o > 1 ? void 0 : o ? Dr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
984
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
985
- return o && a && Rr(t, r, a), a;
982
+ var Mr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, st = (e, t, r, o) => {
983
+ for (var a = o > 1 ? void 0 : o ? Rr(t, r) : t, n = e.length - 1, i; n >= 0; n--)
984
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
985
+ return o && a && Mr(t, r, a), a;
986
986
  };
987
987
  const nt = "freestyle-nozzle-model";
988
988
  let te = class {
989
989
  constructor(e, t, r) {
990
- i(this, "id");
991
- i(this, "logger");
992
- i(this, "nozzleModel");
993
- i(this, "_cupSizes");
994
- i(this, "_nutritionInfo");
990
+ s(this, "id");
991
+ s(this, "logger");
992
+ s(this, "nozzleModel");
993
+ s(this, "_cupSizes");
994
+ s(this, "_nutritionInfo");
995
995
  this.id = e, this.logger = r.logger, this.nozzleModel = t.companionParent, this._cupSizes = [100];
996
996
  }
997
997
  set cupSizes(e) {
@@ -1010,7 +1010,7 @@ let te = class {
1010
1010
  );
1011
1011
  const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
1012
1012
  try {
1013
- const r = await Mr(
1013
+ const r = await wr(
1014
1014
  t,
1015
1015
  e,
1016
1016
  this._cupSizes
@@ -1035,7 +1035,7 @@ let te = class {
1035
1035
  }
1036
1036
  };
1037
1037
  st([
1038
- Te({
1038
+ _e({
1039
1039
  dependencies: (e) => [
1040
1040
  e.selectedPourable.beverage
1041
1041
  ]
@@ -1045,133 +1045,132 @@ te = st([
1045
1045
  je(),
1046
1046
  f(nt)
1047
1047
  ], te);
1048
- const Me = new E({
1048
+ const Me = new F({
1049
1049
  class: te,
1050
1050
  type: nt
1051
- }), { URL: lt } = A("PUMP_SERVICE"), { postModel: Fr } = w.build({
1051
+ }), { URL: lt } = M("PUMP_SERVICE"), { postModel: Dr } = R.build({
1052
1052
  basePath: `${lt}/api/ext/freestyle/microCalibration`
1053
- }), pe = $.createLogger({
1053
+ }), he = C.createLogger({
1054
1054
  name: "freestyle-pump-service",
1055
1055
  group: "Services"
1056
- }), Lr = async (e, t) => {
1057
- var r, o, a, n, s;
1058
- pe.debug(
1056
+ }), Fr = async (e, t) => {
1057
+ var r, o, a, n, i;
1058
+ he.debug(
1059
1059
  `replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
1060
1060
  );
1061
1061
  try {
1062
- const u = await Fr({
1062
+ const u = await Dr({
1063
1063
  model: {},
1064
1064
  urlOverride: `${lt}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
1065
1065
  });
1066
- return pe.debug("replacePump - response:", u), ((u == null ? void 0 : u.status) === 200 || (u == null ? void 0 : u.status) === 499) && ((r = u.data) != null && r.error) ? [u.data.error || "unknownError", u.data] : [void 0, u == null ? void 0 : u.data];
1066
+ return he.debug("replacePump - response:", u), ((u == null ? void 0 : u.status) === 200 || (u == null ? void 0 : u.status) === 499) && ((r = u.data) != null && r.error) ? [u.data.error || "unknownError", u.data] : [void 0, u == null ? void 0 : u.data];
1067
1067
  } catch (u) {
1068
- if (pe.error(
1068
+ if (he.error(
1069
1069
  `replacePump - sending POST request to /api/cal/${e}/code/${t}`,
1070
1070
  u
1071
1071
  ), u instanceof Ie) {
1072
- const S = ((a = (o = u.payload) == null ? void 0 : o.data) == null ? void 0 : a.error) || ((n = u.payload) == null ? void 0 : n.error) || "unknownError";
1073
- return [S, ((s = u.payload) == null ? void 0 : s.data) || { error: S }];
1072
+ const E = ((a = (o = u.payload) == null ? void 0 : o.data) == null ? void 0 : a.error) || ((n = u.payload) == null ? void 0 : n.error) || "unknownError";
1073
+ return [E, ((i = u.payload) == null ? void 0 : i.data) || { error: E }];
1074
1074
  }
1075
1075
  }
1076
1076
  return ["unknownError", { error: "unknownError" }];
1077
1077
  };
1078
- var zr = Object.getOwnPropertyDescriptor, Nr = (e, t, r, o) => {
1079
- for (var a = o > 1 ? void 0 : o ? zr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1080
- (s = e[n]) && (a = s(a) || a);
1078
+ var Nr = Object.getOwnPropertyDescriptor, zr = (e, t, r, o) => {
1079
+ for (var a = o > 1 ? void 0 : o ? Nr(t, r) : t, n = e.length - 1, i; n >= 0; n--)
1080
+ (i = e[n]) && (a = i(a) || a);
1081
1081
  return a;
1082
1082
  };
1083
1083
  const ut = "freestyle-pump-model";
1084
- let me = class {
1084
+ let be = class {
1085
1085
  constructor(e, t, r) {
1086
- i(this, "id");
1087
- i(this, "logger");
1088
- i(this, "pump");
1086
+ s(this, "id");
1087
+ s(this, "logger");
1088
+ s(this, "pump");
1089
1089
  this.id = e, this.logger = r.logger, this.pump = t.companionParent;
1090
1090
  }
1091
1091
  // -------------------LIFECYCLE----------------------------
1092
1092
  async replacePump(e) {
1093
- const [t, r] = await Lr(this.pump.path, e);
1093
+ const [t, r] = await Fr(this.pump.path, e);
1094
1094
  return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
1095
1095
  }
1096
1096
  };
1097
- me = Nr([
1097
+ be = zr([
1098
1098
  f(ut)
1099
- ], me);
1100
- const Re = new E({
1101
- class: me,
1099
+ ], be);
1100
+ const Re = new F({
1101
+ class: be,
1102
1102
  type: ut
1103
- }), { URL: F } = A("ICE_AGITATOR_SERVICE"), { getAll: ct, postModel: se } = w.build({
1104
- basePath: `${F}/api/ext/freestyle/ice`
1105
- }), dt = $.createLogger({
1103
+ }), { URL: N } = M("ICE_AGITATOR_SERVICE"), { getAll: ct, postModel: le } = R.build({
1104
+ basePath: `${N}/api/ext/freestyle/ice`
1105
+ }), dt = C.createLogger({
1106
1106
  name: "ice-agitator-service",
1107
1107
  group: "Services"
1108
- }), xr = async (e) => (dt.debug("sending GET for ice types"), await ct({
1109
- urlOverride: `${F}/api/handle/${e}/types`
1110
- })), Ur = async (e, t) => (dt.debug("sending POST for ice types"), await se({
1111
- urlOverride: `${F}/api/handle/${e}/type/${t}`,
1108
+ }), Lr = async (e) => (dt.debug("sending GET for ice types"), await ct({
1109
+ urlOverride: `${N}/api/handle/${e}/types`
1110
+ })), xr = async (e, t) => (dt.debug("sending POST for ice types"), await le({
1111
+ urlOverride: `${N}/api/handle/${e}/type/${t}`,
1112
1112
  model: {}
1113
1113
  })), qr = async (e) => await ct({
1114
- urlOverride: `${F}/api/kos/config/details/${e}/4`
1114
+ urlOverride: `${N}/api/kos/config/details/${e}/4`
1115
1115
  }), Gr = async (e, t) => {
1116
- const r = await se({
1116
+ const r = await le({
1117
1117
  model: {},
1118
1118
  tracker: t,
1119
- urlOverride: `${F}/api/handle/${e}/pour`
1119
+ urlOverride: `${N}/api/handle/${e}/pour`
1120
1120
  });
1121
1121
  if (!(r != null && r.data))
1122
1122
  throw new Error("No response from server");
1123
1123
  return r == null ? void 0 : r.data;
1124
- }, jr = async (e, t) => {
1125
- const r = await se({
1124
+ }, Ur = async (e, t) => {
1125
+ const r = await le({
1126
1126
  model: {},
1127
1127
  tracker: t,
1128
- urlOverride: `${F}/api/handle/${e}/test/agitation`
1128
+ urlOverride: `${N}/api/handle/${e}/test/agitation`
1129
1129
  });
1130
1130
  if (!(r != null && r.data))
1131
1131
  throw new Error("No response from server");
1132
1132
  return r == null ? void 0 : r.data;
1133
- }, Vr = async (e, t) => {
1134
- const r = await se({
1133
+ }, jr = async (e, t) => {
1134
+ const r = await le({
1135
1135
  model: {},
1136
1136
  tracker: t,
1137
- urlOverride: `${F}/api/handle/${e}/test/gate`
1137
+ urlOverride: `${N}/api/handle/${e}/test/gate`
1138
1138
  });
1139
1139
  if (!(r != null && r.data))
1140
1140
  throw new Error("No response from server");
1141
1141
  return r == null ? void 0 : r.data;
1142
1142
  };
1143
- var Hr = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, p = (e, t, r, o) => {
1144
- for (var a = o > 1 ? void 0 : o ? Br(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1145
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1146
- return o && a && Hr(t, r, a), a;
1147
- };
1143
+ var pt = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, Hr = (e, t, r) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, p = (e, t, r, o) => {
1144
+ for (var a = o > 1 ? void 0 : o ? Vr(t, r) : t, n = e.length - 1, i; n >= 0; n--)
1145
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
1146
+ return o && a && pt(t, r, a), a;
1147
+ }, Br = (e, t, r) => (Hr(e, t + "", r), r);
1148
1148
  class re {
1149
1149
  }
1150
- i(re, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), i(re, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
1151
- const pt = "ice-agitator-model", gt = U("statePath");
1150
+ s(re, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), s(re, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
1151
+ const Kr = "ice-agitator-model", gt = G("statePath");
1152
1152
  let c = class {
1153
- constructor(e, t, r) {
1154
- i(this, "id");
1155
- i(this, "name");
1156
- i(this, "path");
1157
- i(this, "volWithoutIceMl");
1158
- i(this, "durationSec");
1159
- i(this, "enableIceChuteClear");
1160
- i(this, "iceChuteClearDurationMs");
1161
- i(this, "iceChuteClearIntervalSec");
1162
- i(this, "iceChuteClearRetryIntervalSec");
1163
- i(this, "maxDispenseSec");
1164
- i(this, "type");
1165
- i(this, "dilutionOffset");
1166
- i(this, "inactivitySec");
1167
- i(this, "agitating");
1168
- i(this, "iceChuteOpen");
1169
- i(this, "statePath");
1170
- i(this, "_allIceTypes");
1171
- i(this, "logger");
1172
- i(this, "currentState", d.IDLE);
1173
- i(this, "resetDefaultValues", async () => await qr(this.path));
1174
- this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
1153
+ constructor(e, t) {
1154
+ s(this, "id");
1155
+ s(this, "name");
1156
+ s(this, "path");
1157
+ s(this, "volWithoutIceMl");
1158
+ s(this, "durationSec");
1159
+ s(this, "enableIceChuteClear");
1160
+ s(this, "iceChuteClearDurationMs");
1161
+ s(this, "iceChuteClearIntervalSec");
1162
+ s(this, "iceChuteClearRetryIntervalSec");
1163
+ s(this, "maxDispenseSec");
1164
+ s(this, "type");
1165
+ s(this, "dilutionOffset");
1166
+ s(this, "inactivitySec");
1167
+ s(this, "agitating");
1168
+ s(this, "iceChuteOpen");
1169
+ s(this, "statePath");
1170
+ s(this, "_allIceTypes");
1171
+ s(this, "currentState", d.IDLE);
1172
+ s(this, "resetDefaultValues", async () => await qr(this.path));
1173
+ this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [];
1175
1174
  }
1176
1175
  get iceTypes() {
1177
1176
  return this._allIceTypes;
@@ -1232,12 +1231,12 @@ let c = class {
1232
1231
  async testAgitate(e) {
1233
1232
  if (!e)
1234
1233
  throw new Error("No tracker provided");
1235
- return this.logger.info(`agitating ice-agitator ${this.id}`), jr(this.path, e);
1234
+ return this.logger.info(`agitating ice-agitator ${this.id}`), Ur(this.path, e);
1236
1235
  }
1237
1236
  async testGate(e) {
1238
1237
  if (!e)
1239
1238
  throw new Error("No tracker provided");
1240
- return this.logger.info(`testing ice gate: ${this.id}`), Vr(this.path, e);
1239
+ return this.logger.info(`testing ice gate: ${this.id}`), jr(this.path, e);
1241
1240
  }
1242
1241
  handleAgitationChange() {
1243
1242
  var e;
@@ -1249,28 +1248,33 @@ let c = class {
1249
1248
  });
1250
1249
  }
1251
1250
  async updateIceType(e) {
1252
- await Ur(this.path, e);
1251
+ await xr(this.path, e);
1253
1252
  }
1254
1253
  async init() {
1255
1254
  this.logger.debug(`initializing ice-agitator ${this.id}`);
1256
1255
  }
1257
1256
  async load() {
1258
- this.logger.debug(`loading ice-agitator ${this.id}`);
1259
- const e = await xr(this.path);
1260
- (e == null ? void 0 : e.status) === 200 && Z(() => {
1261
- this._allIceTypes = e.data || [];
1262
- });
1257
+ try {
1258
+ this.logger.debug(`loading ice-agitator ${this.id}`);
1259
+ const e = await Lr(this.path);
1260
+ (e == null ? void 0 : e.status) === 200 && Z(() => {
1261
+ this._allIceTypes = e.data || [];
1262
+ });
1263
+ } catch (e) {
1264
+ this.logger.error(e);
1265
+ }
1263
1266
  }
1264
1267
  };
1268
+ Br(c, "Registration");
1265
1269
  p([
1266
1270
  b({
1267
- path: C,
1271
+ path: $,
1268
1272
  attribute: "settings.volWithoutIceMl"
1269
1273
  })
1270
1274
  ], c.prototype, "volWithoutIceMl", 2);
1271
1275
  p([
1272
1276
  b({
1273
- path: C,
1277
+ path: $,
1274
1278
  attribute: "settings.durationSec",
1275
1279
  converter: {
1276
1280
  to: "second"
@@ -1279,49 +1283,49 @@ p([
1279
1283
  ], c.prototype, "durationSec", 2);
1280
1284
  p([
1281
1285
  b({
1282
- path: C,
1286
+ path: $,
1283
1287
  attribute: "enableIceChuteClear"
1284
1288
  })
1285
1289
  ], c.prototype, "enableIceChuteClear", 2);
1286
1290
  p([
1287
1291
  b({
1288
- path: C,
1292
+ path: $,
1289
1293
  attribute: "iceChuteClearDurationMs"
1290
1294
  })
1291
1295
  ], c.prototype, "iceChuteClearDurationMs", 2);
1292
1296
  p([
1293
1297
  b({
1294
- path: C,
1298
+ path: $,
1295
1299
  attribute: "iceChuteClearIntervalSec"
1296
1300
  })
1297
1301
  ], c.prototype, "iceChuteClearIntervalSec", 2);
1298
1302
  p([
1299
1303
  b({
1300
- path: C,
1304
+ path: $,
1301
1305
  attribute: "iceChuteClearRetryIntervalSec"
1302
1306
  })
1303
1307
  ], c.prototype, "iceChuteClearRetryIntervalSec", 2);
1304
1308
  p([
1305
1309
  b({
1306
- path: C,
1310
+ path: $,
1307
1311
  attribute: "maxDispenseSec"
1308
1312
  })
1309
1313
  ], c.prototype, "maxDispenseSec", 2);
1310
1314
  p([
1311
1315
  b({
1312
- path: C,
1316
+ path: $,
1313
1317
  attribute: "type"
1314
1318
  })
1315
1319
  ], c.prototype, "type", 2);
1316
1320
  p([
1317
1321
  b({
1318
- path: C,
1322
+ path: $,
1319
1323
  attribute: "settings.dilutionOffset"
1320
1324
  })
1321
1325
  ], c.prototype, "dilutionOffset", 2);
1322
1326
  p([
1323
1327
  b({
1324
- path: C,
1328
+ path: $,
1325
1329
  attribute: "settings.inactivitySec",
1326
1330
  converter: {
1327
1331
  to: "minute"
@@ -1346,30 +1350,26 @@ p([
1346
1350
  })
1347
1351
  ], c.prototype, "testGate", 1);
1348
1352
  p([
1349
- Te({
1353
+ _e({
1350
1354
  dependencies: (e) => [e.isAgitating]
1351
1355
  })
1352
1356
  ], c.prototype, "handleAgitationChange", 1);
1353
1357
  c = p([
1354
- f(pt),
1355
- St()
1358
+ f({ modelTypeId: Kr, singleton: !1 }),
1359
+ D(),
1360
+ Et()
1356
1361
  ], c);
1357
- const ht = new E({
1358
- class: c,
1359
- type: pt
1360
- });
1361
- var Kr = Object.getOwnPropertyDescriptor, Yr = (e, t, r, o) => {
1362
- for (var a = o > 1 ? void 0 : o ? Kr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1363
- (s = e[n]) && (a = s(a) || a);
1362
+ const ht = c.Registration;
1363
+ var Yr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Zr = (e, t, r) => t in e ? Yr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, kr = (e, t, r, o) => {
1364
+ for (var a = o > 1 ? void 0 : o ? Wr(t, r) : t, n = e.length - 1, i; n >= 0; n--)
1365
+ (i = e[n]) && (a = i(a) || a);
1364
1366
  return a;
1365
- };
1366
- const ft = "lfcv-pump-model";
1367
- let ye = class {
1368
- constructor(e, t, r) {
1369
- i(this, "id");
1370
- i(this, "logger");
1371
- i(this, "pumpModel");
1372
- this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent;
1367
+ }, Qr = (e, t, r) => (Zr(e, t + "", r), r);
1368
+ const Xr = "lfcv-pump-model";
1369
+ let ae = class {
1370
+ constructor(e, t) {
1371
+ s(this, "id");
1372
+ this.id = e;
1373
1373
  }
1374
1374
  get name() {
1375
1375
  return this.pumpModel.name;
@@ -1386,84 +1386,75 @@ let ye = class {
1386
1386
  performIntent(e) {
1387
1387
  return this.pumpModel.performIntent(e);
1388
1388
  }
1389
- // -------------------LIFECYCLE----------------------------
1390
- async init() {
1391
- this.logger.debug(`initializing lfcv-pump ${this.id}`);
1392
- }
1393
- async load() {
1394
- this.logger.debug(`loading lfcv-pump ${this.id}`);
1395
- }
1396
1389
  };
1397
- ye = Yr([
1398
- f(ft)
1399
- ], ye);
1400
- const Wr = new E({
1401
- class: ye,
1402
- type: ft
1403
- }), { URL: Zr } = A("LFCV-PUMP_SERVICE"), { getAll: kr } = w.build({
1404
- basePath: `${Zr}/api/lfcv-pump`
1405
- }), Jr = $.createLogger({
1406
- name: "lfcv-pump-service",
1407
- group: "Services"
1408
- }), Ia = async () => (Jr.debug("sending GET for lfcv-pump"), await kr({})), { URL: Y } = A("SPM-PUMP_SERVICE"), { postModel: ne } = w.build({
1390
+ Qr(ae, "Registration");
1391
+ ae = kr([
1392
+ f({ modelTypeId: Xr, singleton: !1 }),
1393
+ D(),
1394
+ oe({
1395
+ mode: "composition",
1396
+ parentProperty: "pumpModel"
1397
+ })
1398
+ ], ae);
1399
+ const Jr = ae.Registration, { URL: Y } = M("SPM-PUMP_SERVICE"), { postModel: ue } = R.build({
1409
1400
  basePath: `${Y}/api/spm-pump`
1410
- }), T = $.createLogger({
1401
+ }), _ = C.createLogger({
1411
1402
  name: "spm-pump-service",
1412
1403
  group: "Services"
1413
- }), Qr = async (e, t) => {
1414
- T.debug(
1404
+ }), ea = async (e, t) => {
1405
+ _.debug(
1415
1406
  `performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
1416
1407
  );
1417
1408
  try {
1418
- const r = await ne({
1409
+ const r = await ue({
1419
1410
  model: {},
1420
1411
  urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
1421
1412
  tracker: t
1422
1413
  });
1423
- return T.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
1414
+ return _.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
1424
1415
  } catch (r) {
1425
- T.error(
1416
+ _.error(
1426
1417
  `performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
1427
1418
  r
1428
1419
  );
1429
1420
  const o = {
1430
1421
  id: t || "",
1431
- endState: q.Fail,
1422
+ endState: U.Fail,
1432
1423
  tracker: t,
1433
1424
  reason: "Failed to resolve trouble"
1434
1425
  };
1435
1426
  return y.initiateFuture(o), o;
1436
1427
  }
1437
- }, Xr = async (e, t) => {
1438
- T.debug(
1428
+ }, ta = async (e, t) => {
1429
+ _.debug(
1439
1430
  `performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
1440
1431
  );
1441
1432
  try {
1442
- const r = await ne({
1433
+ const r = await ue({
1443
1434
  model: {},
1444
1435
  urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
1445
1436
  tracker: t
1446
1437
  });
1447
- return T.debug("performCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
1438
+ return _.debug("performCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
1448
1439
  } catch (r) {
1449
- T.error(
1440
+ _.error(
1450
1441
  `performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
1451
1442
  r
1452
1443
  );
1453
1444
  const o = {
1454
1445
  id: t || "",
1455
- endState: q.Fail,
1446
+ endState: U.Fail,
1456
1447
  tracker: t,
1457
1448
  reason: "Failed to resolve trouble"
1458
1449
  };
1459
1450
  return y.initiateFuture(o), o;
1460
1451
  }
1461
- }, ea = async (e, t, r, o) => {
1462
- T.debug(
1452
+ }, ra = async (e, t, r, o) => {
1453
+ _.debug(
1463
1454
  `performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
1464
1455
  );
1465
1456
  try {
1466
- const a = await ne({
1457
+ const a = await ue({
1467
1458
  model: {
1468
1459
  ...r,
1469
1460
  // commandedCalibrationVolume: 0,
@@ -1475,27 +1466,27 @@ const Wr = new E({
1475
1466
  urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
1476
1467
  tracker: o
1477
1468
  });
1478
- return T.debug("performVerify - response:", a), a != null && a.data && y.initiateFuture(a.data), a == null ? void 0 : a.data;
1469
+ return _.debug("performVerify - response:", a), a != null && a.data && y.initiateFuture(a.data), a == null ? void 0 : a.data;
1479
1470
  } catch (a) {
1480
- T.error(
1471
+ _.error(
1481
1472
  `performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,
1482
1473
  a
1483
1474
  );
1484
1475
  const n = {
1485
1476
  id: o || "",
1486
- endState: q.Fail,
1477
+ endState: U.Fail,
1487
1478
  tracker: o,
1488
1479
  reason: "Failed to resolve trouble"
1489
1480
  };
1490
1481
  return y.initiateFuture(n), n;
1491
1482
  }
1492
- }, ta = async (e, t, r, o) => {
1493
- var a, n, s, u, S;
1494
- T.debug(
1483
+ }, aa = async (e, t, r, o) => {
1484
+ var a, n, i, u, E;
1485
+ _.debug(
1495
1486
  `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
1496
1487
  );
1497
1488
  try {
1498
- const l = await ne({
1489
+ const l = await ue({
1499
1490
  model: {
1500
1491
  ...o,
1501
1492
  // commandedCalibrationVolume: 0,
@@ -1506,31 +1497,31 @@ const Wr = new E({
1506
1497
  },
1507
1498
  urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/complete`
1508
1499
  });
1509
- return T.debug("performComplete - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((a = l.data) != null && a.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
1500
+ return _.debug("performComplete - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((a = l.data) != null && a.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
1510
1501
  } catch (l) {
1511
- if (T.error(
1502
+ if (_.error(
1512
1503
  `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
1513
1504
  l
1514
1505
  ), l instanceof Ie) {
1515
- const v = ((s = (n = l.payload) == null ? void 0 : n.data) == null ? void 0 : s.error) || ((u = l.payload) == null ? void 0 : u.error) || "unknownError";
1516
- return [v, ((S = l.payload) == null ? void 0 : S.data) || { error: v }];
1506
+ const v = ((i = (n = l.payload) == null ? void 0 : n.data) == null ? void 0 : i.error) || ((u = l.payload) == null ? void 0 : u.error) || "unknownError";
1507
+ return [v, ((E = l.payload) == null ? void 0 : E.data) || { error: v }];
1517
1508
  }
1518
1509
  }
1519
1510
  return ["unknownError", { error: "unknownError" }];
1520
1511
  };
1521
- var ra = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, le = (e, t, r, o) => {
1522
- for (var a = o > 1 ? void 0 : o ? aa(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1523
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1524
- return o && a && ra(t, r, a), a;
1512
+ var oa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, ce = (e, t, r, o) => {
1513
+ for (var a = o > 1 ? void 0 : o ? ia(t, r) : t, n = e.length - 1, i; n >= 0; n--)
1514
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
1515
+ return o && a && oa(t, r, a), a;
1525
1516
  };
1526
- const mt = "spm-pump-model";
1527
- let N = class {
1517
+ const ft = "spm-pump-model";
1518
+ let x = class {
1528
1519
  constructor(e, t, r) {
1529
- i(this, "id");
1530
- i(this, "logger");
1531
- i(this, "pump");
1532
- i(this, "futureHandler");
1533
- this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new Ge(this);
1520
+ s(this, "id");
1521
+ s(this, "logger");
1522
+ s(this, "pump");
1523
+ s(this, "futureHandler");
1524
+ this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new Ue(this);
1534
1525
  }
1535
1526
  get name() {
1536
1527
  return this.pump.name;
@@ -1551,16 +1542,16 @@ let N = class {
1551
1542
  return this.futureHandler.future;
1552
1543
  }
1553
1544
  async performPreCalibrate(e) {
1554
- return Qr(this.pump.path, e);
1545
+ return ea(this.pump.path, e);
1555
1546
  }
1556
1547
  async performCalibrate(e) {
1557
- return Xr(this.pump.path, e);
1548
+ return ta(this.pump.path, e);
1558
1549
  }
1559
1550
  async performVerify(e, t, r) {
1560
- return ea(this.pump.path, e, t, r);
1551
+ return ra(this.pump.path, e, t, r);
1561
1552
  }
1562
1553
  async performComplete(e, t, r) {
1563
- return ta(this.pump.path, e, t, r);
1554
+ return aa(this.pump.path, e, t, r);
1564
1555
  }
1565
1556
  // -------------------LIFECYCLE----------------------------
1566
1557
  async init() {
@@ -1570,32 +1561,32 @@ let N = class {
1570
1561
  this.logger.debug(`loading spm-pump ${this.id}`);
1571
1562
  }
1572
1563
  };
1573
- le([
1564
+ ce([
1574
1565
  I()
1575
- ], N.prototype, "performPreCalibrate", 1);
1576
- le([
1566
+ ], x.prototype, "performPreCalibrate", 1);
1567
+ ce([
1577
1568
  I()
1578
- ], N.prototype, "performCalibrate", 1);
1579
- le([
1569
+ ], x.prototype, "performCalibrate", 1);
1570
+ ce([
1580
1571
  I()
1581
- ], N.prototype, "performVerify", 1);
1582
- N = le([
1583
- f(mt)
1584
- ], N);
1585
- const oa = new E({
1586
- class: N,
1587
- type: mt
1572
+ ], x.prototype, "performVerify", 1);
1573
+ x = ce([
1574
+ f(ft)
1575
+ ], x);
1576
+ const sa = new F({
1577
+ class: x,
1578
+ type: ft
1588
1579
  });
1589
- var yt = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, sa = (e, t, r) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Se = (e, t, r, o) => {
1590
- for (var a = o > 1 ? void 0 : o ? ia(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1591
- (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1592
- return o && a && yt(t, r, a), a;
1593
- }, na = (e, t, r) => (sa(e, t + "", r), r);
1594
- const bt = "agitation-required-trouble-model", la = (e) => {
1580
+ var mt = Object.defineProperty, na = Object.getOwnPropertyDescriptor, la = (e, t, r) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Se = (e, t, r, o) => {
1581
+ for (var a = o > 1 ? void 0 : o ? na(t, r) : t, n = e.length - 1, i; n >= 0; n--)
1582
+ (i = e[n]) && (a = (o ? i(t, r, a) : i(a)) || a);
1583
+ return o && a && mt(t, r, a), a;
1584
+ }, ua = (e, t, r) => (la(e, t + "", r), r);
1585
+ const yt = "agitation-required-trouble-model", ca = (e) => {
1595
1586
  if (e.data.agitationRequired)
1596
- return bt;
1597
- }, ua = "InsufficientAgitationTrouble";
1598
- let x = class {
1587
+ return yt;
1588
+ }, da = "InsufficientAgitationTrouble";
1589
+ let q = class {
1599
1590
  /**
1600
1591
  * Creates a new AgitationRequiredTrouble model instance.
1601
1592
  *
@@ -1605,10 +1596,10 @@ let x = class {
1605
1596
  /**
1606
1597
  * Unique identifier for this model instance.
1607
1598
  */
1608
- i(this, "id");
1609
- i(this, "_deferred");
1610
- i(this, "_holdersLoaded", !1);
1611
- i(this, "agitateBeforePour");
1599
+ s(this, "id");
1600
+ s(this, "_deferred");
1601
+ s(this, "_holdersLoaded", !1);
1602
+ s(this, "agitateBeforePour");
1612
1603
  this.id = e, this._deferred = !1;
1613
1604
  }
1614
1605
  /**
@@ -1634,14 +1625,14 @@ let x = class {
1634
1625
  get holder() {
1635
1626
  if (!this.trouble)
1636
1627
  return;
1637
- const e = this.trouble.data.holderPaths[0], t = R(e);
1628
+ const e = this.trouble.data.holderPaths[0], t = A(e);
1638
1629
  if (!(!this._holdersLoaded && !t.model))
1639
1630
  return t == null ? void 0 : t.model;
1640
1631
  }
1641
1632
  updateHolder() {
1642
1633
  if (!this._holdersLoaded && this.trouble) {
1643
1634
  const e = this.trouble.data.holderPaths[0];
1644
- R(e).model && (this._holdersLoaded = !0);
1635
+ A(e).model && (this._holdersLoaded = !0);
1645
1636
  }
1646
1637
  }
1647
1638
  /**
@@ -1661,7 +1652,7 @@ let x = class {
1661
1652
  var o, a;
1662
1653
  if (!this.holder)
1663
1654
  return !0;
1664
- const t = (((o = this.holder) == null ? void 0 : o.troublesByType[ua]) || []).length > 0;
1655
+ const t = (((o = this.holder) == null ? void 0 : o.troublesByType[da]) || []).length > 0;
1665
1656
  return !!((a = this.agitateBeforePour) != null && a.value) && t;
1666
1657
  }
1667
1658
  /**
@@ -1691,59 +1682,59 @@ let x = class {
1691
1682
  this._deferred = !1;
1692
1683
  }
1693
1684
  };
1694
- na(x, "Registration");
1685
+ ua(q, "Registration");
1695
1686
  Se([
1696
1687
  b({
1697
1688
  path: "app:kosdev.ddk:app",
1698
1689
  attribute: "ncui.agitateBeforePour"
1699
1690
  })
1700
- ], x.prototype, "agitateBeforePour", 2);
1691
+ ], q.prototype, "agitateBeforePour", 2);
1701
1692
  Se([
1702
- At({
1703
- topic: wt(Ve.type),
1704
- lifecycle: Ue.INIT
1693
+ St({
1694
+ topic: At(Ve.type),
1695
+ lifecycle: qe.INIT
1705
1696
  })
1706
- ], x.prototype, "updateHolder", 1);
1707
- x = Se([
1708
- f({ modelTypeId: bt, singleton: !1 }),
1709
- V(),
1710
- ve({ mode: "composition", parentProperty: "trouble" })
1711
- ], x);
1712
- const ca = x.Registration, da = ["iceAgitator"], pa = {
1713
- iceAgitator: ht.factory
1714
- }, ga = $.createLogger({ name: "freestyle-assembly-data-mapper" }), $a = async (e) => {
1715
- const t = Ce.instance().options({}).build(), r = Ee.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
1716
- var S;
1717
- return da.forEach((l) => {
1718
- var M;
1697
+ ], q.prototype, "updateHolder", 1);
1698
+ q = Se([
1699
+ f({ modelTypeId: yt, singleton: !1 }),
1700
+ D(),
1701
+ oe({ mode: "composition", parentProperty: "trouble" })
1702
+ ], q);
1703
+ const pa = q.Registration, ga = ["iceAgitator"], ha = {
1704
+ iceAgitator: ht
1705
+ }, fa = C.createLogger({ name: "freestyle-assembly-data-mapper" }), Ca = async (e) => {
1706
+ const t = Ce.instance().options({}).build(), r = Ee.instance().options({}).build(), o = e.assemblies.reduce((i, u) => {
1707
+ var E;
1708
+ return ga.forEach((l) => {
1709
+ var S;
1719
1710
  const v = u[l];
1720
1711
  if (v) {
1721
- const Pt = pa[l](v.path);
1722
- s[l] = Pt({
1712
+ const bt = ha[l];
1713
+ i[l] = bt.instance(v.path).options({
1723
1714
  name: v.name,
1724
1715
  path: v.path,
1725
- statePath: ((M = v.state) == null ? void 0 : M.path) || ""
1726
- });
1716
+ statePath: ((S = v.state) == null ? void 0 : S.path) || ""
1717
+ }).build();
1727
1718
  }
1728
- }), (S = u.cartridgeAgitators) == null || S.forEach((l) => {
1729
- var M;
1730
- const v = Je.instance(
1719
+ }), (E = u.cartridgeAgitators) == null || E.forEach((l) => {
1720
+ var S;
1721
+ const v = Qe.instance(
1731
1722
  l.path
1732
1723
  ).options({
1733
1724
  name: l.name,
1734
1725
  path: l.path,
1735
- statePath: ((M = l.state) == null ? void 0 : M.path) || ""
1726
+ statePath: ((S = l.state) == null ? void 0 : S.path) || ""
1736
1727
  }).build();
1737
1728
  t.addModel(v);
1738
1729
  }), u.remoteTrays && u.remoteTrays.forEach((l) => {
1739
- ga.info(`Found remote tray ${l.name} with path ${l.path}`);
1740
- const v = `${j.type}-${l.holderPath}`, M = j.instance(v).options({
1730
+ fa.info(`Found remote tray ${l.name} with path ${l.path}`);
1731
+ const v = `${V.type}-${l.holderPath}`, S = V.instance(v).options({
1741
1732
  holderPath: l.holderPath,
1742
1733
  configPath: l.path,
1743
1734
  name: l.name
1744
1735
  }).build();
1745
- r.addModel(M);
1746
- }), s;
1736
+ r.addModel(S);
1737
+ }), i;
1747
1738
  }, {}), a = !!o.iceAgitator, n = !!o.carbTank;
1748
1739
  return {
1749
1740
  ...o,
@@ -1752,19 +1743,19 @@ const ca = x.Registration, da = ["iceAgitator"], pa = {
1752
1743
  supportsCarb: n,
1753
1744
  supportsIce: a
1754
1745
  };
1755
- }, ha = (e) => () => (Mt(e)(), Ft(e)(), Me.register(), ge.register(), ht.register(), Ke.register(), Ce.register(), oa.register(), gr.register(), Wr.register(), ar.register(), Re.register(), Ae.register(), j.register(), Ee.register(), m.companion.register(e)(
1756
- Lt.type,
1746
+ }, ma = (e) => () => (wt(e)(), Dt(e)(), Me.register(), fe.register(), ht.register(), Ke.register(), Ce.register(), sa.register(), pr.register(), Jr.register(), rr.register(), Re.register(), Ae.register(), V.register(), Ee.register(), m.companion.register(e)(
1747
+ Ft.type,
1757
1748
  Me.type
1758
1749
  ), m.companion.register(e)(
1759
1750
  Ve.type,
1760
- ge.type
1761
- ), ca.register(), m.companion.register(e)(
1762
- Rt.type,
1763
- la
1764
- ), m.companion.register(e)(zt.type, Re.type), m.companion.register(e)(
1765
- Nt.type,
1751
+ fe.type
1752
+ ), pa.register(), m.companion.register(e)(
1753
+ Mt.type,
1754
+ ca
1755
+ ), m.companion.register(e)(Nt.type, Re.type), m.companion.register(e)(
1756
+ zt.type,
1766
1757
  Ae.type
1767
- ), ce[de].register(
1758
+ ), pe[ge].register(
1768
1759
  "EnjoyByTrouble",
1769
1760
  async (t) => {
1770
1761
  if (t.data.enjoyByDate) {
@@ -1777,31 +1768,31 @@ const ca = x.Registration, da = ["iceAgitator"], pa = {
1777
1768
  }
1778
1769
  return {};
1779
1770
  }
1780
- ), ce[de].register(
1771
+ ), pe[ge].register(
1781
1772
  "SuperPumpRequiredTrouble",
1782
1773
  // This is the trouble type
1783
1774
  async (t) => {
1784
- const { model: r } = R(
1785
- xt.type
1775
+ const { model: r } = A(
1776
+ Lt.type
1786
1777
  );
1787
1778
  return r ? {
1788
1779
  superPumps: r.models.getIndexByKey(
1789
- Ut.byType,
1780
+ xt.byType,
1790
1781
  "microSuper"
1791
1782
  ).map((n) => n.name).join(", ")
1792
1783
  } : {};
1793
1784
  }
1794
- ), ce[de].register(
1785
+ ), pe[ge].register(
1795
1786
  "MicroPumpAirDetectTrouble",
1796
1787
  async (t) => {
1797
1788
  if (t.ifaces.includes("container"))
1798
1789
  return {};
1799
1790
  if (t.data.pumpPath) {
1800
- const { model: r } = R(
1791
+ const { model: r } = A(
1801
1792
  t.data.pumpPath
1802
1793
  );
1803
1794
  if (r) {
1804
- const o = r.ingredientId ? R(r.ingredientId).model : void 0;
1795
+ const o = r.ingredientId ? A(r.ingredientId).model : void 0;
1805
1796
  return {
1806
1797
  ingredientId: r.ingredientId,
1807
1798
  ingredientName: (o == null ? void 0 : o.name) || ""
@@ -1815,103 +1806,102 @@ const ca = x.Registration, da = ["iceAgitator"], pa = {
1815
1806
  model: m.model.register(e),
1816
1807
  companion: m.companion.register(e),
1817
1808
  legacy: m.model.registerLegacyModel(e)
1818
- }), _ = {
1819
- ...Dt
1809
+ }), T = {
1810
+ ...Rt
1820
1811
  };
1821
- _.freestyle = {
1822
- models: ha(_)
1812
+ T.freestyle = {
1813
+ models: ma(T)
1823
1814
  };
1824
- _.preload = m.model.preloadModel(_);
1825
- _.model = m.model.register(_);
1826
- _.companion = m.companion.register(_);
1827
- _.legacy = m.model.registerLegacyModel(_);
1828
- const Ca = _;
1829
- function fa(e) {
1815
+ T.preload = m.model.preloadModel(T);
1816
+ T.model = m.model.register(T);
1817
+ T.companion = m.companion.register(T);
1818
+ T.legacy = m.model.registerLegacyModel(T);
1819
+ const Oa = T;
1820
+ function ya(e) {
1830
1821
  return B(e);
1831
1822
  }
1832
- const De = H(), Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1823
+ const De = H(), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1833
1824
  __proto__: null,
1834
1825
  api: De,
1835
1826
  default: De,
1836
- kosServiceRequest: fa
1827
+ kosServiceRequest: ya
1837
1828
  }, Symbol.toStringTag, { value: "Module" }));
1838
- function ma(e) {
1829
+ function ba(e) {
1839
1830
  return B(e);
1840
1831
  }
1841
- const Fe = H(), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1832
+ const Fe = H(), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1842
1833
  __proto__: null,
1843
1834
  api: Fe,
1844
1835
  default: Fe,
1845
- kosServiceRequest: ma
1836
+ kosServiceRequest: ba
1846
1837
  }, Symbol.toStringTag, { value: "Module" }));
1847
- function ya(e) {
1838
+ function Pa(e) {
1848
1839
  return B(e);
1849
1840
  }
1850
- const Le = H(), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1841
+ const Ne = H(), Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1851
1842
  __proto__: null,
1852
- api: Le,
1853
- default: Le,
1854
- kosServiceRequest: ya
1843
+ api: Ne,
1844
+ default: Ne,
1845
+ kosServiceRequest: Pa
1855
1846
  }, Symbol.toStringTag, { value: "Module" }));
1856
- function ba(e) {
1847
+ function va(e) {
1857
1848
  return B(e);
1858
1849
  }
1859
- const ze = H(), Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1850
+ const ze = H(), wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1860
1851
  __proto__: null,
1861
1852
  api: ze,
1862
1853
  default: ze,
1863
- kosServiceRequest: ba
1854
+ kosServiceRequest: va
1864
1855
  }, Symbol.toStringTag, { value: "Module" }));
1865
- function Pa(e) {
1856
+ function _a(e) {
1866
1857
  return B(e);
1867
1858
  }
1868
- const Ne = H(), wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1859
+ const Le = H(), Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1869
1860
  __proto__: null,
1870
- api: Ne,
1871
- default: Ne,
1872
- kosServiceRequest: Pa
1861
+ api: Le,
1862
+ default: Le,
1863
+ kosServiceRequest: _a
1873
1864
  }, Symbol.toStringTag, { value: "Module" }));
1874
1865
  export {
1875
- ua as A,
1876
- Xr as B,
1866
+ da as A,
1867
+ aa as B,
1877
1868
  Ke as C,
1878
- ta as D,
1879
- Qr as E,
1880
- gr as F,
1881
- ea as G,
1882
- $a as H,
1883
- re as I,
1884
- mr as J,
1885
- Ca as K,
1886
- Wr as L,
1887
- wr as N,
1869
+ ea as D,
1870
+ ra as E,
1871
+ pr as F,
1872
+ Ca as G,
1873
+ fr as H,
1874
+ ht as I,
1875
+ Oa as K,
1876
+ Jr as L,
1877
+ Ar as N,
1888
1878
  Ee as R,
1889
- oa as S,
1879
+ sa as S,
1890
1880
  Ce as a,
1891
- Q as b,
1892
- Je as c,
1893
- ar as d,
1894
- ge as e,
1881
+ X as b,
1882
+ Qe as c,
1883
+ rr as d,
1884
+ fe as e,
1895
1885
  Ae as f,
1896
1886
  Me as g,
1897
1887
  Re as h,
1898
- ht as i,
1899
- ca as j,
1900
- Ea as k,
1901
- Sa as l,
1902
- Aa as m,
1903
- wa as n,
1904
- j as o,
1905
- sr as p,
1906
- ur as q,
1907
- ha as r,
1908
- Oa as s,
1909
- or as t,
1910
- ir as u,
1911
- nr as v,
1888
+ re as i,
1889
+ pa as j,
1890
+ Sa as k,
1891
+ Aa as l,
1892
+ wa as m,
1893
+ Ma as n,
1894
+ V as o,
1895
+ ir as p,
1896
+ lr as q,
1897
+ ma as r,
1898
+ Ea as s,
1899
+ ar as t,
1900
+ or as u,
1901
+ sr as v,
1912
1902
  we as w,
1913
- Mr as x,
1914
- Lr as y,
1915
- Ia as z
1903
+ wr as x,
1904
+ Fr as y,
1905
+ ta as z
1916
1906
  };
1917
- //# sourceMappingURL=service-B5BitF77.js.map
1907
+ //# sourceMappingURL=service-BuugCicr.js.map