@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5077 → 0.1.0-dev.5092

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 (37) hide show
  1. package/{extension-utils-BE0Y1Zlv.js → extension-utils-m2DUoUsn.js} +2 -2
  2. package/{extension-utils-BE0Y1Zlv.js.map → extension-utils-m2DUoUsn.js.map} +1 -1
  3. package/{extension-utils-BVDLwtKr.cjs → extension-utils-z9pjqLGA.cjs} +2 -2
  4. package/{extension-utils-BVDLwtKr.cjs.map → extension-utils-z9pjqLGA.cjs.map} +1 -1
  5. package/{freestyle-registration-manager-z0aYdMcC.js → freestyle-registration-manager-CymJYnwk.js} +585 -394
  6. package/freestyle-registration-manager-CymJYnwk.js.map +1 -0
  7. package/freestyle-registration-manager-Dt77hR6f.cjs +2 -0
  8. package/freestyle-registration-manager-Dt77hR6f.cjs.map +1 -0
  9. package/index.cjs +1 -1
  10. package/index.js +3 -3
  11. package/models/models/carb-agitator/carb-agitator-model.d.ts +38 -6
  12. package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
  13. package/models/models/carb-agitator/index.d.ts +1 -1
  14. package/models/models/carb-agitator/index.d.ts.map +1 -1
  15. package/models/models/carb-agitator/services/carb-tank-services.d.ts +4 -0
  16. package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -0
  17. package/models/models/carb-agitator/types/index.d.ts +1 -8
  18. package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts +4 -2
  19. package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts.map +1 -1
  20. package/models/models/types/assembly.d.ts +7 -3
  21. package/models/models/types/assembly.d.ts.map +1 -1
  22. package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +1 -5
  23. package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -1
  24. package/models.cjs +1 -1
  25. package/models.js +2 -2
  26. package/package.json +4 -4
  27. package/ui.cjs +1 -1
  28. package/ui.js +2 -2
  29. package/{use-nutrition-info-CjXNGbCN.js → use-nutrition-info-BFA7IT1r.js} +2 -2
  30. package/{use-nutrition-info-CjXNGbCN.js.map → use-nutrition-info-BFA7IT1r.js.map} +1 -1
  31. package/{use-nutrition-info-DjIGT-mE.cjs → use-nutrition-info-BfMITXJ8.cjs} +2 -2
  32. package/{use-nutrition-info-DjIGT-mE.cjs.map → use-nutrition-info-BfMITXJ8.cjs.map} +1 -1
  33. package/freestyle-registration-manager-CDbljuRk.cjs +0 -2
  34. package/freestyle-registration-manager-CDbljuRk.cjs.map +0 -1
  35. package/freestyle-registration-manager-z0aYdMcC.js.map +0 -1
  36. package/models/models/carb-agitator/carb-agitator-registration.d.ts +0 -84
  37. package/models/models/carb-agitator/carb-agitator-registration.d.ts.map +0 -1
