@feedmepos/mf-inventory-portal 1.8.0-dev.15 → 1.8.0-dev.16

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 (136) hide show
  1. package/dist/{App-BYwjYoox.js → App-xSsyvQV_.js} +515 -536
  2. package/dist/{ApprovalView-CvfLuQiG.js → ApprovalView-DfJ0FAiD.js} +9 -9
  3. package/dist/{BindingsDialog-CS0IlwGC.js → BindingsDialog-oAZyjgrN.js} +2 -2
  4. package/dist/{BindingsPicker-CqY5tyvT.js → BindingsPicker-CEIo7myR.js} +8 -8
  5. package/dist/{BindingsTable-BA1CMNtR.js → BindingsTable-BKa-JYRR.js} +4 -4
  6. package/dist/BulkReceiveRequestPage-C6Oyg5-E.js +2839 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-B6s_QcuY.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BvleQo5y.js} +1 -1
  8. package/dist/{ClosingDraftView-Bk8TmRfV.js → ClosingDraftView-tJrjqyAC.js} +19 -19
  9. package/dist/{ClosingHistoryView-XMROUlaz.js → ClosingHistoryView-CJQlK4Xc.js} +7 -7
  10. package/dist/{ClosingTemplateView-CxQp2kaI.js → ClosingTemplateView-DYRtdK5h.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-KgvAbmkj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DEwi7wFf.js} +1 -1
  12. package/dist/{DefaultView-DNKPKrrr.js → DefaultView-CxTBlkln.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-CfCMlcEC.js → DeliveryOrderPrintPreview-Bywdjc2U.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-BLfRq8o3.js → EmailDialog.vue_vue_type_script_setup_true_lang-DcFAUTdO.js} +38 -33
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Bmei7M_d.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js} +11 -10
  16. package/dist/FeatureCapabilityGate-B41dULfm.js +77 -0
  17. package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-D4G6i1D6.js +189 -0
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-AKDqv1C8.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DQIfW9h3.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-QBviJzAO.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DrTNzJSz.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js} +2 -2
  21. package/dist/{FmMultiselectDialog-CchCZDYp.js → FmMultiselectDialog-CFNZMzlC.js} +2 -2
  22. package/dist/{FmMultiselectDialog-DD6AbolT.js → FmMultiselectDialog-M6CvNFW1.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-MqvhtQcN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js} +5 -5
  24. package/dist/{ImportView-f35OUKFU.js → ImportView-C2GOmpuK.js} +6 -6
  25. package/dist/{IngredientsView-CLC1di0L.js → IngredientsView-wB9kGiOK.js} +15 -15
  26. package/dist/{IntegrationExplorerView-BWzUCAD0.js → IntegrationExplorerView-BujwGE4q.js} +1414 -1485
  27. package/dist/{IntegrationPlatformView-C78gW5nI.js → IntegrationPlatformView-Wnvj6-BG.js} +4899 -4794
  28. package/dist/{IntegrationView-CnUWuRtH.js → IntegrationView-C77rSbpn.js} +14 -14
  29. package/dist/{InventoryBindingForm-ZGjVpCAI.js → InventoryBindingForm-Bs7Duwfj.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CQDso4fW.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DawAEeuP.js} +4 -4
  31. package/dist/{InventoryBindingSummary-B68FLrzC.js → InventoryBindingSummary-BefkYWIr.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DlCmFAUg.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpUMK6fj.js} +2 -2
  33. package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js +19 -0
  34. package/dist/{PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-E6WVZA-D.js → PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js} +1 -1
  35. package/dist/PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js +58 -0
  36. package/dist/ProductionRunDetailPage-CVx9LS-P.js +2316 -0
  37. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang--NWDSxIT.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-4aYz5NwS.js} +1626 -1712
  38. package/dist/ProductionRunPage-CuXzmWMc.js +953 -0
  39. package/dist/{PublishView-BvuP_W4l.js → PublishView-Bu8J6ndy.js} +3 -3
  40. package/dist/{PurchaseOrderPrintPreview-CTFNQWED.js → PurchaseOrderPrintPreview-DaslFe8u.js} +2 -2
  41. package/dist/{ReceiveRequestView-Ca9jGuKW.js → ReceiveRequestView-CKPBpN4x.js} +13 -13
  42. package/dist/{RecipeView-Vm2c1vGo.js → RecipeView-BeZ9ljtA.js} +15 -15
  43. package/dist/{SettingsView-49IPE742.js → SettingsView-CWhMdNfn.js} +10 -9
  44. package/dist/{StockView-CylYMrFJ.js → StockView-C5IhPGxi.js} +21 -21
  45. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DYoom8UC.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9Rx_9b7.js} +1 -1
  46. package/dist/{SupplierView-CCB8gkT1.js → SupplierView-BSGajl9V.js} +13 -13
  47. package/dist/{SurchargeView-MXCxLWTu.js → SurchargeView-DtAszxTN.js} +7 -7
  48. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-D9LGk7R7.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CfxroS8u.js} +2 -2
  49. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Cp2CDerI.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CTj_jYK1.js} +1 -1
  50. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B_9i5LzY.js +4900 -0
  51. package/dist/{TransferTemplateView-DZEYUHOu.js → TransferTemplateView-D6_AfMja.js} +19 -19
  52. package/dist/{UnitCostHistoryView-TnQwZk3R.js → UnitCostHistoryView-kisQehVE.js} +4 -4
  53. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-C6o4xrjZ.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DKoPNZoW.js} +4 -4
  54. package/dist/{UnitView-CFqdNGjT.js → UnitView-jSLennZW.js} +7 -7
  55. package/dist/{WarehouseView-rH3loGl_.js → WarehouseView-CUdWJCMq.js} +8 -8
  56. package/dist/{WastageTemplateView-Cnsi_EJ1.js → WastageTemplateView--B0LSwHa.js} +15 -15
  57. package/dist/api/netsuite-explorer.d.ts +1 -0
  58. package/dist/{app-O0ln50NT.js → app-Bb5HLWTu.js} +2041 -2045
  59. package/dist/app.d.ts +6 -6
  60. package/dist/app.js +1 -1
  61. package/dist/{closing-template-BcXKc7kW.js → closing-template-CgDMayoo.js} +1 -1
  62. package/dist/components/FeatureCapabilityGate.vue.d.ts +2 -0
  63. package/dist/components/FeatureGateLayout.vue.d.ts +11 -0
  64. package/dist/components/FeaturePageGate.spec.d.ts +1 -0
  65. package/dist/components/FeaturePageGate.vue.d.ts +34 -0
  66. package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +1 -1
  67. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  68. package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -2
  69. package/dist/components/HrmPermissionGuard.vue.d.ts +1 -1
  70. package/dist/components/PremiumUpgradePage.vue.d.ts +2 -0
  71. package/dist/{date2-BVVlNlAO.js → date2-D9gB9BE-.js} +1 -1
  72. package/dist/{dayjs.min-86T3g7jl.js → dayjs.min-CumM_kH7.js} +1 -1
  73. package/dist/{decimal-BceSQ9qu.js → decimal-CVF1rRoj.js} +2 -2
  74. package/dist/{defineDeepModel-CYCLZ-jP.js → defineDeepModel-DE-DsQjm.js} +1 -1
  75. package/dist/{duplicate-template-BOQW9uDO.js → duplicate-template-CFYtQfQn.js} +1 -1
  76. package/dist/feature-flags/vue.d.ts +22 -1
  77. package/dist/{feature-SfaxOOo8.js → feature-kti8bU8q.js} +412 -346
  78. package/dist/{format-time-from-id-DcZjh4zF.js → format-time-from-id-CWZ5VGvM.js} +1 -1
  79. package/dist/{format-unit-display-B_Leyj1M.js → format-unit-display-BlxdvskN.js} +12 -12
  80. package/dist/{id-to-date-CxJMEppi.js → id-to-date-BaH_1Kui.js} +1 -1
  81. package/dist/{import-export.helper-CTzQihBw.js → import-export.helper-8rKrOB0E.js} +5 -5
  82. package/dist/{index-D5JOuvFG.js → index-B9p_OEdk.js} +1 -1
  83. package/dist/{index-DiN65wc9.js → index-BHc3cNyz.js} +3 -3
  84. package/dist/{index-WnJgGINW.js → index-MEUJonBr.js} +1 -1
  85. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
  86. package/dist/{lz-string-COM8L2Yg.js → lz-string-IiazGN0W.js} +1 -1
  87. package/dist/{netsuite-B4PKJ2O4.js → netsuite-BeDxaeKM.js} +2 -2
  88. package/dist/netsuite-explorer-4IluitzS.js +79 -0
  89. package/dist/{predefined-templates-jno0IPO6.js → predefined-templates-D4qVID1q.js} +1 -1
  90. package/dist/{purchase-order-template-CBgiJ239.js → purchase-order-template-GTOntq3C.js} +1 -1
  91. package/dist/{recalculationUtils-C-dyQAGg.js → recalculationUtils-Dye8x2TO.js} +1 -1
  92. package/dist/{row-action.enum-D2CmAs2h.js → row-action.enum-CVJbq_-y.js} +1 -1
  93. package/dist/{rules-CByHkO8L.js → rules-Y3zXVj3i.js} +3 -3
  94. package/dist/{stock-DrSVVTuZ.js → stock-BIjTQFsR.js} +2 -2
  95. package/dist/{stock-DbyYZzKm.js → stock-BR8x3nlx.js} +1 -1
  96. package/dist/stores/feature.d.ts +21 -1
  97. package/dist/stores/feature.load-state.spec.d.ts +1 -0
  98. package/dist/stores/warehouse.d.ts +1 -1
  99. package/dist/style.css +1 -1
  100. package/dist/{supplier-DcqbvDxz.js → supplier-CbdCjiIB.js} +2 -2
  101. package/dist/{surcharge-BqcD_sf2.js → surcharge-BoXLK6o0.js} +1 -1
  102. package/dist/tsconfig.app.tsbuildinfo +1 -1
  103. package/dist/{uom-rules-2cAqJPJa.js → uom-rules-C5h1AoPJ.js} +1 -1
  104. package/dist/{use-ingredient-select-dialog-DwQn7p6y.js → use-ingredient-select-dialog-D196q_qk.js} +2 -2
  105. package/dist/{use-inventory-binding-dialog-Id5sz9Xu.js → use-inventory-binding-dialog-B4IhhCjM.js} +2 -2
  106. package/dist/{use-template-enabled-locations-8RnaHV8u.js → use-template-enabled-locations-CDKP3kTS.js} +2 -2
  107. package/dist/{use-transfer-locations-JvPP8F4f.js → use-transfer-locations-DE4vxSDp.js} +2 -2
  108. package/dist/{useHrmPermission-OGla5jyF.js → useHrmPermission-D1dkveCP.js} +1 -1
  109. package/dist/{useNavigationMenu-BVJlsjVn.js → useNavigationMenu-N5_7da8m.js} +39 -39
  110. package/dist/{useSseClient-BaM0oGDR.js → useSseClient-CKpNaz5g.js} +1 -1
  111. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
  112. package/dist/views/integration/IntegrationPlatformView.vue.d.ts +2 -0
  113. package/dist/views/production-run/ProductionRunDetailPage.spec.d.ts +1 -0
  114. package/dist/views/production-run/ProductionRunDetailPage.vue.d.ts +15 -0
  115. package/dist/views/production-run/ProductionRunPage.vue.d.ts +2 -0
  116. package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +11 -1
  117. package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -1
  118. package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +1 -1
  119. package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +1 -1
  120. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +2 -2
  121. package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +3 -3
  122. package/dist/views/receive-request/composables/use-receive-request-form.spec.d.ts +1 -0
  123. package/dist/views/receive-request-bulk/BulkReceiveRequestPage.vue.d.ts +2 -0
  124. package/dist/views/receive-request-bulk/components/CreateTransferWizard.spec.d.ts +1 -0
  125. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +6 -6
  126. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.readiness.spec.d.ts +1 -0
  127. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  128. package/dist/{PlanTierBadge.vue_vue_type_script_setup_true_lang-DwUCuX11.js → vue-CxSKQOrZ.js} +84 -68
  129. package/dist/{vue-i18n-Cf9XKwOr.js → vue-i18n-CTR_IUvd.js} +258 -258
  130. package/dist/{xlsx.util-EZTW-mf4.js → xlsx.util-J9pxGRQD.js} +2 -2
  131. package/package.json +4 -4
  132. package/dist/BulkReceiveRequestView-CFaMPFfO.js +0 -2657
  133. package/dist/FeatureCapabilityGate-CFUPteG8.js +0 -74
  134. package/dist/ProductionRunDetailView-DPcovCY1.js +0 -2312
  135. package/dist/ProductionRunView-DJXZ_hmi.js +0 -931
  136. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BIc4mZJI.js +0 -4847
