@feedmepos/mf-menu 0.31.68-prod → 0.31.69-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.
Files changed (66) hide show
  1. package/dist/{App-CI--QrVG.js → App-Byjppp7I.js} +8 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-fG_BJMQJ.js → ApplyProduct.vue_vue_type_script_setup_true_lang-a3SOjvXY.js} +3 -3
  3. package/dist/{Catalog-BMPz4HgZ.js → Catalog-Bx3K7UqS.js} +6 -6
  4. package/dist/{Category-DwIcXBXO.js → Category-BxfQ5OjG.js} +6 -6
  5. package/dist/{Category-CXoXOkqP.js → Category-C01Ct1Tf.js} +4 -4
  6. package/dist/{CookingGuide-CgBbTKGz.js → CookingGuide-CsTgj78F.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CvPRLahQ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Dn-rOcky.js} +1 -1
  8. package/dist/{Group-DdWKntFD.js → Group-BUT2zIZO.js} +3 -3
  9. package/dist/{Group-FT5kjJpF.js → Group-DqV3QKc-.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-kypU8KME.js → Group.vue_vue_type_script_setup_true_lang-uzYIOv4G.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C7nVEyP0.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-zJW4-S9p.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-B0knYCDR.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-7qMW2Pv6.js} +7 -7
  13. package/dist/{Ingredient-BGxrfK_P.js → Ingredient-CM1T0bUh.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-QKmtShaF.js → InventoryBinding.vue_vue_type_script_setup_true_lang-NETtbB15.js} +1052 -1052
  15. package/dist/{LinkProductSideSheet-D3N9WMt-.js → LinkProductSideSheet-CcqAYsNl.js} +3 -3
  16. package/dist/{MenuSetting-fCW7yn9L.js → MenuSetting-DYb7ukCf.js} +5 -5
  17. package/dist/{PrintRoute-C8WpVMCg.js → PrintRoute-Cok4l1zV.js} +4 -4
  18. package/dist/{Product-CesK0Jb_.js → Product-Dhc4Adhn.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CL7p1L26.js → Product.vue_vue_type_script_setup_true_lang-Cz-_UH53.js} +13 -13
  20. package/dist/{ProductInternalTools-Dvc4yvoP.js → ProductInternalTools-D0RSqHy-.js} +5 -5
  21. package/dist/{Products-y63EZezp.js → Products-Cqm3G5zr.js} +11 -11
  22. package/dist/{Publish-CXAFN9nH.js → Publish-B4tEDino.js} +3 -3
  23. package/dist/{Recipe-I6KXcYS5.js → Recipe-7Dmy8ftx.js} +4 -4
  24. package/dist/{Scheduler-CUxGoAYV.js → Scheduler-DdRzLW-P.js} +3 -3
  25. package/dist/{ServingSequence-CsUY7XGL.js → ServingSequence-BInVw61-.js} +3 -3
  26. package/dist/{Setting-DTIndhgh.js → Setting-DcmNcix_.js} +5 -5
  27. package/dist/{Subcategory-DS7AB3OH.js → Subcategory-BJPHM19c.js} +4 -4
  28. package/dist/{Takeaway-D2InRA7G.js → Takeaway-CAMQB-IJ.js} +1 -1
  29. package/dist/{Takeaway-DriZgLXL.js → Takeaway-DffrT2Oe.js} +4 -4
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BvRQJjRj.js → Takeaway.vue_vue_type_script_setup_true_lang-d739Y4lL.js} +5 -5
  31. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CaA4nQjq.js → Thumbnail.vue_vue_type_script_setup_true_lang-DadgzMI1.js} +4 -4
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BVDbtq9o.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DBz3IAPN.js} +399 -394
  33. package/dist/{Unit-Bex-a7lb.js → Unit-DAjjHptw.js} +2 -2
  34. package/dist/{Variant-BzVsT2jm.js → Variant-DbK_VSB4.js} +3 -3
  35. package/dist/{_id_-Dl5bCv02.js → _id_-BekyhQuo.js} +10 -10
  36. package/dist/{app-B50mNq4C.js → app-DtCzoQbv.js} +30 -30
  37. package/dist/{app-EO3mkzdW.js → app-Dy_PpbJy.js} +1 -1
  38. package/dist/app.js +1 -1
  39. package/dist/apps/mf-menu/src/app.d.ts +4 -0
  40. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +5 -0
  41. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/assets/{linked-status-CXB_01B1.js → linked-status-BtBrdkGB.js} +2 -2
  43. package/dist/assets/{override-menu-CgijweKW.js → override-menu-aFa61roK.js} +2 -2
  44. package/dist/assets/{validate-menu-CdAJ-JHM.js → validate-menu-59YPNrR_.js} +2 -2
  45. package/dist/{catalog-BHir10AP.js → catalog-BMQMzuhB.js} +1 -1
  46. package/dist/{catalogSetting-Cl0DxvXL.js → catalogSetting-CQzUjCKe.js} +1 -1
  47. package/dist/{category-BHYLTJJC.js → category-COs21nTW.js} +1 -1
  48. package/dist/{currency-B98FhcGK.js → currency-Dhnr3ve1.js} +1 -1
  49. package/dist/{customAttributes-ogWxq4Tm.js → customAttributes-3FR2K7UT.js} +1 -1
  50. package/dist/{dayjs.min-B-U1bqfv.js → dayjs.min-Ch62VG8w.js} +1 -1
  51. package/dist/{index-CTTVuqw7.js → index-BtcFkeQa.js} +3 -3
  52. package/dist/{index-C2cz9wGc.js → index-C7QPwnik.js} +4 -4
  53. package/dist/{index-ClJpoaAA.js → index-D12PAJYh.js} +1 -1
  54. package/dist/{index-B8Gn-X1l.js → index-eArd_3kW.js} +1 -1
  55. package/dist/{item-BZMS-TO_.js → item-B-j4iPOr.js} +4698 -4689
  56. package/dist/{jszip.min-CNLRuEMk.js → jszip.min-5blhaVPG.js} +245 -245
  57. package/dist/{menu-lVDeJ_wR.js → menu-Ca6KeFDH.js} +4 -4
  58. package/dist/{menu-BCVYl65c.js → menu-CxC6-3Ha.js} +1 -1
  59. package/dist/{menuV2-aTjHrm3W.js → menuV2-vW_kPd7g.js} +197 -197
  60. package/dist/mf-menu.css +1 -1
  61. package/dist/{priceTier-Ck2eQXnO.js → priceTier-DnE-LoIJ.js} +1 -1
  62. package/dist/{scheduler-Bl99ja7r.js → scheduler-DJ9vrIaV.js} +4 -4
  63. package/dist/{subcategory-CAFBSz0j.js → subcategory-BtKCfoK9.js} +2 -2
  64. package/dist/{toExcel-B5Ixpgtd.js → toExcel-B8G6ceKY.js} +2 -2
  65. package/dist/{unit-DmdOuyXm.js → unit-8ggZO-G6.js} +2 -2
  66. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  import { computed as D, shallowRef as Wt, ref as q, watch as ye, nextTick as nt, getCurrentInstance as xn, onMounted as Ae, defineComponent as ae, resolveComponent as W, createElementBlock as J, openBlock as $, createBlock as H, normalizeClass as fe, createElementVNode as A, createVNode as C, unref as o, withCtx as B, toDisplayString as ge, mergeModels as qt, useModel as Ht, createCommentVNode as X, resolveDirective as Xt, withDirectives as ft, createTextVNode as Sn, renderSlot as Me, h as ve, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as He, createSlots as Fn, onBeforeUnmount as Ot, watchEffect as On, onUnmounted as Dn, normalizeStyle as ct, mergeProps as Vn, normalizeProps as $n, guardReactiveProps as Pn, Teleport as Un, Transition as Rn, withKeys as Mn } from "vue";
