@kosdev-code/kos-ddk-models 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.mjs +1378 -1191
- package/lib/agitation-control/agitation-control-model.d.ts.map +1 -1
- package/lib/agitation-control/types/index.d.ts +3 -3
- package/lib/copy-logs/copy-logs-model.d.ts +4 -4
- package/lib/copy-logs/copy-logs-model.d.ts.map +1 -1
- package/lib/copy-logs/copy-logs-registration.d.ts +3 -1
- package/lib/copy-logs/copy-logs-registration.d.ts.map +1 -1
- package/lib/spm-pump/index.d.ts +5 -0
- package/lib/spm-pump/index.d.ts.map +1 -0
- package/lib/spm-pump/services/index.d.ts +2 -0
- package/lib/spm-pump/services/index.d.ts.map +1 -0
- package/lib/spm-pump/services/spm-pump-services.d.ts +7 -0
- package/lib/spm-pump/services/spm-pump-services.d.ts.map +1 -0
- package/lib/spm-pump/spm-pump-model.d.ts +26 -0
- package/lib/spm-pump/spm-pump-model.d.ts.map +1 -0
- package/lib/spm-pump/spm-pump-registration.d.ts +87 -0
- package/lib/spm-pump/spm-pump-registration.d.ts.map +1 -0
- package/lib/spm-pump/types/index.d.ts +5 -0
- package/package.json +5 -5
package/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { resolveServiceUrl as h, ServiceFactory as f, KosLog as
|
|
5
|
-
import { AGITATION_REQUIRED_TROUBLE as
|
|
6
|
-
import { Assembly as
|
|
7
|
-
const
|
|
8
|
-
basePath: `${
|
|
9
|
-
}),
|
|
10
|
-
urlOverride: `${
|
|
11
|
-
})),
|
|
12
|
-
urlOverride: `${
|
|
1
|
+
var Ar = Object.defineProperty;
|
|
2
|
+
var jr = (e, t, r) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var a = (e, t, r) => (jr(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { resolveServiceUrl as h, ServiceFactory as f, KosLog as g, kosTopicHandler as Ee, kosModel as l, kosAction as _, isKosModel as c, Kos as u, createPropKey as Ur, kosStateProp as Vr, KosModelRegistrationFactory as Le, kosDependency as m, KosModelContainer as tt, resolveContainerDeltas as dt, kosChild as De, Device as Hr, kosConfigProperty as d, kosFuture as v, kosModelEffect as _t, MultipleFutureHandler as Wr, FutureEndState as b, TroubleServices as Re, Troubles as pt, SingletonKosModelRegistrationFactory as pe, FetchError as Ie, FutureManager as P, FutureHandler as ge, getKosCompanionModel as $t, StorageDeviceContainer as zr, KosDataContainer as Nr, setupCompleteFutureSupport as Br, TroubleContainer as rt, troubleByTypeReducer as Kr, registerExtensionPoint as Yr, ExtensionManager as ke, kosConfigBean as qr, ObservableData as Gr, kosAutoEffect as Qr } from "@kosdev-code/kos-ui-sdk";
|
|
5
|
+
import { AGITATION_REQUIRED_TROUBLE as Pt, CartridgeAgitatorEvents as Tt } from "@kosdev-code/kos-freestyle-sdk";
|
|
6
|
+
import { Assembly as Fe, HolderContainer as Xr, IngredientContainer as Jr } from "@kosdev-code/kos-dispense-sdk";
|
|
7
|
+
const gt = "PurgeTrouble", Zr = "PrimeTrouble", { URL: ot } = h("AUTH_SERVICE"), { getOne: eo, postModel: to } = f.build({
|
|
8
|
+
basePath: `${ot}/api/auth`
|
|
9
|
+
}), Ot = g.createLogger({ name: "auth-service", group: "Services" }), Mt = async () => (Ot.debug("sending GET for auth"), await eo({
|
|
10
|
+
urlOverride: `${ot}/api/app/kosdev.ddk/auth/role`
|
|
11
|
+
})), St = async (e) => (Ot.debug("sending POST for auth"), await to({
|
|
12
|
+
urlOverride: `${ot}/api/app/kosdev.ddk/auth/pincode/${e}`,
|
|
13
13
|
model: {}
|
|
14
|
-
})),
|
|
14
|
+
})), ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15
15
|
__proto__: null,
|
|
16
|
-
getCurrentRole:
|
|
17
|
-
sendPinCode:
|
|
16
|
+
getCurrentRole: Mt,
|
|
17
|
+
sendPinCode: St
|
|
18
18
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
-
var
|
|
20
|
-
for (var o =
|
|
21
|
-
(
|
|
22
|
-
return
|
|
19
|
+
var ro = Object.defineProperty, oo = Object.getOwnPropertyDescriptor, Ct = (e, t, r, i) => {
|
|
20
|
+
for (var o = i > 1 ? void 0 : i ? oo(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
21
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
22
|
+
return i && o && ro(t, r, o), o;
|
|
23
23
|
};
|
|
24
|
-
const
|
|
25
|
-
let
|
|
24
|
+
const N = "auth-model", ht = (e) => e.toLowerCase();
|
|
25
|
+
let ve = class {
|
|
26
26
|
constructor(e, t, r) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
a(this, "id");
|
|
28
|
+
a(this, "logger");
|
|
29
|
+
a(this, "currentRole");
|
|
30
30
|
this.id = e, this.logger = r.logger, this.currentRole = "crew";
|
|
31
31
|
}
|
|
32
32
|
async authorize(e) {
|
|
33
33
|
if (!e)
|
|
34
34
|
return !1;
|
|
35
|
-
const t = await
|
|
35
|
+
const t = await St(e);
|
|
36
36
|
return (t == null ? void 0 : t.status) === 200 ? t.data : !1;
|
|
37
37
|
}
|
|
38
38
|
// -------------------LIFECYCLE----------------------------
|
|
@@ -41,50 +41,50 @@ let fe = class {
|
|
|
41
41
|
}
|
|
42
42
|
async load() {
|
|
43
43
|
this.logger.debug(`loading auth ${this.id}`);
|
|
44
|
-
const e = await
|
|
45
|
-
(e == null ? void 0 : e.status) === 200 && (this.logger.debug(`response ${e.data}`),
|
|
46
|
-
this.currentRole =
|
|
44
|
+
const e = await Mt();
|
|
45
|
+
(e == null ? void 0 : e.status) === 200 && (this.logger.debug(`response ${e.data}`), _(() => {
|
|
46
|
+
this.currentRole = ht(e.data);
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
49
|
handleRoleChange(e) {
|
|
50
|
-
this.currentRole =
|
|
50
|
+
this.currentRole = ht(e);
|
|
51
51
|
}
|
|
52
52
|
forceRole(e) {
|
|
53
53
|
this.currentRole = e;
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
Ct([
|
|
57
|
+
Ee({
|
|
58
58
|
topic: "/app/kosdev.ddk/auth/role",
|
|
59
59
|
websocket: !0
|
|
60
60
|
})
|
|
61
|
-
],
|
|
62
|
-
|
|
63
|
-
l(
|
|
64
|
-
],
|
|
65
|
-
const
|
|
61
|
+
], ve.prototype, "handleRoleChange", 1);
|
|
62
|
+
ve = Ct([
|
|
63
|
+
l(N)
|
|
64
|
+
], ve);
|
|
65
|
+
const it = {
|
|
66
66
|
registration: {
|
|
67
|
-
[
|
|
68
|
-
class:
|
|
67
|
+
[N]: {
|
|
68
|
+
class: ve,
|
|
69
69
|
singleton: !1
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
type:
|
|
73
|
-
predicate: c(
|
|
74
|
-
factory:
|
|
72
|
+
type: N,
|
|
73
|
+
predicate: c(N),
|
|
74
|
+
factory: u.Factory.create(N)
|
|
75
75
|
};
|
|
76
|
-
var
|
|
77
|
-
for (var o =
|
|
78
|
-
(
|
|
79
|
-
return
|
|
76
|
+
var io = Object.defineProperty, so = Object.getOwnPropertyDescriptor, wt = (e, t, r, i) => {
|
|
77
|
+
for (var o = i > 1 ? void 0 : i ? so(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
78
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
79
|
+
return i && o && io(t, r, o), o;
|
|
80
80
|
};
|
|
81
|
-
const
|
|
82
|
-
let
|
|
81
|
+
const Et = "door-model", ao = Ur("doorPath");
|
|
82
|
+
let _e = class {
|
|
83
83
|
constructor(e, t, r) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
a(this, "id");
|
|
85
|
+
a(this, "logger");
|
|
86
|
+
a(this, "doorPath");
|
|
87
|
+
a(this, "open");
|
|
88
88
|
this.id = e, this.logger = r.logger, this.doorPath = t.doorPath;
|
|
89
89
|
}
|
|
90
90
|
get currentState() {
|
|
@@ -94,45 +94,45 @@ let me = class {
|
|
|
94
94
|
return this.open.value === void 0 ? !0 : this.open.value;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
],
|
|
100
|
-
|
|
101
|
-
l(
|
|
102
|
-
],
|
|
103
|
-
const
|
|
104
|
-
class:
|
|
105
|
-
type:
|
|
106
|
-
}), { URL:
|
|
107
|
-
basePath: `${
|
|
108
|
-
}),
|
|
97
|
+
wt([
|
|
98
|
+
Vr({ path: ao, attribute: "state" })
|
|
99
|
+
], _e.prototype, "open", 2);
|
|
100
|
+
_e = wt([
|
|
101
|
+
l(Et)
|
|
102
|
+
], _e);
|
|
103
|
+
const no = new Le({
|
|
104
|
+
class: _e,
|
|
105
|
+
type: Et
|
|
106
|
+
}), { URL: st } = h("SETUP-STEP_SERVICE"), { getAll: lo, postModel: co } = f.build({
|
|
107
|
+
basePath: `${st}/api/setup-step`
|
|
108
|
+
}), Lt = g.createLogger({
|
|
109
109
|
name: "setup-step-service",
|
|
110
110
|
group: "Services"
|
|
111
|
-
}),
|
|
112
|
-
urlOverride: `${
|
|
113
|
-
})),
|
|
114
|
-
urlOverride: `${
|
|
111
|
+
}), Dt = async () => (Lt.debug("sending GET for setup-step"), await lo({
|
|
112
|
+
urlOverride: `${st}/api/app/kosdev.ddk/setup/steps`
|
|
113
|
+
})), Rt = async (e) => (Lt.debug("sending POST for setup-step"), await co({
|
|
114
|
+
urlOverride: `${st}/api/app/kosdev.ddk/setup/complete/${e}`,
|
|
115
115
|
model: {}
|
|
116
|
-
})),
|
|
116
|
+
})), Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
117
117
|
__proto__: null,
|
|
118
|
-
getSetupSteps:
|
|
119
|
-
markStepComplete:
|
|
118
|
+
getSetupSteps: Dt,
|
|
119
|
+
markStepComplete: Rt
|
|
120
120
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
121
|
-
var
|
|
122
|
-
for (var o =
|
|
123
|
-
(
|
|
124
|
-
return
|
|
121
|
+
var uo = Object.defineProperty, po = Object.getOwnPropertyDescriptor, go = (e, t, r, i) => {
|
|
122
|
+
for (var o = i > 1 ? void 0 : i ? po(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
123
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
124
|
+
return i && o && uo(t, r, o), o;
|
|
125
125
|
};
|
|
126
|
-
const
|
|
127
|
-
let
|
|
126
|
+
const B = "setup-step-model";
|
|
127
|
+
let Ke = class {
|
|
128
128
|
constructor(e, t, r) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
a(this, "id");
|
|
130
|
+
a(this, "idx");
|
|
131
|
+
a(this, "name");
|
|
132
|
+
a(this, "complete");
|
|
133
|
+
a(this, "preStep");
|
|
134
|
+
a(this, "exclusive");
|
|
135
|
+
a(this, "logger");
|
|
136
136
|
this.id = e, this.idx = t.idx, this.logger = r.logger, this.name = t.name, this.complete = t.complete, this.preStep = t.preStep, this.exclusive = t.exclusive;
|
|
137
137
|
}
|
|
138
138
|
updateModel(e) {
|
|
@@ -145,8 +145,8 @@ let je = class {
|
|
|
145
145
|
return `setup.${this.name}.body`;
|
|
146
146
|
}
|
|
147
147
|
async completeStep() {
|
|
148
|
-
const e = await
|
|
149
|
-
(e == null ? void 0 : e.status) === 200 &&
|
|
148
|
+
const e = await Rt(this.name);
|
|
149
|
+
(e == null ? void 0 : e.status) === 200 && _(() => {
|
|
150
150
|
this.complete = !0;
|
|
151
151
|
});
|
|
152
152
|
}
|
|
@@ -158,45 +158,45 @@ let je = class {
|
|
|
158
158
|
this.logger.debug(`loading setup-step ${this.id}`);
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
l(
|
|
163
|
-
],
|
|
164
|
-
const
|
|
161
|
+
Ke = go([
|
|
162
|
+
l(B)
|
|
163
|
+
], Ke);
|
|
164
|
+
const It = {
|
|
165
165
|
registration: {
|
|
166
|
-
[
|
|
167
|
-
class:
|
|
166
|
+
[B]: {
|
|
167
|
+
class: Ke,
|
|
168
168
|
singleton: !1
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
-
type:
|
|
172
|
-
predicate: c(
|
|
173
|
-
factory:
|
|
171
|
+
type: B,
|
|
172
|
+
predicate: c(B),
|
|
173
|
+
factory: u.Factory.create(B)
|
|
174
174
|
};
|
|
175
|
-
var
|
|
176
|
-
for (var o =
|
|
177
|
-
(
|
|
178
|
-
return
|
|
175
|
+
var ho = Object.defineProperty, fo = Object.getOwnPropertyDescriptor, xe = (e, t, r, i) => {
|
|
176
|
+
for (var o = i > 1 ? void 0 : i ? fo(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
177
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
178
|
+
return i && o && ho(t, r, o), o;
|
|
179
179
|
};
|
|
180
|
-
const
|
|
181
|
-
function
|
|
180
|
+
const K = "setup-step-container-model";
|
|
181
|
+
function ft(e) {
|
|
182
182
|
return (t) => {
|
|
183
|
-
const r =
|
|
183
|
+
const r = It.factory(t.id)(t);
|
|
184
184
|
r.updateModel(t), e.addModel(r);
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function mt(e) {
|
|
188
188
|
return (t) => {
|
|
189
189
|
e.removeModel(t);
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
let
|
|
192
|
+
let I = class {
|
|
193
193
|
constructor(e, t, r) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
this.id = e, this.logger = r.logger, this._currentStep = void 0, this.models = new
|
|
194
|
+
a(this, "id");
|
|
195
|
+
a(this, "_currentStep");
|
|
196
|
+
a(this, "logger");
|
|
197
|
+
a(this, "models");
|
|
198
|
+
a(this, "authModel");
|
|
199
|
+
this.id = e, this.logger = r.logger, this._currentStep = void 0, this.models = new tt({
|
|
200
200
|
parentId: e,
|
|
201
201
|
sortKey: "idx"
|
|
202
202
|
});
|
|
@@ -247,112 +247,112 @@ let L = class {
|
|
|
247
247
|
}
|
|
248
248
|
async load() {
|
|
249
249
|
this.logger.debug(`loading setup-step-container container ${this.id}`);
|
|
250
|
-
const e = await
|
|
250
|
+
const e = await Dt();
|
|
251
251
|
if (e != null && e.data) {
|
|
252
252
|
const t = e.data.map(
|
|
253
|
-
(r,
|
|
253
|
+
(r, i) => ({
|
|
254
254
|
...r,
|
|
255
|
-
idx:
|
|
255
|
+
idx: i,
|
|
256
256
|
id: `setup-${r.name}`
|
|
257
257
|
})
|
|
258
258
|
);
|
|
259
|
-
|
|
259
|
+
dt({
|
|
260
260
|
container: this.models,
|
|
261
|
-
onAddItem:
|
|
262
|
-
onRemoveItem:
|
|
261
|
+
onAddItem: ft(this),
|
|
262
|
+
onRemoveItem: mt(this)
|
|
263
263
|
})(t);
|
|
264
264
|
}
|
|
265
265
|
this.nextStep();
|
|
266
266
|
}
|
|
267
267
|
handleStepChanges(e) {
|
|
268
|
-
const t = e.map((r,
|
|
268
|
+
const t = e.map((r, i) => ({
|
|
269
269
|
...r,
|
|
270
|
-
idx:
|
|
270
|
+
idx: i,
|
|
271
271
|
id: `setup-${r.name}`
|
|
272
272
|
}));
|
|
273
|
-
|
|
273
|
+
dt({
|
|
274
274
|
container: this.models,
|
|
275
|
-
onAddItem:
|
|
276
|
-
onRemoveItem:
|
|
275
|
+
onAddItem: ft(this),
|
|
276
|
+
onRemoveItem: mt(this)
|
|
277
277
|
})(t);
|
|
278
278
|
}
|
|
279
279
|
};
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
],
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
],
|
|
286
|
-
|
|
287
|
-
|
|
280
|
+
xe([
|
|
281
|
+
De
|
|
282
|
+
], I.prototype, "models", 2);
|
|
283
|
+
xe([
|
|
284
|
+
m({ modelType: it.type })
|
|
285
|
+
], I.prototype, "authModel", 2);
|
|
286
|
+
xe([
|
|
287
|
+
Ee({
|
|
288
288
|
topic: "/app/kosdev.ddk/setup/steps",
|
|
289
289
|
websocket: !0
|
|
290
290
|
})
|
|
291
|
-
],
|
|
292
|
-
|
|
293
|
-
l(
|
|
294
|
-
],
|
|
295
|
-
const
|
|
291
|
+
], I.prototype, "handleStepChanges", 1);
|
|
292
|
+
I = xe([
|
|
293
|
+
l(K)
|
|
294
|
+
], I);
|
|
295
|
+
const kt = {
|
|
296
296
|
registration: {
|
|
297
|
-
[
|
|
298
|
-
class:
|
|
297
|
+
[K]: {
|
|
298
|
+
class: I,
|
|
299
299
|
singleton: !0
|
|
300
300
|
},
|
|
301
|
-
...
|
|
301
|
+
...It.registration
|
|
302
302
|
},
|
|
303
|
-
type:
|
|
304
|
-
predicate: c(
|
|
305
|
-
factory:
|
|
306
|
-
}, { URL:
|
|
307
|
-
basePath: `${
|
|
308
|
-
}),
|
|
309
|
-
|
|
310
|
-
const e = await
|
|
311
|
-
urlOverride: `${
|
|
303
|
+
type: K,
|
|
304
|
+
predicate: c(K),
|
|
305
|
+
factory: u.Singleton.create(K)
|
|
306
|
+
}, { URL: he } = h("AUTH_SERVICE"), { getOne: Ft, getAll: xt } = f.build({
|
|
307
|
+
basePath: `${he}/api/app/kosdev.ddk/ncui/`
|
|
308
|
+
}), Ae = g.createLogger({ name: "auth-service", group: "Services" }), mo = async () => {
|
|
309
|
+
Ae.debug("sending GET for cuis");
|
|
310
|
+
const e = await xt({
|
|
311
|
+
urlOverride: `${he}/api/app/kosdev.ddk/cui`
|
|
312
312
|
});
|
|
313
313
|
if ((e == null ? void 0 : e.status) !== 200)
|
|
314
314
|
throw new Error("Failed to retrieve cuis");
|
|
315
315
|
return e.data;
|
|
316
|
-
},
|
|
317
|
-
|
|
318
|
-
const e = await
|
|
319
|
-
urlOverride: `${
|
|
316
|
+
}, yo = async () => {
|
|
317
|
+
Ae.debug("sending GET for navigation");
|
|
318
|
+
const e = await xt({
|
|
319
|
+
urlOverride: `${he}/api/kos/descriptor/system:app/kondra.ncui.navigations`
|
|
320
320
|
});
|
|
321
321
|
if ((e == null ? void 0 : e.status) !== 200)
|
|
322
322
|
throw new Error("Failed to retrieve navigation data");
|
|
323
323
|
return e.data;
|
|
324
|
-
},
|
|
325
|
-
urlOverride: `${
|
|
326
|
-
})),
|
|
327
|
-
urlOverride: `${
|
|
324
|
+
}, bo = async () => (Ae.debug("navigating to CUI"), await Ft({
|
|
325
|
+
urlOverride: `${he}/api/app/kosdev.ddk/cui/open`
|
|
326
|
+
})), vo = async () => (Ae.debug("navigating to NCUI"), await Ft({
|
|
327
|
+
urlOverride: `${he}/api/app/kosdev.ddk/ncui/open`
|
|
328
328
|
}));
|
|
329
|
-
var
|
|
330
|
-
for (var o =
|
|
331
|
-
(
|
|
332
|
-
return
|
|
333
|
-
};
|
|
334
|
-
const
|
|
335
|
-
const o = t ? `${t}.${
|
|
336
|
-
if (r[o] = { ...
|
|
337
|
-
const
|
|
338
|
-
Object.keys(
|
|
339
|
-
r[
|
|
329
|
+
var _o = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, L = (e, t, r, i) => {
|
|
330
|
+
for (var o = i > 1 ? void 0 : i ? $o(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
331
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
332
|
+
return i && o && _o(t, r, o), o;
|
|
333
|
+
};
|
|
334
|
+
const Y = "application-model", At = (e, t = "") => e.reduce((r, i) => {
|
|
335
|
+
const o = t ? `${t}.${i.name}` : i.name;
|
|
336
|
+
if (r[o] = { ...i, root: !t }, i.children) {
|
|
337
|
+
const n = At(i.children, o);
|
|
338
|
+
Object.keys(n).forEach((s) => {
|
|
339
|
+
r[s] = n[s];
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
342
|
return r;
|
|
343
343
|
}, {});
|
|
344
|
-
let
|
|
344
|
+
let M = class {
|
|
345
345
|
constructor(e, t, r) {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
346
|
+
a(this, "id");
|
|
347
|
+
a(this, "device");
|
|
348
|
+
a(this, "authModel");
|
|
349
|
+
a(this, "setupStepContainer");
|
|
350
|
+
a(this, "door");
|
|
351
|
+
a(this, "ncuiLanguage");
|
|
352
|
+
a(this, "activeCui");
|
|
353
|
+
a(this, "fallbackCui");
|
|
354
|
+
a(this, "_cuis", []);
|
|
355
|
+
a(this, "_navigationItems", []);
|
|
356
356
|
// @kosConfigProperty({
|
|
357
357
|
// path: 'somewhere.enable.dial.animation',
|
|
358
358
|
// attribute: 'enableDialAnimation',
|
|
@@ -368,9 +368,9 @@ let $ = class {
|
|
|
368
368
|
// attribute: 'enableSidebarAnimation',
|
|
369
369
|
// })
|
|
370
370
|
// enableSidebarAnimation!: KosConfigProperty<boolean>;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
this.id = e, this.languages = [], this._cuis = [], this.logger = r.logger, this.door =
|
|
371
|
+
a(this, "languages");
|
|
372
|
+
a(this, "logger");
|
|
373
|
+
this.id = e, this.languages = [], this._cuis = [], this.logger = r.logger, this.door = no.instance("app:kosdev.ddk:service:door:door").options({
|
|
374
374
|
doorPath: "app:kosdev.ddk:service:door:door"
|
|
375
375
|
}).build();
|
|
376
376
|
}
|
|
@@ -384,7 +384,7 @@ let $ = class {
|
|
|
384
384
|
return this._cuis.reduce((e, t) => (e[t.name] = t, e), {});
|
|
385
385
|
}
|
|
386
386
|
get navigationItems() {
|
|
387
|
-
return
|
|
387
|
+
return At(this._navigationItems);
|
|
388
388
|
}
|
|
389
389
|
get hasCuiDefined() {
|
|
390
390
|
return !!this.activeCui.value || !!this.fallbackCui.value;
|
|
@@ -393,19 +393,19 @@ let $ = class {
|
|
|
393
393
|
return this.door.isOpen;
|
|
394
394
|
}
|
|
395
395
|
async enter() {
|
|
396
|
-
this.logger.info("navigating to NCUI"), await
|
|
396
|
+
this.logger.info("navigating to NCUI"), await vo();
|
|
397
397
|
}
|
|
398
398
|
async exit() {
|
|
399
|
-
this.logger.info("navigating to CUI"), await
|
|
399
|
+
this.logger.info("navigating to CUI"), await bo();
|
|
400
400
|
}
|
|
401
401
|
// -------------------LIFECYCLE----------------------------
|
|
402
402
|
async load() {
|
|
403
|
-
var r,
|
|
403
|
+
var r, i;
|
|
404
404
|
this.logger.debug(`loading application ${this.id}`);
|
|
405
|
-
const e = await
|
|
405
|
+
const e = await yo();
|
|
406
406
|
this._navigationItems = e;
|
|
407
|
-
const t = await
|
|
408
|
-
this._cuis = t, (r = this.setupStepContainer) != null && r.hasIncompletePreSteps && ((
|
|
407
|
+
const t = await mo();
|
|
408
|
+
this._cuis = t, (r = this.setupStepContainer) != null && r.hasIncompletePreSteps && ((i = this.authModel) == null || i.forceRole("technician")), this.languages = [
|
|
409
409
|
{
|
|
410
410
|
name: "English",
|
|
411
411
|
locale: "en"
|
|
@@ -413,87 +413,87 @@ let $ = class {
|
|
|
413
413
|
];
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
],
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
],
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
],
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
],
|
|
428
|
-
|
|
429
|
-
|
|
416
|
+
L([
|
|
417
|
+
m({ modelType: Hr.type })
|
|
418
|
+
], M.prototype, "device", 2);
|
|
419
|
+
L([
|
|
420
|
+
m({ modelType: it.type })
|
|
421
|
+
], M.prototype, "authModel", 2);
|
|
422
|
+
L([
|
|
423
|
+
m({ modelType: kt.type })
|
|
424
|
+
], M.prototype, "setupStepContainer", 2);
|
|
425
|
+
L([
|
|
426
|
+
De
|
|
427
|
+
], M.prototype, "door", 2);
|
|
428
|
+
L([
|
|
429
|
+
d({
|
|
430
430
|
path: "app:kosdev.ddk:app",
|
|
431
431
|
attribute: "ncui.ncuiLanguage"
|
|
432
432
|
//updated attribute for language config property
|
|
433
433
|
})
|
|
434
|
-
],
|
|
435
|
-
|
|
436
|
-
|
|
434
|
+
], M.prototype, "ncuiLanguage", 2);
|
|
435
|
+
L([
|
|
436
|
+
d({
|
|
437
437
|
path: "app:kosdev.ddk:service:cui",
|
|
438
438
|
attribute: "activeCui"
|
|
439
439
|
})
|
|
440
|
-
],
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
], M.prototype, "activeCui", 2);
|
|
441
|
+
L([
|
|
442
|
+
d({
|
|
443
443
|
path: "app:kosdev.ddk:service:cui",
|
|
444
444
|
attribute: "fallbackCui"
|
|
445
445
|
})
|
|
446
|
-
],
|
|
447
|
-
|
|
448
|
-
l(
|
|
449
|
-
],
|
|
450
|
-
const
|
|
446
|
+
], M.prototype, "fallbackCui", 2);
|
|
447
|
+
M = L([
|
|
448
|
+
l(Y)
|
|
449
|
+
], M);
|
|
450
|
+
const at = {
|
|
451
451
|
registration: {
|
|
452
|
-
[
|
|
453
|
-
class:
|
|
452
|
+
[Y]: {
|
|
453
|
+
class: M,
|
|
454
454
|
singleton: !0
|
|
455
455
|
}
|
|
456
456
|
},
|
|
457
|
-
type:
|
|
458
|
-
predicate: c(
|
|
459
|
-
factory:
|
|
460
|
-
|
|
457
|
+
type: Y,
|
|
458
|
+
predicate: c(Y),
|
|
459
|
+
factory: u.Singleton.create(
|
|
460
|
+
Y
|
|
461
461
|
)
|
|
462
|
-
},
|
|
462
|
+
}, be = {
|
|
463
463
|
none: 999,
|
|
464
464
|
crew: 0,
|
|
465
465
|
technician: 1,
|
|
466
466
|
manager: 2
|
|
467
|
-
},
|
|
468
|
-
if (t.type ===
|
|
467
|
+
}, jt = (e) => (t) => {
|
|
468
|
+
if (t.type === Pt)
|
|
469
469
|
return !1;
|
|
470
470
|
const r = (t == null ? void 0 : t.role) || "technician";
|
|
471
471
|
if (e && r) {
|
|
472
|
-
const
|
|
473
|
-
return
|
|
472
|
+
const i = be[e.toLowerCase()] ?? be.crew, o = be[r.toLowerCase()] ?? be.crew;
|
|
473
|
+
return i >= o;
|
|
474
474
|
}
|
|
475
475
|
return !1;
|
|
476
476
|
};
|
|
477
|
-
var
|
|
478
|
-
for (var o =
|
|
479
|
-
(
|
|
480
|
-
return
|
|
477
|
+
var Po = Object.defineProperty, To = Object.getOwnPropertyDescriptor, U = (e, t, r, i) => {
|
|
478
|
+
for (var o = i > 1 ? void 0 : i ? To(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
479
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
480
|
+
return i && o && Po(t, r, o), o;
|
|
481
481
|
};
|
|
482
|
-
const
|
|
483
|
-
let
|
|
482
|
+
const Ut = "agitation-control-model", Ye = "resolve", Oo = "agitate";
|
|
483
|
+
let C = class {
|
|
484
484
|
constructor(e, t, r) {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
this.id = e, this.logger = r.logger, this.troubleContainer = t.companionParent, this.futureHandler = new
|
|
485
|
+
a(this, "id");
|
|
486
|
+
a(this, "futureHandler");
|
|
487
|
+
a(this, "logger");
|
|
488
|
+
a(this, "troubleContainer");
|
|
489
|
+
a(this, "_agitationFutureId");
|
|
490
|
+
a(this, "_canExit", !0);
|
|
491
|
+
a(this, "_exiting", !1);
|
|
492
|
+
a(this, "_isFailed", !1);
|
|
493
|
+
a(this, "disposer");
|
|
494
|
+
a(this, "application");
|
|
495
|
+
a(this, "inProgress", []);
|
|
496
|
+
this.id = e, this.logger = r.logger, this.troubleContainer = t.companionParent, this.futureHandler = new Wr(this, Ye);
|
|
497
497
|
}
|
|
498
498
|
set isFailed(e) {
|
|
499
499
|
this._isFailed = e;
|
|
@@ -522,7 +522,7 @@ let P = class {
|
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
524
|
get readyToResolve() {
|
|
525
|
-
const e = this.queuedTroubles.length, t = this.queuedTroubles.filter((
|
|
525
|
+
const e = this.queuedTroubles.length, t = this.queuedTroubles.filter((i) => i.shouldDefer), r = e > 0 && t.length === 0;
|
|
526
526
|
return this.isDoorClosed && r && this.exiting;
|
|
527
527
|
}
|
|
528
528
|
onFutureUpdate(e) {
|
|
@@ -530,15 +530,15 @@ let P = class {
|
|
|
530
530
|
`Resolve deferred troubles future ${e.id} completed successfully`
|
|
531
531
|
), this.queuedTroubles.forEach((t) => {
|
|
532
532
|
t.clearDefer();
|
|
533
|
-
}),
|
|
533
|
+
}), _(() => {
|
|
534
534
|
this._canExit = !0, this._isFailed = !1;
|
|
535
|
-
})) : (e.endState === b.Fail || e.endState === b.Canceled || e.endState === b.Aborted) && (this.logger.error(`Resolve deferred troubles future ${e.id} failed`), this.clearAll(),
|
|
535
|
+
})) : (e.endState === b.Fail || e.endState === b.Canceled || e.endState === b.Aborted) && (this.logger.error(`Resolve deferred troubles future ${e.id} failed`), this.clearAll(), _(() => {
|
|
536
536
|
this._canExit = !1, this._isFailed = !0;
|
|
537
537
|
}));
|
|
538
538
|
}
|
|
539
539
|
async resolveDeferredTroubles(e) {
|
|
540
|
-
const t = this.queuedTroubles.filter((
|
|
541
|
-
return this.inProgress.push(...t), t.length === 0 ? void 0 : await
|
|
540
|
+
const t = this.queuedTroubles.filter((i) => !i.shouldDefer).map((i) => i.rawId).filter((i) => !this.inProgress.includes(i));
|
|
541
|
+
return this.inProgress.push(...t), t.length === 0 ? void 0 : await Re.bulkResolveTroubles(
|
|
542
542
|
t,
|
|
543
543
|
e
|
|
544
544
|
);
|
|
@@ -548,23 +548,23 @@ let P = class {
|
|
|
548
548
|
}
|
|
549
549
|
get queuedTroubles() {
|
|
550
550
|
return this.troubleContainer.troubles.getIndexByKey(
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
pt.INDEX_TROUBLES_BY_DEFERRED,
|
|
552
|
+
pt.TROUBLES_DEFERRED
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
555
|
get visibleTroubles() {
|
|
556
556
|
const e = this.application.currentRole;
|
|
557
|
-
return this.troubleContainer.troubles.data.filter(
|
|
557
|
+
return this.troubleContainer.troubles.data.filter(jt(e)).filter((t) => t.type !== Pt);
|
|
558
558
|
}
|
|
559
559
|
// -------------------LIFECYCLE----------------------------
|
|
560
560
|
get future() {
|
|
561
561
|
return this.futureHandler.future;
|
|
562
562
|
}
|
|
563
563
|
get resolveFuture() {
|
|
564
|
-
return this.futureHandler.getFuture(
|
|
564
|
+
return this.futureHandler.getFuture(Ye);
|
|
565
565
|
}
|
|
566
566
|
get agitateFuture() {
|
|
567
|
-
return this.futureHandler.getFuture(
|
|
567
|
+
return this.futureHandler.getFuture(Oo);
|
|
568
568
|
}
|
|
569
569
|
handleAgitationStarted(e) {
|
|
570
570
|
this.logger.info(`Agitation started for ${e.path}`), this._agitationFutureId = String(e.futureId);
|
|
@@ -585,181 +585,181 @@ let P = class {
|
|
|
585
585
|
this.logger.debug(`loading agitation-control ${this.id}`);
|
|
586
586
|
}
|
|
587
587
|
};
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
],
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
],
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
],
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
],
|
|
600
|
-
|
|
601
|
-
|
|
588
|
+
U([
|
|
589
|
+
m({ modelType: at.type })
|
|
590
|
+
], C.prototype, "application", 2);
|
|
591
|
+
U([
|
|
592
|
+
v({ alias: Ye })
|
|
593
|
+
], C.prototype, "resolveDeferredTroubles", 1);
|
|
594
|
+
U([
|
|
595
|
+
Ee({ topic: Tt.TOPIC_AGITATION_STARTED })
|
|
596
|
+
], C.prototype, "handleAgitationStarted", 1);
|
|
597
|
+
U([
|
|
598
|
+
Ee({ topic: Tt.TOPIC_AGITATION_ENDED })
|
|
599
|
+
], C.prototype, "handleAgitationEnded", 1);
|
|
600
|
+
U([
|
|
601
|
+
_t({
|
|
602
602
|
dependencies: (e) => [e.readyToResolve, e._agitationFutureId]
|
|
603
603
|
})
|
|
604
|
-
],
|
|
605
|
-
|
|
606
|
-
l(
|
|
607
|
-
],
|
|
608
|
-
const
|
|
609
|
-
class:
|
|
610
|
-
type:
|
|
604
|
+
], C.prototype, "handleReadyToResolve", 1);
|
|
605
|
+
C = U([
|
|
606
|
+
l(Ut)
|
|
607
|
+
], C);
|
|
608
|
+
const Ls = new pe({
|
|
609
|
+
class: C,
|
|
610
|
+
type: Ut
|
|
611
611
|
});
|
|
612
|
-
var
|
|
613
|
-
for (var o =
|
|
614
|
-
(
|
|
615
|
-
return
|
|
612
|
+
var Mo = Object.defineProperty, So = Object.getOwnPropertyDescriptor, fe = (e, t, r, i) => {
|
|
613
|
+
for (var o = i > 1 ? void 0 : i ? So(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
614
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
615
|
+
return i && o && Mo(t, r, o), o;
|
|
616
616
|
};
|
|
617
|
-
const
|
|
618
|
-
let
|
|
617
|
+
const q = "animation-model";
|
|
618
|
+
let R = class {
|
|
619
619
|
constructor(e, t, r) {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
620
|
+
a(this, "id");
|
|
621
|
+
a(this, "logger");
|
|
622
|
+
a(this, "disableAll");
|
|
623
|
+
a(this, "enableDial");
|
|
624
|
+
a(this, "enableModal");
|
|
625
|
+
a(this, "enableSideBar");
|
|
626
626
|
this.id = e, this.logger = r.logger;
|
|
627
627
|
}
|
|
628
628
|
};
|
|
629
|
-
|
|
630
|
-
|
|
629
|
+
fe([
|
|
630
|
+
d({
|
|
631
631
|
path: "app:kosdev.ddk:app",
|
|
632
632
|
attribute: "ncui.uiConfig.animations.disableAll"
|
|
633
633
|
})
|
|
634
|
-
],
|
|
635
|
-
|
|
636
|
-
|
|
634
|
+
], R.prototype, "disableAll", 2);
|
|
635
|
+
fe([
|
|
636
|
+
d({
|
|
637
637
|
path: "app:kosdev.ddk:app",
|
|
638
638
|
attribute: "ncui.uiConfig.animations.enableDial"
|
|
639
639
|
})
|
|
640
|
-
],
|
|
641
|
-
|
|
642
|
-
|
|
640
|
+
], R.prototype, "enableDial", 2);
|
|
641
|
+
fe([
|
|
642
|
+
d({
|
|
643
643
|
path: "app:kosdev.ddk:app",
|
|
644
644
|
attribute: "ncui.uiConfig.animations.enableModal"
|
|
645
645
|
})
|
|
646
|
-
],
|
|
647
|
-
|
|
648
|
-
|
|
646
|
+
], R.prototype, "enableModal", 2);
|
|
647
|
+
fe([
|
|
648
|
+
d({
|
|
649
649
|
path: "app:kosdev.ddk:app",
|
|
650
650
|
attribute: "ncui.uiConfig.animations.enableSideBar"
|
|
651
651
|
})
|
|
652
|
-
],
|
|
653
|
-
|
|
654
|
-
l(
|
|
655
|
-
],
|
|
656
|
-
const
|
|
652
|
+
], R.prototype, "enableSideBar", 2);
|
|
653
|
+
R = fe([
|
|
654
|
+
l(q)
|
|
655
|
+
], R);
|
|
656
|
+
const Co = {
|
|
657
657
|
registration: {
|
|
658
|
-
[
|
|
659
|
-
class:
|
|
658
|
+
[q]: {
|
|
659
|
+
class: R,
|
|
660
660
|
singleton: !0
|
|
661
661
|
}
|
|
662
662
|
},
|
|
663
|
-
type:
|
|
664
|
-
predicate: c(
|
|
665
|
-
factory:
|
|
666
|
-
}, { URL:
|
|
667
|
-
basePath: `${
|
|
668
|
-
}),
|
|
663
|
+
type: q,
|
|
664
|
+
predicate: c(q),
|
|
665
|
+
factory: u.Singleton.create(q)
|
|
666
|
+
}, { URL: wo } = h("ANIMATION_SERVICE"), { getAll: Eo } = f.build({
|
|
667
|
+
basePath: `${wo}/api/animation`
|
|
668
|
+
}), Lo = g.createLogger({
|
|
669
669
|
name: "animation-service",
|
|
670
670
|
group: "Services"
|
|
671
|
-
}),
|
|
671
|
+
}), Do = async () => (Lo.debug("sending GET for animation"), await Eo({})), Ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
672
672
|
__proto__: null,
|
|
673
|
-
getAnimations:
|
|
674
|
-
}, Symbol.toStringTag, { value: "Module" })), { URL:
|
|
675
|
-
basePath: `${
|
|
676
|
-
}),
|
|
673
|
+
getAnimations: Do
|
|
674
|
+
}, Symbol.toStringTag, { value: "Module" })), { URL: V } = h("FCM-PUMP_SERVICE"), { postModel: me } = f.build({
|
|
675
|
+
basePath: `${V}/api/fcm-pump`
|
|
676
|
+
}), y = g.createLogger({
|
|
677
677
|
name: "fcm-pump-service",
|
|
678
678
|
group: "Services"
|
|
679
|
-
}),
|
|
680
|
-
var t, r,
|
|
681
|
-
|
|
679
|
+
}), Vt = async (e) => {
|
|
680
|
+
var t, r, i, o, n;
|
|
681
|
+
y.debug(
|
|
682
682
|
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
683
683
|
);
|
|
684
684
|
try {
|
|
685
|
-
const
|
|
685
|
+
const s = await me({
|
|
686
686
|
model: {},
|
|
687
|
-
urlOverride: `${
|
|
687
|
+
urlOverride: `${V}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
688
688
|
});
|
|
689
|
-
return
|
|
690
|
-
} catch (
|
|
691
|
-
if (
|
|
689
|
+
return y.debug("performElectricalTest - response:", s), ((s == null ? void 0 : s.status) === 200 || (s == null ? void 0 : s.status) === 499) && ((t = s.data) != null && t.error) ? [s.data.error || "unknownError", s.data] : [void 0, s == null ? void 0 : s.data];
|
|
690
|
+
} catch (s) {
|
|
691
|
+
if (y.error(
|
|
692
692
|
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
|
|
693
|
-
|
|
694
|
-
),
|
|
695
|
-
const
|
|
696
|
-
return [
|
|
693
|
+
s
|
|
694
|
+
), s instanceof Ie) {
|
|
695
|
+
const O = ((i = (r = s.payload) == null ? void 0 : r.data) == null ? void 0 : i.error) || ((o = s.payload) == null ? void 0 : o.error) || "unknownError";
|
|
696
|
+
return [O, ((n = s.payload) == null ? void 0 : n.data) || { error: O }];
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
return ["unknownError", { error: "unknownError" }];
|
|
700
|
-
},
|
|
701
|
-
|
|
700
|
+
}, Ht = async (e, t) => {
|
|
701
|
+
y.debug(
|
|
702
702
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
|
|
703
703
|
);
|
|
704
704
|
try {
|
|
705
|
-
const r = await
|
|
705
|
+
const r = await me({
|
|
706
706
|
model: {},
|
|
707
|
-
urlOverride: `${
|
|
707
|
+
urlOverride: `${V}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
708
708
|
tracker: t
|
|
709
709
|
});
|
|
710
|
-
return
|
|
710
|
+
return y.debug("performPreCalibrate - response:", r), r != null && r.data && P.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
711
711
|
} catch (r) {
|
|
712
|
-
|
|
712
|
+
y.error(
|
|
713
713
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
714
714
|
r
|
|
715
715
|
);
|
|
716
|
-
const
|
|
716
|
+
const i = {
|
|
717
717
|
id: t || "",
|
|
718
718
|
endState: b.Fail,
|
|
719
719
|
tracker: t,
|
|
720
720
|
reason: "Failed to resolve trouble"
|
|
721
721
|
};
|
|
722
|
-
return
|
|
722
|
+
return P.initiateFuture(i), i;
|
|
723
723
|
}
|
|
724
|
-
},
|
|
725
|
-
|
|
724
|
+
}, Wt = async (e, t) => {
|
|
725
|
+
y.debug(
|
|
726
726
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
|
|
727
727
|
);
|
|
728
728
|
try {
|
|
729
|
-
const r = await
|
|
729
|
+
const r = await me({
|
|
730
730
|
model: {},
|
|
731
|
-
urlOverride: `${
|
|
731
|
+
urlOverride: `${V}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
732
732
|
tracker: t
|
|
733
733
|
});
|
|
734
|
-
return
|
|
734
|
+
return y.debug("performPreCalibrate - response:", r), r != null && r.data && P.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
735
735
|
} catch (r) {
|
|
736
|
-
|
|
736
|
+
y.error(
|
|
737
737
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
738
738
|
r
|
|
739
739
|
);
|
|
740
|
-
const
|
|
740
|
+
const i = {
|
|
741
741
|
id: t || "",
|
|
742
742
|
endState: b.Fail,
|
|
743
743
|
tracker: t,
|
|
744
744
|
reason: "Failed to resolve trouble"
|
|
745
745
|
};
|
|
746
|
-
return
|
|
746
|
+
return P.initiateFuture(i), i;
|
|
747
747
|
}
|
|
748
|
-
},
|
|
749
|
-
|
|
748
|
+
}, zt = async (e, t, r) => {
|
|
749
|
+
y.debug(
|
|
750
750
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
|
|
751
751
|
);
|
|
752
752
|
try {
|
|
753
|
-
const
|
|
753
|
+
const i = await me({
|
|
754
754
|
model: {},
|
|
755
|
-
urlOverride: `${
|
|
755
|
+
urlOverride: `${V}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
756
756
|
tracker: r
|
|
757
757
|
});
|
|
758
|
-
return
|
|
759
|
-
} catch (
|
|
760
|
-
|
|
758
|
+
return y.debug("performVerify - response:", i), i != null && i.data && P.initiateFuture(i.data), i == null ? void 0 : i.data;
|
|
759
|
+
} catch (i) {
|
|
760
|
+
y.error(
|
|
761
761
|
`performVerify - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
762
|
-
|
|
762
|
+
i
|
|
763
763
|
);
|
|
764
764
|
const o = {
|
|
765
765
|
id: r || "",
|
|
@@ -767,46 +767,46 @@ const ho = {
|
|
|
767
767
|
tracker: r,
|
|
768
768
|
reason: "Failed to resolve trouble"
|
|
769
769
|
};
|
|
770
|
-
return
|
|
770
|
+
return P.initiateFuture(o), o;
|
|
771
771
|
}
|
|
772
|
-
},
|
|
773
|
-
|
|
772
|
+
}, Nt = async (e, t, r) => {
|
|
773
|
+
y.debug(
|
|
774
774
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
775
775
|
);
|
|
776
776
|
try {
|
|
777
|
-
const
|
|
777
|
+
const i = await me({
|
|
778
778
|
model: {},
|
|
779
|
-
urlOverride: `${
|
|
779
|
+
urlOverride: `${V}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
780
780
|
});
|
|
781
|
-
return
|
|
782
|
-
} catch (
|
|
783
|
-
|
|
781
|
+
return y.debug("performPreCalibrate - response:", i), i == null ? void 0 : i.data;
|
|
782
|
+
} catch (i) {
|
|
783
|
+
y.error(
|
|
784
784
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
|
|
785
|
-
|
|
785
|
+
i
|
|
786
786
|
);
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
|
-
},
|
|
789
|
+
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
790
790
|
__proto__: null,
|
|
791
|
-
performCalibrate:
|
|
792
|
-
performComplete:
|
|
793
|
-
performElectricalTest:
|
|
794
|
-
performPreCalibrate:
|
|
795
|
-
performVerify:
|
|
791
|
+
performCalibrate: Wt,
|
|
792
|
+
performComplete: Nt,
|
|
793
|
+
performElectricalTest: Vt,
|
|
794
|
+
performPreCalibrate: Ht,
|
|
795
|
+
performVerify: zt
|
|
796
796
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
797
|
-
var
|
|
798
|
-
for (var o =
|
|
799
|
-
(
|
|
800
|
-
return
|
|
797
|
+
var Ro = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, je = (e, t, r, i) => {
|
|
798
|
+
for (var o = i > 1 ? void 0 : i ? Io(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
799
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
800
|
+
return i && o && Ro(t, r, o), o;
|
|
801
801
|
};
|
|
802
|
-
const
|
|
803
|
-
let
|
|
802
|
+
const Bt = "fcm-pump-model", ko = g.createLogger({ name: "fcm-pump-model" });
|
|
803
|
+
let k = class {
|
|
804
804
|
constructor(e, t, r) {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new
|
|
805
|
+
a(this, "id");
|
|
806
|
+
a(this, "logger");
|
|
807
|
+
a(this, "pumpModel");
|
|
808
|
+
a(this, "futureHandler");
|
|
809
|
+
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new ge(this);
|
|
810
810
|
}
|
|
811
811
|
get future() {
|
|
812
812
|
return this.futureHandler.future;
|
|
@@ -827,23 +827,23 @@ let D = class {
|
|
|
827
827
|
return this.pumpModel.performIntent(e);
|
|
828
828
|
}
|
|
829
829
|
async performElectricalTest() {
|
|
830
|
-
const [e, t] = await
|
|
831
|
-
return e &&
|
|
830
|
+
const [e, t] = await Vt(this.pumpModel.path);
|
|
831
|
+
return e && ko.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
|
|
832
832
|
}
|
|
833
833
|
getChildren() {
|
|
834
834
|
return [...this.futureHandler.allFutures];
|
|
835
835
|
}
|
|
836
836
|
async performPreCalibrate(e) {
|
|
837
|
-
return
|
|
837
|
+
return Ht(this.pumpModel.path, e);
|
|
838
838
|
}
|
|
839
839
|
async performCalibrate(e) {
|
|
840
|
-
return
|
|
840
|
+
return Wt(this.pumpModel.path, e);
|
|
841
841
|
}
|
|
842
842
|
async performVerify(e, t) {
|
|
843
|
-
return
|
|
843
|
+
return zt(this.pumpModel.path, e, t);
|
|
844
844
|
}
|
|
845
845
|
async performComplete(e, t) {
|
|
846
|
-
return
|
|
846
|
+
return Nt(this.pumpModel.path, e, t);
|
|
847
847
|
}
|
|
848
848
|
// -------------------LIFECYCLE----------------------------
|
|
849
849
|
async init() {
|
|
@@ -853,38 +853,38 @@ let D = class {
|
|
|
853
853
|
this.logger.debug(`loading fcm-pump ${this.id}`);
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
],
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
],
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
],
|
|
865
|
-
|
|
866
|
-
l(
|
|
867
|
-
],
|
|
868
|
-
const
|
|
869
|
-
class:
|
|
870
|
-
type:
|
|
856
|
+
je([
|
|
857
|
+
v()
|
|
858
|
+
], k.prototype, "performPreCalibrate", 1);
|
|
859
|
+
je([
|
|
860
|
+
v()
|
|
861
|
+
], k.prototype, "performCalibrate", 1);
|
|
862
|
+
je([
|
|
863
|
+
v()
|
|
864
|
+
], k.prototype, "performVerify", 1);
|
|
865
|
+
k = je([
|
|
866
|
+
l(Bt)
|
|
867
|
+
], k);
|
|
868
|
+
const Kt = new Le({
|
|
869
|
+
class: k,
|
|
870
|
+
type: Bt
|
|
871
871
|
});
|
|
872
|
-
var
|
|
873
|
-
for (var o =
|
|
874
|
-
(
|
|
875
|
-
return
|
|
872
|
+
var Fo = Object.defineProperty, xo = Object.getOwnPropertyDescriptor, Yt = (e, t, r, i) => {
|
|
873
|
+
for (var o = i > 1 ? void 0 : i ? xo(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
874
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
875
|
+
return i && o && Fo(t, r, o), o;
|
|
876
876
|
};
|
|
877
|
-
const
|
|
878
|
-
let
|
|
877
|
+
const G = "carb-water-model";
|
|
878
|
+
let $e = class {
|
|
879
879
|
constructor(e, t, r) {
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
880
|
+
a(this, "id");
|
|
881
|
+
a(this, "assemblyModel");
|
|
882
|
+
a(this, "logger");
|
|
883
883
|
this.id = e, this.logger = r.logger;
|
|
884
884
|
}
|
|
885
885
|
getPump() {
|
|
886
886
|
const t = this.assemblyModel.getHoldersByGroup("carb")[0].pumps.data[0];
|
|
887
|
-
return
|
|
887
|
+
return $t(t, Kt.type);
|
|
888
888
|
}
|
|
889
889
|
// -------------------LIFECYCLE----------------------------
|
|
890
890
|
async init() {
|
|
@@ -894,109 +894,111 @@ let ye = class {
|
|
|
894
894
|
this.logger.debug(`loading carb-water ${this.id}`);
|
|
895
895
|
}
|
|
896
896
|
};
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
],
|
|
900
|
-
|
|
901
|
-
l(
|
|
902
|
-
],
|
|
903
|
-
const
|
|
897
|
+
Yt([
|
|
898
|
+
m({ modelType: Fe.type })
|
|
899
|
+
], $e.prototype, "assemblyModel", 2);
|
|
900
|
+
$e = Yt([
|
|
901
|
+
l(G)
|
|
902
|
+
], $e);
|
|
903
|
+
const Ao = {
|
|
904
904
|
registration: {
|
|
905
|
-
[
|
|
906
|
-
class:
|
|
905
|
+
[G]: {
|
|
906
|
+
class: $e,
|
|
907
907
|
singleton: !1
|
|
908
908
|
}
|
|
909
909
|
},
|
|
910
|
-
type:
|
|
911
|
-
predicate: c(
|
|
912
|
-
factory:
|
|
913
|
-
}, { URL:
|
|
914
|
-
basePath: `${
|
|
915
|
-
}),
|
|
910
|
+
type: G,
|
|
911
|
+
predicate: c(G),
|
|
912
|
+
factory: u.Factory.create(G)
|
|
913
|
+
}, { URL: H } = h("COPY-LOGS_SERVICE"), { getAll: jo, getOne: Uo, postModel: qt, deleteModel: Vo } = f.build({
|
|
914
|
+
basePath: `${H}/api/copy-logs`
|
|
915
|
+
}), Pe = g.createLogger({
|
|
916
916
|
name: "copy-logs-service",
|
|
917
917
|
group: "Services"
|
|
918
|
-
}),
|
|
919
|
-
const r = await
|
|
918
|
+
}), Gt = async (e, t) => {
|
|
919
|
+
const r = await Vo({
|
|
920
920
|
tracker: t,
|
|
921
921
|
id: e,
|
|
922
|
-
urlOverride: `${
|
|
922
|
+
urlOverride: `${H}/api/app/kosdev.ddk/copyLogs/${e}`
|
|
923
923
|
});
|
|
924
924
|
if (!(r != null && r.data))
|
|
925
925
|
throw new Error("No response from server");
|
|
926
926
|
return r.data;
|
|
927
|
-
},
|
|
928
|
-
const r = await
|
|
927
|
+
}, Qt = async (e, t) => {
|
|
928
|
+
const r = await qt({
|
|
929
929
|
model: {},
|
|
930
930
|
tracker: t,
|
|
931
|
-
urlOverride: `${
|
|
931
|
+
urlOverride: `${H}/api/app/kosdev.ddk/copyLogs/eraseAndCopy/${e}`
|
|
932
932
|
});
|
|
933
933
|
if (!(r != null && r.data))
|
|
934
934
|
throw new Error("No response from server");
|
|
935
935
|
return r.data;
|
|
936
|
-
},
|
|
937
|
-
const r = await
|
|
936
|
+
}, Xt = async (e, t) => {
|
|
937
|
+
const r = await qt({
|
|
938
938
|
model: {},
|
|
939
939
|
tracker: t,
|
|
940
|
-
urlOverride: `${
|
|
940
|
+
urlOverride: `${H}/api/app/kosdev.ddk/copyLogs/${e}`
|
|
941
941
|
});
|
|
942
942
|
if (!(r != null && r.data))
|
|
943
943
|
throw new Error("No response from server");
|
|
944
944
|
return r.data;
|
|
945
|
-
},
|
|
946
|
-
|
|
945
|
+
}, Jt = async () => {
|
|
946
|
+
Pe.debug("sending GET for copy-logs");
|
|
947
947
|
try {
|
|
948
|
-
const e = await
|
|
949
|
-
urlOverride: `${
|
|
948
|
+
const e = await jo({
|
|
949
|
+
urlOverride: `${H}/api/app/kosdev.ddk/copyLogs/volumes/size`
|
|
950
950
|
});
|
|
951
951
|
return [void 0, e == null ? void 0 : e.data];
|
|
952
952
|
} catch (e) {
|
|
953
|
-
if (e instanceof
|
|
954
|
-
return
|
|
953
|
+
if (e instanceof Ie)
|
|
954
|
+
return Pe.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
|
|
955
955
|
}
|
|
956
956
|
return ["unknownError", void 0];
|
|
957
|
-
},
|
|
958
|
-
|
|
957
|
+
}, Zt = async () => {
|
|
958
|
+
Pe.debug("sending GET for log file size");
|
|
959
959
|
try {
|
|
960
|
-
const e = await
|
|
961
|
-
urlOverride: `${
|
|
960
|
+
const e = await Uo({
|
|
961
|
+
urlOverride: `${H}/api/app/kosdev.ddk/copyLogs/files/size`
|
|
962
962
|
});
|
|
963
963
|
return [void 0, e == null ? void 0 : e.data];
|
|
964
964
|
} catch (e) {
|
|
965
|
-
if (e instanceof
|
|
966
|
-
return
|
|
965
|
+
if (e instanceof Ie)
|
|
966
|
+
return Pe.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
|
|
967
967
|
}
|
|
968
968
|
return ["unknownError", void 0];
|
|
969
|
-
},
|
|
969
|
+
}, Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
970
970
|
__proto__: null,
|
|
971
|
-
copyLogFromVolume:
|
|
972
|
-
eraseAndCopyLogsToVolume:
|
|
973
|
-
eraseVolume:
|
|
974
|
-
getLogFileSize:
|
|
975
|
-
getVolumes:
|
|
971
|
+
copyLogFromVolume: Xt,
|
|
972
|
+
eraseAndCopyLogsToVolume: Qt,
|
|
973
|
+
eraseVolume: Gt,
|
|
974
|
+
getLogFileSize: Zt,
|
|
975
|
+
getVolumes: Jt
|
|
976
976
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
977
|
-
var
|
|
978
|
-
for (var o =
|
|
979
|
-
(
|
|
980
|
-
return
|
|
977
|
+
var Ho = Object.defineProperty, Wo = Object.getOwnPropertyDescriptor, W = (e, t, r, i) => {
|
|
978
|
+
for (var o = i > 1 ? void 0 : i ? Wo(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
979
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
980
|
+
return i && o && Ho(t, r, o), o;
|
|
981
981
|
};
|
|
982
|
-
const
|
|
983
|
-
let
|
|
982
|
+
const er = "copy-logs-model";
|
|
983
|
+
let w = class {
|
|
984
984
|
constructor(e, t, r) {
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
this
|
|
985
|
+
a(this, "id");
|
|
986
|
+
a(this, "logger");
|
|
987
|
+
a(this, "_volumes");
|
|
988
|
+
// Only declare what's needed internally - setupCompleteFutureSupport() handles the rest
|
|
989
|
+
a(this, "futureHandler");
|
|
990
|
+
a(this, "future");
|
|
991
|
+
a(this, "storageDeviceContainer");
|
|
992
|
+
a(this, "_activeVolume");
|
|
993
|
+
a(this, "_logFileSize", 0);
|
|
994
|
+
a(this, "_actionState", "idle");
|
|
995
|
+
a(this, "copyProgress");
|
|
996
|
+
this.id = e, this.logger = r.logger, this._volumes = new Nr(), this._activeVolume = void 0, this.copyProgress = {
|
|
995
997
|
bytesCopied: 0,
|
|
996
998
|
bytesToCopy: 0,
|
|
997
999
|
filesCopied: 0,
|
|
998
1000
|
filesSkipped: 0
|
|
999
|
-
};
|
|
1001
|
+
}, Br(this);
|
|
1000
1002
|
}
|
|
1001
1003
|
// -------------------LIFECYCLE----------------------------
|
|
1002
1004
|
get volumes() {
|
|
@@ -1026,9 +1028,6 @@ let O = class {
|
|
|
1026
1028
|
get canCopyLogs() {
|
|
1027
1029
|
return this.inserted && this._activeVolume;
|
|
1028
1030
|
}
|
|
1029
|
-
get future() {
|
|
1030
|
-
return this.futureHandler.future;
|
|
1031
|
-
}
|
|
1032
1031
|
get actionState() {
|
|
1033
1032
|
return this._actionState;
|
|
1034
1033
|
}
|
|
@@ -1037,16 +1036,16 @@ let O = class {
|
|
|
1037
1036
|
return ((e = this.future) == null ? void 0 : e.status) === b.Success && this.copyProgress.filesSkipped > 0;
|
|
1038
1037
|
}
|
|
1039
1038
|
onFutureUpdate(e) {
|
|
1040
|
-
this.logger.info(`Future update: ${e.status}`), e.status === b.Success && (this.logger.info(`Future success: ${e.status}`), this.diskFull &&
|
|
1039
|
+
this.logger.info(`Future update: ${e.status}`), e.status === b.Success && (this.logger.info(`Future success: ${e.status}`), this.diskFull && _(() => {
|
|
1041
1040
|
e.endState = b.Fail, e.reason = "errDiskFull";
|
|
1042
|
-
})), e.status === b.Fail && this.logger.error(`Future failed: ${e.status}`), e.note === "copy" ?
|
|
1041
|
+
})), e.status === b.Fail && this.logger.error(`Future failed: ${e.status}`), e.note === "copy" ? _(() => {
|
|
1043
1042
|
this._actionState = "copying", this.copyProgress = e.clientData || {
|
|
1044
1043
|
bytesCopied: 0,
|
|
1045
1044
|
bytesToCopy: 0,
|
|
1046
1045
|
filesCopied: 0,
|
|
1047
1046
|
filesSkipped: 0
|
|
1048
1047
|
};
|
|
1049
|
-
}) : (this._actionState = "erasing",
|
|
1048
|
+
}) : (this._actionState = "erasing", _(() => {
|
|
1050
1049
|
this.copyProgress = {
|
|
1051
1050
|
bytesCopied: 0,
|
|
1052
1051
|
bytesToCopy: 0,
|
|
@@ -1059,31 +1058,31 @@ let O = class {
|
|
|
1059
1058
|
var t;
|
|
1060
1059
|
if (!e)
|
|
1061
1060
|
throw new Error("No tracker provided");
|
|
1062
|
-
if (
|
|
1061
|
+
if (_(() => {
|
|
1063
1062
|
this._actionState = "erasing";
|
|
1064
1063
|
}), !this._activeVolume)
|
|
1065
1064
|
throw this.logger.error("No active volume selected"), new Error("No active volume selected");
|
|
1066
|
-
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`),
|
|
1065
|
+
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), Qt(this._activeVolume.id, e);
|
|
1067
1066
|
}
|
|
1068
1067
|
async eraseVolume(e) {
|
|
1069
1068
|
var t;
|
|
1070
1069
|
if (!e)
|
|
1071
1070
|
throw new Error("No tracker provided");
|
|
1072
|
-
if (
|
|
1071
|
+
if (_(() => {
|
|
1073
1072
|
this._actionState = "erasing";
|
|
1074
1073
|
}), !this._activeVolume)
|
|
1075
1074
|
throw this.logger.error("No active volume selected"), new Error("No active volume selected");
|
|
1076
|
-
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`),
|
|
1075
|
+
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), Gt(this._activeVolume.id, e);
|
|
1077
1076
|
}
|
|
1078
1077
|
async copyLogs(e) {
|
|
1079
1078
|
var t;
|
|
1080
1079
|
if (!e)
|
|
1081
1080
|
throw new Error("No tracker provided");
|
|
1082
|
-
if (
|
|
1081
|
+
if (_(() => {
|
|
1083
1082
|
this._actionState = "copying";
|
|
1084
1083
|
}), !this._activeVolume)
|
|
1085
1084
|
throw this.logger.error("No active volume selected"), new Error("No active volume selected");
|
|
1086
|
-
return this.logger.info(`Copying logs to ${(t = this._activeVolume) == null ? void 0 : t.name}`),
|
|
1085
|
+
return this.logger.info(`Copying logs to ${(t = this._activeVolume) == null ? void 0 : t.name}`), Xt(this._activeVolume.id, e);
|
|
1087
1086
|
}
|
|
1088
1087
|
handleInsertion() {
|
|
1089
1088
|
this.inserted ? this.syncVolumes() : (this._volumes.clear(), this.clearActiveVolume());
|
|
@@ -1092,7 +1091,7 @@ let O = class {
|
|
|
1092
1091
|
this.logger.debug(`initializing copy-logs ${this.id}`);
|
|
1093
1092
|
}
|
|
1094
1093
|
async syncVolumes() {
|
|
1095
|
-
const [e, t] = await
|
|
1094
|
+
const [e, t] = await Jt(), [r, i] = await Zt();
|
|
1096
1095
|
if (r) {
|
|
1097
1096
|
this.logger.error(`Error fetching log file size: ${r}`);
|
|
1098
1097
|
return;
|
|
@@ -1102,17 +1101,17 @@ let O = class {
|
|
|
1102
1101
|
return;
|
|
1103
1102
|
}
|
|
1104
1103
|
t && (t.forEach((o) => {
|
|
1105
|
-
const
|
|
1106
|
-
if (
|
|
1107
|
-
const
|
|
1104
|
+
const n = this.storageDeviceContainer.getModel(o.id);
|
|
1105
|
+
if (n) {
|
|
1106
|
+
const s = {
|
|
1108
1107
|
id: o.id,
|
|
1109
|
-
name:
|
|
1108
|
+
name: n.label,
|
|
1110
1109
|
freeBytes: o.info.freeBytes,
|
|
1111
1110
|
totalBytes: o.info.totalBytes
|
|
1112
1111
|
};
|
|
1113
|
-
this._volumes.addModel(
|
|
1112
|
+
this._volumes.addModel(s);
|
|
1114
1113
|
}
|
|
1115
|
-
}), t.length === 1 ? this.updateActiveVolume(this._volumes.data[0]) : this.clearActiveVolume()),
|
|
1114
|
+
}), t.length === 1 ? this.updateActiveVolume(this._volumes.data[0]) : this.clearActiveVolume()), i && (this.logger.info(`Log file size: ${i}`), this.updateLogFileSize(parseInt(i, 10)));
|
|
1116
1115
|
}
|
|
1117
1116
|
async activate() {
|
|
1118
1117
|
this.logger.debug(`activating copy-logs ${this.id}`), await this.syncVolumes();
|
|
@@ -1121,77 +1120,77 @@ let O = class {
|
|
|
1121
1120
|
this.logger.debug(`loading copy-logs ${this.id}`);
|
|
1122
1121
|
}
|
|
1123
1122
|
};
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
],
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
],
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
],
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
],
|
|
1136
|
-
|
|
1137
|
-
|
|
1123
|
+
W([
|
|
1124
|
+
m({ modelType: zr.type })
|
|
1125
|
+
], w.prototype, "storageDeviceContainer", 2);
|
|
1126
|
+
W([
|
|
1127
|
+
v()
|
|
1128
|
+
], w.prototype, "eraseAndCopyVolume", 1);
|
|
1129
|
+
W([
|
|
1130
|
+
v()
|
|
1131
|
+
], w.prototype, "eraseVolume", 1);
|
|
1132
|
+
W([
|
|
1133
|
+
v()
|
|
1134
|
+
], w.prototype, "copyLogs", 1);
|
|
1135
|
+
W([
|
|
1136
|
+
_t({
|
|
1138
1137
|
dependencies: (e) => [e.inserted]
|
|
1139
1138
|
})
|
|
1140
|
-
],
|
|
1141
|
-
|
|
1142
|
-
l(
|
|
1143
|
-
],
|
|
1144
|
-
const
|
|
1145
|
-
class:
|
|
1146
|
-
type:
|
|
1147
|
-
}),
|
|
1139
|
+
], w.prototype, "handleInsertion", 1);
|
|
1140
|
+
w = W([
|
|
1141
|
+
l(er)
|
|
1142
|
+
], w);
|
|
1143
|
+
const ks = new pe({
|
|
1144
|
+
class: w,
|
|
1145
|
+
type: er
|
|
1146
|
+
}), tr = g.createLogger({
|
|
1148
1147
|
name: "dashboard-operations-service",
|
|
1149
1148
|
group: "Services"
|
|
1150
|
-
}),
|
|
1149
|
+
}), rr = async (e, t) => (tr.debug("resolveAll"), await Re.bulkResolveTroubles(
|
|
1151
1150
|
e,
|
|
1152
1151
|
t
|
|
1153
|
-
)),
|
|
1152
|
+
)), or = async (e, t) => (tr.debug("resolveTrouble"), await Re.resolveTrouble(e, t)), Fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1154
1153
|
__proto__: null,
|
|
1155
|
-
resolveAll:
|
|
1156
|
-
resolveTrouble:
|
|
1154
|
+
resolveAll: rr,
|
|
1155
|
+
resolveTrouble: or
|
|
1157
1156
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1158
|
-
var
|
|
1159
|
-
for (var o =
|
|
1160
|
-
(
|
|
1161
|
-
return
|
|
1157
|
+
var zo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, Ue = (e, t, r, i) => {
|
|
1158
|
+
for (var o = i > 1 ? void 0 : i ? No(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1159
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1160
|
+
return i && o && zo(t, r, o), o;
|
|
1162
1161
|
};
|
|
1163
|
-
const
|
|
1164
|
-
function
|
|
1162
|
+
const Q = "dashboard-operations-model";
|
|
1163
|
+
function yt(e) {
|
|
1165
1164
|
return !e.deferred;
|
|
1166
1165
|
}
|
|
1167
|
-
function
|
|
1166
|
+
function bt(e) {
|
|
1168
1167
|
return e.deferred;
|
|
1169
1168
|
}
|
|
1170
|
-
let
|
|
1169
|
+
let F = class {
|
|
1171
1170
|
constructor(e, t, r) {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
this.id = e, this.futureHandler = new
|
|
1171
|
+
a(this, "id");
|
|
1172
|
+
a(this, "troubles");
|
|
1173
|
+
a(this, "futureHandler");
|
|
1174
|
+
a(this, "logger");
|
|
1175
|
+
this.id = e, this.futureHandler = new ge(this), this.logger = r.logger;
|
|
1177
1176
|
}
|
|
1178
1177
|
get troublesByType() {
|
|
1179
1178
|
return this.troubles.troubles.data.reduce(
|
|
1180
|
-
|
|
1179
|
+
Kr,
|
|
1181
1180
|
{}
|
|
1182
1181
|
);
|
|
1183
1182
|
}
|
|
1184
1183
|
get queuedPurgeTroubles() {
|
|
1185
|
-
return this.purgeTroubles.filter(
|
|
1184
|
+
return this.purgeTroubles.filter(bt);
|
|
1186
1185
|
}
|
|
1187
1186
|
get queuedPrimeTroubles() {
|
|
1188
|
-
return this.primeTroubles.filter(
|
|
1187
|
+
return this.primeTroubles.filter(bt);
|
|
1189
1188
|
}
|
|
1190
1189
|
get resolvablePrimeTroubles() {
|
|
1191
|
-
return this.primeTroubles.filter(
|
|
1190
|
+
return this.primeTroubles.filter(yt);
|
|
1192
1191
|
}
|
|
1193
1192
|
get resolvablePurgeTroubles() {
|
|
1194
|
-
return this.purgeTroubles.filter(
|
|
1193
|
+
return this.purgeTroubles.filter(yt);
|
|
1195
1194
|
}
|
|
1196
1195
|
get hasResolvablePurgeTroubles() {
|
|
1197
1196
|
return this.resolvablePurgeTroubles.length > 0;
|
|
@@ -1206,10 +1205,10 @@ let k = class {
|
|
|
1206
1205
|
return this.primeTroubles.length > 0;
|
|
1207
1206
|
}
|
|
1208
1207
|
get purgeTroubles() {
|
|
1209
|
-
return this.troublesByType[
|
|
1208
|
+
return this.troublesByType[gt] || [];
|
|
1210
1209
|
}
|
|
1211
1210
|
get primeTroubles() {
|
|
1212
|
-
return this.troublesByType[
|
|
1211
|
+
return this.troublesByType[Zr] || [];
|
|
1213
1212
|
}
|
|
1214
1213
|
get future() {
|
|
1215
1214
|
return this.futureHandler.getFuture();
|
|
@@ -1217,17 +1216,17 @@ let k = class {
|
|
|
1217
1216
|
async resolveAllTroubles(e, t) {
|
|
1218
1217
|
if (!t)
|
|
1219
1218
|
throw new Error("No tracker provided");
|
|
1220
|
-
const r = e ===
|
|
1221
|
-
r.filter((
|
|
1222
|
-
this.logger.info(`Deferring trouble ${
|
|
1219
|
+
const r = e === gt ? this.purgeTroubles : this.primeTroubles;
|
|
1220
|
+
r.filter((s) => s.shouldDefer).forEach((s) => {
|
|
1221
|
+
this.logger.info(`Deferring trouble ${s.rawId}`), s.defer();
|
|
1223
1222
|
});
|
|
1224
|
-
const o = r.filter((
|
|
1225
|
-
return o.length === 0 ? void 0 : await
|
|
1223
|
+
const o = r.filter((s) => !s.shouldDefer).map((s) => s.rawId);
|
|
1224
|
+
return o.length === 0 ? void 0 : await rr(o, t);
|
|
1226
1225
|
}
|
|
1227
1226
|
async resolveTrouble(e, t) {
|
|
1228
1227
|
if (!t)
|
|
1229
1228
|
throw new Error("No tracker provided");
|
|
1230
|
-
return await
|
|
1229
|
+
return await or(e, t);
|
|
1231
1230
|
}
|
|
1232
1231
|
// -------------------LIFECYCLE----------------------------
|
|
1233
1232
|
async init() {
|
|
@@ -1237,39 +1236,39 @@ let k = class {
|
|
|
1237
1236
|
this.logger.debug(`loading dashboard-operations ${this.id}`);
|
|
1238
1237
|
}
|
|
1239
1238
|
};
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
],
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
],
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
],
|
|
1249
|
-
|
|
1250
|
-
l(
|
|
1251
|
-
],
|
|
1252
|
-
const
|
|
1239
|
+
Ue([
|
|
1240
|
+
m({ modelType: rt.type })
|
|
1241
|
+
], F.prototype, "troubles", 2);
|
|
1242
|
+
Ue([
|
|
1243
|
+
v()
|
|
1244
|
+
], F.prototype, "resolveAllTroubles", 1);
|
|
1245
|
+
Ue([
|
|
1246
|
+
v()
|
|
1247
|
+
], F.prototype, "resolveTrouble", 1);
|
|
1248
|
+
F = Ue([
|
|
1249
|
+
l(Q)
|
|
1250
|
+
], F);
|
|
1251
|
+
const nt = {
|
|
1253
1252
|
registration: {
|
|
1254
|
-
[
|
|
1255
|
-
class:
|
|
1253
|
+
[Q]: {
|
|
1254
|
+
class: F,
|
|
1256
1255
|
singleton: !0
|
|
1257
1256
|
}
|
|
1258
1257
|
},
|
|
1259
|
-
type:
|
|
1260
|
-
predicate: c(
|
|
1261
|
-
factory:
|
|
1258
|
+
type: Q,
|
|
1259
|
+
predicate: c(Q),
|
|
1260
|
+
factory: u.Singleton.create(Q)
|
|
1262
1261
|
};
|
|
1263
|
-
var
|
|
1264
|
-
for (var o =
|
|
1265
|
-
(
|
|
1266
|
-
return
|
|
1262
|
+
var Bo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, Yo = (e, t, r, i) => {
|
|
1263
|
+
for (var o = i > 1 ? void 0 : i ? Ko(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1264
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1265
|
+
return i && o && Bo(t, r, o), o;
|
|
1267
1266
|
};
|
|
1268
|
-
const
|
|
1269
|
-
let
|
|
1267
|
+
const X = "dispenser-model";
|
|
1268
|
+
let qe = class {
|
|
1270
1269
|
constructor(e, t, r) {
|
|
1271
|
-
|
|
1272
|
-
|
|
1270
|
+
a(this, "id");
|
|
1271
|
+
a(this, "logger");
|
|
1273
1272
|
this.id = e, this.logger = r.logger;
|
|
1274
1273
|
}
|
|
1275
1274
|
updateModel() {
|
|
@@ -1282,39 +1281,39 @@ let Ve = class {
|
|
|
1282
1281
|
this.logger.debug(`loading dispenser ${this.id}`);
|
|
1283
1282
|
}
|
|
1284
1283
|
};
|
|
1285
|
-
|
|
1286
|
-
l(
|
|
1287
|
-
],
|
|
1288
|
-
const
|
|
1284
|
+
qe = Yo([
|
|
1285
|
+
l(X)
|
|
1286
|
+
], qe);
|
|
1287
|
+
const qo = {
|
|
1289
1288
|
registration: {
|
|
1290
|
-
[
|
|
1291
|
-
class:
|
|
1289
|
+
[X]: {
|
|
1290
|
+
class: qe,
|
|
1292
1291
|
singleton: !0
|
|
1293
1292
|
}
|
|
1294
1293
|
},
|
|
1295
|
-
type:
|
|
1296
|
-
predicate: c(
|
|
1297
|
-
factory:
|
|
1298
|
-
}, { URL:
|
|
1299
|
-
basePath: `${
|
|
1300
|
-
}),
|
|
1294
|
+
type: X,
|
|
1295
|
+
predicate: c(X),
|
|
1296
|
+
factory: u.Singleton.create(X)
|
|
1297
|
+
}, { URL: Go } = h("DISPENSER_SERVICE"), { getAll: Qo } = f.build({
|
|
1298
|
+
basePath: `${Go}/api/dispenser`
|
|
1299
|
+
}), Xo = g.createLogger({
|
|
1301
1300
|
name: "dispenser-service",
|
|
1302
1301
|
group: "Services"
|
|
1303
|
-
}),
|
|
1302
|
+
}), Jo = async () => (Xo.debug("sending GET for dispenser"), await Qo({})), xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1304
1303
|
__proto__: null,
|
|
1305
|
-
getDispensers:
|
|
1304
|
+
getDispensers: Jo
|
|
1306
1305
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1307
|
-
var
|
|
1308
|
-
for (var o =
|
|
1309
|
-
(
|
|
1310
|
-
return
|
|
1306
|
+
var Zo = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ir = (e, t, r, i) => {
|
|
1307
|
+
for (var o = i > 1 ? void 0 : i ? ei(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1308
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1309
|
+
return i && o && Zo(t, r, o), o;
|
|
1311
1310
|
};
|
|
1312
|
-
const
|
|
1313
|
-
let
|
|
1311
|
+
const J = "dispenser-info-model";
|
|
1312
|
+
let Te = class {
|
|
1314
1313
|
constructor(e, t, r) {
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1314
|
+
a(this, "logger");
|
|
1315
|
+
a(this, "id");
|
|
1316
|
+
a(this, "name");
|
|
1318
1317
|
this.id = e, this.logger = r.logger;
|
|
1319
1318
|
}
|
|
1320
1319
|
// -------------------LIFECYCLE----------------------------
|
|
@@ -1325,47 +1324,47 @@ let ve = class {
|
|
|
1325
1324
|
this.logger.debug(`loading dispenser-info ${this.id}`);
|
|
1326
1325
|
}
|
|
1327
1326
|
};
|
|
1328
|
-
|
|
1329
|
-
|
|
1327
|
+
ir([
|
|
1328
|
+
d({
|
|
1330
1329
|
path: "kos:device",
|
|
1331
1330
|
attribute: "name"
|
|
1332
1331
|
})
|
|
1333
|
-
],
|
|
1334
|
-
|
|
1335
|
-
l(
|
|
1336
|
-
],
|
|
1337
|
-
const
|
|
1332
|
+
], Te.prototype, "name", 2);
|
|
1333
|
+
Te = ir([
|
|
1334
|
+
l(J)
|
|
1335
|
+
], Te);
|
|
1336
|
+
const ti = {
|
|
1338
1337
|
registration: {
|
|
1339
|
-
[
|
|
1340
|
-
class:
|
|
1338
|
+
[J]: {
|
|
1339
|
+
class: Te,
|
|
1341
1340
|
singleton: !1
|
|
1342
1341
|
}
|
|
1343
1342
|
},
|
|
1344
|
-
type:
|
|
1345
|
-
predicate: c(
|
|
1346
|
-
factory:
|
|
1347
|
-
|
|
1343
|
+
type: J,
|
|
1344
|
+
predicate: c(J),
|
|
1345
|
+
factory: u.Factory.create(
|
|
1346
|
+
J
|
|
1348
1347
|
)
|
|
1349
|
-
}, { URL:
|
|
1350
|
-
basePath: `${
|
|
1351
|
-
}),
|
|
1348
|
+
}, { URL: ri } = h("DISPENSER-INFO_SERVICE"), { getAll: oi } = f.build({
|
|
1349
|
+
basePath: `${ri}/api/dispenser-info`
|
|
1350
|
+
}), ii = g.createLogger({
|
|
1352
1351
|
name: "dispenser-info-service",
|
|
1353
1352
|
group: "Services"
|
|
1354
|
-
}),
|
|
1353
|
+
}), si = async () => (ii.debug("sending GET for dispenser-info"), await oi({})), As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1355
1354
|
__proto__: null,
|
|
1356
|
-
getDispenserInfos:
|
|
1355
|
+
getDispenserInfos: si
|
|
1357
1356
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1358
|
-
var
|
|
1359
|
-
for (var o =
|
|
1360
|
-
(
|
|
1361
|
-
return
|
|
1357
|
+
var ai = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, li = (e, t, r, i) => {
|
|
1358
|
+
for (var o = i > 1 ? void 0 : i ? ni(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1359
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1360
|
+
return i && o && ai(t, r, o), o;
|
|
1362
1361
|
};
|
|
1363
|
-
const
|
|
1364
|
-
let
|
|
1362
|
+
const Z = "enrollment-model";
|
|
1363
|
+
let Ge = class {
|
|
1365
1364
|
constructor(e, t, r) {
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1365
|
+
a(this, "id");
|
|
1366
|
+
a(this, "logger");
|
|
1367
|
+
a(this, "enrolled");
|
|
1369
1368
|
this.id = e, this.logger = r.logger, this.enrolled = !1;
|
|
1370
1369
|
}
|
|
1371
1370
|
updateModel(e) {
|
|
@@ -1379,77 +1378,77 @@ let He = class {
|
|
|
1379
1378
|
this.logger.debug(`loading enrollment ${this.id}`);
|
|
1380
1379
|
}
|
|
1381
1380
|
};
|
|
1382
|
-
|
|
1383
|
-
l(
|
|
1384
|
-
],
|
|
1385
|
-
const
|
|
1381
|
+
Ge = li([
|
|
1382
|
+
l(Z)
|
|
1383
|
+
], Ge);
|
|
1384
|
+
const ci = {
|
|
1386
1385
|
registration: {
|
|
1387
|
-
[
|
|
1388
|
-
class:
|
|
1386
|
+
[Z]: {
|
|
1387
|
+
class: Ge,
|
|
1389
1388
|
singleton: !0
|
|
1390
1389
|
}
|
|
1391
1390
|
},
|
|
1392
|
-
type:
|
|
1393
|
-
predicate: c(
|
|
1394
|
-
factory:
|
|
1395
|
-
}, { URL:
|
|
1396
|
-
basePath: `${
|
|
1397
|
-
}),
|
|
1391
|
+
type: Z,
|
|
1392
|
+
predicate: c(Z),
|
|
1393
|
+
factory: u.Singleton.create(Z)
|
|
1394
|
+
}, { URL: ui } = h("ENROLLMENT_SERVICE"), { getAll: di } = f.build({
|
|
1395
|
+
basePath: `${ui}/api/enrollment`
|
|
1396
|
+
}), pi = g.createLogger({
|
|
1398
1397
|
name: "enrollment-service",
|
|
1399
1398
|
group: "Services"
|
|
1400
|
-
}),
|
|
1399
|
+
}), gi = async () => (pi.debug("sending GET for enrollment"), await di({})), js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1401
1400
|
__proto__: null,
|
|
1402
|
-
getEnrollments:
|
|
1403
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1401
|
+
getEnrollments: gi
|
|
1402
|
+
}, Symbol.toStringTag, { value: "Module" })), Us = (e) => e.toLowerCase().includes("micros"), Vs = (e) => !e.toLowerCase().includes("micros"), Hs = (e) => (t) => {
|
|
1404
1403
|
const r = e == null ? void 0 : e.getHoldersByGroup(t);
|
|
1405
|
-
return r ? r.map((
|
|
1406
|
-
},
|
|
1407
|
-
|
|
1404
|
+
return r ? r.map((i) => ({ id: i.id, name: i.ingredientName, path: i.path })) : null;
|
|
1405
|
+
}, Ws = ["water", "carb", "ns", "nss"], ue = "dashboardKeyFactory", Be = [];
|
|
1406
|
+
Yr(ue, {
|
|
1408
1407
|
register: (e, t) => {
|
|
1409
|
-
|
|
1408
|
+
Be.includes(t) || Be.push(t);
|
|
1410
1409
|
},
|
|
1411
1410
|
execute: (e, t) => {
|
|
1412
|
-
const r =
|
|
1413
|
-
for (const
|
|
1414
|
-
const o =
|
|
1411
|
+
const r = Be.sort((i, o) => i.rank - o.rank);
|
|
1412
|
+
for (const i of r) {
|
|
1413
|
+
const o = i.factory(t);
|
|
1415
1414
|
if (o)
|
|
1416
1415
|
return o;
|
|
1417
1416
|
}
|
|
1418
1417
|
}
|
|
1419
1418
|
});
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1422
|
-
|
|
1419
|
+
const hi = (e) => {
|
|
1420
|
+
ke[ue].register(
|
|
1421
|
+
ue,
|
|
1423
1422
|
e
|
|
1424
1423
|
);
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1424
|
+
}, fi = (e) => ke[ue].execute(
|
|
1425
|
+
ue,
|
|
1427
1426
|
e
|
|
1428
1427
|
);
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
const
|
|
1432
|
-
const t = Math.floor(e /
|
|
1428
|
+
ke.registerDashboardKeyFactory = hi;
|
|
1429
|
+
ke.executeDashboardKeyFactory = fi;
|
|
1430
|
+
const Qe = 3600, sr = 60, zs = (e) => {
|
|
1431
|
+
const t = Math.floor(e / Qe), r = Math.floor(e % Qe / sr);
|
|
1433
1432
|
return { hours: t, minutes: r };
|
|
1434
|
-
},
|
|
1435
|
-
const r = (/* @__PURE__ */ new Date()).valueOf() - e.valueOf(),
|
|
1436
|
-
let
|
|
1437
|
-
return
|
|
1438
|
-
};
|
|
1439
|
-
var
|
|
1440
|
-
for (var o =
|
|
1441
|
-
(
|
|
1442
|
-
return
|
|
1443
|
-
};
|
|
1444
|
-
const
|
|
1445
|
-
let
|
|
1433
|
+
}, Ns = (e, t) => e * Qe + t * sr, mi = (e) => {
|
|
1434
|
+
const r = (/* @__PURE__ */ new Date()).valueOf() - e.valueOf(), i = Math.floor(r / (1e3 * 60)), o = Math.floor(i / 60), n = Math.floor(o / 24), s = i % 60, O = o % 24;
|
|
1435
|
+
let D = "";
|
|
1436
|
+
return n > 0 && (D += `${n} day${n > 1 ? "s" : ""} `), O > 0 && (D += `${O} hour${O > 1 ? "s" : ""} `), (s > 0 || n === 0 && O === 0) && (D += `${s} minute${s > 1 ? "s" : ""} `), D;
|
|
1437
|
+
};
|
|
1438
|
+
var yi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Ve = (e, t, r, i) => {
|
|
1439
|
+
for (var o = i > 1 ? void 0 : i ? bi(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1440
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1441
|
+
return i && o && yi(t, r, o), o;
|
|
1442
|
+
};
|
|
1443
|
+
const ee = "ingredient-summary-model";
|
|
1444
|
+
let x = class {
|
|
1446
1445
|
constructor(e, t, r) {
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
this.id = e, this.logger = r.logger, this.dashboardOperationModel =
|
|
1446
|
+
a(this, "id");
|
|
1447
|
+
a(this, "assemblyModel");
|
|
1448
|
+
a(this, "dashboardOperationModel");
|
|
1449
|
+
a(this, "appModel");
|
|
1450
|
+
a(this, "logger");
|
|
1451
|
+
this.id = e, this.logger = r.logger, this.dashboardOperationModel = nt.factory({});
|
|
1453
1452
|
}
|
|
1454
1453
|
get highPriorityHolders() {
|
|
1455
1454
|
return this.assemblyModel.allHolders.filter(
|
|
@@ -1457,10 +1456,10 @@ let I = class {
|
|
|
1457
1456
|
);
|
|
1458
1457
|
}
|
|
1459
1458
|
get actionRequiredHolders() {
|
|
1460
|
-
const e = this.appModel.currentRole, t =
|
|
1459
|
+
const e = this.appModel.currentRole, t = jt(e);
|
|
1461
1460
|
return this.assemblyModel.allHolders.filter((r) => {
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1461
|
+
const i = r.troubles.filter(t);
|
|
1462
|
+
return i.length > 0 && i.find((o) => o.resolvable);
|
|
1464
1463
|
});
|
|
1465
1464
|
}
|
|
1466
1465
|
get lowLevelHolders() {
|
|
@@ -1477,42 +1476,42 @@ let I = class {
|
|
|
1477
1476
|
this.logger.debug(`loading ingredient-summary ${this.id}`);
|
|
1478
1477
|
}
|
|
1479
1478
|
};
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
],
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
],
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
],
|
|
1489
|
-
|
|
1490
|
-
l(
|
|
1491
|
-
],
|
|
1492
|
-
const
|
|
1479
|
+
Ve([
|
|
1480
|
+
m({ modelType: Fe.type })
|
|
1481
|
+
], x.prototype, "assemblyModel", 2);
|
|
1482
|
+
Ve([
|
|
1483
|
+
m({ modelType: nt.type })
|
|
1484
|
+
], x.prototype, "dashboardOperationModel", 2);
|
|
1485
|
+
Ve([
|
|
1486
|
+
m({ modelType: at.type })
|
|
1487
|
+
], x.prototype, "appModel", 2);
|
|
1488
|
+
x = Ve([
|
|
1489
|
+
l(ee)
|
|
1490
|
+
], x);
|
|
1491
|
+
const vi = {
|
|
1493
1492
|
registration: {
|
|
1494
|
-
[
|
|
1495
|
-
class:
|
|
1493
|
+
[ee]: {
|
|
1494
|
+
class: x,
|
|
1496
1495
|
singleton: !1
|
|
1497
1496
|
}
|
|
1498
1497
|
},
|
|
1499
|
-
type:
|
|
1500
|
-
predicate: c(
|
|
1501
|
-
factory:
|
|
1502
|
-
|
|
1498
|
+
type: ee,
|
|
1499
|
+
predicate: c(ee),
|
|
1500
|
+
factory: u.Factory.create(
|
|
1501
|
+
ee
|
|
1503
1502
|
)
|
|
1504
1503
|
};
|
|
1505
|
-
var
|
|
1506
|
-
for (var o =
|
|
1507
|
-
(
|
|
1508
|
-
return
|
|
1504
|
+
var _i = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, Pi = (e, t, r, i) => {
|
|
1505
|
+
for (var o = i > 1 ? void 0 : i ? $i(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1506
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1507
|
+
return i && o && _i(t, r, o), o;
|
|
1509
1508
|
};
|
|
1510
|
-
const
|
|
1511
|
-
let
|
|
1509
|
+
const ar = "lfcv-pump-model";
|
|
1510
|
+
let Xe = class {
|
|
1512
1511
|
constructor(e, t, r) {
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1512
|
+
a(this, "id");
|
|
1513
|
+
a(this, "logger");
|
|
1514
|
+
a(this, "pumpModel");
|
|
1516
1515
|
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent;
|
|
1517
1516
|
}
|
|
1518
1517
|
get name() {
|
|
@@ -1538,43 +1537,43 @@ let Ne = class {
|
|
|
1538
1537
|
this.logger.debug(`loading lfcv-pump ${this.id}`);
|
|
1539
1538
|
}
|
|
1540
1539
|
};
|
|
1541
|
-
|
|
1542
|
-
l(
|
|
1543
|
-
],
|
|
1544
|
-
const
|
|
1545
|
-
class:
|
|
1546
|
-
type:
|
|
1547
|
-
}), { URL:
|
|
1548
|
-
basePath: `${
|
|
1549
|
-
}),
|
|
1540
|
+
Xe = Pi([
|
|
1541
|
+
l(ar)
|
|
1542
|
+
], Xe);
|
|
1543
|
+
const Bs = new Le({
|
|
1544
|
+
class: Xe,
|
|
1545
|
+
type: ar
|
|
1546
|
+
}), { URL: Ti } = h("LFCV-PUMP_SERVICE"), { getAll: Oi } = f.build({
|
|
1547
|
+
basePath: `${Ti}/api/lfcv-pump`
|
|
1548
|
+
}), Mi = g.createLogger({
|
|
1550
1549
|
name: "lfcv-pump-service",
|
|
1551
1550
|
group: "Services"
|
|
1552
|
-
}),
|
|
1551
|
+
}), Si = async () => (Mi.debug("sending GET for lfcv-pump"), await Oi({})), Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1553
1552
|
__proto__: null,
|
|
1554
|
-
getLfcvPumps:
|
|
1555
|
-
}, Symbol.toStringTag, { value: "Module" })), { URL:
|
|
1556
|
-
basePath: `${
|
|
1557
|
-
}),
|
|
1553
|
+
getLfcvPumps: Si
|
|
1554
|
+
}, Symbol.toStringTag, { value: "Module" })), { URL: lt } = h("LOCKOUT_SERVICE"), { postModel: nr } = f.build({
|
|
1555
|
+
basePath: `${lt}/api/app/kosdev.ddk/lockout`
|
|
1556
|
+
}), lr = g.createLogger({ name: "lockout-service", group: "Services" }), Ci = async () => (lr.info("lock"), await nr({
|
|
1558
1557
|
model: {},
|
|
1559
|
-
urlOverride: `${
|
|
1560
|
-
})),
|
|
1561
|
-
|
|
1562
|
-
const t = await
|
|
1558
|
+
urlOverride: `${lt}/api/app/kosdev.ddk/lockout/lockNow`
|
|
1559
|
+
})), cr = async (e) => {
|
|
1560
|
+
lr.info("unlock");
|
|
1561
|
+
const t = await nr({
|
|
1563
1562
|
model: {},
|
|
1564
|
-
urlOverride: `${
|
|
1563
|
+
urlOverride: `${lt}/api/app/kosdev.ddk/lockout/unlock/${e}`
|
|
1565
1564
|
});
|
|
1566
1565
|
return t == null ? void 0 : t.data;
|
|
1567
|
-
},
|
|
1566
|
+
}, Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1568
1567
|
__proto__: null,
|
|
1569
|
-
lock:
|
|
1570
|
-
unlock:
|
|
1568
|
+
lock: Ci,
|
|
1569
|
+
unlock: cr
|
|
1571
1570
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1572
|
-
var
|
|
1573
|
-
for (var o =
|
|
1574
|
-
(
|
|
1575
|
-
return
|
|
1571
|
+
var wi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, z = (e, t, r, i) => {
|
|
1572
|
+
for (var o = i > 1 ? void 0 : i ? Ei(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1573
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1574
|
+
return i && o && wi(t, r, o), o;
|
|
1576
1575
|
};
|
|
1577
|
-
const
|
|
1576
|
+
const ur = "lockout-model", Li = [
|
|
1578
1577
|
{ day: "monday", lock: "dayWiseLockConfigMap.Mon.enabled", open: "dayWiseLockConfigMap.Mon.unlockTime", close: "dayWiseLockConfigMap.Mon.lockTime" },
|
|
1579
1578
|
{ day: "tuesday", lock: "dayWiseLockConfigMap.Tue.enabled", open: "dayWiseLockConfigMap.Tue.unlockTime", close: "dayWiseLockConfigMap.Tue.lockTime" },
|
|
1580
1579
|
{ day: "wednesday", lock: "dayWiseLockConfigMap.Wed.enabled", open: "dayWiseLockConfigMap.Wed.unlockTime", close: "dayWiseLockConfigMap.Wed.lockTime" },
|
|
@@ -1583,11 +1582,11 @@ const or = "lockout-model", ys = [
|
|
|
1583
1582
|
{ day: "saturday", lock: "dayWiseLockConfigMap.Sat.enabled", open: "dayWiseLockConfigMap.Sat.unlockTime", close: "dayWiseLockConfigMap.Sat.lockTime" },
|
|
1584
1583
|
{ day: "sunday", lock: "dayWiseLockConfigMap.Sun.enabled", open: "dayWiseLockConfigMap.Sun.unlockTime", close: "dayWiseLockConfigMap.Sun.lockTime" }
|
|
1585
1584
|
];
|
|
1586
|
-
let
|
|
1585
|
+
let E = class {
|
|
1587
1586
|
constructor(e, t, r) {
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1587
|
+
a(this, "id");
|
|
1588
|
+
a(this, "logger");
|
|
1589
|
+
a(this, "dayEnabledList", [
|
|
1591
1590
|
"dayWiseLockConfigMap.Sun.enabled",
|
|
1592
1591
|
"dayWiseLockConfigMap.Mon.enabled",
|
|
1593
1592
|
"dayWiseLockConfigMap.Tue.enabled",
|
|
@@ -1596,7 +1595,7 @@ let M = class {
|
|
|
1596
1595
|
"dayWiseLockConfigMap.Fri.enabled",
|
|
1597
1596
|
"dayWiseLockConfigMap.Sat.enabled"
|
|
1598
1597
|
]);
|
|
1599
|
-
|
|
1598
|
+
a(this, "dayOpenAtList", [
|
|
1600
1599
|
"dayWiseLockConfigMap.Sun.unlockTime",
|
|
1601
1600
|
"dayWiseLockConfigMap.Mon.unlockTime",
|
|
1602
1601
|
"dayWiseLockConfigMap.Tue.unlockTime",
|
|
@@ -1605,7 +1604,7 @@ let M = class {
|
|
|
1605
1604
|
"dayWiseLockConfigMap.Fri.unlockTime",
|
|
1606
1605
|
"dayWiseLockConfigMap.Sat.unlockTime"
|
|
1607
1606
|
]);
|
|
1608
|
-
|
|
1607
|
+
a(this, "dayCloseAtList", [
|
|
1609
1608
|
"dayWiseLockConfigMap.Sun.lockTime",
|
|
1610
1609
|
"dayWiseLockConfigMap.Mon.lockTime",
|
|
1611
1610
|
"dayWiseLockConfigMap.Tue.lockTime",
|
|
@@ -1614,12 +1613,12 @@ let M = class {
|
|
|
1614
1613
|
"dayWiseLockConfigMap.Fri.lockTime",
|
|
1615
1614
|
"dayWiseLockConfigMap.Sat.lockTime"
|
|
1616
1615
|
]);
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1616
|
+
a(this, "saveMap");
|
|
1617
|
+
a(this, "pin");
|
|
1618
|
+
a(this, "nextLockSkipped");
|
|
1619
|
+
a(this, "nextLockTime");
|
|
1620
|
+
a(this, "nextUnLockTime");
|
|
1621
|
+
a(this, "cuiLockout");
|
|
1623
1622
|
this.id = e, this.logger = r.logger, this.saveMap = /* @__PURE__ */ new Map();
|
|
1624
1623
|
}
|
|
1625
1624
|
get enabled() {
|
|
@@ -1629,7 +1628,7 @@ let M = class {
|
|
|
1629
1628
|
return t || r;
|
|
1630
1629
|
}
|
|
1631
1630
|
get schedule() {
|
|
1632
|
-
return
|
|
1631
|
+
return Li;
|
|
1633
1632
|
}
|
|
1634
1633
|
getProp(e) {
|
|
1635
1634
|
return this.saveMap.get(e);
|
|
@@ -1646,7 +1645,7 @@ let M = class {
|
|
|
1646
1645
|
this.nextLockSkipped.updateProperty("0");
|
|
1647
1646
|
}
|
|
1648
1647
|
async unlock(e) {
|
|
1649
|
-
return await
|
|
1648
|
+
return await cr(e);
|
|
1650
1649
|
}
|
|
1651
1650
|
async save() {
|
|
1652
1651
|
return this.saveMap.forEach((e, t) => {
|
|
@@ -1668,60 +1667,60 @@ let M = class {
|
|
|
1668
1667
|
this.logger.debug(`loading lockout ${this.id}`);
|
|
1669
1668
|
}
|
|
1670
1669
|
};
|
|
1671
|
-
|
|
1672
|
-
|
|
1670
|
+
z([
|
|
1671
|
+
d({
|
|
1673
1672
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1674
1673
|
attribute: "pin"
|
|
1675
1674
|
})
|
|
1676
|
-
],
|
|
1677
|
-
|
|
1678
|
-
|
|
1675
|
+
], E.prototype, "pin", 2);
|
|
1676
|
+
z([
|
|
1677
|
+
d({
|
|
1679
1678
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1680
1679
|
attribute: "nextLockSkipped"
|
|
1681
1680
|
})
|
|
1682
|
-
],
|
|
1683
|
-
|
|
1684
|
-
|
|
1681
|
+
], E.prototype, "nextLockSkipped", 2);
|
|
1682
|
+
z([
|
|
1683
|
+
d({
|
|
1685
1684
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1686
1685
|
attribute: "nextLockTime"
|
|
1687
1686
|
})
|
|
1688
|
-
],
|
|
1689
|
-
|
|
1690
|
-
|
|
1687
|
+
], E.prototype, "nextLockTime", 2);
|
|
1688
|
+
z([
|
|
1689
|
+
d({
|
|
1691
1690
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1692
1691
|
attribute: "nextUnLockTime"
|
|
1693
1692
|
})
|
|
1694
|
-
],
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
],
|
|
1698
|
-
|
|
1699
|
-
l(
|
|
1700
|
-
],
|
|
1701
|
-
const
|
|
1702
|
-
class:
|
|
1703
|
-
type:
|
|
1704
|
-
}),
|
|
1693
|
+
], E.prototype, "nextUnLockTime", 2);
|
|
1694
|
+
z([
|
|
1695
|
+
qr({ path: "app:kosdev.ddk:service:cuiLockout" })
|
|
1696
|
+
], E.prototype, "cuiLockout", 2);
|
|
1697
|
+
E = z([
|
|
1698
|
+
l(ur)
|
|
1699
|
+
], E);
|
|
1700
|
+
const qs = new pe({
|
|
1701
|
+
class: E,
|
|
1702
|
+
type: ur
|
|
1703
|
+
}), Di = async (e, t) => await Re.bulkResolveTroubles(
|
|
1705
1704
|
e,
|
|
1706
1705
|
t
|
|
1707
1706
|
);
|
|
1708
|
-
var
|
|
1709
|
-
for (var o =
|
|
1710
|
-
(
|
|
1711
|
-
return
|
|
1707
|
+
var Ri = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, He = (e, t, r, i) => {
|
|
1708
|
+
for (var o = i > 1 ? void 0 : i ? Ii(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1709
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1710
|
+
return i && o && Ri(t, r, o), o;
|
|
1712
1711
|
};
|
|
1713
|
-
const
|
|
1714
|
-
let
|
|
1712
|
+
const te = "macro-assignment-model", vt = "PurgeTrouble", ki = "PrimeTrouble";
|
|
1713
|
+
let A = class {
|
|
1715
1714
|
constructor(e, t, r) {
|
|
1716
|
-
|
|
1717
|
-
|
|
1715
|
+
a(this, "id");
|
|
1716
|
+
a(this, "logger");
|
|
1718
1717
|
/**
|
|
1719
1718
|
* futureHandler is used to handle async operations
|
|
1720
1719
|
*/
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
this.id = e, this.futureHandler = new
|
|
1720
|
+
a(this, "futureHandler");
|
|
1721
|
+
a(this, "holders");
|
|
1722
|
+
a(this, "ingredients");
|
|
1723
|
+
this.id = e, this.futureHandler = new ge(), this.logger = r.logger;
|
|
1725
1724
|
}
|
|
1726
1725
|
/**
|
|
1727
1726
|
* shortcut to the current running future
|
|
@@ -1751,14 +1750,14 @@ let R = class {
|
|
|
1751
1750
|
*/
|
|
1752
1751
|
get holderPurgeTroubles() {
|
|
1753
1752
|
return this.macroHolders.reduce((t, r) => {
|
|
1754
|
-
const
|
|
1755
|
-
return t = [...t, ...
|
|
1753
|
+
const i = r.troublesByType[vt] || [];
|
|
1754
|
+
return t = [...t, ...i], t;
|
|
1756
1755
|
}, []);
|
|
1757
1756
|
}
|
|
1758
1757
|
get holderPrimeTroubles() {
|
|
1759
1758
|
return this.macroHolders.reduce((t, r) => {
|
|
1760
|
-
const
|
|
1761
|
-
return t = [...t, ...
|
|
1759
|
+
const i = r.troublesByType[ki] || [];
|
|
1760
|
+
return t = [...t, ...i], t;
|
|
1762
1761
|
}, []);
|
|
1763
1762
|
}
|
|
1764
1763
|
/**
|
|
@@ -1793,52 +1792,52 @@ let R = class {
|
|
|
1793
1792
|
async resolveAll(e, t) {
|
|
1794
1793
|
if (!t)
|
|
1795
1794
|
throw new Error("No tracker provided");
|
|
1796
|
-
const
|
|
1797
|
-
return await
|
|
1798
|
-
}
|
|
1799
|
-
};
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
],
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
],
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
],
|
|
1809
|
-
|
|
1810
|
-
l(
|
|
1811
|
-
],
|
|
1812
|
-
const
|
|
1795
|
+
const i = (e === vt ? this.holderPurgeTroubles : this.holderPrimeTroubles).map((n) => n.rawId);
|
|
1796
|
+
return await Di(i, t);
|
|
1797
|
+
}
|
|
1798
|
+
};
|
|
1799
|
+
He([
|
|
1800
|
+
m({ modelType: Xr.type })
|
|
1801
|
+
], A.prototype, "holders", 2);
|
|
1802
|
+
He([
|
|
1803
|
+
m({ modelType: Jr.type })
|
|
1804
|
+
], A.prototype, "ingredients", 2);
|
|
1805
|
+
He([
|
|
1806
|
+
v()
|
|
1807
|
+
], A.prototype, "resolveAll", 1);
|
|
1808
|
+
A = He([
|
|
1809
|
+
l(te)
|
|
1810
|
+
], A);
|
|
1811
|
+
const Fi = {
|
|
1813
1812
|
registration: {
|
|
1814
|
-
[
|
|
1815
|
-
class:
|
|
1813
|
+
[te]: {
|
|
1814
|
+
class: A,
|
|
1816
1815
|
singleton: !0
|
|
1817
1816
|
}
|
|
1818
1817
|
},
|
|
1819
|
-
type:
|
|
1820
|
-
predicate: c(
|
|
1821
|
-
factory:
|
|
1822
|
-
|
|
1818
|
+
type: te,
|
|
1819
|
+
predicate: c(te),
|
|
1820
|
+
factory: u.Singleton.create(
|
|
1821
|
+
te
|
|
1823
1822
|
)
|
|
1824
1823
|
};
|
|
1825
|
-
var
|
|
1826
|
-
for (var o =
|
|
1827
|
-
(
|
|
1828
|
-
return
|
|
1824
|
+
var xi = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, ji = (e, t, r, i) => {
|
|
1825
|
+
for (var o = i > 1 ? void 0 : i ? Ai(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1826
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1827
|
+
return i && o && xi(t, r, o), o;
|
|
1829
1828
|
};
|
|
1830
|
-
const
|
|
1831
|
-
let
|
|
1829
|
+
const re = "network-test-model";
|
|
1830
|
+
let Je = class {
|
|
1832
1831
|
constructor(e, t, r) {
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1832
|
+
a(this, "id");
|
|
1833
|
+
a(this, "group");
|
|
1834
|
+
a(this, "passed");
|
|
1835
|
+
a(this, "inProgress");
|
|
1836
|
+
a(this, "failureTime");
|
|
1837
|
+
a(this, "timestamp");
|
|
1838
|
+
a(this, "name");
|
|
1839
|
+
a(this, "results");
|
|
1840
|
+
a(this, "logger");
|
|
1842
1841
|
this.id = e, this.logger = r.logger, this.group = t.group, this.passed = !1, this.inProgress = !1, this.name = t.name, this.results = [];
|
|
1843
1842
|
}
|
|
1844
1843
|
updateModel(e) {
|
|
@@ -1852,58 +1851,58 @@ let ze = class {
|
|
|
1852
1851
|
this.logger.debug(`loading network-test ${this.id}`);
|
|
1853
1852
|
}
|
|
1854
1853
|
};
|
|
1855
|
-
|
|
1856
|
-
l(
|
|
1857
|
-
],
|
|
1858
|
-
const
|
|
1854
|
+
Je = ji([
|
|
1855
|
+
l(re)
|
|
1856
|
+
], Je);
|
|
1857
|
+
const dr = {
|
|
1859
1858
|
registration: {
|
|
1860
|
-
[
|
|
1861
|
-
class:
|
|
1859
|
+
[re]: {
|
|
1860
|
+
class: Je,
|
|
1862
1861
|
singleton: !1
|
|
1863
1862
|
}
|
|
1864
1863
|
},
|
|
1865
|
-
type:
|
|
1866
|
-
predicate: c(
|
|
1867
|
-
factory:
|
|
1868
|
-
}, { URL:
|
|
1869
|
-
basePath: `${
|
|
1870
|
-
}),
|
|
1864
|
+
type: re,
|
|
1865
|
+
predicate: c(re),
|
|
1866
|
+
factory: u.Factory.create(re)
|
|
1867
|
+
}, { URL: We } = h("NETWORK-TEST_SERVICE"), { getAll: Ui, getOne: pr } = f.build({
|
|
1868
|
+
basePath: `${We}/api/app/ncui/network/tests`
|
|
1869
|
+
}), Vi = g.createLogger({
|
|
1871
1870
|
name: "network-test-service",
|
|
1872
1871
|
group: "Services"
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
1875
|
-
const e = await
|
|
1876
|
-
urlOverride: `${
|
|
1872
|
+
}), gr = async () => {
|
|
1873
|
+
Vi.debug("sending GET for network-test");
|
|
1874
|
+
const e = await Ui({
|
|
1875
|
+
urlOverride: `${We}/api/app/kosdev.ddk/network/tests`
|
|
1877
1876
|
});
|
|
1878
1877
|
return e == null ? void 0 : e.data;
|
|
1879
|
-
},
|
|
1880
|
-
const e = await
|
|
1881
|
-
urlOverride: `${
|
|
1878
|
+
}, hr = async () => {
|
|
1879
|
+
const e = await pr({
|
|
1880
|
+
urlOverride: `${We}/api/app/kosdev.ddk/network/reports`
|
|
1882
1881
|
});
|
|
1883
1882
|
return e == null ? void 0 : e.data;
|
|
1884
|
-
},
|
|
1885
|
-
urlOverride: `${
|
|
1883
|
+
}, fr = async (e, t) => await pr({
|
|
1884
|
+
urlOverride: `${We}/api/app/kosdev.ddk/network/tests/run/group/${e}`,
|
|
1886
1885
|
tracker: t
|
|
1887
|
-
}),
|
|
1886
|
+
}), Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1888
1887
|
__proto__: null,
|
|
1889
|
-
getNetworkTests:
|
|
1890
|
-
getTestsReports:
|
|
1891
|
-
performGroupTest:
|
|
1888
|
+
getNetworkTests: gr,
|
|
1889
|
+
getTestsReports: hr,
|
|
1890
|
+
performGroupTest: fr
|
|
1892
1891
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1893
|
-
var
|
|
1894
|
-
for (var o =
|
|
1895
|
-
(
|
|
1896
|
-
return
|
|
1892
|
+
var Hi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, ct = (e, t, r, i) => {
|
|
1893
|
+
for (var o = i > 1 ? void 0 : i ? Wi(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1894
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
1895
|
+
return i && o && Hi(t, r, o), o;
|
|
1897
1896
|
};
|
|
1898
|
-
const
|
|
1899
|
-
let
|
|
1897
|
+
const oe = "network-test-container-model";
|
|
1898
|
+
let de = class {
|
|
1900
1899
|
constructor(e, t, r) {
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
this.id = e, this.logger = r.logger, this.futureHandler = new
|
|
1900
|
+
a(this, "id");
|
|
1901
|
+
a(this, "logger");
|
|
1902
|
+
a(this, "lastTested");
|
|
1903
|
+
a(this, "futureHandler");
|
|
1904
|
+
a(this, "models");
|
|
1905
|
+
this.id = e, this.logger = r.logger, this.futureHandler = new ge(this), this.models = new tt({
|
|
1907
1906
|
parentId: e,
|
|
1908
1907
|
indexMap: {
|
|
1909
1908
|
group: "group"
|
|
@@ -1929,21 +1928,21 @@ let ae = class {
|
|
|
1929
1928
|
);
|
|
1930
1929
|
}
|
|
1931
1930
|
getLastTested(e) {
|
|
1932
|
-
const t = this.models.getIndexByKey("group", e).map((
|
|
1933
|
-
...t.map((
|
|
1931
|
+
const t = this.models.getIndexByKey("group", e).map((i) => i.timestamp && new Date(i.timestamp)), r = Math.max(
|
|
1932
|
+
...t.map((i) => i ? i.getTime() : 0)
|
|
1934
1933
|
);
|
|
1935
|
-
return r ?
|
|
1934
|
+
return r ? mi(new Date(r)) : "";
|
|
1936
1935
|
}
|
|
1937
1936
|
async load() {
|
|
1938
1937
|
this.logger.debug(`loading network-test-container container ${this.id}`);
|
|
1939
|
-
const e = await
|
|
1938
|
+
const e = await gr(), t = await hr();
|
|
1940
1939
|
e && e.forEach((r) => {
|
|
1941
|
-
const
|
|
1942
|
-
this.addModel(
|
|
1940
|
+
const i = dr.factory(r.id)(r);
|
|
1941
|
+
this.addModel(i);
|
|
1943
1942
|
}), e && t && e.forEach((r) => {
|
|
1944
|
-
const
|
|
1945
|
-
if (
|
|
1946
|
-
const
|
|
1943
|
+
const i = t == null ? void 0 : t[r.group], o = i == null ? void 0 : i[r.id], n = this.getModel(r.id);
|
|
1944
|
+
if (n && o) {
|
|
1945
|
+
const s = {
|
|
1947
1946
|
group: o.group,
|
|
1948
1947
|
name: o.name,
|
|
1949
1948
|
passed: o.passed,
|
|
@@ -1952,23 +1951,23 @@ let ae = class {
|
|
|
1952
1951
|
timestamp: new Date(o.timestamp),
|
|
1953
1952
|
results: o.results
|
|
1954
1953
|
};
|
|
1955
|
-
|
|
1954
|
+
n.updateModel(s);
|
|
1956
1955
|
}
|
|
1957
1956
|
});
|
|
1958
1957
|
}
|
|
1959
1958
|
async performTest(e, t) {
|
|
1960
1959
|
if (!t)
|
|
1961
1960
|
throw new Error("No tracker provided");
|
|
1962
|
-
const r = await
|
|
1961
|
+
const r = await fr(e, t);
|
|
1963
1962
|
return r == null ? void 0 : r.data;
|
|
1964
1963
|
}
|
|
1965
1964
|
onFutureUpdate(e) {
|
|
1966
1965
|
const { clientData: t } = e;
|
|
1967
1966
|
t && t.forEach((r) => {
|
|
1968
|
-
const
|
|
1969
|
-
if (
|
|
1967
|
+
const i = this.getModel(r.id);
|
|
1968
|
+
if (_(() => {
|
|
1970
1969
|
this.lastTested = this.lastTested > new Date(r.timestamp) ? this.lastTested : new Date(r.timestamp);
|
|
1971
|
-
}),
|
|
1970
|
+
}), i) {
|
|
1972
1971
|
const o = {
|
|
1973
1972
|
group: r.group,
|
|
1974
1973
|
name: r.name,
|
|
@@ -1978,45 +1977,45 @@ let ae = class {
|
|
|
1978
1977
|
timestamp: new Date(r.timestamp),
|
|
1979
1978
|
results: r.results
|
|
1980
1979
|
};
|
|
1981
|
-
|
|
1982
|
-
|
|
1980
|
+
_(() => {
|
|
1981
|
+
i.updateModel(o);
|
|
1983
1982
|
});
|
|
1984
1983
|
}
|
|
1985
1984
|
});
|
|
1986
1985
|
}
|
|
1987
1986
|
};
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
],
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
],
|
|
1994
|
-
|
|
1995
|
-
l(
|
|
1996
|
-
],
|
|
1997
|
-
const
|
|
1987
|
+
ct([
|
|
1988
|
+
De
|
|
1989
|
+
], de.prototype, "models", 2);
|
|
1990
|
+
ct([
|
|
1991
|
+
v()
|
|
1992
|
+
], de.prototype, "performTest", 1);
|
|
1993
|
+
de = ct([
|
|
1994
|
+
l(oe)
|
|
1995
|
+
], de);
|
|
1996
|
+
const zi = {
|
|
1998
1997
|
registration: {
|
|
1999
|
-
[
|
|
2000
|
-
class:
|
|
1998
|
+
[oe]: {
|
|
1999
|
+
class: de,
|
|
2001
2000
|
singleton: !0
|
|
2002
2001
|
},
|
|
2003
|
-
...
|
|
2002
|
+
...dr.registration
|
|
2004
2003
|
},
|
|
2005
|
-
type:
|
|
2006
|
-
predicate: c(
|
|
2007
|
-
factory:
|
|
2004
|
+
type: oe,
|
|
2005
|
+
predicate: c(oe),
|
|
2006
|
+
factory: u.Singleton.create(oe)
|
|
2008
2007
|
};
|
|
2009
|
-
var
|
|
2010
|
-
for (var o =
|
|
2011
|
-
(
|
|
2012
|
-
return
|
|
2008
|
+
var Ni = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, mr = (e, t, r, i) => {
|
|
2009
|
+
for (var o = i > 1 ? void 0 : i ? Bi(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2010
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2011
|
+
return i && o && Ni(t, r, o), o;
|
|
2013
2012
|
};
|
|
2014
|
-
const
|
|
2015
|
-
let
|
|
2013
|
+
const ie = "nutritive-sweetener-model";
|
|
2014
|
+
let Oe = class {
|
|
2016
2015
|
constructor(e, t, r) {
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2016
|
+
a(this, "id");
|
|
2017
|
+
a(this, "assemblyModel");
|
|
2018
|
+
a(this, "logger");
|
|
2020
2019
|
this.id = e, this.logger = r.logger;
|
|
2021
2020
|
}
|
|
2022
2021
|
getHolder() {
|
|
@@ -2033,43 +2032,43 @@ let _e = class {
|
|
|
2033
2032
|
this.logger.debug(`loading nutritive-sweetener ${this.id}`);
|
|
2034
2033
|
}
|
|
2035
2034
|
};
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
],
|
|
2039
|
-
|
|
2040
|
-
l(
|
|
2041
|
-
],
|
|
2042
|
-
const
|
|
2035
|
+
mr([
|
|
2036
|
+
m({ modelType: Fe.type })
|
|
2037
|
+
], Oe.prototype, "assemblyModel", 2);
|
|
2038
|
+
Oe = mr([
|
|
2039
|
+
l(ie)
|
|
2040
|
+
], Oe);
|
|
2041
|
+
const Ki = {
|
|
2043
2042
|
registration: {
|
|
2044
|
-
[
|
|
2045
|
-
class:
|
|
2043
|
+
[ie]: {
|
|
2044
|
+
class: Oe,
|
|
2046
2045
|
singleton: !1
|
|
2047
2046
|
}
|
|
2048
2047
|
},
|
|
2049
|
-
type:
|
|
2050
|
-
predicate: c(
|
|
2051
|
-
factory:
|
|
2048
|
+
type: ie,
|
|
2049
|
+
predicate: c(ie),
|
|
2050
|
+
factory: u.Factory.create(ie)
|
|
2052
2051
|
};
|
|
2053
|
-
var
|
|
2054
|
-
for (var o =
|
|
2055
|
-
(
|
|
2056
|
-
return
|
|
2052
|
+
var Yi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, yr = (e, t, r, i) => {
|
|
2053
|
+
for (var o = i > 1 ? void 0 : i ? qi(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2054
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2055
|
+
return i && o && Yi(t, r, o), o;
|
|
2057
2056
|
};
|
|
2058
|
-
const
|
|
2059
|
-
let
|
|
2057
|
+
const se = "plain-water-model";
|
|
2058
|
+
let Me = class {
|
|
2060
2059
|
constructor(e, t, r) {
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2060
|
+
a(this, "id");
|
|
2061
|
+
a(this, "assemblyModel");
|
|
2062
|
+
a(this, "logger");
|
|
2064
2063
|
this.id = e, this.logger = r.logger;
|
|
2065
2064
|
}
|
|
2066
2065
|
getHolder() {
|
|
2067
2066
|
return this.assemblyModel.getHoldersByGroup("water")[0];
|
|
2068
2067
|
}
|
|
2069
2068
|
getPump() {
|
|
2070
|
-
var
|
|
2071
|
-
const e = this.getHolder(), t = (o = (
|
|
2072
|
-
return
|
|
2069
|
+
var i, o;
|
|
2070
|
+
const e = this.getHolder(), t = (o = (i = e == null ? void 0 : e.pumps) == null ? void 0 : i.data) == null ? void 0 : o[0];
|
|
2071
|
+
return $t(t, Kt.type);
|
|
2073
2072
|
}
|
|
2074
2073
|
// -------------------LIFECYCLE----------------------------
|
|
2075
2074
|
async init() {
|
|
@@ -2079,45 +2078,45 @@ let $e = class {
|
|
|
2079
2078
|
this.logger.debug(`loading plain-water ${this.id}`);
|
|
2080
2079
|
}
|
|
2081
2080
|
};
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
],
|
|
2085
|
-
|
|
2086
|
-
l(
|
|
2087
|
-
],
|
|
2088
|
-
const
|
|
2081
|
+
yr([
|
|
2082
|
+
m({ modelType: Fe.type })
|
|
2083
|
+
], Me.prototype, "assemblyModel", 2);
|
|
2084
|
+
Me = yr([
|
|
2085
|
+
l(se)
|
|
2086
|
+
], Me);
|
|
2087
|
+
const Gi = {
|
|
2089
2088
|
registration: {
|
|
2090
|
-
[
|
|
2091
|
-
class:
|
|
2089
|
+
[se]: {
|
|
2090
|
+
class: Me,
|
|
2092
2091
|
singleton: !1
|
|
2093
2092
|
}
|
|
2094
2093
|
},
|
|
2095
|
-
type:
|
|
2096
|
-
predicate: c(
|
|
2097
|
-
factory:
|
|
2098
|
-
}, { URL:
|
|
2099
|
-
basePath: `${
|
|
2100
|
-
}),
|
|
2101
|
-
urlOverride: `${
|
|
2094
|
+
type: se,
|
|
2095
|
+
predicate: c(se),
|
|
2096
|
+
factory: u.Factory.create(se)
|
|
2097
|
+
}, { URL: br } = h("REBOOT_SERVICE"), { postModel: Qi } = f.build({
|
|
2098
|
+
basePath: `${br}/api/reboot`
|
|
2099
|
+
}), Xi = g.createLogger({ name: "reboot-service", group: "Services" }), vr = async () => (Xi.debug("sending POST call for Reboot Dispenser"), await Qi({
|
|
2100
|
+
urlOverride: `${br}/api/app/kosdev.ddk/ncui/reboot`,
|
|
2102
2101
|
model: {}
|
|
2103
|
-
})),
|
|
2102
|
+
})), Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2104
2103
|
__proto__: null,
|
|
2105
|
-
rebootDispenser:
|
|
2104
|
+
rebootDispenser: vr
|
|
2106
2105
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2107
|
-
var
|
|
2108
|
-
for (var o =
|
|
2109
|
-
(
|
|
2110
|
-
return
|
|
2106
|
+
var Ji = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, es = (e, t, r, i) => {
|
|
2107
|
+
for (var o = i > 1 ? void 0 : i ? Zi(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2108
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2109
|
+
return i && o && Ji(t, r, o), o;
|
|
2111
2110
|
};
|
|
2112
|
-
const
|
|
2113
|
-
let
|
|
2111
|
+
const ae = "reboot-model";
|
|
2112
|
+
let Ze = class {
|
|
2114
2113
|
constructor(e, t, r) {
|
|
2115
|
-
|
|
2116
|
-
|
|
2114
|
+
a(this, "id");
|
|
2115
|
+
a(this, "logger");
|
|
2117
2116
|
this.id = e, this.logger = r.logger;
|
|
2118
2117
|
}
|
|
2119
2118
|
async completeReboot() {
|
|
2120
|
-
await
|
|
2119
|
+
await vr();
|
|
2121
2120
|
}
|
|
2122
2121
|
updateModel() {
|
|
2123
2122
|
}
|
|
@@ -2129,39 +2128,39 @@ let Be = class {
|
|
|
2129
2128
|
this.logger.debug(`loading reboot ${this.id}`);
|
|
2130
2129
|
}
|
|
2131
2130
|
};
|
|
2132
|
-
|
|
2133
|
-
l(
|
|
2134
|
-
],
|
|
2135
|
-
const
|
|
2131
|
+
Ze = es([
|
|
2132
|
+
l(ae)
|
|
2133
|
+
], Ze);
|
|
2134
|
+
const ts = {
|
|
2136
2135
|
registration: {
|
|
2137
|
-
[
|
|
2138
|
-
class:
|
|
2136
|
+
[ae]: {
|
|
2137
|
+
class: Ze,
|
|
2139
2138
|
singleton: !1
|
|
2140
2139
|
}
|
|
2141
2140
|
},
|
|
2142
|
-
type:
|
|
2143
|
-
predicate: c(
|
|
2144
|
-
factory:
|
|
2141
|
+
type: ae,
|
|
2142
|
+
predicate: c(ae),
|
|
2143
|
+
factory: u.Factory.create(ae)
|
|
2145
2144
|
};
|
|
2146
|
-
var
|
|
2147
|
-
for (var o =
|
|
2148
|
-
(
|
|
2149
|
-
return
|
|
2145
|
+
var rs = Object.defineProperty, os = Object.getOwnPropertyDescriptor, S = (e, t, r, i) => {
|
|
2146
|
+
for (var o = i > 1 ? void 0 : i ? os(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2147
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2148
|
+
return i && o && rs(t, r, o), o;
|
|
2150
2149
|
};
|
|
2151
|
-
const
|
|
2152
|
-
let
|
|
2150
|
+
const ne = "settings-model";
|
|
2151
|
+
let T = class {
|
|
2153
2152
|
constructor(e, t, r) {
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2153
|
+
a(this, "id");
|
|
2154
|
+
a(this, "logger");
|
|
2155
|
+
a(this, "ncuiLanguageData");
|
|
2156
|
+
a(this, "resolveDelaysMs");
|
|
2157
|
+
a(this, "dateFormat");
|
|
2158
|
+
a(this, "timeFormat");
|
|
2159
|
+
a(this, "hidePlainWaterBev");
|
|
2160
|
+
a(this, "hideCarbWaterBev");
|
|
2161
|
+
a(this, "ncuiLanguage");
|
|
2162
|
+
a(this, "name");
|
|
2163
|
+
a(this, "activateAndRebootTime");
|
|
2165
2164
|
this.id = e, this.logger = r.logger;
|
|
2166
2165
|
}
|
|
2167
2166
|
updateModel(e) {
|
|
@@ -2197,96 +2196,96 @@ let v = class {
|
|
|
2197
2196
|
};
|
|
2198
2197
|
}
|
|
2199
2198
|
};
|
|
2200
|
-
|
|
2201
|
-
|
|
2199
|
+
S([
|
|
2200
|
+
d({
|
|
2202
2201
|
path: "system:app",
|
|
2203
2202
|
attribute: "resolveDelaysMs"
|
|
2204
2203
|
// optionsExpander: () => [],
|
|
2205
2204
|
})
|
|
2206
|
-
],
|
|
2207
|
-
|
|
2208
|
-
|
|
2205
|
+
], T.prototype, "resolveDelaysMs", 2);
|
|
2206
|
+
S([
|
|
2207
|
+
d({
|
|
2209
2208
|
path: "system:app",
|
|
2210
2209
|
attribute: "dateFormat"
|
|
2211
2210
|
// optionsExpander: () => [],
|
|
2212
2211
|
})
|
|
2213
|
-
],
|
|
2214
|
-
|
|
2215
|
-
|
|
2212
|
+
], T.prototype, "dateFormat", 2);
|
|
2213
|
+
S([
|
|
2214
|
+
d({
|
|
2216
2215
|
path: "system:app",
|
|
2217
2216
|
attribute: "timeFormat"
|
|
2218
2217
|
// optionsExpander: () => [],
|
|
2219
2218
|
})
|
|
2220
|
-
],
|
|
2221
|
-
|
|
2222
|
-
|
|
2219
|
+
], T.prototype, "timeFormat", 2);
|
|
2220
|
+
S([
|
|
2221
|
+
d({
|
|
2223
2222
|
path: "app:kosdev.ddk:app",
|
|
2224
2223
|
attribute: "ncui.hidePlainWaterBev"
|
|
2225
2224
|
})
|
|
2226
|
-
],
|
|
2227
|
-
|
|
2228
|
-
|
|
2225
|
+
], T.prototype, "hidePlainWaterBev", 2);
|
|
2226
|
+
S([
|
|
2227
|
+
d({
|
|
2229
2228
|
path: "app:kosdev.ddk:app",
|
|
2230
2229
|
attribute: "ncui.hideCarbWaterBev"
|
|
2231
2230
|
})
|
|
2232
|
-
],
|
|
2233
|
-
|
|
2234
|
-
|
|
2231
|
+
], T.prototype, "hideCarbWaterBev", 2);
|
|
2232
|
+
S([
|
|
2233
|
+
d({
|
|
2235
2234
|
path: "app:kosdev.ddk:app",
|
|
2236
2235
|
attribute: "ncui.ncuiLanguage"
|
|
2237
2236
|
})
|
|
2238
|
-
],
|
|
2239
|
-
|
|
2240
|
-
|
|
2237
|
+
], T.prototype, "ncuiLanguage", 2);
|
|
2238
|
+
S([
|
|
2239
|
+
d({
|
|
2241
2240
|
path: "kos:device",
|
|
2242
2241
|
attribute: "name"
|
|
2243
2242
|
})
|
|
2244
|
-
],
|
|
2245
|
-
|
|
2246
|
-
|
|
2243
|
+
], T.prototype, "name", 2);
|
|
2244
|
+
S([
|
|
2245
|
+
d({
|
|
2247
2246
|
path: "kos:service:OTA",
|
|
2248
2247
|
attribute: "activateAndRebootTime"
|
|
2249
2248
|
})
|
|
2250
|
-
],
|
|
2251
|
-
|
|
2252
|
-
l(
|
|
2253
|
-
],
|
|
2254
|
-
const
|
|
2249
|
+
], T.prototype, "activateAndRebootTime", 2);
|
|
2250
|
+
T = S([
|
|
2251
|
+
l(ne)
|
|
2252
|
+
], T);
|
|
2253
|
+
const is = {
|
|
2255
2254
|
registration: {
|
|
2256
|
-
[
|
|
2257
|
-
class:
|
|
2255
|
+
[ne]: {
|
|
2256
|
+
class: T,
|
|
2258
2257
|
singleton: !0
|
|
2259
2258
|
}
|
|
2260
2259
|
},
|
|
2261
|
-
type:
|
|
2262
|
-
predicate: c(
|
|
2263
|
-
factory:
|
|
2264
|
-
}, { URL:
|
|
2265
|
-
basePath: `${
|
|
2266
|
-
}),
|
|
2260
|
+
type: ne,
|
|
2261
|
+
predicate: c(ne),
|
|
2262
|
+
factory: u.Singleton.create(ne)
|
|
2263
|
+
}, { URL: _r } = h("SETTINGS_SERVICE"), { getAll: $r } = f.build({
|
|
2264
|
+
basePath: `${_r}/api/settings`
|
|
2265
|
+
}), ss = g.createLogger({
|
|
2267
2266
|
name: "settings-service",
|
|
2268
2267
|
group: "Services"
|
|
2269
|
-
}),
|
|
2270
|
-
urlOverride: `${
|
|
2271
|
-
}),
|
|
2268
|
+
}), as = async () => (ss.debug("sending GET for settings"), await $r({})), ns = async () => await $r({
|
|
2269
|
+
urlOverride: `${_r}api/app/kosdev.ddk/ncui/languages`
|
|
2270
|
+
}), Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2272
2271
|
__proto__: null,
|
|
2273
|
-
getNcuiLanguage:
|
|
2274
|
-
getSettings:
|
|
2272
|
+
getNcuiLanguage: ns,
|
|
2273
|
+
getSettings: as
|
|
2275
2274
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2276
|
-
var
|
|
2277
|
-
for (var o =
|
|
2278
|
-
(
|
|
2279
|
-
return
|
|
2275
|
+
var ls = Object.defineProperty, cs = Object.getOwnPropertyDescriptor, us = (e, t, r, i) => {
|
|
2276
|
+
for (var o = i > 1 ? void 0 : i ? cs(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2277
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2278
|
+
return i && o && ls(t, r, o), o;
|
|
2280
2279
|
};
|
|
2281
|
-
const
|
|
2282
|
-
let
|
|
2280
|
+
const le = "utilities-model";
|
|
2281
|
+
let et = class {
|
|
2283
2282
|
constructor(e, t, r) {
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2283
|
+
a(this, "id");
|
|
2284
|
+
a(this, "name");
|
|
2285
|
+
a(this, "options");
|
|
2286
|
+
a(this, "roles");
|
|
2287
|
+
a(this, "columnId");
|
|
2288
|
+
a(this, "logger");
|
|
2290
2289
|
this.id = e, this.logger = r.logger, this.name = t.name, this.options = t.options, this.roles = t == null ? void 0 : t.roles, this.columnId = t.columnId;
|
|
2291
2290
|
}
|
|
2292
2291
|
updateModel(e) {
|
|
@@ -2306,46 +2305,46 @@ let Ke = class {
|
|
|
2306
2305
|
this.logger.debug(`loading utilities ${this.id}`);
|
|
2307
2306
|
}
|
|
2308
2307
|
};
|
|
2309
|
-
|
|
2310
|
-
l(
|
|
2311
|
-
],
|
|
2312
|
-
const
|
|
2308
|
+
et = us([
|
|
2309
|
+
l(le)
|
|
2310
|
+
], et);
|
|
2311
|
+
const Pr = {
|
|
2313
2312
|
registration: {
|
|
2314
|
-
[
|
|
2315
|
-
class:
|
|
2313
|
+
[le]: {
|
|
2314
|
+
class: et,
|
|
2316
2315
|
singleton: !1
|
|
2317
2316
|
}
|
|
2318
2317
|
},
|
|
2319
|
-
type:
|
|
2320
|
-
predicate: c(
|
|
2321
|
-
factory:
|
|
2322
|
-
}, { URL:
|
|
2323
|
-
basePath: `${
|
|
2324
|
-
}),
|
|
2318
|
+
type: le,
|
|
2319
|
+
predicate: c(le),
|
|
2320
|
+
factory: u.Factory.create(le)
|
|
2321
|
+
}, { URL: Tr } = h("UTILITIES_SERVICE"), { getAll: ds } = f.build({
|
|
2322
|
+
basePath: `${Tr}/api/utilities`
|
|
2323
|
+
}), ps = g.createLogger({
|
|
2325
2324
|
name: "utilities-service",
|
|
2326
2325
|
group: "Services"
|
|
2327
|
-
}),
|
|
2328
|
-
|
|
2329
|
-
const e = await
|
|
2330
|
-
urlOverride: `${
|
|
2326
|
+
}), Or = async () => {
|
|
2327
|
+
ps.debug("sending GET for utilities");
|
|
2328
|
+
const e = await ds({
|
|
2329
|
+
urlOverride: `${Tr}/api/kos/descriptor/system:app/kondra.ncui.utilities`
|
|
2331
2330
|
});
|
|
2332
2331
|
return e == null ? void 0 : e.data;
|
|
2333
|
-
},
|
|
2332
|
+
}, Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2334
2333
|
__proto__: null,
|
|
2335
|
-
getUtilities:
|
|
2334
|
+
getUtilities: Or
|
|
2336
2335
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2337
|
-
var
|
|
2338
|
-
for (var o =
|
|
2339
|
-
(
|
|
2340
|
-
return
|
|
2336
|
+
var gs = Object.defineProperty, hs = Object.getOwnPropertyDescriptor, Mr = (e, t, r, i) => {
|
|
2337
|
+
for (var o = i > 1 ? void 0 : i ? hs(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2338
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2339
|
+
return i && o && gs(t, r, o), o;
|
|
2341
2340
|
};
|
|
2342
|
-
const
|
|
2343
|
-
let
|
|
2341
|
+
const ce = "utilities-container-model";
|
|
2342
|
+
let Se = class {
|
|
2344
2343
|
constructor(e, t, r) {
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
this.id = e, this.logger = r.logger, this._models = new
|
|
2344
|
+
a(this, "id");
|
|
2345
|
+
a(this, "logger");
|
|
2346
|
+
a(this, "_models");
|
|
2347
|
+
this.id = e, this.logger = r.logger, this._models = new tt({
|
|
2349
2348
|
parentId: e,
|
|
2350
2349
|
sortKey: "id",
|
|
2351
2350
|
indexMap: {
|
|
@@ -2377,71 +2376,71 @@ let Te = class {
|
|
|
2377
2376
|
// -------------------LIFECYCLE----------------------------
|
|
2378
2377
|
async load() {
|
|
2379
2378
|
this.logger.debug(`loading utilities-container container ${this.id}`);
|
|
2380
|
-
const e = await
|
|
2379
|
+
const e = await Or();
|
|
2381
2380
|
e == null || e.forEach((t, r) => {
|
|
2382
|
-
t.forEach((
|
|
2381
|
+
t.forEach((i) => {
|
|
2383
2382
|
const o = {
|
|
2384
|
-
...
|
|
2383
|
+
...i,
|
|
2385
2384
|
columnId: String(r)
|
|
2386
|
-
},
|
|
2385
|
+
}, n = Pr.factory(i.name)(
|
|
2387
2386
|
o
|
|
2388
2387
|
);
|
|
2389
|
-
this.addModel(
|
|
2388
|
+
this.addModel(n);
|
|
2390
2389
|
});
|
|
2391
2390
|
});
|
|
2392
2391
|
}
|
|
2393
2392
|
};
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
],
|
|
2397
|
-
|
|
2398
|
-
l(
|
|
2399
|
-
],
|
|
2400
|
-
const
|
|
2393
|
+
Mr([
|
|
2394
|
+
De
|
|
2395
|
+
], Se.prototype, "_models", 2);
|
|
2396
|
+
Se = Mr([
|
|
2397
|
+
l(ce)
|
|
2398
|
+
], Se);
|
|
2399
|
+
const fs = {
|
|
2401
2400
|
registration: {
|
|
2402
|
-
[
|
|
2403
|
-
class:
|
|
2401
|
+
[ce]: {
|
|
2402
|
+
class: Se,
|
|
2404
2403
|
singleton: !0
|
|
2405
2404
|
},
|
|
2406
|
-
...
|
|
2405
|
+
...Pr.registration
|
|
2407
2406
|
},
|
|
2408
|
-
type:
|
|
2409
|
-
predicate: c(
|
|
2410
|
-
factory:
|
|
2411
|
-
},
|
|
2412
|
-
...
|
|
2413
|
-
...
|
|
2414
|
-
...
|
|
2415
|
-
...
|
|
2416
|
-
...
|
|
2417
|
-
...
|
|
2418
|
-
...
|
|
2419
|
-
...
|
|
2420
|
-
...
|
|
2421
|
-
...
|
|
2422
|
-
...
|
|
2423
|
-
...
|
|
2424
|
-
...
|
|
2425
|
-
...
|
|
2426
|
-
...
|
|
2427
|
-
...
|
|
2428
|
-
...
|
|
2429
|
-
};
|
|
2430
|
-
var
|
|
2431
|
-
for (var o =
|
|
2432
|
-
(
|
|
2433
|
-
return
|
|
2434
|
-
};
|
|
2435
|
-
const
|
|
2436
|
-
let
|
|
2407
|
+
type: ce,
|
|
2408
|
+
predicate: c(ce),
|
|
2409
|
+
factory: u.Singleton.create(ce)
|
|
2410
|
+
}, Zs = {
|
|
2411
|
+
...Co.registration,
|
|
2412
|
+
...at.registration,
|
|
2413
|
+
...it.registration,
|
|
2414
|
+
...Ao.registration,
|
|
2415
|
+
...nt.registration,
|
|
2416
|
+
...qo.registration,
|
|
2417
|
+
...ti.registration,
|
|
2418
|
+
...ci.registration,
|
|
2419
|
+
...vi.registration,
|
|
2420
|
+
...Fi.registration,
|
|
2421
|
+
...zi.registration,
|
|
2422
|
+
...Ki.registration,
|
|
2423
|
+
...Gi.registration,
|
|
2424
|
+
...ts.registration,
|
|
2425
|
+
...is.registration,
|
|
2426
|
+
...kt.registration,
|
|
2427
|
+
...fs.registration
|
|
2428
|
+
};
|
|
2429
|
+
var ms = Object.defineProperty, ys = Object.getOwnPropertyDescriptor, Sr = (e, t, r, i) => {
|
|
2430
|
+
for (var o = i > 1 ? void 0 : i ? ys(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2431
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2432
|
+
return i && o && ms(t, r, o), o;
|
|
2433
|
+
};
|
|
2434
|
+
const Cr = "trouble-action-model";
|
|
2435
|
+
let Ce = class {
|
|
2437
2436
|
constructor(e, t, r) {
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
this.id = e, this.logger = r.logger, this.state =
|
|
2437
|
+
a(this, "id");
|
|
2438
|
+
a(this, "logger");
|
|
2439
|
+
a(this, "troubleContainer");
|
|
2440
|
+
a(this, "disposer");
|
|
2441
|
+
a(this, "state");
|
|
2442
|
+
a(this, "troubleActionData");
|
|
2443
|
+
this.id = e, this.logger = r.logger, this.state = Gr(), this.troubleActionData = t.definitions.reduce((i, o) => (i[o.troubleType] = o, i), {});
|
|
2445
2444
|
}
|
|
2446
2445
|
// -------------------LIFECYCLE----------------------------
|
|
2447
2446
|
get activeTrouble() {
|
|
@@ -2459,12 +2458,12 @@ let Pe = class {
|
|
|
2459
2458
|
return (e = this.activeTrouble) == null ? void 0 : e.type;
|
|
2460
2459
|
}
|
|
2461
2460
|
async init() {
|
|
2462
|
-
this.logger.debug(`initializing trouble-action ${this.id}`), this.disposer =
|
|
2461
|
+
this.logger.debug(`initializing trouble-action ${this.id}`), this.disposer = Qr(() => {
|
|
2463
2462
|
const e = this.troubleContainer.troubles.data.reduce((t, r) => {
|
|
2464
|
-
const
|
|
2465
|
-
if (this.troubleActionData[
|
|
2466
|
-
const o = this.troubleActionData[
|
|
2467
|
-
t[o] =
|
|
2463
|
+
const i = r.type;
|
|
2464
|
+
if (this.troubleActionData[i]) {
|
|
2465
|
+
const o = this.troubleActionData[i].stateKey ?? i, n = this.troubleActionData[i].stateValue ?? i;
|
|
2466
|
+
t[o] = n;
|
|
2468
2467
|
}
|
|
2469
2468
|
return t;
|
|
2470
2469
|
}, {});
|
|
@@ -2484,34 +2483,34 @@ let Pe = class {
|
|
|
2484
2483
|
this.logger.debug(`loading trouble-action ${this.id}`);
|
|
2485
2484
|
}
|
|
2486
2485
|
};
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
],
|
|
2490
|
-
|
|
2491
|
-
l(
|
|
2492
|
-
],
|
|
2493
|
-
const
|
|
2494
|
-
class:
|
|
2495
|
-
type:
|
|
2496
|
-
}), { URL:
|
|
2497
|
-
basePath: `${
|
|
2498
|
-
}),
|
|
2499
|
-
urlOverride: `${
|
|
2500
|
-
})),
|
|
2486
|
+
Sr([
|
|
2487
|
+
m({ modelType: rt.type })
|
|
2488
|
+
], Ce.prototype, "troubleContainer", 2);
|
|
2489
|
+
Ce = Sr([
|
|
2490
|
+
l(Cr)
|
|
2491
|
+
], Ce);
|
|
2492
|
+
const ea = new pe({
|
|
2493
|
+
class: Ce,
|
|
2494
|
+
type: Cr
|
|
2495
|
+
}), { URL: wr } = h("START_SERVICE"), { getOne: bs } = f.build({
|
|
2496
|
+
basePath: `${wr}/api/start`
|
|
2497
|
+
}), vs = g.createLogger({ name: "start-service", group: "Services" }), Er = async () => (vs.debug("navigating to NCUI"), await bs({
|
|
2498
|
+
urlOverride: `${wr}/api/app/kosdev.ddk/ncui/open`
|
|
2499
|
+
})), ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2501
2500
|
__proto__: null,
|
|
2502
|
-
navigateToNCui:
|
|
2501
|
+
navigateToNCui: Er
|
|
2503
2502
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2504
|
-
var
|
|
2505
|
-
for (var o =
|
|
2506
|
-
(
|
|
2507
|
-
return
|
|
2503
|
+
var _s = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, Lr = (e, t, r, i) => {
|
|
2504
|
+
for (var o = i > 1 ? void 0 : i ? $s(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2505
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2506
|
+
return i && o && _s(t, r, o), o;
|
|
2508
2507
|
};
|
|
2509
|
-
const
|
|
2510
|
-
let
|
|
2508
|
+
const Dr = "start-model";
|
|
2509
|
+
let we = class {
|
|
2511
2510
|
constructor(e, t, r) {
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2511
|
+
a(this, "id");
|
|
2512
|
+
a(this, "logger");
|
|
2513
|
+
a(this, "troubles");
|
|
2515
2514
|
this.id = e, this.logger = r.logger;
|
|
2516
2515
|
}
|
|
2517
2516
|
get firmwareFailed() {
|
|
@@ -2527,7 +2526,7 @@ let Oe = class {
|
|
|
2527
2526
|
).length > 0;
|
|
2528
2527
|
}
|
|
2529
2528
|
async navigate() {
|
|
2530
|
-
await
|
|
2529
|
+
await Er();
|
|
2531
2530
|
}
|
|
2532
2531
|
// -------------------LIFECYCLE----------------------------
|
|
2533
2532
|
async init() {
|
|
@@ -2537,73 +2536,261 @@ let Oe = class {
|
|
|
2537
2536
|
this.logger.debug(`loading start ${this.id}`);
|
|
2538
2537
|
}
|
|
2539
2538
|
};
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
],
|
|
2543
|
-
|
|
2544
|
-
l(
|
|
2545
|
-
],
|
|
2546
|
-
const
|
|
2547
|
-
class:
|
|
2548
|
-
type:
|
|
2539
|
+
Lr([
|
|
2540
|
+
m({ modelType: rt.type })
|
|
2541
|
+
], we.prototype, "troubles", 2);
|
|
2542
|
+
we = Lr([
|
|
2543
|
+
l(Dr)
|
|
2544
|
+
], we);
|
|
2545
|
+
const ra = new pe({
|
|
2546
|
+
class: we,
|
|
2547
|
+
type: Dr
|
|
2548
|
+
}), { URL: ye } = h("SPM-PUMP_SERVICE"), { postModel: ze } = f.build({
|
|
2549
|
+
basePath: `${ye}/api/spm-pump`
|
|
2550
|
+
}), $ = g.createLogger({
|
|
2551
|
+
name: "spm-pump-service",
|
|
2552
|
+
group: "Services"
|
|
2553
|
+
}), Rr = async (e, t) => {
|
|
2554
|
+
$.debug(
|
|
2555
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
|
|
2556
|
+
);
|
|
2557
|
+
try {
|
|
2558
|
+
const r = await ze({
|
|
2559
|
+
model: {},
|
|
2560
|
+
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
|
|
2561
|
+
tracker: t
|
|
2562
|
+
});
|
|
2563
|
+
return $.debug("performPreCalibrate - response:", r), r != null && r.data && P.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
2564
|
+
} catch (r) {
|
|
2565
|
+
$.error(
|
|
2566
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
|
|
2567
|
+
r
|
|
2568
|
+
);
|
|
2569
|
+
const i = {
|
|
2570
|
+
id: t || "",
|
|
2571
|
+
endState: b.Fail,
|
|
2572
|
+
tracker: t,
|
|
2573
|
+
reason: "Failed to resolve trouble"
|
|
2574
|
+
};
|
|
2575
|
+
return P.initiateFuture(i), i;
|
|
2576
|
+
}
|
|
2577
|
+
}, Ir = async (e, t) => {
|
|
2578
|
+
$.debug(
|
|
2579
|
+
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
|
|
2580
|
+
);
|
|
2581
|
+
try {
|
|
2582
|
+
const r = await ze({
|
|
2583
|
+
model: {},
|
|
2584
|
+
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
|
|
2585
|
+
tracker: t
|
|
2586
|
+
});
|
|
2587
|
+
return $.debug("performCalibrate - response:", r), r != null && r.data && P.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
2588
|
+
} catch (r) {
|
|
2589
|
+
$.error(
|
|
2590
|
+
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
|
|
2591
|
+
r
|
|
2592
|
+
);
|
|
2593
|
+
const i = {
|
|
2594
|
+
id: t || "",
|
|
2595
|
+
endState: b.Fail,
|
|
2596
|
+
tracker: t,
|
|
2597
|
+
reason: "Failed to resolve trouble"
|
|
2598
|
+
};
|
|
2599
|
+
return P.initiateFuture(i), i;
|
|
2600
|
+
}
|
|
2601
|
+
}, kr = async (e, t, r, i) => {
|
|
2602
|
+
$.debug(
|
|
2603
|
+
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
|
|
2604
|
+
);
|
|
2605
|
+
try {
|
|
2606
|
+
const o = await ze({
|
|
2607
|
+
model: {
|
|
2608
|
+
...r,
|
|
2609
|
+
// commandedCalibrationVolume: 0,
|
|
2610
|
+
measuredCalibrationVolume: t
|
|
2611
|
+
// measuredVerificationVolume: 0,
|
|
2612
|
+
// newCalibrationValue: 0,
|
|
2613
|
+
// pouredCalibrationVolume: 0,
|
|
2614
|
+
},
|
|
2615
|
+
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
|
|
2616
|
+
tracker: i
|
|
2617
|
+
});
|
|
2618
|
+
return $.debug("performVerify - response:", o), o != null && o.data && P.initiateFuture(o.data), o == null ? void 0 : o.data;
|
|
2619
|
+
} catch (o) {
|
|
2620
|
+
$.error(
|
|
2621
|
+
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,
|
|
2622
|
+
o
|
|
2623
|
+
);
|
|
2624
|
+
const n = {
|
|
2625
|
+
id: i || "",
|
|
2626
|
+
endState: b.Fail,
|
|
2627
|
+
tracker: i,
|
|
2628
|
+
reason: "Failed to resolve trouble"
|
|
2629
|
+
};
|
|
2630
|
+
return P.initiateFuture(n), n;
|
|
2631
|
+
}
|
|
2632
|
+
}, Fr = async (e, t, r, i) => {
|
|
2633
|
+
var o, n, s, O, D;
|
|
2634
|
+
$.debug(
|
|
2635
|
+
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
2636
|
+
);
|
|
2637
|
+
try {
|
|
2638
|
+
const p = await ze({
|
|
2639
|
+
model: {
|
|
2640
|
+
...i,
|
|
2641
|
+
// commandedCalibrationVolume: 0,
|
|
2642
|
+
measuredCalibrationVolume: t,
|
|
2643
|
+
measuredVerificationVolume: r
|
|
2644
|
+
// newCalibrationValue: 0,
|
|
2645
|
+
// pouredCalibrationVolume: 0,
|
|
2646
|
+
},
|
|
2647
|
+
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
2648
|
+
});
|
|
2649
|
+
return $.debug("performComplete - response:", p), ((p == null ? void 0 : p.status) === 200 || (p == null ? void 0 : p.status) === 499) && ((o = p.data) != null && o.error) ? [p.data.error || "unknownError", p.data] : [void 0, p == null ? void 0 : p.data];
|
|
2650
|
+
} catch (p) {
|
|
2651
|
+
if ($.error(
|
|
2652
|
+
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
|
|
2653
|
+
p
|
|
2654
|
+
), p instanceof Ie) {
|
|
2655
|
+
const ut = ((s = (n = p.payload) == null ? void 0 : n.data) == null ? void 0 : s.error) || ((O = p.payload) == null ? void 0 : O.error) || "unknownError";
|
|
2656
|
+
return [ut, ((D = p.payload) == null ? void 0 : D.data) || { error: ut }];
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
return ["unknownError", { error: "unknownError" }];
|
|
2660
|
+
}, oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2661
|
+
__proto__: null,
|
|
2662
|
+
performCalibrate: Ir,
|
|
2663
|
+
performComplete: Fr,
|
|
2664
|
+
performPreCalibrate: Rr,
|
|
2665
|
+
performVerify: kr
|
|
2666
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
2667
|
+
var Ps = Object.defineProperty, Ts = Object.getOwnPropertyDescriptor, Ne = (e, t, r, i) => {
|
|
2668
|
+
for (var o = i > 1 ? void 0 : i ? Ts(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2669
|
+
(s = e[n]) && (o = (i ? s(t, r, o) : s(o)) || o);
|
|
2670
|
+
return i && o && Ps(t, r, o), o;
|
|
2671
|
+
};
|
|
2672
|
+
const xr = "spm-pump-model";
|
|
2673
|
+
let j = class {
|
|
2674
|
+
constructor(e, t, r) {
|
|
2675
|
+
a(this, "id");
|
|
2676
|
+
a(this, "logger");
|
|
2677
|
+
a(this, "pump");
|
|
2678
|
+
a(this, "futureHandler");
|
|
2679
|
+
this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new ge(this);
|
|
2680
|
+
}
|
|
2681
|
+
get name() {
|
|
2682
|
+
return this.pump.name;
|
|
2683
|
+
}
|
|
2684
|
+
get canPour() {
|
|
2685
|
+
return this.pump.canPour;
|
|
2686
|
+
}
|
|
2687
|
+
get isPouring() {
|
|
2688
|
+
return this.pump.isPouring;
|
|
2689
|
+
}
|
|
2690
|
+
async cancelPour() {
|
|
2691
|
+
return this.pump.cancelPour();
|
|
2692
|
+
}
|
|
2693
|
+
performIntent(e) {
|
|
2694
|
+
return this.pump.performIntent(e);
|
|
2695
|
+
}
|
|
2696
|
+
get future() {
|
|
2697
|
+
return this.futureHandler.future;
|
|
2698
|
+
}
|
|
2699
|
+
async performPreCalibrate(e) {
|
|
2700
|
+
return Rr(this.pump.path, e);
|
|
2701
|
+
}
|
|
2702
|
+
async performCalibrate(e) {
|
|
2703
|
+
return Ir(this.pump.path, e);
|
|
2704
|
+
}
|
|
2705
|
+
async performVerify(e, t, r) {
|
|
2706
|
+
return kr(this.pump.path, e, t, r);
|
|
2707
|
+
}
|
|
2708
|
+
async performComplete(e, t, r) {
|
|
2709
|
+
return Fr(this.pump.path, e, t, r);
|
|
2710
|
+
}
|
|
2711
|
+
// -------------------LIFECYCLE----------------------------
|
|
2712
|
+
async init() {
|
|
2713
|
+
this.logger.debug(`initializing spm-pump ${this.id}`);
|
|
2714
|
+
}
|
|
2715
|
+
async load() {
|
|
2716
|
+
this.logger.debug(`loading spm-pump ${this.id}`);
|
|
2717
|
+
}
|
|
2718
|
+
};
|
|
2719
|
+
Ne([
|
|
2720
|
+
v()
|
|
2721
|
+
], j.prototype, "performPreCalibrate", 1);
|
|
2722
|
+
Ne([
|
|
2723
|
+
v()
|
|
2724
|
+
], j.prototype, "performCalibrate", 1);
|
|
2725
|
+
Ne([
|
|
2726
|
+
v()
|
|
2727
|
+
], j.prototype, "performVerify", 1);
|
|
2728
|
+
j = Ne([
|
|
2729
|
+
l(xr)
|
|
2730
|
+
], j);
|
|
2731
|
+
const ia = new Le({
|
|
2732
|
+
class: j,
|
|
2733
|
+
type: xr
|
|
2549
2734
|
});
|
|
2550
2735
|
export {
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2736
|
+
Ls as AgitationControl,
|
|
2737
|
+
Co as Animation,
|
|
2738
|
+
Ds as AnimationServices,
|
|
2739
|
+
at as Application,
|
|
2740
|
+
it as Auth,
|
|
2741
|
+
ws as AuthServices,
|
|
2742
|
+
Ao as CarbWater,
|
|
2743
|
+
ks as CopyLogs,
|
|
2744
|
+
Is as CopyLogsServices,
|
|
2745
|
+
Zs as DDKModels,
|
|
2746
|
+
nt as DashboardOperations,
|
|
2747
|
+
Fs as DashboardOperationsServices,
|
|
2748
|
+
qo as Dispenser,
|
|
2749
|
+
ti as DispenserInfo,
|
|
2750
|
+
As as DispenserInfoServices,
|
|
2751
|
+
xs as DispenserServices,
|
|
2752
|
+
no as Door,
|
|
2753
|
+
ue as EXTENSION_POINT_DASHBOARD_KEY_FACTORY,
|
|
2754
|
+
ci as Enrollment,
|
|
2755
|
+
js as EnrollmentServices,
|
|
2756
|
+
Kt as FcmPump,
|
|
2757
|
+
Rs as FcmPumpServices,
|
|
2758
|
+
vi as IngredientSummary,
|
|
2759
|
+
Bs as LfcvPump,
|
|
2760
|
+
Ks as LfcvPumpServices,
|
|
2761
|
+
qs as Lockout,
|
|
2762
|
+
Ys as LockoutServices,
|
|
2763
|
+
Ws as MACRO_KEYS,
|
|
2764
|
+
Fi as MacroAssignment,
|
|
2765
|
+
dr as NetworkTest,
|
|
2766
|
+
zi as NetworkTestContainer,
|
|
2767
|
+
Gs as NetworkTestServices,
|
|
2768
|
+
Ki as NutritiveSweetener,
|
|
2769
|
+
Gi as PlainWater,
|
|
2770
|
+
ts as Reboot,
|
|
2771
|
+
Qs as RebootServices,
|
|
2772
|
+
is as Settings,
|
|
2773
|
+
Xs as SettingsServices,
|
|
2774
|
+
It as SetupStep,
|
|
2775
|
+
kt as SetupStepContainer,
|
|
2776
|
+
Es as SetupStepServices,
|
|
2777
|
+
ia as SpmPump,
|
|
2778
|
+
oa as SpmPumpServices,
|
|
2779
|
+
ra as Start,
|
|
2780
|
+
ta as StartServices,
|
|
2781
|
+
Zr as TROUBLE_TYPE_PRIME,
|
|
2782
|
+
gt as TROUBLE_TYPE_PURGE,
|
|
2783
|
+
ea as TroubleActionManager,
|
|
2784
|
+
Pr as Utilities,
|
|
2785
|
+
fs as UtilitiesContainer,
|
|
2786
|
+
Js as UtilitiesServices,
|
|
2787
|
+
mi as calculateTimeDifference,
|
|
2788
|
+
fi as executeDashboardKeyFactory,
|
|
2789
|
+
Vs as isMacroGroup,
|
|
2790
|
+
Us as isMicroGroup,
|
|
2791
|
+
Hs as macroHolderMap,
|
|
2792
|
+
hi as registerDashboardKeyFactory,
|
|
2793
|
+
Ns as toSeconds,
|
|
2794
|
+
zs as toTimeComponents,
|
|
2795
|
+
jt as troubleVisibilityFilter
|
|
2609
2796
|
};
|