@danidoble/webserial 4.3.4 → 4.3.6

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/dist/boardroid.js CHANGED
@@ -1,75 +1,94 @@
1
- var ce = Object.defineProperty;
2
- var D = (c) => {
3
- throw TypeError(c);
4
- };
5
- var pe = (c, p, n) => p in c ? ce(c, p, { enumerable: !0, configurable: !0, writable: !0, value: n }) : c[p] = n;
6
- var h = (c, p, n) => pe(c, typeof p != "symbol" ? p + "" : p, n), I = (c, p, n) => p.has(c) || D("Cannot " + n);
7
- var w = (c, p, n) => (I(c, p, "read from private field"), n ? n.call(c) : p.get(c)), y = (c, p, n) => p.has(c) ? D("Cannot add the same private member more than once") : p instanceof WeakSet ? p.add(c) : p.set(c, n), b = (c, p, n, e) => (I(c, p, "write to private field"), e ? e.call(c, n) : p.set(c, n), n), a = (c, p, n) => (I(c, p, "access private method"), n);
8
- import { K as ue } from "./kernel-BblykfpT.js";
9
- import { l as d } from "./relay-CsdB0FSa.js";
10
- import { h as x } from "./webserial-core-ByrJ7tlu.js";
11
- var f, _, k, s, E, M, v, S, m, Q, N, F, j, O, U, A, L, T, V, z, W, K, Y, G, H, J, X, Z, g, ee, ne, te, se, ie, re, ae, R, C, oe, le, P, $, B;
12
- class fe extends ue {
1
+ import { K as u } from "./kernel-DAtdBEi3.js";
2
+ import { l } from "./relay-CsdB0FSa.js";
3
+ import { h as p } from "./webserial-core-BjytHor1.js";
4
+ class f extends u {
5
+ __coin_purse = {
6
+ available: !0
7
+ };
8
+ __banknote_purse = {
9
+ available: !0,
10
+ isRecycler: !0,
11
+ recycler: {
12
+ ict: !0,
13
+ banknote: 1
14
+ // 0: $20, 1: $50, 2: $100, 3: $200, 4: $500
15
+ }
16
+ };
17
+ __sale = {
18
+ price: 0,
19
+ change: 0,
20
+ change_verified: 0,
21
+ dispense_all: !0,
22
+ last_change: 0,
23
+ clear() {
24
+ this.price = 0, this.change = 0, this.change_verified = 0, this.dispense_all = !0, this.last_change = 0;
25
+ }
26
+ };
27
+ __money_session = {
28
+ inserted: 0,
29
+ retired: 0,
30
+ clear() {
31
+ this.inserted = 0, this.retired = 0;
32
+ }
33
+ };
34
+ coins = {
35
+ tubes: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
36
+ box: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
37
+ totals: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
38
+ total: 0
39
+ };
40
+ banknotes = {
41
+ stacker: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
42
+ recycler: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
43
+ out: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
44
+ totals: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
45
+ total: 0
46
+ };
47
+ card_reader = {
48
+ available: !1,
49
+ max_pre_credit: 0
50
+ };
51
+ #n = !1;
52
+ #e = 0;
53
+ #t = 0;
13
54
  constructor({ filters: n = null, config_port: e = null, no_device: t = 1 } = {}) {
14
- super({ filters: n, config_port: e, no_device: t });
15
- y(this, s);
16
- h(this, "__coin_purse", {
17
- available: !0
18
- });
19
- h(this, "__banknote_purse", {
20
- available: !0,
21
- isRecycler: !0,
22
- recycler: {
23
- ict: !0,
24
- banknote: 1
25
- // 0: $20, 1: $50, 2: $100, 3: $200, 4: $500
26
- }
27
- });
28
- h(this, "__sale", {
29
- price: 0,
30
- change: 0,
31
- change_verified: 0,
32
- dispense_all: !0,
33
- last_change: 0,
34
- clear() {
35
- this.price = 0, this.change = 0, this.change_verified = 0, this.dispense_all = !0, this.last_change = 0;
36
- }
37
- });
38
- h(this, "__money_session", {
39
- inserted: 0,
40
- retired: 0,
41
- clear() {
42
- this.inserted = 0, this.retired = 0;
43
- }
44
- });
45
- h(this, "coins", {
46
- tubes: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
47
- box: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
48
- totals: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
49
- total: 0
50
- });
51
- h(this, "banknotes", {
52
- stacker: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
53
- recycler: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
54
- out: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
55
- totals: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
56
- total: 0
57
- });
58
- h(this, "card_reader", {
59
- available: !1,
60
- max_pre_credit: 0
61
- });
62
- y(this, f, !1);
63
- y(this, _, 0);
64
- y(this, k, 0);
65
- if (this.__internal__.device.type = "boardroid", x.getCustom(this.typeDevice, t))
55
+ if (super({ filters: n, config_port: e, no_device: t }), this.__internal__.device.type = "boardroid", p.getCustom(this.typeDevice, t))
66
56
  throw new Error(`Device ${this.typeDevice} ${t} already exists`);
67
57
  this.__internal__.serial.config_port.baudRate = 115200, this.__internal__.serial.response.length = 14, this.__internal__.time.response_connection = 600, this.__internal__.time.response_general = 4e3, this.__internal__.time.response_engines = 15e3, this.__internal__.dispense.limit_counter = 15, this.__internal__.dispense.custom_limit_counter = null, this.__internal__.dispense.backup_dispense = {
68
58
  channel: 1,
69
59
  second_channel: null,
70
60
  sensor: !0,
71
61
  seconds: null
72
- }, a(this, s, E).call(this), a(this, s, M).call(this);
62
+ }, this.#p(), this.#u();
63
+ }
64
+ #p() {
65
+ const n = [
66
+ "banknote-purse:banknote-scrow-status",
67
+ "banknote-purse:config",
68
+ "banknote-purse:event-banknote",
69
+ "banknote-purse:read-memory",
70
+ "banknote-purse:recycler",
71
+ "banknote-purse:save-memory",
72
+ "card-reader:event",
73
+ "change:pending",
74
+ "change:dispense",
75
+ "coin-purse:coin-event",
76
+ "coin-purse:config",
77
+ "coin-purse:reject-lever",
78
+ "coin-purse:reset",
79
+ "coin-purse:tubes",
80
+ "percentage:test",
81
+ "run:default-load",
82
+ "session:money-dispensed",
83
+ "session:money-request",
84
+ "event:door",
85
+ "door:event",
86
+ "status:relay",
87
+ "status:temperature",
88
+ "money:inserted"
89
+ ];
90
+ for (const e of n)
91
+ this.serialRegisterAvailableListener(e);
73
92
  }
74
93
  get totalInTubes() {
75
94
  return this.coins.tubes.g50 * 0.5 + this.coins.tubes.c50 * 0.5 + this.coins.tubes.p1 + this.coins.tubes.p2 * 2 + this.coins.tubes.p5 * 5 + this.coins.tubes.p10 * 10;
@@ -114,9 +133,267 @@ class fe extends ue {
114
133
  get change() {
115
134
  return this.__sale.price <= 0 || this.__money_session.inserted <= this.__sale.price ? 0 : this.__money_session.inserted - this.__sale.price;
116
135
  }
136
+ #u() {
137
+ p.add(this);
138
+ }
139
+ #s() {
140
+ return this.__banknote_purse.isRecycler && this.__banknote_purse.recycler.ict;
141
+ }
142
+ #d() {
143
+ return this.hasCoinPurse || this.hasRecycler;
144
+ }
117
145
  softReload() {
118
146
  super.softReload(), this.__sale.clear(), this.__money_session.clear();
119
147
  }