2
- import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as qn, r as Hn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-BZMS-TO_.js";
3
- import { _ as eo, T as to } from "./app-B50mNq4C.js";
4
- import { B as be, J as _e, A as te, G as ot, K as no, M as oo, N as ro, O as Vt, P as ao, D as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-lVDeJ_wR.js";
2
+ import { g as An, o as Nn, f as Ln, a as Gn, n as Qt, _ as Zt, I as Kn, S as Bn, b as Dt, C as zn, R as We, c as en, d as Et, e as tn, h as Yn, m as jn, F as Wn, M as nn, j as qn, r as Hn, k as on, l as Nt, p as rn, q as Xn, P as Jn, s as Qn, t as an, u as Zn, T as Be } from "./item-B-j4iPOr.js";
3
+ import { _ as eo, T as to } from "./app-DtCzoQbv.js";
4
+ import { B as be, J as _e, A as te, G as ot, K as no, M as oo, N as ro, O as Vt, P as ao, D as Le, Q as lo, H as me, R as io, T as $t, I as ke, U as vt, V as so, W as uo, X as bt, Y as Lt, Z as co, u as ln, $ as mo } from "./menu-Ca6KeFDH.js";
5
5
  import { useI18n as ce, useCoreStore as rt, CustomAttributesForm as sn } from "@feedmepos/mf-common";
6
6
  import { useDialog as Ge, useDialogChild as Pt, useSnackbar as Re, FmButtonColorThemeVariant as Fe, components as Ie, FmButtonVariant as qe, useBreakpoints as po } from "@feedmepos/ui-library";
7
7
  import { u as Ut } from "./discardConfirm-BHni0LNu.js";
8
8
  import { defineStore as fo } from "pinia";
9
- import { _ as De, a as Ue, b as go } from "./customAttributes-ogWxq4Tm.js";
10
- import { u as se, g as un, m as vo } from "./menuV2-aTjHrm3W.js";
11
- import { s as Tt, _ as bo } from "./index-B8Gn-X1l.js";
12
- import { _ as Gt } from "./category-BHYLTJJC.js";
13
- import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CaA4nQjq.js";
14
- import { _ as Ze, L as xt } from "./LinkProductSideSheet-D3N9WMt-.js";
9
+ import { _ as De, a as Ue, b as go } from "./customAttributes-3FR2K7UT.js";
10
+ import { u as se, g as un, m as vo } from "./menuV2-vW_kPd7g.js";
11
+ import { s as Tt, _ as bo } from "./index-eArd_3kW.js";
12
+ import { _ as Gt } from "./category-COs21nTW.js";
13
+ import { _ as _o, a as yo, u as ho } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DadgzMI1.js";
14
+ import { _ as Ze, L as xt } from "./LinkProductSideSheet-CcqAYsNl.js";
15
15
  import { _ as dn } from "./tooltip-CQW9YRO5.js";
16
- import { _ as Xe, T as wo, l as Co } from "./index-C2cz9wGc.js";
16
+ import { _ as Xe, T as wo, l as Co } from "./index-C7QPwnik.js";
17
17
  import { u as Io } from "./search-BAPEUu1R.js";
18
18
  import { c as Rt } from "./check-C9mY6LiX.js";
19
- import { f as tt } from "./currency-B98FhcGK.js";
19
+ import { f as tt } from "./currency-Dhnr3ve1.js";
20
20
  import { c as ko } from "./string-DpfFixWH.js";
21
21
  import { useInventoryStore as Eo, InventoryBindingSummary as To } from "@feedmepos/mf-inventory-portal";
22
- import { u as xo } from "./priceTier-Ck2eQXnO.js";
22
+ import { u as xo } from "./priceTier-DnE-LoIJ.js";
23
23
  import { d as Mt } from "./vuedraggable-CK8z7qA8.js";
24
- import { _ as So } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-fG_BJMQJ.js";
24
+ import { _ as So } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-a3SOjvXY.js";
25
25
  import "./app-5fxKLAzS.js";
26
26
  /* empty css */
27
- import { i as Fo, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-ClJpoaAA.js";
27
+ import { i as Fo, t as At, w as Oo, a as cn, b as mn, n as Do, c as Vo, r as $o, _ as Po } from "./index-D12PAJYh.js";
28
28
  import { c as mt } from "./object-DVUNCr7w.js";
29
29
  import { _ as Uo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
30
30
  import { _ as Kt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
@@ -40,15 +40,15 @@ function Bt(...n) {
40
40
  return Do;
41
41
  Array.isArray(e) || (e = [e]), Array.isArray(t) || (t = [t]);
42
42
  const s = [], g = () => {
43
- s.forEach((b) => b()), s.length = 0;
44
- }, d = (b, v, f, a) => (b.addEventListener(v, f, a), () => b.removeEventListener(v, f, a)), h = ye(
43
+ s.forEach((_) => _()), s.length = 0;
44
+ }, d = (_, b, f, a) => (_.addEventListener(b, f, a), () => _.removeEventListener(b, f, a)), h = ye(
45
45
  () => [ze(r), At(m)],
46
- ([b, v]) => {
47
- if (g(), !b)
46
+ ([_, b]) => {
47
+ if (g(), !_)
48
48
  return;
49
- const f = Vo(v) ? { ...v } : v;
49
+ const f = Vo(b) ? { ...b } : b;
50
50
  s.push(
51
- ...e.flatMap((a) => t.map((I) => d(b, a, I, f)))
51
+ ...e.flatMap((a) => t.map((I) => d(_, a, I, f)))
52
52
  );
53
53
  },
54
54
  { immediate: !0, flush: "post" }
@@ -119,14 +119,14 @@ function Bo(n, r, e, t = {}) {
119
119
  listenToStorageChanges: d = !0,
120
120
  writeDefaults: h = !0,
121
121
  mergeDefaults: w = !1,
122
- shallow: b,
123
- window: v = Je,
122
+ shallow: _,
123
+ window: b = Je,
124
124
  eventFilter: f,
125
125
  onError: a = (l) => {
126
126
  console.error(l);
127
127
  },
128
128
  initOnMounted: I
129
- } = t, S = (b ? Wt : q)(typeof r == "function" ? r() : r);
129
+ } = t, S = (_ ? Wt : q)(typeof r == "function" ? r() : r);
130
130
  if (!e)
131
131
  try {
132
132
  e = Lo("getDefaultStorage", () => {
@@ -143,11 +143,11 @@ function Bo(n, r, e, t = {}) {
143
143
  () => F(S.value),
144
144
  { flush: s, deep: g, eventFilter: f }
145
145
  );
146
- v && d && cn(() => {
147
- Bt(v, "storage", E), Bt(v, zt, u), I && E();
146
+ b && d && cn(() => {
147
+ Bt(b, "storage", E), Bt(b, zt, u), I && E();
148
148
  }), I || E();
149
149
  function M(l, i) {
150
- v && v.dispatchEvent(new CustomEvent(zt, {
150
+ b && b.dispatchEvent(new CustomEvent(zt, {
151
151
  detail: {
152
152
  key: n,
153
153
  oldValue: l,
@@ -162,8 +162,8 @@ function Bo(n, r, e, t = {}) {
162
162
  if (l == null)
163
163
  M(i, null), e.removeItem(n);
164
164
  else {
165
- const _ = p.write(l);
166
- i !== _ && (e.setItem(n, _), M(i, _));
165
+ const v = p.write(l);
166
+ i !== v && (e.setItem(n, v), M(i, v));
167
167
  }
168
168
  } catch (i) {
169
169
  a(i);
@@ -174,8 +174,8 @@ function Bo(n, r, e, t = {}) {
174
174
  if (i == null)
175
175
  return h && O != null && e.setItem(n, p.write(O)), O;
176
176
  if (!l && w) {
177
- const _ = p.read(i);
178
- return typeof w == "function" ? w(_, O) : k === "object" && !Array.isArray(_) ? { ...O, ..._ } : _;
177
+ const v = p.read(i);
178
+ return typeof w == "function" ? w(v, O) : k === "object" && !Array.isArray(v) ? { ...O, ...v } : v;
179
179
  } else return typeof i != "string" ? i : p.read(i);
180
180
  }
181
181
  function E(l) {
@@ -206,32 +206,32 @@ function zo(n, r, e = {}) {
206
206
  let s;
207
207
  const g = Mo(() => t && "ResizeObserver" in t), d = () => {
208
208
  s && (s.disconnect(), s = void 0);
209
- }, h = D(() => Array.isArray(n) ? n.map((v) => ze(v)) : [ze(n)]), w = ye(
209
+ }, h = D(() => Array.isArray(n) ? n.map((b) => ze(b)) : [ze(n)]), w = ye(
210
210
  h,
211
- (v) => {
211
+ (b) => {
212
212
  if (d(), g.value && t) {
213
213
  s = new ResizeObserver(r);
214
- for (const f of v)
214
+ for (const f of b)
215
215
  f && s.observe(f, m);
216
216
  }
217
217
  },
218
218
  { immediate: !0, flush: "post" }
219
- ), b = () => {
219
+ ), _ = () => {
220
220
  d(), w();
221
221
  };
222
- return mn(b), {
222
+ return mn(_), {
223
223
  isSupported: g,
224
- stop: b
224
+ stop: _
225
225
  };
226
226
  }
227
227
  function Yo(n, r = { width: 0, height: 0 }, e = {}) {
228
228
  const { window: t = Je, box: m = "content-box" } = e, s = D(() => {
229
- var v, f;
230
- return (f = (v = ze(n)) == null ? void 0 : v.namespaceURI) == null ? void 0 : f.includes("svg");
229
+ var b, f;
230
+ return (f = (b = ze(n)) == null ? void 0 : b.namespaceURI) == null ? void 0 : f.includes("svg");
231
231
  }), g = q(r.width), d = q(r.height), { stop: h } = zo(
232
232
  n,
233
- ([v]) => {
234
- const f = m === "border-box" ? v.borderBoxSize : m === "content-box" ? v.contentBoxSize : v.devicePixelContentBoxSize;
233
+ ([b]) => {
234
+ const f = m === "border-box" ? b.borderBoxSize : m === "content-box" ? b.contentBoxSize : b.devicePixelContentBoxSize;
235
235
  if (t && s.value) {
236
236
  const a = ze(n);
237
237
  if (a) {
@@ -242,27 +242,27 @@ function Yo(n, r = { width: 0, height: 0 }, e = {}) {
242
242
  const a = Array.isArray(f) ? f : [f];
243
243
  g.value = a.reduce((I, { inlineSize: S }) => I + S, 0), d.value = a.reduce((I, { blockSize: S }) => I + S, 0);
244
244
  } else
245
- g.value = v.contentRect.width, d.value = v.contentRect.height;
245
+ g.value = b.contentRect.width, d.value = b.contentRect.height;
246
246
  },
247
247
  e
248
248
  );
249
249
  cn(() => {
250
- const v = ze(n);
251
- v && (g.value = "offsetWidth" in v ? v.offsetWidth : r.width, d.value = "offsetHeight" in v ? v.offsetHeight : r.height);
250
+ const b = ze(n);
251
+ b && (g.value = "offsetWidth" in b ? b.offsetWidth : r.width, d.value = "offsetHeight" in b ? b.offsetHeight : r.height);
252
252
  });
253
253
  const w = ye(
254
254
  () => ze(n),
255
- (v) => {
256
- g.value = v ? r.width : 0, d.value = v ? r.height : 0;
255
+ (b) => {
256
+ g.value = b ? r.width : 0, d.value = b ? r.height : 0;
257
257
  }
258
258
  );
259
- function b() {
259
+ function _() {
260
260
  h(), w();
261
261
  }
262
262
  return {
263
263
  width: g,
264
264
  height: d,
265
- stop: b
265
+ stop: _
266
266
  };
267
267
  }
268
268
  function jo(n, r, e = {}) {
@@ -321,9 +321,9 @@ function vn(n, r, e, t, { containerRef: m, state: s, currentList: g, source: d }
321
321
  return () => {
322
322
  const h = m.value;
323
323
  if (h) {
324
- const w = e(n === "vertical" ? h.scrollTop : h.scrollLeft), b = t(n === "vertical" ? h.clientHeight : h.clientWidth), v = w - r, f = w + b + r;
324
+ const w = e(n === "vertical" ? h.scrollTop : h.scrollLeft), _ = t(n === "vertical" ? h.clientHeight : h.clientWidth), b = w - r, f = w + _ + r;
325
325
  s.value = {
326
- start: v < 0 ? 0 : v,
326
+ start: b < 0 ? 0 : b,
327
327
  end: f > d.value.length ? d.value.length : f
328
328
  }, g.value = d.value.slice(s.value.start, s.value.end).map((a, I) => ({
329
329
  data: a,
@@ -353,7 +353,7 @@ function hn(n, r, e, t) {
353
353
  };
354
354
  }
355
355
  function Ho(n, r) {
356
- const e = pn(r), { state: t, source: m, currentList: s, size: g, containerRef: d } = e, h = { overflowX: "auto" }, { itemWidth: w, overscan: b = 5 } = n, v = fn(t, m, w), f = gn(m, w), a = vn("horizontal", b, f, v, e), I = bn(w, m), S = D(() => I(t.value.start)), O = yn(w, m);
356
+ const e = pn(r), { state: t, source: m, currentList: s, size: g, containerRef: d } = e, h = { overflowX: "auto" }, { itemWidth: w, overscan: _ = 5 } = n, b = fn(t, m, w), f = gn(m, w), a = vn("horizontal", _, f, b, e), I = bn(w, m), S = D(() => I(t.value.start)), O = yn(w, m);
357
357
  _n(g, r, d, a);
358
358
  const k = hn("horizontal", a, I, d), p = D(() => ({
359
359
  style: {
@@ -373,7 +373,7 @@ function Ho(n, r) {
373
373
  };
374
374
  }
375
375
  function Xo(n, r) {
376
- const e = pn(r), { state: t, source: m, currentList: s, size: g, containerRef: d } = e, h = { overflowY: "auto" }, { itemHeight: w, overscan: b = 5 } = n, v = fn(t, m, w), f = gn(m, w), a = vn("vertical", b, f, v, e), I = bn(w, m), S = D(() => I(t.value.start)), O = yn(w, m);
376
+ const e = pn(r), { state: t, source: m, currentList: s, size: g, containerRef: d } = e, h = { overflowY: "auto" }, { itemHeight: w, overscan: _ = 5 } = n, b = fn(t, m, w), f = gn(m, w), a = vn("vertical", _, f, b, e), I = bn(w, m), S = D(() => I(t.value.start)), O = yn(w, m);
377
377
  _n(g, r, d, a);
378
378
  const k = hn("vertical", a, I, d), p = D(() => ({
379
379
  style: {
@@ -425,12 +425,12 @@ function Qo(n, r) {
425
425
  e.add(g.parent.id), g = g.parent;
426
426
  }
427
427
  function m(s, g) {
428
- var v, f;
428
+ var b, f;
429
429
  if (g.length === 0 || !s)
430
430
  return s;
431
431
  const d = [
432
432
  s.label.toLowerCase(),
433
- (v = s.rightLabel) == null ? void 0 : v.label.toLowerCase(),
433
+ (b = s.rightLabel) == null ? void 0 : b.label.toLowerCase(),
434
434
  ...((f = s.chips) == null ? void 0 : f.map((a) => a.label.toLowerCase())) ?? []
435
435
  ].join(" "), h = g[0].query.every((a) => d.includes(a.toLowerCase()));
436
436
  h && g.slice(1).length === 0 && t(s);
@@ -495,7 +495,7 @@ function nr(n) {
495
495
  const at = fo("mf-menu-tree", () => {
496
496
  const n = q(), r = q([]), e = q(null), t = q([]);
497
497
  function m(f) {
498
- r.value = f, b.value = tr(f);
498
+ r.value = f, _.value = tr(f);
499
499
  }
500
500
  function s(f) {
501
501
  e.value = f;
@@ -506,7 +506,7 @@ const at = fo("mf-menu-tree", () => {
506
506
  function d(f) {
507
507
  if (!f)
508
508
  return;
509
- const a = b.value.get(f);
509
+ const a = _.value.get(f);
510
510
  a && (e.value = a.id);
511
511
  }
512
512
  async function h() {
@@ -523,9 +523,9 @@ const at = fo("mf-menu-tree", () => {
523
523
  a(I);
524
524
  t.value = f;
525
525
  }
526
- const b = q(/* @__PURE__ */ new Map());
527
- function v(f) {
528
- return b.value.get(f);
526
+ const _ = q(/* @__PURE__ */ new Map());
527
+ function b(f) {
528
+ return _.value.get(f);
529
529
  }
530
530
  return {
531
531
  treeRef: n,
@@ -538,7 +538,7 @@ const at = fo("mf-menu-tree", () => {
538
538
  setExpandedNodeIds: g,
539
539
  collapseAllNodes: h,
540
540
  expandAllNodes: w,
541
- getNodeById: v
541
+ getNodeById: b
542
542
  };
543
543
  });
544
544
  let st = null, Ye = null, je = null;
@@ -548,11 +548,11 @@ function wn() {
548
548
  function or(n, r, e) {
549
549
  function m(w) {
550
550
  if (!n.value) return !1;
551
- const b = n.value.validate();
552
- if (b != null && b.length && b.length > 0)
551
+ const _ = n.value.validate();
552
+ if (_ != null && _.length && _.length > 0)
553
553
  return !1;
554
- const v = w;
555
- return s(v), st = { ...v }, Ye && clearTimeout(Ye), je = () => {
554
+ const b = w;
555
+ return s(b), st = { ...b }, Ye && clearTimeout(Ye), je = () => {
556
556
  st && (g(st), st = null), Ye = null;
557
557
  }, Ye = setTimeout(() => {
558
558
  je && je(), je = null;
@@ -572,30 +572,30 @@ function or(n, r, e) {
572
572
  });
573
573
  }
574
574
  function h(w) {
575
- const b = An(
575
+ const _ = An(
576
576
  [w],
577
577
  r.state.menu,
578
578
  r.state.currentCatalogId,
579
579
  r.state.currentSchedulerId
580
580
  );
581
581
  if (r.state.currentCatalogId) {
582
- const v = b.modules.catalog.find(
582
+ const b = _.modules.catalog.find(
583
583
  (f) => f._id === r.state.currentCatalogId
584
584
  );
585
585
  return r.updateMenu({
586
586
  module: te.F_MENU_MODULE_V4_KEY.enum.catalog,
587
587
  operation: _e.F_OPERATION_TYPE.update,
588
- data: v
588
+ data: b
589
589
  }), !0;
590
590
  }
591
591
  if (r.state.currentSchedulerId) {
592
- const v = b.modules.scheduler.find(
592
+ const b = _.modules.scheduler.find(
593
593
  (f) => f._id === r.state.currentSchedulerId
594
594
  );
595
595
  return r.updateMenu({
596
596
  module: te.F_MENU_MODULE_V4_KEY.enum.scheduler,
597
597
  operation: _e.F_OPERATION_TYPE.update,
598
- data: v
598
+ data: b
599
599
  }), !0;
600
600
  }
601
601
  return !1;
@@ -628,8 +628,8 @@ function ar({
628
628
  if (!r && e)
629
629
  return (g = (s = n.modules.scheduler.find((h) => h._id === e)) == null ? void 0 : s.items) == null ? void 0 : g.filter((h) => h._id === t);
630
630
  {
631
- const h = n.modules.catalog.find((b) => b._id === r), w = h == null ? void 0 : h.override.scheduler[e];
632
- return (d = w == null ? void 0 : w.items) == null ? void 0 : d.filter((b) => b._id === t);
631
+ const h = n.modules.catalog.find((_) => _._id === r), w = h == null ? void 0 : h.override.scheduler[e];
632
+ return (d = w == null ? void 0 : w.items) == null ? void 0 : d.filter((_) => _._id === t);
633
633
  }
634
634
  }
635
635
  function lr(n, r, e, t) {
@@ -749,29 +749,29 @@ const gt = () => {
749
749
  async function m([w]) {
750
750
  if (!w) return;
751
751
  t.value = !0;
752
- const b = new FileReader();
753
- b.onload = () => {
754
- const v = new Image();
755
- v.src = b.result, v.onload = () => {
756
- const f = Gn(v, 1.3333333333333333);
752
+ const _ = new FileReader();
753
+ _.onload = () => {
754
+ const b = new Image();
755
+ b.src = _.result, b.onload = () => {
756
+ const f = Gn(b, 1.3333333333333333);
757
757
  e.value = f, t.value = !1;
758
- }, v.onerror = () => {
758
+ }, b.onerror = () => {
759
759
  t.value = !1;
760
760
  };
761
- }, b.readAsDataURL(w);
761
+ }, _.readAsDataURL(w);
762
762
  }
763
763
  const s = (w) => {
764
764
  m([w]);
765
765
  }, { emitData: g } = Pt();
766
766
  async function d(w) {
767
- const { canvas: b } = w, v = b.toDataURL("image/jpeg", 0.75), f = await (await fetch(v)).blob(), a = new File([f], "img.jpeg", { type: "image/jpeg" });
767
+ const { canvas: _ } = w, b = _.toDataURL("image/jpeg", 0.75), f = await (await fetch(b)).blob(), a = new File([f], "img.jpeg", { type: "image/jpeg" });
768
768
  g(a);
769
769
  }
770
770
  function h() {
771
771
  e.value = void 0, g(null);
772
772
  }
773
- return (w, b) => {
774
- const v = W("fm-icon"), f = W("fm-drop-field");
773
+ return (w, _) => {
774
+ const b = W("fm-icon"), f = W("fm-drop-field");
775
775
  return $(), J("div", sr, [
776
776
  e.value ? ($(), J("div", ur, [
777
777
  A("div", dr, [
@@ -801,7 +801,7 @@ const gt = () => {
801
801
  type: "button",
802
802
  onClick: h
803
803
  }, [
804
- C(v, { name: "close" })
804
+ C(b, { name: "close" })
805
805
  ])
806
806
  ])
807
807
  ])) : ($(), H(f, {
@@ -875,14 +875,14 @@ const gr = {
875
875
  text: "Cancel",
876
876
  close: !0
877
877
  }
878
- }).onPrimary(async (b) => {
878
+ }).onPrimary(async (_) => {
879
879
  await h.minor(async () => {
880
- if (!b)
880
+ if (!_)
881
881
  throw new Error("No image selected");
882
882
  if (!e.itemId)
883
883
  throw new Error("Item ID is required when uploading image");
884
- const v = no(e.itemId);
885
- await oo.update(v, b, fr.firebase.storageBucket), t.value = ro(v);
884
+ const b = no(e.itemId);
885
+ await oo.update(b, _, fr.firebase.storageBucket), t.value = ro(b);
886
886
  }, {
887
887
  message: "Uploading image...",
888
888
  successMessage: "Image uploaded successfully",
@@ -890,7 +890,7 @@ const gr = {
890
890
  });
891
891
  });
892
892
  };
893
- return (b, v) => {
893
+ return (_, b) => {
894
894
  const f = W("FmButton"), a = W("FmFormGroup");
895
895
  return $(), H(a, {
896
896
  tag: "div",
@@ -899,7 +899,7 @@ const gr = {
899
899
  "label-mark": "optional"
900
900
  }, {
901
901
  default: B(() => [A("div", {
902
- class: fe(`relative container ${b.disabled ? "cursor-not-allowed" : ""}`)
902
+ class: fe(`relative container ${_.disabled ? "cursor-not-allowed" : ""}`)
903
903
  }, [C(_o, {
904
904
  size: {
905
905
  width: 200,
@@ -907,7 +907,7 @@ const gr = {
907
907
  },
908
908
  src: t.value,
909
909
  alt: "Product image"
910
- }, null, 8, ["src"]), b.disabled ? X("", !0) : ($(), J("div", gr, [A("div", vr, [C(f, {
910
+ }, null, 8, ["src"]), _.disabled ? X("", !0) : ($(), J("div", gr, [A("div", vr, [C(f, {
911
911
  icon: t.value ? "edit" : "add",
912
912
  variant: "secondary",
913
913
  "text-color": o(Fe).NeutralGray400,
@@ -975,44 +975,47 @@ const Dr = /* @__PURE__ */ ae({
975
975
  }) {
976
976
  const e = n, t = se(), m = gt(), {
977
977
  checkMenuIsLoading: s
978
- } = Vt(ot(Re())), g = rt(), d = r, h = D(() => t.rules.item), w = D(() => t.categorizedItems), b = D(() => {
979
- const i = w.value.map((_) => ({
980
- label: _.name,
981
- value: _.id
978
+ } = Vt(ot(Re())), g = rt(), d = r, h = D(() => t.rules.item), w = D(() => t.categorizedItems), _ = D(() => {
979
+ const i = w.value.map((v) => ({
980
+ label: v.name,
981
+ value: v.id
982
982
  }));
983
- return e.isAddon ? i : i.filter((_) => !!_.value);
984
- }), v = D(() => h.value.addon), f = D(() => !b.value.find((i) => !!i.value)), a = D(() => ao(e.form.category ? e.form : e.fallback) || []), I = D(() => a.value.reduce((i, _) => (i[_._id] = _, i), {})), S = D({
983
+ return e.isAddon ? i : i.filter((v) => !!v.value);
984
+ }), b = D(() => h.value.addon), f = D(() => !_.value.find((i) => !!i.value)), a = D(() => ao(e.form.category ? e.form : e.fallback) || []), I = D(() => a.value.reduce((i, v) => (i[v._id] = v, i), {})), S = D({
985
985
  get() {
986
986
  return a.value.map((i) => i._id);
987
987
  },
988
988
  set(i = []) {
989
- const [_, ...x] = i.map((y) => {
989
+ const [v, ...x] = i.map((y) => {
990
990
  const P = I.value[y];
991
991
  return P || {
992
992
  _id: y,
993
993
  position: null
994
994
  };
995
995
  });
996
- if (!_) {
996
+ if (!v) {
997
997
  d("update:form", "category", null), d("update:form", "additionalCategories", []);
998
998
  return;
999
999
  }
1000
- d("update:form", "category", _._id), d("update:form", "additionalCategories", x);
1000
+ d("update:form", "category", v._id), d("update:form", "additionalCategories", x);
1001
1001
  }
1002
- }), O = q(), k = () => e.isAddon ? null : C(zn, {
1002
+ }), O = q(), k = ({
1003
+ multiple: i = !0
1004
+ } = {}) => e.isAddon ? null : C(zn, {
1003
1005
  ref: O,
1004
1006
  disabled: !h.value.category || s(),
1005
- items: b.value,
1007
+ items: _.value,
1006
1008
  modelValue: S.value,
1007
- "onUpdate:model-value": (i) => S.value = i,
1008
- placeholder: l("menu.product.form.detail.category.placeholder")
1009
+ "onUpdate:model-value": (v) => S.value = v,
1010
+ placeholder: l("menu.product.form.detail.category.placeholder"),
1011
+ multiple: i
1009
1012
  }, {
1010
1013
  "append-menu": () => C("button", {
1011
1014
  class: "flex items-center py-8 px-16 space-x-8",
1012
1015
  type: "button",
1013
1016
  onClick: () => {
1014
- var i;
1015
- (i = O.value) == null || i.hideMenu(), m.create();
1017
+ var v;
1018
+ (v = O.value) == null || v.hideMenu(), m.create();
1016
1019
  }
1017
1020
  }, [C(Ie.FmIcon, {
1018
1021
  color: "primary",
@@ -1026,19 +1029,19 @@ const Dr = /* @__PURE__ */ ae({
1026
1029
  !f.value && e.form.category === void 0 && e.isCreate && U(Pe.PRODUCT);
1027
1030
  });
1028
1031
  const p = D(() => {
1029
- var _;
1030
- const i = e.form.name || ((_ = e.fallback) == null ? void 0 : _.name);
1032
+ var v;
1033
+ const i = e.form.name || ((v = e.fallback) == null ? void 0 : v.name);
1031
1034
  return i ? t.items.filter((x) => !!x.category && x._id !== e.form._id && x.name === i).length : 0;
1032
1035
  }), T = D(() => e.isAddon ? Pe.ADD_ON : Pe.PRODUCT);
1033
1036
  function U(i) {
1034
1037
  var x, y, P;
1035
1038
  if (T.value === i) return;
1036
- const _ = i == Pe.ADD_ON;
1037
- d("update:form", "category", e.isOverride ? _ ? "" : ((x = e.fallback) == null ? void 0 : x.category) ?? ((y = b.value.find((j) => !!j.value)) == null ? void 0 : y.value) : _ ? null : (P = b.value.find((j) => !!j.value)) == null ? void 0 : P.value), _ && d("update:form", "additionalCategories", []);
1039
+ const v = i == Pe.ADD_ON;
1040
+ d("update:form", "category", e.isOverride ? v ? "" : ((x = e.fallback) == null ? void 0 : x.category) ?? ((y = _.value.find((j) => !!j.value)) == null ? void 0 : y.value) : v ? null : (P = _.value.find((j) => !!j.value)) == null ? void 0 : P.value), v && d("update:form", "additionalCategories", []);
1038
1041
  }
1039
1042
  const M = q(!1);
1040
1043
  async function F() {
1041
- var i, _, x;
1044
+ var i, v, x;
1042
1045
  if (!e.form.name) {
1043
1046
  const y = document.getElementById("product-name");
1044
1047
  if (y) {
@@ -1052,7 +1055,7 @@ const Dr = /* @__PURE__ */ ae({
1052
1055
  M.value = !0, g.pushDataLayer({
1053
1056
  event: "menu_catalog_item_general_remy_suggest_description"
1054
1057
  }), We.toggleDialog(!0);
1055
- const y = await ((_ = (i = We).getItemDescription) == null ? void 0 : _.call(i, {
1058
+ const y = await ((v = (i = We).getItemDescription) == null ? void 0 : v.call(i, {
1056
1059
  name: e.form.name || ""
1057
1060
  }, !0)), P = (x = y == null ? void 0 : y.data) == null ? void 0 : x.value;
1058
1061
  typeof P == "string" && d("update:form", "description", P);
@@ -1073,7 +1076,7 @@ const Dr = /* @__PURE__ */ ae({
1073
1076
  }), {
1074
1077
  t: l
1075
1078
  } = ce();
1076
- return (i, _) => {
1079
+ return (i, v) => {
1077
1080
  const x = W("fm-text-field"), y = W("fm-textarea"), P = W("fm-radio"), j = W("FmSnackbar"), Q = W("FmButton"), le = W("fm-radio-group"), Ce = W("FmFormGroup"), he = Xt("tooltip");
1078
1081
  return $(), H(De, {
1079
1082
  title: o(l)("menu.product.form.detail.title")
@@ -1084,7 +1087,7 @@ const Dr = /* @__PURE__ */ ae({
1084
1087
  "model-value": i.form.code,
1085
1088
  placeholder: ((c = i.fallback) == null ? void 0 : c.code) || o(l)("menu.product.form.detail.fields.code.placeholder"),
1086
1089
  label: o(l)("menu.product.form.detail.fields.code.label"),
1087
- "onUpdate:modelValue": _[0] || (_[0] = (L) => d("update:form", "code", o(Qt)(L, i.isOverride)))
1090
+ "onUpdate:modelValue": v[0] || (v[0] = (L) => d("update:form", "code", o(Qt)(L, i.isOverride)))
1088
1091
  }, null, 8, ["model-value", "placeholder", "label"])]), A("div", Ir, [C(x, {
1089
1092
  id: "product-name",
1090
1093
  disabled: !h.value.name,
@@ -1096,12 +1099,12 @@ const Dr = /* @__PURE__ */ ae({
1096
1099
  rules: h.value.name ? [(L) => !!L || o(l)("menu.product.form.detail.fields.name.required")] : void 0,
1097
1100
  "label-mark": "required",
1098
1101
  label: o(l)("menu.product.form.detail.fields.name.label"),
1099
- "onUpdate:modelValue": _[1] || (_[1] = (L) => d("update:form", "name", L))
1102
+ "onUpdate:modelValue": v[1] || (v[1] = (L) => d("update:form", "name", L))
1100
1103
  }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), A("div", kr, [C(y, {
1101
1104
  disabled: !h.value.description,
1102
1105
  "model-value": i.form.description || "",
1103
1106
  placeholder: o(l)("menu.product.form.detail.fields.description.placeholder"),
1104
- "onUpdate:modelValue": _[2] || (_[2] = (L) => d("update:form", "description", L.trim())),
1107
+ "onUpdate:modelValue": v[2] || (v[2] = (L) => d("update:form", "description", L.trim())),
1105
1108
  class: "description"
1106
1109
  }, {
1107
1110
  label: B(() => [A("p", Er, [Sn(ge(o(l)("menu.product.form.detail.fields.description.label")) + " ", 1), A("span", Tr, ge(o(l)("menu.product.form.detail.fields.description.optional")), 1)])]),
@@ -1113,15 +1116,15 @@ const Dr = /* @__PURE__ */ ae({
1113
1116
  disabled: !h.value.thumbnail,
1114
1117
  "item-id": i.form._id || "",
1115
1118
  "model-value": i.form.thumbnail || ((N = i.fallback) == null ? void 0 : N.thumbnail) || null,
1116
- "onUpdate:modelValue": _[3] || (_[3] = (L) => d("update:form", "thumbnail", L))
1119
+ "onUpdate:modelValue": v[3] || (v[3] = (L) => d("update:form", "thumbnail", L))
1117
1120
  }, null, 8, ["disabled", "item-id", "model-value"])]), C(Ue, {
1118
- label: o(l)("menu.product.form.detail.category.label")
1121
+ label: o(t).isV4 ? o(l)("menu.product.form.detail.category.label") : o(l)("menu.product.form.detail.category.label_singular")
1119
1122
  }, {
1120
- default: B(() => [v.value ? ($(), H(le, {
1123
+ default: B(() => [b.value ? ($(), H(le, {
1121
1124
  key: 0,
1122
1125
  disabled: !h.value.category,
1123
1126
  "model-value": i.isAddon ? Pe.ADD_ON : Pe.PRODUCT,
1124
- "onUpdate:modelValue": _[4] || (_[4] = (L) => U(L))
1127
+ "onUpdate:modelValue": v[4] || (v[4] = (L) => U(L))
1125
1128
  }, {
1126
1129
  default: B(() => [A("div", xr, [A("div", Sr, [C(P, {
1127
1130
  disabled: f.value,
@@ -1153,7 +1156,9 @@ const Dr = /* @__PURE__ */ ae({
1153
1156
  "model-value": i.form.category,
1154
1157
  rules: [(L) => !L && !i.isOverride ? "Category is required" : !0]
1155
1158
  }, {
1156
- default: B(() => [C(k)]),
1159
+ default: B(() => [C(k, {
1160
+ multiple: !1
1161
+ })]),
1157
1162
  _: 1
1158
1163
  }, 8, ["model-value", "rules"]))]),
1159
1164
  _: 1
@@ -1163,7 +1168,7 @@ const Dr = /* @__PURE__ */ ae({
1163
1168
  }, {
1164
1169
  default: B(() => [A("div", Or, [C(Bn, {
1165
1170
  modelValue: u.value,
1166
- "onUpdate:modelValue": _[5] || (_[5] = (L) => u.value = L),
1171
+ "onUpdate:modelValue": v[5] || (v[5] = (L) => u.value = L),
1167
1172
  items: E.value,
1168
1173
  placeholder: o(l)("menu.product.form.detail.path.placeholder"),
1169
1174
  disabled: !h.value.category,
@@ -1177,18 +1182,18 @@ const Dr = /* @__PURE__ */ ae({
1177
1182
  required: h.value.orderFrom,
1178
1183
  "default-label": o(l)("menu.product.form.detail.order_from.default"),
1179
1184
  label: o(l)("menu.product.form.detail.order_from.label"),
1180
- "onUpdate:modelValue": _[6] || (_[6] = (L) => L && d("update:form", "orderFrom", L))
1185
+ "onUpdate:modelValue": v[6] || (v[6] = (L) => L && d("update:form", "orderFrom", L))
1181
1186
  }, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
1182
1187
  }),
1183
1188
  _: 1
1184
1189
  }, 8, ["title"]);
1185
1190
  };
1186
1191
  }
1187
- }), Vr = /* @__PURE__ */ Ze(Dr, [["__scopeId", "data-v-317a5447"]]), $r = /* @__PURE__ */ ae({
1192
+ }), Vr = /* @__PURE__ */ Ze(Dr, [["__scopeId", "data-v-b3e84ff5"]]), $r = /* @__PURE__ */ ae({
1188
1193
  __name: "AddForm",
1189
1194
  setup(n) {
1190
1195
  const r = se(), e = D(() => r.rules.group), t = D(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId), m = D(() => {
1191
- const h = !r.state.currentSchedulerId, w = r.rules.group.type, b = r.version === te.F_MENU_VERSION.enum.v3, v = r.rules.item.orderFromActiveOnly, f = r.rules.item.bindToVariant;
1196
+ const h = !r.state.currentSchedulerId, w = r.rules.group.type, _ = r.version === te.F_MENU_VERSION.enum.v3, b = r.rules.item.orderFromActiveOnly, f = r.rules.item.bindToVariant;
1192
1197
  return function(I) {
1193
1198
  return {
1194
1199
  link: (S) => !t.value && (!S || f),
@@ -1198,14 +1203,14 @@ const Dr = /* @__PURE__ */ ae({
1198
1203
  price: I.type !== te.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
1199
1204
  priceEdit: !0,
1200
1205
  priceTier: r.isV4,
1201
- inventory: h ? b ? !t.value && I.type === te.F_ADDON_GROUP_TYPE.enum.NORMAL : !t.value : !1,
1202
- orderFrom: (S) => h ? b ? I.type === te.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? t.value : !!t.value == !S : t.value : !1,
1203
- orderFromActiveOnly: v,
1204
- showOrderFrom: h ? b ? t.value ? !0 : I.type === te.F_ADDON_GROUP_TYPE.enum.PRODUCT : t.value : !1,
1206
+ inventory: h ? _ ? !t.value && I.type === te.F_ADDON_GROUP_TYPE.enum.NORMAL : !t.value : !1,
1207
+ orderFrom: (S) => h ? _ ? I.type === te.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? t.value : !!t.value == !S : t.value : !1,
1208
+ orderFromActiveOnly: b,
1209
+ showOrderFrom: h ? _ ? t.value ? !0 : I.type === te.F_ADDON_GROUP_TYPE.enum.PRODUCT : t.value : !1,
1205
1210
  bindToVariant: f,
1206
1211
  isOverride: t.value,
1207
1212
  isItemGroup: !1,
1208
- isV4: !b
1213
+ isV4: !_
1209
1214
  };
1210
1215
  };
1211
1216
  }), s = () => ({
@@ -1220,15 +1225,15 @@ const Dr = /* @__PURE__ */ ae({
1220
1225
  "categorized-items": o(r).categorizedItems,
1221
1226
  config: m.value,
1222
1227
  group: g.value,
1223
- "onUpdate:group": w[0] || (w[0] = (b) => g.value = b),
1224
- "onStatus:show": w[1] || (w[1] = (b) => {
1225
- b || (g.value = s());
1228
+ "onUpdate:group": w[0] || (w[0] = (_) => g.value = _),
1229
+ "onStatus:show": w[1] || (w[1] = (_) => {
1230
+ _ || (g.value = s());
1226
1231
  }),
1227
1232
  action: "add",
1228
1233
  title: o(d)("menu.group.add")
1229
1234
  }, {
1230
- default: B(({ trigger: b }) => [
1231
- Me(h.$slots, "default", { trigger: b })
1235
+ default: B(({ trigger: _ }) => [
1236
+ Me(h.$slots, "default", { trigger: _ })
1232
1237
  ]),
1233
1238
  _: 3
1234
1239
  }, 8, ["categorized-items", "config", "group", "title"])) : X("", !0);
@@ -1255,7 +1260,7 @@ const Dr = /* @__PURE__ */ ae({
1255
1260
  setup(n, {
1256
1261
  emit: r
1257
1262
  }) {
1258
- const e = n, t = r, m = Re(), s = rt(), g = se(), d = D(() => be.Country.getCountry(s.currentCountry.value)), h = q(!1), w = D(() => e.config.isV4 || e.group.type === te.F_ADDON_GROUP_TYPE.enum.PRODUCT), b = D(() => w.value), v = D(() => w.value), f = D(() => Object.values(e.group.items).flatMap((c) => [{
1263
+ const e = n, t = r, m = Re(), s = rt(), g = se(), d = D(() => be.Country.getCountry(s.currentCountry.value)), h = q(!1), w = D(() => e.config.isV4 || e.group.type === te.F_ADDON_GROUP_TYPE.enum.PRODUCT), _ = D(() => w.value), b = D(() => w.value), f = D(() => Object.values(e.group.items).flatMap((c) => [{
1259
1264
  _id: c._id,
1260
1265
  combinationKey: void 0
1261
1266
  }, ...(c.items ?? []).map((V) => ({
@@ -1511,12 +1516,12 @@ const Dr = /* @__PURE__ */ ae({
1511
1516
  }
1512
1517
  x(z._id, V.combinationKey ?? "");
1513
1518
  } else
1514
- _(V._id);
1519
+ v(V._id);
1515
1520
  }
1516
1521
  }, null)]);
1517
1522
  }
1518
1523
  }]), E = D(() => ({
1519
- code: v.value,
1524
+ code: b.value,
1520
1525
  name: !0,
1521
1526
  price: O(null).price,
1522
1527
  orderFrom: O(null).showOrderFrom,
@@ -1564,7 +1569,7 @@ const Dr = /* @__PURE__ */ ae({
1564
1569
  [N]: L
1565
1570
  }, G.items[c].items[z] = oe, t("update:group", G));
1566
1571
  }
1567
- function _(c) {
1572
+ function v(c) {
1568
1573
  const V = me(e.group);
1569
1574
  delete V.items[c], t("update:group", V);
1570
1575
  }
@@ -1615,7 +1620,7 @@ const Dr = /* @__PURE__ */ ae({
1615
1620
  }, {
1616
1621
  "append-title": B(() => [c.config.link() ? ($(), J(Oe, {
1617
1622
  key: 0
1618
- }, [b.value ? ($(), J("div", Pr, [C(xt, {
1623
+ }, [_.value ? ($(), J("div", Pr, [C(xt, {
1619
1624
  "categorized-items": c.categorizedItems,
1620
1625
  "initial-value": f.value,
1621
1626
  "show-variant": c.config.bindToVariant,
@@ -1680,7 +1685,7 @@ const Dr = /* @__PURE__ */ ae({
1680
1685
  emits: ["update:group", "submit:group", "status:show"],
1681
1686
  setup(n, { expose: r, emit: e }) {
1682
1687
  let t = n;
1683
- const m = e, s = se(), g = rt(), d = Ge(), h = Vt(ot(Re())), { countDefaultItems: w, validateGroupItems: b, minMaxValidationRules: v } = Yn(
1688
+ const m = e, s = se(), g = rt(), d = Ge(), h = Vt(ot(Re())), { countDefaultItems: w, validateGroupItems: _, minMaxValidationRules: b } = Yn(
1684
1689
  () => t.group
1685
1690
  ), f = q(!1), a = q(!1), I = (y) => {
1686
1691
  Rt.isBoolean(y) ? a.value = y : a.value = !a.value;
@@ -1768,7 +1773,7 @@ const Dr = /* @__PURE__ */ ae({
1768
1773
  for (const [Q, le] of Object.entries(P.customAttributes || {}))
1769
1774
  typeof le == "string" && le && !((j = y[Q]) != null && j.includes(le)) && (y[Q] = [...y[Q] || [], le]);
1770
1775
  }), y;
1771
- }), _ = (y) => {
1776
+ }), v = (y) => {
1772
1777
  t.group && T({
1773
1778
  ...t.group,
1774
1779
  customAttributes: y
@@ -1834,7 +1839,7 @@ const Dr = /* @__PURE__ */ ae({
1834
1839
  ]),
1835
1840
  C(le, {
1836
1841
  "model-value": y.group,
1837
- rules: o(v)
1842
+ rules: o(b)
1838
1843
  }, {
1839
1844
  default: B(() => [
1840
1845
  C(Wn, null, {
@@ -1907,7 +1912,7 @@ const Dr = /* @__PURE__ */ ae({
1907
1912
  C(o(sn), {
1908
1913
  entity: "group",
1909
1914
  "model-value": y.group.customAttributes || {},
1910
- "onUpdate:modelValue": _,
1915
+ "onUpdate:modelValue": v,
1911
1916
  "value-options": i.value
1912
1917
  }, null, 8, ["model-value", "value-options"])
1913
1918
  ]),
@@ -1919,7 +1924,7 @@ const Dr = /* @__PURE__ */ ae({
1919
1924
  C(le, {
1920
1925
  tag: "div",
1921
1926
  modelValue: y.group,
1922
- rules: [o(b)],
1927
+ rules: [o(_)],
1923
1928
  "helper-text": o(x)("menu.common.validation.default_items_tip", {
1924
1929
  count: o(w)(y.group),
1925
1930
  max: y.group.max
@@ -1954,17 +1959,17 @@ const Dr = /* @__PURE__ */ ae({
1954
1959
  emits: ["update:combinations"],
1955
1960
  setup(n, { expose: r, emit: e }) {
1956
1961
  var U, M;
1957
- const t = n, m = e, s = se(), g = Ge(), d = Vt(ot(Re())), h = q([]), w = q(t.combinations[0].combinationKey || ""), b = D(
1962
+ const t = n, m = e, s = se(), g = Ge(), d = Vt(ot(Re())), h = q([]), w = q(t.combinations[0].combinationKey || ""), _ = D(
1958
1963
  () => h.value.findIndex((F) => F.combinationKey == w.value)
1959
- ), v = D(
1964
+ ), b = D(
1960
1965
  () => t.combinations.map((F) => ({
1961
1966
  label: t.fullCombinations[F.combinationKey || ""],
1962
1967
  value: F.combinationKey || ""
1963
1968
  }))
1964
1969
  ), f = D(() => {
1965
- var i, _;
1970
+ var i, v;
1966
1971
  if (!k.value) return null;
1967
- const F = ((_ = (i = h.value[b.value]) == null ? void 0 : i.groups) == null ? void 0 : _.find((x) => x._id === t.groupId)) || {
1972
+ const F = ((v = (i = h.value[_.value]) == null ? void 0 : i.groups) == null ? void 0 : v.find((x) => x._id === t.groupId)) || {
1968
1973
  _id: t.groupId,
1969
1974
  groupKey: ""
1970
1975
  }, E = s.state.menu.modules.group.find((x) => x._id === t.groupId), u = Object.entries({ ...F, items: void 0 }).filter(([, x]) => !!x), l = {
@@ -1988,18 +1993,18 @@ const Dr = /* @__PURE__ */ ae({
1988
1993
  });
1989
1994
  function a(F) {
1990
1995
  var l, i;
1991
- const R = (l = h.value[b.value].groups) == null ? void 0 : l.findIndex(
1992
- (_) => _._id === t.groupId
1996
+ const R = (l = h.value[_.value].groups) == null ? void 0 : l.findIndex(
1997
+ (v) => v._id === t.groupId
1993
1998
  ), E = me(h.value), u = { ...tn(F), _id: t.groupId, groupKey: "" };
1994
- (R ?? -1) < 0 ? E[b.value] = {
1995
- ...E[b.value],
1996
- groups: [...((i = E[b.value]) == null ? void 0 : i.groups) || [], u]
1997
- } : E[b.value].groups[R] = u, h.value = E;
1999
+ (R ?? -1) < 0 ? E[_.value] = {
2000
+ ...E[_.value],
2001
+ groups: [...((i = E[_.value]) == null ? void 0 : i.groups) || [], u]
2002
+ } : E[_.value].groups[R] = u, h.value = E;
1998
2003
  }
1999
2004
  function I(F) {
2000
- const R = v.value.length;
2001
- let E = b.value;
2002
- F === "left" ? E = E === 0 ? R - 1 : E - 1 : E = E === R - 1 ? 0 : E + 1, w.value = v.value[E].value;
2005
+ const R = b.value.length;
2006
+ let E = _.value;
2007
+ F === "left" ? E = E === 0 ? R - 1 : E - 1 : E = E === R - 1 ? 0 : E + 1, w.value = b.value[E].value;
2003
2008
  }
2004
2009
  function S(F) {
2005
2010
  return {
@@ -2075,7 +2080,7 @@ const Dr = /* @__PURE__ */ ae({
2075
2080
  C(E, {
2076
2081
  modelValue: w.value,
2077
2082
  "onUpdate:modelValue": R[0] || (R[0] = (i) => w.value = i),
2078
- items: v.value,
2083
+ items: b.value,
2079
2084
  class: "flex-1"
2080
2085
  }, null, 8, ["modelValue", "items"]),
2081
2086
  A("div", zr, [
@@ -2120,29 +2125,29 @@ const Dr = /* @__PURE__ */ ae({
2120
2125
  const w = D(() => h(d.value).reduce((O, k) => (O[k._id] = {
2121
2126
  name: k.name,
2122
2127
  type: on(s.items, k.items)
2123
- }, O), {})), b = D(() => [
2128
+ }, O), {})), _ = D(() => [
2124
2129
  ...Object.entries(w.value).map(([O, { name: k, type: p }]) => ({
2125
2130
  label: `${k} ${g.value.type ? `(${Tt(p)})` : ""}`.trim(),
2126
2131
  value: O
2127
2132
  }))
2128
- ]), v = D(() => !!s.state.currentCatalogId || !!s.state.currentSchedulerId);
2133
+ ]), b = D(() => !!s.state.currentCatalogId || !!s.state.currentSchedulerId);
2129
2134
  D(() => {
2130
2135
  const O = !s.state.currentSchedulerId, k = s.rules.group.type, p = s.version == te.F_MENU_VERSION.enum.v3, T = s.rules.item.orderFromActiveOnly, U = s.rules.item.bindToVariant;
2131
2136
  return function(F) {
2132
2137
  return {
2133
- isDefault: (R) => !v.value && !R,
2134
- link: (R) => !v.value && (!R || U),
2135
- name: (R) => !v.value && !R,
2136
- type: k && !F._id && !v.value,
2138
+ isDefault: (R) => !b.value && !R,
2139
+ link: (R) => !b.value && (!R || U),
2140
+ name: (R) => !b.value && !R,
2141
+ type: k && !F._id && !b.value,
2137
2142
  price: F.type != te.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
2138
2143
  priceEdit: !0,
2139
2144
  priceTier: s.isV4,
2140
- inventory: O ? p ? !v.value && F.type == te.F_ADDON_GROUP_TYPE.enum.NORMAL : !v.value : !1,
2141
- orderFrom: (R) => O ? p ? F.type == te.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? v.value : !!v.value == !R : v.value : !1,
2145
+ inventory: O ? p ? !b.value && F.type == te.F_ADDON_GROUP_TYPE.enum.NORMAL : !b.value : !1,
2146
+ orderFrom: (R) => O ? p ? F.type == te.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? b.value : !!b.value == !R : b.value : !1,
2142
2147
  orderFromActiveOnly: T,
2143
- showOrderFrom: O ? p ? v.value ? !0 : F.type == te.F_ADDON_GROUP_TYPE.enum.PRODUCT : v.value : !1,
2148
+ showOrderFrom: O ? p ? b.value ? !0 : F.type == te.F_ADDON_GROUP_TYPE.enum.PRODUCT : b.value : !1,
2144
2149
  bindToVariant: U,
2145
- isOverride: v.value,
2150
+ isOverride: b.value,
2146
2151
  isItemGroup: !1,
2147
2152
  isV4: !p
2148
2153
  };
@@ -2159,7 +2164,7 @@ const Dr = /* @__PURE__ */ ae({
2159
2164
  };
2160
2165
  return (O, k) => {
2161
2166
  const p = W("FmSearch"), T = W("FmCheckbox"), U = W("FmButton");
2162
- return b.value.length > 0 ? ($(), J("div", qr, [
2167
+ return _.value.length > 0 ? ($(), J("div", qr, [
2163
2168
  A("div", null, [
2164
2169
  C(p, {
2165
2170
  autofocus: "",
@@ -2170,7 +2175,7 @@ const Dr = /* @__PURE__ */ ae({
2170
2175
  ]),
2171
2176
  A("div", Hr, [
2172
2177
  A("div", null, [
2173
- ($(!0), J(Oe, null, Ne(b.value, (M) => ($(), J("div", {
2178
+ ($(!0), J(Oe, null, Ne(_.value, (M) => ($(), J("div", {
2174
2179
  key: M.value
2175
2180
  }, [
2176
2181
  ft(C(T, {
@@ -2249,7 +2254,7 @@ const Dr = /* @__PURE__ */ ae({
2249
2254
  const e = n, t = se(), m = Ge(), {
2250
2255
  t: s
2251
2256
  } = ce(), g = r, d = D(() => t.rules.group), h = D(() => t.rules.item), w = D(() => t.groups);
2252
- function b(l, i) {
2257
+ function _(l, i) {
2253
2258
  return me(i ?? []).map((x) => {
2254
2259
  const y = l.find((P) => P._id === x._id);
2255
2260
  return {
@@ -2259,28 +2264,28 @@ const Dr = /* @__PURE__ */ ae({
2259
2264
  };
2260
2265
  });
2261
2266
  }
2262
- const v = D(() => {
2267
+ const b = D(() => {
2263
2268
  var i;
2264
- return [...f(b(w.value, e.form.groups || ((i = e.fallback) == null ? void 0 : i.groups) || [])).map((_) => _._id)];
2269
+ return [...f(_(w.value, e.form.groups || ((i = e.fallback) == null ? void 0 : i.groups) || [])).map((v) => v._id)];
2265
2270
  });
2266
2271
  function f(l) {
2267
- return me(l ?? []).sort((_, x) => _.position - x.position);
2272
+ return me(l ?? []).sort((v, x) => v.position - x.position);
2268
2273
  }
2269
2274
  function a(l) {
2270
2275
  const i = w.value.find((y) => y._id === l);
2271
2276
  if (!i)
2272
2277
  return [];
2273
- const _ = [];
2278
+ const v = [];
2274
2279
  return i.items.forEach((y) => {
2275
2280
  if (y.combinationKey)
2276
2281
  return;
2277
2282
  const P = t.items.find((Q) => Q._id === y._id), j = i.items.filter((Q) => Q._id === y._id && Q.combinationKey).length;
2278
- _.push({
2283
+ v.push({
2279
2284
  code: y.code || (P == null ? void 0 : P.code),
2280
2285
  name: y.name || (P == null ? void 0 : P.name),
2281
2286
  variantCount: j
2282
2287
  });
2283
- }), _.map((y) => {
2288
+ }), v.map((y) => {
2284
2289
  const P = [(y == null ? void 0 : y.code) || "", (y == null ? void 0 : y.name) || ""].join(" ").trim();
2285
2290
  return (y.variantCount || 0) > 1 ? `${P} (${s("menu.group.list.variants", {
2286
2291
  count: y.variantCount
@@ -2292,9 +2297,9 @@ const Dr = /* @__PURE__ */ ae({
2292
2297
  type: on(t.items, i.items)
2293
2298
  }, l), {})), S = D(() => [...Object.entries(I.value).map(([l, {
2294
2299
  name: i,
2295
- type: _
2300
+ type: v
2296
2301
  }]) => ({
2297
- label: `${i} ${d.value.type ? `(${Tt(_)})` : ""}`.trim(),
2302
+ label: `${i} ${d.value.type ? `(${Tt(v)})` : ""}`.trim(),
2298
2303
  value: l
2299
2304
  }))]), O = D(() => [{
2300
2305
  accessorKey: "name",
@@ -2310,9 +2315,9 @@ const Dr = /* @__PURE__ */ ae({
2310
2315
  header: () => s("menu.product.form.group.columns.type"),
2311
2316
  enableSorting: !1,
2312
2317
  cell: (l) => {
2313
- var _;
2318
+ var v;
2314
2319
  const i = l.row.original._id;
2315
- return Tt((_ = I.value[i]) == null ? void 0 : _.type);
2320
+ return Tt((v = I.value[i]) == null ? void 0 : v.type);
2316
2321
  }
2317
2322
  }, {
2318
2323
  accessorKey: "items",
@@ -2364,14 +2369,14 @@ const Dr = /* @__PURE__ */ ae({
2364
2369
  "onUpdate:combinations": u
2365
2370
  }, {
2366
2371
  default: ({
2367
- trigger: _
2372
+ trigger: v
2368
2373
  }) => ve(Ie.FmButton, {
2369
2374
  id: pt(Se.GROUP, i),
2370
2375
  icon: "edit",
2371
2376
  variant: "tertiary",
2372
2377
  disabled: !R(i),
2373
2378
  textColor: "neutral-gray-400",
2374
- onClick: _
2379
+ onClick: v
2375
2380
  })
2376
2381
  })]);
2377
2382
  }
@@ -2383,20 +2388,20 @@ const Dr = /* @__PURE__ */ ae({
2383
2388
  title: s("menu.product.form.group.add"),
2384
2389
  contentComponent: na,
2385
2390
  contentComponentProps: {
2386
- groupIds: v.value
2391
+ groupIds: b.value
2387
2392
  }
2388
2393
  }).onPrimary((l) => {
2389
2394
  T(l);
2390
2395
  });
2391
2396
  }
2392
2397
  function T(l) {
2393
- const i = l.reduce((_, x) => {
2398
+ const i = l.reduce((v, x) => {
2394
2399
  var P;
2395
2400
  const y = ((P = e.form.groups) == null ? void 0 : P.find((j) => j._id === x)) || {
2396
2401
  _id: x,
2397
2402
  groupKey: ""
2398
2403
  };
2399
- return _.push(y), _;
2404
+ return v.push(y), v;
2400
2405
  }, []);
2401
2406
  g("replace:form", Nt(t, {
2402
2407
  ...e.form,
@@ -2404,12 +2409,12 @@ const Dr = /* @__PURE__ */ ae({
2404
2409
  }));
2405
2410
  }
2406
2411
  function U(l) {
2407
- var _, x, y;
2412
+ var v, x, y;
2408
2413
  if (!e.form.groups)
2409
2414
  return;
2410
2415
  const i = me(e.form.groups);
2411
2416
  i.splice(i.findIndex((P) => P._id === l), 1);
2412
- for (const P of ((_ = e.form.variant) == null ? void 0 : _.variantCombinations) || [])
2417
+ for (const P of ((v = e.form.variant) == null ? void 0 : v.variantCombinations) || [])
2413
2418
  (y = P.groups) == null || y.splice((x = P.groups) == null ? void 0 : x.findIndex((j) => j._id === l), 1);
2414
2419
  g("replace:form", Nt(t, {
2415
2420
  ...e.form,
@@ -2428,10 +2433,10 @@ const Dr = /* @__PURE__ */ ae({
2428
2433
  }];
2429
2434
  });
2430
2435
  function R(l) {
2431
- var _;
2436
+ var v;
2432
2437
  if (!l) return !1;
2433
2438
  if (h.value.overrideProductGroup) return !0;
2434
- switch ((_ = I.value[l]) == null ? void 0 : _.type) {
2439
+ switch ((v = I.value[l]) == null ? void 0 : v.type) {
2435
2440
  case te.F_ADDON_GROUP_TYPE.enum.DYNAMIC:
2436
2441
  return !0;
2437
2442
  case te.F_ADDON_GROUP_TYPE.enum.PRODUCT:
@@ -2442,10 +2447,10 @@ const Dr = /* @__PURE__ */ ae({
2442
2447
  return !1;
2443
2448
  }
2444
2449
  }
2445
- ye(() => w.value.length, () => T([...v.value, w.value[w.value.length - 1]._id]));
2450
+ ye(() => w.value.length, () => T([...b.value, w.value[w.value.length - 1]._id]));
2446
2451
  const E = (l) => {
2447
2452
  var i;
2448
- return (i = S.value.find((_) => _.value === l)) == null ? void 0 : i.label;
2453
+ return (i = S.value.find((v) => v.value === l)) == null ? void 0 : i.label;
2449
2454
  }, u = (l) => {
2450
2455
  var i;
2451
2456
  M.value ? g("update:form", "variant", {
@@ -2454,13 +2459,13 @@ const Dr = /* @__PURE__ */ ae({
2454
2459
  }) : g("update:form", "groups", l[0].groups || []);
2455
2460
  };
2456
2461
  return (l, i) => {
2457
- const _ = W("FmButton"), x = W("FmTable");
2462
+ const v = W("FmButton"), x = W("FmTable");
2458
2463
  return $(), H(De, {
2459
2464
  title: o(s)("menu.product.form.group.title"),
2460
2465
  "sub-title": o(s)("menu.product.form.group.subtitle"),
2461
2466
  id: o(Se).GROUP
2462
2467
  }, {
2463
- "append-title": B(() => [C(_, {
2468
+ "append-title": B(() => [C(v, {
2464
2469
  class: "flex-shrink-0",
2465
2470
  label: o(s)("menu.product.form.group.add"),
2466
2471
  "prepend-icon": "add",
@@ -2470,14 +2475,14 @@ const Dr = /* @__PURE__ */ ae({
2470
2475
  default: B(() => [C(rn, null, {
2471
2476
  default: B(() => {
2472
2477
  var y;
2473
- return [((y = v.value) == null ? void 0 : y.length) > 0 ? ($(), H(x, {
2478
+ return [((y = b.value) == null ? void 0 : y.length) > 0 ? ($(), H(x, {
2474
2479
  key: 0,
2475
2480
  "column-defs": O.value,
2476
2481
  "column-visibility": k.value,
2477
- "row-data": v.value.map((P) => ({
2482
+ "row-data": b.value.map((P) => ({
2478
2483
  _id: P
2479
2484
  })),
2480
- "page-size": v.value.length,
2485
+ "page-size": b.value.length,
2481
2486
  "hide-footer": "",
2482
2487
  "pin-header-row": "",
2483
2488
  "shrink-at": !1
@@ -2527,11 +2532,11 @@ const Dr = /* @__PURE__ */ ae({
2527
2532
  const w = D(() => {
2528
2533
  var S;
2529
2534
  return t.form.name || ((S = t.fallback) == null ? void 0 : S.name) || "";
2530
- }), b = D(() => {
2535
+ }), _ = D(() => {
2531
2536
  var S;
2532
2537
  return h(t.form.inventoryBindings || [], ((S = t.form.variant) == null ? void 0 : S.variantCombinations) || [], w.value, s.variants);
2533
2538
  });
2534
- function v(S, O) {
2539
+ function b(S, O) {
2535
2540
  var U, M;
2536
2541
  let k = ke.clone(t.form);
2537
2542
  const p = k.variant;
@@ -2592,7 +2597,7 @@ const Dr = /* @__PURE__ */ ae({
2592
2597
  name: w.value
2593
2598
  }),
2594
2599
  "onUpdate:inventory": (k) => {
2595
- v(O.key, k);
2600
+ b(O.key, k);
2596
2601
  }
2597
2602
  }, {
2598
2603
  default: ({
@@ -2620,7 +2625,7 @@ const Dr = /* @__PURE__ */ ae({
2620
2625
  title: o(e)("menu.inventory.title"),
2621
2626
  subTitle: o(e)("menu.inventory.subtitle")
2622
2627
  }, {
2623
- default: B(() => [A("div", ra, [A("div", aa, [($(!0), J(Oe, null, Ne(b.value, (k) => ($(), H(o(Et), {
2628
+ default: B(() => [A("div", ra, [A("div", aa, [($(!0), J(Oe, null, Ne(_.value, (k) => ($(), H(o(Et), {
2624
2629
  key: k._id,
2625
2630
  ref_for: !0,
2626
2631
  ref_key: "inventoryManagerForms",
@@ -2632,10 +2637,10 @@ const Dr = /* @__PURE__ */ ae({
2632
2637
  bindingKey: k._id,
2633
2638
  initialValue: k.binding ?? [],
2634
2639
  "onUpdate:inventory": (p) => {
2635
- v(k._id, p);
2640
+ b(k._id, p);
2636
2641
  }
2637
2642
  }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), C(o(To), {
2638
- "row-data": b.value,
2643
+ "row-data": _.value,
2639
2644
  onRowClick: a
2640
2645
  }, null, 8, ["row-data"])])])]),
2641
2646
  _: 1
@@ -2669,15 +2674,15 @@ const Dr = /* @__PURE__ */ ae({
2669
2674
  return T != null;
2670
2675
  }), w = (p) => {
2671
2676
  g("update:form", "unit", p ? "" : void 0), g("update:form", "perXUnit", p ? 0 : void 0);
2672
- }, b = D(() => {
2677
+ }, _ = D(() => {
2673
2678
  const p = m.isV4;
2674
2679
  return vt.setCoreStore(t).taxSetting(p);
2675
- }), v = D(() => {
2680
+ }), b = D(() => {
2676
2681
  var p;
2677
2682
  return vt.getSelectedTax(
2678
2683
  e.form.taxes,
2679
2684
  (p = e.fallback) == null ? void 0 : p.taxes,
2680
- b.value.countryTaxOptions
2685
+ _.value.countryTaxOptions
2681
2686
  );
2682
2687
  });
2683
2688
  function f(p) {
@@ -2768,12 +2773,12 @@ const Dr = /* @__PURE__ */ ae({
2768
2773
  _: 1
2769
2774
  }, 8, ["disable", "model-value", "placeholder", "rules", "label"]),
2770
2775
  C(U, {
2771
- disabled: !d.value.tax || !b.value.systemCode,
2772
- items: b.value.countryTaxOptions,
2773
- label: b.value.systemCode ? o(s)("menu.product.form.price.fields.tax.label_with_code", {
2774
- code: b.value.systemCode
2776
+ disabled: !d.value.tax || !_.value.systemCode,
2777
+ items: _.value.countryTaxOptions,
2778
+ label: _.value.systemCode ? o(s)("menu.product.form.price.fields.tax.label_with_code", {
2779
+ code: _.value.systemCode
2775
2780
  }) : o(s)("menu.product.form.price.fields.tax.label"),
2776
- "model-value": v.value,
2781
+ "model-value": b.value,
2777
2782
  placeholder: "--",
2778
2783
  class: "flex-1",
2779
2784
  "shift-menu": "",
@@ -2811,7 +2816,7 @@ const Dr = /* @__PURE__ */ ae({
2811
2816
  label: o(s)("menu.product.form.price.settings.title")
2812
2817
  }, {
2813
2818
  default: B(() => {
2814
- var l, i, _;
2819
+ var l, i, v;
2815
2820
  return [
2816
2821
  A("div", sa, [
2817
2822
  C(F, {
@@ -2851,7 +2856,7 @@ const Dr = /* @__PURE__ */ ae({
2851
2856
  A("div", pa, [
2852
2857
  C(R, {
2853
2858
  disabled: !d.value.unit,
2854
- "model-value": p.form.unit || ((_ = p.fallback) == null ? void 0 : _.unit) || null,
2859
+ "model-value": p.form.unit || ((v = p.fallback) == null ? void 0 : v.unit) || null,
2855
2860
  rules: [
2856
2861
  (x) => !!x || o(s)("menu.product.form.price.settings.sell_by_unit.unit.required")
2857
2862
  ],
@@ -2936,13 +2941,13 @@ const Dr = /* @__PURE__ */ ae({
2936
2941
  const d = D(() => t.rules.item), h = D(() => t.printDepartments), w = D(() => {
2937
2942
  var k;
2938
2943
  return ((k = e.form.print) == null ? void 0 : k.sequential) ?? !1;
2939
- }), b = D(() => {
2944
+ }), _ = D(() => {
2940
2945
  var k;
2941
2946
  return w.value ? h.value.reduce(
2942
2947
  (p, { _id: T }) => (p.includes(T) || (p = [...p, T]), p),
2943
2948
  [...((k = e.form.print) == null ? void 0 : k.department) ?? []]
2944
2949
  ) : h.value.map(({ _id: p }) => p);
2945
- }), v = D(() => h.value.reduce((k, p) => (k[p._id] = p.name, k), {}));
2950
+ }), b = D(() => h.value.reduce((k, p) => (k[p._id] = p.name, k), {}));
2946
2951
  function f(k) {
2947
2952
  s("update:form", "print", {
2948
2953
  ...g(),
@@ -3038,16 +3043,16 @@ const Dr = /* @__PURE__ */ ae({
3038
3043
  label: o(m)("menu.product.form.print.routes.label")
3039
3044
  }, {
3040
3045
  default: B(() => [
3041
- b.value.length ? ($(), H(o(Mt), {
3046
+ _.value.length ? ($(), H(o(Mt), {
3042
3047
  key: 0,
3043
3048
  "item-key": (u) => u,
3044
- "model-value": b.value,
3049
+ "model-value": _.value,
3045
3050
  handle: ".handle",
3046
3051
  "onUpdate:modelValue": p[3] || (p[3] = (u) => I(u)),
3047
3052
  class: "space-y-16"
3048
3053
  }, {
3049
3054
  item: B(({ element: u }) => {
3050
- var l, i, _, x, y;
3055
+ var l, i, v, x, y;
3051
3056
  return [
3052
3057
  A("div", Ca, [
3053
3058
  A("div", Ia, [
@@ -3063,8 +3068,8 @@ const Dr = /* @__PURE__ */ ae({
3063
3068
  ]),
3064
3069
  C(R, {
3065
3070
  id: u,
3066
- "data-checked": (x = (_ = e.form.print) == null ? void 0 : _.department) == null ? void 0 : x.includes(u),
3067
- label: v.value[u],
3071
+ "data-checked": (x = (v = e.form.print) == null ? void 0 : v.department) == null ? void 0 : x.includes(u),
3072
+ label: b.value[u],
3068
3073
  "model-value": (((y = e.form.print) == null ? void 0 : y.department) ?? []).includes(u),
3069
3074
  value: u,
3070
3075
  class: "flex-1",
@@ -3125,10 +3130,10 @@ const Dr = /* @__PURE__ */ ae({
3125
3130
  } : {
3126
3131
  label: s("menu.product.form.takeaway.options.no_preset"),
3127
3132
  value: null
3128
- }, ...t.takeaways.map((v) => ({
3129
- label: v.name,
3130
- value: v._id
3131
- }))]), b = q([{
3133
+ }, ...t.takeaways.map((b) => ({
3134
+ label: b.name,
3135
+ value: b._id
3136
+ }))]), _ = q([{
3132
3137
  accessorKey: "name",
3133
3138
  enableSorting: !1,
3134
3139
  header: () => d.value ? s("menu.product.form.takeaway.columns.variant") : s("menu.product.form.takeaway.columns.product")
@@ -3136,8 +3141,8 @@ const Dr = /* @__PURE__ */ ae({
3136
3141
  accessorKey: "takeaway",
3137
3142
  enableSorting: !1,
3138
3143
  header: () => s("menu.product.form.takeaway.columns.takeaway"),
3139
- cell: (v) => {
3140
- const f = v.getValue(), a = v.row.original;
3144
+ cell: (b) => {
3145
+ const f = b.getValue(), a = b.row.original;
3141
3146
  return ve(wo, {
3142
3147
  action: "add",
3143
3148
  applyProduct: !1,
@@ -3177,14 +3182,14 @@ const Dr = /* @__PURE__ */ ae({
3177
3182
  });
3178
3183
  }
3179
3184
  }]);
3180
- return (v, f) => {
3185
+ return (b, f) => {
3181
3186
  const a = W("fm-table");
3182
3187
  return $(), H(De, {
3183
3188
  title: o(s)("menu.product.form.takeaway.title"),
3184
3189
  "sub-title": o(s)("menu.product.form.takeaway.subtitle")
3185
3190
  }, {
3186
3191
  default: B(() => [C(a, {
3187
- columnDefs: b.value,
3192
+ columnDefs: _.value,
3188
3193
  "page-size": o(h).length,
3189
3194
  "row-data": o(h),
3190
3195
  "hide-footer": ""
@@ -3218,17 +3223,17 @@ const Dr = /* @__PURE__ */ ae({
3218
3223
  }), U;
3219
3224
  } else
3220
3225
  return { ...Le.generator.initMenuV4VariantGroup(), usedBy: [] };
3221
- }, b = q(w()), v = q(!1), f = q(!1);
3226
+ }, _ = q(w()), b = q(!1), f = q(!1);
3222
3227
  function a(U) {
3223
- b.value.options = U;
3228
+ _.value.options = U;
3224
3229
  }
3225
3230
  function I(U, M) {
3226
- const F = me(b.value.options), R = F.findIndex((E) => E._id == U);
3227
- F[R].name = M, b.value.options = F, R === b.value.options.length - 1 && S();
3231
+ const F = me(_.value.options), R = F.findIndex((E) => E._id == U);
3232
+ F[R].name = M, _.value.options = F, R === _.value.options.length - 1 && S();
3228
3233
  }
3229
3234
  function S() {
3230
- const U = me(b.value.options);
3231
- b.value.options = [
3235
+ const U = me(_.value.options);
3236
+ _.value.options = [
3232
3237
  ...U,
3233
3238
  {
3234
3239
  _id: (/* @__PURE__ */ new Date()).toISOString(),
@@ -3237,11 +3242,11 @@ const Dr = /* @__PURE__ */ ae({
3237
3242
  ];
3238
3243
  }
3239
3244
  function O(U) {
3240
- const M = me(b.value.options);
3241
- b.value.options = M.filter((F) => F._id !== U);
3245
+ const M = me(_.value.options);
3246
+ _.value.options = M.filter((F) => F._id !== U);
3242
3247
  }
3243
3248
  ye(
3244
- () => b.value.options,
3249
+ () => _.value.options,
3245
3250
  (U) => {
3246
3251
  U.length <= 0 && S();
3247
3252
  },
@@ -3256,18 +3261,18 @@ const Dr = /* @__PURE__ */ ae({
3256
3261
  const p = Ut(
3257
3262
  () => {
3258
3263
  if (e.initialValue) {
3259
- const U = b.value.options.filter((M) => !!M.name.trim());
3260
- return !ke.isEqual({ ...b.value, options: U }, e.initialValue);
3264
+ const U = _.value.options.filter((M) => !!M.name.trim());
3265
+ return !ke.isEqual({ ..._.value, options: U }, e.initialValue);
3261
3266
  } else
3262
- return !!(b.value.options.length > 1 || b.value.name.trim());
3267
+ return !!(_.value.options.length > 1 || _.value.name.trim());
3263
3268
  },
3264
3269
  () => {
3265
3270
  f.value = !1;
3266
3271
  }
3267
3272
  ), T = async () => {
3268
3273
  try {
3269
- v.value = !0;
3270
- const U = me(b.value);
3274
+ b.value = !0;
3275
+ const U = me(_.value);
3271
3276
  U.options = U.options.filter((M) => !!M.name.trim()), e.initialValue ? await s.updateMenu({
3272
3277
  module: te.F_MENU_MODULE_V4_KEY.enum.variant,
3273
3278
  operation: _e.F_OPERATION_TYPE.update,
@@ -3278,13 +3283,13 @@ const Dr = /* @__PURE__ */ ae({
3278
3283
  data: U
3279
3284
  }), m();
3280
3285
  } finally {
3281
- v.value = !1;
3286
+ b.value = !1;
3282
3287
  }
3283
3288
  };
3284
3289
  return ye(
3285
3290
  () => f.value,
3286
3291
  (U) => {
3287
- U ? b.value = w() : m();
3292
+ U ? _.value = w() : m();
3288
3293
  }
3289
3294
  ), Ae(() => {
3290
3295
  f.value = !0;
@@ -3309,7 +3314,7 @@ const Dr = /* @__PURE__ */ ae({
3309
3314
  A("div", Va, [
3310
3315
  C(E, {
3311
3316
  label: h.value,
3312
- loading: v.value,
3317
+ loading: b.value,
3313
3318
  size: "lg",
3314
3319
  type: "submit",
3315
3320
  variant: "primary"
@@ -3334,8 +3339,8 @@ const Dr = /* @__PURE__ */ ae({
3334
3339
  autofocus: "",
3335
3340
  label: o(g)("menu.variant.form.name.label"),
3336
3341
  "helper-text": o(g)("menu.variant.form.name.helper"),
3337
- modelValue: b.value.name,
3338
- "onUpdate:modelValue": M[0] || (M[0] = (i) => b.value.name = i),
3342
+ modelValue: _.value.name,
3343
+ "onUpdate:modelValue": M[0] || (M[0] = (i) => _.value.name = i),
3339
3344
  rules: [(i) => !!i || o(g)("menu.variant.form.name.required")],
3340
3345
  placeholder: o(g)("menu.variant.form.name.placeholder")
3341
3346
  }, null, 8, ["label", "helper-text", "modelValue", "rules", "placeholder"]),
@@ -3345,7 +3350,7 @@ const Dr = /* @__PURE__ */ ae({
3345
3350
  default: B(() => [
3346
3351
  A("div", null, [
3347
3352
  C(o(Mt), {
3348
- "model-value": b.value.options,
3353
+ "model-value": _.value.options,
3349
3354
  move: k,
3350
3355
  class: "space-y-16",
3351
3356
  group: "categories",
@@ -3353,28 +3358,28 @@ const Dr = /* @__PURE__ */ ae({
3353
3358
  "item-key": "_id",
3354
3359
  "onUpdate:modelValue": a
3355
3360
  }, {
3356
- item: B(({ element: i, index: _ }) => [
3361
+ item: B(({ element: i, index: v }) => [
3357
3362
  A("div", {
3358
3363
  class: fe(["flex items-center", "space-x-8"]),
3359
- "data-not-allow-sort": _ === b.value.options.length - 1
3364
+ "data-not-allow-sort": v === _.value.options.length - 1
3360
3365
  }, [
3361
- _ !== b.value.options.length - 1 ? ($(), H(R, {
3366
+ v !== _.value.options.length - 1 ? ($(), H(R, {
3362
3367
  key: 0,
3363
3368
  class: "handle",
3364
3369
  name: "drag_handle"
3365
- })) : _ > 0 ? ($(), J("div", Oa)) : X("", !0),
3370
+ })) : v > 0 ? ($(), J("div", Oa)) : X("", !0),
3366
3371
  A("div", Da, [
3367
3372
  C(F, {
3368
3373
  "model-value": i.name,
3369
3374
  rules: [
3370
- () => !!b.value.options.length || o(g)("menu.variant.form.options.min_required"),
3371
- (x) => _ === b.value.options.length - 1 || x ? !0 : o(g)("menu.variant.form.options.name_required")
3375
+ () => !!_.value.options.length || o(g)("menu.variant.form.options.min_required"),
3376
+ (x) => v === _.value.options.length - 1 || x ? !0 : o(g)("menu.variant.form.options.name_required")
3372
3377
  ],
3373
3378
  class: "flex-1",
3374
3379
  placeholder: o(g)("menu.variant.form.options.placeholder"),
3375
3380
  "onUpdate:modelValue": (x) => I(i._id, x)
3376
3381
  }, Fn({ _: 2 }, [
3377
- _ !== b.value.options.length - 1 ? {
3382
+ v !== _.value.options.length - 1 ? {
3378
3383
  name: "append",
3379
3384
  fn: B(() => [
3380
3385
  C(R, {
@@ -3397,10 +3402,10 @@ const Dr = /* @__PURE__ */ ae({
3397
3402
  ]),
3398
3403
  _: 1
3399
3404
  }, 8, ["title"]),
3400
- (l = b.value.usedBy) != null && l.length ? ($(), H(So, {
3405
+ (l = _.value.usedBy) != null && l.length ? ($(), H(So, {
3401
3406
  key: 0,
3402
3407
  editable: !1,
3403
- overrides: b.value.usedBy || [],
3408
+ overrides: _.value.usedBy || [],
3404
3409
  "select-variant": !1,
3405
3410
  title: o(g)("menu.variant.form.applied_product")
3406
3411
  }, null, 8, ["overrides", "title"])) : X("", !0)
@@ -3442,7 +3447,7 @@ const Ua = {
3442
3447
  label: f.name,
3443
3448
  value: f._id,
3444
3449
  disabled: !1
3445
- }))), h = q(me(g.selectedVariants)), w = q(""), { createVariant: b } = Pa(), v = () => {
3450
+ }))), h = q(me(g.selectedVariants)), w = q(""), { createVariant: _ } = Pa(), b = () => {
3446
3451
  e(h.value), t("primary"), r.close();
3447
3452
  };
3448
3453
  return (f, a) => {
@@ -3481,7 +3486,7 @@ const Ua = {
3481
3486
  label: o(s)("menu.common.actions.add_new_variant"),
3482
3487
  variant: "tertiary",
3483
3488
  "text-color": "primary",
3484
- onClick: a[3] || (a[3] = (k) => o(b)())
3489
+ onClick: a[3] || (a[3] = (k) => o(_)())
3485
3490
  }, null, 8, ["label"])) : X("", !0),
3486
3491
  A("div", Aa, [
3487
3492
  C(O, {
@@ -3491,7 +3496,7 @@ const Ua = {
3491
3496
  }, null, 8, ["label"]),
3492
3497
  C(O, {
3493
3498
  label: o(s)("menu.common.actions.confirm"),
3494
- onClick: a[5] || (a[5] = (k) => v())
3499
+ onClick: a[5] || (a[5] = (k) => b())
3495
3500
  }, null, 8, ["label"])
3496
3501
  ])
3497
3502
  ])
@@ -3503,7 +3508,7 @@ const Ua = {
3503
3508
  C(O, {
3504
3509
  label: o(s)("menu.variant.add"),
3505
3510
  icon: "add",
3506
- onClick: a[6] || (a[6] = (k) => o(b)())
3511
+ onClick: a[6] || (a[6] = (k) => o(_)())
3507
3512
  }, null, 8, ["label"])
3508
3513
  ]));
3509
3514
  };
@@ -3535,16 +3540,16 @@ const Ua = {
3535
3540
  }) {
3536
3541
  const e = n, t = se(), m = Zn(), s = Re(), g = Ge(), {
3537
3542
  t: d
3538
- } = ce(), h = D(() => t.rules.item), w = D(() => h.value.minPrice && !!e.form.minPrice), b = D(() => !t.state.currentCatalogId), v = D(() => t.variants.reduce((u, l) => (u[l._id] = l, u), {}));
3543
+ } = ce(), h = D(() => t.rules.item), w = D(() => h.value.minPrice && !!e.form.minPrice), _ = D(() => !t.state.currentCatalogId), b = D(() => t.variants.reduce((u, l) => (u[l._id] = l, u), {}));
3539
3544
  q(!1);
3540
3545
  const f = r;
3541
3546
  function a(u) {
3542
3547
  const l = ke.clone(e.form);
3543
3548
  for (const {
3544
3549
  key: i,
3545
- value: _
3550
+ value: v
3546
3551
  } of u)
3547
- l[i] = _;
3552
+ l[i] = v;
3548
3553
  f("replace:form", l);
3549
3554
  }
3550
3555
  D(() => t.variants.map((u) => ({
@@ -3560,8 +3565,8 @@ const Ua = {
3560
3565
  price: l == null ? void 0 : l.price,
3561
3566
  inventoryBindings: (l == null ? void 0 : l.inventoryBindings) || e.form.inventoryBindings,
3562
3567
  takeawayUsed: (l == null ? void 0 : l.takeawayUsed) || e.form.takeawayUsed,
3563
- groups: (l == null ? void 0 : l.groups) || ((i = e.form.groups) == null ? void 0 : i.map((_) => ({
3564
- ..._,
3568
+ groups: (l == null ? void 0 : l.groups) || ((i = e.form.groups) == null ? void 0 : i.map((v) => ({
3569
+ ...v,
3565
3570
  groupKey: ""
3566
3571
  })))
3567
3572
  };
@@ -3589,18 +3594,18 @@ const Ua = {
3589
3594
  var l;
3590
3595
  return (((l = e.form.variant) == null ? void 0 : l.variantCombinations) || []).map((i) => {
3591
3596
  var x, y;
3592
- const _ = (y = (x = e.fallback) == null ? void 0 : x.variant) == null ? void 0 : y.variantCombinations.find(({
3597
+ const v = (y = (x = e.fallback) == null ? void 0 : x.variant) == null ? void 0 : y.variantCombinations.find(({
3593
3598
  combinationKey: P
3594
3599
  }) => P === i.combinationKey);
3595
3600
  return {
3596
3601
  ...i,
3597
3602
  fallback: {
3598
- ..._,
3603
+ ...v,
3599
3604
  _id: i._id,
3600
3605
  combinationKey: i.combinationKey,
3601
- price: b.value ? e.form.price ?? (_ == null ? void 0 : _.price) : i.price ?? (_ == null ? void 0 : _.price),
3606
+ price: _.value ? e.form.price ?? (v == null ? void 0 : v.price) : i.price ?? (v == null ? void 0 : v.price),
3602
3607
  priceTiers: e.form.priceTiers,
3603
- minPrice: e.form.minPrice ?? (_ == null ? void 0 : _.minPrice)
3608
+ minPrice: e.form.minPrice ?? (v == null ? void 0 : v.minPrice)
3604
3609
  }
3605
3610
  };
3606
3611
  });
@@ -3608,7 +3613,7 @@ const Ua = {
3608
3613
  function T(u, l = (i) => i) {
3609
3614
  var x;
3610
3615
  const i = u.filter((y) => !!y);
3611
- let _;
3616
+ let v;
3612
3617
  if (i.length) {
3613
3618
  const y = i.map((j) => t.variants.find((Q) => Q._id === j)), P = Le.fullVariantCombination(y).map(({
3614
3619
  combinationKey: j
@@ -3627,7 +3632,7 @@ const Ua = {
3627
3632
  });
3628
3633
  return;
3629
3634
  }
3630
- _ = {
3635
+ v = {
3631
3636
  ...e.form,
3632
3637
  variant: {
3633
3638
  variantGroupIds: i,
@@ -3644,19 +3649,19 @@ const Ua = {
3644
3649
  }, {
3645
3650
  key: "takeawayUsed",
3646
3651
  value: P.length === 1 ? P[0] : null
3647
- }]), _ = {
3652
+ }]), v = {
3648
3653
  ...e.form,
3649
3654
  variant: void 0,
3650
3655
  takeawayUsed: P.length === 1 ? P[0] : null
3651
3656
  };
3652
3657
  }
3653
- f("replace:form", m.initDynamicGroupItem(_));
3658
+ f("replace:form", m.initDynamicGroupItem(v));
3654
3659
  }
3655
3660
  async function U(u, l, i) {
3656
- const _ = ke.clone(e.form);
3657
- _.variant.variantCombinations[u][l] = i, a([{
3661
+ const v = ke.clone(e.form);
3662
+ v.variant.variantCombinations[u][l] = i, a([{
3658
3663
  key: "variant",
3659
- value: _.variant
3664
+ value: v.variant
3660
3665
  }]);
3661
3666
  }
3662
3667
  const M = D(() => {
@@ -3688,10 +3693,10 @@ const Ua = {
3688
3693
  enableSorting: !1,
3689
3694
  cell: (u) => {
3690
3695
  var x, y;
3691
- const l = u.getValue(), _ = (x = u.row.original.fallback) == null ? void 0 : x.orderFrom;
3696
+ const l = u.getValue(), v = (x = u.row.original.fallback) == null ? void 0 : x.orderFrom;
3692
3697
  return ve(Dt, {
3693
3698
  modelValue: l ?? null,
3694
- fallback: e.form.orderFrom ?? _ ?? ((y = e.fallback) == null ? void 0 : y.orderFrom),
3699
+ fallback: e.form.orderFrom ?? v ?? ((y = e.fallback) == null ? void 0 : y.orderFrom),
3695
3700
  disable: !h.value.orderFrom,
3696
3701
  required: h.value.orderFrom && h.value.orderFromActiveOnly,
3697
3702
  editActiveOnly: h.value.orderFromActiveOnly || !1,
@@ -3756,7 +3761,7 @@ const Ua = {
3756
3761
  }) : !0;
3757
3762
  }
3758
3763
  return (u, l) => {
3759
- const i = W("fm-button"), _ = W("fm-icon"), x = W("FmFormGroup"), y = W("fm-table");
3764
+ const i = W("fm-button"), v = W("fm-icon"), x = W("FmFormGroup"), y = W("fm-table");
3760
3765
  return $(), H(De, {
3761
3766
  id: o(Se).VARIANT,
3762
3767
  title: o(d)("menu.product.form.variant.title"),
@@ -3793,7 +3798,7 @@ const Ua = {
3793
3798
  variant: o(qe).Tertiary,
3794
3799
  class: "handle",
3795
3800
  "prepend-icon": "drag_handle"
3796
- }, null, 8, ["variant"]), A("div", ja, [A("p", Wa, ge((le = v.value[Q]) == null ? void 0 : le.name), 1), C(_, {
3801
+ }, null, 8, ["variant"]), A("div", ja, [A("p", Wa, ge((le = b.value[Q]) == null ? void 0 : le.name), 1), C(v, {
3797
3802
  class: "cursor-pointer",
3798
3803
  name: "close",
3799
3804
  onClick: He((Ce) => {
@@ -3875,12 +3880,12 @@ const Ua = {
3875
3880
  route: ""
3876
3881
  }), re = re.parent;
3877
3882
  return Y.reverse();
3878
- }), b = q(null);
3883
+ }), _ = q(null);
3879
3884
  Ae(() => {
3880
3885
  var K;
3881
- (K = b.value) == null || K.setSelectedItemIndex(w.value.length - 1);
3886
+ (K = _.value) == null || K.setSelectedItemIndex(w.value.length - 1);
3882
3887
  });
3883
- const v = D(() => g.rules.item), f = q(), a = q(
3888
+ const b = D(() => g.rules.item), f = q(), a = q(
3884
3889
  t.initialForm ? me(t.initialForm) : {
3885
3890
  ...Le.generator.initMenuV4Item(),
3886
3891
  category: t.categoryId
@@ -3961,7 +3966,7 @@ const Ua = {
3961
3966
  }
3962
3967
  }, c());
3963
3968
  }
3964
- const _ = q(
3969
+ const v = q(
3965
3970
  !!a.value.inventoryBindings || (((ne = a.value.variant) == null ? void 0 : ne.variantCombinations) || []).some((K) => !!K.inventoryBindings) || !1
3966
3971
  );
3967
3972
  function x(K) {
@@ -4103,7 +4108,7 @@ const Ua = {
4103
4108
  return [
4104
4109
  C(re, {
4105
4110
  ref_key: "breadCrumbRef",
4106
- ref: b,
4111
+ ref: _,
4107
4112
  items: w.value
4108
4113
  }, null, 8, ["items"]),
4109
4114
  C(bo, { "menu-store": o(g) }, null, 8, ["menu-store"]),
@@ -4170,8 +4175,8 @@ const Ua = {
4170
4175
  ]),
4171
4176
  _: 1
4172
4177
  }, 8, ["toggle", "disabled", "description", "title"]),
4173
- v.value.print && !p.value ? ($(), J("div", Ja)) : X("", !0),
4174
- v.value.print ? ($(), H(Be, {
4178
+ b.value.print && !p.value ? ($(), J("div", Ja)) : X("", !0),
4179
+ b.value.print ? ($(), H(Be, {
4175
4180
  key: 4,
4176
4181
  toggle: j.value,
4177
4182
  "onUpdate:toggle": [
@@ -4219,8 +4224,8 @@ const Ua = {
4219
4224
  ]),
4220
4225
  _: 1
4221
4226
  }, 8, ["toggle", "disabled", "description", "title"]),
4222
- v.value.group && !p.value ? ($(), J("div", Za)) : X("", !0),
4223
- v.value.group ? ($(), H(Be, {
4227
+ b.value.group && !p.value ? ($(), J("div", Za)) : X("", !0),
4228
+ b.value.group ? ($(), H(Be, {
4224
4229
  key: 7,
4225
4230
  toggle: le.value,
4226
4231
  "onUpdate:toggle": [
@@ -4244,12 +4249,12 @@ const Ua = {
4244
4249
  ]),
4245
4250
  _: 1
4246
4251
  }, 8, ["toggle", "disabled"])) : X("", !0),
4247
- v.value.inventory && !p.value ? ($(), J("div", el)) : X("", !0),
4248
- v.value.inventory ? ($(), H(Be, {
4252
+ b.value.inventory && !p.value ? ($(), J("div", el)) : X("", !0),
4253
+ b.value.inventory ? ($(), H(Be, {
4249
4254
  key: 9,
4250
- toggle: _.value,
4255
+ toggle: v.value,
4251
4256
  "onUpdate:toggle": [
4252
- Y[15] || (Y[15] = (Z) => _.value = Z),
4257
+ Y[15] || (Y[15] = (Z) => v.value = Z),
4253
4258
  Y[16] || (Y[16] = (Z) => x(Z))
4254
4259
  ],
4255
4260
  disabled: !p.value,
@@ -4269,8 +4274,8 @@ const Ua = {
4269
4274
  ]),
4270
4275
  _: 1
4271
4276
  }, 8, ["toggle", "disabled", "description", "title"])) : X("", !0),
4272
- v.value.takeaway(a.value.category ?? ((ie = f.value) == null ? void 0 : ie.category)) && !p.value ? ($(), J("div", tl)) : X("", !0),
4273
- v.value.takeaway(a.value.category ?? ((Te = f.value) == null ? void 0 : Te.category)) ? ($(), H(Be, {
4277
+ b.value.takeaway(a.value.category ?? ((ie = f.value) == null ? void 0 : ie.category)) && !p.value ? ($(), J("div", tl)) : X("", !0),
4278
+ b.value.takeaway(a.value.category ?? ((Te = f.value) == null ? void 0 : Te.category)) ? ($(), H(Be, {
4274
4279
  key: 11,
4275
4280
  toggle: y.value,
4276
4281
  "onUpdate:toggle": [
@@ -4303,26 +4308,26 @@ const Ua = {
4303
4308
  });
4304
4309
  function ol(n) {
4305
4310
  const { storageKey: r, defaultWidth: e, minWidth: t, maxWidth: m } = n, s = jo(r, e), g = q(!1), d = q(null);
4306
- function h(v) {
4307
- v.preventDefault(), g.value = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", b), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
4311
+ function h(b) {
4312
+ b.preventDefault(), g.value = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", _), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
4308
4313
  }
4309
- function w(v) {
4314
+ function w(b) {
4310
4315
  if (g.value && d.value) {
4311
- const f = d.value.getBoundingClientRect(), a = v.clientX - f.left;
4316
+ const f = d.value.getBoundingClientRect(), a = b.clientX - f.left;
4312
4317
  a >= t && a <= m && (s.value = a);
4313
4318
  }
4314
4319
  }
4315
- function b() {
4316
- g.value = !1, document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", b), document.body.style.cursor = "", document.body.style.userSelect = "";
4320
+ function _() {
4321
+ g.value = !1, document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", _), document.body.style.cursor = "", document.body.style.userSelect = "";
4317
4322
  }
4318
4323
  return Dn(() => {
4319
- document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", b);
4324
+ document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", _);
4320
4325
  }), {
4321
4326
  panelWidth: s,
4322
4327
  isDragging: g,
4323
4328
  containerRef: d,
4324
4329
  startResize: h,
4325
- stopResize: b
4330
+ stopResize: _
4326
4331
  };
4327
4332
  }
4328
4333
  const rl = {
@@ -4414,8 +4419,8 @@ function kn() {
4414
4419
  data: d
4415
4420
  });
4416
4421
  }
4417
- async function s(d, h, w, b) {
4418
- let v = mt(h);
4422
+ async function s(d, h, w, _) {
4423
+ let b = mt(h);
4419
4424
  const f = /* @__PURE__ */ new Map(), a = mt(n.state.menu);
4420
4425
  for (const S of a.modules.item)
4421
4426
  f.set(S._id, S);
@@ -4424,9 +4429,9 @@ function kn() {
4424
4429
  const k = f.get(S.id);
4425
4430
  if (k) {
4426
4431
  let p = null;
4427
- b && b._id !== h._id && (p = so(
4432
+ _ && _._id !== h._id && (p = so(
4428
4433
  k,
4429
- b == null ? void 0 : b._id,
4434
+ _ == null ? void 0 : _._id,
4430
4435
  h._id
4431
4436
  ));
4432
4437
  const T = uo(
@@ -4437,14 +4442,14 @@ function kn() {
4437
4442
  Object.assign(k, T);
4438
4443
  }
4439
4444
  } else if (S.type === "subCategory")
4440
- v = pl(v, [...w, S.id], {
4445
+ b = pl(b, [...w, S.id], {
4441
4446
  position: O
4442
4447
  });
4443
4448
  else
4444
4449
  throw new Error("Invalid item type");
4445
4450
  });
4446
4451
  const I = a.modules.category.find((S) => S._id === (h == null ? void 0 : h._id) || null);
4447
- I && (I.subCategoryMeta = v.subCategoryMeta), n.setMenu(a);
4452
+ I && (I.subCategoryMeta = b.subCategoryMeta), n.setMenu(a);
4448
4453
  }
4449
4454
  async function g(d, h) {
4450
4455
  await n.updateMenu({
@@ -4544,7 +4549,7 @@ function fl() {
4544
4549
  }
4545
4550
  throw new Error("No parent category node found");
4546
4551
  }
4547
- function b(a) {
4552
+ function _(a) {
4548
4553
  var O, k, p, T;
4549
4554
  if (!a.children)
4550
4555
  return a;
@@ -4560,10 +4565,10 @@ function fl() {
4560
4565
  return S(U.meta.rawObject);
4561
4566
  throw new Error("Should not have other node type in category");
4562
4567
  }
4563
- ), { ...a, children: a.children.map(b) }) : a;
4568
+ ), { ...a, children: a.children.map(_) }) : a;
4564
4569
  }
4565
- function v(a) {
4566
- return a.map(b);
4570
+ function b(a) {
4571
+ return a.map(_);
4567
4572
  }
4568
4573
  async function f({ eventEmitter: a }) {
4569
4574
  var Q, le, Ce, he;
@@ -4902,7 +4907,7 @@ function fl() {
4902
4907
  }
4903
4908
  const P = d(l);
4904
4909
  return g(P), {
4905
- tree: v(P)
4910
+ tree: b(P)
4906
4911
  };
4907
4912
  }
4908
4913
  return {
@@ -4946,7 +4951,7 @@ function gl() {
4946
4951
  d(l) && u.unshift(l.meta.rawId), l = l.parent || null;
4947
4952
  return u;
4948
4953
  }
4949
- function b(E) {
4954
+ function _(E) {
4950
4955
  return E.children ? E.children.map((u) => {
4951
4956
  if (g(u))
4952
4957
  return {
@@ -4961,11 +4966,11 @@ function gl() {
4961
4966
  throw new Error("Node is not an item or sub-category");
4962
4967
  }) : [];
4963
4968
  }
4964
- function v(E, u) {
4969
+ function b(E, u) {
4965
4970
  return s(u);
4966
4971
  }
4967
- function f(E, u, l, i, _) {
4968
- return !!i && !!_ && i.id === _.id && l !== "inside";
4972
+ function f(E, u, l, i, v) {
4973
+ return !!i && !!v && i.id === v.id && l !== "inside";
4969
4974
  }
4970
4975
  function a(E) {
4971
4976
  let u = [];
@@ -4983,7 +4988,7 @@ function gl() {
4983
4988
  }
4984
4989
  return null;
4985
4990
  }
4986
- function S(E, u, l, i, _) {
4991
+ function S(E, u, l, i, v) {
4987
4992
  if (g(u)) {
4988
4993
  const x = I(E), y = I(u);
4989
4994
  return (x == null ? void 0 : x.id) === (y == null ? void 0 : y.id) ? !0 : !((x == null ? void 0 : x.id) !== (y == null ? void 0 : y.id) && a(y).some(
@@ -4996,24 +5001,24 @@ function gl() {
4996
5001
  return s(u) && i && u.id !== i.id && l === "inside" ? !a(u).some((y) => {
4997
5002
  var P, j;
4998
5003
  return ((P = y.meta) == null ? void 0 : P.rawId) === ((j = E.meta) == null ? void 0 : j.rawId);
4999
- }) : !!(g(u) && (_ == null ? void 0 : _.id) !== (i == null ? void 0 : i.id) || d(u));
5004
+ }) : !!(g(u) && (v == null ? void 0 : v.id) !== (i == null ? void 0 : i.id) || d(u));
5000
5005
  }
5001
5006
  const O = (E, u, l) => {
5002
- const i = t.getNodeById(E), _ = t.getNodeById(u), x = i == null ? void 0 : i.parent, y = _ == null ? void 0 : _.parent;
5003
- return !i || !_ ? !1 : s(i) ? v(i, _) : d(i) ? f(i, _, l, x, y) : g(i) ? S(i, _, l, x, y) : !1;
5007
+ const i = t.getNodeById(E), v = t.getNodeById(u), x = i == null ? void 0 : i.parent, y = v == null ? void 0 : v.parent;
5008
+ return !i || !v ? !1 : s(i) ? b(i, v) : d(i) ? f(i, v, l, x, y) : g(i) ? S(i, v, l, x, y) : !1;
5004
5009
  };
5005
5010
  async function k(E, u, l) {
5006
- if (!v(E, u)) {
5011
+ if (!b(E, u)) {
5007
5012
  m("Can't drag category here");
5008
5013
  return;
5009
5014
  }
5010
- const i = t.treeNodes, _ = i.findIndex((j) => j.id === E.id);
5015
+ const i = t.treeNodes, v = i.findIndex((j) => j.id === E.id);
5011
5016
  let x = i.findIndex((j) => j.id === u.id);
5012
5017
  l === "after" && x++;
5013
5018
  const y = i.map((j) => {
5014
5019
  var Q;
5015
5020
  return (Q = j.meta) == null ? void 0 : Q.rawId;
5016
- }).filter(Boolean), P = wt(y, _, x);
5021
+ }).filter(Boolean), P = wt(y, v, x);
5017
5022
  await e.rearrange(P);
5018
5023
  }
5019
5024
  function p(E, u) {
@@ -5022,7 +5027,7 @@ function gl() {
5022
5027
  return { parent: E, index: 0 };
5023
5028
  if (g(E)) {
5024
5029
  if (!E.parent) throw new Error("Target item's parent not found");
5025
- let i = ((l = E.parent.children) == null ? void 0 : l.findIndex((_) => _.id === E.id)) ?? -1;
5030
+ let i = ((l = E.parent.children) == null ? void 0 : l.findIndex((v) => v.id === E.id)) ?? -1;
5026
5031
  if (i === -1) throw new Error("Target item not found in parent");
5027
5032
  return u === "after" && i++, { parent: E.parent, index: i };
5028
5033
  }
@@ -5031,22 +5036,22 @@ function gl() {
5031
5036
  return { parent: E, index: 0 };
5032
5037
  if (!E.parent || !E.parent.children)
5033
5038
  throw new Error("Target sub-category's parent not found");
5034
- let i = E.parent.children.findIndex((_) => _.id === E.id);
5039
+ let i = E.parent.children.findIndex((v) => v.id === E.id);
5035
5040
  return u === "after" && i++, { parent: E.parent, index: i };
5036
5041
  }
5037
5042
  throw new Error("Invalid target node for item drop");
5038
5043
  }
5039
5044
  async function T(E, u, l, i) {
5040
5045
  var j;
5041
- const _ = b(u), x = ((j = u.children) == null ? void 0 : j.findIndex((Q) => Q.id === E.id)) ?? -1;
5046
+ const v = _(u), x = ((j = u.children) == null ? void 0 : j.findIndex((Q) => Q.id === E.id)) ?? -1;
5042
5047
  if (x === -1) throw new Error("Source index not found");
5043
- const y = wt(_, x, l), P = w(u);
5048
+ const y = wt(v, x, l), P = w(u);
5044
5049
  await r.rearrangeWithSubCategory(y, i, P);
5045
5050
  }
5046
5051
  async function U(E, u, l, i) {
5047
5052
  var j;
5048
- const _ = b(u);
5049
- _.splice(l, 0, {
5053
+ const v = _(u);
5054
+ v.splice(l, 0, {
5050
5055
  type: "item",
5051
5056
  id: E.meta.rawId
5052
5057
  });
@@ -5057,7 +5062,7 @@ function gl() {
5057
5062
  y.category = i._id, y.subCategories = x;
5058
5063
  const P = h(E);
5059
5064
  await r.updateItem(y._id, y), await r.rearrangeWithSubCategory(
5060
- _,
5065
+ v,
5061
5066
  i,
5062
5067
  x,
5063
5068
  P
@@ -5070,20 +5075,20 @@ function gl() {
5070
5075
  m("Cannot drop item here");
5071
5076
  return;
5072
5077
  }
5073
- const _ = p(u, l), x = h(u), y = E.meta;
5074
- ((i = E.parent) == null ? void 0 : i.id) === _.parent.id ? await T(
5078
+ const v = p(u, l), x = h(u), y = E.meta;
5079
+ ((i = E.parent) == null ? void 0 : i.id) === v.parent.id ? await T(
5075
5080
  E,
5076
- _.parent,
5077
- _.index,
5081
+ v.parent,
5082
+ v.index,
5078
5083
  x
5079
5084
  ) : await U(
5080
5085
  E,
5081
- _.parent,
5082
- _.index,
5086
+ v.parent,
5087
+ v.index,
5083
5088
  x
5084
5089
  );
5085
- } catch (_) {
5086
- m(_.message || "Failed to move item");
5090
+ } catch (v) {
5091
+ m(v.message || "Failed to move item");
5087
5092
  }
5088
5093
  }
5089
5094
  async function F(E, u, l) {
@@ -5100,12 +5105,12 @@ function gl() {
5100
5105
  const i = E.parent;
5101
5106
  if (!i || !i.children)
5102
5107
  throw new Error("Parent node not found or has no children");
5103
- const _ = b(i), x = i.children.findIndex((le) => le.id === E.id);
5108
+ const v = _(i), x = i.children.findIndex((le) => le.id === E.id);
5104
5109
  let y = i.children.findIndex((le) => le.id === u.id);
5105
5110
  if (x === -1 || y === -1)
5106
5111
  throw new Error("Source or target index not found");
5107
5112
  l === "after" && y++;
5108
- const P = wt(_, x, y), j = h(i), Q = w(i);
5113
+ const P = wt(v, x, y), j = h(i), Q = w(i);
5109
5114
  await r.rearrangeWithSubCategory(P, j, Q);
5110
5115
  }
5111
5116
  async function R(E) {
@@ -5177,17 +5182,17 @@ const St = /* @__PURE__ */ ae({
5177
5182
  }
5178
5183
  }), En = 300;
5179
5184
  function vl(n) {
5180
- const { itemHeight: r, emit: e, getFlattenedItems: t, getContainerRef: m, canDropFn: s } = n, g = q(!1), d = q(null), h = q(null), w = q(null), b = q(0), v = q({ x: 0, y: 0 }), f = q(/* @__PURE__ */ new Map());
5185
+ const { itemHeight: r, emit: e, getFlattenedItems: t, getContainerRef: m, canDropFn: s } = n, g = q(!1), d = q(null), h = q(null), w = q(null), _ = q(0), b = q({ x: 0, y: 0 }), f = q(/* @__PURE__ */ new Map());
5181
5186
  function a(k, p) {
5182
- p.button === 0 && (v.value = { x: p.clientX, y: p.clientY }, d.value = k, b.value = p.clientY, f.value = nr(t()), setTimeout(() => {
5183
- d.value === k && (g.value = !0, v.value = { x: p.clientX, y: p.clientY }, e("updateDragState", k, null, null), document.addEventListener("mousemove", I), document.addEventListener("mouseup", S));
5187
+ p.button === 0 && (b.value = { x: p.clientX, y: p.clientY }, d.value = k, _.value = p.clientY, f.value = nr(t()), setTimeout(() => {
5188
+ d.value === k && (g.value = !0, b.value = { x: p.clientX, y: p.clientY }, e("updateDragState", k, null, null), document.addEventListener("mousemove", I), document.addEventListener("mouseup", S));
5184
5189
  }, En));
5185
5190
  }
5186
5191
  function I(k) {
5187
5192
  var E;
5188
5193
  if (!g.value || !d.value) return;
5189
5194
  requestAnimationFrame(() => {
5190
- v.value = { x: k.clientX, y: k.clientY };
5195
+ b.value = { x: k.clientX, y: k.clientY };
5191
5196
  });
5192
5197
  const p = m();
5193
5198
  if (!p) return;
@@ -5201,8 +5206,8 @@ function vl(n) {
5201
5206
  h.value = l;
5202
5207
  const i = (E = document.getElementById(`tree-node-${l}`)) == null ? void 0 : E.getBoundingClientRect();
5203
5208
  if (i) {
5204
- const _ = k.clientY - i.top;
5205
- _ < i.height / 3 ? w.value = "before" : _ > i.height * 2 / 3 ? w.value = "after" : w.value = "inside";
5209
+ const v = k.clientY - i.top;
5210
+ v < i.height / 3 ? w.value = "before" : v > i.height * 2 / 3 ? w.value = "after" : w.value = "inside";
5206
5211
  }
5207
5212
  if (s && w.value && !s(d.value, l, w.value)) {
5208
5213
  h.value = null, w.value = null, e("updateDragState", d.value, null, null);
@@ -5228,7 +5233,7 @@ function vl(n) {
5228
5233
  draggedNodeId: d,
5229
5234
  dropTargetNodeId: h,
5230
5235
  dropPosition: w,
5231
- mousePosition: v,
5236
+ mousePosition: b,
5232
5237
  onDragStart: a,
5233
5238
  cancelDrag: O
5234
5239
  };
@@ -5328,8 +5333,8 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5328
5333
  }) {
5329
5334
  const e = n, t = D(() => e.expanded ? "expand_more" : "chevron_right"), m = D(() => e.node.disabled ? "text-fm-color-neutral-gray-200" : ""), s = D(() => e.node.disabled ? "cursor-not-allowed" : e.node.onClick ? "cursor-pointer" : ""), g = D(() => e.selected ? "bg-fm-color-system-warning-100" : e.dropTarget && e.dropPosition === "inside" ? "bg-fm-color-primary-50" : ""), d = D(() => e.selected ? "text-fm-color-primary" : ""), h = r, {
5330
5335
  onMouseDown: w,
5331
- onMouseMove: b,
5332
- onMouseUp: v
5336
+ onMouseMove: _,
5337
+ onMouseUp: b
5333
5338
  } = bl((f) => {
5334
5339
  var a;
5335
5340
  (a = e.node) != null && a.draggable && h("dragStart", f);
@@ -5351,11 +5356,11 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5351
5356
  onMousedown: a[3] || (a[3] = //@ts-ignore
5352
5357
  (...T) => o(w) && o(w)(...T)),
5353
5358
  onMousemove: a[4] || (a[4] = //@ts-ignore
5354
- (...T) => o(b) && o(b)(...T)),
5359
+ (...T) => o(_) && o(_)(...T)),
5355
5360
  onMouseup: a[5] || (a[5] = //@ts-ignore
5356
- (...T) => o(v) && o(v)(...T)),
5361
+ (...T) => o(b) && o(b)(...T)),
5357
5362
  onMouseleave: a[6] || (a[6] = //@ts-ignore
5358
- (...T) => o(v) && o(v)(...T))
5363
+ (...T) => o(b) && o(b)(...T))
5359
5364
  }, [A("div", wl, [A("div", Cl, [(O = f.node) != null && O.draggable && !f.node.disabled ? ($(), H(I, {
5360
5365
  key: 0,
5361
5366
  name: "drag_indicator",
@@ -5460,23 +5465,23 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5460
5465
  q(null);
5461
5466
  const {
5462
5467
  list: w,
5463
- scrollTo: b,
5464
- containerProps: v,
5468
+ scrollTo: _,
5469
+ containerProps: b,
5465
5470
  wrapperProps: f
5466
5471
  } = Wo(h, {
5467
5472
  itemHeight: It,
5468
5473
  overscan: 10
5469
5474
  });
5470
5475
  ye(() => h.value.length, async (F) => {
5471
- const R = v.ref.value;
5472
- R && F * It < R.scrollTop && (await nt(), b(0));
5476
+ const R = b.ref.value;
5477
+ R && F * It < R.scrollTop && (await nt(), _(0));
5473
5478
  });
5474
5479
  function a() {
5475
- b(0);
5480
+ _(0);
5476
5481
  }
5477
5482
  function I(F) {
5478
5483
  const R = h.value.findIndex((E) => E.id === F);
5479
- R !== -1 && b(R);
5484
+ R !== -1 && _(R);
5480
5485
  }
5481
5486
  const {
5482
5487
  isDragging: S,
@@ -5492,7 +5497,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5492
5497
  F === "updateDragState" ? s("updateDragState", ...R) : F === "nodeDragDrop" && s("nodeDragDrop", R[0]);
5493
5498
  },
5494
5499
  getFlattenedItems: () => h.value,
5495
- getContainerRef: () => v.ref.value,
5500
+ getContainerRef: () => b.ref.value,
5496
5501
  canDropFn: m.canDropFn
5497
5502
  });
5498
5503
  return r({
@@ -5504,7 +5509,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5504
5509
  const E = W("FmIcon");
5505
5510
  return $(), J("div", Vn({
5506
5511
  class: "tree-container"
5507
- }, o(v)), [A("div", $n(Pn(o(f))), [($(!0), J(Oe, null, Ne(o(w), ({
5512
+ }, o(b)), [A("div", $n(Pn(o(f))), [($(!0), J(Oe, null, Ne(o(w), ({
5508
5513
  data: l
5509
5514
  }) => {
5510
5515
  var i;
@@ -5528,8 +5533,8 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5528
5533
  dragging: o(S) && o(O) === l.id,
5529
5534
  dropTarget: o(k) === l.id,
5530
5535
  dropPosition: o(k) === l.id ? o(p) : null,
5531
- onToggleExpand: (_) => g(l.id),
5532
- onDragStart: (_) => o(U)(l.id, _),
5536
+ onToggleExpand: (v) => g(l.id),
5537
+ onDragStart: (v) => o(U)(l.id, v),
5533
5538
  style: ct({
5534
5539
  paddingLeft: `${l.level * 20}px`
5535
5540
  })
@@ -5590,18 +5595,18 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5590
5595
  const e = n, t = r, m = at(), s = se(), g = gt(), {
5591
5596
  canDropFn: d,
5592
5597
  handleNodeDragDrop: h
5593
- } = gl(), w = D(() => e.filterState.searchKey), b = $o(w, 300), {
5594
- generateTreeFromMenu: v
5598
+ } = gl(), w = D(() => e.filterState.searchKey), _ = $o(w, 300), {
5599
+ generateTreeFromMenu: b
5595
5600
  } = fl();
5596
5601
  async function f() {
5597
- return await v({
5602
+ return await b({
5598
5603
  filterState: e.filterState,
5599
5604
  eventEmitter: (M) => {
5600
5605
  t("tree-event", M);
5601
5606
  }
5602
5607
  });
5603
5608
  }
5604
- ye([() => e.overridedMenu, () => b.value], async () => {
5609
+ ye([() => e.overridedMenu, () => _.value], async () => {
5605
5610
  const M = await f();
5606
5611
  if (e.filterState.searchKey) {
5607
5612
  const F = er(M.tree, e.filterState.searchKey);
@@ -5704,32 +5709,32 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5704
5709
  label: r("menu.tree_editor.labels.main_catalog"),
5705
5710
  value: null
5706
5711
  },
5707
- ...e.menu.modules.catalog.map((v) => ({
5708
- label: v.name,
5709
- value: v._id
5712
+ ...e.menu.modules.catalog.map((b) => ({
5713
+ label: b.name,
5714
+ value: b._id
5710
5715
  }))
5711
5716
  ]), g = D(() => {
5712
5717
  var a;
5713
- const v = r("menu.common.labels.catalog"), f = ((a = s.value.find((I) => I.value === m.value.catalogId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.main_catalog");
5714
- return `${v}: ${f}`;
5718
+ const b = r("menu.common.labels.catalog"), f = ((a = s.value.find((I) => I.value === m.value.catalogId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.main_catalog");
5719
+ return `${b}: ${f}`;
5715
5720
  }), d = D(() => {
5716
5721
  var a;
5717
- const v = r("menu.common.labels.scheduler"), f = ((a = w.value.find((I) => I.value === m.value.schedulerId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.all_time");
5718
- return `${v}: ${f}`;
5722
+ const b = r("menu.common.labels.scheduler"), f = ((a = w.value.find((I) => I.value === m.value.schedulerId)) == null ? void 0 : a.label) || r("menu.tree_editor.labels.all_time");
5723
+ return `${b}: ${f}`;
5719
5724
  }), h = D(() => t.isV4), w = D(() => [
5720
5725
  {
5721
5726
  label: r("menu.tree_editor.labels.all_time"),
5722
5727
  value: ""
5723
5728
  },
5724
- ...e.menu.modules.scheduler.map((v) => ({
5725
- label: v.name,
5726
- value: v._id
5729
+ ...e.menu.modules.scheduler.map((b) => ({
5730
+ label: b.name,
5731
+ value: b._id
5727
5732
  }))
5728
- ]), b = D(() => {
5729
- var v, f;
5730
- return (f = (v = t.currentCatalog) == null ? void 0 : v.linkItemRules) == null ? void 0 : f.length;
5733
+ ]), _ = D(() => {
5734
+ var b, f;
5735
+ return (f = (b = t.currentCatalog) == null ? void 0 : b.linkItemRules) == null ? void 0 : f.length;
5731
5736
  });
5732
- return (v, f) => {
5737
+ return (b, f) => {
5733
5738
  const a = W("FmSearch");
5734
5739
  return $(), J("div", Bl, [
5735
5740
  C(Kt, {
@@ -5749,7 +5754,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5749
5754
  "custom-label": d.value,
5750
5755
  "onUpdate:modelValue": f[1] || (f[1] = (I) => m.value.schedulerId = I)
5751
5756
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])) : X("", !0),
5752
- b.value ? ($(), H(Po, {
5757
+ _.value ? ($(), H(Po, {
5753
5758
  key: 1,
5754
5759
  "current-restaurant-attr-params": o(t).state.currentRestaurantAttrParams,
5755
5760
  onConfirm: f[2] || (f[2] = (I) => o(t).setRestaurantAttrParams(I)),
@@ -5821,19 +5826,19 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5821
5826
  }), Ot(() => {
5822
5827
  t.$dispose(), m.setExpandedNodeIds([]), m.setSelectedNodeId(null);
5823
5828
  });
5824
- const s = q(null), { currentItemId: g, initialForm: d, itemFormKey: h } = ir(t), { saveItemFormEditingStateDebounced: w } = or(s, t), b = q(null);
5825
- async function v(a) {
5829
+ const s = q(null), { currentItemId: g, initialForm: d, itemFormKey: h } = ir(t), { saveItemFormEditingStateDebounced: w } = or(s, t), _ = q(null);
5830
+ async function b(a) {
5826
5831
  if (a.type === we.SELECT_ITEM || a.type === we.SELECT_PRICE || a.type === we.SELECT_GROUP || a.type === we.SELECT_VARIANT) {
5827
5832
  if (!f(a.itemId))
5828
5833
  return;
5829
- await nt(), a.type === we.SELECT_ITEM ? b.value = {
5834
+ await nt(), a.type === we.SELECT_ITEM ? _.value = {
5830
5835
  type: "general"
5831
- } : a.type === we.SELECT_PRICE ? b.value = {
5836
+ } : a.type === we.SELECT_PRICE ? _.value = {
5832
5837
  type: "price"
5833
- } : a.type === we.SELECT_GROUP ? b.value = {
5838
+ } : a.type === we.SELECT_GROUP ? _.value = {
5834
5839
  type: "group",
5835
5840
  id: a.groupId
5836
- } : a.type === we.SELECT_VARIANT && (b.value = {
5841
+ } : a.type === we.SELECT_VARIANT && (_.value = {
5837
5842
  type: "variant",
5838
5843
  id: a.combinationKey
5839
5844
  });
@@ -5856,7 +5861,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5856
5861
  menu: a.menu,
5857
5862
  "overrided-menu": o(t).mergedMenu,
5858
5863
  loading: o(t).workerIsComputing,
5859
- onTreeEvent: v
5864
+ onTreeEvent: b
5860
5865
  }, null, 8, ["menu", "overrided-menu", "loading"])
5861
5866
  ]),
5862
5867
  "right-panel": B(() => [
@@ -5869,7 +5874,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5869
5874
  menu: o(t).state.menu,
5870
5875
  "merged-menu": o(t).mergedMenu,
5871
5876
  "category-id": null,
5872
- focused: b.value,
5877
+ focused: _.value,
5873
5878
  "onUpdate:editingState": o(w)
5874
5879
  }, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : ($(), J("div", Ql, [
5875
5880
  A("div", Zl, ge(o(r)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
@@ -5900,7 +5905,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5900
5905
  g("update:show", !1);
5901
5906
  }, h = ln(), w = se();
5902
5907
  w.selectCatalog(null), w.selectScheduler(null);
5903
- const b = q(!1), v = () => {
5908
+ const _ = q(!1), b = () => {
5904
5909
  m(
5905
5910
  async () => {
5906
5911
  wn(), await nt();
@@ -5908,7 +5913,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5908
5913
  await h.updateMenuSetting(I), await h.importMenu(I), d();
5909
5914
  },
5910
5915
  {
5911
- isLoading: b,
5916
+ isLoading: _,
5912
5917
  message: "Updating menu...",
5913
5918
  successMessage: "Menu updated successfully"
5914
5919
  }
@@ -5929,7 +5934,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5929
5934
  class: fe(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
5930
5935
  style: ct({ zIndex: a.zIndex }),
5931
5936
  tabindex: "-1",
5932
- onValidationSuccess: v,
5937
+ onValidationSuccess: b,
5933
5938
  onKeyup: Mn(o(f), ["esc"])
5934
5939
  }, {
5935
5940
  default: B(() => [
@@ -5957,7 +5962,7 @@ const _l = { key: 0 }, yl = ["innerHTML"], hl = /* @__PURE__ */ ae({
5957
5962
  label: o(s)("common.save"),
5958
5963
  type: "submit",
5959
5964
  variant: "primary",
5960
- loading: b.value
5965
+ loading: _.value
5961
5966
  }, null, 8, ["label", "loading"])
5962
5967
  ])
5963
5968
  ]),