@feedmepos/mf-inventory-portal 1.7.13-dev.3 → 1.7.13-dev.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 (94) hide show
  1. package/dist/{App-OcI38sEw.js → App-Cfp4CqzQ.js} +516 -511
  2. package/dist/{ApprovalView-qTRrEvTp.js → ApprovalView-DO91AQ5f.js} +9 -9
  3. package/dist/{BindingsDialog-G8tFbm7v.js → BindingsDialog-DUj0z6N7.js} +2 -2
  4. package/dist/{BindingsPicker-DB3mjjVh.js → BindingsPicker-CD2J6-_Z.js} +2 -2
  5. package/dist/{BindingsTable-DLf8XLyn.js → BindingsTable-B2FEKZXU.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-2AWitWXo.js → BulkReceiveRequestView-ejHyukEp.js} +19 -19
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DpqPCG-m.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-ashHOuZt.js} +6 -2
  8. package/dist/{ClosingDraftView-c25_GCaw.js → ClosingDraftView-tIvrsfYH.js} +19 -19
  9. package/dist/{ClosingHistoryView-Cy2yMiEc.js → ClosingHistoryView-BYVZ01Ma.js} +5 -5
  10. package/dist/{ClosingTemplateView-BzaVZ1Mf.js → ClosingTemplateView-C-hL9uPv.js} +16 -16
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Dlh4ThV0.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BffF8S_q.js} +1 -1
  12. package/dist/{DefaultView-e9RSHejw.js → DefaultView-BLbtx0Ho.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-BSbiO2Vd.js → DeliveryOrderPrintPreview-BLQHL7aB.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-D_8msVau.js → EmailDialog.vue_vue_type_script_setup_true_lang-BnTAuutB.js} +23 -23
  15. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DUjcebMR.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Mxhn0b6c.js} +1 -1
  16. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BA6stZHF.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-hrk0cTBX.js} +2 -2
  17. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-C28nZw_t.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-hTQmIyaf.js} +2 -2
  18. package/dist/{FmMultiselectDialog-DsA4X91e.js → FmMultiselectDialog-Bi6XlAAU.js} +2 -2
  19. package/dist/{FmMultiselectDialog-DEg8KNwS.js → FmMultiselectDialog-Bpi5rI0h.js} +1 -1
  20. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CPlywwpg.js → FmUnitInput.vue_vue_type_script_setup_true_lang-e55tnl4u.js} +6 -6
  21. package/dist/{ImportView-D9QCHpOd.js → ImportView-xPTzBekx.js} +6 -6
  22. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-C7iOvnZV.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-tvmS42s_.js} +1 -1
  23. package/dist/{IngredientGroupView-BRH304Pf.js → IngredientGroupView-RFcqjF8T.js} +5 -5
  24. package/dist/{IngredientsView-BUGYJ6cN.js → IngredientsView-CvWOgquN.js} +15 -15
  25. package/dist/{IntegrationExplorerView-Z3_x4C5I.js → IntegrationExplorerView-CYNhsJSS.js} +4 -4
  26. package/dist/{IntegrationView-ClWTgLai.js → IntegrationView-ZtLokbu3.js} +19 -15
  27. package/dist/{InventoryBindingForm-B7tGISLQ.js → InventoryBindingForm-DwiAIf5v.js} +1 -1
  28. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DOWePtXq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-njDaQe10.js} +5 -5
  29. package/dist/{InventoryBindingSummary-j3YGRPOt.js → InventoryBindingSummary-zim_Bp5_.js} +1 -1
  30. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CPpO-iyC.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CfTgt5xW.js} +1 -1
  31. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BP8f4hlw.js → PremiumBadge.vue_vue_type_script_setup_true_lang-LLtd1VvM.js} +1 -1
  32. package/dist/{ProductionView-DGB2sdwD.js → ProductionView-BWn7RBEg.js} +7 -7
  33. package/dist/{PublishView-CL747KZU.js → PublishView-DFXOi7Hx.js} +3 -3
  34. package/dist/{PurchaseOrderPrintPreview-C5AB03ht.js → PurchaseOrderPrintPreview-CG6kBQ26.js} +2 -2
  35. package/dist/{ReceiveRequestView-BDy40tBg.js → ReceiveRequestView-DKMVMo7M.js} +14 -14
  36. package/dist/{RecipeView-BbBZGBPb.js → RecipeView-cLLKlLmE.js} +17 -17
  37. package/dist/{SettingsView-rcalnrlB.js → SettingsView-Cmf2ZOUL.js} +4 -4
  38. package/dist/{StockView-BSLGMo1e.js → StockView-DTai8l8U.js} +21 -21
  39. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeEq2HQe.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BlKm7GLw.js} +1 -1
  40. package/dist/{SupplierView-DOq8oosU.js → SupplierView-CRAHOOLm.js} +12 -12
  41. package/dist/{SurchargeView-BK9Yakao.js → SurchargeView-3XymEvcr.js} +6 -6
  42. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DQRfvdyo.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DcXfQr_8.js} +2 -2
  43. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CjfzWy2p.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-qhJVHahS.js} +1 -1
  44. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-6qKRU6v7.js → TransferDetails.vue_vue_type_script_setup_true_lang-CibsrZXw.js} +20 -20
  45. package/dist/{TransferTemplateView-BmWxWDe8.js → TransferTemplateView-ByhvK4Ua.js} +20 -20
  46. package/dist/{UnitCostHistoryView-BCvCf-2e.js → UnitCostHistoryView-DHHWNJYA.js} +4 -4
  47. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DJu3u-cT.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-bQu2KOI7.js} +4 -4
  48. package/dist/{UnitView-CW8GRw2n.js → UnitView-BZTS-Ahu.js} +7 -7
  49. package/dist/{WarehouseView-ZWuCwzuM.js → WarehouseView-DVak1RPs.js} +6 -6
  50. package/dist/{WastageTemplateView-DkwVp2Bc.js → WastageTemplateView-CUDL3HUD.js} +14 -14
  51. package/dist/{app-BJsy0dhl.js → app-BUQUpe4c.js} +47 -15
  52. package/dist/app.d.ts +32 -0
  53. package/dist/app.js +1 -1
  54. package/dist/{closing-template-DdxIx-dq.js → closing-template-DzxDiEQB.js} +1 -1
  55. package/dist/cypress/component/ChangelogPanel.cy.d.ts +1 -0
  56. package/dist/cypress/support/component.d.ts +1 -2
  57. package/dist/{date2-BySoG7zL.js → date2-6jkfRNS_.js} +1 -1
  58. package/dist/{dayjs.min-CEK_HLa5.js → dayjs.min-ByRnXzrl.js} +1 -1
  59. package/dist/{decimal-CxH3h_oz.js → decimal-CqWBdj8E.js} +2 -2
  60. package/dist/{defineDeepModel-BiNh3hbS.js → defineDeepModel-CaT-4fiq.js} +1 -1
  61. package/dist/{duplicate-template-BqTirEVQ.js → duplicate-template-Cyvx-WK7.js} +1 -1
  62. package/dist/{feature-CtiarMKO.js → feature-FjXz4WXw.js} +2 -2
  63. package/dist/{format-time-from-id-BZlQSqcg.js → format-time-from-id-cSri3OoO.js} +1 -1
  64. package/dist/{format-unit-display-Ckyw7NDq.js → format-unit-display-DPbcT7Ff.js} +12 -12
  65. package/dist/{import-export.helper-93ZgMgfA.js → import-export.helper-_yqcePYs.js} +6 -6
  66. package/dist/{index-OMz6kBpd.js → index-CGvNoBid.js} +1 -1
  67. package/dist/{index-6U0mJTRK.js → index-CyJVMHQW.js} +1 -1
  68. package/dist/{index-BDmWjw_1.js → index-nSL5yxNn.js} +3 -3
  69. package/dist/{inventory-core-dart.default-BmR8gM8k.js → inventory-core-dart.default-DSYRPQNZ.js} +1 -1
  70. package/dist/{lz-string-BgsMxnd4.js → lz-string-iyER1Klb.js} +1 -1
  71. package/dist/{netsuite-DFRzj2t1.js → netsuite-BD8LVxaA.js} +2 -2
  72. package/dist/{number-D-_PL2pH.js → number-C7CJ9ZfE.js} +3 -3
  73. package/dist/{predefined-templates-Ccsy5pq1.js → predefined-templates-o-_pKVSM.js} +1 -1
  74. package/dist/{purchase-order-template-DhWqGEYn.js → purchase-order-template-BHS8T1VA.js} +1 -1
  75. package/dist/{recalculationUtils-DBZx8AEF.js → recalculationUtils-BCByr_CU.js} +1 -1
  76. package/dist/{rules-14YnQFVP.js → rules-wZo-8FZ0.js} +2 -2
  77. package/dist/{stock-NwBpU2GU.js → stock-CnAjxV7P.js} +3 -3
  78. package/dist/{stock-CqPXExNE.js → stock-DwqEvWM5.js} +1 -1
  79. package/dist/{supplier-BGh3ELiI.js → supplier-DkqNwQmi.js} +2 -2
  80. package/dist/{surcharge-B2A5F8CG.js → surcharge-Csj1WYbH.js} +1 -1
  81. package/dist/tsconfig.app.tsbuildinfo +1 -1
  82. package/dist/{uom-rules-B9vLSzRQ.js → uom-rules-BI1CdWeS.js} +1 -1
  83. package/dist/{use-ingredient-select-dialog-vwF7iReq.js → use-ingredient-select-dialog-5AqoZJDA.js} +2 -2
  84. package/dist/{use-inventory-binding-dialog-DBp_gbnj.js → use-inventory-binding-dialog-ChiyhiuP.js} +2 -2
  85. package/dist/{use-template-enabled-locations-DSvlNPYu.js → use-template-enabled-locations-BqXxegct.js} +2 -2
  86. package/dist/{use-transfer-locations-OMxT9ofA.js → use-transfer-locations-Ckj_diGt.js} +2 -2
  87. package/dist/{useHrmPermission-BbjcDYMn.js → useHrmPermission-USG_KRoq.js} +1 -1
  88. package/dist/{useNavigationMenu-CJw7QuVt.js → useNavigationMenu-BhYf87KI.js} +2 -2
  89. package/dist/{useSseClient-CT69SXDP.js → useSseClient-BqoE-ir6.js} +1 -1
  90. package/dist/views/changelog/components/ChangelogFloatingButton.spec.d.ts +1 -0
  91. package/dist/views/changelog/composables/fab-position.d.ts +21 -0
  92. package/dist/{vue-i18n--DyBLMYh.js → vue-i18n-DoKioQ81.js} +269 -269
  93. package/dist/{xlsx.util-BthUZo9U.js → xlsx.util-BXjE2o-3.js} +2 -2
  94. package/package.json +4 -4
@@ -1,36 +1,36 @@
1
- import { ref as $, onUnmounted as dt, computed as R, defineComponent as ce, watch as q, onMounted as Fe, resolveComponent as H, createElementBlock as c, openBlock as i, createBlock as pe, createCommentVNode as E, unref as L, createVNode as D, createElementVNode as g, toDisplayString as _, Fragment as z, renderList as ne, withKeys as Me, normalizeClass as se, withModifiers as ft, withCtx as te, createTextVNode as le, h as mt, onBeforeUnmount as pt, nextTick as vt, Teleport as gt, normalizeStyle as yt, withDirectives as ht, vModelText as _t } from "vue";
2
- import { _ as xt } from "./empty-placeholder-B0QU467o.js";
3
- import { u as Ke, a as He, R as ue, d as bt, S as wt, b as kt } from "./app-BJsy0dhl.js";
1
+ import { ref as S, onUnmounted as ct, computed as C, defineComponent as ce, watch as q, onMounted as Fe, resolveComponent as H, createElementBlock as c, openBlock as i, createBlock as pe, createCommentVNode as E, unref as $, createVNode as D, createElementVNode as g, toDisplayString as _, Fragment as z, renderList as ne, withKeys as Me, normalizeClass as se, withModifiers as dt, withCtx as te, createTextVNode as re, h as ft, onBeforeUnmount as mt, nextTick as pt, Teleport as vt, normalizeStyle as gt, withDirectives as yt, vModelText as ht } from "vue";
2
+ import { _ as _t } from "./empty-placeholder-B0QU467o.js";
3
+ import { u as je, a as Ke, R as ue, d as xt, S as bt, b as wt } from "./app-BUQUpe4c.js";
4
4
  import { useCoreStore as ge, useI18n as he } from "@feedmepos/mf-common";
