@feedmepos/mf-inventory-portal 1.8.0-dev.4 → 1.8.0-dev.6

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 (129) hide show
  1. package/dist/{App-FeJnwZme.js → App-B8DzC8Td.js} +609 -558
  2. package/dist/{ApprovalView-Eo-cGWyA.js → ApprovalView-DwHtlnLK.js} +9 -9
  3. package/dist/{BindingsDialog-DkjuXydb.js → BindingsDialog-COSQ6XVU.js} +2 -2
  4. package/dist/{BindingsPicker-DUOQcOlj.js → BindingsPicker-vn2GwOb7.js} +2 -2
  5. package/dist/{BindingsTable-CoDdU5xh.js → BindingsTable-B3-YXiPU.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-BGh8fbEX.js → BulkReceiveRequestView-LUAuL39I.js} +19 -19
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CStISRqy.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Bq2bBCHH.js} +1 -1
  8. package/dist/{ClosingDraftView-Cwnhrv5P.js → ClosingDraftView-BKgjXfss.js} +20 -20
  9. package/dist/{ClosingHistoryView-oHf77Lal.js → ClosingHistoryView-BI_zufKI.js} +5 -5
  10. package/dist/{ClosingTemplateView-1P8J1vAn.js → ClosingTemplateView-CNNgkrX0.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BuEPaqQK.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DGxUjcQc.js} +1 -1
  12. package/dist/{DefaultView-3Z8aVFSU.js → DefaultView-D9ldG5wf.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-uT_e3Suw.js → DeliveryOrderPrintPreview-CnvuZat5.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-BCgnXxEi.js → EmailDialog.vue_vue_type_script_setup_true_lang-s0eDfL8g.js} +23 -23
  15. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-2t_ajTtF.js +297 -0
  16. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BlKpGdCx.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Bo4aCSFL.js} +1 -1
  17. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DKkxn1J-.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BhhKFtnX.js} +2 -2
  18. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-dOXDST-E.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Dx8b6nGn.js} +2 -2
  19. package/dist/FmMultiselectDialog-Coxul96n.js +123 -0
  20. package/dist/{FmMultiselectDialog-DRxZAkcu.js → FmMultiselectDialog-zaOH0oB9.js} +2 -2
  21. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DRSzQqVJ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-B0xT-sP9.js} +6 -6
  22. package/dist/ImportView-CuRogJ1u.js +1291 -0
  23. package/dist/{IngredientsView-N9U7tdI_.js → IngredientsView-BnEJ1QAk.js} +34 -35
  24. package/dist/{IntegrationExplorerView-CjmeGQ14.js → IntegrationExplorerView-DB-7hXUE.js} +4 -4
  25. package/dist/{IntegrationView-DAdpmuxx.js → IntegrationView-CBGPi1xL.js} +973 -974
  26. package/dist/{InventoryBindingForm-CAj3MurI.js → InventoryBindingForm-eggGypKW.js} +1 -1
  27. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CvQ82oaY.js +472 -0
  28. package/dist/{InventoryBindingSummary-B-1OBUdw.js → InventoryBindingSummary-DegINJdx.js} +1 -1
  29. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CUYYEuW3.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DYq61C5M.js} +1 -1
  30. package/dist/{ProductionRunDetailView-eFvl8-By.js → ProductionRunDetailView-6uJmjwAg.js} +4 -4
  31. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DaC7e4qS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-Dcd3sV5C.js} +9 -9
  32. package/dist/{ProductionRunView-C_NJJKLr.js → ProductionRunView-CiypqoQT.js} +3 -3
  33. package/dist/{PublishView-BglAEkzU.js → PublishView-DEyODScT.js} +3 -3
  34. package/dist/{PurchaseOrderPrintPreview-BTF9ikpQ.js → PurchaseOrderPrintPreview-DjsD8HaB.js} +2 -2
  35. package/dist/{ReceiveRequestView-BUvehG10.js → ReceiveRequestView-DGWA-SOC.js} +13 -13
  36. package/dist/RecipeView-CO5kxazA.js +3428 -0
  37. package/dist/{SettingsView-DRR86cHo.js → SettingsView-9uq0QYht.js} +164 -168
  38. package/dist/{StockView-D1oEnbZp.js → StockView-YKfyjTE1.js} +267 -267
  39. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxU92-io.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C8q3IBMg.js} +1 -1
  40. package/dist/{SupplierView-D68wz0-g.js → SupplierView-D62RB87K.js} +14 -14
  41. package/dist/{SurchargeView-Cw9rTw2h.js → SurchargeView-DY4xuPN0.js} +7 -7
  42. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Az-a1Dsp.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C27rA7Z_.js} +2 -2
  43. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C-sxbacO.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BhhvJtAf.js} +1 -1
  44. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CsHfLaCv.js → TransferDetails.vue_vue_type_script_setup_true_lang-cvgA7DlK.js} +690 -666
  45. package/dist/{TransferTemplateView-CHPJMjYC.js → TransferTemplateView-DZk-6Z-1.js} +20 -20
  46. package/dist/{UnitCostHistoryView-DM8OzWhe.js → UnitCostHistoryView-C-aNhP72.js} +4 -4
  47. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DpwK5mFH.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-D655ehgk.js} +4 -4
  48. package/dist/{UnitView-90uR-ZzQ.js → UnitView-h2n8XNZr.js} +8 -8
  49. package/dist/{WarehouseView-Bulg6Vac.js → WarehouseView-gPPmrhxB.js} +8 -8
  50. package/dist/{WastageTemplateView-BmAHnnwm.js → WastageTemplateView-7bp-1vTP.js} +15 -15
  51. package/dist/api/feature-flags.d.ts +2 -0
  52. package/dist/api/license.d.ts +0 -2
  53. package/dist/{app-Ccdgbe4f.js → app-_FoXoYBy.js} +1640 -1829
  54. package/dist/app.d.ts +0 -150
  55. package/dist/app.js +1 -1
  56. package/dist/{closing-template-DuBZxoXx.js → closing-template-D8bk-LUW.js} +1 -1
  57. package/dist/{date2-IBrLdtni.js → date2-DE0h0f1Z.js} +1 -1
  58. package/dist/{dayjs.min-DEkq-Hpp.js → dayjs.min-DxnjPhAT.js} +1 -1
  59. package/dist/{decimal-g6jRdlSk.js → decimal-D9ZB4atK.js} +2 -2
  60. package/dist/{defineDeepModel-P5a5Ffpn.js → defineDeepModel-pn4B1f06.js} +1 -1
  61. package/dist/{duplicate-template-Do8s80ei.js → duplicate-template-DS-mr3MQ.js} +1 -1
  62. package/dist/{feature-ChVm5JED.js → feature-D0aaeyga.js} +1999 -3092
  63. package/dist/feature-flags/portal-feature-catalog.d.ts +0 -2
  64. package/dist/{format-time-from-id-BgbBOII7.js → format-time-from-id-CbFUj3BY.js} +1 -1
  65. package/dist/{format-unit-display-hSXy2iu6.js → format-unit-display-DulZiawi.js} +13 -13
  66. package/dist/helper/menu-usage-module.d.ts +1 -1
  67. package/dist/{id-to-date-DlGYysU8.js → id-to-date-CLCvDHvP.js} +1 -1
  68. package/dist/{import-export.helper-LrZhiz2W.js → import-export.helper-Ce1hr39u.js} +6 -6
  69. package/dist/{index-DCiNwlw2.js → index-DDw8ryXI.js} +1 -1
  70. package/dist/{index-DsOmtywr.js → index-DpxJ3TzB.js} +1 -1
  71. package/dist/{index-BTNJ1fk2.js → index-DrkUq9y6.js} +3 -3
  72. package/dist/{lz-string-DRuyjE9G.js → lz-string-BakfyAq0.js} +1 -1
  73. package/dist/{netsuite-B6y8GZCP.js → netsuite-Cn2W-lOV.js} +2 -2
  74. package/dist/{number-Besn-1-5.js → number-B2-Gbof3.js} +3 -3
  75. package/dist/{predefined-templates-D92mN_2S.js → predefined-templates-DmITBHzs.js} +1 -1
  76. package/dist/{purchase-order-template-hvq2pfWx.js → purchase-order-template-BfP6Sy0k.js} +1 -1
  77. package/dist/{recalculationUtils-BlZR5O2G.js → recalculationUtils-BRe2QPvC.js} +1 -1
  78. package/dist/router/name.d.ts +0 -1
  79. package/dist/{row-action.enum-R2bi3eAv.js → row-action.enum-CxzHcy4A.js} +1 -1
  80. package/dist/{rules-DzwoRKUS.js → rules-CjqBvFGt.js} +2 -2
  81. package/dist/{stock-Cq37EARQ.js → stock-BT50AgTx.js} +8 -8
  82. package/dist/{stock-oJqnUrtt.js → stock-CjFjkezq.js} +1 -1
  83. package/dist/stores/feature.d.ts +9 -9
  84. package/dist/stores/inventory.d.ts +0 -47
  85. package/dist/stores/supplier.d.ts +1 -1
  86. package/dist/style.css +1 -1
  87. package/dist/{supplier-DtdwvcPr.js → supplier-wmjWWKaf.js} +2 -2
  88. package/dist/{surcharge-CjdJGIsM.js → surcharge-CQC6Fa7Q.js} +1 -1
  89. package/dist/tsconfig.app.tsbuildinfo +1 -1
  90. package/dist/{uom-rules-BqPn_GoZ.js → uom-rules-CUQleOt4.js} +1 -1
  91. package/dist/{use-ingredient-select-dialog-0hRCj6Fu.js → use-ingredient-select-dialog-7VVHmM7s.js} +2 -2
  92. package/dist/use-inventory-binding-dialog-C8m7iwRG.js +113 -0
  93. package/dist/{use-template-enabled-locations-8ZfTj4YB.js → use-template-enabled-locations-CRgTVDMh.js} +2 -2
  94. package/dist/{use-transfer-locations-BGS1EBEt.js → use-transfer-locations-Bs0PotVA.js} +2 -2
  95. package/dist/{useHrmPermission-BcQ2KPD-.js → useHrmPermission-DcAzZ0CT.js} +1 -1
  96. package/dist/{useNavigationMenu-DImtns81.js → useNavigationMenu-CtihCeyC.js} +65 -74
  97. package/dist/{useSseClient-DPSFFVci.js → useSseClient-CizgYCQI.js} +1 -1
  98. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
  99. package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
  100. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
  101. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
  102. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +1 -1
  103. package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
  104. package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
  105. package/dist/views/recipe/helper/import-recipe.d.ts +2 -2
  106. package/dist/{vue-i18n-DTyGIjTI.js → vue-i18n-DpTQ6ev1.js} +258 -258
  107. package/dist/{xlsx.util-CK9Lnq3Q.js → xlsx.util-CPC0Dkyo.js} +2 -2
  108. package/package.json +2 -2
  109. package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-D_vmtZDZ.js +0 -58
  110. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-D-RzUmqA.js +0 -81
  111. package/dist/FmMultiselectDialog-C8uYx8rr.js +0 -77
  112. package/dist/ImportView-Qigtf3ik.js +0 -1302
  113. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8PJeYrP.js +0 -51
  114. package/dist/IngredientGroupView-RNYZLkQu.js +0 -1000
  115. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-3pYuu62C.js +0 -563
  116. package/dist/RecipeView-DO5-jgwh.js +0 -3624
  117. package/dist/feature-flags/premium-flags.spec.d.ts +0 -1
  118. package/dist/random-CSbEbElR.js +0 -10
  119. package/dist/use-inventory-binding-dialog-BLRcIC1u.js +0 -152
  120. package/dist/usePromise-CbVUCxhj.js +0 -29
  121. package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +0 -3
  122. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
  123. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
  124. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
  125. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
  126. package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
  127. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
  128. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
  129. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
@@ -1,20 +1,19 @@
1
- import { ref as k, onUnmounted as ft, computed as D, defineComponent as ce, watch as Z, onMounted as Ie, resolveComponent as Y, createElementBlock as c, openBlock as i, createBlock as pe, createCommentVNode as N, unref as $, createVNode as I, createElementVNode as h, toDisplayString as y, Fragment as j, renderList as oe, withKeys as Ae, normalizeClass as ae, withModifiers as mt, withCtx as le, createTextVNode as ie, h as pt, onBeforeUnmount as vt, nextTick as gt, Teleport as yt, normalizeStyle as ht, mergeModels as _t, useModel as bt } from "vue";
1
+ import { ref as k, onUnmounted as pt, computed as F, defineComponent as re, watch as Z, onMounted as Ie, resolveComponent as z, createElementBlock as c, openBlock as i, createBlock as ce, createCommentVNode as N, unref as $, createVNode as C, createElementVNode as g, toDisplayString as h, Fragment as H, renderList as ae, withKeys as Me, normalizeClass as le, withModifiers as vt, withCtx as te, createTextVNode as ue, h as gt, onBeforeUnmount as yt, nextTick as ht, Teleport as _t, normalizeStyle as bt, mergeModels as Le, useModel as He } from "vue";
2
2
  import { _ as xt } from "./empty-placeholder-B0QU467o.js";
3
- import { u as je, a as He, R as ue, d as wt, S as kt, b as St } from "./app-Ccdgbe4f.js";
3
+ import { u as Je, a as Ye, R as pe, d as wt, S as kt, b as St } from "./app-_FoXoYBy.js";
4
4
  import { useCoreStore as ge, useI18n as he } from "@feedmepos/mf-common";
5
- import { useRouter as Ee, useRoute as $t } from "vue-router";
6
- import { u as Ct, g as Me } from "./feature-ChVm5JED.js";
7
- import { u as Lt } from "./netsuite-B6y8GZCP.js";
8
- import { u as Je, n as Rt, e as Dt } from "./useNavigationMenu-DImtns81.js";
5
+ import { useRouter as Ne, useRoute as $t } from "vue-router";
6
+ import { u as Ct } from "./feature-D0aaeyga.js";
7
+ import { u as Lt } from "./netsuite-Cn2W-lOV.js";
8
+ import { u as We, n as Dt, e as Rt } from "./useNavigationMenu-CtihCeyC.js";
9
9
  import { useBreakpoints as Vt } from "@feedmepos/ui-library";
