@feedmepos/mf-menu 0.32.59 → 0.32.60

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 (70) hide show
  1. package/dist/{App-DIECU1uj.js → App-qJJD8JDg.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-OH6xrq3f.js → ApplyProduct.vue_vue_type_script_setup_true_lang-3IAymj0v.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CA8oy07f.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-BCaHfdwI.js} +2 -2
  4. package/dist/{Catalog-JQ1Apsu4.js → Catalog-BJLVNbtg.js} +6 -6
  5. package/dist/{Category-B6lzNeJ9.js → Category-BvSlf9Jr.js} +4 -4
  6. package/dist/{Category-2klrTWYz.js → Category-CdZbMTjh.js} +4 -4
  7. package/dist/{CookingGuide-DjBhYedl.js → CookingGuide-DZuBUaAY.js} +4 -4
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C9xyFNWN.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-D6j6hf94.js} +1 -1
  9. package/dist/{Group-dG6u4lfu.js → Group-CHPX3H86.js} +3 -3
  10. package/dist/{Group-006FXEja.js → Group-DmFHx6jN.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-BLcW3keI.js → Group.vue_vue_type_script_setup_true_lang-DZSl5qcO.js} +6 -6
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-lS-fu4kK.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B2bl86Fv.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-x4ZPqRIM.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DR8QkK1A.js} +7 -7
  14. package/dist/{Ingredient-DKT3cw7X.js → Ingredient-D0KdIrJq.js} +3 -3
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-z_iUiIXp.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CgUfMeJA.js} +2 -2
  16. package/dist/{LinkProductSideSheet-CHdOh6yv.js → LinkProductSideSheet-DekFylFC.js} +3 -3
  17. package/dist/{MenuSetting-8LYjlVfX.js → MenuSetting-myHnou7F.js} +6 -6
  18. package/dist/{OrderPacing-Cc0a9BDz.js → OrderPacing-MonT1vZe.js} +5 -5
  19. package/dist/{PrintRoute-BzUvHdzm.js → PrintRoute-DN9Brbcf.js} +4 -4
  20. package/dist/{Product-Cx5JMfIY.js → Product-lPh8v5hj.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-f68VNqB8.js → Product.vue_vue_type_script_setup_true_lang-o7PbyjC5.js} +12 -12
  22. package/dist/{ProductInternalTools-BUHOpH7R.js → ProductInternalTools-BG6HIIC7.js} +5 -5
  23. package/dist/{Products-5YG6Y8NN.js → Products-AqyIFFON.js} +52 -52
  24. package/dist/{Publish-B2R_ZYz1.js → Publish-2bUhATD1.js} +3 -3
  25. package/dist/{Recipe-BfKED_rJ.js → Recipe-CDguB2NC.js} +4 -4
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Byr3StlH.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DiDtVQmO.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CK-Ihn0s.js → RuleView.vue_vue_type_script_setup_true_lang-DATrEmoz.js} +2 -2
  28. package/dist/{Scheduler-BqBp8UQV.js → Scheduler-DY5kdIr1.js} +3 -3
  29. package/dist/{ServingSequence-CRLLJLBh.js → ServingSequence-DV8JSkfn.js} +3 -3
  30. package/dist/{Setting--sRd2OKO.js → Setting-C2iYE9Nf.js} +5 -5
  31. package/dist/{Subcategory-_JhLSc6M.js → Subcategory-C3TDDesl.js} +5 -5
  32. package/dist/{Takeaway-CCJOWYvr.js → Takeaway-1RTym_29.js} +1 -1
  33. package/dist/{Takeaway-CoClanro.js → Takeaway-DeKOn78v.js} +4 -4
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CZLsW3c5.js → Takeaway.vue_vue_type_script_setup_true_lang-DCg5EZ-Q.js} +5 -5
  35. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Dd6GZCmk.js → Thumbnail.vue_vue_type_script_setup_true_lang-CZmN9QIF.js} +4 -4
  36. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-R3wuHxVF.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-BzEjweqc.js} +1 -1
  37. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-D29F0bn-.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-qp1XGtIS.js} +2 -2
  38. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BBBdLbiH.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-jeDWAfrj.js} +15 -13
  39. package/dist/{Unit-TTLSZjx_.js → Unit-CWf321-e.js} +2 -2
  40. package/dist/{Variant-CrANrv2A.js → Variant-DPbgLfVh.js} +3 -3
  41. package/dist/{_id_-B_RDBY2B.js → _id_-BGo_iZ3b.js} +9 -9
  42. package/dist/{app-PW3IYwb3.js → app-17c6pvZw.js} +1 -1
  43. package/dist/{app-Gu39_jfp.js → app-CUT-XiX7.js} +32 -32
  44. package/dist/app.js +1 -1
  45. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
  46. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  47. package/dist/assets/{linked-status-BQ4Atqaz.js → linked-status-D1ElNa8U.js} +2 -2
  48. package/dist/assets/{menu-export-BFG97Uh7.js → menu-export-BJnF70YD.js} +2 -2
  49. package/dist/assets/{override-menu-BxetmhPm.js → override-menu-DIisF_bD.js} +2 -2
  50. package/dist/assets/{validate-menu-GNGUs668.js → validate-menu-D_7tXxG5.js} +2 -2
  51. package/dist/{catalog-Bi2-kTyi.js → catalog-0cjjJP7-.js} +1 -1
  52. package/dist/{catalogSetting-BVNSjlmB.js → catalogSetting-D2bHVIkK.js} +1 -1
  53. package/dist/{currency-BSPF6ljf.js → currency-X4rTV0SS.js} +1 -1
  54. package/dist/{dayjs.min-CbtUpP7p.js → dayjs.min-BhGX_phM.js} +2 -2
  55. package/dist/{index-DnfxJIeU.js → index-DbgT8DgR.js} +4 -4
  56. package/dist/{index-DlbtAcPO.js → index-f8bZr7SF.js} +5 -5
  57. package/dist/{index.vue_vue_type_script_setup_true_lang-4QceDakZ.js → index.vue_vue_type_script_setup_true_lang-Bxs-AkVQ.js} +5 -5
  58. package/dist/{item-QOiSLO27.js → item-9EebIIoe.js} +19 -17
  59. package/dist/{jszip.min-DXGEsthp.js → jszip.min-DU30B0hI.js} +384 -384
  60. package/dist/{memberPricing-ck1-XgTf.js → memberPricing-DPDxnp5u.js} +1 -1
  61. package/dist/{menu-C-n8INTk.js → menu-BCV_96fD.js} +1 -1
  62. package/dist/{menuV2-CFCTYCF8.js → menuV2-DxGiWEWy.js} +123 -123
  63. package/dist/{order_pacing-BK4Oq_mg.js → order_pacing-DEN-iiUf.js} +5 -5
  64. package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
  65. package/dist/{priceTier-BY0yCorY.js → priceTier-5RWOh5Wn.js} +1 -1
  66. package/dist/{rules-BsYkeawL.js → rules-Dzzqi10w.js} +3 -3
  67. package/dist/{scheduler-DmG1_KtK.js → scheduler-BjhDOBcr.js} +4 -4
  68. package/dist/{toExcel-D1rCXMwl.js → toExcel-oD9GONEM.js} +2 -2
  69. package/dist/{unit-VydmHJtl.js → unit-D7C8fM49.js} +2 -2
  70. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as d, ref as _, watch as S, resolveComponent as b, createBlock as f, openBlock as y, unref as M, computed as T } from "vue";
