@feedmepos/mf-inventory-portal 1.8.2 → 1.8.4

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 (107) hide show
  1. package/dist/{App-inZSGILI.js → App-D3M5J845.js} +500 -499
  2. package/dist/{ApprovalView-STzBhbF7.js → ApprovalView-f1BK8mpC.js} +9 -9
  3. package/dist/{BindingsDialog-DNGhoaax.js → BindingsDialog-BjtsiCpT.js} +2 -2
  4. package/dist/{BindingsPicker-B2JyJsYZ.js → BindingsPicker-B_KzuI5J.js} +2 -2
  5. package/dist/{BindingsTable-DC5b1Psj.js → BindingsTable-CJxrpwtE.js} +4 -4
  6. package/dist/{BulkReceiveRequestPage-DOCAhkVS.js → BulkReceiveRequestPage-BfP0QjXJ.js} +21 -21
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BdtFSZnX.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D3Fn65ik.js} +1 -1
  8. package/dist/{ClosingDraftView-Cm_slHt4.js → ClosingDraftView-CQ8mv1h0.js} +19 -19
  9. package/dist/{ClosingHistoryView-1EWta4_9.js → ClosingHistoryView-Cmk_O4OM.js} +7 -7
  10. package/dist/{ClosingTemplateView-B0ccD7-j.js → ClosingTemplateView-rRr7vaZP.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CNVhKNUd.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-B2OZUWOp.js} +1 -1
  12. package/dist/{DefaultView-DWeyIHi_.js → DefaultView-BJT1dsVn.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-DNIvtuZt.js → DeliveryOrderPrintPreview-BlnEGw2s.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-CAEf3irc.js → EmailDialog.vue_vue_type_script_setup_true_lang-CnE74SRb.js} +6008 -6008
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C-hjrYMV.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BQT2DRDZ.js} +1 -1
  16. package/dist/{FeatureCapabilityGate-ByVkWoR_.js → FeatureCapabilityGate-CLeBUPqJ.js} +2 -2
  17. package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-B1_zFifk.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-BnvtvPyE.js} +1 -1
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BgWSlJwh.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B3eFlWTV.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-y_iF_8AX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DTm9kWpO.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D53aH0aj.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CPZ7Z248.js} +28 -24
  21. package/dist/{FmMultiselectDialog-C4Gj_aUx.js → FmMultiselectDialog-C37sP7aE.js} +2 -2
  22. package/dist/{FmMultiselectDialog-CHS9T1rW.js → FmMultiselectDialog-Yc7ZTx9Z.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CD-IC4OA.js → FmUnitInput.vue_vue_type_script_setup_true_lang-RmUksUgh.js} +5 -5
  24. package/dist/{ImportView-79uwjQ_T.js → ImportView-DDu0ag6F.js} +7 -7
  25. package/dist/{IngredientsView-BEJii1uc.js → IngredientsView-DArSp8dy.js} +15 -15
  26. package/dist/{IntegrationExplorerView-D36uuSha.js → IntegrationExplorerView-DdMBfH_l.js} +6 -6
  27. package/dist/{IntegrationPlatformView-Cjy6bRju.js → IntegrationPlatformView-C9vcRSDu.js} +2 -2
  28. package/dist/{IntegrationView-CxxkO5kF.js → IntegrationView-DFttYsUc.js} +15 -15
  29. package/dist/{InventoryBindingForm-BUOyy4PC.js → InventoryBindingForm-CJ9U4imu.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D54A7vK_.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Bbnlturc.js} +4 -4
  31. package/dist/{InventoryBindingSummary-B60fYDV4.js → InventoryBindingSummary-CdwGTwzO.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DFCPnsum.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CxZ4mv8O.js} +2 -2
  33. package/dist/{ProductionRunDetailPage-DoJlY1Ea.js → ProductionRunDetailPage-N_EVrGwH.js} +4 -4
  34. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-Cb7_AAJt.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DeqmU9US.js} +8 -8
  35. package/dist/{ProductionRunPage-D3imvpXH.js → ProductionRunPage-nyZZBkx9.js} +4 -4
  36. package/dist/PublishView-BsBlV0j0.js +282 -0
  37. package/dist/{PurchaseOrderPrintPreview-C2iDY7vR.js → PurchaseOrderPrintPreview-De9eWd1h.js} +2 -2
  38. package/dist/{ReceiveRequestView-DFIvBDab.js → ReceiveRequestView-CYT6KbOW.js} +13 -13
  39. package/dist/{RecipeView-tmBGDvX5.js → RecipeView-BVKdwnM_.js} +16 -16
  40. package/dist/{SettingsView-BxHLMLKl.js → SettingsView-6M7pbJc6.js} +7 -7
  41. package/dist/{StockView-CArMPI1D.js → StockView-YCu3uOOW.js} +21 -21
  42. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9sfEoNM.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DiRMH87t.js} +1 -1
  43. package/dist/{SupplierView-Blr_X4i4.js → SupplierView-_UIsXD47.js} +13 -13
  44. package/dist/{SurchargeView-q1yhY1oY.js → SurchargeView-DnAiHhHU.js} +7 -7
  45. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-BTo5_xn3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-UwCJBrQq.js} +2 -2
  46. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CRlUiePl.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BTNoBbtC.js} +1 -1
  47. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BD9f6DVL.js +4970 -0
  48. package/dist/{TransferTemplateView-mYeXG-bN.js → TransferTemplateView-d9y3CmK-.js} +19 -19
  49. package/dist/{UnitCostHistoryView-BdokT9j3.js → UnitCostHistoryView-BAIpfIuw.js} +4 -4
  50. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-Dk_V6cfz.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CWCEKyKA.js} +4 -4
  51. package/dist/{UnitView-Dn7y7c8y.js → UnitView-CWgQicXl.js} +7 -7
  52. package/dist/{WarehouseView-DkD0AMFa.js → WarehouseView-BsdG-jOn.js} +8 -8
  53. package/dist/{WastageTemplateView-CgLTuqSn.js → WastageTemplateView-BVhlP3DF.js} +15 -15
  54. package/dist/api/inventory.d.ts +22 -91
  55. package/dist/{app-DEDl7U52.js → app-Cr4FH31I.js} +3061 -3107
  56. package/dist/app.js +1 -1
  57. package/dist/{bulk-edit-simulation.helper-4SDsJjn-.js → bulk-edit-simulation.helper-CeuYrSMh.js} +2 -2
  58. package/dist/{closing-template-Bjup5FCS.js → closing-template-B9YjdhAy.js} +1 -1
  59. package/dist/components/FmInventoryTableToolbar.vue.d.ts +7 -0
  60. package/dist/{date2-Dk20uwtf.js → date2-CZc69BPC.js} +1 -1
  61. package/dist/{dayjs.min-oX50J0DH.js → dayjs.min-D_sstd4K.js} +1 -1
  62. package/dist/{decimal-v-odzABK.js → decimal-B73MjfBV.js} +2 -2
  63. package/dist/{defineDeepModel-IyD7GQIK.js → defineDeepModel-Cr9Mxz3r.js} +1 -1
  64. package/dist/{duplicate-template-BM_cVVXW.js → duplicate-template-BKLjvmaG.js} +1 -1
  65. package/dist/{feature-CueVnu9M.js → feature-CHV9ib4X.js} +2 -2
  66. package/dist/feature-flags/plan-tier.d.ts +0 -2
  67. package/dist/{format-time-from-id-CqV2fWas.js → format-time-from-id-C32aqqOJ.js} +1 -1
  68. package/dist/{format-unit-display-BRjd-dPg.js → format-unit-display-BgX8_jlj.js} +12 -12
  69. package/dist/{id-to-date-BhL3iWOY.js → id-to-date-CuavaAWQ.js} +1 -1
  70. package/dist/{import-export.helper-B45dByWv.js → import-export.helper-Ba2ZYDaH.js} +5 -5
  71. package/dist/{index-BeRwX80L.js → index-CAdYKEjA.js} +3 -3
  72. package/dist/{index-DU7zB5F4.js → index-D--FMOWQ.js} +1 -1
  73. package/dist/{index-BMrFNZzX.js → index-v6FKDpSE.js} +1 -1
  74. package/dist/{lz-string-8ndgpMge.js → lz-string-CExC3CZT.js} +1 -1
  75. package/dist/{netsuite-C9IQHbuv.js → netsuite-CbopA1V4.js} +2 -2
  76. package/dist/{netsuite-explorer-Dyvhkn4W.js → netsuite-explorer-DdtTx8AU.js} +1 -1
  77. package/dist/{predefined-templates-BpA67UsF.js → predefined-templates-PRFjqFoC.js} +1 -1
  78. package/dist/publish-versions-C-jpOfWT.js +87 -0
  79. package/dist/{purchase-order-template-Cz_vJs6G.js → purchase-order-template-zWo_CaUn.js} +1 -1
  80. package/dist/{recalculationUtils-BlBf-Zzl.js → recalculationUtils-CkuZGzDC.js} +1 -1
  81. package/dist/{row-action.enum-B4hLVB0n.js → row-action.enum-CzufCsIq.js} +1 -1
  82. package/dist/{rules-D1yABcU-.js → rules-BhBZpeQP.js} +3 -3
  83. package/dist/{stock-BZYEx2W6.js → stock-CW2zgozi.js} +2 -2
  84. package/dist/{stock-BYQeM6PC.js → stock-kaZI0jf0.js} +1 -1
  85. package/dist/stores/location.d.ts +0 -289
  86. package/dist/stores/publish-versions.d.ts +19 -0
  87. package/dist/stores/publish-versions.spec.d.ts +1 -0
  88. package/dist/{supplier-Bf-GKwqQ.js → supplier-DYsrLNHc.js} +2 -2
  89. package/dist/{surcharge-CgOySVXw.js → surcharge-BRzLOLyb.js} +1 -1
  90. package/dist/tsconfig.app.tsbuildinfo +1 -1
  91. package/dist/{uom-rules-MY96On4N.js → uom-rules-DOz-xiFN.js} +1 -1
  92. package/dist/{use-ingredient-select-dialog-C-6U8HZg.js → use-ingredient-select-dialog-DNUd9OGH.js} +2 -2
  93. package/dist/{use-inventory-binding-dialog-n47g88p1.js → use-inventory-binding-dialog-DK2M2jDk.js} +2 -2
  94. package/dist/{use-template-enabled-locations-BH4BNVrW.js → use-template-enabled-locations-9Fo5BhRb.js} +2 -2
  95. package/dist/{use-transfer-locations-BmSGdFzy.js → use-transfer-locations-7M4exW0U.js} +2 -2
  96. package/dist/{useHrmPermission-CUvMFQJw.js → useHrmPermission-Dqa4xP7d.js} +1 -1
  97. package/dist/{useNavigationMenu-n5qDCC-B.js → useNavigationMenu-DI-G8F0Q.js} +85 -65
  98. package/dist/{useSseClient-C7m0H8uC.js → useSseClient-D6dKoOA9.js} +1 -1
  99. package/dist/views/publish/PublishView.spec.d.ts +1 -0
  100. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-total-cost.d.ts +24 -0
  101. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-total-cost.spec.d.ts +1 -0
  102. package/dist/{vue-CZOq57to.js → vue-bLpl291d.js} +2 -2
  103. package/dist/{vue-i18n-CaPghuy6.js → vue-i18n-CU2O2Cv9.js} +168 -168
  104. package/dist/{xlsx.util-BZ5NcssA.js → xlsx.util-CWQ2jI6U.js} +2 -2
  105. package/package.json +3 -3
  106. package/dist/PublishView-D5K3D8An.js +0 -213
  107. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D8F68NOi.js +0 -4953
