@feedmepos/mf-menu 0.32.7-beta.2 → 0.32.7-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/{App-BIQ0CTci.js → App-DCkQc7e4.js} +98 -98
  2. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-uzmq3vwy.js +161 -0
  3. package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +74 -0
  4. package/dist/{Catalog-D2wc24o8.js → Catalog-CUPoRid3.js} +9 -9
  5. package/dist/{Category-DA5-55d2.js → Category-BkvhZ57Y.js} +7 -7
  6. package/dist/{Category-BPufryqK.js → Category-Cdw0ikhP.js} +4 -4
  7. package/dist/{CookingGuide-DKvou40e.js → CookingGuide-BZ-4oULM.js} +6 -6
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DHoAYdGI.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJvVFWdR.js} +3 -3
  9. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +26 -0
  10. package/dist/{Group-D60oAvmM.js → Group-C1FaXdUb.js} +1 -1
  11. package/dist/{Group-Bgpc6qE1.js → Group-Cec83DWm.js} +4 -4
  12. package/dist/{Group.vue_vue_type_script_setup_true_lang-BXn3--BL.js → Group.vue_vue_type_script_setup_true_lang-2_lLBdX2.js} +128 -128
  13. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BD9IZkwW.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BEDyKWhK.js} +91 -91
  14. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BE3LdBYY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BteTvMnx.js} +3225 -3225
  15. package/dist/{Ingredient-Brv4hml-.js → Ingredient-DulL8h2B.js} +29 -29
  16. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIOX-pq1.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DoBx7Dal.js} +104 -104
  17. package/dist/{LinkProductSideSheet-BDMbKJ8o.js → LinkProductSideSheet-Br2eE8pC.js} +251 -251
  18. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +69 -0
  19. package/dist/{MenuSetting-DvCu23my.js → MenuSetting-DxW4LCW4.js} +77 -77
  20. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js → PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js} +8 -8
  21. package/dist/{PrintRoute-DwgLKDUV.js → PrintRoute-Da6Zkx-0.js} +5 -5
  22. package/dist/{Product-EmoWM778.js → Product-Cs76t18_.js} +1 -1
  23. package/dist/{Product.vue_vue_type_script_setup_true_lang-5HyO_RYw.js → Product.vue_vue_type_script_setup_true_lang-C6SOu4Vv.js} +606 -606
  24. package/dist/{ProductInternalTools-PqzouaF2.js → ProductInternalTools-DPbeRvTM.js} +10 -10
  25. package/dist/{Products-ZgfTT9dI.js → Products--7dGfuuT.js} +52 -52
  26. package/dist/{Publish-CUdRwmN1.js → Publish-COmZtiyX.js} +5 -5
  27. package/dist/{Recipe-BRUxyire.js → Recipe-BaN_1zrP.js} +5 -5
  28. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CPFGkaTr.js → RuleView.vue_vue_type_script_setup_true_lang-DputprQj.js} +451 -448
  29. package/dist/{Scheduler-BXdZh-xC.js → Scheduler-BSUpIAaK.js} +4 -4
  30. package/dist/{ServingSequence-EAZHOHiy.js → ServingSequence-dXBb7e5d.js} +4 -4
  31. package/dist/{Setting-BRut_Xj0.js → Setting-CalEQW0n.js} +6 -6
  32. package/dist/{Subcategory-D6Yrs-vO.js → Subcategory-zPHtX7Vc.js} +5 -5
  33. package/dist/{Takeaway-Bi8JfDWa.js → Takeaway-CRDj2Bpe.js} +5 -5
  34. package/dist/{Takeaway-CRdlNTu7.js → Takeaway-CcnmeTmu.js} +1 -1
  35. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DKQZ9J8Z.js → Takeaway.vue_vue_type_script_setup_true_lang-Cj7vyOaP.js} +5 -5
  36. package/dist/{TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js → TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js} +5 -5
  37. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DDWk-WUW.js → Thumbnail.vue_vue_type_script_setup_true_lang-B0552qsN.js} +74 -74
  38. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BwnyIDNH.js +6038 -0
  39. package/dist/{Unit-Ccs_k5IS.js → Unit-C7-Oj5S3.js} +3 -3
  40. package/dist/{Variant-BHmgMXq7.js → Variant-CYiMkE0q.js} +4 -4
  41. package/dist/{_id_-DSSoi4Gy.js → _id_-D75ZcNlf.js} +11 -11
  42. package/dist/{app-CzXxFrl1.js → app-5fxKLAzS.js} +447 -447
  43. package/dist/{app-C8Dm2-h4.js → app-BhLVpUSl.js} +35 -35
  44. package/dist/{app-B9seAt5l.js → app-DzVMOviz.js} +1 -1
  45. package/dist/app.js +1 -1
  46. package/dist/apps/mf-menu/src/app.d.ts +20 -0
  47. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
  48. package/dist/apps/mf-menu/src/components/feature/MenuSelector.vue.d.ts +1 -1
  49. package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +1 -1
  50. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +2 -1
  51. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
  52. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  53. package/dist/assets/linked-status-BoIPm5hC.js +13 -0
  54. package/dist/assets/override-menu-DfTrwWpR.js +13 -0
  55. package/dist/assets/validate-menu-BhWvQ3T9.js +13 -0
  56. package/dist/{catalog-CD-fdGdY.js → catalog-CudNSsIP.js} +1 -1
  57. package/dist/{catalogSetting-Ci85lXor.js → catalogSetting-BVHO9tK3.js} +1 -1
  58. package/dist/{category-6NAH0dUF.js → category-BQpgz1lk.js} +1 -1
  59. package/dist/{currency-BP_z7R5d.js → currency-BfS7H2KE.js} +1 -1
  60. package/dist/{index-BLMijxTj.js → index-BHdPJta4.js} +91 -91
  61. package/dist/{index-C1XCbqC-.js → index-DmGJvREM.js} +56 -56
  62. package/dist/{index-Cftm4-G_.js → index-DuLXS699.js} +5 -5
  63. package/dist/{index-DgDQzkPR.js → index-aaoziUNI.js} +30 -30
  64. package/dist/{index.vue_vue_type_script_setup_true_lang-D-k9WcQV.js → index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js} +40026 -40153
  65. package/dist/item-BtKW0wdj.js +7685 -0
  66. package/dist/{iteration-ZG64Re91.js → iteration-CaliNodx.js} +1 -1
  67. package/dist/{jszip.min-BETdv0rh.js → jszip.min-DXbkmgRD.js} +102 -102
  68. package/dist/{menu-COMXycAe.js → menu-D-lUEuvX.js} +1 -1
  69. package/dist/{menuV2-CeRS0Jw3.js → menuV2-D-6O36DO.js} +357 -348
  70. package/dist/mf-menu.css +1 -1
  71. package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
  72. package/dist/{priceTier-t2T3Q87F.js → priceTier-DKnYaOA9.js} +1 -1
  73. package/dist/{scheduler-BbJUVuiK.js → scheduler-DEwfbYPL.js} +7 -7
  74. package/dist/{subcategory-61kOQh4g.js → subcategory-CQKklgcd.js} +2 -2
  75. package/dist/{toExcel-DIYaK18-.js → toExcel-CRwL-QqF.js} +2 -2
  76. package/dist/{unit-B6StucsI.js → unit-BzM1rmN7.js} +151 -151
  77. package/dist/{vuedraggable-DnBIRDMr.js → vuedraggable-CK8z7qA8.js} +2 -2
  78. package/package.json +3 -2
  79. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-BpEjqhAC.js +0 -161
  80. package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +0 -74
  81. package/dist/FormItem.vue_vue_type_script_setup_true_lang-B3Ixruh-.js +0 -26
  82. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +0 -69
  83. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-JdHaBpaX.js +0 -5997
  84. package/dist/assets/linked-status-Cuf8X8_g.js +0 -13
  85. package/dist/assets/override-menu-yxQLf82k.js +0 -13
  86. package/dist/assets/validate-menu-BwbenBs6.js +0 -13
  87. package/dist/item-ByEPWjef.js +0 -6819
@@ -1,47 +1,47 @@
1
- import { ref as F, computed as x, defineComponent as B, resolveComponent as O, createBlock as I, openBlock as d, withCtx as T, createElementVNode as b, createVNode as c, unref as t, createElementBlock as k, Fragment as pe, renderList as we, createCommentVNode as U, normalizeClass as ve, toDisplayString as N, withModifiers as fe, mergeModels as Je, useModel as Xe, renderSlot as _e, watch as de, createTextVNode as et, watchEffect as tt, nextTick as Ae, resolveDynamicComponent as lt, onMounted as at, h as q, isRef as je, normalizeStyle as ft } from "vue";
2
- import { u as Fe, Q as Ce, A as me, H as Re, I as ge, U as gt, ad as bt, ae as _t, af as Pe, ag as yt, P as ht, a3 as be, ah as Ee } from "./index.vue_vue_type_script_setup_true_lang-D-k9WcQV.js";
1
+ import { ref as F, computed as h, defineComponent as B, resolveComponent as O, createBlock as I, openBlock as m, withCtx as T, createElementVNode as g, createVNode as d, unref as a, createElementBlock as k, Fragment as pe, renderList as we, createCommentVNode as U, normalizeClass as ve, toDisplayString as N, withModifiers as fe, mergeModels as Je, useModel as Xe, renderSlot as _e, watch as de, createTextVNode as et, watchEffect as tt, nextTick as Ae, resolveDynamicComponent as lt, onMounted as at, h as q, isRef as je, normalizeStyle as ft } from "vue";
2
+ import { u as Fe, Q as Ce, A as me, H as Re, I as ge, U as gt, ad as bt, ae as _t, af as Pe, ag as yt, P as ht, a3 as be, ah as Ee } from "./index.vue_vue_type_script_setup_true_lang-Dje9kp-F.js";
3
3
  import { useI18n as Ie, useCoreStore as ze, useCustomAttributes as xt } from "@feedmepos/mf-common";
