@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5171 → 0.1.0-dev.5179

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 (32) hide show
  1. package/{extension-utils-CIeLBxMW.cjs → extension-utils-CbiToj2v.cjs} +2 -2
  2. package/{extension-utils-CIeLBxMW.cjs.map → extension-utils-CbiToj2v.cjs.map} +1 -1
  3. package/{extension-utils-mrQ_wiPv.js → extension-utils-DP5eulYE.js} +2 -2
  4. package/{extension-utils-mrQ_wiPv.js.map → extension-utils-DP5eulYE.js.map} +1 -1
  5. package/index.cjs +1 -1
  6. package/index.js +3 -3
  7. package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts +195 -5
  8. package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts.map +1 -1
  9. package/models/models/agitation-required-trouble/index.d.ts +4 -2
  10. package/models/models/agitation-required-trouble/index.d.ts.map +1 -1
  11. package/models/models/carb-agitator/carb-agitator-model.d.ts +258 -0
  12. package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
  13. package/models/models/carb-agitator/services/carb-tank-services.d.ts +25 -0
  14. package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -1
  15. package/models/utils/freestyle-registration-manager.d.ts.map +1 -1
  16. package/models.cjs +1 -1
  17. package/models.js +2 -2
  18. package/package.json +4 -4
  19. package/{service-DrOwtgpN.cjs → service-BYZ3LYEa.cjs} +2 -2
  20. package/service-BYZ3LYEa.cjs.map +1 -0
  21. package/{service-Rmefh9Kc.js → service-_jG-Kd3m.js} +539 -413
  22. package/service-_jG-Kd3m.js.map +1 -0
  23. package/ui.cjs +1 -1
  24. package/ui.js +2 -2
  25. package/{use-nutrition-info-Cb4qW_qq.js → use-nutrition-info-B9ybCLwb.js} +2 -2
  26. package/{use-nutrition-info-Cb4qW_qq.js.map → use-nutrition-info-B9ybCLwb.js.map} +1 -1
  27. package/{use-nutrition-info-DOOjBBqm.cjs → use-nutrition-info-C-RDcG4S.cjs} +2 -2
  28. package/{use-nutrition-info-DOOjBBqm.cjs.map → use-nutrition-info-C-RDcG4S.cjs.map} +1 -1
  29. package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts +0 -87
  30. package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts.map +0 -1
  31. package/service-DrOwtgpN.cjs.map +0 -1
  32. package/service-Rmefh9Kc.js.map +0 -1
