@feedmepos/mf-menu 0.32.83-dev.1 → 0.32.83

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 (79) hide show
  1. package/dist/{App-BYdCC3TK.js → App-Bw-ozzec.js} +8 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CsMCfu1s.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DHDH7KKi.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CWH86f_J.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-BXUoYPtC.js} +3 -3
  4. package/dist/{Catalog-BPRRb4QE.js → Catalog-Dmi4r1Zs.js} +6 -6
  5. package/dist/{CatalogBinding-B2vhvUHz.js → CatalogBinding-B7H-nEwM.js} +13 -13
  6. package/dist/{Category-zKR2QaeE.js → Category-BKwpeCXh.js} +4 -4
  7. package/dist/{Category-DeeXKn4P.js → Category-CwBmbR5g.js} +4 -4
  8. package/dist/{CookingGuide-Wm39wm7Q.js → CookingGuide-Dhsu1zWp.js} +5 -5
  9. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CAHNxiEJ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DvGdDV9p.js} +1 -1
  10. package/dist/{Group-BNcZYOU4.js → Group-Ceu7Copf.js} +3 -3
  11. package/dist/{Group-E2HYqd9f.js → Group-DNC-Usx0.js} +1 -1
  12. package/dist/{Group.vue_vue_type_script_setup_true_lang-DPk_cgPi.js → Group.vue_vue_type_script_setup_true_lang-D7J8SXa7.js} +7 -7
  13. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B0X5brpK.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CHdTcTM3.js} +5 -5
  14. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DxowkX0c.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-pBlcLv-w.js} +212 -212
  15. package/dist/{Ingredient-DcJrO6OE.js → Ingredient-CC0JhuTG.js} +4 -4
  16. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DfrJBP75.js → InventoryBinding.vue_vue_type_script_setup_true_lang-hv2j96xE.js} +2 -2
  17. package/dist/{LinkProductSideSheet-DTzuEcF5.js → LinkProductSideSheet-TN2_U83N.js} +4 -4
  18. package/dist/{MenuSetting-DICpAfNK.js → MenuSetting-CVvexu1x.js} +7 -7
  19. package/dist/{OrderPacing-pD1pgJG5.js → OrderPacing-Bdwdg02x.js} +5 -5
  20. package/dist/{PrintRoute-BAY_gpJS.js → PrintRoute-CjFa5lDf.js} +5 -5
  21. package/dist/{Product-B_YsLenC.js → Product-CJju3e91.js} +1 -1
  22. package/dist/{Product.vue_vue_type_script_setup_true_lang-DEsNttgJ.js → Product.vue_vue_type_script_setup_true_lang-CgyRlUfF.js} +14 -14
  23. package/dist/{ProductInternalTools-CfA-6XtS.js → ProductInternalTools-x58c-Eqi.js} +7 -7
  24. package/dist/{Products-arAA8I2u.js → Products-C1kMAf09.js} +34 -34
  25. package/dist/Publish-CWU3b98i.js +1608 -0
  26. package/dist/{Recipe-DRcrzXhA.js → Recipe-DzzZnDyw.js} +5 -5
  27. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CAVrU6RI.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-C1SJG0VC.js} +1 -1
  28. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DYnnO3SQ.js → RuleView.vue_vue_type_script_setup_true_lang-DKCI5FWu.js} +731 -731
  29. package/dist/{Scheduler-oxLqE74K.js → Scheduler-BNfWt8Dg.js} +3 -3
  30. package/dist/{ServingSequence-DVkB7hDy.js → ServingSequence-Cd4h0cg6.js} +3 -3
  31. package/dist/{Setting-DOsTp22X.js → Setting-Doi12dmL.js} +5 -5
  32. package/dist/{Subcategory-BaclYZ5p.js → Subcategory-DWeszc_Q.js} +6 -6
  33. package/dist/Takeaway-BN4ALKLd.js +64 -0
  34. package/dist/{Takeaway-D2jvmsuu.js → Takeaway-hxK-Doql.js} +1 -1
  35. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-6IZPDhaJ.js +331 -0
  36. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-M3Oh6Dr6.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CoJ6I8th.js} +1 -1
  37. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DjswjUjQ.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-R8Uq2q8a.js} +2 -2
  38. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dcd1ek03.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CDE3C737.js} +602 -601
  39. package/dist/{Unit-Dx8HMvAE.js → Unit-eH2N7G3C.js} +2 -2
  40. package/dist/{Variant-Dx6EWp55.js → Variant-6Le_fght.js} +3 -3
  41. package/dist/{_id_-DIsWlajV.js → _id_-DEsYj32K.js} +10 -10
  42. package/dist/{app-curMXZbh.js → app-BchMdmn0.js} +1 -1
  43. package/dist/{app-BdtPzkjA.js → app-C3fvLdk6.js} +392 -392
  44. package/dist/app.js +1 -1
  45. package/dist/apps/mf-menu/src/app.d.ts +25 -0
  46. package/dist/apps/mf-menu/src/components/feature/TakeAwayManager/Form.vue.d.ts +3 -3
  47. package/dist/apps/mf-menu/src/helper/takeawayOverride.d.ts +12 -0
  48. package/dist/apps/mf-menu/src/manager/menu/takeaway.d.ts +14 -0
  49. package/dist/apps/mf-menu/src/views/Publish/publishError.d.ts +20 -0
  50. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  51. package/dist/assets/{linked-status-DsxqMxwe.js → linked-status-6gBSlnSK.js} +2 -2
  52. package/dist/assets/{menu-export-DcW52Lu3.js → menu-export--ku4LX8B.js} +2 -2
  53. package/dist/assets/{override-menu-DPPsvKsd.js → override-menu-Cfr4mD2N.js} +2 -2
  54. package/dist/assets/{validate-menu-Byl7hJI2.js → validate-menu-p5dTyV3b.js} +2 -2
  55. package/dist/{catalog-D4uhTN3P.js → catalog-BBW_JOmi.js} +1 -1
  56. package/dist/{catalogSetting-_zy50XFm.js → catalogSetting-FUxG-o8e.js} +1 -1
  57. package/dist/{currency-8AD3AdtT.js → currency-dN61r7Dj.js} +1 -1
  58. package/dist/{dayjs.min-CSadJcjJ.js → dayjs.min-zUn0kE7h.js} +2 -2
  59. package/dist/{discardConfirm-egY5vwUU.js → discardConfirm-JSuBPCBO.js} +1 -1
  60. package/dist/{index-B0hyUFIc.js → index-26hFA0dv.js} +1 -1
  61. package/dist/{index-BPGZgTH-.js → index-BXf2ffOW.js} +5 -5
  62. package/dist/{index-BpoYrrVu.js → index-wndkX4SS.js} +137 -131
  63. package/dist/{index.vue_vue_type_script_setup_true_lang-qUahjdoy.js → index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js} +10602 -10592
  64. package/dist/{item-CGqK7sn4.js → item-D6itBJWi.js} +1290 -1289
  65. package/dist/{jszip.min-Qb_fhEy6.js → jszip.min-CJAQHq0K.js} +3 -3
  66. package/dist/{linkProducts-DwBnfj3L.js → linkProducts-BCBOugXd.js} +4 -4
  67. package/dist/{memberPricing-CcXhcbV9.js → memberPricing-D4BvlT66.js} +1 -1
  68. package/dist/{menu-Cmz90lOu.js → menu-Bn85J25r.js} +1 -1
  69. package/dist/{menuV2-yXOZpuda.js → menuV2-DwgKWOb1.js} +38 -38
  70. package/dist/{order_pacing-Bp1Hpcp2.js → order_pacing-DlMIzFpD.js} +5 -5
  71. package/dist/{priceTier-B14Zw5XH.js → priceTier-mtlQOB7P.js} +1 -1
  72. package/dist/{rules-COZi7aRn.js → rules-CpmrQrSF.js} +3 -3
  73. package/dist/{scheduler-eoUNmYqB.js → scheduler-574B11my.js} +5 -5
  74. package/dist/{toExcel-BkhEG-vD.js → toExcel-B-Qbf0yE.js} +2 -2
  75. package/dist/{unit-Bmje7das.js → unit-BvrDtd_s.js} +3 -3
  76. package/package.json +2 -2
  77. package/dist/Publish-BORONVKG.js +0 -1582
  78. package/dist/Takeaway-BbcmF6t2.js +0 -64
  79. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-BpswLmDw.js +0 -324
@@ -1,39 +1,39 @@
1
1
  import { ref as re, computed as S, getCurrentInstance as Sn, render as En, defineComponent as be, onMounted as Xe, resolveComponent as Z, resolveDirective as on, createElementBlock as ee, openBlock as $, Fragment as we, createVNode as s, unref as e, withCtx as X, createElementVNode as B, createBlock as ae, createCommentVNode as ne, normalizeClass as Fe, renderList as De, toDisplayString as ve, createTextVNode as Fn, withDirectives as rt, renderSlot as Be, watch as Ue, h as Te, isVNode as Vn, nextTick as gt, vShow as an, withModifiers as Je, createSlots as $n, onBeforeUnmount as Rt, watchEffect as Pn, onUnmounted as Dn, normalizeStyle as mt, mergeProps as On, normalizeProps as Mn, guardReactiveProps as Un, mergeModels as Rn, useModel as An, Teleport as Nn, Transition as Gn, withKeys as Ln } from "vue";
2
- import { x as Kn, y as Bn, z as zn, A as jn, B as rn, D as Ft, P as Yn, I as qn, G as Wn, H as Hn, J as At, K as Xn, M as Qn, N as Jn, O as ln, Q as sn, R as un, T as dn, U as Zn, V as Nt, W as Gt, X as Lt, Y as cn, Z as Vt, $ as eo, a0 as to, a1 as no, a2 as oo, a3 as ao, a4 as ro, a5 as mn, a6 as Xt, a7 as pn, a8 as lo, a9 as io, aa as so, ab as uo, ac as fn, w as co, ad as mo, ae as qe, af as po, ag as fo, ah as go } from "./item-CGqK7sn4.js";
3
- import { a as vo, b as bo, d as yo, _ as _o, T as ho } from "./app-BdtPzkjA.js";
4
- import { l as $e, u as Kt } from "./discardConfirm-egY5vwUU.js";
2
+ import { x as Kn, y as Bn, z as zn, A as jn, B as rn, D as Ft, P as Yn, I as qn, G as Wn, H as Hn, J as At, K as Xn, M as Qn, N as Jn, O as ln, Q as sn, R as un, T as dn, U as Zn, V as Nt, W as Gt, X as Lt, Y as cn, Z as Vt, $ as eo, a0 as to, a1 as no, a2 as oo, a3 as ao, a4 as ro, a5 as mn, a6 as Xt, a7 as pn, a8 as lo, a9 as io, aa as so, ab as uo, ac as fn, w as co, ad as mo, ae as qe, af as po, ag as fo, ah as go } from "./item-D6itBJWi.js";
3
+ import { a as vo, b as bo, d as yo, _ as _o, T as ho } from "./app-C3fvLdk6.js";
4
+ import { l as $e, u as Kt } from "./discardConfirm-JSuBPCBO.js";
5
5
  import { useI18n as he, useCoreStore as lt, CustomAttributesForm as gn } from "@feedmepos/mf-common";
6
6
  import { useDialog as Qe, useSnackbar as Ye, components as Ie, FmButtonVariant as Pe, FmButtonColorThemeVariant as Ne, useBreakpoints as ko, useDialogChild as vn } from "@feedmepos/ui-library";
7
- import { a as xe, h as Ve, i as Se, u as vt, j as Bt, b as bt, r as Co, F as et, k as ke, m as je, f as Ce, o as wo, l as ct, n as Io, I as ht, d as To, p as bn, s as kt, w as Qt, q as xo, t as So, v as Jt, x as Eo } from "./index.vue_vue_type_script_setup_true_lang-qUahjdoy.js";
7
+ import { a as xe, h as Ve, i as Se, u as vt, j as Bt, b as bt, r as Co, F as et, k as ke, m as je, f as Ce, o as wo, l as ct, n as Io, I as ht, d as To, p as bn, s as kt, w as Qt, q as xo, t as So, v as Jt, x as Eo } from "./index.vue_vue_type_script_setup_true_lang-BAVu4NTt.js";
8
8
  import { defineStore as Fo } from "pinia";
9
- import { _ as Re, a as Vo } from "./RuleView.vue_vue_type_script_setup_true_lang-DYnnO3SQ.js";
10
- import { u as _e, g as $t, m as $o } from "./menuV2-yXOZpuda.js";
11
- import { g as Po, s as Pt, _ as Do, a as Oo, b as Mo, c as Uo, d as Zt, e as Ro } from "./index-B0hyUFIc.js";
9
+ import { _ as Re, a as Vo } from "./RuleView.vue_vue_type_script_setup_true_lang-DKCI5FWu.js";
10
+ import { u as _e, g as $t, m as $o } from "./menuV2-DwgKWOb1.js";
11
+ import { g as Po, s as Pt, _ as Do, a as Oo, b as Mo, c as Uo, d as Zt, e as Ro } from "./index-26hFA0dv.js";
12
12
  import { useAppStore as yn, RemyButton as _n } from "@feedmepos/mf-remy-panel";
13
13
  import { _ as Ge } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
14
14
  import { c as Ao } from "./createComponentProgrammatically-Bt2rn1IQ.js";
15
15
  import { _ as Dt } from "./tooltip-B5BiPMx9.js";
16
16
  import { g as st } from "./translation-fNx6yEpy.js";
17
17
  import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- import { _ as Ze, T as No, l as Go } from "./index-BpoYrrVu.js";
19
- import { L as Ot } from "./LinkProductSideSheet-DTzuEcF5.js";
20
- import { d as Lo, e as hn } from "./catalog-D4uhTN3P.js";
21
- import { u as Ko } from "./search-BAPEUu1R.js";
18
+ import { _ as Ze, T as No, w as Go, l as Lo } from "./index-wndkX4SS.js";
19
+ import { L as Ot } from "./LinkProductSideSheet-TN2_U83N.js";
20
+ import { d as Ko, e as hn } from "./catalog-BBW_JOmi.js";
21
+ import { u as Bo } from "./search-BAPEUu1R.js";
22
22
  import { c as zt } from "./check-C9mY6LiX.js";
23
- import { f as ze, a as Bo } from "./currency-8AD3AdtT.js";
24
- import { u as jt } from "./memberPricing-CcXhcbV9.js";
25
- import { c as zo } from "./string-DpfFixWH.js";
26
- import { useInventoryStore as jo, InventoryBindingSummary as Yo } from "@feedmepos/mf-inventory-portal";
27
- import { u as qo } from "./priceTier-B14Zw5XH.js";
23
+ import { f as ze, a as zo } from "./currency-dN61r7Dj.js";
24
+ import { u as jt } from "./memberPricing-D4BvlT66.js";
25
+ import { c as jo } from "./string-DpfFixWH.js";
26
+ import { useInventoryStore as Yo, InventoryBindingSummary as qo } from "@feedmepos/mf-inventory-portal";
27
+ import { u as Wo } from "./priceTier-mtlQOB7P.js";
28
28
  import { d as Yt } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