4
- import { u as Se } from "./menu-COMXycAe.js";
5
- import { L as Ge } from "./LinkProductSideSheet-BDMbKJ8o.js";
6
- import { r as Ct, _ as Le } from "./index-DgDQzkPR.js";
7
- import { _ as Ue, a as qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-DHoAYdGI.js";
8
- import { _ as Me, u as kt } from "./Thumbnail.vue_vue_type_script_setup_true_lang-DDWk-WUW.js";
9
- import { f as wt, o as St, a as Vt, m as Ft } from "./menuV2-CeRS0Jw3.js";
10
- import { u as ot, C as It } from "./item-ByEPWjef.js";
11
- import { b as We, H as $t } from "./app-CzXxFrl1.js";
12
- import { useBreakpoints as nt, components as te, useDialog as Tt, FmButtonColorThemeVariant as W, FmButtonVariant as ee } from "@feedmepos/ui-library";
13
- import { F as Pt } from "./index-C1XCbqC-.js";
14
- import { _ as De, a as At } from "./app-C8Dm2-h4.js";
15
- import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js";
16
- import { _ as Rt } from "./index-BLMijxTj.js";
17
- import { r as Ut, _ as Mt } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BE3LdBYY.js";
4
+ import { u as Se } from "./menu-D-lUEuvX.js";
5
+ import { L as Ge } from "./LinkProductSideSheet-Br2eE8pC.js";
6
+ import { r as Ct, _ as Le } from "./index-aaoziUNI.js";
7
+ import { _ as Ue, a as qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJvVFWdR.js";
8
+ import { _ as Me, u as kt } from "./Thumbnail.vue_vue_type_script_setup_true_lang-B0552qsN.js";
9
+ import { f as wt, o as St, a as Vt, m as Ft } from "./menuV2-D-6O36DO.js";
10
+ import { u as ot, C as It } from "./item-BtKW0wdj.js";
11
+ import { b as We, H as $t } from "./app-5fxKLAzS.js";
12
+ import { useBreakpoints as rt, components as te, useDialog as Tt, FmButtonColorThemeVariant as W, FmButtonVariant as ee } from "@feedmepos/ui-library";
13
+ import { F as Pt } from "./index-DmGJvREM.js";
14
+ import { _ as De, a as At } from "./app-BhLVpUSl.js";
15
+ import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
16
+ import { _ as Rt } from "./index-BHdPJta4.js";
17
+ import { r as Ut, _ as Mt } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BteTvMnx.js";
18
18
  import { c as zt } from "./check-C9mY6LiX.js";
19
- import { f as Dt } from "./currency-BP_z7R5d.js";
19
+ import { f as Dt } from "./currency-BfS7H2KE.js";
20
20
  import { w as Ot } from "./tooltip-CQW9YRO5.js";
21
- function Kt(g, e, m = g) {
22
- const r = F(!0), l = x(() => {
23
- if (!r.value && !e.value)
21
+ function Kt(C, e, i = C) {
22
+ const n = F(!0), t = h(() => {
23
+ if (!n.value && !e.value)
24
24
  return !0;
25
25
  if (e.value && e.value.length > 0) {
26
- const f = m.value.map((u) => u.value);
27
- return e.value.length === f.length && e.value.every((u) => f.includes(u));
26
+ const f = i.value.map((s) => s.value);
27
+ return e.value.length === f.length && e.value.every((s) => f.includes(s));
28
28
  }
29
29
  return !1;
30
- }), s = x(() => {
31
- var f, u, _, h;
32
- return !!((f = e.value) != null && f.length && ((u = e.value) == null ? void 0 : u.length) > 0 && ((_ = e.value) == null ? void 0 : _.length) < ((h = g.value) == null ? void 0 : h.length));
30
+ }), u = h(() => {
31
+ var f, s, b, y;
32
+ return !!((f = e.value) != null && f.length && ((s = e.value) == null ? void 0 : s.length) > 0 && ((b = e.value) == null ? void 0 : b.length) < ((y = C.value) == null ? void 0 : y.length));
33
33
  });
34
- return { allCleared: r, allSelected: l, indeterminate: s, toggleAll: () => {
35
- if (l.value) {
36
- e.value = void 0, r.value = !0;
34
+ return { allCleared: n, allSelected: t, indeterminate: u, toggleAll: () => {
35
+ if (t.value) {
36
+ e.value = void 0, n.value = !0;
37
37
  return;
38
38
  }
39
- const f = m.value.map((u) => u.value);
40
- f.length === g.value.length ? (e.value = void 0, r.value = !1) : (e.value = f, r.value = !1);
39
+ const f = i.value.map((s) => s.value);
40
+ f.length === C.value.length ? (e.value = void 0, n.value = !1) : (e.value = f, n.value = !1);
41
41
  }, toggleOption: (f) => {
42
- var _, h, w;
43
- let u;
44
- e.value === void 0 && r.value ? u = [f] : e.value === void 0 && !r.value ? u = (_ = g.value.map((z) => z.value)) == null ? void 0 : _.filter((z) => z !== f) : (h = e.value) != null && h.includes(f) ? u = (w = e.value) == null ? void 0 : w.filter((z) => z !== f) : u = [...e.value || [], f], u.length === 0 ? (e.value = void 0, r.value = !0) : u.length === g.value.length ? (e.value = void 0, r.value = !1) : e.value = u;
42
+ var b, y, w;
43
+ let s;
44
+ e.value === void 0 && n.value ? s = [f] : e.value === void 0 && !n.value ? s = (b = C.value.map((z) => z.value)) == null ? void 0 : b.filter((z) => z !== f) : (y = e.value) != null && y.includes(f) ? s = (w = e.value) == null ? void 0 : w.filter((z) => z !== f) : s = [...e.value || [], f], s.length === 0 ? (e.value = void 0, n.value = !0) : s.length === C.value.length ? (e.value = void 0, n.value = !1) : e.value = s;
45
45
  } };
46
46
  }
47
47
  const Nt = { class: "inline-flex items-center" }, Bt = {
@@ -53,49 +53,49 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
53
53
  }, jt = { class: "p-4" }, Et = { class: "flex-1 overflow-y-auto min-h-0" }, He = /* @__PURE__ */ B({
54
54
  __name: "CategorySelector",
55
55
  emits: ["toggleAttributeFilter"],
56
- setup(g, { emit: e }) {
57
- const m = e, r = Fe(), { categories: l, selectedCategories: s } = Se(), a = x(() => r.state.currentCategoryIds), v = x(
58
- () => l.value.map((K) => ({ label: K.name, value: K.id }))
59
- ), f = x(() => v.value.filter(
60
- (K) => K.label.toLowerCase().includes(h.value.toLowerCase())
61
- )), { t: u } = Ie(), _ = x(() => {
56
+ setup(C, { emit: e }) {
57
+ const i = e, n = Fe(), { categories: t, selectedCategories: u } = Se(), l = h(() => n.state.currentCategoryIds), v = h(
58
+ () => t.value.map((K) => ({ label: K.name, value: K.id }))
59
+ ), f = h(() => v.value.filter(
60
+ (K) => K.label.toLowerCase().includes(y.value.toLowerCase())
61
+ )), { t: s } = Ie(), b = h(() => {
62
62
  var K, D, H;
63
- return l.value.length === ((K = s.value) == null ? void 0 : K.length) ? u("menu.category.selector.all") : ((D = s.value) == null ? void 0 : D.length) === 1 ? s.value[0].name : `${(H = s.value) == null ? void 0 : H.length}`;
64
- }), h = F(""), w = x({
65
- get: () => a.value,
63
+ return t.value.length === ((K = u.value) == null ? void 0 : K.length) ? s("menu.category.selector.all") : ((D = u.value) == null ? void 0 : D.length) === 1 ? u.value[0].name : `${(H = u.value) == null ? void 0 : H.length}`;
64
+ }), y = F(""), w = h({
65
+ get: () => l.value,
66
66
  set: (K) => {
67
- r.selectCategory(K);
67
+ n.selectCategory(K);
68
68
  }
69
69
  }), { allSelected: z, toggleAll: Y, toggleOption: S, indeterminate: oe } = Kt(
70
70
  v,
71
71
  w,
72
72
  f
73
- ), Z = ze(), ne = x(() => Z.itemAttributeSettings.value.length > 0);
73
+ ), Z = ze(), re = h(() => Z.itemAttributeSettings.value.length > 0);
74
74
  function G() {
75
- m("toggleAttributeFilter");
75
+ i("toggleAttributeFilter");
76
76
  }
77
77
  return (K, D) => {
78
- const H = O("FmIcon"), J = O("FmChip"), re = O("FmSearch"), Q = O("FmMenuItem"), se = O("FmMenu");
79
- return d(), I(se, {
78
+ const H = O("FmIcon"), J = O("FmChip"), ne = O("FmSearch"), Q = O("FmMenuItem"), se = O("FmMenu");
79
+ return m(), I(se, {
80
80
  "close-on-click": !1,
81
81
  width: 220
82
82
  }, {
83
83
  "menu-button": T(() => [
84
- b("div", Nt, [
85
- c(J, null, {
84
+ g("div", Nt, [
85
+ d(J, null, {
86
86
  default: T(() => [
87
- _.value ? (d(), k("div", Bt, N(t(u)("menu.category.selector.title", { label: _.value })), 1)) : U("", !0),
88
- c(H, {
87
+ b.value ? (m(), k("div", Bt, N(a(s)("menu.category.selector.title", { label: b.value })), 1)) : U("", !0),
88
+ d(H, {
89
89
  color: "neutral-gray-400",
90
90
  name: "expand_more",
91
91
  size: "sm"
92
92
  }),
93
- ne.value ? (d(), k("div", {
93
+ re.value ? (m(), k("div", {
94
94
  key: 1,
95
95
  class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
96
96
  onClick: fe(G, ["stop"])
97
97
  }, [
98
- c(H, {
98
+ d(H, {
99
99
  name: "filter_alt",
100
100
  outline: "",
101
101
  color: "neutral-gray-400",
@@ -110,30 +110,30 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
110
110
  ])
111
111
  ]),
112
112
  default: T(() => [
113
- b("div", jt, [
114
- c(re, {
113
+ g("div", jt, [
114
+ d(ne, {
115
115
  autofocus: "",
116
- modelValue: h.value,
117
- "onUpdate:modelValue": D[1] || (D[1] = (R) => h.value = R),
118
- placeholder: t(u)("menu.common.actions.search")
116
+ modelValue: y.value,
117
+ "onUpdate:modelValue": D[1] || (D[1] = (R) => y.value = R),
118
+ placeholder: a(s)("menu.common.actions.search")
119
119
  }, null, 8, ["modelValue", "placeholder"])
120
120
  ]),
121
- b("div", Et, [
122
- c(Q, {
121
+ g("div", Et, [
122
+ d(Q, {
123
123
  label: "All",
124
124
  "has-checkbox": "",
125
- "model-value": t(z),
126
- indeterminate: t(oe),
127
- onClick: t(Y)
125
+ "model-value": a(z),
126
+ indeterminate: a(oe),
127
+ onClick: a(Y)
128
128
  }, null, 8, ["model-value", "indeterminate", "onClick"]),
129
- (d(!0), k(pe, null, we(f.value, (R) => {
129
+ (m(!0), k(pe, null, we(f.value, (R) => {
130
130
  var $;
131
- return d(), I(Q, {
131
+ return m(), I(Q, {
132
132
  key: R.value || "",
133
133
  label: R.label,
134
134
  "has-checkbox": "",
135
- "model-value": t(z) || (($ = w.value) == null ? void 0 : $.includes(R.value)),
136
- onClick: (P) => t(S)(R.value)
135
+ "model-value": a(z) || (($ = w.value) == null ? void 0 : $.includes(R.value)),
136
+ onClick: (P) => a(S)(R.value)
137
137
  }, null, 8, ["label", "model-value", "onClick"]);
138
138
  }), 128))
139
139
  ])
@@ -154,30 +154,30 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
154
154
  categories: { default: () => [] },
155
155
  ellipsis: { type: Boolean, default: !0 }
156
156
  },
157
- setup(g) {
158
- const e = g, { t: m } = Ie(), r = nt(), l = x(() => r.breakpoints.value.xs), s = x(() => e.ellipsis ? l.value ? 1 : 2 : 1 / 0), a = x(() => e.categories.length <= s.value ? e.categories : e.categories.slice(0, s.value)), v = F(!0), f = x(() => {
157
+ setup(C) {
158
+ const e = C, { t: i } = Ie(), n = rt(), t = h(() => n.breakpoints.value.xs), u = h(() => e.ellipsis ? t.value ? 1 : 2 : 1 / 0), l = h(() => e.categories.length <= u.value ? e.categories : e.categories.slice(0, u.value)), v = F(!0), f = h(() => {
159
159
  if (v.value) {
160
- const _ = a.value.join(", ");
161
- return _.length > 20 ? _.slice(0, 20) + "..." : _;
160
+ const b = l.value.join(", ");
161
+ return b.length > 20 ? b.slice(0, 20) + "..." : b;
162
162
  }
163
163
  return e.categories.join(", ");
164
164
  });
165
- return (u, _) => {
166
- const h = O("FmTooltip");
167
- return l.value ? (d(), k(pe, { key: 1 }, [
168
- g.categories.length > 0 ? (d(), k("p", Ht, [
169
- b("span", null, N(t(m)("menu.product.table.columns.category")) + ": ", 1),
170
- b("span", null, N(f.value), 1),
171
- v.value ? (d(), k("span", Yt)) : (d(), k("br", Qt)),
172
- g.categories.length > s.value ? (d(), k("span", {
165
+ return (s, b) => {
166
+ const y = O("FmTooltip");
167
+ return t.value ? (m(), k(pe, { key: 1 }, [
168
+ s.categories.length > 0 ? (m(), k("p", Ht, [
169
+ g("span", null, N(a(i)("menu.product.table.columns.category")) + ": ", 1),
170
+ g("span", null, N(f.value), 1),
171
+ v.value ? (m(), k("span", Yt)) : (m(), k("br", Qt)),
172
+ s.categories.length > u.value ? (m(), k("span", {
173
173
  key: 2,
174
174
  class: "fm-typo-en-body-md-400 text-fm-color-primary cursor-pointer",
175
- onClick: _[0] || (_[0] = fe((w) => v.value = !v.value, ["stop", "prevent"]))
175
+ onClick: b[0] || (b[0] = fe((w) => v.value = !v.value, ["stop", "prevent"]))
176
176
  }, [
177
- v.value ? (d(), k("span", Zt, N(t(m)("menu.product.table.category.expand", { count: g.categories.length - s.value })), 1)) : (d(), k("span", Jt, N(t(m)("menu.product.table.category.collapse")), 1))
177
+ v.value ? (m(), k("span", Zt, N(a(i)("menu.product.table.category.expand", { count: s.categories.length - u.value })), 1)) : (m(), k("span", Jt, N(a(i)("menu.product.table.category.collapse")), 1))
178
178
  ])) : U("", !0)
179
179
  ])) : U("", !0)
180
- ], 64)) : (d(), I(h, {
180
+ ], 64)) : (m(), I(y, {
181
181
  key: 0,
182
182
  class: "flex",
183
183
  variant: "rich",
@@ -185,10 +185,10 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
185
185
  "z-index": 50
186
186
  }, {
187
187
  content: T(() => [
188
- b("div", Lt, [
189
- b("p", qt, N(t(m)("menu.product.table.category.all")), 1),
190
- b("div", Wt, [
191
- (d(!0), k(pe, null, we(e.categories, (w) => (d(), I(ke, {
188
+ g("div", Lt, [
189
+ g("p", qt, N(a(i)("menu.product.table.category.all")), 1),
190
+ g("div", Wt, [
191
+ (m(!0), k(pe, null, we(e.categories, (w) => (m(), I(ke, {
192
192
  key: w,
193
193
  label: w,
194
194
  variant: "neutral"
@@ -197,13 +197,13 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
197
197
  ])
198
198
  ]),
199
199
  default: T(() => [
200
- b("div", Gt, [
201
- (d(!0), k(pe, null, we(a.value, (w) => (d(), I(ke, {
200
+ g("div", Gt, [
201
+ (m(!0), k(pe, null, we(l.value, (w) => (m(), I(ke, {
202
202
  key: w,
203
203
  label: w,
204
204
  variant: "neutral"
205
205
  }, null, 8, ["label"]))), 128)),
206
- g.categories.length > s.value ? (d(), I(ke, {
206
+ s.categories.length > u.value ? (m(), I(ke, {
207
207
  key: 0,
208
208
  label: "...",
209
209
  variant: "neutral"
@@ -225,29 +225,29 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
225
225
  modelModifiers: {}
226
226
  }),
227
227
  emits: ["update:modelValue"],
228
- setup(g) {
229
- const e = g, m = Xe(g, "modelValue"), r = x(() => e.menu.modules.item.map((l) => ({
230
- label: l.code ? `${l.code} ${l.name}` : l.name,
231
- value: l._id
228
+ setup(C) {
229
+ const e = C, i = Xe(C, "modelValue"), n = h(() => e.menu.modules.item.map((t) => ({
230
+ label: t.code ? `${t.code} ${t.name}` : t.name,
231
+ value: t._id
232
232
  })));
233
- return (l, s) => {
234
- const a = O("FmSelect");
235
- return d(), I(a, {
236
- modelValue: m.value,
237
- "onUpdate:modelValue": s[0] || (s[0] = (v) => m.value = v),
238
- items: r.value,
233
+ return (t, u) => {
234
+ const l = O("FmSelect");
235
+ return m(), I(l, {
236
+ modelValue: i.value,
237
+ "onUpdate:modelValue": u[0] || (u[0] = (v) => i.value = v),
238
+ items: n.value,
239
239
  searchable: !0,
240
240
  "search-target": "label",
241
241
  placeholder: "Search by product name or code",
242
- label: g.label,
243
- "helper-text": g.helperText
242
+ label: t.label,
243
+ "helper-text": t.helperText
244
244
  }, null, 8, ["modelValue", "items", "label", "helper-text"]);
245
245
  };
246
246
  }
247
247
  }), el = { class: "flex" }, tl = { class: "w-[260px] space-y-16 h-full" }, ll = { class: "flex items-center gap-4 px-8" }, al = { class: "fm-typo-en-title-sm-600" }, ol = {
248
248
  key: 0,
249
249
  class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
250
- }, nl = { class: "fm-typo-en-body-md-600" }, rl = { class: "flex-1" }, rt = /* @__PURE__ */ B({
250
+ }, rl = { class: "fm-typo-en-body-md-600" }, nl = { class: "flex-1" }, nt = /* @__PURE__ */ B({
251
251
  __name: "ViewLayout",
252
252
  props: /* @__PURE__ */ Je({
253
253
  title: {},
@@ -258,32 +258,32 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
258
258
  modelModifiers: {}
259
259
  }),
260
260
  emits: ["update:modelValue"],
261
- setup(g) {
262
- const e = Xe(g, "modelValue");
263
- return (m, r) => {
264
- const l = O("FmCollapsibleTabs");
265
- return d(), k("div", el, [
266
- b("div", tl, [
267
- b("div", ll, [
268
- b("p", al, N(g.title), 1),
269
- g.titleBadge !== void 0 ? (d(), k("div", ol, [
270
- b("p", nl, N(g.titleBadge), 1)
261
+ setup(C) {
262
+ const e = Xe(C, "modelValue");
263
+ return (i, n) => {
264
+ const t = O("FmCollapsibleTabs");
265
+ return m(), k("div", el, [
266
+ g("div", tl, [
267
+ g("div", ll, [
268
+ g("p", al, N(i.title), 1),
269
+ i.titleBadge !== void 0 ? (m(), k("div", ol, [
270
+ g("p", rl, N(i.titleBadge), 1)
271
271
  ])) : U("", !0)
272
272
  ]),
273
- c(De, null, {
273
+ d(De, null, {
274
274
  default: T(() => [
275
- c(l, {
275
+ d(t, {
276
276
  modelValue: e.value,
277
- "onUpdate:modelValue": r[0] || (r[0] = (s) => e.value = s),
278
- items: g.items
277
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => e.value = u),
278
+ items: i.items
279
279
  }, null, 8, ["modelValue", "items"])
280
280
  ]),
281
281
  _: 1
282
282
  })
283
283
  ]),
284
- r[1] || (r[1] = b("div", { class: "w-[1px] min-h-full ml-4 mr-12 bg-fm-color-neutral-gray-100 self-stretch" }, null, -1)),
285
- b("div", rl, [
286
- _e(m.$slots, "default")
284
+ n[1] || (n[1] = g("div", { class: "w-[1px] min-h-full ml-4 mr-12 bg-fm-color-neutral-gray-100 self-stretch" }, null, -1)),
285
+ g("div", nl, [
286
+ _e(i.$slots, "default")
287
287
  ])
288
288
  ]);
289
289
  };
@@ -293,13 +293,13 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
293
293
  props: {
294
294
  orderFrom: {}
295
295
  },
296
- setup(g) {
297
- const e = g, m = Ce();
298
- return (r, l) => {
299
- var s, a;
300
- return d(), I(ke, {
301
- label: ((s = t(m)[e.orderFrom]) == null ? void 0 : s.label) || e.orderFrom,
302
- variant: (a = t(m)[e.orderFrom]) == null ? void 0 : a.variant
296
+ setup(C) {
297
+ const e = C, i = Ce();
298
+ return (n, t) => {
299
+ var u, l;
300
+ return m(), I(ke, {
301
+ label: ((u = a(i)[e.orderFrom]) == null ? void 0 : u.label) || e.orderFrom,
302
+ variant: (l = a(i)[e.orderFrom]) == null ? void 0 : l.variant
303
303
  }, null, 8, ["label", "variant"]);
304
304
  };
305
305
  }
@@ -308,79 +308,79 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
308
308
  props: {
309
309
  data: {}
310
310
  },
311
- setup(g) {
312
- const e = g, m = [{
311
+ setup(C) {
312
+ const e = C, i = [{
313
313
  accessorKey: "code",
314
314
  header: () => "Code",
315
315
  enableSorting: !1,
316
316
  cell: ({
317
- row: a
317
+ row: l
318
318
  }) => {
319
- const v = a.original;
320
- return v.subRows ? c("div", {
319
+ const v = l.original;
320
+ return v.subRows ? d("div", {
321
321
  class: "flex items-center gap-2 fm-typo-en-body-md-600 text-fm-color-typo-secondary"
322
- }, [c(te.FmButton, {
322
+ }, [d(te.FmButton, {
323
323
  icon: "keyboard_arrow_up",
324
324
  variant: "tertiary",
325
- class: ["cursor-pointer", "transition-transform", a.getIsExpanded() ? "transform rotate-180" : ""],
326
- onClick: a.getToggleExpandedHandler()
325
+ class: ["cursor-pointer", "transition-transform", l.getIsExpanded() ? "transform rotate-180" : ""],
326
+ onClick: l.getToggleExpandedHandler()
327
327
  }, null), et("Found in group: "), v.groupName]) : v.code;
328
328
  },
329
329
  meta: {
330
- colspan: (a) => a.original.subRows ? 5 : 1
330
+ colspan: (l) => l.original.subRows ? 5 : 1
331
331
  }
332
332
  }, {
333
333
  accessorKey: "productName",
334
334
  header: () => "Product name",
335
335
  enableSorting: !1,
336
336
  meta: {
337
- colspan: (a) => a.original.subRows ? 0 : 1
337
+ colspan: (l) => l.original.subRows ? 0 : 1
338
338
  }
339
339
  }, {
340
340
  accessorKey: "variant",
341
341
  header: () => "Variant",
342
342
  enableSorting: !1,
343
343
  meta: {
344
- colspan: (a) => a.original.subRows ? 0 : 1
344
+ colspan: (l) => l.original.subRows ? 0 : 1
345
345
  }
346
346
  }, {
347
347
  accessorKey: "price",
348
348
  header: () => "Price",
349
349
  enableSorting: !1,
350
350
  meta: {
351
- colspan: (a) => a.original.subRows ? 0 : 1
351
+ colspan: (l) => l.original.subRows ? 0 : 1
352
352
  }
353
353
  }, {
354
354
  accessorKey: "orderFrom",
355
355
  header: () => "Order from",
356
356
  enableSorting: !1,
357
- cell: (a) => {
358
- const v = a.row.original;
359
- return c(Ve, {
357
+ cell: (l) => {
358
+ const v = l.row.original;
359
+ return d(Ve, {
360
360
  orderFrom: v.orderFrom ?? ""
361
361
  }, null);
362
362
  },
363
363
  meta: {
364
- colspan: (a) => a.original.subRows ? 0 : 1
364
+ colspan: (l) => l.original.subRows ? 0 : 1
365
365
  }
366
- }], r = F({}), l = (a) => a.subRows;
367
- function s() {
368
- r.value = Object.fromEntries(e.data.map((a, v) => [v, !0]));
366
+ }], n = F({}), t = (l) => l.subRows;
367
+ function u() {
368
+ n.value = Object.fromEntries(e.data.map((l, v) => [v, !0]));
369
369
  }
370
370
  return de(() => e.data, () => {
371
- s();
372
- }), (a, v) => {
371
+ u();
372
+ }), (l, v) => {
373
373
  const f = O("FmTable");
374
- return d(), I(De, null, {
375
- default: T(() => [c(f, {
376
- "column-defs": m,
377
- "row-data": g.data,
374
+ return m(), I(De, null, {
375
+ default: T(() => [d(f, {
376
+ "column-defs": i,
377
+ "row-data": l.data,
378
378
  "hide-footer": !0,
379
379
  "page-size": 1e6,
380
- "get-sub-row": l,
381
- "expanded-state": r.value,
380
+ "get-sub-row": t,
381
+ "expanded-state": n.value,
382
382
  "shrink-at": !1,
383
- "onUpdate:expandedState": v[0] || (v[0] = (u) => r.value = u)
383
+ "onUpdate:expandedState": v[0] || (v[0] = (s) => n.value = s)
384
384
  }, null, 8, ["row-data", "expanded-state"])]),
385
385
  _: 1
386
386
  });
@@ -392,12 +392,12 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
392
392
  itemId: {},
393
393
  menu: {}
394
394
  },
395
- setup(g) {
396
- const e = g, m = F(""), r = x(() => l.value.reduce((u, _) => u + (typeof _.badge == "number" ? _.badge ?? 1 : 0), 0)), l = F([]), s = x(() => {
397
- const u = l.value.find((h) => h.value === m.value);
398
- return ((u == null ? void 0 : u.itemInGroup) || []).map((h) => ({
399
- groupName: h.group.name,
400
- subRows: h.items.map((w) => ({
395
+ setup(C) {
396
+ const e = C, i = F(""), n = h(() => t.value.reduce((s, b) => s + (typeof b.badge == "number" ? b.badge ?? 1 : 0), 0)), t = F([]), u = h(() => {
397
+ const s = t.value.find((y) => y.value === i.value);
398
+ return ((s == null ? void 0 : s.itemInGroup) || []).map((y) => ({
399
+ groupName: y.group.name,
400
+ subRows: y.items.map((w) => ({
401
401
  // @ts-ignore
402
402
  code: w.code || w.fallbackCode,
403
403
  productName: w.combinationKey ? "" : w.name ?? "",
@@ -407,7 +407,7 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
407
407
  }))
408
408
  }));
409
409
  });
410
- function a() {
410
+ function l() {
411
411
  return [{
412
412
  label: "Master product",
413
413
  value: "",
@@ -416,45 +416,45 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
416
416
  disabled: !1,
417
417
  badge: void 0,
418
418
  itemInGroup: []
419
- }, ...e.menu.modules.catalog.map((_) => ({
420
- label: _.name,
421
- value: _._id,
422
- catalogId: _._id,
419
+ }, ...e.menu.modules.catalog.map((b) => ({
420
+ label: b.name,
421
+ value: b._id,
422
+ catalogId: b._id,
423
423
  data: [],
424
424
  disabled: !1,
425
425
  badge: void 0,
426
426
  itemInGroup: []
427
427
  }))];
428
428
  }
429
- x(() => l.value.find((u) => u.value === m.value));
430
- async function v(u) {
431
- const _ = l.value.find((h) => h.catalogId === u);
432
- if (_) {
433
- _.badge = () => c(te.FmCircularProgress, {
429
+ h(() => t.value.find((s) => s.value === i.value));
430
+ async function v(s) {
431
+ const b = t.value.find((y) => y.catalogId === s);
432
+ if (b) {
433
+ b.badge = () => d(te.FmCircularProgress, {
434
434
  size: "md"
435
435
  }, null);
436
- const h = await wt(Re(e.menu), u, e.itemId);
437
- _.badge = h.length, _.disabled = h.length <= 0, _.itemInGroup = h;
436
+ const y = await wt(Re(e.menu), s, e.itemId);
437
+ b.badge = y.length, b.disabled = y.length <= 0, b.itemInGroup = y;
438
438
  }
439
439
  }
440
440
  function f() {
441
- l.value = a(), l.value.forEach((u) => {
442
- v(u.catalogId);
441
+ t.value = l(), t.value.forEach((s) => {
442
+ v(s.catalogId);
443
443
  });
444
444
  }
445
445
  return de([() => e.menu, () => e.itemId], () => {
446
446
  e.menu && e.itemId && f();
447
447
  }, {
448
448
  immediate: !0
449
- }), (u, _) => (d(), I(rt, {
450
- modelValue: m.value,
451
- "onUpdate:modelValue": _[0] || (_[0] = (h) => m.value = h),
452
- items: l.value,
449
+ }), (s, b) => (m(), I(nt, {
450
+ modelValue: i.value,
451
+ "onUpdate:modelValue": b[0] || (b[0] = (y) => i.value = y),
452
+ items: t.value,
453
453
  title: "Catalog",
454
- "title-badge": r.value
454
+ "title-badge": n.value
455
455
  }, {
456
- default: T(() => [c(sl, {
457
- data: s.value
456
+ default: T(() => [d(sl, {
457
+ data: u.value
458
458
  }, null, 8, ["data"])]),
459
459
  _: 1
460
460
  }, 8, ["modelValue", "items", "title-badge"]));
@@ -469,18 +469,18 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
469
469
  catalogId: {},
470
470
  schedulerIds: {}
471
471
  },
472
- setup(g) {
473
- const e = g, m = [{
472
+ setup(C) {
473
+ const e = C, i = [{
474
474
  accessorKey: "scheduler",
475
475
  header: () => "Scheduler",
476
476
  enableSorting: !1,
477
- cell: (s) => {
478
- const a = s.row.original, v = a.loading ? c(te.FmCircularProgress, {
477
+ cell: (u) => {
478
+ const l = u.row.original, v = l.loading ? d(te.FmCircularProgress, {
479
479
  size: "md"
480
480
  }, null) : null;
481
- return c("div", {
481
+ return d("div", {
482
482
  class: "flex items-center gap-2"
483
- }, [a.scheduler, v]);
483
+ }, [l.scheduler, v]);
484
484
  }
485
485
  }, {
486
486
  accessorKey: "code",
@@ -497,19 +497,19 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
497
497
  }, {
498
498
  accessorKey: "orderFrom",
499
499
  header: () => "Order from",
500
- cell: (s) => {
501
- const a = s.row.original;
502
- return c(Ve, {
503
- orderFrom: a.orderFrom
500
+ cell: (u) => {
501
+ const l = u.row.original;
502
+ return d(Ve, {
503
+ orderFrom: l.orderFrom
504
504
  }, null);
505
505
  },
506
506
  enableSorting: !1
507
- }], r = F([]);
508
- function l(s, a) {
507
+ }], n = F([]);
508
+ function t(u, l) {
509
509
  return {
510
510
  loading: !0,
511
- schedulerId: s,
512
- scheduler: a,
511
+ schedulerId: u,
512
+ scheduler: l,
513
513
  code: "--",
514
514
  productName: "--",
515
515
  price: "--",
@@ -517,25 +517,25 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
517
517
  };
518
518
  }
519
519
  return de([() => e.menu, () => e.catalogId, () => e.schedulerIds], async () => {
520
- r.value = [l(null, "All day"), ...e.schedulerIds.map((s) => {
521
- var a;
522
- return l(s, ((a = e.menu.modules.scheduler.find((v) => v._id === s)) == null ? void 0 : a.name) || "Unknown");
523
- })], r.value.forEach(async (s) => {
524
- const v = (await St(Re(e.menu), e.catalogId, s.schedulerId)).modules.item.find((u) => u._id === e.itemId), f = r.value.findIndex((u) => u.schedulerId === s.schedulerId);
520
+ n.value = [t(null, "All day"), ...e.schedulerIds.map((u) => {
521
+ var l;
522
+ return t(u, ((l = e.menu.modules.scheduler.find((v) => v._id === u)) == null ? void 0 : l.name) || "Unknown");
523
+ })], n.value.forEach(async (u) => {
524
+ const v = (await St(Re(e.menu), e.catalogId, u.schedulerId)).modules.item.find((s) => s._id === e.itemId), f = n.value.findIndex((s) => s.schedulerId === u.schedulerId);
525
525
  if (v) {
526
- const u = Re(r.value);
527
- u[f].loading = !1, u[f].code = v.code || "--", u[f].productName = v.name || "--", u[f].price = me.Dinero.fromFdoDinero(v.price).toFormat(), u[f].orderFrom = v.orderFrom || "--", r.value = u;
526
+ const s = Re(n.value);
527
+ s[f].loading = !1, s[f].code = v.code || "--", s[f].productName = v.name || "--", s[f].price = me.Dinero.fromFdoDinero(v.price).toFormat(), s[f].orderFrom = v.orderFrom || "--", n.value = s;
528
528
  }
529
529
  });
530
- }), (s, a) => {
530
+ }), (u, l) => {
531
531
  const v = O("FmTable");
532
- return d(), I(De, null, {
533
- default: T(() => [b("div", il, [c(v, {
532
+ return m(), I(De, null, {
533
+ default: T(() => [g("div", il, [d(v, {
534
534
  class: "min-w-[800px]",
535
- "column-defs": m,
536
- "row-data": r.value,
535
+ "column-defs": i,
536
+ "row-data": n.value,
537
537
  "hide-footer": !0,
538
- "page-size": r.value.length,
538
+ "page-size": n.value.length,
539
539
  "shrink-at": !1
540
540
  }, null, 8, ["row-data", "page-size"])])]),
541
541
  _: 1
@@ -548,50 +548,50 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
548
548
  itemId: {},
549
549
  menu: {}
550
550
  },
551
- setup(g) {
552
- const e = g, m = F(null);
551
+ setup(C) {
552
+ const e = C, i = F(null);
553
553
  tt(async () => {
554
- m.value = await Vt(e.menu, e.itemId), await Ae(), r.value = l.value[0].value;
554
+ i.value = await Vt(e.menu, e.itemId), await Ae(), n.value = t.value[0].value;
555
555
  });
556
- const r = F(""), l = x(() => {
557
- var f, u;
558
- const a = {
556
+ const n = F(""), t = h(() => {
557
+ var f, s;
558
+ const l = {
559
559
  label: "Master product",
560
560
  value: "",
561
561
  catalogId: null,
562
- badge: (((f = m.value) == null ? void 0 : f.schedulers.length) || 0) + 1,
563
- schedulerIds: (u = m.value) == null ? void 0 : u.schedulers
562
+ badge: (((f = i.value) == null ? void 0 : f.schedulers.length) || 0) + 1,
563
+ schedulerIds: (s = i.value) == null ? void 0 : s.schedulers
564
564
  };
565
- if (!m.value)
566
- return [a];
567
- const v = e.menu.modules.catalog.map((_) => {
568
- const h = m.value.catalogs[_._id];
565
+ if (!i.value)
566
+ return [l];
567
+ const v = e.menu.modules.catalog.map((b) => {
568
+ const y = i.value.catalogs[b._id];
569
569
  return {
570
- label: _.name,
571
- value: _._id,
572
- disabled: !h,
573
- catalogId: _._id,
574
- badge: h ? ((h == null ? void 0 : h.schedulers.length) || 0) + 1 : 0,
575
- schedulerIds: h == null ? void 0 : h.schedulers
570
+ label: b.name,
571
+ value: b._id,
572
+ disabled: !y,
573
+ catalogId: b._id,
574
+ badge: y ? ((y == null ? void 0 : y.schedulers.length) || 0) + 1 : 0,
575
+ schedulerIds: y == null ? void 0 : y.schedulers
576
576
  };
577
577
  });
578
- return [a, ...v];
579
- }), s = x(() => l.value.find((a) => a.value === r.value));
580
- return (a, v) => (d(), I(rt, {
581
- modelValue: r.value,
582
- "onUpdate:modelValue": v[0] || (v[0] = (f) => r.value = f),
583
- items: l.value,
578
+ return [l, ...v];
579
+ }), u = h(() => t.value.find((l) => l.value === n.value));
580
+ return (l, v) => (m(), I(nt, {
581
+ modelValue: n.value,
582
+ "onUpdate:modelValue": v[0] || (v[0] = (f) => n.value = f),
583
+ items: t.value,
584
584
  title: "Catalog",
585
- "title-badge": l.value.filter((f) => !f.disabled).length
585
+ "title-badge": t.value.filter((f) => !f.disabled).length
586
586
  }, {
587
587
  default: T(() => {
588
- var f, u;
588
+ var f, s;
589
589
  return [
590
- c(cl, {
591
- menu: g.menu,
592
- "item-id": g.itemId,
593
- "catalog-id": ((f = s.value) == null ? void 0 : f.catalogId) || null,
594
- "scheduler-ids": ((u = s.value) == null ? void 0 : u.schedulerIds) || []
590
+ d(cl, {
591
+ menu: l.menu,
592
+ "item-id": l.itemId,
593
+ "catalog-id": ((f = u.value) == null ? void 0 : f.catalogId) || null,
594
+ "scheduler-ids": ((s = u.value) == null ? void 0 : s.schedulerIds) || []
595
595
  }, null, 8, ["menu", "item-id", "catalog-id", "scheduler-ids"])
596
596
  ];
597
597
  }),
@@ -607,32 +607,32 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
607
607
  itemId: {},
608
608
  menu: {}
609
609
  },
610
- setup(g) {
611
- const e = g, m = x(() => e.menu.modules.item.find((l) => l._id === e.itemId)), r = x(() => {
612
- var l;
613
- return me.Dinero.fromFdoDinero((l = m.value) == null ? void 0 : l.price).toFormat(!0);
610
+ setup(C) {
611
+ const e = C, i = h(() => e.menu.modules.item.find((t) => t._id === e.itemId)), n = h(() => {
612
+ var t;
613
+ return me.Dinero.fromFdoDinero((t = i.value) == null ? void 0 : t.price).toFormat(!0);
614
614
  });
615
- return (l, s) => {
616
- var a, v, f, u, _, h, w;
617
- return d(), k("div", ml, [
618
- c(Me, {
619
- alt: ((a = m.value) == null ? void 0 : a.name) ?? null,
615
+ return (t, u) => {
616
+ var l, v, f, s, b, y, w;
617
+ return m(), k("div", ml, [
618
+ d(Me, {
619
+ alt: ((l = i.value) == null ? void 0 : l.name) ?? null,
620
620
  size: 72,
621
- src: (v = m.value) == null ? void 0 : v.thumbnail,
621
+ src: (v = i.value) == null ? void 0 : v.thumbnail,
622
622
  crossorigin: !1
623
623
  }, null, 8, ["alt", "src"]),
624
- b("div", pl, [
625
- b("p", vl, [
626
- (f = m.value) != null && f.code ? (d(), k("span", fl, N((u = m.value) == null ? void 0 : u.code) + ", ", 1)) : U("", !0),
627
- b("span", null, N((_ = m.value) == null ? void 0 : _.name), 1)
624
+ g("div", pl, [
625
+ g("p", vl, [
626
+ (f = i.value) != null && f.code ? (m(), k("span", fl, N((s = i.value) == null ? void 0 : s.code) + ", ", 1)) : U("", !0),
627
+ g("span", null, N((b = i.value) == null ? void 0 : b.name), 1)
628
628
  ]),
629
- b("p", gl, "Base price: " + N(r.value), 1),
630
- (h = m.value) != null && h.customAttributes ? (d(), k("div", bl, [
631
- b("div", _l, [
632
- s[0] || (s[0] = b("span", null, "Tagging:", -1)),
633
- c(Ue, {
629
+ g("p", gl, "Base price: " + N(n.value), 1),
630
+ (y = i.value) != null && y.customAttributes ? (m(), k("div", bl, [
631
+ g("div", _l, [
632
+ u[0] || (u[0] = g("span", null, "Tagging:", -1)),
633
+ d(Ue, {
634
634
  ellipsis: !1,
635
- "custom-attributes": (w = m.value) == null ? void 0 : w.customAttributes
635
+ "custom-attributes": (w = i.value) == null ? void 0 : w.customAttributes
636
636
  }, null, 8, ["custom-attributes"])
637
637
  ])
638
638
  ])) : U("", !0)
@@ -646,8 +646,8 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
646
646
  itemId: {},
647
647
  menu: {}
648
648
  },
649
- setup(g) {
650
- const e = F("product"), m = x(() => [
649
+ setup(C) {
650
+ const e = F("product"), i = h(() => [
651
651
  {
652
652
  value: "product",
653
653
  label: "Product",
@@ -659,25 +659,25 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
659
659
  component: ul
660
660
  }
661
661
  ]);
662
- return (r, l) => {
663
- var a;
664
- const s = O("FmTabs");
665
- return d(), k("div", hl, [
666
- c(yl, {
667
- "item-id": g.itemId,
668
- menu: g.menu
662
+ return (n, t) => {
663
+ var l;
664
+ const u = O("FmTabs");
665
+ return m(), k("div", hl, [
666
+ d(yl, {
667
+ "item-id": n.itemId,
668
+ menu: n.menu
669
669
  }, null, 8, ["item-id", "menu"]),
670
- b("div", null, [
671
- c(s, {
670
+ g("div", null, [
671
+ d(u, {
672
672
  modelValue: e.value,
673
- "onUpdate:modelValue": l[0] || (l[0] = (v) => e.value = v),
674
- items: m.value
673
+ "onUpdate:modelValue": t[0] || (t[0] = (v) => e.value = v),
674
+ items: i.value
675
675
  }, null, 8, ["modelValue", "items"])
676
676
  ]),
677
- b("div", null, [
678
- (d(), I(lt((a = m.value.find((v) => v.value === e.value)) == null ? void 0 : a.component), {
679
- "item-id": g.itemId,
680
- menu: g.menu
677
+ g("div", null, [
678
+ (m(), I(lt((l = i.value.find((v) => v.value === e.value)) == null ? void 0 : l.component), {
679
+ "item-id": n.itemId,
680
+ menu: n.menu
681
681
  }, null, 8, ["item-id", "menu"]))
682
682
  ])
683
683
  ]);
@@ -689,54 +689,54 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
689
689
  itemId: {},
690
690
  showSearch: { type: Boolean, default: !1 }
691
691
  },
692
- setup(g) {
693
- const e = g, m = Fe(), r = F(null);
692
+ setup(C) {
693
+ const e = C, i = Fe(), n = F(null);
694
694
  return at(() => {
695
- r.value = e.itemId;
696
- }), (l, s) => (d(), k("div", Cl, [
697
- g.showSearch ? (d(), k("div", kl, [
698
- c(Xt, {
699
- modelValue: r.value,
700
- "onUpdate:modelValue": s[0] || (s[0] = (a) => r.value = a),
695
+ n.value = e.itemId;
696
+ }), (t, u) => (m(), k("div", Cl, [
697
+ t.showSearch ? (m(), k("div", kl, [
698
+ d(Xt, {
699
+ modelValue: n.value,
700
+ "onUpdate:modelValue": u[0] || (u[0] = (l) => n.value = l),
701
701
  class: "w-1/2",
702
702
  label: "Search and compare prices",
703
703
  "helper-text": "Quickly find products and view their prices across different catalogs and schedules.",
704
- menu: t(m).state.menu
704
+ menu: a(i).state.menu
705
705
  }, null, 8, ["modelValue", "menu"])
706
706
  ])) : U("", !0),
707
- b("div", null, [
708
- r.value ? (d(), I(xl, {
707
+ g("div", null, [
708
+ n.value ? (m(), I(xl, {
709
709
  key: 0,
710
- "item-id": r.value,
711
- menu: t(m).state.menu
710
+ "item-id": n.value,
711
+ menu: a(i).state.menu
712
712
  }, null, 8, ["item-id", "menu"])) : U("", !0)
713
713
  ])
714
714
  ]));
715
715
  }
716
716
  }), Sl = /* @__PURE__ */ B({
717
717
  __name: "OverviewSheet",
718
- setup(g) {
719
- const e = F(null), m = F(!1);
720
- function r(l) {
721
- m.value = !m.value, l && (e.value = l);
718
+ setup(C) {
719
+ const e = F(null), i = F(!1);
720
+ function n(t) {
721
+ i.value = !i.value, t && (e.value = t);
722
722
  }
723
- return (l, s) => {
724
- const a = O("FmSideSheet");
725
- return d(), k(pe, null, [
726
- _e(l.$slots, "default", { trigger: r }),
727
- c(a, {
723
+ return (t, u) => {
724
+ const l = O("FmSideSheet");
725
+ return m(), k(pe, null, [
726
+ _e(t.$slots, "default", { trigger: n }),
727
+ d(l, {
728
728
  id: "product-overview",
729
- modelValue: m.value,
730
- "onUpdate:modelValue": s[0] || (s[0] = (v) => m.value = v),
729
+ modelValue: i.value,
730
+ "onUpdate:modelValue": u[0] || (u[0] = (v) => i.value = v),
731
731
  "max-width": 1200,
732
732
  "dismiss-away": ""
733
733
  }, {
734
- "side-sheet-header": T(() => [...s[1] || (s[1] = [
735
- b("p", { class: "fm-typo-en-title-md-600" }, "Product Overview", -1)
736
- ])]),
734
+ "side-sheet-header": T(() => u[1] || (u[1] = [
735
+ g("p", { class: "fm-typo-en-title-md-600" }, "Product Overview", -1)
736
+ ])),
737
737
  default: T(() => [
738
- b("div", null, [
739
- m.value && e.value ? (d(), I(wl, {
738
+ g("div", null, [
739
+ i.value && e.value ? (m(), I(wl, {
740
740
  key: 0,
741
741
  "item-id": e.value
742
742
  }, null, 8, ["item-id"])) : U("", !0)
@@ -751,31 +751,31 @@ const Nt = { class: "inline-flex items-center" }, Bt = {
751
751
  var Vl = Ut();
752
752
  const Ye = /* @__PURE__ */ B({
753
753
  __name: "ImportButton",
754
- setup(g) {
754
+ setup(C) {
755
755
  const e = F(!1);
756
- function m() {
756
+ function i() {
757
757
  e.value = !e.value;
758
758
  }
759
- const r = ze();
759
+ const n = ze();
760
760
  return at(() => {
761
- const l = r.currentCountry.value;
762
- if (l)
761
+ const t = n.currentCountry.value;
762
+ if (t)
763
763
  try {
764
- Vl.setCountryConfig(l);
765
- } catch (s) {
766
- console.log("Unable to set country config", s);
764
+ Vl.setCountryConfig(t);
765
+ } catch (u) {
766
+ console.log("Unable to set country config", u);
767
767
  }
768
- }), (l, s) => (d(), k(pe, null, [
769
- c(Mt, {
768
+ }), (t, u) => (m(), k(pe, null, [
769
+ d(Mt, {
770
770
  modelValue: e.value,
771
- "onUpdate:modelValue": s[0] || (s[0] = (a) => e.value = a)
771
+ "onUpdate:modelValue": u[0] || (u[0] = (l) => e.value = l)
772
772
  }, null, 8, ["modelValue"]),
773
- _e(l.$slots, "default", { trigger: m })
773
+ _e(t.$slots, "default", { trigger: i })
774
774
  ], 64));
775
775
  }
776
- }), Ze = (g) => c("div", {
776
+ }), Ze = (C) => d("div", {
777
777
  class: "flex flex-1 justify-end"
778
- }, [c("span", null, [g, et(" ")])]), Fl = {
778
+ }, [d("span", null, [C, et(" ")])]), Fl = {
779
779
  class: "flex justify-between items-center space-x-8"
780
780
  }, Il = {
781
781
  class: "flex space-x-8 items-center"
@@ -841,26 +841,26 @@ const Ye = /* @__PURE__ */ B({
841
841
  }
842
842
  },
843
843
  emits: ["update:model-value", "reset:model-value", "update:editing", "update:search-key"],
844
- setup(g, {
844
+ setup(C, {
845
845
  expose: e,
846
- emit: m
846
+ emit: i
847
847
  }) {
848
- const r = g, {
849
- t: l
850
- } = Ie(), s = ze(), a = Fe(), v = Tt(), f = ot(), u = s.currentCountry, _ = x(() => u.value ? me.Country.getCountry(u.value) : null), h = x(() => a.rules.item), {
848
+ const n = C, {
849
+ t
850
+ } = Ie(), u = ze(), l = Fe(), v = Tt(), f = ot(), s = u.currentCountry, b = h(() => s.value ? me.Country.getCountry(s.value) : null), y = h(() => l.rules.item), {
851
851
  selectedCategories: w
852
- } = Se(), z = x(() => {
853
- const o = ge.flatten(w.value.map((n) => n.items));
854
- return ge.uniqBy(o, (n) => n._id);
855
- }), Y = m, S = F(!1);
852
+ } = Se(), z = h(() => {
853
+ const o = ge.flatten(w.value.map((r) => r.items));
854
+ return ge.uniqBy(o, (r) => r._id);
855
+ }), Y = i, S = F(!1);
856
856
  de(() => S.value, (o) => {
857
857
  Y("update:editing", o);
858
858
  });
859
859
  const oe = (o) => {
860
860
  zt.isBoolean(o) ? S.value = o : S.value = !S.value;
861
- }, Z = F(!1), ne = F(null);
861
+ }, Z = F(!1), re = F(null);
862
862
  async function G() {
863
- Z.value = !Z.value, Z.value && (await Ae(), ne.value && ne.value.toggleProperty(!0));
863
+ Z.value = !Z.value, Z.value && (await Ae(), re.value && re.value.toggleProperty(!0));
864
864
  }
865
865
  e({
866
866
  toggleAttributeFilter: G
@@ -872,33 +872,33 @@ const Ye = /* @__PURE__ */ B({
872
872
  } = xt({
873
873
  valueSource: z,
874
874
  entity: "item"
875
- }), J = F(""), re = Ct(J, 300), Q = x(() => {
876
- const o = (i) => {
877
- var C;
878
- return !re.value || !re.value.trim() ? !0 : [i.code, i.name, Ke(i), ...Pe(se.value, i), (C = Ce()[i.orderFrom]) == null ? void 0 : C.label, Object.values(i.customAttributes ?? {}).join(" ")].join(" ").toLowerCase().includes(re.value.toLowerCase());
879
- }, n = (i) => H.value ? $t(i.customAttributes, H.value) : !0;
880
- return z.value.filter((i) => o(i) && n(i));
875
+ }), J = F(""), ne = Ct(J, 300), Q = h(() => {
876
+ const o = (c) => {
877
+ var x;
878
+ return !ne.value || !ne.value.trim() ? !0 : [c.code, c.name, Ke(c), ...Pe(se.value, c), (x = Ce()[c.orderFrom]) == null ? void 0 : x.label, Object.values(c.customAttributes ?? {}).join(" ")].join(" ").toLowerCase().includes(ne.value.toLowerCase());
879
+ }, r = (c) => H.value ? $t(c.customAttributes, H.value) : !0;
880
+ return z.value.filter((c) => o(c) && r(c));
881
881
  }), {
882
882
  categories: se
883
- } = Se(), R = x(() => a.categories.map((o) => ({
883
+ } = Se(), R = h(() => l.categories.map((o) => ({
884
884
  label: o.name,
885
885
  value: o._id || null
886
- }))), $ = (o, n, i) => {
887
- let p = ge.clone(r.modelValue);
888
- const C = p[o];
889
- C && (typeof n == "object" && n !== null ? p[o] = {
890
- ...C,
891
- ...n
886
+ }))), $ = (o, r, c) => {
887
+ let p = ge.clone(n.modelValue);
888
+ const x = p[o];
889
+ x && (typeof r == "object" && r !== null ? p[o] = {
890
+ ...x,
891
+ ...r
892
892
  } : p[o] = {
893
- ...C,
894
- [n]: i
893
+ ...x,
894
+ [r]: c
895
895
  }, Y("update:model-value", p));
896
- }, P = bt(() => r.originalValue, () => r.modelValue), A = ge.debounce($, 300), ue = (o) => (n) => !!n || l("menu.product.table.validation.name_required", {
896
+ }, P = bt(() => n.originalValue, () => n.modelValue), A = ge.debounce($, 300), ue = (o) => (r) => !!r || t("menu.product.table.validation.name_required", {
897
897
  field: o
898
- }), L = (o) => o >= 0 || l("menu.product.table.validation.price_min"), j = [ue("Name")], M = () => [(o) => L(typeof o == "number" ? o : Number(o) ?? 0)], ie = Ce(), E = x(() => {
899
- const o = a.isV4;
900
- return gt.setCoreStore(s).taxSetting(o);
901
- }), ce = x(() => [{
898
+ }), L = (o) => o >= 0 || t("menu.product.table.validation.price_min"), j = [ue("Name")], M = () => [(o) => L(typeof o == "number" ? o : Number(o) ?? 0)], ie = Ce(), E = h(() => {
899
+ const o = l.isV4;
900
+ return gt.setCoreStore(u).taxSetting(o);
901
+ }), ce = h(() => [{
902
902
  accessorKey: "thumbnail",
903
903
  header: "",
904
904
  size: 110,
@@ -907,10 +907,10 @@ const Ye = /* @__PURE__ */ B({
907
907
  headerContentClass: "px-0"
908
908
  },
909
909
  cell: (o) => {
910
- var n, i;
910
+ var r, c;
911
911
  return q(Me, {
912
912
  src: o.getValue(),
913
- alt: (i = (n = o == null ? void 0 : o.row) == null ? void 0 : n.original) == null ? void 0 : i.name,
913
+ alt: (c = (r = o == null ? void 0 : o.row) == null ? void 0 : r.original) == null ? void 0 : c.name,
914
914
  className: "my-8 mx-12",
915
915
  size: 72,
916
916
  crossorigin: !1
@@ -919,47 +919,47 @@ const Ye = /* @__PURE__ */ B({
919
919
  enableSorting: !1
920
920
  }, {
921
921
  accessorKey: "code",
922
- header: () => l("menu.product.table.columns.code"),
922
+ header: () => t("menu.product.table.columns.code"),
923
923
  enableSorting: !1,
924
924
  size: 100,
925
925
  cell: (o) => {
926
- const n = o.row.original, i = o.getValue() || "--";
927
- if (!S.value) return c("span", {
926
+ const r = o.row.original, c = o.getValue() || "--";
927
+ if (!S.value) return d("span", {
928
928
  class: "break-all"
929
- }, [i]);
930
- const p = Te(n._id);
929
+ }, [c]);
930
+ const p = Te(r._id);
931
931
  return q(te.FmTextField, {
932
- disabled: !h.value.code,
933
- modelValue: P(n._id, "code") ?? (p == null ? void 0 : p.code),
934
- placeholder: r.modelValue[n._id].fallbackCode,
935
- "onUpdate:modelValue": (C) => {
936
- A(n._id, "code", C);
932
+ disabled: !y.value.code,
933
+ modelValue: P(r._id, "code") ?? (p == null ? void 0 : p.code),
934
+ placeholder: n.modelValue[r._id].fallbackCode,
935
+ "onUpdate:modelValue": (x) => {
936
+ A(r._id, "code", x);
937
937
  }
938
938
  });
939
939
  }
940
940
  }, {
941
941
  accessorKey: "name",
942
- header: () => l("menu.product.table.columns.name"),
942
+ header: () => t("menu.product.table.columns.name"),
943
943
  enableSorting: !1,
944
944
  size: 200,
945
945
  cell: (o) => {
946
- const n = o.row.original, i = o.getValue();
946
+ const r = o.row.original, c = o.getValue();
947
947
  return S.value ? q(te.FmTextField, {
948
- disabled: !h.value.name,
949
- modelValue: P(n._id, "name") ?? n.name,
948
+ disabled: !y.value.name,
949
+ modelValue: P(r._id, "name") ?? r.name,
950
950
  "onUpdate:modelValue": (p) => {
951
- A(n._id, "name", p);
951
+ A(r._id, "name", p);
952
952
  },
953
953
  rules: j,
954
- placeholder: n.fallbackName
955
- }) : i;
954
+ placeholder: r.fallbackName
955
+ }) : c;
956
956
  }
957
957
  }, {
958
958
  accessorKey: "price",
959
959
  header: () => {
960
960
  var o;
961
- return Ze(l("menu.product.table.columns.price", {
962
- currency: (o = _.value) == null ? void 0 : o.currency.symbol
961
+ return Ze(t("menu.product.table.columns.price", {
962
+ currency: (o = b.value) == null ? void 0 : o.currency.symbol
963
963
  }));
964
964
  },
965
965
  enableSorting: !1,
@@ -968,19 +968,19 @@ const Ye = /* @__PURE__ */ B({
968
968
  textAlign: "right"
969
969
  },
970
970
  cell: (o) => {
971
- var C;
972
- const n = o.getValue();
973
- if (!S.value) return me.Dinero.fromFdoDinero(n).toFormat();
974
- const i = r.modelValue[o.row.original._id], p = i.fallbackPrice;
971
+ var x;
972
+ const r = o.getValue();
973
+ if (!S.value) return me.Dinero.fromFdoDinero(r).toFormat();
974
+ const c = n.modelValue[o.row.original._id], p = c.fallbackPrice;
975
975
  return q(Rt, {
976
976
  min: 0,
977
- disabled: !i.editPrice,
977
+ disabled: !c.editPrice,
978
978
  // @ts-ignore
979
979
  placeholder: p ? Dt(p, !1) : void 0,
980
- modelValue: P(i._id, "price") ?? ((C = Te(i._id)) == null ? void 0 : C.price),
980
+ modelValue: P(c._id, "price") ?? ((x = Te(c._id)) == null ? void 0 : x.price),
981
981
  // @ts-ignore
982
982
  "onUpdate:modelValue": (V) => {
983
- $(i._id, "price", V);
983
+ $(c._id, "price", V);
984
984
  },
985
985
  rules: M()
986
986
  });
@@ -994,44 +994,44 @@ const Ye = /* @__PURE__ */ B({
994
994
  textAlign: "right"
995
995
  },
996
996
  cell: (o) => {
997
- const n = o.getValue(), i = o.row.original, p = a.taxSetting.countryTaxOptions, C = a.getSelectedTax(n, i.fallbackTaxes, a.taxSetting.countryTaxOptions), V = p.find((ae) => ae.value === C);
997
+ const r = o.getValue(), c = o.row.original, p = l.taxSetting.countryTaxOptions, x = l.getSelectedTax(r, c.fallbackTaxes, l.taxSetting.countryTaxOptions), V = p.find((ae) => ae.value === x);
998
998
  if (!S.value)
999
999
  return `${V != null && V.meta.rate ? _t(V.meta.rate) : 0}%`;
1000
- const y = a.getSelectedTax(P(i._id, "taxes") ?? n, i.fallbackTaxes, a.taxSetting.countryTaxOptions);
1000
+ const _ = l.getSelectedTax(P(c._id, "taxes") ?? r, c.fallbackTaxes, l.taxSetting.countryTaxOptions);
1001
1001
  return q(te.FmSelect, {
1002
- disabled: !h.value.tax,
1003
- items: a.taxSetting.countryTaxOptions,
1004
- modelValue: y,
1002
+ disabled: !y.value.tax,
1003
+ items: l.taxSetting.countryTaxOptions,
1004
+ modelValue: _,
1005
1005
  "onUpdate:modelValue": async (ae) => {
1006
- const xe = a.decodeTax(ae);
1007
- A(i._id, "taxes", [xe]);
1006
+ const xe = l.decodeTax(ae);
1007
+ A(c._id, "taxes", [xe]);
1008
1008
  }
1009
1009
  });
1010
1010
  }
1011
1011
  }, {
1012
1012
  accessorKey: "category",
1013
- header: () => l("menu.product.table.columns.category"),
1013
+ header: () => t("menu.product.table.columns.category"),
1014
1014
  enableSorting: !1,
1015
1015
  size: 140,
1016
1016
  cell: (o) => {
1017
- const n = o.row.original;
1017
+ const r = o.row.original;
1018
1018
  if (!S.value)
1019
1019
  return q(Qe, {
1020
- categories: Pe(se.value, n)
1020
+ categories: Pe(se.value, r)
1021
1021
  });
1022
- const i = yt(r.originalValue, r.modelValue, n._id) ?? ht(n), p = (i == null ? void 0 : i.map((V) => V._id)) ?? [], C = i == null ? void 0 : i.reduce((V, y) => (V[y._id] = y, V), {});
1022
+ const c = yt(n.originalValue, n.modelValue, r._id) ?? ht(r), p = (c == null ? void 0 : c.map((V) => V._id)) ?? [], x = c == null ? void 0 : c.reduce((V, _) => (V[_._id] = _, V), {});
1023
1023
  return q(It, {
1024
1024
  shouldShowChips: !1,
1025
1025
  shouldShowSelectedItemsWithinPlaceholder: !0,
1026
1026
  modelValue: p.length > 0 ? p : [null],
1027
1027
  items: R.value,
1028
- disabled: !!(a.state.currentCatalogId || a.state.currentSchedulerId),
1028
+ disabled: !!(l.state.currentCatalogId || l.state.currentSchedulerId),
1029
1029
  "onUpdate:modelValue": async (V) => {
1030
- const [y, ...ae] = V;
1031
- A(n._id, {
1032
- category: y,
1030
+ const [_, ...ae] = V;
1031
+ A(r._id, {
1032
+ category: _,
1033
1033
  additionalCategories: ae.map((xe) => {
1034
- const Be = C == null ? void 0 : C[xe];
1034
+ const Be = x == null ? void 0 : x[xe];
1035
1035
  return Be || {
1036
1036
  _id: xe,
1037
1037
  position: null
@@ -1044,35 +1044,35 @@ const Ye = /* @__PURE__ */ B({
1044
1044
  }, {
1045
1045
  id: "tagging",
1046
1046
  accessorKey: "tagging",
1047
- header: () => l("menu.product.table.columns.tagging"),
1047
+ header: () => t("menu.product.table.columns.tagging"),
1048
1048
  enableSorting: !1,
1049
1049
  size: 140,
1050
1050
  cell: (o) => {
1051
- const n = o.row.original;
1051
+ const r = o.row.original;
1052
1052
  return q(Ue, {
1053
- customAttributes: n.customAttributes
1053
+ customAttributes: r.customAttributes
1054
1054
  });
1055
1055
  }
1056
1056
  }, {
1057
1057
  accessorKey: "orderFrom",
1058
- header: () => l("menu.product.table.columns.order_from"),
1058
+ header: () => t("menu.product.table.columns.order_from"),
1059
1059
  enableSorting: !0,
1060
- sortingFn: (o, n) => {
1061
- const [i, p] = [o, n].map((C) => ie[C.original.orderFrom].sortingIndex);
1062
- return i - p;
1060
+ sortingFn: (o, r) => {
1061
+ const [c, p] = [o, r].map((x) => ie[x.original.orderFrom].sortingIndex);
1062
+ return c - p;
1063
1063
  },
1064
1064
  size: 140,
1065
1065
  cell: (o) => {
1066
- const n = o.getValue(), i = o.row.original;
1066
+ const r = o.getValue(), c = o.row.original;
1067
1067
  return S.value ? q(te.FmSelect, {
1068
- disabled: !h.value.orderFrom,
1068
+ disabled: !y.value.orderFrom,
1069
1069
  items: Object.values(Ce()),
1070
- modelValue: P(i._id, "orderFrom") ?? n,
1070
+ modelValue: P(c._id, "orderFrom") ?? r,
1071
1071
  "onUpdate:modelValue": async (p) => {
1072
- $(i._id, "orderFrom", p);
1072
+ $(c._id, "orderFrom", p);
1073
1073
  }
1074
1074
  }) : q(Ve, {
1075
- orderFrom: n
1075
+ orderFrom: r
1076
1076
  });
1077
1077
  }
1078
1078
  }, {
@@ -1094,42 +1094,42 @@ const Ye = /* @__PURE__ */ B({
1094
1094
  type: "button"
1095
1095
  }), "Bulk edit")]),
1096
1096
  cell: (o) => {
1097
- const n = o.row.original;
1098
- return c("div", {
1097
+ const r = o.row.original;
1098
+ return d("div", {
1099
1099
  class: "px-4 flex justify-end"
1100
- }, [c(Sl, null, {
1100
+ }, [d(Sl, null, {
1101
1101
  default: ({
1102
- trigger: i
1103
- }) => c(te.FmButton, {
1102
+ trigger: c
1103
+ }) => d(te.FmButton, {
1104
1104
  icon: "overview",
1105
1105
  variant: "tertiary",
1106
1106
  textColor: W.NeutralGray400,
1107
1107
  onClick: fe(() => {
1108
- i(n._id);
1108
+ c(r._id);
1109
1109
  }, ["stop", "prevent"])
1110
1110
  }, null)
1111
- }), c(te.FmButton, {
1111
+ }), d(te.FmButton, {
1112
1112
  icon: "delete",
1113
1113
  variant: "tertiary",
1114
1114
  textColor: W.NeutralGray400,
1115
1115
  onClick: fe(async () => {
1116
1116
  await f.deleteItem([{
1117
- _id: n._id,
1118
- name: n.name,
1119
- thumbnail: n.thumbnail
1117
+ _id: r._id,
1118
+ name: r.name,
1119
+ thumbnail: r.thumbnail
1120
1120
  }]);
1121
1121
  }, ["stop", "prevent"])
1122
1122
  }, null)]);
1123
1123
  }
1124
1124
  }]);
1125
- a.taxSetting.systemCode || ce.value.splice(4, 1);
1125
+ l.taxSetting.systemCode || ce.value.splice(4, 1);
1126
1126
  const le = F({}), X = F([]);
1127
1127
  de([() => le.value, () => Q.value], (o) => {
1128
- let n = [];
1129
- Object.keys(o[0]).forEach((i) => {
1130
- const p = o[0][i], C = Q.value[parseInt(i)];
1131
- C && (p ? n.push(C) : X.value = n.filter((V) => V !== C));
1132
- }), X.value = n;
1128
+ let r = [];
1129
+ Object.keys(o[0]).forEach((c) => {
1130
+ const p = o[0][c], x = Q.value[parseInt(c)];
1131
+ x && (p ? r.push(x) : X.value = r.filter((V) => V !== x));
1132
+ }), X.value = r;
1133
1133
  }), de(() => z.value, () => {
1134
1134
  le.value = {}, X.value = [];
1135
1135
  }), de(() => S.value, () => {
@@ -1140,9 +1140,9 @@ const Ye = /* @__PURE__ */ B({
1140
1140
  };
1141
1141
  async function Oe() {
1142
1142
  await Ae();
1143
- const o = () => !!a.currentCatalog || !!a.state.currentSchedulerId, n = (p) => p === "" || p === null ? o() ? "" : null : p, i = Object.values(r.modelValue).filter((p) => {
1144
- const C = Object.values(r.originalValue).find((V) => V._id === p._id);
1145
- return Ee(C, p);
1143
+ const o = () => !!l.currentCatalog || !!l.state.currentSchedulerId, r = (p) => p === "" || p === null ? o() ? "" : null : p, c = Object.values(n.modelValue).filter((p) => {
1144
+ const x = Object.values(n.originalValue).find((V) => V._id === p._id);
1145
+ return Ee(x, p);
1146
1146
  }).map((p) => ({
1147
1147
  _id: p._id,
1148
1148
  name: p.name,
@@ -1150,10 +1150,10 @@ const Ye = /* @__PURE__ */ B({
1150
1150
  price: p.price,
1151
1151
  orderFrom: p.orderFrom ?? null,
1152
1152
  taxes: p.taxes,
1153
- category: n(p.category || null),
1153
+ category: r(p.category || null),
1154
1154
  additionalCategories: p.additionalCategories
1155
1155
  }));
1156
- await f.updateMany(i), oe(!1);
1156
+ await f.updateMany(c), oe(!1);
1157
1157
  }
1158
1158
  const st = async () => {
1159
1159
  await f.deleteItem(X.value.map((o) => ({
@@ -1164,7 +1164,7 @@ const Ye = /* @__PURE__ */ B({
1164
1164
  }, he = () => {
1165
1165
  Y("reset:model-value");
1166
1166
  }, $e = () => {
1167
- Object.entries(r.modelValue).some(([n, i]) => Ee(i, r.originalValue[n])) ? v.open({
1167
+ Object.entries(n.modelValue).some(([r, c]) => Ee(c, n.originalValue[r])) ? v.open({
1168
1168
  title: "You have unsaved changes!",
1169
1169
  message: "Are you sure you want to discard? You will lose all the changes if discard edit.",
1170
1170
  primaryActions: {
@@ -1179,12 +1179,12 @@ const Ye = /* @__PURE__ */ B({
1179
1179
  }).onPrimary(() => {
1180
1180
  he(), oe(!1);
1181
1181
  }) : (oe(!1), he());
1182
- }, ut = x(() => {
1183
- var o, n;
1182
+ }, ut = h(() => {
1183
+ var o, r;
1184
1184
  return {
1185
1185
  thumbnail: !S.value,
1186
1186
  actions: !S.value,
1187
- tagging: !S.value && ((n = (o = s.itemAttributeSettings) == null ? void 0 : o.value) == null ? void 0 : n.length) > 0
1187
+ tagging: !S.value && ((r = (o = u.itemAttributeSettings) == null ? void 0 : o.value) == null ? void 0 : r.length) > 0
1188
1188
  };
1189
1189
  }), it = (o) => {
1190
1190
  f.update(o._id);
@@ -1193,159 +1193,159 @@ const Ye = /* @__PURE__ */ B({
1193
1193
  await f.update(o.original._id);
1194
1194
  }
1195
1195
  function Ke(o) {
1196
- var y;
1197
- const n = o.price ?? // TODO: fix type error
1196
+ var _;
1197
+ const r = o.price ?? // TODO: fix type error
1198
1198
  // @ts-ignore
1199
1199
  o.fallbackPrice ?? me.Dinero.fromNumber({
1200
1200
  number: 0
1201
- }).toObject(), i = o.taxes, p = a.taxSetting.countryTaxOptions, C = me.Dinero.fromFdoDinero(n).toFormat(), V = (y = _.value) == null ? void 0 : y.currency.symbol;
1202
- return a.getSelectedTax(
1203
- i,
1201
+ }).toObject(), c = o.taxes, p = l.taxSetting.countryTaxOptions, x = me.Dinero.fromFdoDinero(r).toFormat(), V = (_ = b.value) == null ? void 0 : _.currency.symbol;
1202
+ return l.getSelectedTax(
1203
+ c,
1204
1204
  // TODO: fix type error
1205
1205
  // @ts-ignore
1206
1206
  o.fallbackTaxes,
1207
1207
  p
1208
- ), `${V == null ? void 0 : V.toUpperCase()}${C}`;
1208
+ ), `${V == null ? void 0 : V.toUpperCase()}${x}`;
1209
1209
  }
1210
1210
  function Te(o) {
1211
1211
  var p;
1212
- const n = a.currentCatalog, i = a.state.currentSchedulerId;
1213
- if (n && i) {
1214
- const C = n.override.scheduler[i] ?? {}, V = (p = C == null ? void 0 : C.items) == null ? void 0 : p.filter((y) => y._id === o);
1212
+ const r = l.currentCatalog, c = l.state.currentSchedulerId;
1213
+ if (r && c) {
1214
+ const x = r.override.scheduler[c] ?? {}, V = (p = x == null ? void 0 : x.items) == null ? void 0 : p.filter((_) => _._id === o);
1215
1215
  return V == null ? void 0 : V[0];
1216
- } else return n ? n.override.items[o][0] : i ? a.schedulers.find((y) => y._id === i).items.filter((y) => y._id === o)[0] : z.value.find((C) => C._id === o);
1216
+ } else return r ? r.override.items[o][0] : c ? l.schedulers.find((_) => _._id === c).items.filter((_) => _._id === o)[0] : z.value.find((x) => x._id === o);
1217
1217
  }
1218
- const dt = nt(), mt = x(() => dt.breakpoints.value.xs), Ne = F(null), pt = At(Ne, Z), vt = x(() => {
1219
- var n;
1218
+ const dt = rt(), mt = h(() => dt.breakpoints.value.xs), Ne = F(null), pt = At(Ne, Z), vt = h(() => {
1219
+ var r;
1220
1220
  return {
1221
- height: `calc(100vh - ${((n = pt.value) == null ? void 0 : n.top) + 24}px)`
1221
+ height: `calc(100vh - ${((r = pt.value) == null ? void 0 : r.top) + 24}px)`
1222
1222
  };
1223
1223
  });
1224
- return (o, n) => {
1225
- const i = O("fm-search"), p = O("fm-button"), C = O("fm-table"), V = O("fm-form");
1226
- return mt.value ? (d(), k("div", Dl, [b("div", Ol, [b("div", Kl, [c(i, {
1224
+ return (o, r) => {
1225
+ const c = O("fm-search"), p = O("fm-button"), x = O("fm-table"), V = O("fm-form");
1226
+ return mt.value ? (m(), k("div", Dl, [g("div", Ol, [g("div", Kl, [d(c, {
1227
1227
  "model-value": J.value,
1228
- "onUpdate:modelValue": n[5] || (n[5] = (y) => J.value = y),
1228
+ "onUpdate:modelValue": r[5] || (r[5] = (_) => J.value = _),
1229
1229
  autofocus: "",
1230
- placeholder: t(l)("menu.product.table.search.placeholder")
1231
- }, null, 8, ["model-value", "placeholder"])]), n[8] || (n[8] = b("div", {
1230
+ placeholder: a(t)("menu.product.table.search.placeholder")
1231
+ }, null, 8, ["model-value", "placeholder"])]), r[8] || (r[8] = g("div", {
1232
1232
  class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
1233
- }, null, -1)), b("div", Nl, [_e(o.$slots, "filter")]), Z.value ? (d(), k("div", Bl, [c(t(We), {
1233
+ }, null, -1)), g("div", Nl, [_e(o.$slots, "filter")]), Z.value ? (m(), k("div", Bl, [d(a(We), {
1234
1234
  ref_key: "attributeFilterRef",
1235
- ref: ne,
1236
- attributes: t(K),
1237
- modelValue: t(D),
1238
- "onUpdate:modelValue": n[6] || (n[6] = (y) => je(D) ? D.value = y : null)
1239
- }, null, 8, ["attributes", "modelValue"])])) : U("", !0)]), z.value.length ? (d(), k("div", jl, [(d(!0), k(pe, null, we(Q.value, (y) => {
1235
+ ref: re,
1236
+ attributes: a(K),
1237
+ modelValue: a(D),
1238
+ "onUpdate:modelValue": r[6] || (r[6] = (_) => je(D) ? D.value = _ : null)
1239
+ }, null, 8, ["attributes", "modelValue"])])) : U("", !0)]), z.value.length ? (m(), k("div", jl, [(m(!0), k(pe, null, we(Q.value, (_) => {
1240
1240
  var ae;
1241
- return d(), k("div", {
1242
- key: y._id,
1241
+ return m(), k("div", {
1242
+ key: _._id,
1243
1243
  class: "max-w-full py-12 px-16 space-x-16 flex items-center",
1244
- onClick: () => it(y)
1245
- }, [b("div", Gl, [c(Me, {
1246
- alt: y.name,
1244
+ onClick: () => it(_)
1245
+ }, [g("div", Gl, [d(Me, {
1246
+ alt: _.name,
1247
1247
  size: 72,
1248
- src: y.thumbnail
1249
- }, null, 8, ["alt", "src"]), b("div", Ll, [b("div", ql, [b("p", Wl, N(y.name), 1), c(Ve, {
1250
- "order-from": y.orderFrom
1251
- }, null, 8, ["order-from"])]), b("p", Hl, N(Ke(y)), 1), b("p", Ql, N(t(l)("menu.product.table.columns.code")) + ": " + N(((ae = Te(y._id)) == null ? void 0 : ae.code) || "--"), 1), b("p", Yl, [c(Qe, {
1252
- categories: t(Pe)(t(se), y)
1253
- }, null, 8, ["categories"])]), c(Ue, {
1254
- "custom-attributes": y.customAttributes
1255
- }, null, 8, ["custom-attributes"])])]), c(p, {
1256
- "text-color": t(W).NeutralGray400,
1257
- variant: t(ee).Tertiary,
1248
+ src: _.thumbnail
1249
+ }, null, 8, ["alt", "src"]), g("div", Ll, [g("div", ql, [g("p", Wl, N(_.name), 1), d(Ve, {
1250
+ "order-from": _.orderFrom
1251
+ }, null, 8, ["order-from"])]), g("p", Hl, N(Ke(_)), 1), g("p", Ql, N(a(t)("menu.product.table.columns.code")) + ": " + N(((ae = Te(_._id)) == null ? void 0 : ae.code) || "--"), 1), g("p", Yl, [d(Qe, {
1252
+ categories: a(Pe)(a(se), _)
1253
+ }, null, 8, ["categories"])]), d(Ue, {
1254
+ "custom-attributes": _.customAttributes
1255
+ }, null, 8, ["custom-attributes"])])]), d(p, {
1256
+ "text-color": a(W).NeutralGray400,
1257
+ variant: a(ee).Tertiary,
1258
1258
  "prepend-icon": "delete",
1259
- onClick: fe(() => t(f).deleteItem([{
1260
- _id: y._id,
1261
- name: y.name,
1262
- thumbnail: y.thumbnail
1259
+ onClick: fe(() => a(f).deleteItem([{
1260
+ _id: _._id,
1261
+ name: _.name,
1262
+ thumbnail: _.thumbnail
1263
1263
  }]), ["stop"])
1264
1264
  }, null, 8, ["text-color", "variant", "onClick"])], 8, El);
1265
- }), 128))])) : (d(), k("div", Zl, [c(be, {
1266
- subtitle: t(l)("menu.product.table.empty.subtitle"),
1267
- title: t(l)("menu.product.table.empty.title")
1265
+ }), 128))])) : (m(), k("div", Zl, [d(be, {
1266
+ subtitle: a(t)("menu.product.table.empty.subtitle"),
1267
+ title: a(t)("menu.product.table.empty.title")
1268
1268
  }, {
1269
- action: T(() => [b("div", Jl, [c(p, {
1270
- variant: t(ee).Primary,
1271
- label: t(l)("menu.product.table.empty.actions.add"),
1269
+ action: T(() => [g("div", Jl, [d(p, {
1270
+ variant: a(ee).Primary,
1271
+ label: a(t)("menu.product.table.empty.actions.add"),
1272
1272
  "prepend-icon": "add",
1273
- onClick: n[7] || (n[7] = (y) => t(f).create(null))
1274
- }, null, 8, ["variant", "label"]), c(Ye, null, {
1273
+ onClick: r[7] || (r[7] = (_) => a(f).create(null))
1274
+ }, null, 8, ["variant", "label"]), d(Ye, null, {
1275
1275
  default: T(({
1276
- trigger: y
1277
- }) => [c(p, {
1278
- "bg-color": t(W).NeutralGray100,
1279
- "text-color": t(W).NeutralGray400,
1280
- variant: t(ee).Primary,
1281
- label: t(l)("menu.product.table.empty.actions.import"),
1276
+ trigger: _
1277
+ }) => [d(p, {
1278
+ "bg-color": a(W).NeutralGray100,
1279
+ "text-color": a(W).NeutralGray400,
1280
+ variant: a(ee).Primary,
1281
+ label: a(t)("menu.product.table.empty.actions.import"),
1282
1282
  "prepend-icon": "download",
1283
- onClick: y
1283
+ onClick: _
1284
1284
  }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])]),
1285
1285
  _: 1
1286
1286
  })])]),
1287
1287
  _: 1
1288
- }, 8, ["subtitle", "title"])]))])) : (d(), I(V, {
1288
+ }, 8, ["subtitle", "title"])]))])) : (m(), I(V, {
1289
1289
  key: 0,
1290
1290
  "blame-form-child-on-validation-failed": "",
1291
1291
  class: "flex flex-col flex-1 space-y-8 overflow-hidden",
1292
1292
  onValidationSuccess: Oe
1293
1293
  }, {
1294
- default: T(() => [b("div", Fl, [b("div", Il, [_e(o.$slots, "filter")]), b("div", $l, [c(i, {
1294
+ default: T(() => [g("div", Fl, [g("div", Il, [_e(o.$slots, "filter")]), g("div", $l, [d(c, {
1295
1295
  "model-value": J.value,
1296
- "onUpdate:modelValue": n[0] || (n[0] = (y) => J.value = y),
1296
+ "onUpdate:modelValue": r[0] || (r[0] = (_) => J.value = _),
1297
1297
  autofocus: "",
1298
- placeholder: t(l)("menu.product.table.search.placeholder")
1299
- }, null, 8, ["model-value", "placeholder"])])]), Z.value ? (d(), k("div", Tl, [c(t(We), {
1298
+ placeholder: a(t)("menu.product.table.search.placeholder")
1299
+ }, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), k("div", Tl, [d(a(We), {
1300
1300
  ref_key: "attributeFilterRef",
1301
- ref: ne,
1302
- attributes: t(K),
1303
- modelValue: t(D),
1304
- "onUpdate:modelValue": n[1] || (n[1] = (y) => je(D) ? D.value = y : null)
1305
- }, null, 8, ["attributes", "modelValue"])])) : U("", !0), z.value.length ? (d(), k("div", Pl, [X.value.length && !S.value ? (d(), k("div", Al, [b("p", Rl, N(t(l)("menu.product.table.selection.count", {
1301
+ ref: re,
1302
+ attributes: a(K),
1303
+ modelValue: a(D),
1304
+ "onUpdate:modelValue": r[1] || (r[1] = (_) => je(D) ? D.value = _ : null)
1305
+ }, null, 8, ["attributes", "modelValue"])])) : U("", !0), z.value.length ? (m(), k("div", Pl, [X.value.length && !S.value ? (m(), k("div", Al, [g("p", Rl, N(a(t)("menu.product.table.selection.count", {
1306
1306
  count: X.value.length
1307
- })), 1), c(p, {
1308
- label: t(l)("menu.product.table.selection.actions.deselect_all"),
1307
+ })), 1), d(p, {
1308
+ label: a(t)("menu.product.table.selection.actions.deselect_all"),
1309
1309
  type: "button",
1310
1310
  variant: "plain",
1311
1311
  onClick: ye
1312
- }, null, 8, ["label"]), c(p, {
1313
- "border-color": t(W).SystemError300,
1314
- "text-color": t(W).SystemError300,
1312
+ }, null, 8, ["label"]), d(p, {
1313
+ "border-color": a(W).SystemError300,
1314
+ "text-color": a(W).SystemError300,
1315
1315
  class: "ml-auto",
1316
- label: t(l)("menu.product.table.selection.actions.remove"),
1316
+ label: a(t)("menu.product.table.selection.actions.remove"),
1317
1317
  "prepend-icon": "delete",
1318
1318
  variant: "secondary",
1319
1319
  onClick: st
1320
- }, null, 8, ["border-color", "text-color", "label"])])) : U("", !0), S.value ? (d(), k("div", Ul, [c(p, {
1321
- variant: t(ee).Tertiary,
1322
- label: t(l)("menu.product.table.bulk_edit.actions.reset_all"),
1320
+ }, null, 8, ["border-color", "text-color", "label"])])) : U("", !0), S.value ? (m(), k("div", Ul, [d(p, {
1321
+ variant: a(ee).Tertiary,
1322
+ label: a(t)("menu.product.table.bulk_edit.actions.reset_all"),
1323
1323
  onClick: he
1324
- }, null, 8, ["variant", "label"]), c(p, {
1325
- variant: t(ee).Tertiary,
1326
- label: t(l)("menu.common.actions.cancel"),
1324
+ }, null, 8, ["variant", "label"]), d(p, {
1325
+ variant: a(ee).Tertiary,
1326
+ label: a(t)("menu.common.actions.cancel"),
1327
1327
  onClick: $e
1328
- }, null, 8, ["variant", "label"]), c(p, {
1329
- borderColor: t(W).ColorPrimary,
1330
- textColor: t(W).ColorPrimary,
1331
- variant: t(ee).Secondary,
1332
- label: t(l)("menu.product.table.bulk_edit.actions.save"),
1328
+ }, null, 8, ["variant", "label"]), d(p, {
1329
+ borderColor: a(W).ColorPrimary,
1330
+ textColor: a(W).ColorPrimary,
1331
+ variant: a(ee).Secondary,
1332
+ label: a(t)("menu.product.table.bulk_edit.actions.save"),
1333
1333
  type: "submit"
1334
- }, null, 8, ["borderColor", "textColor", "variant", "label"])])) : U("", !0), b("div", {
1334
+ }, null, 8, ["borderColor", "textColor", "variant", "label"])])) : U("", !0), g("div", {
1335
1335
  ref_key: "tableWrapper",
1336
1336
  ref: Ne
1337
- }, [(d(), I(lt(S.value ? Pt : "div"), {
1337
+ }, [(m(), I(lt(S.value ? Pt : "div"), {
1338
1338
  ref: "fullWrapper",
1339
- title: S.value ? t(l)("menu.product.table.bulk_edit.title") : "",
1339
+ title: S.value ? a(t)("menu.product.table.bulk_edit.title") : "",
1340
1340
  show: S.value,
1341
1341
  "primary-action": {
1342
- label: t(l)("menu.product.table.bulk_edit.actions.save")
1342
+ label: a(t)("menu.product.table.bulk_edit.actions.save")
1343
1343
  },
1344
1344
  "secondary-actions": [{
1345
- label: t(l)("menu.product.table.bulk_edit.actions.reset_all"),
1345
+ label: a(t)("menu.product.table.bulk_edit.actions.reset_all"),
1346
1346
  click: he
1347
1347
  }, {
1348
- label: t(l)("menu.common.actions.cancel"),
1348
+ label: a(t)("menu.common.actions.cancel"),
1349
1349
  click: $e
1350
1350
  }],
1351
1351
  class: "overflow-x-scroll",
@@ -1353,16 +1353,16 @@ const Ye = /* @__PURE__ */ B({
1353
1353
  onOnPrimary: Oe,
1354
1354
  onOnCancel: $e
1355
1355
  }, {
1356
- default: T(() => [c(C, {
1356
+ default: T(() => [d(x, {
1357
1357
  class: ve({
1358
1358
  "min-w-[1100px]": !0,
1359
1359
  "mt-24": S.value
1360
1360
  }),
1361
1361
  modelValue: le.value,
1362
- "onUpdate:modelValue": n[2] || (n[2] = (y) => le.value = y),
1362
+ "onUpdate:modelValue": r[2] || (r[2] = (_) => le.value = _),
1363
1363
  "column-defs": ce.value,
1364
1364
  "column-visibility": ut.value,
1365
- loading: g.isCalculating,
1365
+ loading: o.isCalculating,
1366
1366
  "page-size": Q.value.length,
1367
1367
  "row-data": Q.value,
1368
1368
  "shrink-at": !1,
@@ -1371,28 +1371,28 @@ const Ye = /* @__PURE__ */ B({
1371
1371
  "virtual-row-height": S.value ? 48 : 91,
1372
1372
  "hide-footer": "",
1373
1373
  "pin-header-row": "",
1374
- onRowClick: n[3] || (n[3] = (y) => S.value ? void 0 : ct(y))
1374
+ onRowClick: r[3] || (r[3] = (_) => S.value ? void 0 : ct(_))
1375
1375
  }, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection", "virtual-row-height"])]),
1376
1376
  _: 1
1377
- }, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (d(), k("div", Ml, [c(be, {
1378
- subtitle: t(l)("menu.product.table.empty.subtitle"),
1379
- title: t(l)("menu.product.table.empty.title")
1377
+ }, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), k("div", Ml, [d(be, {
1378
+ subtitle: a(t)("menu.product.table.empty.subtitle"),
1379
+ title: a(t)("menu.product.table.empty.title")
1380
1380
  }, {
1381
- action: T(() => [b("div", zl, [c(p, {
1382
- variant: t(ee).Primary,
1383
- label: t(l)("menu.product.table.empty.actions.add"),
1381
+ action: T(() => [g("div", zl, [d(p, {
1382
+ variant: a(ee).Primary,
1383
+ label: a(t)("menu.product.table.empty.actions.add"),
1384
1384
  "prepend-icon": "add",
1385
- onClick: n[4] || (n[4] = (y) => t(f).create(null))
1386
- }, null, 8, ["variant", "label"]), c(Ye, null, {
1385
+ onClick: r[4] || (r[4] = (_) => a(f).create(null))
1386
+ }, null, 8, ["variant", "label"]), d(Ye, null, {
1387
1387
  default: T(({
1388
- trigger: y
1389
- }) => [c(p, {
1390
- "bg-color": t(W).NeutralGray100,
1391
- "text-color": t(W).NeutralGray400,
1392
- variant: t(ee).Primary,
1393
- label: t(l)("menu.product.table.empty.actions.import"),
1388
+ trigger: _
1389
+ }) => [d(p, {
1390
+ "bg-color": a(W).NeutralGray100,
1391
+ "text-color": a(W).NeutralGray400,
1392
+ variant: a(ee).Primary,
1393
+ label: a(t)("menu.product.table.empty.actions.import"),
1394
1394
  "prepend-icon": "download",
1395
- onClick: y
1395
+ onClick: _
1396
1396
  }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])]),
1397
1397
  _: 1
1398
1398
  })])]),
@@ -1412,22 +1412,22 @@ const Ye = /* @__PURE__ */ B({
1412
1412
  class: "pt-16 xs:pt-8 space-y-24"
1413
1413
  }, oa = { class: "flex items-center gap-8 px-16" }, Sa = /* @__PURE__ */ B({
1414
1414
  __name: "Product",
1415
- setup(g) {
1416
- const e = Fe(), m = x(() => e.rules.item), r = ot(), l = x(() => !e.state.currentCatalogId), s = x(() => e.rules.item), a = x(() => !e.state.currentSchedulerId), v = F(!1), f = F(!1), u = x(() => {
1415
+ setup(C) {
1416
+ const e = Fe(), i = h(() => e.rules.item), n = ot(), t = h(() => !e.state.currentCatalogId), u = h(() => e.rules.item), l = h(() => !e.state.currentSchedulerId), v = F(!1), f = F(!1), s = h(() => {
1417
1417
  var $, P, A, ue;
1418
- if (l.value && a.value) return;
1419
- if (a.value) {
1418
+ if (t.value && l.value) return;
1419
+ if (l.value) {
1420
1420
  const L = ($ = e.currentCatalog) == null ? void 0 : $.override.items;
1421
1421
  return L ? Object.entries(L).reduce((j, [M, ie]) => {
1422
1422
  const E = ie.find((ce) => !ce.combinationKey);
1423
1423
  return E && (j[M] = E), j;
1424
1424
  }, {}) : {};
1425
1425
  }
1426
- return ((l.value ? (P = e.currentScheduler) == null ? void 0 : P.items : (ue = (A = e.currentCatalog) == null ? void 0 : A.override.scheduler[e.state.currentSchedulerId]) == null ? void 0 : ue.items) ?? []).reduce((L, j) => (j.combinationKey || (L[j._id] = j), L), {});
1427
- }), _ = F({}), h = F({}), w = async () => {
1426
+ return ((t.value ? (P = e.currentScheduler) == null ? void 0 : P.items : (ue = (A = e.currentCatalog) == null ? void 0 : A.override.scheduler[e.state.currentSchedulerId]) == null ? void 0 : ue.items) ?? []).reduce((L, j) => (j.combinationKey || (L[j._id] = j), L), {});
1427
+ }), b = F({}), y = F({}), w = async () => {
1428
1428
  var ue, L;
1429
1429
  f.value = !0;
1430
- const R = !!u.value, $ = ge.flatten(Y.value.map((j) => j.items)), P = R && v.value ? await Ft(
1430
+ const R = !!s.value, $ = ge.flatten(Y.value.map((j) => j.items)), P = R && v.value ? await Ft(
1431
1431
  e.mergedMenu,
1432
1432
  $,
1433
1433
  e.state.menu,
@@ -1436,14 +1436,14 @@ const Ye = /* @__PURE__ */ B({
1436
1436
  !1
1437
1437
  ) : void 0, A = $.reduce((j, M, ie) => {
1438
1438
  var ce, le, X, ye;
1439
- const E = (ce = u.value) == null ? void 0 : ce[M._id];
1439
+ const E = (ce = s.value) == null ? void 0 : ce[M._id];
1440
1440
  return j[M._id] = {
1441
1441
  _id: M._id,
1442
1442
  name: M.name,
1443
1443
  code: R ? E == null ? void 0 : E.code : M == null ? void 0 : M.code,
1444
1444
  category: M.category,
1445
1445
  additionalCategories: M.additionalCategories,
1446
- price: R && s.value.editPrice ? E == null ? void 0 : E.price : M.price,
1446
+ price: R && u.value.editPrice ? E == null ? void 0 : E.price : M.price,
1447
1447
  orderFrom: R ? E == null ? void 0 : E.orderFrom : M.orderFrom,
1448
1448
  taxes: R ? null : M.taxes,
1449
1449
  thumbnail: M.thumbnail,
@@ -1454,7 +1454,7 @@ const Ye = /* @__PURE__ */ B({
1454
1454
  fallbackTaxes: R ? M.taxes : null
1455
1455
  }, j;
1456
1456
  }, {});
1457
- _.value = A, h.value = { ...A }, f.value = !1;
1457
+ b.value = A, y.value = { ...A }, f.value = !1;
1458
1458
  }, { categories: z, selectedCategories: Y } = Se(), S = F(null);
1459
1459
  function oe() {
1460
1460
  S.value && S.value.toggleAttributeFilter();
@@ -1463,88 +1463,88 @@ const Ye = /* @__PURE__ */ B({
1463
1463
  Y.value && await w();
1464
1464
  });
1465
1465
  function Z() {
1466
- r.create(null);
1466
+ n.create(null);
1467
1467
  }
1468
- const ne = () => {
1468
+ const re = () => {
1469
1469
  Y.value && w();
1470
- }, { t: G } = Ie(), K = x(() => {
1470
+ }, { t: G } = Ie(), K = h(() => {
1471
1471
  var R, $;
1472
1472
  return ($ = (R = e.currentCatalog) == null ? void 0 : R.linkItemRules) == null ? void 0 : $.length;
1473
1473
  }), {
1474
1474
  menuItems: D,
1475
1475
  categories: H,
1476
1476
  linkItemRules: J,
1477
- handleSubmit: re,
1477
+ handleSubmit: ne,
1478
1478
  catalogManager: Q,
1479
1479
  schedulerManager: se
1480
1480
  } = kt(!1);
1481
1481
  return (R, $) => {
1482
1482
  const P = O("fm-button");
1483
- return t(z).length ? (d(), k("div", ea, [
1484
- b("div", ta, [
1485
- b("div", la, [
1486
- t(Y) ? (d(), I(Xl, {
1483
+ return a(z).length ? (m(), k("div", ea, [
1484
+ g("div", ta, [
1485
+ g("div", la, [
1486
+ a(Y) ? (m(), I(Xl, {
1487
1487
  key: 0,
1488
1488
  ref_key: "productTableRef",
1489
1489
  ref: S,
1490
1490
  "is-calculating": f.value,
1491
- "model-value": _.value,
1492
- "original-value": h.value,
1493
- "onUpdate:modelValue": $[1] || ($[1] = (A) => _.value = A),
1494
- "onReset:modelValue": ne,
1491
+ "model-value": b.value,
1492
+ "original-value": y.value,
1493
+ "onUpdate:modelValue": $[1] || ($[1] = (A) => b.value = A),
1494
+ "onReset:modelValue": re,
1495
1495
  "onUpdate:editing": $[2] || ($[2] = (A) => v.value = A)
1496
1496
  }, {
1497
1497
  filter: T(() => [
1498
- c(He, { onToggleAttributeFilter: oe }),
1499
- s.value.multiScheduler ? (d(), I(qe, { key: 0 })) : U("", !0),
1500
- K.value ? (d(), I(Le, {
1498
+ d(He, { onToggleAttributeFilter: oe }),
1499
+ u.value.multiScheduler ? (m(), I(qe, { key: 0 })) : U("", !0),
1500
+ K.value ? (m(), I(Le, {
1501
1501
  key: 1,
1502
- "current-restaurant-attr-params": t(e).state.currentRestaurantAttrParams,
1503
- onConfirm: $[0] || ($[0] = (A) => t(e).setRestaurantAttrParams(A))
1502
+ "current-restaurant-attr-params": a(e).state.currentRestaurantAttrParams,
1503
+ onConfirm: $[0] || ($[0] = (A) => a(e).setRestaurantAttrParams(A))
1504
1504
  }, null, 8, ["current-restaurant-attr-params"])) : U("", !0)
1505
1505
  ]),
1506
1506
  _: 1
1507
1507
  }, 8, ["is-calculating", "model-value", "original-value"])) : U("", !0)
1508
1508
  ])
1509
1509
  ])
1510
- ])) : (d(), k("div", aa, [
1511
- b("div", oa, [
1512
- c(He),
1513
- s.value.multiScheduler ? (d(), I(qe, { key: 0 })) : U("", !0),
1514
- K.value ? (d(), I(Le, {
1510
+ ])) : (m(), k("div", aa, [
1511
+ g("div", oa, [
1512
+ d(He),
1513
+ u.value.multiScheduler ? (m(), I(qe, { key: 0 })) : U("", !0),
1514
+ K.value ? (m(), I(Le, {
1515
1515
  key: 1,
1516
- "current-restaurant-attr-params": t(e).state.currentRestaurantAttrParams,
1517
- onConfirm: $[3] || ($[3] = (A) => t(e).setRestaurantAttrParams(A))
1516
+ "current-restaurant-attr-params": a(e).state.currentRestaurantAttrParams,
1517
+ onConfirm: $[3] || ($[3] = (A) => a(e).setRestaurantAttrParams(A))
1518
1518
  }, null, 8, ["current-restaurant-attr-params"])) : U("", !0)
1519
1519
  ]),
1520
- m.value.create ? (d(), I(be, {
1520
+ i.value.create ? (m(), I(be, {
1521
1521
  key: 0,
1522
1522
  action: {
1523
- text: t(G)("menu.product.empty.with_create.action"),
1523
+ text: a(G)("menu.product.empty.with_create.action"),
1524
1524
  callback: Z
1525
1525
  },
1526
- subtitle: t(G)("menu.product.empty.with_create.subtitle"),
1527
- title: t(G)("menu.product.empty.with_create.title")
1528
- }, null, 8, ["action", "subtitle", "title"])) : a.value ? (d(), I(be, {
1526
+ subtitle: a(G)("menu.product.empty.with_create.subtitle"),
1527
+ title: a(G)("menu.product.empty.with_create.title")
1528
+ }, null, 8, ["action", "subtitle", "title"])) : l.value ? (m(), I(be, {
1529
1529
  key: 1,
1530
- subtitle: t(G)("menu.product.empty.no_scheduler.subtitle"),
1531
- title: t(G)("menu.product.empty.no_scheduler.title")
1530
+ subtitle: a(G)("menu.product.empty.no_scheduler.subtitle"),
1531
+ title: a(G)("menu.product.empty.no_scheduler.title")
1532
1532
  }, {
1533
1533
  action: T(() => [
1534
- c(Ge, {
1535
- "categorized-items": t(Q).linkableItems.value,
1536
- "initial-value": t(Q).currentItems.value,
1534
+ d(Ge, {
1535
+ "categorized-items": a(Q).linkableItems.value,
1536
+ "initial-value": a(Q).currentItems.value,
1537
1537
  "show-variant": !1,
1538
- "menu-items": t(D),
1539
- categories: t(H),
1540
- "link-item-rules": t(J),
1541
- "no-scheduler": a.value,
1538
+ "menu-items": a(D),
1539
+ categories: a(H),
1540
+ "link-item-rules": a(J),
1541
+ "no-scheduler": l.value,
1542
1542
  "is-local-only": !0,
1543
- onSubmit: t(re)
1543
+ onSubmit: a(ne)
1544
1544
  }, {
1545
1545
  default: T(({ trigger: A }) => [
1546
- c(P, {
1547
- label: t(G)("menu.common.actions.link_product"),
1546
+ d(P, {
1547
+ label: a(G)("menu.common.actions.link_product"),
1548
1548
  "prepend-icon": "link",
1549
1549
  onClick: A
1550
1550
  }, null, 8, ["label", "onClick"])
@@ -1553,26 +1553,26 @@ const Ye = /* @__PURE__ */ B({
1553
1553
  }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])
1554
1554
  ]),
1555
1555
  _: 1
1556
- }, 8, ["subtitle", "title"])) : (d(), I(be, {
1556
+ }, 8, ["subtitle", "title"])) : (m(), I(be, {
1557
1557
  key: 2,
1558
- subtitle: t(G)("menu.product.empty.with_scheduler.subtitle"),
1559
- title: t(G)("menu.product.empty.with_scheduler.title")
1558
+ subtitle: a(G)("menu.product.empty.with_scheduler.subtitle"),
1559
+ title: a(G)("menu.product.empty.with_scheduler.title")
1560
1560
  }, {
1561
1561
  action: T(() => [
1562
- c(Ge, {
1563
- "categorized-items": t(se).linkableItems.value,
1564
- "initial-value": t(se).currentItems.value,
1562
+ d(Ge, {
1563
+ "categorized-items": a(se).linkableItems.value,
1564
+ "initial-value": a(se).currentItems.value,
1565
1565
  "show-variant": !1,
1566
- "menu-items": t(D),
1567
- categories: t(H),
1568
- "link-item-rules": t(J),
1569
- "no-scheduler": a.value,
1566
+ "menu-items": a(D),
1567
+ categories: a(H),
1568
+ "link-item-rules": a(J),
1569
+ "no-scheduler": l.value,
1570
1570
  "is-local-only": !0,
1571
- onSubmit: t(re)
1571
+ onSubmit: a(ne)
1572
1572
  }, {
1573
1573
  default: T(({ trigger: A }) => [
1574
- c(P, {
1575
- label: t(G)("menu.common.actions.apply_product"),
1574
+ d(P, {
1575
+ label: a(G)("menu.common.actions.apply_product"),
1576
1576
  onClick: A
1577
1577
  }, null, 8, ["label", "onClick"])
1578
1578
  ]),