@@ -1,36 +1,55 @@
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 i = (e, t, r) => (vt(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { resolveServiceUrl as A, ServiceFactory as w, KosLog as $, createPropKey as x, kosStateProp as E, kosConfigProperty as b, kosStateEntry as be, kosStateExit as Tt, kosStateGuard as Pe, kosFuture as I, kosModel as f, kosLoggerAware as re, kosCompanion as xe, kosFutureAware as Ue, kosStateMachine as _t, DependencyLifecycle as je, KosModelContainer as It, kosChild as qe, kosModelEffect as ve, EventBus as Z, KosModelRegistrationFactory as C, SingletonKosModelRegistrationFactory as Te, FetchError as _e, FutureManager as y, FutureEndState as U, FutureHandler as Ge, kosParentAware as Ve, KosFeatureFlags as ue, getKosCompanionModel as $t, getKosModelSync as R, kosContainerAware as Ct, KosContextManager as Ot, kosAction as W, KOS_MODEL_ID as O, kosMultipleFutureAware as Et, kosTopicHandler as St, modelTypeEventTopicFactory as At, RegistrationManager as m, registerCoreModels as wt, Trouble as Mt, ExtensionManager as ce, EXTENSION_TROUBLE_DATA_MAPPER as de, createClient as V, kosServiceRequest as H } from "@kosdev-code/kos-ui-sdk";
5
- import { PourState as d, Assembly as He, KosModelRegistry as Rt, registerDispenseModels as Dt, Nozzle as Lt, Pump as Ft, Holder as zt, PumpContainer as Nt, PumpIndex as xt } from "@kosdev-code/kos-dispense-sdk";
6
- const { URL: Be } = A("ICE_AGITATOR_SERVICE"), { postModel: Ut } = w.build({
7
- basePath: `${Be}/api/ext/freestyle/ice`
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({
7
+ basePath: `${He}/api/ext/freestyle/ice`
8
8
  });
9
9
  $.createLogger({
10
10
  name: "carb-tank-service",
11
11
  group: "Services"
12
12
  });
13
- const jt = async (e, t) => {
14
- const r = await Ut({
13
+ const Gt = async (e, t) => {
14
+ const r = await qt({
15
15
  model: {},
16
16
  tracker: t,
17
- urlOverride: `${Be}/api/handle/${e}/test`
17
+ urlOverride: `${He}/api/handle/${e}/test`
18
18
  });
19
19
  if (!(r != null && r.data))
20
20
  throw new Error("No response from server");
21
21
  return r == null ? void 0 : r.data;
22
22
  };
23
- var Ke = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Gt = (e, t, r) => t in e ? Ke(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 ? qt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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
25
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
26
- return o && a && Ke(t, r, a), a;
27
- }, Vt = (e, t, r) => (Gt(e, t + "", r), r);
28
- const Ht = "carb-agitator-model", Ie = x("statePath");
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");
29
29
  let g = class {
30
+ /**
31
+ * Creates a new carb agitator model instance.
32
+ *
33
+ * @param modelId - Unique identifier for this instance
34
+ * @param options - Configuration options including name
35
+ * @param context - KOS creation context providing assembly paths
36
+ */
30
37
  constructor(e, t, r) {
38
+ /**
39
+ * Unique identifier for this carb agitator instance.
40
+ */
31
41
  i(this, "id");
42
+ /**
43
+ * Display name for this carb agitator.
44
+ */
32
45
  i(this, "name");
46
+ /**
47
+ * Device path for carb tank operations.
48
+ */
33
49
  i(this, "path");
50
+ /**
51
+ * State path for accessing probe and filling status.
52
+ */
34
53
  i(this, "statePath");
35
54
  i(this, "highProbeWet");
36
55
  i(this, "lowProbeWet");
@@ -41,23 +60,62 @@ let g = class {
41
60
  const o = r.kosContext.get("assembly-state-path-carbTank");
42
61
  this.statePath = o;
43
62
  }
63
+ /**
64
+ * Gets the carb holder associated with this agitator.
65
+ *
66
+ * Retrieves the first holder from the "carb" group in the parent assembly.
67
+ *
68
+ * @returns The carb holder model, or undefined if not found
69
+ */
44
70
  get holder() {
45
71
  var t;
46
72
  return (t = this.getCompanionParent()) == null ? void 0 : t.getHoldersByGroup("carb")[0];
47
73
  }
74
+ /**
75
+ * Gets the pump associated with the carb holder.
76
+ *
77
+ * Returns the first pump from the holder's pump collection.
78
+ *
79
+ * @returns The pump model, or undefined if holder or pump not available
80
+ */
48
81
  get pump() {
49
82
  var e;
50
83
  return (e = this.holder) == null ? void 0 : e.pumps.data[0];
51
84
  }
85
+ /**
86
+ * Indicates whether the carb tank is currently being filled.
87
+ *
88
+ * @returns true if the filling state property indicates active filling
89
+ */
52
90
  get isFilling() {
53
91
  return !!this.filling.value;
54
92
  }
93
+ /**
94
+ * Indicates whether the carb tank has been initialized.
95
+ *
96
+ * @returns true if the carb tank enabled configuration is set to true
97
+ */
55
98
  get isCarbInitialized() {
56
99
  return !!this.enabled.value;
57
100
  }
101
+ /**
102
+ * Indicates whether carb tank activation is allowed.
103
+ *
104
+ * Activation is only allowed when the carb tank is not already enabled.
105
+ *
106
+ * @returns true if the carb tank can be activated
107
+ */
58
108
  get canActivate() {
59
109
  return !this.enabled.value;
60
110
  }
111
+ /**
112
+ * Indicates whether the workflow can proceed past carb initialization.
113
+ *
114
+ * The workflow can proceed when the state machine is in either INITIALIZED
115
+ * (carb tank activated) or SKIPPED (user chose to bypass carbonation).
116
+ *
117
+ * @returns true if ready to proceed with beverage operations
118
+ */
61
119
  get canProceed() {
62
120
  return this.isInState(
63
121
  "INITIALIZED"
@@ -82,6 +140,15 @@ let g = class {
82
140
  async activateCarbTank() {
83
141
  this.transition("ACTIVATE"), this.enabled.updateProperty(!0), this.transition("ACTIVATION_COMPLETE");
84
142
  }
143
+ /**
144
+ * Deactivates the carb tank and resets to uninitialized state.
145
+ *
146
+ * This method:
147
+ * 1. Updates the enabled configuration property to false
148
+ * 2. Transitions back to UNINITIALIZED state
149
+ *
150
+ * Can be called from any state.
151
+ */
85
152
  async deactivateCarbTank() {
86
153
  this.enabled.updateProperty(!1), this.transition("RESET");
87
154
  }
@@ -91,31 +158,37 @@ let g = class {
91
158
  reset() {
92
159
  this.enabled.updateProperty(!1), this.transition("RESET");
93
160
  }
161
+ /**
162
+ * Toggles the carb tank between enabled and disabled states.
163
+ *
164
+ * If currently enabled, calls {@link deactivateCarbTank}.
165
+ * If currently disabled, calls {@link activateCarbTank}.
166
+ */
94
167
  toggleCarbTank() {
95
168
  this.enabled.value ? this.deactivateCarbTank() : this.activateCarbTank();
96
169
  }
97
170
  handleTestCarbTank(e) {
98
171
  if (!e)
99
172
  throw new Error("No tracker provided");
100
- return this.logger.info(`testing carb tank: ${this.id}`), jt(this.path, e);
173
+ return this.logger.info(`testing carb tank: ${this.id}`), Gt(this.path, e);
101
174
  }
102
175
  };
103
- Vt(g, "Registration");
176
+ Ht(g, "Registration");
104
177
  P([
105
- E({
106
- path: Ie,
178
+ O({
179
+ path: $e,
107
180
  attribute: "highProbeWet"
108
181
  })
109
182
  ], g.prototype, "highProbeWet", 2);
110
183
  P([
111
- E({
112
- path: Ie,
184
+ O({
185
+ path: $e,
113
186
  attribute: "lowProbeWet"
114
187
  })
115
188
  ], g.prototype, "lowProbeWet", 2);
116
189
  P([
117
- E({
118
- path: Ie,
190
+ O({
191
+ path: $e,
119
192
  attribute: "filling"
120
193
  })
121
194
  ], g.prototype, "filling", 2);
@@ -132,7 +205,7 @@ P([
132
205
  )
133
206
  ], g.prototype, "handleActivationStart", 1);
134
207
  P([
135
- Tt(
208
+ _t(
136
209
  "ACTIVATING"
137
210
  /* ACTIVATING */
138
211
  )
@@ -174,11 +247,11 @@ P([
174
247
  I()
175
248
  ], g.prototype, "handleTestCarbTank", 1);
176
249
  g = P([
177
- f({ modelTypeId: Ht, singleton: !1 }),
178
- re(),
179
- xe({ mode: "composition", lifecycle: je.LOAD }),
180
- Ue(),
181
- _t(
250
+ f({ modelTypeId: Bt, singleton: !1 }),
251
+ V(),
252
+ ve({ mode: "composition", lifecycle: Ue.LOAD }),
253
+ xe(),
254
+ It(
182
255
  {
183
256
  initial: "UNINITIALIZED",
184
257
  states: {
@@ -215,19 +288,19 @@ g = P([
215
288
  }
216
289
  )
217
290
  ], g);
218
- const Ye = g.Registration;
219
- var Bt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, We = (e, t, r, o) => {
220
- for (var a = o > 1 ? void 0 : o ? Kt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
221
294
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
222
- return o && a && Bt(t, r, a), a;
295
+ return o && a && Kt(t, r, a), a;
223
296
  };
224
- const Ze = "cartridge-agitator-container-model";
225
- let k = class {
297
+ const We = "cartridge-agitator-container-model";
298
+ let J = class {
226
299
  constructor(e, t, r) {
227
300
  i(this, "id");
228
301
  i(this, "logger");
229
302
  i(this, "_models");
230
- this.id = e, this.logger = r.logger, this._models = new It({
303
+ this.id = e, this.logger = r.logger, this._models = new $t({
231
304
  parentId: e
232
305
  });
233
306
  }
@@ -258,35 +331,35 @@ let k = class {
258
331
  );
259
332
  }
260
333
  };
261
- We([
334
+ Ye([
262
335
  qe
263
- ], k.prototype, "_models", 2);
264
- k = We([
265
- f(Ze)
266
- ], k);
267
- const { URL: ke } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Yt } = w.build({
268
- basePath: `${ke}/api/ext/freestyle/freestyle/ice`
269
- }), Wt = async (e, t) => {
270
- const r = await Yt({
336
+ ], J.prototype, "_models", 2);
337
+ J = Ye([
338
+ f(We)
339
+ ], J);
340
+ const { URL: Ze } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Wt } = w.build({
341
+ basePath: `${Ze}/api/ext/freestyle/freestyle/ice`
342
+ }), Zt = async (e, t) => {
343
+ const r = await Wt({
271
344
  model: {},
272
345
  tracker: t,
273
- urlOverride: `${ke}/api/handle/${e}/test`
346
+ urlOverride: `${Ze}/api/handle/${e}/test`
274
347
  });
275
348
  if (!(r != null && r.data))
276
349
  throw new Error("No response from server");
277
350
  return r.data;
278
351
  };
279
- var Zt = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, ae = (e, t, r, o) => {
280
- for (var a = o > 1 ? void 0 : o ? kt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
281
354
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
282
- return o && a && Zt(t, r, a), a;
355
+ return o && a && kt(t, r, a), a;
283
356
  };
284
- const Je = "cartridge-agitator-model";
285
- class J {
357
+ const ke = "cartridge-agitator-model";
358
+ class Q {
286
359
  }
287
- i(J, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), i(J, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
288
- const Jt = x("statePath");
289
- let F = class {
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 {
290
363
  constructor(e, t) {
291
364
  i(this, "id");
292
365
  i(this, "agitating");
@@ -301,48 +374,48 @@ let F = class {
301
374
  async testAgitate(e) {
302
375
  if (!e)
303
376
  throw new Error("No tracker provided");
304
- return this.logger.info(`agitating cartridge-agitator ${this.id}`), Wt(this.path, e);
377
+ return this.logger.info(`agitating cartridge-agitator ${this.id}`), Zt(this.path, e);
305
378
  }
306
379
  handleAgitation() {
307
380
  var e;
308
- this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), Z.publish(J.TOPIC_AGITATION_STARTED, {
381
+ this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), k.publish(Q.TOPIC_AGITATION_STARTED, {
309
382
  path: this.path,
310
383
  futureId: (e = this.future) == null ? void 0 : e.futureId
311
- })) : Z.publish(J.TOPIC_AGITATION_ENDED, {
384
+ })) : k.publish(Q.TOPIC_AGITATION_ENDED, {
312
385
  path: this.path
313
386
  });
314
387
  }
315
388
  };
316
389
  ae([
317
- E({ path: Jt, attribute: "agitating" })
318
- ], F.prototype, "agitating", 2);
390
+ O({ path: Qt, attribute: "agitating" })
391
+ ], L.prototype, "agitating", 2);
319
392
  ae([
320
393
  I()
321
- ], F.prototype, "testAgitate", 1);
394
+ ], L.prototype, "testAgitate", 1);
322
395
  ae([
323
- ve({
396
+ Te({
324
397
  dependencies: (e) => [e.isAgitating]
325
398
  })
326
- ], F.prototype, "handleAgitation", 1);
327
- F = ae([
328
- f(Je),
329
- Ue(),
330
- re()
331
- ], F);
332
- const Qe = new C({
333
- class: F,
334
- type: Je
335
- }), $e = new Te({
336
- class: k,
337
- type: Ze
399
+ ], L.prototype, "handleAgitation", 1);
400
+ L = ae([
401
+ f(ke),
402
+ xe(),
403
+ V()
404
+ ], L);
405
+ const Je = new E({
406
+ class: L,
407
+ type: ke
408
+ }), Ce = new _e({
409
+ class: J,
410
+ type: We
338
411
  });
339
- $e.addRelatedModel(Qe);
340
- var Xe = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, Xt = (e, t, r) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oe = (e, t, r, o) => {
341
- for (var a = o > 1 ? void 0 : o ? Qt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
342
415
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
343
- return o && a && Xe(t, r, a), a;
344
- }, er = (e, t, r) => (Xt(e, t + "", r), r);
345
- const tr = "cgp-pump-model", Ce = x("statePath");
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");
346
419
  let D = class {
347
420
  constructor(e, t) {
348
421
  i(this, "highProbeWet");
@@ -357,66 +430,66 @@ let D = class {
357
430
  return this.state.path;
358
431
  }
359
432
  };
360
- er(D, "Registration");
433
+ tr(D, "Registration");
361
434
  oe([
362
- E({
363
- path: Ce,
435
+ O({
436
+ path: Oe,
364
437
  attribute: "highProbeWet"
365
438
  })
366
439
  ], D.prototype, "highProbeWet", 2);
367
440
  oe([
368
- E({
369
- path: Ce,
441
+ O({
442
+ path: Oe,
370
443
  attribute: "lowProbeWet"
371
444
  })
372
445
  ], D.prototype, "lowProbeWet", 2);
373
446
  oe([
374
- E({
375
- path: Ce,
447
+ O({
448
+ path: Oe,
376
449
  attribute: "filling"
377
450
  })
378
451
  ], D.prototype, "filling", 2);
379
452
  D = oe([
380
- f({ modelTypeId: tr, singleton: !1 }),
381
- xe({
453
+ f({ modelTypeId: rr, singleton: !1 }),
454
+ ve({
382
455
  mode: "composition"
383
456
  }),
384
- re()
457
+ V()
385
458
  ], D);
386
- const rr = D.Registration, { URL: j } = A("FCM-PUMP_SERVICE"), { postModel: B } = w.build({
387
- basePath: `${j}/api/fcm-pump`
459
+ const ar = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: K } = w.build({
460
+ basePath: `${G}/api/fcm-pump`
388
461
  }), h = $.createLogger({
389
462
  name: "fcm-pump-service",
390
463
  group: "Services"
391
- }), ar = async (e) => {
464
+ }), or = async (e) => {
392
465
  var t, r, o, a, n;
393
466
  h.debug(
394
467
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
395
468
  );
396
469
  try {
397
- const s = await B({
470
+ const s = await K({
398
471
  model: {},
399
- urlOverride: `${j}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
472
+ urlOverride: `${G}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
400
473
  });
401
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];
402
475
  } catch (s) {
403
476
  if (h.error(
404
477
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
405
478
  s
406
- ), s instanceof _e) {
479
+ ), s instanceof Ie) {
407
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";
408
481
  return [u, ((n = s.payload) == null ? void 0 : n.data) || { error: u }];
409
482
  }
410
483
  }
411
484
  return ["unknownError", { error: "unknownError" }];
412
- }, or = async (e, t) => {
485
+ }, ir = async (e, t) => {
413
486
  h.debug(
414
487
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
415
488
  );
416
489
  try {
417
- const r = await B({
490
+ const r = await K({
418
491
  model: {},
419
- urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
492
+ urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
420
493
  tracker: t
421
494
  });
422
495
  return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -427,20 +500,20 @@ const rr = D.Registration, { URL: j } = A("FCM-PUMP_SERVICE"), { postModel: B }
427
500
  );
428
501
  const o = {
429
502
  id: t || "",
430
- endState: U.Fail,
503
+ endState: q.Fail,
431
504
  tracker: t,
432
505
  reason: "Failed to resolve trouble"
433
506
  };
434
507
  return y.initiateFuture(o), o;
435
508
  }
436
- }, ir = async (e, t) => {
509
+ }, sr = async (e, t) => {
437
510
  h.debug(
438
511
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
439
512
  );
440
513
  try {
441
- const r = await B({
514
+ const r = await K({
442
515
  model: {},
443
- urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
516
+ urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
444
517
  tracker: t
445
518
  });
446
519
  return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -451,20 +524,20 @@ const rr = D.Registration, { URL: j } = A("FCM-PUMP_SERVICE"), { postModel: B }
451
524
  );
452
525
  const o = {
453
526
  id: t || "",
454
- endState: U.Fail,
527
+ endState: q.Fail,
455
528
  tracker: t,
456
529
  reason: "Failed to resolve trouble"
457
530
  };
458
531
  return y.initiateFuture(o), o;
459
532
  }
460
- }, sr = async (e, t, r) => {
533
+ }, nr = async (e, t, r) => {
461
534
  h.debug(
462
535
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
463
536
  );
464
537
  try {
465
- const o = await B({
538
+ const o = await K({
466
539
  model: {},
467
- urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
540
+ urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
468
541
  tracker: r
469
542
  });
470
543
  return h.debug("performVerify - response:", o), o != null && o.data && y.initiateFuture(o.data), o == null ? void 0 : o.data;
@@ -475,22 +548,22 @@ const rr = D.Registration, { URL: j } = A("FCM-PUMP_SERVICE"), { postModel: B }
475
548
  );
476
549
  const a = {
477
550
  id: r || "",
478
- endState: U.Fail,
551
+ endState: q.Fail,
479
552
  tracker: r,
480
553
  reason: "Failed to resolve trouble"
481
554
  };
482
555
  return y.initiateFuture(a), a;
483
556
  }
484
- }, nr = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", lr = async (e, t, r) => {
557
+ }, lr = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", ur = async (e, t, r) => {
485
558
  h.debug(
486
559
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
487
560
  );
488
561
  try {
489
- const o = await B({
562
+ const o = await K({
490
563
  model: {},
491
- urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
564
+ urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
492
565
  });
493
- return h.debug("performPreCalibrate - response:", o), nr(o == null ? void 0 : o.data);
566
+ return h.debug("performPreCalibrate - response:", o), lr(o == null ? void 0 : o.data);
494
567
  } catch (o) {
495
568
  h.error(
496
569
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
@@ -499,12 +572,12 @@ const rr = D.Registration, { URL: j } = A("FCM-PUMP_SERVICE"), { postModel: B }
499
572
  return;
500
573
  }
501
574
  };
502
- var ur = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, ie = (e, t, r, o) => {
503
- for (var a = o > 1 ? void 0 : o ? cr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
504
577
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
505
- return o && a && ur(t, r, a), a;
578
+ return o && a && cr(t, r, a), a;
506
579
  };
507
- const et = "fcm-pump-model", dr = $.createLogger({ name: "fcm-pump-model" });
580
+ const Xe = "fcm-pump-model", pr = $.createLogger({ name: "fcm-pump-model" });
508
581
  let z = class {
509
582
  constructor(e, t, r) {
510
583
  i(this, "id");
@@ -532,23 +605,23 @@ let z = class {
532
605
  return this.pumpModel.performIntent(e);
533
606
  }
534
607
  async performElectricalTest() {
535
- const [e, t] = await ar(this.pumpModel.path);
536
- return e && dr.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
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;
537
610
  }
538
611
  getChildren() {
539
612
  return [...this.futureHandler.allFutures];
540
613
  }
541
614
  async performPreCalibrate(e) {
542
- return or(this.pumpModel.path, e);
615
+ return ir(this.pumpModel.path, e);
543
616
  }
544
617
  async performCalibrate(e) {
545
- return ir(this.pumpModel.path, e);
618
+ return sr(this.pumpModel.path, e);
546
619
  }
547
620
  async performVerify(e, t) {
548
- return sr(this.pumpModel.path, e, t);
621
+ return nr(this.pumpModel.path, e, t);
549
622
  }
550
623
  async performComplete(e, t) {
551
- return lr(this.pumpModel.path, e, t);
624
+ return ur(this.pumpModel.path, e, t);
552
625
  }
553
626
  // -------------------LIFECYCLE----------------------------
554
627
  async init() {
@@ -568,19 +641,19 @@ ie([
568
641
  I()
569
642
  ], z.prototype, "performVerify", 1);
570
643
  z = ie([
571
- f(et)
644
+ f(Xe)
572
645
  ], z);
573
- const pr = new C({
646
+ const gr = new E({
574
647
  class: z,
575
- type: et
648
+ type: Xe
576
649
  });
577
- var gr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, tt = (e, t, r, o) => {
578
- for (var a = o > 1 ? void 0 : o ? hr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
579
652
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
580
- return o && a && gr(t, r, a), a;
653
+ return o && a && hr(t, r, a), a;
581
654
  };
582
- const rt = "freestyle-assembly-model", fr = "iceAgitator", mr = "carbTank", yr = "remoteTrays";
583
- let Q = class {
655
+ const tt = "freestyle-assembly-model", mr = "iceAgitator", yr = "carbTank", br = "remoteTrays";
656
+ let X = class {
584
657
  constructor(e, t, r) {
585
658
  i(this, "id");
586
659
  i(this, "_carbTankModel");
@@ -642,45 +715,45 @@ let Q = class {
642
715
  }
643
716
  // -------------------LIFECYCLE----------------------------
644
717
  get supportsRemoteTrays() {
645
- return ue.isFeatureEnabled(yr);
718
+ return ue.isFeatureEnabled(br);
646
719
  }
647
720
  get supportsIce() {
648
- return ue.isFeatureEnabled(fr);
721
+ return ue.isFeatureEnabled(mr);
649
722
  }
650
723
  get supportsCarb() {
651
- return ue.isFeatureEnabled(mr);
724
+ return ue.isFeatureEnabled(yr);
652
725
  }
653
726
  async init() {
654
727
  this.logger.debug(`initializing freestyle-assembly ${this.id}`);
655
728
  }
656
729
  async ready() {
657
- const e = $t(
730
+ const e = Ct(
658
731
  this.assembly,
659
- Ye.type
732
+ Ke.type
660
733
  );
661
734
  this._carbTankModel = e;
662
735
  }
663
736
  };
664
- tt([
737
+ et([
665
738
  qe
666
- ], Q.prototype, "_remoteTrays", 2);
667
- Q = tt([
668
- Ve(),
669
- f(rt)
670
- ], Q);
671
- const ge = new Te({
672
- class: Q,
673
- type: rt
739
+ ], X.prototype, "_remoteTrays", 2);
740
+ X = et([
741
+ je(),
742
+ f(tt)
743
+ ], X);
744
+ const ge = new _e({
745
+ class: X,
746
+ type: tt
674
747
  });
675
- var br = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, at = (e, t, r, o) => {
676
- for (var a = o > 1 ? void 0 : o ? Pr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
677
750
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
678
- return o && a && br(t, r, a), a;
751
+ return o && a && Pr(t, r, a), a;
679
752
  };
680
- const ot = "remote-tray-model";
681
- x("holderPath");
682
- const vr = x("configPath");
683
- let X = class {
753
+ const at = "remote-tray-model";
754
+ U("holderPath");
755
+ const Tr = U("configPath");
756
+ let ee = class {
684
757
  constructor(e, t, r) {
685
758
  /** Unique identifier for the remote tray instance */
686
759
  i(this, "id");
@@ -770,49 +843,49 @@ let X = class {
770
843
  this.logger.debug(`loading remote-tray ${this.id}`);
771
844
  }
772
845
  };
773
- at([
846
+ rt([
774
847
  b({
775
- path: vr,
848
+ path: Tr,
776
849
  attribute: "enabled"
777
850
  })
778
- ], X.prototype, "remoteTrayEnabled", 2);
779
- X = at([
780
- f(ot)
781
- ], X);
782
- const q = new C({
783
- class: X,
784
- type: ot
851
+ ], ee.prototype, "remoteTrayEnabled", 2);
852
+ ee = rt([
853
+ f(at)
854
+ ], ee);
855
+ const j = new E({
856
+ class: ee,
857
+ type: at
785
858
  });
786
- var Tr = Object.getOwnPropertyDescriptor, _r = (e, t, r, o) => {
787
- for (var a = o > 1 ? void 0 : o ? Tr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
788
861
  (s = e[n]) && (a = s(a) || a);
789
862
  return a;
790
863
  };
791
- const it = "remote-tray-container-model";
864
+ const ot = "remote-tray-container-model";
792
865
  let he = class {
793
866
  constructor(e) {
794
867
  i(this, "id");
795
868
  this.id = e;
796
869
  }
797
870
  };
798
- he = _r([
799
- f(it),
800
- re(),
801
- Ct()
871
+ he = Ir([
872
+ f(ot),
873
+ V(),
874
+ Ot()
802
875
  ], he);
803
- const Oe = new Te({
876
+ const Ee = new _e({
804
877
  class: he,
805
- type: it
878
+ type: ot
806
879
  });
807
- Oe.addRelatedModel(q);
808
- var Ir = Object.getOwnPropertyDescriptor, $r = (e, t, r, o) => {
809
- for (var a = o > 1 ? void 0 : o ? Ir(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
810
883
  (s = e[n]) && (a = s(a) || a);
811
884
  return a;
812
885
  };
813
- const st = "freestyle-holder-model";
814
- function Cr(e) {
815
- const t = Ot.getContext(e), r = t == null ? void 0 : t.get(
886
+ const it = "freestyle-holder-model";
887
+ function Or(e) {
888
+ const t = Et.getContext(e), r = t == null ? void 0 : t.get(
816
889
  ge.type
817
890
  );
818
891
  if (!r) {
@@ -821,7 +894,7 @@ function Cr(e) {
821
894
  }
822
895
  return r;
823
896
  }
824
- async function Or(e, t) {
897
+ async function Er(e, t) {
825
898
  if (!e || !t)
826
899
  return;
827
900
  const r = await e[t]();
@@ -844,20 +917,20 @@ let fe = class {
844
917
  if (!this.holder.data.agitated)
845
918
  return;
846
919
  this.future = void 0;
847
- const e = Cr(this.id);
920
+ const e = Or(this.id);
848
921
  if (!e)
849
922
  return;
850
923
  if (!e.defaultCartridgeAgitator) {
851
924
  this.logger.error("Agitator not found");
852
925
  return;
853
926
  }
854
- return this.future = await Or(
927
+ return this.future = await Er(
855
928
  e.defaultCartridgeAgitator,
856
929
  "testAgitate"
857
930
  ), this.future;
858
931
  }
859
932
  get isRemote() {
860
- const e = `${q.type}-${this.holder.path}`, t = R(e);
933
+ const e = `${j.type}-${this.holder.path}`, t = R(e);
861
934
  return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
862
935
  }
863
936
  // -------------------LIFECYCLE----------------------------
@@ -868,19 +941,19 @@ let fe = class {
868
941
  this.logger.debug(`loading freestyle-holder ${this.id}`);
869
942
  }
870
943
  };
871
- fe = $r([
872
- f(st)
944
+ fe = Cr([
945
+ f(it)
873
946
  ], fe);
874
- const Ae = new C({
947
+ const Ae = new E({
875
948
  class: fe,
876
- type: st
877
- }), { URL: Er } = A("FREESTYLE-NOZZLE_SERVICE"), { getOne: Sr } = w.build({
878
- basePath: `${Er}/api/freestyle-nozzle`
879
- }), Y = $.createLogger({
949
+ type: it
950
+ }), { URL: Sr } = A("FREESTYLE-NOZZLE_SERVICE"), { getOne: Ar } = w.build({
951
+ basePath: `${Sr}/api/freestyle-nozzle`
952
+ }), W = $.createLogger({
880
953
  name: "freestyle-nozzle-service",
881
954
  group: "Services"
882
955
  });
883
- class Ar extends Error {
956
+ class wr extends Error {
884
957
  constructor(t) {
885
958
  super(t), this.name = "NutritionInfoError";
886
959
  }
@@ -890,29 +963,29 @@ class we extends Error {
890
963
  super(t), this.name = "InvalidRequestError";
891
964
  }
892
965
  }
893
- const wr = async (e, t, r, o = "http://localhost:8081") => {
894
- if (Y.debug("sending GET for freestyle-nozzle"), !t)
895
- throw Y.error("Invalid freestyle-nozzle request: beverageId is required"), new we("No beverageId provided");
966
+ const Mr = async (e, t, r, o = "http://localhost:8081") => {
967
+ if (W.debug("sending GET for freestyle-nozzle"), !t)
968
+ throw W.error("Invalid freestyle-nozzle request: beverageId is required"), new we("No beverageId provided");
896
969
  if (!r || r.length === 0)
897
- throw Y.error("Invalid freestyle-nozzle request: volumes are required"), new we("No volumes provided");
898
- const a = await Sr({
970
+ throw W.error("Invalid freestyle-nozzle request: volumes are required"), new we("No volumes provided");
971
+ const a = await Ar({
899
972
  urlOverride: `${o}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
900
973
  ","
901
974
  )}`
902
975
  });
903
976
  if (!(a != null && a.data))
904
- throw Y.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
977
+ throw W.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
905
978
  if (a.data.error)
906
- throw new Ar(a.data.error);
979
+ throw new wr(a.data.error);
907
980
  return a.data;
908
981
  };
909
- var Mr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, nt = (e, t, r, o) => {
910
- for (var a = o > 1 ? void 0 : o ? Rr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
911
984
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
912
- return o && a && Mr(t, r, a), a;
985
+ return o && a && Rr(t, r, a), a;
913
986
  };
914
- const lt = "freestyle-nozzle-model";
915
- let ee = class {
987
+ const nt = "freestyle-nozzle-model";
988
+ let te = class {
916
989
  constructor(e, t, r) {
917
990
  i(this, "id");
918
991
  i(this, "logger");
@@ -937,12 +1010,12 @@ let ee = class {
937
1010
  );
938
1011
  const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
939
1012
  try {
940
- const r = await wr(
1013
+ const r = await Mr(
941
1014
  t,
942
1015
  e,
943
1016
  this._cupSizes
944
1017
  );
945
- W(() => {
1018
+ Z(() => {
946
1019
  this._nutritionInfo = r;
947
1020
  });
948
1021
  } catch (r) {
@@ -961,22 +1034,22 @@ let ee = class {
961
1034
  this.logger.debug(`loading freestyle-nozzle ${this.id}`);
962
1035
  }
963
1036
  };
964
- nt([
965
- ve({
1037
+ st([
1038
+ Te({
966
1039
  dependencies: (e) => [
967
1040
  e.selectedPourable.beverage
968
1041
  ]
969
1042
  })
970
- ], ee.prototype, "handleBeverageSelection", 1);
971
- ee = nt([
972
- Ve(),
973
- f(lt)
974
- ], ee);
975
- const Me = new C({
976
- class: ee,
977
- type: lt
978
- }), { URL: ut } = A("PUMP_SERVICE"), { postModel: Dr } = w.build({
979
- basePath: `${ut}/api/ext/freestyle/microCalibration`
1043
+ ], te.prototype, "handleBeverageSelection", 1);
1044
+ te = st([
1045
+ je(),
1046
+ f(nt)
1047
+ ], te);
1048
+ const Me = new E({
1049
+ class: te,
1050
+ type: nt
1051
+ }), { URL: lt } = A("PUMP_SERVICE"), { postModel: Fr } = w.build({
1052
+ basePath: `${lt}/api/ext/freestyle/microCalibration`
980
1053
  }), pe = $.createLogger({
981
1054
  name: "freestyle-pump-service",
982
1055
  group: "Services"
@@ -986,28 +1059,28 @@ const Me = new C({
986
1059
  `replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
987
1060
  );
988
1061
  try {
989
- const u = await Dr({
1062
+ const u = await Fr({
990
1063
  model: {},
991
- urlOverride: `${ut}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
1064
+ urlOverride: `${lt}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
992
1065
  });
993
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];
994
1067
  } catch (u) {
995
1068
  if (pe.error(
996
1069
  `replacePump - sending POST request to /api/cal/${e}/code/${t}`,
997
1070
  u
998
- ), u instanceof _e) {
1071
+ ), u instanceof Ie) {
999
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";
1000
1073
  return [S, ((s = u.payload) == null ? void 0 : s.data) || { error: S }];
1001
1074
  }
1002
1075
  }
1003
1076
  return ["unknownError", { error: "unknownError" }];
1004
1077
  };
1005
- var Fr = Object.getOwnPropertyDescriptor, zr = (e, t, r, o) => {
1006
- for (var a = o > 1 ? void 0 : o ? Fr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
1007
1080
  (s = e[n]) && (a = s(a) || a);
1008
1081
  return a;
1009
1082
  };
1010
- const ct = "freestyle-pump-model";
1083
+ const ut = "freestyle-pump-model";
1011
1084
  let me = class {
1012
1085
  constructor(e, t, r) {
1013
1086
  i(this, "id");
@@ -1021,61 +1094,61 @@ let me = class {
1021
1094
  return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
1022
1095
  }
1023
1096
  };
1024
- me = zr([
1025
- f(ct)
1097
+ me = Nr([
1098
+ f(ut)
1026
1099
  ], me);
1027
- const Re = new C({
1100
+ const Re = new E({
1028
1101
  class: me,
1029
- type: ct
1030
- }), { URL: L } = A("ICE_AGITATOR_SERVICE"), { getAll: dt, postModel: se } = w.build({
1031
- basePath: `${L}/api/ext/freestyle/ice`
1032
- }), pt = $.createLogger({
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({
1033
1106
  name: "ice-agitator-service",
1034
1107
  group: "Services"
1035
- }), Nr = async (e) => (pt.debug("sending GET for ice types"), await dt({
1036
- urlOverride: `${L}/api/handle/${e}/types`
1037
- })), xr = async (e, t) => (pt.debug("sending POST for ice types"), await se({
1038
- urlOverride: `${L}/api/handle/${e}/type/${t}`,
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}`,
1039
1112
  model: {}
1040
- })), Ur = async (e) => await dt({
1041
- urlOverride: `${L}/api/kos/config/details/${e}/4`
1042
- }), jr = async (e, t) => {
1113
+ })), qr = async (e) => await ct({
1114
+ urlOverride: `${F}/api/kos/config/details/${e}/4`
1115
+ }), Gr = async (e, t) => {
1043
1116
  const r = await se({
1044
1117
  model: {},
1045
1118
  tracker: t,
1046
- urlOverride: `${L}/api/handle/${e}/pour`
1119
+ urlOverride: `${F}/api/handle/${e}/pour`
1047
1120
  });
1048
1121
  if (!(r != null && r.data))
1049
1122
  throw new Error("No response from server");
1050
1123
  return r == null ? void 0 : r.data;
1051
- }, qr = async (e, t) => {
1124
+ }, jr = async (e, t) => {
1052
1125
  const r = await se({
1053
1126
  model: {},
1054
1127
  tracker: t,
1055
- urlOverride: `${L}/api/handle/${e}/test/agitation`
1128
+ urlOverride: `${F}/api/handle/${e}/test/agitation`
1056
1129
  });
1057
1130
  if (!(r != null && r.data))
1058
1131
  throw new Error("No response from server");
1059
1132
  return r == null ? void 0 : r.data;
1060
- }, Gr = async (e, t) => {
1133
+ }, Vr = async (e, t) => {
1061
1134
  const r = await se({
1062
1135
  model: {},
1063
1136
  tracker: t,
1064
- urlOverride: `${L}/api/handle/${e}/test/gate`
1137
+ urlOverride: `${F}/api/handle/${e}/test/gate`
1065
1138
  });
1066
1139
  if (!(r != null && r.data))
1067
1140
  throw new Error("No response from server");
1068
1141
  return r == null ? void 0 : r.data;
1069
1142
  };
1070
- var Vr = Object.defineProperty, Hr = Object.getOwnPropertyDescriptor, p = (e, t, r, o) => {
1071
- for (var a = o > 1 ? void 0 : o ? Hr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
1072
1145
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1073
- return o && a && Vr(t, r, a), a;
1146
+ return o && a && Hr(t, r, a), a;
1074
1147
  };
1075
- class te {
1148
+ class re {
1076
1149
  }
1077
- i(te, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), i(te, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
1078
- const gt = "ice-agitator-model", ht = x("statePath");
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");
1079
1152
  let c = class {
1080
1153
  constructor(e, t, r) {
1081
1154
  i(this, "id");
@@ -1097,7 +1170,7 @@ let c = class {
1097
1170
  i(this, "_allIceTypes");
1098
1171
  i(this, "logger");
1099
1172
  i(this, "currentState", d.IDLE);
1100
- i(this, "resetDefaultValues", async () => await Ur(this.path));
1173
+ i(this, "resetDefaultValues", async () => await qr(this.path));
1101
1174
  this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
1102
1175
  }
1103
1176
  get iceTypes() {
@@ -1128,7 +1201,7 @@ let c = class {
1128
1201
  return this.currentState === d.IDLE;
1129
1202
  }
1130
1203
  updateIfCurrent(e, t) {
1131
- this.currentState === e && W(() => {
1204
+ this.currentState === e && Z(() => {
1132
1205
  this.currentState = t;
1133
1206
  });
1134
1207
  }
@@ -1137,7 +1210,7 @@ let c = class {
1137
1210
  if (this.currentState === d.IDLE) {
1138
1211
  if (this.updateIfCurrent(d.IDLE, d.POUR_STARTING), !e)
1139
1212
  throw new Error("No tracker provided");
1140
- const t = await jr(this.path, e);
1213
+ const t = await Gr(this.path, e);
1141
1214
  return this.updateIfCurrent(d.POUR_STARTING, d.POURING), t != null && t.endState && this.updateIfCurrent(d.POURING, d.IDLE), t;
1142
1215
  } else
1143
1216
  throw new Error(`Cannot pour in state ${this.currentState}`);
@@ -1150,7 +1223,7 @@ let c = class {
1150
1223
  * */
1151
1224
  async cancelIceDispense() {
1152
1225
  var e;
1153
- this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), W(() => {
1226
+ this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), Z(() => {
1154
1227
  this.currentState = d.IDLE;
1155
1228
  })) : this.logger.warn(
1156
1229
  `Cannot cancel ice dispense in state ${this.currentState}`
@@ -1159,45 +1232,45 @@ let c = class {
1159
1232
  async testAgitate(e) {
1160
1233
  if (!e)
1161
1234
  throw new Error("No tracker provided");
1162
- return this.logger.info(`agitating ice-agitator ${this.id}`), qr(this.path, e);
1235
+ return this.logger.info(`agitating ice-agitator ${this.id}`), jr(this.path, e);
1163
1236
  }
1164
1237
  async testGate(e) {
1165
1238
  if (!e)
1166
1239
  throw new Error("No tracker provided");
1167
- return this.logger.info(`testing ice gate: ${this.id}`), Gr(this.path, e);
1240
+ return this.logger.info(`testing ice gate: ${this.id}`), Vr(this.path, e);
1168
1241
  }
1169
1242
  handleAgitationChange() {
1170
1243
  var e;
1171
- this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), Z.publish(te.TOPIC_AGITATION_STARTED, {
1244
+ this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), k.publish(re.TOPIC_AGITATION_STARTED, {
1172
1245
  path: this.path,
1173
1246
  futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
1174
- })) : Z.publish(te.TOPIC_AGITATION_ENDED, {
1247
+ })) : k.publish(re.TOPIC_AGITATION_ENDED, {
1175
1248
  path: this.path
1176
1249
  });
1177
1250
  }
1178
1251
  async updateIceType(e) {
1179
- await xr(this.path, e);
1252
+ await Ur(this.path, e);
1180
1253
  }
1181
1254
  async init() {
1182
1255
  this.logger.debug(`initializing ice-agitator ${this.id}`);
1183
1256
  }
1184
1257
  async load() {
1185
1258
  this.logger.debug(`loading ice-agitator ${this.id}`);
1186
- const e = await Nr(this.path);
1187
- (e == null ? void 0 : e.status) === 200 && W(() => {
1259
+ const e = await xr(this.path);
1260
+ (e == null ? void 0 : e.status) === 200 && Z(() => {
1188
1261
  this._allIceTypes = e.data || [];
1189
1262
  });
1190
1263
  }
1191
1264
  };
1192
1265
  p([
1193
1266
  b({
1194
- path: O,
1267
+ path: C,
1195
1268
  attribute: "settings.volWithoutIceMl"
1196
1269
  })
1197
1270
  ], c.prototype, "volWithoutIceMl", 2);
1198
1271
  p([
1199
1272
  b({
1200
- path: O,
1273
+ path: C,
1201
1274
  attribute: "settings.durationSec",
1202
1275
  converter: {
1203
1276
  to: "second"
@@ -1206,49 +1279,49 @@ p([
1206
1279
  ], c.prototype, "durationSec", 2);
1207
1280
  p([
1208
1281
  b({
1209
- path: O,
1282
+ path: C,
1210
1283
  attribute: "enableIceChuteClear"
1211
1284
  })
1212
1285
  ], c.prototype, "enableIceChuteClear", 2);
1213
1286
  p([
1214
1287
  b({
1215
- path: O,
1288
+ path: C,
1216
1289
  attribute: "iceChuteClearDurationMs"
1217
1290
  })
1218
1291
  ], c.prototype, "iceChuteClearDurationMs", 2);
1219
1292
  p([
1220
1293
  b({
1221
- path: O,
1294
+ path: C,
1222
1295
  attribute: "iceChuteClearIntervalSec"
1223
1296
  })
1224
1297
  ], c.prototype, "iceChuteClearIntervalSec", 2);
1225
1298
  p([
1226
1299
  b({
1227
- path: O,
1300
+ path: C,
1228
1301
  attribute: "iceChuteClearRetryIntervalSec"
1229
1302
  })
1230
1303
  ], c.prototype, "iceChuteClearRetryIntervalSec", 2);
1231
1304
  p([
1232
1305
  b({
1233
- path: O,
1306
+ path: C,
1234
1307
  attribute: "maxDispenseSec"
1235
1308
  })
1236
1309
  ], c.prototype, "maxDispenseSec", 2);
1237
1310
  p([
1238
1311
  b({
1239
- path: O,
1312
+ path: C,
1240
1313
  attribute: "type"
1241
1314
  })
1242
1315
  ], c.prototype, "type", 2);
1243
1316
  p([
1244
1317
  b({
1245
- path: O,
1318
+ path: C,
1246
1319
  attribute: "settings.dilutionOffset"
1247
1320
  })
1248
1321
  ], c.prototype, "dilutionOffset", 2);
1249
1322
  p([
1250
1323
  b({
1251
- path: O,
1324
+ path: C,
1252
1325
  attribute: "settings.inactivitySec",
1253
1326
  converter: {
1254
1327
  to: "minute"
@@ -1256,10 +1329,10 @@ p([
1256
1329
  })
1257
1330
  ], c.prototype, "inactivitySec", 2);
1258
1331
  p([
1259
- E({ path: ht, attribute: "agitating" })
1332
+ O({ path: gt, attribute: "agitating" })
1260
1333
  ], c.prototype, "agitating", 2);
1261
1334
  p([
1262
- E({ path: ht, attribute: "iceChuteOpen" })
1335
+ O({ path: gt, attribute: "iceChuteOpen" })
1263
1336
  ], c.prototype, "iceChuteOpen", 2);
1264
1337
  p([
1265
1338
  I({ alias: "pour" })
@@ -1273,24 +1346,24 @@ p([
1273
1346
  })
1274
1347
  ], c.prototype, "testGate", 1);
1275
1348
  p([
1276
- ve({
1349
+ Te({
1277
1350
  dependencies: (e) => [e.isAgitating]
1278
1351
  })
1279
1352
  ], c.prototype, "handleAgitationChange", 1);
1280
1353
  c = p([
1281
- f(gt),
1282
- Et()
1354
+ f(pt),
1355
+ St()
1283
1356
  ], c);
1284
- const ft = new C({
1357
+ const ht = new E({
1285
1358
  class: c,
1286
- type: gt
1359
+ type: pt
1287
1360
  });
1288
- var Br = Object.getOwnPropertyDescriptor, Kr = (e, t, r, o) => {
1289
- for (var a = o > 1 ? void 0 : o ? Br(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
1290
1363
  (s = e[n]) && (a = s(a) || a);
1291
1364
  return a;
1292
1365
  };
1293
- const mt = "lfcv-pump-model";
1366
+ const ft = "lfcv-pump-model";
1294
1367
  let ye = class {
1295
1368
  constructor(e, t, r) {
1296
1369
  i(this, "id");
@@ -1321,30 +1394,30 @@ let ye = class {
1321
1394
  this.logger.debug(`loading lfcv-pump ${this.id}`);
1322
1395
  }
1323
1396
  };
1324
- ye = Kr([
1325
- f(mt)
1397
+ ye = Yr([
1398
+ f(ft)
1326
1399
  ], ye);
1327
- const Yr = new C({
1400
+ const Wr = new E({
1328
1401
  class: ye,
1329
- type: mt
1330
- }), { URL: Wr } = A("LFCV-PUMP_SERVICE"), { getAll: Zr } = w.build({
1331
- basePath: `${Wr}/api/lfcv-pump`
1332
- }), kr = $.createLogger({
1402
+ type: ft
1403
+ }), { URL: Zr } = A("LFCV-PUMP_SERVICE"), { getAll: kr } = w.build({
1404
+ basePath: `${Zr}/api/lfcv-pump`
1405
+ }), Jr = $.createLogger({
1333
1406
  name: "lfcv-pump-service",
1334
1407
  group: "Services"
1335
- }), Ta = async () => (kr.debug("sending GET for lfcv-pump"), await Zr({})), { URL: K } = A("SPM-PUMP_SERVICE"), { postModel: ne } = w.build({
1336
- basePath: `${K}/api/spm-pump`
1408
+ }), Ia = async () => (Jr.debug("sending GET for lfcv-pump"), await kr({})), { URL: Y } = A("SPM-PUMP_SERVICE"), { postModel: ne } = w.build({
1409
+ basePath: `${Y}/api/spm-pump`
1337
1410
  }), T = $.createLogger({
1338
1411
  name: "spm-pump-service",
1339
1412
  group: "Services"
1340
- }), Jr = async (e, t) => {
1413
+ }), Qr = async (e, t) => {
1341
1414
  T.debug(
1342
1415
  `performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
1343
1416
  );
1344
1417
  try {
1345
1418
  const r = await ne({
1346
1419
  model: {},
1347
- urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
1420
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
1348
1421
  tracker: t
1349
1422
  });
1350
1423
  return T.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -1355,20 +1428,20 @@ const Yr = new C({
1355
1428
  );
1356
1429
  const o = {
1357
1430
  id: t || "",
1358
- endState: U.Fail,
1431
+ endState: q.Fail,
1359
1432
  tracker: t,
1360
1433
  reason: "Failed to resolve trouble"
1361
1434
  };
1362
1435
  return y.initiateFuture(o), o;
1363
1436
  }
1364
- }, Qr = async (e, t) => {
1437
+ }, Xr = async (e, t) => {
1365
1438
  T.debug(
1366
1439
  `performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
1367
1440
  );
1368
1441
  try {
1369
1442
  const r = await ne({
1370
1443
  model: {},
1371
- urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
1444
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
1372
1445
  tracker: t
1373
1446
  });
1374
1447
  return T.debug("performCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -1379,13 +1452,13 @@ const Yr = new C({
1379
1452
  );
1380
1453
  const o = {
1381
1454
  id: t || "",
1382
- endState: U.Fail,
1455
+ endState: q.Fail,
1383
1456
  tracker: t,
1384
1457
  reason: "Failed to resolve trouble"
1385
1458
  };
1386
1459
  return y.initiateFuture(o), o;
1387
1460
  }
1388
- }, Xr = async (e, t, r, o) => {
1461
+ }, ea = async (e, t, r, o) => {
1389
1462
  T.debug(
1390
1463
  `performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
1391
1464
  );
@@ -1399,7 +1472,7 @@ const Yr = new C({
1399
1472
  // newCalibrationValue: 0,
1400
1473
  // pouredCalibrationVolume: 0,
1401
1474
  },
1402
- urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
1475
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
1403
1476
  tracker: o
1404
1477
  });
1405
1478
  return T.debug("performVerify - response:", a), a != null && a.data && y.initiateFuture(a.data), a == null ? void 0 : a.data;
@@ -1410,13 +1483,13 @@ const Yr = new C({
1410
1483
  );
1411
1484
  const n = {
1412
1485
  id: o || "",
1413
- endState: U.Fail,
1486
+ endState: q.Fail,
1414
1487
  tracker: o,
1415
1488
  reason: "Failed to resolve trouble"
1416
1489
  };
1417
1490
  return y.initiateFuture(n), n;
1418
1491
  }
1419
- }, ea = async (e, t, r, o) => {
1492
+ }, ta = async (e, t, r, o) => {
1420
1493
  var a, n, s, u, S;
1421
1494
  T.debug(
1422
1495
  `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
@@ -1431,26 +1504,26 @@ const Yr = new C({
1431
1504
  // newCalibrationValue: 0,
1432
1505
  // pouredCalibrationVolume: 0,
1433
1506
  },
1434
- urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/complete`
1507
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/complete`
1435
1508
  });
1436
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];
1437
1510
  } catch (l) {
1438
1511
  if (T.error(
1439
1512
  `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
1440
1513
  l
1441
- ), l instanceof _e) {
1514
+ ), l instanceof Ie) {
1442
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";
1443
1516
  return [v, ((S = l.payload) == null ? void 0 : S.data) || { error: v }];
1444
1517
  }
1445
1518
  }
1446
1519
  return ["unknownError", { error: "unknownError" }];
1447
1520
  };
1448
- var ta = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, le = (e, t, r, o) => {
1449
- for (var a = o > 1 ? void 0 : o ? ra(t, r) : t, n = e.length - 1, s; n >= 0; n--)
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--)
1450
1523
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1451
- return o && a && ta(t, r, a), a;
1524
+ return o && a && ra(t, r, a), a;
1452
1525
  };
1453
- const yt = "spm-pump-model";
1526
+ const mt = "spm-pump-model";
1454
1527
  let N = class {
1455
1528
  constructor(e, t, r) {
1456
1529
  i(this, "id");
@@ -1478,16 +1551,16 @@ let N = class {
1478
1551
  return this.futureHandler.future;
1479
1552
  }
1480
1553
  async performPreCalibrate(e) {
1481
- return Jr(this.pump.path, e);
1554
+ return Qr(this.pump.path, e);
1482
1555
  }
1483
1556
  async performCalibrate(e) {
1484
- return Qr(this.pump.path, e);
1557
+ return Xr(this.pump.path, e);
1485
1558
  }
1486
1559
  async performVerify(e, t, r) {
1487
- return Xr(this.pump.path, e, t, r);
1560
+ return ea(this.pump.path, e, t, r);
1488
1561
  }
1489
1562
  async performComplete(e, t, r) {
1490
- return ea(this.pump.path, e, t, r);
1563
+ return ta(this.pump.path, e, t, r);
1491
1564
  }
1492
1565
  // -------------------LIFECYCLE----------------------------
1493
1566
  async init() {
@@ -1507,34 +1580,57 @@ le([
1507
1580
  I()
1508
1581
  ], N.prototype, "performVerify", 1);
1509
1582
  N = le([
1510
- f(yt)
1583
+ f(mt)
1511
1584
  ], N);
1512
- const aa = new C({
1585
+ const oa = new E({
1513
1586
  class: N,
1514
- type: yt
1587
+ type: mt
1515
1588
  });
1516
- var oa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, Ee = (e, t, r, o) => {
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) => {
1517
1590
  for (var a = o > 1 ? void 0 : o ? ia(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1518
1591
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1519
- return o && a && oa(t, r, a), a;
1520
- };
1521
- const Se = "agitation-required-trouble-model", sa = (e) => {
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) => {
1522
1595
  if (e.data.agitationRequired)
1523
- return Se;
1524
- }, na = "InsufficientAgitationTrouble";
1525
- let G = class {
1526
- constructor(e, t, r) {
1596
+ return bt;
1597
+ }, ua = "InsufficientAgitationTrouble";
1598
+ let x = class {
1599
+ /**
1600
+ * Creates a new AgitationRequiredTrouble model instance.
1601
+ *
1602
+ * @param modelId - Unique identifier for this model instance (typically matches parent trouble ID)
1603
+ */
1604
+ constructor(e) {
1605
+ /**
1606
+ * Unique identifier for this model instance.
1607
+ */
1527
1608
  i(this, "id");
1528
- i(this, "logger");
1529
- i(this, "trouble");
1530
1609
  i(this, "_deferred");
1531
1610
  i(this, "_holdersLoaded", !1);
1532
1611
  i(this, "agitateBeforePour");
1533
- this.id = e, this.logger = r.logger, this._deferred = !1, this.trouble = t.companionParent;
1612
+ this.id = e, this._deferred = !1;
1534
1613
  }
1614
+ /**
1615
+ * Resolves the agitation trouble by delegating to the parent trouble model.
1616
+ *
1617
+ * Resolution typically involves completing the agitation process and clearing
1618
+ * the trouble state once carbonation or mixing levels are acceptable.
1619
+ *
1620
+ * @returns Promise resolving to the future response from the parent trouble's resolution
1621
+ */
1535
1622
  async resolve() {
1536
1623
  return this.trouble.resolve();
1537
1624
  }
1625
+ /**
1626
+ * Gets the holder model associated with this agitation trouble.
1627
+ *
1628
+ * The holder is the physical container (cartridge holder, ingredient holder, etc.)
1629
+ * that requires agitation. Returns undefined if the holder model hasn't been
1630
+ * loaded yet through the Assembly model initialization.
1631
+ *
1632
+ * @returns The holder model or undefined if not yet loaded
1633
+ */
1538
1634
  get holder() {
1539
1635
  const e = this.trouble.data.holderPaths[0], t = R(e);
1540
1636
  if (!(!this._holdersLoaded && !t.model))
@@ -1546,52 +1642,82 @@ let G = class {
1546
1642
  R(e).model && (this._holdersLoaded = !0);
1547
1643
  }
1548
1644
  }
1645
+ /**
1646
+ * Determines if trouble resolution should be deferred until agitation completes.
1647
+ *
1648
+ * Trouble resolution is deferred when:
1649
+ * 1. The holder has active insufficient agitation troubles
1650
+ * 2. The `agitateBeforePour` configuration is enabled
1651
+ *
1652
+ * This ensures that operations requiring agitation (prime, purge, or other
1653
+ * holder-related troubles) wait for proper carbonation or mixing before
1654
+ * being marked as resolved.
1655
+ *
1656
+ * @returns true if trouble resolution should wait for agitation to complete
1657
+ */
1549
1658
  get shouldDefer() {
1550
1659
  var o, a;
1551
1660
  if (!this.holder)
1552
1661
  return !0;
1553
- const t = (((o = this.holder) == null ? void 0 : o.troublesByType[na]) || []).length > 0;
1662
+ const t = (((o = this.holder) == null ? void 0 : o.troublesByType[ua]) || []).length > 0;
1554
1663
  return !!((a = this.agitateBeforePour) != null && a.value) && t;
1555
1664
  }
1665
+ /**
1666
+ * Gets the current deferral state of this trouble.
1667
+ *
1668
+ * @returns true if this trouble resolution is currently deferred
1669
+ */
1556
1670
  get deferred() {
1557
1671
  return this._deferred;
1558
1672
  }
1673
+ /**
1674
+ * Marks this trouble as deferred, preventing immediate resolution.
1675
+ *
1676
+ * Called by the trouble system to indicate that trouble resolution
1677
+ * should wait for agitation to complete before being marked as resolved.
1678
+ */
1559
1679
  defer() {
1560
1680
  this._deferred = !0;
1561
1681
  }
1682
+ /**
1683
+ * Clears the deferral state, allowing trouble resolution to proceed.
1684
+ *
1685
+ * Typically called after agitation has completed and the trouble can
1686
+ * now be safely resolved.
1687
+ */
1562
1688
  clearDefer() {
1563
1689
  this._deferred = !1;
1564
1690
  }
1565
1691
  };
1566
- Ee([
1692
+ na(x, "Registration");
1693
+ Se([
1567
1694
  b({
1568
1695
  path: "app:kosdev.ddk:app",
1569
1696
  attribute: "ncui.agitateBeforePour"
1570
1697
  })
1571
- ], G.prototype, "agitateBeforePour", 2);
1572
- Ee([
1573
- St({
1574
- topic: At(He.type),
1575
- lifecycle: je.INIT
1698
+ ], x.prototype, "agitateBeforePour", 2);
1699
+ Se([
1700
+ At({
1701
+ topic: wt(Ve.type),
1702
+ lifecycle: Ue.INIT
1576
1703
  })
1577
- ], G.prototype, "updateHolder", 1);
1578
- G = Ee([
1579
- f(Se)
1580
- ], G);
1581
- const la = new C({
1582
- class: G,
1583
- type: Se
1584
- }), ua = ["iceAgitator"], ca = {
1585
- iceAgitator: ft.factory
1586
- }, da = $.createLogger({ name: "freestyle-assembly-data-mapper" }), _a = async (e) => {
1587
- const t = $e.instance().options({}).build(), r = Oe.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
1704
+ ], x.prototype, "updateHolder", 1);
1705
+ x = Se([
1706
+ f({ modelTypeId: bt, singleton: !1 }),
1707
+ V(),
1708
+ ve({ mode: "composition", parentProperty: "trouble" })
1709
+ ], x);
1710
+ const ca = x.Registration, da = ["iceAgitator"], pa = {
1711
+ iceAgitator: ht.factory
1712
+ }, ga = $.createLogger({ name: "freestyle-assembly-data-mapper" }), $a = async (e) => {
1713
+ const t = Ce.instance().options({}).build(), r = Ee.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
1588
1714
  var S;
1589
- return ua.forEach((l) => {
1715
+ return da.forEach((l) => {
1590
1716
  var M;
1591
1717
  const v = u[l];
1592
1718
  if (v) {
1593
- const bt = ca[l](v.path);
1594
- s[l] = bt({
1719
+ const Pt = pa[l](v.path);
1720
+ s[l] = Pt({
1595
1721
  name: v.name,
1596
1722
  path: v.path,
1597
1723
  statePath: ((M = v.state) == null ? void 0 : M.path) || ""
@@ -1599,7 +1725,7 @@ const la = new C({
1599
1725
  }
1600
1726
  }), (S = u.cartridgeAgitators) == null || S.forEach((l) => {
1601
1727
  var M;
1602
- const v = Qe.instance(
1728
+ const v = Je.instance(
1603
1729
  l.path
1604
1730
  ).options({
1605
1731
  name: l.name,
@@ -1608,8 +1734,8 @@ const la = new C({
1608
1734
  }).build();
1609
1735
  t.addModel(v);
1610
1736
  }), u.remoteTrays && u.remoteTrays.forEach((l) => {
1611
- da.info(`Found remote tray ${l.name} with path ${l.path}`);
1612
- const v = `${q.type}-${l.holderPath}`, M = q.instance(v).options({
1737
+ ga.info(`Found remote tray ${l.name} with path ${l.path}`);
1738
+ const v = `${j.type}-${l.holderPath}`, M = j.instance(v).options({
1613
1739
  holderPath: l.holderPath,
1614
1740
  configPath: l.path,
1615
1741
  name: l.name
@@ -1624,17 +1750,17 @@ const la = new C({
1624
1750
  supportsCarb: n,
1625
1751
  supportsIce: a
1626
1752
  };
1627
- }, pa = (e) => () => (wt(e)(), Dt(e)(), Me.register(), ge.register(), ft.register(), Ye.register(), $e.register(), aa.register(), pr.register(), Yr.register(), rr.register(), Re.register(), Ae.register(), q.register(), Oe.register(), m.companion.register(e)(
1753
+ }, 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)(
1628
1754
  Lt.type,
1629
1755
  Me.type
1630
1756
  ), m.companion.register(e)(
1631
- He.type,
1757
+ Ve.type,
1632
1758
  ge.type
1633
- ), la.register(), m.companion.register(e)(
1634
- Mt.type,
1635
- sa
1636
- ), m.companion.register(e)(Ft.type, Re.type), m.companion.register(e)(
1637
- zt.type,
1759
+ ), ca.register(), m.companion.register(e)(
1760
+ Rt.type,
1761
+ la
1762
+ ), m.companion.register(e)(zt.type, Re.type), m.companion.register(e)(
1763
+ Nt.type,
1638
1764
  Ae.type
1639
1765
  ), ce[de].register(
1640
1766
  "EnjoyByTrouble",
@@ -1654,11 +1780,11 @@ const la = new C({
1654
1780
  // This is the trouble type
1655
1781
  async (t) => {
1656
1782
  const { model: r } = R(
1657
- Nt.type
1783
+ xt.type
1658
1784
  );
1659
1785
  return r ? {
1660
1786
  superPumps: r.models.getIndexByKey(
1661
- xt.byType,
1787
+ Ut.byType,
1662
1788
  "microSuper"
1663
1789
  ).map((n) => n.name).join(", ")
1664
1790
  } : {};
@@ -1688,102 +1814,102 @@ const la = new C({
1688
1814
  companion: m.companion.register(e),
1689
1815
  legacy: m.model.registerLegacyModel(e)
1690
1816
  }), _ = {
1691
- ...Rt
1817
+ ...Dt
1692
1818
  };
1693
1819
  _.freestyle = {
1694
- models: pa(_)
1820
+ models: ha(_)
1695
1821
  };
1696
1822
  _.preload = m.model.preloadModel(_);
1697
1823
  _.model = m.model.register(_);
1698
1824
  _.companion = m.companion.register(_);
1699
1825
  _.legacy = m.model.registerLegacyModel(_);
1700
- const Ia = _;
1701
- function ga(e) {
1702
- return H(e);
1826
+ const Ca = _;
1827
+ function fa(e) {
1828
+ return B(e);
1703
1829
  }
1704
- const De = V(), $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1830
+ const De = H(), Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1705
1831
  __proto__: null,
1706
1832
  api: De,
1707
1833
  default: De,
1708
- kosServiceRequest: ga
1834
+ kosServiceRequest: fa
1709
1835
  }, Symbol.toStringTag, { value: "Module" }));
1710
- function ha(e) {
1711
- return H(e);
1836
+ function ma(e) {
1837
+ return B(e);
1712
1838
  }
1713
- const Le = V(), Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1839
+ const Fe = H(), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1714
1840
  __proto__: null,
1715
- api: Le,
1716
- default: Le,
1717
- kosServiceRequest: ha
1841
+ api: Fe,
1842
+ default: Fe,
1843
+ kosServiceRequest: ma
1718
1844
  }, Symbol.toStringTag, { value: "Module" }));
1719
- function fa(e) {
1720
- return H(e);
1845
+ function ya(e) {
1846
+ return B(e);
1721
1847
  }
1722
- const Fe = V(), Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1848
+ const Le = H(), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1723
1849
  __proto__: null,
1724
- api: Fe,
1725
- default: Fe,
1726
- kosServiceRequest: fa
1850
+ api: Le,
1851
+ default: Le,
1852
+ kosServiceRequest: ya
1727
1853
  }, Symbol.toStringTag, { value: "Module" }));
1728
- function ma(e) {
1729
- return H(e);
1854
+ function ba(e) {
1855
+ return B(e);
1730
1856
  }
1731
- const ze = V(), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1857
+ const ze = H(), Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1732
1858
  __proto__: null,
1733
1859
  api: ze,
1734
1860
  default: ze,
1735
- kosServiceRequest: ma
1861
+ kosServiceRequest: ba
1736
1862
  }, Symbol.toStringTag, { value: "Module" }));
1737
- function ya(e) {
1738
- return H(e);
1863
+ function Pa(e) {
1864
+ return B(e);
1739
1865
  }
1740
- const Ne = V(), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1866
+ const Ne = H(), wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1741
1867
  __proto__: null,
1742
1868
  api: Ne,
1743
1869
  default: Ne,
1744
- kosServiceRequest: ya
1870
+ kosServiceRequest: Pa
1745
1871
  }, Symbol.toStringTag, { value: "Module" }));
1746
1872
  export {
1747
- na as A,
1748
- Qr as B,
1749
- Ye as C,
1750
- ea as D,
1751
- Jr as E,
1752
- pr as F,
1753
- Xr as G,
1754
- _a as H,
1755
- te as I,
1756
- fr as J,
1757
- Ia as K,
1758
- Yr as L,
1759
- Ar as N,
1760
- Oe as R,
1761
- aa as S,
1762
- $e as a,
1763
- J as b,
1764
- Qe as c,
1765
- rr as d,
1873
+ ua as A,
1874
+ Xr as B,
1875
+ Ke as C,
1876
+ ta as D,
1877
+ Qr as E,
1878
+ gr as F,
1879
+ ea as G,
1880
+ $a as H,
1881
+ re as I,
1882
+ mr as J,
1883
+ Ca as K,
1884
+ Wr as L,
1885
+ wr as N,
1886
+ Ee as R,
1887
+ oa as S,
1888
+ Ce as a,
1889
+ Q as b,
1890
+ Je as c,
1891
+ ar as d,
1766
1892
  ge as e,
1767
1893
  Ae as f,
1768
1894
  Me as g,
1769
1895
  Re as h,
1770
- ft as i,
1771
- la as j,
1772
- Ca as k,
1773
- Oa as l,
1774
- Ea as m,
1775
- Sa as n,
1776
- q as o,
1777
- ir as p,
1778
- lr as q,
1779
- pa as r,
1780
- $a as s,
1781
- ar as t,
1782
- or as u,
1783
- sr as v,
1896
+ ht as i,
1897
+ ca as j,
1898
+ Ea as k,
1899
+ Sa as l,
1900
+ Aa as m,
1901
+ wa as n,
1902
+ j as o,
1903
+ sr as p,
1904
+ ur as q,
1905
+ ha as r,
1906
+ Oa as s,
1907
+ or as t,
1908
+ ir as u,
1909
+ nr as v,
1784
1910
  we as w,
1785
- wr as x,
1911
+ Mr as x,
1786
1912
  Lr as y,
1787
- Ta as z
1913
+ Ia as z
1788
1914
  };
1789
- //# sourceMappingURL=service-Rmefh9Kc.js.map
1915
+ //# sourceMappingURL=service-_jG-Kd3m.js.map