@feedmepos/mf-inventory-portal 1.3.17-dev.1 → 1.3.17-dev.2

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 (95) hide show
  1. package/dist/App-BZs8fZKo.js +310 -0
  2. package/dist/{ApprovalView-DZg5b1Vo.js → ApprovalView-k409wjyM.js} +7 -7
  3. package/dist/{BindingsDialog-DEOaWAfN.js → BindingsDialog-B8eMUWro.js} +2 -2
  4. package/dist/{BindingsPicker-CBaP0_go.js → BindingsPicker-DQqBaPmd.js} +2 -2
  5. package/dist/{BindingsTable-CYSQbBMo.js → BindingsTable-DBVIeFhW.js} +3 -3
  6. package/dist/ClosingDraftView-IYvSijlu.js +3183 -0
  7. package/dist/{ClosingHistoryView-ByZgy8dJ.js → ClosingHistoryView-BCoB6tht.js} +5 -5
  8. package/dist/{ClosingTemplateView-Xp6B7V86.js → ClosingTemplateView-CYRes3xE.js} +14 -14
  9. package/dist/{DefaultView-Ww9EZ3Tw.js → DefaultView-Cw2nI7-X.js} +2 -2
  10. package/dist/{DeliveryOrderPrintPreview-Bxff18MY.js → DeliveryOrderPrintPreview-CdiaL8D5.js} +2 -2
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D4TCAKPB.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-k5zRFn32.js} +2 -2
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Y8uj4A2g.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Df-pE1KK.js} +2 -2
  13. package/dist/{FmMultiselectDialog-yBaoE2it.js → FmMultiselectDialog-nflYcmpQ.js} +1 -1
  14. package/dist/{FmMultiselectDialog-EIm10WKr.js → FmMultiselectDialog-wAnP9Seb.js} +2 -2
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CWZ4_Jbz.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bwl1Jqam.js} +4 -4
  16. package/dist/{ImportView-C3jmiWuj.js → ImportView-moP3tPQ7.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BAx0OI85.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-G7yOwwlA.js} +1 -1
  18. package/dist/{IngredientGroupView-Dw0vYx2a.js → IngredientGroupView-B4NShCe7.js} +5 -5
  19. package/dist/{IngredientsView-HpEyhu3q.js → IngredientsView-uhc_mfqq.js} +15 -15
  20. package/dist/{IntegrationExplorerView-B2Zbmg9L.js → IntegrationExplorerView-6R_PAu4l.js} +5 -5
  21. package/dist/{IntegrationView-D8Lf-JBn.js → IntegrationView-kt2CyS2K.js} +13 -13
  22. package/dist/{InventoryBindingForm-DhvR3VDJ.js → InventoryBindingForm-Bxm_y_m_.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D0e5Do4W.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CxxKiDAW.js} +5 -5
  24. package/dist/{InventoryBindingSummary-ByCzh7Zw.js → InventoryBindingSummary-COhLobHu.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DHDa6Va8.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B4qOsAtm.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C3VB9eo-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DShIs4zv.js} +1 -1
  27. package/dist/{PublishView-DShogj2Y.js → PublishView-B6eXjyq0.js} +3 -3
  28. package/dist/{PurchaseOrderPrintPreview-CSYDukX0.js → PurchaseOrderPrintPreview-Bb5ZH7Ze.js} +2 -2
  29. package/dist/{ReceiveRequestView-BilYjNHA.js → ReceiveRequestView-lWK576Cn.js} +25 -25
  30. package/dist/{RecipeView-CEPnsxV6.js → RecipeView-KVhdiv18.js} +17 -17
  31. package/dist/{SettingsView-BWUsUMT0.js → SettingsView-D3ayESIi.js} +4 -4
  32. package/dist/{StockView-DimVSo18.js → StockView-BQAwpib5.js} +19 -19
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BoZNHsLl.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-ZhGaDQV_.js} +1 -1
  34. package/dist/{SupplierView-BL1Vt8Hu.js → SupplierView-C4gyBYWT.js} +12 -12
  35. package/dist/{SurchargeView-C5iu7nmx.js → SurchargeView-CIMnxsAM.js} +6 -6
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-D8AngCJN.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Ddw6IO0s.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CJ3hpM0q.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BgUQep1X.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-V3vfzaKm.js → TransferDetails.vue_vue_type_script_setup_true_lang-AzSsFnV9.js} +20 -20
  39. package/dist/{TransferTemplateView-C9FMvKjc.js → TransferTemplateView-B5zHVuMP.js} +18 -18
  40. package/dist/{UnitCostHistoryView-BfblkkmE.js → UnitCostHistoryView-DW2FSMdR.js} +4 -4
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-WCXlKiXi.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BK41FEeb.js} +4 -4
  42. package/dist/{UnitView-DszSyUEG.js → UnitView-DJF9woxD.js} +7 -7
  43. package/dist/{WarehouseView-mFtihMUO.js → WarehouseView-LRwZezC5.js} +5 -5
  44. package/dist/{WastageTemplateView-CCrrtx0D.js → WastageTemplateView-pS6AdviV.js} +14 -14
  45. package/dist/api/closing-draft.d.ts +12 -0
  46. package/dist/api/sse.d.ts +19 -0
  47. package/dist/api/stock.d.ts +0 -1
  48. package/dist/{app-DLDCXd9a.js → app-Du9hjHZP.js} +2473 -2446
  49. package/dist/app.js +1 -1
  50. package/dist/{closing-template-CrG02xOu.js → closing-template-CdjziuUw.js} +1 -1
  51. package/dist/composable/useSseClient.d.ts +13 -0
  52. package/dist/composable/useSseClient.spec.d.ts +1 -0
  53. package/dist/{date2-CHswjJUp.js → date2-DSeWLgzk.js} +1 -1
  54. package/dist/{dayjs.min-CWIk1QcT.js → dayjs.min-DbVTJwyb.js} +1 -1
  55. package/dist/{decimal-1bd9FS8v.js → decimal-DmzFXaRA.js} +2 -2
  56. package/dist/{defineDeepModel-DK3g-3gd.js → defineDeepModel-Cp75jSVs.js} +1 -1
  57. package/dist/{duplicate-template-BzMQSrk7.js → duplicate-template-DkswfS38.js} +1 -1
  58. package/dist/{export-BHQOvJzX.js → export-DOf-QW3M.js} +1 -1
  59. package/dist/{feature-D4UFa4w1.js → feature-D23WgLdE.js} +2 -2
  60. package/dist/{format-time-from-id-Bp95nZWH.js → format-time-from-id-w5E1yNUV.js} +1 -1
  61. package/dist/{format-unit-display-MAZr_RkJ.js → format-unit-display-C7-lUz9r.js} +11 -11
  62. package/dist/{import-export.helper-Drn_mkbI.js → import-export.helper-KcOyMbsO.js} +6 -6
  63. package/dist/{index-CWfJ663c.js → index-3KZhqtW4.js} +3 -3
  64. package/dist/{index-cSv3T8Vj.js → index-BUMDqEa6.js} +1 -1
  65. package/dist/{index-B0WIt2Bw.js → index-C472V7Tf.js} +1 -1
  66. package/dist/{inventory-core-dart.default-Bj4nC1QO.js → inventory-core-dart.default-DGd8GVhk.js} +1 -1
  67. package/dist/{lodash-CMUcme2U.js → lodash-CRpepM1B.js} +1 -1
  68. package/dist/{lz-string-C_9wi8p9.js → lz-string-BD7AmWsM.js} +1 -1
  69. package/dist/{netsuite-BOZY0FbI.js → netsuite-B_ohVmZD.js} +3 -3
  70. package/dist/{number-j9IKb1r-.js → number-BoWDForP.js} +3 -3
  71. package/dist/{predefined-templates-1ef-YY5Z.js → predefined-templates-CUGfpkjj.js} +1 -1
  72. package/dist/{purchase-order-template-CGjaX-yS.js → purchase-order-template-BIfxRjTb.js} +1 -1
  73. package/dist/{recalculationUtils-Dyp9O9Cn.js → recalculationUtils-D_aoQ2xV.js} +1 -1
  74. package/dist/{rules-D6uxkKZX.js → rules-BfAXqY67.js} +2 -2
  75. package/dist/{stock-C7dY8O1s.js → stock-CHvpVPdC.js} +24 -28
  76. package/dist/{stock-DH1PnK0M.js → stock-TdIYgVjn.js} +3 -3
  77. package/dist/{supplier-Dra-Ks3T.js → supplier-CrOQf12H.js} +2 -2
  78. package/dist/{surcharge-BmtRuvq_.js → surcharge-V2zH-cWZ.js} +1 -1
  79. package/dist/tsconfig.app.tsbuildinfo +1 -1
  80. package/dist/{use-ingredient-select-dialog-DFVuLsiI.js → use-ingredient-select-dialog-CM8XQxUr.js} +2 -2
  81. package/dist/{use-inventory-binding-dialog-CKQ-gykJ.js → use-inventory-binding-dialog-DBHuTmlU.js} +2 -2
  82. package/dist/{use-template-enabled-locations-DNA-6td0.js → use-template-enabled-locations-BaPU4Yrr.js} +2 -2
  83. package/dist/{use-transfer-locations-DTYCSRdI.js → use-transfer-locations-Cm8IvFNy.js} +2 -2
  84. package/dist/{useHrmPermission-D_GdqoyM.js → useHrmPermission-Dd5se0x1.js} +1 -1
  85. package/dist/{useNavigationMenu-Dq9nSvfl.js → useNavigationMenu-C0_Ilh1C.js} +2 -2
  86. package/dist/useSseClient-BinJYKsX.js +502 -0
  87. package/dist/views/closing-draft/composables/use-closing-draft-refresh-balance.d.ts +28 -0
  88. package/dist/views/closing-draft/composables/use-closing-draft-refresh-balance.spec.d.ts +1 -0
  89. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +4 -1
  90. package/dist/{vue-i18n-AgOoUQs7.js → vue-i18n-Bt04xsUS.js} +241 -241
  91. package/dist/{xlsx-BaV8TO1y.js → xlsx-C5yfkOfj.js} +184 -184
  92. package/dist/{xlsx.util-D61aHgAt.js → xlsx.util-D_VXgblQ.js} +1 -1
  93. package/package.json +3 -2
  94. package/dist/App-BM6XrIzj.js +0 -309
  95. package/dist/ClosingDraftView-Bwq-P_gh.js +0 -3061
