@kosdev-code/kos-freestyle-sdk 2.1.25 → 2.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{extension-utils-sj0P_x9E.js → extension-utils-CARIyqNK.js} +8 -8
- package/{extension-utils-sj0P_x9E.js.map → extension-utils-CARIyqNK.js.map} +1 -1
- package/extension-utils-DABHO8qx.cjs +2 -0
- package/{extension-utils-BUUtrM-T.cjs.map → extension-utils-DABHO8qx.cjs.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +28 -26
- package/models/utils/index.d.ts +1 -0
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +3 -0
- package/models/utils/openapi-index.d.ts.map +1 -0
- package/models/utils/services/freestyle/daily/openapi.d.ts +1656 -0
- package/models/utils/services/freestyle/daily/service.d.ts +118 -0
- package/models/utils/services/freestyle/daily/service.d.ts.map +1 -0
- package/models/utils/services/handle/daily/openapi.d.ts +420 -0
- package/models/utils/services/handle/daily/service.d.ts +118 -0
- package/models/utils/services/handle/daily/service.d.ts.map +1 -0
- package/models/utils/services-index.d.ts +3 -0
- package/models/utils/services-index.d.ts.map +1 -0
- package/models.cjs +1 -1
- package/models.js +23 -21
- package/package.json +2 -2
- package/{freestyle-registration-manager-DSugLmqT.js → service-C0WOCTr1.js} +322 -302
- package/service-C0WOCTr1.js.map +1 -0
- package/{freestyle-registration-manager-rmrOsUZq.cjs → service-VUszslQD.cjs} +2 -2
- package/service-VUszslQD.cjs.map +1 -0
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/use-nutrition-info-BRX7H5o6.cjs +2 -0
- package/{use-nutrition-info-DSdA_SRp.cjs.map → use-nutrition-info-BRX7H5o6.cjs.map} +1 -1
- package/{use-nutrition-info-DtcZs7dL.js → use-nutrition-info-BWyJAXF6.js} +2 -2
- package/{use-nutrition-info-DtcZs7dL.js.map → use-nutrition-info-BWyJAXF6.js.map} +1 -1
- package/extension-utils-BUUtrM-T.cjs +0 -2
- package/freestyle-registration-manager-DSugLmqT.js.map +0 -1
- package/freestyle-registration-manager-rmrOsUZq.cjs.map +0 -1
- package/use-nutrition-info-DSdA_SRp.cjs +0 -2
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (e, t, r) => (
|
|
4
|
-
import { resolveServiceUrl as
|
|
5
|
-
import { PourState as d, Assembly as
|
|
6
|
-
const { URL:
|
|
7
|
-
basePath: `${
|
|
1
|
+
var mt = Object.defineProperty;
|
|
2
|
+
var yt = (e, t, r) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var i = (e, t, r) => (yt(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { resolveServiceUrl as A, ServiceFactory as w, KosLog as $, createPropKey as x, kosStateProp as O, kosConfigProperty as b, kosStateEntry as me, kosStateExit as bt, kosStateGuard as ye, kosFuture as _, kosModel as f, kosLoggerAware as ee, kosCompanion as De, kosFutureAware as Le, kosStateMachine as Pt, DependencyLifecycle as Fe, KosModelContainer as vt, kosChild as Ne, kosModelEffect as be, EventBus as Y, KosModelRegistrationFactory as C, SingletonKosModelRegistrationFactory as Pe, FetchError as ve, FutureManager as y, FutureEndState as U, FutureHandler as ze, kosParentAware as xe, KosFeatureFlags as ne, getKosCompanionModel as Tt, getKosModelSync as R, kosContainerAware as It, KosContextManager as _t, kosAction as K, KOS_MODEL_ID as E, kosMultipleFutureAware as $t, kosTopicHandler as Ct, modelTypeEventTopicFactory as Et, RegistrationManager as m, registerCoreModels as Ot, Trouble as St, ExtensionManager as le, EXTENSION_TROUBLE_DATA_MAPPER as ue, createClient as Ue, kosServiceRequest as Ge } from "@kosdev-code/kos-ui-sdk";
|
|
5
|
+
import { PourState as d, Assembly as je, KosModelRegistry as At, registerDispenseModels as wt, Nozzle as Mt, Pump as Rt, Holder as Dt, PumpContainer as Lt, PumpIndex as Ft } from "@kosdev-code/kos-dispense-sdk";
|
|
6
|
+
const { URL: qe } = A("ICE_AGITATOR_SERVICE"), { postModel: Nt } = w.build({
|
|
7
|
+
basePath: `${qe}/api/ext/freestyle/ice`
|
|
8
8
|
});
|
|
9
|
-
|
|
9
|
+
$.createLogger({
|
|
10
10
|
name: "carb-tank-service",
|
|
11
11
|
group: "Services"
|
|
12
12
|
});
|
|
13
|
-
const
|
|
14
|
-
const r = await
|
|
13
|
+
const zt = async (e, t) => {
|
|
14
|
+
const r = await Nt({
|
|
15
15
|
model: {},
|
|
16
16
|
tracker: t,
|
|
17
|
-
urlOverride: `${
|
|
17
|
+
urlOverride: `${qe}/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
|
|
24
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
23
|
+
var Ve = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Ut = (e, t, r) => t in e ? Ve(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 ? xt(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 &&
|
|
27
|
-
},
|
|
28
|
-
const
|
|
26
|
+
return o && a && Ve(t, r, a), a;
|
|
27
|
+
}, Gt = (e, t, r) => (Ut(e, t + "", r), r);
|
|
28
|
+
const jt = "carb-agitator-model", Te = x("statePath");
|
|
29
29
|
let g = class {
|
|
30
30
|
constructor(e, t, r) {
|
|
31
31
|
i(this, "id");
|
|
@@ -97,10 +97,10 @@ let g = class {
|
|
|
97
97
|
handleTestCarbTank(e) {
|
|
98
98
|
if (!e)
|
|
99
99
|
throw new Error("No tracker provided");
|
|
100
|
-
return this.logger.info(`testing carb tank: ${this.id}`),
|
|
100
|
+
return this.logger.info(`testing carb tank: ${this.id}`), zt(this.path, e);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
Gt(g, "Registration");
|
|
104
104
|
P([
|
|
105
105
|
O({
|
|
106
106
|
path: Te,
|
|
@@ -132,7 +132,7 @@ P([
|
|
|
132
132
|
)
|
|
133
133
|
], g.prototype, "handleActivationStart", 1);
|
|
134
134
|
P([
|
|
135
|
-
|
|
135
|
+
bt(
|
|
136
136
|
"ACTIVATING"
|
|
137
137
|
/* ACTIVATING */
|
|
138
138
|
)
|
|
@@ -174,11 +174,11 @@ P([
|
|
|
174
174
|
_()
|
|
175
175
|
], g.prototype, "handleTestCarbTank", 1);
|
|
176
176
|
g = P([
|
|
177
|
-
f({ modelTypeId:
|
|
177
|
+
f({ modelTypeId: jt, singleton: !1 }),
|
|
178
178
|
ee(),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
De({ mode: "composition", lifecycle: Fe.LOAD }),
|
|
180
|
+
Le(),
|
|
181
|
+
Pt(
|
|
182
182
|
{
|
|
183
183
|
initial: "UNINITIALIZED",
|
|
184
184
|
states: {
|
|
@@ -215,19 +215,19 @@ g = P([
|
|
|
215
215
|
}
|
|
216
216
|
)
|
|
217
217
|
], g);
|
|
218
|
-
const
|
|
219
|
-
var
|
|
220
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
218
|
+
const Be = g.Registration;
|
|
219
|
+
var qt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, He = (e, t, r, o) => {
|
|
220
|
+
for (var a = o > 1 ? void 0 : o ? Vt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
221
221
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
222
|
-
return o && a &&
|
|
222
|
+
return o && a && qt(t, r, a), a;
|
|
223
223
|
};
|
|
224
|
-
const
|
|
224
|
+
const Ke = "cartridge-agitator-container-model";
|
|
225
225
|
let W = class {
|
|
226
226
|
constructor(e, t, r) {
|
|
227
227
|
i(this, "id");
|
|
228
228
|
i(this, "logger");
|
|
229
229
|
i(this, "_models");
|
|
230
|
-
this.id = e, this.logger = r.logger, this._models = new
|
|
230
|
+
this.id = e, this.logger = r.logger, this._models = new vt({
|
|
231
231
|
parentId: e
|
|
232
232
|
});
|
|
233
233
|
}
|
|
@@ -258,34 +258,34 @@ let W = class {
|
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
He([
|
|
262
|
+
Ne
|
|
263
263
|
], W.prototype, "_models", 2);
|
|
264
|
-
W =
|
|
265
|
-
f(
|
|
264
|
+
W = He([
|
|
265
|
+
f(Ke)
|
|
266
266
|
], W);
|
|
267
|
-
const { URL:
|
|
268
|
-
basePath: `${
|
|
269
|
-
}),
|
|
270
|
-
const r = await
|
|
267
|
+
const { URL: Ye } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Bt } = w.build({
|
|
268
|
+
basePath: `${Ye}/api/ext/freestyle/freestyle/ice`
|
|
269
|
+
}), Ht = async (e, t) => {
|
|
270
|
+
const r = await Bt({
|
|
271
271
|
model: {},
|
|
272
272
|
tracker: t,
|
|
273
|
-
urlOverride: `${
|
|
273
|
+
urlOverride: `${Ye}/api/handle/${e}/test`
|
|
274
274
|
});
|
|
275
275
|
if (!(r != null && r.data))
|
|
276
276
|
throw new Error("No response from server");
|
|
277
277
|
return r.data;
|
|
278
278
|
};
|
|
279
|
-
var
|
|
280
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
279
|
+
var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, te = (e, t, r, o) => {
|
|
280
|
+
for (var a = o > 1 ? void 0 : o ? Yt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
281
281
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
282
|
-
return o && a &&
|
|
282
|
+
return o && a && Kt(t, r, a), a;
|
|
283
283
|
};
|
|
284
|
-
const
|
|
284
|
+
const We = "cartridge-agitator-model";
|
|
285
285
|
class Z {
|
|
286
286
|
}
|
|
287
287
|
i(Z, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), i(Z, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
|
|
288
|
-
const
|
|
288
|
+
const Wt = x("statePath");
|
|
289
289
|
let F = class {
|
|
290
290
|
constructor(e, t) {
|
|
291
291
|
i(this, "id");
|
|
@@ -301,7 +301,7 @@ let F = class {
|
|
|
301
301
|
async testAgitate(e) {
|
|
302
302
|
if (!e)
|
|
303
303
|
throw new Error("No tracker provided");
|
|
304
|
-
return this.logger.info(`agitating cartridge-agitator ${this.id}`),
|
|
304
|
+
return this.logger.info(`agitating cartridge-agitator ${this.id}`), Ht(this.path, e);
|
|
305
305
|
}
|
|
306
306
|
handleAgitation() {
|
|
307
307
|
var e;
|
|
@@ -314,7 +314,7 @@ let F = class {
|
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
316
|
te([
|
|
317
|
-
O({ path:
|
|
317
|
+
O({ path: Wt, attribute: "agitating" })
|
|
318
318
|
], F.prototype, "agitating", 2);
|
|
319
319
|
te([
|
|
320
320
|
_()
|
|
@@ -325,24 +325,24 @@ te([
|
|
|
325
325
|
})
|
|
326
326
|
], F.prototype, "handleAgitation", 1);
|
|
327
327
|
F = te([
|
|
328
|
-
f(
|
|
329
|
-
|
|
328
|
+
f(We),
|
|
329
|
+
Le(),
|
|
330
330
|
ee()
|
|
331
331
|
], F);
|
|
332
|
-
const
|
|
332
|
+
const Ze = new C({
|
|
333
333
|
class: F,
|
|
334
|
-
type:
|
|
334
|
+
type: We
|
|
335
335
|
}), Ie = new Pe({
|
|
336
336
|
class: W,
|
|
337
|
-
type:
|
|
337
|
+
type: Ke
|
|
338
338
|
});
|
|
339
|
-
Ie.addRelatedModel(
|
|
340
|
-
var
|
|
341
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
339
|
+
Ie.addRelatedModel(Ze);
|
|
340
|
+
var ke = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, kt = (e, t, r) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, re = (e, t, r, o) => {
|
|
341
|
+
for (var a = o > 1 ? void 0 : o ? Zt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
342
342
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
343
|
-
return o && a &&
|
|
344
|
-
},
|
|
345
|
-
const
|
|
343
|
+
return o && a && ke(t, r, a), a;
|
|
344
|
+
}, Qt = (e, t, r) => (kt(e, t + "", r), r);
|
|
345
|
+
const Xt = "cgp-pump-model", _e = x("statePath");
|
|
346
346
|
let D = class {
|
|
347
347
|
constructor(e, t) {
|
|
348
348
|
i(this, "highProbeWet");
|
|
@@ -357,7 +357,7 @@ let D = class {
|
|
|
357
357
|
return this.state.path;
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
|
-
|
|
360
|
+
Qt(D, "Registration");
|
|
361
361
|
re([
|
|
362
362
|
O({
|
|
363
363
|
path: _e,
|
|
@@ -377,24 +377,24 @@ re([
|
|
|
377
377
|
})
|
|
378
378
|
], D.prototype, "filling", 2);
|
|
379
379
|
D = re([
|
|
380
|
-
f({ modelTypeId:
|
|
381
|
-
|
|
380
|
+
f({ modelTypeId: Xt, singleton: !1 }),
|
|
381
|
+
De({
|
|
382
382
|
mode: "composition"
|
|
383
383
|
}),
|
|
384
384
|
ee()
|
|
385
385
|
], D);
|
|
386
|
-
const
|
|
386
|
+
const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V } = w.build({
|
|
387
387
|
basePath: `${G}/api/fcm-pump`
|
|
388
|
-
}), h =
|
|
388
|
+
}), h = $.createLogger({
|
|
389
389
|
name: "fcm-pump-service",
|
|
390
390
|
group: "Services"
|
|
391
|
-
}),
|
|
391
|
+
}), er = async (e) => {
|
|
392
392
|
var t, r, o, a, n;
|
|
393
393
|
h.debug(
|
|
394
394
|
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
395
395
|
);
|
|
396
396
|
try {
|
|
397
|
-
const s = await
|
|
397
|
+
const s = await V({
|
|
398
398
|
model: {},
|
|
399
399
|
urlOverride: `${G}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
400
400
|
});
|
|
@@ -409,12 +409,12 @@ const Zt = D.Registration, { URL: G } = w("FCM-PUMP_SERVICE"), { postModel: q }
|
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
return ["unknownError", { error: "unknownError" }];
|
|
412
|
-
},
|
|
412
|
+
}, tr = async (e, t) => {
|
|
413
413
|
h.debug(
|
|
414
414
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
|
|
415
415
|
);
|
|
416
416
|
try {
|
|
417
|
-
const r = await
|
|
417
|
+
const r = await V({
|
|
418
418
|
model: {},
|
|
419
419
|
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
420
420
|
tracker: t
|
|
@@ -433,12 +433,12 @@ const Zt = D.Registration, { URL: G } = w("FCM-PUMP_SERVICE"), { postModel: q }
|
|
|
433
433
|
};
|
|
434
434
|
return y.initiateFuture(o), o;
|
|
435
435
|
}
|
|
436
|
-
},
|
|
436
|
+
}, rr = async (e, t) => {
|
|
437
437
|
h.debug(
|
|
438
438
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
|
|
439
439
|
);
|
|
440
440
|
try {
|
|
441
|
-
const r = await
|
|
441
|
+
const r = await V({
|
|
442
442
|
model: {},
|
|
443
443
|
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
444
444
|
tracker: t
|
|
@@ -457,12 +457,12 @@ const Zt = D.Registration, { URL: G } = w("FCM-PUMP_SERVICE"), { postModel: q }
|
|
|
457
457
|
};
|
|
458
458
|
return y.initiateFuture(o), o;
|
|
459
459
|
}
|
|
460
|
-
},
|
|
460
|
+
}, ar = async (e, t, r) => {
|
|
461
461
|
h.debug(
|
|
462
462
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
|
|
463
463
|
);
|
|
464
464
|
try {
|
|
465
|
-
const o = await
|
|
465
|
+
const o = await V({
|
|
466
466
|
model: {},
|
|
467
467
|
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
468
468
|
tracker: r
|
|
@@ -481,16 +481,16 @@ const Zt = D.Registration, { URL: G } = w("FCM-PUMP_SERVICE"), { postModel: q }
|
|
|
481
481
|
};
|
|
482
482
|
return y.initiateFuture(a), a;
|
|
483
483
|
}
|
|
484
|
-
},
|
|
484
|
+
}, or = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", ir = async (e, t, r) => {
|
|
485
485
|
h.debug(
|
|
486
486
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
487
487
|
);
|
|
488
488
|
try {
|
|
489
|
-
const o = await
|
|
489
|
+
const o = await V({
|
|
490
490
|
model: {},
|
|
491
491
|
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
492
492
|
});
|
|
493
|
-
return h.debug("performPreCalibrate - response:", o),
|
|
493
|
+
return h.debug("performPreCalibrate - response:", o), or(o == null ? void 0 : o.data);
|
|
494
494
|
} catch (o) {
|
|
495
495
|
h.error(
|
|
496
496
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
|
|
@@ -499,19 +499,19 @@ const Zt = D.Registration, { URL: G } = w("FCM-PUMP_SERVICE"), { postModel: q }
|
|
|
499
499
|
return;
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
|
-
var
|
|
503
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
502
|
+
var sr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, ae = (e, t, r, o) => {
|
|
503
|
+
for (var a = o > 1 ? void 0 : o ? nr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
504
504
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
505
|
-
return o && a &&
|
|
505
|
+
return o && a && sr(t, r, a), a;
|
|
506
506
|
};
|
|
507
|
-
const
|
|
507
|
+
const Qe = "fcm-pump-model", lr = $.createLogger({ name: "fcm-pump-model" });
|
|
508
508
|
let N = class {
|
|
509
509
|
constructor(e, t, r) {
|
|
510
510
|
i(this, "id");
|
|
511
511
|
i(this, "logger");
|
|
512
512
|
i(this, "pumpModel");
|
|
513
513
|
i(this, "futureHandler");
|
|
514
|
-
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new
|
|
514
|
+
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new ze(this);
|
|
515
515
|
}
|
|
516
516
|
get future() {
|
|
517
517
|
return this.futureHandler.future;
|
|
@@ -532,23 +532,23 @@ let N = class {
|
|
|
532
532
|
return this.pumpModel.performIntent(e);
|
|
533
533
|
}
|
|
534
534
|
async performElectricalTest() {
|
|
535
|
-
const [e, t] = await
|
|
536
|
-
return e &&
|
|
535
|
+
const [e, t] = await er(this.pumpModel.path);
|
|
536
|
+
return e && lr.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
|
|
537
537
|
}
|
|
538
538
|
getChildren() {
|
|
539
539
|
return [...this.futureHandler.allFutures];
|
|
540
540
|
}
|
|
541
541
|
async performPreCalibrate(e) {
|
|
542
|
-
return
|
|
542
|
+
return tr(this.pumpModel.path, e);
|
|
543
543
|
}
|
|
544
544
|
async performCalibrate(e) {
|
|
545
|
-
return
|
|
545
|
+
return rr(this.pumpModel.path, e);
|
|
546
546
|
}
|
|
547
547
|
async performVerify(e, t) {
|
|
548
|
-
return
|
|
548
|
+
return ar(this.pumpModel.path, e, t);
|
|
549
549
|
}
|
|
550
550
|
async performComplete(e, t) {
|
|
551
|
-
return
|
|
551
|
+
return ir(this.pumpModel.path, e, t);
|
|
552
552
|
}
|
|
553
553
|
// -------------------LIFECYCLE----------------------------
|
|
554
554
|
async init() {
|
|
@@ -568,18 +568,18 @@ ae([
|
|
|
568
568
|
_()
|
|
569
569
|
], N.prototype, "performVerify", 1);
|
|
570
570
|
N = ae([
|
|
571
|
-
f(
|
|
571
|
+
f(Qe)
|
|
572
572
|
], N);
|
|
573
|
-
const
|
|
573
|
+
const ur = new C({
|
|
574
574
|
class: N,
|
|
575
|
-
type:
|
|
575
|
+
type: Qe
|
|
576
576
|
});
|
|
577
|
-
var
|
|
578
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
577
|
+
var cr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, Xe = (e, t, r, o) => {
|
|
578
|
+
for (var a = o > 1 ? void 0 : o ? dr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
579
579
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
580
|
-
return o && a &&
|
|
580
|
+
return o && a && cr(t, r, a), a;
|
|
581
581
|
};
|
|
582
|
-
const
|
|
582
|
+
const Je = "freestyle-assembly-model", pr = "iceAgitator", gr = "carbTank", hr = "remoteTrays";
|
|
583
583
|
let k = class {
|
|
584
584
|
constructor(e, t, r) {
|
|
585
585
|
i(this, "id");
|
|
@@ -642,44 +642,44 @@ let k = class {
|
|
|
642
642
|
}
|
|
643
643
|
// -------------------LIFECYCLE----------------------------
|
|
644
644
|
get supportsRemoteTrays() {
|
|
645
|
-
return ne.isFeatureEnabled(
|
|
645
|
+
return ne.isFeatureEnabled(hr);
|
|
646
646
|
}
|
|
647
647
|
get supportsIce() {
|
|
648
|
-
return ne.isFeatureEnabled(
|
|
648
|
+
return ne.isFeatureEnabled(pr);
|
|
649
649
|
}
|
|
650
650
|
get supportsCarb() {
|
|
651
|
-
return ne.isFeatureEnabled(
|
|
651
|
+
return ne.isFeatureEnabled(gr);
|
|
652
652
|
}
|
|
653
653
|
async init() {
|
|
654
654
|
this.logger.debug(`initializing freestyle-assembly ${this.id}`);
|
|
655
655
|
}
|
|
656
656
|
async ready() {
|
|
657
|
-
const e =
|
|
657
|
+
const e = Tt(
|
|
658
658
|
this.assembly,
|
|
659
|
-
|
|
659
|
+
Be.type
|
|
660
660
|
);
|
|
661
661
|
this._carbTankModel = e;
|
|
662
662
|
}
|
|
663
663
|
};
|
|
664
|
-
|
|
665
|
-
|
|
664
|
+
Xe([
|
|
665
|
+
Ne
|
|
666
666
|
], k.prototype, "_remoteTrays", 2);
|
|
667
|
-
k =
|
|
668
|
-
|
|
669
|
-
f(
|
|
667
|
+
k = Xe([
|
|
668
|
+
xe(),
|
|
669
|
+
f(Je)
|
|
670
670
|
], k);
|
|
671
671
|
const de = new Pe({
|
|
672
672
|
class: k,
|
|
673
|
-
type:
|
|
673
|
+
type: Je
|
|
674
674
|
});
|
|
675
|
-
var
|
|
676
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
675
|
+
var fr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, et = (e, t, r, o) => {
|
|
676
|
+
for (var a = o > 1 ? void 0 : o ? mr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
677
677
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
678
|
-
return o && a &&
|
|
678
|
+
return o && a && fr(t, r, a), a;
|
|
679
679
|
};
|
|
680
|
-
const
|
|
680
|
+
const tt = "remote-tray-model";
|
|
681
681
|
x("holderPath");
|
|
682
|
-
const
|
|
682
|
+
const yr = x("configPath");
|
|
683
683
|
let Q = class {
|
|
684
684
|
constructor(e, t, r) {
|
|
685
685
|
/** Unique identifier for the remote tray instance */
|
|
@@ -770,58 +770,58 @@ let Q = class {
|
|
|
770
770
|
this.logger.debug(`loading remote-tray ${this.id}`);
|
|
771
771
|
}
|
|
772
772
|
};
|
|
773
|
-
|
|
773
|
+
et([
|
|
774
774
|
b({
|
|
775
|
-
path:
|
|
775
|
+
path: yr,
|
|
776
776
|
attribute: "enabled"
|
|
777
777
|
})
|
|
778
778
|
], Q.prototype, "remoteTrayEnabled", 2);
|
|
779
|
-
Q =
|
|
780
|
-
f(
|
|
779
|
+
Q = et([
|
|
780
|
+
f(tt)
|
|
781
781
|
], Q);
|
|
782
|
-
const
|
|
782
|
+
const j = new C({
|
|
783
783
|
class: Q,
|
|
784
|
-
type:
|
|
784
|
+
type: tt
|
|
785
785
|
});
|
|
786
|
-
var
|
|
787
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
786
|
+
var br = Object.getOwnPropertyDescriptor, Pr = (e, t, r, o) => {
|
|
787
|
+
for (var a = o > 1 ? void 0 : o ? br(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
788
788
|
(s = e[n]) && (a = s(a) || a);
|
|
789
789
|
return a;
|
|
790
790
|
};
|
|
791
|
-
const
|
|
791
|
+
const rt = "remote-tray-container-model";
|
|
792
792
|
let pe = class {
|
|
793
793
|
constructor(e) {
|
|
794
794
|
i(this, "id");
|
|
795
795
|
this.id = e;
|
|
796
796
|
}
|
|
797
797
|
};
|
|
798
|
-
pe =
|
|
799
|
-
f(
|
|
798
|
+
pe = Pr([
|
|
799
|
+
f(rt),
|
|
800
800
|
ee(),
|
|
801
|
-
|
|
801
|
+
It()
|
|
802
802
|
], pe);
|
|
803
|
-
const
|
|
803
|
+
const $e = new Pe({
|
|
804
804
|
class: pe,
|
|
805
|
-
type:
|
|
805
|
+
type: rt
|
|
806
806
|
});
|
|
807
|
-
|
|
808
|
-
var
|
|
809
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
807
|
+
$e.addRelatedModel(j);
|
|
808
|
+
var vr = Object.getOwnPropertyDescriptor, Tr = (e, t, r, o) => {
|
|
809
|
+
for (var a = o > 1 ? void 0 : o ? vr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
810
810
|
(s = e[n]) && (a = s(a) || a);
|
|
811
811
|
return a;
|
|
812
812
|
};
|
|
813
|
-
const
|
|
814
|
-
function
|
|
815
|
-
const t =
|
|
813
|
+
const at = "freestyle-holder-model";
|
|
814
|
+
function Ir(e) {
|
|
815
|
+
const t = _t.getContext(e), r = t == null ? void 0 : t.get(
|
|
816
816
|
de.type
|
|
817
817
|
);
|
|
818
818
|
if (!r) {
|
|
819
|
-
|
|
819
|
+
$.error("Freestyle assembly not found");
|
|
820
820
|
return;
|
|
821
821
|
}
|
|
822
822
|
return r;
|
|
823
823
|
}
|
|
824
|
-
async function
|
|
824
|
+
async function _r(e, t) {
|
|
825
825
|
if (!e || !t)
|
|
826
826
|
return;
|
|
827
827
|
const r = await e[t]();
|
|
@@ -844,20 +844,20 @@ let ge = class {
|
|
|
844
844
|
if (!this.holder.data.agitated)
|
|
845
845
|
return;
|
|
846
846
|
this.future = void 0;
|
|
847
|
-
const e =
|
|
847
|
+
const e = Ir(this.id);
|
|
848
848
|
if (!e)
|
|
849
849
|
return;
|
|
850
850
|
if (!e.defaultCartridgeAgitator) {
|
|
851
851
|
this.logger.error("Agitator not found");
|
|
852
852
|
return;
|
|
853
853
|
}
|
|
854
|
-
return this.future = await
|
|
854
|
+
return this.future = await _r(
|
|
855
855
|
e.defaultCartridgeAgitator,
|
|
856
856
|
"testAgitate"
|
|
857
857
|
), this.future;
|
|
858
858
|
}
|
|
859
859
|
get isRemote() {
|
|
860
|
-
const e = `${
|
|
860
|
+
const e = `${j.type}-${this.holder.path}`, t = R(e);
|
|
861
861
|
return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
|
|
862
862
|
}
|
|
863
863
|
// -------------------LIFECYCLE----------------------------
|
|
@@ -868,34 +868,34 @@ let ge = class {
|
|
|
868
868
|
this.logger.debug(`loading freestyle-holder ${this.id}`);
|
|
869
869
|
}
|
|
870
870
|
};
|
|
871
|
-
ge =
|
|
872
|
-
f(
|
|
871
|
+
ge = Tr([
|
|
872
|
+
f(at)
|
|
873
873
|
], ge);
|
|
874
|
-
const Oe = new
|
|
874
|
+
const Oe = new C({
|
|
875
875
|
class: ge,
|
|
876
|
-
type:
|
|
877
|
-
}), { URL:
|
|
878
|
-
basePath: `${
|
|
879
|
-
}), H =
|
|
876
|
+
type: at
|
|
877
|
+
}), { URL: $r } = A("FREESTYLE-NOZZLE_SERVICE"), { getOne: Cr } = w.build({
|
|
878
|
+
basePath: `${$r}/api/freestyle-nozzle`
|
|
879
|
+
}), H = $.createLogger({
|
|
880
880
|
name: "freestyle-nozzle-service",
|
|
881
881
|
group: "Services"
|
|
882
882
|
});
|
|
883
|
-
class
|
|
883
|
+
class Er extends Error {
|
|
884
884
|
constructor(t) {
|
|
885
885
|
super(t), this.name = "NutritionInfoError";
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
class
|
|
888
|
+
class Se extends Error {
|
|
889
889
|
constructor(t) {
|
|
890
890
|
super(t), this.name = "InvalidRequestError";
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
const
|
|
893
|
+
const Or = async (e, t, r, o = "http://localhost:8081") => {
|
|
894
894
|
if (H.debug("sending GET for freestyle-nozzle"), !t)
|
|
895
|
-
throw H.error("Invalid freestyle-nozzle request: beverageId is required"), new
|
|
895
|
+
throw H.error("Invalid freestyle-nozzle request: beverageId is required"), new Se("No beverageId provided");
|
|
896
896
|
if (!r || r.length === 0)
|
|
897
|
-
throw H.error("Invalid freestyle-nozzle request: volumes are required"), new
|
|
898
|
-
const a = await
|
|
897
|
+
throw H.error("Invalid freestyle-nozzle request: volumes are required"), new Se("No volumes provided");
|
|
898
|
+
const a = await Cr({
|
|
899
899
|
urlOverride: `${o}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
|
|
900
900
|
","
|
|
901
901
|
)}`
|
|
@@ -903,15 +903,15 @@ const _r = async (e, t, r, o = "http://localhost:8081") => {
|
|
|
903
903
|
if (!(a != null && a.data))
|
|
904
904
|
throw H.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
|
|
905
905
|
if (a.data.error)
|
|
906
|
-
throw new
|
|
906
|
+
throw new Er(a.data.error);
|
|
907
907
|
return a.data;
|
|
908
908
|
};
|
|
909
|
-
var
|
|
910
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
909
|
+
var Sr = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, ot = (e, t, r, o) => {
|
|
910
|
+
for (var a = o > 1 ? void 0 : o ? Ar(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
911
911
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
912
|
-
return o && a &&
|
|
912
|
+
return o && a && Sr(t, r, a), a;
|
|
913
913
|
};
|
|
914
|
-
const
|
|
914
|
+
const it = "freestyle-nozzle-model";
|
|
915
915
|
let X = class {
|
|
916
916
|
constructor(e, t, r) {
|
|
917
917
|
i(this, "id");
|
|
@@ -937,7 +937,7 @@ let X = class {
|
|
|
937
937
|
);
|
|
938
938
|
const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
|
|
939
939
|
try {
|
|
940
|
-
const r = await
|
|
940
|
+
const r = await Or(
|
|
941
941
|
t,
|
|
942
942
|
e,
|
|
943
943
|
this._cupSizes
|
|
@@ -961,34 +961,34 @@ let X = class {
|
|
|
961
961
|
this.logger.debug(`loading freestyle-nozzle ${this.id}`);
|
|
962
962
|
}
|
|
963
963
|
};
|
|
964
|
-
|
|
964
|
+
ot([
|
|
965
965
|
be({
|
|
966
966
|
dependencies: (e) => [
|
|
967
967
|
e.selectedPourable.beverage
|
|
968
968
|
]
|
|
969
969
|
})
|
|
970
970
|
], X.prototype, "handleBeverageSelection", 1);
|
|
971
|
-
X =
|
|
972
|
-
|
|
973
|
-
f(
|
|
971
|
+
X = ot([
|
|
972
|
+
xe(),
|
|
973
|
+
f(it)
|
|
974
974
|
], X);
|
|
975
|
-
const
|
|
975
|
+
const Ae = new C({
|
|
976
976
|
class: X,
|
|
977
|
-
type:
|
|
978
|
-
}), { URL:
|
|
979
|
-
basePath: `${
|
|
980
|
-
}), ce =
|
|
977
|
+
type: it
|
|
978
|
+
}), { URL: st } = A("PUMP_SERVICE"), { postModel: wr } = w.build({
|
|
979
|
+
basePath: `${st}/api/ext/freestyle/microCalibration`
|
|
980
|
+
}), ce = $.createLogger({
|
|
981
981
|
name: "freestyle-pump-service",
|
|
982
982
|
group: "Services"
|
|
983
|
-
}),
|
|
983
|
+
}), Mr = async (e, t) => {
|
|
984
984
|
var r, o, a, n, s;
|
|
985
985
|
ce.debug(
|
|
986
986
|
`replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
987
987
|
);
|
|
988
988
|
try {
|
|
989
|
-
const u = await
|
|
989
|
+
const u = await wr({
|
|
990
990
|
model: {},
|
|
991
|
-
urlOverride: `${
|
|
991
|
+
urlOverride: `${st}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
992
992
|
});
|
|
993
993
|
return ce.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
994
|
} catch (u) {
|
|
@@ -996,18 +996,18 @@ const we = new $({
|
|
|
996
996
|
`replacePump - sending POST request to /api/cal/${e}/code/${t}`,
|
|
997
997
|
u
|
|
998
998
|
), u instanceof ve) {
|
|
999
|
-
const
|
|
1000
|
-
return [
|
|
999
|
+
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
|
+
return [S, ((s = u.payload) == null ? void 0 : s.data) || { error: S }];
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
return ["unknownError", { error: "unknownError" }];
|
|
1004
1004
|
};
|
|
1005
|
-
var
|
|
1006
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1005
|
+
var Rr = Object.getOwnPropertyDescriptor, Dr = (e, t, r, o) => {
|
|
1006
|
+
for (var a = o > 1 ? void 0 : o ? Rr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1007
1007
|
(s = e[n]) && (a = s(a) || a);
|
|
1008
1008
|
return a;
|
|
1009
1009
|
};
|
|
1010
|
-
const
|
|
1010
|
+
const nt = "freestyle-pump-model";
|
|
1011
1011
|
let he = class {
|
|
1012
1012
|
constructor(e, t, r) {
|
|
1013
1013
|
i(this, "id");
|
|
@@ -1017,29 +1017,29 @@ let he = class {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
// -------------------LIFECYCLE----------------------------
|
|
1019
1019
|
async replacePump(e) {
|
|
1020
|
-
const [t, r] = await
|
|
1020
|
+
const [t, r] = await Mr(this.pump.path, e);
|
|
1021
1021
|
return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
|
|
1022
1022
|
}
|
|
1023
1023
|
};
|
|
1024
|
-
he =
|
|
1025
|
-
f(
|
|
1024
|
+
he = Dr([
|
|
1025
|
+
f(nt)
|
|
1026
1026
|
], he);
|
|
1027
|
-
const
|
|
1027
|
+
const we = new C({
|
|
1028
1028
|
class: he,
|
|
1029
|
-
type:
|
|
1030
|
-
}), { URL: L } =
|
|
1029
|
+
type: nt
|
|
1030
|
+
}), { URL: L } = A("ICE_AGITATOR_SERVICE"), { getAll: lt, postModel: oe } = w.build({
|
|
1031
1031
|
basePath: `${L}/api/ext/freestyle/ice`
|
|
1032
|
-
}),
|
|
1032
|
+
}), ut = $.createLogger({
|
|
1033
1033
|
name: "ice-agitator-service",
|
|
1034
1034
|
group: "Services"
|
|
1035
|
-
}),
|
|
1035
|
+
}), Lr = async (e) => (ut.debug("sending GET for ice types"), await lt({
|
|
1036
1036
|
urlOverride: `${L}/api/handle/${e}/types`
|
|
1037
|
-
})),
|
|
1037
|
+
})), Fr = async (e, t) => (ut.debug("sending POST for ice types"), await oe({
|
|
1038
1038
|
urlOverride: `${L}/api/handle/${e}/type/${t}`,
|
|
1039
1039
|
model: {}
|
|
1040
|
-
})),
|
|
1040
|
+
})), Nr = async (e) => await lt({
|
|
1041
1041
|
urlOverride: `${L}/api/kos/config/details/${e}/4`
|
|
1042
|
-
}),
|
|
1042
|
+
}), zr = async (e, t) => {
|
|
1043
1043
|
const r = await oe({
|
|
1044
1044
|
model: {},
|
|
1045
1045
|
tracker: t,
|
|
@@ -1048,7 +1048,7 @@ const Se = new $({
|
|
|
1048
1048
|
if (!(r != null && r.data))
|
|
1049
1049
|
throw new Error("No response from server");
|
|
1050
1050
|
return r == null ? void 0 : r.data;
|
|
1051
|
-
},
|
|
1051
|
+
}, xr = async (e, t) => {
|
|
1052
1052
|
const r = await oe({
|
|
1053
1053
|
model: {},
|
|
1054
1054
|
tracker: t,
|
|
@@ -1057,7 +1057,7 @@ const Se = new $({
|
|
|
1057
1057
|
if (!(r != null && r.data))
|
|
1058
1058
|
throw new Error("No response from server");
|
|
1059
1059
|
return r == null ? void 0 : r.data;
|
|
1060
|
-
},
|
|
1060
|
+
}, Ur = async (e, t) => {
|
|
1061
1061
|
const r = await oe({
|
|
1062
1062
|
model: {},
|
|
1063
1063
|
tracker: t,
|
|
@@ -1067,15 +1067,15 @@ const Se = new $({
|
|
|
1067
1067
|
throw new Error("No response from server");
|
|
1068
1068
|
return r == null ? void 0 : r.data;
|
|
1069
1069
|
};
|
|
1070
|
-
var
|
|
1071
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1070
|
+
var Gr = Object.defineProperty, jr = Object.getOwnPropertyDescriptor, p = (e, t, r, o) => {
|
|
1071
|
+
for (var a = o > 1 ? void 0 : o ? jr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1072
1072
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1073
|
-
return o && a &&
|
|
1073
|
+
return o && a && Gr(t, r, a), a;
|
|
1074
1074
|
};
|
|
1075
1075
|
class J {
|
|
1076
1076
|
}
|
|
1077
1077
|
i(J, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), i(J, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
|
|
1078
|
-
const
|
|
1078
|
+
const ct = "ice-agitator-model", dt = x("statePath");
|
|
1079
1079
|
let c = class {
|
|
1080
1080
|
constructor(e, t, r) {
|
|
1081
1081
|
i(this, "id");
|
|
@@ -1097,7 +1097,7 @@ let c = class {
|
|
|
1097
1097
|
i(this, "_allIceTypes");
|
|
1098
1098
|
i(this, "logger");
|
|
1099
1099
|
i(this, "currentState", d.IDLE);
|
|
1100
|
-
i(this, "resetDefaultValues", async () => await
|
|
1100
|
+
i(this, "resetDefaultValues", async () => await Nr(this.path));
|
|
1101
1101
|
this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
|
|
1102
1102
|
}
|
|
1103
1103
|
get iceTypes() {
|
|
@@ -1137,7 +1137,7 @@ let c = class {
|
|
|
1137
1137
|
if (this.currentState === d.IDLE) {
|
|
1138
1138
|
if (this.updateIfCurrent(d.IDLE, d.POUR_STARTING), !e)
|
|
1139
1139
|
throw new Error("No tracker provided");
|
|
1140
|
-
const t = await
|
|
1140
|
+
const t = await zr(this.path, e);
|
|
1141
1141
|
return this.updateIfCurrent(d.POUR_STARTING, d.POURING), t != null && t.endState && this.updateIfCurrent(d.POURING, d.IDLE), t;
|
|
1142
1142
|
} else
|
|
1143
1143
|
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
@@ -1159,12 +1159,12 @@ let c = class {
|
|
|
1159
1159
|
async testAgitate(e) {
|
|
1160
1160
|
if (!e)
|
|
1161
1161
|
throw new Error("No tracker provided");
|
|
1162
|
-
return this.logger.info(`agitating ice-agitator ${this.id}`),
|
|
1162
|
+
return this.logger.info(`agitating ice-agitator ${this.id}`), xr(this.path, e);
|
|
1163
1163
|
}
|
|
1164
1164
|
async testGate(e) {
|
|
1165
1165
|
if (!e)
|
|
1166
1166
|
throw new Error("No tracker provided");
|
|
1167
|
-
return this.logger.info(`testing ice gate: ${this.id}`),
|
|
1167
|
+
return this.logger.info(`testing ice gate: ${this.id}`), Ur(this.path, e);
|
|
1168
1168
|
}
|
|
1169
1169
|
handleAgitationChange() {
|
|
1170
1170
|
var e;
|
|
@@ -1176,14 +1176,14 @@ let c = class {
|
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
1178
1178
|
async updateIceType(e) {
|
|
1179
|
-
await
|
|
1179
|
+
await Fr(this.path, e);
|
|
1180
1180
|
}
|
|
1181
1181
|
async init() {
|
|
1182
1182
|
this.logger.debug(`initializing ice-agitator ${this.id}`);
|
|
1183
1183
|
}
|
|
1184
1184
|
async load() {
|
|
1185
1185
|
this.logger.debug(`loading ice-agitator ${this.id}`);
|
|
1186
|
-
const e = await
|
|
1186
|
+
const e = await Lr(this.path);
|
|
1187
1187
|
(e == null ? void 0 : e.status) === 200 && K(() => {
|
|
1188
1188
|
this._allIceTypes = e.data || [];
|
|
1189
1189
|
});
|
|
@@ -1256,10 +1256,10 @@ p([
|
|
|
1256
1256
|
})
|
|
1257
1257
|
], c.prototype, "inactivitySec", 2);
|
|
1258
1258
|
p([
|
|
1259
|
-
O({ path:
|
|
1259
|
+
O({ path: dt, attribute: "agitating" })
|
|
1260
1260
|
], c.prototype, "agitating", 2);
|
|
1261
1261
|
p([
|
|
1262
|
-
O({ path:
|
|
1262
|
+
O({ path: dt, attribute: "iceChuteOpen" })
|
|
1263
1263
|
], c.prototype, "iceChuteOpen", 2);
|
|
1264
1264
|
p([
|
|
1265
1265
|
_({ alias: "pour" })
|
|
@@ -1278,19 +1278,19 @@ p([
|
|
|
1278
1278
|
})
|
|
1279
1279
|
], c.prototype, "handleAgitationChange", 1);
|
|
1280
1280
|
c = p([
|
|
1281
|
-
f(
|
|
1282
|
-
|
|
1281
|
+
f(ct),
|
|
1282
|
+
$t()
|
|
1283
1283
|
], c);
|
|
1284
|
-
const
|
|
1284
|
+
const pt = new C({
|
|
1285
1285
|
class: c,
|
|
1286
|
-
type:
|
|
1286
|
+
type: ct
|
|
1287
1287
|
});
|
|
1288
|
-
var
|
|
1289
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1288
|
+
var qr = Object.getOwnPropertyDescriptor, Vr = (e, t, r, o) => {
|
|
1289
|
+
for (var a = o > 1 ? void 0 : o ? qr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1290
1290
|
(s = e[n]) && (a = s(a) || a);
|
|
1291
1291
|
return a;
|
|
1292
1292
|
};
|
|
1293
|
-
const
|
|
1293
|
+
const gt = "lfcv-pump-model";
|
|
1294
1294
|
let fe = class {
|
|
1295
1295
|
constructor(e, t, r) {
|
|
1296
1296
|
i(this, "id");
|
|
@@ -1321,23 +1321,23 @@ let fe = class {
|
|
|
1321
1321
|
this.logger.debug(`loading lfcv-pump ${this.id}`);
|
|
1322
1322
|
}
|
|
1323
1323
|
};
|
|
1324
|
-
fe =
|
|
1325
|
-
f(
|
|
1324
|
+
fe = Vr([
|
|
1325
|
+
f(gt)
|
|
1326
1326
|
], fe);
|
|
1327
|
-
const
|
|
1327
|
+
const Br = new C({
|
|
1328
1328
|
class: fe,
|
|
1329
|
-
type:
|
|
1330
|
-
}), { URL:
|
|
1331
|
-
basePath: `${
|
|
1332
|
-
}),
|
|
1329
|
+
type: gt
|
|
1330
|
+
}), { URL: Hr } = A("LFCV-PUMP_SERVICE"), { getAll: Kr } = w.build({
|
|
1331
|
+
basePath: `${Hr}/api/lfcv-pump`
|
|
1332
|
+
}), Yr = $.createLogger({
|
|
1333
1333
|
name: "lfcv-pump-service",
|
|
1334
1334
|
group: "Services"
|
|
1335
|
-
}),
|
|
1335
|
+
}), fa = async () => (Yr.debug("sending GET for lfcv-pump"), await Kr({})), { URL: B } = A("SPM-PUMP_SERVICE"), { postModel: ie } = w.build({
|
|
1336
1336
|
basePath: `${B}/api/spm-pump`
|
|
1337
|
-
}), T =
|
|
1337
|
+
}), T = $.createLogger({
|
|
1338
1338
|
name: "spm-pump-service",
|
|
1339
1339
|
group: "Services"
|
|
1340
|
-
}),
|
|
1340
|
+
}), Wr = async (e, t) => {
|
|
1341
1341
|
T.debug(
|
|
1342
1342
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
|
|
1343
1343
|
);
|
|
@@ -1361,7 +1361,7 @@ const Gr = new $({
|
|
|
1361
1361
|
};
|
|
1362
1362
|
return y.initiateFuture(o), o;
|
|
1363
1363
|
}
|
|
1364
|
-
},
|
|
1364
|
+
}, Zr = async (e, t) => {
|
|
1365
1365
|
T.debug(
|
|
1366
1366
|
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
|
|
1367
1367
|
);
|
|
@@ -1385,7 +1385,7 @@ const Gr = new $({
|
|
|
1385
1385
|
};
|
|
1386
1386
|
return y.initiateFuture(o), o;
|
|
1387
1387
|
}
|
|
1388
|
-
},
|
|
1388
|
+
}, kr = async (e, t, r, o) => {
|
|
1389
1389
|
T.debug(
|
|
1390
1390
|
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
|
|
1391
1391
|
);
|
|
@@ -1416,8 +1416,8 @@ const Gr = new $({
|
|
|
1416
1416
|
};
|
|
1417
1417
|
return y.initiateFuture(n), n;
|
|
1418
1418
|
}
|
|
1419
|
-
},
|
|
1420
|
-
var a, n, s, u,
|
|
1419
|
+
}, Qr = async (e, t, r, o) => {
|
|
1420
|
+
var a, n, s, u, S;
|
|
1421
1421
|
T.debug(
|
|
1422
1422
|
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
1423
1423
|
);
|
|
@@ -1440,24 +1440,24 @@ const Gr = new $({
|
|
|
1440
1440
|
l
|
|
1441
1441
|
), l instanceof ve) {
|
|
1442
1442
|
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
|
-
return [v, ((
|
|
1443
|
+
return [v, ((S = l.payload) == null ? void 0 : S.data) || { error: v }];
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
1446
|
return ["unknownError", { error: "unknownError" }];
|
|
1447
1447
|
};
|
|
1448
|
-
var
|
|
1449
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1448
|
+
var Xr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, se = (e, t, r, o) => {
|
|
1449
|
+
for (var a = o > 1 ? void 0 : o ? Jr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1450
1450
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1451
|
-
return o && a &&
|
|
1451
|
+
return o && a && Xr(t, r, a), a;
|
|
1452
1452
|
};
|
|
1453
|
-
const
|
|
1453
|
+
const ht = "spm-pump-model";
|
|
1454
1454
|
let z = class {
|
|
1455
1455
|
constructor(e, t, r) {
|
|
1456
1456
|
i(this, "id");
|
|
1457
1457
|
i(this, "logger");
|
|
1458
1458
|
i(this, "pump");
|
|
1459
1459
|
i(this, "futureHandler");
|
|
1460
|
-
this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new
|
|
1460
|
+
this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new ze(this);
|
|
1461
1461
|
}
|
|
1462
1462
|
get name() {
|
|
1463
1463
|
return this.pump.name;
|
|
@@ -1478,16 +1478,16 @@ let z = class {
|
|
|
1478
1478
|
return this.futureHandler.future;
|
|
1479
1479
|
}
|
|
1480
1480
|
async performPreCalibrate(e) {
|
|
1481
|
-
return
|
|
1481
|
+
return Wr(this.pump.path, e);
|
|
1482
1482
|
}
|
|
1483
1483
|
async performCalibrate(e) {
|
|
1484
|
-
return
|
|
1484
|
+
return Zr(this.pump.path, e);
|
|
1485
1485
|
}
|
|
1486
1486
|
async performVerify(e, t, r) {
|
|
1487
|
-
return
|
|
1487
|
+
return kr(this.pump.path, e, t, r);
|
|
1488
1488
|
}
|
|
1489
1489
|
async performComplete(e, t, r) {
|
|
1490
|
-
return
|
|
1490
|
+
return Qr(this.pump.path, e, t, r);
|
|
1491
1491
|
}
|
|
1492
1492
|
// -------------------LIFECYCLE----------------------------
|
|
1493
1493
|
async init() {
|
|
@@ -1507,22 +1507,22 @@ se([
|
|
|
1507
1507
|
_()
|
|
1508
1508
|
], z.prototype, "performVerify", 1);
|
|
1509
1509
|
z = se([
|
|
1510
|
-
f(
|
|
1510
|
+
f(ht)
|
|
1511
1511
|
], z);
|
|
1512
|
-
const
|
|
1512
|
+
const ea = new C({
|
|
1513
1513
|
class: z,
|
|
1514
|
-
type:
|
|
1514
|
+
type: ht
|
|
1515
1515
|
});
|
|
1516
|
-
var
|
|
1517
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1516
|
+
var ta = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, Ce = (e, t, r, o) => {
|
|
1517
|
+
for (var a = o > 1 ? void 0 : o ? ra(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1518
1518
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1519
|
-
return o && a &&
|
|
1519
|
+
return o && a && ta(t, r, a), a;
|
|
1520
1520
|
};
|
|
1521
|
-
const Ee = "agitation-required-trouble-model",
|
|
1521
|
+
const Ee = "agitation-required-trouble-model", aa = (e) => {
|
|
1522
1522
|
if (e.data.agitationRequired)
|
|
1523
1523
|
return Ee;
|
|
1524
|
-
},
|
|
1525
|
-
let
|
|
1524
|
+
}, oa = "InsufficientAgitationTrouble";
|
|
1525
|
+
let q = class {
|
|
1526
1526
|
constructor(e, t, r) {
|
|
1527
1527
|
i(this, "id");
|
|
1528
1528
|
i(this, "logger");
|
|
@@ -1550,7 +1550,7 @@ let j = class {
|
|
|
1550
1550
|
var o, a;
|
|
1551
1551
|
if (!this.holder)
|
|
1552
1552
|
return !0;
|
|
1553
|
-
const t = (((o = this.holder) == null ? void 0 : o.troublesByType[
|
|
1553
|
+
const t = (((o = this.holder) == null ? void 0 : o.troublesByType[oa]) || []).length > 0;
|
|
1554
1554
|
return !!((a = this.agitateBeforePour) != null && a.value) && t;
|
|
1555
1555
|
}
|
|
1556
1556
|
get deferred() {
|
|
@@ -1563,43 +1563,43 @@ let j = class {
|
|
|
1563
1563
|
this._deferred = !1;
|
|
1564
1564
|
}
|
|
1565
1565
|
};
|
|
1566
|
-
|
|
1566
|
+
Ce([
|
|
1567
1567
|
b({
|
|
1568
1568
|
path: "app:kosdev.ddk:app",
|
|
1569
1569
|
attribute: "ncui.agitateBeforePour"
|
|
1570
1570
|
})
|
|
1571
|
-
],
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
topic:
|
|
1575
|
-
lifecycle:
|
|
1571
|
+
], q.prototype, "agitateBeforePour", 2);
|
|
1572
|
+
Ce([
|
|
1573
|
+
Ct({
|
|
1574
|
+
topic: Et(je.type),
|
|
1575
|
+
lifecycle: Fe.INIT
|
|
1576
1576
|
})
|
|
1577
|
-
],
|
|
1578
|
-
|
|
1577
|
+
], q.prototype, "updateHolder", 1);
|
|
1578
|
+
q = Ce([
|
|
1579
1579
|
f(Ee)
|
|
1580
|
-
],
|
|
1581
|
-
const
|
|
1582
|
-
class:
|
|
1580
|
+
], q);
|
|
1581
|
+
const ia = new C({
|
|
1582
|
+
class: q,
|
|
1583
1583
|
type: Ee
|
|
1584
|
-
}),
|
|
1585
|
-
iceAgitator:
|
|
1586
|
-
},
|
|
1587
|
-
const t = Ie.instance().options({}).build(), r =
|
|
1588
|
-
var
|
|
1589
|
-
return
|
|
1584
|
+
}), sa = ["iceAgitator"], na = {
|
|
1585
|
+
iceAgitator: pt.factory
|
|
1586
|
+
}, la = $.createLogger({ name: "freestyle-assembly-data-mapper" }), ma = async (e) => {
|
|
1587
|
+
const t = Ie.instance().options({}).build(), r = $e.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
|
|
1588
|
+
var S;
|
|
1589
|
+
return sa.forEach((l) => {
|
|
1590
1590
|
var M;
|
|
1591
1591
|
const v = u[l];
|
|
1592
1592
|
if (v) {
|
|
1593
|
-
const
|
|
1594
|
-
s[l] =
|
|
1593
|
+
const ft = na[l](v.path);
|
|
1594
|
+
s[l] = ft({
|
|
1595
1595
|
name: v.name,
|
|
1596
1596
|
path: v.path,
|
|
1597
1597
|
statePath: ((M = v.state) == null ? void 0 : M.path) || ""
|
|
1598
1598
|
});
|
|
1599
1599
|
}
|
|
1600
|
-
}), (
|
|
1600
|
+
}), (S = u.cartridgeAgitators) == null || S.forEach((l) => {
|
|
1601
1601
|
var M;
|
|
1602
|
-
const v =
|
|
1602
|
+
const v = Ze.instance(
|
|
1603
1603
|
l.path
|
|
1604
1604
|
).options({
|
|
1605
1605
|
name: l.name,
|
|
@@ -1608,8 +1608,8 @@ const ta = new $({
|
|
|
1608
1608
|
}).build();
|
|
1609
1609
|
t.addModel(v);
|
|
1610
1610
|
}), u.remoteTrays && u.remoteTrays.forEach((l) => {
|
|
1611
|
-
|
|
1612
|
-
const v = `${
|
|
1611
|
+
la.info(`Found remote tray ${l.name} with path ${l.path}`);
|
|
1612
|
+
const v = `${j.type}-${l.holderPath}`, M = j.instance(v).options({
|
|
1613
1613
|
holderPath: l.holderPath,
|
|
1614
1614
|
configPath: l.path,
|
|
1615
1615
|
name: l.name
|
|
@@ -1624,17 +1624,17 @@ const ta = new $({
|
|
|
1624
1624
|
supportsCarb: n,
|
|
1625
1625
|
supportsIce: a
|
|
1626
1626
|
};
|
|
1627
|
-
},
|
|
1628
|
-
|
|
1629
|
-
|
|
1627
|
+
}, ua = (e) => () => (Ot(e)(), wt(e)(), Ae.register(), de.register(), pt.register(), Be.register(), Ie.register(), ea.register(), ur.register(), Br.register(), Jt.register(), we.register(), Oe.register(), j.register(), $e.register(), m.companion.register(e)(
|
|
1628
|
+
Mt.type,
|
|
1629
|
+
Ae.type
|
|
1630
1630
|
), m.companion.register(e)(
|
|
1631
|
-
|
|
1631
|
+
je.type,
|
|
1632
1632
|
de.type
|
|
1633
|
-
),
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
), m.companion.register(e)(
|
|
1637
|
-
|
|
1633
|
+
), ia.register(), m.companion.register(e)(
|
|
1634
|
+
St.type,
|
|
1635
|
+
aa
|
|
1636
|
+
), m.companion.register(e)(Rt.type, we.type), m.companion.register(e)(
|
|
1637
|
+
Dt.type,
|
|
1638
1638
|
Oe.type
|
|
1639
1639
|
), le[ue].register(
|
|
1640
1640
|
"EnjoyByTrouble",
|
|
@@ -1654,11 +1654,11 @@ const ta = new $({
|
|
|
1654
1654
|
// This is the trouble type
|
|
1655
1655
|
async (t) => {
|
|
1656
1656
|
const { model: r } = R(
|
|
1657
|
-
|
|
1657
|
+
Lt.type
|
|
1658
1658
|
);
|
|
1659
1659
|
return r ? {
|
|
1660
1660
|
superPumps: r.models.getIndexByKey(
|
|
1661
|
-
|
|
1661
|
+
Ft.byType,
|
|
1662
1662
|
"microSuper"
|
|
1663
1663
|
).map((n) => n.name).join(", ")
|
|
1664
1664
|
} : {};
|
|
@@ -1688,52 +1688,72 @@ const ta = new $({
|
|
|
1688
1688
|
companion: m.companion.register(e),
|
|
1689
1689
|
legacy: m.model.registerLegacyModel(e)
|
|
1690
1690
|
}), I = {
|
|
1691
|
-
|
|
1691
|
+
...At
|
|
1692
1692
|
};
|
|
1693
1693
|
I.freestyle = {
|
|
1694
|
-
models:
|
|
1694
|
+
models: ua(I)
|
|
1695
1695
|
};
|
|
1696
1696
|
I.preload = m.model.preloadModel(I);
|
|
1697
1697
|
I.model = m.model.register(I);
|
|
1698
1698
|
I.companion = m.companion.register(I);
|
|
1699
1699
|
I.legacy = m.model.registerLegacyModel(I);
|
|
1700
|
-
const
|
|
1700
|
+
const ya = I;
|
|
1701
|
+
function ca(e) {
|
|
1702
|
+
return Ge(e);
|
|
1703
|
+
}
|
|
1704
|
+
const Me = Ue(), ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1705
|
+
__proto__: null,
|
|
1706
|
+
api: Me,
|
|
1707
|
+
default: Me,
|
|
1708
|
+
kosServiceRequest: ca
|
|
1709
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1710
|
+
function da(e) {
|
|
1711
|
+
return Ge(e);
|
|
1712
|
+
}
|
|
1713
|
+
const Re = Ue(), Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1714
|
+
__proto__: null,
|
|
1715
|
+
api: Re,
|
|
1716
|
+
default: Re,
|
|
1717
|
+
kosServiceRequest: da
|
|
1718
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1701
1719
|
export {
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1720
|
+
oa as A,
|
|
1721
|
+
kr as B,
|
|
1722
|
+
Be as C,
|
|
1723
|
+
ma as D,
|
|
1724
|
+
pr as E,
|
|
1725
|
+
ur as F,
|
|
1706
1726
|
J as I,
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1727
|
+
ya as K,
|
|
1728
|
+
Br as L,
|
|
1729
|
+
Er as N,
|
|
1730
|
+
$e as R,
|
|
1731
|
+
ea as S,
|
|
1712
1732
|
Ie as a,
|
|
1713
1733
|
Z as b,
|
|
1714
|
-
|
|
1715
|
-
|
|
1734
|
+
Ze as c,
|
|
1735
|
+
Jt as d,
|
|
1716
1736
|
de as e,
|
|
1717
1737
|
Oe as f,
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
+
Ae as g,
|
|
1739
|
+
we as h,
|
|
1740
|
+
pt as i,
|
|
1741
|
+
ia as j,
|
|
1742
|
+
Pa as k,
|
|
1743
|
+
j as l,
|
|
1744
|
+
ir as m,
|
|
1745
|
+
er as n,
|
|
1746
|
+
tr as o,
|
|
1747
|
+
rr as p,
|
|
1748
|
+
ar as q,
|
|
1749
|
+
ua as r,
|
|
1750
|
+
ba as s,
|
|
1751
|
+
Se as t,
|
|
1752
|
+
Or as u,
|
|
1753
|
+
Mr as v,
|
|
1754
|
+
fa as w,
|
|
1755
|
+
Zr as x,
|
|
1756
|
+
Qr as y,
|
|
1757
|
+
Wr as z
|
|
1738
1758
|
};
|
|
1739
|
-
//# sourceMappingURL=
|
|
1759
|
+
//# sourceMappingURL=service-C0WOCTr1.js.map
|