10
- import { F as Ye } from "./FmAdminBadge-DlplQOHb.js";
11
- import { i as It, _ as Et } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BlKpGdCx.js";
12
- import { F as Nt } from "./decimal-g6jRdlSk.js";
13
- import { t as Pt, a as Tt } from "./date2-IBrLdtni.js";
14
- import { _ as Ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- import { u as Bt } from "./useTabStorage-BkIVScW_.js";
16
- import { _ as Ft, u as At } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-D-RzUmqA.js";
17
- import { _ as Mt } from "./DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-D_vmtZDZ.js";
10
+ import { F as Xe } from "./FmAdminBadge-DlplQOHb.js";
11
+ import { i as Ft, _ as It } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Bo4aCSFL.js";
12
+ import { F as Nt } from "./decimal-D9ZB4atK.js";
13
+ import { t as Pt, a as Bt } from "./date2-DE0h0f1Z.js";
14
+ import { _ as Et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
+ import { u as Tt } from "./useTabStorage-BkIVScW_.js";
16
+ import { _ as Ut, D as At, u as Mt, g as Oe } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-2t_ajTtF.js";
18
17
  import { u as Ot } from "./googlemap-D9vA7GsS.js";
19
18
  function Kt() {
20
19
  return {
@@ -23,8 +22,8 @@ function Kt() {
23
22
  };
24
23
  }
25
24
  const me = k(Kt());
26
- function Gt() {
27
- const o = Ee();
25
+ function zt() {
26
+ const o = Ne();
28
27
  if (!me.value.loadingHookInstalled) {
29
28
  me.value.loadingHookInstalled = !0;
30
29
  const e = o.beforeEach(() => {
@@ -32,7 +31,7 @@ function Gt() {
32
31
  }), t = o.afterEach(() => {
33
32
  me.value.isLoading = !1;
34
33
  });
35
- ft(() => {
34
+ pt(() => {
36
35
  me.value.loadingHookInstalled = !1, e(), t();
37
36
  });
38
37
  }
@@ -42,11 +41,11 @@ function Gt() {
42
41
  }
43
42
  };
44
43
  }
45
- function zt() {
46
- const { firstAccessibleRouteName: o } = Je();
47
- return { hasAnyAccessibleInventoryRoute: D(() => o.value !== null) };
44
+ function jt() {
45
+ const { firstAccessibleRouteName: o } = We();
46
+ return { hasAnyAccessibleInventoryRoute: F(() => o.value !== null) };
48
47
  }
49
- const jt = {
48
+ const Gt = {
50
49
  key: 0,
51
50
  class: "flex flex-col items-center w-full h-full gap-24"
52
51
  }, Ht = {
@@ -55,75 +54,75 @@ const jt = {
55
54
  }, Jt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Yt = { class: "fm-typo-en-title-lg-600" }, Wt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Xt = {
56
55
  key: 2,
57
56
  class: "flex flex-col pt-[200px] gap-32 items-center"
58
- }, qt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Zt = { class: "fm-typo-en-title-lg-600" }, Qt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, en = { class: "flex gap-16" }, tn = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, nn = { href: "https://feedme.ai/form" }, on = /* @__PURE__ */ ce({
57
+ }, qt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Zt = { class: "fm-typo-en-title-lg-600" }, Qt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, en = { class: "flex gap-16" }, tn = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, nn = { href: "https://feedme.ai/form" }, on = /* @__PURE__ */ re({
59
58
  __name: "InventoryView",
60
59
  setup(o) {
61
- const e = je(), t = He(), l = Lt(), a = ge(), s = Ee(), r = Gt(), u = Ct(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = zt();
60
+ const e = Je(), t = Ye(), s = Lt(), a = ge(), l = Ne(), r = zt(), u = Ct(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = jt();
62
61
  Z(
63
62
  [() => a.sessionUser.value, () => a.currentBusiness.value],
64
- ([O, C]) => {
65
- V(O, C);
63
+ ([O, D]) => {
64
+ L(O, D);
66
65
  }
67
66
  ), Ie(async () => {
68
67
  await u.init(), await a.readBusinesses();
69
- const O = a.sessionUser.value, C = a.currentBusiness.value;
70
- V(O, C);
68
+ const O = a.sessionUser.value, D = a.currentBusiness.value;
69
+ L(O, D);
71
70
  });
72
- function V(O, C) {
73
- !O || !C || E();
71
+ function L(O, D) {
72
+ !O || !D || I();
74
73
  }
75
- async function E() {
76
- return await e.init(), await l.readSetting().catch((O) => {
74
+ async function I() {
75
+ return await e.init(), await s.readSetting().catch((O) => {
77
76
  console.error("[all] error on reading netsuite store", O);
78
77
  }), await t.init();
79
78
  }
80
- const P = D(() => s.currentRoute.value.name === ue.TRANSFER_TEMPLATE ? u.enablePoTemplate : s.currentRoute.value.name === ue.INGREDIENT_GROUP ? u.enableIngredientGroup : !0), F = D(
81
- () => s.currentRoute.value.matched.some((O) => {
82
- var L;
83
- const C = O.meta, H = C == null ? void 0 : C.validationManifest;
84
- return (((L = H == null ? void 0 : H.requiredCaslPermissions) == null ? void 0 : L.length) ?? 0) > 0;
79
+ const P = F(() => l.currentRoute.value.name === pe.TRANSFER_TEMPLATE ? u.enablePoTemplate : !0), U = F(
80
+ () => l.currentRoute.value.matched.some((O) => {
81
+ var R;
82
+ const D = O.meta, J = D == null ? void 0 : D.validationManifest;
83
+ return (((R = J == null ? void 0 : J.requiredCaslPermissions) == null ? void 0 : R.length) ?? 0) > 0;
85
84
  })
86
- ), Q = D(() => {
85
+ ), Q = F(() => {
87
86
  if (!a.sessionUser.value) return !1;
88
87
  if (e._locations !== null && e.locations.length === 0) return !0;
89
88
  if (!u.isLoaded) return !1;
90
- const H = s.currentRoute.value.name === ue.LOADING;
91
- return !p.value && (H || F.value);
89
+ const J = l.currentRoute.value.name === pe.LOADING;
90
+ return !p.value && (J || U.value);
92
91
  });
93
- return (O, C) => {
94
- const H = Y("FmSpacer"), L = Y("FmCircularProgress"), _ = Y("FmButton"), w = Y("RouterView");
92
+ return (O, D) => {
93
+ const J = z("FmSpacer"), R = z("FmCircularProgress"), _ = z("FmButton"), w = z("RouterView");
95
94
  return i(), c("div", null, [
96
- $(r).isLoading ? (i(), c("div", jt, [
97
- I(H),
98
- h("div", null, [
99
- I(L, { size: "xl" })
95
+ $(r).isLoading ? (i(), c("div", Gt, [
96
+ C(J),
97
+ g("div", null, [
98
+ C(R, { size: "xl" })
100
99
  ]),
101
- C[0] || (C[0] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
102
- I(H)
100
+ D[0] || (D[0] = g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
101
+ C(J)
103
102
  ])) : Q.value ? (i(), c("div", Ht, [
104
- C[1] || (C[1] = h("img", {
103
+ D[1] || (D[1] = g("img", {
105
104
  src: xt,
106
105
  alt: "No permission",
107
106
  class: "w-[200px] h-[200px]"
108
107
  }, null, -1)),
109
- h("div", Jt, [
110
- h("div", Yt, y($(v)("inventory.common.noPermission.title")), 1),
111
- h("div", Wt, y($(v)("inventory.common.noPermission.description")), 1)
108
+ g("div", Jt, [
109
+ g("div", Yt, h($(v)("inventory.common.noPermission.title")), 1),
110
+ g("div", Wt, h($(v)("inventory.common.noPermission.description")), 1)
112
111
  ])
113
- ])) : P.value ? $(a).sessionUser.value ? (i(), pe(w, { key: 3 })) : N("", !0) : (i(), c("div", Xt, [
114
- h("div", qt, [
115
- h("div", Zt, y($(v)("inventory.common.proPlan.title")), 1),
116
- h("div", Qt, y($(v)("inventory.common.proPlan.subtitle")), 1)
112
+ ])) : P.value ? $(a).sessionUser.value ? (i(), ce(w, { key: 3 })) : N("", !0) : (i(), c("div", Xt, [
113
+ g("div", qt, [
114
+ g("div", Zt, h($(v)("inventory.common.proPlan.title")), 1),
115
+ g("div", Qt, h($(v)("inventory.common.proPlan.subtitle")), 1)
117
116
  ]),
118
- h("div", en, [
119
- h("a", tn, [
120
- I(_, {
117
+ g("div", en, [
118
+ g("a", tn, [
119
+ C(_, {
121
120
  label: $(v)("inventory.common.proPlan.comparePlans"),
122
121
  variant: "secondary"
123
122
  }, null, 8, ["label"])
124
123
  ]),
125
- h("a", nn, [
126
- I(_, {
124
+ g("a", nn, [
125
+ C(_, {
127
126
  label: $(v)("inventory.common.proPlan.callUs"),
128
127
  "prepend-icon": "call"
129
128
  }, null, 8, ["label"])
@@ -133,7 +132,7 @@ const jt = {
133
132
  ]);
134
133
  };
135
134
  }
136
- }), Le = {
135
+ }), De = {
137
136
  // Template/PO item rows carry no id of their own — the embedded sku's _id is
138
137
  // the element identity, and kit names the element from that object's name
139
138
  // field, so an item change reads "Items › <sku name> › …" instead of a bare
@@ -196,7 +195,7 @@ const jt = {
196
195
  ]
197
196
  }
198
197
  }, Re = {
199
- ...Le,
198
+ ...De,
200
199
  array_keys: {
201
200
  measurements: "id",
202
201
  "unit.measurements": "id",
@@ -215,22 +214,22 @@ const _e = wt((o, e) => ({
215
214
  * The dbName scopes the (access-checked) backend route; only the bare id is
216
215
  * sent — the backend rebuilds the docId server-side.
217
216
  */
218
- async getRecordChangelog(t, l, a, s) {
217
+ async getRecordChangelog(t, s, a, l) {
219
218
  const r = t.indexOf("/");
220
219
  if (r < 0) return [];
221
220
  const u = t.slice(0, r), v = t.slice(r + 1), p = new URLSearchParams({ id: v });
222
- l != null && p.set("limit", String(l)), s && p.set("before", s), a && (p.set("explain", "1"), p.set("schema", JSON.stringify(a)));
223
- const V = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
224
- return await e.get(V);
221
+ s != null && p.set("limit", String(s)), l && p.set("before", l), a && (p.set("explain", "1"), p.set("schema", JSON.stringify(a)));
222
+ const L = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
223
+ return await e.get(L);
225
224
  },
226
225
  /**
227
226
  * Purchase orders in a date range, each with when it last changed. The
228
227
  * backend joins the orders to their newest commit, so no ids travel and the
229
228
  * browser makes one request instead of list-then-ask-for-timestamps.
230
229
  */
231
- async listPurchaseOrders(t, l, a) {
230
+ async listPurchaseOrders(t, s, a) {
232
231
  if (!t) return [];
233
- const s = new URLSearchParams({ start: l, end: a }), r = `${o.inventoryBackendUrl}/${t}/changelog/purchase-order?${s}`;
232
+ const l = new URLSearchParams({ start: s, end: a }), r = `${o.inventoryBackendUrl}/${t}/changelog/purchase-order?${l}`;
234
233
  return await e.get(r);
235
234
  },
236
235
  /**
@@ -238,9 +237,9 @@ const _e = wt((o, e) => ({
238
237
  * Closing groups come back as rows of their own — their submit/approve/
239
238
  * reject is recorded against the group document, not its parent.
240
239
  */
241
- async listClosingDrafts(t, l, a) {
240
+ async listClosingDrafts(t, s, a) {
242
241
  if (!t) return [];
243
- const s = new URLSearchParams({ start: l, end: a }), r = `${o.inventoryBackendUrl}/${t}/changelog/closing-draft?${s}`;
242
+ const l = new URLSearchParams({ start: s, end: a }), r = `${o.inventoryBackendUrl}/${t}/changelog/closing-draft?${l}`;
244
243
  return await e.get(r);
245
244
  },
246
245
  /**
@@ -249,10 +248,10 @@ const _e = wt((o, e) => ({
249
248
  * 409 (see isStateConflict) when the record's history predates the kit
250
249
  * write path — the backend passthrough for kit httpapi's GET /api/state.
251
250
  */
252
- async getState(t, l, a) {
253
- const s = new URLSearchParams({ id: l });
254
- a && s.set("at", a);
255
- const r = `${o.inventoryBackendUrl}/${t}/changelog/state?${s.toString()}`;
251
+ async getState(t, s, a) {
252
+ const l = new URLSearchParams({ id: s });
253
+ a && l.set("at", a);
254
+ const r = `${o.inventoryBackendUrl}/${t}/changelog/state?${l.toString()}`;
256
255
  return await e.get(r);
257
256
  },
258
257
  /**
@@ -263,17 +262,17 @@ const _e = wt((o, e) => ({
263
262
  */
264
263
  async listDomains(t) {
265
264
  if (!t) return [];
266
- const l = `${o.inventoryBackendUrl}/business_${t}/changelog/domains`;
267
- return await e.get(l);
265
+ const s = `${o.inventoryBackendUrl}/business_${t}/changelog/domains`;
266
+ return await e.get(s);
268
267
  },
269
268
  /**
270
269
  * One generic domain's records, each with when it last changed. Business-
271
270
  * scoped: the generic domains are configuration documents of the business
272
271
  * db, not of a location.
273
272
  */
274
- async listDomainRecords(t, l) {
273
+ async listDomainRecords(t, s) {
275
274
  if (!t) return [];
276
- const a = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(l)}`;
275
+ const a = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(s)}`;
277
276
  return await e.get(a);
278
277
  },
279
278
  /**
@@ -281,65 +280,65 @@ const _e = wt((o, e) => ({
281
280
  * scoped, so the db is `business_<id>` — the same prefixed name the record's
282
281
  * own changelog docId carries.
283
282
  */
284
- async listInventory(t, l) {
283
+ async listInventory(t, s) {
285
284
  if (!t) return [];
286
- const a = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${l}`;
285
+ const a = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${s}`;
287
286
  return await e.get(a);
288
287
  }
289
288
  })), Se = 50;
290
- function sn() {
291
- const o = _e(), e = k([]), t = k(!1), l = k(!1);
292
- let a = null, s = 0;
293
- async function r(v, p, V) {
294
- const E = ++s;
295
- if (a = null, l.value = !1, !v) {
289
+ function ln() {
290
+ const o = _e(), e = k([]), t = k(!1), s = k(!1);
291
+ let a = null, l = 0;
292
+ async function r(v, p, L) {
293
+ const I = ++l;
294
+ if (a = null, s.value = !1, !v) {
296
295
  e.value = [];
297
296
  return;
298
297
  }
299
298
  t.value = !0;
300
299
  try {
301
- const P = p ?? Se, F = await o.getRecordChangelog(v, P, V);
302
- if (E !== s) return;
303
- e.value = F, p == null && (a = { recordId: v, explain: V }, l.value = F.length === P);
300
+ const P = p ?? Se, U = await o.getRecordChangelog(v, P, L);
301
+ if (I !== l) return;
302
+ e.value = U, p == null && (a = { recordId: v, explain: L }, s.value = U.length === P);
304
303
  } catch (P) {
305
- throw E === s && (e.value = []), P;
304
+ throw I === l && (e.value = []), P;
306
305
  } finally {
307
- E === s && (t.value = !1);
306
+ I === l && (t.value = !1);
308
307
  }
309
308
  }
310
309
  async function u() {
311
310
  const v = e.value[e.value.length - 1];
312
- if (!a || !v || t.value || !l.value) return;
313
- const p = s;
311
+ if (!a || !v || t.value || !s.value) return;
312
+ const p = l;
314
313
  t.value = !0;
315
314
  try {
316
- const V = await o.getRecordChangelog(a.recordId, Se, a.explain, v.id);
317
- if (p !== s) return;
318
- e.value = [...e.value, ...V], l.value = V.length === Se;
315
+ const L = await o.getRecordChangelog(a.recordId, Se, a.explain, v.id);
316
+ if (p !== l) return;
317
+ e.value = [...e.value, ...L], s.value = L.length === Se;
319
318
  } finally {
320
- p === s && (t.value = !1);
319
+ p === l && (t.value = !1);
321
320
  }
322
321
  }
323
- return { commits: e, isLoading: t, hasMore: l, load: r, loadMore: u };
322
+ return { commits: e, isLoading: t, hasMore: s, load: r, loadMore: u };
324
323
  }
325
- const We = 1e3;
326
- function Oe(o) {
324
+ const qe = 1e3;
325
+ function Ke(o) {
327
326
  const e = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?/.exec(o);
328
327
  return e ? `${e[1]}.${(e[2] ?? "").padEnd(9, "0").slice(0, 9)}` : o;
329
328
  }
330
- function ln(o, e) {
329
+ function sn(o, e) {
331
330
  return [...o, ...e].sort(
332
- (t, l) => Oe(l.at).localeCompare(Oe(t.at)) || l.id.localeCompare(t.id)
331
+ (t, s) => Ke(s.at).localeCompare(Ke(t.at)) || s.id.localeCompare(t.id)
333
332
  );
334
333
  }
335
334
  function rn() {
336
335
  const o = _e(), e = k([]);
337
- async function t(l) {
338
- if (e.value = [], !!l)
336
+ async function t(s) {
337
+ if (e.value = [], !!s)
339
338
  try {
340
339
  e.value = await o.getRecordChangelog(
341
- l,
342
- We,
340
+ s,
341
+ qe,
343
342
  Re
344
343
  );
345
344
  } catch (a) {
@@ -348,7 +347,7 @@ function rn() {
348
347
  }
349
348
  return { commits: e, load: t };
350
349
  }
351
- function Xe(o) {
350
+ function Ze(o) {
352
351
  if (!o) return null;
353
352
  try {
354
353
  const e = JSON.parse(o);
@@ -361,12 +360,12 @@ function Xe(o) {
361
360
  return null;
362
361
  }
363
362
  }
364
- function qe(o) {
363
+ function Qe(o) {
365
364
  return o.startsWith("inventory.changelog.");
366
365
  }
367
- const Ze = "";
368
- function De(o) {
369
- const e = o.indexOf(Ze);
366
+ const et = "";
367
+ function Ve(o) {
368
+ const e = o.indexOf(et);
370
369
  return e === -1 ? { raw: o, human: o } : { raw: o.slice(0, e), human: o.slice(e + 1) };
371
370
  }
372
371
  const un = [
@@ -375,29 +374,29 @@ const un = [
375
374
  "inventory.changelog.label.unit"
376
375
  ], cn = [...un, "Recipe", "Ingredient", "Unit"];
377
376
  function dn(o) {
378
- const { human: e } = De(o);
377
+ const { human: e } = Ve(o);
379
378
  if (!e) return { type: "Document", name: "", field: [] };
380
379
  const t = e.split(" › ");
381
380
  return t.length >= 2 && cn.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
382
381
  }
383
- const Ke = 800;
384
- function Qe(o, e, t = 2) {
385
- const l = Ge(o), a = Ge(e);
386
- if (!l || !a) return null;
387
- let s = 0;
388
- for (; s < l.length && s < a.length && l[s] === a[s]; ) s++;
382
+ const ze = 800;
383
+ function tt(o, e, t = 2) {
384
+ const s = je(o), a = je(e);
385
+ if (!s || !a) return null;
386
+ let l = 0;
387
+ for (; l < s.length && l < a.length && s[l] === a[l]; ) l++;
389
388
  let r = 0;
390
- for (; r < l.length - s && r < a.length - s && l[l.length - 1 - r] === a[a.length - 1 - r]; )
389
+ for (; r < s.length - l && r < a.length - l && s[s.length - 1 - r] === a[a.length - 1 - r]; )
391
390
  r++;
392
- const u = l.slice(s, l.length - r), v = a.slice(s, a.length - r);
393
- if (u.length > Ke || v.length > Ke) return null;
394
- const p = (V) => ({ type: "same", text: V });
391
+ const u = s.slice(l, s.length - r), v = a.slice(l, a.length - r);
392
+ if (u.length > ze || v.length > ze) return null;
393
+ const p = (L) => ({ type: "same", text: L });
395
394
  return mn(
396
- [...l.slice(0, s).map(p), ...fn(u, v), ...l.slice(l.length - r).map(p)],
395
+ [...s.slice(0, l).map(p), ...fn(u, v), ...s.slice(s.length - r).map(p)],
397
396
  t
398
397
  );
399
398
  }
400
- function Ge(o) {
399
+ function je(o) {
401
400
  try {
402
401
  const e = JSON.parse(o);
403
402
  return e === null || typeof e != "object" ? null : JSON.stringify(e, null, 2).split(`
@@ -407,30 +406,30 @@ function Ge(o) {
407
406
  }
408
407
  }
409
408
  function fn(o, e) {
410
- const t = o.length, l = e.length, a = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
409
+ const t = o.length, s = e.length, a = Array.from({ length: t + 1 }, () => new Uint32Array(s + 1));
411
410
  for (let v = t - 1; v >= 0; v--)
412
- for (let p = l - 1; p >= 0; p--)
411
+ for (let p = s - 1; p >= 0; p--)
413
412
  a[v][p] = o[v] === e[p] ? a[v + 1][p + 1] + 1 : Math.max(a[v + 1][p], a[v][p + 1]);
414
- const s = [];
413
+ const l = [];
415
414
  let r = 0, u = 0;
416
- for (; r < t && u < l; )
417
- o[r] === e[u] ? (s.push({ type: "same", text: o[r] }), r++, u++) : a[r + 1][u] >= a[r][u + 1] ? (s.push({ type: "del", text: o[r] }), r++) : (s.push({ type: "add", text: e[u] }), u++);
418
- for (; r < t; ) s.push({ type: "del", text: o[r++] });
419
- for (; u < l; ) s.push({ type: "add", text: e[u++] });
420
- return s;
415
+ for (; r < t && u < s; )
416
+ o[r] === e[u] ? (l.push({ type: "same", text: o[r] }), r++, u++) : a[r + 1][u] >= a[r][u + 1] ? (l.push({ type: "del", text: o[r] }), r++) : (l.push({ type: "add", text: e[u] }), u++);
417
+ for (; r < t; ) l.push({ type: "del", text: o[r++] });
418
+ for (; u < s; ) l.push({ type: "add", text: e[u++] });
419
+ return l;
421
420
  }
422
421
  function mn(o, e) {
423
422
  const t = o.map(() => !1);
424
- o.forEach((s, r) => {
425
- if (s.type !== "same")
423
+ o.forEach((l, r) => {
424
+ if (l.type !== "same")
426
425
  for (let u = Math.max(0, r - e); u <= Math.min(o.length - 1, r + e); u++)
427
426
  t[u] = !0;
428
427
  });
429
- const l = [];
428
+ const s = [];
430
429
  let a = !1;
431
- return o.forEach((s, r) => {
432
- t[r] ? (l.push(s), a = !1) : a || (l.push({ type: "skip", text: "⋯" }), a = !0);
433
- }), l;
430
+ return o.forEach((l, r) => {
431
+ t[r] ? (s.push(l), a = !1) : a || (s.push({ type: "skip", text: "⋯" }), a = !0);
432
+ }), s;
434
433
  }
435
434
  function pn(o, e) {
436
435
  let t;
@@ -441,59 +440,59 @@ function pn(o, e) {
441
440
  }
442
441
  return t === null ? "—" : typeof t == "number" ? t.toLocaleString() : typeof t == "boolean" ? e(t ? "inventory.changelog.yes" : "inventory.changelog.no") : String(t);
443
442
  }
444
- function Ve(o, e, t = 0, l) {
443
+ function Fe(o, e, t = 0, s) {
445
444
  var p;
446
- const a = o.label == null ? void 0 : qe(o.label) ? e(o.label) : o.label, s = a != null || o.value != null || o.display != null, r = !((p = o.kids) != null && p.length), u = [];
447
- s && u.push({
445
+ const a = o.label == null ? void 0 : Qe(o.label) ? e(o.label) : o.label, l = a != null || o.value != null || o.display != null, r = !((p = o.kids) != null && p.length), u = [];
446
+ l && u.push({
448
447
  depth: t,
449
448
  // A bare array index says nothing a reader needs — a leaf list entry
450
449
  // shows just its value. Branch nodes keep the index as their header.
451
450
  label: a != null && r && /^\d+$/.test(a) ? void 0 : a,
452
- text: r ? vn(o, e, l) : void 0,
451
+ text: r ? vn(o, e, s) : void 0,
453
452
  bookkeeping: !!o.bookkeeping
454
453
  });
455
- const v = s ? t + 1 : t;
456
- for (const V of o.kids ?? [])
457
- u.push(...Ve(V, e, v, l));
454
+ const v = l ? t + 1 : t;
455
+ for (const L of o.kids ?? [])
456
+ u.push(...Fe(L, e, v, s));
458
457
  return u;
459
458
  }
460
459
  function vn(o, e, t) {
461
460
  if (o.value == null) return o.display || void 0;
462
- const l = pn(o.value, e);
463
- return (t == null ? void 0 : t(l)) ?? o.display ?? l;
461
+ const s = pn(o.value, e);
462
+ return (t == null ? void 0 : t(s)) ?? o.display ?? s;
464
463
  }
465
464
  function $e(o, e) {
466
465
  return JSON.stringify(o, null, 2).split(`
467
466
  `).map((t) => ({ type: e, text: t }));
468
467
  }
469
468
  function gn() {
470
- const o = _e(), e = /* @__PURE__ */ new Map(), t = k(!1), l = k(null);
471
- async function a(s) {
472
- const r = e.get(s.id);
469
+ const o = _e(), e = /* @__PURE__ */ new Map(), t = k(!1), s = k(null);
470
+ async function a(l) {
471
+ const r = e.get(l.id);
473
472
  if (r) {
474
- l.value = r;
473
+ s.value = r;
475
474
  return;
476
475
  }
477
476
  t.value = !0;
478
477
  try {
479
- const u = s.doc_id.indexOf("/"), v = s.doc_id.slice(0, u), p = s.doc_id.slice(u + 1), [V, E] = await Promise.all([
480
- s.parent ? o.getState(v, p, s.parent) : Promise.resolve({}),
481
- o.getState(v, p, s.id)
482
- ]), F = { diff: s.parent ? Qe(JSON.stringify(V), JSON.stringify(E)) ?? [
483
- ...$e(V, "del"),
484
- ...$e(E, "add")
485
- ] : $e(E, "add"), conflict: !1 };
486
- e.set(s.id, F), l.value = F;
478
+ const u = l.doc_id.indexOf("/"), v = l.doc_id.slice(0, u), p = l.doc_id.slice(u + 1), [L, I] = await Promise.all([
479
+ l.parent ? o.getState(v, p, l.parent) : Promise.resolve({}),
480
+ o.getState(v, p, l.id)
481
+ ]), U = { diff: l.parent ? tt(JSON.stringify(L), JSON.stringify(I)) ?? [
482
+ ...$e(L, "del"),
483
+ ...$e(I, "add")
484
+ ] : $e(I, "add"), conflict: !1 };
485
+ e.set(l.id, U), s.value = U;
487
486
  } catch (u) {
488
487
  if (!an(u))
489
- throw l.value = null, u;
488
+ throw s.value = null, u;
490
489
  const v = { diff: null, conflict: !0 };
491
- e.set(s.id, v), l.value = v;
490
+ e.set(l.id, v), s.value = v;
492
491
  } finally {
493
492
  t.value = !1;
494
493
  }
495
494
  }
496
- return { isLoading: t, result: l, load: a };
495
+ return { isLoading: t, result: s, load: a };
497
496
  }
498
497
  const yn = {
499
498
  key: 0,
@@ -507,10 +506,10 @@ const yn = {
507
506
  }, bn = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, xn = ["onClick", "onKeydown"], wn = { class: "fm-typo-en-body-md-600" }, kn = { class: "text-xs text-gray-500" }, Sn = {
508
507
  key: 0,
509
508
  class: "flex-1 overflow-y-auto pl-4"
510
- }, $n = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, Cn = { class: "flex flex-wrap items-center gap-8" }, Ln = { class: "fm-typo-en-body-lg-600" }, Rn = {
509
+ }, $n = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, Cn = { class: "flex flex-wrap items-center gap-8" }, Ln = { class: "fm-typo-en-body-lg-600" }, Dn = {
511
510
  key: 0,
512
511
  class: "rounded-full bg-gray-100 px-8 text-xs text-gray-500"
513
- }, Dn = { class: "text-xs text-gray-500" }, Vn = { class: "mb-12" }, In = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, En = {
512
+ }, Rn = { class: "text-xs text-gray-500" }, Vn = { class: "mb-12" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, In = {
514
513
  key: 0,
515
514
  class: "mb-12"
516
515
  }, Nn = {
@@ -519,10 +518,10 @@ const yn = {
519
518
  }, Pn = {
520
519
  key: 2,
521
520
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
522
- }, Tn = {
521
+ }, Bn = {
523
522
  key: 0,
524
523
  class: "text-xs text-gray-400"
525
- }, Un = { class: "fm-typo-en-body-md-600" }, Bn = { class: "flex flex-col gap-6" }, Fn = {
524
+ }, En = { class: "fm-typo-en-body-md-600" }, Tn = { class: "flex flex-col gap-6" }, Un = {
526
525
  key: 0,
527
526
  class: "text-gray-700"
528
527
  }, An = { class: "min-w-[120px] shrink-0 text-gray-500" }, Mn = {
@@ -531,10 +530,10 @@ const yn = {
531
530
  }, On = {
532
531
  key: 0,
533
532
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
534
- }, Kn = { key: 0 }, Gn = { key: 1 }, zn = {
533
+ }, Kn = { key: 0 }, zn = { key: 1 }, jn = {
535
534
  key: 1,
536
535
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
537
- }, jn = { key: 0 }, Hn = { key: 1 }, Jn = {
536
+ }, Gn = { key: 0 }, Hn = { key: 1 }, Jn = {
538
537
  key: 1,
539
538
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
540
539
  }, Yn = {
@@ -555,7 +554,7 @@ const yn = {
555
554
  }, Qn = {
556
555
  key: 2,
557
556
  class: "mt-16 break-all border-t border-gray-200 pt-8 font-mono text-xs text-gray-400"
558
- }, eo = { key: 0 }, to = "capture baseline", no = /* @__PURE__ */ ce({
557
+ }, eo = { key: 0 }, to = "capture baseline", no = /* @__PURE__ */ re({
559
558
  __name: "ChangelogPanel",
560
559
  props: {
561
560
  commits: {},
@@ -563,36 +562,36 @@ const yn = {
563
562
  resolveName: { type: Function }
564
563
  },
565
564
  setup(o) {
566
- const e = o, { t } = he(), l = k(null), a = D(
567
- () => e.commits.find((f) => f.id === l.value)
568
- ), s = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = D(() => {
565
+ const e = o, { t } = he(), s = k(null), a = F(
566
+ () => e.commits.find((f) => f.id === s.value)
567
+ ), l = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = F(() => {
569
568
  var b;
570
569
  return (((b = a.value) == null ? void 0 : b.changes) ?? []).filter((M) => {
571
- const { raw: A } = De(M.path);
572
- return A === "@payload" || M.from == null && M.to == null ? !1 : !A.split(".").some((X) => s.has(X));
570
+ const { raw: A } = Ve(M.path);
571
+ return A === "@payload" || M.from == null && M.to == null ? !1 : !A.split(".").some((X) => l.has(X));
573
572
  });
574
573
  });
575
574
  Z(
576
575
  () => e.commits,
577
576
  (f) => {
578
577
  var b;
579
- f.find((M) => M.id === l.value) || (l.value = ((b = f[0]) == null ? void 0 : b.id) ?? null);
578
+ f.find((M) => M.id === s.value) || (s.value = ((b = f[0]) == null ? void 0 : b.id) ?? null);
580
579
  },
581
580
  { immediate: !0 }
582
581
  );
583
- const u = k(!1), { isLoading: v, result: p, load: V } = gn();
582
+ const u = k(!1), { isLoading: v, result: p, load: L } = gn();
584
583
  Z([u, a], ([f, b]) => {
585
- p.value = null, !(!f || !b) && V(b).catch((M) => {
584
+ p.value = null, !(!f || !b) && L(b).catch((M) => {
586
585
  console.error("changelog snapshot load failed", M), u.value = !1;
587
586
  });
588
587
  });
589
- function E(f) {
588
+ function I(f) {
590
589
  return f ? f.slice(0, 8) : "";
591
590
  }
592
591
  function P(f) {
593
592
  return f ? new Date(f).toLocaleString() : "";
594
593
  }
595
- function F(f) {
594
+ function U(f) {
596
595
  if (f == null) return "";
597
596
  let b;
598
597
  try {
@@ -607,263 +606,263 @@ const yn = {
607
606
  }
608
607
  function O(f) {
609
608
  if (f.message === to) return t("inventory.changelog.captureBaseline");
610
- const b = Xe(f.message);
609
+ const b = Ze(f.message);
611
610
  if (!b) return f.message || t("inventory.changelog.noMessage");
612
- const M = C(b.labelKey);
611
+ const M = D(b.labelKey);
613
612
  return b.name ? t(`inventory.changelog.message.${b.verb}`, { module: M, name: b.name }) : t(`inventory.changelog.message.${b.verb}NoName`, { module: M });
614
613
  }
615
- function C(f) {
616
- return qe(f) ? t(f) : f;
614
+ function D(f) {
615
+ return Qe(f) ? t(f) : f;
617
616
  }
618
- const H = (f) => /[^a-zA-Z]/.test(f);
619
- function L(f, b) {
620
- return f == null || b == null ? null : Qe(f, b);
617
+ const J = (f) => /[^a-zA-Z]/.test(f);
618
+ function R(f, b) {
619
+ return f == null || b == null ? null : tt(f, b);
621
620
  }
622
621
  function _(f) {
623
622
  if (!(!f.to_value && !f.from_value))
624
623
  return {
625
- toTree: f.to_value ? Ve(f.to_value, t, 0, e.resolveName) : void 0,
626
- fromTree: f.from_value ? Ve(f.from_value, t, 0, e.resolveName) : void 0
624
+ toTree: f.to_value ? Fe(f.to_value, t, 0, e.resolveName) : void 0,
625
+ fromTree: f.from_value ? Fe(f.from_value, t, 0, e.resolveName) : void 0
627
626
  };
628
627
  }
629
628
  function w(f) {
630
629
  return f === "add" ? "bg-green-50 text-green-700" : f === "del" ? "bg-red-50 text-red-700" : f === "skip" ? "text-gray-400" : "text-gray-600";
631
630
  }
632
- function U(f) {
631
+ function E(f) {
633
632
  return f.type === "skip" ? f.text : (f.type === "add" ? "+ " : f.type === "del" ? "- " : " ") + f.text;
634
633
  }
635
- const K = D(() => {
636
- const f = /* @__PURE__ */ new Map(), b = [], M = (g, m) => {
637
- let T = f.get(g);
638
- return T || (T = m(), f.set(g, T), b.push(T)), T;
639
- }, A = () => M("@doc", () => ({ header: "", lines: [] })), X = (g, m) => {
640
- var B;
641
- if (g == null) return m;
642
- let T;
634
+ const K = F(() => {
635
+ const f = /* @__PURE__ */ new Map(), b = [], M = (y, m) => {
636
+ let B = f.get(y);
637
+ return B || (B = m(), f.set(y, B), b.push(B)), B;
638
+ }, A = () => M("@doc", () => ({ header: "", lines: [] })), X = (y, m) => {
639
+ var T;
640
+ if (y == null) return m;
641
+ let B;
643
642
  try {
644
- T = JSON.parse(g);
643
+ B = JSON.parse(y);
645
644
  } catch {
646
- T = g;
645
+ B = y;
647
646
  }
648
- return (typeof T == "string" ? (B = e.resolveName) == null ? void 0 : B.call(e, T) : void 0) ?? m;
649
- }, J = (g, m, T) => {
650
- var B, W, ee, te;
647
+ return (typeof B == "string" ? (T = e.resolveName) == null ? void 0 : T.call(e, B) : void 0) ?? m;
648
+ }, Y = (y, m, B) => {
649
+ var T, W, ee, ne;
651
650
  const x = _(m);
652
- x ? g.lines.push({ label: T, ...x }) : m.from != null && m.to != null ? g.lines.push({
653
- label: T,
651
+ x ? y.lines.push({ label: B, ...x }) : m.from != null && m.to != null ? y.lines.push({
652
+ label: B,
654
653
  from: m.from,
655
654
  to: m.to,
656
- diff: L(m.from, m.to),
657
- fromDisplay: X(m.from, (B = m.display) == null ? void 0 : B.from),
655
+ diff: R(m.from, m.to),
656
+ fromDisplay: X(m.from, (T = m.display) == null ? void 0 : T.from),
658
657
  toDisplay: X(m.to, (W = m.display) == null ? void 0 : W.to)
659
- }) : m.to != null ? g.lines.push({ label: T, to: m.to, toDisplay: X(m.to, (ee = m.display) == null ? void 0 : ee.to) }) : g.lines.push({ label: T, from: m.from, fromDisplay: X(m.from, (te = m.display) == null ? void 0 : te.from) });
660
- }, R = (g) => {
661
- var T;
662
- const m = g.element;
658
+ }) : m.to != null ? y.lines.push({ label: B, to: m.to, toDisplay: X(m.to, (ee = m.display) == null ? void 0 : ee.to) }) : y.lines.push({ label: B, from: m.from, fromDisplay: X(m.from, (ne = m.display) == null ? void 0 : ne.from) });
659
+ }, V = (y) => {
660
+ var B;
661
+ const m = y.element;
663
662
  if (m) {
664
663
  const x = M(`kit:${(m.trail ?? []).join(".")}:${m.id ?? ""}`, () => ({
665
- kind: (m.trail ?? []).map(C).join(" › "),
664
+ kind: (m.trail ?? []).map(D).join(" › "),
666
665
  header: m.name || m.id || "",
667
666
  lines: []
668
667
  }));
669
- if ((T = g.field) != null && T.length)
670
- J(x, g, g.field.map(C).join(" › "));
668
+ if ((B = y.field) != null && B.length)
669
+ Y(x, y, y.field.map(D).join(" › "));
671
670
  else {
672
- x.badge = g.to != null ? "added" : "removed";
673
- const B = _(g);
674
- B && x.lines.push(B);
671
+ x.badge = y.to != null ? "added" : "removed";
672
+ const T = _(y);
673
+ T && x.lines.push(T);
675
674
  }
676
675
  return;
677
676
  }
678
- J(A(), g, (g.field ?? []).map(C).join(" › "));
677
+ Y(A(), y, (y.field ?? []).map(D).join(" › "));
679
678
  };
680
- for (const g of r.value) {
681
- const { raw: m, human: T } = De(g.path);
682
- if (g.kind === "create" && !m) {
683
- const ee = _(g);
679
+ for (const y of r.value) {
680
+ const { raw: m, human: B } = Ve(y.path);
681
+ if (y.kind === "create" && !m) {
682
+ const ee = _(y);
684
683
  A().lines.push(
685
684
  ee ? { label: t("inventory.changelog.kind.created"), ...ee } : { text: t("inventory.changelog.kind.created") }
686
685
  );
687
686
  continue;
688
687
  }
689
- if (!g.path.includes(Ze) && (g.field || g.element)) {
690
- R(g);
688
+ if (!y.path.includes(et) && (y.field || y.element)) {
689
+ V(y);
691
690
  continue;
692
691
  }
693
- const x = m ? m.split(".") : [], B = T ? T.split(" › ") : [], W = x.findIndex((ee, te) => te > 0 && H(ee));
694
- if (W > 0 && B.length === x.length) {
695
- const ee = B[W], te = M(x.slice(0, W + 1).join("."), () => ({
696
- kind: B.slice(0, W).map(C).join(" › "),
692
+ const x = m ? m.split(".") : [], T = B ? B.split(" › ") : [], W = x.findIndex((ee, ne) => ne > 0 && J(ee));
693
+ if (W > 0 && T.length === x.length) {
694
+ const ee = T[W], ne = M(x.slice(0, W + 1).join("."), () => ({
695
+ kind: T.slice(0, W).map(D).join(" › "),
697
696
  header: ee,
698
697
  lines: []
699
- })), re = B.slice(W + 1).map(C).join(" › ");
700
- if (re) J(te, g, re);
701
- else if (g.from != null && g.to != null) J(te, g, ee);
698
+ })), ie = T.slice(W + 1).map(D).join(" › ");
699
+ if (ie) Y(ne, y, ie);
700
+ else if (y.from != null && y.to != null) Y(ne, y, ee);
702
701
  else {
703
- te.badge = g.to != null ? "added" : "removed";
704
- const de = _(g);
705
- de && te.lines.push(de);
702
+ ne.badge = y.to != null ? "added" : "removed";
703
+ const de = _(y);
704
+ de && ne.lines.push(de);
706
705
  }
707
706
  continue;
708
707
  }
709
- J(A(), g, B.map(C).join(" › "));
708
+ Y(A(), y, T.map(D).join(" › "));
710
709
  }
711
710
  return b;
712
711
  });
713
712
  return (f, b) => {
714
- var X, J;
715
- const M = Y("FmCircularProgress"), A = Y("FmSwitch");
713
+ var X, Y;
714
+ const M = z("FmCircularProgress"), A = z("FmSwitch");
716
715
  return f.isLoading ? (i(), c("div", yn, [
717
- I(M)
716
+ C(M)
718
717
  ])) : f.commits.length ? (i(), c("div", _n, [
719
- h("ol", bn, [
720
- (i(!0), c(j, null, oe(f.commits, (R) => (i(), c("li", {
721
- key: R.id,
718
+ g("ol", bn, [
719
+ (i(!0), c(H, null, ae(f.commits, (V) => (i(), c("li", {
720
+ key: V.id,
722
721
  role: "button",
723
722
  tabindex: "0",
724
- class: ae([
723
+ class: le([
725
724
  "cursor-pointer border-l-2 py-8 pl-12",
726
- R.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
725
+ V.id === s.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
727
726
  ]),
728
- onClick: (g) => l.value = R.id,
727
+ onClick: (y) => s.value = V.id,
729
728
  onKeydown: [
730
- Ae((g) => l.value = R.id, ["enter"]),
731
- Ae(mt((g) => l.value = R.id, ["prevent"]), ["space"])
729
+ Me((y) => s.value = V.id, ["enter"]),
730
+ Me(vt((y) => s.value = V.id, ["prevent"]), ["space"])
732
731
  ]
733
732
  }, [
734
- h("div", wn, y(O(R)), 1),
735
- h("div", kn, y(Q(R)) + " · " + y(P(R.at)) + " · " + y(E(R.id)), 1)
733
+ g("div", wn, h(O(V)), 1),
734
+ g("div", kn, h(Q(V)) + " · " + h(P(V.at)) + " · " + h(I(V.id)), 1)
736
735
  ], 42, xn))), 128))
737
736
  ]),
738
737
  a.value ? (i(), c("div", Sn, [
739
- h("div", $n, [
740
- h("div", Cn, [
741
- h("div", Ln, y(O(a.value)), 1),
742
- a.value.parent ? N("", !0) : (i(), c("span", Rn, y($(t)("inventory.changelog.rootCommit")), 1))
738
+ g("div", $n, [
739
+ g("div", Cn, [
740
+ g("div", Ln, h(O(a.value)), 1),
741
+ a.value.parent ? N("", !0) : (i(), c("span", Dn, h($(t)("inventory.changelog.rootCommit")), 1))
743
742
  ]),
744
- h("div", Dn, y(Q(a.value)) + " · " + y(P(a.value.at)), 1)
743
+ g("div", Rn, h(Q(a.value)) + " · " + h(P(a.value.at)), 1)
745
744
  ]),
746
- h("div", Vn, [
747
- I(Ye, null, {
748
- default: le(() => [
749
- h("span", In, y($(t)("inventory.changelog.dataDiff")), 1),
750
- I(A, {
745
+ g("div", Vn, [
746
+ C(Xe, null, {
747
+ default: te(() => [
748
+ g("span", Fn, h($(t)("inventory.changelog.dataDiff")), 1),
749
+ C(A, {
751
750
  modelValue: u.value,
752
- "onUpdate:modelValue": b[0] || (b[0] = (R) => u.value = R)
751
+ "onUpdate:modelValue": b[0] || (b[0] = (V) => u.value = V)
753
752
  }, null, 8, ["modelValue"])
754
753
  ]),
755
754
  _: 1
756
755
  })
757
756
  ]),
758
- u.value ? (i(), c("div", En, [
759
- $(v) ? (i(), pe(M, { key: 0 })) : (X = $(p)) != null && X.conflict ? (i(), c("div", Nn, y($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (J = $(p)) != null && J.diff ? (i(), c("div", Pn, [
760
- (i(!0), c(j, null, oe($(p).diff, (R, g) => (i(), c("div", {
761
- key: g,
762
- class: ae(["whitespace-pre px-4", w(R.type)])
763
- }, y(U(R)), 3))), 128))
757
+ u.value ? (i(), c("div", In, [
758
+ $(v) ? (i(), ce(M, { key: 0 })) : (X = $(p)) != null && X.conflict ? (i(), c("div", Nn, h($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (Y = $(p)) != null && Y.diff ? (i(), c("div", Pn, [
759
+ (i(!0), c(H, null, ae($(p).diff, (V, y) => (i(), c("div", {
760
+ key: y,
761
+ class: le(["whitespace-pre px-4", w(V.type)])
762
+ }, h(E(V)), 3))), 128))
764
763
  ])) : N("", !0)
765
764
  ])) : N("", !0),
766
- (i(!0), c(j, null, oe(K.value, (R, g) => (i(), c("div", {
767
- key: g,
765
+ (i(!0), c(H, null, ae(K.value, (V, y) => (i(), c("div", {
766
+ key: y,
768
767
  class: "mb-12 rounded-lg border border-gray-200 p-12"
769
768
  }, [
770
- R.kind || R.header || R.badge ? (i(), c("div", {
769
+ V.kind || V.header || V.badge ? (i(), c("div", {
771
770
  key: 0,
772
- class: ae(["flex flex-wrap items-baseline gap-8", R.lines.length ? "mb-8" : ""])
771
+ class: le(["flex flex-wrap items-baseline gap-8", V.lines.length ? "mb-8" : ""])
773
772
  }, [
774
- R.kind ? (i(), c("span", Tn, y(R.kind), 1)) : N("", !0),
775
- h("span", Un, y(R.header), 1),
776
- R.badge ? (i(), c("span", {
773
+ V.kind ? (i(), c("span", Bn, h(V.kind), 1)) : N("", !0),
774
+ g("span", En, h(V.header), 1),
775
+ V.badge ? (i(), c("span", {
777
776
  key: 1,
778
- class: ae(["rounded-full px-8 text-xs", R.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
779
- }, y(R.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : N("", !0)
777
+ class: le(["rounded-full px-8 text-xs", V.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
778
+ }, h(V.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : N("", !0)
780
779
  ], 2)) : N("", !0),
781
- h("ul", Bn, [
782
- (i(!0), c(j, null, oe(R.lines, (m, T) => (i(), c("li", {
783
- key: T,
780
+ g("ul", Tn, [
781
+ (i(!0), c(H, null, ae(V.lines, (m, B) => (i(), c("li", {
782
+ key: B,
784
783
  class: "flex flex-wrap items-baseline gap-8 text-sm"
785
784
  }, [
786
- m.text ? (i(), c("span", Fn, y(m.text), 1)) : (i(), c(j, { key: 1 }, [
787
- h("span", An, y(m.label), 1),
785
+ m.text ? (i(), c("span", Un, h(m.text), 1)) : (i(), c(H, { key: 1 }, [
786
+ g("span", An, h(m.label), 1),
788
787
  m.toTree || m.fromTree ? (i(), c("div", Mn, [
789
788
  m.fromTree ? (i(), c("div", On, [
790
- (i(!0), c(j, null, oe(m.fromTree, (x, B) => (i(), c("div", {
791
- key: B,
792
- class: ae(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-red-700"])
789
+ (i(!0), c(H, null, ae(m.fromTree, (x, T) => (i(), c("div", {
790
+ key: T,
791
+ class: le(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-red-700"])
793
792
  }, [
794
- (i(!0), c(j, null, oe(x.depth, (W) => (i(), c("span", {
793
+ (i(!0), c(H, null, ae(x.depth, (W) => (i(), c("span", {
795
794
  key: W,
796
795
  class: "inline-block w-16"
797
796
  }))), 128)),
798
797
  x.label ? (i(), c("span", Kn, [
799
- ie(y(x.label), 1),
800
- x.text ? (i(), c(j, { key: 0 }, [
801
- ie(":")
798
+ ue(h(x.label), 1),
799
+ x.text ? (i(), c(H, { key: 0 }, [
800
+ ue(":")
802
801
  ], 64)) : N("", !0)
803
802
  ])) : N("", !0),
804
- x.text ? (i(), c("span", Gn, y(x.text), 1)) : N("", !0)
803
+ x.text ? (i(), c("span", zn, h(x.text), 1)) : N("", !0)
805
804
  ], 2))), 128))
806
805
  ])) : N("", !0),
807
- m.toTree ? (i(), c("div", zn, [
808
- (i(!0), c(j, null, oe(m.toTree, (x, B) => (i(), c("div", {
809
- key: B,
810
- class: ae(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-green-700"])
806
+ m.toTree ? (i(), c("div", jn, [
807
+ (i(!0), c(H, null, ae(m.toTree, (x, T) => (i(), c("div", {
808
+ key: T,
809
+ class: le(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-green-700"])
811
810
  }, [
812
- (i(!0), c(j, null, oe(x.depth, (W) => (i(), c("span", {
811
+ (i(!0), c(H, null, ae(x.depth, (W) => (i(), c("span", {
813
812
  key: W,
814
813
  class: "inline-block w-16"
815
814
  }))), 128)),
816
- x.label ? (i(), c("span", jn, [
817
- ie(y(x.label), 1),
818
- x.text ? (i(), c(j, { key: 0 }, [
819
- ie(":")
815
+ x.label ? (i(), c("span", Gn, [
816
+ ue(h(x.label), 1),
817
+ x.text ? (i(), c(H, { key: 0 }, [
818
+ ue(":")
820
819
  ], 64)) : N("", !0)
821
820
  ])) : N("", !0),
822
- x.text ? (i(), c("span", Hn, y(x.text), 1)) : N("", !0)
821
+ x.text ? (i(), c("span", Hn, h(x.text), 1)) : N("", !0)
823
822
  ], 2))), 128))
824
823
  ])) : N("", !0)
825
824
  ])) : m.diff ? (i(), c("div", Jn, [
826
- (i(!0), c(j, null, oe(m.diff, (x, B) => (i(), c("div", {
827
- key: B,
828
- class: ae(["whitespace-pre px-4", w(x.type)])
829
- }, y(U(x)), 3))), 128))
825
+ (i(!0), c(H, null, ae(m.diff, (x, T) => (i(), c("div", {
826
+ key: T,
827
+ class: le(["whitespace-pre px-4", w(x.type)])
828
+ }, h(E(x)), 3))), 128))
830
829
  ])) : (i(), c("span", Yn, [
831
- m.from != null ? (i(), c("span", Wn, y(m.fromDisplay ?? F(m.from)), 1)) : N("", !0),
830
+ m.from != null ? (i(), c("span", Wn, h(m.fromDisplay ?? U(m.from)), 1)) : N("", !0),
832
831
  m.from != null && m.to != null ? (i(), c("span", Xn, "→")) : N("", !0),
833
- m.to != null ? (i(), c("span", qn, y(m.toDisplay ?? F(m.to)), 1)) : N("", !0)
832
+ m.to != null ? (i(), c("span", qn, h(m.toDisplay ?? U(m.to)), 1)) : N("", !0)
834
833
  ]))
835
834
  ], 64))
836
835
  ]))), 128))
837
836
  ])
838
837
  ]))), 128)),
839
- K.value.length ? N("", !0) : (i(), c("div", Zn, y($(t)("inventory.changelog.empty")), 1)),
838
+ K.value.length ? N("", !0) : (i(), c("div", Zn, h($(t)("inventory.changelog.empty")), 1)),
840
839
  u.value ? (i(), c("div", Qn, [
841
- ie(y(a.value.id) + " ", 1),
842
- a.value.parent ? (i(), c("span", eo, "← " + y(a.value.parent), 1)) : N("", !0)
840
+ ue(h(a.value.id) + " ", 1),
841
+ a.value.parent ? (i(), c("span", eo, "← " + h(a.value.parent), 1)) : N("", !0)
843
842
  ])) : N("", !0)
844
843
  ])) : N("", !0)
845
- ])) : (i(), c("div", hn, y($(t)("inventory.changelog.empty")), 1));
844
+ ])) : (i(), c("div", hn, h($(t)("inventory.changelog.empty")), 1));
846
845
  };
847
846
  }
848
- }), oo = { class: "flex flex-col gap-8" }, ao = { class: "flex flex-wrap items-center gap-16" }, so = { class: "fm-typo-en-heading-lg-600" }, lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, io = { class: "flex flex-wrap items-center gap-12" }, uo = { class: "flex shrink-0 items-center gap-8" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fo = { class: "flex flex-wrap items-center gap-12" }, mo = {
847
+ }), oo = { class: "flex flex-col gap-8" }, ao = { class: "flex flex-wrap items-center gap-16" }, lo = { class: "fm-typo-en-heading-lg-600" }, so = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, io = { class: "flex flex-wrap items-center gap-12" }, uo = { class: "flex shrink-0 items-center gap-8" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fo = { class: "flex flex-wrap items-center gap-12" }, mo = {
849
848
  key: 0,
850
849
  class: "fm-typo-en-body-md-600"
851
850
  }, po = { class: "fm-typo-en-heading-md-600" }, vo = {
852
851
  key: 0,
853
852
  class: "flex justify-center py-8"
854
- }, Ce = "inventory.changelog.label.", go = /* @__PURE__ */ ce({
853
+ }, Ce = "inventory.changelog.label.", go = /* @__PURE__ */ re({
855
854
  __name: "ChangelogDialog",
856
855
  props: {
857
856
  modelValue: { type: Boolean }
858
857
  },
859
858
  emits: ["update:modelValue"],
860
859
  setup(o, { emit: e }) {
861
- const t = o, l = e, a = D({
860
+ const t = o, s = e, a = F({
862
861
  get: () => t.modelValue,
863
- set: (n) => l("update:modelValue", n)
864
- }), { t: s } = he(), r = ge(), u = He(), v = je(), p = _e(), { breakpoints: V } = Vt(), E = D(() => V.value.xs || V.value.sm), P = D(() => E.value ? "98vw" : "72vw"), { commits: F, isLoading: Q, hasMore: O, load: C, loadMore: H } = sn();
865
- function L() {
866
- H().catch((n) => console.error("changelog load more failed", n));
862
+ set: (n) => s("update:modelValue", n)
863
+ }), { t: l } = he(), r = ge(), u = Ye(), v = Je(), p = _e(), { breakpoints: L } = Vt(), I = F(() => L.value.xs || L.value.sm), P = F(() => I.value ? "98vw" : "72vw"), { commits: U, isLoading: Q, hasMore: O, load: D, loadMore: J } = ln();
864
+ function R() {
865
+ J().catch((n) => console.error("changelog load more failed", n));
867
866
  }
868
867
  function _(n) {
869
868
  return n ? new Date(n).toLocaleString() : "—";
@@ -871,8 +870,8 @@ const yn = {
871
870
  function w(n) {
872
871
  return [...n].sort((d, S) => (S.lastUpdate ?? "").localeCompare(d.lastUpdate ?? ""));
873
872
  }
874
- function U(n, d, S) {
875
- C(n, d, S).catch((G) => console.error("changelog load failed", G));
873
+ function E(n, d, S) {
874
+ D(n, d, S).catch((j) => console.error("changelog load failed", j));
876
875
  }
877
876
  const K = k([]);
878
877
  async function f() {
@@ -885,104 +884,104 @@ const yn = {
885
884
  console.error("changelog domain list load failed", S), K.value = [];
886
885
  }
887
886
  }
888
- const b = D(() => [
889
- { label: s("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
890
- { label: s("inventory.changelog.label.closingDraft"), value: "closingDraft" },
891
- { label: s("inventory.changelog.domainInventory"), value: "inventory" },
892
- ...K.value.map((n) => ({ label: s(n.labelKey), value: n.domain }))
893
- ]), M = k(b.value[0]), A = D(() => {
887
+ const b = F(() => [
888
+ { label: l("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
889
+ { label: l("inventory.changelog.label.closingDraft"), value: "closingDraft" },
890
+ { label: l("inventory.changelog.domainInventory"), value: "inventory" },
891
+ ...K.value.map((n) => ({ label: l(n.labelKey), value: n.domain }))
892
+ ]), M = k(b.value[0]), A = F(() => {
894
893
  var n;
895
894
  return ((n = M.value) == null ? void 0 : n.value) ?? "purchaseOrder";
896
- }), X = D(
895
+ }), X = F(
897
896
  () => K.value.some((n) => n.domain === A.value)
898
- ), J = k(!1), R = D(
897
+ ), Y = k(!1), V = F(
899
898
  () => ["sku", "recipe", "unit"].map((n) => ({
900
- label: s(Ce + n),
899
+ label: l(Ce + n),
901
900
  value: n
902
901
  }))
903
- ), g = k(R.value[0]), m = D(() => {
902
+ ), y = k(V.value[0]), m = F(() => {
904
903
  var n;
905
- return ((n = g.value) == null ? void 0 : n.value) ?? "sku";
906
- }), T = k(""), x = k(null), B = k(!1), W = D(() => {
904
+ return ((n = y.value) == null ? void 0 : n.value) ?? "sku";
905
+ }), B = k(""), x = k(null), T = k(!1), W = F(() => {
907
906
  var S;
908
907
  const n = (S = r.currentBusiness.value) == null ? void 0 : S._id, d = u.inventory._id;
909
908
  return n && d ? `business_${n}/${d}` : "";
910
- }), ee = D(() => {
909
+ }), ee = F(() => {
911
910
  const n = /* @__PURE__ */ new Map(), d = u.inventory;
912
- for (const S of [d.sku, d.recipe, d.unit, d.skuGroup])
913
- for (const G of S ?? [])
914
- G._id && G.name && n.set(G._id, G.name);
911
+ for (const S of [d.sku, d.recipe, d.unit])
912
+ for (const j of S ?? [])
913
+ j._id && j.name && n.set(j._id, j.name);
915
914
  for (const S of d.unit ?? [])
916
- for (const G of S.measurements ?? []) {
917
- if (!G.id) continue;
918
- const q = G.abbrev || G.name;
915
+ for (const j of S.measurements ?? []) {
916
+ if (!j.id) continue;
917
+ const q = j.abbrev || j.name;
919
918
  if (!q) continue;
920
- const ne = Nt.toDouble(G.conversion);
921
- n.set(G.id, ne ? `${q} (1 ${q} = ${ne} ${S.abbrev})` : q);
919
+ const oe = Nt.toDouble(j.conversion);
920
+ n.set(j.id, oe ? `${q} (1 ${q} = ${oe} ${S.abbrev})` : q);
922
921
  }
923
922
  return n;
924
- }), te = (n) => ee.value.get(n), re = k([]), de = k(!1);
925
- async function Ne() {
923
+ }), ne = (n) => ee.value.get(n), ie = k([]), de = k(!1);
924
+ async function Pe() {
926
925
  var d;
927
926
  const n = (d = r.currentBusiness.value) == null ? void 0 : d._id;
928
927
  if (n) {
929
928
  de.value = !0;
930
929
  try {
931
- re.value = w(
930
+ ie.value = w(
932
931
  await p.listInventory(n, m.value)
933
932
  );
934
933
  } catch (S) {
935
- console.error("changelog inventory list load failed", S), re.value = [];
934
+ console.error("changelog inventory list load failed", S), ie.value = [];
936
935
  } finally {
937
936
  de.value = !1;
938
937
  }
939
938
  }
940
939
  }
941
- const et = D(
942
- () => B.value ? re.value : re.value.filter((n) => !n.deleted)
943
- ), tt = D(() => [
944
- { accessorKey: "id", header: () => s("inventory.closing.draft.table.id"), size: 320 },
940
+ const nt = F(
941
+ () => T.value ? ie.value : ie.value.filter((n) => !n.deleted)
942
+ ), ot = F(() => [
943
+ { accessorKey: "id", header: () => l("inventory.closing.draft.table.id"), size: 320 },
945
944
  {
946
945
  id: "name",
947
- header: () => s("inventory.common.name"),
946
+ header: () => l("inventory.common.name"),
948
947
  accessorFn: (n) => n.name,
949
948
  // Deleted records sit in the same list as live ones, so the row says which
950
949
  // it is; nothing else distinguishes them.
951
- cell: ({ row: n }) => n.original.deleted ? pt(
950
+ cell: ({ row: n }) => n.original.deleted ? gt(
952
951
  "span",
953
952
  { "data-deleted": "" },
954
- `${n.original.name} (${s("inventory.changelog.deleted")})`
953
+ `${n.original.name} (${l("inventory.changelog.deleted")})`
955
954
  ) : n.original.name
956
955
  },
957
956
  {
958
957
  id: "lastUpdate",
959
- header: () => s("inventory.changelog.column.lastUpdate"),
958
+ header: () => l("inventory.changelog.column.lastUpdate"),
960
959
  size: 200,
961
960
  // Raw ISO is the sort key — clicking the header on formatted dates would
962
961
  // order them lexicographically by locale string. Formatted only to display.
963
962
  accessorFn: (n) => n.lastUpdate ?? "",
964
963
  cell: ({ getValue: n }) => _(n() || void 0)
965
964
  }
966
- ]), { commits: nt, load: ot } = rn();
967
- function at(n) {
968
- x.value = n, J.value = !0, U(W.value, We, Re), n.id && ot(`${W.value}/${m.value}/${n.id}`).catch(
965
+ ]), { commits: at, load: lt } = rn();
966
+ function st(n) {
967
+ x.value = n, Y.value = !0, E(W.value, qe, Re), n.id && lt(`${W.value}/${m.value}/${n.id}`).catch(
969
968
  (d) => console.error("changelog per-entity load failed", d)
970
969
  );
971
970
  }
972
- function st(n, d) {
973
- const S = Xe(n.message);
974
- return S && S.labelKey === Ce + m.value && S.name === d.name ? !0 : (n.changes ?? []).some((G) => {
975
- const q = dn(G.path);
971
+ function rt(n, d) {
972
+ const S = Ze(n.message);
973
+ return S && S.labelKey === Ce + m.value && S.name === d.name ? !0 : (n.changes ?? []).some((j) => {
974
+ const q = dn(j.path);
976
975
  return q.type === Ce + m.value && q.name === d.name;
977
976
  });
978
977
  }
979
- const lt = D(() => {
978
+ const it = F(() => {
980
979
  const n = x.value;
981
980
  if (!n) return [];
982
- const d = F.value.filter((S) => st(S, n));
983
- return ln(d, nt.value);
981
+ const d = U.value.filter((S) => rt(S, n));
982
+ return sn(d, at.value);
984
983
  }), be = k([]), xe = k(!1), we = k(null);
985
- async function rt() {
984
+ async function ut() {
986
985
  var d;
987
986
  const n = (d = r.currentBusiness.value) == null ? void 0 : d._id;
988
987
  if (n) {
@@ -998,35 +997,35 @@ const yn = {
998
997
  }
999
998
  }
1000
999
  }
1001
- function it(n) {
1000
+ function ct(n) {
1002
1001
  var S;
1003
1002
  const d = (S = r.currentBusiness.value) == null ? void 0 : S._id;
1004
- d && (we.value = n, J.value = !0, U(`business_${d}/${n.id}`, void 0, Le));
1003
+ d && (we.value = n, Y.value = !0, E(`business_${d}/${n.id}`, void 0, De));
1005
1004
  }
1006
- const ve = k(It()), ye = k([]), ke = k(!1), fe = k(null), Pe = D(() => {
1005
+ const ve = k(Ft()), ye = k([]), ke = k(!1), fe = k(null), Be = F(() => {
1007
1006
  const n = v._currentLocation;
1008
1007
  return n ? `${n.name} (${n.doc.profile.code ?? "--"})` : "";
1009
- }), Te = D(() => [
1010
- { accessorKey: "id", header: () => s("inventory.closing.draft.table.id"), size: 320 },
1008
+ }), Ee = F(() => [
1009
+ { accessorKey: "id", header: () => l("inventory.closing.draft.table.id"), size: 320 },
1011
1010
  {
1012
1011
  accessorKey: "name",
1013
- header: () => A.value === "purchaseOrder" ? s("inventory.changelog.column.seq") : s("inventory.common.name"),
1012
+ header: () => A.value === "purchaseOrder" ? l("inventory.changelog.column.seq") : l("inventory.common.name"),
1014
1013
  size: 240
1015
1014
  },
1016
1015
  {
1017
1016
  id: "lastUpdate",
1018
- header: () => s("inventory.changelog.column.lastUpdate"),
1017
+ header: () => l("inventory.changelog.column.lastUpdate"),
1019
1018
  size: 200,
1020
1019
  // Raw ISO is the sort key; see the note on the inventory table.
1021
1020
  accessorFn: (n) => n.lastUpdate ?? "",
1022
1021
  cell: ({ getValue: n }) => _(n() || void 0)
1023
1022
  }
1024
1023
  ]);
1025
- async function Ue() {
1026
- var G;
1027
- const n = (G = v._currentLocation) == null ? void 0 : G.dbName;
1024
+ async function Te() {
1025
+ var j;
1026
+ const n = (j = v._currentLocation) == null ? void 0 : j.dbName;
1028
1027
  if (!n) return;
1029
- const d = Pt(new Date(ve.value.startDate)).toISOString(), S = Tt(new Date(ve.value.endDate)).toISOString();
1028
+ const d = Pt(new Date(ve.value.startDate)).toISOString(), S = Bt(new Date(ve.value.endDate)).toISOString();
1030
1029
  ke.value = !0;
1031
1030
  try {
1032
1031
  ye.value = w(
@@ -1038,45 +1037,45 @@ const yn = {
1038
1037
  ke.value = !1;
1039
1038
  }
1040
1039
  fe.value && !ye.value.find((q) => {
1041
- var ne;
1042
- return q.id === ((ne = fe.value) == null ? void 0 : ne.id);
1043
- }) && (fe.value = null, U(""));
1040
+ var oe;
1041
+ return q.id === ((oe = fe.value) == null ? void 0 : oe.id);
1042
+ }) && (fe.value = null, E(""));
1044
1043
  }
1045
- function ut(n) {
1046
- fe.value = n, J.value = !0, U(`${v.currentLocationDBName}/${n.id}`, void 0, Le);
1044
+ function dt(n) {
1045
+ fe.value = n, Y.value = !0, E(`${v.currentLocationDBName}/${n.id}`, void 0, De);
1047
1046
  }
1048
- const ct = D(() => {
1047
+ const ft = F(() => {
1049
1048
  var n, d, S;
1050
1049
  return A.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : X.value ? ((d = we.value) == null ? void 0 : d.name) ?? "" : ((S = fe.value) == null ? void 0 : S.name) ?? "";
1051
1050
  });
1052
- function Be() {
1053
- J.value = !1, A.value === "inventory" ? (x.value = null, B.value = !1, U(""), Ne().catch(
1051
+ function Ue() {
1052
+ Y.value = !1, A.value === "inventory" ? (x.value = null, T.value = !1, E(""), Pe().catch(
1054
1053
  (n) => console.error("changelog inventory list failed", n)
1055
- )) : X.value ? (we.value = null, U(""), rt().catch(
1054
+ )) : X.value ? (we.value = null, E(""), ut().catch(
1056
1055
  (n) => console.error("changelog domain records failed", n)
1057
- )) : (fe.value = null, U(""), Ue().catch((n) => console.error("changelog location list failed", n)));
1056
+ )) : (fe.value = null, E(""), Te().catch((n) => console.error("changelog location list failed", n)));
1058
1057
  }
1059
1058
  return Z(a, (n) => {
1060
- n && (f().catch((d) => console.error("changelog domain list failed", d)), Be());
1059
+ n && (f().catch((d) => console.error("changelog domain list failed", d)), Ue());
1061
1060
  }), Z(A, () => {
1062
- a.value && Be();
1061
+ a.value && Ue();
1063
1062
  }), Z(ve, () => {
1064
- a.value && A.value !== "inventory" && !X.value && Ue().catch((n) => console.error("changelog location list failed", n));
1065
- }), Z(B, (n) => {
1063
+ a.value && A.value !== "inventory" && !X.value && Te().catch((n) => console.error("changelog location list failed", n));
1064
+ }), Z(T, (n) => {
1066
1065
  var d;
1067
- !n && ((d = x.value) != null && d.deleted) && (x.value = null, J.value = !1);
1066
+ !n && ((d = x.value) != null && d.deleted) && (x.value = null, Y.value = !1);
1068
1067
  }), Z(m, () => {
1069
- x.value = null, J.value = !1, a.value && A.value === "inventory" && Ne().catch(
1068
+ x.value = null, Y.value = !1, a.value && A.value === "inventory" && Pe().catch(
1070
1069
  (n) => console.error("changelog inventory list failed", n)
1071
1070
  );
1072
1071
  }), Z(W, (n) => {
1073
- x.value = null, a.value && A.value === "inventory" && U(n, void 0, Re);
1072
+ x.value = null, a.value && A.value === "inventory" && E(n, void 0, Re);
1074
1073
  }), (n, d) => {
1075
- const S = Y("FmButtonGroup"), G = Y("FmSearch"), q = Y("FmSwitch"), ne = Y("FmTable"), Fe = Y("FmDialog"), dt = Y("FmButton");
1076
- return i(), c(j, null, [
1077
- I(Fe, {
1074
+ const S = z("FmButtonGroup"), j = z("FmSearch"), q = z("FmSwitch"), oe = z("FmTable"), Ae = z("FmDialog"), mt = z("FmButton");
1075
+ return i(), c(H, null, [
1076
+ C(Ae, {
1078
1077
  modelValue: a.value,
1079
- "onUpdate:modelValue": d[8] || (d[8] = (z) => a.value = z),
1078
+ "onUpdate:modelValue": d[8] || (d[8] = (G) => a.value = G),
1080
1079
  "close-button": "",
1081
1080
  "dismiss-away": "",
1082
1081
  "min-width": "98vw",
@@ -1084,104 +1083,104 @@ const yn = {
1084
1083
  "max-height": "94vh",
1085
1084
  "content-class": "!p-0 h-[86vh]"
1086
1085
  }, {
1087
- "dialog-header": le(() => [
1088
- h("div", oo, [
1089
- h("div", ao, [
1090
- h("div", so, y($(s)("inventory.changelog.title")), 1),
1091
- I(S, {
1086
+ "dialog-header": te(() => [
1087
+ g("div", oo, [
1088
+ g("div", ao, [
1089
+ g("div", lo, h($(l)("inventory.changelog.title")), 1),
1090
+ C(S, {
1092
1091
  modelValue: M.value,
1093
- "onUpdate:modelValue": d[0] || (d[0] = (z) => M.value = z),
1092
+ "onUpdate:modelValue": d[0] || (d[0] = (G) => M.value = G),
1094
1093
  items: b.value
1095
1094
  }, null, 8, ["modelValue", "items"])
1096
1095
  ]),
1097
- h("div", lo, y($(s)("inventory.changelog.scopeDescription")), 1)
1096
+ g("div", so, h($(l)("inventory.changelog.scopeDescription")), 1)
1098
1097
  ])
1099
1098
  ]),
1100
- default: le(() => [
1101
- h("div", ro, [
1102
- A.value === "inventory" ? (i(), c(j, { key: 0 }, [
1103
- h("div", io, [
1104
- I(S, {
1105
- modelValue: g.value,
1106
- "onUpdate:modelValue": d[1] || (d[1] = (z) => g.value = z),
1107
- items: R.value
1099
+ default: te(() => [
1100
+ g("div", ro, [
1101
+ A.value === "inventory" ? (i(), c(H, { key: 0 }, [
1102
+ g("div", io, [
1103
+ C(S, {
1104
+ modelValue: y.value,
1105
+ "onUpdate:modelValue": d[1] || (d[1] = (G) => y.value = G),
1106
+ items: V.value
1108
1107
  }, null, 8, ["modelValue", "items"]),
1109
- I(G, {
1110
- modelValue: T.value,
1111
- "onUpdate:modelValue": d[2] || (d[2] = (z) => T.value = z),
1108
+ C(j, {
1109
+ modelValue: B.value,
1110
+ "onUpdate:modelValue": d[2] || (d[2] = (G) => B.value = G),
1112
1111
  class: "flex-1",
1113
- placeholder: $(s)("inventory.changelog.searchInventory")
1112
+ placeholder: $(l)("inventory.changelog.searchInventory")
1114
1113
  }, null, 8, ["modelValue", "placeholder"]),
1115
- h("div", uo, [
1116
- h("span", co, y($(s)("inventory.changelog.includeDeleted")), 1),
1117
- I(q, {
1118
- modelValue: B.value,
1119
- "onUpdate:modelValue": d[3] || (d[3] = (z) => B.value = z)
1114
+ g("div", uo, [
1115
+ g("span", co, h($(l)("inventory.changelog.includeDeleted")), 1),
1116
+ C(q, {
1117
+ modelValue: T.value,
1118
+ "onUpdate:modelValue": d[3] || (d[3] = (G) => T.value = G)
1120
1119
  }, null, 8, ["modelValue"])
1121
1120
  ])
1122
1121
  ]),
1123
- I(ne, {
1122
+ C(oe, {
1124
1123
  class: "min-h-0 flex-1",
1125
- "row-data": et.value,
1126
- "column-defs": tt.value,
1127
- "search-value": T.value,
1124
+ "row-data": nt.value,
1125
+ "column-defs": ot.value,
1126
+ "search-value": B.value,
1128
1127
  loading: de.value,
1129
1128
  "page-size": 20,
1130
- onRowClick: d[4] || (d[4] = (z) => at(z.original))
1129
+ onRowClick: d[4] || (d[4] = (G) => st(G.original))
1131
1130
  }, null, 8, ["row-data", "column-defs", "search-value", "loading"])
1132
- ], 64)) : X.value ? (i(), pe(ne, {
1131
+ ], 64)) : X.value ? (i(), ce(oe, {
1133
1132
  key: 1,
1134
1133
  class: "min-h-0 flex-1",
1135
1134
  "row-data": be.value,
1136
- "column-defs": Te.value,
1135
+ "column-defs": Ee.value,
1137
1136
  loading: xe.value,
1138
1137
  "page-size": 20,
1139
- onRowClick: d[5] || (d[5] = (z) => it(z.original))
1140
- }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), c(j, { key: 2 }, [
1141
- h("div", fo, [
1142
- I(Et, {
1138
+ onRowClick: d[5] || (d[5] = (G) => ct(G.original))
1139
+ }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), c(H, { key: 2 }, [
1140
+ g("div", fo, [
1141
+ C(It, {
1143
1142
  modelValue: ve.value,
1144
- "onUpdate:modelValue": d[6] || (d[6] = (z) => ve.value = z)
1143
+ "onUpdate:modelValue": d[6] || (d[6] = (G) => ve.value = G)
1145
1144
  }, null, 8, ["modelValue"]),
1146
- Pe.value ? (i(), c("span", mo, y(Pe.value), 1)) : N("", !0)
1145
+ Be.value ? (i(), c("span", mo, h(Be.value), 1)) : N("", !0)
1147
1146
  ]),
1148
- I(ne, {
1147
+ C(oe, {
1149
1148
  class: "min-h-0 flex-1",
1150
1149
  "row-data": ye.value,
1151
- "column-defs": Te.value,
1150
+ "column-defs": Ee.value,
1152
1151
  loading: ke.value,
1153
1152
  "page-size": 20,
1154
- onRowClick: d[7] || (d[7] = (z) => ut(z.original))
1153
+ onRowClick: d[7] || (d[7] = (G) => dt(G.original))
1155
1154
  }, null, 8, ["row-data", "column-defs", "loading"])
1156
1155
  ], 64))
1157
1156
  ])
1158
1157
  ]),
1159
1158
  _: 1
1160
1159
  }, 8, ["modelValue"]),
1161
- I(Fe, {
1162
- modelValue: J.value,
1163
- "onUpdate:modelValue": d[9] || (d[9] = (z) => J.value = z),
1160
+ C(Ae, {
1161
+ modelValue: Y.value,
1162
+ "onUpdate:modelValue": d[9] || (d[9] = (G) => Y.value = G),
1164
1163
  "close-button": "",
1165
1164
  "dismiss-away": "",
1166
1165
  "min-width": P.value,
1167
1166
  "max-width": P.value,
1168
1167
  "max-height": "86vh"
1169
1168
  }, {
1170
- "dialog-header": le(() => [
1171
- h("div", po, y(ct.value), 1)
1169
+ "dialog-header": te(() => [
1170
+ g("div", po, h(ft.value), 1)
1172
1171
  ]),
1173
- default: le(() => [
1174
- I(no, {
1175
- commits: A.value === "inventory" ? lt.value : $(F),
1172
+ default: te(() => [
1173
+ C(no, {
1174
+ commits: A.value === "inventory" ? it.value : $(U),
1176
1175
  "is-loading": $(Q),
1177
- "resolve-name": te
1176
+ "resolve-name": ne
1178
1177
  }, null, 8, ["commits", "is-loading"]),
1179
1178
  A.value !== "inventory" && $(O) ? (i(), c("div", vo, [
1180
- I(dt, {
1181
- label: $(s)("inventory.changelog.loadMore"),
1179
+ C(mt, {
1180
+ label: $(l)("inventory.changelog.loadMore"),
1182
1181
  variant: "secondary",
1183
1182
  disabled: $(Q),
1184
- onClick: L
1183
+ onClick: R
1185
1184
  }, null, 8, ["label", "disabled"])
1186
1185
  ])) : N("", !0)
1187
1186
  ]),
@@ -1190,101 +1189,101 @@ const yn = {
1190
1189
  ], 64);
1191
1190
  };
1192
1191
  }
1193
- }), yo = /* @__PURE__ */ Ut(go, [["__scopeId", "data-v-ae9bd171"]]), se = 8;
1192
+ }), yo = /* @__PURE__ */ Et(go, [["__scopeId", "data-v-07c5a952"]]), se = 8;
1194
1193
  function ho(o, e) {
1195
1194
  return { x: se, y: Math.max(se, e - o - se) };
1196
1195
  }
1197
- const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
1196
+ const _o = ["title"], Ge = 48, bo = 8, xo = /* @__PURE__ */ re({
1198
1197
  __name: "ChangelogFloatingButton",
1199
1198
  setup(o) {
1200
- const { t: e } = he(), t = ge(), l = D(() => {
1201
- var L;
1202
- return !!((L = t.sessionUser.value) != null && L.role.isAdmin);
1203
- }), a = k(!1), s = k(null);
1199
+ const { t: e } = he(), t = ge(), s = F(() => {
1200
+ var R;
1201
+ return !!((R = t.sessionUser.value) != null && R.role.isAdmin);
1202
+ }), a = k(!1), l = k(null);
1204
1203
  function r() {
1205
- var L, _;
1204
+ var R, _;
1206
1205
  return {
1207
- width: ((L = s.value) == null ? void 0 : L.offsetWidth) ?? ze,
1208
- height: ((_ = s.value) == null ? void 0 : _.offsetHeight) ?? ze
1206
+ width: ((R = l.value) == null ? void 0 : R.offsetWidth) ?? Ge,
1207
+ height: ((_ = l.value) == null ? void 0 : _.offsetHeight) ?? Ge
1209
1208
  };
1210
1209
  }
1211
1210
  const u = k({ x: 0, y: 0 });
1212
- function v(L, _, w) {
1213
- return Math.min(Math.max(L, _), w);
1211
+ function v(R, _, w) {
1212
+ return Math.min(Math.max(R, _), w);
1214
1213
  }
1215
1214
  function p() {
1216
- const { width: L, height: _ } = r(), w = Math.max(se, window.innerWidth - L - se - bo), U = Math.max(se, window.innerHeight - _ - se), K = u.value.x + L / 2;
1215
+ const { width: R, height: _ } = r(), w = Math.max(se, window.innerWidth - R - se - bo), E = Math.max(se, window.innerHeight - _ - se), K = u.value.x + R / 2;
1217
1216
  u.value = {
1218
1217
  x: K < window.innerWidth / 2 ? se : w,
1219
- y: v(u.value.y, se, U)
1218
+ y: v(u.value.y, se, E)
1220
1219
  };
1221
1220
  }
1222
- function V() {
1221
+ function L() {
1223
1222
  u.value = ho(r().height, window.innerHeight);
1224
1223
  }
1225
1224
  Ie(() => {
1226
- V(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
1227
- }), vt(() => {
1225
+ L(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
1226
+ }), yt(() => {
1228
1227
  window.removeEventListener("resize", p), window.removeEventListener("orientationchange", p);
1229
- }), Z(l, async (L) => {
1230
- L && (await gt(), V());
1228
+ }), Z(s, async (R) => {
1229
+ R && (await ht(), L());
1231
1230
  });
1232
- const E = k(!1);
1233
- let P = null, F = !1;
1234
- function Q(L) {
1235
- P = { x: L.clientX, y: L.clientY, px: u.value.x, py: u.value.y }, E.value = !0, F = !1, L.currentTarget.setPointerCapture(L.pointerId);
1231
+ const I = k(!1);
1232
+ let P = null, U = !1;
1233
+ function Q(R) {
1234
+ P = { x: R.clientX, y: R.clientY, px: u.value.x, py: u.value.y }, I.value = !0, U = !1, R.currentTarget.setPointerCapture(R.pointerId);
1236
1235
  }
1237
- function O(L) {
1236
+ function O(R) {
1238
1237
  if (!P) return;
1239
- const _ = L.clientX - P.x, w = L.clientY - P.y;
1240
- Math.abs(_) + Math.abs(w) > 3 && (F = !0);
1241
- const { width: U, height: K } = r();
1238
+ const _ = R.clientX - P.x, w = R.clientY - P.y;
1239
+ Math.abs(_) + Math.abs(w) > 3 && (U = !0);
1240
+ const { width: E, height: K } = r();
1242
1241
  u.value = {
1243
- x: v(P.px + _, 0, window.innerWidth - U),
1242
+ x: v(P.px + _, 0, window.innerWidth - E),
1244
1243
  y: v(P.py + w, 0, window.innerHeight - K)
1245
1244
  };
1246
1245
  }
1247
- function C() {
1248
- P = null, E.value = !1, p();
1246
+ function D() {
1247
+ P = null, I.value = !1, p();
1249
1248
  }
1250
- function H() {
1251
- P && (C(), F || (a.value = !0));
1249
+ function J() {
1250
+ P && (D(), U || (a.value = !0));
1252
1251
  }
1253
- return (L, _) => {
1254
- const w = Y("FmIcon");
1255
- return i(), pe(yt, { to: "body" }, [
1256
- l.value ? (i(), c(j, { key: 0 }, [
1257
- h("div", {
1252
+ return (R, _) => {
1253
+ const w = z("FmIcon");
1254
+ return i(), ce(_t, { to: "body" }, [
1255
+ s.value ? (i(), c(H, { key: 0 }, [
1256
+ g("div", {
1258
1257
  ref_key: "wrapperRef",
1259
- ref: s,
1260
- class: ae(["fixed z-50 cursor-grab touch-none", E.value ? "" : "transition-[left,top] duration-200 ease-out"]),
1261
- style: ht({ left: `${u.value.x}px`, top: `${u.value.y}px` })
1258
+ ref: l,
1259
+ class: le(["fixed z-50 cursor-grab touch-none", I.value ? "" : "transition-[left,top] duration-200 ease-out"]),
1260
+ style: bt({ left: `${u.value.x}px`, top: `${u.value.y}px` })
1262
1261
  }, [
1263
- I(Ye, null, {
1264
- default: le(() => [
1265
- h("button", {
1262
+ C(Xe, null, {
1263
+ default: te(() => [
1264
+ g("button", {
1266
1265
  type: "button",
1267
1266
  title: $(e)("inventory.changelog.title"),
1268
- class: ae(["fm-typo-en-body-sm-600 flex h-48 items-center gap-8 whitespace-nowrap rounded-full border border-gray-200 bg-white px-16 shadow-lg hover:bg-gray-50", E.value ? "cursor-grabbing" : "cursor-grab"]),
1267
+ class: le(["fm-typo-en-body-sm-600 flex h-48 items-center gap-8 whitespace-nowrap rounded-full border border-gray-200 bg-white px-16 shadow-lg hover:bg-gray-50", I.value ? "cursor-grabbing" : "cursor-grab"]),
1269
1268
  onPointerdown: Q,
1270
1269
  onPointermove: O,
1271
- onPointerup: H,
1272
- onPointercancel: C
1270
+ onPointerup: J,
1271
+ onPointercancel: D
1273
1272
  }, [
1274
- I(w, {
1273
+ C(w, {
1275
1274
  name: "history",
1276
1275
  size: "md",
1277
1276
  outline: ""
1278
1277
  }),
1279
- h("span", null, y($(e)("inventory.changelog.fabLabel")), 1)
1278
+ g("span", null, h($(e)("inventory.changelog.fabLabel")), 1)
1280
1279
  ], 42, _o)
1281
1280
  ]),
1282
1281
  _: 1
1283
1282
  })
1284
1283
  ], 6),
1285
- I(yo, {
1284
+ C(yo, {
1286
1285
  modelValue: a.value,
1287
- "onUpdate:modelValue": _[0] || (_[0] = (U) => a.value = U)
1286
+ "onUpdate:modelValue": _[0] || (_[0] = (E) => a.value = E)
1288
1287
  }, null, 8, ["modelValue"])
1289
1288
  ], 64)) : N("", !0)
1290
1289
  ]);
@@ -1298,9 +1297,9 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
1298
1297
  href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices",
1299
1298
  target: "_blank",
1300
1299
  rel: "noopener"
1301
- }, Ro = /* @__PURE__ */ ce({
1300
+ }, Do = /* @__PURE__ */ re({
1302
1301
  __name: "PlanUpgradeDialog",
1303
- props: /* @__PURE__ */ _t({
1302
+ props: /* @__PURE__ */ Le({
1304
1303
  capability: {},
1305
1304
  result: {}
1306
1305
  }, {
@@ -1309,52 +1308,52 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
1309
1308
  }),
1310
1309
  emits: ["update:modelValue"],
1311
1310
  setup(o) {
1312
- const e = o, t = bt(o, "modelValue"), l = D(() => {
1311
+ const e = o, t = He(o, "modelValue"), s = F(() => {
1313
1312
  var r;
1314
1313
  return ((r = e.capability) == null ? void 0 : r.tier) ?? "premium";
1315
- }), a = D(() => {
1314
+ }), a = F(() => {
1316
1315
  var r;
1317
1316
  return ((r = e.result) == null ? void 0 : r.stage) === "off";
1318
- }), s = D(() => a.value ? "Feature unavailable" : `Upgrade to ${l.value} plan`);
1317
+ }), l = F(() => a.value ? "Feature unavailable" : `Upgrade to ${s.value} plan`);
1319
1318
  return (r, u) => {
1320
- const v = Y("FmSpacer"), p = Y("FmButton"), V = Y("FmDialog");
1321
- return i(), pe(V, {
1319
+ const v = z("FmSpacer"), p = z("FmButton"), L = z("FmDialog");
1320
+ return i(), ce(L, {
1322
1321
  modelValue: t.value,
1323
- "onUpdate:modelValue": u[1] || (u[1] = (E) => t.value = E),
1322
+ "onUpdate:modelValue": u[1] || (u[1] = (I) => t.value = I),
1324
1323
  overlay: !0,
1325
1324
  "close-button": "",
1326
1325
  dismissAway: "",
1327
1326
  "max-width": "520px"
1328
1327
  }, {
1329
- "dialog-header": le(() => [
1330
- h("div", wo, [
1331
- h("span", null, y(s.value), 1),
1332
- I(Ft, { tier: l.value }, null, 8, ["tier"])
1328
+ "dialog-header": te(() => [
1329
+ g("div", wo, [
1330
+ g("span", null, h(l.value), 1),
1331
+ C(Ut, { tier: s.value }, null, 8, ["tier"])
1333
1332
  ])
1334
1333
  ]),
1335
- "dialog-footer": le(() => [
1336
- I(v, { class: "sm:hidden xs:hidden" }),
1337
- I(p, {
1334
+ "dialog-footer": te(() => [
1335
+ C(v, { class: "sm:hidden xs:hidden" }),
1336
+ C(p, {
1338
1337
  variant: "tertiary",
1339
1338
  label: "Not now",
1340
- onClick: u[0] || (u[0] = (E) => t.value = !1)
1339
+ onClick: u[0] || (u[0] = (I) => t.value = !1)
1341
1340
  }),
1342
1341
  a.value ? N("", !0) : (i(), c("a", Lo, [
1343
- I(p, { label: "Compare plans" })
1342
+ C(p, { label: "Compare plans" })
1344
1343
  ]))
1345
1344
  ]),
1346
- default: le(() => {
1347
- var E, P, F;
1345
+ default: te(() => {
1346
+ var I, P, U;
1348
1347
  return [
1349
- h("div", ko, [
1350
- h("p", So, [
1351
- a.value ? (i(), c(j, { key: 0 }, [
1352
- ie(y((E = r.result) == null ? void 0 : E.reason), 1)
1353
- ], 64)) : (i(), c(j, { key: 1 }, [
1354
- ie(y((P = r.capability) == null ? void 0 : P.module) + " is available on the " + y(l.value) + " plan. ", 1)
1348
+ g("div", ko, [
1349
+ g("p", So, [
1350
+ a.value ? (i(), c(H, { key: 0 }, [
1351
+ ue(h((I = r.result) == null ? void 0 : I.reason), 1)
1352
+ ], 64)) : (i(), c(H, { key: 1 }, [
1353
+ ue(h((P = r.capability) == null ? void 0 : P.module) + " is available on the " + h(s.value) + " plan. ", 1)
1355
1354
  ], 64))
1356
1355
  ]),
1357
- h("p", $o, y((F = r.capability) == null ? void 0 : F.description), 1),
1356
+ g("p", $o, h((U = r.capability) == null ? void 0 : U.description), 1),
1358
1357
  a.value ? N("", !0) : (i(), c("p", Co, " Upgrade your plan to unlock this functionality for your business. "))
1359
1358
  ])
1360
1359
  ];
@@ -1363,19 +1362,71 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
1363
1362
  }, 8, ["modelValue"]);
1364
1363
  };
1365
1364
  }
1366
- }), Do = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Vo = /* @__PURE__ */ ce({
1365
+ }), Ro = { class: "flex items-center gap-8" }, Vo = { class: "flex flex-col gap-8 text-fm-color-typo-secondary" }, Fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, Io = /* @__PURE__ */ re({
1366
+ __name: "DeprecateSoonWarningDialog",
1367
+ props: /* @__PURE__ */ Le({
1368
+ featureName: {}
1369
+ }, {
1370
+ modelValue: { type: Boolean, required: !0 },
1371
+ modelModifiers: {}
1372
+ }),
1373
+ emits: /* @__PURE__ */ Le(["proceed"], ["update:modelValue"]),
1374
+ setup(o, { emit: e }) {
1375
+ const t = He(o, "modelValue"), s = e;
1376
+ function a() {
1377
+ t.value = !1, s("proceed");
1378
+ }
1379
+ return (l, r) => {
1380
+ const u = z("FmSpacer"), v = z("FmButton"), p = z("FmDialog");
1381
+ return i(), ce(p, {
1382
+ modelValue: t.value,
1383
+ "onUpdate:modelValue": r[1] || (r[1] = (L) => t.value = L),
1384
+ overlay: !0,
1385
+ "close-button": "",
1386
+ dismissAway: "",
1387
+ "max-width": "520px"
1388
+ }, {
1389
+ "dialog-header": te(() => [
1390
+ g("div", Ro, [
1391
+ r[2] || (r[2] = g("span", null, "Feature removal notice", -1)),
1392
+ C(At)
1393
+ ])
1394
+ ]),
1395
+ "dialog-footer": te(() => [
1396
+ C(u, { class: "sm:hidden xs:hidden" }),
1397
+ C(v, {
1398
+ variant: "tertiary",
1399
+ label: "Cancel",
1400
+ onClick: r[0] || (r[0] = (L) => t.value = !1)
1401
+ }),
1402
+ C(v, {
1403
+ label: "Continue",
1404
+ onClick: a
1405
+ })
1406
+ ]),
1407
+ default: te(() => [
1408
+ g("div", Vo, [
1409
+ g("p", Fo, h(l.featureName ?? "This feature") + " will be removed in a future release. ", 1),
1410
+ r[3] || (r[3] = g("p", { class: "fm-typo-en-body-sm-400" }, " You can continue to use it for now, but we recommend moving to the supported workflow. ", -1))
1411
+ ])
1412
+ ]),
1413
+ _: 1
1414
+ }, 8, ["modelValue"]);
1415
+ };
1416
+ }
1417
+ }), No = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Po = /* @__PURE__ */ re({
1367
1418
  __name: "NavigationTab",
1368
1419
  setup(o) {
1369
- const e = $t(), t = Ee(), l = ge(), a = At(), s = Bt(), r = k(!1), u = k(null), v = k(null), p = k(!1), V = k(null), E = k(null), P = D(
1420
+ const e = $t(), t = Ne(), s = ge(), a = Mt(), l = Tt(), r = k(!1), u = k(null), v = k(null), p = k(!1), L = k(null), I = k(null), P = F(
1370
1421
  () => {
1371
1422
  var _, w;
1372
- return (w = Me(((_ = V.value) == null ? void 0 : _.featureKey) ?? "")) == null ? void 0 : w.label;
1423
+ return (w = Oe(((_ = L.value) == null ? void 0 : _.featureKey) ?? "")) == null ? void 0 : w.label;
1373
1424
  }
1374
- ), { menuItems: F } = Je();
1375
- Z([() => l.currentBusiness.value, () => e.name], ([_, w]) => {
1376
- (_ == null ? void 0 : _.menuVersion) === "v3" && (w === ue.INGREDIENTS || w === ue.RECIPE || w === ue.UNIT) && t.push({ name: ue.STOCK });
1425
+ ), { menuItems: U } = We();
1426
+ Z([() => s.currentBusiness.value, () => e.name], ([_, w]) => {
1427
+ (_ == null ? void 0 : _.menuVersion) === "v3" && (w === pe.INGREDIENTS || w === pe.RECIPE || w === pe.UNIT) && t.push({ name: pe.STOCK });
1377
1428
  });
1378
- const Q = D({
1429
+ const Q = F({
1379
1430
  get() {
1380
1431
  if (e.name)
1381
1432
  return String(e.name);
@@ -1383,53 +1434,53 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
1383
1434
  set(_) {
1384
1435
  var f;
1385
1436
  if (!_) return;
1386
- const w = String(_), U = Rt.find((b) => b.route === w), K = Dt(w, a.value);
1387
- if ((f = Me((U == null ? void 0 : U.featureKey) ?? "")) != null && f.deprecateSoon) {
1388
- V.value = U ?? null, E.value = w, p.value = !0;
1437
+ const w = String(_), E = Dt.find((b) => b.route === w), K = Rt(w, a.value);
1438
+ if ((f = Oe((E == null ? void 0 : E.featureKey) ?? "")) != null && f.deprecateSoon) {
1439
+ L.value = E ?? null, I.value = w, p.value = !0;
1389
1440
  return;
1390
1441
  }
1391
- if (U && K.disabled) {
1392
- u.value = U, v.value = K, r.value = !0;
1442
+ if (E && K.disabled) {
1443
+ u.value = E, v.value = K, r.value = !0;
1393
1444
  return;
1394
1445
  }
1395
1446
  t.push({ name: w });
1396
1447
  }
1397
1448
  });
1398
1449
  function O() {
1399
- E.value && (t.push({ name: E.value }), E.value = null);
1450
+ I.value && (t.push({ name: I.value }), I.value = null);
1400
1451
  }
1401
- const C = D(
1452
+ const D = F(
1402
1453
  () => {
1403
1454
  var _;
1404
- return `NavigationTab.${(_ = l.currentBusiness.value) == null ? void 0 : _._id}`;
1455
+ return `NavigationTab.${(_ = s.currentBusiness.value) == null ? void 0 : _._id}`;
1405
1456
  }
1406
- ), H = k(!1), L = D({
1457
+ ), J = k(!1), R = F({
1407
1458
  get() {
1408
- return H.value;
1459
+ return J.value;
1409
1460
  },
1410
1461
  set(_) {
1411
- H.value = _, _ || s.setItem(C.value, "true");
1462
+ J.value = _, _ || l.setItem(D.value, "true");
1412
1463
  }
1413
1464
  });
1414
- return Z([() => C.value], () => {
1415
- H.value = !1, setTimeout(() => {
1416
- L.value = !s.getItem(C.value);
1465
+ return Z([() => D.value], () => {
1466
+ J.value = !1, setTimeout(() => {
1467
+ R.value = !l.getItem(D.value);
1417
1468
  }, 2e3);
1418
1469
  }), (_, w) => {
1419
- const U = Y("FmCollapsibleTabs");
1420
- return i(), c("div", Do, [
1421
- I(U, {
1470
+ const E = z("FmCollapsibleTabs");
1471
+ return i(), c("div", No, [
1472
+ C(E, {
1422
1473
  modelValue: Q.value,
1423
1474
  "onUpdate:modelValue": w[0] || (w[0] = (K) => Q.value = K),
1424
- items: $(F)
1475
+ items: $(U)
1425
1476
  }, null, 8, ["modelValue", "items"]),
1426
- I(Ro, {
1477
+ C(Do, {
1427
1478
  modelValue: r.value,
1428
1479
  "onUpdate:modelValue": w[1] || (w[1] = (K) => r.value = K),
1429
1480
  capability: u.value,
1430
1481
  result: v.value
1431
1482
  }, null, 8, ["modelValue", "capability", "result"]),
1432
- I(Mt, {
1483
+ C(Io, {
1433
1484
  modelValue: p.value,
1434
1485
  "onUpdate:modelValue": w[2] || (w[2] = (K) => p.value = K),
1435
1486
  "feature-name": P.value,
@@ -1441,32 +1492,32 @@ const _o = ["title"], ze = 48, bo = 8, xo = /* @__PURE__ */ ce({
1441
1492
  });
1442
1493
  typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
1443
1494
  let o, e;
1444
- return { promise: new Promise((l, a) => {
1445
- o = l, e = a;
1495
+ return { promise: new Promise((s, a) => {
1496
+ o = s, e = a;
1446
1497
  }), resolve: o, reject: e };
1447
1498
  });
1448
1499
  typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(o) {
1449
1500
  return await new Promise((e) => setTimeout(e, o)), Promise.resolve(this);
1450
1501
  });
1451
- const Io = {
1502
+ const Bo = {
1452
1503
  key: 0,
1453
1504
  class: "flex h-5 items-center justify-center bg-amber-100 px-12 text-xs font-medium text-amber-800 shadow-sm"
1454
- }, Xo = /* @__PURE__ */ ce({
1505
+ }, Qo = /* @__PURE__ */ re({
1455
1506
  __name: "App",
1456
1507
  setup(o) {
1457
- const e = ge(), t = Ot(), l = St(), a = window.location.href.includes("print-preview");
1508
+ const e = ge(), t = Ot(), s = St(), a = window.location.href.includes("print-preview");
1458
1509
  Ie(() => {
1459
1510
  if (window.location.href.includes("print-preview")) {
1460
1511
  e.setEmbedded(!0), document.body.classList.add("print-mode");
1461
1512
  return;
1462
1513
  }
1463
- e.registerSidebarComponent(Vo), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1514
+ e.registerSidebarComponent(Po), t.initGoogleMap(s.appApi.googleMap).catch(() => {
1464
1515
  console.error("Google map cannot be loaded");
1465
1516
  });
1466
1517
  }), Z([() => e.currentCountry.value], () => {
1467
- s();
1518
+ l();
1468
1519
  });
1469
- async function s() {
1520
+ async function l() {
1470
1521
  var r;
1471
1522
  try {
1472
1523
  await e.readBusinesses(), e.currentBusiness.value = (r = e.businesses.value) == null ? void 0 : r.find((u) => u);
@@ -1474,13 +1525,13 @@ const Io = {
1474
1525
  console.error("error when trying to reset businesses:", u);
1475
1526
  }
1476
1527
  }
1477
- return (r, u) => (i(), c(j, null, [
1478
- $(l).isDev && !$(a) ? (i(), c("div", Io, " Non-production environment ")) : N("", !0),
1479
- I(on),
1480
- $(a) ? N("", !0) : (i(), pe(xo, { key: 1 }))
1528
+ return (r, u) => (i(), c(H, null, [
1529
+ $(s).isDev && !$(a) ? (i(), c("div", Bo, " Non-production environment ")) : N("", !0),
1530
+ C(on),
1531
+ $(a) ? N("", !0) : (i(), ce(xo, { key: 1 }))
1481
1532
  ], 64));
1482
1533
  }
1483
1534
  });
1484
1535
  export {
1485
- Xo as default
1536
+ Qo as default
1486
1537
  };