@@ -1,136 +1,115 @@
1
- import { ref as k, onUnmounted as mt, computed as I, defineComponent as ie, watch as Z, onMounted as Ie, resolveComponent as Y, createElementBlock as f, openBlock as i, createBlock as me, createCommentVNode as P, unref as $, createVNode as V, createElementVNode as y, toDisplayString as b, Fragment as J, renderList as oe, withKeys as Ue, normalizeClass as ae, withModifiers as pt, withCtx as le, createTextVNode as ve, h as vt, onBeforeUnmount as gt, nextTick as yt, Teleport as ht, normalizeStyle as _t, mergeModels as Me, useModel as xt } from "vue";
2
- import { _ as bt } from "./empty-placeholder-B0QU467o.js";
3
- import { u as He, a as Je, R as fe, d as wt, S as kt, b as St } from "./app-O0ln50NT.js";
1
+ import { ref as x, onUnmounted as mt, computed as V, defineComponent as ue, watch as Z, onMounted as Ie, resolveComponent as W, createElementBlock as m, openBlock as i, createBlock as ie, createCommentVNode as E, unref as D, createVNode as I, createElementVNode as w, toDisplayString as b, Fragment as J, renderList as oe, withKeys as Me, normalizeClass as ae, withModifiers as pt, withCtx as le, createTextVNode as ve, h as vt, onBeforeUnmount as gt, nextTick as yt, Teleport as ht, normalizeStyle as _t, mergeModels as Ue, useModel as bt } from "vue";
2
+ import { _ as xt } from "./empty-placeholder-B0QU467o.js";
3
+ import { _ as wt } from "./PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js";
4
+ import { u as He, a as Je, R as me, d as kt, S as St, b as $t } from "./app-Bb5HLWTu.js";
4
5
  import { useCoreStore as ge, useI18n as he } from "@feedmepos/mf-common";
5
- import { useRouter as Ne, useRoute as $t } from "vue-router";
6
- import { u as Ct } from "./feature-SfaxOOo8.js";
7
- import { u as Lt } from "./netsuite-B4PKJ2O4.js";
8
- import { u as Ye, n as Rt, e as Dt } from "./useNavigationMenu-BVJlsjVn.js";
9
- import { useBreakpoints as Vt } from "@feedmepos/ui-library";
6
+ import { useRouter as Ne, useRoute as Ct } from "vue-router";
7
+ import { u as Lt } from "./feature-kti8bU8q.js";
8
+ import { u as Rt } from "./netsuite-BeDxaeKM.js";
9
+ import { u as Ye, n as Dt, e as Vt } from "./useNavigationMenu-N5_7da8m.js";
10
+ import { useBreakpoints as It } from "@feedmepos/ui-library";
10
11
  import { F as We } from "./FmAdminBadge-DlplQOHb.js";
