@feedmepos/mf-menu 0.31.74 → 0.31.75-prod

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