2
- import { u as h, B as w } from "./index.vue_vue_type_script_setup_true_lang-4QceDakZ.js";
2
+ import { u as h, B as w } from "./index.vue_vue_type_script_setup_true_lang-Bxs-AkVQ.js";
3
3
  import { useI18n as l } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as x, useDialog as C, useSnackbar as P } from "@feedmepos/ui-library";
5
5
  const k = /* @__PURE__ */ d({
@@ -1,5 +1,5 @@
1
1
  import { computed as n, onMounted as d, onBeforeUnmount as m } from "vue";
2
- import { u as c } from "./index.vue_vue_type_script_setup_true_lang-4QceDakZ.js";
2
+ import { u as c } from "./index.vue_vue_type_script_setup_true_lang-Bxs-AkVQ.js";
3
3
  import "@feedmepos/mf-common";
4
4
  import "@feedmepos/ui-library";
5
5
  function p() {
@@ -1,24 +1,24 @@
1
1
  var We = Object.defineProperty;
2
2
  var ze = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var ne = (e, t, n) => ze(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { I as ae, G as I, A as T, U as ue, ax as re, J as B, H as ie, aj as x, c as z, a0 as D, au as oe, ay as Le, az as qe, z as Be, am as He, aA as Ge, aB as Je, ah as Ye } from "./index.vue_vue_type_script_setup_true_lang-4QceDakZ.js";
4
+ import { I as ae, G as I, A as T, U as ue, ax as re, J as H, H as ie, aj as x, c as z, a0 as V, au as oe, ay as Le, az as qe, z as He, am as Be, aA as Ge, aB as Je, ah as Ye } from "./index.vue_vue_type_script_setup_true_lang-Bxs-AkVQ.js";
5
5
  import { defineStore as Qe } from "pinia";
6
- import { shallowRef as j, ref as H, computed as S, shallowReactive as Xe, effectScope as Ze, watch as et } from "vue";
6
+ import { shallowRef as N, ref as B, computed as S, shallowReactive as Xe, effectScope as Ze, watch as et } from "vue";
7
7
  import { useCoreStore as se } from "@feedmepos/mf-common";
8
8
  import { useSnackbar as tt } from "@feedmepos/ui-library";
9
- const nt = "/assets/linked-status-BQ4Atqaz.js", rt = "/assets/override-menu-BxetmhPm.js";
9
+ const nt = "/assets/linked-status-D1ElNa8U.js", rt = "/assets/override-menu-DIisF_bD.js";
10
10
  function ot(e) {
11
11
  var s;
12
12
  const t = I(e), n = (s = t.variant) == null ? void 0 : s.variantCombinations;
13
13
  return delete t.variant, delete t.thumbnail, [t, ...n || []];
14
14
  }
15
15
  function st(e, t, n, s) {
16
- const o = I(t), u = n ? o.modules.catalog.find((f) => f._id === n) : null, l = s ? o.modules.scheduler.find((f) => f._id === s) : null, a = u ? I(u) : void 0, d = n ? o.modules.catalog.filter((f) => f._id !== n) : [], c = l ? I(l) : void 0, h = e.reduce((f, v) => (f[v._id] = ot(v), f), {});
16
+ const o = I(t), u = n ? o.modules.catalog.find((f) => f._id === n) : null, l = s ? o.modules.scheduler.find((f) => f._id === s) : null, a = u ? I(u) : void 0, d = n ? o.modules.catalog.filter((f) => f._id !== n) : [], c = l ? I(l) : void 0, g = e.reduce((f, v) => (f[v._id] = ot(v), f), {});
17
17
  function y(f = []) {
18
- const v = e.map((g) => g._id);
18
+ const v = e.map((h) => h._id);
19
19
  return [
20
- ...f.filter((g) => !v.includes(g._id)),
21
- ...Object.values(h).flatMap((g) => g)
20
+ ...f.filter((h) => !v.includes(h._id)),
21
+ ...Object.values(g).flatMap((h) => h)
22
22
  ];
23
23
  }
24
24
  return a && s ? (a.override.scheduler = {
@@ -33,7 +33,7 @@ function st(e, t, n, s) {
33
33
  }
34
34
  }, o.modules.catalog = [...d, a], o) : a ? (a.override.items = {
35
35
  ...a.override.items,
36
- ...h
36
+ ...g
37
37
  }, o.modules.catalog = [...d, a], o) : c ? (c.items = y(c.items), o.modules.scheduler = [
38
38
  ...o.modules.scheduler.filter((f) => f._id !== s),
39
39
  c
@@ -56,12 +56,12 @@ function F(e, t, n) {
56
56
  if (!s)
57
57
  throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
58
58
  const o = (u = s.groups) == null ? void 0 : u.map((l) => {
59
- var c, h, y;
59
+ var c, g, y;
60
60
  const a = (c = e == null ? void 0 : e.groups) == null ? void 0 : c.find((f) => f._id === l._id);
61
61
  let d;
62
- return a ? d = ((h = l.items) == null ? void 0 : h.map((f) => {
63
- var g;
64
- const v = (g = a.items) == null ? void 0 : g.find(
62
+ return a ? d = ((g = l.items) == null ? void 0 : g.map((f) => {
63
+ var h;
64
+ const v = (h = a.items) == null ? void 0 : h.find(
65
65
  (b) => b._id === f._id && b.combinationKey === f.combinationKey
66
66
  );
67
67
  return F(v || f, t, n + 1);
@@ -87,12 +87,12 @@ function at(e, t) {
87
87
  );
88
88
  if (c)
89
89
  return F(c, t, 1);
90
- const h = {
90
+ const g = {
91
91
  ...T.generator.initMenuV4ItemOverrider(),
92
92
  _id: d._id,
93
93
  combinationKey: d.combinationKey
94
94
  };
95
- return F(h, t, 1);
95
+ return F(g, t, 1);
96
96
  });
97
97
  return { ...u, items: a };
98
98
  }), s = e.variant ? e.variant.variantCombinations.map((u) => F(u, t, 1)) : [], o = {
@@ -113,8 +113,8 @@ function G(e, t) {
113
113
  var l, a;
114
114
  const u = (l = t.groups) == null ? void 0 : l.find((d) => d._id === o._id);
115
115
  return o.items = (a = o.items) == null ? void 0 : a.map((d) => {
116
- var h;
117
- const c = (h = u == null ? void 0 : u.items) == null ? void 0 : h.find(
116
+ var g;
117
+ const c = (g = u == null ? void 0 : u.items) == null ? void 0 : g.find(
118
118
  (y) => y._id === d._id && y.combinationKey === d.combinationKey
119
119
  );
120
120
  return G(d, c);
@@ -143,7 +143,7 @@ function ut(e, t) {
143
143
  return o.items = (l = o.items) == null ? void 0 : l.map((a) => {
144
144
  var c;
145
145
  const d = (c = u == null ? void 0 : u.items) == null ? void 0 : c.find(
146
- (h) => h._id === a._id && h.combinationKey === a.combinationKey
146
+ (g) => g._id === a._id && g.combinationKey === a.combinationKey
147
147
  );
148
148
  return G(a, d);
149
149
  }), o;
@@ -152,11 +152,11 @@ function ut(e, t) {
152
152
  price: (s == null ? void 0 : s.price) || t.price
153
153
  };
154
154
  }
155
- async function Vt(e, t, n, s, o, u = !0) {
155
+ async function Dt(e, t, n, s, o, u = !0) {
156
156
  const l = I(n), a = u ? st(t, l, s, o) : l, d = t.reduce((y, f) => (y[f._id] = a.modules.item.find((v) => v._id === f._id), y), {}), c = t.reduce((y, f) => {
157
157
  const v = f._id;
158
158
  return y[v] = at(d[v], e), y;
159
- }, {}), h = T.getFallbackPrices({
159
+ }, {}), g = T.getFallbackPrices({
160
160
  rawMenu: a,
161
161
  items: c,
162
162
  catalogId: s || void 0,
@@ -165,19 +165,19 @@ async function Vt(e, t, n, s, o, u = !0) {
165
165
  return t.map((y) => {
166
166
  const f = y._id, v = d[f];
167
167
  return {
168
- ...ut(h, v),
168
+ ...ut(g, v),
169
169
  category: s || o ? v == null ? void 0 : v.category : null
170
170
  };
171
171
  });
172
172
  }
173
- function Dt(e, t) {
173
+ function Vt(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((o, u) => {
177
177
  if (u && u.length > 0) {
178
178
  const l = `variant${u.split("/")[0]}`, a = u.split("/")[1], c = t.find(
179
- ({ _id: h }) => h === l
180
- ).options.find(({ _id: h }) => h === a);
179
+ ({ _id: g }) => g === l
180
+ ).options.find(({ _id: g }) => g === a);
181
181
  o.push(((c == null ? void 0 : c.name) || "").trim());
182
182
  }
183
183
  return o;
@@ -212,22 +212,22 @@ async function it(e, t, n) {
212
212
  const o = await ce(e, t, n);
213
213
  return q.set(s, o), o;
214
214
  }
215
- async function Pt(e, t, n) {
215
+ async function Kt(e, t, n) {
216
216
  var l, a;
217
217
  const s = await it(e, t, null), o = [], u = (d, c) => {
218
- const h = I(d);
218
+ const g = I(d);
219
219
  for (const y in c)
220
- c[y] && (h[y] = c[y]);
221
- return h;
220
+ c[y] && (g[y] = c[y]);
221
+ return g;
222
222
  };
223
223
  for (const d of s.modules.group) {
224
- const c = (l = d.items) == null ? void 0 : l.find((y) => y._id === n && !y.combinationKey), h = e.modules.item.find((y) => y._id === n);
224
+ const c = (l = d.items) == null ? void 0 : l.find((y) => y._id === n && !y.combinationKey), g = e.modules.item.find((y) => y._id === n);
225
225
  if (c) {
226
226
  const y = (a = d.items) == null ? void 0 : a.filter((v) => v._id === n && v.combinationKey), f = [c, ...y].map((v) => {
227
227
  var w, C;
228
- const g = v.combinationKey ? (C = (w = h == null ? void 0 : h.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : C.find(
228
+ const h = v.combinationKey ? (C = (w = g == null ? void 0 : g.variant) == null ? void 0 : w.variantCombinations) == null ? void 0 : C.find(
229
229
  (E) => E.combinationKey === v.combinationKey
230
- ) : h, b = g && h ? u(h, g) : v;
230
+ ) : g, b = h && g ? u(g, h) : v;
231
231
  return u(b, v);
232
232
  });
233
233
  o.push({
@@ -238,7 +238,7 @@ async function Pt(e, t, n) {
238
238
  }
239
239
  return o;
240
240
  }
241
- const M = 0, P = 3;
241
+ const M = 0, K = 3;
242
242
  function ct(e) {
243
243
  const t = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
244
244
  if (!t)
@@ -267,7 +267,7 @@ function $(e) {
267
267
  function k(e) {
268
268
  return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
269
269
  }
270
- function K(e, t) {
270
+ function P(e, t) {
271
271
  if (e === t) return !0;
272
272
  if (typeof e != typeof t) return !1;
273
273
  if (e instanceof Date && t instanceof Date)
@@ -277,14 +277,14 @@ function K(e, t) {
277
277
  if (Array.isArray(e) && Array.isArray(t)) {
278
278
  if (e.length !== t.length) return !1;
279
279
  for (let n = 0; n < e.length; n++)
280
- if (!K(e[n], t[n])) return !1;
280
+ if (!P(e[n], t[n])) return !1;
281
281
  return !0;
282
282
  }
283
283
  if (k(e) && k(t)) {
284
284
  const n = Object.keys(e), s = Object.keys(t);
285
285
  if (n.length !== s.length) return !1;
286
286
  for (const o of n)
287
- if (!Object.prototype.hasOwnProperty.call(t, o) || !K(e[o], t[o])) return !1;
287
+ if (!Object.prototype.hasOwnProperty.call(t, o) || !P(e[o], t[o])) return !1;
288
288
  return !0;
289
289
  }
290
290
  return !1;
@@ -297,10 +297,10 @@ function lt(e, t, n) {
297
297
  }
298
298
  const l = [], a = /* @__PURE__ */ new Set();
299
299
  for (let d = 0; d < s; d++) {
300
- const c = e[d], h = n ? n(c) : JSON.stringify(c), y = u.get(h);
300
+ const c = e[d], g = n ? n(c) : JSON.stringify(c), y = u.get(g);
301
301
  if (y) {
302
302
  for (const f of y)
303
- if (!a.has(f) && K(c, t[f])) {
303
+ if (!a.has(f) && P(c, t[f])) {
304
304
  l.push({ leftIndex: d, rightIndex: f }), a.add(f);
305
305
  break;
306
306
  }
@@ -310,59 +310,59 @@ function lt(e, t, n) {
310
310
  }
311
311
  function dt(e, t, n) {
312
312
  var f, v;
313
- if (K(e, t)) return;
313
+ if (P(e, t)) return;
314
314
  const s = { _t: "a" }, o = ((f = n == null ? void 0 : n.arrays) == null ? void 0 : f.detectMove) !== !1, u = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.includeValueOnMove) === !0, l = n == null ? void 0 : n.objectHash;
315
315
  let a = o ? lt(e, t, l) : [];
316
316
  if (!l && e.length === t.length && e.length > 0 && a.length < e.length) {
317
- const g = k(e[0]) || Array.isArray(e[0]), b = a.length > 0;
318
- if (g || b) {
317
+ const h = k(e[0]) || Array.isArray(e[0]), b = a.length > 0;
318
+ if (h || b) {
319
319
  a = [];
320
320
  for (let w = 0; w < e.length; w++)
321
321
  a.push({ leftIndex: w, rightIndex: w });
322
322
  }
323
323
  }
324
- new Set(a.map((g) => g.leftIndex));
325
- const d = new Set(a.map((g) => g.rightIndex)), c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
326
- for (const g of a)
327
- c.set(g.leftIndex, g.rightIndex), h.set(g.rightIndex, g.leftIndex);
328
- for (let g = 0; g < e.length; g++) {
329
- const b = c.get(g);
324
+ new Set(a.map((h) => h.leftIndex));
325
+ const d = new Set(a.map((h) => h.rightIndex)), c = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
326
+ for (const h of a)
327
+ c.set(h.leftIndex, h.rightIndex), g.set(h.rightIndex, h.leftIndex);
328
+ for (let h = 0; h < e.length; h++) {
329
+ const b = c.get(h);
330
330
  if (b !== void 0) {
331
- const w = J(e[g], t[b], n);
332
- if (w !== void 0 && (s[b] = w), o && b !== g) {
333
- const C = `_${g}`, E = u ? [e[g], b, P] : ["", b, P];
331
+ const w = J(e[h], t[b], n);
332
+ if (w !== void 0 && (s[b] = w), o && b !== h) {
333
+ const C = `_${h}`, E = u ? [e[h], b, K] : ["", b, K];
334
334
  s[C] = E;
335
335
  }
336
336
  } else {
337
- const w = `_${g}`;
338
- s[w] = [e[g], M, M];
337
+ const w = `_${h}`;
338
+ s[w] = [e[h], M, M];
339
339
  }
340
340
  }
341
- for (let g = 0; g < t.length; g++)
342
- d.has(g) || (s[g] = [t[g]]);
341
+ for (let h = 0; h < t.length; h++)
342
+ d.has(h) || (s[h] = [t[h]]);
343
343
  const y = Object.keys(s);
344
344
  if (!(y.length === 1 && y[0] === "_t"))
345
345
  return s;
346
346
  }
347
347
  function mt(e, t, n) {
348
- if (K(e, t)) return;
348
+ if (P(e, t)) return;
349
349
  const s = {}, o = Object.keys(e), u = Object.keys(t), l = /* @__PURE__ */ new Set([...o, ...u]);
350
350
  for (const a of l) {
351
351
  if (n != null && n.propertyFilter && !n.propertyFilter(a, { left: e, right: t }))
352
352
  continue;
353
353
  const d = Object.prototype.hasOwnProperty.call(e, a), c = Object.prototype.hasOwnProperty.call(t, a);
354
354
  if (d && c) {
355
- const h = J(e[a], t[a], n);
356
- h !== void 0 && (s[a] = h);
355
+ const g = J(e[a], t[a], n);
356
+ g !== void 0 && (s[a] = g);
357
357
  } else if (d && !c) {
358
- const h = n != null && n.omitRemovedValues ? 0 : e[a];
359
- s[a] = [h, M, M];
358
+ const g = n != null && n.omitRemovedValues ? 0 : e[a];
359
+ s[a] = [g, M, M];
360
360
  } else !d && c && (s[a] = [t[a]]);
361
361
  }
362
362
  return Object.keys(s).length > 0 ? s : void 0;
363
363
  }
364
364
  function J(e, t, n) {
365
- if (K(e, t)) return;
365
+ if (P(e, t)) return;
366
366
  if (e === void 0 && t !== void 0) {
367
367
  const a = n != null && n.cloneDiffValues ? O(t) : t;
368
368
  return [$(a)];
@@ -386,7 +386,7 @@ function vt(e, t, n) {
386
386
  for (const a in t) {
387
387
  if (a === "_t" || !a.startsWith("_")) continue;
388
388
  const d = parseInt(a.slice(1)), c = t[a];
389
- Array.isArray(c) && (c.length === 3 && c[2] === M ? s.add(d) : c.length === 3 && c[2] === P && o.set(d, c[1]));
389
+ Array.isArray(c) && (c.length === 3 && c[2] === M ? s.add(d) : c.length === 3 && c[2] === K && o.set(d, c[1]));
390
390
  }
391
391
  const u = [];
392
392
  let l = 0;
@@ -401,13 +401,13 @@ function vt(e, t, n) {
401
401
  l < e.length && (u.push(Y(e[l], c)), l++);
402
402
  }
403
403
  else {
404
- let h = !1;
404
+ let g = !1;
405
405
  for (const [y, f] of o.entries())
406
406
  if (f === a) {
407
- u.push(e[y]), h = !0;
407
+ u.push(e[y]), g = !0;
408
408
  break;
409
409
  }
410
- if (!h) {
410
+ if (!g) {
411
411
  for (; l < e.length && (s.has(l) || o.has(l)); )
412
412
  l++;
413
413
  if (l < e.length)
@@ -442,7 +442,7 @@ function Y(e, t, n) {
442
442
  function le(e, t, n) {
443
443
  return Y(e, t);
444
444
  }
445
- function ht(e) {
445
+ function gt(e) {
446
446
  const t = { _t: "a" };
447
447
  for (const n in e)
448
448
  if (n !== "_t")
@@ -451,9 +451,9 @@ function ht(e) {
451
451
  if (Array.isArray(o)) {
452
452
  if (o.length === 3 && o[2] === M)
453
453
  t[s] = [o[0]];
454
- else if (o.length === 3 && o[2] === P) {
454
+ else if (o.length === 3 && o[2] === K) {
455
455
  const u = o[1];
456
- t[`_${u}`] = [o[0], s, P];
456
+ t[`_${u}`] = [o[0], s, K];
457
457
  }
458
458
  }
459
459
  } else {
@@ -467,7 +467,7 @@ function ht(e) {
467
467
  }
468
468
  return t;
469
469
  }
470
- function gt(e) {
470
+ function ht(e) {
471
471
  const t = {};
472
472
  for (const n in e) {
473
473
  const s = e[n];
@@ -489,10 +489,10 @@ function Q(e) {
489
489
  return [e[1], e[0]];
490
490
  if (e.length === 3 && e[2] === M)
491
491
  return [e[0]];
492
- if (e.length === 3 && e[2] === P)
492
+ if (e.length === 3 && e[2] === K)
493
493
  return e;
494
494
  }
495
- return k(e) && e._t === "a" ? ht(e) : k(e) ? gt(e) : e;
495
+ return k(e) && e._t === "a" ? gt(e) : k(e) ? ht(e) : e;
496
496
  }
497
497
  }
498
498
  function de(e) {
@@ -536,14 +536,14 @@ function bt({
536
536
  includeValueOnMove: !1
537
537
  },
538
538
  cloneDiffValues: !1
539
- }), n = j(null), s = j([]), o = H(-1), u = j(null), l = S(() => o.value > 0), a = S(() => o.value < s.value.length - 1);
539
+ }), n = N(null), s = N([]), o = B(-1), u = N(null), l = S(() => o.value > 0), a = S(() => o.value < s.value.length - 1);
540
540
  function d(v) {
541
541
  if (n.value === null) {
542
542
  n.value = I(v), u.value = I(v), s.value = [{ delta: null }], o.value = 0;
543
543
  return;
544
544
  }
545
- const g = t.diff(u.value, v);
546
- if (o.value < s.value.length - 1 && (s.value = s.value.slice(0, o.value + 1)), s.value.push({ delta: g }), o.value++, u.value = I(v), s.value.length > e) {
545
+ const h = t.diff(u.value, v);
546
+ if (o.value < s.value.length - 1 && (s.value = s.value.slice(0, o.value + 1)), s.value.push({ delta: h }), o.value++, u.value = I(v), s.value.length > e) {
547
547
  const b = s.value[1].delta;
548
548
  b && n.value && (n.value = t.patch(I(n.value), b)), s.value.shift(), o.value--;
549
549
  }
@@ -551,14 +551,14 @@ function bt({
551
551
  function c(v) {
552
552
  if (!n.value || v < 0 || v >= s.value.length)
553
553
  return;
554
- let g = I(n.value);
554
+ let h = I(n.value);
555
555
  for (let b = 1; b <= v; b++) {
556
556
  const w = s.value[b];
557
- w.delta && (g = t.patch(g, w.delta));
557
+ w.delta && (h = t.patch(h, w.delta));
558
558
  }
559
- return g;
559
+ return h;
560
560
  }
561
- function h() {
561
+ function g() {
562
562
  if (l.value) {
563
563
  o.value--;
564
564
  const v = c(o.value);
@@ -579,14 +579,14 @@ function bt({
579
579
  push: d,
580
580
  canUndo: l,
581
581
  canRedo: a,
582
- undo: h,
582
+ undo: g,
583
583
  redo: y,
584
584
  clear: f
585
585
  };
586
586
  }
587
587
  const wt = {
588
588
  async updateMenuModule(e, t) {
589
- const n = B.RequestRunner.operation(t, e.modules);
589
+ const n = H.RequestRunner.operation(t, e.modules);
590
590
  if (n.validateError.length > 0)
591
591
  throw new Error(n.validateError.join(`
592
592
  `));
@@ -634,7 +634,7 @@ function Mt() {
634
634
  }
635
635
  };
636
636
  }
637
- const Kt = Qe(
637
+ const Pt = Qe(
638
638
  "mf-menu-store-v2",
639
639
  () => {
640
640
  const e = Xe(Mt()), t = se(), n = tt(), s = S(() => e.menu.modules.serveSequence ? x(e.menu.modules.serveSequence, {
@@ -659,11 +659,11 @@ const Kt = Qe(
659
659
  }), d = S(() => x(y.value.modules.scheduler, { selector: "name" })), c = S(() => e.menu.modules.scheduler.find(
660
660
  (r) => r._id === e.currentSchedulerId
661
661
  ));
662
- function h(r, i = !0) {
663
- e.menu = { ...r, _rev: e.menu._rev }, i && V.push(e.menu);
662
+ function g(r, i = !0) {
663
+ e.menu = { ...r, _rev: e.menu._rev }, i && D.push(e.menu);
664
664
  }
665
- const y = j(me()), f = H(!1), v = H(1);
666
- async function g() {
665
+ const y = N(me()), f = B(!1), v = B(1);
666
+ async function h() {
667
667
  var m;
668
668
  f.value = !0;
669
669
  let r = e.menu.modules.catalog;
@@ -697,7 +697,7 @@ const Kt = Qe(
697
697
  }
698
698
  return y.value = i, f.value = !1, v.value = v.value + 1, i;
699
699
  }
700
- const w = ie.debounce(g, 200);
700
+ const w = ie.debounce(h, 200);
701
701
  let C = null, E = null;
702
702
  function X() {
703
703
  E && (E(), E = null), C && C.stop(), C = Ze(!0), E = C.run(() => et(
@@ -727,11 +727,11 @@ const Kt = Qe(
727
727
  position: 0
728
728
  }
729
729
  ] : [],
730
- ...D(r, (i) => i.name)
730
+ ...V(r, (i) => i.name)
731
731
  ];
732
732
  }), ve = S(() => {
733
733
  const r = y.value.modules.subCategory || [];
734
- return D(r, (i) => i.name);
734
+ return V(r, (i) => i.name);
735
735
  }), ee = S(() => {
736
736
  var i;
737
737
  let r = y.value.modules.item;
@@ -745,17 +745,17 @@ const Kt = Qe(
745
745
  return (_ == null ? void 0 : _.orderFrom) !== ue.enum.NONE;
746
746
  });
747
747
  }
748
- return D(r, (m) => m.code || m.name);
748
+ return V(r, (m) => m.code || m.name);
749
749
  }), ye = S(() => {
750
- const r = e.menu.modules.category, i = D(r, (p) => p.name).reduce(
750
+ const r = e.menu.modules.category, i = V(r, (p) => p.name).reduce(
751
751
  (p, _, A) => (p[_._id] = A, p),
752
752
  { "": 0 }
753
753
  ), m = e.menu.modules.item;
754
- return D(
754
+ return V(
755
755
  m,
756
756
  (p) => p.code || p.name
757
757
  ).reduce((p, _, A) => (p[_._id] = A + i[_.category || ""], p), {});
758
- }), he = S(() => oe(N.value, Z.value, ee.value)), ge = S(() => {
758
+ }), ge = S(() => oe(j.value, Z.value, ee.value)), he = S(() => {
759
759
  const r = U.value.item.addon ? [
760
760
  {
761
761
  _id: e.currentCatalogId ? "" : null,
@@ -769,15 +769,15 @@ const Kt = Qe(
769
769
  r,
770
770
  e.menu.modules.item
771
771
  );
772
- }), N = S(() => {
772
+ }), j = S(() => {
773
773
  const r = y.value.modules.variant;
774
774
  return x(r, { selector: "name" });
775
775
  });
776
776
  function pe(r = []) {
777
- const i = r.map((p) => N.value.find((_) => _._id === p)).filter((p) => !!p);
777
+ const i = r.map((p) => j.value.find((_) => _._id === p)).filter((p) => !!p);
778
778
  return T.fullVariantCombination(i).reduce((p, _) => (p[_.combinationKey] = _.selectionName.join(" / "), p), {});
779
779
  }
780
- const _e = S(() => D(y.value.modules.group, (r) => r.name)), Se = S(() => x(y.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
780
+ const _e = S(() => V(y.value.modules.group, (r) => r.name)), Se = S(() => x(y.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
781
781
  selector: "name"
782
782
  })), we = S(() => x(e.menu.modules.unit, { selector: "name" })), Me = S(() => x(Le(e.menu.modules.recipe, e.menu.modules.sku), {
783
783
  selector: "name"
@@ -877,10 +877,10 @@ const Kt = Qe(
877
877
  }
878
878
  const Re = S(() => {
879
879
  var p;
880
- const r = ["SV5", "SV10"], i = Be.Country.getCountryFlattenTaxes(
880
+ const r = ["SV5", "SV10"], i = He.Country.getCountryFlattenTaxes(
881
881
  se().currentCountry.value
882
882
  ), m = i.filter((_) => u.value || !r.includes(_.taxCode)).map((_) => ({
883
- label: `${_.name} (${He(_.rate)}%)`,
883
+ label: `${_.name} (${Be(_.rate)}%)`,
884
884
  value: W(_),
885
885
  meta: {
886
886
  rate: _.rate
@@ -902,13 +902,13 @@ const Kt = Qe(
902
902
  });
903
903
  }, te = (r) => {
904
904
  e.currentCatalogId = r;
905
- }, Ve = (r) => {
906
- e.currentSchedulerId = r;
907
905
  }, De = (r) => {
906
+ e.currentSchedulerId = r;
907
+ }, Ve = (r) => {
908
908
  e.currentCategoryIds = r;
909
909
  }, Te = (r) => {
910
910
  e.currentRestaurantAttrParams = r;
911
- }, Pe = async (r, i) => {
911
+ }, Ke = async (r, i) => {
912
912
  const m = Array.isArray(r) ? r : [r];
913
913
  if (!m.length) return;
914
914
  const p = m.map((_) => ({
@@ -918,13 +918,13 @@ const Kt = Qe(
918
918
  }));
919
919
  try {
920
920
  if (i || p.some(
921
- (A) => [B.F_OPERATION_TYPE.delete, B.F_OPERATION_TYPE.deleteMany].includes(A.operation)
921
+ (A) => [H.F_OPERATION_TYPE.delete, H.F_OPERATION_TYPE.deleteMany].includes(A.operation)
922
922
  )) {
923
923
  const A = await Ge(p, e.menu.modules);
924
924
  if (A !== !0) throw new Error(A);
925
925
  }
926
926
  const _ = await wt.updateMenuModule(e.menu, p);
927
- return h(_.menu), _;
927
+ return g(_.menu), _;
928
928
  } catch (_) {
929
929
  n.open({
930
930
  type: "error",
@@ -932,22 +932,22 @@ const Kt = Qe(
932
932
  message: _
933
933
  });
934
934
  }
935
- }, Ke = async (r) => {
935
+ }, Pe = async (r) => {
936
936
  const i = {
937
937
  ...e.menu,
938
938
  masterCatalogSetting: r.masterCatalogSetting,
939
939
  lowStockThreshold: r.lowStockThreshold,
940
940
  priceTierSettings: r.priceTierSettings
941
941
  };
942
- return h(i), i;
943
- }, V = bt({ maxHistorySize: 50 }), $e = S(() => V.canUndo.value), Fe = S(() => V.canRedo.value), je = () => {
944
- const r = V.undo();
945
- r && h(r, !1);
946
- }, Ne = () => {
947
- const r = V.redo();
948
- r && h(r, !1);
942
+ return g(i), i;
943
+ }, D = bt({ maxHistorySize: 50 }), $e = S(() => D.canUndo.value), Fe = S(() => D.canRedo.value), Ne = () => {
944
+ const r = D.undo();
945
+ r && g(r, !1);
946
+ }, je = () => {
947
+ const r = D.redo();
948
+ r && g(r, !1);
949
949
  }, Ue = () => {
950
- V.clear();
950
+ D.clear();
951
951
  };
952
952
  return {
953
953
  state: e,
@@ -970,9 +970,9 @@ const Kt = Qe(
970
970
  items: ee,
971
971
  sortedItems: ye,
972
972
  itemCodeMap: Ce,
973
- categorizedItems: he,
974
- categorizedRawMenuItems: ge,
975
- variants: N,
973
+ categorizedItems: ge,
974
+ categorizedRawMenuItems: he,
975
+ variants: j,
976
976
  groups: _e,
977
977
  takeaways: Se,
978
978
  printDepartments: be,
@@ -983,16 +983,16 @@ const Kt = Qe(
983
983
  rules: U,
984
984
  taxSetting: Re,
985
985
  // Action
986
- setMenu: h,
986
+ setMenu: g,
987
987
  readMenu: xe,
988
988
  readRestaurants: Oe,
989
989
  selectCatalog: te,
990
- selectScheduler: Ve,
991
- selectCategory: De,
990
+ selectScheduler: De,
991
+ selectCategory: Ve,
992
992
  setRestaurantAttrParams: Te,
993
- updateMenu: Pe,
994
- updateMenuSetting: Ke,
995
- computeMergedMenu: g,
993
+ updateMenu: Ke,
994
+ updateMenuSetting: Pe,
995
+ computeMergedMenu: h,
996
996
  // helper
997
997
  encodeTax: W,
998
998
  decodeTax: Ee,
@@ -1001,8 +1001,8 @@ const Kt = Qe(
1001
1001
  // history
1002
1002
  canUndoHistory: $e,
1003
1003
  canRedoHistory: Fe,
1004
- undoHistory: je,
1005
- redoHistory: Ne,
1004
+ undoHistory: Ne,
1005
+ redoHistory: je,
1006
1006
  // cleanup
1007
1007
  $dispose: () => {
1008
1008
  w.cancel(), E && (E(), E = null), C && (C.stop(), C = null), Ue();
@@ -1015,9 +1015,9 @@ const Kt = Qe(
1015
1015
  );
1016
1016
  export {
1017
1017
  Tt as a,
1018
- Pt as f,
1019
- Dt as g,
1020
- Vt as m,
1018
+ Kt as f,
1019
+ Vt as g,
1020
+ Dt as m,
1021
1021
  it as o,
1022
- Kt as u
1022
+ Pt as u
1023
1023
  };
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as q, ref as V, h as S, computed as N, resolveComponent as I, createBlock as X, openBlock as w, unref as l, withCtx as x, createElementVNode as k, createVNode as v, watch as Z, createElementBlock as L, Fragment as B, renderSlot as ee, renderList as G, toDisplayString as $, createCommentVNode as ae, getCurrentInstance as te, render as ne } from "vue";
2
- import { u as Y, P as oe, B as le, J as M, K } from "./index.vue_vue_type_script_setup_true_lang-4QceDakZ.js";
2
+ import { u as Y, P as oe, B as le, J as M, K } from "./index.vue_vue_type_script_setup_true_lang-Bxs-AkVQ.js";
3
3
  import { useI18n as R } from "@feedmepos/mf-common";
4
4
  import { components as A, FmButtonVariant as re, FmButtonColorThemeVariant as j, useSnackbar as ie } from "@feedmepos/ui-library";
5
- import { _ as H, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-CK-Ihn0s.js";
5
+ import { _ as H, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-DATrEmoz.js";
6
6
  import { c as de } from "./object-DVUNCr7w.js";
7
- import { _ as ue } from "./app-Gu39_jfp.js";
8
- import { L as ce } from "./LinkProductSideSheet-CHdOh6yv.js";
7
+ import { _ as ue } from "./app-CUT-XiX7.js";
8
+ import { L as ce } from "./LinkProductSideSheet-DekFylFC.js";
9
9
  import { u as me } from "./search-BAPEUu1R.js";
10
- import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-D29F0bn-.js";
10
+ import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-qp1XGtIS.js";
11
11
  import { c as ge } from "./check-C9mY6LiX.js";
12
12
  import { g as J } from "./translation-fNx6yEpy.js";
13
13
  import { c as _e } from "./createComponentProgrammatically-Bt2rn1IQ.js";