11
- import { i as It, _ as Nt } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-AKDqv1C8.js";
12
- import { F as Pt } from "./decimal-BceSQ9qu.js";
13
- import { t as Et, a as Tt } from "./date2-BVVlNlAO.js";
14
- import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- import { u as Ft } from "./useTabStorage-BkIVScW_.js";
16
- import { _ as At } from "./PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-E6WVZA-D.js";
17
- import { D as Ut } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Bmei7M_d.js";
18
- import { u as Mt, g as Oe } from "./PlanTierBadge.vue_vue_type_script_setup_true_lang-DwUCuX11.js";
19
- import { u as Ot } from "./googlemap-D9vA7GsS.js";
20
- function Kt() {
12
+ import { i as Nt, _ as Et } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js";
13
+ import { F as Tt } from "./decimal-CVF1rRoj.js";
14
+ import { t as Pt, a as Bt } from "./date2-D9gB9BE-.js";
15
+ import { _ as Ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
+ import { u as At } from "./useTabStorage-BkIVScW_.js";
17
+ import { _ as Mt } from "./PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js";
18
+ import { D as Ut } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js";
19
+ import { u as Ot, g as Oe } from "./vue-CxSKQOrZ.js";
20
+ import { u as Kt } from "./googlemap-D9vA7GsS.js";
21
+ function zt() {
21
22
  return {
22
23
  loadingHookInstalled: !1,
23
24
  isLoading: !1
24
25
  };
25
26
  }
26
- const de = k(Kt());
27
- function zt() {
27
+ const fe = x(zt());
28
+ function jt() {
28
29
  const o = Ne();
29
- if (!de.value.loadingHookInstalled) {
30
- de.value.loadingHookInstalled = !0;
30
+ if (!fe.value.loadingHookInstalled) {
31
+ fe.value.loadingHookInstalled = !0;
31
32
  const e = o.beforeEach(() => {
32
- de.value.isLoading = !0;
33
+ fe.value.isLoading = !0;
33
34
  }), t = o.afterEach(() => {
34
- de.value.isLoading = !1;
35
+ fe.value.isLoading = !1;
35
36
  });
36
37
  mt(() => {
37
- de.value.loadingHookInstalled = !1, e(), t();
38
+ fe.value.loadingHookInstalled = !1, e(), t();
38
39
  });
39
40
  }
40
41
  return {
41
42
  get isLoading() {
42
- return de.value.isLoading;
43
+ return fe.value.isLoading;
43
44
  }
44
45
  };
45
46
  }
46
- function jt() {
47
+ function Gt() {
47
48
  const { firstAccessibleRouteName: o } = Ye();
48
- return { hasAnyAccessibleInventoryRoute: I(() => o.value !== null) };
49
+ return { hasAnyAccessibleInventoryRoute: V(() => o.value !== null) };
49
50
  }
50
- const Gt = {
51
+ const Ht = {
51
52
  key: 0,
52
53
  class: "flex flex-col items-center w-full h-full gap-24"
53
- }, Ht = {
54
+ }, Jt = {
54
55
  key: 1,
55
56
  class: "flex flex-col pt-[200px] gap-32 items-center"
56
- }, 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 = {
57
- key: 2,
58
- class: "flex flex-col pt-[200px] gap-32 items-center"
59
- }, 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__ */ ie({
57
+ }, Yt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Wt = { class: "fm-typo-en-title-lg-600" }, Xt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, qt = /* @__PURE__ */ ue({
60
58
  __name: "InventoryView",
61
59
  setup(o) {
62
- const e = He(), t = Je(), l = Lt(), s = ge(), a = Ne(), r = zt(), u = Ct(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = jt();
60
+ const e = He(), t = Je(), l = Rt(), s = ge(), a = Ne(), r = jt(), u = Lt(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = Gt();
63
61
  Z(
64
62
  [() => s.sessionUser.value, () => s.currentBusiness.value],
65
- ([M, C]) => {
66
- R(M, C);
63
+ ([U, $]) => {
64
+ L(U, $);
67
65
  }
68
66
  ), Ie(async () => {
69
67
  await u.init(), await s.readBusinesses();
70
- const M = s.sessionUser.value, C = s.currentBusiness.value;
71
- R(M, C);
68
+ const U = s.sessionUser.value, $ = s.currentBusiness.value;
69
+ L(U, $);
72
70
  });
73
- function R(M, C) {
74
- !M || !C || F();
71
+ function L(U, $) {
72
+ !U || !$ || F();
75
73
  }
76
74
  async function F() {
77
- return await e.init(), await l.readSetting().catch((M) => {
78
- console.error("[all] error on reading netsuite store", M);
75
+ return await e.init(), await l.readSetting().catch((U) => {
76
+ console.error("[all] error on reading netsuite store", U);
79
77
  }), await t.init();
80
78
  }
81
- const B = I(() => a.currentRoute.value.name === fe.TRANSFER_TEMPLATE ? u.enablePoTemplate : !0), K = I(
82
- () => a.currentRoute.value.matched.some((M) => {
83
- var L;
84
- const C = M.meta, G = C == null ? void 0 : C.validationManifest;
85
- return (((L = G == null ? void 0 : G.requiredCaslPermissions) == null ? void 0 : L.length) ?? 0) > 0;
79
+ const B = V(() => a.currentRoute.value.name === me.TRANSFER_TEMPLATE ? u.enablePoTemplate : !0), K = V(
80
+ () => a.currentRoute.value.matched.some((U) => {
81
+ var C;
82
+ const $ = U.meta, G = $ == null ? void 0 : $.validationManifest;
83
+ return (((C = G == null ? void 0 : G.requiredCaslPermissions) == null ? void 0 : C.length) ?? 0) > 0;
86
84
  })
87
- ), Q = I(() => {
85
+ ), Q = V(() => {
88
86
  if (!s.sessionUser.value) return !1;
89
87
  if (e._locations !== null && e.locations.length === 0) return !0;
90
88
  if (!u.isLoaded) return !1;
91
- const G = a.currentRoute.value.name === fe.LOADING;
89
+ const G = a.currentRoute.value.name === me.LOADING;
92
90
  return !p.value && (G || K.value);
93
91
  });
94
- return (M, C) => {
95
- const G = Y("FmSpacer"), L = Y("FmCircularProgress"), h = Y("FmButton"), w = Y("RouterView");
96
- return i(), f("div", null, [
97
- $(r).isLoading ? (i(), f("div", Gt, [
98
- V(G),
99
- y("div", null, [
100
- V(L, { size: "xl" })
92
+ return (U, $) => {
93
+ const G = W("FmSpacer"), C = W("FmCircularProgress"), y = W("RouterView");
94
+ return i(), m("div", null, [
95
+ D(r).isLoading ? (i(), m("div", Ht, [
96
+ I(G),
97
+ w("div", null, [
98
+ I(C, { size: "xl" })
101
99
  ]),
102
- C[0] || (C[0] = y("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
103
- V(G)
104
- ])) : Q.value ? (i(), f("div", Ht, [
105
- C[1] || (C[1] = y("img", {
106
- src: bt,
100
+ $[0] || ($[0] = w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
101
+ I(G)
102
+ ])) : Q.value ? (i(), m("div", Jt, [
103
+ $[1] || ($[1] = w("img", {
104
+ src: xt,
107
105
  alt: "No permission",
108
106
  class: "w-[200px] h-[200px]"
109
107
  }, null, -1)),
110
- y("div", Jt, [
111
- y("div", Yt, b($(v)("inventory.common.noPermission.title")), 1),
112
- y("div", Wt, b($(v)("inventory.common.noPermission.description")), 1)
108
+ w("div", Yt, [
109
+ w("div", Wt, b(D(v)("inventory.common.noPermission.title")), 1),
110
+ w("div", Xt, b(D(v)("inventory.common.noPermission.description")), 1)
113
111
  ])
114
- ])) : B.value ? $(s).sessionUser.value ? (i(), me(w, { key: 3 })) : P("", !0) : (i(), f("div", Xt, [
115
- y("div", qt, [
116
- y("div", Zt, b($(v)("inventory.common.proPlan.title")), 1),
117
- y("div", Qt, b($(v)("inventory.common.proPlan.subtitle")), 1)
118
- ]),
119
- y("div", en, [
120
- y("a", tn, [
121
- V(h, {
122
- label: $(v)("inventory.common.proPlan.comparePlans"),
123
- variant: "secondary"
124
- }, null, 8, ["label"])
125
- ]),
126
- y("a", nn, [
127
- V(h, {
128
- label: $(v)("inventory.common.proPlan.callUs"),
129
- "prepend-icon": "call"
130
- }, null, 8, ["label"])
131
- ])
132
- ])
133
- ]))
112
+ ])) : B.value ? D(s).sessionUser.value ? (i(), ie(y, { key: 3 })) : E("", !0) : (i(), ie(wt, { key: 2 }))
134
113
  ]);
135
114
  };
136
115
  }
@@ -207,10 +186,10 @@ const Gt = {
207
186
  "contains.alternatives": "_id"
208
187
  }
209
188
  };
210
- function an(o) {
211
- return o instanceof kt && o.errorResponse.statusCode === 409;
189
+ function Zt(o) {
190
+ return o instanceof St && o.errorResponse.statusCode === 409;
212
191
  }
213
- const _e = wt((o, e) => ({
192
+ const _e = kt((o, e) => ({
214
193
  /**
215
194
  * Commits for one record. recordId is the changelog docId, `${dbName}/${id}`.
216
195
  * The dbName scopes the (access-checked) backend route; only the bare id is
@@ -221,8 +200,8 @@ const _e = wt((o, e) => ({
221
200
  if (r < 0) return [];
222
201
  const u = t.slice(0, r), v = t.slice(r + 1), p = new URLSearchParams({ id: v });
223
202
  l != null && p.set("limit", String(l)), a && p.set("before", a), s && (p.set("explain", "1"), p.set("schema", JSON.stringify(s)));
224
- const R = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
225
- return await e.get(R);
203
+ const L = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
204
+ return await e.get(L);
226
205
  },
227
206
  /**
228
207
  * Purchase orders in a date range, each with when it last changed. The
@@ -288,10 +267,10 @@ const _e = wt((o, e) => ({
288
267
  return await e.get(s);
289
268
  }
290
269
  })), Se = 50;
291
- function sn() {
292
- const o = _e(), e = k([]), t = k(!1), l = k(!1);
270
+ function Qt() {
271
+ const o = _e(), e = x([]), t = x(!1), l = x(!1);
293
272
  let s = null, a = 0;
294
- async function r(v, p, R) {
273
+ async function r(v, p, L) {
295
274
  const F = ++a;
296
275
  if (s = null, l.value = !1, !v) {
297
276
  e.value = [];
@@ -299,9 +278,9 @@ function sn() {
299
278
  }
300
279
  t.value = !0;
301
280
  try {
302
- const B = p ?? Se, K = await o.getRecordChangelog(v, B, R);
281
+ const B = p ?? Se, K = await o.getRecordChangelog(v, B, L);
303
282
  if (F !== a) return;
304
- e.value = K, p == null && (s = { recordId: v, explain: R }, l.value = K.length === B);
283
+ e.value = K, p == null && (s = { recordId: v, explain: L }, l.value = K.length === B);
305
284
  } catch (B) {
306
285
  throw F === a && (e.value = []), B;
307
286
  } finally {
@@ -314,9 +293,9 @@ function sn() {
314
293
  const p = a;
315
294
  t.value = !0;
316
295
  try {
317
- const R = await o.getRecordChangelog(s.recordId, Se, s.explain, v.id);
296
+ const L = await o.getRecordChangelog(s.recordId, Se, s.explain, v.id);
318
297
  if (p !== a) return;
319
- e.value = [...e.value, ...R], l.value = R.length === Se;
298
+ e.value = [...e.value, ...L], l.value = L.length === Se;
320
299
  } finally {
321
300
  p === a && (t.value = !1);
322
301
  }
@@ -328,13 +307,13 @@ function Ke(o) {
328
307
  const e = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?/.exec(o);
329
308
  return e ? `${e[1]}.${(e[2] ?? "").padEnd(9, "0").slice(0, 9)}` : o;
330
309
  }
331
- function ln(o, e) {
310
+ function en(o, e) {
332
311
  return [...o, ...e].sort(
333
312
  (t, l) => Ke(l.at).localeCompare(Ke(t.at)) || l.id.localeCompare(t.id)
334
313
  );
335
314
  }
336
- function rn() {
337
- const o = _e(), e = k([]);
315
+ function tn() {
316
+ const o = _e(), e = x([]);
338
317
  async function t(l) {
339
318
  if (e.value = [], !!l)
340
319
  try {
@@ -370,16 +349,16 @@ function De(o) {
370
349
  const e = o.indexOf(Qe);
371
350
  return e === -1 ? { raw: o, human: o } : { raw: o.slice(0, e), human: o.slice(e + 1) };
372
351
  }
373
- const un = [
352
+ const nn = [
374
353
  "inventory.changelog.label.recipe",
375
354
  "inventory.changelog.label.sku",
376
355
  "inventory.changelog.label.unit"
377
- ], cn = [...un, "Recipe", "Ingredient", "Unit"];
378
- function dn(o) {
356
+ ], on = [...nn, "Recipe", "Ingredient", "Unit"];
357
+ function an(o) {
379
358
  const { human: e } = De(o);
380
359
  if (!e) return { type: "Document", name: "", field: [] };
381
360
  const t = e.split(" › ");
382
- return t.length >= 2 && cn.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
361
+ return t.length >= 2 && on.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
383
362
  }
384
363
  const ze = 800;
385
364
  function et(o, e, t = 2) {
@@ -392,9 +371,9 @@ function et(o, e, t = 2) {
392
371
  r++;
393
372
  const u = l.slice(a, l.length - r), v = s.slice(a, s.length - r);
394
373
  if (u.length > ze || v.length > ze) return null;
395
- const p = (R) => ({ type: "same", text: R });
396
- return mn(
397
- [...l.slice(0, a).map(p), ...fn(u, v), ...l.slice(l.length - r).map(p)],
374
+ const p = (L) => ({ type: "same", text: L });
375
+ return ln(
376
+ [...l.slice(0, a).map(p), ...sn(u, v), ...l.slice(l.length - r).map(p)],
398
377
  t
399
378
  );
400
379
  }
@@ -407,7 +386,7 @@ function je(o) {
407
386
  return null;
408
387
  }
409
388
  }
410
- function fn(o, e) {
389
+ function sn(o, e) {
411
390
  const t = o.length, l = e.length, s = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
412
391
  for (let v = t - 1; v >= 0; v--)
413
392
  for (let p = l - 1; p >= 0; p--)
@@ -420,7 +399,7 @@ function fn(o, e) {
420
399
  for (; u < l; ) a.push({ type: "add", text: e[u++] });
421
400
  return a;
422
401
  }
423
- function mn(o, e) {
402
+ function ln(o, e) {
424
403
  const t = o.map(() => !1);
425
404
  o.forEach((a, r) => {
426
405
  if (a.type !== "same")
@@ -433,7 +412,7 @@ function mn(o, e) {
433
412
  t[r] ? (l.push(a), s = !1) : s || (l.push({ type: "skip", text: "⋯" }), s = !0);
434
413
  }), l;
435
414
  }
436
- function pn(o, e) {
415
+ function rn(o, e) {
437
416
  let t;
438
417
  try {
439
418
  t = JSON.parse(o);
@@ -450,25 +429,25 @@ function Ve(o, e, t = 0, l) {
450
429
  // A bare array index says nothing a reader needs — a leaf list entry
451
430
  // shows just its value. Branch nodes keep the index as their header.
452
431
  label: s != null && r && /^\d+$/.test(s) ? void 0 : s,
453
- text: r ? vn(o, e, l) : void 0,
432
+ text: r ? un(o, e, l) : void 0,
454
433
  bookkeeping: !!o.bookkeeping
455
434
  });
456
435
  const v = a ? t + 1 : t;
457
- for (const R of o.kids ?? [])
458
- u.push(...Ve(R, e, v, l));
436
+ for (const L of o.kids ?? [])
437
+ u.push(...Ve(L, e, v, l));
459
438
  return u;
460
439
  }
461
- function vn(o, e, t) {
440
+ function un(o, e, t) {
462
441
  if (o.value == null) return o.display || void 0;
463
- const l = pn(o.value, e);
442
+ const l = rn(o.value, e);
464
443
  return (t == null ? void 0 : t(l)) ?? o.display ?? l;
465
444
  }
466
445
  function $e(o, e) {
467
446
  return JSON.stringify(o, null, 2).split(`
468
447
  `).map((t) => ({ type: e, text: t }));
469
448
  }
470
- function gn() {
471
- const o = _e(), e = /* @__PURE__ */ new Map(), t = k(!1), l = k(null);
449
+ function cn() {
450
+ const o = _e(), e = /* @__PURE__ */ new Map(), t = x(!1), l = x(null);
472
451
  async function s(a) {
473
452
  const r = e.get(a.id);
474
453
  if (r) {
@@ -477,16 +456,16 @@ function gn() {
477
456
  }
478
457
  t.value = !0;
479
458
  try {
480
- const u = a.doc_id.indexOf("/"), v = a.doc_id.slice(0, u), p = a.doc_id.slice(u + 1), [R, F] = await Promise.all([
459
+ const u = a.doc_id.indexOf("/"), v = a.doc_id.slice(0, u), p = a.doc_id.slice(u + 1), [L, F] = await Promise.all([
481
460
  a.parent ? o.getState(v, p, a.parent) : Promise.resolve({}),
482
461
  o.getState(v, p, a.id)
483
- ]), K = { diff: a.parent ? et(JSON.stringify(R), JSON.stringify(F)) ?? [
484
- ...$e(R, "del"),
462
+ ]), K = { diff: a.parent ? et(JSON.stringify(L), JSON.stringify(F)) ?? [
463
+ ...$e(L, "del"),
485
464
  ...$e(F, "add")
486
465
  ] : $e(F, "add"), conflict: !1 };
487
466
  e.set(a.id, K), l.value = K;
488
467
  } catch (u) {
489
- if (!an(u))
468
+ if (!Zt(u))
490
469
  throw l.value = null, u;
491
470
  const v = { diff: null, conflict: !0 };
492
471
  e.set(a.id, v), l.value = v;
@@ -496,67 +475,67 @@ function gn() {
496
475
  }
497
476
  return { isLoading: t, result: l, load: s };
498
477
  }
499
- const yn = {
478
+ const dn = {
500
479
  key: 0,
501
480
  class: "flex justify-center p-16"
502
- }, hn = {
481
+ }, fn = {
503
482
  key: 1,
504
483
  class: "p-16 text-center text-gray-500"
505
- }, _n = {
484
+ }, mn = {
506
485
  key: 2,
507
486
  class: "flex h-full min-h-0 gap-8"
508
- }, xn = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, bn = ["onClick", "onKeydown"], wn = { class: "fm-typo-en-body-md-600" }, kn = { class: "text-xs text-gray-500" }, Sn = {
487
+ }, pn = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, vn = ["onClick", "onKeydown"], gn = { class: "fm-typo-en-body-md-600" }, yn = { class: "text-xs text-gray-500" }, hn = {
509
488
  key: 0,
510
489
  class: "flex-1 overflow-y-auto pl-4"
511
- }, $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 = {
490
+ }, _n = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, bn = { class: "flex flex-wrap items-center gap-8" }, xn = { class: "fm-typo-en-body-lg-600" }, wn = {
512
491
  key: 0,
513
492
  class: "rounded-full bg-gray-100 px-8 text-xs text-gray-500"
514
- }, 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" }, Nn = {
493
+ }, kn = { class: "text-xs text-gray-500" }, Sn = { class: "mb-12" }, $n = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, Cn = {
515
494
  key: 0,
516
495
  class: "mb-12"
517
- }, Pn = {
496
+ }, Ln = {
518
497
  key: 1,
519
498
  class: "text-sm text-gray-400"
520
- }, En = {
499
+ }, Rn = {
521
500
  key: 2,
522
501
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
523
- }, Tn = {
502
+ }, Dn = {
524
503
  key: 0,
525
504
  class: "text-xs text-gray-400"
526
- }, Bn = { class: "fm-typo-en-body-md-600" }, Fn = { class: "flex flex-col gap-6" }, An = {
505
+ }, Vn = { class: "fm-typo-en-body-md-600" }, In = { class: "flex flex-col gap-6" }, Nn = {
527
506
  key: 0,
528
507
  class: "text-gray-700"
529
- }, Un = { class: "min-w-[120px] shrink-0 text-gray-500" }, Mn = {
508
+ }, En = { class: "min-w-[120px] shrink-0 text-gray-500" }, Tn = {
530
509
  key: 0,
531
510
  class: "flex w-full flex-col gap-4"
532
- }, On = {
511
+ }, Pn = {
533
512
  key: 0,
534
513
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
535
- }, Kn = { key: 0 }, zn = { key: 1 }, jn = {
514
+ }, Bn = { key: 0 }, Fn = { key: 1 }, An = {
536
515
  key: 1,
537
516
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
538
- }, Gn = { key: 0 }, Hn = { key: 1 }, Jn = {
517
+ }, Mn = { key: 0 }, Un = { key: 1 }, On = {
539
518
  key: 1,
540
519
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
541
- }, Yn = {
520
+ }, Kn = {
542
521
  key: 2,
543
522
  class: "flex w-full flex-wrap items-baseline gap-4"
544
- }, Wn = {
523
+ }, zn = {
545
524
  key: 0,
546
525
  class: "rounded bg-red-50 px-4 text-red-700"
547
- }, Xn = {
526
+ }, jn = {
548
527
  key: 1,
549
528
  class: "text-gray-400"
550
- }, qn = {
529
+ }, Gn = {
551
530
  key: 2,
552
531
  class: "rounded bg-green-50 px-4 text-green-700"
553
- }, Zn = {
532
+ }, Hn = {
554
533
  key: 1,
555
534
  class: "text-sm text-gray-500"
556
- }, Qn = {
535
+ }, Jn = {
557
536
  key: 2,
558
537
  class: "mt-16 break-all border-t border-gray-200 pt-8 font-mono text-xs text-gray-400"
559
- }, eo = { key: 0 }, to = "capture baseline", no = /* @__PURE__ */ ie({
538
+ }, Yn = { key: 0 }, Wn = "capture baseline", Xn = /* @__PURE__ */ ue({
560
539
  __name: "ChangelogPanel",
561
540
  props: {
562
541
  commits: {},
@@ -564,27 +543,27 @@ const yn = {
564
543
  resolveName: { type: Function }
565
544
  },
566
545
  setup(o) {
567
- const e = o, { t } = he(), l = k(null), s = I(
546
+ const e = o, { t } = he(), l = x(null), s = V(
568
547
  () => e.commits.find((d) => d.id === l.value)
569
- ), a = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = I(() => {
570
- var _;
571
- return (((_ = s.value) == null ? void 0 : _.changes) ?? []).filter((U) => {
572
- const { raw: A } = De(U.path);
573
- return A === "@payload" || U.from == null && U.to == null ? !1 : !A.split(".").some((X) => a.has(X));
548
+ ), a = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = V(() => {
549
+ var h;
550
+ return (((h = s.value) == null ? void 0 : h.changes) ?? []).filter((M) => {
551
+ const { raw: A } = De(M.path);
552
+ return A === "@payload" || M.from == null && M.to == null ? !1 : !A.split(".").some((X) => a.has(X));
574
553
  });
575
554
  });
576
555
  Z(
577
556
  () => e.commits,
578
557
  (d) => {
579
- var _;
580
- d.find((U) => U.id === l.value) || (l.value = ((_ = d[0]) == null ? void 0 : _.id) ?? null);
558
+ var h;
559
+ d.find((M) => M.id === l.value) || (l.value = ((h = d[0]) == null ? void 0 : h.id) ?? null);
581
560
  },
582
561
  { immediate: !0 }
583
562
  );
584
- const u = k(!1), { isLoading: v, result: p, load: R } = gn();
585
- Z([u, s], ([d, _]) => {
586
- p.value = null, !(!d || !_) && R(_).catch((U) => {
587
- console.error("changelog snapshot load failed", U), u.value = !1;
563
+ const u = x(!1), { isLoading: v, result: p, load: L } = cn();
564
+ Z([u, s], ([d, h]) => {
565
+ p.value = null, !(!d || !h) && L(h).catch((M) => {
566
+ console.error("changelog snapshot load failed", M), u.value = !1;
588
567
  });
589
568
  });
590
569
  function F(d) {
@@ -595,353 +574,353 @@ const yn = {
595
574
  }
596
575
  function K(d) {
597
576
  if (d == null) return "";
598
- let _;
577
+ let h;
599
578
  try {
600
- _ = JSON.parse(d);
579
+ h = JSON.parse(d);
601
580
  } catch {
602
581
  return d;
603
582
  }
604
- return _ === null ? "—" : typeof _ == "string" ? _ : typeof _ == "number" ? _.toLocaleString() : typeof _ == "boolean" ? t(_ ? "inventory.changelog.yes" : "inventory.changelog.no") : JSON.stringify(_, null, 2);
583
+ return h === null ? "—" : typeof h == "string" ? h : typeof h == "number" ? h.toLocaleString() : typeof h == "boolean" ? t(h ? "inventory.changelog.yes" : "inventory.changelog.no") : JSON.stringify(h, null, 2);
605
584
  }
606
585
  function Q(d) {
607
586
  return (d.authors || []).join(", ") || t("inventory.changelog.unknownActor");
608
587
  }
609
- function M(d) {
610
- if (d.message === to) return t("inventory.changelog.captureBaseline");
611
- const _ = qe(d.message);
612
- if (!_) return d.message || t("inventory.changelog.noMessage");
613
- const U = C(_.labelKey);
614
- return _.name ? t(`inventory.changelog.message.${_.verb}`, { module: U, name: _.name }) : t(`inventory.changelog.message.${_.verb}NoName`, { module: U });
588
+ function U(d) {
589
+ if (d.message === Wn) return t("inventory.changelog.captureBaseline");
590
+ const h = qe(d.message);
591
+ if (!h) return d.message || t("inventory.changelog.noMessage");
592
+ const M = $(h.labelKey);
593
+ return h.name ? t(`inventory.changelog.message.${h.verb}`, { module: M, name: h.name }) : t(`inventory.changelog.message.${h.verb}NoName`, { module: M });
615
594
  }
616
- function C(d) {
595
+ function $(d) {
617
596
  return Ze(d) ? t(d) : d;
618
597
  }
619
598
  const G = (d) => /[^a-zA-Z]/.test(d);
620
- function L(d, _) {
621
- return d == null || _ == null ? null : et(d, _);
599
+ function C(d, h) {
600
+ return d == null || h == null ? null : et(d, h);
622
601
  }
623
- function h(d) {
602
+ function y(d) {
624
603
  if (!(!d.to_value && !d.from_value))
625
604
  return {
626
605
  toTree: d.to_value ? Ve(d.to_value, t, 0, e.resolveName) : void 0,
627
606
  fromTree: d.from_value ? Ve(d.from_value, t, 0, e.resolveName) : void 0
628
607
  };
629
608
  }
630
- function w(d) {
609
+ function S(d) {
631
610
  return d === "add" ? "bg-green-50 text-green-700" : d === "del" ? "bg-red-50 text-red-700" : d === "skip" ? "text-gray-400" : "text-gray-600";
632
611
  }
633
- function E(d) {
612
+ function T(d) {
634
613
  return d.type === "skip" ? d.text : (d.type === "add" ? "+ " : d.type === "del" ? "- " : " ") + d.text;
635
614
  }
636
- const O = I(() => {
637
- const d = /* @__PURE__ */ new Map(), _ = [], U = (g, m) => {
615
+ const O = V(() => {
616
+ const d = /* @__PURE__ */ new Map(), h = [], M = (g, f) => {
638
617
  let N = d.get(g);
639
- return N || (N = m(), d.set(g, N), _.push(N)), N;
640
- }, A = () => U("@doc", () => ({ header: "", lines: [] })), X = (g, m) => {
641
- var T;
642
- if (g == null) return m;
618
+ return N || (N = f(), d.set(g, N), h.push(N)), N;
619
+ }, A = () => M("@doc", () => ({ header: "", lines: [] })), X = (g, f) => {
620
+ var P;
621
+ if (g == null) return f;
643
622
  let N;
644
623
  try {
645
624
  N = JSON.parse(g);
646
625
  } catch {
647
626
  N = g;
648
627
  }
649
- return (typeof N == "string" ? (T = e.resolveName) == null ? void 0 : T.call(e, N) : void 0) ?? m;
650
- }, H = (g, m, N) => {
651
- var T, W, ee, te;
652
- const x = h(m);
653
- x ? g.lines.push({ label: N, ...x }) : m.from != null && m.to != null ? g.lines.push({
628
+ return (typeof N == "string" ? (P = e.resolveName) == null ? void 0 : P.call(e, N) : void 0) ?? f;
629
+ }, H = (g, f, N) => {
630
+ var P, Y, ee, te;
631
+ const _ = y(f);
632
+ _ ? g.lines.push({ label: N, ..._ }) : f.from != null && f.to != null ? g.lines.push({
654
633
  label: N,
655
- from: m.from,
656
- to: m.to,
657
- diff: L(m.from, m.to),
658
- fromDisplay: X(m.from, (T = m.display) == null ? void 0 : T.from),
659
- toDisplay: X(m.to, (W = m.display) == null ? void 0 : W.to)
660
- }) : m.to != null ? g.lines.push({ label: N, to: m.to, toDisplay: X(m.to, (ee = m.display) == null ? void 0 : ee.to) }) : g.lines.push({ label: N, from: m.from, fromDisplay: X(m.from, (te = m.display) == null ? void 0 : te.from) });
661
- }, D = (g) => {
634
+ from: f.from,
635
+ to: f.to,
636
+ diff: C(f.from, f.to),
637
+ fromDisplay: X(f.from, (P = f.display) == null ? void 0 : P.from),
638
+ toDisplay: X(f.to, (Y = f.display) == null ? void 0 : Y.to)
639
+ }) : f.to != null ? g.lines.push({ label: N, to: f.to, toDisplay: X(f.to, (ee = f.display) == null ? void 0 : ee.to) }) : g.lines.push({ label: N, from: f.from, fromDisplay: X(f.from, (te = f.display) == null ? void 0 : te.from) });
640
+ }, R = (g) => {
662
641
  var N;
663
- const m = g.element;
664
- if (m) {
665
- const x = U(`kit:${(m.trail ?? []).join(".")}:${m.id ?? ""}`, () => ({
666
- kind: (m.trail ?? []).map(C).join(" › "),
667
- header: m.name || m.id || "",
642
+ const f = g.element;
643
+ if (f) {
644
+ const _ = M(`kit:${(f.trail ?? []).join(".")}:${f.id ?? ""}`, () => ({
645
+ kind: (f.trail ?? []).map($).join(" › "),
646
+ header: f.name || f.id || "",
668
647
  lines: []
669
648
  }));
670
649
  if ((N = g.field) != null && N.length)
671
- H(x, g, g.field.map(C).join(" › "));
650
+ H(_, g, g.field.map($).join(" › "));
672
651
  else {
673
- x.badge = g.to != null ? "added" : "removed";
674
- const T = h(g);
675
- T && x.lines.push(T);
652
+ _.badge = g.to != null ? "added" : "removed";
653
+ const P = y(g);
654
+ P && _.lines.push(P);
676
655
  }
677
656
  return;
678
657
  }
679
- H(A(), g, (g.field ?? []).map(C).join(" › "));
658
+ H(A(), g, (g.field ?? []).map($).join(" › "));
680
659
  };
681
660
  for (const g of r.value) {
682
- const { raw: m, human: N } = De(g.path);
683
- if (g.kind === "create" && !m) {
684
- const ee = h(g);
661
+ const { raw: f, human: N } = De(g.path);
662
+ if (g.kind === "create" && !f) {
663
+ const ee = y(g);
685
664
  A().lines.push(
686
665
  ee ? { label: t("inventory.changelog.kind.created"), ...ee } : { text: t("inventory.changelog.kind.created") }
687
666
  );
688
667
  continue;
689
668
  }
690
669
  if (!g.path.includes(Qe) && (g.field || g.element)) {
691
- D(g);
670
+ R(g);
692
671
  continue;
693
672
  }
694
- const x = m ? m.split(".") : [], T = N ? N.split(" › ") : [], W = x.findIndex((ee, te) => te > 0 && G(ee));
695
- if (W > 0 && T.length === x.length) {
696
- const ee = T[W], te = U(x.slice(0, W + 1).join("."), () => ({
697
- kind: T.slice(0, W).map(C).join(" › "),
673
+ const _ = f ? f.split(".") : [], P = N ? N.split(" › ") : [], Y = _.findIndex((ee, te) => te > 0 && G(ee));
674
+ if (Y > 0 && P.length === _.length) {
675
+ const ee = P[Y], te = M(_.slice(0, Y + 1).join("."), () => ({
676
+ kind: P.slice(0, Y).map($).join(" › "),
698
677
  header: ee,
699
678
  lines: []
700
- })), re = T.slice(W + 1).map(C).join(" › ");
679
+ })), re = P.slice(Y + 1).map($).join(" › ");
701
680
  if (re) H(te, g, re);
702
681
  else if (g.from != null && g.to != null) H(te, g, ee);
703
682
  else {
704
683
  te.badge = g.to != null ? "added" : "removed";
705
- const ue = h(g);
706
- ue && te.lines.push(ue);
684
+ const ce = y(g);
685
+ ce && te.lines.push(ce);
707
686
  }
708
687
  continue;
709
688
  }
710
- H(A(), g, T.map(C).join(" › "));
689
+ H(A(), g, P.map($).join(" › "));
711
690
  }
712
- return _;
691
+ return h;
713
692
  });
714
- return (d, _) => {
693
+ return (d, h) => {
715
694
  var X, H;
716
- const U = Y("FmCircularProgress"), A = Y("FmSwitch");
717
- return d.isLoading ? (i(), f("div", yn, [
718
- V(U)
719
- ])) : d.commits.length ? (i(), f("div", _n, [
720
- y("ol", xn, [
721
- (i(!0), f(J, null, oe(d.commits, (D) => (i(), f("li", {
722
- key: D.id,
695
+ const M = W("FmCircularProgress"), A = W("FmSwitch");
696
+ return d.isLoading ? (i(), m("div", dn, [
697
+ I(M)
698
+ ])) : d.commits.length ? (i(), m("div", mn, [
699
+ w("ol", pn, [
700
+ (i(!0), m(J, null, oe(d.commits, (R) => (i(), m("li", {
701
+ key: R.id,
723
702
  role: "button",
724
703
  tabindex: "0",
725
704
  class: ae([
726
705
  "cursor-pointer border-l-2 py-8 pl-12",
727
- D.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
706
+ R.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
728
707
  ]),
729
- onClick: (g) => l.value = D.id,
708
+ onClick: (g) => l.value = R.id,
730
709
  onKeydown: [
731
- Ue((g) => l.value = D.id, ["enter"]),
732
- Ue(pt((g) => l.value = D.id, ["prevent"]), ["space"])
710
+ Me((g) => l.value = R.id, ["enter"]),
711
+ Me(pt((g) => l.value = R.id, ["prevent"]), ["space"])
733
712
  ]
734
713
  }, [
735
- y("div", wn, b(M(D)), 1),
736
- y("div", kn, b(Q(D)) + " · " + b(B(D.at)) + " · " + b(F(D.id)), 1)
737
- ], 42, bn))), 128))
714
+ w("div", gn, b(U(R)), 1),
715
+ w("div", yn, b(Q(R)) + " · " + b(B(R.at)) + " · " + b(F(R.id)), 1)
716
+ ], 42, vn))), 128))
738
717
  ]),
739
- s.value ? (i(), f("div", Sn, [
740
- y("div", $n, [
741
- y("div", Cn, [
742
- y("div", Ln, b(M(s.value)), 1),
743
- s.value.parent ? P("", !0) : (i(), f("span", Rn, b($(t)("inventory.changelog.rootCommit")), 1))
718
+ s.value ? (i(), m("div", hn, [
719
+ w("div", _n, [
720
+ w("div", bn, [
721
+ w("div", xn, b(U(s.value)), 1),
722
+ s.value.parent ? E("", !0) : (i(), m("span", wn, b(D(t)("inventory.changelog.rootCommit")), 1))
744
723
  ]),
745
- y("div", Dn, b(Q(s.value)) + " · " + b(B(s.value.at)), 1)
724
+ w("div", kn, b(Q(s.value)) + " · " + b(B(s.value.at)), 1)
746
725
  ]),
747
- y("div", Vn, [
748
- V(We, null, {
726
+ w("div", Sn, [
727
+ I(We, null, {
749
728
  default: le(() => [
750
- y("span", In, b($(t)("inventory.changelog.dataDiff")), 1),
751
- V(A, {
729
+ w("span", $n, b(D(t)("inventory.changelog.dataDiff")), 1),
730
+ I(A, {
752
731
  modelValue: u.value,
753
- "onUpdate:modelValue": _[0] || (_[0] = (D) => u.value = D)
732
+ "onUpdate:modelValue": h[0] || (h[0] = (R) => u.value = R)
754
733
  }, null, 8, ["modelValue"])
755
734
  ]),
756
735
  _: 1
757
736
  })
758
737
  ]),
759
- u.value ? (i(), f("div", Nn, [
760
- $(v) ? (i(), me(U, { key: 0 })) : (X = $(p)) != null && X.conflict ? (i(), f("div", Pn, b($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (H = $(p)) != null && H.diff ? (i(), f("div", En, [
761
- (i(!0), f(J, null, oe($(p).diff, (D, g) => (i(), f("div", {
738
+ u.value ? (i(), m("div", Cn, [
739
+ D(v) ? (i(), ie(M, { key: 0 })) : (X = D(p)) != null && X.conflict ? (i(), m("div", Ln, b(D(t)("inventory.changelog.snapshotUnavailable")), 1)) : (H = D(p)) != null && H.diff ? (i(), m("div", Rn, [
740
+ (i(!0), m(J, null, oe(D(p).diff, (R, g) => (i(), m("div", {
762
741
  key: g,
763
- class: ae(["whitespace-pre px-4", w(D.type)])
764
- }, b(E(D)), 3))), 128))
765
- ])) : P("", !0)
766
- ])) : P("", !0),
767
- (i(!0), f(J, null, oe(O.value, (D, g) => (i(), f("div", {
742
+ class: ae(["whitespace-pre px-4", S(R.type)])
743
+ }, b(T(R)), 3))), 128))
744
+ ])) : E("", !0)
745
+ ])) : E("", !0),
746
+ (i(!0), m(J, null, oe(O.value, (R, g) => (i(), m("div", {
768
747
  key: g,
769
748
  class: "mb-12 rounded-lg border border-gray-200 p-12"
770
749
  }, [
771
- D.kind || D.header || D.badge ? (i(), f("div", {
750
+ R.kind || R.header || R.badge ? (i(), m("div", {
772
751
  key: 0,
773
- class: ae(["flex flex-wrap items-baseline gap-8", D.lines.length ? "mb-8" : ""])
752
+ class: ae(["flex flex-wrap items-baseline gap-8", R.lines.length ? "mb-8" : ""])
774
753
  }, [
775
- D.kind ? (i(), f("span", Tn, b(D.kind), 1)) : P("", !0),
776
- y("span", Bn, b(D.header), 1),
777
- D.badge ? (i(), f("span", {
754
+ R.kind ? (i(), m("span", Dn, b(R.kind), 1)) : E("", !0),
755
+ w("span", Vn, b(R.header), 1),
756
+ R.badge ? (i(), m("span", {
778
757
  key: 1,
779
- class: ae(["rounded-full px-8 text-xs", D.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
780
- }, b(D.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : P("", !0)
781
- ], 2)) : P("", !0),
782
- y("ul", Fn, [
783
- (i(!0), f(J, null, oe(D.lines, (m, N) => (i(), f("li", {
758
+ class: ae(["rounded-full px-8 text-xs", R.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
759
+ }, b(R.badge === "added" ? D(t)("inventory.changelog.added") : D(t)("inventory.changelog.kind.removed")), 3)) : E("", !0)
760
+ ], 2)) : E("", !0),
761
+ w("ul", In, [
762
+ (i(!0), m(J, null, oe(R.lines, (f, N) => (i(), m("li", {
784
763
  key: N,
785
764
  class: "flex flex-wrap items-baseline gap-8 text-sm"
786
765
  }, [
787
- m.text ? (i(), f("span", An, b(m.text), 1)) : (i(), f(J, { key: 1 }, [
788
- y("span", Un, b(m.label), 1),
789
- m.toTree || m.fromTree ? (i(), f("div", Mn, [
790
- m.fromTree ? (i(), f("div", On, [
791
- (i(!0), f(J, null, oe(m.fromTree, (x, T) => (i(), f("div", {
792
- key: T,
793
- class: ae(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-red-700"])
766
+ f.text ? (i(), m("span", Nn, b(f.text), 1)) : (i(), m(J, { key: 1 }, [
767
+ w("span", En, b(f.label), 1),
768
+ f.toTree || f.fromTree ? (i(), m("div", Tn, [
769
+ f.fromTree ? (i(), m("div", Pn, [
770
+ (i(!0), m(J, null, oe(f.fromTree, (_, P) => (i(), m("div", {
771
+ key: P,
772
+ class: ae(["flex items-baseline gap-4 px-4", _.bookkeeping ? "text-gray-400" : "text-red-700"])
794
773
  }, [
795
- (i(!0), f(J, null, oe(x.depth, (W) => (i(), f("span", {
796
- key: W,
774
+ (i(!0), m(J, null, oe(_.depth, (Y) => (i(), m("span", {
775
+ key: Y,
797
776
  class: "inline-block w-16"
798
777
  }))), 128)),
799
- x.label ? (i(), f("span", Kn, [
800
- ve(b(x.label), 1),
801
- x.text ? (i(), f(J, { key: 0 }, [
778
+ _.label ? (i(), m("span", Bn, [
779
+ ve(b(_.label), 1),
780
+ _.text ? (i(), m(J, { key: 0 }, [
802
781
  ve(":")
803
- ], 64)) : P("", !0)
804
- ])) : P("", !0),
805
- x.text ? (i(), f("span", zn, b(x.text), 1)) : P("", !0)
782
+ ], 64)) : E("", !0)
783
+ ])) : E("", !0),
784
+ _.text ? (i(), m("span", Fn, b(_.text), 1)) : E("", !0)
806
785
  ], 2))), 128))
807
- ])) : P("", !0),
808
- m.toTree ? (i(), f("div", jn, [
809
- (i(!0), f(J, null, oe(m.toTree, (x, T) => (i(), f("div", {
810
- key: T,
811
- class: ae(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-green-700"])
786
+ ])) : E("", !0),
787
+ f.toTree ? (i(), m("div", An, [
788
+ (i(!0), m(J, null, oe(f.toTree, (_, P) => (i(), m("div", {
789
+ key: P,
790
+ class: ae(["flex items-baseline gap-4 px-4", _.bookkeeping ? "text-gray-400" : "text-green-700"])
812
791
  }, [
813
- (i(!0), f(J, null, oe(x.depth, (W) => (i(), f("span", {
814
- key: W,
792
+ (i(!0), m(J, null, oe(_.depth, (Y) => (i(), m("span", {
793
+ key: Y,
815
794
  class: "inline-block w-16"
816
795
  }))), 128)),
817
- x.label ? (i(), f("span", Gn, [
818
- ve(b(x.label), 1),
819
- x.text ? (i(), f(J, { key: 0 }, [
796
+ _.label ? (i(), m("span", Mn, [
797
+ ve(b(_.label), 1),
798
+ _.text ? (i(), m(J, { key: 0 }, [
820
799
  ve(":")
821
- ], 64)) : P("", !0)
822
- ])) : P("", !0),
823
- x.text ? (i(), f("span", Hn, b(x.text), 1)) : P("", !0)
800
+ ], 64)) : E("", !0)
801
+ ])) : E("", !0),
802
+ _.text ? (i(), m("span", Un, b(_.text), 1)) : E("", !0)
824
803
  ], 2))), 128))
825
- ])) : P("", !0)
826
- ])) : m.diff ? (i(), f("div", Jn, [
827
- (i(!0), f(J, null, oe(m.diff, (x, T) => (i(), f("div", {
828
- key: T,
829
- class: ae(["whitespace-pre px-4", w(x.type)])
830
- }, b(E(x)), 3))), 128))
831
- ])) : (i(), f("span", Yn, [
832
- m.from != null ? (i(), f("span", Wn, b(m.fromDisplay ?? K(m.from)), 1)) : P("", !0),
833
- m.from != null && m.to != null ? (i(), f("span", Xn, "→")) : P("", !0),
834
- m.to != null ? (i(), f("span", qn, b(m.toDisplay ?? K(m.to)), 1)) : P("", !0)
804
+ ])) : E("", !0)
805
+ ])) : f.diff ? (i(), m("div", On, [
806
+ (i(!0), m(J, null, oe(f.diff, (_, P) => (i(), m("div", {
807
+ key: P,
808
+ class: ae(["whitespace-pre px-4", S(_.type)])
809
+ }, b(T(_)), 3))), 128))
810
+ ])) : (i(), m("span", Kn, [
811
+ f.from != null ? (i(), m("span", zn, b(f.fromDisplay ?? K(f.from)), 1)) : E("", !0),
812
+ f.from != null && f.to != null ? (i(), m("span", jn, "→")) : E("", !0),
813
+ f.to != null ? (i(), m("span", Gn, b(f.toDisplay ?? K(f.to)), 1)) : E("", !0)
835
814
  ]))
836
815
  ], 64))
837
816
  ]))), 128))
838
817
  ])
839
818
  ]))), 128)),
840
- O.value.length ? P("", !0) : (i(), f("div", Zn, b($(t)("inventory.changelog.empty")), 1)),
841
- u.value ? (i(), f("div", Qn, [
819
+ O.value.length ? E("", !0) : (i(), m("div", Hn, b(D(t)("inventory.changelog.empty")), 1)),
820
+ u.value ? (i(), m("div", Jn, [
842
821
  ve(b(s.value.id) + " ", 1),
843
- s.value.parent ? (i(), f("span", eo, "← " + b(s.value.parent), 1)) : P("", !0)
844
- ])) : P("", !0)
845
- ])) : P("", !0)
846
- ])) : (i(), f("div", hn, b($(t)("inventory.changelog.empty")), 1));
822
+ s.value.parent ? (i(), m("span", Yn, "← " + b(s.value.parent), 1)) : E("", !0)
823
+ ])) : E("", !0)
824
+ ])) : E("", !0)
825
+ ])) : (i(), m("div", fn, b(D(t)("inventory.changelog.empty")), 1));
847
826
  };
848
827
  }
849
- }), 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 = {
828
+ }), qn = { class: "flex flex-col gap-8" }, Zn = { class: "flex flex-wrap items-center gap-16" }, Qn = { class: "fm-typo-en-heading-lg-600" }, eo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, to = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, no = { class: "flex flex-wrap items-center gap-12" }, oo = { class: "flex shrink-0 items-center gap-8" }, ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, so = { class: "flex flex-wrap items-center gap-12" }, lo = {
850
829
  key: 0,
851
830
  class: "fm-typo-en-body-md-600"
852
- }, po = { class: "fm-typo-en-heading-md-600" }, vo = {
831
+ }, ro = { class: "fm-typo-en-heading-md-600" }, io = {
853
832
  key: 0,
854
833
  class: "flex justify-center py-8"
855
- }, Ce = "inventory.changelog.label.", go = /* @__PURE__ */ ie({
834
+ }, Ce = "inventory.changelog.label.", uo = /* @__PURE__ */ ue({
856
835
  __name: "ChangelogDialog",
857
836
  props: {
858
837
  modelValue: { type: Boolean }
859
838
  },
860
839
  emits: ["update:modelValue"],
861
840
  setup(o, { emit: e }) {
862
- const t = o, l = e, s = I({
841
+ const t = o, l = e, s = V({
863
842
  get: () => t.modelValue,
864
843
  set: (n) => l("update:modelValue", n)
865
- }), { t: a } = he(), r = ge(), u = Je(), v = He(), p = _e(), { breakpoints: R } = Vt(), F = I(() => R.value.xs || R.value.sm), B = I(() => F.value ? "98vw" : "72vw"), { commits: K, isLoading: Q, hasMore: M, load: C, loadMore: G } = sn();
866
- function L() {
844
+ }), { t: a } = he(), r = ge(), u = Je(), v = He(), p = _e(), { breakpoints: L } = It(), F = V(() => L.value.xs || L.value.sm), B = V(() => F.value ? "98vw" : "72vw"), { commits: K, isLoading: Q, hasMore: U, load: $, loadMore: G } = Qt();
845
+ function C() {
867
846
  G().catch((n) => console.error("changelog load more failed", n));
868
847
  }
869
- function h(n) {
848
+ function y(n) {
870
849
  return n ? new Date(n).toLocaleString() : "—";
871
850
  }
872
- function w(n) {
873
- return [...n].sort((c, S) => (S.lastUpdate ?? "").localeCompare(c.lastUpdate ?? ""));
851
+ function S(n) {
852
+ return [...n].sort((c, k) => (k.lastUpdate ?? "").localeCompare(c.lastUpdate ?? ""));
874
853
  }
875
- function E(n, c, S) {
876
- C(n, c, S).catch((z) => console.error("changelog load failed", z));
854
+ function T(n, c, k) {
855
+ $(n, c, k).catch((z) => console.error("changelog load failed", z));
877
856
  }
878
- const O = k([]);
857
+ const O = x([]);
879
858
  async function d() {
880
859
  var c;
881
860
  const n = (c = r.currentBusiness.value) == null ? void 0 : c._id;
882
861
  if (n)
883
862
  try {
884
863
  O.value = await p.listDomains(n);
885
- } catch (S) {
886
- console.error("changelog domain list load failed", S), O.value = [];
864
+ } catch (k) {
865
+ console.error("changelog domain list load failed", k), O.value = [];
887
866
  }
888
867
  }
889
- const _ = I(() => [
868
+ const h = V(() => [
890
869
  { label: a("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
891
870
  { label: a("inventory.changelog.label.closingDraft"), value: "closingDraft" },
892
871
  { label: a("inventory.changelog.domainInventory"), value: "inventory" },
893
872
  ...O.value.map((n) => ({ label: a(n.labelKey), value: n.domain }))
894
- ]), U = k(_.value[0]), A = I(() => {
873
+ ]), M = x(h.value[0]), A = V(() => {
895
874
  var n;
896
- return ((n = U.value) == null ? void 0 : n.value) ?? "purchaseOrder";
897
- }), X = I(
875
+ return ((n = M.value) == null ? void 0 : n.value) ?? "purchaseOrder";
876
+ }), X = V(
898
877
  () => O.value.some((n) => n.domain === A.value)
899
- ), H = k(!1), D = I(
878
+ ), H = x(!1), R = V(
900
879
  () => ["sku", "recipe", "unit"].map((n) => ({
901
880
  label: a(Ce + n),
902
881
  value: n
903
882
  }))
904
- ), g = k(D.value[0]), m = I(() => {
883
+ ), g = x(R.value[0]), f = V(() => {
905
884
  var n;
906
885
  return ((n = g.value) == null ? void 0 : n.value) ?? "sku";
907
- }), N = k(""), x = k(null), T = k(!1), W = I(() => {
908
- var S;
909
- const n = (S = r.currentBusiness.value) == null ? void 0 : S._id, c = u.inventory._id;
886
+ }), N = x(""), _ = x(null), P = x(!1), Y = V(() => {
887
+ var k;
888
+ const n = (k = r.currentBusiness.value) == null ? void 0 : k._id, c = u.inventory._id;
910
889
  return n && c ? `business_${n}/${c}` : "";
911
- }), ee = I(() => {
890
+ }), ee = V(() => {
912
891
  const n = /* @__PURE__ */ new Map(), c = u.inventory;
913
- for (const S of [c.sku, c.recipe, c.unit])
914
- for (const z of S ?? [])
892
+ for (const k of [c.sku, c.recipe, c.unit])
893
+ for (const z of k ?? [])
915
894
  z._id && z.name && n.set(z._id, z.name);
916
- for (const S of c.unit ?? [])
917
- for (const z of S.measurements ?? []) {
895
+ for (const k of c.unit ?? [])
896
+ for (const z of k.measurements ?? []) {
918
897
  if (!z.id) continue;
919
898
  const q = z.abbrev || z.name;
920
899
  if (!q) continue;
921
- const ne = Pt.toDouble(z.conversion);
922
- n.set(z.id, ne ? `${q} (1 ${q} = ${ne} ${S.abbrev})` : q);
900
+ const ne = Tt.toDouble(z.conversion);
901
+ n.set(z.id, ne ? `${q} (1 ${q} = ${ne} ${k.abbrev})` : q);
923
902
  }
924
903
  return n;
925
- }), te = (n) => ee.value.get(n), re = k([]), ue = k(!1);
926
- async function Pe() {
904
+ }), te = (n) => ee.value.get(n), re = x([]), ce = x(!1);
905
+ async function Ee() {
927
906
  var c;
928
907
  const n = (c = r.currentBusiness.value) == null ? void 0 : c._id;
929
908
  if (n) {
930
- ue.value = !0;
909
+ ce.value = !0;
931
910
  try {
932
- re.value = w(
933
- await p.listInventory(n, m.value)
911
+ re.value = S(
912
+ await p.listInventory(n, f.value)
934
913
  );
935
- } catch (S) {
936
- console.error("changelog inventory list load failed", S), re.value = [];
914
+ } catch (k) {
915
+ console.error("changelog inventory list load failed", k), re.value = [];
937
916
  } finally {
938
- ue.value = !1;
917
+ ce.value = !1;
939
918
  }
940
919
  }
941
920
  }
942
- const tt = I(
943
- () => T.value ? re.value : re.value.filter((n) => !n.deleted)
944
- ), nt = I(() => [
921
+ const tt = V(
922
+ () => P.value ? re.value : re.value.filter((n) => !n.deleted)
923
+ ), nt = V(() => [
945
924
  { accessorKey: "id", header: () => a("inventory.closing.draft.table.id"), size: 320 },
946
925
  {
947
926
  id: "name",
@@ -962,52 +941,52 @@ const yn = {
962
941
  // Raw ISO is the sort key — clicking the header on formatted dates would
963
942
  // order them lexicographically by locale string. Formatted only to display.
964
943
  accessorFn: (n) => n.lastUpdate ?? "",
965
- cell: ({ getValue: n }) => h(n() || void 0)
944
+ cell: ({ getValue: n }) => y(n() || void 0)
966
945
  }
967
- ]), { commits: ot, load: at } = rn();
946
+ ]), { commits: ot, load: at } = tn();
968
947
  function st(n) {
969
- x.value = n, H.value = !0, E(W.value, Xe, Re), n.id && at(`${W.value}/${m.value}/${n.id}`).catch(
948
+ _.value = n, H.value = !0, T(Y.value, Xe, Re), n.id && at(`${Y.value}/${f.value}/${n.id}`).catch(
970
949
  (c) => console.error("changelog per-entity load failed", c)
971
950
  );
972
951
  }
973
952
  function lt(n, c) {
974
- const S = qe(n.message);
975
- return S && S.labelKey === Ce + m.value && S.name === c.name ? !0 : (n.changes ?? []).some((z) => {
976
- const q = dn(z.path);
977
- return q.type === Ce + m.value && q.name === c.name;
953
+ const k = qe(n.message);
954
+ return k && k.labelKey === Ce + f.value && k.name === c.name ? !0 : (n.changes ?? []).some((z) => {
955
+ const q = an(z.path);
956
+ return q.type === Ce + f.value && q.name === c.name;
978
957
  });
979
958
  }
980
- const rt = I(() => {
981
- const n = x.value;
959
+ const rt = V(() => {
960
+ const n = _.value;
982
961
  if (!n) return [];
983
- const c = K.value.filter((S) => lt(S, n));
984
- return ln(c, ot.value);
985
- }), xe = k([]), be = k(!1), we = k(null);
962
+ const c = K.value.filter((k) => lt(k, n));
963
+ return en(c, ot.value);
964
+ }), be = x([]), xe = x(!1), we = x(null);
986
965
  async function it() {
987
966
  var c;
988
967
  const n = (c = r.currentBusiness.value) == null ? void 0 : c._id;
989
968
  if (n) {
990
- be.value = !0;
969
+ xe.value = !0;
991
970
  try {
992
- xe.value = w(
971
+ be.value = S(
993
972
  await p.listDomainRecords(n, A.value)
994
973
  );
995
- } catch (S) {
996
- console.error("changelog domain records load failed", S), xe.value = [];
974
+ } catch (k) {
975
+ console.error("changelog domain records load failed", k), be.value = [];
997
976
  } finally {
998
- be.value = !1;
977
+ xe.value = !1;
999
978
  }
1000
979
  }
1001
980
  }
1002
981
  function ut(n) {
1003
- var S;
1004
- const c = (S = r.currentBusiness.value) == null ? void 0 : S._id;
1005
- c && (we.value = n, H.value = !0, E(`business_${c}/${n.id}`, void 0, Le));
982
+ var k;
983
+ const c = (k = r.currentBusiness.value) == null ? void 0 : k._id;
984
+ c && (we.value = n, H.value = !0, T(`business_${c}/${n.id}`, void 0, Le));
1006
985
  }
1007
- const pe = k(It()), ye = k([]), ke = k(!1), ce = k(null), Ee = I(() => {
986
+ const pe = x(Nt()), ye = x([]), ke = x(!1), de = x(null), Te = V(() => {
1008
987
  const n = v._currentLocation;
1009
988
  return n ? `${n.name} (${n.doc.profile.code ?? "--"})` : "";
1010
- }), Te = I(() => [
989
+ }), Pe = V(() => [
1011
990
  { accessorKey: "id", header: () => a("inventory.closing.draft.table.id"), size: 320 },
1012
991
  {
1013
992
  accessorKey: "name",
@@ -1020,42 +999,42 @@ const yn = {
1020
999
  size: 200,
1021
1000
  // Raw ISO is the sort key; see the note on the inventory table.
1022
1001
  accessorFn: (n) => n.lastUpdate ?? "",
1023
- cell: ({ getValue: n }) => h(n() || void 0)
1002
+ cell: ({ getValue: n }) => y(n() || void 0)
1024
1003
  }
1025
1004
  ]);
1026
1005
  async function Be() {
1027
1006
  var z;
1028
1007
  const n = (z = v._currentLocation) == null ? void 0 : z.dbName;
1029
1008
  if (!n) return;
1030
- const c = Et(new Date(pe.value.startDate)).toISOString(), S = Tt(new Date(pe.value.endDate)).toISOString();
1009
+ const c = Pt(new Date(pe.value.startDate)).toISOString(), k = Bt(new Date(pe.value.endDate)).toISOString();
1031
1010
  ke.value = !0;
1032
1011
  try {
1033
- ye.value = w(
1034
- A.value === "purchaseOrder" ? await p.listPurchaseOrders(n, c, S) : await p.listClosingDrafts(n, c, S)
1012
+ ye.value = S(
1013
+ A.value === "purchaseOrder" ? await p.listPurchaseOrders(n, c, k) : await p.listClosingDrafts(n, c, k)
1035
1014
  );
1036
1015
  } catch (q) {
1037
1016
  console.error("changelog location list load failed", q), ye.value = [];
1038
1017
  } finally {
1039
1018
  ke.value = !1;
1040
1019
  }
1041
- ce.value && !ye.value.find((q) => {
1020
+ de.value && !ye.value.find((q) => {
1042
1021
  var ne;
1043
- return q.id === ((ne = ce.value) == null ? void 0 : ne.id);
1044
- }) && (ce.value = null, E(""));
1022
+ return q.id === ((ne = de.value) == null ? void 0 : ne.id);
1023
+ }) && (de.value = null, T(""));
1045
1024
  }
1046
1025
  function ct(n) {
1047
- ce.value = n, H.value = !0, E(`${v.currentLocationDBName}/${n.id}`, void 0, Le);
1026
+ de.value = n, H.value = !0, T(`${v.currentLocationDBName}/${n.id}`, void 0, Le);
1048
1027
  }
1049
- const dt = I(() => {
1050
- var n, c, S;
1051
- return A.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : X.value ? ((c = we.value) == null ? void 0 : c.name) ?? "" : ((S = ce.value) == null ? void 0 : S.name) ?? "";
1028
+ const dt = V(() => {
1029
+ var n, c, k;
1030
+ return A.value === "inventory" ? ((n = _.value) == null ? void 0 : n.name) ?? "" : X.value ? ((c = we.value) == null ? void 0 : c.name) ?? "" : ((k = de.value) == null ? void 0 : k.name) ?? "";
1052
1031
  });
1053
1032
  function Fe() {
1054
- H.value = !1, A.value === "inventory" ? (x.value = null, T.value = !1, E(""), Pe().catch(
1033
+ H.value = !1, A.value === "inventory" ? (_.value = null, P.value = !1, T(""), Ee().catch(
1055
1034
  (n) => console.error("changelog inventory list failed", n)
1056
- )) : X.value ? (we.value = null, E(""), it().catch(
1035
+ )) : X.value ? (we.value = null, T(""), it().catch(
1057
1036
  (n) => console.error("changelog domain records failed", n)
1058
- )) : (ce.value = null, E(""), Be().catch((n) => console.error("changelog location list failed", n)));
1037
+ )) : (de.value = null, T(""), Be().catch((n) => console.error("changelog location list failed", n)));
1059
1038
  }
1060
1039
  return Z(s, (n) => {
1061
1040
  n && (d().catch((c) => console.error("changelog domain list failed", c)), Fe());
@@ -1063,19 +1042,19 @@ const yn = {
1063
1042
  s.value && Fe();
1064
1043
  }), Z(pe, () => {
1065
1044
  s.value && A.value !== "inventory" && !X.value && Be().catch((n) => console.error("changelog location list failed", n));
1066
- }), Z(T, (n) => {
1045
+ }), Z(P, (n) => {
1067
1046
  var c;
1068
- !n && ((c = x.value) != null && c.deleted) && (x.value = null, H.value = !1);
1069
- }), Z(m, () => {
1070
- x.value = null, H.value = !1, s.value && A.value === "inventory" && Pe().catch(
1047
+ !n && ((c = _.value) != null && c.deleted) && (_.value = null, H.value = !1);
1048
+ }), Z(f, () => {
1049
+ _.value = null, H.value = !1, s.value && A.value === "inventory" && Ee().catch(
1071
1050
  (n) => console.error("changelog inventory list failed", n)
1072
1051
  );
1073
- }), Z(W, (n) => {
1074
- x.value = null, s.value && A.value === "inventory" && E(n, void 0, Re);
1052
+ }), Z(Y, (n) => {
1053
+ _.value = null, s.value && A.value === "inventory" && T(n, void 0, Re);
1075
1054
  }), (n, c) => {
1076
- const S = Y("FmButtonGroup"), z = Y("FmSearch"), q = Y("FmSwitch"), ne = Y("FmTable"), Ae = Y("FmDialog"), ft = Y("FmButton");
1077
- return i(), f(J, null, [
1078
- V(Ae, {
1055
+ const k = W("FmButtonGroup"), z = W("FmSearch"), q = W("FmSwitch"), ne = W("FmTable"), Ae = W("FmDialog"), ft = W("FmButton");
1056
+ return i(), m(J, null, [
1057
+ I(Ae, {
1079
1058
  modelValue: s.value,
1080
1059
  "onUpdate:modelValue": c[8] || (c[8] = (j) => s.value = j),
1081
1060
  "close-button": "",
@@ -1086,70 +1065,70 @@ const yn = {
1086
1065
  "content-class": "!p-0 h-[86vh]"
1087
1066
  }, {
1088
1067
  "dialog-header": le(() => [
1089
- y("div", oo, [
1090
- y("div", ao, [
1091
- y("div", so, b($(a)("inventory.changelog.title")), 1),
1092
- V(S, {
1093
- modelValue: U.value,
1094
- "onUpdate:modelValue": c[0] || (c[0] = (j) => U.value = j),
1095
- items: _.value
1068
+ w("div", qn, [
1069
+ w("div", Zn, [
1070
+ w("div", Qn, b(D(a)("inventory.changelog.title")), 1),
1071
+ I(k, {
1072
+ modelValue: M.value,
1073
+ "onUpdate:modelValue": c[0] || (c[0] = (j) => M.value = j),
1074
+ items: h.value
1096
1075
  }, null, 8, ["modelValue", "items"])
1097
1076
  ]),
1098
- y("div", lo, b($(a)("inventory.changelog.scopeDescription")), 1)
1077
+ w("div", eo, b(D(a)("inventory.changelog.scopeDescription")), 1)
1099
1078
  ])
1100
1079
  ]),
1101
1080
  default: le(() => [
1102
- y("div", ro, [
1103
- A.value === "inventory" ? (i(), f(J, { key: 0 }, [
1104
- y("div", io, [
1105
- V(S, {
1081
+ w("div", to, [
1082
+ A.value === "inventory" ? (i(), m(J, { key: 0 }, [
1083
+ w("div", no, [
1084
+ I(k, {
1106
1085
  modelValue: g.value,
1107
1086
  "onUpdate:modelValue": c[1] || (c[1] = (j) => g.value = j),
1108
- items: D.value
1087
+ items: R.value
1109
1088
  }, null, 8, ["modelValue", "items"]),
1110
- V(z, {
1089
+ I(z, {
1111
1090
  modelValue: N.value,
1112
1091
  "onUpdate:modelValue": c[2] || (c[2] = (j) => N.value = j),
1113
1092
  class: "flex-1",
1114
- placeholder: $(a)("inventory.changelog.searchInventory")
1093
+ placeholder: D(a)("inventory.changelog.searchInventory")
1115
1094
  }, null, 8, ["modelValue", "placeholder"]),
1116
- y("div", uo, [
1117
- y("span", co, b($(a)("inventory.changelog.includeDeleted")), 1),
1118
- V(q, {
1119
- modelValue: T.value,
1120
- "onUpdate:modelValue": c[3] || (c[3] = (j) => T.value = j)
1095
+ w("div", oo, [
1096
+ w("span", ao, b(D(a)("inventory.changelog.includeDeleted")), 1),
1097
+ I(q, {
1098
+ modelValue: P.value,
1099
+ "onUpdate:modelValue": c[3] || (c[3] = (j) => P.value = j)
1121
1100
  }, null, 8, ["modelValue"])
1122
1101
  ])
1123
1102
  ]),
1124
- V(ne, {
1103
+ I(ne, {
1125
1104
  class: "min-h-0 flex-1",
1126
1105
  "row-data": tt.value,
1127
1106
  "column-defs": nt.value,
1128
1107
  "search-value": N.value,
1129
- loading: ue.value,
1108
+ loading: ce.value,
1130
1109
  "page-size": 20,
1131
1110
  onRowClick: c[4] || (c[4] = (j) => st(j.original))
1132
1111
  }, null, 8, ["row-data", "column-defs", "search-value", "loading"])
1133
- ], 64)) : X.value ? (i(), me(ne, {
1112
+ ], 64)) : X.value ? (i(), ie(ne, {
1134
1113
  key: 1,
1135
1114
  class: "min-h-0 flex-1",
1136
- "row-data": xe.value,
1137
- "column-defs": Te.value,
1138
- loading: be.value,
1115
+ "row-data": be.value,
1116
+ "column-defs": Pe.value,
1117
+ loading: xe.value,
1139
1118
  "page-size": 20,
1140
1119
  onRowClick: c[5] || (c[5] = (j) => ut(j.original))
1141
- }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), f(J, { key: 2 }, [
1142
- y("div", fo, [
1143
- V(Nt, {
1120
+ }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), m(J, { key: 2 }, [
1121
+ w("div", so, [
1122
+ I(Et, {
1144
1123
  modelValue: pe.value,
1145
1124
  "onUpdate:modelValue": c[6] || (c[6] = (j) => pe.value = j)
1146
1125
  }, null, 8, ["modelValue"]),
1147
- Ee.value ? (i(), f("span", mo, b(Ee.value), 1)) : P("", !0)
1126
+ Te.value ? (i(), m("span", lo, b(Te.value), 1)) : E("", !0)
1148
1127
  ]),
1149
- V(ne, {
1128
+ I(ne, {
1150
1129
  class: "min-h-0 flex-1",
1151
1130
  "row-data": ye.value,
1152
- "column-defs": Te.value,
1131
+ "column-defs": Pe.value,
1153
1132
  loading: ke.value,
1154
1133
  "page-size": 20,
1155
1134
  onRowClick: c[7] || (c[7] = (j) => ct(j.original))
@@ -1159,7 +1138,7 @@ const yn = {
1159
1138
  ]),
1160
1139
  _: 1
1161
1140
  }, 8, ["modelValue"]),
1162
- V(Ae, {
1141
+ I(Ae, {
1163
1142
  modelValue: H.value,
1164
1143
  "onUpdate:modelValue": c[9] || (c[9] = (j) => H.value = j),
1165
1144
  "close-button": "",
@@ -1169,251 +1148,251 @@ const yn = {
1169
1148
  "max-height": "86vh"
1170
1149
  }, {
1171
1150
  "dialog-header": le(() => [
1172
- y("div", po, b(dt.value), 1)
1151
+ w("div", ro, b(dt.value), 1)
1173
1152
  ]),
1174
1153
  default: le(() => [
1175
- V(no, {
1176
- commits: A.value === "inventory" ? rt.value : $(K),
1177
- "is-loading": $(Q),
1154
+ I(Xn, {
1155
+ commits: A.value === "inventory" ? rt.value : D(K),
1156
+ "is-loading": D(Q),
1178
1157
  "resolve-name": te
1179
1158
  }, null, 8, ["commits", "is-loading"]),
1180
- A.value !== "inventory" && $(M) ? (i(), f("div", vo, [
1181
- V(ft, {
1182
- label: $(a)("inventory.changelog.loadMore"),
1159
+ A.value !== "inventory" && D(U) ? (i(), m("div", io, [
1160
+ I(ft, {
1161
+ label: D(a)("inventory.changelog.loadMore"),
1183
1162
  variant: "secondary",
1184
- disabled: $(Q),
1185
- onClick: L
1163
+ disabled: D(Q),
1164
+ onClick: C
1186
1165
  }, null, 8, ["label", "disabled"])
1187
- ])) : P("", !0)
1166
+ ])) : E("", !0)
1188
1167
  ]),
1189
1168
  _: 1
1190
1169
  }, 8, ["modelValue", "min-width", "max-width"])
1191
1170
  ], 64);
1192
1171
  };
1193
1172
  }
1194
- }), yo = /* @__PURE__ */ Bt(go, [["__scopeId", "data-v-07c5a952"]]), se = 8;
1195
- function ho(o, e) {
1173
+ }), co = /* @__PURE__ */ Ft(uo, [["__scopeId", "data-v-07c5a952"]]), se = 8;
1174
+ function fo(o, e) {
1196
1175
  return { x: se, y: Math.max(se, e - o - se) };
1197
1176
  }
1198
- const _o = ["title"], Ge = 48, xo = 8, bo = /* @__PURE__ */ ie({
1177
+ const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1199
1178
  __name: "ChangelogFloatingButton",
1200
1179
  setup(o) {
1201
- const { t: e } = he(), t = ge(), l = I(() => {
1202
- var L;
1203
- return !!((L = t.sessionUser.value) != null && L.role.isAdmin);
1204
- }), s = k(!1), a = k(null);
1180
+ const { t: e } = he(), t = ge(), l = V(() => {
1181
+ var C;
1182
+ return !!((C = t.sessionUser.value) != null && C.role.isAdmin);
1183
+ }), s = x(!1), a = x(null);
1205
1184
  function r() {
1206
- var L, h;
1185
+ var C, y;
1207
1186
  return {
1208
- width: ((L = a.value) == null ? void 0 : L.offsetWidth) ?? Ge,
1209
- height: ((h = a.value) == null ? void 0 : h.offsetHeight) ?? Ge
1187
+ width: ((C = a.value) == null ? void 0 : C.offsetWidth) ?? Ge,
1188
+ height: ((y = a.value) == null ? void 0 : y.offsetHeight) ?? Ge
1210
1189
  };
1211
1190
  }
1212
- const u = k({ x: 0, y: 0 });
1213
- function v(L, h, w) {
1214
- return Math.min(Math.max(L, h), w);
1191
+ const u = x({ x: 0, y: 0 });
1192
+ function v(C, y, S) {
1193
+ return Math.min(Math.max(C, y), S);
1215
1194
  }
1216
1195
  function p() {
1217
- const { width: L, height: h } = r(), w = Math.max(se, window.innerWidth - L - se - xo), E = Math.max(se, window.innerHeight - h - se), O = u.value.x + L / 2;
1196
+ const { width: C, height: y } = r(), S = Math.max(se, window.innerWidth - C - se - po), T = Math.max(se, window.innerHeight - y - se), O = u.value.x + C / 2;
1218
1197
  u.value = {
1219
- x: O < window.innerWidth / 2 ? se : w,
1220
- y: v(u.value.y, se, E)
1198
+ x: O < window.innerWidth / 2 ? se : S,
1199
+ y: v(u.value.y, se, T)
1221
1200
  };
1222
1201
  }
1223
- function R() {
1224
- u.value = ho(r().height, window.innerHeight);
1202
+ function L() {
1203
+ u.value = fo(r().height, window.innerHeight);
1225
1204
  }
1226
1205
  Ie(() => {
1227
- R(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
1206
+ L(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
1228
1207
  }), gt(() => {
1229
1208
  window.removeEventListener("resize", p), window.removeEventListener("orientationchange", p);
1230
- }), Z(l, async (L) => {
1231
- L && (await yt(), R());
1209
+ }), Z(l, async (C) => {
1210
+ C && (await yt(), L());
1232
1211
  });
1233
- const F = k(!1);
1212
+ const F = x(!1);
1234
1213
  let B = null, K = !1;
1235
- function Q(L) {
1236
- B = { x: L.clientX, y: L.clientY, px: u.value.x, py: u.value.y }, F.value = !0, K = !1, L.currentTarget.setPointerCapture(L.pointerId);
1214
+ function Q(C) {
1215
+ B = { x: C.clientX, y: C.clientY, px: u.value.x, py: u.value.y }, F.value = !0, K = !1, C.currentTarget.setPointerCapture(C.pointerId);
1237
1216
  }
1238
- function M(L) {
1217
+ function U(C) {
1239
1218
  if (!B) return;
1240
- const h = L.clientX - B.x, w = L.clientY - B.y;
1241
- Math.abs(h) + Math.abs(w) > 3 && (K = !0);
1242
- const { width: E, height: O } = r();
1219
+ const y = C.clientX - B.x, S = C.clientY - B.y;
1220
+ Math.abs(y) + Math.abs(S) > 3 && (K = !0);
1221
+ const { width: T, height: O } = r();
1243
1222
  u.value = {
1244
- x: v(B.px + h, 0, window.innerWidth - E),
1245
- y: v(B.py + w, 0, window.innerHeight - O)
1223
+ x: v(B.px + y, 0, window.innerWidth - T),
1224
+ y: v(B.py + S, 0, window.innerHeight - O)
1246
1225
  };
1247
1226
  }
1248
- function C() {
1227
+ function $() {
1249
1228
  B = null, F.value = !1, p();
1250
1229
  }
1251
1230
  function G() {
1252
- B && (C(), K || (s.value = !0));
1231
+ B && ($(), K || (s.value = !0));
1253
1232
  }
1254
- return (L, h) => {
1255
- const w = Y("FmIcon");
1256
- return i(), me(ht, { to: "body" }, [
1257
- l.value ? (i(), f(J, { key: 0 }, [
1258
- y("div", {
1233
+ return (C, y) => {
1234
+ const S = W("FmIcon");
1235
+ return i(), ie(ht, { to: "body" }, [
1236
+ l.value ? (i(), m(J, { key: 0 }, [
1237
+ w("div", {
1259
1238
  ref_key: "wrapperRef",
1260
1239
  ref: a,
1261
1240
  class: ae(["fixed z-50 cursor-grab touch-none", F.value ? "" : "transition-[left,top] duration-200 ease-out"]),
1262
1241
  style: _t({ left: `${u.value.x}px`, top: `${u.value.y}px` })
1263
1242
  }, [
1264
- V(We, null, {
1243
+ I(We, null, {
1265
1244
  default: le(() => [
1266
- y("button", {
1245
+ w("button", {
1267
1246
  type: "button",
1268
- title: $(e)("inventory.changelog.title"),
1247
+ title: D(e)("inventory.changelog.title"),
1269
1248
  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", F.value ? "cursor-grabbing" : "cursor-grab"]),
1270
1249
  onPointerdown: Q,
1271
- onPointermove: M,
1250
+ onPointermove: U,
1272
1251
  onPointerup: G,
1273
- onPointercancel: C
1252
+ onPointercancel: $
1274
1253
  }, [
1275
- V(w, {
1254
+ I(S, {
1276
1255
  name: "history",
1277
1256
  size: "md",
1278
1257
  outline: ""
1279
1258
  }),
1280
- y("span", null, b($(e)("inventory.changelog.fabLabel")), 1)
1281
- ], 42, _o)
1259
+ w("span", null, b(D(e)("inventory.changelog.fabLabel")), 1)
1260
+ ], 42, mo)
1282
1261
  ]),
1283
1262
  _: 1
1284
1263
  })
1285
1264
  ], 6),
1286
- V(yo, {
1265
+ I(co, {
1287
1266
  modelValue: s.value,
1288
- "onUpdate:modelValue": h[0] || (h[0] = (E) => s.value = E)
1267
+ "onUpdate:modelValue": y[0] || (y[0] = (T) => s.value = T)
1289
1268
  }, null, 8, ["modelValue"])
1290
- ], 64)) : P("", !0)
1269
+ ], 64)) : E("", !0)
1291
1270
  ]);
1292
1271
  };
1293
1272
  }
1294
- }), wo = { class: "flex items-center gap-8" }, ko = { class: "flex flex-col gap-8 text-fm-color-typo-secondary" }, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, $o = /* @__PURE__ */ ie({
1273
+ }), go = { class: "flex items-center gap-8" }, yo = { class: "flex flex-col gap-8 text-fm-color-typo-secondary" }, ho = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, _o = /* @__PURE__ */ ue({
1295
1274
  __name: "DeprecateSoonWarningDialog",
1296
- props: /* @__PURE__ */ Me({
1275
+ props: /* @__PURE__ */ Ue({
1297
1276
  featureName: {}
1298
1277
  }, {
1299
1278
  modelValue: { type: Boolean, required: !0 },
1300
1279
  modelModifiers: {}
1301
1280
  }),
1302
- emits: /* @__PURE__ */ Me(["proceed"], ["update:modelValue"]),
1281
+ emits: /* @__PURE__ */ Ue(["proceed"], ["update:modelValue"]),
1303
1282
  setup(o, { emit: e }) {
1304
- const t = xt(o, "modelValue"), l = e;
1283
+ const t = bt(o, "modelValue"), l = e;
1305
1284
  function s() {
1306
1285
  t.value = !1, l("proceed");
1307
1286
  }
1308
1287
  return (a, r) => {
1309
- const u = Y("FmSpacer"), v = Y("FmButton"), p = Y("FmDialog");
1310
- return i(), me(p, {
1288
+ const u = W("FmSpacer"), v = W("FmButton"), p = W("FmDialog");
1289
+ return i(), ie(p, {
1311
1290
  modelValue: t.value,
1312
- "onUpdate:modelValue": r[1] || (r[1] = (R) => t.value = R),
1291
+ "onUpdate:modelValue": r[1] || (r[1] = (L) => t.value = L),
1313
1292
  overlay: !0,
1314
1293
  "close-button": "",
1315
1294
  dismissAway: "",
1316
1295
  "max-width": "520px"
1317
1296
  }, {
1318
1297
  "dialog-header": le(() => [
1319
- y("div", wo, [
1320
- r[2] || (r[2] = y("span", null, "Feature removal notice", -1)),
1321
- V(Ut)
1298
+ w("div", go, [
1299
+ r[2] || (r[2] = w("span", null, "Feature removal notice", -1)),
1300
+ I(Ut)
1322
1301
  ])
1323
1302
  ]),
1324
1303
  "dialog-footer": le(() => [
1325
- V(u, { class: "sm:hidden xs:hidden" }),
1326
- V(v, {
1304
+ I(u, { class: "sm:hidden xs:hidden" }),
1305
+ I(v, {
1327
1306
  variant: "tertiary",
1328
1307
  label: "Cancel",
1329
- onClick: r[0] || (r[0] = (R) => t.value = !1)
1308
+ onClick: r[0] || (r[0] = (L) => t.value = !1)
1330
1309
  }),
1331
- V(v, {
1310
+ I(v, {
1332
1311
  label: "Continue",
1333
1312
  onClick: s
1334
1313
  })
1335
1314
  ]),
1336
1315
  default: le(() => [
1337
- y("div", ko, [
1338
- y("p", So, b(a.featureName ?? "This feature") + " will be removed in a future release. ", 1),
1339
- r[3] || (r[3] = y("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))
1316
+ w("div", yo, [
1317
+ w("p", ho, b(a.featureName ?? "This feature") + " will be removed in a future release. ", 1),
1318
+ r[3] || (r[3] = w("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))
1340
1319
  ])
1341
1320
  ]),
1342
1321
  _: 1
1343
1322
  }, 8, ["modelValue"]);
1344
1323
  };
1345
1324
  }
1346
- }), Co = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Lo = /* @__PURE__ */ ie({
1325
+ }), bo = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, xo = /* @__PURE__ */ ue({
1347
1326
  __name: "NavigationTab",
1348
1327
  setup(o) {
1349
- const e = $t(), t = Ne(), l = ge(), s = Mt(), a = Ft(), r = k(!1), u = k(null), v = k(null), p = k(!1), R = k(null), F = k(null), B = I(
1328
+ const e = Ct(), t = Ne(), l = ge(), s = Ot(), a = At(), r = x(!1), u = x(null), v = x(null), p = x(!1), L = x(null), F = x(null), B = V(
1350
1329
  () => {
1351
- var h, w;
1352
- return (w = Oe(((h = R.value) == null ? void 0 : h.featureKey) ?? "")) == null ? void 0 : w.label;
1330
+ var y, S;
1331
+ return (S = Oe(((y = L.value) == null ? void 0 : y.featureKey) ?? "")) == null ? void 0 : S.label;
1353
1332
  }
1354
1333
  ), { menuItems: K } = Ye();
1355
- Z([() => l.currentBusiness.value, () => e.name], ([h, w]) => {
1356
- (h == null ? void 0 : h.menuVersion) === "v3" && (w === fe.INGREDIENTS || w === fe.RECIPE || w === fe.UNIT) && t.push({ name: fe.STOCK });
1334
+ Z([() => l.currentBusiness.value, () => e.name], ([y, S]) => {
1335
+ (y == null ? void 0 : y.menuVersion) === "v3" && (S === me.INGREDIENTS || S === me.RECIPE || S === me.UNIT) && t.push({ name: me.STOCK });
1357
1336
  });
1358
- const Q = I({
1337
+ const Q = V({
1359
1338
  get() {
1360
1339
  if (e.name)
1361
1340
  return String(e.name);
1362
1341
  },
1363
- set(h) {
1342
+ set(y) {
1364
1343
  var d;
1365
- if (!h) return;
1366
- const w = String(h), E = Rt.find((_) => _.route === w), O = Dt(w, s.value);
1367
- if ((d = Oe((E == null ? void 0 : E.featureKey) ?? "")) != null && d.deprecateSoon) {
1368
- R.value = E ?? null, F.value = w, p.value = !0;
1344
+ if (!y) return;
1345
+ const S = String(y), T = Dt.find((h) => h.route === S), O = Vt(S, s.value);
1346
+ if ((d = Oe((T == null ? void 0 : T.featureKey) ?? "")) != null && d.deprecateSoon) {
1347
+ L.value = T ?? null, F.value = S, p.value = !0;
1369
1348
  return;
1370
1349
  }
1371
- if (E && O.disabled) {
1372
- u.value = E, v.value = O, r.value = !0;
1350
+ if (T && O.disabled) {
1351
+ u.value = T, v.value = O, r.value = !0;
1373
1352
  return;
1374
1353
  }
1375
- t.push({ name: w });
1354
+ t.push({ name: S });
1376
1355
  }
1377
1356
  });
1378
- function M() {
1357
+ function U() {
1379
1358
  F.value && (t.push({ name: F.value }), F.value = null);
1380
1359
  }
1381
- const C = I(
1360
+ const $ = V(
1382
1361
  () => {
1383
- var h;
1384
- return `NavigationTab.${(h = l.currentBusiness.value) == null ? void 0 : h._id}`;
1362
+ var y;
1363
+ return `NavigationTab.${(y = l.currentBusiness.value) == null ? void 0 : y._id}`;
1385
1364
  }
1386
- ), G = k(!1), L = I({
1365
+ ), G = x(!1), C = V({
1387
1366
  get() {
1388
1367
  return G.value;
1389
1368
  },
1390
- set(h) {
1391
- G.value = h, h || a.setItem(C.value, "true");
1369
+ set(y) {
1370
+ G.value = y, y || a.setItem($.value, "true");
1392
1371
  }
1393
1372
  });
1394
- return Z([() => C.value], () => {
1373
+ return Z([() => $.value], () => {
1395
1374
  G.value = !1, setTimeout(() => {
1396
- L.value = !a.getItem(C.value);
1375
+ C.value = !a.getItem($.value);
1397
1376
  }, 2e3);
1398
- }), (h, w) => {
1399
- const E = Y("FmCollapsibleTabs");
1400
- return i(), f("div", Co, [
1401
- V(E, {
1377
+ }), (y, S) => {
1378
+ const T = W("FmCollapsibleTabs");
1379
+ return i(), m("div", bo, [
1380
+ I(T, {
1402
1381
  modelValue: Q.value,
1403
- "onUpdate:modelValue": w[0] || (w[0] = (O) => Q.value = O),
1404
- items: $(K)
1382
+ "onUpdate:modelValue": S[0] || (S[0] = (O) => Q.value = O),
1383
+ items: D(K)
1405
1384
  }, null, 8, ["modelValue", "items"]),
1406
- V(At, {
1385
+ I(Mt, {
1407
1386
  modelValue: r.value,
1408
- "onUpdate:modelValue": w[1] || (w[1] = (O) => r.value = O),
1387
+ "onUpdate:modelValue": S[1] || (S[1] = (O) => r.value = O),
1409
1388
  capability: u.value,
1410
1389
  result: v.value
1411
1390
  }, null, 8, ["modelValue", "capability", "result"]),
1412
- V($o, {
1391
+ I(_o, {
1413
1392
  modelValue: p.value,
1414
- "onUpdate:modelValue": w[2] || (w[2] = (O) => p.value = O),
1393
+ "onUpdate:modelValue": S[2] || (S[2] = (O) => p.value = O),
1415
1394
  "feature-name": B.value,
1416
- onProceed: M
1395
+ onProceed: U
1417
1396
  }, null, 8, ["modelValue", "feature-name"])
1418
1397
  ]);
1419
1398
  };
@@ -1428,19 +1407,19 @@ typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
1428
1407
  typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(o) {
1429
1408
  return await new Promise((e) => setTimeout(e, o)), Promise.resolve(this);
1430
1409
  });
1431
- const Ro = {
1410
+ const wo = {
1432
1411
  key: 0,
1433
1412
  class: "flex h-5 items-center justify-center bg-amber-100 px-12 text-xs font-medium text-amber-800 shadow-sm"
1434
- }, Yo = /* @__PURE__ */ ie({
1413
+ }, zo = /* @__PURE__ */ ue({
1435
1414
  __name: "App",
1436
1415
  setup(o) {
1437
- const e = ge(), t = Ot(), l = St(), s = window.location.href.includes("print-preview");
1416
+ const e = ge(), t = Kt(), l = $t(), s = window.location.href.includes("print-preview");
1438
1417
  Ie(() => {
1439
1418
  if (window.location.href.includes("print-preview")) {
1440
1419
  e.setEmbedded(!0), document.body.classList.add("print-mode");
1441
1420
  return;
1442
1421
  }
1443
- e.registerSidebarComponent(Lo), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1422
+ e.registerSidebarComponent(xo), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1444
1423
  console.error("Google map cannot be loaded");
1445
1424
  });
1446
1425
  }), Z([() => e.currentCountry.value], () => {
@@ -1454,13 +1433,13 @@ const Ro = {
1454
1433
  console.error("error when trying to reset businesses:", u);
1455
1434
  }
1456
1435
  }
1457
- return (r, u) => (i(), f(J, null, [
1458
- $(l).isDev && !$(s) ? (i(), f("div", Ro, " Non-production environment ")) : P("", !0),
1459
- V(on),
1460
- $(s) ? P("", !0) : (i(), me(bo, { key: 1 }))
1436
+ return (r, u) => (i(), m(J, null, [
1437
+ D(l).isDev && !D(s) ? (i(), m("div", wo, " Non-production environment ")) : E("", !0),
1438
+ I(qt),
1439
+ D(s) ? E("", !0) : (i(), ie(vo, { key: 1 }))
1461
1440
  ], 64));
1462
1441
  }
1463
1442
  });
1464
1443
  export {
1465
- Yo as default
1444
+ zo as default
1466
1445
  };