@@ -1,49 +1,233 @@
1
- var Le = Object.defineProperty;
2
- var Fe = (e, t, r) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var o = (e, t, r) => (Fe(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { kosModel as f, KosModelRegistrationFactory as b, KosModelContainer as Ge, kosChild as de, resolveServiceUrl as F, ServiceFactory as G, createPropKey as j, kosStateProp as J, kosFuture as U, kosModelEffect as k, kosFutureAware as je, kosLoggerAware as ce, EventBus as M, SingletonKosModelRegistrationFactory as ee, kosParentAware as ge, KosFeatureFlags as H, kosConfigProperty as p, getKosModelSync as v, kosContainerAware as Ue, KosContextManager as Be, KosLog as $, FutureManager as xe, kosAction as w, FetchError as He, KOS_MODEL_ID as m, kosMultipleFutureAware as Ke, kosTopicHandler as Ye, DependencyLifecycle as qe, modelTypeEventTopicFactory as Ve, RegistrationManager as h, registerCoreModels as We, Trouble as Ze, ExtensionManager as K, EXTENSION_TROUBLE_DATA_MAPPER as Y } from "@kosdev-code/kos-ui-sdk";
5
- import { PourState as c, Assembly as ue, KosModelRegistry as Qe, registerDispenseModels as Xe, Nozzle as Je, Pump as ke, Holder as et, PumpContainer as tt, PumpIndex as rt } from "@kosdev-code/kos-dispense-sdk";
6
- var at = Object.getOwnPropertyDescriptor, ot = (e, t, r, s) => {
7
- for (var a = s > 1 ? void 0 : s ? at(t, r) : t, i = e.length - 1, n; i >= 0; i--)
8
- (n = e[i]) && (a = n(a) || a);
9
- return a;
1
+ var ke = Object.defineProperty;
2
+ var xe = (e, t, r) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var o = (e, t, r) => (xe(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { resolveServiceUrl as M, ServiceFactory as D, KosLog as C, createPropKey as R, kosStateProp as O, kosConfigProperty as y, kosStateEntry as ee, kosStateExit as He, kosStateGuard as te, kosFuture as N, kosModel as b, kosLoggerAware as re, kosCompanion as Ve, kosFutureAware as pe, kosStateMachine as Ye, DependencyLifecycle as ye, KosModelContainer as qe, kosChild as fe, kosModelEffect as ae, EventBus as F, KosModelRegistrationFactory as _, SingletonKosModelRegistrationFactory as oe, kosParentAware as me, KosFeatureFlags as V, getKosCompanionModel as Ze, getKosModelSync as v, kosContainerAware as We, KosContextManager as Qe, FutureManager as Xe, kosAction as L, FetchError as Je, KOS_MODEL_ID as I, kosMultipleFutureAware as et, kosTopicHandler as tt, modelTypeEventTopicFactory as rt, RegistrationManager as p, registerCoreModels as at, Trouble as ot, ExtensionManager as Y, EXTENSION_TROUBLE_DATA_MAPPER as q } from "@kosdev-code/kos-ui-sdk";
5
+ import { PourState as c, Assembly as be, KosModelRegistry as it, registerDispenseModels as st, Nozzle as nt, Pump as lt, Holder as dt, PumpContainer as ct, PumpIndex as ut } from "@kosdev-code/kos-dispense-sdk";
6
+ const { URL: Ie } = M("ICE_AGITATOR_SERVICE"), { postModel: gt } = D.build({
7
+ basePath: `${Ie}/api/ext/freestyle/ice`
8
+ });
9
+ C.createLogger({
10
+ name: "carb-tank-service",
11
+ group: "Services"
12
+ });
13
+ const ht = async (e, t) => {
14
+ const r = await gt({
15
+ model: {},
16
+ tracker: t,
17
+ urlOverride: `${Ie}/api/handle/${e}/test`
18
+ });
19
+ if (!(r != null && r.data))
20
+ throw new Error("No response from server");
21
+ return r == null ? void 0 : r.data;
10
22
  };
11
- const he = "carb-agitator-model";
12
- let V = class {
23
+ var Pe = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, yt = (e, t, r) => t in e ? Pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, f = (e, t, r, i) => {
24
+ for (var a = i > 1 ? void 0 : i ? pt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
25
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
26
+ return i && a && Pe(t, r, a), a;
27
+ }, ft = (e, t, r) => (yt(e, t + "", r), r);
28
+ const mt = "carb-agitator-model", ie = R("statePath");
29
+ let g = class {
13
30
  constructor(e, t, r) {
14
31
  o(this, "id");
15
32
  o(this, "name");
16
33
  o(this, "path");
17
- o(this, "logger");
18
- this.id = e, this.name = t.name, this.path = t.path, this.logger = r.logger;
34
+ o(this, "statePath");
35
+ o(this, "highProbeWet");
36
+ o(this, "lowProbeWet");
37
+ o(this, "filling");
38
+ o(this, "enabled");
39
+ var a;
40
+ this.id = e, this.name = t.name, this.path = ((a = r.kosContext.get("assembly-feature-carbTank")) == null ? void 0 : a.path) || "";
41
+ const i = r.kosContext.get("assembly-state-path-carbTank");
42
+ this.statePath = i;
19
43
  }
20
- // -------------------LIFECYCLE----------------------------
21
- async init() {
22
- this.logger.debug(`initializing carb-agitator ${this.id}`);
44
+ get holder() {
45
+ var t;
46
+ return (t = this.getCompanionParent()) == null ? void 0 : t.getHoldersByGroup("carb")[0];
23
47
  }
24
- async load() {
25
- this.logger.debug(`loading carb-agitator ${this.id}`);
48
+ get pump() {
49
+ var e;
50
+ return (e = this.holder) == null ? void 0 : e.pumps.data[0];
51
+ }
52
+ get isFilling() {
53
+ return !!this.filling.value;
54
+ }
55
+ get isCarbInitialized() {
56
+ return !!this.enabled.value;
57
+ }
58
+ get canActivate() {
59
+ return !this.enabled.value;
60
+ }
61
+ get canProceed() {
62
+ return this.isInState(
63
+ "INITIALIZED"
64
+ /* INITIALIZED */
65
+ ) || this.isInState(
66
+ "SKIPPED"
67
+ /* SKIPPED */
68
+ );
69
+ }
70
+ handleActivationStart() {
71
+ this.logger.info("Carb tank activation started");
72
+ }
73
+ handleActivationComplete() {
74
+ this.logger.info("Carb tank initialized");
75
+ }
76
+ handleInitialized() {
77
+ this.logger.info("Carb tank ready to proceed");
78
+ }
79
+ handleSkipped() {
80
+ this.logger.info("Proceeding without carbinator");
81
+ }
82
+ async activateCarbTank() {
83
+ this.transition("ACTIVATE"), this.enabled.updateProperty(!0), this.transition("ACTIVATION_COMPLETE");
84
+ }
85
+ async deactivateCarbTank() {
86
+ this.enabled.updateProperty(!1), this.transition("RESET");
87
+ }
88
+ skip() {
89
+ this.transition("SKIP");
90
+ }
91
+ reset() {
92
+ this.enabled.updateProperty(!1), this.transition("RESET");
93
+ }
94
+ toggleCarbTank() {
95
+ this.enabled.value ? this.deactivateCarbTank() : this.activateCarbTank();
96
+ }
97
+ handleTestCarbTank(e) {
98
+ if (!e)
99
+ throw new Error("No tracker provided");
100
+ return this.logger.info(`testing carb tank: ${this.id}`), ht(this.path, e);
26
101
  }
27
102
  };
28
- V = ot([
29
- f(he)
30
- ], V);
31
- const pe = new b({
32
- class: V,
33
- type: he
34
- });
35
- var st = Object.defineProperty, it = Object.getOwnPropertyDescriptor, ye = (e, t, r, s) => {
36
- for (var a = s > 1 ? void 0 : s ? it(t, r) : t, i = e.length - 1, n; i >= 0; i--)
37
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
38
- return s && a && st(t, r, a), a;
103
+ ft(g, "Registration");
104
+ f([
105
+ O({
106
+ path: ie,
107
+ attribute: "highProbeWet"
108
+ })
109
+ ], g.prototype, "highProbeWet", 2);
110
+ f([
111
+ O({
112
+ path: ie,
113
+ attribute: "lowProbeWet"
114
+ })
115
+ ], g.prototype, "lowProbeWet", 2);
116
+ f([
117
+ O({
118
+ path: ie,
119
+ attribute: "filling"
120
+ })
121
+ ], g.prototype, "filling", 2);
122
+ f([
123
+ y({
124
+ path: "assembly:core:board:macksm:carbTank:carbTank",
125
+ attribute: "enabled"
126
+ })
127
+ ], g.prototype, "enabled", 2);
128
+ f([
129
+ ee(
130
+ "ACTIVATING"
131
+ /* ACTIVATING */
132
+ )
133
+ ], g.prototype, "handleActivationStart", 1);
134
+ f([
135
+ He(
136
+ "ACTIVATING"
137
+ /* ACTIVATING */
138
+ )
139
+ ], g.prototype, "handleActivationComplete", 1);
140
+ f([
141
+ ee(
142
+ "INITIALIZED"
143
+ /* INITIALIZED */
144
+ )
145
+ ], g.prototype, "handleInitialized", 1);
146
+ f([
147
+ ee(
148
+ "SKIPPED"
149
+ /* SKIPPED */
150
+ )
151
+ ], g.prototype, "handleSkipped", 1);
152
+ f([
153
+ te({ allowedStates: [
154
+ "UNINITIALIZED"
155
+ /* UNINITIALIZED */
156
+ ] })
157
+ ], g.prototype, "activateCarbTank", 1);
158
+ f([
159
+ te({ allowedStates: [
160
+ "UNINITIALIZED"
161
+ /* UNINITIALIZED */
162
+ ] })
163
+ ], g.prototype, "skip", 1);
164
+ f([
165
+ te({
166
+ allowedStates: [
167
+ "INITIALIZED",
168
+ "SKIPPED"
169
+ /* SKIPPED */
170
+ ]
171
+ })
172
+ ], g.prototype, "reset", 1);
173
+ f([
174
+ N()
175
+ ], g.prototype, "handleTestCarbTank", 1);
176
+ g = f([
177
+ b({ modelTypeId: mt, singleton: !1 }),
178
+ re(),
179
+ Ve({ mode: "composition", lifecycle: ye.LOAD }),
180
+ pe(),
181
+ Ye(
182
+ {
183
+ initial: "UNINITIALIZED",
184
+ states: {
185
+ UNINITIALIZED: {
186
+ on: {
187
+ ACTIVATE: "ACTIVATING",
188
+ SKIP: "SKIPPED"
189
+ /* SKIPPED */
190
+ }
191
+ },
192
+ ACTIVATING: {
193
+ on: {
194
+ ACTIVATION_COMPLETE: "INITIALIZED"
195
+ /* INITIALIZED */
196
+ }
197
+ },
198
+ INITIALIZED: {
199
+ on: {
200
+ RESET: "UNINITIALIZED"
201
+ /* UNINITIALIZED */
202
+ }
203
+ },
204
+ SKIPPED: {
205
+ on: {
206
+ RESET: "UNINITIALIZED"
207
+ /* UNINITIALIZED */
208
+ }
209
+ }
210
+ }
211
+ },
212
+ {
213
+ throwOnInvalid: !1
214
+ // Graceful handling for button clicks
215
+ }
216
+ )
217
+ ], g);
218
+ const Te = g.Registration;
219
+ var bt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, ve = (e, t, r, i) => {
220
+ for (var a = i > 1 ? void 0 : i ? It(t, r) : t, s = e.length - 1, n; s >= 0; s--)
221
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
222
+ return i && a && bt(t, r, a), a;
39
223
  };
40
- const fe = "cartridge-agitator-container-model";
41
- let S = class {
224
+ const _e = "cartridge-agitator-container-model";
225
+ let G = class {
42
226
  constructor(e, t, r) {
43
227
  o(this, "id");
44
228
  o(this, "logger");
45
229
  o(this, "_models");
46
- this.id = e, this.logger = r.logger, this._models = new Ge({
230
+ this.id = e, this.logger = r.logger, this._models = new qe({
47
231
  parentId: e
48
232
  });
49
233
  }
@@ -74,35 +258,35 @@ let S = class {
74
258
  );
75
259
  }
76
260
  };
77
- ye([
78
- de
79
- ], S.prototype, "_models", 2);
80
- S = ye([
81
- f(fe)
82
- ], S);
83
- const { URL: me } = F("CARTRIDGE_AGITATOR_SERVICE"), { postModel: nt } = G.build({
84
- basePath: `${me}/api/ext/freestyle/freestyle/ice`
85
- }), lt = async (e, t) => {
86
- const r = await nt({
261
+ ve([
262
+ fe
263
+ ], G.prototype, "_models", 2);
264
+ G = ve([
265
+ b(_e)
266
+ ], G);
267
+ const { URL: Ee } = M("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Pt } = D.build({
268
+ basePath: `${Ee}/api/ext/freestyle/freestyle/ice`
269
+ }), Tt = async (e, t) => {
270
+ const r = await Pt({
87
271
  model: {},
88
272
  tracker: t,
89
- urlOverride: `${me}/api/handle/${e}/test`
273
+ urlOverride: `${Ee}/api/handle/${e}/test`
90
274
  });
91
275
  if (!(r != null && r.data))
92
276
  throw new Error("No response from server");
93
277
  return r.data;
94
278
  };
95
- var dt = Object.defineProperty, ct = Object.getOwnPropertyDescriptor, B = (e, t, r, s) => {
96
- for (var a = s > 1 ? void 0 : s ? ct(t, r) : t, i = e.length - 1, n; i >= 0; i--)
97
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
98
- return s && a && dt(t, r, a), a;
279
+ var vt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, x = (e, t, r, i) => {
280
+ for (var a = i > 1 ? void 0 : i ? _t(t, r) : t, s = e.length - 1, n; s >= 0; s--)
281
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
282
+ return i && a && vt(t, r, a), a;
99
283
  };
100
- const Pe = "cartridge-agitator-model";
101
- class R {
284
+ const Ae = "cartridge-agitator-model";
285
+ class U {
102
286
  }
103
- o(R, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), o(R, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
104
- const gt = j("statePath");
105
- let T = class {
287
+ o(U, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), o(U, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
288
+ const Et = R("statePath");
289
+ let A = class {
106
290
  constructor(e, t) {
107
291
  o(this, "id");
108
292
  o(this, "agitating");
@@ -117,51 +301,52 @@ let T = class {
117
301
  async testAgitate(e) {
118
302
  if (!e)
119
303
  throw new Error("No tracker provided");
120
- return this.logger.info(`agitating cartridge-agitator ${this.id}`), lt(this.path, e);
304
+ return this.logger.info(`agitating cartridge-agitator ${this.id}`), Tt(this.path, e);
121
305
  }
122
306
  handleAgitation() {
123
307
  var e;
124
- this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), M.publish(R.TOPIC_AGITATION_STARTED, {
308
+ this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), F.publish(U.TOPIC_AGITATION_STARTED, {
125
309
  path: this.path,
126
310
  futureId: (e = this.future) == null ? void 0 : e.futureId
127
- })) : M.publish(R.TOPIC_AGITATION_ENDED, {
311
+ })) : F.publish(U.TOPIC_AGITATION_ENDED, {
128
312
  path: this.path
129
313
  });
130
314
  }
131
315
  };
132
- B([
133
- J({ path: gt, attribute: "agitating" })
134
- ], T.prototype, "agitating", 2);
135
- B([
136
- U()
137
- ], T.prototype, "testAgitate", 1);
138
- B([
139
- k({
316
+ x([
317
+ O({ path: Et, attribute: "agitating" })
318
+ ], A.prototype, "agitating", 2);
319
+ x([
320
+ N()
321
+ ], A.prototype, "testAgitate", 1);
322
+ x([
323
+ ae({
140
324
  dependencies: (e) => [e.isAgitating]
141
325
  })
142
- ], T.prototype, "handleAgitation", 1);
143
- T = B([
144
- f(Pe),
145
- je(),
146
- ce()
147
- ], T);
148
- const be = new b({
149
- class: T,
150
- type: Pe
151
- }), te = new ee({
152
- class: S,
153
- type: fe
326
+ ], A.prototype, "handleAgitation", 1);
327
+ A = x([
328
+ b(Ae),
329
+ pe(),
330
+ re()
331
+ ], A);
332
+ const Ce = new _({
333
+ class: A,
334
+ type: Ae
335
+ }), se = new oe({
336
+ class: G,
337
+ type: _e
154
338
  });
155
- te.addRelatedModel(be);
156
- var ut = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, _e = (e, t, r, s) => {
157
- for (var a = s > 1 ? void 0 : s ? ht(t, r) : t, i = e.length - 1, n; i >= 0; i--)
158
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
159
- return s && a && ut(t, r, a), a;
339
+ se.addRelatedModel(Ce);
340
+ var At = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, Oe = (e, t, r, i) => {
341
+ for (var a = i > 1 ? void 0 : i ? Ct(t, r) : t, s = e.length - 1, n; s >= 0; s--)
342
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
343
+ return i && a && At(t, r, a), a;
160
344
  };
161
- const ve = "freestyle-assembly-model", pt = "iceAgitator", yt = "carbAgitator", ft = "remoteTrays";
162
- let D = class {
345
+ const $e = "freestyle-assembly-model", Ot = "iceAgitator", $t = "carbTank", wt = "remoteTrays";
346
+ let j = class {
163
347
  constructor(e, t, r) {
164
348
  o(this, "id");
349
+ o(this, "_carbTankModel");
165
350
  o(this, "logger");
166
351
  o(this, "assembly");
167
352
  o(this, "_remoteTrays");
@@ -197,8 +382,8 @@ let D = class {
197
382
  get iceAgitator() {
198
383
  return this.assembly.iceAgitator;
199
384
  }
200
- get carbAgitator() {
201
- return this.assembly.carbAgitator;
385
+ get carbTank() {
386
+ return this._carbTankModel;
202
387
  }
203
388
  get cartridgeAgitators() {
204
389
  return this.assembly.cartridgeAgitators;
@@ -220,38 +405,45 @@ let D = class {
220
405
  }
221
406
  // -------------------LIFECYCLE----------------------------
222
407
  get supportsRemoteTrays() {
223
- return H.isFeatureEnabled(ft);
408
+ return V.isFeatureEnabled(wt);
224
409
  }
225
410
  get supportsIce() {
226
- return H.isFeatureEnabled(pt);
411
+ return V.isFeatureEnabled(Ot);
227
412
  }
228
413
  get supportsCarb() {
229
- return H.isFeatureEnabled(yt);
414
+ return V.isFeatureEnabled($t);
230
415
  }
231
416
  async init() {
232
417
  this.logger.debug(`initializing freestyle-assembly ${this.id}`);
233
418
  }
419
+ async ready() {
420
+ const e = Ze(
421
+ this.assembly,
422
+ Te.type
423
+ );
424
+ this._carbTankModel = e;
425
+ }
234
426
  };
235
- _e([
236
- de
237
- ], D.prototype, "_remoteTrays", 2);
238
- D = _e([
239
- ge(),
240
- f(ve)
241
- ], D);
242
- const W = new ee({
243
- class: D,
244
- type: ve
427
+ Oe([
428
+ fe
429
+ ], j.prototype, "_remoteTrays", 2);
430
+ j = Oe([
431
+ me(),
432
+ b($e)
433
+ ], j);
434
+ const W = new oe({
435
+ class: j,
436
+ type: $e
245
437
  });
246
- var mt = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, Ie = (e, t, r, s) => {
247
- for (var a = s > 1 ? void 0 : s ? Pt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
248
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
249
- return s && a && mt(t, r, a), a;
438
+ var St = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, we = (e, t, r, i) => {
439
+ for (var a = i > 1 ? void 0 : i ? Mt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
440
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
441
+ return i && a && St(t, r, a), a;
250
442
  };
251
- const Te = "remote-tray-model";
252
- j("holderPath");
253
- const bt = j("configPath");
254
- let z = class {
443
+ const Se = "remote-tray-model";
444
+ R("holderPath");
445
+ const Dt = R("configPath");
446
+ let B = class {
255
447
  constructor(e, t, r) {
256
448
  /** Unique identifier for the remote tray instance */
257
449
  o(this, "id");
@@ -341,65 +533,65 @@ let z = class {
341
533
  this.logger.debug(`loading remote-tray ${this.id}`);
342
534
  }
343
535
  };
344
- Ie([
345
- p({
346
- path: bt,
536
+ we([
537
+ y({
538
+ path: Dt,
347
539
  attribute: "enabled"
348
540
  })
349
- ], z.prototype, "remoteTrayEnabled", 2);
350
- z = Ie([
351
- f(Te)
352
- ], z);
353
- const A = new b({
354
- class: z,
355
- type: Te
541
+ ], B.prototype, "remoteTrayEnabled", 2);
542
+ B = we([
543
+ b(Se)
544
+ ], B);
545
+ const w = new _({
546
+ class: B,
547
+ type: Se
356
548
  });
357
- var _t = Object.getOwnPropertyDescriptor, vt = (e, t, r, s) => {
358
- for (var a = s > 1 ? void 0 : s ? _t(t, r) : t, i = e.length - 1, n; i >= 0; i--)
359
- (n = e[i]) && (a = n(a) || a);
549
+ var Rt = Object.getOwnPropertyDescriptor, Nt = (e, t, r, i) => {
550
+ for (var a = i > 1 ? void 0 : i ? Rt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
551
+ (n = e[s]) && (a = n(a) || a);
360
552
  return a;
361
553
  };
362
- const Oe = "remote-tray-container-model";
363
- let Z = class {
554
+ const Me = "remote-tray-container-model";
555
+ let Q = class {
364
556
  constructor(e) {
365
557
  o(this, "id");
366
558
  this.id = e;
367
559
  }
368
560
  };
369
- Z = vt([
370
- f(Oe),
371
- ce(),
372
- Ue()
373
- ], Z);
374
- const re = new ee({
375
- class: Z,
376
- type: Oe
561
+ Q = Nt([
562
+ b(Me),
563
+ re(),
564
+ We()
565
+ ], Q);
566
+ const ne = new oe({
567
+ class: Q,
568
+ type: Me
377
569
  });
378
- re.addRelatedModel(A);
379
- var It = Object.getOwnPropertyDescriptor, Tt = (e, t, r, s) => {
380
- for (var a = s > 1 ? void 0 : s ? It(t, r) : t, i = e.length - 1, n; i >= 0; i--)
381
- (n = e[i]) && (a = n(a) || a);
570
+ ne.addRelatedModel(w);
571
+ var zt = Object.getOwnPropertyDescriptor, Lt = (e, t, r, i) => {
572
+ for (var a = i > 1 ? void 0 : i ? zt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
573
+ (n = e[s]) && (a = n(a) || a);
382
574
  return a;
383
575
  };
384
- const Ae = "freestyle-holder-model";
385
- function Ot(e) {
386
- const t = Be.getContext(e), r = t == null ? void 0 : t.get(
576
+ const De = "freestyle-holder-model";
577
+ function Ft(e) {
578
+ const t = Qe.getContext(e), r = t == null ? void 0 : t.get(
387
579
  W.type
388
580
  );
389
581
  if (!r) {
390
- $.error("Freestyle assembly not found");
582
+ C.error("Freestyle assembly not found");
391
583
  return;
392
584
  }
393
585
  return r;
394
586
  }
395
- async function At(e, t) {
587
+ async function Gt(e, t) {
396
588
  if (!e || !t)
397
589
  return;
398
590
  const r = await e[t]();
399
591
  if (r != null && r.tracker)
400
- return xe.getFuture(r.tracker);
592
+ return Xe.getFuture(r.tracker);
401
593
  }
402
- let Q = class {
594
+ let X = class {
403
595
  constructor(e, t, r) {
404
596
  o(this, "id");
405
597
  o(this, "logger");
@@ -415,20 +607,20 @@ let Q = class {
415
607
  if (!this.holder.data.agitated)
416
608
  return;
417
609
  this.future = void 0;
418
- const e = Ot(this.id);
610
+ const e = Ft(this.id);
419
611
  if (!e)
420
612
  return;
421
613
  if (!e.defaultCartridgeAgitator) {
422
614
  this.logger.error("Agitator not found");
423
615
  return;
424
616
  }
425
- return this.future = await At(
617
+ return this.future = await Gt(
426
618
  e.defaultCartridgeAgitator,
427
619
  "testAgitate"
428
620
  ), this.future;
429
621
  }
430
622
  get isRemote() {
431
- const e = `${A.type}-${this.holder.path}`, t = v(e);
623
+ const e = `${w.type}-${this.holder.path}`, t = v(e);
432
624
  return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
433
625
  }
434
626
  // -------------------LIFECYCLE----------------------------
@@ -439,51 +631,51 @@ let Q = class {
439
631
  this.logger.debug(`loading freestyle-holder ${this.id}`);
440
632
  }
441
633
  };
442
- Q = Tt([
443
- f(Ae)
444
- ], Q);
445
- const se = new b({
446
- class: Q,
447
- type: Ae
448
- }), { URL: Et } = F("FREESTYLE-NOZZLE_SERVICE"), { getOne: $t } = G.build({
449
- basePath: `${Et}/api/freestyle-nozzle`
450
- }), C = $.createLogger({
634
+ X = Lt([
635
+ b(De)
636
+ ], X);
637
+ const ce = new _({
638
+ class: X,
639
+ type: De
640
+ }), { URL: Ut } = M("FREESTYLE-NOZZLE_SERVICE"), { getOne: jt } = D.build({
641
+ basePath: `${Ut}/api/freestyle-nozzle`
642
+ }), z = C.createLogger({
451
643
  name: "freestyle-nozzle-service",
452
644
  group: "Services"
453
645
  });
454
- class Ct extends Error {
646
+ class Bt extends Error {
455
647
  constructor(t) {
456
648
  super(t), this.name = "NutritionInfoError";
457
649
  }
458
650
  }
459
- class ie extends Error {
651
+ class ue extends Error {
460
652
  constructor(t) {
461
653
  super(t), this.name = "InvalidRequestError";
462
654
  }
463
655
  }
464
- const wt = async (e, t, r, s = "http://localhost:8081") => {
465
- if (C.debug("sending GET for freestyle-nozzle"), !t)
466
- throw C.error("Invalid freestyle-nozzle request: beverageId is required"), new ie("No beverageId provided");
656
+ const Kt = async (e, t, r, i = "http://localhost:8081") => {
657
+ if (z.debug("sending GET for freestyle-nozzle"), !t)
658
+ throw z.error("Invalid freestyle-nozzle request: beverageId is required"), new ue("No beverageId provided");
467
659
  if (!r || r.length === 0)
468
- throw C.error("Invalid freestyle-nozzle request: volumes are required"), new ie("No volumes provided");
469
- const a = await $t({
470
- urlOverride: `${s}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
660
+ throw z.error("Invalid freestyle-nozzle request: volumes are required"), new ue("No volumes provided");
661
+ const a = await jt({
662
+ urlOverride: `${i}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
471
663
  ","
472
664
  )}`
473
665
  });
474
666
  if (!(a != null && a.data))
475
- throw C.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
667
+ throw z.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
476
668
  if (a.data.error)
477
- throw new Ct(a.data.error);
669
+ throw new Bt(a.data.error);
478
670
  return a.data;
479
671
  };
480
- var Mt = Object.defineProperty, St = Object.getOwnPropertyDescriptor, Ee = (e, t, r, s) => {
481
- for (var a = s > 1 ? void 0 : s ? St(t, r) : t, i = e.length - 1, n; i >= 0; i--)
482
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
483
- return s && a && Mt(t, r, a), a;
672
+ var kt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Re = (e, t, r, i) => {
673
+ for (var a = i > 1 ? void 0 : i ? xt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
674
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
675
+ return i && a && kt(t, r, a), a;
484
676
  };
485
- const $e = "freestyle-nozzle-model";
486
- let N = class {
677
+ const Ne = "freestyle-nozzle-model";
678
+ let K = class {
487
679
  constructor(e, t, r) {
488
680
  o(this, "id");
489
681
  o(this, "logger");
@@ -508,12 +700,12 @@ let N = class {
508
700
  );
509
701
  const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
510
702
  try {
511
- const r = await wt(
703
+ const r = await Kt(
512
704
  t,
513
705
  e,
514
706
  this._cupSizes
515
707
  );
516
- w(() => {
708
+ L(() => {
517
709
  this._nutritionInfo = r;
518
710
  });
519
711
  } catch (r) {
@@ -532,54 +724,54 @@ let N = class {
532
724
  this.logger.debug(`loading freestyle-nozzle ${this.id}`);
533
725
  }
534
726
  };
535
- Ee([
536
- k({
727
+ Re([
728
+ ae({
537
729
  dependencies: (e) => [
538
730
  e.selectedPourable.beverage
539
731
  ]
540
732
  })
541
- ], N.prototype, "handleBeverageSelection", 1);
542
- N = Ee([
543
- ge(),
544
- f($e)
545
- ], N);
546
- const ne = new b({
547
- class: N,
548
- type: $e
549
- }), { URL: Ce } = F("PUMP_SERVICE"), { postModel: Rt } = G.build({
550
- basePath: `${Ce}/api/ext/freestyle/microCalibration`
551
- }), q = $.createLogger({
733
+ ], K.prototype, "handleBeverageSelection", 1);
734
+ K = Re([
735
+ me(),
736
+ b(Ne)
737
+ ], K);
738
+ const ge = new _({
739
+ class: K,
740
+ type: Ne
741
+ }), { URL: ze } = M("PUMP_SERVICE"), { postModel: Ht } = D.build({
742
+ basePath: `${ze}/api/ext/freestyle/microCalibration`
743
+ }), Z = C.createLogger({
552
744
  name: "freestyle-pump-service",
553
745
  group: "Services"
554
- }), Dt = async (e, t) => {
555
- var r, s, a, i, n;
556
- q.debug(
746
+ }), Vt = async (e, t) => {
747
+ var r, i, a, s, n;
748
+ Z.debug(
557
749
  `replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
558
750
  );
559
751
  try {
560
- const l = await Rt({
752
+ const l = await Ht({
561
753
  model: {},
562
- urlOverride: `${Ce}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
754
+ urlOverride: `${ze}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
563
755
  });
564
- return q.debug("replacePump - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((r = l.data) != null && r.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
756
+ return Z.debug("replacePump - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((r = l.data) != null && r.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
565
757
  } catch (l) {
566
- if (q.error(
758
+ if (Z.error(
567
759
  `replacePump - sending POST request to /api/cal/${e}/code/${t}`,
568
760
  l
569
- ), l instanceof He) {
570
- const O = ((a = (s = l.payload) == null ? void 0 : s.data) == null ? void 0 : a.error) || ((i = l.payload) == null ? void 0 : i.error) || "unknownError";
571
- return [O, ((n = l.payload) == null ? void 0 : n.data) || { error: O }];
761
+ ), l instanceof Je) {
762
+ const $ = ((a = (i = l.payload) == null ? void 0 : i.data) == null ? void 0 : a.error) || ((s = l.payload) == null ? void 0 : s.error) || "unknownError";
763
+ return [$, ((n = l.payload) == null ? void 0 : n.data) || { error: $ }];
572
764
  }
573
765
  }
574
766
  return ["unknownError", { error: "unknownError" }];
575
767
  };
576
- var zt = Object.getOwnPropertyDescriptor, Nt = (e, t, r, s) => {
577
- for (var a = s > 1 ? void 0 : s ? zt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
578
- (n = e[i]) && (a = n(a) || a);
768
+ var Yt = Object.getOwnPropertyDescriptor, qt = (e, t, r, i) => {
769
+ for (var a = i > 1 ? void 0 : i ? Yt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
770
+ (n = e[s]) && (a = n(a) || a);
579
771
  return a;
580
772
  };
581
- const we = "freestyle-pump-model";
582
- let X = class {
773
+ const Le = "freestyle-pump-model";
774
+ let J = class {
583
775
  constructor(e, t, r) {
584
776
  o(this, "id");
585
777
  o(this, "logger");
@@ -588,65 +780,65 @@ let X = class {
588
780
  }
589
781
  // -------------------LIFECYCLE----------------------------
590
782
  async replacePump(e) {
591
- const [t, r] = await Dt(this.pump.path, e);
783
+ const [t, r] = await Vt(this.pump.path, e);
592
784
  return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
593
785
  }
594
786
  };
595
- X = Nt([
596
- f(we)
597
- ], X);
598
- const le = new b({
599
- class: X,
600
- type: we
601
- }), { URL: I } = F("ICE_AGITATOR_SERVICE"), { getAll: Me, postModel: x } = G.build({
602
- basePath: `${I}/api/ext/freestyle/ice`
603
- }), Se = $.createLogger({
787
+ J = qt([
788
+ b(Le)
789
+ ], J);
790
+ const he = new _({
791
+ class: J,
792
+ type: Le
793
+ }), { URL: E } = M("ICE_AGITATOR_SERVICE"), { getAll: Fe, postModel: H } = D.build({
794
+ basePath: `${E}/api/ext/freestyle/ice`
795
+ }), Ge = C.createLogger({
604
796
  name: "ice-agitator-service",
605
797
  group: "Services"
606
- }), Lt = async (e) => (Se.debug("sending GET for ice types"), await Me({
607
- urlOverride: `${I}/api/handle/${e}/types`
608
- })), Ft = async (e, t) => (Se.debug("sending POST for ice types"), await x({
609
- urlOverride: `${I}/api/handle/${e}/type/${t}`,
798
+ }), Zt = async (e) => (Ge.debug("sending GET for ice types"), await Fe({
799
+ urlOverride: `${E}/api/handle/${e}/types`
800
+ })), Wt = async (e, t) => (Ge.debug("sending POST for ice types"), await H({
801
+ urlOverride: `${E}/api/handle/${e}/type/${t}`,
610
802
  model: {}
611
- })), Gt = async (e) => await Me({
612
- urlOverride: `${I}/api/kos/config/details/${e}/4`
613
- }), jt = async (e, t) => {
614
- const r = await x({
803
+ })), Qt = async (e) => await Fe({
804
+ urlOverride: `${E}/api/kos/config/details/${e}/4`
805
+ }), Xt = async (e, t) => {
806
+ const r = await H({
615
807
  model: {},
616
808
  tracker: t,
617
- urlOverride: `${I}/api/handle/${e}/pour`
809
+ urlOverride: `${E}/api/handle/${e}/pour`
618
810
  });
619
811
  if (!(r != null && r.data))
620
812
  throw new Error("No response from server");
621
813
  return r == null ? void 0 : r.data;
622
- }, Ut = async (e, t) => {
623
- const r = await x({
814
+ }, Jt = async (e, t) => {
815
+ const r = await H({
624
816
  model: {},
625
817
  tracker: t,
626
- urlOverride: `${I}/api/handle/${e}/test/agitation`
818
+ urlOverride: `${E}/api/handle/${e}/test/agitation`
627
819
  });
628
820
  if (!(r != null && r.data))
629
821
  throw new Error("No response from server");
630
822
  return r == null ? void 0 : r.data;
631
- }, Bt = async (e, t) => {
632
- const r = await x({
823
+ }, er = async (e, t) => {
824
+ const r = await H({
633
825
  model: {},
634
826
  tracker: t,
635
- urlOverride: `${I}/api/handle/${e}/test/gate`
827
+ urlOverride: `${E}/api/handle/${e}/test/gate`
636
828
  });
637
829
  if (!(r != null && r.data))
638
830
  throw new Error("No response from server");
639
831
  return r == null ? void 0 : r.data;
640
832
  };
641
- var xt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, g = (e, t, r, s) => {
642
- for (var a = s > 1 ? void 0 : s ? Ht(t, r) : t, i = e.length - 1, n; i >= 0; i--)
643
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
644
- return s && a && xt(t, r, a), a;
833
+ var tr = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
834
+ for (var a = i > 1 ? void 0 : i ? rr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
835
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
836
+ return i && a && tr(t, r, a), a;
645
837
  };
646
- class L {
838
+ class k {
647
839
  }
648
- o(L, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), o(L, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
649
- const Re = "ice-agitator-model", De = j("statePath");
840
+ o(k, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), o(k, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
841
+ const Ue = "ice-agitator-model", je = R("statePath");
650
842
  let d = class {
651
843
  constructor(e, t, r) {
652
844
  o(this, "id");
@@ -668,7 +860,7 @@ let d = class {
668
860
  o(this, "_allIceTypes");
669
861
  o(this, "logger");
670
862
  o(this, "currentState", c.IDLE);
671
- o(this, "resetDefaultValues", async () => await Gt(this.path));
863
+ o(this, "resetDefaultValues", async () => await Qt(this.path));
672
864
  this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
673
865
  }
674
866
  get iceTypes() {
@@ -699,7 +891,7 @@ let d = class {
699
891
  return this.currentState === c.IDLE;
700
892
  }
701
893
  updateIfCurrent(e, t) {
702
- this.currentState === e && w(() => {
894
+ this.currentState === e && L(() => {
703
895
  this.currentState = t;
704
896
  });
705
897
  }
@@ -708,7 +900,7 @@ let d = class {
708
900
  if (this.currentState === c.IDLE) {
709
901
  if (this.updateIfCurrent(c.IDLE, c.POUR_STARTING), !e)
710
902
  throw new Error("No tracker provided");
711
- const t = await jt(this.path, e);
903
+ const t = await Xt(this.path, e);
712
904
  return this.updateIfCurrent(c.POUR_STARTING, c.POURING), t != null && t.endState && this.updateIfCurrent(c.POURING, c.IDLE), t;
713
905
  } else
714
906
  throw new Error(`Cannot pour in state ${this.currentState}`);
@@ -721,7 +913,7 @@ let d = class {
721
913
  * */
722
914
  async cancelIceDispense() {
723
915
  var e;
724
- this.currentState === c.POURING || this.currentState === c.POUR_STARTING ? (this.currentState = c.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), w(() => {
916
+ this.currentState === c.POURING || this.currentState === c.POUR_STARTING ? (this.currentState = c.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), L(() => {
725
917
  this.currentState = c.IDLE;
726
918
  })) : this.logger.warn(
727
919
  `Cannot cancel ice dispense in state ${this.currentState}`
@@ -730,142 +922,142 @@ let d = class {
730
922
  async testAgitate(e) {
731
923
  if (!e)
732
924
  throw new Error("No tracker provided");
733
- return this.logger.info(`agitating ice-agitator ${this.id}`), Ut(this.path, e);
925
+ return this.logger.info(`agitating ice-agitator ${this.id}`), Jt(this.path, e);
734
926
  }
735
927
  async testGate(e) {
736
928
  if (!e)
737
929
  throw new Error("No tracker provided");
738
- return this.logger.info(`testing ice gate: ${this.id}`), Bt(this.path, e);
930
+ return this.logger.info(`testing ice gate: ${this.id}`), er(this.path, e);
739
931
  }
740
932
  handleAgitationChange() {
741
933
  var e;
742
- this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), M.publish(L.TOPIC_AGITATION_STARTED, {
934
+ this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), F.publish(k.TOPIC_AGITATION_STARTED, {
743
935
  path: this.path,
744
936
  futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
745
- })) : M.publish(L.TOPIC_AGITATION_ENDED, {
937
+ })) : F.publish(k.TOPIC_AGITATION_ENDED, {
746
938
  path: this.path
747
939
  });
748
940
  }
749
941
  async updateIceType(e) {
750
- await Ft(this.path, e);
942
+ await Wt(this.path, e);
751
943
  }
752
944
  async init() {
753
945
  this.logger.debug(`initializing ice-agitator ${this.id}`);
754
946
  }
755
947
  async load() {
756
948
  this.logger.debug(`loading ice-agitator ${this.id}`);
757
- const e = await Lt(this.path);
758
- (e == null ? void 0 : e.status) === 200 && w(() => {
949
+ const e = await Zt(this.path);
950
+ (e == null ? void 0 : e.status) === 200 && L(() => {
759
951
  this._allIceTypes = e.data || [];
760
952
  });
761
953
  }
762
954
  };
763
- g([
764
- p({
765
- path: m,
955
+ u([
956
+ y({
957
+ path: I,
766
958
  attribute: "settings.volWithoutIceMl"
767
959
  })
768
960
  ], d.prototype, "volWithoutIceMl", 2);
769
- g([
770
- p({
771
- path: m,
961
+ u([
962
+ y({
963
+ path: I,
772
964
  attribute: "settings.durationSec",
773
965
  converter: {
774
966
  to: "second"
775
967
  }
776
968
  })
777
969
  ], d.prototype, "durationSec", 2);
778
- g([
779
- p({
780
- path: m,
970
+ u([
971
+ y({
972
+ path: I,
781
973
  attribute: "enableIceChuteClear"
782
974
  })
783
975
  ], d.prototype, "enableIceChuteClear", 2);
784
- g([
785
- p({
786
- path: m,
976
+ u([
977
+ y({
978
+ path: I,
787
979
  attribute: "iceChuteClearDurationMs"
788
980
  })
789
981
  ], d.prototype, "iceChuteClearDurationMs", 2);
790
- g([
791
- p({
792
- path: m,
982
+ u([
983
+ y({
984
+ path: I,
793
985
  attribute: "iceChuteClearIntervalSec"
794
986
  })
795
987
  ], d.prototype, "iceChuteClearIntervalSec", 2);
796
- g([
797
- p({
798
- path: m,
988
+ u([
989
+ y({
990
+ path: I,
799
991
  attribute: "iceChuteClearRetryIntervalSec"
800
992
  })
801
993
  ], d.prototype, "iceChuteClearRetryIntervalSec", 2);
802
- g([
803
- p({
804
- path: m,
994
+ u([
995
+ y({
996
+ path: I,
805
997
  attribute: "maxDispenseSec"
806
998
  })
807
999
  ], d.prototype, "maxDispenseSec", 2);
808
- g([
809
- p({
810
- path: m,
1000
+ u([
1001
+ y({
1002
+ path: I,
811
1003
  attribute: "type"
812
1004
  })
813
1005
  ], d.prototype, "type", 2);
814
- g([
815
- p({
816
- path: m,
1006
+ u([
1007
+ y({
1008
+ path: I,
817
1009
  attribute: "settings.dilutionOffset"
818
1010
  })
819
1011
  ], d.prototype, "dilutionOffset", 2);
820
- g([
821
- p({
822
- path: m,
1012
+ u([
1013
+ y({
1014
+ path: I,
823
1015
  attribute: "settings.inactivitySec",
824
1016
  converter: {
825
1017
  to: "minute"
826
1018
  }
827
1019
  })
828
1020
  ], d.prototype, "inactivitySec", 2);
829
- g([
830
- J({ path: De, attribute: "agitating" })
1021
+ u([
1022
+ O({ path: je, attribute: "agitating" })
831
1023
  ], d.prototype, "agitating", 2);
832
- g([
833
- J({ path: De, attribute: "iceChuteOpen" })
1024
+ u([
1025
+ O({ path: je, attribute: "iceChuteOpen" })
834
1026
  ], d.prototype, "iceChuteOpen", 2);
835
- g([
836
- U({ alias: "pour" })
1027
+ u([
1028
+ N({ alias: "pour" })
837
1029
  ], d.prototype, "pourIce", 1);
838
- g([
839
- U({ alias: "agitate" })
1030
+ u([
1031
+ N({ alias: "agitate" })
840
1032
  ], d.prototype, "testAgitate", 1);
841
- g([
842
- U({
1033
+ u([
1034
+ N({
843
1035
  alias: "gate"
844
1036
  })
845
1037
  ], d.prototype, "testGate", 1);
846
- g([
847
- k({
1038
+ u([
1039
+ ae({
848
1040
  dependencies: (e) => [e.isAgitating]
849
1041
  })
850
1042
  ], d.prototype, "handleAgitationChange", 1);
851
- d = g([
852
- f(Re),
853
- Ke()
1043
+ d = u([
1044
+ b(Ue),
1045
+ et()
854
1046
  ], d);
855
- const ze = new b({
1047
+ const Be = new _({
856
1048
  class: d,
857
- type: Re
1049
+ type: Ue
858
1050
  });
859
- var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, ae = (e, t, r, s) => {
860
- for (var a = s > 1 ? void 0 : s ? Yt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
861
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
862
- return s && a && Kt(t, r, a), a;
1051
+ var ar = Object.defineProperty, or = Object.getOwnPropertyDescriptor, le = (e, t, r, i) => {
1052
+ for (var a = i > 1 ? void 0 : i ? or(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1053
+ (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
1054
+ return i && a && ar(t, r, a), a;
863
1055
  };
864
- const oe = "agitation-required-trouble-model", qt = (e) => {
1056
+ const de = "agitation-required-trouble-model", ir = (e) => {
865
1057
  if (e.data.agitationRequired)
866
- return oe;
867
- }, Vt = "InsufficientAgitationTrouble";
868
- let E = class {
1058
+ return de;
1059
+ }, sr = "InsufficientAgitationTrouble";
1060
+ let S = class {
869
1061
  constructor(e, t, r) {
870
1062
  o(this, "id");
871
1063
  o(this, "logger");
@@ -890,10 +1082,10 @@ let E = class {
890
1082
  }
891
1083
  }
892
1084
  get shouldDefer() {
893
- var s, a;
1085
+ var i, a;
894
1086
  if (!this.holder)
895
1087
  return !0;
896
- const t = (((s = this.holder) == null ? void 0 : s.troublesByType[Vt]) || []).length > 0;
1088
+ const t = (((i = this.holder) == null ? void 0 : i.troublesByType[sr]) || []).length > 0;
897
1089
  return !!((a = this.agitateBeforePour) != null && a.value) && t;
898
1090
  }
899
1091
  get deferred() {
@@ -906,81 +1098,80 @@ let E = class {
906
1098
  this._deferred = !1;
907
1099
  }
908
1100
  };
909
- ae([
910
- p({
1101
+ le([
1102
+ y({
911
1103
  path: "app:kosdev.ddk:app",
912
1104
  attribute: "ncui.agitateBeforePour"
913
1105
  })
914
- ], E.prototype, "agitateBeforePour", 2);
915
- ae([
916
- Ye({
917
- topic: Ve(ue.type),
918
- lifecycle: qe.INIT
1106
+ ], S.prototype, "agitateBeforePour", 2);
1107
+ le([
1108
+ tt({
1109
+ topic: rt(be.type),
1110
+ lifecycle: ye.INIT
919
1111
  })
920
- ], E.prototype, "updateHolder", 1);
921
- E = ae([
922
- f(oe)
923
- ], E);
924
- const Wt = new b({
925
- class: E,
926
- type: oe
927
- }), Zt = ["iceAgitator", "carbAgitator"], Qt = {
928
- iceAgitator: ze.factory,
929
- carbAgitator: pe.factory
930
- }, Xt = $.createLogger({ name: "freestyle-assembly-data-mapper" }), rr = async (e) => {
931
- const t = te.instance().options({}).build(), r = re.instance().options({}).build(), s = e.assemblies.reduce((n, l) => {
932
- var O;
933
- return Zt.forEach((u) => {
934
- var _;
935
- const P = l[u];
1112
+ ], S.prototype, "updateHolder", 1);
1113
+ S = le([
1114
+ b(de)
1115
+ ], S);
1116
+ const nr = new _({
1117
+ class: S,
1118
+ type: de
1119
+ }), lr = ["iceAgitator"], dr = {
1120
+ iceAgitator: Be.factory
1121
+ }, cr = C.createLogger({ name: "freestyle-assembly-data-mapper" }), yr = async (e) => {
1122
+ const t = se.instance().options({}).build(), r = ne.instance().options({}).build(), i = e.assemblies.reduce((n, l) => {
1123
+ var $;
1124
+ return lr.forEach((h) => {
1125
+ var T;
1126
+ const P = l[h];
936
1127
  if (P) {
937
- const Ne = Qt[u](P.path);
938
- n[u] = Ne({
1128
+ const Ke = dr[h](P.path);
1129
+ n[h] = Ke({
939
1130
  name: P.name,
940
1131
  path: P.path,
941
- statePath: ((_ = P.state) == null ? void 0 : _.path) || ""
1132
+ statePath: ((T = P.state) == null ? void 0 : T.path) || ""
942
1133
  });
943
1134
  }
944
- }), (O = l.cartridgeAgitators) == null || O.forEach((u) => {
945
- var _;
946
- const P = be.instance(
947
- u.path
1135
+ }), ($ = l.cartridgeAgitators) == null || $.forEach((h) => {
1136
+ var T;
1137
+ const P = Ce.instance(
1138
+ h.path
948
1139
  ).options({
949
- name: u.name,
950
- path: u.path,
951
- statePath: ((_ = u.state) == null ? void 0 : _.path) || ""
1140
+ name: h.name,
1141
+ path: h.path,
1142
+ statePath: ((T = h.state) == null ? void 0 : T.path) || ""
952
1143
  }).build();
953
1144
  t.addModel(P);
954
- }), l.remoteTrays && l.remoteTrays.forEach((u) => {
955
- Xt.info(`Found remote tray ${u.name} with path ${u.path}`);
956
- const P = `${A.type}-${u.holderPath}`, _ = A.instance(P).options({
957
- holderPath: u.holderPath,
958
- configPath: u.path,
959
- name: u.name
1145
+ }), l.remoteTrays && l.remoteTrays.forEach((h) => {
1146
+ cr.info(`Found remote tray ${h.name} with path ${h.path}`);
1147
+ const P = `${w.type}-${h.holderPath}`, T = w.instance(P).options({
1148
+ holderPath: h.holderPath,
1149
+ configPath: h.path,
1150
+ name: h.name
960
1151
  }).build();
961
- r.addModel(_);
1152
+ r.addModel(T);
962
1153
  }), n;
963
- }, {}), a = !!s.iceAgitator, i = !!s.carbAgitator;
1154
+ }, {}), a = !!i.iceAgitator, s = !!i.carbTank;
964
1155
  return {
965
- ...s,
1156
+ ...i,
966
1157
  cartridgeAgitators: t,
967
1158
  remoteTrays: r,
968
- supportsCarb: i,
1159
+ supportsCarb: s,
969
1160
  supportsIce: a
970
1161
  };
971
- }, Jt = (e) => () => (We(e)(), Xe(e)(), ne.register(), W.register(), ze.register(), pe.register(), te.register(), le.register(), se.register(), A.register(), re.register(), h.companion.register(e)(
972
- Je.type,
973
- ne.type
974
- ), h.companion.register(e)(
975
- ue.type,
1162
+ }, ur = (e) => () => (at(e)(), st(e)(), ge.register(), W.register(), Be.register(), Te.register(), se.register(), he.register(), ce.register(), w.register(), ne.register(), p.companion.register(e)(
1163
+ nt.type,
1164
+ ge.type
1165
+ ), p.companion.register(e)(
1166
+ be.type,
976
1167
  W.type
977
- ), Wt.register(), h.companion.register(e)(
978
- Ze.type,
979
- qt
980
- ), h.companion.register(e)(ke.type, le.type), h.companion.register(e)(
981
- et.type,
982
- se.type
983
- ), K[Y].register(
1168
+ ), nr.register(), p.companion.register(e)(
1169
+ ot.type,
1170
+ ir
1171
+ ), p.companion.register(e)(lt.type, he.type), p.companion.register(e)(
1172
+ dt.type,
1173
+ ce.type
1174
+ ), Y[q].register(
984
1175
  "EnjoyByTrouble",
985
1176
  async (t) => {
986
1177
  if (t.data.enjoyByDate) {
@@ -993,21 +1184,21 @@ const Wt = new b({
993
1184
  }
994
1185
  return {};
995
1186
  }
996
- ), K[Y].register(
1187
+ ), Y[q].register(
997
1188
  "SuperPumpRequiredTrouble",
998
1189
  // This is the trouble type
999
1190
  async (t) => {
1000
1191
  const { model: r } = v(
1001
- tt.type
1192
+ ct.type
1002
1193
  );
1003
1194
  return r ? {
1004
1195
  superPumps: r.models.getIndexByKey(
1005
- rt.byType,
1196
+ ut.byType,
1006
1197
  "microSuper"
1007
- ).map((i) => i.name).join(", ")
1198
+ ).map((s) => s.name).join(", ")
1008
1199
  } : {};
1009
1200
  }
1010
- ), K[Y].register(
1201
+ ), Y[q].register(
1011
1202
  "MicroPumpAirDetectTrouble",
1012
1203
  async (t) => {
1013
1204
  if (t.ifaces.includes("container"))
@@ -1017,53 +1208,53 @@ const Wt = new b({
1017
1208
  t.data.pumpPath
1018
1209
  );
1019
1210
  if (r) {
1020
- const s = r.ingredientId ? v(r.ingredientId).model : void 0;
1211
+ const i = r.ingredientId ? v(r.ingredientId).model : void 0;
1021
1212
  return {
1022
1213
  ingredientId: r.ingredientId,
1023
- ingredientName: (s == null ? void 0 : s.name) || ""
1214
+ ingredientName: (i == null ? void 0 : i.name) || ""
1024
1215
  };
1025
1216
  }
1026
1217
  }
1027
1218
  return {};
1028
1219
  }
1029
1220
  ), {
1030
- preload: h.model.preloadModel(e),
1031
- model: h.model.register(e),
1032
- companion: h.companion.register(e),
1033
- legacy: h.model.registerLegacyModel(e)
1034
- }), y = {
1035
- ...Qe
1221
+ preload: p.model.preloadModel(e),
1222
+ model: p.model.register(e),
1223
+ companion: p.companion.register(e),
1224
+ legacy: p.model.registerLegacyModel(e)
1225
+ }), m = {
1226
+ ...it
1036
1227
  };
1037
- y.freestyle = {
1038
- models: Jt(y)
1228
+ m.freestyle = {
1229
+ models: ur(m)
1039
1230
  };
1040
- y.preload = h.model.preloadModel(y);
1041
- y.model = h.model.register(y);
1042
- y.companion = h.companion.register(y);
1043
- y.legacy = h.model.registerLegacyModel(y);
1044
- const ar = y;
1231
+ m.preload = p.model.preloadModel(m);
1232
+ m.model = p.model.register(m);
1233
+ m.companion = p.companion.register(m);
1234
+ m.legacy = p.model.registerLegacyModel(m);
1235
+ const fr = m;
1045
1236
  export {
1046
- Vt as A,
1047
- pe as C,
1237
+ sr as A,
1238
+ Te as C,
1048
1239
  W as F,
1049
- L as I,
1050
- ar as K,
1051
- Ct as N,
1052
- re as R,
1053
- te as a,
1054
- R as b,
1055
- be as c,
1056
- se as d,
1057
- ne as e,
1058
- le as f,
1059
- ze as g,
1060
- Wt as h,
1061
- A as i,
1062
- ie as j,
1063
- wt as k,
1064
- Dt as l,
1065
- rr as m,
1066
- pt as n,
1067
- Jt as r
1240
+ k as I,
1241
+ fr as K,
1242
+ Bt as N,
1243
+ ne as R,
1244
+ se as a,
1245
+ U as b,
1246
+ Ce as c,
1247
+ ce as d,
1248
+ ge as e,
1249
+ he as f,
1250
+ Be as g,
1251
+ nr as h,
1252
+ w as i,
1253
+ ue as j,
1254
+ Kt as k,
1255
+ Vt as l,
1256
+ yr as m,
1257
+ Ot as n,
1258
+ ur as r
1068
1259
  };
1069
- //# sourceMappingURL=freestyle-registration-manager-z0aYdMcC.js.map
1260
+ //# sourceMappingURL=freestyle-registration-manager-CymJYnwk.js.map