@feedmepos/mf-menu 0.32.4 → 0.32.5-dev

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.
Files changed (69) hide show
  1. package/dist/{App-Cl2SSoiw.js → App-BkTG-S_D.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BgJucirp.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BAJwlpKF.js} +3 -3
  3. package/dist/{Catalog-C8Q0B2C8.js → Catalog-D3AjmpQW.js} +6 -6
  4. package/dist/{Category-gjOVtW9q.js → Category-CB8u2mLd.js} +4 -4
  5. package/dist/{Category-zmdzRTZE.js → Category-DJZL4oW1.js} +6 -6
  6. package/dist/{CookingGuide-BV2JxsLA.js → CookingGuide-D_H0E1UL.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DTnI7QeB.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DL_mMzvm.js} +1 -1
  8. package/dist/{Group-BopSKuXZ.js → Group-CPbAWng8.js} +3 -3
  9. package/dist/{Group-C3igOe0l.js → Group-DRpdcgb5.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-CHfVlzzI.js → Group.vue_vue_type_script_setup_true_lang-CpFqmZLv.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CX2NqlK3.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DN4WPovc.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-JuOs7w9n.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C1cOJzRJ.js} +3127 -3127
  13. package/dist/{Ingredient-CYnVkFwm.js → Ingredient-DFN1Q_DH.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Dn7AA-v5.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BZSUpCCc.js} +2 -2
  15. package/dist/{LinkProductSideSheet-TWDPTDar.js → LinkProductSideSheet-CrTJls-E.js} +3 -3
  16. package/dist/{MenuSetting-DsPd_yYY.js → MenuSetting-B-qvsw9m.js} +5 -5
  17. package/dist/{PrintRoute-DyIaupKH.js → PrintRoute-DG-harlq.js} +4 -4
  18. package/dist/{Product-CWxadpao.js → Product-CoE8fN_i.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-isQdXX-D.js → Product.vue_vue_type_script_setup_true_lang-WuV_5yZy.js} +13 -13
  20. package/dist/{ProductInternalTools-QTKMFdXW.js → ProductInternalTools-Dw1rurxz.js} +6 -6
  21. package/dist/{Products-DeJJR3Jw.js → Products-Dzo9x3rb.js} +11 -11
  22. package/dist/{Publish-C0nfHjTY.js → Publish-cUAjf-la.js} +3 -3
  23. package/dist/{Recipe-BZ1ti5Qy.js → Recipe-B9u2mniS.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CrOz9WgF.js → RuleView.vue_vue_type_script_setup_true_lang-sQoi3Evm.js} +495 -495
  25. package/dist/{Scheduler-QRb1c9wT.js → Scheduler-ta9KxSw4.js} +3 -3
  26. package/dist/{ServingSequence-Dpp5VSBL.js → ServingSequence-DBdgNjaR.js} +3 -3
  27. package/dist/{Setting-CfxeKyj_.js → Setting-BhjVP5HN.js} +5 -5
  28. package/dist/{Subcategory-Csw9JAX7.js → Subcategory-ByFTubCV.js} +4 -4
  29. package/dist/{Takeaway-TQ6GTG_s.js → Takeaway-BhDbBM7c.js} +1 -1
  30. package/dist/{Takeaway-C5weNVhi.js → Takeaway-DbbGC1RR.js} +4 -4
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-SQCoP3Xg.js → Takeaway.vue_vue_type_script_setup_true_lang-Bl6dLRWp.js} +5 -5
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DK8FPhBM.js → Thumbnail.vue_vue_type_script_setup_true_lang-B2rrFgn7.js} +4 -4
  33. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D6TlEys_.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ChWn8Iz8.js} +15 -15
  34. package/dist/{Unit-BADJL6JT.js → Unit-C6kbGM_o.js} +2 -2
  35. package/dist/{Variant-_BEgR7EY.js → Variant-DiRB_O9O.js} +3 -3
  36. package/dist/{_id_-BgU8CUzB.js → _id_-EK3HS1xZ.js} +10 -10
  37. package/dist/{app-vN6h029p.js → app-D45eQVIw.js} +1 -1
  38. package/dist/{app-Bz4tNDlz.js → app-DRtcvrLb.js} +31 -31
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/app.d.ts +0 -5
  41. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/assets/linked-status-DosHQd4O.js +13 -0
  43. package/dist/assets/override-menu-CE5JHU9w.js +13 -0
  44. package/dist/assets/validate-menu-DQpq9NzF.js +13 -0
  45. package/dist/{catalog-rkbC7YvQ.js → catalog-D2mG2yV0.js} +1 -1
  46. package/dist/{catalogSetting-_q7-2iJB.js → catalogSetting-DcAbjzNh.js} +1 -1
  47. package/dist/{category-C7djXZ8u.js → category-BHLh2vQx.js} +1 -1
  48. package/dist/{currency-D6fj4gft.js → currency-DEczKOMb.js} +1 -1
  49. package/dist/{index-B_EoIYyp.js → index-BFaN2-ZW.js} +1 -1
  50. package/dist/{index-CRrcZyox.js → index-B_4CEHWY.js} +4 -4
  51. package/dist/{index-LHTfIDr6.js → index-CIeyjRi7.js} +1 -1
  52. package/dist/{index-C4BTXKBR.js → index-iuTPN4W9.js} +3 -3
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-Bscs8TwQ.js → index.vue_vue_type_script_setup_true_lang-D7GP-ih7.js} +46232 -45951
  54. package/dist/item-CdCRUyFQ.js +6809 -0
  55. package/dist/{iteration-QOguyqlt.js → iteration-DW3EKOev.js} +1 -1
  56. package/dist/{jszip.min-DWXk2rBs.js → jszip.min-BcGrQEg5.js} +2 -2
  57. package/dist/{menu-DMD-qKXH.js → menu-B26VpdxF.js} +1 -1
  58. package/dist/{menuV2-BtbCnS5e.js → menuV2-DK1xVyHX.js} +151 -151
  59. package/dist/mf-menu.css +1 -1
  60. package/dist/{priceTier-DzjN6Rbm.js → priceTier-DTw3WpLI.js} +1 -1
  61. package/dist/{scheduler-DfVZ3cpl.js → scheduler-BRQvTrjx.js} +4 -4
  62. package/dist/{subcategory-oc0Gsg_Y.js → subcategory-b8_-T8Ao.js} +2 -2
  63. package/dist/{toExcel-BUaSvyLK.js → toExcel-Dt3HfJP9.js} +2 -2
  64. package/dist/{unit-DOraYsc1.js → unit-CduremJw.js} +2 -2
  65. package/package.json +2 -3
  66. package/dist/assets/linked-status-MG_lfeIJ.js +0 -13
  67. package/dist/assets/override-menu-BpSpdmH9.js +0 -13
  68. package/dist/assets/validate-menu--58To05g.js +0 -13
  69. package/dist/item-V5kNSHAx.js +0 -7648