@@ -1,4 +1,4 @@
1
- import { r as m, u, a as d } from "./xlsx-BaV8TO1y.js";
1
+ import { r as m, u, a as d } from "./xlsx-C5yfkOfj.js";
2
2
  function* x(o) {
3
3
  const [e, n] = o.split(":"), t = /\d+/, l = t.exec(e), c = t.exec(n);
4
4
  if (!l || !c)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-inventory-portal",
3
- "version": "1.3.17-dev.1",
3
+ "version": "1.3.17-dev.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -35,6 +35,7 @@
35
35
  "dinero.js": "^1.9.1",
36
36
  "dompurify": "^3.3.1",
37
37
  "dotenv": "^16.4.5",
38
+ "eventsource": "^4.1.0",
38
39
  "fuzzy": "^0.1.3",
39
40
  "fuzzy-search": "^3.2.1",
40
41
  "google-maps": "^4.3.3",
@@ -50,9 +51,9 @@
50
51
  "vue-i18n": "^10.0.5",
51
52
  "vue-router": "^4.4.0",
52
53
  "xlsx": "^0.18.5",
54
+ "@feedmepos/inventory-core": "^1.0.1-dev.2",
53
55
  "@feedmepos/inventory-core-2": "^2.0.0",
54
56
  "@feedmepos/inventory-core-dart": "^1.0.0",
55
- "@feedmepos/inventory-core": "^1.0.1-dev.2",
56
57
  "@feedmepos/inventory-core-js": "^1.0.1",
57
58
  "@feedmepos/zod-inventory": "^2.0.0",
58
59
  "@feedmepos/netsuite-core": "^1.0.0"
@@ -1,309 +0,0 @@
1
- import { ref as k, onUnmounted as H, computed as y, defineComponent as N, watch as P, onMounted as $, resolveComponent as h, openBlock as m, createElementBlock as g, unref as x, createVNode as _, createElementVNode as n, toDisplayString as b, createBlock as C, createCommentVNode as U, withCtx as R, withDirectives as O, vModelText as j, Fragment as q, renderList as z, createTextVNode as A } from "vue";
2
- import { _ as K } from "./empty-placeholder-B0QU467o.js";
3
- import { u as Q, a as J, R as w, b as W } from "./app-DLDCXd9a.js";
4
- import { useCoreStore as T, useI18n as X } from "@feedmepos/mf-common";
5
- import { useRouter as V, useRoute as Y } from "vue-router";
6
- import { u as Z, a as ee, I as te } from "./feature-D4UFa4w1.js";
7
- import { u as ne } from "./netsuite-BOZY0FbI.js";
8
- import { u as D } from "./useNavigationMenu-Dq9nSvfl.js";
9
- import { u as oe } from "./useTabStorage-BkIVScW_.js";
10
- import { F as se } from "./FmAdminBadge-DjnBAgyv.js";
11
- import { u as re } from "./googlemap-BGi_aKUA.js";
12
- function ae() {
13
- return {
14
- loadingHookInstalled: !1,
15
- isLoading: !1
16
- };
17
- }
18
- const F = k(ae());
19
- function le() {
20
- const p = V();
21
- if (!F.value.loadingHookInstalled) {
22
- F.value.loadingHookInstalled = !0;
23
- const t = p.beforeEach(() => {
24
- F.value.isLoading = !0;
25
- }), u = p.afterEach(() => {
26
- F.value.isLoading = !1;
27
- });
28
- H(() => {
29
- F.value.loadingHookInstalled = !1, t(), u();
30
- });
31
- }
32
- return {
33
- get isLoading() {
34
- return F.value.isLoading;
35
- }
36
- };
37
- }
38
- function ie() {
39
- const { firstAccessibleRouteName: p } = D();
40
- return { hasAnyAccessibleInventoryRoute: y(() => p.value !== null) };
41
- }
42
- const ue = {
43
- key: 0,
44
- class: "flex flex-col items-center w-full h-full gap-24"
45
- }, ce = {
46
- key: 1,
47
- class: "flex flex-col pt-[200px] gap-32 items-center"
48
- }, de = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, me = { class: "fm-typo-en-title-lg-600" }, pe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, fe = {
49
- key: 2,
50
- class: "flex flex-col pt-[200px] gap-32 items-center"
51
- }, ve = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, ge = { class: "fm-typo-en-title-lg-600" }, _e = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, ye = { class: "flex gap-16" }, xe = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, be = { href: "https://feedme.ai/form" }, he = /* @__PURE__ */ N({
52
- __name: "InventoryView",
53
- setup(p) {
54
- const t = Q(), u = J(), i = ne(), r = T(), c = V(), a = le(), e = Z(), { t: l } = X(), { hasAnyAccessibleInventoryRoute: f } = ie();
55
- P(
56
- [() => r.sessionUser.value, () => r.currentBusiness.value],
57
- ([v, d]) => {
58
- o(v, d);
59
- }
60
- ), $(async () => {
61
- await e.init(), await r.readBusinesses();
62
- const v = r.sessionUser.value, d = r.currentBusiness.value;
63
- o(v, d);
64
- });
65
- function o(v, d) {
66
- !v || !d || s();
67
- }
68
- async function s() {
69
- return await t.init(), await i.readSetting().catch((v) => {
70
- console.error("[all] error on reading netsuite store", v);
71
- }), await u.init();
72
- }
73
- const E = y(() => c.currentRoute.value.name === w.TRANSFER_TEMPLATE ? e.enablePoTemplate : c.currentRoute.value.name === w.INGREDIENT_GROUP ? e.enableIngredientGroup : !0), B = y(
74
- () => c.currentRoute.value.matched.some((v) => {
75
- var I;
76
- const d = v.meta, S = d == null ? void 0 : d.validationManifest;
77
- return (((I = S == null ? void 0 : S.requiredCaslPermissions) == null ? void 0 : I.length) ?? 0) > 0;
78
- })
79
- ), G = y(() => {
80
- if (!r.sessionUser.value || !e.isLoaded) return !1;
81
- const v = c.currentRoute.value.name === w.LOADING;
82
- return !f.value && (v || B.value);
83
- });
84
- return (v, d) => {
85
- const S = h("FmSpacer"), I = h("FmCircularProgress"), L = h("FmButton"), M = h("RouterView");
86
- return m(), g("div", null, [
87
- x(a).isLoading ? (m(), g("div", ue, [
88
- _(S),
89
- n("div", null, [
90
- _(I, { size: "xl" })
91
- ]),
92
- d[0] || (d[0] = n("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
93
- _(S)
94
- ])) : G.value ? (m(), g("div", ce, [
95
- d[1] || (d[1] = n("img", {
96
- src: K,
97
- alt: "No permission",
98
- class: "w-[200px] h-[200px]"
99
- }, null, -1)),
100
- n("div", de, [
101
- n("div", me, b(x(l)("inventory.common.noPermission.title")), 1),
102
- n("div", pe, b(x(l)("inventory.common.noPermission.description")), 1)
103
- ])
104
- ])) : E.value ? x(r).sessionUser.value ? (m(), C(M, { key: 3 })) : U("", !0) : (m(), g("div", fe, [
105
- n("div", ve, [
106
- n("div", ge, b(x(l)("inventory.common.proPlan.title")), 1),
107
- n("div", _e, b(x(l)("inventory.common.proPlan.subtitle")), 1)
108
- ]),
109
- n("div", ye, [
110
- n("a", xe, [
111
- _(L, {
112
- label: x(l)("inventory.common.proPlan.comparePlans"),
113
- variant: "secondary"
114
- }, null, 8, ["label"])
115
- ]),
116
- n("a", be, [
117
- _(L, {
118
- label: x(l)("inventory.common.proPlan.callUs"),
119
- "prepend-icon": "call"
120
- }, null, 8, ["label"])
121
- ])
122
- ])
123
- ]))
124
- ]);
125
- };
126
- }
127
- }), we = { class: "flex items-center gap-2" }, Se = { class: "text-xs text-gray-400 font-normal" }, Fe = { class: "flex flex-col gap-3" }, Re = { class: "max-h-[480px] flex flex-col gap-1" }, Ie = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, ke = {
128
- key: 0,
129
- class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
130
- }, Pe = {
131
- key: 1,
132
- class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
133
- }, Ne = {
134
- key: 2,
135
- class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
136
- }, Ee = {
137
- key: 0,
138
- class: "text-center text-sm text-gray-400 py-4"
139
- }, Be = /* @__PURE__ */ N({
140
- __name: "FmFeatureFlagDialog",
141
- setup(p) {
142
- const t = k(!1), u = k(""), i = y(() => {
143
- const { getFlagValue: a } = ee();
144
- return Object.values(te).map((e) => {
145
- const l = a(e, (f) => f === "true");
146
- return {
147
- name: e,
148
- enabled: l
149
- };
150
- });
151
- }), r = y(() => {
152
- const a = u.value.toLowerCase();
153
- return a ? i.value.filter((e) => e.name.toLowerCase().includes(a)) : i.value;
154
- }), c = y(() => {
155
- const a = i.value.filter((f) => f.enabled === !0).length, e = i.value.filter((f) => f.enabled === !1).length, l = i.value.filter((f) => f.enabled === null).length;
156
- return { enabled: a, disabled: e, unknown: l, total: i.value.length };
157
- });
158
- return (a, e) => {
159
- const l = h("FmButton"), f = h("FmSpacer"), o = h("FmDialog");
160
- return m(), C(o, {
161
- modelValue: t.value,
162
- "onUpdate:modelValue": e[2] || (e[2] = (s) => t.value = s),
163
- overlay: !0
164
- }, {
165
- "dialog-button": R(() => [
166
- _(se, null, {
167
- default: R(() => [
168
- _(l, {
169
- variant: "secondary",
170
- label: "Feature flags"
171
- })
172
- ]),
173
- _: 1
174
- })
175
- ]),
176
- "dialog-header": R(() => [
177
- n("div", we, [
178
- e[3] || (e[3] = n("span", null, "Feature Flags", -1)),
179
- n("span", Se, b(c.value.enabled) + " enabled · " + b(c.value.disabled) + " disabled · " + b(c.value.unknown) + " unknown ", 1)
180
- ])
181
- ]),
182
- "dialog-footer": R(() => [
183
- _(f, { class: "sm:hidden xs:hidden" }),
184
- _(l, {
185
- class: "sm:w-full xs:w-full",
186
- label: "Close",
187
- size: "md",
188
- variant: "primary",
189
- onClick: e[1] || (e[1] = (s) => t.value = !1)
190
- })
191
- ]),
192
- default: R(() => [
193
- n("div", Fe, [
194
- O(n("input", {
195
- "onUpdate:modelValue": e[0] || (e[0] = (s) => u.value = s),
196
- type: "text",
197
- placeholder: "Search flags...",
198
- class: "w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500"
199
- }, null, 512), [
200
- [j, u.value]
201
- ]),
202
- n("div", Re, [
203
- (m(!0), g(q, null, z(r.value, (s) => (m(), g("div", {
204
- key: s.name,
205
- class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
206
- }, [
207
- n("span", Ie, b(s.name), 1),
208
- s.enabled === !0 ? (m(), g("span", ke, e[4] || (e[4] = [
209
- n("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
210
- A(" Enabled ")
211
- ]))) : s.enabled === !1 ? (m(), g("span", Pe, e[5] || (e[5] = [
212
- n("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
213
- A(" Disabled ")
214
- ]))) : (m(), g("span", Ne, e[6] || (e[6] = [
215
- n("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
216
- A(" Unknown ")
217
- ])))
218
- ]))), 128)),
219
- r.value.length === 0 ? (m(), g("div", Ee, ' No flags matching "' + b(u.value) + '" ', 1)) : U("", !0)
220
- ])
221
- ])
222
- ]),
223
- _: 1
224
- }, 8, ["modelValue"]);
225
- };
226
- }
227
- }), Ae = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Ce = /* @__PURE__ */ N({
228
- __name: "NavigationTab",
229
- setup(p) {
230
- const t = Y(), u = V(), i = T(), r = oe(), { menuItems: c } = D();
231
- P([() => i.currentBusiness.value, () => t.name], ([o, s]) => {
232
- (o == null ? void 0 : o.menuVersion) === "v3" && (s === w.INGREDIENTS || s === w.RECIPE || s === w.UNIT) && u.push({ name: w.STOCK });
233
- });
234
- const a = y({
235
- get() {
236
- if (t.name)
237
- return String(t.name);
238
- },
239
- set(o) {
240
- o && u.push({ name: o });
241
- }
242
- }), e = y(
243
- () => {
244
- var o;
245
- return `NavigationTab.${(o = i.currentBusiness.value) == null ? void 0 : o._id}`;
246
- }
247
- ), l = k(!1), f = y({
248
- get() {
249
- return l.value;
250
- },
251
- set(o) {
252
- l.value = o, o || r.setItem(e.value, "true");
253
- }
254
- });
255
- return P([() => e.value], () => {
256
- l.value = !1, setTimeout(() => {
257
- f.value = !r.getItem(e.value);
258
- }, 2e3);
259
- }), (o, s) => {
260
- const E = h("FmCollapsibleTabs");
261
- return m(), g("div", Ae, [
262
- _(Be),
263
- _(E, {
264
- modelValue: a.value,
265
- "onUpdate:modelValue": s[0] || (s[0] = (B) => a.value = B),
266
- items: x(c)
267
- }, null, 8, ["modelValue", "items"])
268
- ]);
269
- };
270
- }
271
- });
272
- typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
273
- let p, t;
274
- return { promise: new Promise((i, r) => {
275
- p = i, t = r;
276
- }), resolve: p, reject: t };
277
- });
278
- typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(p) {
279
- return await new Promise((t) => setTimeout(t, p)), Promise.resolve(this);
280
- });
281
- const qe = /* @__PURE__ */ N({
282
- __name: "App",
283
- setup(p) {
284
- const t = T(), u = re(), i = W();
285
- $(() => {
286
- if (window.location.href.includes("print-preview")) {
287
- t.setEmbedded(!0), document.body.classList.add("print-mode");
288
- return;
289
- }
290
- t.registerSidebarComponent(Ce), u.initGoogleMap(i.appApi.googleMap).catch(() => {
291
- console.error("Google map cannot be loaded");
292
- });
293
- }), P([() => t.currentCountry.value], () => {
294
- r();
295
- });
296
- async function r() {
297
- var c;
298
- try {
299
- await t.readBusinesses(), t.currentBusiness.value = (c = t.businesses.value) == null ? void 0 : c.find((a) => a);
300
- } catch (a) {
301
- console.error("error when trying to reset businesses:", a);
302
- }
303
- }
304
- return (c, a) => (m(), C(he));
305
- }
306
- });
307
- export {
308
- qe as default
309
- };