@kosdev-code/kos-dispense-sdk 2.0.31 → 2.0.32
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.cjs +1 -1
- package/index.js +1 -1
- package/models/utils/service.d.ts +15 -7
- package/models/utils/service.d.ts.map +1 -1
- package/package.json +3 -3
- package/{pump-provider-DgkR1iwg.cjs → pump-provider-CP6xxU4h.cjs} +2 -2
- package/{pump-provider-DgkR1iwg.cjs.map → pump-provider-CP6xxU4h.cjs.map} +1 -1
- package/{pump-provider-0z7R7MK1.js → pump-provider-jdIoS5JD.js} +183 -171
- package/{pump-provider-0z7R7MK1.js.map → pump-provider-jdIoS5JD.js.map} +1 -1
- package/ui/contexts/cui-kit/cui-kit.d.ts +8 -1
- package/ui/contexts/cui-kit/cui-kit.d.ts.map +1 -1
- package/ui.cjs +1 -1
- package/ui.js +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var ze = Object.defineProperty;
|
|
2
2
|
var et = (e, t, r) => t in e ? ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var _ = (e, t, r) => (et(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { useKosModel as E, getKosCompanionModel as pe, kosAutoEffect as
|
|
6
|
-
import tt, { createContext as
|
|
4
|
+
import { jsx as l } from "@emotion/react/jsx-runtime";
|
|
5
|
+
import { useKosModel as E, getKosCompanionModel as pe, kosAutoEffect as ke, KosLog as w, usePressGesture as me, EventBus as T, TimerManager as He } from "@kosdev-code/kos-ui-sdk";
|
|
6
|
+
import tt, { createContext as H, useMemo as P, useContext as N, useState as I, useCallback as i, useEffect as Y, useRef as st } from "react";
|
|
7
7
|
import { A as $e, a as we, d as rt, c as Pe, N as nt, e as ge, H as ot, f as Te, I as Ie, g as Ae, G as at, P as xe } from "./dispense-registration-manager-CKFF29mO.js";
|
|
8
|
-
const
|
|
8
|
+
const Se = () => {
|
|
9
9
|
const e = $e.type;
|
|
10
10
|
return E({
|
|
11
11
|
modelId: e,
|
|
@@ -15,8 +15,8 @@ const Ne = () => {
|
|
|
15
15
|
};
|
|
16
16
|
function Bt(e) {
|
|
17
17
|
return (t) => {
|
|
18
|
-
const { model: r, status: n, KosModelLoader: s } =
|
|
19
|
-
return /* @__PURE__ */
|
|
18
|
+
const { model: r, status: n, KosModelLoader: s } = Se();
|
|
19
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, assembly: r }) });
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
const Be = () => {
|
|
@@ -30,7 +30,7 @@ const Be = () => {
|
|
|
30
30
|
function Kt(e) {
|
|
31
31
|
return (t) => {
|
|
32
32
|
const { model: r, status: n, KosModelLoader: s } = Be();
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, beverage: r }) });
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
const Ke = (e) => E({
|
|
@@ -41,7 +41,7 @@ const Ke = (e) => E({
|
|
|
41
41
|
function Lt(e) {
|
|
42
42
|
return (t) => (r) => {
|
|
43
43
|
const { model: n, status: s, KosModelLoader: o } = Ke(t);
|
|
44
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ l(o, { ...s, children: /* @__PURE__ */ l(e, { ...r, board: n }) });
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
const Le = () => {
|
|
@@ -55,7 +55,7 @@ const Le = () => {
|
|
|
55
55
|
function Ct(e) {
|
|
56
56
|
return (t) => {
|
|
57
57
|
const { model: r, status: n, KosModelLoader: s } = Le();
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, boardContainer: r }) });
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
const Ce = (e) => E({
|
|
@@ -64,11 +64,11 @@ const Ce = (e) => E({
|
|
|
64
64
|
options: {
|
|
65
65
|
path: e
|
|
66
66
|
}
|
|
67
|
-
}), De =
|
|
67
|
+
}), De = H(void 0), it = ({ children: e, path: t }) => {
|
|
68
68
|
const { model: r, ready: n } = Ce(t), s = P(() => n && r ? { model: r } : {}, [n, r]);
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ l(De.Provider, { value: s, children: e });
|
|
70
70
|
}, C = () => {
|
|
71
|
-
const e =
|
|
71
|
+
const e = N(De);
|
|
72
72
|
if (!e)
|
|
73
73
|
throw new Error("useNozzleContext must be used within a NozzleProvider");
|
|
74
74
|
return e;
|
|
@@ -77,18 +77,18 @@ const Ce = (e) => E({
|
|
|
77
77
|
onClearBeverage: t,
|
|
78
78
|
companionType: r
|
|
79
79
|
}) => {
|
|
80
|
-
const { model: n } = C(), [s, o] = I([]), [c,
|
|
80
|
+
const { model: n } = C(), [s, o] = I([]), [c, u] = I(null), h = P(() => r ? s.map(
|
|
81
81
|
(d) => pe(d, r)
|
|
82
82
|
) : [], [s, r]), f = i(
|
|
83
83
|
async (d) => {
|
|
84
|
-
|
|
84
|
+
u(d), await (n == null ? void 0 : n.setSelectedPourable({ beverage: d })), e == null || e(d);
|
|
85
85
|
},
|
|
86
86
|
[n, e]
|
|
87
|
-
),
|
|
88
|
-
|
|
87
|
+
), p = i(async () => {
|
|
88
|
+
u(null), await (n == null ? void 0 : n.setSelectedPourable({ beverage: void 0 })), t == null || t();
|
|
89
89
|
}, [n, t]);
|
|
90
90
|
return Y(() => {
|
|
91
|
-
const d =
|
|
91
|
+
const d = ke(() => {
|
|
92
92
|
if (!n)
|
|
93
93
|
return;
|
|
94
94
|
const v = n.selectedBrand;
|
|
@@ -108,24 +108,24 @@ const Ce = (e) => E({
|
|
|
108
108
|
beverageCompanions: h,
|
|
109
109
|
selectBeverage: f,
|
|
110
110
|
selectedBeverage: c,
|
|
111
|
-
clearBeverage:
|
|
111
|
+
clearBeverage: p
|
|
112
112
|
};
|
|
113
113
|
}, dt = ({
|
|
114
114
|
onBrandSelected: e,
|
|
115
115
|
onBrandCleared: t,
|
|
116
116
|
companionType: r
|
|
117
117
|
}) => {
|
|
118
|
-
const { model: n } = C(), [s, o] = I(null), [c,
|
|
118
|
+
const { model: n } = C(), [s, o] = I(null), [c, u] = I([]), h = P(() => r ? c.map((d) => pe(d, r)) : [], [c, r]), f = i(
|
|
119
119
|
async (d) => {
|
|
120
120
|
o(d), n == null || n.setSelectedBrand(d), e == null || e(d);
|
|
121
121
|
},
|
|
122
122
|
[n, e]
|
|
123
|
-
),
|
|
123
|
+
), p = i(() => {
|
|
124
124
|
o(null), n == null || n.setSelectedBrand(void 0), t == null || t();
|
|
125
125
|
}, [n, t]);
|
|
126
126
|
return Y(() => {
|
|
127
|
-
const d =
|
|
128
|
-
n &&
|
|
127
|
+
const d = ke(() => {
|
|
128
|
+
n && u(n.visibleBrands);
|
|
129
129
|
});
|
|
130
130
|
return () => {
|
|
131
131
|
d();
|
|
@@ -135,7 +135,7 @@ const Ce = (e) => E({
|
|
|
135
135
|
brandCompanions: h,
|
|
136
136
|
selectedBrand: s,
|
|
137
137
|
selectBrand: f,
|
|
138
|
-
clearBrand:
|
|
138
|
+
clearBrand: p
|
|
139
139
|
};
|
|
140
140
|
}, ut = w.createLogger({
|
|
141
141
|
name: "HoldToPourStrategy",
|
|
@@ -168,18 +168,18 @@ const Ce = (e) => E({
|
|
|
168
168
|
), s == null || s.initiate(o), e == null || e()) : (Q.debug(
|
|
169
169
|
`[${s == null ? void 0 : s.name}] - Did not pass onBeforePour gate for nozzle ${o == null ? void 0 : o.id}. Cancelling pour.`
|
|
170
170
|
), n == null || n());
|
|
171
|
-
}, [e, o, s, r, t]),
|
|
172
|
-
var
|
|
171
|
+
}, [e, o, s, r, t]), u = i(() => {
|
|
172
|
+
var p;
|
|
173
173
|
Q.debug(
|
|
174
174
|
`[${s == null ? void 0 : s.name}] - Pour initiate ended called for nozzle ${o == null ? void 0 : o.id}.`
|
|
175
|
-
), (
|
|
175
|
+
), (p = s == null ? void 0 : s.initiateEnded) == null || p.call(s, o), t == null || t();
|
|
176
176
|
}, [t, o, s]), h = i(() => {
|
|
177
177
|
Q.debug(`Force cancelling pour for nozzle ${o == null ? void 0 : o.id}.`), o == null || o.cancelPour(), t == null || t();
|
|
178
178
|
}, [t, o]);
|
|
179
179
|
return {
|
|
180
180
|
handlers: me({
|
|
181
181
|
onPressed: c,
|
|
182
|
-
onRelease:
|
|
182
|
+
onRelease: u
|
|
183
183
|
}).dom,
|
|
184
184
|
cancel: h,
|
|
185
185
|
status: o
|
|
@@ -190,14 +190,14 @@ const Ce = (e) => E({
|
|
|
190
190
|
companionType: r
|
|
191
191
|
}) => {
|
|
192
192
|
const { model: n } = C(), s = P(
|
|
193
|
-
() => (n == null ? void 0 : n.getGroupAvailabilityItems("flavors").filter((
|
|
193
|
+
() => (n == null ? void 0 : n.getGroupAvailabilityItems("flavors").filter((p) => p.visible)) ?? [],
|
|
194
194
|
[n]
|
|
195
195
|
), o = P(() => r ? s.map(
|
|
196
|
-
(
|
|
197
|
-
) : [], [s, r]), [c,
|
|
198
|
-
async (
|
|
199
|
-
if (
|
|
200
|
-
(d) => d != null && d.includes(
|
|
196
|
+
(p) => pe(p, r)
|
|
197
|
+
) : [], [s, r]), [c, u] = I([]), h = i(
|
|
198
|
+
async (p) => {
|
|
199
|
+
if (u(
|
|
200
|
+
(d) => d != null && d.includes(p) ? [...d.filter((v) => v !== p)] : [...d ?? [], p]
|
|
201
201
|
), n != null && n.selectedPourable) {
|
|
202
202
|
const { beverage: d } = n.selectedPourable;
|
|
203
203
|
await n.setSelectedPourable({
|
|
@@ -205,13 +205,13 @@ const Ce = (e) => E({
|
|
|
205
205
|
additional: c ?? []
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
e == null || e(
|
|
208
|
+
e == null || e(p, c ?? []);
|
|
209
209
|
},
|
|
210
210
|
[n, e, c]
|
|
211
211
|
), f = i(async () => {
|
|
212
|
-
if (
|
|
213
|
-
const { beverage:
|
|
214
|
-
n.setSelectedPourable({ beverage:
|
|
212
|
+
if (u([]), n != null && n.selectedPourable) {
|
|
213
|
+
const { beverage: p } = n.selectedPourable;
|
|
214
|
+
n.setSelectedPourable({ beverage: p }), t == null || t();
|
|
215
215
|
}
|
|
216
216
|
}, [n, t]);
|
|
217
217
|
return {
|
|
@@ -227,50 +227,50 @@ const Ce = (e) => E({
|
|
|
227
227
|
}) => {
|
|
228
228
|
var W, q, J;
|
|
229
229
|
const [r, n] = I(e), { model: s } = C(), o = st([]), c = i(
|
|
230
|
-
(
|
|
230
|
+
(m) => {
|
|
231
231
|
n(j);
|
|
232
|
-
const
|
|
233
|
-
T.publish(
|
|
232
|
+
const S = `/kos/dispense/${s == null ? void 0 : s.path}/brand/selected/`;
|
|
233
|
+
T.publish(S, m);
|
|
234
234
|
},
|
|
235
235
|
[s == null ? void 0 : s.path]
|
|
236
|
-
),
|
|
237
|
-
const
|
|
238
|
-
T.publish(
|
|
236
|
+
), u = i(() => {
|
|
237
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/brand/cleared/`;
|
|
238
|
+
T.publish(m, {});
|
|
239
239
|
}, [s == null ? void 0 : s.path]), h = i(
|
|
240
|
-
(
|
|
240
|
+
(m) => {
|
|
241
241
|
n(j);
|
|
242
|
-
const
|
|
243
|
-
T.publish(
|
|
242
|
+
const S = `/kos/dispense/${s == null ? void 0 : s.path}/beverage/selected/`;
|
|
243
|
+
T.publish(S, m);
|
|
244
244
|
},
|
|
245
245
|
[s == null ? void 0 : s.path]
|
|
246
246
|
), f = i(() => {
|
|
247
|
-
const
|
|
248
|
-
T.publish(
|
|
249
|
-
}, [s == null ? void 0 : s.path]),
|
|
250
|
-
(
|
|
251
|
-
const
|
|
252
|
-
T.publish(
|
|
247
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/beverage/cleared/`;
|
|
248
|
+
T.publish(m, {});
|
|
249
|
+
}, [s == null ? void 0 : s.path]), p = i(
|
|
250
|
+
(m) => {
|
|
251
|
+
const S = `/kos/dispense/${s == null ? void 0 : s.path}/flavor/selected/`;
|
|
252
|
+
T.publish(S, m);
|
|
253
253
|
},
|
|
254
254
|
[s == null ? void 0 : s.path]
|
|
255
255
|
), d = i(() => {
|
|
256
|
-
const
|
|
257
|
-
T.publish(
|
|
256
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/flavor/cleared/`;
|
|
257
|
+
T.publish(m, {});
|
|
258
258
|
}, [s == null ? void 0 : s.path]), v = i(() => {
|
|
259
|
-
const
|
|
260
|
-
T.publish(
|
|
259
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/pour/`;
|
|
260
|
+
T.publish(m, {});
|
|
261
261
|
}, [s == null ? void 0 : s.path]), b = i(async () => {
|
|
262
|
-
const
|
|
263
|
-
return T.publish(
|
|
262
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/pre/pour/`;
|
|
263
|
+
return T.publish(m, {}), await (g == null ? void 0 : g()) || !0;
|
|
264
264
|
}, [s == null ? void 0 : s.path]), a = i(async () => {
|
|
265
|
-
const
|
|
266
|
-
T.publish(
|
|
265
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/pre/pour/rejected/`;
|
|
266
|
+
T.publish(m, {});
|
|
267
267
|
}, [s == null ? void 0 : s.path]), $ = i(() => {
|
|
268
|
-
const
|
|
269
|
-
T.publish(
|
|
270
|
-
}, [s == null ? void 0 : s.path]), { brands: y, selectBrand:
|
|
268
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/pour/cancel/`;
|
|
269
|
+
T.publish(m, {});
|
|
270
|
+
}, [s == null ? void 0 : s.path]), { brands: y, selectBrand: k, selectedBrand: B, clearBrand: K, brandCompanions: V } = dt({
|
|
271
271
|
companionType: (W = t.companionTypes) == null ? void 0 : W.brand,
|
|
272
272
|
onBrandSelected: c,
|
|
273
|
-
onBrandCleared:
|
|
273
|
+
onBrandCleared: u
|
|
274
274
|
}), {
|
|
275
275
|
beverages: z,
|
|
276
276
|
selectBeverage: ee,
|
|
@@ -289,10 +289,10 @@ const Ce = (e) => E({
|
|
|
289
289
|
flavorCompanions: re
|
|
290
290
|
} = pt({
|
|
291
291
|
companionType: (J = t.companionTypes) == null ? void 0 : J.flavor,
|
|
292
|
-
onFlavorSelected:
|
|
292
|
+
onFlavorSelected: p,
|
|
293
293
|
onFlavorCleared: d
|
|
294
|
-
}), [g, M] = I(), ne = i((
|
|
295
|
-
M(() =>
|
|
294
|
+
}), [g, M] = I(), ne = i((m) => {
|
|
295
|
+
M(() => m);
|
|
296
296
|
}, []), oe = lt({
|
|
297
297
|
onPour: v,
|
|
298
298
|
onPourCancel: $,
|
|
@@ -309,34 +309,34 @@ const Ce = (e) => E({
|
|
|
309
309
|
break;
|
|
310
310
|
}
|
|
311
311
|
}, [A, K, r, e]), ie = i(() => {
|
|
312
|
-
const
|
|
313
|
-
T.publish(
|
|
312
|
+
const m = `/kos/dispense/${s == null ? void 0 : s.path}/home/`;
|
|
313
|
+
T.publish(m, {}), n(e), e === G && (A(), K()), e === X && A();
|
|
314
314
|
}, [A, K, e]), ce = i(() => {
|
|
315
315
|
if (o.current.length === 0) {
|
|
316
316
|
R.debug("No timers to pause.");
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
|
-
R.debug(`Pausing ${o.current.length} timers.`), o.current.forEach((
|
|
320
|
-
R.debug(`Pausing timer with id ${
|
|
319
|
+
R.debug(`Pausing ${o.current.length} timers.`), o.current.forEach((m) => {
|
|
320
|
+
R.debug(`Pausing timer with id ${m.id}.`), m.pause();
|
|
321
321
|
});
|
|
322
322
|
}, []), de = i(() => {
|
|
323
323
|
if (o.current.length === 0) {
|
|
324
324
|
R.debug("No timers to restart.");
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
|
-
R.debug(`Restarting ${o.current.length} timers.`), o.current.forEach((
|
|
328
|
-
R.debug(`Restarting timer with id ${
|
|
327
|
+
R.debug(`Restarting ${o.current.length} timers.`), o.current.forEach((m) => {
|
|
328
|
+
R.debug(`Restarting timer with id ${m.id}.`), m.restart();
|
|
329
329
|
});
|
|
330
330
|
}, []);
|
|
331
331
|
return {
|
|
332
332
|
timers: {
|
|
333
|
-
add: i((
|
|
334
|
-
if (
|
|
335
|
-
if (o.current.some((
|
|
336
|
-
R.debug(`Timer with id ${
|
|
333
|
+
add: i((m) => {
|
|
334
|
+
if (m) {
|
|
335
|
+
if (o.current.some((S) => S.id === m.id)) {
|
|
336
|
+
R.debug(`Timer with id ${m.id} already exists.`);
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
|
-
o.current.push(
|
|
339
|
+
o.current.push(m);
|
|
340
340
|
}
|
|
341
341
|
}, []),
|
|
342
342
|
pause: ce,
|
|
@@ -359,7 +359,7 @@ const Ce = (e) => E({
|
|
|
359
359
|
companions: V,
|
|
360
360
|
clear: K,
|
|
361
361
|
handlers: {
|
|
362
|
-
onSelected:
|
|
362
|
+
onSelected: k
|
|
363
363
|
}
|
|
364
364
|
},
|
|
365
365
|
[X]: {
|
|
@@ -384,10 +384,10 @@ const Ce = (e) => E({
|
|
|
384
384
|
onAmbientTimer: s,
|
|
385
385
|
onAttractTimer: o,
|
|
386
386
|
onResetAttractTimer: c,
|
|
387
|
-
onResumeAttractTimer:
|
|
387
|
+
onResumeAttractTimer: u,
|
|
388
388
|
defaultAttractTime: h,
|
|
389
389
|
defaultAmbientTime: f
|
|
390
|
-
} = e,
|
|
390
|
+
} = e, p = i(() => {
|
|
391
391
|
s && (w.info("Ambient timer expired. Calling callback"), s == null || s());
|
|
392
392
|
}, [s]), d = i(() => {
|
|
393
393
|
o && (w.info("Attract timer expired. Calling callback"), o == null || o());
|
|
@@ -396,12 +396,12 @@ const Ce = (e) => E({
|
|
|
396
396
|
}, [r, c]), b = i(() => {
|
|
397
397
|
r && (r.reset(), c == null || c());
|
|
398
398
|
}, [r, c]), a = i(() => {
|
|
399
|
-
r && (r.pause(),
|
|
400
|
-
}, [r,
|
|
399
|
+
r && (r.pause(), u == null || u());
|
|
400
|
+
}, [r, u]);
|
|
401
401
|
return Y(() => {
|
|
402
402
|
if (t && h) {
|
|
403
403
|
w.info("Nozzle is available. Creating timers");
|
|
404
|
-
const $ =
|
|
404
|
+
const $ = He.createTimer(
|
|
405
405
|
"attract-timer-" + t.path,
|
|
406
406
|
h
|
|
407
407
|
);
|
|
@@ -412,7 +412,7 @@ const Ce = (e) => E({
|
|
|
412
412
|
})), f && ($ == null || $.addTimeoutAction({
|
|
413
413
|
name: "ambient-timer",
|
|
414
414
|
remainingTime: f,
|
|
415
|
-
action:
|
|
415
|
+
action: p
|
|
416
416
|
})), h && ($ == null || $.start()), n($ ?? null), () => {
|
|
417
417
|
$ == null || $.reset(), n(null);
|
|
418
418
|
};
|
|
@@ -423,7 +423,7 @@ const Ce = (e) => E({
|
|
|
423
423
|
}, [
|
|
424
424
|
f,
|
|
425
425
|
h,
|
|
426
|
-
|
|
426
|
+
p,
|
|
427
427
|
d,
|
|
428
428
|
t
|
|
429
429
|
]), {
|
|
@@ -443,10 +443,10 @@ const Ce = (e) => E({
|
|
|
443
443
|
onBeverageSelected: s,
|
|
444
444
|
onFlavorCleared: o,
|
|
445
445
|
onFlavorSelected: c,
|
|
446
|
-
onReturnToHome:
|
|
446
|
+
onReturnToHome: u,
|
|
447
447
|
onPour: h,
|
|
448
448
|
onPourCancel: f,
|
|
449
|
-
onBeforePourRejected:
|
|
449
|
+
onBeforePourRejected: p,
|
|
450
450
|
onAmbientTimer: d,
|
|
451
451
|
onAttractTimer: v,
|
|
452
452
|
onResumeAttractTimer: b
|
|
@@ -485,7 +485,7 @@ const Ce = (e) => E({
|
|
|
485
485
|
},
|
|
486
486
|
{
|
|
487
487
|
topic: `/kos/dispense/${a == null ? void 0 : a.path}/pre/pour/rejected/`,
|
|
488
|
-
callback:
|
|
488
|
+
callback: p
|
|
489
489
|
},
|
|
490
490
|
{
|
|
491
491
|
topic: `/kos/dispense/${a == null ? void 0 : a.path}/ambient/start/`,
|
|
@@ -505,13 +505,13 @@ const Ce = (e) => E({
|
|
|
505
505
|
},
|
|
506
506
|
{
|
|
507
507
|
topic: `/kos/dispense/${a == null ? void 0 : a.path}/home/`,
|
|
508
|
-
callback:
|
|
508
|
+
callback: u
|
|
509
509
|
}
|
|
510
510
|
].map(
|
|
511
|
-
({ topic:
|
|
511
|
+
({ topic: k, callback: B }) => ft(k, B)
|
|
512
512
|
);
|
|
513
513
|
return () => {
|
|
514
|
-
y.forEach((
|
|
514
|
+
y.forEach((k) => k == null ? void 0 : k());
|
|
515
515
|
};
|
|
516
516
|
}, [
|
|
517
517
|
a == null ? void 0 : a.path,
|
|
@@ -527,18 +527,18 @@ const Ce = (e) => E({
|
|
|
527
527
|
f,
|
|
528
528
|
b,
|
|
529
529
|
e,
|
|
530
|
-
|
|
530
|
+
u
|
|
531
531
|
]);
|
|
532
532
|
}, Ee = (e) => {
|
|
533
533
|
const { model: t } = C(), [r, n] = I(null), {
|
|
534
534
|
onAreYouThereTimer: s,
|
|
535
535
|
onIdleTimer: o,
|
|
536
536
|
onResetIdleTimer: c,
|
|
537
|
-
defaultAreYouThereTime:
|
|
537
|
+
defaultAreYouThereTime: u = 10,
|
|
538
538
|
defaultIdleTime: h = 20
|
|
539
539
|
} = e, f = i(() => {
|
|
540
540
|
s && (w.info("Are you there timer expired. Calling callback"), s == null || s());
|
|
541
|
-
}, [s]),
|
|
541
|
+
}, [s]), p = i(() => {
|
|
542
542
|
o && (w.info("Idle timer expired. Calling callback"), o == null || o());
|
|
543
543
|
}, [o]), d = i(() => {
|
|
544
544
|
r && (r.restart(), c == null || c());
|
|
@@ -548,17 +548,17 @@ const Ce = (e) => E({
|
|
|
548
548
|
return Y(() => {
|
|
549
549
|
if (t) {
|
|
550
550
|
w.info("Nozzle is available. Creating timers");
|
|
551
|
-
const b =
|
|
551
|
+
const b = He.createTimer(
|
|
552
552
|
`${e.prefix ?? ""}idle-timer-${t.path}`,
|
|
553
553
|
h
|
|
554
554
|
);
|
|
555
555
|
return b == null || b.addTimeoutAction({
|
|
556
556
|
name: "idle-timer",
|
|
557
557
|
remainingTime: 0,
|
|
558
|
-
action:
|
|
558
|
+
action: p
|
|
559
559
|
}), b == null || b.addTimeoutAction({
|
|
560
560
|
name: "are-you-there-timer",
|
|
561
|
-
remainingTime:
|
|
561
|
+
remainingTime: u,
|
|
562
562
|
action: f
|
|
563
563
|
}), n(b ?? null), () => {
|
|
564
564
|
b == null || b.reset(), n(null);
|
|
@@ -568,10 +568,10 @@ const Ce = (e) => E({
|
|
|
568
568
|
w.info("Nozzle is not available. No timers to clear");
|
|
569
569
|
};
|
|
570
570
|
}, [
|
|
571
|
-
|
|
571
|
+
u,
|
|
572
572
|
h,
|
|
573
573
|
f,
|
|
574
|
-
|
|
574
|
+
p,
|
|
575
575
|
t,
|
|
576
576
|
e.prefix
|
|
577
577
|
]), {
|
|
@@ -585,24 +585,24 @@ const Ce = (e) => E({
|
|
|
585
585
|
pour: r,
|
|
586
586
|
screens: n
|
|
587
587
|
}) => {
|
|
588
|
-
var
|
|
589
|
-
const [s, o] = I(!1), [c,
|
|
588
|
+
var S, fe, be, ve;
|
|
589
|
+
const [s, o] = I(!1), [c, u] = I(!1), [h, f] = I(!1), { model: p } = C(), [d, v] = I(!1), b = (t == null ? void 0 : t.idleTimeout) ?? 15, a = (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 10, $ = (r == null ? void 0 : r.idleTimeout) ?? (t == null ? void 0 : t.idleTimeout) ?? 10, y = (r == null ? void 0 : r.areYouThereTimeoutOffset) ?? (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 5, k = n == null ? void 0 : n.ambientTimeoutOffset, B = n == null ? void 0 : n.attractTimeout, K = i(() => {
|
|
590
590
|
o(!0);
|
|
591
591
|
}, []), V = i(() => {
|
|
592
592
|
o(!1), e == null || e.nav.home();
|
|
593
|
-
}, [(
|
|
594
|
-
|
|
595
|
-
}, [
|
|
596
|
-
B && (f(!0),
|
|
593
|
+
}, [(S = e == null ? void 0 : e.nav) == null ? void 0 : S.home]), z = i(() => {
|
|
594
|
+
k && (u(!0), f(!1));
|
|
595
|
+
}, [k]), ee = i(() => {
|
|
596
|
+
B && (f(!0), u(!1));
|
|
597
597
|
}, [B]), te = i(() => {
|
|
598
|
-
B && (f(!1),
|
|
598
|
+
B && (f(!1), u(!1), e == null || e.nav.home());
|
|
599
599
|
}, [e == null ? void 0 : e.nav, B]), {
|
|
600
600
|
pause: A,
|
|
601
601
|
restart: D,
|
|
602
602
|
resume: se,
|
|
603
603
|
attractTimer: O
|
|
604
604
|
} = ht({
|
|
605
|
-
defaultAmbientTime:
|
|
605
|
+
defaultAmbientTime: k,
|
|
606
606
|
defaultAttractTime: B,
|
|
607
607
|
onAmbientTimer: z,
|
|
608
608
|
onAttractTimer: ee,
|
|
@@ -637,15 +637,15 @@ const Ce = (e) => E({
|
|
|
637
637
|
}, []), ce = i(() => {
|
|
638
638
|
o(!1), d ? (M(), x()) : (L(), g());
|
|
639
639
|
}, [d, x, g, L, M]), de = i(() => {
|
|
640
|
-
A(), f(!1),
|
|
640
|
+
A(), f(!1), u(!1), L();
|
|
641
641
|
}, [A, L]), he = i(() => {
|
|
642
|
-
f(!1),
|
|
642
|
+
f(!1), u(!1), v(!1), g(), D();
|
|
643
643
|
}, [D, g]), W = i(() => {
|
|
644
|
-
f(!1),
|
|
644
|
+
f(!1), u(!1), v(!1), A(), L();
|
|
645
645
|
}, [A, L]), q = i(() => {
|
|
646
|
-
f(!1),
|
|
646
|
+
f(!1), u(!1), v(!1), D(), x(), g();
|
|
647
647
|
}, [D, x, g]), J = i(() => {
|
|
648
|
-
f(!1),
|
|
648
|
+
f(!1), u(!1), D(), x();
|
|
649
649
|
}, [D, x]);
|
|
650
650
|
bt({
|
|
651
651
|
onBrandSelected: de,
|
|
@@ -657,16 +657,16 @@ const Ce = (e) => E({
|
|
|
657
657
|
onBeforePourRejected: ie,
|
|
658
658
|
onInit: J
|
|
659
659
|
});
|
|
660
|
-
const
|
|
660
|
+
const m = d ? y : a;
|
|
661
661
|
return Y(() => {
|
|
662
|
-
if (
|
|
663
|
-
const Ze = `/kos/dispense/${
|
|
662
|
+
if (p && O) {
|
|
663
|
+
const Ze = `/kos/dispense/${p == null ? void 0 : p.path}/init/`;
|
|
664
664
|
T.publish(Ze, {});
|
|
665
665
|
}
|
|
666
|
-
}, [
|
|
666
|
+
}, [p, O]), {
|
|
667
667
|
showAreYouThere: s,
|
|
668
668
|
clearAreYouThere: ce,
|
|
669
|
-
areYouThereCountdown:
|
|
669
|
+
areYouThereCountdown: m,
|
|
670
670
|
showAmbientScreen: c,
|
|
671
671
|
showAttractScreen: h,
|
|
672
672
|
pauseScreenTimer: se
|
|
@@ -682,7 +682,7 @@ const Ce = (e) => E({
|
|
|
682
682
|
function Rt(e) {
|
|
683
683
|
return (t) => {
|
|
684
684
|
const { model: r, status: n, KosModelLoader: s } = ye();
|
|
685
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, deviceAssembly: r }) });
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
688
|
const Me = (e) => E({
|
|
@@ -693,7 +693,7 @@ const Me = (e) => E({
|
|
|
693
693
|
function yt(e, t) {
|
|
694
694
|
return (r) => {
|
|
695
695
|
const { model: n, status: s, KosModelLoader: o } = Me(e);
|
|
696
|
-
return /* @__PURE__ */
|
|
696
|
+
return /* @__PURE__ */ l(o, { ...s, children: /* @__PURE__ */ l(t, { ...r, holder: n }) });
|
|
697
697
|
};
|
|
698
698
|
}
|
|
699
699
|
const Ye = () => {
|
|
@@ -707,7 +707,7 @@ const Ye = () => {
|
|
|
707
707
|
function Mt(e) {
|
|
708
708
|
return (t) => {
|
|
709
709
|
const { model: r, status: n, KosModelLoader: s } = Ye();
|
|
710
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, holderContainer: r }) });
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
713
|
const Oe = () => {
|
|
@@ -765,7 +765,7 @@ const Oe = () => {
|
|
|
765
765
|
function Ot(e) {
|
|
766
766
|
return (t) => {
|
|
767
767
|
const { model: r, status: n, KosModelLoader: s } = Oe();
|
|
768
|
-
return /* @__PURE__ */
|
|
768
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, ingredient: r }) });
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
771
|
const _e = () => {
|
|
@@ -779,13 +779,13 @@ const _e = () => {
|
|
|
779
779
|
function _t(e) {
|
|
780
780
|
return (t) => {
|
|
781
781
|
const { model: r, status: n, KosModelLoader: s } = _e();
|
|
782
|
-
return /* @__PURE__ */
|
|
782
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, ingredientContainer: r }) });
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
785
|
function Gt(e, t) {
|
|
786
786
|
return (r) => {
|
|
787
787
|
const { model: n, status: s, KosModelLoader: o } = Ce(e);
|
|
788
|
-
return /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ l(o, { ...s, children: /* @__PURE__ */ l(t, { ...r, nozzle: n }) });
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
791
|
const F = w.createLogger({
|
|
@@ -807,7 +807,7 @@ const F = w.createLogger({
|
|
|
807
807
|
), await (o == null ? void 0 : o.initiate(s)), t == null || t(), s != null && s.isPouring || n == null || n()) : (F.debug(
|
|
808
808
|
`[${o == null ? void 0 : o.name}] - Pour cancelled for pour target ${s == null ? void 0 : s.id}.`
|
|
809
809
|
), r == null || r());
|
|
810
|
-
}, [t, s, o]),
|
|
810
|
+
}, [t, s, o]), u = i(async () => {
|
|
811
811
|
var d;
|
|
812
812
|
F.debug(
|
|
813
813
|
`[${o == null ? void 0 : o.name}] - Pour initiate ended called for pour target ${s == null ? void 0 : s.id}.`
|
|
@@ -818,7 +818,7 @@ const F = w.createLogger({
|
|
|
818
818
|
return {
|
|
819
819
|
handlers: me({
|
|
820
820
|
onPressed: c,
|
|
821
|
-
onRelease:
|
|
821
|
+
onRelease: u
|
|
822
822
|
}).dom,
|
|
823
823
|
cancel: h,
|
|
824
824
|
status: s
|
|
@@ -871,18 +871,18 @@ const Z = w.createLogger({
|
|
|
871
871
|
async initiateEnded(e) {
|
|
872
872
|
return !0;
|
|
873
873
|
}
|
|
874
|
-
},
|
|
874
|
+
}, Ne = w.createLogger({
|
|
875
875
|
name: "HoldToPourStrategy",
|
|
876
876
|
group: "kos-hooks"
|
|
877
877
|
}), Vt = {
|
|
878
878
|
name: "TapToPourStrategy",
|
|
879
879
|
async initiate(e) {
|
|
880
880
|
if (e != null && e.isPouring) {
|
|
881
|
-
|
|
881
|
+
Ne.debug(`Nozzle ${e == null ? void 0 : e.id} is already pouring. cancelling pour`), await e.cancelPour();
|
|
882
882
|
return;
|
|
883
883
|
}
|
|
884
884
|
if (!(e != null && e.canPour)) {
|
|
885
|
-
|
|
885
|
+
Ne.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
|
|
886
886
|
return;
|
|
887
887
|
}
|
|
888
888
|
await (e == null ? void 0 : e.pour());
|
|
@@ -905,14 +905,14 @@ function Wt(e) {
|
|
|
905
905
|
t.servicePathFactory,
|
|
906
906
|
t.itemId
|
|
907
907
|
);
|
|
908
|
-
return /* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ l(s, { ...n, children: /* @__PURE__ */ l(e, { ...t, genericPour: r }) });
|
|
909
909
|
};
|
|
910
910
|
}
|
|
911
|
-
const Ge =
|
|
912
|
-
const { model: t, ready: r } =
|
|
913
|
-
return /* @__PURE__ */
|
|
911
|
+
const Ge = H(void 0), qt = ({ children: e }) => {
|
|
912
|
+
const { model: t, ready: r } = Se(), n = P(() => r && t ? { model: t } : {}, [r, t]);
|
|
913
|
+
return /* @__PURE__ */ l(Ge.Provider, { value: n, children: e });
|
|
914
914
|
}, Jt = () => {
|
|
915
|
-
const e =
|
|
915
|
+
const e = N(
|
|
916
916
|
Ge
|
|
917
917
|
);
|
|
918
918
|
if (!e)
|
|
@@ -920,35 +920,35 @@ const Ge = S(void 0), qt = ({ children: e }) => {
|
|
|
920
920
|
"useAssemblyContext must be used within a AssemblyProvider"
|
|
921
921
|
);
|
|
922
922
|
return e;
|
|
923
|
-
}, je =
|
|
923
|
+
}, je = H(void 0), Qt = ({ children: e }) => {
|
|
924
924
|
const { model: t, ready: r } = Be(), n = P(() => r && t ? { model: t } : {}, [r, t]);
|
|
925
|
-
return /* @__PURE__ */
|
|
925
|
+
return /* @__PURE__ */ l(je.Provider, { value: n, children: e });
|
|
926
926
|
}, Xt = () => {
|
|
927
|
-
const e =
|
|
927
|
+
const e = N(je);
|
|
928
928
|
if (!e)
|
|
929
929
|
throw new Error(
|
|
930
930
|
"useAvailabilityContext must be used within a AvailabilityProvider"
|
|
931
931
|
);
|
|
932
932
|
return e;
|
|
933
|
-
}, Fe =
|
|
933
|
+
}, Fe = H(void 0), Zt = ({ children: e, id: t }) => {
|
|
934
934
|
const { model: r, ready: n } = Ke(t), s = P(() => n && r ? { model: r } : {}, [n, r]);
|
|
935
|
-
return /* @__PURE__ */
|
|
935
|
+
return /* @__PURE__ */ l(Fe.Provider, { value: s, children: e });
|
|
936
936
|
}, zt = () => {
|
|
937
|
-
const e =
|
|
937
|
+
const e = N(Fe);
|
|
938
938
|
if (!e)
|
|
939
939
|
throw new Error("useBoardContext must be used within a BoardProvider");
|
|
940
940
|
return e;
|
|
941
|
-
}, Ue =
|
|
941
|
+
}, Ue = H(void 0), es = ({ children: e }) => {
|
|
942
942
|
const { model: t, ready: r } = Le(), n = P(() => r && t ? { model: t } : {}, [r, t]);
|
|
943
|
-
return /* @__PURE__ */
|
|
943
|
+
return /* @__PURE__ */ l(Ue.Provider, { value: n, children: e });
|
|
944
944
|
}, ts = () => {
|
|
945
|
-
const e =
|
|
945
|
+
const e = N(Ue);
|
|
946
946
|
if (!e)
|
|
947
947
|
throw new Error(
|
|
948
948
|
"useBoardContainerContext must be used within a BoardContainerProvider"
|
|
949
949
|
);
|
|
950
950
|
return e;
|
|
951
|
-
}, Ve =
|
|
951
|
+
}, Ve = H(
|
|
952
952
|
void 0
|
|
953
953
|
), wt = ({ children: e }) => {
|
|
954
954
|
const { model: t, ready: r } = ye(), n = P(() => {
|
|
@@ -958,9 +958,9 @@ const Ge = S(void 0), qt = ({ children: e }) => {
|
|
|
958
958
|
}
|
|
959
959
|
return {};
|
|
960
960
|
}, [r, t]), s = r && t ? e : null;
|
|
961
|
-
return /* @__PURE__ */
|
|
961
|
+
return /* @__PURE__ */ l(Ve.Provider, { value: n, children: s });
|
|
962
962
|
}, Pt = () => {
|
|
963
|
-
const e =
|
|
963
|
+
const e = N(Ve);
|
|
964
964
|
if (!e)
|
|
965
965
|
throw new Error(
|
|
966
966
|
"useDeviceAssemblyContext must be used within a DeviceAssemblyProvider"
|
|
@@ -970,36 +970,48 @@ const Ge = S(void 0), qt = ({ children: e }) => {
|
|
|
970
970
|
function gt() {
|
|
971
971
|
const e = tt.createContext(null);
|
|
972
972
|
return [() => {
|
|
973
|
-
const r =
|
|
973
|
+
const r = N(e);
|
|
974
974
|
if (r === void 0)
|
|
975
975
|
throw new Error("useDispenseKitContext must be used within a Provider");
|
|
976
976
|
return r;
|
|
977
977
|
}, e.Provider];
|
|
978
978
|
}
|
|
979
|
-
function Tt({
|
|
980
|
-
|
|
981
|
-
|
|
979
|
+
function Tt({
|
|
980
|
+
children: e,
|
|
981
|
+
provider: t,
|
|
982
|
+
props: r,
|
|
983
|
+
nozzleProps: n
|
|
984
|
+
}) {
|
|
985
|
+
const s = mt(r);
|
|
986
|
+
return /* @__PURE__ */ l(t, { value: s, children: e(n || {}) });
|
|
982
987
|
}
|
|
983
988
|
function It({
|
|
984
989
|
children: e,
|
|
985
990
|
provider: t,
|
|
986
991
|
props: r
|
|
987
992
|
}) {
|
|
988
|
-
const { nozzlePaths: n } = Pt();
|
|
989
|
-
return (n == null ? void 0 : n.map((
|
|
993
|
+
const { nozzlePaths: n } = Pt(), s = (n == null ? void 0 : n.length) || 0;
|
|
994
|
+
return (n == null ? void 0 : n.map((c, u) => /* @__PURE__ */ l(it, { path: c, children: /* @__PURE__ */ l(
|
|
990
995
|
Tt,
|
|
991
996
|
{
|
|
992
997
|
provider: t,
|
|
993
998
|
props: r,
|
|
999
|
+
nozzleProps: {
|
|
1000
|
+
nozzleIndex: u,
|
|
1001
|
+
nozzlePath: c,
|
|
1002
|
+
totalNozzles: s,
|
|
1003
|
+
isFirstNozzle: u === 0,
|
|
1004
|
+
isLastNozzle: u === s - 1
|
|
1005
|
+
},
|
|
994
1006
|
children: e
|
|
995
1007
|
}
|
|
996
|
-
) },
|
|
1008
|
+
) }, c))) || [];
|
|
997
1009
|
}
|
|
998
1010
|
function At({
|
|
999
1011
|
provider: e,
|
|
1000
1012
|
props: t
|
|
1001
1013
|
}) {
|
|
1002
|
-
return ({ children: r }) => e ? /* @__PURE__ */
|
|
1014
|
+
return ({ children: r }) => e ? /* @__PURE__ */ l(wt, { children: /* @__PURE__ */ l(
|
|
1003
1015
|
It,
|
|
1004
1016
|
{
|
|
1005
1017
|
provider: e,
|
|
@@ -1015,43 +1027,43 @@ function ss(e) {
|
|
|
1015
1027
|
At({ provider: r, props: e })
|
|
1016
1028
|
];
|
|
1017
1029
|
}
|
|
1018
|
-
const We =
|
|
1030
|
+
const We = H(void 0), rs = ({ children: e, id: t }) => {
|
|
1019
1031
|
const { model: r, ready: n } = Me(t || ""), s = P(() => n && r ? { model: r } : {}, [n, r]);
|
|
1020
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ l(We.Provider, { value: s, children: e });
|
|
1021
1033
|
}, ns = () => {
|
|
1022
|
-
const e =
|
|
1034
|
+
const e = N(We);
|
|
1023
1035
|
if (!e)
|
|
1024
1036
|
throw new Error("useHolderContext must be used within a HolderProvider");
|
|
1025
1037
|
return e;
|
|
1026
|
-
}, qe =
|
|
1038
|
+
}, qe = H(
|
|
1027
1039
|
void 0
|
|
1028
1040
|
), os = ({ children: e }) => {
|
|
1029
1041
|
const { model: t, ready: r } = Ye(), n = P(() => r && t ? { model: t } : {}, [r, t]);
|
|
1030
|
-
return /* @__PURE__ */
|
|
1042
|
+
return /* @__PURE__ */ l(qe.Provider, { value: n, children: e });
|
|
1031
1043
|
}, as = () => {
|
|
1032
|
-
const e =
|
|
1044
|
+
const e = N(qe);
|
|
1033
1045
|
if (!e)
|
|
1034
1046
|
throw new Error(
|
|
1035
1047
|
"useHolderContainerContext must be used within a HolderContainerProvider"
|
|
1036
1048
|
);
|
|
1037
1049
|
return e;
|
|
1038
|
-
}, Je =
|
|
1050
|
+
}, Je = H(void 0), is = ({ children: e }) => {
|
|
1039
1051
|
const { model: t, ready: r } = Oe(), n = P(() => r && t ? { model: t } : {}, [r, t]);
|
|
1040
|
-
return /* @__PURE__ */
|
|
1052
|
+
return /* @__PURE__ */ l(Je.Provider, { value: n, children: e });
|
|
1041
1053
|
}, cs = () => {
|
|
1042
|
-
const e =
|
|
1054
|
+
const e = N(Je);
|
|
1043
1055
|
if (!e)
|
|
1044
1056
|
throw new Error(
|
|
1045
1057
|
"useIngredientContext must be used within a IngredientProvider"
|
|
1046
1058
|
);
|
|
1047
1059
|
return e;
|
|
1048
|
-
}, Qe =
|
|
1060
|
+
}, Qe = H(
|
|
1049
1061
|
void 0
|
|
1050
1062
|
), ds = ({ children: e }) => {
|
|
1051
1063
|
const { model: t, ready: r } = _e(), n = P(() => r && t ? { model: t } : {}, [r, t]);
|
|
1052
|
-
return /* @__PURE__ */
|
|
1064
|
+
return /* @__PURE__ */ l(Qe.Provider, { value: n, children: e });
|
|
1053
1065
|
}, us = () => {
|
|
1054
|
-
const e =
|
|
1066
|
+
const e = N(Qe);
|
|
1055
1067
|
if (!e)
|
|
1056
1068
|
throw new Error(
|
|
1057
1069
|
"useIngredientContainerContext must be used within a IngredientContainerProvider"
|
|
@@ -1064,11 +1076,11 @@ const We = S(void 0), rs = ({ children: e, id: t }) => {
|
|
|
1064
1076
|
modelType: xe.type,
|
|
1065
1077
|
options: {}
|
|
1066
1078
|
});
|
|
1067
|
-
}, Xe =
|
|
1079
|
+
}, Xe = H(void 0), ls = ({ children: e }) => {
|
|
1068
1080
|
const { model: t, ready: r } = xt(), n = P(() => r && t ? { model: t } : {}, [r, t]);
|
|
1069
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ l(Xe.Provider, { value: n, children: e });
|
|
1070
1082
|
}, ps = () => {
|
|
1071
|
-
const e =
|
|
1083
|
+
const e = N(Xe);
|
|
1072
1084
|
if (!e)
|
|
1073
1085
|
throw new Error("usePumpContext must be used within a PumpProvider");
|
|
1074
1086
|
return e;
|
|
@@ -1129,7 +1141,7 @@ export {
|
|
|
1129
1141
|
us as n,
|
|
1130
1142
|
C as o,
|
|
1131
1143
|
ps as p,
|
|
1132
|
-
|
|
1144
|
+
Se as q,
|
|
1133
1145
|
Be as r,
|
|
1134
1146
|
Kt as s,
|
|
1135
1147
|
Ke as t,
|
|
@@ -1140,4 +1152,4 @@ export {
|
|
|
1140
1152
|
Ct as y,
|
|
1141
1153
|
ct as z
|
|
1142
1154
|
};
|
|
1143
|
-
//# sourceMappingURL=pump-provider-
|
|
1155
|
+
//# sourceMappingURL=pump-provider-jdIoS5JD.js.map
|