148
+ #h(n) {
149
+ return n.name = "Connection with the serial device completed.", n.description = "Your connection with the serial device was successfully completed.", n.no_code = 1, this.dispatch("run:default-load", {}), n;
150
+ }
151
+ #b(n) {
152
+ const e = {
153
+ g50: { value: 0.5, name: "50 pennies (the big one)" },
154
+ c0: { value: 0.5, name: "50 pennies (the little one)" },
155
+ p1: { value: 1, name: "1 peso" },
156
+ p2: { value: 2, name: "2 pesos" },
157
+ p5: { value: 5, name: "5 pesos" },
158
+ p10: { value: 10, name: "10 pesos" },
159
+ p20: { value: 20, name: "20 pesos" }
160
+ };
161
+ return e[n] ? e[n] : !1;
162
+ }
163
+ #_(n) {
164
+ const e = {
165
+ g50: ["40", "50", "60", "70", "90"],
166
+ c50: ["41", "51", "61", "71", "91"],
167
+ p1: ["42", "52", "62", "72", "92"],
168
+ p2: ["43", "53", "63", "73", "93"],
169
+ p5: ["44", "54", "64", "74", "94"],
170
+ p10: ["45", "55", "65", "75", "95"],
171
+ p20: ["47", "57", "67", "77", "97"]
172
+ };
173
+ let t = null;
174
+ for (let i in e)
175
+ if (e[i].includes(n)) {
176
+ t = i;
177
+ break;
178
+ }
179
+ return t ? [{
180
+ g50: "50 pennies (the big one)",
181
+ c0: "50 pennies (the little one)",
182
+ p1: "1 peso",
183
+ p2: "2 pesos",
184
+ p5: "5 pesos",
185
+ p10: "10 pesos",
186
+ p20: "20 pesos"
187
+ }[t], t] : [`Undefined value: ¿${n}?`, null];
188
+ }
189
+ #f(n) {
190
+ return ["g50", "c50", "p1", "p2", "p5", "p10", "p20"].includes(n);
191
+ }
192
+ #k(n) {
193
+ const e = {
194
+ p20: ["80", "90", "a0", "b0"],
195
+ p50: ["81", "91", "a1", "b1"],
196
+ p100: ["82", "92", "a2", "b2"],
197
+ p200: ["83", "93", "a3", "b3"],
198
+ p500: ["84", "94", "a4", "b4"],
199
+ p1000: ["85", "95", "a5", "b5"]
200
+ };
201
+ let t = null;
202
+ for (let i in e)
203
+ if (e[i].includes(n)) {
204
+ t = i;
205
+ break;
206
+ }
207
+ return t ? [{
208
+ p20: "20 pesos",
209
+ p50: "50 pesos",
210
+ p100: "100 pesos",
211
+ p200: "200 pesos",
212
+ p500: "500 pesos",
213
+ p1000: "1000 pesos"
214
+ }[t], t] : [`Undefined value: ¿${n}?`, null];
215
+ }
216
+ #y(n) {
217
+ const e = {
218
+ p20: { value: 20, name: "20 pesos" },
219
+ p50: { value: 50, name: "50 pesos" },
220
+ p100: { value: 100, name: "100 pesos" },
221
+ p200: { value: 200, name: "200 pesos" },
222
+ p500: { value: 500, name: "500 pesos" },
223
+ p1000: { value: 1e3, name: "1000 pesos" }
224
+ };
225
+ return e[n] ? e[n] : !1;
226
+ }
227
+ #w(n) {
228
+ return ["p20", "p50", "p100", "p200", "p500", "p1000"].includes(n);
229
+ }
230
+ #v(n) {
231
+ return ["r20", "r50", "r100"].includes(n);
232
+ }
233
+ #C() {
234
+ return ["r20", "r50", "r100", "r200", "r500"][this.__banknote_purse.recycler.banknote];
235
+ }
236
+ #r(n, e, t) {
237
+ if (!n) return;
238
+ let s = !0;
239
+ if (this.#f(n) && t === "coin") {
240
+ if (typeof this.coins.tubes[n] > "u") return;
241
+ e === "tube" ? this.coins.tubes[n] += 1 : e === "box" && (this.coins.box[n] += 1);
242
+ let i = 0;
243
+ ["g50", "c50"].includes(n) ? i = 0.5 : i += parseInt(n.slice(1)), this.coins.totals[n] += i, this.__money_session.inserted += i, this.coins.total += i;
244
+ const r = this.#b(n);
245
+ r && this.dispatch("money:inserted", {
246
+ type: "coin",
247
+ money: r,
248
+ // {value:number,name:string}
249
+ where: e
250
+ });
251
+ } else if (this.#w(n) && t === "banknote") {
252
+ if (typeof this.banknotes.recycler[n] > "u") return;
253
+ e === "recycler" ? this.banknotes.recycler[n] += 1 : e === "stacker" && (this.banknotes.stacker[n] += 1);
254
+ let i = parseInt(n.slice(1));
255
+ this.banknotes.totals[n] += i, this.__money_session.inserted += i, this.banknotes.total += i;
256
+ const r = this.#y(n);
257
+ r && this.dispatch("money:inserted", {
258
+ type: "banknote",
259
+ money: r,
260
+ // {value:number,name:string}
261
+ where: e
262
+ });
263
+ } else if (this.#v(n) && e === "out" && t === "banknote") {
264
+ if (typeof this.banknotes.out[n.replace("r", "p")] > "u") return;
265
+ this.banknotes.out[n.replace("r", "p")] += 1;
266
+ let i = parseInt(n.slice(1));
267
+ this.__money_session.retired += i, this.banknotes.recycler[n.replace("r", "p")] -= 1, this.banknotes.total -= i, s = !1, this.dispatch("session:money-dispensed", { type_money: n, retired: i, finish: !1, type: "banknotes" });
268
+ }
269
+ s && this.dispatch("session:money-request", {});
270
+ }
271
+ #I(n, e) {
272
+ const t = parseInt(n[2], 16);
273
+ return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, t === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : t === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : t >= 64 && t <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : t >= 80 && t <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : t >= 96 && t <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : t >= 112 && t <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : t >= 144 && t <= 159 ? (e.name = "Coin dispensed", e.additional.where = "out", e.description = `Undefined value: ¿${n[2]}?`) : (e.name = "Coin inserted", e.description = "Undefined status. Without information of this", e.no_code = 400), t === 1 || t === 2 || t >= 160 || t >= 128 && t <= 143 || ([e.description, e.additional.coin] = this.#_(n[2]), e.no_code = 38 + t, this.#r(e.additional.coin, e.additional.where, "coin"), ["tube", "out"].includes(e.additional.where) && this.dispatch("coin-purse:tubes", this.coins.tubes), this.dispatch("coin-purse:coin-event", this.coins)), e;
274
+ }
275
+ #T(n, e) {
276
+ const t = parseInt(n[2], 16);
277
+ return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, t === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = this.#C(), e.additional.where = "out", e.no_code = 200) : t >= 128 && t <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : t >= 144 && t <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : t >= 160 && t <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : t >= 176 && t <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), t >= 128 && t <= 191 && ([e.description, e.additional.banknote] = this.#k(n[2]), e.no_code = 74 + t), this.#r(e.additional.banknote, e.additional.where, "banknote"), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
278
+ }
279
+ #R(n, e) {
280
+ const t = parseInt(n, 16);
281
+ return t === 1 ? (e.name = "Coin purse enabled", e.description = "Configuration complete, enabled", e.no_code = 3) : t === 0 ? (e.name = "Coin purse disabled", e.description = "Disabled by system request", e.no_code = 4) : (e.name = "Status unknown", e.description = "The response of coin purse doesn't identify successfully", e.no_code = 400), this.dispatch("coin-purse:config", { enabled: t === 1 }), e;
282
+ }
283
+ #P(n, e) {
284
+ const t = parseInt(n[2], 16), s = parseInt(n[3], 16);
285
+ return t === 0 ? (e.name = "Bill purse disabled", e.description = "Configuration complete, disabled") : t === 1 && (e.name = "Bill purse enabled", e.description = "Configuration complete, enabled"), s === 0 ? e.additional.scrow = "Scrow disabled, banknote received automatic" : s === 1 && (e.additional.scrow = "Scrow enabled, require manual action"), e.no_code = 5, this.dispatch("banknote-purse:config", { enabled: t === 1, scrow: s === 1 }), e;
286
+ }
287
+ #$(n, e) {
288
+ e.no_code = 6;
289
+ const [t, s, i, r, a, o] = [
290
+ parseInt(n[2], 16),
291
+ parseInt(n[3], 16),
292
+ parseInt(n[4], 16),
293
+ parseInt(n[5], 16),
294
+ parseInt(n[6], 16),
295
+ parseInt(n[7], 16)
296
+ ];
297
+ return e.additional = {
298
+ coins: { g50: t, c50: s, p1: i, p2: r, p5: a, p10: o }
299
+ }, this.coins.tubes.g50 = t, this.coins.tubes.c50 = s, this.coins.tubes.p1 = i, this.coins.tubes.p2 = r, this.coins.tubes.p5 = a, this.coins.tubes.p10 = o, this.coins.totals.g50 = (this.coins.box.g50 + t) * 0.5, this.coins.totals.c50 = (this.coins.box.c50 + s) * 0.5, this.coins.totals.p1 = this.coins.box.p1 + i, this.coins.totals.p2 = (this.coins.box.p2 + r) * 2, this.coins.totals.p5 = (this.coins.box.p5 + a) * 5, this.coins.totals.p10 = (this.coins.box.p10 + o) * 10, this.coins.total = this.coins.totals.g50 + this.coins.totals.c50 + this.coins.totals.p1 + this.coins.totals.p2 + this.coins.totals.p5 + this.coins.totals.p10, e.name = "Read tubes", e.description = "Quantity of coins approximated", this.dispatch("coin-purse:tubes", this.coins.tubes), e;
300
+ }
301
+ #B(n, e) {
302
+ e.no_code = 7;
303
+ const [t, s, i, r, a, o] = [
304
+ parseInt(n[2], 16),
305
+ parseInt(n[3], 16),
306
+ parseInt(n[4], 16),
307
+ parseInt(n[5], 16),
308
+ parseInt(n[6], 16),
309
+ parseInt(n[7], 16)
310
+ ];
311
+ return e.additional = {
312
+ banknotes: { b20: t, b50: s, b100: i, b200: r, b500: a, b1000: o }
313
+ }, this.banknotes.recycler.p20 = t, this.banknotes.recycler.p50 = s, this.banknotes.recycler.p100 = i, this.banknotes.recycler.p200 = r, this.banknotes.recycler.p500 = a, this.banknotes.recycler.p1000 = o, this.banknotes.totals.p20 = (this.banknotes.stacker.p20 + t) * 20, this.banknotes.totals.p50 = (this.banknotes.stacker.p50 + s) * 50, this.banknotes.totals.p100 = (this.banknotes.stacker.p100 + i) * 100, this.banknotes.totals.p200 = (this.banknotes.stacker.p200 + r) * 200, this.banknotes.totals.p500 = (this.banknotes.stacker.p500 + a) * 500, this.banknotes.totals.p1000 = (this.banknotes.stacker.p1000 + o) * 1e3, this.banknotes.total = this.banknotes.totals.p20 + this.banknotes.totals.p50 + this.banknotes.totals.p100 + this.banknotes.totals.p200 + this.banknotes.totals.p500 + this.banknotes.totals.p1000, e.name = "Read recycler", e.description = "Quantity of banknotes approximated", this.dispatch("banknote-purse:recycler", this.banknotes.recycler), e;
314
+ }
315
+ #q(n, e) {
316
+ const t = parseInt(n, 16);
317
+ return t === 1 ? e.name = "Banknote accepted" : t === 0 ? e.name = "Banknote rejected" : e.name = "Unknown status banknote", e.no_code = 8, this.dispatch("banknote-purse:banknote-scrow-status", { status: t === 1 }), e;
318
+ }
319
+ #D(n, e) {
320
+ const [t, s, i, r, a, o] = [
321
+ parseInt(n[2], 16),
322
+ parseInt(n[3], 16),
323
+ parseInt(n[4], 16),
324
+ parseInt(n[5], 16),
325
+ parseInt(n[6], 16),
326
+ parseInt(n[7], 16)
327
+ ], c = t * 20 + s * 50 + i * 100 + r * 200 + a * 500 + o * 1e3;
328
+ return e.name = "Banknotes dispensed", e.description = c > 0 ? "Banknotes dispensed by request" : "No banknotes dispensed, recycler empty", e.no_code = 9, e.additional = {
329
+ banknotes: { b20: t, b50: s, b100: i, b200: r, b500: a, b1000: o },
330
+ total_dispensed: c
331
+ }, this.dispatch("session:money-dispensed", {
332
+ type_money: null,
333
+ retired: null,
334
+ finish: !1,
335
+ type: "banknotes",
336
+ data: e
337
+ }), e;
338
+ }
339
+ #x(n, e) {
340
+ return e.name = "Coins dispensed", e.no_code = 10, e.description = "Coins dispensed by request", isNaN(this.__sale.last_change) && (this.__sale.last_change = 0), this.__money_session.retired += this.__sale.last_change, this.dispatchAsync(
341
+ "session:money-dispensed",
342
+ {
343
+ type_money: null,
344
+ retired: null,
345
+ finish: !1,
346
+ type: "coins"
347
+ },
348
+ 500
349
+ ), e;
350
+ }
351
+ #E(n, e) {
352
+ const t = parseInt(n, 16);
353
+ return t === 1 ? (e.name = "Product not delivered", e.description = "The product requested wasn't delivered", e.no_code = 11, this.__internal__.dispense.status = !1) : t === 0 ? (e.name = "Product delivered", e.description = "The product requested was delivered", e.no_code = 12, this.__internal__.dispense.status = !0) : (e.name = "Unknown status product", e.description = "The response of product doesn't identify successfully", e.no_code = 400, this.__internal__.dispense.status = !1), this.dispatch("dispensed", {}), e;
354
+ }
355
+ #M(n, e) {
356
+ let t = "closed";
357
+ return n === "db" ? (e.name = "Door closed", e.no_code = 13) : n === "dc" ? (e.name = "Door open", e.no_code = 14, t = "open") : (e.name = "Unknown status door", e.description = "The response of door doesn't identify successfully", e.no_code = 400, t = "unknown"), this.__internal__.device.door_open = t === "open", this.dispatch("event:door", { open: t === "open" }), this.dispatch("door:event", { open: t === "open" }), e;
358
+ }
359
+ #S(n, e) {
360
+ const t = parseInt(n[2], 16) * 255, s = parseInt(n[3], 16), i = (t + s) * 0.1;
361
+ return e.no_code = 15, e.name = "Temperature status", e.description = `Temperature: ${i}`, e.additional = {
362
+ high: t,
363
+ low: s,
364
+ temperature: parseFloat(i.toString())
365
+ }, this.dispatch("status:temperature", e.additional), e;
366
+ }
367
+ #m(n, e) {
368
+ const t = parseInt(n, 16);
369
+ let s = "unknown";
370
+ return t === 1 ? (e.name = "Relay on", e.description = "Relay on", e.no_code = 16, s = "on") : t === 0 ? (e.name = "Relay off", e.description = "Relay off", e.no_code = 17, s = "off") : (e.name = "Status unknown", e.description = "Status unknown", e.no_code = 400), this.dispatch("status:relay", { enabled: s === "on" }), e;
371
+ }
372
+ #Q(n, e) {
373
+ const t = parseInt(n[2], 16);
374
+ if (e.no_code = 20 + t, e.name = "Status unknown", e.description = "The status of card reader does not identified correctly", t === 0)
375
+ e.request += ":disable", e.name = "Card reader disabled", e.description = "Card reader device was disabled successfully";
376
+ else if (t === 1 || t === 2)
377
+ e.request += ":dispense", e.name = "Card reader enabled", e.description = "Card reader device is now enabled";
378
+ else if (t === 3)
379
+ e.request += ":pre-authorize", e.name = "Pre-authorized credit", e.description = "The pre credit was authorized successfully";
380
+ else if (t === 4)
381
+ e.request += ":cancel", e.name = "Cancellation in progress", e.description = "Cancellation request done successfully";
382
+ else if (t === 5)
383
+ e.request += ":sell", e.name = "Sell approved", e.description = "Sell approved, starting dispense product";
384
+ else if (t === 6)
385
+ e.request += ":sell", e.name = "Sell denied", e.description = "This sell was denied, try again";
386
+ else if (t === 7)
387
+ e.request += ":end", e.name = "Session ended", e.description = "The session ended";
388
+ else if (t === 8)
389
+ e.request += ":cancel", e.name = "Cancelled", e.description = "Cancellation complete";
390
+ else if (t === 10) {
391
+ const s = parseInt(n[8], 16);
392
+ s === 1 ? (e.no_code = 30, e.name = "product not dispensed", e.description = "The product requested wasn't delivered") : s === 0 ? (e.no_code = 31, e.name = "product dispensed", e.description = "The product requested was delivered") : (e.name = "finished-unknown", e.no_code = 400);
393
+ } else
394
+ e.no_code = 400;
395
+ return this.dispatch("card-reader:event", e), e;
396
+ }
120
397
  serialMessage(n) {
121
398
  let e = {
122
399
  code: n,
@@ -128,46 +405,46 @@ class fe extends ue {
128
405
  const t = (5 + this.deviceNumber).toString(16).padStart(2, "0").toLowerCase();
129
406
  switch (n[1]) {
130
407
  case t:
131
- e.request = "connect", e = a(this, s, m).call(this, e);
408
+ e.request = "connect", e = this.#h(e);
132
409
  break;
133
410
  case "a0":
134
- e.request = "--automatic", e = a(this, s, V).call(this, n, e);
411
+ e.request = "--automatic", e = this.#I(n, e);
135
412
  break;
136
413
  case "b0":
137
- e.request = "--automatic", e = a(this, s, z).call(this, n, e);
414
+ e.request = "--automatic", e = this.#T(n, e);
138
415
  break;
139
416
  case "d0":
140
- e.request = "coin-purse:config", e = a(this, s, W).call(this, n[2], e);
417
+ e.request = "coin-purse:config", e = this.#R(n[2], e);
141
418
  break;
142
419
  case "d1":
143
- e.request = "banknote-purse:config", e.additional = { scrow: null }, e = a(this, s, K).call(this, n, e);
420
+ e.request = "banknote-purse:config", e.additional = { scrow: null }, e = this.#P(n, e);
144
421
  break;
145
422
  case "d2":
146
- e.request = "coin-purse:read-tubes", e = a(this, s, Y).call(this, n, e);
423
+ e.request = "coin-purse:read-tubes", e = this.#$(n, e);
147
424
  break;
148
425
  case "d3":
149
- e.request = "banknote-purse:read-recycler", e = a(this, s, G).call(this, n, e);
426
+ e.request = "banknote-purse:read-recycler", e = this.#B(n, e);
150
427
  break;
151
428
  case "d4":
152
- e.request = "banknote-purse:banknote-scrow-status", e = a(this, s, H).call(this, n[2], e);
429
+ e.request = "banknote-purse:banknote-scrow-status", e = this.#q(n[2], e);
153
430
  break;
154
431
  case "d5":
155
- e.request = "banknote-purse:dispense", e = a(this, s, J).call(this, n, e);
432
+ e.request = "banknote-purse:dispense", e = this.#D(n, e);
156
433
  break;
157
434
  case "d6":
158
- e.request = "coin-purse:dispense", e = a(this, s, X).call(this, n, e);
435
+ e.request = "coin-purse:dispense", e = this.#x(n, e);
159
436
  break;
160
437
  case "d7":
161
- e.request = "dispense", e = a(this, s, Z).call(this, n[5], e);
438
+ e.request = "dispense", e = this.#E(n[5], e);
162
439
  break;
163
440
  case "d8":
164
- e.request = "--automatic", e = a(this, s, g).call(this, n[13], e);
441
+ e.request = "--automatic", e = this.#M(n[13], e);
165
442
  break;
166
443
  case "d9":
167
- e.request = "status:temperature", e = a(this, s, ee).call(this, n, e);
444
+ e.request = "status:temperature", e = this.#S(n, e);
168
445
  break;
169
446
  case "da":
170
- e.request = "status:relay", e = a(this, s, ne).call(this, n[2], e);
447
+ e.request = "status:relay", e = this.#m(n[2], e);
171
448
  break;
172
449
  case "db":
173
450
  e.request = "banknote-purse:save-memory", e.no_code = 18, e.name = "Bill purse memory saved?", e.description = "The memory of bill purse was saved successfully?", this.dispatch("banknote-purse:save-memory", { message: e });
@@ -176,7 +453,7 @@ class fe extends ue {
176
453
  e.request = "coin-purse:read-memory", e.no_code = 19, e.name = "Coin purse memory read?", e.description = "The memory of coin purse was read successfully?", this.dispatch("banknote-purse:read-memory", { message: e });
177
454
  break;
178
455
  case "dd":
179
- e.request = "card-reader", a(this, s, te).call(this, n, e);
456
+ e.request = "card-reader", this.#Q(n, e);
180
457
  break;
181
458
  default:
182
459
  e.request = "--unknown", e.name = "Response unrecognized", e.description = "The response of application was received, but dont identify with any of current parameters", e.no_code = 400, this.dispatch("unknown", e);
@@ -185,12 +462,12 @@ class fe extends ue {
185
462
  this.dispatch("serial:message", e);
186
463
  }
187
464
  serialSetConnectionConstant(n = 1) {
188
- return d.connection({ channel: n });
465
+ return l.connection({ channel: n });
189
466
  }
190
467
  async coinPurseConfigure({ enable: n = !1, high: e = "FF", low: t = "FF" } = {}) {
191
468
  if (!this.__coin_purse.available) throw new Error("Coin purse not available");
192
469
  return e = this.hexToDec(e), t = this.hexToDec(t), await this.appendToQueue(
193
- d.coinPurseConfiguration({ enable: n, high: e, low: t }),
470
+ l.coinPurseConfiguration({ enable: n, high: e, low: t }),
194
471
  "coin-purse:config"
195
472
  );
196
473
  }
@@ -200,37 +477,58 @@ class fe extends ue {
200
477
  async coinPurseDisable() {
201
478
  await this.coinPurseConfigure({ enable: !1 });
202
479
  }
203
- async coinPurseDispense({ $_50c: n = 0, $_1: e = 0, $_2: t = 0, $_5: i = 0, $_10: r = 0 } = {}) {
480
+ async coinPurseDispense({ $_50c: n = 0, $_1: e = 0, $_2: t = 0, $_5: s = 0, $_10: i = 0 } = {}) {
204
481
  if (!this.__coin_purse.available) throw new Error("Coin purse not available");
205
482
  return await this.appendToQueue(
206
- d.coinPurseDispense({
483
+ l.coinPurseDispense({
207
484
  $50c: n,
208
485
  $1: e,
209
486
  $2: t,
210
- $5: i,
211
- $10: r
487
+ $5: s,
488
+ $10: i
212
489
  }),
213
490
  "coin-purse:dispense"
214
491
  );
215
492
  }
216
493
  async coinPurseReadTubes() {
217
- return await this.appendToQueue(d.coinPurseReadTubes(), "coin-purse:read-tubes");
494
+ return await this.appendToQueue(l.coinPurseReadTubes(), "coin-purse:read-tubes");
495
+ }
496
+ #N({ enable: n = !1, scrow: e = !1 } = {}) {
497
+ return l.banknotePurseICTConfigure({ enable: n, scrow: e });
498
+ }
499
+ #F({ enable: n = !1, scrow: e = !1 } = {}) {
500
+ return l.banknotePurseOtherConfigure({ enable: n, scrow: e });
218
501
  }
219
502
  async banknotePurseConfigure({ enable: n = !1, scrow: e = !1 } = {}) {
220
503
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
221
504
  let t;
222
- return a(this, s, v).call(this) ? t = a(this, s, se).call(this, { enable: n, scrow: e }) : t = a(this, s, ie).call(this, { enable: n, scrow: e }), await this.appendToQueue(t, "banknote-purse:config");
505
+ return this.#s() ? t = this.#N({ enable: n, scrow: e }) : t = this.#F({ enable: n, scrow: e }), await this.appendToQueue(t, "banknote-purse:config");
506
+ }
507
+ #j(n = 1) {
508
+ if (n < 1) throw new Error("No banknotes to dispense");
509
+ const e = [20, 50, 100, 200, 500][this.__banknote_purse.recycler.banknote];
510
+ return l.banknotePurseICTDispense({ quantity: n, denomination: e });
511
+ }
512
+ #O({ $_20: n = 0, $_50: e = 0, $_100: t = 0, $_200: s = 0, $_500: i = 0, $_1000: r = 0 } = {}) {
513
+ return l.banknotePurseOtherDispense({
514
+ $20: n,
515
+ $50: e,
516
+ $100: t,
517
+ $200: s,
518
+ $500: i,
519
+ $1000: r
520
+ });
223
521
  }
224
- async banknotePurseDispense({ $_20: n = 0, $_50: e = 0, $_100: t = 0, $_200: i = 0, $_500: r = 0, $_1000: o = 0 } = {}) {
522
+ async banknotePurseDispense({ $_20: n = 0, $_50: e = 0, $_100: t = 0, $_200: s = 0, $_500: i = 0, $_1000: r = 0 } = {}) {
225
523
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
226
524
  if (!this.__banknote_purse.isRecycler) throw new Error("Banknote purse is not recycler");
227
- let l;
228
- if (a(this, s, v).call(this)) {
229
- const u = [n, e, t, i, r];
230
- l = a(this, s, re).call(this, u[this.__banknote_purse.recycler.banknote]);
525
+ let a;
526
+ if (this.#s()) {
527
+ const o = [n, e, t, s, i];
528
+ a = this.#j(o[this.__banknote_purse.recycler.banknote]);
231
529
  } else
232
- l = a(this, s, ae).call(this, { $_20: n, $_50: e, $_100: t, $_200: i, $_500: r, $_1000: o });
233
- await this.appendToQueue(l, "banknote-purse:dispense");
530
+ a = this.#O({ $_20: n, $_50: e, $_100: t, $_200: s, $_500: i, $_1000: r });
531
+ await this.appendToQueue(a, "banknote-purse:dispense");
234
532
  }
235
533
  async banknotePurseEnable({ scrow: n = !1 }) {
236
534
  return await this.banknotePurseConfigure({ enable: !0, scrow: n });
@@ -241,14 +539,14 @@ class fe extends ue {
241
539
  async banknotePurseAcceptInScrow() {
242
540
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
243
541
  return await this.appendToQueue(
244
- d.banknotePurseAcceptInScrow(),
542
+ l.banknotePurseAcceptInScrow(),
245
543
  "banknote-purse:banknote-scrow-status"
246
544
  );
247
545
  }
248
546
  async banknotePurseRejectInScrow() {
249
547
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
250
548
  return await this.appendToQueue(
251
- d.banknotePurseRejectInScrow(),
549
+ l.banknotePurseRejectInScrow(),
252
550
  "banknote-purse:banknote-scrow-status"
253
551
  );
254
552
  }
@@ -256,21 +554,21 @@ class fe extends ue {
256
554
  channel: n = null,
257
555
  $_20: e = null,
258
556
  $_50: t = null,
259
- $_100: i = null,
260
- $_200: r = null,
261
- $_500: o = null,
262
- $_1000: l = null
557
+ $_100: s = null,
558
+ $_200: i = null,
559
+ $_500: r = null,
560
+ $_1000: a = null
263
561
  } = {}) {
264
562
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
265
563
  return await this.appendToQueue(
266
- d.banknotePurseSaveMemory({
564
+ l.banknotePurseSaveMemory({
267
565
  channel: n,
268
566
  $20: e,
269
567
  $50: t,
270
- $100: i,
271
- $200: r,
272
- $500: o,
273
- $1000: l
568
+ $100: s,
569
+ $200: i,
570
+ $500: r,
571
+ $1000: a
274
572
  }),
275
573
  "banknote-purse:save-memory"
276
574
  );
@@ -278,25 +576,25 @@ class fe extends ue {
278
576
  async banknotePurseReadRecycler() {
279
577
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
280
578
  if (!this.__banknote_purse.isRecycler) throw new Error("Banknote purse is not recycler");
281
- return await this.appendToQueue(d.banknotePurseReadRecycler(), "banknote-purse:read-recycler");
579
+ return await this.appendToQueue(l.banknotePurseReadRecycler(), "banknote-purse:read-recycler");
282
580
  }
283
581
  async cardReaderDisable() {
284
582
  if (!this.card_reader.available) throw new Error("Card reader not available");
285
- return await this.appendToQueue(d.cardReaderDisable(), "card-reader:disable");
583
+ return await this.appendToQueue(l.cardReaderDisable(), "card-reader:disable");
286
584
  }
287
- async cardReaderDispense({ channel: n = 1, second_channel: e = null, sensor: t = !0, seconds: i = null, price: r = 0 } = {}) {
585
+ async cardReaderDispense({ channel: n = 1, second_channel: e = null, sensor: t = !0, seconds: s = null, price: i = 0 } = {}) {
288
586
  if (!this.card_reader.available) throw new Error("Card reader not available");
289
- if ((isNaN(this.card_reader.max_pre_credit) || this.card_reader.max_pre_credit === 0) && (this.card_reader.max_pre_credit = r), isNaN(r) || r <= 0) throw new Error("Price must be greater than 0");
290
- if (r > this.card_reader.max_pre_credit) throw new Error("Price is greater than pre-credit configured");
291
- if (!t && (i === null || i <= 0 || i > 40))
587
+ if ((isNaN(this.card_reader.max_pre_credit) || this.card_reader.max_pre_credit === 0) && (this.card_reader.max_pre_credit = i), isNaN(i) || i <= 0) throw new Error("Price must be greater than 0");
588
+ if (i > this.card_reader.max_pre_credit) throw new Error("Price is greater than pre-credit configured");
589
+ if (!t && (s === null || s <= 0 || s > 40))
292
590
  throw new Error("Invalid time to dispense without sensor, must be between 0.1 and 40.0 seconds");
293
591
  return this.appendToQueue(
294
- d.cardReaderDispense({
592
+ l.cardReaderDispense({
295
593
  selection: n,
296
594
  second_selection: e,
297
595
  sensor: t,
298
- seconds: i,
299
- price: r
596
+ seconds: s,
597
+ price: i
300
598
  }),
301
599
  "card-reader:dispense"
302
600
  );
@@ -308,7 +606,7 @@ class fe extends ue {
308
606
  n && this.__coin_purse.available && await this.coinPurseEnable(), e && this.__banknote_purse.available && await this.banknotePurseEnable({ scrow: t });
309
607
  }
310
608
  async coolingRelayConfigure({ enable: n = !1 } = {}) {
311
- return await this.appendToQueue(d.coolingRelayConfigure({ enable: n }), "status:relay");
609
+ return await this.appendToQueue(l.coolingRelayConfigure({ enable: n }), "status:relay");
312
610
  }
313
611
  async coolingRelayEnable() {
314
612
  return await this.coolingRelayConfigure({ enable: !0 });
@@ -317,7 +615,7 @@ class fe extends ue {
317
615
  return await this.coolingRelayConfigure({ enable: !1 });
318
616
  }
319
617
  async readTemperature() {
320
- return await this.appendToQueue(d.readTemperature(), "status:temperature");
618
+ return await this.appendToQueue(l.readTemperature(), "status:temperature");
321
619
  }
322
620
  /**
323
621
  * Dispense a product from the machine
@@ -328,405 +626,135 @@ class fe extends ue {
328
626
  * @param {boolean} retry
329
627
  * @return {Promise<unknown>}
330
628
  */
331
- async dispense({ selection: n = 1, second_selection: e = null, sensor: t = !0, seconds: i = null, retry: r = !0 } = {}) {
629
+ async dispense({ selection: n = 1, second_selection: e = null, sensor: t = !0, seconds: s = null, retry: i = !0 } = {}) {
332
630
  if (n = parseInt(n), isNaN(n) || n < 1 || n > 80) throw new Error("Invalid channel number");
333
631
  if (e !== null && (e < 1 || e > 80 || e === n))
334
632
  throw new Error("Invalid second channel number");
335
- if (!t && (i === null || i <= 0 || i > 40))
633
+ if (!t && (s === null || s <= 0 || s > 40))
336
634
  throw new Error("Invalid time to dispense without sensor, must be between 0.1 and 40.0 seconds");
337
- r && (this.__internal__.dispense.backup_dispense = {
635
+ i && (this.__internal__.dispense.backup_dispense = {
338
636
  selection: n,
339
637
  second_selection: e,
340
638
  sensor: t,
341
- seconds: i
639
+ seconds: s
342
640
  });
343
- const o = d.dispense({
641
+ const r = l.dispense({
344
642
  selection: n,
345
643
  second_selection: e,
346
644
  sensor: t,
347
- seconds: i
645
+ seconds: s
348
646
  });
349
- t || (i || (i = 1.5), this.__internal__.dispense.custom_limit_counter = i + 0.2);
350
- let l = await this.internalDispense(o);
351
- return !l.status && r && (l = await this.internalDispense(o)), this.__internal__.dispense.custom_limit_counter = null, l;
647
+ t || (s || (s = 1.5), this.__internal__.dispense.custom_limit_counter = s + 0.2);
648
+ let a = await this.internalDispense(r);
649
+ return !a.status && i && (a = await this.internalDispense(r)), this.__internal__.dispense.custom_limit_counter = null, a;
650
+ }
651
+ #a() {
652
+ this.#n = !1, this.#e = 0, this.#t = 0;
653
+ }
654
+ /**
655
+ *
656
+ * @param {null|object} dispensed
657
+ * @param {number} limit
658
+ */
659
+ #i({ dispensed: n = null, limit: e = 80 } = {}) {
660
+ this.#t = Math.round(this.#e * 100 / e), this.dispatch("percentage:test", { percentage: this.#t, dispensed: n });
352
661
  }
353
662
  async testEngines({ singleEngine: n = !1 } = {}) {
354
663
  if (this.isDispensing) throw new Error("Another dispensing process is running");
355
- if (w(this, f)) throw new Error("Another test is running");
356
- a(this, s, R).call(this), b(this, f, !0);
664
+ if (this.#n) throw new Error("Another test is running");
665
+ this.#a(), this.#n = !0;
357
666
  const e = [];
358
- a(this, s, C).call(this);
667
+ this.#i();
359
668
  for (let t = 1; t <= 80; t++) {
360
- const i = await this.dispense({
669
+ const s = await this.dispense({
361
670
  selection: t,
362
671
  second_selection: n ? null : t + 1,
363
672
  sensor: !1,
364
673
  seconds: 0.4,
365
674
  retry: !1
366
675
  });
367
- e.push(i), b(this, _, t), a(this, s, C).call(this), n || t++;
676
+ e.push(s), this.#e = t, this.#i(), n || t++;
368
677
  }
369
- b(this, _, 80), a(this, s, C).call(this, { dispensed: e }), a(this, s, R).call(this);
678
+ this.#e = 80, this.#i({ dispensed: e }), this.#a();
370
679
  }
371
680
  async sendCustomCode({ code: n = [] } = {}) {
372
681
  if (n.length === 0) throw new Error("Invalid code");
373
- return await this.appendToQueue(d.customCode(n), "custom");
682
+ return await this.appendToQueue(l.customCode(n), "custom");
683
+ }
684
+ #U(n) {
685
+ const e = ["20", "50", "100", "200", "500"], t = this.__banknote_purse.recycler.banknote, s = "$_" + e[t], i = parseInt(e[t]), r = this.banknotes.recycler[`p${e[t]}`], a = Math.min(Math.floor(n / i), r), o = {
686
+ banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
687
+ pending: n,
688
+ will_dispense: a > 0
689
+ };
690
+ return this.totalInRecycler === 0 || a < 1 || n === 0 || (o.banknotes[s] = a, o.pending = parseFloat((n - a * i).toFixed(2))), o;
691
+ }
692
+ #A(n) {
693
+ const e = {
694
+ banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
695
+ pending: n,
696
+ will_dispense: !1
697
+ };
698
+ if (this.totalInRecycler === 0 || n === 0) return e;
699
+ const t = (s, i) => {
700
+ if (this.banknotes.recycler[i] > 0) {
701
+ const r = Math.floor(e.pending / s), a = Math.min(r, this.banknotes.recycler[i]);
702
+ e.banknotes[`$_${s}`] = a, e.pending = parseFloat((e.pending - a * s).toFixed(2));
703
+ }
704
+ };
705
+ return t(1e3, "p1000"), t(500, "p500"), t(200, "p200"), t(100, "p100"), t(50, "p50"), t(20, "p20"), e.will_dispense = Object.values(e.banknotes).some((s) => s > 0), e;
706
+ }
707
+ #o(n) {
708
+ return this.hasRecycler ? this.#s() ? this.#U(n) : this.#A(n) : {
709
+ banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
710
+ pending: n,
711
+ will_dispense: !1
712
+ };
713
+ }
714
+ #l(n) {
715
+ const e = {
716
+ coins: { $_50c: 0, $_1: 0, $_2: 0, $_5: 0, $_10: 0 },
717
+ pending: n,
718
+ will_dispense: !1
719
+ };
720
+ if (!this.hasCoinPurse || n <= 0 || this.totalInTubes === 0) return e;
721
+ const t = (s, i, r = null) => {
722
+ if (this.coins.tubes[i] > 0) {
723
+ r === null && (r = "$_" + s);
724
+ const a = Math.floor(e.pending / s), o = Math.min(a, this.coins.tubes[i]);
725
+ e.coins[r] = o, e.pending = parseFloat((e.pending - o * s).toFixed(2));
726
+ }
727
+ };
728
+ return t(10, "p10"), t(5, "p5"), t(2, "p2"), t(1, "p1"), t(0.5, "g50", "$_50c"), e.will_dispense = Object.values(e.coins).some((s) => s > 0), e;
374
729
  }
375
730
  hasToReturnChange(n = 0) {
376
731
  let e = n;
377
- return e <= 0 ? !0 : (e = a(this, s, P).call(this, e).pending, e = a(this, s, $).call(this, e).pending, !(e > 0));
732
+ return e <= 0 ? !0 : (e = this.#o(e).pending, e = this.#l(e).pending, !(e > 0));
733
+ }
734
+ async #c(n = null) {
735
+ if (!this.#d()) throw new Error("Change not available");
736
+ let e = this.change, t = this.change;
737
+ if (n !== null && (e = n, t = n), t <= 0) return !1;
738
+ const s = this.#o(t);
739
+ t = s.pending;
740
+ const i = this.#l(t);
741
+ return t = i.pending, t > 0 && this.dispatch("change:pending", { pending: t }), this.dispatch("change:dispense", {
742
+ recycler: s.banknotes,
743
+ coins: i.coins,
744
+ pending: t,
745
+ delivery: e - t
746
+ }), t === e ? !1 : (s.will_dispense && await this.banknotePurseDispense(s.banknotes), i.will_dispense && await this.coinPurseDispense(i.coins), !0);
378
747
  }
379
748
  async returnChange() {
380
- return await a(this, s, B).call(this);
749
+ return await this.#c();
381
750
  }
382
751
  async returnInsertedMoney() {
383
- return this.__money_session.inserted <= 0 ? !1 : await a(this, s, B).call(this, this.__money_session.inserted);
752
+ return this.__money_session.inserted <= 0 ? !1 : await this.#c(this.__money_session.inserted);
384
753
  }
385
754
  async serialCorruptMessage(n, e) {
386
755
  this.dispatch("corrupt:message", { data: n, message: e });
387
756
  }
388
757
  }
389
- f = new WeakMap(), _ = new WeakMap(), k = new WeakMap(), s = new WeakSet(), E = function() {
390
- const n = [
391
- "banknote-purse:banknote-scrow-status",
392
- "banknote-purse:config",
393
- "banknote-purse:event-banknote",
394
- "banknote-purse:read-memory",
395
- "banknote-purse:recycler",
396
- "banknote-purse:save-memory",
397
- "card-reader:event",
398
- "change:pending",
399
- "change:dispense",
400
- "coin-purse:coin-event",
401
- "coin-purse:config",
402
- "coin-purse:reject-lever",
403
- "coin-purse:reset",
404
- "coin-purse:tubes",
405
- "percentage:test",
406
- "run:default-load",
407
- "session:money-dispensed",
408
- "session:money-request",
409
- "event:door",
410
- "door:event",
411
- "status:relay",
412
- "status:temperature",
413
- "money:inserted"
414
- ];
415
- for (const e of n)
416
- this.serialRegisterAvailableListener(e);
417
- }, M = function() {
418
- x.add(this);
419
- }, v = function() {
420
- return this.__banknote_purse.isRecycler && this.__banknote_purse.recycler.ict;
421
- }, S = function() {
422
- return this.hasCoinPurse || this.hasRecycler;
423
- }, m = function(n) {
424
- return n.name = "Connection with the serial device completed.", n.description = "Your connection with the serial device was successfully completed.", n.no_code = 1, this.dispatch("run:default-load", {}), n;
425
- }, Q = function(n) {
426
- const e = {
427
- g50: { value: 0.5, name: "50 pennies (the big one)" },
428
- c0: { value: 0.5, name: "50 pennies (the little one)" },
429
- p1: { value: 1, name: "1 peso" },
430
- p2: { value: 2, name: "2 pesos" },
431
- p5: { value: 5, name: "5 pesos" },
432
- p10: { value: 10, name: "10 pesos" },
433
- p20: { value: 20, name: "20 pesos" }
434
- };
435
- return e[n] ? e[n] : !1;
436
- }, N = function(n) {
437
- const e = {
438
- g50: ["40", "50", "60", "70", "90"],
439
- c50: ["41", "51", "61", "71", "91"],
440
- p1: ["42", "52", "62", "72", "92"],
441
- p2: ["43", "53", "63", "73", "93"],
442
- p5: ["44", "54", "64", "74", "94"],
443
- p10: ["45", "55", "65", "75", "95"],
444
- p20: ["47", "57", "67", "77", "97"]
445
- };
446
- let t = null;
447
- for (let r in e)
448
- if (e[r].includes(n)) {
449
- t = r;
450
- break;
451
- }
452
- return t ? [{
453
- g50: "50 pennies (the big one)",
454
- c0: "50 pennies (the little one)",
455
- p1: "1 peso",
456
- p2: "2 pesos",
457
- p5: "5 pesos",
458
- p10: "10 pesos",
459
- p20: "20 pesos"
460
- }[t], t] : [`Undefined value: ¿${n}?`, null];
461
- }, F = function(n) {
462
- return ["g50", "c50", "p1", "p2", "p5", "p10", "p20"].includes(n);
463
- }, j = function(n) {
464
- const e = {
465
- p20: ["80", "90", "a0", "b0"],
466
- p50: ["81", "91", "a1", "b1"],
467
- p100: ["82", "92", "a2", "b2"],
468
- p200: ["83", "93", "a3", "b3"],
469
- p500: ["84", "94", "a4", "b4"],
470
- p1000: ["85", "95", "a5", "b5"]
471
- };
472
- let t = null;
473
- for (let r in e)
474
- if (e[r].includes(n)) {
475
- t = r;
476
- break;
477
- }
478
- return t ? [{
479
- p20: "20 pesos",
480
- p50: "50 pesos",
481
- p100: "100 pesos",
482
- p200: "200 pesos",
483
- p500: "500 pesos",
484
- p1000: "1000 pesos"
485
- }[t], t] : [`Undefined value: ¿${n}?`, null];
486
- }, O = function(n) {
487
- const e = {
488
- p20: { value: 20, name: "20 pesos" },
489
- p50: { value: 50, name: "50 pesos" },
490
- p100: { value: 100, name: "100 pesos" },
491
- p200: { value: 200, name: "200 pesos" },
492
- p500: { value: 500, name: "500 pesos" },
493
- p1000: { value: 1e3, name: "1000 pesos" }
494
- };
495
- return e[n] ? e[n] : !1;
496
- }, U = function(n) {
497
- return ["p20", "p50", "p100", "p200", "p500", "p1000"].includes(n);
498
- }, A = function(n) {
499
- return ["r20", "r50", "r100"].includes(n);
500
- }, L = function() {
501
- return ["r20", "r50", "r100", "r200", "r500"][this.__banknote_purse.recycler.banknote];
502
- }, T = function(n, e, t) {
503
- if (!n) return;
504
- let i = !0;
505
- if (a(this, s, F).call(this, n) && t === "coin") {
506
- if (typeof this.coins.tubes[n] > "u") return;
507
- e === "tube" ? this.coins.tubes[n] += 1 : e === "box" && (this.coins.box[n] += 1);
508
- let r = 0;
509
- ["g50", "c50"].includes(n) ? r = 0.5 : r += parseInt(n.slice(1)), this.coins.totals[n] += r, this.__money_session.inserted += r, this.coins.total += r;
510
- const o = a(this, s, Q).call(this, n);
511
- o && this.dispatch("money:inserted", {
512
- type: "coin",
513
- money: o,
514
- // {value:number,name:string}
515
- where: e
516
- });
517
- } else if (a(this, s, U).call(this, n) && t === "banknote") {
518
- if (typeof this.banknotes.recycler[n] > "u") return;
519
- e === "recycler" ? this.banknotes.recycler[n] += 1 : e === "stacker" && (this.banknotes.stacker[n] += 1);
520
- let r = parseInt(n.slice(1));
521
- this.banknotes.totals[n] += r, this.__money_session.inserted += r, this.banknotes.total += r;
522
- const o = a(this, s, O).call(this, n);
523
- o && this.dispatch("money:inserted", {
524
- type: "banknote",
525
- money: o,
526
- // {value:number,name:string}
527
- where: e
528
- });
529
- } else if (a(this, s, A).call(this, n) && e === "out" && t === "banknote") {
530
- if (typeof this.banknotes.out[n.replace("r", "p")] > "u") return;
531
- this.banknotes.out[n.replace("r", "p")] += 1;
532
- let r = parseInt(n.slice(1));
533
- this.__money_session.retired += r, this.banknotes.recycler[n.replace("r", "p")] -= 1, this.banknotes.total -= r, i = !1, this.dispatch("session:money-dispensed", { type_money: n, retired: r, finish: !1, type: "banknotes" });
534
- }
535
- i && this.dispatch("session:money-request", {});
536
- }, V = function(n, e) {
537
- const t = parseInt(n[2], 16);
538
- return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, t === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : t === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : t >= 64 && t <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : t >= 80 && t <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : t >= 96 && t <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : t >= 112 && t <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : t >= 144 && t <= 159 ? (e.name = "Coin dispensed", e.additional.where = "out", e.description = `Undefined value: ¿${n[2]}?`) : (e.name = "Coin inserted", e.description = "Undefined status. Without information of this", e.no_code = 400), t === 1 || t === 2 || t >= 160 || t >= 128 && t <= 143 || ([e.description, e.additional.coin] = a(this, s, N).call(this, n[2]), e.no_code = 38 + t, a(this, s, T).call(this, e.additional.coin, e.additional.where, "coin"), ["tube", "out"].includes(e.additional.where) && this.dispatch("coin-purse:tubes", this.coins.tubes), this.dispatch("coin-purse:coin-event", this.coins)), e;
539
- }, z = function(n, e) {
540
- const t = parseInt(n[2], 16);
541
- return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, t === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = a(this, s, L).call(this), e.additional.where = "out", e.no_code = 200) : t >= 128 && t <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : t >= 144 && t <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : t >= 160 && t <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : t >= 176 && t <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), t >= 128 && t <= 191 && ([e.description, e.additional.banknote] = a(this, s, j).call(this, n[2]), e.no_code = 74 + t), a(this, s, T).call(this, e.additional.banknote, e.additional.where, "banknote"), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
542
- }, W = function(n, e) {
543
- const t = parseInt(n, 16);
544
- return t === 1 ? (e.name = "Coin purse enabled", e.description = "Configuration complete, enabled", e.no_code = 3) : t === 0 ? (e.name = "Coin purse disabled", e.description = "Disabled by system request", e.no_code = 4) : (e.name = "Status unknown", e.description = "The response of coin purse doesn't identify successfully", e.no_code = 400), this.dispatch("coin-purse:config", { enabled: t === 1 }), e;
545
- }, K = function(n, e) {
546
- const t = parseInt(n[2], 16), i = parseInt(n[3], 16);
547
- return t === 0 ? (e.name = "Bill purse disabled", e.description = "Configuration complete, disabled") : t === 1 && (e.name = "Bill purse enabled", e.description = "Configuration complete, enabled"), i === 0 ? e.additional.scrow = "Scrow disabled, banknote received automatic" : i === 1 && (e.additional.scrow = "Scrow enabled, require manual action"), e.no_code = 5, this.dispatch("banknote-purse:config", { enabled: t === 1, scrow: i === 1 }), e;
548
- }, Y = function(n, e) {
549
- e.no_code = 6;
550
- const [t, i, r, o, l, u] = [
551
- parseInt(n[2], 16),
552
- parseInt(n[3], 16),
553
- parseInt(n[4], 16),
554
- parseInt(n[5], 16),
555
- parseInt(n[6], 16),
556
- parseInt(n[7], 16)
557
- ];
558
- return e.additional = {
559
- coins: { g50: t, c50: i, p1: r, p2: o, p5: l, p10: u }
560
- }, this.coins.tubes.g50 = t, this.coins.tubes.c50 = i, this.coins.tubes.p1 = r, this.coins.tubes.p2 = o, this.coins.tubes.p5 = l, this.coins.tubes.p10 = u, this.coins.totals.g50 = (this.coins.box.g50 + t) * 0.5, this.coins.totals.c50 = (this.coins.box.c50 + i) * 0.5, this.coins.totals.p1 = this.coins.box.p1 + r, this.coins.totals.p2 = (this.coins.box.p2 + o) * 2, this.coins.totals.p5 = (this.coins.box.p5 + l) * 5, this.coins.totals.p10 = (this.coins.box.p10 + u) * 10, this.coins.total = this.coins.totals.g50 + this.coins.totals.c50 + this.coins.totals.p1 + this.coins.totals.p2 + this.coins.totals.p5 + this.coins.totals.p10, e.name = "Read tubes", e.description = "Quantity of coins approximated", this.dispatch("coin-purse:tubes", this.coins.tubes), e;
561
- }, G = function(n, e) {
562
- e.no_code = 7;
563
- const [t, i, r, o, l, u] = [
564
- parseInt(n[2], 16),
565
- parseInt(n[3], 16),
566
- parseInt(n[4], 16),
567
- parseInt(n[5], 16),
568
- parseInt(n[6], 16),
569
- parseInt(n[7], 16)
570
- ];
571
- return e.additional = {
572
- banknotes: { b20: t, b50: i, b100: r, b200: o, b500: l, b1000: u }
573
- }, this.banknotes.recycler.p20 = t, this.banknotes.recycler.p50 = i, this.banknotes.recycler.p100 = r, this.banknotes.recycler.p200 = o, this.banknotes.recycler.p500 = l, this.banknotes.recycler.p1000 = u, this.banknotes.totals.p20 = (this.banknotes.stacker.p20 + t) * 20, this.banknotes.totals.p50 = (this.banknotes.stacker.p50 + i) * 50, this.banknotes.totals.p100 = (this.banknotes.stacker.p100 + r) * 100, this.banknotes.totals.p200 = (this.banknotes.stacker.p200 + o) * 200, this.banknotes.totals.p500 = (this.banknotes.stacker.p500 + l) * 500, this.banknotes.totals.p1000 = (this.banknotes.stacker.p1000 + u) * 1e3, this.banknotes.total = this.banknotes.totals.p20 + this.banknotes.totals.p50 + this.banknotes.totals.p100 + this.banknotes.totals.p200 + this.banknotes.totals.p500 + this.banknotes.totals.p1000, e.name = "Read recycler", e.description = "Quantity of banknotes approximated", this.dispatch("banknote-purse:recycler", this.banknotes.recycler), e;
574
- }, H = function(n, e) {
575
- const t = parseInt(n, 16);
576
- return t === 1 ? e.name = "Banknote accepted" : t === 0 ? e.name = "Banknote rejected" : e.name = "Unknown status banknote", e.no_code = 8, this.dispatch("banknote-purse:banknote-scrow-status", { status: t === 1 }), e;
577
- }, J = function(n, e) {
578
- const [t, i, r, o, l, u] = [
579
- parseInt(n[2], 16),
580
- parseInt(n[3], 16),
581
- parseInt(n[4], 16),
582
- parseInt(n[5], 16),
583
- parseInt(n[6], 16),
584
- parseInt(n[7], 16)
585
- ], q = t * 20 + i * 50 + r * 100 + o * 200 + l * 500 + u * 1e3;
586
- return e.name = "Banknotes dispensed", e.description = q > 0 ? "Banknotes dispensed by request" : "No banknotes dispensed, recycler empty", e.no_code = 9, e.additional = {
587
- banknotes: { b20: t, b50: i, b100: r, b200: o, b500: l, b1000: u },
588
- total_dispensed: q
589
- }, this.dispatch("session:money-dispensed", {
590
- type_money: null,
591
- retired: null,
592
- finish: !1,
593
- type: "banknotes",
594
- data: e
595
- }), e;
596
- }, X = function(n, e) {
597
- return e.name = "Coins dispensed", e.no_code = 10, e.description = "Coins dispensed by request", isNaN(this.__sale.last_change) && (this.__sale.last_change = 0), this.__money_session.retired += this.__sale.last_change, this.dispatchAsync(
598
- "session:money-dispensed",
599
- {
600
- type_money: null,
601
- retired: null,
602
- finish: !1,
603
- type: "coins"
604
- },
605
- 500
606
- ), e;
607
- }, Z = function(n, e) {
608
- const t = parseInt(n, 16);
609
- return t === 1 ? (e.name = "Product not delivered", e.description = "The product requested wasn't delivered", e.no_code = 11, this.__internal__.dispense.status = !1) : t === 0 ? (e.name = "Product delivered", e.description = "The product requested was delivered", e.no_code = 12, this.__internal__.dispense.status = !0) : (e.name = "Unknown status product", e.description = "The response of product doesn't identify successfully", e.no_code = 400, this.__internal__.dispense.status = !1), this.dispatch("dispensed", {}), e;
610
- }, g = function(n, e) {
611
- let t = "closed";
612
- return n === "db" ? (e.name = "Door closed", e.no_code = 13) : n === "dc" ? (e.name = "Door open", e.no_code = 14, t = "open") : (e.name = "Unknown status door", e.description = "The response of door doesn't identify successfully", e.no_code = 400, t = "unknown"), this.__internal__.device.door_open = t === "open", this.dispatch("event:door", { open: t === "open" }), this.dispatch("door:event", { open: t === "open" }), e;
613
- }, ee = function(n, e) {
614
- const t = parseInt(n[2], 16) * 255, i = parseInt(n[3], 16), r = (t + i) * 0.1;
615
- return e.no_code = 15, e.name = "Temperature status", e.description = `Temperature: ${r}`, e.additional = {
616
- high: t,
617
- low: i,
618
- temperature: parseFloat(r.toString())
619
- }, this.dispatch("status:temperature", e.additional), e;
620
- }, ne = function(n, e) {
621
- const t = parseInt(n, 16);
622
- let i = "unknown";
623
- return t === 1 ? (e.name = "Relay on", e.description = "Relay on", e.no_code = 16, i = "on") : t === 0 ? (e.name = "Relay off", e.description = "Relay off", e.no_code = 17, i = "off") : (e.name = "Status unknown", e.description = "Status unknown", e.no_code = 400), this.dispatch("status:relay", { enabled: i === "on" }), e;
624
- }, te = function(n, e) {
625
- const t = parseInt(n[2], 16);
626
- if (e.no_code = 20 + t, e.name = "Status unknown", e.description = "The status of card reader does not identified correctly", t === 0)
627
- e.request += ":disable", e.name = "Card reader disabled", e.description = "Card reader device was disabled successfully";
628
- else if (t === 1 || t === 2)
629
- e.request += ":dispense", e.name = "Card reader enabled", e.description = "Card reader device is now enabled";
630
- else if (t === 3)
631
- e.request += ":pre-authorize", e.name = "Pre-authorized credit", e.description = "The pre credit was authorized successfully";
632
- else if (t === 4)
633
- e.request += ":cancel", e.name = "Cancellation in progress", e.description = "Cancellation request done successfully";
634
- else if (t === 5)
635
- e.request += ":sell", e.name = "Sell approved", e.description = "Sell approved, starting dispense product";
636
- else if (t === 6)
637
- e.request += ":sell", e.name = "Sell denied", e.description = "This sell was denied, try again";
638
- else if (t === 7)
639
- e.request += ":end", e.name = "Session ended", e.description = "The session ended";
640
- else if (t === 8)
641
- e.request += ":cancel", e.name = "Cancelled", e.description = "Cancellation complete";
642
- else if (t === 10) {
643
- const i = parseInt(n[8], 16);
644
- i === 1 ? (e.no_code = 30, e.name = "product not dispensed", e.description = "The product requested wasn't delivered") : i === 0 ? (e.no_code = 31, e.name = "product dispensed", e.description = "The product requested was delivered") : (e.name = "finished-unknown", e.no_code = 400);
645
- } else
646
- e.no_code = 400;
647
- return this.dispatch("card-reader:event", e), e;
648
- }, se = function({ enable: n = !1, scrow: e = !1 } = {}) {
649
- return d.banknotePurseICTConfigure({ enable: n, scrow: e });
650
- }, ie = function({ enable: n = !1, scrow: e = !1 } = {}) {
651
- return d.banknotePurseOtherConfigure({ enable: n, scrow: e });
652
- }, re = function(n = 1) {
653
- if (n < 1) throw new Error("No banknotes to dispense");
654
- const e = [20, 50, 100, 200, 500][this.__banknote_purse.recycler.banknote];
655
- return d.banknotePurseICTDispense({ quantity: n, denomination: e });
656
- }, ae = function({ $_20: n = 0, $_50: e = 0, $_100: t = 0, $_200: i = 0, $_500: r = 0, $_1000: o = 0 } = {}) {
657
- return d.banknotePurseOtherDispense({
658
- $20: n,
659
- $50: e,
660
- $100: t,
661
- $200: i,
662
- $500: r,
663
- $1000: o
664
- });
665
- }, R = function() {
666
- b(this, f, !1), b(this, _, 0), b(this, k, 0);
667
- }, /**
668
- *
669
- * @param {null|object} dispensed
670
- * @param {number} limit
671
- */
672
- C = function({ dispensed: n = null, limit: e = 80 } = {}) {
673
- b(this, k, Math.round(w(this, _) * 100 / e)), this.dispatch("percentage:test", { percentage: w(this, k), dispensed: n });
674
- }, oe = function(n) {
675
- const e = ["20", "50", "100", "200", "500"], t = this.__banknote_purse.recycler.banknote, i = "$_" + e[t], r = parseInt(e[t]), o = this.banknotes.recycler[`p${e[t]}`], l = Math.min(Math.floor(n / r), o), u = {
676
- banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
677
- pending: n,
678
- will_dispense: l > 0
679
- };
680
- return this.totalInRecycler === 0 || l < 1 || n === 0 || (u.banknotes[i] = l, u.pending = parseFloat((n - l * r).toFixed(2))), u;
681
- }, le = function(n) {
682
- const e = {
683
- banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
684
- pending: n,
685
- will_dispense: !1
686
- };
687
- if (this.totalInRecycler === 0 || n === 0) return e;
688
- const t = (i, r) => {
689
- if (this.banknotes.recycler[r] > 0) {
690
- const o = Math.floor(e.pending / i), l = Math.min(o, this.banknotes.recycler[r]);
691
- e.banknotes[`$_${i}`] = l, e.pending = parseFloat((e.pending - l * i).toFixed(2));
692
- }
693
- };
694
- return t(1e3, "p1000"), t(500, "p500"), t(200, "p200"), t(100, "p100"), t(50, "p50"), t(20, "p20"), e.will_dispense = Object.values(e.banknotes).some((i) => i > 0), e;
695
- }, P = function(n) {
696
- return this.hasRecycler ? a(this, s, v).call(this) ? a(this, s, oe).call(this, n) : a(this, s, le).call(this, n) : {
697
- banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
698
- pending: n,
699
- will_dispense: !1
700
- };
701
- }, $ = function(n) {
702
- const e = {
703
- coins: { $_50c: 0, $_1: 0, $_2: 0, $_5: 0, $_10: 0 },
704
- pending: n,
705
- will_dispense: !1
706
- };
707
- if (!this.hasCoinPurse || n <= 0 || this.totalInTubes === 0) return e;
708
- const t = (i, r, o = null) => {
709
- if (this.coins.tubes[r] > 0) {
710
- o === null && (o = "$_" + i);
711
- const l = Math.floor(e.pending / i), u = Math.min(l, this.coins.tubes[r]);
712
- e.coins[o] = u, e.pending = parseFloat((e.pending - u * i).toFixed(2));
713
- }
714
- };
715
- return t(10, "p10"), t(5, "p5"), t(2, "p2"), t(1, "p1"), t(0.5, "g50", "$_50c"), e.will_dispense = Object.values(e.coins).some((i) => i > 0), e;
716
- }, B = async function(n = null) {
717
- if (!a(this, s, S).call(this)) throw new Error("Change not available");
718
- let e = this.change, t = this.change;
719
- if (n !== null && (e = n, t = n), t <= 0) return !1;
720
- const i = a(this, s, P).call(this, t);
721
- t = i.pending;
722
- const r = a(this, s, $).call(this, t);
723
- return t = r.pending, t > 0 && this.dispatch("change:pending", { pending: t }), this.dispatch("change:dispense", {
724
- recycler: i.banknotes,
725
- coins: r.coins,
726
- pending: t,
727
- delivery: e - t
728
- }), t === e ? !1 : (i.will_dispense && await this.banknotePurseDispense(i.banknotes), r.will_dispense && await this.coinPurseDispense(r.coins), !0);
729
- };
730
758
  export {
731
- fe as Boardroid
759
+ f as Boardroid
732
760
  };