5
- import { useRouter as Ee, useRoute as St } from "vue-router";
6
- import { u as $t, a as Lt, I as Ct } from "./feature-CtiarMKO.js";
7
- import { u as Rt } from "./netsuite-DFRzj2t1.js";
8
- import { u as Je } from "./useNavigationMenu-CJw7QuVt.js";
9
- import { useBreakpoints as Dt } from "@feedmepos/ui-library";
10
- import { F as Ne } from "./FmAdminBadge-DlplQOHb.js";
11
- import { i as It, _ as Ft } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DUjcebMR.js";
12
- import { F as Et } from "./decimal-CxH3h_oz.js";
13
- import { t as Nt, a as Pt } from "./date2-BySoG7zL.js";
14
- import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- import { u as Vt } from "./useTabStorage-BkIVScW_.js";
16
- import { u as Bt } from "./googlemap-D9vA7GsS.js";
17
- function Ut() {
5
+ import { useRouter as Ee, useRoute as kt } from "vue-router";
6
+ import { u as St, a as $t, I as Lt } from "./feature-FjXz4WXw.js";
7
+ import { u as Rt } from "./netsuite-BD8LVxaA.js";
8
+ import { u as He } from "./useNavigationMenu-BhYf87KI.js";
9
+ import { useBreakpoints as Ct } from "@feedmepos/ui-library";
10
+ import { F as Pe } from "./FmAdminBadge-DlplQOHb.js";
11
+ import { i as Dt, _ as It } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Mxhn0b6c.js";
12
+ import { F as Ft } from "./decimal-CqWBdj8E.js";
13
+ import { t as Et, a as Pt } from "./date2-6jkfRNS_.js";
14
+ import { _ as Nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
+ import { u as Tt } from "./useTabStorage-BkIVScW_.js";
16
+ import { u as Vt } from "./googlemap-D9vA7GsS.js";
17
+ function Bt() {
18
18
  return {
19
19
  loadingHookInstalled: !1,
20
20
  isLoading: !1
21
21
  };
22
22
  }
23
- const me = $(Ut());
24
- function At() {
25
- const a = Ee();
23
+ const me = S(Bt());
24
+ function Ut() {
25
+ const o = Ee();
26
26
  if (!me.value.loadingHookInstalled) {
27
27
  me.value.loadingHookInstalled = !0;
28
- const e = a.beforeEach(() => {
28
+ const e = o.beforeEach(() => {
29
29
  me.value.isLoading = !0;
30
- }), t = a.afterEach(() => {
30
+ }), t = o.afterEach(() => {
31
31
  me.value.isLoading = !1;
32
32
  });
33
- dt(() => {
33
+ ct(() => {
34
34
  me.value.loadingHookInstalled = !1, e(), t();
35
35
  });
36
36
  }
@@ -40,23 +40,23 @@ function At() {
40
40
  }
41
41
  };
42
42
  }
43
- function Mt() {
44
- const { firstAccessibleRouteName: a } = Je();
45
- return { hasAnyAccessibleInventoryRoute: R(() => a.value !== null) };
43
+ function At() {
44
+ const { firstAccessibleRouteName: o } = He();
45
+ return { hasAnyAccessibleInventoryRoute: C(() => o.value !== null) };
46
46
  }
47
- const Ot = {
47
+ const Mt = {
48
48
  key: 0,
49
49
  class: "flex flex-col items-center w-full h-full gap-24"
50
- }, zt = {
50
+ }, Ot = {
51
51
  key: 1,
52
52
  class: "flex flex-col pt-[200px] gap-32 items-center"
53
- }, Gt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, jt = { class: "fm-typo-en-title-lg-600" }, Kt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Ht = {
53
+ }, zt = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[600px]" }, Gt = { class: "fm-typo-en-title-lg-600" }, jt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Kt = {
54
54
  key: 2,
55
55
  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-[1000px]" }, Yt = { class: "fm-typo-en-title-lg-600" }, Wt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Xt = { class: "flex gap-16" }, qt = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, Zt = { href: "https://feedme.ai/form" }, Qt = /* @__PURE__ */ ce({
56
+ }, Ht = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Jt = { class: "fm-typo-en-title-lg-600" }, Yt = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, Xt = { class: "flex gap-16" }, Wt = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, qt = { href: "https://feedme.ai/form" }, Zt = /* @__PURE__ */ ce({
57
57
  __name: "InventoryView",
58
- setup(a) {
59
- const e = Ke(), t = He(), l = Rt(), s = ge(), o = Ee(), u = At(), r = $t(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: m } = Mt();
58
+ setup(o) {
59
+ const e = je(), t = Ke(), l = Rt(), s = ge(), a = Ee(), u = Ut(), r = St(), { t: v } = he(), { hasAnyAccessibleInventoryRoute: m } = At();
60
60
  q(
61
61
  [() => s.sessionUser.value, () => s.currentBusiness.value],
62
62
  ([O, I]) => {
@@ -68,61 +68,61 @@ const Ot = {
68
68
  h(O, I);
69
69
  });
70
70
  function h(O, I) {
71
- !O || !I || k();
71
+ !O || !I || w();
72
72
  }
73
- async function k() {
73
+ async function w() {
74
74
  return await e.init(), await l.readSetting().catch((O) => {
75
75
  console.error("[all] error on reading netsuite store", O);
76
76
  }), await t.init();
77
77
  }
78
- const P = R(() => o.currentRoute.value.name === ue.TRANSFER_TEMPLATE ? r.enablePoTemplate : o.currentRoute.value.name === ue.INGREDIENT_GROUP ? r.enableIngredientGroup : !0), U = R(
79
- () => o.currentRoute.value.matched.some((O) => {
80
- var S;
78
+ const N = C(() => a.currentRoute.value.name === ue.TRANSFER_TEMPLATE ? r.enablePoTemplate : a.currentRoute.value.name === ue.INGREDIENT_GROUP ? r.enableIngredientGroup : !0), U = C(
79
+ () => a.currentRoute.value.matched.some((O) => {
80
+ var R;
81
81
  const I = O.meta, Y = I == null ? void 0 : I.validationManifest;
82
- return (((S = Y == null ? void 0 : Y.requiredCaslPermissions) == null ? void 0 : S.length) ?? 0) > 0;
82
+ return (((R = Y == null ? void 0 : Y.requiredCaslPermissions) == null ? void 0 : R.length) ?? 0) > 0;
83
83
  })
84
- ), oe = R(() => {
84
+ ), oe = C(() => {
85
85
  if (!s.sessionUser.value) return !1;
86
86
  if (e._locations !== null && e.locations.length === 0) return !0;
87
87
  if (!r.isLoaded) return !1;
88
- const Y = o.currentRoute.value.name === ue.LOADING;
88
+ const Y = a.currentRoute.value.name === ue.LOADING;
89
89
  return !m.value && (Y || U.value);
90
90
  });
91
91
  return (O, I) => {
92
- const Y = H("FmSpacer"), S = H("FmCircularProgress"), T = H("FmButton"), G = H("RouterView");
92
+ const Y = H("FmSpacer"), R = H("FmCircularProgress"), T = H("FmButton"), G = H("RouterView");
93
93
  return i(), c("div", null, [
94
- L(u).isLoading ? (i(), c("div", Ot, [
94
+ $(u).isLoading ? (i(), c("div", Mt, [
95
95
  D(Y),
96
96
  g("div", null, [
97
- D(S, { size: "xl" })
97
+ D(R, { size: "xl" })
98
98
  ]),
99
99
  I[0] || (I[0] = g("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
100
100
  D(Y)
101
- ])) : oe.value ? (i(), c("div", zt, [
101
+ ])) : oe.value ? (i(), c("div", Ot, [
102
102
  I[1] || (I[1] = g("img", {
103
- src: xt,
103
+ src: _t,
104
104
  alt: "No permission",
105
105
  class: "w-[200px] h-[200px]"
106
106
  }, null, -1)),
107
- g("div", Gt, [
108
- g("div", jt, _(L(v)("inventory.common.noPermission.title")), 1),
109
- g("div", Kt, _(L(v)("inventory.common.noPermission.description")), 1)
107
+ g("div", zt, [
108
+ g("div", Gt, _($(v)("inventory.common.noPermission.title")), 1),
109
+ g("div", jt, _($(v)("inventory.common.noPermission.description")), 1)
110
110
  ])
111
- ])) : P.value ? L(s).sessionUser.value ? (i(), pe(G, { key: 3 })) : E("", !0) : (i(), c("div", Ht, [
112
- g("div", Jt, [
113
- g("div", Yt, _(L(v)("inventory.common.proPlan.title")), 1),
114
- g("div", Wt, _(L(v)("inventory.common.proPlan.subtitle")), 1)
111
+ ])) : N.value ? $(s).sessionUser.value ? (i(), pe(G, { key: 3 })) : E("", !0) : (i(), c("div", Kt, [
112
+ g("div", Ht, [
113
+ g("div", Jt, _($(v)("inventory.common.proPlan.title")), 1),
114
+ g("div", Yt, _($(v)("inventory.common.proPlan.subtitle")), 1)
115
115
  ]),
116
116
  g("div", Xt, [
117
- g("a", qt, [
117
+ g("a", Wt, [
118
118
  D(T, {
119
- label: L(v)("inventory.common.proPlan.comparePlans"),
119
+ label: $(v)("inventory.common.proPlan.comparePlans"),
120
120
  variant: "secondary"
121
121
  }, null, 8, ["label"])
122
122
  ]),
123
- g("a", Zt, [
123
+ g("a", qt, [
124
124
  D(T, {
125
- label: L(v)("inventory.common.proPlan.callUs"),
125
+ label: $(v)("inventory.common.proPlan.callUs"),
126
126
  "prepend-icon": "call"
127
127
  }, null, 8, ["label"])
128
128
  ])
@@ -131,7 +131,7 @@ const Ot = {
131
131
  ]);
132
132
  };
133
133
  }
134
- }), Ce = {
134
+ }), Re = {
135
135
  // Template/PO item rows carry no id of their own — the embedded sku's _id is
136
136
  // the element identity, and kit names the element from that object's name
137
137
  // field, so an item change reads "Items › <sku name> › …" instead of a bare
@@ -164,19 +164,27 @@ const Ot = {
164
164
  "customAttributes",
165
165
  "default",
166
166
  "defaultCost",
167
+ "defaultRemark",
168
+ "disabledMeasurements",
169
+ "groups",
167
170
  "inventoryBindings",
168
171
  "isInactive",
172
+ "items",
173
+ "locations",
169
174
  "low",
170
175
  "measurement",
171
176
  "measurements",
172
177
  "mid",
173
178
  "name",
174
179
  "operationalGroup",
180
+ "position",
175
181
  "precision",
176
182
  "priority",
177
183
  "recipe",
184
+ "ref",
178
185
  "rules",
179
186
  "sku",
187
+ "skuId",
180
188
  "thresholds",
181
189
  "trackingMeasurement",
182
190
  "type",
@@ -185,8 +193,8 @@ const Ot = {
185
193
  "version"
186
194
  ]
187
195
  }
188
- }, Re = {
189
- ...Ce,
196
+ }, Ce = {
197
+ ...Re,
190
198
  array_keys: {
191
199
  measurements: "id",
192
200
  "unit.measurements": "id",
@@ -196,21 +204,21 @@ const Ot = {
196
204
  "contains.alternatives": "_id"
197
205
  }
198
206
  };
199
- function en(a) {
200
- return a instanceof wt && a.errorResponse.statusCode === 409;
207
+ function Qt(o) {
208
+ return o instanceof bt && o.errorResponse.statusCode === 409;
201
209
  }
202
- const _e = bt((a, e) => ({
210
+ const _e = xt((o, e) => ({
203
211
  /**
204
212
  * Commits for one record. recordId is the changelog docId, `${dbName}/${id}`.
205
213
  * The dbName scopes the (access-checked) backend route; only the bare id is
206
214
  * sent — the backend rebuilds the docId server-side.
207
215
  */
208
- async getRecordChangelog(t, l, s, o) {
216
+ async getRecordChangelog(t, l, s, a) {
209
217
  const u = t.indexOf("/");
210
218
  if (u < 0) return [];
211
219
  const r = t.slice(0, u), v = t.slice(u + 1), m = new URLSearchParams({ id: v });
212
- l != null && m.set("limit", String(l)), o && m.set("before", o), s && (m.set("explain", "1"), m.set("schema", JSON.stringify(s)));
213
- const h = `${a.inventoryBackendUrl}/${r}/changelog?${m.toString()}`;
220
+ l != null && m.set("limit", String(l)), a && m.set("before", a), s && (m.set("explain", "1"), m.set("schema", JSON.stringify(s)));
221
+ const h = `${o.inventoryBackendUrl}/${r}/changelog?${m.toString()}`;
214
222
  return await e.get(h);
215
223
  },
216
224
  /**
@@ -220,7 +228,7 @@ const _e = bt((a, e) => ({
220
228
  */
221
229
  async listPurchaseOrders(t, l, s) {
222
230
  if (!t) return [];
223
- const o = new URLSearchParams({ start: l, end: s }), u = `${a.inventoryBackendUrl}/${t}/changelog/purchase-order?${o}`;
231
+ const a = new URLSearchParams({ start: l, end: s }), u = `${o.inventoryBackendUrl}/${t}/changelog/purchase-order?${a}`;
224
232
  return await e.get(u);
225
233
  },
226
234
  /**
@@ -230,7 +238,7 @@ const _e = bt((a, e) => ({
230
238
  */
231
239
  async listClosingDrafts(t, l, s) {
232
240
  if (!t) return [];
233
- const o = new URLSearchParams({ start: l, end: s }), u = `${a.inventoryBackendUrl}/${t}/changelog/closing-draft?${o}`;
241
+ const a = new URLSearchParams({ start: l, end: s }), u = `${o.inventoryBackendUrl}/${t}/changelog/closing-draft?${a}`;
234
242
  return await e.get(u);
235
243
  },
236
244
  /**
@@ -240,9 +248,9 @@ const _e = bt((a, e) => ({
240
248
  * write path — the backend passthrough for kit httpapi's GET /api/state.
241
249
  */
242
250
  async getState(t, l, s) {
243
- const o = new URLSearchParams({ id: l });
244
- s && o.set("at", s);
245
- const u = `${a.inventoryBackendUrl}/${t}/changelog/state?${o.toString()}`;
251
+ const a = new URLSearchParams({ id: l });
252
+ s && a.set("at", s);
253
+ const u = `${o.inventoryBackendUrl}/${t}/changelog/state?${a.toString()}`;
246
254
  return await e.get(u);
247
255
  },
248
256
  /**
@@ -253,7 +261,7 @@ const _e = bt((a, e) => ({
253
261
  */
254
262
  async listDomains(t) {
255
263
  if (!t) return [];
256
- const l = `${a.inventoryBackendUrl}/business_${t}/changelog/domains`;
264
+ const l = `${o.inventoryBackendUrl}/business_${t}/changelog/domains`;
257
265
  return await e.get(l);
258
266
  },
259
267
  /**
@@ -263,7 +271,7 @@ const _e = bt((a, e) => ({
263
271
  */
264
272
  async listDomainRecords(t, l) {
265
273
  if (!t) return [];
266
- const s = `${a.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(l)}`;
274
+ const s = `${o.inventoryBackendUrl}/business_${t}/changelog/domain/${encodeURIComponent(l)}`;
267
275
  return await e.get(s);
268
276
  },
269
277
  /**
@@ -273,58 +281,58 @@ const _e = bt((a, e) => ({
273
281
  */
274
282
  async listInventory(t, l) {
275
283
  if (!t) return [];
276
- const s = `${a.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${l}`;
284
+ const s = `${o.inventoryBackendUrl}/business_${t}/changelog/inventory?module=${l}`;
277
285
  return await e.get(s);
278
286
  }
279
287
  })), Se = 50;
280
- function tn() {
281
- const a = _e(), e = $([]), t = $(!1), l = $(!1);
282
- let s = null, o = 0;
288
+ function en() {
289
+ const o = _e(), e = S([]), t = S(!1), l = S(!1);
290
+ let s = null, a = 0;
283
291
  async function u(v, m, h) {
284
- const k = ++o;
292
+ const w = ++a;
285
293
  if (s = null, l.value = !1, !v) {
286
294
  e.value = [];
287
295
  return;
288
296
  }
289
297
  t.value = !0;
290
298
  try {
291
- const P = m ?? Se, U = await a.getRecordChangelog(v, P, h);
292
- if (k !== o) return;
293
- e.value = U, m == null && (s = { recordId: v, explain: h }, l.value = U.length === P);
294
- } catch (P) {
295
- throw k === o && (e.value = []), P;
299
+ const N = m ?? Se, U = await o.getRecordChangelog(v, N, h);
300
+ if (w !== a) return;
301
+ e.value = U, m == null && (s = { recordId: v, explain: h }, l.value = U.length === N);
302
+ } catch (N) {
303
+ throw w === a && (e.value = []), N;
296
304
  } finally {
297
- k === o && (t.value = !1);
305
+ w === a && (t.value = !1);
298
306
  }
299
307
  }
300
308
  async function r() {
301
309
  const v = e.value[e.value.length - 1];
302
310
  if (!s || !v || t.value || !l.value) return;
303
- const m = o;
311
+ const m = a;
304
312
  t.value = !0;
305
313
  try {
306
- const h = await a.getRecordChangelog(s.recordId, Se, s.explain, v.id);
307
- if (m !== o) return;
314
+ const h = await o.getRecordChangelog(s.recordId, Se, s.explain, v.id);
315
+ if (m !== a) return;
308
316
  e.value = [...e.value, ...h], l.value = h.length === Se;
309
317
  } finally {
310
- m === o && (t.value = !1);
318
+ m === a && (t.value = !1);
311
319
  }
312
320
  }
313
321
  return { commits: e, isLoading: t, hasMore: l, load: u, loadMore: r };
314
322
  }
315
- const Ye = 1e3;
316
- function nn(a, e) {
317
- return [...a, ...e].sort((t, l) => l.at.localeCompare(t.at));
323
+ const Je = 1e3;
324
+ function tn(o, e) {
325
+ return [...o, ...e].sort((t, l) => l.at.localeCompare(t.at));
318
326
  }
319
- function on() {
320
- const a = _e(), e = $([]);
327
+ function nn() {
328
+ const o = _e(), e = S([]);
321
329
  async function t(l) {
322
330
  if (e.value = [], !!l)
323
331
  try {
324
- e.value = await a.getRecordChangelog(
332
+ e.value = await o.getRecordChangelog(
325
333
  l,
326
- Ye,
327
- Re
334
+ Je,
335
+ Ce
328
336
  );
329
337
  } catch (s) {
330
338
  console.error("changelog per-entity load failed", s);
@@ -332,10 +340,10 @@ function on() {
332
340
  }
333
341
  return { commits: e, load: t };
334
342
  }
335
- function We(a) {
336
- if (!a) return null;
343
+ function Ye(o) {
344
+ if (!o) return null;
337
345
  try {
338
- const e = JSON.parse(a);
346
+ const e = JSON.parse(o);
339
347
  return typeof (e == null ? void 0 : e.changelogLabelKey) == "string" && typeof (e == null ? void 0 : e.verb) == "string" ? {
340
348
  labelKey: e.changelogLabelKey,
341
349
  verb: e.verb,
@@ -345,215 +353,215 @@ function We(a) {
345
353
  return null;
346
354
  }
347
355
  }
348
- function Xe(a) {
349
- return a.startsWith("inventory.changelog.");
356
+ function Xe(o) {
357
+ return o.startsWith("inventory.changelog.");
350
358
  }
351
- const qe = "";
352
- function De(a) {
353
- const e = a.indexOf(qe);
354
- return e === -1 ? { raw: a, human: a } : { raw: a.slice(0, e), human: a.slice(e + 1) };
359
+ const We = "";
360
+ function De(o) {
361
+ const e = o.indexOf(We);
362
+ return e === -1 ? { raw: o, human: o } : { raw: o.slice(0, e), human: o.slice(e + 1) };
355
363
  }
356
- const an = [
364
+ const on = [
357
365
  "inventory.changelog.label.recipe",
358
366
  "inventory.changelog.label.sku",
359
367
  "inventory.changelog.label.unit"
360
- ], sn = [...an, "Recipe", "Ingredient", "Unit"];
361
- function ln(a) {
362
- const { human: e } = De(a);
368
+ ], an = [...on, "Recipe", "Ingredient", "Unit"];
369
+ function sn(o) {
370
+ const { human: e } = De(o);
363
371
  if (!e) return { type: "Document", name: "", field: [] };
364
372
  const t = e.split(" › ");
365
- return t.length >= 2 && sn.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
373
+ return t.length >= 2 && an.includes(t[0]) ? { type: t[0], name: t[1], field: t.slice(2) } : { type: "Document", name: "", field: t };
366
374
  }
367
375
  const Oe = 800;
368
- function Ze(a, e, t = 2) {
369
- const l = ze(a), s = ze(e);
376
+ function qe(o, e, t = 2) {
377
+ const l = ze(o), s = ze(e);
370
378
  if (!l || !s) return null;
371
- let o = 0;
372
- for (; o < l.length && o < s.length && l[o] === s[o]; ) o++;
379
+ let a = 0;
380
+ for (; a < l.length && a < s.length && l[a] === s[a]; ) a++;
373
381
  let u = 0;
374
- for (; u < l.length - o && u < s.length - o && l[l.length - 1 - u] === s[s.length - 1 - u]; )
382
+ for (; u < l.length - a && u < s.length - a && l[l.length - 1 - u] === s[s.length - 1 - u]; )
375
383
  u++;
376
- const r = l.slice(o, l.length - u), v = s.slice(o, s.length - u);
384
+ const r = l.slice(a, l.length - u), v = s.slice(a, s.length - u);
377
385
  if (r.length > Oe || v.length > Oe) return null;
378
386
  const m = (h) => ({ type: "same", text: h });
379
- return un(
380
- [...l.slice(0, o).map(m), ...rn(r, v), ...l.slice(l.length - u).map(m)],
387
+ return rn(
388
+ [...l.slice(0, a).map(m), ...ln(r, v), ...l.slice(l.length - u).map(m)],
381
389
  t
382
390
  );
383
391
  }
384
- function ze(a) {
392
+ function ze(o) {
385
393
  try {
386
- const e = JSON.parse(a);
394
+ const e = JSON.parse(o);
387
395
  return e === null || typeof e != "object" ? null : JSON.stringify(e, null, 2).split(`
388
396
  `);
389
397
  } catch {
390
398
  return null;
391
399
  }
392
400
  }
393
- function rn(a, e) {
394
- const t = a.length, l = e.length, s = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
401
+ function ln(o, e) {
402
+ const t = o.length, l = e.length, s = Array.from({ length: t + 1 }, () => new Uint32Array(l + 1));
395
403
  for (let v = t - 1; v >= 0; v--)
396
404
  for (let m = l - 1; m >= 0; m--)
397
- s[v][m] = a[v] === e[m] ? s[v + 1][m + 1] + 1 : Math.max(s[v + 1][m], s[v][m + 1]);
398
- const o = [];
405
+ s[v][m] = o[v] === e[m] ? s[v + 1][m + 1] + 1 : Math.max(s[v + 1][m], s[v][m + 1]);
406
+ const a = [];
399
407
  let u = 0, r = 0;
400
408
  for (; u < t && r < l; )
401
- a[u] === e[r] ? (o.push({ type: "same", text: a[u] }), u++, r++) : s[u + 1][r] >= s[u][r + 1] ? (o.push({ type: "del", text: a[u] }), u++) : (o.push({ type: "add", text: e[r] }), r++);
402
- for (; u < t; ) o.push({ type: "del", text: a[u++] });
403
- for (; r < l; ) o.push({ type: "add", text: e[r++] });
404
- return o;
409
+ o[u] === e[r] ? (a.push({ type: "same", text: o[u] }), u++, r++) : s[u + 1][r] >= s[u][r + 1] ? (a.push({ type: "del", text: o[u] }), u++) : (a.push({ type: "add", text: e[r] }), r++);
410
+ for (; u < t; ) a.push({ type: "del", text: o[u++] });
411
+ for (; r < l; ) a.push({ type: "add", text: e[r++] });
412
+ return a;
405
413
  }
406
- function un(a, e) {
407
- const t = a.map(() => !1);
408
- a.forEach((o, u) => {
409
- if (o.type !== "same")
410
- for (let r = Math.max(0, u - e); r <= Math.min(a.length - 1, u + e); r++)
414
+ function rn(o, e) {
415
+ const t = o.map(() => !1);
416
+ o.forEach((a, u) => {
417
+ if (a.type !== "same")
418
+ for (let r = Math.max(0, u - e); r <= Math.min(o.length - 1, u + e); r++)
411
419
  t[r] = !0;
412
420
  });
413
421
  const l = [];
414
422
  let s = !1;
415
- return a.forEach((o, u) => {
416
- t[u] ? (l.push(o), s = !1) : s || (l.push({ type: "skip", text: "⋯" }), s = !0);
423
+ return o.forEach((a, u) => {
424
+ t[u] ? (l.push(a), s = !1) : s || (l.push({ type: "skip", text: "⋯" }), s = !0);
417
425
  }), l;
418
426
  }
419
- function cn(a, e) {
427
+ function un(o, e) {
420
428
  let t;
421
429
  try {
422
- t = JSON.parse(a);
430
+ t = JSON.parse(o);
423
431
  } catch {
424
- return a;
432
+ return o;
425
433
  }
426
434
  return t === null ? "—" : typeof t == "number" ? t.toLocaleString() : typeof t == "boolean" ? e(t ? "inventory.changelog.yes" : "inventory.changelog.no") : String(t);
427
435
  }
428
- function Ie(a, e, t = 0, l) {
436
+ function Ie(o, e, t = 0, l) {
429
437
  var m;
430
- const s = a.label == null ? void 0 : Xe(a.label) ? e(a.label) : a.label, o = s != null || a.value != null || a.display != null, u = !((m = a.kids) != null && m.length), r = [];
431
- o && r.push({
438
+ const s = o.label == null ? void 0 : Xe(o.label) ? e(o.label) : o.label, a = s != null || o.value != null || o.display != null, u = !((m = o.kids) != null && m.length), r = [];
439
+ a && r.push({
432
440
  depth: t,
433
441
  // A bare array index says nothing a reader needs — a leaf list entry
434
442
  // shows just its value. Branch nodes keep the index as their header.
435
443
  label: s != null && u && /^\d+$/.test(s) ? void 0 : s,
436
- text: u ? dn(a, e, l) : void 0,
437
- bookkeeping: !!a.bookkeeping
444
+ text: u ? cn(o, e, l) : void 0,
445
+ bookkeeping: !!o.bookkeeping
438
446
  });
439
- const v = o ? t + 1 : t;
440
- for (const h of a.kids ?? [])
447
+ const v = a ? t + 1 : t;
448
+ for (const h of o.kids ?? [])
441
449
  r.push(...Ie(h, e, v, l));
442
450
  return r;
443
451
  }
444
- function dn(a, e, t) {
445
- if (a.value == null) return a.display || void 0;
446
- const l = cn(a.value, e);
447
- return (t == null ? void 0 : t(l)) ?? a.display ?? l;
452
+ function cn(o, e, t) {
453
+ if (o.value == null) return o.display || void 0;
454
+ const l = un(o.value, e);
455
+ return (t == null ? void 0 : t(l)) ?? o.display ?? l;
448
456
  }
449
- function $e(a, e) {
450
- return JSON.stringify(a, null, 2).split(`
457
+ function $e(o, e) {
458
+ return JSON.stringify(o, null, 2).split(`
451
459
  `).map((t) => ({ type: e, text: t }));
452
460
  }
453
- function fn() {
454
- const a = _e(), e = /* @__PURE__ */ new Map(), t = $(!1), l = $(null);
455
- async function s(o) {
456
- const u = e.get(o.id);
461
+ function dn() {
462
+ const o = _e(), e = /* @__PURE__ */ new Map(), t = S(!1), l = S(null);
463
+ async function s(a) {
464
+ const u = e.get(a.id);
457
465
  if (u) {
458
466
  l.value = u;
459
467
  return;
460
468
  }
461
469
  t.value = !0;
462
470
  try {
463
- const r = o.doc_id.indexOf("/"), v = o.doc_id.slice(0, r), m = o.doc_id.slice(r + 1), [h, k] = await Promise.all([
464
- o.parent ? a.getState(v, m, o.parent) : Promise.resolve({}),
465
- a.getState(v, m, o.id)
466
- ]), U = { diff: o.parent ? Ze(JSON.stringify(h), JSON.stringify(k)) ?? [
471
+ const r = a.doc_id.indexOf("/"), v = a.doc_id.slice(0, r), m = a.doc_id.slice(r + 1), [h, w] = await Promise.all([
472
+ a.parent ? o.getState(v, m, a.parent) : Promise.resolve({}),
473
+ o.getState(v, m, a.id)
474
+ ]), U = { diff: a.parent ? qe(JSON.stringify(h), JSON.stringify(w)) ?? [
467
475
  ...$e(h, "del"),
468
- ...$e(k, "add")
469
- ] : $e(k, "add"), conflict: !1 };
470
- e.set(o.id, U), l.value = U;
476
+ ...$e(w, "add")
477
+ ] : $e(w, "add"), conflict: !1 };
478
+ e.set(a.id, U), l.value = U;
471
479
  } catch (r) {
472
- if (!en(r))
480
+ if (!Qt(r))
473
481
  throw l.value = null, r;
474
482
  const v = { diff: null, conflict: !0 };
475
- e.set(o.id, v), l.value = v;
483
+ e.set(a.id, v), l.value = v;
476
484
  } finally {
477
485
  t.value = !1;
478
486
  }
479
487
  }
480
488
  return { isLoading: t, result: l, load: s };
481
489
  }
482
- const mn = {
490
+ const fn = {
483
491
  key: 0,
484
492
  class: "flex justify-center p-16"
485
- }, pn = {
493
+ }, mn = {
486
494
  key: 1,
487
495
  class: "p-16 text-center text-gray-500"
488
- }, vn = {
496
+ }, pn = {
489
497
  key: 2,
490
498
  class: "flex h-full min-h-0 gap-8"
491
- }, gn = { class: "w-1/3 shrink-0 overflow-y-auto border-r border-gray-200 pr-4" }, yn = ["onClick", "onKeydown"], hn = { class: "fm-typo-en-body-md-600" }, _n = { class: "text-xs text-gray-500" }, xn = {
499
+ }, 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 = {
492
500
  key: 0,
493
501
  class: "flex-1 overflow-y-auto pl-4"
494
- }, bn = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, wn = { class: "flex flex-wrap items-center gap-8" }, kn = { class: "fm-typo-en-body-lg-600" }, Sn = {
502
+ }, xn = { class: "mb-12 flex flex-col gap-2 border-b border-gray-200 pb-8" }, bn = { class: "flex flex-wrap items-center gap-8" }, wn = { class: "fm-typo-en-body-lg-600" }, kn = {
495
503
  key: 0,
496
504
  class: "rounded-full bg-gray-100 px-8 text-xs text-gray-500"
497
- }, $n = { class: "text-xs text-gray-500" }, Ln = { class: "mb-12" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, Rn = {
505
+ }, Sn = { class: "text-xs text-gray-500" }, $n = { class: "mb-12" }, Ln = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary pl-8" }, Rn = {
498
506
  key: 0,
499
507
  class: "mb-12"
500
- }, Dn = {
508
+ }, Cn = {
501
509
  key: 1,
502
510
  class: "text-sm text-gray-400"
503
- }, In = {
511
+ }, Dn = {
504
512
  key: 2,
505
513
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
506
- }, Fn = {
514
+ }, In = {
507
515
  key: 0,
508
516
  class: "text-xs text-gray-400"
509
- }, En = { class: "fm-typo-en-body-md-600" }, Nn = { class: "flex flex-col gap-6" }, Pn = {
517
+ }, Fn = { class: "fm-typo-en-body-md-600" }, En = { class: "flex flex-col gap-6" }, Pn = {
510
518
  key: 0,
511
519
  class: "text-gray-700"
512
- }, Tn = { class: "min-w-[120px] shrink-0 text-gray-500" }, Vn = {
520
+ }, Nn = { class: "min-w-[120px] shrink-0 text-gray-500" }, Tn = {
513
521
  key: 0,
514
522
  class: "flex w-full flex-col gap-4"
515
- }, Bn = {
523
+ }, Vn = {
516
524
  key: 0,
517
525
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
518
- }, Un = { key: 0 }, An = { key: 1 }, Mn = {
526
+ }, Bn = { key: 0 }, Un = { key: 1 }, An = {
519
527
  key: 1,
520
528
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
521
- }, On = { key: 0 }, zn = { key: 1 }, Gn = {
529
+ }, Mn = { key: 0 }, On = { key: 1 }, zn = {
522
530
  key: 1,
523
531
  class: "w-full overflow-x-auto rounded border border-gray-200 py-4 font-mono text-xs"
524
- }, jn = {
532
+ }, Gn = {
525
533
  key: 2,
526
534
  class: "flex w-full flex-wrap items-baseline gap-4"
527
- }, Kn = {
535
+ }, jn = {
528
536
  key: 0,
529
537
  class: "rounded bg-red-50 px-4 text-red-700"
530
- }, Hn = {
538
+ }, Kn = {
531
539
  key: 1,
532
540
  class: "text-gray-400"
533
- }, Jn = {
541
+ }, Hn = {
534
542
  key: 2,
535
543
  class: "rounded bg-green-50 px-4 text-green-700"
536
- }, Yn = {
544
+ }, Jn = {
537
545
  key: 1,
538
546
  class: "text-sm text-gray-500"
539
- }, Wn = {
547
+ }, Yn = {
540
548
  key: 2,
541
549
  class: "mt-16 break-all border-t border-gray-200 pt-8 font-mono text-xs text-gray-400"
542
- }, Xn = { key: 0 }, qn = "capture baseline", Zn = /* @__PURE__ */ ce({
550
+ }, Xn = { key: 0 }, Wn = "capture baseline", qn = /* @__PURE__ */ ce({
543
551
  __name: "ChangelogPanel",
544
552
  props: {
545
553
  commits: {},
546
554
  isLoading: { type: Boolean },
547
555
  resolveName: { type: Function }
548
556
  },
549
- setup(a) {
550
- const e = a, { t } = he(), l = $(null), s = R(
557
+ setup(o) {
558
+ const e = o, { t } = he(), l = S(null), s = C(
551
559
  () => e.commits.find((p) => p.id === l.value)
552
- ), o = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), u = R(() => {
560
+ ), a = /* @__PURE__ */ new Set(["updatedAt", "createdAt", "updatedBy", "createdBy", "_rev"]), u = C(() => {
553
561
  var b;
554
562
  return (((b = s.value) == null ? void 0 : b.changes) ?? []).filter((B) => {
555
563
  const { raw: V } = De(B.path);
556
- return V === "@payload" || B.from == null && B.to == null ? !1 : !V.split(".").some((W) => o.has(W));
564
+ return V === "@payload" || B.from == null && B.to == null ? !1 : !V.split(".").some((X) => a.has(X));
557
565
  });
558
566
  });
559
567
  q(
@@ -564,16 +572,16 @@ const mn = {
564
572
  },
565
573
  { immediate: !0 }
566
574
  );
567
- const r = $(!1), { isLoading: v, result: m, load: h } = fn();
575
+ const r = S(!1), { isLoading: v, result: m, load: h } = dn();
568
576
  q([r, s], ([p, b]) => {
569
577
  m.value = null, !(!p || !b) && h(b).catch((B) => {
570
578
  console.error("changelog snapshot load failed", B), r.value = !1;
571
579
  });
572
580
  });
573
- function k(p) {
581
+ function w(p) {
574
582
  return p ? p.slice(0, 8) : "";
575
583
  }
576
- function P(p) {
584
+ function N(p) {
577
585
  return p ? new Date(p).toLocaleString() : "";
578
586
  }
579
587
  function U(p) {
@@ -590,8 +598,8 @@ const mn = {
590
598
  return (p.authors || []).join(", ") || t("inventory.changelog.unknownActor");
591
599
  }
592
600
  function O(p) {
593
- if (p.message === qn) return t("inventory.changelog.captureBaseline");
594
- const b = We(p.message);
601
+ if (p.message === Wn) return t("inventory.changelog.captureBaseline");
602
+ const b = Ye(p.message);
595
603
  if (!b) return p.message || t("inventory.changelog.noMessage");
596
604
  const B = I(b.labelKey);
597
605
  return b.name ? t(`inventory.changelog.message.${b.verb}`, { module: B, name: b.name }) : t(`inventory.changelog.message.${b.verb}NoName`, { module: B });
@@ -600,8 +608,8 @@ const mn = {
600
608
  return Xe(p) ? t(p) : p;
601
609
  }
602
610
  const Y = (p) => /[^a-zA-Z]/.test(p);
603
- function S(p, b) {
604
- return p == null || b == null ? null : Ze(p, b);
611
+ function R(p, b) {
612
+ return p == null || b == null ? null : qe(p, b);
605
613
  }
606
614
  function T(p) {
607
615
  if (!(!p.to_value && !p.from_value))
@@ -616,12 +624,12 @@ const mn = {
616
624
  function j(p) {
617
625
  return p.type === "skip" ? p.text : (p.type === "add" ? "+ " : p.type === "del" ? "- " : " ") + p.text;
618
626
  }
619
- const Q = R(() => {
627
+ const Q = C(() => {
620
628
  const p = /* @__PURE__ */ new Map(), b = [], B = (y, f) => {
621
629
  let F = p.get(y);
622
630
  return F || (F = f(), p.set(y, F), b.push(F)), F;
623
- }, V = () => B("@doc", () => ({ header: "", lines: [] })), W = (y, f) => {
624
- var N;
631
+ }, V = () => B("@doc", () => ({ header: "", lines: [] })), X = (y, f) => {
632
+ var P;
625
633
  if (y == null) return f;
626
634
  let F;
627
635
  try {
@@ -629,19 +637,19 @@ const mn = {
629
637
  } catch {
630
638
  F = y;
631
639
  }
632
- return (typeof F == "string" ? (N = e.resolveName) == null ? void 0 : N.call(e, F) : void 0) ?? f;
640
+ return (typeof F == "string" ? (P = e.resolveName) == null ? void 0 : P.call(e, F) : void 0) ?? f;
633
641
  }, K = (y, f, F) => {
634
- var N, J, Z, ee;
642
+ var P, J, Z, ee;
635
643
  const x = T(f);
636
644
  x ? y.lines.push({ label: F, ...x }) : f.from != null && f.to != null ? y.lines.push({
637
645
  label: F,
638
646
  from: f.from,
639
647
  to: f.to,
640
- diff: S(f.from, f.to),
641
- fromDisplay: W(f.from, (N = f.display) == null ? void 0 : N.from),
642
- toDisplay: W(f.to, (J = f.display) == null ? void 0 : J.to)
643
- }) : f.to != null ? y.lines.push({ label: F, to: f.to, toDisplay: W(f.to, (Z = f.display) == null ? void 0 : Z.to) }) : y.lines.push({ label: F, from: f.from, fromDisplay: W(f.from, (ee = f.display) == null ? void 0 : ee.from) });
644
- }, C = (y) => {
648
+ diff: R(f.from, f.to),
649
+ fromDisplay: X(f.from, (P = f.display) == null ? void 0 : P.from),
650
+ toDisplay: X(f.to, (J = f.display) == null ? void 0 : J.to)
651
+ }) : f.to != null ? y.lines.push({ label: F, to: f.to, toDisplay: X(f.to, (Z = f.display) == null ? void 0 : Z.to) }) : y.lines.push({ label: F, from: f.from, fromDisplay: X(f.from, (ee = f.display) == null ? void 0 : ee.from) });
652
+ }, L = (y) => {
645
653
  var F;
646
654
  const f = y.element;
647
655
  if (f) {
@@ -654,8 +662,8 @@ const mn = {
654
662
  K(x, y, y.field.map(I).join(" › "));
655
663
  else {
656
664
  x.badge = y.to != null ? "added" : "removed";
657
- const N = T(y);
658
- N && x.lines.push(N);
665
+ const P = T(y);
666
+ P && x.lines.push(P);
659
667
  }
660
668
  return;
661
669
  }
@@ -670,18 +678,18 @@ const mn = {
670
678
  );
671
679
  continue;
672
680
  }
673
- if (!y.path.includes(qe) && (y.field || y.element)) {
674
- C(y);
681
+ if (!y.path.includes(We) && (y.field || y.element)) {
682
+ L(y);
675
683
  continue;
676
684
  }
677
- const x = f ? f.split(".") : [], N = F ? F.split(" › ") : [], J = x.findIndex((Z, ee) => ee > 0 && Y(Z));
678
- if (J > 0 && N.length === x.length) {
679
- const Z = N[J], ee = B(x.slice(0, J + 1).join("."), () => ({
680
- kind: N.slice(0, J).map(I).join(" › "),
685
+ const x = f ? f.split(".") : [], P = F ? F.split(" › ") : [], J = x.findIndex((Z, ee) => ee > 0 && Y(Z));
686
+ if (J > 0 && P.length === x.length) {
687
+ const Z = P[J], ee = B(x.slice(0, J + 1).join("."), () => ({
688
+ kind: P.slice(0, J).map(I).join(" › "),
681
689
  header: Z,
682
690
  lines: []
683
- })), re = N.slice(J + 1).map(I).join(" › ");
684
- if (re) K(ee, y, re);
691
+ })), ie = P.slice(J + 1).map(I).join(" › ");
692
+ if (ie) K(ee, y, ie);
685
693
  else if (y.from != null && y.to != null) K(ee, y, Z);
686
694
  else {
687
695
  ee.badge = y.to != null ? "added" : "removed";
@@ -690,283 +698,283 @@ const mn = {
690
698
  }
691
699
  continue;
692
700
  }
693
- K(V(), y, N.map(I).join(" › "));
701
+ K(V(), y, P.map(I).join(" › "));
694
702
  }
695
703
  return b;
696
704
  });
697
705
  return (p, b) => {
698
- var W, K;
706
+ var X, K;
699
707
  const B = H("FmCircularProgress"), V = H("FmSwitch");
700
- return p.isLoading ? (i(), c("div", mn, [
708
+ return p.isLoading ? (i(), c("div", fn, [
701
709
  D(B)
702
- ])) : p.commits.length ? (i(), c("div", vn, [
703
- g("ol", gn, [
704
- (i(!0), c(z, null, ne(p.commits, (C) => (i(), c("li", {
705
- key: C.id,
710
+ ])) : p.commits.length ? (i(), c("div", pn, [
711
+ g("ol", vn, [
712
+ (i(!0), c(z, null, ne(p.commits, (L) => (i(), c("li", {
713
+ key: L.id,
706
714
  role: "button",
707
715
  tabindex: "0",
708
716
  class: se([
709
717
  "cursor-pointer border-l-2 py-8 pl-12",
710
- C.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
718
+ L.id === l.value ? "border-fm-color-primary bg-fm-color-primary-50" : "border-gray-200 hover:bg-gray-50"
711
719
  ]),
712
- onClick: (y) => l.value = C.id,
720
+ onClick: (y) => l.value = L.id,
713
721
  onKeydown: [
714
- Me((y) => l.value = C.id, ["enter"]),
715
- Me(ft((y) => l.value = C.id, ["prevent"]), ["space"])
722
+ Me((y) => l.value = L.id, ["enter"]),
723
+ Me(dt((y) => l.value = L.id, ["prevent"]), ["space"])
716
724
  ]
717
725
  }, [
718
- g("div", hn, _(O(C)), 1),
719
- g("div", _n, _(oe(C)) + " · " + _(P(C.at)) + " · " + _(k(C.id)), 1)
720
- ], 42, yn))), 128))
726
+ g("div", yn, _(O(L)), 1),
727
+ g("div", hn, _(oe(L)) + " · " + _(N(L.at)) + " · " + _(w(L.id)), 1)
728
+ ], 42, gn))), 128))
721
729
  ]),
722
- s.value ? (i(), c("div", xn, [
723
- g("div", bn, [
724
- g("div", wn, [
725
- g("div", kn, _(O(s.value)), 1),
726
- s.value.parent ? E("", !0) : (i(), c("span", Sn, _(L(t)("inventory.changelog.rootCommit")), 1))
730
+ s.value ? (i(), c("div", _n, [
731
+ g("div", xn, [
732
+ g("div", bn, [
733
+ g("div", wn, _(O(s.value)), 1),
734
+ s.value.parent ? E("", !0) : (i(), c("span", kn, _($(t)("inventory.changelog.rootCommit")), 1))
727
735
  ]),
728
- g("div", $n, _(oe(s.value)) + " · " + _(P(s.value.at)), 1)
736
+ g("div", Sn, _(oe(s.value)) + " · " + _(N(s.value.at)), 1)
729
737
  ]),
730
- g("div", Ln, [
731
- D(Ne, null, {
738
+ g("div", $n, [
739
+ D(Pe, null, {
732
740
  default: te(() => [
733
- g("span", Cn, _(L(t)("inventory.changelog.dataDiff")), 1),
741
+ g("span", Ln, _($(t)("inventory.changelog.dataDiff")), 1),
734
742
  D(V, {
735
743
  modelValue: r.value,
736
- "onUpdate:modelValue": b[0] || (b[0] = (C) => r.value = C)
744
+ "onUpdate:modelValue": b[0] || (b[0] = (L) => r.value = L)
737
745
  }, null, 8, ["modelValue"])
738
746
  ]),
739
747
  _: 1
740
748
  })
741
749
  ]),
742
750
  r.value ? (i(), c("div", Rn, [
743
- L(v) ? (i(), pe(B, { key: 0 })) : (W = L(m)) != null && W.conflict ? (i(), c("div", Dn, _(L(t)("inventory.changelog.snapshotUnavailable")), 1)) : (K = L(m)) != null && K.diff ? (i(), c("div", In, [
744
- (i(!0), c(z, null, ne(L(m).diff, (C, y) => (i(), c("div", {
751
+ $(v) ? (i(), pe(B, { key: 0 })) : (X = $(m)) != null && X.conflict ? (i(), c("div", Cn, _($(t)("inventory.changelog.snapshotUnavailable")), 1)) : (K = $(m)) != null && K.diff ? (i(), c("div", Dn, [
752
+ (i(!0), c(z, null, ne($(m).diff, (L, y) => (i(), c("div", {
745
753
  key: y,
746
- class: se(["whitespace-pre px-4", G(C.type)])
747
- }, _(j(C)), 3))), 128))
754
+ class: se(["whitespace-pre px-4", G(L.type)])
755
+ }, _(j(L)), 3))), 128))
748
756
  ])) : E("", !0)
749
757
  ])) : E("", !0),
750
- (i(!0), c(z, null, ne(Q.value, (C, y) => (i(), c("div", {
758
+ (i(!0), c(z, null, ne(Q.value, (L, y) => (i(), c("div", {
751
759
  key: y,
752
760
  class: "mb-12 rounded-lg border border-gray-200 p-12"
753
761
  }, [
754
- C.kind || C.header || C.badge ? (i(), c("div", {
762
+ L.kind || L.header || L.badge ? (i(), c("div", {
755
763
  key: 0,
756
- class: se(["flex flex-wrap items-baseline gap-8", C.lines.length ? "mb-8" : ""])
764
+ class: se(["flex flex-wrap items-baseline gap-8", L.lines.length ? "mb-8" : ""])
757
765
  }, [
758
- C.kind ? (i(), c("span", Fn, _(C.kind), 1)) : E("", !0),
759
- g("span", En, _(C.header), 1),
760
- C.badge ? (i(), c("span", {
766
+ L.kind ? (i(), c("span", In, _(L.kind), 1)) : E("", !0),
767
+ g("span", Fn, _(L.header), 1),
768
+ L.badge ? (i(), c("span", {
761
769
  key: 1,
762
- class: se(["rounded-full px-8 text-xs", C.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
763
- }, _(C.badge === "added" ? L(t)("inventory.changelog.added") : L(t)("inventory.changelog.kind.removed")), 3)) : E("", !0)
770
+ class: se(["rounded-full px-8 text-xs", L.badge === "added" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"])
771
+ }, _(L.badge === "added" ? $(t)("inventory.changelog.added") : $(t)("inventory.changelog.kind.removed")), 3)) : E("", !0)
764
772
  ], 2)) : E("", !0),
765
- g("ul", Nn, [
766
- (i(!0), c(z, null, ne(C.lines, (f, F) => (i(), c("li", {
773
+ g("ul", En, [
774
+ (i(!0), c(z, null, ne(L.lines, (f, F) => (i(), c("li", {
767
775
  key: F,
768
776
  class: "flex flex-wrap items-baseline gap-8 text-sm"
769
777
  }, [
770
778
  f.text ? (i(), c("span", Pn, _(f.text), 1)) : (i(), c(z, { key: 1 }, [
771
- g("span", Tn, _(f.label), 1),
772
- f.toTree || f.fromTree ? (i(), c("div", Vn, [
773
- f.fromTree ? (i(), c("div", Bn, [
774
- (i(!0), c(z, null, ne(f.fromTree, (x, N) => (i(), c("div", {
775
- key: N,
779
+ g("span", Nn, _(f.label), 1),
780
+ f.toTree || f.fromTree ? (i(), c("div", Tn, [
781
+ f.fromTree ? (i(), c("div", Vn, [
782
+ (i(!0), c(z, null, ne(f.fromTree, (x, P) => (i(), c("div", {
783
+ key: P,
776
784
  class: se(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-red-700"])
777
785
  }, [
778
786
  (i(!0), c(z, null, ne(x.depth, (J) => (i(), c("span", {
779
787
  key: J,
780
788
  class: "inline-block w-16"
781
789
  }))), 128)),
782
- x.label ? (i(), c("span", Un, [
783
- le(_(x.label), 1),
790
+ x.label ? (i(), c("span", Bn, [
791
+ re(_(x.label), 1),
784
792
  x.text ? (i(), c(z, { key: 0 }, [
785
- le(":")
793
+ re(":")
786
794
  ], 64)) : E("", !0)
787
795
  ])) : E("", !0),
788
- x.text ? (i(), c("span", An, _(x.text), 1)) : E("", !0)
796
+ x.text ? (i(), c("span", Un, _(x.text), 1)) : E("", !0)
789
797
  ], 2))), 128))
790
798
  ])) : E("", !0),
791
- f.toTree ? (i(), c("div", Mn, [
792
- (i(!0), c(z, null, ne(f.toTree, (x, N) => (i(), c("div", {
793
- key: N,
799
+ f.toTree ? (i(), c("div", An, [
800
+ (i(!0), c(z, null, ne(f.toTree, (x, P) => (i(), c("div", {
801
+ key: P,
794
802
  class: se(["flex items-baseline gap-4 px-4", x.bookkeeping ? "text-gray-400" : "text-green-700"])
795
803
  }, [
796
804
  (i(!0), c(z, null, ne(x.depth, (J) => (i(), c("span", {
797
805
  key: J,
798
806
  class: "inline-block w-16"
799
807
  }))), 128)),
800
- x.label ? (i(), c("span", On, [
801
- le(_(x.label), 1),
808
+ x.label ? (i(), c("span", Mn, [
809
+ re(_(x.label), 1),
802
810
  x.text ? (i(), c(z, { key: 0 }, [
803
- le(":")
811
+ re(":")
804
812
  ], 64)) : E("", !0)
805
813
  ])) : E("", !0),
806
- x.text ? (i(), c("span", zn, _(x.text), 1)) : E("", !0)
814
+ x.text ? (i(), c("span", On, _(x.text), 1)) : E("", !0)
807
815
  ], 2))), 128))
808
816
  ])) : E("", !0)
809
- ])) : f.diff ? (i(), c("div", Gn, [
810
- (i(!0), c(z, null, ne(f.diff, (x, N) => (i(), c("div", {
811
- key: N,
817
+ ])) : f.diff ? (i(), c("div", zn, [
818
+ (i(!0), c(z, null, ne(f.diff, (x, P) => (i(), c("div", {
819
+ key: P,
812
820
  class: se(["whitespace-pre px-4", G(x.type)])
813
821
  }, _(j(x)), 3))), 128))
814
- ])) : (i(), c("span", jn, [
815
- f.from != null ? (i(), c("span", Kn, _(f.fromDisplay ?? U(f.from)), 1)) : E("", !0),
816
- f.from != null && f.to != null ? (i(), c("span", Hn, "→")) : E("", !0),
817
- f.to != null ? (i(), c("span", Jn, _(f.toDisplay ?? U(f.to)), 1)) : E("", !0)
822
+ ])) : (i(), c("span", Gn, [
823
+ f.from != null ? (i(), c("span", jn, _(f.fromDisplay ?? U(f.from)), 1)) : E("", !0),
824
+ f.from != null && f.to != null ? (i(), c("span", Kn, "→")) : E("", !0),
825
+ f.to != null ? (i(), c("span", Hn, _(f.toDisplay ?? U(f.to)), 1)) : E("", !0)
818
826
  ]))
819
827
  ], 64))
820
828
  ]))), 128))
821
829
  ])
822
830
  ]))), 128)),
823
- Q.value.length ? E("", !0) : (i(), c("div", Yn, _(L(t)("inventory.changelog.empty")), 1)),
824
- r.value ? (i(), c("div", Wn, [
825
- le(_(s.value.id) + " ", 1),
831
+ Q.value.length ? E("", !0) : (i(), c("div", Jn, _($(t)("inventory.changelog.empty")), 1)),
832
+ r.value ? (i(), c("div", Yn, [
833
+ re(_(s.value.id) + " ", 1),
826
834
  s.value.parent ? (i(), c("span", Xn, "← " + _(s.value.parent), 1)) : E("", !0)
827
835
  ])) : E("", !0)
828
836
  ])) : E("", !0)
829
- ])) : (i(), c("div", pn, _(L(t)("inventory.changelog.empty")), 1));
837
+ ])) : (i(), c("div", mn, _($(t)("inventory.changelog.empty")), 1));
830
838
  };
831
839
  }
832
- }), Qn = { class: "flex flex-col gap-8" }, eo = { class: "flex flex-wrap items-center gap-16" }, to = { class: "fm-typo-en-heading-lg-600" }, no = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, oo = { class: "flex h-full min-h-0 flex-col gap-12 p-16" }, ao = { class: "flex flex-wrap items-center gap-12" }, so = { class: "flex shrink-0 items-center gap-8" }, lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = { class: "flex flex-wrap items-center gap-12" }, io = {
840
+ }), 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 = {
833
841
  key: 0,
834
842
  class: "fm-typo-en-body-md-600"
835
- }, uo = { class: "fm-typo-en-heading-md-600" }, co = {
843
+ }, io = { class: "fm-typo-en-heading-md-600" }, uo = {
836
844
  key: 0,
837
845
  class: "flex justify-center py-8"
838
- }, Le = "inventory.changelog.label.", fo = /* @__PURE__ */ ce({
846
+ }, Le = "inventory.changelog.label.", co = /* @__PURE__ */ ce({
839
847
  __name: "ChangelogDialog",
840
848
  props: {
841
849
  modelValue: { type: Boolean }
842
850
  },
843
851
  emits: ["update:modelValue"],
844
- setup(a, { emit: e }) {
845
- const t = a, l = e, s = R({
852
+ setup(o, { emit: e }) {
853
+ const t = o, l = e, s = C({
846
854
  get: () => t.modelValue,
847
855
  set: (n) => l("update:modelValue", n)
848
- }), { t: o } = he(), u = ge(), r = He(), v = Ke(), m = _e(), { breakpoints: h } = Dt(), k = R(() => h.value.xs || h.value.sm), P = R(() => k.value ? "98vw" : "72vw"), { commits: U, isLoading: oe, hasMore: O, load: I, loadMore: Y } = tn();
849
- function S() {
856
+ }), { t: a } = he(), u = ge(), r = Ke(), v = je(), m = _e(), { breakpoints: h } = Ct(), w = C(() => h.value.xs || h.value.sm), N = C(() => w.value ? "98vw" : "72vw"), { commits: U, isLoading: oe, hasMore: O, load: I, loadMore: Y } = en();
857
+ function R() {
850
858
  Y().catch((n) => console.error("changelog load more failed", n));
851
859
  }
852
860
  function T(n) {
853
861
  return n ? new Date(n).toLocaleString() : "—";
854
862
  }
855
863
  function G(n) {
856
- return [...n].sort((d, w) => (w.lastUpdate ?? "").localeCompare(d.lastUpdate ?? ""));
864
+ return [...n].sort((d, k) => (k.lastUpdate ?? "").localeCompare(d.lastUpdate ?? ""));
857
865
  }
858
- function j(n, d, w) {
859
- I(n, d, w).catch((A) => console.error("changelog load failed", A));
866
+ function j(n, d, k) {
867
+ I(n, d, k).catch((A) => console.error("changelog load failed", A));
860
868
  }
861
- const Q = $([]);
869
+ const Q = S([]);
862
870
  async function p() {
863
871
  var d;
864
872
  const n = (d = u.currentBusiness.value) == null ? void 0 : d._id;
865
873
  if (n)
866
874
  try {
867
875
  Q.value = await m.listDomains(n);
868
- } catch (w) {
869
- console.error("changelog domain list load failed", w), Q.value = [];
876
+ } catch (k) {
877
+ console.error("changelog domain list load failed", k), Q.value = [];
870
878
  }
871
879
  }
872
- const b = R(() => [
873
- { label: o("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
874
- { label: o("inventory.changelog.label.closingDraft"), value: "closingDraft" },
875
- { label: o("inventory.changelog.domainInventory"), value: "inventory" },
876
- ...Q.value.map((n) => ({ label: o(n.labelKey), value: n.domain }))
877
- ]), B = $(b.value[0]), V = R(() => {
880
+ const b = C(() => [
881
+ { label: a("inventory.changelog.label.purchaseOrder"), value: "purchaseOrder" },
882
+ { label: a("inventory.changelog.label.closingDraft"), value: "closingDraft" },
883
+ { label: a("inventory.changelog.domainInventory"), value: "inventory" },
884
+ ...Q.value.map((n) => ({ label: a(n.labelKey), value: n.domain }))
885
+ ]), B = S(b.value[0]), V = C(() => {
878
886
  var n;
879
887
  return ((n = B.value) == null ? void 0 : n.value) ?? "purchaseOrder";
880
- }), W = R(
888
+ }), X = C(
881
889
  () => Q.value.some((n) => n.domain === V.value)
882
- ), K = $(!1), C = R(
890
+ ), K = S(!1), L = C(
883
891
  () => ["sku", "recipe", "unit"].map((n) => ({
884
- label: o(Le + n),
892
+ label: a(Le + n),
885
893
  value: n
886
894
  }))
887
- ), y = $(C.value[0]), f = R(() => {
895
+ ), y = S(L.value[0]), f = C(() => {
888
896
  var n;
889
897
  return ((n = y.value) == null ? void 0 : n.value) ?? "sku";
890
- }), F = $(""), x = $(null), N = $(!1), J = R(() => {
891
- var w;
892
- const n = (w = u.currentBusiness.value) == null ? void 0 : w._id, d = r.inventory._id;
898
+ }), F = S(""), x = S(null), P = S(!1), J = C(() => {
899
+ var k;
900
+ const n = (k = u.currentBusiness.value) == null ? void 0 : k._id, d = r.inventory._id;
893
901
  return n && d ? `business_${n}/${d}` : "";
894
- }), Z = R(() => {
902
+ }), Z = C(() => {
895
903
  const n = /* @__PURE__ */ new Map(), d = r.inventory;
896
- for (const w of [d.sku, d.recipe, d.unit, d.skuGroup])
897
- for (const A of w ?? [])
904
+ for (const k of [d.sku, d.recipe, d.unit, d.skuGroup])
905
+ for (const A of k ?? [])
898
906
  A._id && A.name && n.set(A._id, A.name);
899
- for (const w of d.unit ?? [])
900
- for (const A of w.measurements ?? []) {
907
+ for (const k of d.unit ?? [])
908
+ for (const A of k.measurements ?? []) {
901
909
  if (!A.id) continue;
902
- const X = A.abbrev || A.name;
903
- if (!X) continue;
904
- const ae = Et.toDouble(A.conversion);
905
- n.set(A.id, ae ? `${X} (1 ${X} = ${ae} ${w.abbrev})` : X);
910
+ const W = A.abbrev || A.name;
911
+ if (!W) continue;
912
+ const ae = Ft.toDouble(A.conversion);
913
+ n.set(A.id, ae ? `${W} (1 ${W} = ${ae} ${k.abbrev})` : W);
906
914
  }
907
915
  return n;
908
- }), ee = (n) => Z.value.get(n), re = $([]), de = $(!1);
909
- async function Pe() {
916
+ }), ee = (n) => Z.value.get(n), ie = S([]), de = S(!1);
917
+ async function Ne() {
910
918
  var d;
911
919
  const n = (d = u.currentBusiness.value) == null ? void 0 : d._id;
912
920
  if (n) {
913
921
  de.value = !0;
914
922
  try {
915
- re.value = G(
923
+ ie.value = G(
916
924
  await m.listInventory(n, f.value)
917
925
  );
918
- } catch (w) {
919
- console.error("changelog inventory list load failed", w), re.value = [];
926
+ } catch (k) {
927
+ console.error("changelog inventory list load failed", k), ie.value = [];
920
928
  } finally {
921
929
  de.value = !1;
922
930
  }
923
931
  }
924
932
  }
925
- const Qe = R(
926
- () => N.value ? re.value : re.value.filter((n) => !n.deleted)
927
- ), et = R(() => [
928
- { accessorKey: "id", header: () => o("inventory.closing.draft.table.id"), size: 320 },
933
+ const Ze = C(
934
+ () => P.value ? ie.value : ie.value.filter((n) => !n.deleted)
935
+ ), Qe = C(() => [
936
+ { accessorKey: "id", header: () => a("inventory.closing.draft.table.id"), size: 320 },
929
937
  {
930
938
  id: "name",
931
- header: () => o("inventory.common.name"),
939
+ header: () => a("inventory.common.name"),
932
940
  accessorFn: (n) => n.name,
933
941
  // Deleted records sit in the same list as live ones, so the row says which
934
942
  // it is; nothing else distinguishes them.
935
- cell: ({ row: n }) => n.original.deleted ? mt(
943
+ cell: ({ row: n }) => n.original.deleted ? ft(
936
944
  "span",
937
945
  { "data-deleted": "" },
938
- `${n.original.name} (${o("inventory.changelog.deleted")})`
946
+ `${n.original.name} (${a("inventory.changelog.deleted")})`
939
947
  ) : n.original.name
940
948
  },
941
949
  {
942
950
  id: "lastUpdate",
943
- header: () => o("inventory.changelog.column.lastUpdate"),
951
+ header: () => a("inventory.changelog.column.lastUpdate"),
944
952
  size: 200,
945
953
  // Raw ISO is the sort key — clicking the header on formatted dates would
946
954
  // order them lexicographically by locale string. Formatted only to display.
947
955
  accessorFn: (n) => n.lastUpdate ?? "",
948
956
  cell: ({ getValue: n }) => T(n() || void 0)
949
957
  }
950
- ]), { commits: tt, load: nt } = on();
951
- function ot(n) {
952
- x.value = n, K.value = !0, j(J.value, Ye, Re), n.id && nt(`${J.value}/${f.value}/${n.id}`).catch(
958
+ ]), { commits: et, load: tt } = nn();
959
+ function nt(n) {
960
+ x.value = n, K.value = !0, j(J.value, Je, Ce), n.id && tt(`${J.value}/${f.value}/${n.id}`).catch(
953
961
  (d) => console.error("changelog per-entity load failed", d)
954
962
  );
955
963
  }
956
- function at(n, d) {
957
- const w = We(n.message);
958
- return w && w.labelKey === Le + f.value && w.name === d.name ? !0 : (n.changes ?? []).some((A) => {
959
- const X = ln(A.path);
960
- return X.type === Le + f.value && X.name === d.name;
964
+ function ot(n, d) {
965
+ const k = Ye(n.message);
966
+ return k && k.labelKey === Le + f.value && k.name === d.name ? !0 : (n.changes ?? []).some((A) => {
967
+ const W = sn(A.path);
968
+ return W.type === Le + f.value && W.name === d.name;
961
969
  });
962
970
  }
963
- const st = R(() => {
971
+ const at = C(() => {
964
972
  const n = x.value;
965
973
  if (!n) return [];
966
- const d = U.value.filter((w) => at(w, n));
967
- return nn(d, tt.value);
968
- }), xe = $([]), be = $(!1), we = $(null);
969
- async function lt() {
974
+ const d = U.value.filter((k) => ot(k, n));
975
+ return tn(d, et.value);
976
+ }), xe = S([]), be = S(!1), we = S(null);
977
+ async function st() {
970
978
  var d;
971
979
  const n = (d = u.currentBusiness.value) == null ? void 0 : d._id;
972
980
  if (n) {
@@ -975,31 +983,31 @@ const mn = {
975
983
  xe.value = G(
976
984
  await m.listDomainRecords(n, V.value)
977
985
  );
978
- } catch (w) {
979
- console.error("changelog domain records load failed", w), xe.value = [];
986
+ } catch (k) {
987
+ console.error("changelog domain records load failed", k), xe.value = [];
980
988
  } finally {
981
989
  be.value = !1;
982
990
  }
983
991
  }
984
992
  }
985
- function rt(n) {
986
- var w;
987
- const d = (w = u.currentBusiness.value) == null ? void 0 : w._id;
988
- d && (we.value = n, K.value = !0, j(`business_${d}/${n.id}`, void 0, Ce));
993
+ function lt(n) {
994
+ var k;
995
+ const d = (k = u.currentBusiness.value) == null ? void 0 : k._id;
996
+ d && (we.value = n, K.value = !0, j(`business_${d}/${n.id}`, void 0, Re));
989
997
  }
990
- const ve = $(It()), ye = $([]), ke = $(!1), fe = $(null), Te = R(() => {
998
+ const ve = S(Dt()), ye = S([]), ke = S(!1), fe = S(null), Te = C(() => {
991
999
  const n = v._currentLocation;
992
1000
  return n ? `${n.name} (${n.doc.profile.code ?? "--"})` : "";
993
- }), Ve = R(() => [
994
- { accessorKey: "id", header: () => o("inventory.closing.draft.table.id"), size: 320 },
1001
+ }), Ve = C(() => [
1002
+ { accessorKey: "id", header: () => a("inventory.closing.draft.table.id"), size: 320 },
995
1003
  {
996
1004
  accessorKey: "name",
997
- header: () => V.value === "purchaseOrder" ? o("inventory.changelog.column.seq") : o("inventory.common.name"),
1005
+ header: () => V.value === "purchaseOrder" ? a("inventory.changelog.column.seq") : a("inventory.common.name"),
998
1006
  size: 240
999
1007
  },
1000
1008
  {
1001
1009
  id: "lastUpdate",
1002
- header: () => o("inventory.changelog.column.lastUpdate"),
1010
+ header: () => a("inventory.changelog.column.lastUpdate"),
1003
1011
  size: 200,
1004
1012
  // Raw ISO is the sort key; see the note on the inventory table.
1005
1013
  accessorFn: (n) => n.lastUpdate ?? "",
@@ -1010,33 +1018,33 @@ const mn = {
1010
1018
  var A;
1011
1019
  const n = (A = v._currentLocation) == null ? void 0 : A.dbName;
1012
1020
  if (!n) return;
1013
- const d = Nt(new Date(ve.value.startDate)).toISOString(), w = Pt(new Date(ve.value.endDate)).toISOString();
1021
+ const d = Et(new Date(ve.value.startDate)).toISOString(), k = Pt(new Date(ve.value.endDate)).toISOString();
1014
1022
  ke.value = !0;
1015
1023
  try {
1016
1024
  ye.value = G(
1017
- V.value === "purchaseOrder" ? await m.listPurchaseOrders(n, d, w) : await m.listClosingDrafts(n, d, w)
1025
+ V.value === "purchaseOrder" ? await m.listPurchaseOrders(n, d, k) : await m.listClosingDrafts(n, d, k)
1018
1026
  );
1019
- } catch (X) {
1020
- console.error("changelog location list load failed", X), ye.value = [];
1027
+ } catch (W) {
1028
+ console.error("changelog location list load failed", W), ye.value = [];
1021
1029
  } finally {
1022
1030
  ke.value = !1;
1023
1031
  }
1024
- fe.value && !ye.value.find((X) => {
1032
+ fe.value && !ye.value.find((W) => {
1025
1033
  var ae;
1026
- return X.id === ((ae = fe.value) == null ? void 0 : ae.id);
1034
+ return W.id === ((ae = fe.value) == null ? void 0 : ae.id);
1027
1035
  }) && (fe.value = null, j(""));
1028
1036
  }
1029
- function it(n) {
1030
- fe.value = n, K.value = !0, j(`${v.currentLocationDBName}/${n.id}`, void 0, Ce);
1037
+ function rt(n) {
1038
+ fe.value = n, K.value = !0, j(`${v.currentLocationDBName}/${n.id}`, void 0, Re);
1031
1039
  }
1032
- const ut = R(() => {
1033
- var n, d, w;
1034
- return V.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : W.value ? ((d = we.value) == null ? void 0 : d.name) ?? "" : ((w = fe.value) == null ? void 0 : w.name) ?? "";
1040
+ const it = C(() => {
1041
+ var n, d, k;
1042
+ return V.value === "inventory" ? ((n = x.value) == null ? void 0 : n.name) ?? "" : X.value ? ((d = we.value) == null ? void 0 : d.name) ?? "" : ((k = fe.value) == null ? void 0 : k.name) ?? "";
1035
1043
  });
1036
1044
  function Ue() {
1037
- K.value = !1, V.value === "inventory" ? (x.value = null, N.value = !1, j(""), Pe().catch(
1045
+ K.value = !1, V.value === "inventory" ? (x.value = null, P.value = !1, j(""), Ne().catch(
1038
1046
  (n) => console.error("changelog inventory list failed", n)
1039
- )) : W.value ? (we.value = null, j(""), lt().catch(
1047
+ )) : X.value ? (we.value = null, j(""), st().catch(
1040
1048
  (n) => console.error("changelog domain records failed", n)
1041
1049
  )) : (fe.value = null, j(""), Be().catch((n) => console.error("changelog location list failed", n)));
1042
1050
  }
@@ -1045,18 +1053,18 @@ const mn = {
1045
1053
  }), q(V, () => {
1046
1054
  s.value && Ue();
1047
1055
  }), q(ve, () => {
1048
- s.value && V.value !== "inventory" && !W.value && Be().catch((n) => console.error("changelog location list failed", n));
1049
- }), q(N, (n) => {
1056
+ s.value && V.value !== "inventory" && !X.value && Be().catch((n) => console.error("changelog location list failed", n));
1057
+ }), q(P, (n) => {
1050
1058
  var d;
1051
1059
  !n && ((d = x.value) != null && d.deleted) && (x.value = null, K.value = !1);
1052
1060
  }), q(f, () => {
1053
- x.value = null, K.value = !1, s.value && V.value === "inventory" && Pe().catch(
1061
+ x.value = null, K.value = !1, s.value && V.value === "inventory" && Ne().catch(
1054
1062
  (n) => console.error("changelog inventory list failed", n)
1055
1063
  );
1056
1064
  }), q(J, (n) => {
1057
- x.value = null, s.value && V.value === "inventory" && j(n, void 0, Re);
1065
+ x.value = null, s.value && V.value === "inventory" && j(n, void 0, Ce);
1058
1066
  }), (n, d) => {
1059
- const w = H("FmButtonGroup"), A = H("FmSearch"), X = H("FmSwitch"), ae = H("FmTable"), Ae = H("FmDialog"), ct = H("FmButton");
1067
+ const k = H("FmButtonGroup"), A = H("FmSearch"), W = H("FmSwitch"), ae = H("FmTable"), Ae = H("FmDialog"), ut = H("FmButton");
1060
1068
  return i(), c(z, null, [
1061
1069
  D(Ae, {
1062
1070
  modelValue: s.value,
@@ -1069,65 +1077,65 @@ const mn = {
1069
1077
  "content-class": "!p-0 h-[86vh]"
1070
1078
  }, {
1071
1079
  "dialog-header": te(() => [
1072
- g("div", Qn, [
1073
- g("div", eo, [
1074
- g("div", to, _(L(o)("inventory.changelog.title")), 1),
1075
- D(w, {
1080
+ g("div", Zn, [
1081
+ g("div", Qn, [
1082
+ g("div", eo, _($(a)("inventory.changelog.title")), 1),
1083
+ D(k, {
1076
1084
  modelValue: B.value,
1077
1085
  "onUpdate:modelValue": d[0] || (d[0] = (M) => B.value = M),
1078
1086
  items: b.value
1079
1087
  }, null, 8, ["modelValue", "items"])
1080
1088
  ]),
1081
- g("div", no, _(L(o)("inventory.changelog.scopeDescription")), 1)
1089
+ g("div", to, _($(a)("inventory.changelog.scopeDescription")), 1)
1082
1090
  ])
1083
1091
  ]),
1084
1092
  default: te(() => [
1085
- g("div", oo, [
1093
+ g("div", no, [
1086
1094
  V.value === "inventory" ? (i(), c(z, { key: 0 }, [
1087
- g("div", ao, [
1088
- D(w, {
1095
+ g("div", oo, [
1096
+ D(k, {
1089
1097
  modelValue: y.value,
1090
1098
  "onUpdate:modelValue": d[1] || (d[1] = (M) => y.value = M),
1091
- items: C.value
1099
+ items: L.value
1092
1100
  }, null, 8, ["modelValue", "items"]),
1093
1101
  D(A, {
1094
1102
  modelValue: F.value,
1095
1103
  "onUpdate:modelValue": d[2] || (d[2] = (M) => F.value = M),
1096
1104
  class: "flex-1",
1097
- placeholder: L(o)("inventory.changelog.searchInventory")
1105
+ placeholder: $(a)("inventory.changelog.searchInventory")
1098
1106
  }, null, 8, ["modelValue", "placeholder"]),
1099
- g("div", so, [
1100
- g("span", lo, _(L(o)("inventory.changelog.includeDeleted")), 1),
1101
- D(X, {
1102
- modelValue: N.value,
1103
- "onUpdate:modelValue": d[3] || (d[3] = (M) => N.value = M)
1107
+ g("div", ao, [
1108
+ g("span", so, _($(a)("inventory.changelog.includeDeleted")), 1),
1109
+ D(W, {
1110
+ modelValue: P.value,
1111
+ "onUpdate:modelValue": d[3] || (d[3] = (M) => P.value = M)
1104
1112
  }, null, 8, ["modelValue"])
1105
1113
  ])
1106
1114
  ]),
1107
1115
  D(ae, {
1108
1116
  class: "min-h-0 flex-1",
1109
- "row-data": Qe.value,
1110
- "column-defs": et.value,
1117
+ "row-data": Ze.value,
1118
+ "column-defs": Qe.value,
1111
1119
  "search-value": F.value,
1112
1120
  loading: de.value,
1113
1121
  "page-size": 20,
1114
- onRowClick: d[4] || (d[4] = (M) => ot(M.original))
1122
+ onRowClick: d[4] || (d[4] = (M) => nt(M.original))
1115
1123
  }, null, 8, ["row-data", "column-defs", "search-value", "loading"])
1116
- ], 64)) : W.value ? (i(), pe(ae, {
1124
+ ], 64)) : X.value ? (i(), pe(ae, {
1117
1125
  key: 1,
1118
1126
  class: "min-h-0 flex-1",
1119
1127
  "row-data": xe.value,
1120
1128
  "column-defs": Ve.value,
1121
1129
  loading: be.value,
1122
1130
  "page-size": 20,
1123
- onRowClick: d[5] || (d[5] = (M) => rt(M.original))
1131
+ onRowClick: d[5] || (d[5] = (M) => lt(M.original))
1124
1132
  }, null, 8, ["row-data", "column-defs", "loading"])) : (i(), c(z, { key: 2 }, [
1125
- g("div", ro, [
1126
- D(Ft, {
1133
+ g("div", lo, [
1134
+ D(It, {
1127
1135
  modelValue: ve.value,
1128
1136
  "onUpdate:modelValue": d[6] || (d[6] = (M) => ve.value = M)
1129
1137
  }, null, 8, ["modelValue"]),
1130
- Te.value ? (i(), c("span", io, _(Te.value), 1)) : E("", !0)
1138
+ Te.value ? (i(), c("span", ro, _(Te.value), 1)) : E("", !0)
1131
1139
  ]),
1132
1140
  D(ae, {
1133
1141
  class: "min-h-0 flex-1",
@@ -1135,7 +1143,7 @@ const mn = {
1135
1143
  "column-defs": Ve.value,
1136
1144
  loading: ke.value,
1137
1145
  "page-size": 20,
1138
- onRowClick: d[7] || (d[7] = (M) => it(M.original))
1146
+ onRowClick: d[7] || (d[7] = (M) => rt(M.original))
1139
1147
  }, null, 8, ["row-data", "column-defs", "loading"])
1140
1148
  ], 64))
1141
1149
  ])
@@ -1147,25 +1155,25 @@ const mn = {
1147
1155
  "onUpdate:modelValue": d[9] || (d[9] = (M) => K.value = M),
1148
1156
  "close-button": "",
1149
1157
  "dismiss-away": "",
1150
- "min-width": P.value,
1151
- "max-width": P.value,
1158
+ "min-width": N.value,
1159
+ "max-width": N.value,
1152
1160
  "max-height": "86vh"
1153
1161
  }, {
1154
1162
  "dialog-header": te(() => [
1155
- g("div", uo, _(ut.value), 1)
1163
+ g("div", io, _(it.value), 1)
1156
1164
  ]),
1157
1165
  default: te(() => [
1158
- D(Zn, {
1159
- commits: V.value === "inventory" ? st.value : L(U),
1160
- "is-loading": L(oe),
1166
+ D(qn, {
1167
+ commits: V.value === "inventory" ? at.value : $(U),
1168
+ "is-loading": $(oe),
1161
1169
  "resolve-name": ee
1162
1170
  }, null, 8, ["commits", "is-loading"]),
1163
- V.value !== "inventory" && L(O) ? (i(), c("div", co, [
1164
- D(ct, {
1165
- label: L(o)("inventory.changelog.loadMore"),
1171
+ V.value !== "inventory" && $(O) ? (i(), c("div", uo, [
1172
+ D(ut, {
1173
+ label: $(a)("inventory.changelog.loadMore"),
1166
1174
  variant: "secondary",
1167
- disabled: L(oe),
1168
- onClick: S
1175
+ disabled: $(oe),
1176
+ onClick: R
1169
1177
  }, null, 8, ["label", "disabled"])
1170
1178
  ])) : E("", !0)
1171
1179
  ]),
@@ -1174,85 +1182,82 @@ const mn = {
1174
1182
  ], 64);
1175
1183
  };
1176
1184
  }
1177
- }), mo = /* @__PURE__ */ Tt(fo, [["__scopeId", "data-v-ae9bd171"]]), po = ["title"], Ge = 48, ie = 8, je = 8, vo = /* @__PURE__ */ ce({
1185
+ }), fo = /* @__PURE__ */ Nt(co, [["__scopeId", "data-v-ae9bd171"]]), le = 8;
1186
+ function mo(o, e) {
1187
+ return { x: le, y: Math.max(le, e - o - le) };
1188
+ }
1189
+ const po = ["title"], Ge = 48, vo = 8, go = /* @__PURE__ */ ce({
1178
1190
  __name: "ChangelogFloatingButton",
1179
- setup(a) {
1180
- const { t: e } = he(), t = ge(), l = R(() => {
1181
- var S;
1182
- return !!((S = t.sessionUser.value) != null && S.role.isAdmin);
1183
- }), s = $(!1), o = $(null);
1191
+ setup(o) {
1192
+ const { t: e } = he(), t = ge(), l = C(() => {
1193
+ var R;
1194
+ return !!((R = t.sessionUser.value) != null && R.role.isAdmin);
1195
+ }), s = S(!1), a = S(null);
1184
1196
  function u() {
1185
- var S, T;
1197
+ var R, T;
1186
1198
  return {
1187
- width: ((S = o.value) == null ? void 0 : S.offsetWidth) ?? Ge,
1188
- height: ((T = o.value) == null ? void 0 : T.offsetHeight) ?? Ge
1199
+ width: ((R = a.value) == null ? void 0 : R.offsetWidth) ?? Ge,
1200
+ height: ((T = a.value) == null ? void 0 : T.offsetHeight) ?? Ge
1189
1201
  };
1190
1202
  }
1191
- const r = $({ x: 0, y: 0 });
1192
- function v(S, T, G) {
1193
- return Math.min(Math.max(S, T), G);
1203
+ const r = S({ x: 0, y: 0 });
1204
+ function v(R, T, G) {
1205
+ return Math.min(Math.max(R, T), G);
1194
1206
  }
1195
1207
  function m() {
1196
- const { width: S, height: T } = u(), G = Math.max(ie, window.innerWidth - S - ie - je), j = Math.max(ie, window.innerHeight - T - ie), Q = r.value.x + S / 2;
1208
+ const { width: R, height: T } = u(), G = Math.max(le, window.innerWidth - R - le - vo), j = Math.max(le, window.innerHeight - T - le), Q = r.value.x + R / 2;
1197
1209
  r.value = {
1198
- x: Q < window.innerWidth / 2 ? ie : G,
1199
- y: v(r.value.y, ie, j)
1210
+ x: Q < window.innerWidth / 2 ? le : G,
1211
+ y: v(r.value.y, le, j)
1200
1212
  };
1201
1213
  }
1202
1214
  function h() {
1203
- const { width: S } = u();
1204
- r.value = {
1205
- x: window.innerWidth - S - ie - je,
1206
- y: Math.round(window.innerHeight / 2)
1207
- };
1215
+ r.value = mo(u().height, window.innerHeight);
1208
1216
  }
1209
1217
  Fe(() => {
1210
1218
  h(), window.addEventListener("resize", m), window.addEventListener("orientationchange", m);
1211
- }), pt(() => {
1219
+ }), mt(() => {
1212
1220
  window.removeEventListener("resize", m), window.removeEventListener("orientationchange", m);
1213
- }), q(l, async (S) => {
1214
- S && (await vt(), h());
1221
+ }), q(l, async (R) => {
1222
+ R && (await pt(), h());
1215
1223
  });
1216
- const k = $(!1);
1217
- let P = null, U = !1;
1218
- function oe(S) {
1219
- P = { x: S.clientX, y: S.clientY, px: r.value.x, py: r.value.y }, k.value = !0, U = !1, S.currentTarget.setPointerCapture(S.pointerId);
1224
+ const w = S(!1);
1225
+ let N = null, U = !1;
1226
+ function oe(R) {
1227
+ N = { x: R.clientX, y: R.clientY, px: r.value.x, py: r.value.y }, w.value = !0, U = !1, R.currentTarget.setPointerCapture(R.pointerId);
1220
1228
  }
1221
- function O(S) {
1222
- if (!P) return;
1223
- const T = S.clientX - P.x, G = S.clientY - P.y;
1229
+ function O(R) {
1230
+ if (!N) return;
1231
+ const T = R.clientX - N.x, G = R.clientY - N.y;
1224
1232
  Math.abs(T) + Math.abs(G) > 3 && (U = !0);
1225
1233
  const { width: j, height: Q } = u();
1226
1234
  r.value = {
1227
- x: v(P.px + T, 0, window.innerWidth - j),
1228
- y: v(P.py + G, 0, window.innerHeight - Q)
1235
+ x: v(N.px + T, 0, window.innerWidth - j),
1236
+ y: v(N.py + G, 0, window.innerHeight - Q)
1229
1237
  };
1230
1238
  }
1231
1239
  function I() {
1232
- P = null, k.value = !1, m();
1240
+ N = null, w.value = !1, m();
1233
1241
  }
1234
1242
  function Y() {
1235
- P && (I(), U || (s.value = !0));
1243
+ N && (I(), U || (s.value = !0));
1236
1244
  }
1237
- return (S, T) => {
1245
+ return (R, T) => {
1238
1246
  const G = H("FmIcon");
1239
- return i(), pe(gt, { to: "body" }, [
1247
+ return i(), pe(vt, { to: "body" }, [
1240
1248
  l.value ? (i(), c(z, { key: 0 }, [
1241
1249
  g("div", {
1242
1250
  ref_key: "wrapperRef",
1243
- ref: o,
1244
- class: se([
1245
- "fixed z-50 touch-none",
1246
- k.value ? "cursor-grabbing" : "cursor-grab transition-[left,top] duration-200 ease-out"
1247
- ]),
1248
- style: yt({ left: `${r.value.x}px`, top: `${r.value.y}px` })
1251
+ ref: a,
1252
+ class: se(["fixed z-50 cursor-grab touch-none", w.value ? "" : "transition-[left,top] duration-200 ease-out"]),
1253
+ style: gt({ left: `${r.value.x}px`, top: `${r.value.y}px` })
1249
1254
  }, [
1250
- D(Ne, null, {
1255
+ D(Pe, null, {
1251
1256
  default: te(() => [
1252
1257
  g("button", {
1253
1258
  type: "button",
1254
- title: L(e)("inventory.changelog.title"),
1255
- class: "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",
1259
+ title: $(e)("inventory.changelog.title"),
1260
+ class: se(["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", w.value ? "cursor-grabbing" : "cursor-grab"]),
1256
1261
  onPointerdown: oe,
1257
1262
  onPointermove: O,
1258
1263
  onPointerup: Y,
@@ -1263,13 +1268,13 @@ const mn = {
1263
1268
  size: "md",
1264
1269
  outline: ""
1265
1270
  }),
1266
- g("span", null, _(L(e)("inventory.changelog.fabLabel")), 1)
1267
- ], 40, po)
1271
+ g("span", null, _($(e)("inventory.changelog.fabLabel")), 1)
1272
+ ], 42, po)
1268
1273
  ]),
1269
1274
  _: 1
1270
1275
  })
1271
1276
  ], 6),
1272
- D(mo, {
1277
+ D(fo, {
1273
1278
  modelValue: s.value,
1274
1279
  "onUpdate:modelValue": T[0] || (T[0] = (j) => s.value = j)
1275
1280
  }, null, 8, ["modelValue"])
@@ -1277,34 +1282,34 @@ const mn = {
1277
1282
  ]);
1278
1283
  };
1279
1284
  }
1280
- }), go = { class: "flex items-center gap-2" }, yo = { class: "text-xs text-gray-400 font-normal" }, ho = { class: "flex flex-col gap-3" }, _o = { class: "max-h-[480px] flex flex-col gap-1" }, xo = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, bo = {
1285
+ }), yo = { class: "flex items-center gap-2" }, ho = { class: "text-xs text-gray-400 font-normal" }, _o = { class: "flex flex-col gap-3" }, xo = { class: "max-h-[480px] flex flex-col gap-1" }, bo = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, wo = {
1281
1286
  key: 0,
1282
1287
  class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
1283
- }, wo = {
1288
+ }, ko = {
1284
1289
  key: 1,
1285
1290
  class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
1286
- }, ko = {
1291
+ }, So = {
1287
1292
  key: 2,
1288
1293
  class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
1289
- }, So = {
1294
+ }, $o = {
1290
1295
  key: 0,
1291
1296
  class: "text-center text-sm text-gray-400 py-4"
1292
- }, $o = /* @__PURE__ */ ce({
1297
+ }, Lo = /* @__PURE__ */ ce({
1293
1298
  __name: "FmFeatureFlagDialog",
1294
- setup(a) {
1295
- const e = $(!1), t = $(""), l = R(() => {
1296
- const { getFlagValue: u } = Lt();
1297
- return Object.values(Ct).map((r) => {
1299
+ setup(o) {
1300
+ const e = S(!1), t = S(""), l = C(() => {
1301
+ const { getFlagValue: u } = $t();
1302
+ return Object.values(Lt).map((r) => {
1298
1303
  const v = u(r, (m) => m === "true");
1299
1304
  return {
1300
1305
  name: r,
1301
1306
  enabled: v
1302
1307
  };
1303
1308
  });
1304
- }), s = R(() => {
1309
+ }), s = C(() => {
1305
1310
  const u = t.value.toLowerCase();
1306
1311
  return u ? l.value.filter((r) => r.name.toLowerCase().includes(u)) : l.value;
1307
- }), o = R(() => {
1312
+ }), a = C(() => {
1308
1313
  const u = l.value.filter((m) => m.enabled === !0).length, r = l.value.filter((m) => m.enabled === !1).length, v = l.value.filter((m) => m.enabled === null).length;
1309
1314
  return { enabled: u, disabled: r, unknown: v, total: l.value.length };
1310
1315
  });
@@ -1312,11 +1317,11 @@ const mn = {
1312
1317
  const v = H("FmButton"), m = H("FmSpacer"), h = H("FmDialog");
1313
1318
  return i(), pe(h, {
1314
1319
  modelValue: e.value,
1315
- "onUpdate:modelValue": r[2] || (r[2] = (k) => e.value = k),
1320
+ "onUpdate:modelValue": r[2] || (r[2] = (w) => e.value = w),
1316
1321
  overlay: !0
1317
1322
  }, {
1318
1323
  "dialog-button": te(() => [
1319
- D(Ne, null, {
1324
+ D(Pe, null, {
1320
1325
  default: te(() => [
1321
1326
  D(v, {
1322
1327
  variant: "secondary",
@@ -1327,9 +1332,9 @@ const mn = {
1327
1332
  })
1328
1333
  ]),
1329
1334
  "dialog-header": te(() => [
1330
- g("div", go, [
1335
+ g("div", yo, [
1331
1336
  r[3] || (r[3] = g("span", null, "Feature Flags", -1)),
1332
- g("span", yo, _(o.value.enabled) + " enabled · " + _(o.value.disabled) + " disabled · " + _(o.value.unknown) + " unknown ", 1)
1337
+ g("span", ho, _(a.value.enabled) + " enabled · " + _(a.value.disabled) + " disabled · " + _(a.value.unknown) + " unknown ", 1)
1333
1338
  ])
1334
1339
  ]),
1335
1340
  "dialog-footer": te(() => [
@@ -1339,37 +1344,37 @@ const mn = {
1339
1344
  label: "Close",
1340
1345
  size: "md",
1341
1346
  variant: "primary",
1342
- onClick: r[1] || (r[1] = (k) => e.value = !1)
1347
+ onClick: r[1] || (r[1] = (w) => e.value = !1)
1343
1348
  })
1344
1349
  ]),
1345
1350
  default: te(() => [
1346
- g("div", ho, [
1347
- ht(g("input", {
1348
- "onUpdate:modelValue": r[0] || (r[0] = (k) => t.value = k),
1351
+ g("div", _o, [
1352
+ yt(g("input", {
1353
+ "onUpdate:modelValue": r[0] || (r[0] = (w) => t.value = w),
1349
1354
  type: "text",
1350
1355
  placeholder: "Search flags...",
1351
1356
  class: "w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500"
1352
1357
  }, null, 512), [
1353
- [_t, t.value]
1358
+ [ht, t.value]
1354
1359
  ]),
1355
- g("div", _o, [
1356
- (i(!0), c(z, null, ne(s.value, (k) => (i(), c("div", {
1357
- key: k.name,
1360
+ g("div", xo, [
1361
+ (i(!0), c(z, null, ne(s.value, (w) => (i(), c("div", {
1362
+ key: w.name,
1358
1363
  class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
1359
1364
  }, [
1360
- g("span", xo, _(k.name), 1),
1361
- k.enabled === !0 ? (i(), c("span", bo, r[4] || (r[4] = [
1365
+ g("span", bo, _(w.name), 1),
1366
+ w.enabled === !0 ? (i(), c("span", wo, r[4] || (r[4] = [
1362
1367
  g("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
1363
- le(" Enabled ")
1364
- ]))) : k.enabled === !1 ? (i(), c("span", wo, r[5] || (r[5] = [
1368
+ re(" Enabled ")
1369
+ ]))) : w.enabled === !1 ? (i(), c("span", ko, r[5] || (r[5] = [
1365
1370
  g("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
1366
- le(" Disabled ")
1367
- ]))) : (i(), c("span", ko, r[6] || (r[6] = [
1371
+ re(" Disabled ")
1372
+ ]))) : (i(), c("span", So, r[6] || (r[6] = [
1368
1373
  g("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
1369
- le(" Unknown ")
1374
+ re(" Unknown ")
1370
1375
  ])))
1371
1376
  ]))), 128)),
1372
- s.value.length === 0 ? (i(), c("div", So, ' No flags matching "' + _(t.value) + '" ', 1)) : E("", !0)
1377
+ s.value.length === 0 ? (i(), c("div", $o, ' No flags matching "' + _(t.value) + '" ', 1)) : E("", !0)
1373
1378
  ])
1374
1379
  ])
1375
1380
  ]),
@@ -1377,14 +1382,14 @@ const mn = {
1377
1382
  }, 8, ["modelValue"]);
1378
1383
  };
1379
1384
  }
1380
- }), Lo = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Co = /* @__PURE__ */ ce({
1385
+ }), Ro = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Co = /* @__PURE__ */ ce({
1381
1386
  __name: "NavigationTab",
1382
- setup(a) {
1383
- const e = St(), t = Ee(), l = ge(), s = Vt(), { menuItems: o } = Je();
1384
- q([() => l.currentBusiness.value, () => e.name], ([h, k]) => {
1385
- (h == null ? void 0 : h.menuVersion) === "v3" && (k === ue.INGREDIENTS || k === ue.RECIPE || k === ue.UNIT) && t.push({ name: ue.STOCK });
1387
+ setup(o) {
1388
+ const e = kt(), t = Ee(), l = ge(), s = Tt(), { menuItems: a } = He();
1389
+ q([() => l.currentBusiness.value, () => e.name], ([h, w]) => {
1390
+ (h == null ? void 0 : h.menuVersion) === "v3" && (w === ue.INGREDIENTS || w === ue.RECIPE || w === ue.UNIT) && t.push({ name: ue.STOCK });
1386
1391
  });
1387
- const u = R({
1392
+ const u = C({
1388
1393
  get() {
1389
1394
  if (e.name)
1390
1395
  return String(e.name);
@@ -1392,12 +1397,12 @@ const mn = {
1392
1397
  set(h) {
1393
1398
  h && t.push({ name: h });
1394
1399
  }
1395
- }), r = R(
1400
+ }), r = C(
1396
1401
  () => {
1397
1402
  var h;
1398
1403
  return `NavigationTab.${(h = l.currentBusiness.value) == null ? void 0 : h._id}`;
1399
1404
  }
1400
- ), v = $(!1), m = R({
1405
+ ), v = S(!1), m = C({
1401
1406
  get() {
1402
1407
  return v.value;
1403
1408
  },
@@ -1409,32 +1414,32 @@ const mn = {
1409
1414
  v.value = !1, setTimeout(() => {
1410
1415
  m.value = !s.getItem(r.value);
1411
1416
  }, 2e3);
1412
- }), (h, k) => {
1413
- const P = H("FmCollapsibleTabs");
1414
- return i(), c("div", Lo, [
1415
- D($o),
1416
- D(P, {
1417
+ }), (h, w) => {
1418
+ const N = H("FmCollapsibleTabs");
1419
+ return i(), c("div", Ro, [
1420
+ D(Lo),
1421
+ D(N, {
1417
1422
  modelValue: u.value,
1418
- "onUpdate:modelValue": k[0] || (k[0] = (U) => u.value = U),
1419
- items: L(o)
1423
+ "onUpdate:modelValue": w[0] || (w[0] = (U) => u.value = U),
1424
+ items: $(a)
1420
1425
  }, null, 8, ["modelValue", "items"])
1421
1426
  ]);
1422
1427
  };
1423
1428
  }
1424
1429
  });
1425
1430
  typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
1426
- let a, e;
1431
+ let o, e;
1427
1432
  return { promise: new Promise((l, s) => {
1428
- a = l, e = s;
1429
- }), resolve: a, reject: e };
1433
+ o = l, e = s;
1434
+ }), resolve: o, reject: e };
1430
1435
  });
1431
- typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(a) {
1432
- return await new Promise((e) => setTimeout(e, a)), Promise.resolve(this);
1436
+ typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(o) {
1437
+ return await new Promise((e) => setTimeout(e, o)), Promise.resolve(this);
1433
1438
  });
1434
- const jo = /* @__PURE__ */ ce({
1439
+ const Ko = /* @__PURE__ */ ce({
1435
1440
  __name: "App",
1436
- setup(a) {
1437
- const e = ge(), t = Bt(), l = kt(), s = window.location.href.includes("print-preview");
1441
+ setup(o) {
1442
+ const e = ge(), t = Vt(), l = wt(), s = window.location.href.includes("print-preview");
1438
1443
  Fe(() => {
1439
1444
  if (window.location.href.includes("print-preview")) {
1440
1445
  e.setEmbedded(!0), document.body.classList.add("print-mode");
@@ -1444,9 +1449,9 @@ const jo = /* @__PURE__ */ ce({
1444
1449
  console.error("Google map cannot be loaded");
1445
1450
  });
1446
1451
  }), q([() => e.currentCountry.value], () => {
1447
- o();
1452
+ a();
1448
1453
  });
1449
- async function o() {
1454
+ async function a() {
1450
1455
  var u;
1451
1456
  try {
1452
1457
  await e.readBusinesses(), e.currentBusiness.value = (u = e.businesses.value) == null ? void 0 : u.find((r) => r);
@@ -1455,11 +1460,11 @@ const jo = /* @__PURE__ */ ce({
1455
1460
  }
1456
1461
  }
1457
1462
  return (u, r) => (i(), c(z, null, [
1458
- D(Qt),
1459
- L(s) ? E("", !0) : (i(), pe(vo, { key: 0 }))
1463
+ D(Zt),
1464
+ $(s) ? E("", !0) : (i(), pe(go, { key: 0 }))
1460
1465
  ], 64));
1461
1466
  }
1462
1467
  });
1463
1468
  export {
1464
- jo as default
1469
+ Ko as default
1465
1470
  };