29
- import { _ as Wo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CsMCfu1s.js";
29
+ import { _ as Ho } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DHDH7KKi.js";
30
30
  import "./app-5fxKLAzS.js";
31
31
  /* empty css */
32
- import { a as Ho, u as Xo } from "./linkProducts-DwBnfj3L.js";
32
+ import { a as Xo, u as Qo } from "./linkProducts-BCBOugXd.js";
33
33
  import { c as pt } from "./object-DVUNCr7w.js";
34
- import { _ as Qo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
34
+ import { _ as Jo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
35
35
  import { _ as en } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
36
- import { _ as Jo } from "./RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CAVrU6RI.js";
36
+ import { _ as Zo } from "./RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-C1SJG0VC.js";
37
37
  var tt = /* @__PURE__ */ ((i) => (i.PRIMARY = "primary", i.PLAIN = "plain", i))(tt || {}), Le = /* @__PURE__ */ ((i) => (i.CATEGORY = "view_list", i.ITEM = "fastfood", i.VARIANT = "lunch_dining", i.GROUP = "database", i.FOLDER = "folder", i))(Le || {});
38
38
  function Ct(i, l) {
39
39
  return i <= 0 ? null : { label: l };
@@ -53,14 +53,14 @@ function wt(i) {
53
53
  function It(i, ...l) {
54
54
  return [...i, ...l.filter((t) => t !== null)];
55
55
  }
56
- function Zo(i, l) {
56
+ function ea(i, l) {
57
57
  const t = !!l.price;
58
58
  return {
59
59
  label: t ? xe.Dinero.fromFdoDinero(l.price).toFormat(!0) : xe.Dinero.fromFdoDinero(i.price).toFormat(!0),
60
60
  variant: t ? tt.PRIMARY : tt.PLAIN
61
61
  };
62
62
  }
63
- function ea(i, l) {
63
+ function ta(i, l) {
64
64
  const t = /* @__PURE__ */ new Set();
65
65
  function o(r) {
66
66
  let f = r;
@@ -82,7 +82,7 @@ function ea(i, l) {
82
82
  highlightedStrings: f[0].query
83
83
  } : r;
84
84
  if (r.children && r.children.length > 0) {
85
- const n = r.children.map((I) => m(I, d ? f.slice(1) : f)).filter((I) => !!I);
85
+ const n = r.children.map((T) => m(T, d ? f.slice(1) : f)).filter((T) => !!T);
86
86
  return n.length > 0 ? {
87
87
  ...y,
88
88
  children: n
@@ -96,21 +96,21 @@ function ea(i, l) {
96
96
  shouldExpandNodeIds: Array.from(t)
97
97
  };
98
98
  }
99
- function ta(i) {
99
+ function na(i) {
100
100
  return {
101
101
  levels: i.split(/[>,]/).map((t) => t.trim()).filter((t) => t !== "").map((t) => ({
102
102
  query: t.split(" ").filter((o) => o.trim() !== "").map((o) => o.trim())
103
103
  }))
104
104
  };
105
105
  }
106
- function na(i, l) {
106
+ function oa(i, l) {
107
107
  if (!l || l.trim() === "")
108
108
  return {
109
109
  subTree: i,
110
110
  shouldExpandNodeIds: []
111
111
  };
112
- const t = ta(l);
113
- return ea(i, t);
112
+ const t = na(l);
113
+ return ta(i, t);
114
114
  }
115
115
  function Tt(i, l, t) {
116
116
  const o = [...i], m = o[l];
@@ -121,7 +121,7 @@ function Tt(i, l, t) {
121
121
  function tn(i, l) {
122
122
  return l ? `${l}, ${i}` : i;
123
123
  }
124
- function oa(i) {
124
+ function aa(i) {
125
125
  const l = /* @__PURE__ */ new Map();
126
126
  function t(o) {
127
127
  var m;
@@ -129,7 +129,7 @@ function oa(i) {
129
129
  }
130
130
  return i.forEach(t), l;
131
131
  }
132
- function aa(i) {
132
+ function ra(i) {
133
133
  const l = /* @__PURE__ */ new Map();
134
134
  return i.forEach((t, o) => {
135
135
  l.set(t.id, o);
@@ -138,7 +138,7 @@ function aa(i) {
138
138
  const yt = Fo("mf-menu-tree", () => {
139
139
  const i = re(), l = re([]), t = re(null), o = re([]);
140
140
  function m(v) {
141
- l.value = v, k.value = oa(v);
141
+ l.value = v, k.value = aa(v);
142
142
  }
143
143
  function r(v) {
144
144
  t.value = v;
@@ -157,13 +157,13 @@ const yt = Fo("mf-menu-tree", () => {
157
157
  }
158
158
  function y() {
159
159
  const v = [];
160
- function n(I) {
161
- v.push(I.id);
162
- for (const T of I.children ?? [])
163
- n(T);
160
+ function n(T) {
161
+ v.push(T.id);
162
+ for (const w of T.children ?? [])
163
+ n(w);
164
164
  }
165
- for (const I of l.value)
166
- n(I);
165
+ for (const T of l.value)
166
+ n(T);
167
167
  o.value = v;
168
168
  }
169
169
  const k = re(/* @__PURE__ */ new Map());
@@ -188,7 +188,7 @@ let ut = null, We = null, He = null;
188
188
  function kn() {
189
189
  return We && (clearTimeout(We), We = null), He ? (He(), He = null, !0) : !1;
190
190
  }
191
- function ra(i, l, t) {
191
+ function la(i, l, t) {
192
192
  function m(y) {
193
193
  if (!i.value) return !1;
194
194
  const k = i.value.validate();
@@ -247,7 +247,7 @@ function ra(i, l, t) {
247
247
  saveItemFormEditingStateDebounced: m
248
248
  };
249
249
  }
250
- function la(i, l) {
250
+ function ia(i, l) {
251
251
  if (!l)
252
252
  throw new Error("combinationKey is required");
253
253
  if (!i[l])
@@ -257,7 +257,7 @@ function la(i, l) {
257
257
  function Cn(i) {
258
258
  return i._id.startsWith("mMenuV4");
259
259
  }
260
- function ia({
260
+ function sa({
261
261
  menu: i,
262
262
  catalogId: l,
263
263
  schedulerId: t,
@@ -275,8 +275,8 @@ function ia({
275
275
  return (F = y == null ? void 0 : y.items) == null ? void 0 : F.filter((k) => k._id === o);
276
276
  }
277
277
  }
278
- function sa(i, l, t, o) {
279
- const m = ia({ menu: i, catalogId: l, schedulerId: t, itemId: o });
278
+ function ua(i, l, t, o) {
279
+ const m = sa({ menu: i, catalogId: l, schedulerId: t, itemId: o });
280
280
  if (!m)
281
281
  throw new Error(`Item overrider ${o} not found`);
282
282
  const r = i.modules.item.find((f) => f._id === o);
@@ -284,10 +284,10 @@ function sa(i, l, t, o) {
284
284
  throw new Error(`Item ${o} not found in merged menu`);
285
285
  return Bn(r, m);
286
286
  }
287
- function ua(i) {
287
+ function da(i) {
288
288
  const l = re(null), t = S(() => l.value ? !i.state.currentCatalogId && !i.state.currentSchedulerId ? i.state.menu.modules.item.find(
289
289
  (m) => m._id === l.value
290
- ) : sa(
290
+ ) : ua(
291
291
  i.state.menu,
292
292
  i.state.currentCatalogId,
293
293
  i.state.currentSchedulerId,
@@ -375,43 +375,43 @@ const _t = () => {
375
375
  deleteCategory: f,
376
376
  rearrange: F
377
377
  };
378
- }, da = {
379
- class: "flex flex-col gap-24"
380
378
  }, ca = {
381
- class: /* @__PURE__ */ Fe(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
379
+ class: "flex flex-col gap-24"
382
380
  }, ma = {
383
- class: "w-[160px] xs:w-full"
381
+ class: /* @__PURE__ */ Fe(["flex space-x-16", "xs:flex-col xs:space-x-0 xs:space-y-16"])
384
382
  }, pa = {
385
- class: "flex-1"
383
+ class: "w-[160px] xs:w-full"
386
384
  }, fa = {
387
- class: "py-12 px-16 space-y-4"
385
+ class: "flex-1"
388
386
  }, ga = {
389
- class: "relative"
387
+ class: "py-12 px-16 space-y-4"
390
388
  }, va = {
391
- class: "fm-typo-en-body-lg-600"
389
+ class: "relative"
392
390
  }, ba = {
393
- class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
391
+ class: "fm-typo-en-body-lg-600"
394
392
  }, ya = {
395
- class: "absolute top-32 right-4 flex gap-4"
393
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
396
394
  }, _a = {
397
- class: "py-12 px-16 space-y-4"
395
+ class: "absolute top-32 right-4 flex gap-4"
398
396
  }, ha = {
399
- class: "flex flex-col gap-16"
397
+ class: "py-12 px-16 space-y-4"
400
398
  }, ka = {
401
- class: "space-y-8"
399
+ class: "flex flex-col gap-16"
402
400
  }, Ca = {
401
+ class: "space-y-8"
402
+ }, wa = {
403
403
  key: 0,
404
404
  class: "flex items-center gap-8"
405
- }, wa = {
406
- class: "flex flex-col gap-16"
407
405
  }, Ia = {
406
+ class: "flex flex-col gap-16"
407
+ }, Ta = {
408
408
  key: 1,
409
409
  class: "flex flex-col gap-24"
410
410
  };
411
411
  var Ke = /* @__PURE__ */ function(i) {
412
412
  return i.ADD_ON = "ADD_ON", i.PRODUCT = "PRODUCT", i;
413
413
  }(Ke || {});
414
- const Ta = /* @__PURE__ */ be({
414
+ const xa = /* @__PURE__ */ be({
415
415
  __name: "ProductDetail",
416
416
  props: {
417
417
  isOverride: {
@@ -445,9 +445,9 @@ const Ta = /* @__PURE__ */ be({
445
445
  value: h.id
446
446
  }));
447
447
  return t.isAddon ? g : g.filter((h) => !!h.value);
448
- }), n = S(() => y.value.addon), I = S(() => !v.value.find((g) => !!g.value)), T = S(() => Po(t.form.category ? t.form : t.fallback) || []), Q = S(() => T.value.reduce((g, h) => (g[h._id] = h, g), {})), D = S({
448
+ }), n = S(() => y.value.addon), T = S(() => !v.value.find((g) => !!g.value)), w = S(() => Po(t.form.category ? t.form : t.fallback) || []), Q = S(() => w.value.reduce((g, h) => (g[h._id] = h, g), {})), D = S({
449
449
  get() {
450
- return T.value.map((g) => g._id);
450
+ return w.value.map((g) => g._id);
451
451
  },
452
452
  set(g = []) {
453
453
  const [h, ...N] = g.map((J) => {
@@ -490,7 +490,7 @@ const Ta = /* @__PURE__ */ be({
490
490
  }, [C("menu.product.form.detail.category.add_new")])])
491
491
  });
492
492
  Xe(async () => {
493
- !I.value && t.form.category === void 0 && t.isCreate && _(Ke.PRODUCT);
493
+ !T.value && t.form.category === void 0 && t.isCreate && _(Ke.PRODUCT);
494
494
  });
495
495
  const U = S(() => {
496
496
  var h;
@@ -539,7 +539,7 @@ const Ta = /* @__PURE__ */ be({
539
539
  const p = S(() => m.subcategories), c = S(() => p.value.map((g) => ({
540
540
  label: g.name,
541
541
  value: g._id
542
- }))), w = S({
542
+ }))), I = S({
543
543
  get() {
544
544
  return t.form.subCategories || [];
545
545
  },
@@ -616,7 +616,7 @@ const Ta = /* @__PURE__ */ be({
616
616
  }, {
617
617
  default: X(() => {
618
618
  var Oe, nt, Ae, qt, Wt, Ht;
619
- return [B("div", da, [B("div", ca, [B("div", ma, [s(N, {
619
+ return [B("div", ca, [B("div", ma, [B("div", pa, [s(N, {
620
620
  "model-value": g.form.code,
621
621
  placeholder: ((Oe = g.fallback) == null ? void 0 : Oe.code) || e(C)("menu.product.form.detail.fields.code.placeholder"),
622
622
  "helper-text": !L.value && Y.value > 0 ? e(C)("menu.product.form.detail.fields.code.duplicate_hint", {
@@ -627,7 +627,7 @@ const Ta = /* @__PURE__ */ be({
627
627
  count: Y.value
628
628
  })],
629
629
  "onUpdate:modelValue": h[0] || (h[0] = (ce) => d("update:form", "code", e(Ft)(ce, g.isOverride)))
630
- }, null, 8, ["model-value", "placeholder", "helper-text", "label", "rules"])]), B("div", pa, [s(N, {
630
+ }, null, 8, ["model-value", "placeholder", "helper-text", "label", "rules"])]), B("div", fa, [s(N, {
631
631
  id: "product-name",
632
632
  disabled: !y.value.name,
633
633
  "helper-text": U.value > 0 ? e(C)("menu.product.form.detail.fields.name.duplicate_warning", {
@@ -645,7 +645,7 @@ const Ta = /* @__PURE__ */ be({
645
645
  placement: "top",
646
646
  "z-index": 999
647
647
  }, {
648
- content: X(() => [B("div", fa, [($(!0), ee(we, null, De(R.value, (ce) => ($(), ee("div", {
648
+ content: X(() => [B("div", ga, [($(!0), ee(we, null, De(R.value, (ce) => ($(), ee("div", {
649
649
  key: ce.locale
650
650
  }, ve(ce.name) + " (" + ve(ce.localeDisplay) + ") ", 1))), 128))])]),
651
651
  default: X(() => [s(J, {
@@ -667,21 +667,21 @@ const Ta = /* @__PURE__ */ be({
667
667
  placeholder: ((Ae = g.fallback) == null ? void 0 : Ae.name2) || e(C)("menu.product.form.detail.fields.name2.placeholder"),
668
668
  label: e(C)("menu.product.form.detail.fields.name2.label"),
669
669
  "onUpdate:modelValue": h[2] || (h[2] = (ce) => d("update:form", "name2", e(Ft)(ce, g.isOverride)))
670
- }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "label"]), B("div", ga, [s(ue, {
670
+ }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "label"]), B("div", va, [s(ue, {
671
671
  disabled: !y.value.description,
672
672
  "model-value": g.form.description || "",
673
673
  placeholder: ((qt = g.fallback) == null ? void 0 : qt.description) || e(C)("menu.product.form.detail.fields.description.placeholder"),
674
674
  "onUpdate:modelValue": h[3] || (h[3] = (ce) => d("update:form", "description", ce.trim())),
675
675
  class: "description"
676
676
  }, {
677
- label: X(() => [B("p", va, [Fn(ve(e(C)("menu.product.form.detail.fields.description.label")) + " ", 1), B("span", ba, ve(e(C)("menu.product.form.detail.fields.description.optional")), 1)])]),
677
+ label: X(() => [B("p", ba, [Fn(ve(e(C)("menu.product.form.detail.fields.description.label")) + " ", 1), B("span", ya, ve(e(C)("menu.product.form.detail.fields.description.optional")), 1)])]),
678
678
  _: 1
679
- }, 8, ["disabled", "model-value", "placeholder"]), B("div", ya, [s(oe, {
679
+ }, 8, ["disabled", "model-value", "placeholder"]), B("div", _a, [s(oe, {
680
680
  variant: "plain",
681
681
  placement: "top",
682
682
  "z-index": 999
683
683
  }, {
684
- content: X(() => [B("div", _a, [($(!0), ee(we, null, De(le.value, (ce) => ($(), ee("div", {
684
+ content: X(() => [B("div", ha, [($(!0), ee(we, null, De(le.value, (ce) => ($(), ee("div", {
685
685
  key: ce.locale
686
686
  }, ve(ce.name) + " (" + ve(ce.localeDisplay) + ") ", 1))), 128))])]),
687
687
  default: X(() => {
@@ -714,8 +714,8 @@ const Ta = /* @__PURE__ */ be({
714
714
  "model-value": g.isAddon ? Ke.ADD_ON : Ke.PRODUCT,
715
715
  "onUpdate:modelValue": h[4] || (h[4] = (ce) => _(ce))
716
716
  }, {
717
- default: X(() => [B("div", ha, [B("div", ka, [s(de, {
718
- disabled: I.value,
717
+ default: X(() => [B("div", ka, [B("div", Ca, [s(de, {
718
+ disabled: T.value,
719
719
  value: Ke.PRODUCT,
720
720
  label: e(C)("menu.product.form.detail.category.options.product.label"),
721
721
  sublabel: e(C)("menu.product.form.detail.category.options.product.sublabel")
@@ -724,7 +724,7 @@ const Ta = /* @__PURE__ */ be({
724
724
  key: 0
725
725
  })) : ne("", !0)]),
726
726
  _: 1
727
- })]), I.value ? ($(), ee("div", Ca, [s(fe, {
727
+ })]), T.value ? ($(), ee("div", wa, [s(fe, {
728
728
  title: e(C)("menu.product.form.detail.category.add_first"),
729
729
  variant: "info"
730
730
  }, null, 8, ["title"]), s(W, {
@@ -754,16 +754,16 @@ const Ta = /* @__PURE__ */ be({
754
754
  key: 0,
755
755
  label: e(C)("menu.product.form.detail.path.label")
756
756
  }, {
757
- default: X(() => [B("div", wa, [s(Wn, {
758
- modelValue: w.value,
759
- "onUpdate:modelValue": h[5] || (h[5] = (ce) => w.value = ce),
757
+ default: X(() => [B("div", Ia, [s(Wn, {
758
+ modelValue: I.value,
759
+ "onUpdate:modelValue": h[5] || (h[5] = (ce) => I.value = ce),
760
760
  items: c.value,
761
761
  placeholder: K.value,
762
762
  disabled: !y.value.category,
763
763
  "is-local-only": !0
764
764
  }, null, 8, ["modelValue", "items", "placeholder", "disabled"])])]),
765
765
  _: 1
766
- }, 8, ["label"])) : ne("", !0), e(m).isV4 && !g.isOverride ? ($(), ee("div", Ia, [s(me, {
766
+ }, 8, ["label"])) : ne("", !0), e(m).isV4 && !g.isOverride ? ($(), ee("div", Ta, [s(me, {
767
767
  label: e(C)("menu.product.form.detail.fields.shelf_life.label"),
768
768
  "model-value": g.form.shelfLife ?? null,
769
769
  rules: [(ce) => ce == null || ce > 0 || e(C)("menu.common.validation.min_value", {
@@ -801,24 +801,24 @@ const Ta = /* @__PURE__ */ be({
801
801
  }, null, 8, ["modelValue", "product-name", "product-name-locale", "product-description", "product-description-locale", "initial-section"])], 64);
802
802
  };
803
803
  }
804
- }), xa = /* @__PURE__ */ it(Ta, [["__scopeId", "data-v-1841a24a"]]), Sa = /* @__PURE__ */ be({
804
+ }), Sa = /* @__PURE__ */ it(xa, [["__scopeId", "data-v-1841a24a"]]), Ea = /* @__PURE__ */ be({
805
805
  __name: "AddForm",
806
806
  setup(i) {
807
807
  const l = _e(), t = S(() => l.rules.group), o = S(() => !!l.state.currentCatalogId || !!l.state.currentSchedulerId), m = S(() => {
808
808
  const d = !l.state.currentSchedulerId, y = l.rules.group.type, k = l.version === et.enum.v3, P = l.rules.item.orderFromActiveOnly, v = l.rules.item.bindToVariant;
809
- return function(I) {
809
+ return function(T) {
810
810
  return {
811
- link: (T) => !o.value && (!T || v),
812
- name: (T) => !o.value && !T,
813
- isDefault: (T) => !o.value,
814
- type: y && !I._id && !o.value,
815
- price: I.type !== ke.enum.DYNAMIC,
811
+ link: (w) => !o.value && (!w || v),
812
+ name: (w) => !o.value && !w,
813
+ isDefault: (w) => !o.value,
814
+ type: y && !T._id && !o.value,
815
+ price: T.type !== ke.enum.DYNAMIC,
816
816
  priceEdit: !0,
817
817
  priceTier: l.isV4,
818
- inventory: d ? k ? !o.value && I.type === ke.enum.NORMAL : !o.value : !1,
819
- orderFrom: (T) => d ? k ? I.type === ke.enum.DYNAMIC ? o.value : !!o.value == !T : o.value : !1,
818
+ inventory: d ? k ? !o.value && T.type === ke.enum.NORMAL : !o.value : !1,
819
+ orderFrom: (w) => d ? k ? T.type === ke.enum.DYNAMIC ? o.value : !!o.value == !w : o.value : !1,
820
820
  orderFromActiveOnly: P,
821
- showOrderFrom: d ? k ? o.value ? !0 : I.type === ke.enum.PRODUCT : o.value : !1,
821
+ showOrderFrom: d ? k ? o.value ? !0 : T.type === ke.enum.PRODUCT : o.value : !1,
822
822
  bindToVariant: v,
823
823
  minMax: !o.value,
824
824
  hideGroup: !1,
@@ -834,7 +834,7 @@ const Ta = /* @__PURE__ */ be({
834
834
  position: l.groups.length - 1,
835
835
  itemsLinked: []
836
836
  }), f = re(r()), { t: F } = he();
837
- return (d, y) => t.value.create ? ($(), ae(e(Ha), {
837
+ return (d, y) => t.value.create ? ($(), ae(e(Xa), {
838
838
  key: 0,
839
839
  "categorized-items": e(l).categorizedItems,
840
840
  config: m.value,
@@ -852,7 +852,7 @@ const Ta = /* @__PURE__ */ be({
852
852
  _: 3
853
853
  }, 8, ["categorized-items", "config", "group", "title"])) : ne("", !0);
854
854
  }
855
- }), Ea = { class: "fm-typo-en-title-sm-600" }, Fa = { class: "flex items-end space-x-24" }, Va = { class: "flex" }, $a = { key: 0 }, Pa = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, Da = { class: "flex flex-wrap gap-8 mt-8" }, Oa = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 mt-8" }, wn = /* @__PURE__ */ be({
855
+ }), Fa = { class: "fm-typo-en-title-sm-600" }, Va = { class: "flex items-end space-x-24" }, $a = { class: "flex" }, Pa = { key: 0 }, Da = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, Oa = { class: "flex flex-wrap gap-8 mt-8" }, Ma = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 mt-8" }, wn = /* @__PURE__ */ be({
856
856
  __name: "UpdateForm",
857
857
  props: {
858
858
  combinations: {},
@@ -874,19 +874,19 @@ const Ta = /* @__PURE__ */ be({
874
874
  function v(c) {
875
875
  var R, le;
876
876
  if (!M.value) return null;
877
- const w = ((le = (R = d.value[c]) == null ? void 0 : R.groups) == null ? void 0 : le.find(
877
+ const I = ((le = (R = d.value[c]) == null ? void 0 : R.groups) == null ? void 0 : le.find(
878
878
  (b) => b._id === o.groupId
879
879
  )) || {
880
880
  _id: o.groupId,
881
881
  groupKey: ""
882
- }, K = r.state.menu.modules.group.find((b) => b._id === o.groupId), z = Object.entries({ ...w, items: void 0 }).filter(
882
+ }, K = r.state.menu.modules.group.find((b) => b._id === o.groupId), z = Object.entries({ ...I, items: void 0 }).filter(
883
883
  ([b, j]) => b === "min" || b === "max" ? j != null : !!j
884
884
  ), G = {
885
885
  ...K,
886
886
  ...Object.fromEntries(z),
887
887
  items: K.items.map((b) => {
888
888
  var ge;
889
- const j = (ge = w.items) == null ? void 0 : ge.find(
889
+ const j = (ge = I.items) == null ? void 0 : ge.find(
890
890
  (pe) => pe._id == b._id && pe.combinationKey == b.combinationKey
891
891
  );
892
892
  return {
@@ -901,16 +901,16 @@ const Ta = /* @__PURE__ */ be({
901
901
  return new ln(r, F.updateMenu, f).mapGroups([G], !0)[0];
902
902
  }
903
903
  const n = S(() => v(k.value));
904
- function I(c, w) {
904
+ function T(c, I) {
905
905
  var G, R;
906
- const C = (G = d.value[c].groups) == null ? void 0 : G.findIndex((le) => le._id === o.groupId), K = Ce(d.value), z = { ...hn(w), _id: o.groupId, groupKey: "" };
906
+ const C = (G = d.value[c].groups) == null ? void 0 : G.findIndex((le) => le._id === o.groupId), K = Ce(d.value), z = { ...hn(I), _id: o.groupId, groupKey: "" };
907
907
  (C ?? -1) < 0 ? K[c] = {
908
908
  ...K[c],
909
909
  groups: [...((R = K[c]) == null ? void 0 : R.groups) || [], z]
910
910
  } : K[c].groups[C] = z, d.value = K;
911
911
  }
912
- function T(c) {
913
- I(k.value, c);
912
+ function w(c) {
913
+ T(k.value, c);
914
914
  }
915
915
  const Q = S(() => {
916
916
  var c;
@@ -918,13 +918,13 @@ const Ta = /* @__PURE__ */ be({
918
918
  }), D = S(
919
919
  () => r.state.menu.modules.group.find((c) => c._id === o.groupId)
920
920
  ), x = S(
921
- () => o.combinations.map((c, w) => {
921
+ () => o.combinations.map((c, I) => {
922
922
  var C, K;
923
923
  return {
924
924
  label: o.fullCombinations[c.combinationKey || ""],
925
925
  value: c.combinationKey || "",
926
926
  hidden: Jn(
927
- (K = (C = d.value[w]) == null ? void 0 : C.groups) == null ? void 0 : K.find((z) => z._id === o.groupId),
927
+ (K = (C = d.value[I]) == null ? void 0 : C.groups) == null ? void 0 : K.find((z) => z._id === o.groupId),
928
928
  D.value
929
929
  )
930
930
  };
@@ -933,24 +933,24 @@ const Ta = /* @__PURE__ */ be({
933
933
  () => x.value.filter((c) => c.hidden).map((c) => c.label)
934
934
  );
935
935
  function U(c) {
936
- const w = v(c);
937
- w && I(
936
+ const I = v(c);
937
+ I && T(
938
938
  c,
939
- sn(w) ? un(w, Q.value) : dn(w)
939
+ sn(I) ? un(I, Q.value) : dn(I)
940
940
  );
941
941
  }
942
942
  function O(c) {
943
- const w = P.value.length;
943
+ const I = P.value.length;
944
944
  let C = k.value;
945
- c === "left" ? C = C === 0 ? w - 1 : C - 1 : C = C === w - 1 ? 0 : C + 1, y.value = P.value[C].value;
945
+ c === "left" ? C = C === 0 ? I - 1 : C - 1 : C = C === I - 1 ? 0 : C + 1, y.value = P.value[C].value;
946
946
  }
947
947
  function L(c) {
948
948
  return {
949
949
  isV4: r.version === et.enum.v4,
950
- isDefault: (w) => !0,
951
- link: (w) => !1,
952
- orderFrom: (w) => !0,
953
- name: (w) => !1,
950
+ isDefault: (I) => !0,
951
+ link: (I) => !1,
952
+ orderFrom: (I) => !0,
953
+ name: (I) => !1,
954
954
  bindToVariant: !1,
955
955
  inventory: !0,
956
956
  orderFromActiveOnly: r.rules.item.orderFromActiveOnly,
@@ -966,12 +966,12 @@ const Ta = /* @__PURE__ */ be({
966
966
  };
967
967
  }
968
968
  function Y() {
969
- const c = d.value.map((w) => {
969
+ const c = d.value.map((I) => {
970
970
  var C;
971
971
  return {
972
- ...w,
973
- groups: (C = w.groups) == null ? void 0 : C.map(
974
- (K) => Lo(
972
+ ...I,
973
+ groups: (C = I.groups) == null ? void 0 : C.map(
974
+ (K) => Ko(
975
975
  Zn(K, L()),
976
976
  r.state.menu.modules.group.find((z) => z._id === K._id)
977
977
  )
@@ -993,7 +993,7 @@ const Ta = /* @__PURE__ */ be({
993
993
  trigger: (p = _.value) == null ? void 0 : p.trigger
994
994
  });
995
995
  const { t: u } = he();
996
- return (c, w) => {
996
+ return (c, I) => {
997
997
  const C = Z("fm-select"), K = Z("fm-button"), z = Z("fm-chip"), G = Z("fm-card");
998
998
  return $(), ae(In, {
999
999
  ref_key: "baseFormRef",
@@ -1005,9 +1005,9 @@ const Ta = /* @__PURE__ */ be({
1005
1005
  "hide-group-scope": c.hideVariantSection ? null : c.fullCombinations[y.value] || null,
1006
1006
  action: "update",
1007
1007
  title: e(u)("menu.group.update"),
1008
- "onUpdate:group": w[3] || (w[3] = (R) => T(R)),
1009
- "onSubmit:group": w[4] || (w[4] = (R) => Y()),
1010
- "onStatus:show": w[5] || (w[5] = (R) => M.value = R)
1008
+ "onUpdate:group": I[3] || (I[3] = (R) => w(R)),
1009
+ "onSubmit:group": I[4] || (I[4] = (R) => Y()),
1010
+ "onStatus:show": I[5] || (I[5] = (R) => M.value = R)
1011
1011
  }, {
1012
1012
  default: X(({ trigger: R }) => [
1013
1013
  Be(c.$slots, "default", { trigger: R })
@@ -1019,32 +1019,32 @@ const Ta = /* @__PURE__ */ be({
1019
1019
  variant: "outlined"
1020
1020
  }, {
1021
1021
  default: X(() => [
1022
- B("p", Ea, ve(e(u)("menu.group.option.variant")), 1),
1023
- B("div", Fa, [
1022
+ B("p", Fa, ve(e(u)("menu.group.option.variant")), 1),
1023
+ B("div", Va, [
1024
1024
  s(C, {
1025
1025
  modelValue: y.value,
1026
- "onUpdate:modelValue": w[0] || (w[0] = (R) => y.value = R),
1026
+ "onUpdate:modelValue": I[0] || (I[0] = (R) => y.value = R),
1027
1027
  items: P.value,
1028
1028
  class: "flex-1"
1029
1029
  }, null, 8, ["modelValue", "items"]),
1030
- B("div", Va, [
1030
+ B("div", $a, [
1031
1031
  s(K, {
1032
1032
  variant: e(Pe).Tertiary,
1033
1033
  "prepend-icon": "keyboard_arrow_left",
1034
1034
  size: "lg",
1035
- onClick: w[1] || (w[1] = (R) => O("left"))
1035
+ onClick: I[1] || (I[1] = (R) => O("left"))
1036
1036
  }, null, 8, ["variant"]),
1037
1037
  s(K, {
1038
1038
  variant: e(Pe).Tertiary,
1039
1039
  "prepend-icon": "keyboard_arrow_right",
1040
1040
  size: "lg",
1041
- onClick: w[2] || (w[2] = (R) => O("right"))
1041
+ onClick: I[2] || (I[2] = (R) => O("right"))
1042
1042
  }, null, 8, ["variant"])
1043
1043
  ])
1044
1044
  ]),
1045
- x.value.length > 1 ? ($(), ee("div", $a, [
1046
- B("p", Pa, ve(e(u)("menu.group.option.show_in_variants")), 1),
1047
- B("div", Da, [
1045
+ x.value.length > 1 ? ($(), ee("div", Pa, [
1046
+ B("p", Da, ve(e(u)("menu.group.option.show_in_variants")), 1),
1047
+ B("div", Oa, [
1048
1048
  ($(!0), ee(we, null, De(x.value, (R, le) => ($(), ae(z, {
1049
1049
  key: R.value,
1050
1050
  icon: R.hidden ? "visibility_off" : "check",
@@ -1054,7 +1054,7 @@ const Ta = /* @__PURE__ */ be({
1054
1054
  onClick: (b) => U(le)
1055
1055
  }, null, 8, ["icon", "label", "selected", "onClick"]))), 128))
1056
1056
  ]),
1057
- B("p", Oa, ve(V.value.length ? e(u)("menu.group.option.hidden_in_variants", {
1057
+ B("p", Ma, ve(V.value.length ? e(u)("menu.group.option.hidden_in_variants", {
1058
1058
  variants: V.value.join(", ")
1059
1059
  }) : e(u)("menu.group.option.shown_in_all_variants", {
1060
1060
  count: x.value.length
@@ -1068,19 +1068,19 @@ const Ta = /* @__PURE__ */ be({
1068
1068
  }, 8, ["categorized-items", "group", "hide-group-scope", "title"]);
1069
1069
  };
1070
1070
  }
1071
- }), Ma = {
1071
+ }), Ua = {
1072
1072
  key: 0
1073
- }, Ua = {
1074
- key: 1
1075
1073
  }, Ra = {
1076
- class: "xs:overflow-x-scroll"
1074
+ key: 1
1077
1075
  }, Aa = {
1076
+ class: "xs:overflow-x-scroll"
1077
+ }, Na = {
1078
1078
  class: "xs:min-w-[640px]"
1079
1079
  };
1080
- function Na(i) {
1080
+ function Ga(i) {
1081
1081
  return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !Vn(i);
1082
1082
  }
1083
- const Ga = /* @__PURE__ */ be({
1083
+ const La = /* @__PURE__ */ be({
1084
1084
  __name: "OptionTable",
1085
1085
  props: {
1086
1086
  config: {},
@@ -1103,10 +1103,10 @@ const Ga = /* @__PURE__ */ be({
1103
1103
  }))])), {
1104
1104
  searchKey: v,
1105
1105
  filter: n
1106
- } = Ko(), I = S(() => {
1106
+ } = Bo(), T = S(() => {
1107
1107
  const A = Object.entries(t.group.items).filter(([, E]) => n([E.code || "", E.name || E.fallbackName, D(E.price ?? E.fallbackPrice), x(E.orderFrom || E.fallbackOrder), ...(E.items || []).map((q) => [q.code || "", q.name || q.fallbackName, D(q.price ?? q.fallbackPrice), x(q.orderFrom || q.fallbackOrder)].join(""))]));
1108
1108
  return Object.fromEntries(A);
1109
- }), T = (A) => ({
1109
+ }), w = (A) => ({
1110
1110
  ...t.config,
1111
1111
  isDefault: t.config.isDefault(A),
1112
1112
  link: t.config.link(A),
@@ -1115,7 +1115,7 @@ const Ga = /* @__PURE__ */ be({
1115
1115
  }), Q = S(() => !0), D = (A) => A ? ze(A, !1) : "", x = (A) => {
1116
1116
  var E;
1117
1117
  return A == null ? "" : (E = wo()[A]) == null ? void 0 : E.label;
1118
- }, V = S(() => Object.values(I.value)), U = re({}), {
1118
+ }, V = S(() => Object.values(T.value)), U = re({}), {
1119
1119
  t: O
1120
1120
  } = he(), L = jt(), Y = re([{
1121
1121
  accessorKey: "isDefault",
@@ -1130,7 +1130,7 @@ const Ga = /* @__PURE__ */ be({
1130
1130
  return s(Ie.FmCheckbox, {
1131
1131
  value: "default",
1132
1132
  modelValue: g,
1133
- disabled: !T(q.combinationKey).isDefault,
1133
+ disabled: !w(q.combinationKey).isDefault,
1134
1134
  "onUpdate:modelValue": (J) => {
1135
1135
  var oe;
1136
1136
  if (E) {
@@ -1169,7 +1169,7 @@ const Ga = /* @__PURE__ */ be({
1169
1169
  return Te("div", Te(Ie.FmTextField, {
1170
1170
  modelValue: E,
1171
1171
  placeholder: h ?? "",
1172
- disabled: !T(q.combinationKey).name,
1172
+ disabled: !w(q.combinationKey).name,
1173
1173
  rules: h ? void 0 : [(J) => ((J == null ? void 0 : J.length) ?? 0) > 0 || O("menu.group.option.product_title_required")],
1174
1174
  "onUpdate:modelValue": (J) => {
1175
1175
  var oe;
@@ -1188,7 +1188,7 @@ const Ga = /* @__PURE__ */ be({
1188
1188
  name: "keyboard_arrow_up",
1189
1189
  onClick: A.row.getToggleExpandedHandler(),
1190
1190
  class: ["cursor-pointer", "transition-transform", A.row.getIsExpanded() ? "transform rotate-180" : ""],
1191
- color: T(q.combinationKey).name ? void 0 : Ne.NeutralGray200
1191
+ color: w(q.combinationKey).name ? void 0 : Ne.NeutralGray200
1192
1192
  }) : void 0;
1193
1193
  }
1194
1194
  }));
@@ -1204,7 +1204,7 @@ const Ga = /* @__PURE__ */ be({
1204
1204
  },
1205
1205
  size: 400,
1206
1206
  cell: (A) => {
1207
- const E = A.getValue(), q = A.row.original, g = !T(null).priceEdit || q.orderFrom === ct.enum.NONE, h = q.fallbackPrice, N = A.row.depth > 0, J = L.getMemberPricingPriceVariant(q.price_variant), oe = Object.values(J).every((ue) => ue === null);
1207
+ const E = A.getValue(), q = A.row.original, g = !w(null).priceEdit || q.orderFrom === ct.enum.NONE, h = q.fallbackPrice, N = A.row.depth > 0, J = L.getMemberPricingPriceVariant(q.price_variant), oe = Object.values(J).every((ue) => ue === null);
1208
1208
  return s("div", {
1209
1209
  class: "flex items-center gap-8"
1210
1210
  }, [s(Ze, {
@@ -1231,7 +1231,7 @@ const Ga = /* @__PURE__ */ be({
1231
1231
  },
1232
1232
  showCurrency: !1,
1233
1233
  class: "min-w-[88px]"
1234
- }, null), T(null).priceTier && s("div", {
1234
+ }, null), w(null).priceTier && s("div", {
1235
1235
  class: "flex items-center gap-4"
1236
1236
  }, [s(Nt, {
1237
1237
  title: O("menu.product.form.member_price.configure.title"),
@@ -1282,9 +1282,9 @@ const Ga = /* @__PURE__ */ be({
1282
1282
  return Te(At, {
1283
1283
  modelValue: E,
1284
1284
  fallback: g,
1285
- disable: !T(q.combinationKey).orderFrom,
1285
+ disable: !w(q.combinationKey).orderFrom,
1286
1286
  required: !0,
1287
- editActiveOnly: T(q.combinationKey).orderFromActiveOnly,
1287
+ editActiveOnly: w(q.combinationKey).orderFromActiveOnly,
1288
1288
  "onUpdate:modelValue": (N) => {
1289
1289
  var J;
1290
1290
  if (h) {
@@ -1328,14 +1328,14 @@ const Ga = /* @__PURE__ */ be({
1328
1328
  default: () => [g.length > 0 ? s(Ie.FmBadge, {
1329
1329
  class: "bg-fm-color-primary text-fm-color-neutral-white !right-0 !top-0",
1330
1330
  value: g.length
1331
- }, Na(J) ? J : {
1331
+ }, Ga(J) ? J : {
1332
1332
  default: () => [J]
1333
1333
  }) : J]
1334
1334
  });
1335
1335
  };
1336
1336
  return s("div", {
1337
1337
  class: "flex items-center justify-end"
1338
- }, [T(null).priceTier && s(cn, {
1338
+ }, [w(null).priceTier && s(cn, {
1339
1339
  menuStore: r,
1340
1340
  priceTiers: E.priceTiers,
1341
1341
  "onUpdate:priceTiers": (N) => {
@@ -1353,7 +1353,7 @@ const Ga = /* @__PURE__ */ be({
1353
1353
  } else
1354
1354
  K(E._id, "priceTiers", N);
1355
1355
  }
1356
- }, null), T(E.combinationKey).inventory && s(Vt, {
1356
+ }, null), w(E.combinationKey).inventory && s(Vt, {
1357
1357
  title: "Inventory",
1358
1358
  initialValue: E.inventoryBindings ?? [],
1359
1359
  name: E.name ?? E.fallbackName ?? "",
@@ -1432,7 +1432,7 @@ const Ga = /* @__PURE__ */ be({
1432
1432
  onClick: J
1433
1433
  }, null)
1434
1434
  })
1435
- }), T(E.combinationKey).link && s(Z("fm-button"), {
1435
+ }), w(E.combinationKey).link && s(Z("fm-button"), {
1436
1436
  variant: Pe.Tertiary,
1437
1437
  prependIcon: "delete",
1438
1438
  textColor: Ne.NeutralGray400,
@@ -1457,12 +1457,12 @@ const Ga = /* @__PURE__ */ be({
1457
1457
  const E = A.combinationKey ? $t(A.combinationKey, r.variants) : (q = M.value[A._id]) == null ? void 0 : q.name;
1458
1458
  return A.name || A.fallbackName || E || "";
1459
1459
  }
1460
- const c = S(() => Object.values(_.value).some((A) => A.length > 0)), w = S(() => ({
1460
+ const c = S(() => Object.values(_.value).some((A) => A.length > 0)), I = S(() => ({
1461
1461
  code: k.value,
1462
1462
  name: !0,
1463
- price: T(null).price,
1464
- orderFrom: T(null).showOrderFrom,
1465
- action: T(null).inventory || T(null).link || c.value
1463
+ price: w(null).price,
1464
+ orderFrom: w(null).showOrderFrom,
1465
+ action: w(null).inventory || w(null).link || c.value
1466
1466
  }));
1467
1467
  async function C() {
1468
1468
  const A = (/* @__PURE__ */ new Date()).toISOString();
@@ -1556,7 +1556,7 @@ const Ga = /* @__PURE__ */ be({
1556
1556
  }, {
1557
1557
  "append-title": X(() => [A.config.link() ? ($(), ee(we, {
1558
1558
  key: 0
1559
- }, [y.value ? ($(), ee("div", Ma, [s(Ot, {
1559
+ }, [y.value ? ($(), ee("div", Ua, [s(Ot, {
1560
1560
  "categorized-items": A.categorizedItems,
1561
1561
  "initial-value": P.value,
1562
1562
  "show-variant": A.config.bindToVariant,
@@ -1578,7 +1578,7 @@ const Ga = /* @__PURE__ */ be({
1578
1578
  onClick: h
1579
1579
  }, null, 8, ["text-color", "border-color", "label", "onClick"])]),
1580
1580
  _: 1
1581
- }, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : ($(), ee("div", Ua, [s(q, {
1581
+ }, 8, ["categorized-items", "initial-value", "show-variant", "title"])])) : ($(), ee("div", Ra, [s(q, {
1582
1582
  "text-color": e(Ne).ColorPrimary,
1583
1583
  "border-color": e(Ne).ColorPrimary,
1584
1584
  variant: "secondary",
@@ -1586,10 +1586,10 @@ const Ga = /* @__PURE__ */ be({
1586
1586
  "prepend-icon": "add",
1587
1587
  onClick: C
1588
1588
  }, null, 8, ["text-color", "border-color", "label"])]))], 64)) : ne("", !0)]),
1589
- default: X(() => [B("div", Ra, [B("div", Aa, [s(g, {
1589
+ default: X(() => [B("div", Aa, [B("div", Na, [s(g, {
1590
1590
  "column-defs": Y.value,
1591
- "column-visibility": w.value,
1592
- draggable: !pe.value && T(null).name,
1591
+ "column-visibility": I.value,
1592
+ draggable: !pe.value && w(null).name,
1593
1593
  "expanded-state": F.value ? {} : U.value,
1594
1594
  "get-sub-row": b,
1595
1595
  "page-size": 999,
@@ -1605,13 +1605,13 @@ const Ga = /* @__PURE__ */ be({
1605
1605
  }, 8, ["title"]);
1606
1606
  };
1607
1607
  }
1608
- }), La = { class: "fm-typo-en-title-md-600" }, Ka = {
1608
+ }), Ka = { class: "fm-typo-en-title-md-600" }, Ba = {
1609
1609
  key: 0,
1610
1610
  class: "pt-8 space-y-32"
1611
- }, Ba = { class: "space-y-16" }, za = {
1611
+ }, za = { class: "space-y-16" }, ja = {
1612
1612
  key: 0,
1613
1613
  class: "flex gap-8 rounded-md bg-fm-color-system-warning-100 p-12"
1614
- }, ja = { class: "space-y-4" }, Ya = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, qa = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, Wa = { class: "flex gap-8 items-center justify-start" }, In = /* @__PURE__ */ be({
1614
+ }, Ya = { class: "space-y-4" }, qa = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, Wa = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, Ha = { class: "flex gap-8 items-center justify-start" }, In = /* @__PURE__ */ be({
1615
1615
  __name: "BaseForm",
1616
1616
  props: {
1617
1617
  title: {},
@@ -1627,9 +1627,9 @@ const Ga = /* @__PURE__ */ be({
1627
1627
  let o = i;
1628
1628
  const m = t, r = _e(), f = lt(), F = Qe(), d = Bt(bt(Ye())), { countDefaultItems: y, validateGroupItems: k, minMaxValidationRules: P } = no(
1629
1629
  () => o.group
1630
- ), v = re(!1), n = re(!1), I = (G) => {
1630
+ ), v = re(!1), n = re(!1), T = (G) => {
1631
1631
  zt.isBoolean(G) ? n.value = G : n.value = !n.value;
1632
- }, T = S(() => o.group ? o.config(o.group) : null), Q = S(() => oo(T.value)), D = (G) => Q.value.includes(G), x = S(() => sn(o.group)), V = S(() => {
1632
+ }, w = S(() => o.group ? o.config(o.group) : null), Q = S(() => oo(w.value)), D = (G) => Q.value.includes(G), x = S(() => sn(o.group)), V = S(() => {
1633
1633
  var le;
1634
1634
  const G = (le = o.group) == null ? void 0 : le._id;
1635
1635
  if (!G) return 1;
@@ -1637,7 +1637,7 @@ const Ga = /* @__PURE__ */ be({
1637
1637
  return (R == null ? void 0 : R.min) ?? 1;
1638
1638
  }), U = S(() => {
1639
1639
  var G;
1640
- return o.hideGroupScope ? z("menu.common.labels.hide_group_sublabel_variant", { scope: o.hideGroupScope }) : (G = T.value) != null && G.isItemGroup ? z("menu.common.labels.hide_group_sublabel_product") : z("menu.common.labels.hide_group_sublabel_catalog");
1640
+ return o.hideGroupScope ? z("menu.common.labels.hide_group_sublabel_variant", { scope: o.hideGroupScope }) : (G = w.value) != null && G.isItemGroup ? z("menu.common.labels.hide_group_sublabel_product") : z("menu.common.labels.hide_group_sublabel_catalog");
1641
1641
  });
1642
1642
  function O(G) {
1643
1643
  o.group && Y(G ? dn(o.group) : un(o.group, V.value));
@@ -1683,7 +1683,7 @@ const Ga = /* @__PURE__ */ be({
1683
1683
  function _(G) {
1684
1684
  return new ln(r, d.updateMenu, F).mapGroups(
1685
1685
  [G],
1686
- T.value.isOverride
1686
+ w.value.isOverride
1687
1687
  )[0];
1688
1688
  }
1689
1689
  const u = re($e.clone(o.group)), a = Kt(
@@ -1708,7 +1708,7 @@ const Ga = /* @__PURE__ */ be({
1708
1708
  };
1709
1709
  await r.updateMenu(le), m("submit:group", o.group);
1710
1710
  } else o.action === "update" && m("submit:group", o.group);
1711
- I(!1);
1711
+ T(!1);
1712
1712
  }
1713
1713
  Ue(
1714
1714
  () => n.value,
@@ -1716,9 +1716,9 @@ const Ga = /* @__PURE__ */ be({
1716
1716
  m("status:show", G), G && (await gt(), u.value = $e.clone(o.group));
1717
1717
  }
1718
1718
  );
1719
- const w = S(() => {
1719
+ const I = S(() => {
1720
1720
  var G;
1721
- return ((G = f.groupAttributeSettings) == null ? void 0 : G.value.length) > 0 && !T.value.isOverride;
1721
+ return ((G = f.groupAttributeSettings) == null ? void 0 : G.value.length) > 0 && !w.value.isOverride;
1722
1722
  }), C = S(() => {
1723
1723
  const G = {};
1724
1724
  return r.state.menu.modules.group.forEach((R) => {
@@ -1733,14 +1733,14 @@ const Ga = /* @__PURE__ */ be({
1733
1733
  });
1734
1734
  };
1735
1735
  l({
1736
- trigger: I,
1736
+ trigger: T,
1737
1737
  show: n
1738
1738
  });
1739
1739
  const { t: z } = he();
1740
1740
  return (G, R) => {
1741
1741
  const le = Z("fm-text-field"), b = Z("fm-stepper-field"), j = Z("FmFormGroup"), ge = Z("fm-radio"), pe = Z("fm-radio-group"), A = Z("fm-switch"), E = Z("FormSection"), q = Z("fm-icon"), g = Z("fm-button"), h = Z("fm-side-sheet");
1742
1742
  return $(), ee(we, null, [
1743
- Be(G.$slots, "default", { trigger: I }),
1743
+ Be(G.$slots, "default", { trigger: T }),
1744
1744
  s(h, {
1745
1745
  id: "group-form",
1746
1746
  modelValue: n.value,
@@ -1754,12 +1754,12 @@ const Ga = /* @__PURE__ */ be({
1754
1754
  "onOn:clickedAway": e(a)
1755
1755
  }, {
1756
1756
  "side-sheet-header": X(() => [
1757
- B("p", La, ve(G.title), 1)
1757
+ B("p", Ka, ve(G.title), 1)
1758
1758
  ]),
1759
1759
  "side-sheet-footer": X(() => [
1760
- B("div", Wa, [
1760
+ B("div", Ha, [
1761
1761
  s(g, {
1762
- label: e(zo)(p.value),
1762
+ label: e(jo)(p.value),
1763
1763
  loading: v.value,
1764
1764
  size: "lg",
1765
1765
  type: "submit",
@@ -1774,7 +1774,7 @@ const Ga = /* @__PURE__ */ be({
1774
1774
  ])
1775
1775
  ]),
1776
1776
  default: X(() => [
1777
- G.group ? ($(), ee("div", Ka, [
1777
+ G.group ? ($(), ee("div", Ba, [
1778
1778
  Be(G.$slots, "variant-section"),
1779
1779
  s(Vo, null, {
1780
1780
  default: X(() => [
@@ -1820,7 +1820,7 @@ const Ga = /* @__PURE__ */ be({
1820
1820
  ]),
1821
1821
  _: 1
1822
1822
  }, 8, ["model-value", "rules"]),
1823
- T.value.type ? ($(), ae(Ge, {
1823
+ w.value.type ? ($(), ae(Ge, {
1824
1824
  key: 0,
1825
1825
  label: e(z)("menu.common.labels.group_type")
1826
1826
  }, {
@@ -1846,7 +1846,7 @@ const Ga = /* @__PURE__ */ be({
1846
1846
  label: e(z)("menu.common.labels.configuration")
1847
1847
  }, {
1848
1848
  default: X(() => [
1849
- B("div", Ba, [
1849
+ B("div", za, [
1850
1850
  s(A, {
1851
1851
  modelValue: G.group.stackable,
1852
1852
  "onUpdate:modelValue": R[4] || (R[4] = (N) => G.group.stackable = N),
@@ -1855,7 +1855,7 @@ const Ga = /* @__PURE__ */ be({
1855
1855
  "label-placement": "right",
1856
1856
  sublabel: e(z)("menu.common.labels.stackable_sublabel")
1857
1857
  }, null, 8, ["modelValue", "disabled", "label", "sublabel"]),
1858
- T.value.hideGroup ? ($(), ae(A, {
1858
+ w.value.hideGroup ? ($(), ae(A, {
1859
1859
  key: 0,
1860
1860
  "model-value": x.value,
1861
1861
  label: e(z)("menu.common.labels.hide_group"),
@@ -1867,7 +1867,7 @@ const Ga = /* @__PURE__ */ be({
1867
1867
  ]),
1868
1868
  _: 1
1869
1869
  }, 8, ["label"]),
1870
- w.value ? ($(), ae(E, {
1870
+ I.value ? ($(), ae(E, {
1871
1871
  key: 1,
1872
1872
  title: e(z)("menu.group.form.tagging.title"),
1873
1873
  "sub-title": e(z)("menu.group.form.tagging.subtitle")
@@ -1885,7 +1885,7 @@ const Ga = /* @__PURE__ */ be({
1885
1885
  ]),
1886
1886
  _: 1
1887
1887
  }),
1888
- x.value ? ($(), ee("div", za, [
1888
+ x.value ? ($(), ee("div", ja, [
1889
1889
  s(q, {
1890
1890
  class: "shrink-0",
1891
1891
  color: "system-warning-400",
@@ -1893,9 +1893,9 @@ const Ga = /* @__PURE__ */ be({
1893
1893
  outline: "",
1894
1894
  size: "sm"
1895
1895
  }),
1896
- B("div", ja, [
1897
- B("p", Ya, ve(e(z)("menu.common.labels.hide_group_notice")), 1),
1898
- B("p", qa, ve(e(z)("menu.common.labels.hide_group_notice_reset")), 1)
1896
+ B("div", Ya, [
1897
+ B("p", qa, ve(e(z)("menu.common.labels.hide_group_notice")), 1),
1898
+ B("p", Wa, ve(e(z)("menu.common.labels.hide_group_notice_reset")), 1)
1899
1899
  ])
1900
1900
  ])) : ne("", !0),
1901
1901
  s(j, {
@@ -1910,10 +1910,10 @@ const Ga = /* @__PURE__ */ be({
1910
1910
  })
1911
1911
  }, {
1912
1912
  default: X(() => [
1913
- s(Ga, {
1913
+ s(La, {
1914
1914
  "allow-refund-inventory": G.allowRefundInventory ?? !1,
1915
1915
  "categorized-items": G.categorizedItems,
1916
- config: T.value,
1916
+ config: w.value,
1917
1917
  group: G.group,
1918
1918
  "onUpdate:group": R[6] || (R[6] = (N) => Y(N)),
1919
1919
  "onUpdate:unmapGroup": R[7] || (R[7] = (N) => Y(_(N)))
@@ -1928,13 +1928,13 @@ const Ga = /* @__PURE__ */ be({
1928
1928
  ], 64);
1929
1929
  };
1930
1930
  }
1931
- }), Ha = In, nn = Sa, Xa = wn, Qa = {
1931
+ }), Xa = In, nn = Ea, Qa = wn, Ja = {
1932
1932
  key: 0,
1933
1933
  class: "flex flex-col space-y-16 h-[440px]"
1934
- }, Ja = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Za = { class: "flex justify-between pb-16" }, er = { class: "flex gap-8" }, tr = {
1934
+ }, Za = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, er = { class: "flex justify-between pb-16" }, tr = { class: "flex gap-8" }, nr = {
1935
1935
  key: 1,
1936
1936
  class: "flex flex-col items-center space-y-16"
1937
- }, nr = { class: "flex flex-col items-center space-y-4 w-full" }, or = { class: "fm-typo-en-title-sm-600" }, ar = { class: "text-fm-color-typo-secondary" }, rr = /* @__PURE__ */ be({
1937
+ }, or = { class: "flex flex-col items-center space-y-4 w-full" }, ar = { class: "fm-typo-en-title-sm-600" }, rr = { class: "text-fm-color-typo-secondary" }, lr = /* @__PURE__ */ be({
1938
1938
  __name: "SelectGroupDialog",
1939
1939
  props: {
1940
1940
  groupIds: {}
@@ -1983,21 +1983,21 @@ const Ga = /* @__PURE__ */ be({
1983
1983
  position: r.groups.length - 1,
1984
1984
  itemsLinked: []
1985
1985
  }));
1986
- const v = re(Ce(l.groupIds || [])), n = re(""), { t: I } = he(), T = () => {
1986
+ const v = re(Ce(l.groupIds || [])), n = re(""), { t: T } = he(), w = () => {
1987
1987
  o(v.value), m("primary"), t.close();
1988
1988
  };
1989
1989
  return (Q, D) => {
1990
1990
  const x = Z("FmSearch"), V = Z("FmCheckbox"), U = Z("FmButton");
1991
- return k.value.length > 0 ? ($(), ee("div", Qa, [
1991
+ return k.value.length > 0 ? ($(), ee("div", Ja, [
1992
1992
  B("div", null, [
1993
1993
  s(x, {
1994
1994
  autofocus: "",
1995
1995
  modelValue: n.value,
1996
1996
  "onUpdate:modelValue": D[0] || (D[0] = (O) => n.value = O),
1997
- placeholder: e(I)("menu.common.labels.search_groups")
1997
+ placeholder: e(T)("menu.common.labels.search_groups")
1998
1998
  }, null, 8, ["modelValue", "placeholder"])
1999
1999
  ]),
2000
- B("div", Ja, [
2000
+ B("div", Za, [
2001
2001
  B("div", null, [
2002
2002
  ($(!0), ee(we, null, De(k.value, (O) => ($(), ee("div", {
2003
2003
  key: O.value
@@ -2016,11 +2016,11 @@ const Ga = /* @__PURE__ */ be({
2016
2016
  ]))), 128))
2017
2017
  ])
2018
2018
  ]),
2019
- B("div", Za, [
2019
+ B("div", er, [
2020
2020
  s(e(nn), null, {
2021
2021
  default: X(({ trigger: O }) => [
2022
2022
  s(U, {
2023
- label: e(I)("menu.common.actions.add_group"),
2023
+ label: e(T)("menu.common.actions.add_group"),
2024
2024
  variant: "tertiary",
2025
2025
  "text-color": "primary",
2026
2026
  onClick: (L) => O()
@@ -2028,27 +2028,27 @@ const Ga = /* @__PURE__ */ be({
2028
2028
  ]),
2029
2029
  _: 1
2030
2030
  }),
2031
- B("div", er, [
2031
+ B("div", tr, [
2032
2032
  s(U, {
2033
- label: e(I)("menu.common.actions.cancel"),
2033
+ label: e(T)("menu.common.actions.cancel"),
2034
2034
  variant: "tertiary",
2035
2035
  onClick: D[3] || (D[3] = (O) => e(t).close())
2036
2036
  }, null, 8, ["label"]),
2037
2037
  s(U, {
2038
- label: e(I)("menu.common.actions.confirm"),
2039
- onClick: D[4] || (D[4] = (O) => T())
2038
+ label: e(T)("menu.common.actions.confirm"),
2039
+ onClick: D[4] || (D[4] = (O) => w())
2040
2040
  }, null, 8, ["label"])
2041
2041
  ])
2042
2042
  ])
2043
- ])) : ($(), ee("div", tr, [
2044
- B("div", nr, [
2045
- B("p", or, ve(e(I)("menu.common.empty.no_group.title")), 1),
2046
- B("p", ar, ve(e(I)("menu.common.empty.no_group.subtitle")), 1)
2043
+ ])) : ($(), ee("div", nr, [
2044
+ B("div", or, [
2045
+ B("p", ar, ve(e(T)("menu.common.empty.no_group.title")), 1),
2046
+ B("p", rr, ve(e(T)("menu.common.empty.no_group.subtitle")), 1)
2047
2047
  ]),
2048
2048
  s(e(nn), null, {
2049
2049
  default: X(({ trigger: O }) => [
2050
2050
  s(U, {
2051
- label: e(I)("menu.common.actions.add_group"),
2051
+ label: e(T)("menu.common.actions.add_group"),
2052
2052
  icon: "add",
2053
2053
  onClick: (L) => O()
2054
2054
  }, null, 8, ["label", "onClick"])
@@ -2058,7 +2058,7 @@ const Ga = /* @__PURE__ */ be({
2058
2058
  ]));
2059
2059
  };
2060
2060
  }
2061
- }), lr = /* @__PURE__ */ be({
2061
+ }), ir = /* @__PURE__ */ be({
2062
2062
  __name: "ProductGroup",
2063
2063
  props: {
2064
2064
  isOverride: {
@@ -2079,11 +2079,11 @@ const Ga = /* @__PURE__ */ be({
2079
2079
  t: f
2080
2080
  } = he(), F = l, d = S(() => o.rules.group), y = S(() => o.rules.item), k = S(() => o.groups);
2081
2081
  function P(a, p) {
2082
- return Ce(p ?? []).map((w) => {
2083
- const C = a.find((K) => K._id === w._id);
2082
+ return Ce(p ?? []).map((I) => {
2083
+ const C = a.find((K) => K._id === I._id);
2084
2084
  return {
2085
2085
  name: (C == null ? void 0 : C.name) ?? "",
2086
- ...w,
2086
+ ...I,
2087
2087
  position: C == null ? void 0 : C.position
2088
2088
  };
2089
2089
  });
@@ -2093,9 +2093,9 @@ const Ga = /* @__PURE__ */ be({
2093
2093
  return [...n(P(k.value, t.form.groups || ((p = t.fallback) == null ? void 0 : p.groups) || [])).map((c) => c._id)];
2094
2094
  });
2095
2095
  function n(a) {
2096
- return Ce(a ?? []).sort((c, w) => c.position - w.position);
2096
+ return Ce(a ?? []).sort((c, I) => c.position - I.position);
2097
2097
  }
2098
- function I(a) {
2098
+ function T(a) {
2099
2099
  const p = k.value.find((C) => C._id === a);
2100
2100
  if (!p)
2101
2101
  return [];
@@ -2116,10 +2116,10 @@ const Ga = /* @__PURE__ */ be({
2116
2116
  })})` : K;
2117
2117
  });
2118
2118
  }
2119
- const T = S(() => n(k.value).reduce((a, p) => (a[p._id] = {
2119
+ const w = S(() => n(k.value).reduce((a, p) => (a[p._id] = {
2120
2120
  name: p.name,
2121
2121
  type: mn(o.items, p.items)
2122
- }, a), {})), Q = S(() => [...Object.entries(T.value).map(([a, {
2122
+ }, a), {})), Q = S(() => [...Object.entries(w.value).map(([a, {
2123
2123
  name: p,
2124
2124
  type: c
2125
2125
  }]) => ({
@@ -2141,7 +2141,7 @@ const Ga = /* @__PURE__ */ be({
2141
2141
  cell: (a) => {
2142
2142
  var c;
2143
2143
  const p = a.row.original._id;
2144
- return Pt((c = T.value[p]) == null ? void 0 : c.type);
2144
+ return Pt((c = w.value[p]) == null ? void 0 : c.type);
2145
2145
  }
2146
2146
  }, {
2147
2147
  accessorKey: "items",
@@ -2149,7 +2149,7 @@ const Ga = /* @__PURE__ */ be({
2149
2149
  enableSorting: !1,
2150
2150
  size: 200,
2151
2151
  cell: (a) => {
2152
- const p = a.row.original._id, w = I(p).join(", ");
2152
+ const p = a.row.original._id, I = T(p).join(", ");
2153
2153
  return s(Ie.FmTooltip, {
2154
2154
  "z-index": 51,
2155
2155
  class: "flex",
@@ -2158,14 +2158,14 @@ const Ga = /* @__PURE__ */ be({
2158
2158
  }, {
2159
2159
  default: () => s("div", {
2160
2160
  class: "line-clamp-2 break-all"
2161
- }, [w]),
2161
+ }, [I]),
2162
2162
  content: () => s("div", {
2163
2163
  class: "py-12 px-16 space-y-12"
2164
2164
  }, [s("p", {
2165
2165
  class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-600"
2166
2166
  }, [f("menu.group.list.columns.products")]), s("div", {
2167
2167
  class: "flex flex-wrap gap-8"
2168
- }, [w])])
2168
+ }, [I])])
2169
2169
  });
2170
2170
  }
2171
2171
  }, {
@@ -2184,7 +2184,7 @@ const Ga = /* @__PURE__ */ be({
2184
2184
  onClick: Je(async () => {
2185
2185
  O(p);
2186
2186
  }, ["stop", "prevent"])
2187
- }), Te(Xa, {
2187
+ }), Te(Qa, {
2188
2188
  // variant items
2189
2189
  combinations: Y.value ?? [],
2190
2190
  // combinationKey: varaintName
@@ -2210,7 +2210,7 @@ const Ga = /* @__PURE__ */ be({
2210
2210
  function V() {
2211
2211
  r.open({
2212
2212
  title: f("menu.product.form.group.add"),
2213
- contentComponent: rr,
2213
+ contentComponent: lr,
2214
2214
  contentComponentProps: {
2215
2215
  groupIds: v.value
2216
2216
  }
@@ -2219,13 +2219,13 @@ const Ga = /* @__PURE__ */ be({
2219
2219
  });
2220
2220
  }
2221
2221
  function U(a) {
2222
- var w;
2222
+ var I;
2223
2223
  const p = a.find((C) => lo(o.state.menu, C, t.form._id));
2224
2224
  if (p) {
2225
2225
  m.open({
2226
2226
  type: "error",
2227
2227
  message: f("menu.product.form.group.circularError", {
2228
- groupName: (w = T.value[p]) == null ? void 0 : w.name,
2228
+ groupName: (I = w.value[p]) == null ? void 0 : I.name,
2229
2229
  productName: t.form.name
2230
2230
  })
2231
2231
  });
@@ -2245,13 +2245,13 @@ const Ga = /* @__PURE__ */ be({
2245
2245
  }));
2246
2246
  }
2247
2247
  function O(a) {
2248
- var c, w, C;
2248
+ var c, I, C;
2249
2249
  if (!t.form.groups)
2250
2250
  return;
2251
2251
  const p = Ce(t.form.groups);
2252
2252
  p.splice(p.findIndex((K) => K._id === a), 1);
2253
2253
  for (const K of ((c = t.form.variant) == null ? void 0 : c.variantCombinations) || [])
2254
- (C = K.groups) == null || C.splice((w = K.groups) == null ? void 0 : w.findIndex((z) => z._id === a), 1);
2254
+ (C = K.groups) == null || C.splice((I = K.groups) == null ? void 0 : I.findIndex((z) => z._id === a), 1);
2255
2255
  F("replace:form", Xt(o, {
2256
2256
  ...t.form,
2257
2257
  groups: p
@@ -2272,7 +2272,7 @@ const Ga = /* @__PURE__ */ be({
2272
2272
  var c;
2273
2273
  if (!a) return !1;
2274
2274
  if (y.value.overrideProductGroup) return !0;
2275
- switch ((c = T.value[a]) == null ? void 0 : c.type) {
2275
+ switch ((c = w.value[a]) == null ? void 0 : c.type) {
2276
2276
  case ke.enum.DYNAMIC:
2277
2277
  return !0;
2278
2278
  case ke.enum.PRODUCT:
@@ -2295,7 +2295,7 @@ const Ga = /* @__PURE__ */ be({
2295
2295
  }) : F("update:form", "groups", a[0].groups || []);
2296
2296
  };
2297
2297
  return (a, p) => {
2298
- const c = Z("FmButton"), w = Z("FmTable");
2298
+ const c = Z("FmButton"), I = Z("FmTable");
2299
2299
  return $(), ae(Re, {
2300
2300
  title: e(f)("menu.product.form.group.title"),
2301
2301
  "sub-title": e(f)("menu.product.form.group.subtitle"),
@@ -2311,7 +2311,7 @@ const Ga = /* @__PURE__ */ be({
2311
2311
  default: X(() => [s(pn, null, {
2312
2312
  default: X(() => {
2313
2313
  var C;
2314
- return [((C = v.value) == null ? void 0 : C.length) > 0 ? ($(), ae(w, {
2314
+ return [((C = v.value) == null ? void 0 : C.length) > 0 ? ($(), ae(I, {
2315
2315
  key: 0,
2316
2316
  "column-defs": D.value,
2317
2317
  "column-visibility": x.value,
@@ -2330,11 +2330,11 @@ const Ga = /* @__PURE__ */ be({
2330
2330
  }, 8, ["title", "sub-title", "id"]);
2331
2331
  };
2332
2332
  }
2333
- }), ir = {
2333
+ }), sr = {
2334
2334
  class: "xs:overflow-x-scroll"
2335
- }, sr = {
2335
+ }, ur = {
2336
2336
  class: "xs:min-w-[640px]"
2337
- }, ur = /* @__PURE__ */ be({
2337
+ }, dr = /* @__PURE__ */ be({
2338
2338
  __name: "ProductInventory",
2339
2339
  props: {
2340
2340
  isOverride: {
@@ -2372,11 +2372,11 @@ const Ga = /* @__PURE__ */ be({
2372
2372
  const n = S(() => {
2373
2373
  var V;
2374
2374
  return o.form.name || ((V = o.fallback) == null ? void 0 : V.name) || "";
2375
- }), I = S(() => {
2375
+ }), T = S(() => {
2376
2376
  var V;
2377
2377
  return v(o.form.inventoryBindings || [], ((V = o.form.variant) == null ? void 0 : V.variantCombinations) || [], n.value, r.variants);
2378
2378
  });
2379
- function T(V, U) {
2379
+ function w(V, U) {
2380
2380
  var M, _;
2381
2381
  let O = $e.clone(o.form);
2382
2382
  const L = O.variant;
@@ -2437,7 +2437,7 @@ const Ga = /* @__PURE__ */ be({
2437
2437
  name: n.value
2438
2438
  }),
2439
2439
  "onUpdate:inventory": (O) => {
2440
- T(U.key, O);
2440
+ w(U.key, O);
2441
2441
  }
2442
2442
  }, {
2443
2443
  default: ({
@@ -2458,7 +2458,7 @@ const Ga = /* @__PURE__ */ be({
2458
2458
  for (const U of Q.value)
2459
2459
  U.getKey() === V && U.trigger(!0);
2460
2460
  }
2461
- const x = jo();
2461
+ const x = Yo();
2462
2462
  return Xe(() => {
2463
2463
  x.readInventory();
2464
2464
  }), (V, U) => {
@@ -2467,7 +2467,7 @@ const Ga = /* @__PURE__ */ be({
2467
2467
  title: e(t)("menu.inventory.title"),
2468
2468
  subTitle: e(t)("menu.inventory.subtitle")
2469
2469
  }, {
2470
- default: X(() => [B("div", ir, [B("div", sr, [($(!0), ee(we, null, De(I.value, (L) => ($(), ae(e(Vt), {
2470
+ default: X(() => [B("div", sr, [B("div", ur, [($(!0), ee(we, null, De(T.value, (L) => ($(), ae(e(Vt), {
2471
2471
  key: L._id,
2472
2472
  ref_for: !0,
2473
2473
  ref_key: "inventoryManagerForms",
@@ -2479,10 +2479,10 @@ const Ga = /* @__PURE__ */ be({
2479
2479
  bindingKey: L._id,
2480
2480
  initialValue: L.binding ?? [],
2481
2481
  "onUpdate:inventory": (Y) => {
2482
- T(L._id, Y);
2482
+ w(L._id, Y);
2483
2483
  }
2484
- }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), s(e(Yo), {
2485
- "row-data": I.value,
2484
+ }, null, 8, ["title", "name", "bindingKey", "initialValue", "onUpdate:inventory"]))), 128)), s(e(qo), {
2485
+ "row-data": T.value,
2486
2486
  onRowClick: D
2487
2487
  }, null, 8, ["row-data"])])])]),
2488
2488
  _: 1
@@ -2506,25 +2506,25 @@ const Ga = /* @__PURE__ */ be({
2506
2506
  }, 8, ["title", "sub-title"])], 64)) : ne("", !0)], 64);
2507
2507
  };
2508
2508
  }
2509
- }), dr = ["id"], cr = {
2509
+ }), cr = ["id"], mr = {
2510
2510
  key: 0,
2511
2511
  class: "flex fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-100 items-center justify-between"
2512
- }, mr = { class: "flex flex-col space-y-4" }, pr = { class: "fm-typo-en-body-lg-600" }, fr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gr = { class: "flex items-center gap-8" }, vr = { class: "space-y-16" }, br = { class: "space-y-8" }, yr = {
2512
+ }, pr = { class: "flex flex-col space-y-4" }, fr = { class: "fm-typo-en-body-lg-600" }, gr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vr = { class: "flex items-center gap-8" }, br = { class: "space-y-16" }, yr = { class: "space-y-8" }, _r = {
2513
2513
  key: 0,
2514
2514
  class: "pl-32 pb-4 space-x-16 flex items-center"
2515
- }, _r = { class: "fm-typo-en-body-lg-400" }, hr = { class: "w-[258px]" }, kr = { class: "w-[117px]" }, Cr = {
2515
+ }, hr = { class: "fm-typo-en-body-lg-400" }, kr = { class: "w-[258px]" }, Cr = { class: "w-[117px]" }, wr = {
2516
2516
  key: 0,
2517
2517
  class: "space-y-8"
2518
- }, wr = {
2518
+ }, Ir = {
2519
2519
  key: 0,
2520
2520
  class: "pl-32 pb-4 flex space-x-16"
2521
- }, Ir = { class: "w-[258px] xs:w-full" }, Tr = {
2521
+ }, Tr = { class: "w-[258px] xs:w-full" }, xr = {
2522
2522
  key: 1,
2523
2523
  class: "space-y-8"
2524
- }, xr = { class: "pl-32 pb-4 flex space-x-16" }, Sr = { class: "w-[258px] xs:w-full" }, Er = { class: "space-y-16" }, Fr = {
2524
+ }, Sr = { class: "pl-32 pb-4 flex space-x-16" }, Er = { class: "w-[258px] xs:w-full" }, Fr = { class: "space-y-16" }, Vr = {
2525
2525
  key: 0,
2526
2526
  class: "pl-32 pb-4 space-x-16 flex items-center"
2527
- }, Vr = { class: "fm-typo-en-body-lg-400" }, $r = { class: "w-[258px]" }, Pr = /* @__PURE__ */ be({
2527
+ }, $r = { class: "fm-typo-en-body-lg-400" }, Pr = { class: "w-[258px]" }, Dr = /* @__PURE__ */ be({
2528
2528
  __name: "ProductPrice",
2529
2529
  props: {
2530
2530
  isOverride: { type: Boolean },
@@ -2560,18 +2560,18 @@ const Ga = /* @__PURE__ */ be({
2560
2560
  if (!u && t.form.perXUnit) {
2561
2561
  const [a, p] = t.form.perXUnit.toString().split(".");
2562
2562
  if (p && p.length > 4) {
2563
- const w = (typeof t.form.perXUnit == "string" ? parseFloat(t.form.perXUnit) : t.form.perXUnit).toFixed(4);
2564
- f("update:form", "perXUnit", parseFloat(w));
2563
+ const I = (typeof t.form.perXUnit == "string" ? parseFloat(t.form.perXUnit) : t.form.perXUnit).toFixed(4);
2564
+ f("update:form", "perXUnit", parseFloat(I));
2565
2565
  }
2566
2566
  }
2567
2567
  }
2568
- const I = S(() => o.currentCountry.value ? To(o.currentCountry.value) : []);
2569
- function T(u) {
2568
+ const T = S(() => o.currentCountry.value ? To(o.currentCountry.value) : []);
2569
+ function w(u) {
2570
2570
  var a;
2571
2571
  return (a = t.form.statutoryCharges) == null ? void 0 : a.find((p) => p.code === u);
2572
2572
  }
2573
2573
  function Q(u, a) {
2574
- const p = (t.form.statutoryCharges ?? []).filter((w) => w.code !== u), c = a ? [...p, { code: u, unitCount: 1 }] : p;
2574
+ const p = (t.form.statutoryCharges ?? []).filter((I) => I.code !== u), c = a ? [...p, { code: u, unitCount: 1 }] : p;
2575
2575
  f("update:form", "statutoryCharges", c.length ? c : void 0);
2576
2576
  }
2577
2577
  function D(u, a) {
@@ -2602,7 +2602,7 @@ const Ga = /* @__PURE__ */ be({
2602
2602
  command: "suggestPrice"
2603
2603
  });
2604
2604
  }
2605
- const O = qo(m), L = S(() => {
2605
+ const O = Wo(m), L = S(() => {
2606
2606
  var u, a;
2607
2607
  return ((u = m.currentCatalog) == null ? void 0 : u.priceTierRules) ?? ((a = m.currentCatalog) == null ? void 0 : a.usePriceTiers) ?? [];
2608
2608
  }), Y = jt(), M = S(() => Y.getMemberPricingPriceVariant(t.form.price_variant));
@@ -2610,7 +2610,7 @@ const Ga = /* @__PURE__ */ be({
2610
2610
  f("update:form", "price_variant", Gt(u));
2611
2611
  }
2612
2612
  return (u, a) => {
2613
- const p = Z("fm-select"), c = Z("FmButton"), w = Z("fm-checkbox"), C = Z("fm-text-field"), K = on("tooltip");
2613
+ const p = Z("fm-select"), c = Z("FmButton"), I = Z("fm-checkbox"), C = Z("fm-text-field"), K = on("tooltip");
2614
2614
  return $(), ae(Re, {
2615
2615
  title: e(r)("menu.product.form.price.title")
2616
2616
  }, {
@@ -2657,13 +2657,13 @@ const Ga = /* @__PURE__ */ be({
2657
2657
  "shift-menu": "",
2658
2658
  "onUpdate:modelValue": a[1] || (a[1] = (R) => f("update:form", "taxes", [e(ht).decodeTax(R)]))
2659
2659
  }, null, 8, ["disabled", "items", "label", "model-value"])
2660
- ], 8, dr),
2661
- e(m).isV4 ? ($(), ee("div", cr, [
2662
- B("div", mr, [
2663
- B("p", pr, ve(e(r)("menu.product.form.member_price.title")), 1),
2664
- B("p", fr, ve(e(r)("menu.product.form.member_price.description")), 1)
2660
+ ], 8, cr),
2661
+ e(m).isV4 ? ($(), ee("div", mr, [
2662
+ B("div", pr, [
2663
+ B("p", fr, ve(e(r)("menu.product.form.member_price.title")), 1),
2664
+ B("p", gr, ve(e(r)("menu.product.form.member_price.description")), 1)
2665
2665
  ]),
2666
- B("div", gr, [
2666
+ B("div", vr, [
2667
2667
  s(Nt, {
2668
2668
  title: e(r)("menu.product.form.member_price.configure.title"),
2669
2669
  currentConfig: "Main Pricing",
@@ -2720,8 +2720,8 @@ const Ga = /* @__PURE__ */ be({
2720
2720
  default: X(() => {
2721
2721
  var R, le, b;
2722
2722
  return [
2723
- B("div", vr, [
2724
- s(w, {
2723
+ B("div", br, [
2724
+ s(I, {
2725
2725
  disabled: !F.value.openPrice || u.isAddon,
2726
2726
  "model-value": u.form.openPrice ?? ((R = u.fallback) == null ? void 0 : R.openPrice) ?? !1,
2727
2727
  value: u.form.openPrice,
@@ -2729,8 +2729,8 @@ const Ga = /* @__PURE__ */ be({
2729
2729
  sublabel: e(r)("menu.product.form.price.settings.open_price.sublabel"),
2730
2730
  "onUpdate:modelValue": a[5] || (a[5] = (j) => f("update:form", "openPrice", j))
2731
2731
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2732
- B("div", br, [
2733
- s(w, {
2732
+ B("div", yr, [
2733
+ s(I, {
2734
2734
  disabled: !F.value.unit || u.isAddon,
2735
2735
  "model-value": d.value,
2736
2736
  value: d.value,
@@ -2738,9 +2738,9 @@ const Ga = /* @__PURE__ */ be({
2738
2738
  sublabel: e(r)("menu.product.form.price.settings.sell_by_unit.sublabel"),
2739
2739
  "onUpdate:modelValue": y
2740
2740
  }, null, 8, ["disabled", "model-value", "value", "label", "sublabel"]),
2741
- d.value ? ($(), ee("div", yr, [
2742
- B("p", _r, ve(e(r)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
2743
- B("div", hr, [
2741
+ d.value ? ($(), ee("div", _r, [
2742
+ B("p", hr, ve(e(r)("menu.product.form.price.settings.sell_by_unit.per_unit.label")), 1),
2743
+ B("div", kr, [
2744
2744
  s(C, {
2745
2745
  disabled: !F.value.unit,
2746
2746
  "model-value": u.form.perXUnit || ((le = u.fallback) == null ? void 0 : le.perXUnit) || null,
@@ -2755,7 +2755,7 @@ const Ga = /* @__PURE__ */ be({
2755
2755
  "onUpdate:modelValue": v
2756
2756
  }, null, 8, ["disabled", "model-value", "rules", "placeholder"])
2757
2757
  ]),
2758
- B("div", kr, [
2758
+ B("div", Cr, [
2759
2759
  s(C, {
2760
2760
  disabled: !F.value.unit,
2761
2761
  "model-value": u.form.unit || ((b = u.fallback) == null ? void 0 : b.unit) || null,
@@ -2768,15 +2768,15 @@ const Ga = /* @__PURE__ */ be({
2768
2768
  ])
2769
2769
  ])) : ne("", !0)
2770
2770
  ]),
2771
- F.value.costing ? ($(), ee("div", Cr, [
2772
- s(w, {
2771
+ F.value.costing ? ($(), ee("div", wr, [
2772
+ s(I, {
2773
2773
  "model-value": !!u.form.costing,
2774
2774
  value: !!u.form.costing,
2775
2775
  label: e(r)("menu.product.form.price.settings.track_costing.label"),
2776
2776
  "onUpdate:modelValue": a[7] || (a[7] = (j) => f("update:form", "costing", j ? e(xe.Dinero).zero().toObject() : void 0))
2777
2777
  }, null, 8, ["model-value", "value", "label"]),
2778
- u.form.costing ? ($(), ee("div", wr, [
2779
- B("div", Ir, [
2778
+ u.form.costing ? ($(), ee("div", Ir, [
2779
+ B("div", Tr, [
2780
2780
  s(Ze, {
2781
2781
  class: "w-full",
2782
2782
  min: 0,
@@ -2788,16 +2788,16 @@ const Ga = /* @__PURE__ */ be({
2788
2788
  ])
2789
2789
  ])) : ne("", !0)
2790
2790
  ])) : ne("", !0),
2791
- F.value.minPrice ? ($(), ee("div", Tr, [
2792
- s(w, {
2791
+ F.value.minPrice ? ($(), ee("div", xr, [
2792
+ s(I, {
2793
2793
  disabled: !F.value.minPrice || u.isAddon,
2794
2794
  "model-value": !!u.form.minPrice,
2795
2795
  value: !!u.form.minPrice,
2796
2796
  label: e(r)("menu.product.form.price.settings.min_price.label"),
2797
2797
  "onUpdate:modelValue": a[9] || (a[9] = (j) => f("update:form", "minPrice", j ? e(xe.Dinero).zero().toObject() : void 0))
2798
2798
  }, null, 8, ["disabled", "model-value", "value", "label"]),
2799
- B("div", xr, [
2800
- B("div", Sr, [
2799
+ B("div", Sr, [
2800
+ B("div", Er, [
2801
2801
  u.form.minPrice ? ($(), ae(Ze, {
2802
2802
  key: 0,
2803
2803
  max: e(xe.Dinero).fromFdoDinero(u.form.price).toUnit(),
@@ -2815,32 +2815,32 @@ const Ga = /* @__PURE__ */ be({
2815
2815
  }),
2816
2816
  _: 1
2817
2817
  }, 8, ["label"]),
2818
- !u.isOverride && e(m).isV4 && I.value.length > 0 ? ($(), ae(Ge, {
2818
+ !u.isOverride && e(m).isV4 && T.value.length > 0 ? ($(), ae(Ge, {
2819
2819
  key: 2,
2820
2820
  label: e(r)("menu.product.form.price.statutory_charges.title")
2821
2821
  }, {
2822
2822
  default: X(() => [
2823
- B("div", Er, [
2824
- ($(!0), ee(we, null, De(I.value, (R) => {
2823
+ B("div", Fr, [
2824
+ ($(!0), ee(we, null, De(T.value, (R) => {
2825
2825
  var le;
2826
2826
  return $(), ee("div", {
2827
2827
  key: R.code,
2828
2828
  class: "space-y-8"
2829
2829
  }, [
2830
- s(w, {
2831
- "model-value": !!T(R.code),
2832
- value: !!T(R.code),
2830
+ s(I, {
2831
+ "model-value": !!w(R.code),
2832
+ value: !!w(R.code),
2833
2833
  label: R.name,
2834
2834
  sublabel: e(r)("menu.product.form.price.statutory_charges.unit_amount", {
2835
- amount: e(Bo)(R.amount)
2835
+ amount: e(zo)(R.amount)
2836
2836
  }),
2837
2837
  "onUpdate:modelValue": (b) => Q(R.code, b)
2838
2838
  }, null, 8, ["model-value", "value", "label", "sublabel", "onUpdate:modelValue"]),
2839
- T(R.code) ? ($(), ee("div", Fr, [
2840
- B("p", Vr, ve(e(r)("menu.product.form.price.statutory_charges.unit_count.label")), 1),
2841
- B("div", $r, [
2839
+ w(R.code) ? ($(), ee("div", Vr, [
2840
+ B("p", $r, ve(e(r)("menu.product.form.price.statutory_charges.unit_count.label")), 1),
2841
+ B("div", Pr, [
2842
2842
  s(C, {
2843
- "model-value": ((le = T(R.code)) == null ? void 0 : le.unitCount) ?? null,
2843
+ "model-value": ((le = w(R.code)) == null ? void 0 : le.unitCount) ?? null,
2844
2844
  rules: x.value,
2845
2845
  inputmode: "numeric",
2846
2846
  placeholder: e(r)("menu.product.form.price.statutory_charges.unit_count.placeholder"),
@@ -2861,7 +2861,7 @@ const Ga = /* @__PURE__ */ be({
2861
2861
  }, 8, ["title"]);
2862
2862
  };
2863
2863
  }
2864
- }), Dr = { class: "space-y-16" }, Or = { class: "flex items-center space-x-4" }, Mr = { class: "handle" }, Ur = { class: "pt-16" }, Rr = /* @__PURE__ */ be({
2864
+ }), Or = { class: "space-y-16" }, Mr = { class: "flex items-center space-x-4" }, Ur = { class: "handle" }, Rr = { class: "pt-16" }, Ar = /* @__PURE__ */ be({
2865
2865
  __name: "ProductPrint",
2866
2866
  props: {
2867
2867
  isOverride: { type: Boolean },
@@ -2904,7 +2904,7 @@ const Ga = /* @__PURE__ */ be({
2904
2904
  sequential: D
2905
2905
  });
2906
2906
  }
2907
- function I(D) {
2907
+ function T(D) {
2908
2908
  r("update:form", "print", {
2909
2909
  ...f(),
2910
2910
  ...t.form.print,
@@ -2914,7 +2914,7 @@ const Ga = /* @__PURE__ */ be({
2914
2914
  })
2915
2915
  });
2916
2916
  }
2917
- function T(D, x) {
2917
+ function w(D, x) {
2918
2918
  var U, O;
2919
2919
  let V = [...((O = (U = t.form) == null ? void 0 : U.print) == null ? void 0 : O.department) ?? []];
2920
2920
  x && !V.includes(D) ? V = [...V, D] : x || (V = V.filter((L) => L !== D)), r("update:form", "print", {
@@ -2937,7 +2937,7 @@ const Ga = /* @__PURE__ */ be({
2937
2937
  ]);
2938
2938
  return Ue(
2939
2939
  () => d.value.length,
2940
- () => T(d.value[d.value.length - 1]._id, !0)
2940
+ () => w(d.value[d.value.length - 1]._id, !0)
2941
2941
  ), (D, x) => {
2942
2942
  const V = Z("fm-switch"), U = Z("fm-radio"), O = Z("fm-radio-group"), L = Z("fm-button"), Y = Z("fm-checkbox");
2943
2943
  return $(), ae(Re, {
@@ -2970,7 +2970,7 @@ const Ga = /* @__PURE__ */ be({
2970
2970
  "onUpdate:modelValue": x[1] || (x[1] = (_) => n(_))
2971
2971
  }, {
2972
2972
  default: X(() => [
2973
- B("div", Dr, [
2973
+ B("div", Or, [
2974
2974
  ($(!0), ee(we, null, De(Q.value, (_, u) => ($(), ae(U, {
2975
2975
  key: u,
2976
2976
  label: _.label,
@@ -2990,14 +2990,14 @@ const Ga = /* @__PURE__ */ be({
2990
2990
  "item-key": (_) => _,
2991
2991
  "model-value": k.value,
2992
2992
  handle: ".handle",
2993
- "onUpdate:modelValue": x[3] || (x[3] = (_) => I(_)),
2993
+ "onUpdate:modelValue": x[3] || (x[3] = (_) => T(_)),
2994
2994
  class: "space-y-16"
2995
2995
  }, {
2996
2996
  item: X(({ element: _ }) => {
2997
- var u, a, p, c, w;
2997
+ var u, a, p, c, I;
2998
2998
  return [
2999
- B("div", Or, [
3000
- B("div", Mr, [
2999
+ B("div", Mr, [
3000
+ B("div", Ur, [
3001
3001
  y.value ? ($(), ae(L, {
3002
3002
  key: 0,
3003
3003
  disabled: !((a = (u = t.form.print) == null ? void 0 : u.department) != null && a.includes(_)),
@@ -3012,10 +3012,10 @@ const Ga = /* @__PURE__ */ be({
3012
3012
  id: _,
3013
3013
  "data-checked": (c = (p = t.form.print) == null ? void 0 : p.department) == null ? void 0 : c.includes(_),
3014
3014
  label: P.value[_],
3015
- "model-value": (((w = t.form.print) == null ? void 0 : w.department) ?? []).includes(_),
3015
+ "model-value": (((I = t.form.print) == null ? void 0 : I.department) ?? []).includes(_),
3016
3016
  value: _,
3017
3017
  class: "flex-1",
3018
- "onUpdate:modelValue": (C) => T(_, C)
3018
+ "onUpdate:modelValue": (C) => w(_, C)
3019
3019
  }, null, 8, ["id", "data-checked", "label", "model-value", "value", "onUpdate:modelValue"])
3020
3020
  ])
3021
3021
  ];
@@ -3024,7 +3024,7 @@ const Ga = /* @__PURE__ */ be({
3024
3024
  }, 8, ["item-key", "model-value"])) : ne("", !0),
3025
3025
  s(e(so), { "apply-product": !1 }, {
3026
3026
  default: X(({ trigger: _ }) => [
3027
- B("div", Ur, [
3027
+ B("div", Rr, [
3028
3028
  s(L, {
3029
3029
  variant: e(Pe).Secondary,
3030
3030
  label: e(m)("menu.product.form.print.routes.add"),
@@ -3044,7 +3044,7 @@ const Ga = /* @__PURE__ */ be({
3044
3044
  }, 8, ["title"]);
3045
3045
  };
3046
3046
  }
3047
- }), Ar = /* @__PURE__ */ be({
3047
+ }), Nr = /* @__PURE__ */ be({
3048
3048
  __name: "ProductTakeaway",
3049
3049
  props: {
3050
3050
  isOverride: {
@@ -3089,30 +3089,31 @@ const Ga = /* @__PURE__ */ be({
3089
3089
  action: "add",
3090
3090
  applyProduct: !1,
3091
3091
  bindToVariant: o.rules.item.bindToVariant,
3092
- "onUpdate:takeaway": async (I) => {
3092
+ "onUpdate:takeaway": async (T) => {
3093
+ const w = Go(T);
3093
3094
  await o.updateMenu({
3094
3095
  module: Se.enum.takeaway,
3095
3096
  operation: Ve.F_OPERATION_TYPE.create,
3096
- data: I,
3097
- link: Go(I.usedBy || [])
3097
+ data: w,
3098
+ link: Lo(w.usedBy || [])
3098
3099
  });
3099
3100
  }
3100
3101
  }, {
3101
3102
  default: ({
3102
- trigger: I
3103
+ trigger: T
3103
3104
  }) => Te(Ie.FmSelect, {
3104
3105
  modelValue: v || null,
3105
3106
  menuZIndex: 103,
3106
3107
  items: y.value,
3107
3108
  shiftMenu: !0,
3108
- "onUpdate:modelValue": (T) => {
3109
- n.onUpdate(T || "");
3109
+ "onUpdate:modelValue": (w) => {
3110
+ n.onUpdate(w || "");
3110
3111
  }
3111
3112
  }, {
3112
3113
  "append-menu": () => o.rules.takeaway.create ? Te("button", {
3113
3114
  class: "flex items-center py-8 px-16 space-x-8",
3114
3115
  type: "button",
3115
- onClick: I
3116
+ onClick: T
3116
3117
  }, [Te(Ie.FmIcon, {
3117
3118
  name: "add",
3118
3119
  size: "md",
@@ -3140,10 +3141,10 @@ const Ga = /* @__PURE__ */ be({
3140
3141
  }, 8, ["title", "sub-title"]);
3141
3142
  };
3142
3143
  }
3143
- }), Nr = { class: "fm-typo-en-title-md-600" }, Gr = { class: "py-16 space-y-32" }, Lr = ["data-not-allow-sort"], Kr = {
3144
+ }), Gr = { class: "fm-typo-en-title-md-600" }, Lr = { class: "py-16 space-y-32" }, Kr = ["data-not-allow-sort"], Br = {
3144
3145
  key: 1,
3145
3146
  class: "w-24"
3146
- }, Br = { class: "flex-1" }, zr = { class: "flex gap-8 items-center justify-start" }, jr = /* @__PURE__ */ be({
3147
+ }, zr = { class: "flex-1" }, jr = { class: "flex gap-8 items-center justify-start" }, Yr = /* @__PURE__ */ be({
3147
3148
  __name: "VariantManagerForm",
3148
3149
  props: {
3149
3150
  initialValue: {}
@@ -3169,11 +3170,11 @@ const Ga = /* @__PURE__ */ be({
3169
3170
  function n(U) {
3170
3171
  k.value.options = U;
3171
3172
  }
3172
- function I(U, O) {
3173
+ function T(U, O) {
3173
3174
  const L = Ce(k.value.options), Y = L.findIndex((M) => M._id == U);
3174
- L[Y].name = O, k.value.options = L, Y === k.value.options.length - 1 && T();
3175
+ L[Y].name = O, k.value.options = L, Y === k.value.options.length - 1 && w();
3175
3176
  }
3176
- function T() {
3177
+ function w() {
3177
3178
  const U = Ce(k.value.options);
3178
3179
  k.value.options = [
3179
3180
  ...U,
@@ -3190,7 +3191,7 @@ const Ga = /* @__PURE__ */ be({
3190
3191
  Ue(
3191
3192
  () => k.value.options,
3192
3193
  (U) => {
3193
- U.length <= 0 && T();
3194
+ U.length <= 0 && w();
3194
3195
  },
3195
3196
  {
3196
3197
  immediate: !0
@@ -3250,10 +3251,10 @@ const Ga = /* @__PURE__ */ be({
3250
3251
  "onOn:clickedAway": e(x)
3251
3252
  }, {
3252
3253
  "side-sheet-header": X(() => [
3253
- B("p", Nr, ve(F.value), 1)
3254
+ B("p", Gr, ve(F.value), 1)
3254
3255
  ]),
3255
3256
  "side-sheet-footer": X(() => [
3256
- B("div", zr, [
3257
+ B("div", jr, [
3257
3258
  s(M, {
3258
3259
  label: d.value,
3259
3260
  loading: P.value,
@@ -3272,7 +3273,7 @@ const Ga = /* @__PURE__ */ be({
3272
3273
  default: X(() => {
3273
3274
  var u;
3274
3275
  return [
3275
- B("div", Gr, [
3276
+ B("div", Lr, [
3276
3277
  s(Re, {
3277
3278
  title: e(f)("menu.variant.form.detail")
3278
3279
  }, {
@@ -3309,8 +3310,8 @@ const Ga = /* @__PURE__ */ be({
3309
3310
  key: 0,
3310
3311
  class: "handle",
3311
3312
  name: "drag_handle"
3312
- })) : p > 0 ? ($(), ee("div", Kr)) : ne("", !0),
3313
- B("div", Br, [
3313
+ })) : p > 0 ? ($(), ee("div", Br)) : ne("", !0),
3314
+ B("div", zr, [
3314
3315
  s(L, {
3315
3316
  "model-value": a.name,
3316
3317
  rules: [
@@ -3319,7 +3320,7 @@ const Ga = /* @__PURE__ */ be({
3319
3320
  ],
3320
3321
  class: "flex-1",
3321
3322
  placeholder: e(f)("menu.variant.form.options.placeholder"),
3322
- "onUpdate:modelValue": (c) => I(a._id, c)
3323
+ "onUpdate:modelValue": (c) => T(a._id, c)
3323
3324
  }, $n({ _: 2 }, [
3324
3325
  p !== k.value.options.length - 1 ? {
3325
3326
  name: "append",
@@ -3333,7 +3334,7 @@ const Ga = /* @__PURE__ */ be({
3333
3334
  } : void 0
3334
3335
  ]), 1032, ["model-value", "rules", "placeholder", "onUpdate:modelValue"])
3335
3336
  ])
3336
- ], 8, Lr)
3337
+ ], 8, Kr)
3337
3338
  ]),
3338
3339
  _: 1
3339
3340
  }, 8, ["model-value"])
@@ -3344,7 +3345,7 @@ const Ga = /* @__PURE__ */ be({
3344
3345
  ]),
3345
3346
  _: 1
3346
3347
  }, 8, ["title"]),
3347
- (u = k.value.usedBy) != null && u.length ? ($(), ae(Wo, {
3348
+ (u = k.value.usedBy) != null && u.length ? ($(), ae(Ho, {
3348
3349
  key: 0,
3349
3350
  editable: !1,
3350
3351
  overrides: k.value.usedBy || [],
@@ -3359,11 +3360,11 @@ const Ga = /* @__PURE__ */ be({
3359
3360
  };
3360
3361
  }
3361
3362
  });
3362
- function Yr() {
3363
+ function qr() {
3363
3364
  const i = fn();
3364
3365
  function l() {
3365
3366
  i.open({
3366
- component: jr,
3367
+ component: Yr,
3367
3368
  props: {
3368
3369
  initialValue: void 0
3369
3370
  }
@@ -3373,13 +3374,13 @@ function Yr() {
3373
3374
  createVariant: l
3374
3375
  };
3375
3376
  }
3376
- const qr = {
3377
+ const Wr = {
3377
3378
  key: 0,
3378
3379
  class: "flex flex-col space-y-16 h-[440px]"
3379
- }, Wr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Hr = { class: "flex justify-between pb-16" }, Xr = { class: "flex gap-8" }, Qr = {
3380
+ }, Hr = { class: "flex-1 flex-shrink space-y-8 min-h-0 overflow-y-scroll p-8" }, Xr = { class: "flex justify-between pb-16" }, Qr = { class: "flex gap-8" }, Jr = {
3380
3381
  key: 1,
3381
3382
  class: "flex flex-col items-center space-y-16"
3382
- }, Jr = { class: "flex flex-col items-center space-y-4 w-full" }, Zr = { class: "fm-typo-en-title-sm-600" }, el = { class: "text-fm-color-typo-secondary" }, tl = /* @__PURE__ */ be({
3383
+ }, Zr = { class: "flex flex-col items-center space-y-4 w-full" }, el = { class: "fm-typo-en-title-sm-600" }, tl = { class: "text-fm-color-typo-secondary" }, nl = /* @__PURE__ */ be({
3383
3384
  __name: "SelectVariantDialog",
3384
3385
  props: {
3385
3386
  selectedVariants: {}
@@ -3389,26 +3390,26 @@ const qr = {
3389
3390
  label: v.name,
3390
3391
  value: v._id,
3391
3392
  disabled: !1
3392
- }))), d = re(Ce(f.selectedVariants)), y = re(""), { createVariant: k } = Yr(), P = () => {
3393
+ }))), d = re(Ce(f.selectedVariants)), y = re(""), { createVariant: k } = qr(), P = () => {
3393
3394
  t(d.value), o("primary"), l.close();
3394
3395
  };
3395
3396
  return (v, n) => {
3396
- const I = Z("FmSearch"), T = Z("FmCheckbox"), Q = Z("FmButton");
3397
- return F.value.length > 0 ? ($(), ee("div", qr, [
3397
+ const T = Z("FmSearch"), w = Z("FmCheckbox"), Q = Z("FmButton");
3398
+ return F.value.length > 0 ? ($(), ee("div", Wr, [
3398
3399
  B("div", null, [
3399
- s(I, {
3400
+ s(T, {
3400
3401
  autofocus: "",
3401
3402
  modelValue: y.value,
3402
3403
  "onUpdate:modelValue": n[0] || (n[0] = (D) => y.value = D),
3403
3404
  placeholder: e(r)("menu.common.labels.search_variants")
3404
3405
  }, null, 8, ["modelValue", "placeholder"])
3405
3406
  ]),
3406
- B("div", Wr, [
3407
+ B("div", Hr, [
3407
3408
  B("div", null, [
3408
3409
  ($(!0), ee(we, null, De(F.value, (D) => ($(), ee("div", {
3409
3410
  key: D.value
3410
3411
  }, [
3411
- rt(s(T, {
3412
+ rt(s(w, {
3412
3413
  modelValue: d.value,
3413
3414
  "onUpdate:modelValue": [
3414
3415
  n[1] || (n[1] = (x) => d.value = x),
@@ -3422,7 +3423,7 @@ const qr = {
3422
3423
  ]))), 128))
3423
3424
  ])
3424
3425
  ]),
3425
- B("div", Hr, [
3426
+ B("div", Xr, [
3426
3427
  e(m).rules.item.variant ? ($(), ae(Q, {
3427
3428
  key: 0,
3428
3429
  label: e(r)("menu.common.actions.add_new_variant"),
@@ -3430,7 +3431,7 @@ const qr = {
3430
3431
  "text-color": "primary",
3431
3432
  onClick: n[3] || (n[3] = (D) => e(k)())
3432
3433
  }, null, 8, ["label"])) : ne("", !0),
3433
- B("div", Xr, [
3434
+ B("div", Qr, [
3434
3435
  s(Q, {
3435
3436
  label: e(r)("menu.common.actions.cancel"),
3436
3437
  variant: "tertiary",
@@ -3442,10 +3443,10 @@ const qr = {
3442
3443
  }, null, 8, ["label"])
3443
3444
  ])
3444
3445
  ])
3445
- ])) : ($(), ee("div", Qr, [
3446
- B("div", Jr, [
3447
- B("p", Zr, ve(e(r)("menu.common.empty.no_variant.title")), 1),
3448
- B("p", el, ve(e(r)("menu.common.empty.no_variant.subtitle")), 1)
3446
+ ])) : ($(), ee("div", Jr, [
3447
+ B("div", Zr, [
3448
+ B("p", el, ve(e(r)("menu.common.empty.no_variant.title")), 1),
3449
+ B("p", tl, ve(e(r)("menu.common.empty.no_variant.subtitle")), 1)
3449
3450
  ]),
3450
3451
  s(Q, {
3451
3452
  label: e(r)("menu.variant.add"),
@@ -3455,15 +3456,15 @@ const qr = {
3455
3456
  ]));
3456
3457
  };
3457
3458
  }
3458
- }), nl = {
3459
+ }), ol = {
3459
3460
  class: "space-y-16"
3460
- }, ol = {
3461
- class: "flex items-center space-x-8"
3462
3461
  }, al = {
3463
- class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
3462
+ class: "flex items-center space-x-8"
3464
3463
  }, rl = {
3464
+ class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white"
3465
+ }, ll = {
3465
3466
  class: "flex-1 fm-typo-en-body-lg-400"
3466
- }, ll = /* @__PURE__ */ be({
3467
+ }, il = /* @__PURE__ */ be({
3467
3468
  __name: "ProductVariants",
3468
3469
  props: {
3469
3470
  isOverride: {
@@ -3483,16 +3484,16 @@ const qr = {
3483
3484
  const t = i, o = vt(), m = _e(), r = co(), f = Ye(), F = Qe(), {
3484
3485
  t: d
3485
3486
  } = he(), y = S(() => m.rules.item), k = S(() => y.value.minPrice && !!t.form.minPrice), P = S(() => !m.state.currentCatalogId), v = S(() => m.variants.reduce((a, p) => (a[p._id] = p, a), {})), n = l;
3486
- function I(a) {
3487
+ function T(a) {
3487
3488
  const p = $e.clone(t.form);
3488
3489
  for (const {
3489
3490
  key: c,
3490
- value: w
3491
+ value: I
3491
3492
  } of a)
3492
- p[c] = w;
3493
+ p[c] = I;
3493
3494
  n("replace:form", p);
3494
3495
  }
3495
- function T(a) {
3496
+ function w(a) {
3496
3497
  var c;
3497
3498
  const p = D(a.combinationKey || "");
3498
3499
  return {
@@ -3500,8 +3501,8 @@ const qr = {
3500
3501
  price: p == null ? void 0 : p.price,
3501
3502
  inventoryBindings: (p == null ? void 0 : p.inventoryBindings) || t.form.inventoryBindings,
3502
3503
  takeawayUsed: (p == null ? void 0 : p.takeawayUsed) || t.form.takeawayUsed,
3503
- groups: (p == null ? void 0 : p.groups) || ((c = t.form.groups) == null ? void 0 : c.map((w) => ({
3504
- ...w,
3504
+ groups: (p == null ? void 0 : p.groups) || ((c = t.form.groups) == null ? void 0 : c.map((I) => ({
3505
+ ...I,
3505
3506
  groupKey: ""
3506
3507
  })))
3507
3508
  };
@@ -3510,12 +3511,12 @@ const qr = {
3510
3511
  var a;
3511
3512
  F.open({
3512
3513
  title: "Add variant",
3513
- contentComponent: tl,
3514
+ contentComponent: nl,
3514
3515
  contentComponentProps: {
3515
3516
  selectedVariants: ((a = t.form.variant) == null ? void 0 : a.variantGroupIds) ?? []
3516
3517
  }
3517
3518
  }).onPrimary(async (p) => {
3518
- U(p, T);
3519
+ U(p, w);
3519
3520
  });
3520
3521
  }
3521
3522
  function D(a) {
@@ -3529,18 +3530,18 @@ const qr = {
3529
3530
  var p;
3530
3531
  return (((p = t.form.variant) == null ? void 0 : p.variantCombinations) || []).map((c) => {
3531
3532
  var C, K;
3532
- const w = (K = (C = t.fallback) == null ? void 0 : C.variant) == null ? void 0 : K.variantCombinations.find(({
3533
+ const I = (K = (C = t.fallback) == null ? void 0 : C.variant) == null ? void 0 : K.variantCombinations.find(({
3533
3534
  combinationKey: z
3534
3535
  }) => z === c.combinationKey);
3535
3536
  return {
3536
3537
  ...c,
3537
3538
  fallback: {
3538
- ...w,
3539
+ ...I,
3539
3540
  _id: c._id,
3540
3541
  combinationKey: c.combinationKey,
3541
- price: P.value ? t.form.price ?? (w == null ? void 0 : w.price) : c.price ?? (w == null ? void 0 : w.price),
3542
+ price: P.value ? t.form.price ?? (I == null ? void 0 : I.price) : c.price ?? (I == null ? void 0 : I.price),
3542
3543
  priceTiers: t.form.priceTiers,
3543
- minPrice: t.form.minPrice ?? (w == null ? void 0 : w.minPrice)
3544
+ minPrice: t.form.minPrice ?? (I == null ? void 0 : I.minPrice)
3544
3545
  }
3545
3546
  };
3546
3547
  });
@@ -3548,7 +3549,7 @@ const qr = {
3548
3549
  function U(a, p = (c) => c) {
3549
3550
  var C;
3550
3551
  const c = a.filter((K) => !!K);
3551
- let w;
3552
+ let I;
3552
3553
  if (c.length) {
3553
3554
  const K = c.map((G) => m.variants.find((R) => R._id === G)), z = je.fullVariantCombination(K).map(({
3554
3555
  combinationKey: G
@@ -3567,7 +3568,7 @@ const qr = {
3567
3568
  });
3568
3569
  return;
3569
3570
  }
3570
- w = {
3571
+ I = {
3571
3572
  ...t.form,
3572
3573
  variant: {
3573
3574
  variantGroupIds: c,
@@ -3578,25 +3579,25 @@ const qr = {
3578
3579
  };
3579
3580
  } else {
3580
3581
  const K = (C = t.form.variant) == null ? void 0 : C.variantCombinations.map((G) => G.takeawayUsed), z = [...new Set(K)];
3581
- I([{
3582
+ T([{
3582
3583
  key: "variant",
3583
3584
  value: void 0
3584
3585
  }, {
3585
3586
  key: "takeawayUsed",
3586
3587
  value: z.length === 1 ? z[0] : null
3587
- }]), w = {
3588
+ }]), I = {
3588
3589
  ...t.form,
3589
3590
  variant: void 0,
3590
3591
  takeawayUsed: z.length === 1 ? z[0] : null
3591
3592
  };
3592
3593
  }
3593
- n("replace:form", r.initDynamicGroupItem(w));
3594
+ n("replace:form", r.initDynamicGroupItem(I));
3594
3595
  }
3595
3596
  async function O(a, p, c) {
3596
- const w = $e.clone(t.form);
3597
- w.variant.variantCombinations[a][p] = c, I([{
3597
+ const I = $e.clone(t.form);
3598
+ I.variant.variantCombinations[a][p] = c, T([{
3598
3599
  key: "variant",
3599
- value: w.variant
3600
+ value: I.variant
3600
3601
  }]);
3601
3602
  }
3602
3603
  const L = S(() => {
@@ -3641,10 +3642,10 @@ const qr = {
3641
3642
  enableSorting: !1,
3642
3643
  cell: (a) => {
3643
3644
  var C, K;
3644
- const p = a.getValue(), w = (C = a.row.original.fallback) == null ? void 0 : C.orderFrom;
3645
+ const p = a.getValue(), I = (C = a.row.original.fallback) == null ? void 0 : C.orderFrom;
3645
3646
  return Te(At, {
3646
3647
  modelValue: p ?? null,
3647
- fallback: t.form.orderFrom ?? w ?? ((K = t.fallback) == null ? void 0 : K.orderFrom),
3648
+ fallback: t.form.orderFrom ?? I ?? ((K = t.fallback) == null ? void 0 : K.orderFrom),
3648
3649
  disable: !y.value.orderFrom,
3649
3650
  required: y.value.orderFrom && y.value.orderFromActiveOnly,
3650
3651
  editActiveOnly: y.value.orderFromActiveOnly || !1,
@@ -3743,7 +3744,7 @@ const qr = {
3743
3744
  }) : !0;
3744
3745
  }
3745
3746
  return (a, p) => {
3746
- const c = Z("fm-button"), w = Z("fm-icon"), C = Z("FmFormGroup"), K = Z("fm-table");
3747
+ const c = Z("fm-button"), I = Z("fm-icon"), C = Z("FmFormGroup"), K = Z("fm-table");
3747
3748
  return $(), ae(Re, {
3748
3749
  id: e(Me).VARIANT,
3749
3750
  title: e(d)("menu.product.form.variant.title"),
@@ -3758,7 +3759,7 @@ const qr = {
3758
3759
  }, null, 8, ["label"])) : ne("", !0)]),
3759
3760
  default: X(() => {
3760
3761
  var z;
3761
- return [B("div", nl, [s(C, {
3762
+ return [B("div", ol, [s(C, {
3762
3763
  "model-value": (z = a.form.variant) == null ? void 0 : z.variantGroupIds,
3763
3764
  rules: [u]
3764
3765
  }, {
@@ -3776,11 +3777,11 @@ const qr = {
3776
3777
  element: R
3777
3778
  }) => {
3778
3779
  var le;
3779
- return [B("div", ol, [s(c, {
3780
+ return [B("div", al, [s(c, {
3780
3781
  variant: e(Pe).Tertiary,
3781
3782
  class: "handle",
3782
3783
  "prepend-icon": "drag_handle"
3783
- }, null, 8, ["variant"]), B("div", al, [B("p", rl, ve((le = v.value[R]) == null ? void 0 : le.name), 1), s(w, {
3784
+ }, null, 8, ["variant"]), B("div", rl, [B("p", ll, ve((le = v.value[R]) == null ? void 0 : le.name), 1), s(I, {
3784
3785
  class: "cursor-pointer",
3785
3786
  name: "close",
3786
3787
  onClick: Je((b) => {
@@ -3811,31 +3812,31 @@ const qr = {
3811
3812
  }, 8, ["id", "title", "sub-title"]);
3812
3813
  };
3813
3814
  }
3814
- }), il = {
3815
+ }), sl = {
3815
3816
  key: 0,
3816
3817
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3817
- }, sl = {
3818
+ }, ul = {
3818
3819
  key: 2,
3819
3820
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3820
- }, ul = {
3821
+ }, dl = {
3821
3822
  key: 3,
3822
3823
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3823
- }, dl = {
3824
+ }, cl = {
3824
3825
  key: 5,
3825
3826
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3826
- }, cl = {
3827
+ }, ml = {
3827
3828
  key: 6,
3828
3829
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3829
- }, ml = {
3830
+ }, pl = {
3830
3831
  key: 8,
3831
3832
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3832
- }, pl = {
3833
+ }, fl = {
3833
3834
  key: 10,
3834
3835
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3835
- }, fl = {
3836
+ }, gl = {
3836
3837
  key: 12,
3837
3838
  class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
3838
- }, gl = /* @__PURE__ */ be({
3839
+ }, vl = /* @__PURE__ */ be({
3839
3840
  __name: "ItemForm",
3840
3841
  props: {
3841
3842
  initialForm: {},
@@ -3870,12 +3871,12 @@ const qr = {
3870
3871
  ...je.generator.initMenuV4Item(),
3871
3872
  category: o.categoryId
3872
3873
  }
3873
- ), I = S(
3874
+ ), T = S(
3874
3875
  () => {
3875
3876
  var W;
3876
3877
  return bn(o.menu.modules.variant, (W = n.value.variant) == null ? void 0 : W.variantGroupIds);
3877
3878
  }
3878
- ), T = (W, H) => {
3879
+ ), w = (W, H) => {
3879
3880
  var se;
3880
3881
  $e.isEqual(((se = n.value) == null ? void 0 : se[W]) || {}, H) || (n.value = {
3881
3882
  ...Ce(n.value),
@@ -3960,7 +3961,7 @@ const qr = {
3960
3961
  } : void 0
3961
3962
  }, b());
3962
3963
  }
3963
- const w = re(
3964
+ const I = re(
3964
3965
  n.value.takeawayUsed != null || (((ue = n.value.variant) == null ? void 0 : ue.variantCombinations) || []).some((W) => W.takeawayUsed != null) || !1
3965
3966
  );
3966
3967
  function C(W) {
@@ -4065,7 +4066,7 @@ const qr = {
4065
4066
  });
4066
4067
  function g(W) {
4067
4068
  var H;
4068
- T("serveDelay", {
4069
+ w("serveDelay", {
4069
4070
  enabled: W,
4070
4071
  overriders: ((H = n.value.serveDelay) == null ? void 0 : H.overriders) ?? []
4071
4072
  });
@@ -4076,7 +4077,7 @@ const qr = {
4076
4077
  ...te,
4077
4078
  isDefault: W.isDefault ? !1 : te.isDefault
4078
4079
  })), me = se.findIndex((te) => te.id === W.id);
4079
- me >= 0 ? se[me] = { ...se[me], isDefault: W.isDefault } : se.push({ id: W.id, isDefault: W.isDefault }), T("serveDelay", {
4080
+ me >= 0 ? se[me] = { ...se[me], isDefault: W.isDefault } : se.push({ id: W.id, isDefault: W.isDefault }), w("serveDelay", {
4080
4081
  enabled: H,
4081
4082
  overriders: se
4082
4083
  });
@@ -4084,7 +4085,7 @@ const qr = {
4084
4085
  function N(W) {
4085
4086
  var Oe, nt;
4086
4087
  const H = ((Oe = n.value.serveDelay) == null ? void 0 : Oe.enabled) ?? !1, me = (((nt = n.value.serveDelay) == null ? void 0 : nt.overriders) ?? []).filter((Ae) => W.includes(Ae.id)), ie = new Set(me.map((Ae) => Ae.id)), te = W.filter((Ae) => !ie.has(Ae)).map((Ae) => ({ id: Ae }));
4087
- T("serveDelay", {
4088
+ w("serveDelay", {
4088
4089
  enabled: H,
4089
4090
  overriders: [...me, ...te]
4090
4091
  });
@@ -4124,19 +4125,19 @@ const qr = {
4124
4125
  default: X(() => {
4125
4126
  var te;
4126
4127
  return [
4127
- s(xa, {
4128
+ s(Sa, {
4128
4129
  fallback: v.value,
4129
4130
  form: n.value,
4130
4131
  "is-addon": V.value,
4131
4132
  "is-override": x.value,
4132
4133
  "is-create": !((te = o.initialForm) != null && te._id),
4133
- "onUpdate:form": T
4134
+ "onUpdate:form": w
4134
4135
  }, null, 8, ["fallback", "form", "is-addon", "is-override", "is-create"])
4135
4136
  ];
4136
4137
  }),
4137
4138
  _: 1
4138
4139
  }, 8, ["toggle", "disabled", "description", "title"]),
4139
- x.value ? ne("", !0) : ($(), ee("div", il)),
4140
+ x.value ? ne("", !0) : ($(), ee("div", sl)),
4140
4141
  U.value ? ($(), ae(Re, {
4141
4142
  key: 1,
4142
4143
  title: e(F)("menu.product.form.sections.tagging.title"),
@@ -4146,13 +4147,13 @@ const qr = {
4146
4147
  s(e(gn), {
4147
4148
  entity: "item",
4148
4149
  "model-value": n.value.customAttributes || {},
4149
- "onUpdate:modelValue": H[2] || (H[2] = (te) => T("customAttributes", te)),
4150
+ "onUpdate:modelValue": H[2] || (H[2] = (te) => w("customAttributes", te)),
4150
4151
  "value-options": Y.value
4151
4152
  }, null, 8, ["model-value", "value-options"])
4152
4153
  ]),
4153
4154
  _: 1
4154
4155
  }, 8, ["title", "sub-title"])) : ne("", !0),
4155
- U.value ? ($(), ee("div", sl)) : ne("", !0),
4156
+ U.value ? ($(), ee("div", ul)) : ne("", !0),
4156
4157
  s(qe, {
4157
4158
  toggle: M.value,
4158
4159
  "onUpdate:toggle": [
@@ -4164,17 +4165,17 @@ const qr = {
4164
4165
  title: e(F)("menu.product.form.sections.price.title")
4165
4166
  }, {
4166
4167
  default: X(() => [
4167
- s(Pr, {
4168
+ s(Dr, {
4168
4169
  fallback: v.value,
4169
4170
  form: n.value,
4170
4171
  "is-addon": V.value,
4171
4172
  "is-override": x.value,
4172
- "onUpdate:form": T
4173
+ "onUpdate:form": w
4173
4174
  }, null, 8, ["fallback", "form", "is-addon", "is-override"])
4174
4175
  ]),
4175
4176
  _: 1
4176
4177
  }, 8, ["toggle", "disabled", "description", "title"]),
4177
- P.value.print && !x.value ? ($(), ee("div", ul)) : ne("", !0),
4178
+ P.value.print && !x.value ? ($(), ee("div", dl)) : ne("", !0),
4178
4179
  P.value.print ? ($(), ae(qe, {
4179
4180
  key: 4,
4180
4181
  toggle: K.value,
@@ -4187,19 +4188,19 @@ const qr = {
4187
4188
  title: "Update print"
4188
4189
  }, {
4189
4190
  default: X(() => [
4190
- s(Rr, {
4191
+ s(Ar, {
4191
4192
  fallback: v.value,
4192
4193
  form: n.value,
4193
- "full-combinations": I.value,
4194
+ "full-combinations": T.value,
4194
4195
  "is-addon": V.value,
4195
4196
  "is-override": x.value,
4196
- "onUpdate:form": T,
4197
+ "onUpdate:form": w,
4197
4198
  "onReplace:form": H[5] || (H[5] = (te) => Q(te))
4198
4199
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4199
4200
  ]),
4200
4201
  _: 1
4201
4202
  }, 8, ["toggle"])) : ne("", !0),
4202
- x.value ? ne("", !0) : ($(), ee("div", dl)),
4203
+ x.value ? ne("", !0) : ($(), ee("div", cl)),
4203
4204
  s(qe, {
4204
4205
  toggle: u.value,
4205
4206
  "onUpdate:toggle": [
@@ -4211,19 +4212,19 @@ const qr = {
4211
4212
  title: e(F)("menu.product.form.sections.variant.title")
4212
4213
  }, {
4213
4214
  default: X(() => [
4214
- s(ll, {
4215
+ s(il, {
4215
4216
  fallback: v.value,
4216
4217
  form: n.value,
4217
- "full-combinations": I.value,
4218
+ "full-combinations": T.value,
4218
4219
  "is-addon": V.value,
4219
4220
  "is-override": x.value,
4220
- "onUpdate:form": T,
4221
+ "onUpdate:form": w,
4221
4222
  "onReplace:form": H[8] || (H[8] = (te) => Q(te))
4222
4223
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4223
4224
  ]),
4224
4225
  _: 1
4225
4226
  }, 8, ["toggle", "disabled", "description", "title"]),
4226
- P.value.group && !x.value ? ($(), ee("div", cl)) : ne("", !0),
4227
+ P.value.group && !x.value ? ($(), ee("div", ml)) : ne("", !0),
4227
4228
  P.value.group ? ($(), ae(qe, {
4228
4229
  key: 7,
4229
4230
  toggle: G.value,
@@ -4236,19 +4237,19 @@ const qr = {
4236
4237
  title: "Update group"
4237
4238
  }, {
4238
4239
  default: X(() => [
4239
- s(lr, {
4240
+ s(ir, {
4240
4241
  fallback: v.value,
4241
4242
  form: n.value,
4242
- "full-combinations": I.value,
4243
+ "full-combinations": T.value,
4243
4244
  "is-addon": V.value,
4244
4245
  "is-override": x.value,
4245
- "onUpdate:form": T,
4246
+ "onUpdate:form": w,
4246
4247
  "onReplace:form": H[11] || (H[11] = (te) => Q(te))
4247
4248
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4248
4249
  ]),
4249
4250
  _: 1
4250
4251
  }, 8, ["toggle", "disabled"])) : ne("", !0),
4251
- P.value.inventory && !x.value ? ($(), ee("div", ml)) : ne("", !0),
4252
+ P.value.inventory && !x.value ? ($(), ee("div", pl)) : ne("", !0),
4252
4253
  P.value.inventory ? ($(), ae(qe, {
4253
4254
  key: 9,
4254
4255
  toggle: p.value,
@@ -4261,24 +4262,24 @@ const qr = {
4261
4262
  title: e(F)("menu.product.form.sections.inventory.title")
4262
4263
  }, {
4263
4264
  default: X(() => [
4264
- s(ur, {
4265
+ s(dr, {
4265
4266
  fallback: v.value,
4266
4267
  form: n.value,
4267
- "full-combinations": I.value,
4268
+ "full-combinations": T.value,
4268
4269
  "is-addon": V.value,
4269
4270
  "is-override": x.value,
4270
- "onUpdate:form": T,
4271
+ "onUpdate:form": w,
4271
4272
  "onReplace:form": H[14] || (H[14] = (te) => Q(te))
4272
4273
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4273
4274
  ]),
4274
4275
  _: 1
4275
4276
  }, 8, ["toggle", "disabled", "description", "title"])) : ne("", !0),
4276
- P.value.takeaway(n.value.category ?? ((ie = v.value) == null ? void 0 : ie.category)) && !x.value ? ($(), ee("div", pl)) : ne("", !0),
4277
+ P.value.takeaway(n.value.category ?? ((ie = v.value) == null ? void 0 : ie.category)) && !x.value ? ($(), ee("div", fl)) : ne("", !0),
4277
4278
  P.value.takeaway(n.value.category ?? ((ye = v.value) == null ? void 0 : ye.category)) ? ($(), ae(qe, {
4278
4279
  key: 11,
4279
- toggle: w.value,
4280
+ toggle: I.value,
4280
4281
  "onUpdate:toggle": [
4281
- H[18] || (H[18] = (te) => w.value = te),
4282
+ H[18] || (H[18] = (te) => I.value = te),
4282
4283
  H[19] || (H[19] = (te) => C(te))
4283
4284
  ],
4284
4285
  disabled: !x.value,
@@ -4286,19 +4287,19 @@ const qr = {
4286
4287
  title: e(F)("menu.product.form.sections.takeaway.title")
4287
4288
  }, {
4288
4289
  default: X(() => [
4289
- s(Ar, {
4290
+ s(Nr, {
4290
4291
  fallback: v.value,
4291
4292
  form: n.value,
4292
- "full-combinations": I.value,
4293
+ "full-combinations": T.value,
4293
4294
  "is-addon": V.value,
4294
4295
  "is-override": x.value,
4295
- "onUpdate:form": T,
4296
+ "onUpdate:form": w,
4296
4297
  "onReplace:form": H[17] || (H[17] = (te) => Q(te))
4297
4298
  }, null, 8, ["fallback", "form", "full-combinations", "is-addon", "is-override"])
4298
4299
  ]),
4299
4300
  _: 1
4300
4301
  }, 8, ["toggle", "disabled", "description", "title"])) : ne("", !0),
4301
- P.value.serveDelay && !x.value ? ($(), ee("div", fl)) : ne("", !0),
4302
+ P.value.serveDelay && !x.value ? ($(), ee("div", gl)) : ne("", !0),
4302
4303
  P.value.serveDelay ? ($(), ae(po, {
4303
4304
  key: 13,
4304
4305
  form: n.value,
@@ -4313,7 +4314,7 @@ const qr = {
4313
4314
  };
4314
4315
  }
4315
4316
  });
4316
- function vl(i) {
4317
+ function bl(i) {
4317
4318
  const { storageKey: l, defaultWidth: t, minWidth: o, maxWidth: m } = i, r = vo(l, t), f = re(!1), F = re(null);
4318
4319
  function d(P) {
4319
4320
  P.preventDefault(), f.value = !0, document.addEventListener("mousemove", y), document.addEventListener("mouseup", k), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
@@ -4337,24 +4338,24 @@ function vl(i) {
4337
4338
  stopResize: k
4338
4339
  };
4339
4340
  }
4340
- const bl = {
4341
+ const yl = {
4341
4342
  class: "h-full relative bg-fm-color-neutral-gray-100",
4342
4343
  style: { width: "1px" }
4343
- }, yl = { class: "flex-1 pr-24" }, _l = {
4344
+ }, _l = { class: "flex-1 pr-24" }, hl = {
4344
4345
  key: 0,
4345
4346
  class: "absolute inset-0 flex items-center justify-center bg-white bg-opacity-70"
4346
- }, hl = "tree-editor-left-panel-width", kl = 300, Cl = 600, wl = 300, Il = /* @__PURE__ */ be({
4347
+ }, kl = "tree-editor-left-panel-width", Cl = 300, wl = 600, Il = 300, Tl = /* @__PURE__ */ be({
4347
4348
  __name: "TreeEditorLayout",
4348
4349
  setup(i) {
4349
4350
  const {
4350
4351
  panelWidth: l,
4351
4352
  containerRef: t,
4352
4353
  startResize: o
4353
- } = vl({
4354
- storageKey: hl,
4355
- defaultWidth: wl,
4356
- minWidth: kl,
4357
- maxWidth: Cl
4354
+ } = bl({
4355
+ storageKey: kl,
4356
+ defaultWidth: Il,
4357
+ minWidth: Cl,
4358
+ maxWidth: wl
4358
4359
  });
4359
4360
  return (m, r) => ($(), ee("div", {
4360
4361
  ref_key: "containerRef",
@@ -4367,24 +4368,24 @@ const bl = {
4367
4368
  }, [
4368
4369
  Be(m.$slots, "left-panel", {}, void 0, !0)
4369
4370
  ], 4),
4370
- B("div", bl, [
4371
+ B("div", yl, [
4371
4372
  B("div", {
4372
4373
  class: "absolute left-[-3px] right-[-3px] top-0 bottom-0 resize-handle z-10",
4373
4374
  onMousedown: r[0] || (r[0] = //@ts-ignore
4374
4375
  (...f) => e(o) && e(o)(...f))
4375
4376
  }, null, 32)
4376
4377
  ]),
4377
- B("div", yl, [
4378
+ B("div", _l, [
4378
4379
  Be(m.$slots, "right-panel", {}, void 0, !0)
4379
4380
  ]),
4380
- m.$slots.overlay ? ($(), ee("div", _l, [
4381
+ m.$slots.overlay ? ($(), ee("div", hl, [
4381
4382
  Be(m.$slots, "overlay", {}, void 0, !0)
4382
4383
  ])) : ne("", !0)
4383
4384
  ], 512));
4384
4385
  }
4385
- }), Tl = /* @__PURE__ */ it(Il, [["__scopeId", "data-v-570141b0"]]);
4386
+ }), xl = /* @__PURE__ */ it(Tl, [["__scopeId", "data-v-570141b0"]]);
4386
4387
  var Ee = /* @__PURE__ */ ((i) => (i.SELECT_CATEGORY = "SELECT_CATEGORY", i.CREATE_CATEGORY = "CREATE_CATEGORY", i.UPDATE_CATEGORY = "UPDATE_CATEGORY", i.DELETE_CATEGORY = "DELETE_CATEGORY", i.SELECT_ITEM = "SELECT_ITEM", i.CREATE_ITEM = "CREATE_ITEM", i.UPDATE_ITEM = "UPDATE_ITEM", i.DELETE_ITEM = "DELETE_ITEM", i.SELECT_PRICE = "SELECT_PRICE", i.SELECT_VARIANT = "SELECT_VARIANT", i.SELECT_GROUP = "SELECT_GROUP", i.EDIT_GROUP = "EDIT_GROUP", i))(Ee || {});
4387
- function xl(i, l, t) {
4388
+ function Sl(i, l, t) {
4388
4389
  const o = () => ({
4389
4390
  position: 0,
4390
4391
  subCategoryMeta: {}
@@ -4429,11 +4430,11 @@ function Tn() {
4429
4430
  async function r(F, d, y, k) {
4430
4431
  let P = pt(d);
4431
4432
  const v = /* @__PURE__ */ new Map(), n = pt(i.state.menu);
4432
- for (const T of n.modules.item)
4433
- v.set(T._id, T);
4434
- F.forEach((T, Q) => {
4435
- if (T.type === "item") {
4436
- const D = v.get(T.id);
4433
+ for (const w of n.modules.item)
4434
+ v.set(w._id, w);
4435
+ F.forEach((w, Q) => {
4436
+ if (w.type === "item") {
4437
+ const D = v.get(w.id);
4437
4438
  if (D) {
4438
4439
  let x = null;
4439
4440
  k && k._id !== d._id && (x = Mo(
@@ -4448,15 +4449,15 @@ function Tn() {
4448
4449
  );
4449
4450
  Object.assign(D, V);
4450
4451
  }
4451
- } else if (T.type === "subCategory")
4452
- P = xl(P, [...y, T.id], {
4452
+ } else if (w.type === "subCategory")
4453
+ P = Sl(P, [...y, w.id], {
4453
4454
  position: Q
4454
4455
  });
4455
4456
  else
4456
4457
  throw new Error("Invalid item type");
4457
4458
  });
4458
- const I = n.modules.category.find((T) => T._id === (d == null ? void 0 : d._id) || null);
4459
- I && (I.subCategoryMeta = P.subCategoryMeta), i.setMenu(n);
4459
+ const T = n.modules.category.find((w) => w._id === (d == null ? void 0 : d._id) || null);
4460
+ T && (T.subCategoryMeta = P.subCategoryMeta), i.setMenu(n);
4460
4461
  }
4461
4462
  async function f(F, d) {
4462
4463
  await i.updateMenu({
@@ -4476,39 +4477,39 @@ function Tn() {
4476
4477
  }
4477
4478
  var at = /* @__PURE__ */ ((i) => (i.CATEGORY = "category", i.ITEM = "item", i.SUB_CATEGORY = "subCategory", i))(at || {});
4478
4479
  const ot = /* @__PURE__ */ new Map(), dt = /* @__PURE__ */ new Map();
4479
- function Sl() {
4480
+ function El() {
4480
4481
  const { t: i } = he(), l = _e(), t = _t(), o = Tn(), m = S(
4481
- () => l.subcategories.reduce((n, I) => (n[I._id] = I, n), {})
4482
+ () => l.subcategories.reduce((n, T) => (n[T._id] = T, n), {})
4482
4483
  );
4483
4484
  function r(n) {
4484
- var I;
4485
- return ((I = m.value[n]) == null ? void 0 : I.name) || n;
4485
+ var T;
4486
+ return ((T = m.value[n]) == null ? void 0 : T.name) || n;
4486
4487
  }
4487
4488
  function f(n) {
4488
- function I(T) {
4489
- if (T.children && T.children.length > 0)
4490
- for (const Q of T.children)
4491
- Q.parent = T, I(Q);
4489
+ function T(w) {
4490
+ if (w.children && w.children.length > 0)
4491
+ for (const Q of w.children)
4492
+ Q.parent = w, T(Q);
4492
4493
  }
4493
- for (const T of n)
4494
- I(T);
4494
+ for (const w of n)
4495
+ T(w);
4495
4496
  return n;
4496
4497
  }
4497
4498
  function F(n) {
4498
- return n.map((I) => {
4499
+ return n.map((T) => {
4499
4500
  var Q, D, x;
4500
- const T = {
4501
- ...I,
4501
+ const w = {
4502
+ ...T,
4502
4503
  children: []
4503
4504
  };
4504
- for (const V of I.children ?? []) {
4505
+ for (const V of T.children ?? []) {
4505
4506
  if (((Q = V.meta) == null ? void 0 : Q.nodeType) !== "item")
4506
4507
  continue;
4507
4508
  const U = ot.get((D = V.meta) == null ? void 0 : D.rawId);
4508
4509
  if (!(U != null && U.subCategories) || !U.subCategories.length)
4509
- (x = T.children) == null || x.push(V);
4510
+ (x = w.children) == null || x.push(V);
4510
4511
  else {
4511
- let O = T.children, L = "";
4512
+ let O = w.children, L = "";
4512
4513
  for (const Y of U.subCategories || []) {
4513
4514
  L += Y;
4514
4515
  const M = O.find(
@@ -4521,7 +4522,7 @@ function Sl() {
4521
4522
  M.children = M.children || [], O = M.children;
4522
4523
  else {
4523
4524
  const _ = {
4524
- id: `category-${I.label}-sub-category-${L}`,
4525
+ id: `category-${T.label}-sub-category-${L}`,
4525
4526
  label: r(Y),
4526
4527
  icon: Le.CATEGORY,
4527
4528
  children: [],
@@ -4537,22 +4538,22 @@ function Sl() {
4537
4538
  O.push(V);
4538
4539
  }
4539
4540
  }
4540
- return T;
4541
+ return w;
4541
4542
  });
4542
4543
  }
4543
4544
  function d(n) {
4544
- var I;
4545
- if (((I = n.meta) == null ? void 0 : I.nodeType) !== "subCategory")
4545
+ var T;
4546
+ if (((T = n.meta) == null ? void 0 : T.nodeType) !== "subCategory")
4546
4547
  throw new Error("Node is not a sub category");
4547
4548
  return 0;
4548
4549
  }
4549
4550
  function y(n) {
4550
- var T;
4551
- let I = n;
4552
- for (; I; ) {
4553
- if (((T = I.meta) == null ? void 0 : T.nodeType) === "category")
4554
- return I;
4555
- I = I.parent;
4551
+ var w;
4552
+ let T = n;
4553
+ for (; T; ) {
4554
+ if (((w = T.meta) == null ? void 0 : w.nodeType) === "category")
4555
+ return T;
4556
+ T = T.parent;
4556
4557
  }
4557
4558
  throw new Error("No parent category node found");
4558
4559
  }
@@ -4560,7 +4561,7 @@ function Sl() {
4560
4561
  var Q, D, x, V;
4561
4562
  if (!n.children)
4562
4563
  return n;
4563
- const I = ((D = (Q = y(n)) == null ? void 0 : Q.meta) == null ? void 0 : D.rawId) ?? null, T = Ro(I);
4564
+ const T = ((D = (Q = y(n)) == null ? void 0 : Q.meta) == null ? void 0 : D.rawId) ?? null, w = Ro(T);
4564
4565
  return ((x = n.meta) == null ? void 0 : x.nodeType) === "category" || ((V = n.meta) == null ? void 0 : V.nodeType) === "subCategory" ? (n.children = kt(
4565
4566
  n.children,
4566
4567
  (U) => U.label,
@@ -4569,7 +4570,7 @@ function Sl() {
4569
4570
  if (((O = U.meta) == null ? void 0 : O.nodeType) === "subCategory")
4570
4571
  return d(U);
4571
4572
  if (((L = U.meta) == null ? void 0 : L.nodeType) === "item")
4572
- return T(U.meta.rawObject);
4573
+ return w(U.meta.rawObject);
4573
4574
  throw new Error("Should not have other node type in category");
4574
4575
  }
4575
4576
  ), { ...n, children: n.children.map(k) }) : n;
@@ -4579,9 +4580,9 @@ function Sl() {
4579
4580
  }
4580
4581
  async function v({ eventEmitter: n }) {
4581
4582
  var z, G, R, le;
4582
- const I = l.state.menu, T = !l.state.currentCatalogId, Q = !l.state.currentSchedulerId, D = (((G = (z = l.currentCatalog) == null ? void 0 : z.linkItemRules) == null ? void 0 : G.length) ?? 0) > 0, x = Ho(), V = l.mergedMenu;
4583
+ const T = l.state.menu, w = !l.state.currentCatalogId, Q = !l.state.currentSchedulerId, D = (((G = (z = l.currentCatalog) == null ? void 0 : z.linkItemRules) == null ? void 0 : G.length) ?? 0) > 0, x = Xo(), V = l.mergedMenu;
4583
4584
  ot.clear(), dt.clear();
4584
- for (const b of I.modules.item)
4585
+ for (const b of T.modules.item)
4585
4586
  ot.set(b._id, b);
4586
4587
  for (const b of V.modules.group)
4587
4588
  dt.set(b._id, b);
@@ -4720,7 +4721,7 @@ function Sl() {
4720
4721
  }
4721
4722
  if (pe) {
4722
4723
  const E = (h, N) => `item-${h}-variant-${N}`, q = bn(
4723
- I.modules.variant,
4724
+ T.modules.variant,
4724
4725
  b.variant.variantGroupIds
4725
4726
  ), g = b.variant.variantCombinations.map(
4726
4727
  (h) => {
@@ -4731,11 +4732,11 @@ function Sl() {
4731
4732
  id: E(b._id, h.combinationKey),
4732
4733
  icon: Le.VARIANT,
4733
4734
  label: tn(
4734
- la(q, h.combinationKey),
4735
+ ia(q, h.combinationKey),
4735
4736
  h.code
4736
4737
  ),
4737
4738
  children: Y(b, h),
4738
- rightLabel: Zo(b, h),
4739
+ rightLabel: ea(b, h),
4739
4740
  chips: J,
4740
4741
  onClick: () => {
4741
4742
  n({
@@ -4772,7 +4773,7 @@ function Sl() {
4772
4773
  onClick: () => {
4773
4774
  t.deleteCategory(b);
4774
4775
  }
4775
- }), !T && Q && !D && j.push({
4776
+ }), !w && Q && !D && j.push({
4776
4777
  id: `apply-to-catalog-${b._id}`,
4777
4778
  icon: "add_link",
4778
4779
  showOnHover: !0,
@@ -4824,7 +4825,7 @@ function Sl() {
4824
4825
  x.addProduct(b.map((j) => j._id));
4825
4826
  }
4826
4827
  }), u.push(c));
4827
- const w = (b, j) => `item-${j ?? "addon"}-${b}`;
4828
+ const I = (b, j) => `item-${j ?? "addon"}-${b}`;
4828
4829
  for (const b of V.modules.item) {
4829
4830
  const j = ot.get(b._id);
4830
4831
  Zt(b).forEach(({ _id: pe }) => {
@@ -4852,7 +4853,7 @@ function Sl() {
4852
4853
  const me = (oe = l.currentCatalog) == null ? void 0 : oe.override.items, ie = (ue = me == null ? void 0 : me[b._id]) == null ? void 0 : ue.find(
4853
4854
  (Oe) => !Oe.combinationKey
4854
4855
  ), ye = (ie == null ? void 0 : ie.orderFrom) === ct.enum.NONE;
4855
- !T && Q && !D && (ye ? se.push({
4856
+ !w && Q && !D && (ye ? se.push({
4856
4857
  id: `apply-to-catalog-${b._id}`,
4857
4858
  icon: "add_link",
4858
4859
  showOnHover: !0,
@@ -4871,7 +4872,7 @@ function Sl() {
4871
4872
  }));
4872
4873
  const te = b.code ? `${b.code}, ${b.name}` : b.name;
4873
4874
  A.children.push({
4874
- id: w(b._id, pe),
4875
+ id: I(b._id, pe),
4875
4876
  disabled: ye,
4876
4877
  draggable: l.rules.item.sort,
4877
4878
  meta: {
@@ -4923,7 +4924,7 @@ function Sl() {
4923
4924
  generateTreeFromMenu: v
4924
4925
  };
4925
4926
  }
4926
- function El() {
4927
+ function Fl() {
4927
4928
  const i = Ye(), l = Tn(), t = _t(), o = yt();
4928
4929
  function m(M) {
4929
4930
  i.open({
@@ -4988,7 +4989,7 @@ function El() {
4988
4989
  f(u) ? _.push(u) : _ = _.concat(n(u));
4989
4990
  return _;
4990
4991
  }
4991
- function I(M) {
4992
+ function T(M) {
4992
4993
  let _ = M;
4993
4994
  for (; _; ) {
4994
4995
  if (r(_))
@@ -4997,24 +4998,24 @@ function El() {
4997
4998
  }
4998
4999
  return null;
4999
5000
  }
5000
- function T(M, _, u, a, p) {
5001
+ function w(M, _, u, a, p) {
5001
5002
  if (f(_)) {
5002
- const c = I(M), w = I(_);
5003
- return (c == null ? void 0 : c.id) === (w == null ? void 0 : w.id) ? !0 : !((c == null ? void 0 : c.id) !== (w == null ? void 0 : w.id) && n(w).some(
5003
+ const c = T(M), I = T(_);
5004
+ return (c == null ? void 0 : c.id) === (I == null ? void 0 : I.id) ? !0 : !((c == null ? void 0 : c.id) !== (I == null ? void 0 : I.id) && n(I).some(
5004
5005
  (C) => {
5005
5006
  var K, z;
5006
5007
  return ((K = C.meta) == null ? void 0 : K.rawId) === ((z = M.meta) == null ? void 0 : z.rawId);
5007
5008
  }
5008
5009
  ));
5009
5010
  }
5010
- return r(_) && a && _.id !== a.id && u === "inside" ? !n(_).some((w) => {
5011
+ return r(_) && a && _.id !== a.id && u === "inside" ? !n(_).some((I) => {
5011
5012
  var C, K;
5012
- return ((C = w.meta) == null ? void 0 : C.rawId) === ((K = M.meta) == null ? void 0 : K.rawId);
5013
+ return ((C = I.meta) == null ? void 0 : C.rawId) === ((K = M.meta) == null ? void 0 : K.rawId);
5013
5014
  }) : !!(f(_) && (p == null ? void 0 : p.id) !== (a == null ? void 0 : a.id) || F(_));
5014
5015
  }
5015
5016
  const Q = (M, _, u) => {
5016
- const a = o.getNodeById(M), p = o.getNodeById(_), c = a == null ? void 0 : a.parent, w = p == null ? void 0 : p.parent;
5017
- return !a || !p ? !1 : r(a) ? P(a, p) : F(a) ? v(a, p, u, c, w) : f(a) ? T(a, p, u, c, w) : !1;
5017
+ const a = o.getNodeById(M), p = o.getNodeById(_), c = a == null ? void 0 : a.parent, I = p == null ? void 0 : p.parent;
5018
+ return !a || !p ? !1 : r(a) ? P(a, p) : F(a) ? v(a, p, u, c, I) : f(a) ? w(a, p, u, c, I) : !1;
5018
5019
  };
5019
5020
  async function D(M, _, u) {
5020
5021
  if (!P(M, _)) {
@@ -5024,10 +5025,10 @@ function El() {
5024
5025
  const a = o.treeNodes, p = a.findIndex((K) => K.id === M.id);
5025
5026
  let c = a.findIndex((K) => K.id === _.id);
5026
5027
  u === "after" && c++;
5027
- const w = a.map((K) => {
5028
+ const I = a.map((K) => {
5028
5029
  var z;
5029
5030
  return (z = K.meta) == null ? void 0 : z.rawId;
5030
- }).filter(Boolean), C = Tt(w, p, c);
5031
+ }).filter(Boolean), C = Tt(I, p, c);
5031
5032
  await t.rearrange(C);
5032
5033
  }
5033
5034
  function x(M, _) {
@@ -5054,8 +5055,8 @@ function El() {
5054
5055
  var K;
5055
5056
  const p = k(_), c = ((K = _.children) == null ? void 0 : K.findIndex((z) => z.id === M.id)) ?? -1;
5056
5057
  if (c === -1) throw new Error("Source index not found");
5057
- const w = Tt(p, c, u), C = y(_);
5058
- await l.rearrangeWithSubCategory(w, a, C);
5058
+ const I = Tt(p, c, u), C = y(_);
5059
+ await l.rearrangeWithSubCategory(I, a, C);
5059
5060
  }
5060
5061
  async function U(M, _, u, a) {
5061
5062
  var K;
@@ -5067,10 +5068,10 @@ function El() {
5067
5068
  const c = y(_);
5068
5069
  if (((K = M.meta) == null ? void 0 : K.nodeType) !== at.ITEM)
5069
5070
  throw new Error("Expected dragged node to be an item");
5070
- const w = pt(M.meta.rawObject);
5071
- w.category = a._id, w.subCategories = c;
5071
+ const I = pt(M.meta.rawObject);
5072
+ I.category = a._id, I.subCategories = c;
5072
5073
  const C = d(M);
5073
- await l.updateItem(w._id, w), await l.rearrangeWithSubCategory(
5074
+ await l.updateItem(I._id, I), await l.rearrangeWithSubCategory(
5074
5075
  p,
5075
5076
  a,
5076
5077
  c,
@@ -5080,11 +5081,11 @@ function El() {
5080
5081
  async function O(M, _, u) {
5081
5082
  var a;
5082
5083
  try {
5083
- if (!T(M, _, u, M.parent, _.parent)) {
5084
+ if (!w(M, _, u, M.parent, _.parent)) {
5084
5085
  m("Cannot drop item here");
5085
5086
  return;
5086
5087
  }
5087
- const p = x(_, u), c = d(_), w = M.meta;
5088
+ const p = x(_, u), c = d(_), I = M.meta;
5088
5089
  ((a = M.parent) == null ? void 0 : a.id) === p.parent.id ? await V(
5089
5090
  M,
5090
5091
  p.parent,
@@ -5115,11 +5116,11 @@ function El() {
5115
5116
  if (!a || !a.children)
5116
5117
  throw new Error("Parent node not found or has no children");
5117
5118
  const p = k(a), c = a.children.findIndex((G) => G.id === M.id);
5118
- let w = a.children.findIndex((G) => G.id === _.id);
5119
- if (c === -1 || w === -1)
5119
+ let I = a.children.findIndex((G) => G.id === _.id);
5120
+ if (c === -1 || I === -1)
5120
5121
  throw new Error("Source or target index not found");
5121
- u === "after" && w++;
5122
- const C = Tt(p, c, w), K = d(a), z = y(a);
5122
+ u === "after" && I++;
5123
+ const C = Tt(p, c, I), K = d(a), z = y(a);
5123
5124
  await l.rearrangeWithSubCategory(C, K, z);
5124
5125
  }
5125
5126
  async function Y(M) {
@@ -5190,14 +5191,14 @@ const Mt = /* @__PURE__ */ be({
5190
5191
  };
5191
5192
  }
5192
5193
  }), xn = 300;
5193
- function Fl(i) {
5194
+ function Vl(i) {
5194
5195
  const { itemHeight: l, emit: t, getFlattenedItems: o, getContainerRef: m, canDropFn: r } = i, f = re(!1), F = re(null), d = re(null), y = re(null), k = re(0), P = re({ x: 0, y: 0 }), v = re(/* @__PURE__ */ new Map());
5195
5196
  function n(D, x) {
5196
- x.button === 0 && (P.value = { x: x.clientX, y: x.clientY }, F.value = D, k.value = x.clientY, v.value = aa(o()), setTimeout(() => {
5197
- F.value === D && (f.value = !0, P.value = { x: x.clientX, y: x.clientY }, t("updateDragState", D, null, null), document.addEventListener("mousemove", I), document.addEventListener("mouseup", T));
5197
+ x.button === 0 && (P.value = { x: x.clientX, y: x.clientY }, F.value = D, k.value = x.clientY, v.value = ra(o()), setTimeout(() => {
5198
+ F.value === D && (f.value = !0, P.value = { x: x.clientX, y: x.clientY }, t("updateDragState", D, null, null), document.addEventListener("mousemove", T), document.addEventListener("mouseup", w));
5198
5199
  }, xn));
5199
5200
  }
5200
- function I(D) {
5201
+ function T(D) {
5201
5202
  var M;
5202
5203
  if (!f.value || !F.value) return;
5203
5204
  requestAnimationFrame(() => {
@@ -5227,15 +5228,15 @@ function Fl(i) {
5227
5228
  const Y = 50;
5228
5229
  D.clientY - V.top < Y ? x.scrollTop -= 10 : V.bottom - D.clientY < Y && (x.scrollTop += 10);
5229
5230
  }
5230
- function T() {
5231
- document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", T), f.value && F.value && d.value && y.value && t("nodeDragDrop", {
5231
+ function w() {
5232
+ document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", w), f.value && F.value && d.value && y.value && t("nodeDragDrop", {
5232
5233
  draggedNodeId: F.value,
5233
5234
  targetNodeId: d.value,
5234
5235
  dragPosition: y.value
5235
5236
  }), f.value = !1, t("updateDragState", null, null, null), F.value = null, d.value = null, y.value = null, v.value.clear();
5236
5237
  }
5237
5238
  function Q() {
5238
- document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", T), f.value = !1, t("updateDragState", null, null, null), F.value = null, d.value = null, y.value = null, v.value.clear();
5239
+ document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", w), f.value = !1, t("updateDragState", null, null, null), F.value = null, d.value = null, y.value = null, v.value.clear();
5239
5240
  }
5240
5241
  return {
5241
5242
  isDragging: f,
@@ -5247,7 +5248,7 @@ function Fl(i) {
5247
5248
  cancelDrag: Q
5248
5249
  };
5249
5250
  }
5250
- function Vl(i, l) {
5251
+ function $l(i, l) {
5251
5252
  let t = null;
5252
5253
  const o = typeof l == "function" ? l : () => l.value;
5253
5254
  function m(F) {
@@ -5267,7 +5268,7 @@ function Vl(i, l) {
5267
5268
  onMouseUp: f
5268
5269
  };
5269
5270
  }
5270
- const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5271
+ const Pl = { key: 0 }, Dl = ["innerHTML"], Ol = /* @__PURE__ */ be({
5271
5272
  __name: "HighlightableSpan",
5272
5273
  props: {
5273
5274
  text: {},
@@ -5280,35 +5281,35 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5280
5281
  const o = l.highlightedStrings.map((r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), m = new RegExp(`(${o})`, "gi");
5281
5282
  return l.text.replace(m, '<span class="highlighted-span">$1</span>');
5282
5283
  });
5283
- return (o, m) => !o.highlightedStrings || o.highlightedStrings.length === 0 ? ($(), ee("span", $l, ve(o.text), 1)) : ($(), ee("span", {
5284
+ return (o, m) => !o.highlightedStrings || o.highlightedStrings.length === 0 ? ($(), ee("span", Pl, ve(o.text), 1)) : ($(), ee("span", {
5284
5285
  key: 1,
5285
5286
  innerHTML: t.value
5286
- }, null, 8, Pl));
5287
+ }, null, 8, Dl));
5287
5288
  }
5288
- }), xt = /* @__PURE__ */ it(Dl, [["__scopeId", "data-v-f6f1080b"]]), Ol = {
5289
+ }), xt = /* @__PURE__ */ it(Ol, [["__scopeId", "data-v-f6f1080b"]]), Ml = {
5289
5290
  class: "flex-1 min-w-0 flex items-center gap-4 relative pl-12"
5290
- }, Ml = {
5291
- class: "flex items-center gap-4 min-w-0"
5292
5291
  }, Ul = {
5293
- class: "min-w-0 flex-1"
5292
+ class: "flex items-center gap-4 min-w-0"
5294
5293
  }, Rl = {
5295
- class: "py-4 px-8 space-y-12 fm-typo-en-body-md-400"
5294
+ class: "min-w-0 flex-1"
5296
5295
  }, Al = {
5297
- class: "flex-shrink-0 flex items-center gap-4"
5296
+ class: "py-4 px-8 space-y-12 fm-typo-en-body-md-400"
5298
5297
  }, Nl = {
5299
- class: "right-area flex items-center gap-4"
5298
+ class: "flex-shrink-0 flex items-center gap-4"
5300
5299
  }, Gl = {
5301
- class: "flex flex-nowrap items-center show-on-hover"
5300
+ class: "right-area flex items-center gap-4"
5302
5301
  }, Ll = {
5302
+ class: "flex flex-nowrap items-center show-on-hover"
5303
+ }, Kl = {
5303
5304
  key: 0,
5304
5305
  class: "drop-indicator-before"
5305
- }, Kl = {
5306
+ }, Bl = {
5306
5307
  key: 1,
5307
5308
  class: "drop-indicator-after"
5308
- }, Bl = {
5309
+ }, zl = {
5309
5310
  key: 2,
5310
5311
  class: "drop-indicator-inside"
5311
- }, zl = /* @__PURE__ */ be({
5312
+ }, jl = /* @__PURE__ */ be({
5312
5313
  __name: "FmTreeNode",
5313
5314
  props: {
5314
5315
  node: {},
@@ -5344,7 +5345,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5344
5345
  onMouseDown: y,
5345
5346
  onMouseMove: k,
5346
5347
  onMouseUp: P
5347
- } = Vl((v) => {
5348
+ } = $l((v) => {
5348
5349
  var n;
5349
5350
  (n = t.node) != null && n.draggable && d("dragStart", v);
5350
5351
  }, () => {
@@ -5353,7 +5354,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5353
5354
  });
5354
5355
  return (v, n) => {
5355
5356
  var Q, D, x;
5356
- const I = Z("FmIcon"), T = Z("FmTooltip");
5357
+ const T = Z("FmIcon"), w = Z("FmTooltip");
5357
5358
  return $(), ee("div", {
5358
5359
  class: Fe(["tree-node", "max-w-full", "py-4 px-8 flex items-center justify-between gap-4", "fm-corner-radius-sm", "select-none", m.value, r.value, f.value, {
5359
5360
  "opacity-50": v.dragging
@@ -5370,7 +5371,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5370
5371
  (...V) => e(P) && e(P)(...V)),
5371
5372
  onMouseleave: n[6] || (n[6] = //@ts-ignore
5372
5373
  (...V) => e(P) && e(P)(...V))
5373
- }, [B("div", Ol, [B("div", Ml, [(Q = v.node) != null && Q.draggable && !v.node.disabled ? ($(), ae(I, {
5374
+ }, [B("div", Ml, [B("div", Ul, [(Q = v.node) != null && Q.draggable && !v.node.disabled ? ($(), ae(T, {
5374
5375
  key: 0,
5375
5376
  name: "drag_indicator",
5376
5377
  size: "sm",
@@ -5382,19 +5383,19 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5382
5383
  onClick: n[0] || (n[0] = Je(() => {
5383
5384
  v.node.disabled || d("toggleExpand");
5384
5385
  }, ["stop"]))
5385
- }, null, 8, ["name", "visible"]), v.node.icon ? ($(), ae(I, {
5386
+ }, null, 8, ["name", "visible"]), v.node.icon ? ($(), ae(T, {
5386
5387
  key: 1,
5387
5388
  size: "sm",
5388
5389
  outline: "",
5389
5390
  name: v.node.icon,
5390
5391
  class: "text-fm-color-neutral-gray-400 flex-shrink-0"
5391
- }, null, 8, ["name"])) : ne("", !0), B("div", Ul, [s(T, {
5392
+ }, null, 8, ["name"])) : ne("", !0), B("div", Rl, [s(w, {
5392
5393
  content: v.node.label,
5393
5394
  variant: "rich",
5394
5395
  placement: "top",
5395
5396
  "z-index": 50
5396
5397
  }, {
5397
- content: X(() => [B("div", Rl, [s(xt, {
5398
+ content: X(() => [B("div", Al, [s(xt, {
5398
5399
  class: Fe(`${F.value} block`),
5399
5400
  text: v.node.label,
5400
5401
  highlightedStrings: v.highlightedStrings
@@ -5405,13 +5406,13 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5405
5406
  highlightedStrings: v.highlightedStrings
5406
5407
  }, null, 8, ["class", "text", "highlightedStrings"])]),
5407
5408
  _: 1
5408
- }, 8, ["content"])])]), B("div", Al, [($(!0), ee(we, null, De(v.node.chips, (V) => ($(), ae(Qo, {
5409
+ }, 8, ["content"])])]), B("div", Nl, [($(!0), ee(we, null, De(v.node.chips, (V) => ($(), ae(Jo, {
5409
5410
  key: V.label,
5410
5411
  size: V.size || "xs",
5411
5412
  label: V.label,
5412
5413
  variant: V.variant || "neutral",
5413
5414
  border: V.border
5414
- }, null, 8, ["size", "label", "variant", "border"]))), 128))])]), B("div", Nl, [B("div", Gl, [($(!0), ee(we, null, De(v.node.actions, (V) => ($(), ae(Ut, {
5415
+ }, null, 8, ["size", "label", "variant", "border"]))), 128))])]), B("div", Gl, [B("div", Ll, [($(!0), ee(we, null, De(v.node.actions, (V) => ($(), ae(Ut, {
5415
5416
  key: V.id,
5416
5417
  name: V.icon,
5417
5418
  tooltip: V.tooltip,
@@ -5428,15 +5429,15 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5428
5429
  var U, O;
5429
5430
  return (O = (U = v.node.rightLabel) == null ? void 0 : U.onClick) == null ? void 0 : O.call(U);
5430
5431
  }, ["stop"]))
5431
- }, null, 8, ["class", "text", "highlightedStrings"])]), v.dropTarget && v.dropPosition === "before" ? ($(), ee("div", Ll)) : ne("", !0), v.dropTarget && v.dropPosition === "after" ? ($(), ee("div", Kl)) : ne("", !0), v.dropTarget && v.dropPosition === "inside" ? ($(), ee("div", Bl)) : ne("", !0)], 34);
5432
+ }, null, 8, ["class", "text", "highlightedStrings"])]), v.dropTarget && v.dropPosition === "before" ? ($(), ee("div", Kl)) : ne("", !0), v.dropTarget && v.dropPosition === "after" ? ($(), ee("div", Bl)) : ne("", !0), v.dropTarget && v.dropPosition === "inside" ? ($(), ee("div", zl)) : ne("", !0)], 34);
5432
5433
  };
5433
5434
  }
5434
- }), jl = ["id"], Yl = {
5435
+ }), Yl = ["id"], ql = {
5435
5436
  class: "flex items-center gap-4 min-w-fit px-8"
5436
- }, ql = {
5437
+ }, Wl = {
5437
5438
  key: 1,
5438
5439
  class: "empty-tree-message"
5439
- }, St = 32, Wl = /* @__PURE__ */ be({
5440
+ }, St = 32, Hl = /* @__PURE__ */ be({
5440
5441
  __name: "FmTree",
5441
5442
  props: {
5442
5443
  nodes: {},
@@ -5488,19 +5489,19 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5488
5489
  function n() {
5489
5490
  k(0);
5490
5491
  }
5491
- function I(L) {
5492
+ function T(L) {
5492
5493
  const Y = d.value.findIndex((M) => M.id === L);
5493
5494
  Y !== -1 && k(Y);
5494
5495
  }
5495
5496
  const {
5496
- isDragging: T,
5497
+ isDragging: w,
5497
5498
  draggedNodeId: Q,
5498
5499
  dropTargetNodeId: D,
5499
5500
  dropPosition: x,
5500
5501
  mousePosition: V,
5501
5502
  onDragStart: U,
5502
5503
  cancelDrag: O
5503
- } = Fl({
5504
+ } = Vl({
5504
5505
  itemHeight: St,
5505
5506
  emit: (L, ...Y) => {
5506
5507
  L === "updateDragState" ? r("updateDragState", ...Y) : L === "nodeDragDrop" && r("nodeDragDrop", Y[0]);
@@ -5511,7 +5512,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5511
5512
  });
5512
5513
  return l({
5513
5514
  scrollToTop: n,
5514
- scrollToNode: I,
5515
+ scrollToNode: T,
5515
5516
  cancelDrag: O
5516
5517
  }), (L, Y) => {
5517
5518
  var _;
@@ -5532,14 +5533,14 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5532
5533
  "being-dragged": e(Q) === u.id
5533
5534
  }]),
5534
5535
  id: `tree-node-${u.id}`
5535
- }, [($(), ae(zl, {
5536
+ }, [($(), ae(jl, {
5536
5537
  key: u.id,
5537
5538
  node: u.node,
5538
5539
  selected: m.selectedNodeId === u.id,
5539
5540
  expandable: !!((a = u.node.children) != null && a.length && u.node.children.length > 0),
5540
5541
  expanded: F.value.has(u.id),
5541
5542
  highlightedStrings: u.node.highlightedStrings,
5542
- dragging: e(T) && e(Q) === u.id,
5543
+ dragging: e(w) && e(Q) === u.id,
5543
5544
  dropTarget: e(D) === u.id,
5544
5545
  dropPosition: e(D) === u.id ? e(x) : null,
5545
5546
  onToggleExpand: (p) => f(u.id),
@@ -5547,8 +5548,8 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5547
5548
  style: mt({
5548
5549
  paddingLeft: `${u.level * 20}px`
5549
5550
  })
5550
- }, null, 8, ["node", "selected", "expandable", "expanded", "highlightedStrings", "dragging", "dropTarget", "dropPosition", "onToggleExpand", "onDragStart", "style"]))], 10, jl);
5551
- }), 128))], 16), e(T) && e(Q) ? ($(), ee("div", {
5551
+ }, null, 8, ["node", "selected", "expandable", "expanded", "highlightedStrings", "dragging", "dropTarget", "dropPosition", "onToggleExpand", "onDragStart", "style"]))], 10, Yl);
5552
+ }), 128))], 16), e(w) && e(Q) ? ($(), ee("div", {
5552
5553
  key: 0,
5553
5554
  class: "drag-overlay",
5554
5555
  style: mt({
@@ -5557,12 +5558,12 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5557
5558
  transform: "translate3d(0,0,0)"
5558
5559
  // Force hardware acceleration
5559
5560
  })
5560
- }, [B("div", Yl, [s(M, {
5561
+ }, [B("div", ql, [s(M, {
5561
5562
  name: "drag_indicator"
5562
- }), B("span", null, ve((_ = d.value.find((u) => u.id === e(Q))) == null ? void 0 : _.node.label), 1)])], 4)) : ne("", !0), d.value.length === 0 ? ($(), ee("div", ql, ve(e(o)("menu.tree_editor.labels.no_items")), 1)) : ne("", !0)], 16);
5563
+ }), B("span", null, ve((_ = d.value.find((u) => u.id === e(Q))) == null ? void 0 : _.node.label), 1)])], 4)) : ne("", !0), d.value.length === 0 ? ($(), ee("div", Wl, ve(e(o)("menu.tree_editor.labels.no_items")), 1)) : ne("", !0)], 16);
5563
5564
  };
5564
5565
  }
5565
- }), Hl = /* @__PURE__ */ it(Wl, [["__scopeId", "data-v-9244f342"]]), Xl = { class: "py-4 px-8 flex items-center gap-4 text-fm-color-primary cursor-pointer relative" }, Ql = {
5566
+ }), Xl = /* @__PURE__ */ it(Hl, [["__scopeId", "data-v-9244f342"]]), Ql = { class: "py-4 px-8 flex items-center gap-4 text-fm-color-primary cursor-pointer relative" }, Jl = {
5566
5567
  key: 1,
5567
5568
  class: "fm-typo-en-body-md-400"
5568
5569
  }, Et = /* @__PURE__ */ be({
@@ -5574,23 +5575,23 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5574
5575
  setup(i) {
5575
5576
  return (l, t) => {
5576
5577
  const o = Z("FmIcon");
5577
- return $(), ee("div", Xl, [
5578
+ return $(), ee("div", Ql, [
5578
5579
  l.icon ? ($(), ae(o, {
5579
5580
  key: 0,
5580
5581
  name: l.icon
5581
5582
  }, null, 8, ["name"])) : ne("", !0),
5582
- l.label ? ($(), ee("span", Ql, ve(l.label), 1)) : ne("", !0),
5583
+ l.label ? ($(), ee("span", Jl, ve(l.label), 1)) : ne("", !0),
5583
5584
  t[0] || (t[0] = B("div", { class: "absolute inset-0 fm-corner-radius-md hover:bg-fm-color-opacity-sm" }, null, -1))
5584
5585
  ]);
5585
5586
  };
5586
5587
  }
5587
- }), Jl = {
5588
+ }), Zl = {
5588
5589
  class: "flex flex-col gap-4"
5589
- }, Zl = {
5590
- class: "flex items-center justify-between"
5591
5590
  }, ei = {
5591
+ class: "flex items-center justify-between"
5592
+ }, ti = {
5592
5593
  class: "flex items-center"
5593
- }, ti = /* @__PURE__ */ be({
5594
+ }, ni = /* @__PURE__ */ be({
5594
5595
  __name: "ProductsTree",
5595
5596
  props: {
5596
5597
  menu: {},
@@ -5604,9 +5605,9 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5604
5605
  const t = i, o = l, m = yt(), r = _e(), f = _t(), {
5605
5606
  canDropFn: F,
5606
5607
  handleNodeDragDrop: d
5607
- } = El(), y = S(() => t.filterState.searchKey), k = yo(y, 300), {
5608
+ } = Fl(), y = S(() => t.filterState.searchKey), k = yo(y, 300), {
5608
5609
  generateTreeFromMenu: P
5609
- } = Sl();
5610
+ } = El();
5610
5611
  async function v() {
5611
5612
  return await P({
5612
5613
  filterState: t.filterState,
@@ -5618,7 +5619,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5618
5619
  Ue([() => t.overridedMenu, () => k.value], async () => {
5619
5620
  const O = await v();
5620
5621
  if (t.filterState.searchKey) {
5621
- const L = na(O.tree, t.filterState.searchKey);
5622
+ const L = oa(O.tree, t.filterState.searchKey);
5622
5623
  m.setTreeNodes(L.subTree), m.setExpandedNodeIds(L.shouldExpandNodeIds);
5623
5624
  } else
5624
5625
  m.setTreeNodes(O.tree);
@@ -5626,15 +5627,15 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5626
5627
  const {
5627
5628
  t: n
5628
5629
  } = he(), {
5629
- menuItems: I,
5630
- categories: T,
5630
+ menuItems: T,
5631
+ categories: w,
5631
5632
  linkItemRules: Q,
5632
5633
  handleSubmit: D,
5633
5634
  catalogManager: x,
5634
5635
  schedulerManager: V,
5635
5636
  noScheduler: U
5636
- } = Xo(!0);
5637
- return (O, L) => ($(), ee("div", Jl, [B("div", Zl, [e(r).rules.category.create ? ($(), ae(Et, {
5637
+ } = Qo(!0);
5638
+ return (O, L) => ($(), ee("div", Zl, [B("div", ei, [e(r).rules.category.create ? ($(), ae(Et, {
5638
5639
  key: 0,
5639
5640
  label: e(n)("menu.tree_editor.actions.add_category"),
5640
5641
  icon: "add",
@@ -5643,8 +5644,8 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5643
5644
  key: 1,
5644
5645
  "categorized-items": e(x).linkableItems.value,
5645
5646
  "initial-value": e(x).currentItems.value,
5646
- "menu-items": e(I),
5647
- categories: e(T),
5647
+ "menu-items": e(T),
5648
+ categories: e(w),
5648
5649
  "link-item-rules": e(Q),
5649
5650
  "show-variant": !1,
5650
5651
  "no-scheduler": e(U),
@@ -5663,8 +5664,8 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5663
5664
  key: 2,
5664
5665
  "categorized-items": e(V).linkableItems.value,
5665
5666
  "initial-value": e(V).currentItems.value,
5666
- "menu-items": e(I),
5667
- categories: e(T),
5667
+ "menu-items": e(T),
5668
+ categories: e(w),
5668
5669
  "link-item-rules": e(Q),
5669
5670
  "show-variant": !1,
5670
5671
  "no-scheduler": e(U),
@@ -5679,7 +5680,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5679
5680
  onClick: Y
5680
5681
  }, null, 8, ["label", "onClick"])]),
5681
5682
  _: 1
5682
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : ne("", !0), B("div", ei, [s(Ut, {
5683
+ }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : ne("", !0), B("div", ti, [s(Ut, {
5683
5684
  name: "expand_all",
5684
5685
  tooltip: e(n)("menu.tree_editor.actions.expand_all"),
5685
5686
  visible: !0,
@@ -5690,7 +5691,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5690
5691
  visible: !0,
5691
5692
  onClick: L[2] || (L[2] = (Y) => e(m).collapseAllNodes())
5692
5693
  }, null, 8, ["tooltip"])])]), s(_o, null, {
5693
- default: X(() => [s(Hl, {
5694
+ default: X(() => [s(Xl, {
5694
5695
  nodes: e(m).treeNodes,
5695
5696
  selectedNodeId: e(m).selectedNodeId,
5696
5697
  expandedNodeIds: e(m).expandedNodeIds,
@@ -5701,7 +5702,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5701
5702
  _: 1
5702
5703
  })]));
5703
5704
  }
5704
- }), ni = { class: "space-y-8" }, oi = /* @__PURE__ */ be({
5705
+ }), oi = { class: "space-y-8" }, ai = /* @__PURE__ */ be({
5705
5706
  __name: "TreeFilter",
5706
5707
  props: /* @__PURE__ */ Rn({
5707
5708
  menu: {}
@@ -5722,11 +5723,11 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5722
5723
  }))
5723
5724
  ]), f = S(() => {
5724
5725
  var n;
5725
- const P = l("menu.common.labels.catalog"), v = ((n = r.value.find((I) => I.value === m.value.catalogId)) == null ? void 0 : n.label) || l("menu.tree_editor.labels.main_catalog");
5726
+ const P = l("menu.common.labels.catalog"), v = ((n = r.value.find((T) => T.value === m.value.catalogId)) == null ? void 0 : n.label) || l("menu.tree_editor.labels.main_catalog");
5726
5727
  return `${P}: ${v}`;
5727
5728
  }), F = S(() => {
5728
5729
  var n;
5729
- const P = l("menu.common.labels.scheduler"), v = ((n = y.value.find((I) => I.value === m.value.schedulerId)) == null ? void 0 : n.label) || l("menu.tree_editor.labels.all_time");
5730
+ const P = l("menu.common.labels.scheduler"), v = ((n = y.value.find((T) => T.value === m.value.schedulerId)) == null ? void 0 : n.label) || l("menu.tree_editor.labels.all_time");
5730
5731
  return `${P}: ${v}`;
5731
5732
  }), d = S(() => o.isV4), y = S(() => [
5732
5733
  {
@@ -5743,14 +5744,14 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5743
5744
  });
5744
5745
  return (P, v) => {
5745
5746
  const n = Z("FmSearch");
5746
- return $(), ee("div", ni, [
5747
+ return $(), ee("div", oi, [
5747
5748
  s(en, {
5748
5749
  "model-value": m.value.catalogId || "",
5749
5750
  items: r.value,
5750
5751
  placeholder: e(l)("menu.tree_editor.labels.main_catalog"),
5751
5752
  "search-placeholder": e(l)("common.search"),
5752
5753
  "custom-label": f.value,
5753
- "onUpdate:modelValue": v[0] || (v[0] = (I) => m.value.catalogId = I)
5754
+ "onUpdate:modelValue": v[0] || (v[0] = (T) => m.value.catalogId = T)
5754
5755
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"]),
5755
5756
  d.value ? ($(), ae(en, {
5756
5757
  key: 0,
@@ -5759,27 +5760,27 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5759
5760
  placeholder: e(l)("menu.tree_editor.labels.all_time"),
5760
5761
  "search-placeholder": e(l)("common.search"),
5761
5762
  "custom-label": F.value,
5762
- "onUpdate:modelValue": v[1] || (v[1] = (I) => m.value.schedulerId = I)
5763
+ "onUpdate:modelValue": v[1] || (v[1] = (T) => m.value.schedulerId = T)
5763
5764
  }, null, 8, ["model-value", "items", "placeholder", "search-placeholder", "custom-label"])) : ne("", !0),
5764
- k.value ? ($(), ae(Jo, {
5765
+ k.value ? ($(), ae(Zo, {
5765
5766
  key: 1,
5766
5767
  "current-restaurant-attr-params": e(o).state.currentRestaurantAttrParams,
5767
- onConfirm: v[2] || (v[2] = (I) => e(o).setRestaurantAttrParams(I)),
5768
+ onConfirm: v[2] || (v[2] = (T) => e(o).setRestaurantAttrParams(T)),
5768
5769
  fullWidth: !0
5769
5770
  }, null, 8, ["current-restaurant-attr-params"])) : ne("", !0),
5770
5771
  v[4] || (v[4] = B("div", { class: "h-[1px] bg-fm-color-neutral-gray-100" }, null, -1)),
5771
5772
  s(n, {
5772
5773
  "model-value": m.value.searchKey || "",
5773
- "onUpdate:modelValue": v[3] || (v[3] = (I) => m.value.searchKey = I),
5774
+ "onUpdate:modelValue": v[3] || (v[3] = (T) => m.value.searchKey = T),
5774
5775
  placeholder: e(l)("common.search")
5775
5776
  }, null, 8, ["model-value", "placeholder"])
5776
5777
  ]);
5777
5778
  };
5778
5779
  }
5779
- }), ai = { class: "h-full flex flex-col relative" }, ri = { class: "p-8" }, li = { class: "flex-1 p-8" }, ii = {
5780
+ }), ri = { class: "h-full flex flex-col relative" }, li = { class: "p-8" }, ii = { class: "flex-1 p-8" }, si = {
5780
5781
  key: 0,
5781
5782
  class: "absolute inset-0 flex items-center justify-center tree-overlay"
5782
- }, si = { class: "flex items-center justify-center gap-16" }, ui = /* @__PURE__ */ be({
5783
+ }, ui = { class: "flex items-center justify-center gap-16" }, di = /* @__PURE__ */ be({
5783
5784
  __name: "TreePanel",
5784
5785
  props: {
5785
5786
  menu: {},
@@ -5797,31 +5798,31 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5797
5798
  m.selectCatalog(o.value.catalogId), m.selectScheduler(o.value.schedulerId);
5798
5799
  }), (r, f) => {
5799
5800
  const F = Z("FmCircularProgress");
5800
- return $(), ee("div", ai, [
5801
- B("div", ri, [
5802
- s(oi, {
5801
+ return $(), ee("div", ri, [
5802
+ B("div", li, [
5803
+ s(ai, {
5803
5804
  menu: r.menu,
5804
5805
  modelValue: o.value,
5805
5806
  "onUpdate:modelValue": f[0] || (f[0] = (d) => o.value = d)
5806
5807
  }, null, 8, ["menu", "modelValue"])
5807
5808
  ]),
5808
- B("div", li, [
5809
- s(ti, {
5809
+ B("div", ii, [
5810
+ s(ni, {
5810
5811
  menu: r.menu,
5811
5812
  "overrided-menu": r.overridedMenu,
5812
5813
  "filter-state": o.value,
5813
5814
  onTreeEvent: f[1] || (f[1] = (d) => t("tree-event", d))
5814
5815
  }, null, 8, ["menu", "overrided-menu", "filter-state"])
5815
5816
  ]),
5816
- r.loading ? ($(), ee("div", ii, [
5817
- B("div", si, [
5817
+ r.loading ? ($(), ee("div", si, [
5818
+ B("div", ui, [
5818
5819
  s(F, { size: "lg" })
5819
5820
  ])
5820
5821
  ])) : ne("", !0)
5821
5822
  ]);
5822
5823
  };
5823
5824
  }
5824
- }), di = { class: "pl-24 scroll-y-auto h-full overflow-y-auto relative" }, ci = { key: 1 }, mi = { class: "text-center text-sm text-gray-500 p-16" }, pi = /* @__PURE__ */ be({
5825
+ }), ci = { class: "pl-24 scroll-y-auto h-full overflow-y-auto relative" }, mi = { key: 1 }, pi = { class: "text-center text-sm text-gray-500 p-16" }, fi = /* @__PURE__ */ be({
5825
5826
  __name: "TreeEditor",
5826
5827
  props: {
5827
5828
  menu: {}
@@ -5833,7 +5834,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5833
5834
  }), Rt(() => {
5834
5835
  o.$dispose(), m.setExpandedNodeIds([]), m.setSelectedNodeId(null);
5835
5836
  });
5836
- const r = re(null), { currentItemId: f, initialForm: F, itemFormKey: d } = ua(o), { saveItemFormEditingStateDebounced: y } = ra(r, o), k = re(null);
5837
+ const r = re(null), { currentItemId: f, initialForm: F, itemFormKey: d } = da(o), { saveItemFormEditingStateDebounced: y } = la(r, o), k = re(null);
5837
5838
  async function P(n) {
5838
5839
  if (n.type === Ee.SELECT_ITEM || n.type === Ee.SELECT_PRICE || n.type === Ee.SELECT_GROUP || n.type === Ee.SELECT_VARIANT) {
5839
5840
  if (!v(n.itemId))
@@ -5852,19 +5853,19 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5852
5853
  }
5853
5854
  }
5854
5855
  function v(n) {
5855
- var I, T, Q;
5856
- if (((I = F.value) == null ? void 0 : I._id) === n)
5856
+ var T, w, Q;
5857
+ if (((T = F.value) == null ? void 0 : T._id) === n)
5857
5858
  return !0;
5858
- if (f.value && f.value !== n && ((T = r.value) != null && T.hasUnsavedChanges())) {
5859
+ if (f.value && f.value !== n && ((w = r.value) != null && w.hasUnsavedChanges())) {
5859
5860
  const D = (Q = r.value) == null ? void 0 : Q.validate();
5860
5861
  if (!D || D.length > 0)
5861
5862
  return !1;
5862
5863
  }
5863
5864
  return n && (f.value = n, m.setSelectedNodeByItemId(n)), !0;
5864
5865
  }
5865
- return (n, I) => ($(), ae(Tl, null, {
5866
+ return (n, T) => ($(), ae(xl, null, {
5866
5867
  "left-panel": X(() => [
5867
- s(ui, {
5868
+ s(di, {
5868
5869
  menu: n.menu,
5869
5870
  "overrided-menu": e(o).mergedMenu,
5870
5871
  loading: e(o).workerIsComputing,
@@ -5872,8 +5873,8 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5872
5873
  }, null, 8, ["menu", "overrided-menu", "loading"])
5873
5874
  ]),
5874
5875
  "right-panel": X(() => [
5875
- B("div", di, [
5876
- e(F) ? ($(), ae(gl, {
5876
+ B("div", ci, [
5877
+ e(F) ? ($(), ae(vl, {
5877
5878
  ref_key: "itemFormRef",
5878
5879
  ref: r,
5879
5880
  key: e(d),
@@ -5883,24 +5884,24 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5883
5884
  "category-id": null,
5884
5885
  focused: k.value,
5885
5886
  "onUpdate:editingState": e(y)
5886
- }, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : ($(), ee("div", ci, [
5887
- B("div", mi, ve(e(l)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
5887
+ }, null, 8, ["initial-form", "menu", "merged-menu", "focused", "onUpdate:editingState"])) : ($(), ee("div", mi, [
5888
+ B("div", pi, ve(e(l)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)
5888
5889
  ]))
5889
5890
  ])
5890
5891
  ]),
5891
5892
  _: 1
5892
5893
  }));
5893
5894
  }
5894
- }), fi = {
5895
+ }), gi = {
5895
5896
  class: /* @__PURE__ */ Fe([
5896
5897
  "flex items-center",
5897
5898
  "px-24 pt-16 pb-8",
5898
5899
  "border-b border-fm-color-neutral-gray-100",
5899
5900
  "space-x-4"
5900
5901
  ])
5901
- }, gi = { class: "fm-typo-en-title-sm-600 mr-auto" }, vi = { class: "flex items-center gap-8" }, bi = {
5902
+ }, vi = { class: "fm-typo-en-title-sm-600 mr-auto" }, bi = { class: "flex items-center gap-8" }, yi = {
5902
5903
  class: /* @__PURE__ */ Fe(["flex flex-col", "flex-1 overflow-scroll", "w-full"])
5903
- }, yi = /* @__PURE__ */ be({
5904
+ }, _i = /* @__PURE__ */ be({
5904
5905
  __name: "TreeEditorForm",
5905
5906
  props: {
5906
5907
  menu: {},
@@ -5916,10 +5917,10 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5916
5917
  m(
5917
5918
  async () => {
5918
5919
  await Qt(), kn(), await gt();
5919
- const n = y.state.menu, I = xo(n), T = So(t.menu.modules.item, I.modules.item);
5920
- if (await d.updateMenuSetting(I), await d.importMenu(I), T.length)
5920
+ const n = y.state.menu, T = xo(n), w = So(t.menu.modules.item, T.modules.item);
5921
+ if (await d.updateMenuSetting(T), await d.importMenu(T), w.length)
5921
5922
  try {
5922
- await Jt(T);
5923
+ await Jt(w);
5923
5924
  } catch (Q) {
5924
5925
  console.error("Failed to clean up removed product images", Q);
5925
5926
  }
@@ -5943,15 +5944,15 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5943
5944
  if (n.length)
5944
5945
  try {
5945
5946
  await Jt(n);
5946
- } catch (I) {
5947
- console.error("Failed to clean up discarded product images", I);
5947
+ } catch (T) {
5948
+ console.error("Failed to clean up discarded product images", T);
5948
5949
  }
5949
5950
  F();
5950
5951
  })();
5951
5952
  }
5952
5953
  );
5953
- return (n, I) => {
5954
- const T = Z("fm-button"), Q = Z("fm-form");
5954
+ return (n, T) => {
5955
+ const w = Z("fm-button"), Q = Z("fm-form");
5955
5956
  return $(), ae(Nn, { to: "body" }, [
5956
5957
  s(Gn, { name: "fade" }, {
5957
5958
  default: X(() => [
@@ -5964,27 +5965,27 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5964
5965
  onKeyup: Ln(e(v), ["esc"])
5965
5966
  }, {
5966
5967
  default: X(() => [
5967
- B("div", fi, [
5968
- B("p", gi, ve(e(r)("menu.tree_editor.title")), 1),
5969
- B("div", vi, [
5970
- s(T, {
5968
+ B("div", gi, [
5969
+ B("p", vi, ve(e(r)("menu.tree_editor.title")), 1),
5970
+ B("div", bi, [
5971
+ s(w, {
5971
5972
  icon: "undo",
5972
5973
  disabled: !e(y).canUndoHistory,
5973
5974
  variant: "tertiary",
5974
5975
  onClick: e(y).undoHistory
5975
5976
  }, null, 8, ["disabled", "onClick"]),
5976
- s(T, {
5977
+ s(w, {
5977
5978
  icon: "redo",
5978
5979
  disabled: !e(y).canRedoHistory,
5979
5980
  variant: "tertiary",
5980
5981
  onClick: e(y).redoHistory
5981
5982
  }, null, 8, ["disabled", "onClick"]),
5982
- s(T, {
5983
+ s(w, {
5983
5984
  label: e(r)("common.cancel"),
5984
5985
  variant: "tertiary",
5985
5986
  onClick: e(v)
5986
5987
  }, null, 8, ["label", "onClick"]),
5987
- s(T, {
5988
+ s(w, {
5988
5989
  label: e(r)("common.save"),
5989
5990
  type: "submit",
5990
5991
  variant: "primary",
@@ -5992,8 +5993,8 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
5992
5993
  }, null, 8, ["label", "loading"])
5993
5994
  ])
5994
5995
  ]),
5995
- B("div", bi, [
5996
- s(pi, { menu: n.menu }, null, 8, ["menu"])
5996
+ B("div", yi, [
5997
+ s(fi, { menu: n.menu }, null, 8, ["menu"])
5997
5998
  ])
5998
5999
  ]),
5999
6000
  _: 1
@@ -6004,7 +6005,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
6004
6005
  ]);
6005
6006
  };
6006
6007
  }
6007
- }), _i = /* @__PURE__ */ it(yi, [["__scopeId", "data-v-8e2b5ffd"]]), ns = /* @__PURE__ */ be({
6008
+ }), hi = /* @__PURE__ */ it(_i, [["__scopeId", "data-v-8e2b5ffd"]]), os = /* @__PURE__ */ be({
6008
6009
  __name: "TreeEditorOpenner",
6009
6010
  setup(i) {
6010
6011
  const l = vt(), t = fn();
@@ -6013,7 +6014,7 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
6013
6014
  }
6014
6015
  const m = () => {
6015
6016
  t.open({
6016
- component: _i,
6017
+ component: hi,
6017
6018
  props: { menu: l.state.menu }
6018
6019
  });
6019
6020
  };
@@ -6028,5 +6029,5 @@ const $l = { key: 0 }, Pl = ["innerHTML"], Dl = /* @__PURE__ */ be({
6028
6029
  }
6029
6030
  });
6030
6031
  export {
6031
- ns as _
6032
+ os as _
6032
6033
  };