@feedmepos/mf-menu 0.31.69-prod → 0.31.70-prod
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/{App-Byjppp7I.js → App-oww7ujyg.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-a3SOjvXY.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CEO0LmL1.js} +3 -3
- package/dist/{Catalog-Bx3K7UqS.js → Catalog-DZQ3pNGh.js} +6 -6
- package/dist/{Category-BxfQ5OjG.js → Category-BXKg5OyS.js} +6 -6
- package/dist/{Category-C01Ct1Tf.js → Category-D-PHOpIW.js} +4 -4
- package/dist/{CookingGuide-CsTgj78F.js → CookingGuide-BTbnCFEu.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Dn-rOcky.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Dqx_t_0O.js} +1 -1
- package/dist/{Group-BUT2zIZO.js → Group-ClHMNiSh.js} +3 -3
- package/dist/{Group-DqV3QKc-.js → Group-prqsKUYP.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-uzYIOv4G.js → Group.vue_vue_type_script_setup_true_lang-Dw6aWjBP.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-zJW4-S9p.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFkeTBAE.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-7qMW2Pv6.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CvMmNOHQ.js} +8 -8
- package/dist/{Ingredient-CM1T0bUh.js → Ingredient-4FJGrf6p.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-NETtbB15.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BktMGXRr.js} +1052 -1052
- package/dist/{LinkProductSideSheet-CcqAYsNl.js → LinkProductSideSheet-BSCsz67z.js} +3 -3
- package/dist/{MenuSetting-DYb7ukCf.js → MenuSetting-DR0y-yPf.js} +5 -5
- package/dist/{PrintRoute-Cok4l1zV.js → PrintRoute-A8lsBSq1.js} +4 -4
- package/dist/{Product-Dhc4Adhn.js → Product-BqjAt406.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Cz-_UH53.js → Product.vue_vue_type_script_setup_true_lang-WiLPTgR2.js} +13 -13
- package/dist/{ProductInternalTools-D0RSqHy-.js → ProductInternalTools-DvBcp55c.js} +5 -5
- package/dist/{Products-Cqm3G5zr.js → Products-C6fidsDS.js} +11 -11
- package/dist/{Publish-B4tEDino.js → Publish-DOfjbtEs.js} +3 -3
- package/dist/{Recipe-7Dmy8ftx.js → Recipe-CFodRGOY.js} +4 -4
- package/dist/{Scheduler-DdRzLW-P.js → Scheduler-ClacjAPG.js} +3 -3
- package/dist/{ServingSequence-BInVw61-.js → ServingSequence-C5z95byt.js} +3 -3
- package/dist/{Setting-DcmNcix_.js → Setting-DtbsCiec.js} +5 -5
- package/dist/{Subcategory-BJPHM19c.js → Subcategory-zw0Mx0hR.js} +4 -4
- package/dist/{Takeaway-DffrT2Oe.js → Takeaway-C3uzSDJX.js} +4 -4
- package/dist/{Takeaway-CAMQB-IJ.js → Takeaway-CCJytDsu.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-d739Y4lL.js → Takeaway.vue_vue_type_script_setup_true_lang-CpF85_B3.js} +5 -5
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DadgzMI1.js → Thumbnail.vue_vue_type_script_setup_true_lang-D50rbfyr.js} +4 -4
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DBz3IAPN.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DmSjQJZ4.js} +14 -14
- package/dist/{Unit-DAjjHptw.js → Unit-DZdmF1pQ.js} +2 -2
- package/dist/{Variant-DbK_VSB4.js → Variant-Zcaocd8i.js} +3 -3
- package/dist/{_id_-BekyhQuo.js → _id_-BRcrca-8.js} +10 -10
- package/dist/{app-Dy_PpbJy.js → app-DDeSIfVZ.js} +1 -1
- package/dist/{app-DtCzoQbv.js → app-bUBWiDME.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-BtBrdkGB.js → linked-status-Bq0hNQpE.js} +2 -2
- package/dist/assets/{override-menu-aFa61roK.js → override-menu-BfnB3e1m.js} +2 -2
- package/dist/assets/{validate-menu-59YPNrR_.js → validate-menu-DMk-PBQi.js} +2 -2
- package/dist/{catalog-BMQMzuhB.js → catalog-eKbQRcDH.js} +1 -1
- package/dist/{catalogSetting-CQzUjCKe.js → catalogSetting-BufMUBKK.js} +1 -1
- package/dist/{category-COs21nTW.js → category-CVsPgNpg.js} +1 -1
- package/dist/{currency-Dhnr3ve1.js → currency-Bl1dxyO8.js} +1 -1
- package/dist/{customAttributes-3FR2K7UT.js → customAttributes-CPP_qryZ.js} +1 -1
- package/dist/{dayjs.min-Ch62VG8w.js → dayjs.min-C993k2az.js} +1 -1
- package/dist/{index-eArd_3kW.js → index-C6AFKvQ_.js} +1 -1
- package/dist/{index-C7QPwnik.js → index-CY6S-qH1.js} +4 -4
- package/dist/{index-BtcFkeQa.js → index-CkWZO4-z.js} +3 -3
- package/dist/{index-D12PAJYh.js → index-DdPRy5Qr.js} +1 -1
- package/dist/{item-B-j4iPOr.js → item-ive2BP_S.js} +16 -16
- package/dist/{jszip.min-5blhaVPG.js → jszip.min-vg2FxcB6.js} +245 -245
- package/dist/{menu-CxC6-3Ha.js → menu-2WDYsA46.js} +1 -1
- package/dist/{menu-Ca6KeFDH.js → menu-Cn0fAw5d.js} +4 -4
- package/dist/{menuV2-vW_kPd7g.js → menuV2-Czw9W7-q.js} +167 -167
- package/dist/{priceTier-DnE-LoIJ.js → priceTier-m5FyI-jd.js} +1 -1
- package/dist/{scheduler-DJ9vrIaV.js → scheduler-9JK1FVcw.js} +4 -4
- package/dist/{subcategory-BtKCfoK9.js → subcategory-BytdHQzK.js} +2 -2
- package/dist/{toExcel-B8G6ceKY.js → toExcel-BA8mKhiw.js} +2 -2
- package/dist/{unit-8ggZO-G6.js → unit-IwfUEGHv.js} +2 -2
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var Ue = Object.defineProperty;
|
|
2
2
|
var We = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var ne = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { an as
|
|
4
|
+
import { an as ue, H as I, D as T, A as ae, ao as re, J as z, I as ie, a8 as x, c as B, X as V, ai as oe, ap as Be, aq as Le, B as qe, aa as ze, ar as Ge, as as He, a7 as Je } from "./menu-Cn0fAw5d.js";
|
|
5
5
|
import { defineStore as Ye } from "pinia";
|
|
6
|
-
import { shallowRef as
|
|
6
|
+
import { shallowRef as N, ref as G, computed as S, shallowReactive as Qe, effectScope as Xe, watch as Ze } from "vue";
|
|
7
7
|
import { useCoreStore as se } from "@feedmepos/mf-common";
|
|
8
8
|
import { useSnackbar as et } from "@feedmepos/ui-library";
|
|
9
|
-
const tt = "/assets/linked-status-
|
|
9
|
+
const tt = "/assets/linked-status-Bq0hNQpE.js", nt = "/assets/override-menu-BfnB3e1m.js";
|
|
10
10
|
function rt(e) {
|
|
11
11
|
var o;
|
|
12
12
|
const t = I(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
|
|
13
13
|
return delete t.variant, delete t.thumbnail, [t, ...n || []];
|
|
14
14
|
}
|
|
15
15
|
function ot(e, t, n, o) {
|
|
16
|
-
const r = I(t),
|
|
16
|
+
const r = I(t), a = n ? r.modules.catalog.find((m) => m._id === n) : null, l = o ? r.modules.scheduler.find((m) => m._id === o) : null, u = a ? I(a) : void 0, c = n ? r.modules.catalog.filter((m) => m._id !== n) : [], i = l ? I(l) : void 0, f = e.reduce((m, v) => (m[v._id] = rt(v), m), {});
|
|
17
17
|
function h(m = []) {
|
|
18
18
|
const v = e.map((p) => p._id);
|
|
19
19
|
return [
|
|
@@ -21,20 +21,20 @@ function ot(e, t, n, o) {
|
|
|
21
21
|
...Object.values(f).flatMap((p) => p)
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
|
-
return
|
|
25
|
-
...
|
|
24
|
+
return u && o ? (u.override.scheduler = {
|
|
25
|
+
...u.override.scheduler,
|
|
26
26
|
[o]: {
|
|
27
|
-
...
|
|
27
|
+
...u.override.scheduler[o],
|
|
28
28
|
_id: o,
|
|
29
29
|
items: h(i == null ? void 0 : i.items).map((m) => ({
|
|
30
30
|
...m,
|
|
31
|
-
orderFrom:
|
|
31
|
+
orderFrom: ae.F_ORDER_FROM.enum.ALL
|
|
32
32
|
}))
|
|
33
33
|
}
|
|
34
|
-
}, r.modules.catalog = [...c,
|
|
35
|
-
...
|
|
34
|
+
}, r.modules.catalog = [...c, u], r) : u ? (u.override.items = {
|
|
35
|
+
...u.override.items,
|
|
36
36
|
...f
|
|
37
|
-
}, r.modules.catalog = [...c,
|
|
37
|
+
}, r.modules.catalog = [...c, u], r) : i ? (i.items = h(i.items), r.modules.scheduler = [
|
|
38
38
|
...r.modules.scheduler.filter((m) => m._id !== o),
|
|
39
39
|
i
|
|
40
40
|
], r) : {
|
|
@@ -50,18 +50,18 @@ function ot(e, t, n, o) {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
function $(e, t, n) {
|
|
53
|
-
var
|
|
53
|
+
var a;
|
|
54
54
|
if (n >= 3) return e;
|
|
55
55
|
const o = t.modules.item.find((l) => l._id === e._id);
|
|
56
56
|
if (!o)
|
|
57
57
|
throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
|
|
58
|
-
const r = (
|
|
58
|
+
const r = (a = o.groups) == null ? void 0 : a.map((l) => {
|
|
59
59
|
var i, f, h;
|
|
60
|
-
const
|
|
60
|
+
const u = (i = e == null ? void 0 : e.groups) == null ? void 0 : i.find((m) => m._id === l._id);
|
|
61
61
|
let c;
|
|
62
|
-
return
|
|
62
|
+
return u ? c = ((f = l.items) == null ? void 0 : f.map((m) => {
|
|
63
63
|
var p;
|
|
64
|
-
const v = (p =
|
|
64
|
+
const v = (p = u.items) == null ? void 0 : p.find(
|
|
65
65
|
(b) => b._id === m._id && b.combinationKey === m.combinationKey
|
|
66
66
|
);
|
|
67
67
|
return $(v || m, t, n + 1);
|
|
@@ -79,10 +79,10 @@ function $(e, t, n) {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
function st(e, t) {
|
|
82
|
-
const n = e.groups.map((
|
|
83
|
-
const l = t.modules.group.find((c) => c._id ===
|
|
82
|
+
const n = e.groups.map((a) => {
|
|
83
|
+
const l = t.modules.group.find((c) => c._id === a._id), u = ((l == null ? void 0 : l.items) || []).map((c) => {
|
|
84
84
|
var h;
|
|
85
|
-
const i = (h =
|
|
85
|
+
const i = (h = a.items) == null ? void 0 : h.find(
|
|
86
86
|
(m) => m._id === c._id && m.combinationKey === c.combinationKey
|
|
87
87
|
);
|
|
88
88
|
if (i)
|
|
@@ -94,8 +94,8 @@ function st(e, t) {
|
|
|
94
94
|
};
|
|
95
95
|
return $(f, t, 1);
|
|
96
96
|
});
|
|
97
|
-
return { ...
|
|
98
|
-
}), o = e.variant ? e.variant.variantCombinations.map((
|
|
97
|
+
return { ...a, items: u };
|
|
98
|
+
}), o = e.variant ? e.variant.variantCombinations.map((a) => $(a, t, 1)) : [], r = {
|
|
99
99
|
...T.generator.initMenuV4ItemOverrider(),
|
|
100
100
|
_id: e._id,
|
|
101
101
|
name: e.name,
|
|
@@ -110,28 +110,28 @@ function H(e, t) {
|
|
|
110
110
|
return e;
|
|
111
111
|
const n = { ...e, code: t.code };
|
|
112
112
|
return n.groups = (o = n.groups) == null ? void 0 : o.map((r) => {
|
|
113
|
-
var l,
|
|
114
|
-
const
|
|
115
|
-
return r.items = (
|
|
113
|
+
var l, u;
|
|
114
|
+
const a = (l = t.groups) == null ? void 0 : l.find((c) => c._id === r._id);
|
|
115
|
+
return r.items = (u = r.items) == null ? void 0 : u.map((c) => {
|
|
116
116
|
var f;
|
|
117
|
-
const i = (f =
|
|
117
|
+
const i = (f = a == null ? void 0 : a.items) == null ? void 0 : f.find(
|
|
118
118
|
(h) => h._id === c._id && h.combinationKey === c.combinationKey
|
|
119
119
|
);
|
|
120
120
|
return H(c, i);
|
|
121
121
|
}), r;
|
|
122
122
|
}), n;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function ut(e, t) {
|
|
125
125
|
const n = e.items[t._id];
|
|
126
126
|
t.variant && (t.variant = {
|
|
127
127
|
...t.variant,
|
|
128
128
|
variantCombinations: t.variant.variantCombinations.map((r) => {
|
|
129
|
-
const
|
|
129
|
+
const a = n.find(
|
|
130
130
|
(l) => l._id === r._id && l.combinationKey === r.combinationKey
|
|
131
131
|
);
|
|
132
|
-
if (!
|
|
132
|
+
if (!a)
|
|
133
133
|
throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
|
|
134
|
-
return H(
|
|
134
|
+
return H(a, r);
|
|
135
135
|
})
|
|
136
136
|
});
|
|
137
137
|
const o = n.find((r) => !r.combinationKey);
|
|
@@ -139,25 +139,25 @@ function at(e, t) {
|
|
|
139
139
|
throw new Error(`Base item overrider not found - ${t._id}`);
|
|
140
140
|
return t.groups = (o.groups || []).map((r) => {
|
|
141
141
|
var l;
|
|
142
|
-
const
|
|
143
|
-
return r.items = (l = r.items) == null ? void 0 : l.map((
|
|
142
|
+
const a = t.groups.find((u) => u._id === r._id);
|
|
143
|
+
return r.items = (l = r.items) == null ? void 0 : l.map((u) => {
|
|
144
144
|
var i;
|
|
145
|
-
const c = (i =
|
|
146
|
-
(f) => f._id ===
|
|
145
|
+
const c = (i = a == null ? void 0 : a.items) == null ? void 0 : i.find(
|
|
146
|
+
(f) => f._id === u._id && f.combinationKey === u.combinationKey
|
|
147
147
|
);
|
|
148
|
-
return H(
|
|
148
|
+
return H(u, c);
|
|
149
149
|
}), r;
|
|
150
150
|
}), {
|
|
151
151
|
...t,
|
|
152
152
|
price: (o == null ? void 0 : o.price) || t.price
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
async function Ot(e, t, n, o, r,
|
|
156
|
-
const l = I(n),
|
|
155
|
+
async function Ot(e, t, n, o, r, a = !0) {
|
|
156
|
+
const l = I(n), u = a ? ot(t, l, o, r) : l, c = t.reduce((h, m) => (h[m._id] = u.modules.item.find((v) => v._id === m._id), h), {}), i = t.reduce((h, m) => {
|
|
157
157
|
const v = m._id;
|
|
158
158
|
return h[v] = st(c[v], e), h;
|
|
159
159
|
}, {}), f = T.getFallbackPrices({
|
|
160
|
-
rawMenu:
|
|
160
|
+
rawMenu: u,
|
|
161
161
|
items: i,
|
|
162
162
|
catalogId: o || void 0,
|
|
163
163
|
schedulerId: r
|
|
@@ -165,7 +165,7 @@ async function Ot(e, t, n, o, r, u = !0) {
|
|
|
165
165
|
return t.map((h) => {
|
|
166
166
|
const m = h._id, v = c[m];
|
|
167
167
|
return {
|
|
168
|
-
...
|
|
168
|
+
...ut(f, v),
|
|
169
169
|
category: o || r ? v == null ? void 0 : v.category : null
|
|
170
170
|
};
|
|
171
171
|
});
|
|
@@ -173,11 +173,11 @@ async function Ot(e, t, n, o, r, u = !0) {
|
|
|
173
173
|
function Dt(e, t) {
|
|
174
174
|
if (e.length === 0) return "";
|
|
175
175
|
const n = e == null ? void 0 : e.split("variant");
|
|
176
|
-
return ((n == null ? void 0 : n.reduce((r,
|
|
177
|
-
if (
|
|
178
|
-
const l = `variant${
|
|
176
|
+
return ((n == null ? void 0 : n.reduce((r, a) => {
|
|
177
|
+
if (a && a.length > 0) {
|
|
178
|
+
const l = `variant${a.split("/")[0]}`, u = a.split("/")[1], i = t.find(
|
|
179
179
|
({ _id: f }) => f === l
|
|
180
|
-
).options.find(({ _id: f }) => f ===
|
|
180
|
+
).options.find(({ _id: f }) => f === u);
|
|
181
181
|
r.push(((i == null ? void 0 : i.name) || "").trim());
|
|
182
182
|
}
|
|
183
183
|
return r;
|
|
@@ -188,7 +188,7 @@ async function Vt(e, t) {
|
|
|
188
188
|
const n = `${e._id}-${e.updatedAt}-${t}`;
|
|
189
189
|
if (L.has(n))
|
|
190
190
|
return L.get(n);
|
|
191
|
-
const o = await
|
|
191
|
+
const o = await ue(
|
|
192
192
|
tt,
|
|
193
193
|
JSON.stringify({
|
|
194
194
|
menu: e,
|
|
@@ -198,7 +198,7 @@ async function Vt(e, t) {
|
|
|
198
198
|
return L.set(n, o), o;
|
|
199
199
|
}
|
|
200
200
|
async function ce(e, t, n) {
|
|
201
|
-
return await
|
|
201
|
+
return await ue(nt, {
|
|
202
202
|
menu: e,
|
|
203
203
|
catalogId: t,
|
|
204
204
|
schedulerId: n
|
|
@@ -206,14 +206,14 @@ async function ce(e, t, n) {
|
|
|
206
206
|
}
|
|
207
207
|
function Tt(e, t, n) {
|
|
208
208
|
const o = /* @__PURE__ */ new Set();
|
|
209
|
-
function r(
|
|
210
|
-
if (!e || !
|
|
209
|
+
function r(a, l) {
|
|
210
|
+
if (!e || !a || !l || o.has(l)) return !1;
|
|
211
211
|
o.add(l);
|
|
212
|
-
const
|
|
213
|
-
return !
|
|
212
|
+
const u = e.modules.item.find((c) => c._id === l);
|
|
213
|
+
return !u || !u.groups ? !1 : u.groups.some((c) => c._id === a) ? !0 : u.groups.some((c) => {
|
|
214
214
|
const i = e.modules.group.find((f) => f._id === c._id);
|
|
215
215
|
for (const f of (i == null ? void 0 : i.items) || [])
|
|
216
|
-
if (r(
|
|
216
|
+
if (r(a, f._id)) return !0;
|
|
217
217
|
return !1;
|
|
218
218
|
});
|
|
219
219
|
}
|
|
@@ -221,11 +221,11 @@ function Tt(e, t, n) {
|
|
|
221
221
|
}
|
|
222
222
|
function Ft(e, t, n) {
|
|
223
223
|
const o = /* @__PURE__ */ new Set();
|
|
224
|
-
function r(
|
|
225
|
-
if (!e || !
|
|
226
|
-
o.add(
|
|
227
|
-
const
|
|
228
|
-
return !
|
|
224
|
+
function r(a, l) {
|
|
225
|
+
if (!e || !a || !l || o.has(a)) return !1;
|
|
226
|
+
o.add(a);
|
|
227
|
+
const u = e.modules.group.find((c) => c._id === a);
|
|
228
|
+
return !u || !u.items ? !1 : u.items.some((c) => c._id === l) ? !0 : u.items.some((c) => {
|
|
229
229
|
const i = e.modules.item.find((f) => f._id === c._id);
|
|
230
230
|
for (const f of (i == null ? void 0 : i.groups) || [])
|
|
231
231
|
if (r(f._id, l)) return !0;
|
|
@@ -234,17 +234,17 @@ function Ft(e, t, n) {
|
|
|
234
234
|
}
|
|
235
235
|
return r(t, n);
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
async function
|
|
237
|
+
const q = /* @__PURE__ */ new Map();
|
|
238
|
+
async function at(e, t, n) {
|
|
239
239
|
const o = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
|
|
240
|
-
if (
|
|
241
|
-
return
|
|
240
|
+
if (q.has(o))
|
|
241
|
+
return q.get(o);
|
|
242
242
|
const r = await ce(e, t, n);
|
|
243
|
-
return
|
|
243
|
+
return q.set(o, r), r;
|
|
244
244
|
}
|
|
245
245
|
async function Kt(e, t, n) {
|
|
246
|
-
var l,
|
|
247
|
-
const o = await
|
|
246
|
+
var l, u;
|
|
247
|
+
const o = await at(e, t, null), r = [], a = (c, i) => {
|
|
248
248
|
const f = I(c);
|
|
249
249
|
for (const h in i)
|
|
250
250
|
i[h] && (f[h] = i[h]);
|
|
@@ -253,12 +253,12 @@ async function Kt(e, t, n) {
|
|
|
253
253
|
for (const c of o.modules.group) {
|
|
254
254
|
const i = (l = c.items) == null ? void 0 : l.find((h) => h._id === n && !h.combinationKey), f = e.modules.item.find((h) => h._id === n);
|
|
255
255
|
if (i) {
|
|
256
|
-
const h = (
|
|
256
|
+
const h = (u = c.items) == null ? void 0 : u.filter((v) => v._id === n && v.combinationKey), m = [i, ...h].map((v) => {
|
|
257
257
|
var w, C;
|
|
258
258
|
const p = v.combinationKey ? (C = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : C.find(
|
|
259
|
-
(
|
|
260
|
-
) : f, b = p && f ?
|
|
261
|
-
return
|
|
259
|
+
(E) => E.combinationKey === v.combinationKey
|
|
260
|
+
) : f, b = p && f ? a(f, p) : v;
|
|
261
|
+
return a(b, v);
|
|
262
262
|
});
|
|
263
263
|
r.push({
|
|
264
264
|
group: c,
|
|
@@ -320,18 +320,18 @@ function K(e, t) {
|
|
|
320
320
|
return !1;
|
|
321
321
|
}
|
|
322
322
|
function ct(e, t, n) {
|
|
323
|
-
const o = e.length, r = t.length,
|
|
323
|
+
const o = e.length, r = t.length, a = /* @__PURE__ */ new Map();
|
|
324
324
|
for (let c = 0; c < r; c++) {
|
|
325
325
|
const i = n ? n(t[c]) : JSON.stringify(t[c]);
|
|
326
|
-
|
|
326
|
+
a.has(i) || a.set(i, []), a.get(i).push(c);
|
|
327
327
|
}
|
|
328
|
-
const l = [],
|
|
328
|
+
const l = [], u = /* @__PURE__ */ new Set();
|
|
329
329
|
for (let c = 0; c < o; c++) {
|
|
330
|
-
const i = e[c], f = n ? n(i) : JSON.stringify(i), h =
|
|
330
|
+
const i = e[c], f = n ? n(i) : JSON.stringify(i), h = a.get(f);
|
|
331
331
|
if (h) {
|
|
332
332
|
for (const m of h)
|
|
333
|
-
if (!
|
|
334
|
-
l.push({ leftIndex: c, rightIndex: m }),
|
|
333
|
+
if (!u.has(m) && K(i, t[m])) {
|
|
334
|
+
l.push({ leftIndex: c, rightIndex: m }), u.add(m);
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
@@ -341,27 +341,27 @@ function ct(e, t, n) {
|
|
|
341
341
|
function lt(e, t, n) {
|
|
342
342
|
var m, v;
|
|
343
343
|
if (K(e, t)) return;
|
|
344
|
-
const o = { _t: "a" }, r = ((m = n == null ? void 0 : n.arrays) == null ? void 0 : m.detectMove) !== !1,
|
|
345
|
-
let
|
|
346
|
-
if (!l && e.length === t.length && e.length > 0 &&
|
|
347
|
-
const p = R(e[0]) || Array.isArray(e[0]), b =
|
|
344
|
+
const o = { _t: "a" }, r = ((m = n == null ? void 0 : n.arrays) == null ? void 0 : m.detectMove) !== !1, a = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.includeValueOnMove) === !0, l = n == null ? void 0 : n.objectHash;
|
|
345
|
+
let u = r ? ct(e, t, l) : [];
|
|
346
|
+
if (!l && e.length === t.length && e.length > 0 && u.length < e.length) {
|
|
347
|
+
const p = R(e[0]) || Array.isArray(e[0]), b = u.length > 0;
|
|
348
348
|
if (p || b) {
|
|
349
|
-
|
|
349
|
+
u = [];
|
|
350
350
|
for (let w = 0; w < e.length; w++)
|
|
351
|
-
|
|
351
|
+
u.push({ leftIndex: w, rightIndex: w });
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
new Set(
|
|
355
|
-
const c = new Set(
|
|
356
|
-
for (const p of
|
|
354
|
+
new Set(u.map((p) => p.leftIndex));
|
|
355
|
+
const c = new Set(u.map((p) => p.rightIndex)), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
|
|
356
|
+
for (const p of u)
|
|
357
357
|
i.set(p.leftIndex, p.rightIndex), f.set(p.rightIndex, p.leftIndex);
|
|
358
358
|
for (let p = 0; p < e.length; p++) {
|
|
359
359
|
const b = i.get(p);
|
|
360
360
|
if (b !== void 0) {
|
|
361
361
|
const w = J(e[p], t[b], n);
|
|
362
362
|
if (w !== void 0 && (o[b] = w), r && b !== p) {
|
|
363
|
-
const C = `_${p}`,
|
|
364
|
-
o[C] =
|
|
363
|
+
const C = `_${p}`, E = a ? [e[p], b, F] : ["", b, F];
|
|
364
|
+
o[C] = E;
|
|
365
365
|
}
|
|
366
366
|
} else {
|
|
367
367
|
const w = `_${p}`;
|
|
@@ -376,84 +376,84 @@ function lt(e, t, n) {
|
|
|
376
376
|
}
|
|
377
377
|
function dt(e, t, n) {
|
|
378
378
|
if (K(e, t)) return;
|
|
379
|
-
const o = {}, r = Object.keys(e),
|
|
380
|
-
for (const
|
|
381
|
-
if (n != null && n.propertyFilter && !n.propertyFilter(
|
|
379
|
+
const o = {}, r = Object.keys(e), a = Object.keys(t), l = /* @__PURE__ */ new Set([...r, ...a]);
|
|
380
|
+
for (const u of l) {
|
|
381
|
+
if (n != null && n.propertyFilter && !n.propertyFilter(u, { left: e, right: t }))
|
|
382
382
|
continue;
|
|
383
|
-
const c = Object.prototype.hasOwnProperty.call(e,
|
|
383
|
+
const c = Object.prototype.hasOwnProperty.call(e, u), i = Object.prototype.hasOwnProperty.call(t, u);
|
|
384
384
|
if (c && i) {
|
|
385
|
-
const f = J(e[
|
|
386
|
-
f !== void 0 && (o[
|
|
385
|
+
const f = J(e[u], t[u], n);
|
|
386
|
+
f !== void 0 && (o[u] = f);
|
|
387
387
|
} else if (c && !i) {
|
|
388
|
-
const f = n != null && n.omitRemovedValues ? 0 : e[
|
|
389
|
-
o[
|
|
390
|
-
} else !c && i && (o[
|
|
388
|
+
const f = n != null && n.omitRemovedValues ? 0 : e[u];
|
|
389
|
+
o[u] = [f, M, M];
|
|
390
|
+
} else !c && i && (o[u] = [t[u]]);
|
|
391
391
|
}
|
|
392
392
|
return Object.keys(o).length > 0 ? o : void 0;
|
|
393
393
|
}
|
|
394
394
|
function J(e, t, n) {
|
|
395
395
|
if (K(e, t)) return;
|
|
396
396
|
if (e === void 0 && t !== void 0) {
|
|
397
|
-
const
|
|
398
|
-
return [P(
|
|
397
|
+
const u = n != null && n.cloneDiffValues ? O(t) : t;
|
|
398
|
+
return [P(u)];
|
|
399
399
|
}
|
|
400
400
|
if (typeof e !== typeof t || e instanceof Date != t instanceof Date || e instanceof RegExp != t instanceof RegExp || Array.isArray(e) !== Array.isArray(t)) {
|
|
401
|
-
const
|
|
402
|
-
return [P(
|
|
401
|
+
const u = n != null && n.cloneDiffValues ? O(e) : e, c = n != null && n.cloneDiffValues ? O(t) : t;
|
|
402
|
+
return [P(u), P(c)];
|
|
403
403
|
}
|
|
404
404
|
if (Array.isArray(e) && Array.isArray(t))
|
|
405
405
|
return lt(e, t, n);
|
|
406
406
|
if (R(e) && R(t))
|
|
407
407
|
return dt(e, t, n);
|
|
408
|
-
const
|
|
409
|
-
return [P(
|
|
408
|
+
const a = n != null && n.cloneDiffValues ? O(e) : e, l = n != null && n.cloneDiffValues ? O(t) : t;
|
|
409
|
+
return [P(a), P(l)];
|
|
410
410
|
}
|
|
411
411
|
function ft(e, t, n) {
|
|
412
412
|
return J(e, t, n);
|
|
413
413
|
}
|
|
414
414
|
function mt(e, t, n) {
|
|
415
415
|
const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
416
|
-
for (const
|
|
417
|
-
if (
|
|
418
|
-
const c = parseInt(
|
|
416
|
+
for (const u in t) {
|
|
417
|
+
if (u === "_t" || !u.startsWith("_")) continue;
|
|
418
|
+
const c = parseInt(u.slice(1)), i = t[u];
|
|
419
419
|
Array.isArray(i) && (i.length === 3 && i[2] === M ? o.add(c) : i.length === 3 && i[2] === F && r.set(c, i[1]));
|
|
420
420
|
}
|
|
421
|
-
const
|
|
421
|
+
const a = [];
|
|
422
422
|
let l = 0;
|
|
423
|
-
for (let
|
|
424
|
-
const c =
|
|
423
|
+
for (let u = 0; ; u++) {
|
|
424
|
+
const c = u.toString(), i = t[c];
|
|
425
425
|
if (i !== void 0)
|
|
426
426
|
if (Array.isArray(i) && i.length === 1)
|
|
427
|
-
|
|
427
|
+
a.push(i[0]);
|
|
428
428
|
else {
|
|
429
429
|
for (; l < e.length && o.has(l); )
|
|
430
430
|
l++;
|
|
431
|
-
l < e.length && (
|
|
431
|
+
l < e.length && (a.push(Y(e[l], i)), l++);
|
|
432
432
|
}
|
|
433
433
|
else {
|
|
434
434
|
let f = !1;
|
|
435
435
|
for (const [h, m] of r.entries())
|
|
436
|
-
if (m ===
|
|
437
|
-
|
|
436
|
+
if (m === u) {
|
|
437
|
+
a.push(e[h]), f = !0;
|
|
438
438
|
break;
|
|
439
439
|
}
|
|
440
440
|
if (!f) {
|
|
441
441
|
for (; l < e.length && (o.has(l) || r.has(l)); )
|
|
442
442
|
l++;
|
|
443
443
|
if (l < e.length)
|
|
444
|
-
|
|
444
|
+
a.push(e[l]), l++;
|
|
445
445
|
else
|
|
446
446
|
break;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return a;
|
|
451
451
|
}
|
|
452
452
|
function vt(e, t, n) {
|
|
453
453
|
const o = { ...e };
|
|
454
454
|
for (const r in t) {
|
|
455
|
-
const
|
|
456
|
-
Array.isArray(
|
|
455
|
+
const a = t[r];
|
|
456
|
+
Array.isArray(a) ? a.length === 1 ? o[r] = a[0] : a.length === 3 && a[2] === M ? delete o[r] : a.length === 2 && (o[r] = a[1]) : o[r] = Y(o[r], a);
|
|
457
457
|
}
|
|
458
458
|
return o;
|
|
459
459
|
}
|
|
@@ -482,8 +482,8 @@ function yt(e) {
|
|
|
482
482
|
if (r.length === 3 && r[2] === M)
|
|
483
483
|
t[o] = [r[0]];
|
|
484
484
|
else if (r.length === 3 && r[2] === F) {
|
|
485
|
-
const
|
|
486
|
-
t[`_${
|
|
485
|
+
const a = r[1];
|
|
486
|
+
t[`_${a}`] = [r[0], o, F];
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
} else {
|
|
@@ -491,8 +491,8 @@ function yt(e) {
|
|
|
491
491
|
if (Array.isArray(r) && r.length === 1)
|
|
492
492
|
t[`_${o}`] = [r[0], M, M];
|
|
493
493
|
else {
|
|
494
|
-
const
|
|
495
|
-
|
|
494
|
+
const a = Q(r);
|
|
495
|
+
a !== void 0 && (t[n] = a);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
return t;
|
|
@@ -504,13 +504,13 @@ function ht(e) {
|
|
|
504
504
|
if (Array.isArray(o))
|
|
505
505
|
o.length === 1 ? t[n] = [o[0], M, M] : o.length === 3 && o[2] === M ? t[n] = [o[0]] : o.length === 2 && (t[n] = [o[1], o[0]]);
|
|
506
506
|
else {
|
|
507
|
-
const r =
|
|
507
|
+
const r = Q(o);
|
|
508
508
|
r !== void 0 && (t[n] = r);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return t;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Q(e) {
|
|
514
514
|
if (e !== void 0) {
|
|
515
515
|
if (Array.isArray(e)) {
|
|
516
516
|
if (e.length === 1)
|
|
@@ -526,7 +526,7 @@ function X(e) {
|
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
function de(e) {
|
|
529
|
-
return
|
|
529
|
+
return Q(e);
|
|
530
530
|
}
|
|
531
531
|
function pt(e, t, n) {
|
|
532
532
|
const o = de(t);
|
|
@@ -566,14 +566,14 @@ function St({
|
|
|
566
566
|
includeValueOnMove: !1
|
|
567
567
|
},
|
|
568
568
|
cloneDiffValues: !1
|
|
569
|
-
}), n =
|
|
569
|
+
}), n = N(null), o = N([]), r = G(-1), a = N(null), l = S(() => r.value > 0), u = S(() => r.value < o.value.length - 1);
|
|
570
570
|
function c(v) {
|
|
571
571
|
if (n.value === null) {
|
|
572
|
-
n.value = I(v),
|
|
572
|
+
n.value = I(v), a.value = I(v), o.value = [{ delta: null }], r.value = 0;
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
|
-
const p = t.diff(
|
|
576
|
-
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++,
|
|
575
|
+
const p = t.diff(a.value, v);
|
|
576
|
+
if (r.value < o.value.length - 1 && (o.value = o.value.slice(0, r.value + 1)), o.value.push({ delta: p }), r.value++, a.value = I(v), o.value.length > e) {
|
|
577
577
|
const b = o.value[1].delta;
|
|
578
578
|
b && n.value && (n.value = t.patch(I(n.value), b)), o.value.shift(), r.value--;
|
|
579
579
|
}
|
|
@@ -592,23 +592,23 @@ function St({
|
|
|
592
592
|
if (l.value) {
|
|
593
593
|
r.value--;
|
|
594
594
|
const v = i(r.value);
|
|
595
|
-
return v && (
|
|
595
|
+
return v && (a.value = I(v)), v;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
function h() {
|
|
599
|
-
if (
|
|
599
|
+
if (u.value) {
|
|
600
600
|
r.value++;
|
|
601
601
|
const v = i(r.value);
|
|
602
|
-
return v && (
|
|
602
|
+
return v && (a.value = I(v)), v;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function m() {
|
|
606
|
-
n.value = null,
|
|
606
|
+
n.value = null, a.value = null, o.value = [], r.value = -1;
|
|
607
607
|
}
|
|
608
608
|
return {
|
|
609
609
|
push: c,
|
|
610
610
|
canUndo: l,
|
|
611
|
-
canRedo:
|
|
611
|
+
canRedo: u,
|
|
612
612
|
undo: f,
|
|
613
613
|
redo: h,
|
|
614
614
|
clear: m
|
|
@@ -616,7 +616,7 @@ function St({
|
|
|
616
616
|
}
|
|
617
617
|
const bt = {
|
|
618
618
|
async updateMenuModule(e, t) {
|
|
619
|
-
const n =
|
|
619
|
+
const n = z.RequestRunner.operation(t, e.modules);
|
|
620
620
|
if (n.validateError.length > 0)
|
|
621
621
|
throw new Error(n.validateError.join(`
|
|
622
622
|
`));
|
|
@@ -667,15 +667,15 @@ function wt() {
|
|
|
667
667
|
const Pt = Ye(
|
|
668
668
|
"mf-menu-store-v2",
|
|
669
669
|
() => {
|
|
670
|
-
const e =
|
|
670
|
+
const e = Qe(wt()), t = se(), n = et(), o = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
|
|
671
671
|
selector: "position"
|
|
672
672
|
}) : []), r = S(() => {
|
|
673
673
|
var s;
|
|
674
674
|
return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || B.F_MENU_VERSION.v3;
|
|
675
|
-
}),
|
|
675
|
+
}), a = S(() => r.value === B.F_MENU_VERSION.v4), l = S(() => {
|
|
676
676
|
const s = e.menu.modules.catalog;
|
|
677
677
|
return x(s, { selector: "name" });
|
|
678
|
-
}),
|
|
678
|
+
}), u = S(() => {
|
|
679
679
|
var d;
|
|
680
680
|
let s = e.menu.modules.catalog.find(
|
|
681
681
|
(y) => y._id === e.currentCatalogId
|
|
@@ -692,14 +692,14 @@ const Pt = Ye(
|
|
|
692
692
|
function f(s, d = !0) {
|
|
693
693
|
e.menu = { ...s, _rev: e.menu._rev }, d && D.push(e.menu);
|
|
694
694
|
}
|
|
695
|
-
const h =
|
|
695
|
+
const h = N(fe()), m = G(!1), v = G(1);
|
|
696
696
|
async function p() {
|
|
697
697
|
var y;
|
|
698
698
|
m.value = !0;
|
|
699
699
|
let s = e.menu.modules.catalog;
|
|
700
|
-
if (
|
|
700
|
+
if (u.value && ((y = u.value.linkItemRules) != null && y.length)) {
|
|
701
701
|
const g = T.populateCatalog({
|
|
702
|
-
catalog:
|
|
702
|
+
catalog: u.value,
|
|
703
703
|
ruleGroupSettings: e.menu.ruleGroupSettings,
|
|
704
704
|
items: e.menu.modules.item,
|
|
705
705
|
...e.currentRestaurantAttrParams ?? {}
|
|
@@ -719,25 +719,25 @@ const Pt = Ye(
|
|
|
719
719
|
);
|
|
720
720
|
if (e.currentSchedulerId != null) {
|
|
721
721
|
const g = e.menu.modules.catalog.find(
|
|
722
|
-
(
|
|
722
|
+
(k) => k._id === e.currentCatalogId
|
|
723
723
|
), _ = g ? g.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
|
|
724
|
-
(
|
|
725
|
-
), A = new Set(((_ == null ? void 0 : _.items) || []).map((
|
|
726
|
-
d.modules.item = d.modules.item.filter((
|
|
724
|
+
(k) => k._id === e.currentSchedulerId
|
|
725
|
+
), A = new Set(((_ == null ? void 0 : _.items) || []).map((k) => k._id));
|
|
726
|
+
d.modules.item = d.modules.item.filter((k) => A.has(k._id));
|
|
727
727
|
}
|
|
728
728
|
return h.value = d, m.value = !1, v.value = v.value + 1, d;
|
|
729
729
|
}
|
|
730
730
|
const w = ie.debounce(p, 200);
|
|
731
|
-
let C = null,
|
|
732
|
-
function
|
|
733
|
-
|
|
731
|
+
let C = null, E = null;
|
|
732
|
+
function X() {
|
|
733
|
+
E && (E(), E = null), C && C.stop(), C = Xe(!0), E = C.run(() => Ze(
|
|
734
734
|
() => [e.menu, e.currentCatalogId, e.currentSchedulerId],
|
|
735
735
|
() => {
|
|
736
736
|
m.value || w();
|
|
737
737
|
}
|
|
738
738
|
)) || null;
|
|
739
739
|
}
|
|
740
|
-
|
|
740
|
+
X();
|
|
741
741
|
const me = S(() => [
|
|
742
742
|
{
|
|
743
743
|
label: "Main",
|
|
@@ -765,14 +765,14 @@ const Pt = Ye(
|
|
|
765
765
|
}), ee = S(() => {
|
|
766
766
|
var d;
|
|
767
767
|
let s = h.value.modules.item;
|
|
768
|
-
if (
|
|
769
|
-
const y = (d =
|
|
768
|
+
if (u.value) {
|
|
769
|
+
const y = (d = u.value) == null ? void 0 : d.override.items;
|
|
770
770
|
s = s.filter((g) => {
|
|
771
771
|
var A;
|
|
772
772
|
const _ = (A = y == null ? void 0 : y[g._id]) == null ? void 0 : A.find(
|
|
773
|
-
(
|
|
773
|
+
(k) => !k.combinationKey
|
|
774
774
|
);
|
|
775
|
-
return (_ == null ? void 0 : _.orderFrom) !==
|
|
775
|
+
return (_ == null ? void 0 : _.orderFrom) !== ae.F_ORDER_FROM.enum.NONE;
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
778
|
return V(s, (y) => y.code || y.name);
|
|
@@ -785,7 +785,7 @@ const Pt = Ye(
|
|
|
785
785
|
y,
|
|
786
786
|
(g) => g.code || g.name
|
|
787
787
|
).reduce((g, _, A) => (g[_._id] = A + d[_.category || ""], g), {});
|
|
788
|
-
}), he = S(() => oe(
|
|
788
|
+
}), he = S(() => oe(j.value, Z.value, ee.value)), pe = S(() => {
|
|
789
789
|
const s = U.value.item.addon ? [
|
|
790
790
|
{
|
|
791
791
|
_id: e.currentCatalogId ? "" : null,
|
|
@@ -799,12 +799,12 @@ const Pt = Ye(
|
|
|
799
799
|
s,
|
|
800
800
|
e.menu.modules.item
|
|
801
801
|
);
|
|
802
|
-
}),
|
|
802
|
+
}), j = S(() => {
|
|
803
803
|
const s = h.value.modules.variant;
|
|
804
804
|
return x(s, { selector: "name" });
|
|
805
805
|
});
|
|
806
806
|
function ge(s = []) {
|
|
807
|
-
const d = s.map((g) =>
|
|
807
|
+
const d = s.map((g) => j.value.find((_) => _._id === g)).filter((g) => !!g);
|
|
808
808
|
return T.fullVariantCombination(d).reduce((g, _) => (g[_.combinationKey] = _.selectionName.join(" / "), g), {});
|
|
809
809
|
}
|
|
810
810
|
const _e = S(() => V(h.value.modules.group, (s) => s.name)), Se = S(() => x(h.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
|
|
@@ -890,15 +890,15 @@ const Pt = Ye(
|
|
|
890
890
|
const [d, y] = s.split("/");
|
|
891
891
|
return { systemCode: d, taxCode: y };
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function Ee(s, d, y) {
|
|
894
894
|
return (s ?? d ?? []).map((g) => W(g)).find((g) => y.some((_) => _.value === g));
|
|
895
895
|
}
|
|
896
896
|
const Re = S(() => {
|
|
897
897
|
var g;
|
|
898
|
-
const s = ["SV5", "SV10"], d =
|
|
898
|
+
const s = ["SV5", "SV10"], d = qe.Country.getCountryFlattenTaxes(
|
|
899
899
|
se().currentCountry.value
|
|
900
|
-
), y = d.filter((_) =>
|
|
901
|
-
label: `${_.name} (${
|
|
900
|
+
), y = d.filter((_) => a.value || !s.includes(_.taxCode)).map((_) => ({
|
|
901
|
+
label: `${_.name} (${ze(_.rate)}%)`,
|
|
902
902
|
value: W(_),
|
|
903
903
|
meta: {
|
|
904
904
|
rate: _.rate
|
|
@@ -908,7 +908,7 @@ const Pt = Ye(
|
|
|
908
908
|
systemCode: (g = d[0]) == null ? void 0 : g.systemCode,
|
|
909
909
|
countryTaxOptions: y
|
|
910
910
|
};
|
|
911
|
-
}),
|
|
911
|
+
}), ke = async () => {
|
|
912
912
|
const s = await Je.readMenu();
|
|
913
913
|
e.menu = s ?? e.menu, te(null);
|
|
914
914
|
}, xe = async () => {
|
|
@@ -936,9 +936,9 @@ const Pt = Ye(
|
|
|
936
936
|
}));
|
|
937
937
|
try {
|
|
938
938
|
if (d || g.some(
|
|
939
|
-
(A) => [
|
|
939
|
+
(A) => [z.F_OPERATION_TYPE.delete, z.F_OPERATION_TYPE.deleteMany].includes(A.operation)
|
|
940
940
|
)) {
|
|
941
|
-
const A = await
|
|
941
|
+
const A = await Ge(g, e.menu.modules);
|
|
942
942
|
if (A !== !0) throw new Error(A);
|
|
943
943
|
}
|
|
944
944
|
const _ = await bt.updateMenuModule(e.menu, g);
|
|
@@ -961,10 +961,10 @@ const Pt = Ye(
|
|
|
961
961
|
}, D = St({ maxHistorySize: 50 }), Ke = S(() => D.canUndo.value), Pe = S(() => D.canRedo.value), $e = () => {
|
|
962
962
|
const s = D.undo();
|
|
963
963
|
s && f(s, !1);
|
|
964
|
-
},
|
|
964
|
+
}, Ne = () => {
|
|
965
965
|
const s = D.redo();
|
|
966
966
|
s && f(s, !1);
|
|
967
|
-
},
|
|
967
|
+
}, je = () => {
|
|
968
968
|
D.clear();
|
|
969
969
|
};
|
|
970
970
|
return {
|
|
@@ -976,10 +976,10 @@ const Pt = Ye(
|
|
|
976
976
|
mergedMenu: h,
|
|
977
977
|
// Computed
|
|
978
978
|
version: r,
|
|
979
|
-
isV4:
|
|
979
|
+
isV4: a,
|
|
980
980
|
serveSequence: o,
|
|
981
981
|
catalogs: l,
|
|
982
|
-
currentCatalog:
|
|
982
|
+
currentCatalog: u,
|
|
983
983
|
schedulers: c,
|
|
984
984
|
currentScheduler: i,
|
|
985
985
|
catalogOptions: me,
|
|
@@ -989,7 +989,7 @@ const Pt = Ye(
|
|
|
989
989
|
sortedItems: ye,
|
|
990
990
|
categorizedItems: he,
|
|
991
991
|
categorizedRawMenuItems: pe,
|
|
992
|
-
variants:
|
|
992
|
+
variants: j,
|
|
993
993
|
groups: _e,
|
|
994
994
|
takeaways: Se,
|
|
995
995
|
printDepartments: be,
|
|
@@ -1001,7 +1001,7 @@ const Pt = Ye(
|
|
|
1001
1001
|
taxSetting: Re,
|
|
1002
1002
|
// Action
|
|
1003
1003
|
setMenu: f,
|
|
1004
|
-
readMenu:
|
|
1004
|
+
readMenu: ke,
|
|
1005
1005
|
readRestaurants: xe,
|
|
1006
1006
|
selectCatalog: te,
|
|
1007
1007
|
selectScheduler: Oe,
|
|
@@ -1013,19 +1013,19 @@ const Pt = Ye(
|
|
|
1013
1013
|
// helper
|
|
1014
1014
|
encodeTax: W,
|
|
1015
1015
|
decodeTax: Ce,
|
|
1016
|
-
getSelectedTax:
|
|
1016
|
+
getSelectedTax: Ee,
|
|
1017
1017
|
mapVariant: ge,
|
|
1018
1018
|
// history
|
|
1019
1019
|
canUndoHistory: Ke,
|
|
1020
1020
|
canRedoHistory: Pe,
|
|
1021
1021
|
undoHistory: $e,
|
|
1022
|
-
redoHistory:
|
|
1022
|
+
redoHistory: Ne,
|
|
1023
1023
|
// cleanup
|
|
1024
1024
|
$dispose: () => {
|
|
1025
|
-
w.cancel(),
|
|
1025
|
+
w.cancel(), E && (E(), E = null), C && (C.stop(), C = null), je();
|
|
1026
1026
|
},
|
|
1027
1027
|
$reinitialize: () => {
|
|
1028
|
-
|
|
1028
|
+
X();
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
@@ -1037,6 +1037,6 @@ export {
|
|
|
1037
1037
|
Kt as f,
|
|
1038
1038
|
Dt as g,
|
|
1039
1039
|
Ot as m,
|
|
1040
|
-
|
|
1040
|
+
at as o,
|
|
1041
1041
|
Pt as u
|
|
1042
1042
|
};
|