@@ -1,24 +1,24 @@
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 { ao as ue, H as I, B as T, z as ae, ap as re, J as G, I as ie, ac as x, c as L, X as D, am as oe, aq as Le, ar as qe, A as ze, ae as Ge, as as He, at as Be, ab as Je } from "./index.vue_vue_type_script_setup_true_lang-Bscs8TwQ.js";
4
+ import { ao as ue, H as C, B as T, z as ae, ap as re, J as z, I as ie, ac as x, c as H, X as V, am as oe, aq as He, ar as Le, A as qe, ae as ze, as as Ge, at as Be, ab as Je } from "./index.vue_vue_type_script_setup_true_lang-D7GP-ih7.js";
5
5
  import { defineStore as Ye } from "pinia";
6
- import { shallowRef as j, ref as H, computed as S, shallowReactive as Xe, effectScope as Qe, watch as Ze } from "vue";
6
+ import { shallowRef as j, 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-MG_lfeIJ.js", nt = "/assets/override-menu-BpSpdmH9.js";
9
+ const tt = "/assets/linked-status-DosHQd4O.js", nt = "/assets/override-menu-CE5JHU9w.js";
10
10
  function rt(e) {
11
11
  var o;
12
- const t = I(e), n = (o = t.variant) == null ? void 0 : o.variantCombinations;
12
+ const t = C(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), 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
- function p(m = []) {
18
- const v = e.map((h) => h._id);
16
+ const r = C(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 ? C(a) : void 0, c = n ? r.modules.catalog.filter((m) => m._id !== n) : [], i = l ? C(l) : void 0, f = e.reduce((m, v) => (m[v._id] = rt(v), m), {});
17
+ function h(m = []) {
18
+ const v = e.map((p) => p._id);
19
19
  return [
20
- ...m.filter((h) => !v.includes(h._id)),
21
- ...Object.values(f).flatMap((h) => h)
20
+ ...m.filter((p) => !v.includes(p._id)),
21
+ ...Object.values(f).flatMap((p) => p)
22
22
  ];
23
23
  }
24
24
  return u && o ? (u.override.scheduler = {
@@ -26,7 +26,7 @@ function ot(e, t, n, o) {
26
26
  [o]: {
27
27
  ...u.override.scheduler[o],
28
28
  _id: o,
29
- items: p(i == null ? void 0 : i.items).map((m) => ({
29
+ items: h(i == null ? void 0 : i.items).map((m) => ({
30
30
  ...m,
31
31
  orderFrom: ae.F_ORDER_FROM.enum.ALL
32
32
  }))
@@ -34,7 +34,7 @@ function ot(e, t, n, o) {
34
34
  }, r.modules.catalog = [...c, u], r) : u ? (u.override.items = {
35
35
  ...u.override.items,
36
36
  ...f
37
- }, r.modules.catalog = [...c, u], r) : i ? (i.items = p(i.items), r.modules.scheduler = [
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) : {
@@ -56,16 +56,16 @@ function $(e, t, n) {
56
56
  if (!o)
57
57
  throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
58
58
  const r = (a = o.groups) == null ? void 0 : a.map((l) => {
59
- var i, f, p;
59
+ var i, f, h;
60
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
62
  return u ? c = ((f = l.items) == null ? void 0 : f.map((m) => {
63
- var h;
64
- const v = (h = u.items) == null ? void 0 : h.find(
63
+ var 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);
68
- })) ?? [] : c = ((p = l.items) == null ? void 0 : p.map((m) => $(m, t, n + 1))) ?? [], {
68
+ })) ?? [] : c = ((h = l.items) == null ? void 0 : h.map((m) => $(m, t, n + 1))) ?? [], {
69
69
  ...l,
70
70
  items: c
71
71
  };
@@ -81,8 +81,8 @@ function $(e, t, n) {
81
81
  function st(e, t) {
82
82
  const n = e.groups.map((a) => {
83
83
  const l = t.modules.group.find((c) => c._id === a._id), u = ((l == null ? void 0 : l.items) || []).map((c) => {
84
- var p;
85
- const i = (p = a.items) == null ? void 0 : p.find(
84
+ var 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)
@@ -115,7 +115,7 @@ function B(e, t) {
115
115
  return r.items = (u = r.items) == null ? void 0 : u.map((c) => {
116
116
  var f;
117
117
  const i = (f = a == null ? void 0 : a.items) == null ? void 0 : f.find(
118
- (p) => p._id === c._id && p.combinationKey === c.combinationKey
118
+ (h) => h._id === c._id && h.combinationKey === c.combinationKey
119
119
  );
120
120
  return B(c, i);
121
121
  }), r;
@@ -153,24 +153,24 @@ function ut(e, t) {
153
153
  };
154
154
  }
155
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((p, m) => (p[m._id] = u.modules.item.find((v) => v._id === m._id), p), {}), i = t.reduce((p, m) => {
156
+ const l = C(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
- return p[v] = st(c[v], e), p;
158
+ return h[v] = st(c[v], e), h;
159
159
  }, {}), f = T.getFallbackPrices({
160
160
  rawMenu: u,
161
161
  items: i,
162
162
  catalogId: o || void 0,
163
163
  schedulerId: r
164
164
  });
165
- return t.map((p) => {
166
- const m = p._id, v = c[m];
165
+ return t.map((h) => {
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
  });
172
172
  }
173
- function Vt(e, t) {
173
+ function Dt(e, t) {
174
174
  if (e.length === 0) return "";
175
175
  const n = e == null ? void 0 : e.split("variant");
176
176
  return ((n == null ? void 0 : n.reduce((r, a) => {
@@ -183,11 +183,11 @@ function Vt(e, t) {
183
183
  return r;
184
184
  }, [])) || []).join(" / ");
185
185
  }
186
- const q = /* @__PURE__ */ new Map();
187
- async function Dt(e, t) {
186
+ const L = /* @__PURE__ */ new Map();
187
+ async function Vt(e, t) {
188
188
  const n = `${e._id}-${e.updatedAt}-${t}`;
189
- if (q.has(n))
190
- return q.get(n);
189
+ if (L.has(n))
190
+ return L.get(n);
191
191
  const o = await ue(
192
192
  tt,
193
193
  JSON.stringify({
@@ -195,7 +195,7 @@ async function Dt(e, t) {
195
195
  itemId: t
196
196
  })
197
197
  );
198
- return q.set(n, o), o;
198
+ return L.set(n, o), o;
199
199
  }
200
200
  async function ce(e, t, n) {
201
201
  return await ue(nt, {
@@ -234,30 +234,30 @@ function Ft(e, t, n) {
234
234
  }
235
235
  return r(t, n);
236
236
  }
237
- const z = /* @__PURE__ */ new Map();
237
+ const q = /* @__PURE__ */ new Map();
238
238
  async function at(e, t, n) {
239
239
  const o = `${e._id}-${e.updatedAt}-${t || "null"}-${n || "null"}`;
240
- if (z.has(o))
241
- return z.get(o);
240
+ if (q.has(o))
241
+ return q.get(o);
242
242
  const r = await ce(e, t, n);
243
- return z.set(o, r), r;
243
+ return q.set(o, r), r;
244
244
  }
245
245
  async function Kt(e, t, n) {
246
246
  var l, u;
247
247
  const o = await at(e, t, null), r = [], a = (c, i) => {
248
- const f = I(c);
249
- for (const p in i)
250
- i[p] && (f[p] = i[p]);
248
+ const f = C(c);
249
+ for (const h in i)
250
+ i[h] && (f[h] = i[h]);
251
251
  return f;
252
252
  };
253
253
  for (const c of o.modules.group) {
254
- const i = (l = c.items) == null ? void 0 : l.find((p) => p._id === n && !p.combinationKey), f = e.modules.item.find((p) => p._id === n);
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 p = (u = c.items) == null ? void 0 : u.filter((v) => v._id === n && v.combinationKey), m = [i, ...p].map((v) => {
257
- var w, C;
258
- const h = v.combinationKey ? (C = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : C.find(
259
- (R) => R.combinationKey === v.combinationKey
260
- ) : f, b = h && f ? a(f, h) : v;
256
+ const h = (u = c.items) == null ? void 0 : u.filter((v) => v._id === n && v.combinationKey), m = [i, ...h].map((v) => {
257
+ var w, I;
258
+ const p = v.combinationKey ? (I = (w = f == null ? void 0 : f.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : I.find(
259
+ (E) => E.combinationKey === v.combinationKey
260
+ ) : f, b = p && f ? a(f, p) : v;
261
261
  return a(b, v);
262
262
  });
263
263
  r.push({
@@ -294,7 +294,7 @@ function O(e) {
294
294
  function P(e) {
295
295
  return e instanceof RegExp ? e.toString() : e;
296
296
  }
297
- function k(e) {
297
+ function R(e) {
298
298
  return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
299
299
  }
300
300
  function K(e, t) {
@@ -310,7 +310,7 @@ function K(e, t) {
310
310
  if (!K(e[n], t[n])) return !1;
311
311
  return !0;
312
312
  }
313
- if (k(e) && k(t)) {
313
+ if (R(e) && R(t)) {
314
314
  const n = Object.keys(e), o = Object.keys(t);
315
315
  if (n.length !== o.length) return !1;
316
316
  for (const r of n)
@@ -327,9 +327,9 @@ function ct(e, t, n) {
327
327
  }
328
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), p = a.get(f);
331
- if (p) {
332
- for (const m of p)
330
+ const i = e[c], f = n ? n(i) : JSON.stringify(i), h = a.get(f);
331
+ if (h) {
332
+ for (const m of h)
333
333
  if (!u.has(m) && K(i, t[m])) {
334
334
  l.push({ leftIndex: c, rightIndex: m }), u.add(m);
335
335
  break;
@@ -344,34 +344,34 @@ function lt(e, t, n) {
344
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
345
  let u = r ? ct(e, t, l) : [];
346
346
  if (!l && e.length === t.length && e.length > 0 && u.length < e.length) {
347
- const h = k(e[0]) || Array.isArray(e[0]), b = u.length > 0;
348
- if (h || b) {
347
+ const p = R(e[0]) || Array.isArray(e[0]), b = u.length > 0;
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(u.map((h) => h.leftIndex));
355
- const c = new Set(u.map((h) => h.rightIndex)), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
356
- for (const h of u)
357
- i.set(h.leftIndex, h.rightIndex), f.set(h.rightIndex, h.leftIndex);
358
- for (let h = 0; h < e.length; h++) {
359
- const b = i.get(h);
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
+ i.set(p.leftIndex, p.rightIndex), f.set(p.rightIndex, p.leftIndex);
358
+ for (let p = 0; p < e.length; p++) {
359
+ const b = i.get(p);
360
360
  if (b !== void 0) {
361
- const w = J(e[h], t[b], n);
362
- if (w !== void 0 && (o[b] = w), r && b !== h) {
363
- const C = `_${h}`, R = a ? [e[h], b, F] : ["", b, F];
364
- o[C] = R;
361
+ const w = J(e[p], t[b], n);
362
+ if (w !== void 0 && (o[b] = w), r && b !== p) {
363
+ const I = `_${p}`, E = a ? [e[p], b, F] : ["", b, F];
364
+ o[I] = E;
365
365
  }
366
366
  } else {
367
- const w = `_${h}`;
368
- o[w] = [e[h], M, M];
367
+ const w = `_${p}`;
368
+ o[w] = [e[p], M, M];
369
369
  }
370
370
  }
371
- for (let h = 0; h < t.length; h++)
372
- c.has(h) || (o[h] = [t[h]]);
373
- const p = Object.keys(o);
374
- if (!(p.length === 1 && p[0] === "_t"))
371
+ for (let p = 0; p < t.length; p++)
372
+ c.has(p) || (o[p] = [t[p]]);
373
+ const h = Object.keys(o);
374
+ if (!(h.length === 1 && h[0] === "_t"))
375
375
  return o;
376
376
  }
377
377
  function dt(e, t, n) {
@@ -403,7 +403,7 @@ function J(e, t, n) {
403
403
  }
404
404
  if (Array.isArray(e) && Array.isArray(t))
405
405
  return lt(e, t, n);
406
- if (k(e) && k(t))
406
+ if (R(e) && R(t))
407
407
  return dt(e, t, n);
408
408
  const a = n != null && n.cloneDiffValues ? O(e) : e, l = n != null && n.cloneDiffValues ? O(t) : t;
409
409
  return [P(a), P(l)];
@@ -432,9 +432,9 @@ function mt(e, t, n) {
432
432
  }
433
433
  else {
434
434
  let f = !1;
435
- for (const [p, m] of r.entries())
435
+ for (const [h, m] of r.entries())
436
436
  if (m === u) {
437
- a.push(e[p]), f = !0;
437
+ a.push(e[h]), f = !0;
438
438
  break;
439
439
  }
440
440
  if (!f) {
@@ -467,7 +467,7 @@ function Y(e, t, n) {
467
467
  if (t.length === 3 && t[2] === M)
468
468
  return;
469
469
  }
470
- return k(t) && t._t === "a" ? mt(e, t) : k(t) && k(e) ? vt(e, t) : e;
470
+ return R(t) && t._t === "a" ? mt(e, t) : R(t) && R(e) ? vt(e, t) : e;
471
471
  }
472
472
  function le(e, t, n) {
473
473
  return Y(e, t);
@@ -491,26 +491,26 @@ 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 a = X(r);
494
+ const a = Q(r);
495
495
  a !== void 0 && (t[n] = a);
496
496
  }
497
497
  }
498
498
  return t;
499
499
  }
500
- function pt(e) {
500
+ function ht(e) {
501
501
  const t = {};
502
502
  for (const n in e) {
503
503
  const o = e[n];
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 = X(o);
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 X(e) {
513
+ function Q(e) {
514
514
  if (e !== void 0) {
515
515
  if (Array.isArray(e)) {
516
516
  if (e.length === 1)
@@ -522,13 +522,13 @@ function X(e) {
522
522
  if (e.length === 3 && e[2] === F)
523
523
  return e;
524
524
  }
525
- return k(e) && e._t === "a" ? yt(e) : k(e) ? pt(e) : e;
525
+ return R(e) && e._t === "a" ? yt(e) : R(e) ? ht(e) : e;
526
526
  }
527
527
  }
528
528
  function de(e) {
529
- return X(e);
529
+ return Q(e);
530
530
  }
531
- function ht(e, t, n) {
531
+ function pt(e, t, n) {
532
532
  const o = de(t);
533
533
  return le(e, o);
534
534
  }
@@ -547,7 +547,7 @@ class gt {
547
547
  return de(t);
548
548
  }
549
549
  unpatch(t, n) {
550
- return ht(t, n, this.options);
550
+ return pt(t, n, this.options);
551
551
  }
552
552
  clone(t) {
553
553
  return O(t);
@@ -566,40 +566,40 @@ function St({
566
566
  includeValueOnMove: !1
567
567
  },
568
568
  cloneDiffValues: !1
569
- }), n = j(null), o = j([]), r = H(-1), a = j(null), l = S(() => r.value > 0), u = S(() => r.value < o.value.length - 1);
569
+ }), n = j(null), o = j([]), r = G(-1), a = j(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), a.value = I(v), o.value = [{ delta: null }], r.value = 0;
572
+ n.value = C(v), a.value = C(v), o.value = [{ delta: null }], r.value = 0;
573
573
  return;
574
574
  }
575
- const h = 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: h }), r.value++, a.value = I(v), o.value.length > e) {
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 = C(v), o.value.length > e) {
577
577
  const b = o.value[1].delta;
578
- b && n.value && (n.value = t.patch(I(n.value), b)), o.value.shift(), r.value--;
578
+ b && n.value && (n.value = t.patch(C(n.value), b)), o.value.shift(), r.value--;
579
579
  }
580
580
  }
581
581
  function i(v) {
582
582
  if (!n.value || v < 0 || v >= o.value.length)
583
583
  return;
584
- let h = I(n.value);
584
+ let p = C(n.value);
585
585
  for (let b = 1; b <= v; b++) {
586
586
  const w = o.value[b];
587
- w.delta && (h = t.patch(h, w.delta));
587
+ w.delta && (p = t.patch(p, w.delta));
588
588
  }
589
- return h;
589
+ return p;
590
590
  }
591
591
  function f() {
592
592
  if (l.value) {
593
593
  r.value--;
594
594
  const v = i(r.value);
595
- return v && (a.value = I(v)), v;
595
+ return v && (a.value = C(v)), v;
596
596
  }
597
597
  }
598
- function p() {
598
+ function h() {
599
599
  if (u.value) {
600
600
  r.value++;
601
601
  const v = i(r.value);
602
- return v && (a.value = I(v)), v;
602
+ return v && (a.value = C(v)), v;
603
603
  }
604
604
  }
605
605
  function m() {
@@ -610,13 +610,13 @@ function St({
610
610
  canUndo: l,
611
611
  canRedo: u,
612
612
  undo: f,
613
- redo: p,
613
+ redo: h,
614
614
  clear: m
615
615
  };
616
616
  }
617
617
  const bt = {
618
618
  async updateMenuModule(e, t) {
619
- const n = G.RequestRunner.operation(t, e.modules);
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,12 +667,12 @@ function wt() {
667
667
  const Pt = Ye(
668
668
  "mf-menu-store-v2",
669
669
  () => {
670
- const e = Xe(wt()), t = se(), n = et(), o = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
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
- return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || L.F_MENU_VERSION.v3;
675
- }), a = S(() => r.value === L.F_MENU_VERSION.v4), l = S(() => {
674
+ return ((s = t.currentBusiness.value) == null ? void 0 : s.menuVersion) || H.F_MENU_VERSION.v3;
675
+ }), a = S(() => r.value === H.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(() => {
@@ -686,14 +686,14 @@ const Pt = Ye(
686
686
  items: e.menu.modules.item,
687
687
  ...e.currentRestaurantAttrParams ?? {}
688
688
  })), s;
689
- }), c = S(() => x(p.value.modules.scheduler, { selector: "name" })), i = S(() => e.menu.modules.scheduler.find(
689
+ }), c = S(() => x(h.value.modules.scheduler, { selector: "name" })), i = S(() => e.menu.modules.scheduler.find(
690
690
  (s) => s._id === e.currentSchedulerId
691
691
  ));
692
692
  function f(s, d = !0) {
693
- e.menu = { ...s, _rev: e.menu._rev }, d && V.push(e.menu);
693
+ e.menu = { ...s, _rev: e.menu._rev }, d && D.push(e.menu);
694
694
  }
695
- const p = j(fe()), m = H(!1), v = H(1);
696
- async function h() {
695
+ const h = j(fe()), m = G(!1), v = G(1);
696
+ async function p() {
697
697
  var y;
698
698
  m.value = !0;
699
699
  let s = e.menu.modules.catalog;
@@ -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
- (E) => E._id === e.currentCatalogId
722
+ (k) => k._id === e.currentCatalogId
723
723
  ), _ = g ? g.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
724
- (E) => E._id === e.currentSchedulerId
725
- ), A = new Set(((_ == null ? void 0 : _.items) || []).map((E) => E._id));
726
- d.modules.item = d.modules.item.filter((E) => A.has(E._id));
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
- return p.value = d, m.value = !1, v.value = v.value + 1, d;
728
+ return h.value = d, m.value = !1, v.value = v.value + 1, d;
729
729
  }
730
- const w = ie.debounce(h, 200);
731
- let C = null, R = null;
732
- function Q() {
733
- R && (R(), R = null), C && C.stop(), C = Qe(!0), R = C.run(() => Ze(
730
+ const w = ie.debounce(p, 200);
731
+ let I = null, E = null;
732
+ function X() {
733
+ E && (E(), E = null), I && I.stop(), I = Xe(!0), E = I.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
- Q();
740
+ X();
741
741
  const me = S(() => [
742
742
  {
743
743
  label: "Main",
@@ -748,7 +748,7 @@ const Pt = Ye(
748
748
  value: s._id
749
749
  }))
750
750
  ]), Z = S(() => {
751
- const s = p.value.modules.category;
751
+ const s = h.value.modules.category;
752
752
  return [
753
753
  ...U.value.item.addon ? [
754
754
  {
@@ -757,35 +757,35 @@ const Pt = Ye(
757
757
  position: 0
758
758
  }
759
759
  ] : [],
760
- ...D(s, (d) => d.name)
760
+ ...V(s, (d) => d.name)
761
761
  ];
762
762
  }), ve = S(() => {
763
- const s = p.value.modules.subCategory || [];
764
- return D(s, (d) => d.name);
763
+ const s = h.value.modules.subCategory || [];
764
+ return V(s, (d) => d.name);
765
765
  }), ee = S(() => {
766
766
  var d;
767
- let s = p.value.modules.item;
767
+ let s = h.value.modules.item;
768
768
  if (u.value) {
769
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
- (E) => !E.combinationKey
773
+ (k) => !k.combinationKey
774
774
  );
775
775
  return (_ == null ? void 0 : _.orderFrom) !== ae.F_ORDER_FROM.enum.NONE;
776
776
  });
777
777
  }
778
- return D(s, (y) => y.code || y.name);
778
+ return V(s, (y) => y.code || y.name);
779
779
  }), ye = S(() => {
780
- const s = e.menu.modules.category, d = D(s, (g) => g.name).reduce(
780
+ const s = e.menu.modules.category, d = V(s, (g) => g.name).reduce(
781
781
  (g, _, A) => (g[_._id] = A, g),
782
782
  { "": 0 }
783
783
  ), y = e.menu.modules.item;
784
- return D(
784
+ return V(
785
785
  y,
786
786
  (g) => g.code || g.name
787
787
  ).reduce((g, _, A) => (g[_._id] = A + d[_.category || ""], g), {});
788
- }), pe = S(() => oe(N.value, Z.value, ee.value)), he = S(() => {
788
+ }), he = S(() => oe(N.value, Z.value, ee.value)), pe = S(() => {
789
789
  const s = U.value.item.addon ? [
790
790
  {
791
791
  _id: e.currentCatalogId ? "" : null,
@@ -800,22 +800,22 @@ const Pt = Ye(
800
800
  e.menu.modules.item
801
801
  );
802
802
  }), N = S(() => {
803
- const s = p.value.modules.variant;
803
+ const s = h.value.modules.variant;
804
804
  return x(s, { selector: "name" });
805
805
  });
806
806
  function ge(s = []) {
807
807
  const d = s.map((g) => N.value.find((_) => _._id === g)).filter((g) => !!g);
808
808
  return T.fullVariantCombination(d).reduce((g, _) => (g[_.combinationKey] = _.selectionName.join(" / "), g), {});
809
809
  }
810
- const _e = S(() => D(p.value.modules.group, (s) => s.name)), Se = S(() => x(p.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
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 || [], {
811
811
  selector: "name"
812
- })), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(Le(e.menu.modules.recipe, e.menu.modules.sku), {
812
+ })), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(He(e.menu.modules.recipe, e.menu.modules.sku), {
813
813
  selector: "name"
814
- })), Ae = S(() => e.menu.modules.cookingGuide), Ie = S(() => {
815
- const s = qe(e.menu.modules.sku);
814
+ })), Ae = S(() => e.menu.modules.cookingGuide), Ce = S(() => {
815
+ const s = Le(e.menu.modules.sku);
816
816
  return x(s, { selector: "code" });
817
817
  }), U = S(() => {
818
- const s = !e.currentCatalogId, d = r.value === L.F_MENU_VERSION.v4, y = !e.currentSchedulerId, g = {
818
+ const s = !e.currentCatalogId, d = r.value === H.F_MENU_VERSION.v4, y = !e.currentSchedulerId, g = {
819
819
  create: s && y,
820
820
  edit: s && y,
821
821
  delete: s && y
@@ -887,19 +887,19 @@ const Pt = Ye(
887
887
  function W(s) {
888
888
  return `${s.systemCode}/${s.taxCode}`;
889
889
  }
890
- function Ce(s) {
890
+ function Ie(s) {
891
891
  const [d, y] = s.split("/");
892
892
  return { systemCode: d, taxCode: y };
893
893
  }
894
- function Re(s, d, y) {
894
+ function Ee(s, d, y) {
895
895
  return (s ?? d ?? []).map((g) => W(g)).find((g) => y.some((_) => _.value === g));
896
896
  }
897
- const ke = S(() => {
897
+ const Re = S(() => {
898
898
  var g;
899
- const s = ["SV5", "SV10"], d = ze.Country.getCountryFlattenTaxes(
899
+ const s = ["SV5", "SV10"], d = qe.Country.getCountryFlattenTaxes(
900
900
  se().currentCountry.value
901
901
  ), y = d.filter((_) => a.value || !s.includes(_.taxCode)).map((_) => ({
902
- label: `${_.name} (${Ge(_.rate)}%)`,
902
+ label: `${_.name} (${ze(_.rate)}%)`,
903
903
  value: W(_),
904
904
  meta: {
905
905
  rate: _.rate
@@ -909,7 +909,7 @@ const Pt = Ye(
909
909
  systemCode: (g = d[0]) == null ? void 0 : g.systemCode,
910
910
  countryTaxOptions: y
911
911
  };
912
- }), Ee = async () => {
912
+ }), ke = async () => {
913
913
  const s = await Je.readMenu();
914
914
  e.menu = s ?? e.menu, te(null);
915
915
  }, xe = async () => {
@@ -923,9 +923,9 @@ const Pt = Ye(
923
923
  e.currentCatalogId = s;
924
924
  }, Oe = (s) => {
925
925
  e.currentSchedulerId = s;
926
- }, Ve = (s) => {
927
- e.currentCategoryIds = s;
928
926
  }, De = (s) => {
927
+ e.currentCategoryIds = s;
928
+ }, Ve = (s) => {
929
929
  e.currentRestaurantAttrParams = s;
930
930
  }, Te = async (s, d) => {
931
931
  const y = Array.isArray(s) ? s : [s];
@@ -937,9 +937,9 @@ const Pt = Ye(
937
937
  }));
938
938
  try {
939
939
  if (d || g.some(
940
- (A) => [G.F_OPERATION_TYPE.delete, G.F_OPERATION_TYPE.deleteMany].includes(A.operation)
940
+ (A) => [z.F_OPERATION_TYPE.delete, z.F_OPERATION_TYPE.deleteMany].includes(A.operation)
941
941
  )) {
942
- const A = await He(g, e.menu.modules);
942
+ const A = await Ge(g, e.menu.modules);
943
943
  if (A !== !0) throw new Error(A);
944
944
  }
945
945
  const _ = await bt.updateMenuModule(e.menu, g);
@@ -959,14 +959,14 @@ const Pt = Ye(
959
959
  priceTierSettings: s.priceTierSettings
960
960
  };
961
961
  return f(d), d;
962
- }, V = St({ maxHistorySize: 50 }), Ke = S(() => V.canUndo.value), Pe = S(() => V.canRedo.value), $e = () => {
963
- const s = V.undo();
962
+ }, D = St({ maxHistorySize: 50 }), Ke = S(() => D.canUndo.value), Pe = S(() => D.canRedo.value), $e = () => {
963
+ const s = D.undo();
964
964
  s && f(s, !1);
965
965
  }, je = () => {
966
- const s = V.redo();
966
+ const s = D.redo();
967
967
  s && f(s, !1);
968
968
  }, Ne = () => {
969
- V.clear();
969
+ D.clear();
970
970
  };
971
971
  return {
972
972
  state: e,
@@ -974,7 +974,7 @@ const Pt = Ye(
974
974
  workerIsComputing: m,
975
975
  mergedMenuChangeId: v,
976
976
  // async computed state
977
- mergedMenu: p,
977
+ mergedMenu: h,
978
978
  // Computed
979
979
  version: r,
980
980
  isV4: a,
@@ -988,8 +988,8 @@ const Pt = Ye(
988
988
  subcategories: ve,
989
989
  items: ee,
990
990
  sortedItems: ye,
991
- categorizedItems: pe,
992
- categorizedRawMenuItems: he,
991
+ categorizedItems: he,
992
+ categorizedRawMenuItems: pe,
993
993
  variants: N,
994
994
  groups: _e,
995
995
  takeaways: Se,
@@ -997,24 +997,24 @@ const Pt = Ye(
997
997
  units: we,
998
998
  recipes: Me,
999
999
  cookingGuide: Ae,
1000
- skus: Ie,
1000
+ skus: Ce,
1001
1001
  rules: U,
1002
- taxSetting: ke,
1002
+ taxSetting: Re,
1003
1003
  // Action
1004
1004
  setMenu: f,
1005
- readMenu: Ee,
1005
+ readMenu: ke,
1006
1006
  readRestaurants: xe,
1007
1007
  selectCatalog: te,
1008
1008
  selectScheduler: Oe,
1009
- selectCategory: Ve,
1010
- setRestaurantAttrParams: De,
1009
+ selectCategory: De,
1010
+ setRestaurantAttrParams: Ve,
1011
1011
  updateMenu: Te,
1012
1012
  updateMenuSetting: Fe,
1013
- computeMergedMenu: h,
1013
+ computeMergedMenu: p,
1014
1014
  // helper
1015
1015
  encodeTax: W,
1016
- decodeTax: Ce,
1017
- getSelectedTax: Re,
1016
+ decodeTax: Ie,
1017
+ getSelectedTax: Ee,
1018
1018
  mapVariant: ge,
1019
1019
  // history
1020
1020
  canUndoHistory: Ke,
@@ -1023,20 +1023,20 @@ const Pt = Ye(
1023
1023
  redoHistory: je,
1024
1024
  // cleanup
1025
1025
  $dispose: () => {
1026
- w.cancel(), R && (R(), R = null), C && (C.stop(), C = null), Ne();
1026
+ w.cancel(), E && (E(), E = null), I && (I.stop(), I = null), Ne();
1027
1027
  },
1028
1028
  $reinitialize: () => {
1029
- Q();
1029
+ X();
1030
1030
  }
1031
1031
  };
1032
1032
  }
1033
1033
  );
1034
1034
  export {
1035
- Dt as a,
1035
+ Vt as a,
1036
1036
  Tt as b,
1037
1037
  Ft as c,
1038
1038
  Kt as f,
1039
- Vt as g,
1039
+ Dt as g,
1040
1040
  Ot as m,
1041
1041
  at as o,
1042
1042
  Pt as u