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