@@ -1,31 +1,32 @@
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";
1
+ import { ref as k, onUnmounted as mt, computed as V, defineComponent as ue, watch as q, onMounted as Ie, resolveComponent as Y, createElementBlock as m, openBlock as i, createBlock as ie, createCommentVNode as E, unref as R, createVNode as I, createElementVNode as S, toDisplayString as w, Fragment as H, 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
2
  import { _ as xt } from "./empty-placeholder-B0QU467o.js";
3
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-DEDl7U52.js";
4
+ import { u as He, a as Je, R as me, d as kt, S as St, b as $t } from "./app-Cr4FH31I.js";
5
5
  import { useCoreStore as ge, useI18n as he } from "@feedmepos/mf-common";
6
6
  import { useRouter as Ne, useRoute as Ct } from "vue-router";
7
- import { u as Lt } from "./feature-CueVnu9M.js";
8
- import { u as Rt } from "./netsuite-C9IQHbuv.js";
9
- import { u as Ye, n as Dt, e as Vt } from "./useNavigationMenu-n5qDCC-B.js";
10
- import { useBreakpoints as It } from "@feedmepos/ui-library";
7
+ import { u as Lt } from "./feature-CHV9ib4X.js";
8
+ import { u as Rt } from "./netsuite-CbopA1V4.js";
9
+ import { u as Dt } from "./publish-versions-C-jpOfWT.js";
10
+ import { u as Ye, n as Vt, e as It } from "./useNavigationMenu-DI-G8F0Q.js";
11
+ import { useBreakpoints as Nt } from "@feedmepos/ui-library";
11
12
  import { F as We } from "./FmAdminBadge-DlplQOHb.js";
12
- import { i as Nt, _ as Et } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BgWSlJwh.js";
13
- import { F as Tt } from "./decimal-v-odzABK.js";
14
- import { t as Pt, a as Bt } from "./date2-Dk20uwtf.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-C-hjrYMV.js";
19
- import { u as Ot, g as Oe } from "./vue-CZOq57to.js";
20
- import { u as Kt } from "./googlemap-D9vA7GsS.js";
21
- function zt() {
13
+ import { i as Et, _ as Tt } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B3eFlWTV.js";
14
+ import { F as Pt } from "./decimal-B73MjfBV.js";
15
+ import { t as Bt, a as Ft } from "./date2-CZc69BPC.js";
16
+ import { _ as At } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
+ import { u as Mt } from "./useTabStorage-BkIVScW_.js";
18
+ import { _ as Ut } from "./PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js";
19
+ import { D as Ot } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BQT2DRDZ.js";
20
+ import { u as Kt, g as Oe } from "./vue-bLpl291d.js";
21
+ import { u as zt } from "./googlemap-D9vA7GsS.js";
22
+ function jt() {
22
23
  return {
23
24
  loadingHookInstalled: !1,
24
25
  isLoading: !1
25
26
  };
26
27
  }
27
- const fe = x(zt());
28
- function jt() {
28
+ const fe = k(jt());
29
+ function Gt() {
29
30
  const o = Ne();
30
31
  if (!fe.value.loadingHookInstalled) {
31
32
  fe.value.loadingHookInstalled = !0;
@@ -44,72 +45,72 @@ function jt() {
44
45
  }
45
46
  };
46
47
  }
47
- function Gt() {
48
+ function Ht() {
48
49
  const { firstAccessibleRouteName: o } = Ye();
49
50
  return { hasAnyAccessibleInventoryRoute: V(() => o.value !== null) };
50
51
  }
51
- const Ht = {
52
+ const Jt = {
52
53
  key: 0,
53
54
  class: "flex flex-col items-center w-full h-full gap-24"
54
- }, Jt = {
55
+ }, Yt = {
55
56
  key: 1,
56
57
  class: "flex flex-col pt-[200px] gap-32 items-center"
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({
58
+ }, Wt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Xt = { class: "fm-typo-en-title-lg-600" }, qt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Zt = /* @__PURE__ */ ue({
58
59
  __name: "InventoryView",
59
60
  setup(o) {
60
- const e = He(), t = Je(), l = Rt(), s = ge(), a = Ne(), r = jt(), u = Lt(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: p } = Gt();
61
- Z(
62
- [() => s.sessionUser.value, () => s.currentBusiness.value],
63
- ([U, $]) => {
64
- L(U, $);
61
+ const e = He(), t = Je(), s = Rt(), l = Dt(), a = ge(), r = Ne(), u = Gt(), v = Lt(), { t: p } = he(), { hasAnyAccessibleInventoryRoute: L } = Ht();
62
+ q(
63
+ [() => a.sessionUser.value, () => a.currentBusiness.value],
64
+ ([D, B]) => {
65
+ F(D, B);
65
66
  }
66
67
  ), Ie(async () => {
67
- await u.init(), await s.readBusinesses();
68
- const U = s.sessionUser.value, $ = s.currentBusiness.value;
69
- L(U, $);
68
+ await v.init(), await a.readBusinesses();
69
+ const D = a.sessionUser.value, B = a.currentBusiness.value;
70
+ F(D, B);
70
71
  });
71
- function L(U, $) {
72
- !U || !$ || F();
72
+ function F(D, B) {
73
+ !D || !B || A();
73
74
  }
74
- async function F() {
75
- return await e.init(), await l.readSetting().catch((U) => {
76
- console.error("[all] error on reading netsuite store", U);
75
+ async function A() {
76
+ return await e.init(), l.loadAll().catch(console.error), await s.readSetting().catch((D) => {
77
+ console.error("[all] error on reading netsuite store", D);
77
78
  }), await t.init();
78
79
  }
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;
80
+ const K = V(() => r.currentRoute.value.name === me.TRANSFER_TEMPLATE ? v.enablePoTemplate : !0), Z = V(
81
+ () => r.currentRoute.value.matched.some((D) => {
82
+ var y;
83
+ const B = D.meta, b = B == null ? void 0 : B.validationManifest;
84
+ return (((y = b == null ? void 0 : b.requiredCaslPermissions) == null ? void 0 : y.length) ?? 0) > 0;
84
85
  })
85
- ), Q = V(() => {
86
- if (!s.sessionUser.value) return !1;
86
+ ), te = V(() => {
87
+ if (!a.sessionUser.value) return !1;
87
88
  if (e._locations !== null && e.locations.length === 0) return !0;
88
- if (!u.isLoaded) return !1;
89
- const G = a.currentRoute.value.name === me.LOADING;
90
- return !p.value && (G || K.value);
89
+ if (!v.isLoaded) return !1;
90
+ const b = r.currentRoute.value.name === me.LOADING;
91
+ return !L.value && (b || Z.value);
91
92
  });
92
- return (U, $) => {
93
- const G = W("FmSpacer"), C = W("FmCircularProgress"), y = W("RouterView");
93
+ return (D, B) => {
94
+ const b = Y("FmSpacer"), y = Y("FmCircularProgress"), x = Y("RouterView");
94
95
  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" })
96
+ R(u).isLoading ? (i(), m("div", Jt, [
97
+ I(b),
98
+ S("div", null, [
99
+ I(y, { size: "xl" })
99
100
  ]),
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", {
101
+ B[0] || (B[0] = S("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
102
+ I(b)
103
+ ])) : te.value ? (i(), m("div", Yt, [
104
+ B[1] || (B[1] = S("img", {
104
105
  src: xt,
105
106
  alt: "No permission",
106
107
  class: "w-[200px] h-[200px]"
107
108
  }, null, -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)
109
+ S("div", Wt, [
110
+ S("div", Xt, w(R(p)("inventory.common.noPermission.title")), 1),
111
+ S("div", qt, w(R(p)("inventory.common.noPermission.description")), 1)
111
112
  ])
112
- ])) : B.value ? D(s).sessionUser.value ? (i(), ie(y, { key: 3 })) : E("", !0) : (i(), ie(wt, { key: 2 }))
113
+ ])) : K.value ? R(a).sessionUser.value ? (i(), ie(x, { key: 3 })) : E("", !0) : (i(), ie(wt, { key: 2 }))
113
114
  ]);
114
115
  };
115
116
  }
@@ -186,7 +187,7 @@ const Ht = {
186
187
  "contains.alternatives": "_id"
187
188
  }
188
189
  };
189
- function Zt(o) {
190
+ function Qt(o) {
190
191
  return o instanceof St && o.errorResponse.statusCode === 409;
191
192
  }
192
193
  const _e = kt((o, e) => ({
@@ -195,11 +196,11 @@ const _e = kt((o, e) => ({
195
196
  * The dbName scopes the (access-checked) backend route; only the bare id is
196
197
  * sent — the backend rebuilds the docId server-side.
197
198
  */
198
- async getRecordChangelog(t, l, s, a) {
199
+ async getRecordChangelog(t, s, l, a) {
199
200
  const r = t.indexOf("/");
200
201
  if (r < 0) return [];
201
202
  const u = t.slice(0, r), v = t.slice(r + 1), p = new URLSearchParams({ id: v });
202
- l != null && p.set("limit", String(l)), a && p.set("before", a), s && (p.set("explain", "1"), p.set("schema", JSON.stringify(s)));
203
+ s != null && p.set("limit", String(s)), a && p.set("before", a), l && (p.set("explain", "1"), p.set("schema", JSON.stringify(l)));
203
204
  const L = `${o.inventoryBackendUrl}/${u}/changelog?${p.toString()}`;
204
205
  return await e.get(L);
205
206
  },
@@ -208,9 +209,9 @@ const _e = kt((o, e) => ({
208
209
  * backend joins the orders to their newest commit, so no ids travel and the
209
210
  * browser makes one request instead of list-then-ask-for-timestamps.
210
211
  */
211
- async listPurchaseOrders(t, l, s) {
212
+ async listPurchaseOrders(t, s, l) {
212
213
  if (!t) return [];
213
- const a = new URLSearchParams({ start: l, end: s }), r = `${o.inventoryBackendUrl}/${t}/changelog/purchase-order?${a}`;
214
+ const a = new URLSearchParams({ start: s, end: l }), r = `${o.inventoryBackendUrl}/${t}/changelog/purchase-order?${a}`;
214
215
  return await e.get(r);
215
216
  },
216
217
  /**
@@ -218,9 +219,9 @@ const _e = kt((o, e) => ({
218
219
  * Closing groups come back as rows of their own — their submit/approve/
219
220
  * reject is recorded against the group document, not its parent.
220
221
  */
221
- async listClosingDrafts(t, l, s) {
222
+ async listClosingDrafts(t, s, l) {
222
223
  if (!t) return [];
223
- const a = new URLSearchParams({ start: l, end: s }), r = `${o.inventoryBackendUrl}/${t}/changelog/closing-draft?${a}`;
224
+ const a = new URLSearchParams({ start: s, end: l }), r = `${o.inventoryBackendUrl}/${t}/changelog/closing-draft?${a}`;
224
225
  return await e.get(r);
225
226
  },
226
227
  /**
@@ -229,9 +230,9 @@ const _e = kt((o, e) => ({
229
230
  * 409 (see isStateConflict) when the record's history predates the kit
230
231
  * write path — the backend passthrough for kit httpapi's GET /api/state.
231
232
  */
232
- async getState(t, l, s) {
233
- const a = new URLSearchParams({ id: l });
234
- s && a.set("at", s);
233
+ async getState(t, s, l) {
234
+ const a = new URLSearchParams({ id: s });
235
+ l && a.set("at", l);
235
236
  const r = `${o.inventoryBackendUrl}/${t}/changelog/state?${a.toString()}`;
236
237
  return await e.get(r);
237
238
  },
@@ -243,87 +244,87 @@ const _e = kt((o, e) => ({
243
244
  */
244
245
  async listDomains(t) {
245
246
  if (!t) return [];
246
- const l = `${o.inventoryBackendUrl}/business_${t}/changelog/domains`;
247
- return await e.get(l);
247
+ const s = `${o.inventoryBackendUrl}/business_${t}/changelog/domains`;
248
+ return await e.get(s);
248
249
  },
249
250
  /**
250
251
  * One generic domain's records, each with when it last changed. Business-
251
252
  * scoped: the generic domains are configuration documents of the business
252
253
  * db, not of a location.
253
254
  */
254
- async listDomainRecords(t, l) {
255
+ async listDomainRecords(t, s) {
255
256
  if (!t) return [];
256
- const s = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(l)}`;
257
- return await e.get(s);
257
+ const l = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(s)}`;
258
+ return await e.get(l);
258
259
  },
259
260
  /**
260
261
  * One inventory module's records, each with when it last changed. Business-
261
262
  * scoped, so the db is `business_<id>` — the same prefixed name the record's
262
263
  * own changelog docId carries.
263
264
  */
264
- async listInventory(t, l) {
265
+ async listInventory(t, s) {
265
266
  if (!t) return [];
266
- const s = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${l}`;
267
- return await e.get(s);
267
+ const l = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${s}`;
268
+ return await e.get(l);
268
269
  }
269
270
  })), Se = 50;
270
- function Qt() {
271
- const o = _e(), e = x([]), t = x(!1), l = x(!1);
272
- let s = null, a = 0;
271
+ function en() {
272
+ const o = _e(), e = k([]), t = k(!1), s = k(!1);
273
+ let l = null, a = 0;
273
274
  async function r(v, p, L) {
274
275
  const F = ++a;
275
- if (s = null, l.value = !1, !v) {
276
+ if (l = null, s.value = !1, !v) {
276
277
  e.value = [];
277
278
  return;
278
279
  }
279
280
  t.value = !0;
280
281
  try {
281
- const B = p ?? Se, K = await o.getRecordChangelog(v, B, L);
282
+ const A = p ?? Se, K = await o.getRecordChangelog(v, A, L);
282
283
  if (F !== a) return;
283
- e.value = K, p == null && (s = { recordId: v, explain: L }, l.value = K.length === B);
284
- } catch (B) {
285
- throw F === a && (e.value = []), B;
284
+ e.value = K, p == null && (l = { recordId: v, explain: L }, s.value = K.length === A);
285
+ } catch (A) {
286
+ throw F === a && (e.value = []), A;
286
287
  } finally {
287
288
  F === a && (t.value = !1);
288
289
  }
289
290
  }
290
291
  async function u() {
291
292
  const v = e.value[e.value.length - 1];
292
- if (!s || !v || t.value || !l.value) return;
293
+ if (!l || !v || t.value || !s.value) return;
293
294
  const p = a;
294
295
  t.value = !0;
295
296
  try {
296
- const L = await o.getRecordChangelog(s.recordId, Se, s.explain, v.id);
297
+ const L = await o.getRecordChangelog(l.recordId, Se, l.explain, v.id);
297
298
  if (p !== a) return;
298
- e.value = [...e.value, ...L], l.value = L.length === Se;
299
+ e.value = [...e.value, ...L], s.value = L.length === Se;
299
300
  } finally {
300
301
  p === a && (t.value = !1);
301
302
  }
302
303
  }
303
- return { commits: e, isLoading: t, hasMore: l, load: r, loadMore: u };
304
+ return { commits: e, isLoading: t, hasMore: s, load: r, loadMore: u };
304
305
  }
305
306
  const Xe = 1e3;
306
307
  function Ke(o) {
307
308
  const e = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(?:\.(\d+))?/.exec(o);
308
309
  return e ? `${e[1]}.${(e[2] ?? "").padEnd(9, "0").slice(0, 9)}` : o;
309
310
  }
310
- function en(o, e) {
311
+ function tn(o, e) {
311
312
  return [...o, ...e].sort(
312
- (t, l) => Ke(l.at).localeCompare(Ke(t.at)) || l.id.localeCompare(t.id)
313
+ (t, s) => Ke(s.at).localeCompare(Ke(t.at)) || s.id.localeCompare(t.id)
313
314
  );
314
315
  }
315
- function tn() {
316
- const o = _e(), e = x([]);
317
- async function t(l) {
318
- if (e.value = [], !!l)
316
+ function nn() {
317
+ const o = _e(), e = k([]);
318
+ async function t(s) {
319
+ if (e.value = [], !!s)
319
320
  try {
320
321
  e.value = await o.getRecordChangelog(
321
- l,
322
+ s,
322
323
  Xe,
323
324
  Re
324
325
  );
325
- } catch (s) {
326
- console.error("changelog per-entity load failed", s);
326
+ } catch (l) {
327
+ console.error("changelog per-entity load failed", l);
327
328
  }
328
329
  }
329
330
  return { commits: e, load: t };
@@ -349,31 +350,31 @@ function De(o) {
349
350
  const e = o.indexOf(Qe);
350
351
  return e === -1 ? { raw: o, human: o } : { raw: o.slice(0, e), human: o.slice(e + 1) };
351
352
  }
352
- const nn = [
353
+ const on = [
353
354
  "inventory.changelog.label.recipe",
354
355
  "inventory.changelog.label.sku",
355
356
  "inventory.changelog.label.unit"
356
- ], on = [...nn, "Recipe", "Ingredient", "Unit"];
357
- function an(o) {
357
+ ], an = [...on, "Recipe", "Ingredient", "Unit"];
358
+ function sn(o) {
358
359
  const { human: e } = De(o);
359
360
  if (!e) return { type: "Document", name: "", field: [] };
360
361
  const t = e.split(" › ");
361
- return t.length >= 2 && on.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
362
+ return t.length >= 2 && an.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
362
363
  }
363
364
  const ze = 800;
364
365
  function et(o, e, t = 2) {
365
- const l = je(o), s = je(e);
366
- if (!l || !s) return null;
366
+ const s = je(o), l = je(e);
367
+ if (!s || !l) return null;
367
368
  let a = 0;
368
- for (; a < l.length && a < s.length && l[a] === s[a]; ) a++;
369
+ for (; a < s.length && a < l.length && s[a] === l[a]; ) a++;
369
370
  let r = 0;
370
- for (; r < l.length - a && r < s.length - a && l[l.length - 1 - r] === s[s.length - 1 - r]; )
371
+ for (; r < s.length - a && r < l.length - a && s[s.length - 1 - r] === l[l.length - 1 - r]; )
371
372
  r++;
372
- const u = l.slice(a, l.length - r), v = s.slice(a, s.length - r);
373
+ const u = s.slice(a, s.length - r), v = l.slice(a, l.length - r);
373
374
  if (u.length > ze || v.length > ze) return null;
374
375
  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)],
376
+ return rn(
377
+ [...s.slice(0, a).map(p), ...ln(u, v), ...s.slice(s.length - r).map(p)],
377
378
  t
378
379
  );
379
380
  }
@@ -386,33 +387,33 @@ function je(o) {
386
387
  return null;
387
388
  }
388
389
  }
389
- function sn(o, e) {
390
- const t = o.length, l = e.length, s = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
390
+ function ln(o, e) {
391
+ const t = o.length, s = e.length, l = Array.from({ length: t + 1 }, () => new Uint32Array(s + 1));
391
392
  for (let v = t - 1; v >= 0; v--)
392
- for (let p = l - 1; p >= 0; p--)
393
- s[v][p] = o[v] === e[p] ? s[v + 1][p + 1] + 1 : Math.max(s[v + 1][p], s[v][p + 1]);
393
+ for (let p = s - 1; p >= 0; p--)
394
+ l[v][p] = o[v] === e[p] ? l[v + 1][p + 1] + 1 : Math.max(l[v + 1][p], l[v][p + 1]);
394
395
  const a = [];
395
396
  let r = 0, u = 0;
396
- for (; r < t && u < l; )
397
- o[r] === e[u] ? (a.push({ type: "same", text: o[r] }), r++, u++) : s[r + 1][u] >= s[r][u + 1] ? (a.push({ type: "del", text: o[r] }), r++) : (a.push({ type: "add", text: e[u] }), u++);
397
+ for (; r < t && u < s; )
398
+ o[r] === e[u] ? (a.push({ type: "same", text: o[r] }), r++, u++) : l[r + 1][u] >= l[r][u + 1] ? (a.push({ type: "del", text: o[r] }), r++) : (a.push({ type: "add", text: e[u] }), u++);
398
399
  for (; r < t; ) a.push({ type: "del", text: o[r++] });
399
- for (; u < l; ) a.push({ type: "add", text: e[u++] });
400
+ for (; u < s; ) a.push({ type: "add", text: e[u++] });
400
401
  return a;
401
402
  }
402
- function ln(o, e) {
403
+ function rn(o, e) {
403
404
  const t = o.map(() => !1);
404
405
  o.forEach((a, r) => {
405
406
  if (a.type !== "same")
406
407
  for (let u = Math.max(0, r - e); u <= Math.min(o.length - 1, r + e); u++)
407
408
  t[u] = !0;
408
409
  });
409
- const l = [];
410
- let s = !1;
410
+ const s = [];
411
+ let l = !1;
411
412
  return o.forEach((a, r) => {
412
- t[r] ? (l.push(a), s = !1) : s || (l.push({ type: "skip", text: "⋯" }), s = !0);
413
- }), l;
413
+ t[r] ? (s.push(a), l = !1) : l || (s.push({ type: "skip", text: "⋯" }), l = !0);
414
+ }), s;
414
415
  }
415
- function rn(o, e) {
416
+ function un(o, e) {
416
417
  let t;
417
418
  try {
418
419
  t = JSON.parse(o);
@@ -421,37 +422,37 @@ function rn(o, e) {
421
422
  }
422
423
  return t === null ? "—" : typeof t == "number" ? t.toLocaleString() : typeof t == "boolean" ? e(t ? "inventory.changelog.yes" : "inventory.changelog.no") : String(t);
423
424
  }
424
- function Ve(o, e, t = 0, l) {
425
+ function Ve(o, e, t = 0, s) {
425
426
  var p;
426
- const s = o.label == null ? void 0 : Ze(o.label) ? e(o.label) : o.label, a = s != null || o.value != null || o.display != null, r = !((p = o.kids) != null && p.length), u = [];
427
+ const l = o.label == null ? void 0 : Ze(o.label) ? e(o.label) : o.label, a = l != null || o.value != null || o.display != null, r = !((p = o.kids) != null && p.length), u = [];
427
428
  a && u.push({
428
429
  depth: t,
429
430
  // A bare array index says nothing a reader needs — a leaf list entry
430
431
  // shows just its value. Branch nodes keep the index as their header.
431
- label: s != null && r && /^\d+$/.test(s) ? void 0 : s,
432
- text: r ? un(o, e, l) : void 0,
432
+ label: l != null && r && /^\d+$/.test(l) ? void 0 : l,
433
+ text: r ? cn(o, e, s) : void 0,
433
434
  bookkeeping: !!o.bookkeeping
434
435
  });
435
436
  const v = a ? t + 1 : t;
436
437
  for (const L of o.kids ?? [])
437
- u.push(...Ve(L, e, v, l));
438
+ u.push(...Ve(L, e, v, s));
438
439
  return u;
439
440
  }
440
- function un(o, e, t) {
441
+ function cn(o, e, t) {
441
442
  if (o.value == null) return o.display || void 0;
442
- const l = rn(o.value, e);
443
- return (t == null ? void 0 : t(l)) ?? o.display ?? l;
443
+ const s = un(o.value, e);
444
+ return (t == null ? void 0 : t(s)) ?? o.display ?? s;
444
445
  }
445
446
  function $e(o, e) {
446
447
  return JSON.stringify(o, null, 2).split(`
447
448
  `).map((t) => ({ type: e, text: t }));
448
449
  }
449
- function cn() {
450
- const o = _e(), e = /* @__PURE__ */ new Map(), t = x(!1), l = x(null);
451
- async function s(a) {
450
+ function dn() {
451
+ const o = _e(), e = /* @__PURE__ */ new Map(), t = k(!1), s = k(null);
452
+ async function l(a) {
452
453
  const r = e.get(a.id);
453
454
  if (r) {
454
- l.value = r;
455
+ s.value = r;
455
456
  return;
456
457
  }
457
458
  t.value = !0;
@@ -463,79 +464,79 @@ function cn() {
463
464
  ...$e(L, "del"),
464
465
  ...$e(F, "add")
465
466
  ] : $e(F, "add"), conflict: !1 };
466
- e.set(a.id, K), l.value = K;
467
+ e.set(a.id, K), s.value = K;
467
468
  } catch (u) {
468
- if (!Zt(u))
469
- throw l.value = null, u;
469
+ if (!Qt(u))
470
+ throw s.value = null, u;
470
471
  const v = { diff: null, conflict: !0 };
471
- e.set(a.id, v), l.value = v;
472
+ e.set(a.id, v), s.value = v;
472
473
  } finally {
473
474
  t.value = !1;
474
475
  }
475
476
  }
476
- return { isLoading: t, result: l, load: s };
477
+ return { isLoading: t, result: s, load: l };
477
478
  }
478
- const dn = {
479
+ const fn = {
479
480
  key: 0,
480
481
  class: "flex justify-center p-16"
481
- }, fn = {
482
+ }, mn = {
482
483
  key: 1,
483
484
  class: "p-16 text-center text-gray-500"
484
- }, mn = {
485
+ }, pn = {
485
486
  key: 2,
486
487
  class: "flex h-full min-h-0 gap-8"
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 = {
488
+ }, vn = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, gn = ["onClick", "onKeydown"], yn = { class: "fm-typo-en-body-md-600" }, hn = { class: "text-xs text-gray-500" }, _n = {
488
489
  key: 0,
489
490
  class: "flex-1 overflow-y-auto pl-4"
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 = {
491
+ }, bn = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, xn = { class: "flex flex-wrap items-center gap-8" }, wn = { class: "fm-typo-en-body-lg-600" }, kn = {
491
492
  key: 0,
492
493
  class: "rounded-full bg-gray-100 px-8 text-xs text-gray-500"
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 = {
494
+ }, Sn = { class: "text-xs text-gray-500" }, $n = { class: "mb-12" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, Ln = {
494
495
  key: 0,
495
496
  class: "mb-12"
496
- }, Ln = {
497
+ }, Rn = {
497
498
  key: 1,
498
499
  class: "text-sm text-gray-400"
499
- }, Rn = {
500
+ }, Dn = {
500
501
  key: 2,
501
502
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
502
- }, Dn = {
503
+ }, Vn = {
503
504
  key: 0,
504
505
  class: "text-xs text-gray-400"
505
- }, Vn = { class: "fm-typo-en-body-md-600" }, In = { class: "flex flex-col gap-6" }, Nn = {
506
+ }, In = { class: "fm-typo-en-body-md-600" }, Nn = { class: "flex flex-col gap-6" }, En = {
506
507
  key: 0,
507
508
  class: "text-gray-700"
508
- }, En = { class: "min-w-[120px] shrink-0 text-gray-500" }, Tn = {
509
+ }, Tn = { class: "min-w-[120px] shrink-0 text-gray-500" }, Pn = {
509
510
  key: 0,
510
511
  class: "flex w-full flex-col gap-4"
511
- }, Pn = {
512
+ }, Bn = {
512
513
  key: 0,
513
514
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
514
- }, Bn = { key: 0 }, Fn = { key: 1 }, An = {
515
+ }, Fn = { key: 0 }, An = { key: 1 }, Mn = {
515
516
  key: 1,
516
517
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
517
- }, Mn = { key: 0 }, Un = { key: 1 }, On = {
518
+ }, Un = { key: 0 }, On = { key: 1 }, Kn = {
518
519
  key: 1,
519
520
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
520
- }, Kn = {
521
+ }, zn = {
521
522
  key: 2,
522
523
  class: "flex w-full flex-wrap items-baseline gap-4"
523
- }, zn = {
524
+ }, jn = {
524
525
  key: 0,
525
526
  class: "rounded bg-red-50 px-4 text-red-700"
526
- }, jn = {
527
+ }, Gn = {
527
528
  key: 1,
528
529
  class: "text-gray-400"
529
- }, Gn = {
530
+ }, Hn = {
530
531
  key: 2,
531
532
  class: "rounded bg-green-50 px-4 text-green-700"
532
- }, Hn = {
533
+ }, Jn = {
533
534
  key: 1,
534
535
  class: "text-sm text-gray-500"
535
- }, Jn = {
536
+ }, Yn = {
536
537
  key: 2,
537
538
  class: "mt-16 break-all border-t border-gray-200 pt-8 font-mono text-xs text-gray-400"
538
- }, Yn = { key: 0 }, Wn = "capture baseline", Xn = /* @__PURE__ */ ue({
539
+ }, Wn = { key: 0 }, Xn = "capture baseline", qn = /* @__PURE__ */ ue({
539
540
  __name: "ChangelogPanel",
540
541
  props: {
541
542
  commits: {},
@@ -543,33 +544,33 @@ const dn = {
543
544
  resolveName: { type: Function }
544
545
  },
545
546
  setup(o) {
546
- const e = o, { t } = he(), l = x(null), s = V(
547
- () => e.commits.find((d) => d.id === l.value)
547
+ const e = o, { t } = he(), s = k(null), l = V(
548
+ () => e.commits.find((d) => d.id === s.value)
548
549
  ), a = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), r = V(() => {
549
550
  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));
551
+ return (((h = l.value) == null ? void 0 : h.changes) ?? []).filter((U) => {
552
+ const { raw: M } = De(U.path);
553
+ return M === "@payload" || U.from == null && U.to == null ? !1 : !M.split(".").some((W) => a.has(W));
553
554
  });
554
555
  });
555
- Z(
556
+ q(
556
557
  () => e.commits,
557
558
  (d) => {
558
559
  var h;
559
- d.find((M) => M.id === l.value) || (l.value = ((h = d[0]) == null ? void 0 : h.id) ?? null);
560
+ d.find((U) => U.id === s.value) || (s.value = ((h = d[0]) == null ? void 0 : h.id) ?? null);
560
561
  },
561
562
  { immediate: !0 }
562
563
  );
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;
564
+ const u = k(!1), { isLoading: v, result: p, load: L } = dn();
565
+ q([u, l], ([d, h]) => {
566
+ p.value = null, !(!d || !h) && L(h).catch((U) => {
567
+ console.error("changelog snapshot load failed", U), u.value = !1;
567
568
  });
568
569
  });
569
570
  function F(d) {
570
571
  return d ? d.slice(0, 8) : "";
571
572
  }
572
- function B(d) {
573
+ function A(d) {
573
574
  return d ? new Date(d).toLocaleString() : "";
574
575
  }
575
576
  function K(d) {
@@ -582,21 +583,21 @@ const dn = {
582
583
  }
583
584
  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);
584
585
  }
585
- function Q(d) {
586
+ function Z(d) {
586
587
  return (d.authors || []).join(", ") || t("inventory.changelog.unknownActor");
587
588
  }
588
- function U(d) {
589
- if (d.message === Wn) return t("inventory.changelog.captureBaseline");
589
+ function te(d) {
590
+ if (d.message === Xn) return t("inventory.changelog.captureBaseline");
590
591
  const h = qe(d.message);
591
592
  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 });
593
+ const U = D(h.labelKey);
594
+ return h.name ? t(`inventory.changelog.message.${h.verb}`, { module: U, name: h.name }) : t(`inventory.changelog.message.${h.verb}NoName`, { module: U });
594
595
  }
595
- function $(d) {
596
+ function D(d) {
596
597
  return Ze(d) ? t(d) : d;
597
598
  }
598
- const G = (d) => /[^a-zA-Z]/.test(d);
599
- function C(d, h) {
599
+ const B = (d) => /[^a-zA-Z]/.test(d);
600
+ function b(d, h) {
600
601
  return d == null || h == null ? null : et(d, h);
601
602
  }
602
603
  function y(d) {
@@ -606,17 +607,17 @@ const dn = {
606
607
  fromTree: d.from_value ? Ve(d.from_value, t, 0, e.resolveName) : void 0
607
608
  };
608
609
  }
609
- function S(d) {
610
+ function x(d) {
610
611
  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";
611
612
  }
612
613
  function T(d) {
613
614
  return d.type === "skip" ? d.text : (d.type === "add" ? "+ " : d.type === "del" ? "- " : " ") + d.text;
614
615
  }
615
616
  const O = V(() => {
616
- const d = /* @__PURE__ */ new Map(), h = [], M = (g, f) => {
617
+ const d = /* @__PURE__ */ new Map(), h = [], U = (g, f) => {
617
618
  let N = d.get(g);
618
619
  return N || (N = f(), d.set(g, N), h.push(N)), N;
619
- }, A = () => M("@doc", () => ({ header: "", lines: [] })), X = (g, f) => {
620
+ }, M = () => U("@doc", () => ({ header: "", lines: [] })), W = (g, f) => {
620
621
  var P;
621
622
  if (g == null) return f;
622
623
  let N;
@@ -626,28 +627,28 @@ const dn = {
626
627
  N = g;
627
628
  }
628
629
  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;
630
+ }, G = (g, f, N) => {
631
+ var P, J, Q, ee;
631
632
  const _ = y(f);
632
633
  _ ? g.lines.push({ label: N, ..._ }) : f.from != null && f.to != null ? g.lines.push({
633
634
  label: N,
634
635
  from: f.from,
635
636
  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) => {
637
+ diff: b(f.from, f.to),
638
+ fromDisplay: W(f.from, (P = f.display) == null ? void 0 : P.from),
639
+ toDisplay: W(f.to, (J = f.display) == null ? void 0 : J.to)
640
+ }) : f.to != null ? g.lines.push({ label: N, to: f.to, toDisplay: W(f.to, (Q = f.display) == null ? void 0 : Q.to) }) : g.lines.push({ label: N, from: f.from, fromDisplay: W(f.from, (ee = f.display) == null ? void 0 : ee.from) });
641
+ }, C = (g) => {
641
642
  var N;
642
643
  const f = g.element;
643
644
  if (f) {
644
- const _ = M(`kit:${(f.trail ?? []).join(".")}:${f.id ?? ""}`, () => ({
645
- kind: (f.trail ?? []).map($).join(" › "),
645
+ const _ = U(`kit:${(f.trail ?? []).join(".")}:${f.id ?? ""}`, () => ({
646
+ kind: (f.trail ?? []).map(D).join(" › "),
646
647
  header: f.name || f.id || "",
647
648
  lines: []
648
649
  }));
649
650
  if ((N = g.field) != null && N.length)
650
- H(_, g, g.field.map($).join(" › "));
651
+ G(_, g, g.field.map(D).join(" › "));
651
652
  else {
652
653
  _.badge = g.to != null ? "added" : "removed";
653
654
  const P = y(g);
@@ -655,214 +656,214 @@ const dn = {
655
656
  }
656
657
  return;
657
658
  }
658
- H(A(), g, (g.field ?? []).map($).join(" › "));
659
+ G(M(), g, (g.field ?? []).map(D).join(" › "));
659
660
  };
660
661
  for (const g of r.value) {
661
662
  const { raw: f, human: N } = De(g.path);
662
663
  if (g.kind === "create" && !f) {
663
- const ee = y(g);
664
- A().lines.push(
665
- ee ? { label: t("inventory.changelog.kind.created"), ...ee } : { text: t("inventory.changelog.kind.created") }
664
+ const Q = y(g);
665
+ M().lines.push(
666
+ Q ? { label: t("inventory.changelog.kind.created"), ...Q } : { text: t("inventory.changelog.kind.created") }
666
667
  );
667
668
  continue;
668
669
  }
669
670
  if (!g.path.includes(Qe) && (g.field || g.element)) {
670
- R(g);
671
+ C(g);
671
672
  continue;
672
673
  }
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(" › "),
677
- header: ee,
674
+ const _ = f ? f.split(".") : [], P = N ? N.split(" › ") : [], J = _.findIndex((Q, ee) => ee > 0 && B(Q));
675
+ if (J > 0 && P.length === _.length) {
676
+ const Q = P[J], ee = U(_.slice(0, J + 1).join("."), () => ({
677
+ kind: P.slice(0, J).map(D).join(" › "),
678
+ header: Q,
678
679
  lines: []
679
- })), re = P.slice(Y + 1).map($).join(" › ");
680
- if (re) H(te, g, re);
681
- else if (g.from != null && g.to != null) H(te, g, ee);
680
+ })), re = P.slice(J + 1).map(D).join(" › ");
681
+ if (re) G(ee, g, re);
682
+ else if (g.from != null && g.to != null) G(ee, g, Q);
682
683
  else {
683
- te.badge = g.to != null ? "added" : "removed";
684
+ ee.badge = g.to != null ? "added" : "removed";
684
685
  const ce = y(g);
685
- ce && te.lines.push(ce);
686
+ ce && ee.lines.push(ce);
686
687
  }
687
688
  continue;
688
689
  }
689
- H(A(), g, P.map($).join(" › "));
690
+ G(M(), g, P.map(D).join(" › "));
690
691
  }
691
692
  return h;
692
693
  });
693
694
  return (d, h) => {
694
- var X, H;
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,
695
+ var W, G;
696
+ const U = Y("FmCircularProgress"), M = Y("FmSwitch");
697
+ return d.isLoading ? (i(), m("div", fn, [
698
+ I(U)
699
+ ])) : d.commits.length ? (i(), m("div", pn, [
700
+ S("ol", vn, [
701
+ (i(!0), m(H, null, oe(d.commits, (C) => (i(), m("li", {
702
+ key: C.id,
702
703
  role: "button",
703
704
  tabindex: "0",
704
705
  class: ae([
705
706
  "cursor-pointer border-l-2 py-8 pl-12",
706
- R.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
707
+ C.id === s.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
707
708
  ]),
708
- onClick: (g) => l.value = R.id,
709
+ onClick: (g) => s.value = C.id,
709
710
  onKeydown: [
710
- Me((g) => l.value = R.id, ["enter"]),
711
- Me(pt((g) => l.value = R.id, ["prevent"]), ["space"])
711
+ Me((g) => s.value = C.id, ["enter"]),
712
+ Me(pt((g) => s.value = C.id, ["prevent"]), ["space"])
712
713
  ]
713
714
  }, [
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))
715
+ S("div", yn, w(te(C)), 1),
716
+ S("div", hn, w(Z(C)) + " · " + w(A(C.at)) + " · " + w(F(C.id)), 1)
717
+ ], 42, gn))), 128))
717
718
  ]),
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))
719
+ l.value ? (i(), m("div", _n, [
720
+ S("div", bn, [
721
+ S("div", xn, [
722
+ S("div", wn, w(te(l.value)), 1),
723
+ l.value.parent ? E("", !0) : (i(), m("span", kn, w(R(t)("inventory.changelog.rootCommit")), 1))
723
724
  ]),
724
- w("div", kn, b(Q(s.value)) + " · " + b(B(s.value.at)), 1)
725
+ S("div", Sn, w(Z(l.value)) + " · " + w(A(l.value.at)), 1)
725
726
  ]),
726
- w("div", Sn, [
727
+ S("div", $n, [
727
728
  I(We, null, {
728
729
  default: le(() => [
729
- w("span", $n, b(D(t)("inventory.changelog.dataDiff")), 1),
730
- I(A, {
730
+ S("span", Cn, w(R(t)("inventory.changelog.dataDiff")), 1),
731
+ I(M, {
731
732
  modelValue: u.value,
732
- "onUpdate:modelValue": h[0] || (h[0] = (R) => u.value = R)
733
+ "onUpdate:modelValue": h[0] || (h[0] = (C) => u.value = C)
733
734
  }, null, 8, ["modelValue"])
734
735
  ]),
735
736
  _: 1
736
737
  })
737
738
  ]),
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", {
739
+ u.value ? (i(), m("div", Ln, [
740
+ R(v) ? (i(), ie(U, { key: 0 })) : (W = R(p)) != null && W.conflict ? (i(), m("div", Rn, w(R(t)("inventory.changelog.snapshotUnavailable")), 1)) : (G = R(p)) != null && G.diff ? (i(), m("div", Dn, [
741
+ (i(!0), m(H, null, oe(R(p).diff, (C, g) => (i(), m("div", {
741
742
  key: g,
742
- class: ae(["whitespace-pre px-4", S(R.type)])
743
- }, b(T(R)), 3))), 128))
743
+ class: ae(["whitespace-pre px-4", x(C.type)])
744
+ }, w(T(C)), 3))), 128))
744
745
  ])) : E("", !0)
745
746
  ])) : E("", !0),
746
- (i(!0), m(J, null, oe(O.value, (R, g) => (i(), m("div", {
747
+ (i(!0), m(H, null, oe(O.value, (C, g) => (i(), m("div", {
747
748
  key: g,
748
749
  class: "mb-12 rounded-lg border border-gray-200 p-12"
749
750
  }, [
750
- R.kind || R.header || R.badge ? (i(), m("div", {
751
+ C.kind || C.header || C.badge ? (i(), m("div", {
751
752
  key: 0,
752
- class: ae(["flex flex-wrap items-baseline gap-8", R.lines.length ? "mb-8" : ""])
753
+ class: ae(["flex flex-wrap items-baseline gap-8", C.lines.length ? "mb-8" : ""])
753
754
  }, [
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", {
755
+ C.kind ? (i(), m("span", Vn, w(C.kind), 1)) : E("", !0),
756
+ S("span", In, w(C.header), 1),
757
+ C.badge ? (i(), m("span", {
757
758
  key: 1,
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)
759
+ class: ae(["rounded-full px-8 text-xs", C.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
760
+ }, w(C.badge === "added" ? R(t)("inventory.changelog.added") : R(t)("inventory.changelog.kind.removed")), 3)) : E("", !0)
760
761
  ], 2)) : E("", !0),
761
- w("ul", In, [
762
- (i(!0), m(J, null, oe(R.lines, (f, N) => (i(), m("li", {
762
+ S("ul", Nn, [
763
+ (i(!0), m(H, null, oe(C.lines, (f, N) => (i(), m("li", {
763
764
  key: N,
764
765
  class: "flex flex-wrap items-baseline gap-8 text-sm"
765
766
  }, [
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", {
767
+ f.text ? (i(), m("span", En, w(f.text), 1)) : (i(), m(H, { key: 1 }, [
768
+ S("span", Tn, w(f.label), 1),
769
+ f.toTree || f.fromTree ? (i(), m("div", Pn, [
770
+ f.fromTree ? (i(), m("div", Bn, [
771
+ (i(!0), m(H, null, oe(f.fromTree, (_, P) => (i(), m("div", {
771
772
  key: P,
772
773
  class: ae(["flex items-baseline gap-4 px-4", _.bookkeeping ? "text-gray-400" : "text-red-700"])
773
774
  }, [
774
- (i(!0), m(J, null, oe(_.depth, (Y) => (i(), m("span", {
775
- key: Y,
775
+ (i(!0), m(H, null, oe(_.depth, (J) => (i(), m("span", {
776
+ key: J,
776
777
  class: "inline-block w-16"
777
778
  }))), 128)),
778
- _.label ? (i(), m("span", Bn, [
779
- ve(b(_.label), 1),
780
- _.text ? (i(), m(J, { key: 0 }, [
779
+ _.label ? (i(), m("span", Fn, [
780
+ ve(w(_.label), 1),
781
+ _.text ? (i(), m(H, { key: 0 }, [
781
782
  ve(":")
782
783
  ], 64)) : E("", !0)
783
784
  ])) : E("", !0),
784
- _.text ? (i(), m("span", Fn, b(_.text), 1)) : E("", !0)
785
+ _.text ? (i(), m("span", An, w(_.text), 1)) : E("", !0)
785
786
  ], 2))), 128))
786
787
  ])) : E("", !0),
787
- f.toTree ? (i(), m("div", An, [
788
- (i(!0), m(J, null, oe(f.toTree, (_, P) => (i(), m("div", {
788
+ f.toTree ? (i(), m("div", Mn, [
789
+ (i(!0), m(H, null, oe(f.toTree, (_, P) => (i(), m("div", {
789
790
  key: P,
790
791
  class: ae(["flex items-baseline gap-4 px-4", _.bookkeeping ? "text-gray-400" : "text-green-700"])
791
792
  }, [
792
- (i(!0), m(J, null, oe(_.depth, (Y) => (i(), m("span", {
793
- key: Y,
793
+ (i(!0), m(H, null, oe(_.depth, (J) => (i(), m("span", {
794
+ key: J,
794
795
  class: "inline-block w-16"
795
796
  }))), 128)),
796
- _.label ? (i(), m("span", Mn, [
797
- ve(b(_.label), 1),
798
- _.text ? (i(), m(J, { key: 0 }, [
797
+ _.label ? (i(), m("span", Un, [
798
+ ve(w(_.label), 1),
799
+ _.text ? (i(), m(H, { key: 0 }, [
799
800
  ve(":")
800
801
  ], 64)) : E("", !0)
801
802
  ])) : E("", !0),
802
- _.text ? (i(), m("span", Un, b(_.text), 1)) : E("", !0)
803
+ _.text ? (i(), m("span", On, w(_.text), 1)) : E("", !0)
803
804
  ], 2))), 128))
804
805
  ])) : E("", !0)
805
- ])) : f.diff ? (i(), m("div", On, [
806
- (i(!0), m(J, null, oe(f.diff, (_, P) => (i(), m("div", {
806
+ ])) : f.diff ? (i(), m("div", Kn, [
807
+ (i(!0), m(H, null, oe(f.diff, (_, P) => (i(), m("div", {
807
808
  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)
809
+ class: ae(["whitespace-pre px-4", x(_.type)])
810
+ }, w(T(_)), 3))), 128))
811
+ ])) : (i(), m("span", zn, [
812
+ f.from != null ? (i(), m("span", jn, w(f.fromDisplay ?? K(f.from)), 1)) : E("", !0),
813
+ f.from != null && f.to != null ? (i(), m("span", Gn, "→")) : E("", !0),
814
+ f.to != null ? (i(), m("span", Hn, w(f.toDisplay ?? K(f.to)), 1)) : E("", !0)
814
815
  ]))
815
816
  ], 64))
816
817
  ]))), 128))
817
818
  ])
818
819
  ]))), 128)),
819
- O.value.length ? E("", !0) : (i(), m("div", Hn, b(D(t)("inventory.changelog.empty")), 1)),
820
- u.value ? (i(), m("div", Jn, [
821
- ve(b(s.value.id) + " ", 1),
822
- s.value.parent ? (i(), m("span", Yn, "← " + b(s.value.parent), 1)) : E("", !0)
820
+ O.value.length ? E("", !0) : (i(), m("div", Jn, w(R(t)("inventory.changelog.empty")), 1)),
821
+ u.value ? (i(), m("div", Yn, [
822
+ ve(w(l.value.id) + " ", 1),
823
+ l.value.parent ? (i(), m("span", Wn, "← " + w(l.value.parent), 1)) : E("", !0)
823
824
  ])) : E("", !0)
824
825
  ])) : E("", !0)
825
- ])) : (i(), m("div", fn, b(D(t)("inventory.changelog.empty")), 1));
826
+ ])) : (i(), m("div", mn, w(R(t)("inventory.changelog.empty")), 1));
826
827
  };
827
828
  }
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 = {
829
+ }), Zn = { class: "flex flex-col gap-8" }, Qn = { class: "flex flex-wrap items-center gap-16" }, eo = { class: "fm-typo-en-heading-lg-600" }, to = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, no = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, oo = { class: "flex flex-wrap items-center gap-12" }, ao = { class: "flex shrink-0 items-center gap-8" }, so = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, lo = { class: "flex flex-wrap items-center gap-12" }, ro = {
829
830
  key: 0,
830
831
  class: "fm-typo-en-body-md-600"
831
- }, ro = { class: "fm-typo-en-heading-md-600" }, io = {
832
+ }, io = { class: "fm-typo-en-heading-md-600" }, uo = {
832
833
  key: 0,
833
834
  class: "flex justify-center py-8"
834
- }, Ce = "inventory.changelog.label.", uo = /* @__PURE__ */ ue({
835
+ }, Ce = "inventory.changelog.label.", co = /* @__PURE__ */ ue({
835
836
  __name: "ChangelogDialog",
836
837
  props: {
837
838
  modelValue: { type: Boolean }
838
839
  },
839
840
  emits: ["update:modelValue"],
840
841
  setup(o, { emit: e }) {
841
- const t = o, l = e, s = V({
842
+ const t = o, s = e, l = V({
842
843
  get: () => t.modelValue,
843
- set: (n) => l("update:modelValue", n)
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() {
846
- G().catch((n) => console.error("changelog load more failed", n));
844
+ set: (n) => s("update:modelValue", n)
845
+ }), { t: a } = he(), r = ge(), u = Je(), v = He(), p = _e(), { breakpoints: L } = Nt(), F = V(() => L.value.xs || L.value.sm), A = V(() => F.value ? "98vw" : "72vw"), { commits: K, isLoading: Z, hasMore: te, load: D, loadMore: B } = en();
846
+ function b() {
847
+ B().catch((n) => console.error("changelog load more failed", n));
847
848
  }
848
849
  function y(n) {
849
850
  return n ? new Date(n).toLocaleString() : "—";
850
851
  }
851
- function S(n) {
852
- return [...n].sort((c, k) => (k.lastUpdate ?? "").localeCompare(c.lastUpdate ?? ""));
852
+ function x(n) {
853
+ return [...n].sort((c, $) => ($.lastUpdate ?? "").localeCompare(c.lastUpdate ?? ""));
853
854
  }
854
- function T(n, c, k) {
855
- $(n, c, k).catch((z) => console.error("changelog load failed", z));
855
+ function T(n, c, $) {
856
+ D(n, c, $).catch((z) => console.error("changelog load failed", z));
856
857
  }
857
- const O = x([]);
858
+ const O = k([]);
858
859
  async function d() {
859
860
  var c;
860
861
  const n = (c = r.currentBusiness.value) == null ? void 0 : c._id;
861
862
  if (n)
862
863
  try {
863
864
  O.value = await p.listDomains(n);
864
- } catch (k) {
865
- console.error("changelog domain list load failed", k), O.value = [];
865
+ } catch ($) {
866
+ console.error("changelog domain list load failed", $), O.value = [];
866
867
  }
867
868
  }
868
869
  const h = V(() => [
@@ -870,49 +871,49 @@ const dn = {
870
871
  { label: a("inventory.changelog.label.closingDraft"), value: "closingDraft" },
871
872
  { label: a("inventory.changelog.domainInventory"), value: "inventory" },
872
873
  ...O.value.map((n) => ({ label: a(n.labelKey), value: n.domain }))
873
- ]), M = x(h.value[0]), A = V(() => {
874
+ ]), U = k(h.value[0]), M = V(() => {
874
875
  var n;
875
- return ((n = M.value) == null ? void 0 : n.value) ?? "purchaseOrder";
876
- }), X = V(
877
- () => O.value.some((n) => n.domain === A.value)
878
- ), H = x(!1), R = V(
876
+ return ((n = U.value) == null ? void 0 : n.value) ?? "purchaseOrder";
877
+ }), W = V(
878
+ () => O.value.some((n) => n.domain === M.value)
879
+ ), G = k(!1), C = V(
879
880
  () => ["sku", "recipe", "unit"].map((n) => ({
880
881
  label: a(Ce + n),
881
882
  value: n
882
883
  }))
883
- ), g = x(R.value[0]), f = V(() => {
884
+ ), g = k(C.value[0]), f = V(() => {
884
885
  var n;
885
886
  return ((n = g.value) == null ? void 0 : n.value) ?? "sku";
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;
887
+ }), N = k(""), _ = k(null), P = k(!1), J = V(() => {
888
+ var $;
889
+ const n = ($ = r.currentBusiness.value) == null ? void 0 : $._id, c = u.inventory._id;
889
890
  return n && c ? `business_${n}/${c}` : "";
890
- }), ee = V(() => {
891
+ }), Q = V(() => {
891
892
  const n = /* @__PURE__ */ new Map(), c = u.inventory;
892
- for (const k of [c.sku, c.recipe, c.unit])
893
- for (const z of k ?? [])
893
+ for (const $ of [c.sku, c.recipe, c.unit])
894
+ for (const z of $ ?? [])
894
895
  z._id && z.name && n.set(z._id, z.name);
895
- for (const k of c.unit ?? [])
896
- for (const z of k.measurements ?? []) {
896
+ for (const $ of c.unit ?? [])
897
+ for (const z of $.measurements ?? []) {
897
898
  if (!z.id) continue;
898
- const q = z.abbrev || z.name;
899
- if (!q) continue;
900
- const ne = Tt.toDouble(z.conversion);
901
- n.set(z.id, ne ? `${q} (1 ${q} = ${ne} ${k.abbrev})` : q);
899
+ const X = z.abbrev || z.name;
900
+ if (!X) continue;
901
+ const ne = Pt.toDouble(z.conversion);
902
+ n.set(z.id, ne ? `${X} (1 ${X} = ${ne} ${$.abbrev})` : X);
902
903
  }
903
904
  return n;
904
- }), te = (n) => ee.value.get(n), re = x([]), ce = x(!1);
905
+ }), ee = (n) => Q.value.get(n), re = k([]), ce = k(!1);
905
906
  async function Ee() {
906
907
  var c;
907
908
  const n = (c = r.currentBusiness.value) == null ? void 0 : c._id;
908
909
  if (n) {
909
910
  ce.value = !0;
910
911
  try {
911
- re.value = S(
912
+ re.value = x(
912
913
  await p.listInventory(n, f.value)
913
914
  );
914
- } catch (k) {
915
- console.error("changelog inventory list load failed", k), re.value = [];
915
+ } catch ($) {
916
+ console.error("changelog inventory list load failed", $), re.value = [];
916
917
  } finally {
917
918
  ce.value = !1;
918
919
  }
@@ -943,54 +944,54 @@ const dn = {
943
944
  accessorFn: (n) => n.lastUpdate ?? "",
944
945
  cell: ({ getValue: n }) => y(n() || void 0)
945
946
  }
946
- ]), { commits: ot, load: at } = tn();
947
+ ]), { commits: ot, load: at } = nn();
947
948
  function st(n) {
948
- _.value = n, H.value = !0, T(Y.value, Xe, Re), n.id && at(`${Y.value}/${f.value}/${n.id}`).catch(
949
+ _.value = n, G.value = !0, T(J.value, Xe, Re), n.id && at(`${J.value}/${f.value}/${n.id}`).catch(
949
950
  (c) => console.error("changelog per-entity load failed", c)
950
951
  );
951
952
  }
952
953
  function lt(n, c) {
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;
954
+ const $ = qe(n.message);
955
+ return $ && $.labelKey === Ce + f.value && $.name === c.name ? !0 : (n.changes ?? []).some((z) => {
956
+ const X = sn(z.path);
957
+ return X.type === Ce + f.value && X.name === c.name;
957
958
  });
958
959
  }
959
960
  const rt = V(() => {
960
961
  const n = _.value;
961
962
  if (!n) return [];
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);
963
+ const c = K.value.filter(($) => lt($, n));
964
+ return tn(c, ot.value);
965
+ }), be = k([]), xe = k(!1), we = k(null);
965
966
  async function it() {
966
967
  var c;
967
968
  const n = (c = r.currentBusiness.value) == null ? void 0 : c._id;
968
969
  if (n) {
969
970
  xe.value = !0;
970
971
  try {
971
- be.value = S(
972
- await p.listDomainRecords(n, A.value)
972
+ be.value = x(
973
+ await p.listDomainRecords(n, M.value)
973
974
  );
974
- } catch (k) {
975
- console.error("changelog domain records load failed", k), be.value = [];
975
+ } catch ($) {
976
+ console.error("changelog domain records load failed", $), be.value = [];
976
977
  } finally {
977
978
  xe.value = !1;
978
979
  }
979
980
  }
980
981
  }
981
982
  function ut(n) {
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));
983
+ var $;
984
+ const c = ($ = r.currentBusiness.value) == null ? void 0 : $._id;
985
+ c && (we.value = n, G.value = !0, T(`business_${c}/${n.id}`, void 0, Le));
985
986
  }
986
- const pe = x(Nt()), ye = x([]), ke = x(!1), de = x(null), Te = V(() => {
987
+ const pe = k(Et()), ye = k([]), ke = k(!1), de = k(null), Te = V(() => {
987
988
  const n = v._currentLocation;
988
989
  return n ? `${n.name} (${n.doc.profile.code ?? "--"})` : "";
989
990
  }), Pe = V(() => [
990
991
  { accessorKey: "id", header: () => a("inventory.closing.draft.table.id"), size: 320 },
991
992
  {
992
993
  accessorKey: "name",
993
- header: () => A.value === "purchaseOrder" ? a("inventory.changelog.column.seq") : a("inventory.common.name"),
994
+ header: () => M.value === "purchaseOrder" ? a("inventory.changelog.column.seq") : a("inventory.common.name"),
994
995
  size: 240
995
996
  },
996
997
  {
@@ -1006,57 +1007,57 @@ const dn = {
1006
1007
  var z;
1007
1008
  const n = (z = v._currentLocation) == null ? void 0 : z.dbName;
1008
1009
  if (!n) return;
1009
- const c = Pt(new Date(pe.value.startDate)).toISOString(), k = Bt(new Date(pe.value.endDate)).toISOString();
1010
+ const c = Bt(new Date(pe.value.startDate)).toISOString(), $ = Ft(new Date(pe.value.endDate)).toISOString();
1010
1011
  ke.value = !0;
1011
1012
  try {
1012
- ye.value = S(
1013
- A.value === "purchaseOrder" ? await p.listPurchaseOrders(n, c, k) : await p.listClosingDrafts(n, c, k)
1013
+ ye.value = x(
1014
+ M.value === "purchaseOrder" ? await p.listPurchaseOrders(n, c, $) : await p.listClosingDrafts(n, c, $)
1014
1015
  );
1015
- } catch (q) {
1016
- console.error("changelog location list load failed", q), ye.value = [];
1016
+ } catch (X) {
1017
+ console.error("changelog location list load failed", X), ye.value = [];
1017
1018
  } finally {
1018
1019
  ke.value = !1;
1019
1020
  }
1020
- de.value && !ye.value.find((q) => {
1021
+ de.value && !ye.value.find((X) => {
1021
1022
  var ne;
1022
- return q.id === ((ne = de.value) == null ? void 0 : ne.id);
1023
+ return X.id === ((ne = de.value) == null ? void 0 : ne.id);
1023
1024
  }) && (de.value = null, T(""));
1024
1025
  }
1025
1026
  function ct(n) {
1026
- de.value = n, H.value = !0, T(`${v.currentLocationDBName}/${n.id}`, void 0, Le);
1027
+ de.value = n, G.value = !0, T(`${v.currentLocationDBName}/${n.id}`, void 0, Le);
1027
1028
  }
1028
1029
  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) ?? "";
1030
+ var n, c, $;
1031
+ return M.value === "inventory" ? ((n = _.value) == null ? void 0 : n.name) ?? "" : W.value ? ((c = we.value) == null ? void 0 : c.name) ?? "" : (($ = de.value) == null ? void 0 : $.name) ?? "";
1031
1032
  });
1032
1033
  function Fe() {
1033
- H.value = !1, A.value === "inventory" ? (_.value = null, P.value = !1, T(""), Ee().catch(
1034
+ G.value = !1, M.value === "inventory" ? (_.value = null, P.value = !1, T(""), Ee().catch(
1034
1035
  (n) => console.error("changelog inventory list failed", n)
1035
- )) : X.value ? (we.value = null, T(""), it().catch(
1036
+ )) : W.value ? (we.value = null, T(""), it().catch(
1036
1037
  (n) => console.error("changelog domain records failed", n)
1037
1038
  )) : (de.value = null, T(""), Be().catch((n) => console.error("changelog location list failed", n)));
1038
1039
  }
1039
- return Z(s, (n) => {
1040
+ return q(l, (n) => {
1040
1041
  n && (d().catch((c) => console.error("changelog domain list failed", c)), Fe());
1041
- }), Z(A, () => {
1042
- s.value && Fe();
1043
- }), Z(pe, () => {
1044
- s.value && A.value !== "inventory" && !X.value && Be().catch((n) => console.error("changelog location list failed", n));
1045
- }), Z(P, (n) => {
1042
+ }), q(M, () => {
1043
+ l.value && Fe();
1044
+ }), q(pe, () => {
1045
+ l.value && M.value !== "inventory" && !W.value && Be().catch((n) => console.error("changelog location list failed", n));
1046
+ }), q(P, (n) => {
1046
1047
  var c;
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(
1048
+ !n && ((c = _.value) != null && c.deleted) && (_.value = null, G.value = !1);
1049
+ }), q(f, () => {
1050
+ _.value = null, G.value = !1, l.value && M.value === "inventory" && Ee().catch(
1050
1051
  (n) => console.error("changelog inventory list failed", n)
1051
1052
  );
1052
- }), Z(Y, (n) => {
1053
- _.value = null, s.value && A.value === "inventory" && T(n, void 0, Re);
1053
+ }), q(J, (n) => {
1054
+ _.value = null, l.value && M.value === "inventory" && T(n, void 0, Re);
1054
1055
  }), (n, c) => {
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, [
1056
+ const $ = Y("FmButtonGroup"), z = Y("FmSearch"), X = Y("FmSwitch"), ne = Y("FmTable"), Ae = Y("FmDialog"), ft = Y("FmButton");
1057
+ return i(), m(H, null, [
1057
1058
  I(Ae, {
1058
- modelValue: s.value,
1059
- "onUpdate:modelValue": c[8] || (c[8] = (j) => s.value = j),
1059
+ modelValue: l.value,
1060
+ "onUpdate:modelValue": c[8] || (c[8] = (j) => l.value = j),
1060
1061
  "close-button": "",
1061
1062
  "dismiss-away": "",
1062
1063
  "min-width": "98vw",
@@ -1065,36 +1066,36 @@ const dn = {
1065
1066
  "content-class": "!p-0 h-[86vh]"
1066
1067
  }, {
1067
1068
  "dialog-header": le(() => [
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),
1069
+ S("div", Zn, [
1070
+ S("div", Qn, [
1071
+ S("div", eo, w(R(a)("inventory.changelog.title")), 1),
1072
+ I($, {
1073
+ modelValue: U.value,
1074
+ "onUpdate:modelValue": c[0] || (c[0] = (j) => U.value = j),
1074
1075
  items: h.value
1075
1076
  }, null, 8, ["modelValue", "items"])
1076
1077
  ]),
1077
- w("div", eo, b(D(a)("inventory.changelog.scopeDescription")), 1)
1078
+ S("div", to, w(R(a)("inventory.changelog.scopeDescription")), 1)
1078
1079
  ])
1079
1080
  ]),
1080
1081
  default: le(() => [
1081
- w("div", to, [
1082
- A.value === "inventory" ? (i(), m(J, { key: 0 }, [
1083
- w("div", no, [
1084
- I(k, {
1082
+ S("div", no, [
1083
+ M.value === "inventory" ? (i(), m(H, { key: 0 }, [
1084
+ S("div", oo, [
1085
+ I($, {
1085
1086
  modelValue: g.value,
1086
1087
  "onUpdate:modelValue": c[1] || (c[1] = (j) => g.value = j),
1087
- items: R.value
1088
+ items: C.value
1088
1089
  }, null, 8, ["modelValue", "items"]),
1089
1090
  I(z, {
1090
1091
  modelValue: N.value,
1091
1092
  "onUpdate:modelValue": c[2] || (c[2] = (j) => N.value = j),
1092
1093
  class: "flex-1",
1093
- placeholder: D(a)("inventory.changelog.searchInventory")
1094
+ placeholder: R(a)("inventory.changelog.searchInventory")
1094
1095
  }, null, 8, ["modelValue", "placeholder"]),
1095
- w("div", oo, [
1096
- w("span", ao, b(D(a)("inventory.changelog.includeDeleted")), 1),
1097
- I(q, {
1096
+ S("div", ao, [
1097
+ S("span", so, w(R(a)("inventory.changelog.includeDeleted")), 1),
1098
+ I(X, {
1098
1099
  modelValue: P.value,
1099
1100
  "onUpdate:modelValue": c[3] || (c[3] = (j) => P.value = j)
1100
1101
  }, null, 8, ["modelValue"])
@@ -1109,7 +1110,7 @@ const dn = {
1109
1110
  "page-size": 20,
1110
1111
  onRowClick: c[4] || (c[4] = (j) => st(j.original))
1111
1112
  }, null, 8, ["row-data", "column-defs", "search-value", "loading"])
1112
- ], 64)) : X.value ? (i(), ie(ne, {
1113
+ ], 64)) : W.value ? (i(), ie(ne, {
1113
1114
  key: 1,
1114
1115
  class: "min-h-0 flex-1",
1115
1116
  "row-data": be.value,
@@ -1117,13 +1118,13 @@ const dn = {
1117
1118
  loading: xe.value,
1118
1119
  "page-size": 20,
1119
1120
  onRowClick: c[5] || (c[5] = (j) => ut(j.original))
1120
- }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), m(J, { key: 2 }, [
1121
- w("div", so, [
1122
- I(Et, {
1121
+ }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), m(H, { key: 2 }, [
1122
+ S("div", lo, [
1123
+ I(Tt, {
1123
1124
  modelValue: pe.value,
1124
1125
  "onUpdate:modelValue": c[6] || (c[6] = (j) => pe.value = j)
1125
1126
  }, null, 8, ["modelValue"]),
1126
- Te.value ? (i(), m("span", lo, b(Te.value), 1)) : E("", !0)
1127
+ Te.value ? (i(), m("span", ro, w(Te.value), 1)) : E("", !0)
1127
1128
  ]),
1128
1129
  I(ne, {
1129
1130
  class: "min-h-0 flex-1",
@@ -1139,29 +1140,29 @@ const dn = {
1139
1140
  _: 1
1140
1141
  }, 8, ["modelValue"]),
1141
1142
  I(Ae, {
1142
- modelValue: H.value,
1143
- "onUpdate:modelValue": c[9] || (c[9] = (j) => H.value = j),
1143
+ modelValue: G.value,
1144
+ "onUpdate:modelValue": c[9] || (c[9] = (j) => G.value = j),
1144
1145
  "close-button": "",
1145
1146
  "dismiss-away": "",
1146
- "min-width": B.value,
1147
- "max-width": B.value,
1147
+ "min-width": A.value,
1148
+ "max-width": A.value,
1148
1149
  "max-height": "86vh"
1149
1150
  }, {
1150
1151
  "dialog-header": le(() => [
1151
- w("div", ro, b(dt.value), 1)
1152
+ S("div", io, w(dt.value), 1)
1152
1153
  ]),
1153
1154
  default: le(() => [
1154
- I(Xn, {
1155
- commits: A.value === "inventory" ? rt.value : D(K),
1156
- "is-loading": D(Q),
1157
- "resolve-name": te
1155
+ I(qn, {
1156
+ commits: M.value === "inventory" ? rt.value : R(K),
1157
+ "is-loading": R(Z),
1158
+ "resolve-name": ee
1158
1159
  }, null, 8, ["commits", "is-loading"]),
1159
- A.value !== "inventory" && D(U) ? (i(), m("div", io, [
1160
+ M.value !== "inventory" && R(te) ? (i(), m("div", uo, [
1160
1161
  I(ft, {
1161
- label: D(a)("inventory.changelog.loadMore"),
1162
+ label: R(a)("inventory.changelog.loadMore"),
1162
1163
  variant: "secondary",
1163
- disabled: D(Q),
1164
- onClick: C
1164
+ disabled: R(Z),
1165
+ onClick: b
1165
1166
  }, null, 8, ["label", "disabled"])
1166
1167
  ])) : E("", !0)
1167
1168
  ]),
@@ -1170,71 +1171,71 @@ const dn = {
1170
1171
  ], 64);
1171
1172
  };
1172
1173
  }
1173
- }), co = /* @__PURE__ */ Ft(uo, [["__scopeId", "data-v-07c5a952"]]), se = 8;
1174
- function fo(o, e) {
1174
+ }), fo = /* @__PURE__ */ At(co, [["__scopeId", "data-v-07c5a952"]]), se = 8;
1175
+ function mo(o, e) {
1175
1176
  return { x: se, y: Math.max(se, e - o - se) };
1176
1177
  }
1177
- const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1178
+ const po = ["title"], Ge = 48, vo = 8, go = /* @__PURE__ */ ue({
1178
1179
  __name: "ChangelogFloatingButton",
1179
1180
  setup(o) {
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);
1181
+ const { t: e } = he(), t = ge(), s = V(() => {
1182
+ var b;
1183
+ return !!((b = t.sessionUser.value) != null && b.role.isAdmin);
1184
+ }), l = k(!1), a = k(null);
1184
1185
  function r() {
1185
- var C, y;
1186
+ var b, y;
1186
1187
  return {
1187
- width: ((C = a.value) == null ? void 0 : C.offsetWidth) ?? Ge,
1188
+ width: ((b = a.value) == null ? void 0 : b.offsetWidth) ?? Ge,
1188
1189
  height: ((y = a.value) == null ? void 0 : y.offsetHeight) ?? Ge
1189
1190
  };
1190
1191
  }
1191
- const u = x({ x: 0, y: 0 });
1192
- function v(C, y, S) {
1193
- return Math.min(Math.max(C, y), S);
1192
+ const u = k({ x: 0, y: 0 });
1193
+ function v(b, y, x) {
1194
+ return Math.min(Math.max(b, y), x);
1194
1195
  }
1195
1196
  function p() {
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;
1197
+ const { width: b, height: y } = r(), x = Math.max(se, window.innerWidth - b - se - vo), T = Math.max(se, window.innerHeight - y - se), O = u.value.x + b / 2;
1197
1198
  u.value = {
1198
- x: O < window.innerWidth / 2 ? se : S,
1199
+ x: O < window.innerWidth / 2 ? se : x,
1199
1200
  y: v(u.value.y, se, T)
1200
1201
  };
1201
1202
  }
1202
1203
  function L() {
1203
- u.value = fo(r().height, window.innerHeight);
1204
+ u.value = mo(r().height, window.innerHeight);
1204
1205
  }
1205
1206
  Ie(() => {
1206
1207
  L(), window.addEventListener("resize", p), window.addEventListener("orientationchange", p);
1207
1208
  }), gt(() => {
1208
1209
  window.removeEventListener("resize", p), window.removeEventListener("orientationchange", p);
1209
- }), Z(l, async (C) => {
1210
- C && (await yt(), L());
1210
+ }), q(s, async (b) => {
1211
+ b && (await yt(), L());
1211
1212
  });
1212
- const F = x(!1);
1213
- let B = null, K = !1;
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);
1213
+ const F = k(!1);
1214
+ let A = null, K = !1;
1215
+ function Z(b) {
1216
+ A = { x: b.clientX, y: b.clientY, px: u.value.x, py: u.value.y }, F.value = !0, K = !1, b.currentTarget.setPointerCapture(b.pointerId);
1216
1217
  }
1217
- function U(C) {
1218
- if (!B) return;
1219
- const y = C.clientX - B.x, S = C.clientY - B.y;
1220
- Math.abs(y) + Math.abs(S) > 3 && (K = !0);
1218
+ function te(b) {
1219
+ if (!A) return;
1220
+ const y = b.clientX - A.x, x = b.clientY - A.y;
1221
+ Math.abs(y) + Math.abs(x) > 3 && (K = !0);
1221
1222
  const { width: T, height: O } = r();
1222
1223
  u.value = {
1223
- x: v(B.px + y, 0, window.innerWidth - T),
1224
- y: v(B.py + S, 0, window.innerHeight - O)
1224
+ x: v(A.px + y, 0, window.innerWidth - T),
1225
+ y: v(A.py + x, 0, window.innerHeight - O)
1225
1226
  };
1226
1227
  }
1227
- function $() {
1228
- B = null, F.value = !1, p();
1228
+ function D() {
1229
+ A = null, F.value = !1, p();
1229
1230
  }
1230
- function G() {
1231
- B && ($(), K || (s.value = !0));
1231
+ function B() {
1232
+ A && (D(), K || (l.value = !0));
1232
1233
  }
1233
- return (C, y) => {
1234
- const S = W("FmIcon");
1234
+ return (b, y) => {
1235
+ const x = Y("FmIcon");
1235
1236
  return i(), ie(ht, { to: "body" }, [
1236
- l.value ? (i(), m(J, { key: 0 }, [
1237
- w("div", {
1237
+ s.value ? (i(), m(H, { key: 0 }, [
1238
+ S("div", {
1238
1239
  ref_key: "wrapperRef",
1239
1240
  ref: a,
1240
1241
  class: ae(["fixed z-50 cursor-grab touch-none", F.value ? "" : "transition-[left,top] duration-200 ease-out"]),
@@ -1242,35 +1243,35 @@ const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1242
1243
  }, [
1243
1244
  I(We, null, {
1244
1245
  default: le(() => [
1245
- w("button", {
1246
+ S("button", {
1246
1247
  type: "button",
1247
- title: D(e)("inventory.changelog.title"),
1248
+ title: R(e)("inventory.changelog.title"),
1248
1249
  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"]),
1249
- onPointerdown: Q,
1250
- onPointermove: U,
1251
- onPointerup: G,
1252
- onPointercancel: $
1250
+ onPointerdown: Z,
1251
+ onPointermove: te,
1252
+ onPointerup: B,
1253
+ onPointercancel: D
1253
1254
  }, [
1254
- I(S, {
1255
+ I(x, {
1255
1256
  name: "history",
1256
1257
  size: "md",
1257
1258
  outline: ""
1258
1259
  }),
1259
- w("span", null, b(D(e)("inventory.changelog.fabLabel")), 1)
1260
- ], 42, mo)
1260
+ S("span", null, w(R(e)("inventory.changelog.fabLabel")), 1)
1261
+ ], 42, po)
1261
1262
  ]),
1262
1263
  _: 1
1263
1264
  })
1264
1265
  ], 6),
1265
- I(co, {
1266
- modelValue: s.value,
1267
- "onUpdate:modelValue": y[0] || (y[0] = (T) => s.value = T)
1266
+ I(fo, {
1267
+ modelValue: l.value,
1268
+ "onUpdate:modelValue": y[0] || (y[0] = (T) => l.value = T)
1268
1269
  }, null, 8, ["modelValue"])
1269
1270
  ], 64)) : E("", !0)
1270
1271
  ]);
1271
1272
  };
1272
1273
  }
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({
1274
+ }), yo = { class: "flex items-center gap-8" }, ho = { class: "flex flex-col gap-8 text-fm-color-typo-secondary" }, _o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, bo = /* @__PURE__ */ ue({
1274
1275
  __name: "DeprecateSoonWarningDialog",
1275
1276
  props: /* @__PURE__ */ Ue({
1276
1277
  featureName: {}
@@ -1280,12 +1281,12 @@ const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1280
1281
  }),
1281
1282
  emits: /* @__PURE__ */ Ue(["proceed"], ["update:modelValue"]),
1282
1283
  setup(o, { emit: e }) {
1283
- const t = bt(o, "modelValue"), l = e;
1284
- function s() {
1285
- t.value = !1, l("proceed");
1284
+ const t = bt(o, "modelValue"), s = e;
1285
+ function l() {
1286
+ t.value = !1, s("proceed");
1286
1287
  }
1287
1288
  return (a, r) => {
1288
- const u = W("FmSpacer"), v = W("FmButton"), p = W("FmDialog");
1289
+ const u = Y("FmSpacer"), v = Y("FmButton"), p = Y("FmDialog");
1289
1290
  return i(), ie(p, {
1290
1291
  modelValue: t.value,
1291
1292
  "onUpdate:modelValue": r[1] || (r[1] = (L) => t.value = L),
@@ -1295,9 +1296,9 @@ const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1295
1296
  "max-width": "520px"
1296
1297
  }, {
1297
1298
  "dialog-header": le(() => [
1298
- w("div", go, [
1299
- r[2] || (r[2] = w("span", null, "Feature removal notice", -1)),
1300
- I(Ut)
1299
+ S("div", yo, [
1300
+ r[2] || (r[2] = S("span", null, "Feature removal notice", -1)),
1301
+ I(Ot)
1301
1302
  ])
1302
1303
  ]),
1303
1304
  "dialog-footer": le(() => [
@@ -1309,32 +1310,32 @@ const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1309
1310
  }),
1310
1311
  I(v, {
1311
1312
  label: "Continue",
1312
- onClick: s
1313
+ onClick: l
1313
1314
  })
1314
1315
  ]),
1315
1316
  default: le(() => [
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))
1317
+ S("div", ho, [
1318
+ S("p", _o, w(a.featureName ?? "This feature") + " will be removed in a future release. ", 1),
1319
+ r[3] || (r[3] = S("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))
1319
1320
  ])
1320
1321
  ]),
1321
1322
  _: 1
1322
1323
  }, 8, ["modelValue"]);
1323
1324
  };
1324
1325
  }
1325
- }), bo = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, xo = /* @__PURE__ */ ue({
1326
+ }), xo = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, wo = /* @__PURE__ */ ue({
1326
1327
  __name: "NavigationTab",
1327
1328
  setup(o) {
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(
1329
+ const e = Ct(), t = Ne(), s = ge(), l = Kt(), a = Mt(), r = k(!1), u = k(null), v = k(null), p = k(!1), L = k(null), F = k(null), A = V(
1329
1330
  () => {
1330
- var y, S;
1331
- return (S = Oe(((y = L.value) == null ? void 0 : y.featureKey) ?? "")) == null ? void 0 : S.label;
1331
+ var y, x;
1332
+ return (x = Oe(((y = L.value) == null ? void 0 : y.featureKey) ?? "")) == null ? void 0 : x.label;
1332
1333
  }
1333
1334
  ), { menuItems: K } = Ye();
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 });
1335
+ q([() => s.currentBusiness.value, () => e.name], ([y, x]) => {
1336
+ (y == null ? void 0 : y.menuVersion) === "v3" && (x === me.INGREDIENTS || x === me.RECIPE || x === me.UNIT) && t.push({ name: me.STOCK });
1336
1337
  });
1337
- const Q = V({
1338
+ const Z = V({
1338
1339
  get() {
1339
1340
  if (e.name)
1340
1341
  return String(e.name);
@@ -1342,57 +1343,57 @@ const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1342
1343
  set(y) {
1343
1344
  var d;
1344
1345
  if (!y) return;
1345
- const S = String(y), T = Dt.find((h) => h.route === S), O = Vt(S, s.value);
1346
+ const x = String(y), T = Vt.find((h) => h.route === x), O = It(x, l.value);
1346
1347
  if ((d = Oe((T == null ? void 0 : T.featureKey) ?? "")) != null && d.deprecateSoon) {
1347
- L.value = T ?? null, F.value = S, p.value = !0;
1348
+ L.value = T ?? null, F.value = x, p.value = !0;
1348
1349
  return;
1349
1350
  }
1350
1351
  if (T && O.disabled) {
1351
1352
  u.value = T, v.value = O, r.value = !0;
1352
1353
  return;
1353
1354
  }
1354
- t.push({ name: S });
1355
+ t.push({ name: x });
1355
1356
  }
1356
1357
  });
1357
- function U() {
1358
+ function te() {
1358
1359
  F.value && (t.push({ name: F.value }), F.value = null);
1359
1360
  }
1360
- const $ = V(
1361
+ const D = V(
1361
1362
  () => {
1362
1363
  var y;
1363
- return `NavigationTab.${(y = l.currentBusiness.value) == null ? void 0 : y._id}`;
1364
+ return `NavigationTab.${(y = s.currentBusiness.value) == null ? void 0 : y._id}`;
1364
1365
  }
1365
- ), G = x(!1), C = V({
1366
+ ), B = k(!1), b = V({
1366
1367
  get() {
1367
- return G.value;
1368
+ return B.value;
1368
1369
  },
1369
1370
  set(y) {
1370
- G.value = y, y || a.setItem($.value, "true");
1371
+ B.value = y, y || a.setItem(D.value, "true");
1371
1372
  }
1372
1373
  });
1373
- return Z([() => $.value], () => {
1374
- G.value = !1, setTimeout(() => {
1375
- C.value = !a.getItem($.value);
1374
+ return q([() => D.value], () => {
1375
+ B.value = !1, setTimeout(() => {
1376
+ b.value = !a.getItem(D.value);
1376
1377
  }, 2e3);
1377
- }), (y, S) => {
1378
- const T = W("FmCollapsibleTabs");
1379
- return i(), m("div", bo, [
1378
+ }), (y, x) => {
1379
+ const T = Y("FmCollapsibleTabs");
1380
+ return i(), m("div", xo, [
1380
1381
  I(T, {
1381
- modelValue: Q.value,
1382
- "onUpdate:modelValue": S[0] || (S[0] = (O) => Q.value = O),
1383
- items: D(K)
1382
+ modelValue: Z.value,
1383
+ "onUpdate:modelValue": x[0] || (x[0] = (O) => Z.value = O),
1384
+ items: R(K)
1384
1385
  }, null, 8, ["modelValue", "items"]),
1385
- I(Mt, {
1386
+ I(Ut, {
1386
1387
  modelValue: r.value,
1387
- "onUpdate:modelValue": S[1] || (S[1] = (O) => r.value = O),
1388
+ "onUpdate:modelValue": x[1] || (x[1] = (O) => r.value = O),
1388
1389
  capability: u.value,
1389
1390
  result: v.value
1390
1391
  }, null, 8, ["modelValue", "capability", "result"]),
1391
- I(_o, {
1392
+ I(bo, {
1392
1393
  modelValue: p.value,
1393
- "onUpdate:modelValue": S[2] || (S[2] = (O) => p.value = O),
1394
- "feature-name": B.value,
1395
- onProceed: U
1394
+ "onUpdate:modelValue": x[2] || (x[2] = (O) => p.value = O),
1395
+ "feature-name": A.value,
1396
+ onProceed: te
1396
1397
  }, null, 8, ["modelValue", "feature-name"])
1397
1398
  ]);
1398
1399
  };
@@ -1400,29 +1401,29 @@ const mo = ["title"], Ge = 48, po = 8, vo = /* @__PURE__ */ ue({
1400
1401
  });
1401
1402
  typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
1402
1403
  let o, e;
1403
- return { promise: new Promise((l, s) => {
1404
- o = l, e = s;
1404
+ return { promise: new Promise((s, l) => {
1405
+ o = s, e = l;
1405
1406
  }), resolve: o, reject: e };
1406
1407
  });
1407
1408
  typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(o) {
1408
1409
  return await new Promise((e) => setTimeout(e, o)), Promise.resolve(this);
1409
1410
  });
1410
- const wo = {
1411
+ const ko = {
1411
1412
  key: 0,
1412
1413
  class: "flex h-5 items-center justify-center bg-amber-100 px-12 text-xs font-medium text-amber-800 shadow-sm"
1413
- }, zo = /* @__PURE__ */ ue({
1414
+ }, Go = /* @__PURE__ */ ue({
1414
1415
  __name: "App",
1415
1416
  setup(o) {
1416
- const e = ge(), t = Kt(), l = $t(), s = window.location.href.includes("print-preview");
1417
+ const e = ge(), t = zt(), s = $t(), l = window.location.href.includes("print-preview");
1417
1418
  Ie(() => {
1418
1419
  if (window.location.href.includes("print-preview")) {
1419
1420
  e.setEmbedded(!0), document.body.classList.add("print-mode");
1420
1421
  return;
1421
1422
  }
1422
- e.registerSidebarComponent(xo), t.initGoogleMap(l.appApi.googleMap).catch(() => {
1423
+ e.registerSidebarComponent(wo), t.initGoogleMap(s.appApi.googleMap).catch(() => {
1423
1424
  console.error("Google map cannot be loaded");
1424
1425
  });
1425
- }), Z([() => e.currentCountry.value], () => {
1426
+ }), q([() => e.currentCountry.value], () => {
1426
1427
  a();
1427
1428
  });
1428
1429
  async function a() {
@@ -1433,13 +1434,13 @@ const wo = {
1433
1434
  console.error("error when trying to reset businesses:", u);
1434
1435
  }
1435
1436
  }
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 }))
1437
+ return (r, u) => (i(), m(H, null, [
1438
+ R(s).isDev && !R(l) ? (i(), m("div", ko, " Non-production environment ")) : E("", !0),
1439
+ I(Zt),
1440
+ R(l) ? E("", !0) : (i(), ie(go, { key: 1 }))
1440
1441
  ], 64));
1441
1442
  }
1442
1443
  });
1443
1444
  export {
1444
- zo as default
1445
+ Go as default
1445
1446
  };