@feedmepos/mf-hrm-portal 2.3.3 → 2.4.0

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 (46) hide show
  1. package/dist/{ApprovalCodeList-BvS5dgU3.js → ApprovalCodeList-D62tXKEd.js} +7 -7
  2. package/dist/{AuditLogList-CpX_suVp.js → AuditLogList-DQOdhFJm.js} +825 -835
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BT4DaSaO.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDT1AfXa.js} +2 -2
  4. package/dist/{EmployeeList-CVsnidNV.js → EmployeeList-Bd211chl.js} +8 -8
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-h8toO2k-.js → FormItem.vue_vue_type_script_setup_true_lang-CUBQnkkY.js} +1 -1
  6. package/dist/{GrantUserList-Dyh5kllB.js → GrantUserList-DaUUILOT.js} +8 -8
  7. package/dist/{Main-aoY6s0QA.js → Main-B95BdgQd.js} +5 -5
  8. package/dist/{Main-CRU4YEdj.js → Main-CvGjvEQL.js} +28 -28
  9. package/dist/{Main-OmCnufx6.js → Main-Dh3E2cEf.js} +11 -11
  10. package/dist/{PermissionSetList-B7B3vnRf.js → PermissionSetList-BIzlo_EV.js} +90 -90
  11. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BYYiW77c.js +4181 -0
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-EwU7gHP7.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CSYNrTGr.js} +1 -1
  13. package/dist/{RoleList-B7jLSn2l.js → RoleList-QJV3cGvV.js} +33 -33
  14. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BG5gE0iX.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DsKfRa5Z.js} +1 -1
  15. package/dist/{ScheduleGeneralPage-DK2hKCWE.js → ScheduleGeneralPage-D6NPsdrU.js} +2 -2
  16. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-mMjDR4Nz.js → ScheduleModal.vue_vue_type_script_setup_true_lang-kYGNELLb.js} +3 -3
  17. package/dist/{SchedulePage-Dn4joe9m.js → SchedulePage-CO_ZP2QD.js} +13 -13
  18. package/dist/{SchedulePositionPage-D7u4QBug.js → SchedulePositionPage-DFjWfRwI.js} +3 -3
  19. package/dist/{SelectFilter-BbTj7kMh.js → SelectFilter-B94Z_Fat.js} +1 -1
  20. package/dist/TeamMemberList-BbGMw0jg.js +1150 -0
  21. package/dist/{TimesheetList-B6TIgZba.js → TimesheetList-DiTCj2H7.js} +8 -8
  22. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CF1cWXsG.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B97k3KNz.js} +3 -3
  23. package/dist/{app-Cfzysb_Z.js → app-BRlNuQIz.js} +2465 -2387
  24. package/dist/app.js +1 -1
  25. package/dist/{approval-code-CWq2ce3u.js → approval-code-D6eLRwC7.js} +1 -1
  26. package/dist/{dayjs.min-NoTESZyy.js → dayjs.min-BaLuYA95.js} +1 -1
  27. package/dist/{employee-BzUt7_wz.js → employee-DF_QGtpu.js} +4 -4
  28. package/dist/{grant-user-q_mkj3Vh.js → grant-user-CdkuTYlZ.js} +1 -1
  29. package/dist/{iteration-DmbHO_Rl.js → iteration-t4kb_i13.js} +1 -1
  30. package/dist/{lodash-DqvpfdBt.js → lodash-Dv0NUeUP.js} +1 -1
  31. package/dist/{restaurant-DJBQY9N5.js → restaurant-D2q9eNtu.js} +578 -581
  32. package/dist/{role-Crd3XL59.js → role-y253W1Ep.js} +19 -20
  33. package/dist/{rule-B1ck-XG6.js → rule-DaFOMP6z.js} +150 -153
  34. package/dist/src/composables/useTenant.d.ts +11 -0
  35. package/dist/src/router/courtGuard.d.ts +4 -0
  36. package/dist/src/stores/team.d.ts +1 -1
  37. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +1 -1
  38. package/dist/style.css +1 -1
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{useAppStore-TRX-PQD4.js → useAppStore-CIPpnfP7.js} +1 -1
  41. package/dist/{useLoading-W3YSF8OB.js → useLoading-BRCeBVXP.js} +1 -1
  42. package/dist/useReportPermissions-Bveud3kc.js +80 -0
  43. package/package.json +3 -3
  44. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BVOwDcXo.js +0 -4167
  45. package/dist/TeamMemberList-C0nZBhqp.js +0 -1154
  46. package/dist/useReportPermissions-DmMlLiQP.js +0 -82
@@ -1,19 +1,19 @@
1
- import { defineComponent as Vt, ref as w, computed as A, onMounted as Uo, onBeforeUnmount as Ko, watch as oe, resolveComponent as N, createElementBlock as v, openBlock as f, createBlock as Ce, createCommentVNode as M, createElementVNode as a, Fragment as z, renderList as ce, withCtx as Y, createVNode as h, toDisplayString as l, unref as u, nextTick as Bo, onUnmounted as Yo, createTextVNode as ye, normalizeClass as zo } from "vue";
2
- import { d as T } from "./dayjs.min-NoTESZyy.js";
1
+ import { defineComponent as Vt, ref as S, computed as A, onMounted as No, onBeforeUnmount as Ko, watch as ae, resolveComponent as R, createElementBlock as g, openBlock as v, createBlock as Te, createCommentVNode as F, createElementVNode as a, Fragment as z, renderList as ce, withCtx as B, createVNode as y, toDisplayString as l, unref as u, nextTick as Yo, onUnmounted as Bo, createTextVNode as ye, normalizeClass as zo } from "vue";
2
+ import { d as P } from "./dayjs.min-BaLuYA95.js";
3
3
  import { defineStore as qo, storeToRefs as Jo } from "pinia";
4
4
  import { useI18n as dt, useCoreStore as Ho } from "@feedmepos/mf-common";
5
- import { B as Mt, _ as Wo, a as Go } from "./app-Cfzysb_Z.js";
5
+ import { u as Wo, Y as Mt, _ as Go, a as Xo } from "./app-BRlNuQIz.js";
6
6
  import { components as ve } from "@feedmepos/ui-library";
7
- import { g as st, b as at, u as Xo } from "./restaurant-DJBQY9N5.js";
8
- import { S as Fe } from "./SelectFilter-BbTj7kMh.js";
9
- import { _ as Qo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
10
- import { _ as Zo } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
11
- import { t as es, p as Dt } from "./rule-B1ck-XG6.js";
12
- import { u as ts } from "./useDebounce-B8ZPVS5C.js";
13
- import { n as os } from "./string-VNuQNweN.js";
14
- import { useRoute as ss, useRouter as as } from "vue-router";
15
- import { u as ns } from "./useMessage-_ywT_N9X.js";
16
- const ls = {
7
+ import { g as st, b as at, u as Qo } from "./restaurant-D2q9eNtu.js";
8
+ import { S as Me } from "./SelectFilter-B94Z_Fat.js";
9
+ import { _ as Zo } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
10
+ import { _ as es } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
11
+ import { t as ts, p as Dt } from "./rule-DaFOMP6z.js";
12
+ import { u as os } from "./useDebounce-B8ZPVS5C.js";
13
+ import { n as ss } from "./string-VNuQNweN.js";
14
+ import { useRoute as as, useRouter as ns } from "vue-router";
15
+ import { u as ls } from "./useMessage-_ywT_N9X.js";
16
+ const rs = {
17
17
  order: "Order",
18
18
  refund: "Refund",
19
19
  drawer: "Cash drawer",
@@ -34,7 +34,7 @@ const ls = {
34
34
  faceId: "Face ID",
35
35
  mallIntegration: "Mall integration",
36
36
  report: "Report"
37
- }, Me = [
37
+ }, De = [
38
38
  { key: "all", label: "All", subjectPrefixes: [] },
39
39
  { key: "inventory", label: "Inventory", subjectPrefixes: ["business::inventory", "inventory"], sources: ["portal"] },
40
40
  { key: "report", label: "Report", subjectPrefixes: ["business::report", "report"], sources: ["portal"] },
@@ -48,41 +48,41 @@ const ls = {
48
48
  { key: "miniProgram", label: "Mini Program", subjectPrefixes: ["business::miniProgram", "miniProgram"], sources: ["portal"] },
49
49
  { key: "media", label: "Media", subjectPrefixes: ["business::media", "media"], sources: ["portal"] },
50
50
  { key: "pos", label: "POS", subjectPrefixes: [], sources: ["pos-v8", "hrm-validate"] }
51
- ], nt = "/audit-logs", Oe = {
51
+ ], nt = "/audit-logs", Ce = {
52
52
  async count(t) {
53
- var r, d, y, _, g, S, O, i, P;
53
+ var r, c, d, b, _, w, D, O, i;
54
54
  const o = {
55
55
  ...t != null && t.from ? { from: t.from } : {},
56
56
  ...t != null && t.to ? { to: t.to } : {},
57
57
  ...(r = t == null ? void 0 : t.userIds) != null && r.length ? { userIds: t.userIds } : {},
58
- ...(d = t == null ? void 0 : t.subjects) != null && d.length ? { subjects: t.subjects } : {},
59
- ...(y = t == null ? void 0 : t.subjectPrefixes) != null && y.length ? { subjectPrefixes: t.subjectPrefixes } : {},
60
- ...(_ = t == null ? void 0 : t.actions) != null && _.length ? { actions: t.actions } : {},
61
- ...(g = t == null ? void 0 : t.outcomes) != null && g.length ? { outcomes: t.outcomes } : {},
58
+ ...(c = t == null ? void 0 : t.subjects) != null && c.length ? { subjects: t.subjects } : {},
59
+ ...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
60
+ ...(b = t == null ? void 0 : t.actions) != null && b.length ? { actions: t.actions } : {},
61
+ ...(_ = t == null ? void 0 : t.outcomes) != null && _.length ? { outcomes: t.outcomes } : {},
62
62
  ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
63
63
  ...t != null && t.search ? { search: t.search } : {},
64
- ...(S = t == null ? void 0 : t.searchUserIds) != null && S.length ? { searchUserIds: t.searchUserIds } : {},
65
- ...(O = t == null ? void 0 : t.searchSubjects) != null && O.length ? { searchSubjects: t.searchSubjects } : {},
66
- ...(i = t == null ? void 0 : t.sources) != null && i.length ? { sources: t.sources } : {},
67
- ...(P = t == null ? void 0 : t.restaurantIds) != null && P.length ? { restaurantIds: t.restaurantIds } : {},
64
+ ...(w = t == null ? void 0 : t.searchUserIds) != null && w.length ? { searchUserIds: t.searchUserIds } : {},
65
+ ...(D = t == null ? void 0 : t.searchSubjects) != null && D.length ? { searchSubjects: t.searchSubjects } : {},
66
+ ...(O = t == null ? void 0 : t.sources) != null && O.length ? { sources: t.sources } : {},
67
+ ...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {},
68
68
  ...t != null && t.traceId ? { traceId: t.traceId } : {}
69
69
  };
70
70
  return (await st(
71
71
  await at().get(`${nt}/count`, {
72
72
  params: o,
73
- paramsSerializer: ($) => {
74
- const m = new URLSearchParams();
75
- for (const [x, D] of Object.entries($))
76
- if (Array.isArray(D))
77
- for (const F of D) m.append(x, String(F));
78
- else D != null && m.append(x, String(D));
79
- return m.toString();
73
+ paramsSerializer: (V) => {
74
+ const L = new URLSearchParams();
75
+ for (const [f, M] of Object.entries(V))
76
+ if (Array.isArray(M))
77
+ for (const C of M) L.append(f, String(C));
78
+ else M != null && L.append(f, String(M));
79
+ return L.toString();
80
80
  }
81
81
  })
82
82
  )).total;
83
83
  },
84
84
  async read(t) {
85
- var n, r, d, y, _, g, S, O, i;
85
+ var n, r, c, d, b, _, w, D, O;
86
86
  const o = {
87
87
  limit: (t == null ? void 0 : t.limit) ?? 100,
88
88
  offset: (t == null ? void 0 : t.offset) ?? 0,
@@ -91,14 +91,14 @@ const ls = {
91
91
  ...(n = t == null ? void 0 : t.userIds) != null && n.length ? { userIds: t.userIds } : {},
92
92
  ...t != null && t.feedmeAdminActors ? { feedmeAdminActors: !0 } : {},
93
93
  ...(r = t == null ? void 0 : t.subjects) != null && r.length ? { subjects: t.subjects } : {},
94
- ...(d = t == null ? void 0 : t.subjectPrefixes) != null && d.length ? { subjectPrefixes: t.subjectPrefixes } : {},
95
- ...(y = t == null ? void 0 : t.actions) != null && y.length ? { actions: t.actions } : {},
96
- ...(_ = t == null ? void 0 : t.outcomes) != null && _.length ? { outcomes: t.outcomes } : {},
94
+ ...(c = t == null ? void 0 : t.subjectPrefixes) != null && c.length ? { subjectPrefixes: t.subjectPrefixes } : {},
95
+ ...(d = t == null ? void 0 : t.actions) != null && d.length ? { actions: t.actions } : {},
96
+ ...(b = t == null ? void 0 : t.outcomes) != null && b.length ? { outcomes: t.outcomes } : {},
97
97
  ...t != null && t.search ? { search: t.search } : {},
98
- ...(g = t == null ? void 0 : t.searchUserIds) != null && g.length ? { searchUserIds: t.searchUserIds } : {},
99
- ...(S = t == null ? void 0 : t.searchSubjects) != null && S.length ? { searchSubjects: t.searchSubjects } : {},
100
- ...(O = t == null ? void 0 : t.sources) != null && O.length ? { sources: t.sources } : {},
101
- ...(i = t == null ? void 0 : t.restaurantIds) != null && i.length ? { restaurantIds: t.restaurantIds } : {},
98
+ ...(_ = t == null ? void 0 : t.searchUserIds) != null && _.length ? { searchUserIds: t.searchUserIds } : {},
99
+ ...(w = t == null ? void 0 : t.searchSubjects) != null && w.length ? { searchSubjects: t.searchSubjects } : {},
100
+ ...(D = t == null ? void 0 : t.sources) != null && D.length ? { sources: t.sources } : {},
101
+ ...(O = t == null ? void 0 : t.restaurantIds) != null && O.length ? { restaurantIds: t.restaurantIds } : {},
102
102
  ...t != null && t.traceId ? { traceId: t.traceId } : {}
103
103
  };
104
104
  return st(
@@ -106,13 +106,13 @@ const ls = {
106
106
  params: o,
107
107
  // Serialize arrays as repeated params: key=val1&key=val2
108
108
  // (NestJS @Query expects this; axios default adds brackets which break matching)
109
- paramsSerializer: (P) => {
110
- const $ = new URLSearchParams();
111
- for (const [m, x] of Object.entries(P))
112
- if (Array.isArray(x))
113
- for (const D of x) $.append(m, String(D));
114
- else x != null && $.append(m, String(x));
115
- return $.toString();
109
+ paramsSerializer: (i) => {
110
+ const V = new URLSearchParams();
111
+ for (const [L, f] of Object.entries(i))
112
+ if (Array.isArray(f))
113
+ for (const M of f) V.append(L, String(M));
114
+ else f != null && V.append(L, String(f));
115
+ return V.toString();
116
116
  }
117
117
  })
118
118
  );
@@ -131,10 +131,10 @@ const ls = {
131
131
  await at().get(`${nt}/actors`, { params: o })
132
132
  );
133
133
  }
134
- }, rs = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, is = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, us = {
134
+ }, is = { class: "flex h-[46px] items-center gap-8 rounded-sm px-16 hover:bg-fm-color-opacity-sm" }, us = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ds = {
135
135
  "data-more-measure": "",
136
136
  class: "flex h-[46px] items-center gap-8 rounded-sm px-16"
137
- }, ds = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, cs = /* @__PURE__ */ Vt({
137
+ }, cs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, fs = /* @__PURE__ */ Vt({
138
138
  __name: "AuditLogModuleTabs",
139
139
  props: {
140
140
  modelValue: {},
@@ -142,107 +142,107 @@ const ls = {
142
142
  },
143
143
  emits: ["update:modelValue"],
144
144
  setup(t, { emit: o }) {
145
- const n = t, r = o, { t: d } = dt(), y = w(!1), _ = w(null), g = w(null), S = w([]), O = w(0), i = w(0);
146
- let P = null;
147
- async function $() {
148
- if (await Bo(), !g.value) return;
149
- const b = g.value.querySelectorAll("[data-tab-measure]");
150
- S.value = Array.from(b).map((B) => B.offsetWidth);
151
- const j = g.value.querySelector("[data-more-measure]");
152
- O.value = (j == null ? void 0 : j.offsetWidth) ?? 0;
145
+ const n = t, r = o, { t: c } = dt(), d = S(!1), b = S(null), _ = S(null), w = S([]), D = S(0), O = S(0);
146
+ let i = null;
147
+ async function V() {
148
+ if (await Yo(), !_.value) return;
149
+ const p = _.value.querySelectorAll("[data-tab-measure]");
150
+ w.value = Array.from(p).map((K) => K.offsetWidth);
151
+ const j = _.value.querySelector("[data-more-measure]");
152
+ D.value = (j == null ? void 0 : j.offsetWidth) ?? 0;
153
153
  }
154
- const m = A(() => {
155
- const b = n.items.length;
156
- if (b === 0) return 0;
157
- if (!i.value || S.value.length !== b) return b;
158
- const j = S.value;
159
- if (j.reduce((I, X) => I + X, 0) <= i.value) return b;
160
- const E = O.value;
161
- let H = 0, U = 0;
162
- for (let I = 0; I < b && !(H + j[I] + E > i.value); I++)
163
- H += j[I], U++;
164
- return U;
165
- }), x = A(() => {
166
- const b = m.value, j = n.items.length;
167
- if (b >= j) return [...n.items];
168
- const B = n.items.slice(0, b), E = n.items.find((W) => W.value === n.modelValue);
169
- if (!E || B.some((W) => W.value === E.value)) return B;
170
- if (b === 0) return [E];
171
- const H = n.items.findIndex((W) => W.value === E.value), U = S.value, I = O.value, X = U[H] ?? 0;
172
- let ue = b, Te = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
173
- for (; ue > 1 && Te + X + I > i.value; )
174
- ue--, Te = U.slice(0, ue - 1).reduce((W, xe) => W + xe, 0);
175
- return [...n.items.slice(0, Math.max(ue - 1, 0)), E];
176
- }), D = A(() => {
177
- const b = new Set(x.value.map((j) => j.value));
178
- return n.items.filter((j) => !b.has(j.value));
154
+ const L = A(() => {
155
+ const p = n.items.length;
156
+ if (p === 0) return 0;
157
+ if (!O.value || w.value.length !== p) return p;
158
+ const j = w.value;
159
+ if (j.reduce((I, Q) => I + Q, 0) <= O.value) return p;
160
+ const E = D.value;
161
+ let X = 0, Y = 0;
162
+ for (let I = 0; I < p && !(X + j[I] + E > O.value); I++)
163
+ X += j[I], Y++;
164
+ return Y;
165
+ }), f = A(() => {
166
+ const p = L.value, j = n.items.length;
167
+ if (p >= j) return [...n.items];
168
+ const K = n.items.slice(0, p), E = n.items.find((W) => W.value === n.modelValue);
169
+ if (!E || K.some((W) => W.value === E.value)) return K;
170
+ if (p === 0) return [E];
171
+ const X = n.items.findIndex((W) => W.value === E.value), Y = w.value, I = D.value, Q = Y[X] ?? 0;
172
+ let H = p, xe = Y.slice(0, H - 1).reduce((W, Le) => W + Le, 0);
173
+ for (; H > 1 && xe + Q + I > O.value; )
174
+ H--, xe = Y.slice(0, H - 1).reduce((W, Le) => W + Le, 0);
175
+ return [...n.items.slice(0, Math.max(H - 1, 0)), E];
176
+ }), M = A(() => {
177
+ const p = new Set(f.value.map((j) => j.value));
178
+ return n.items.filter((j) => !p.has(j.value));
179
179
  });
180
- function F(b) {
181
- y.value = !1, r("update:modelValue", b);
180
+ function C(p) {
181
+ d.value = !1, r("update:modelValue", p);
182
182
  }
183
- return Uo(async () => {
184
- await $(), _.value && (i.value = _.value.clientWidth, P = new ResizeObserver(() => {
185
- _.value && (i.value = _.value.clientWidth);
186
- }), P.observe(_.value));
183
+ return No(async () => {
184
+ await V(), b.value && (O.value = b.value.clientWidth, i = new ResizeObserver(() => {
185
+ b.value && (O.value = b.value.clientWidth);
186
+ }), i.observe(b.value));
187
187
  }), Ko(() => {
188
- P == null || P.disconnect(), P = null;
189
- }), oe(
188
+ i == null || i.disconnect(), i = null;
189
+ }), ae(
190
190
  () => n.items,
191
191
  () => {
192
- $();
192
+ V();
193
193
  },
194
194
  { deep: !0 }
195
- ), (b, j) => {
196
- const B = N("FmTab"), E = N("FmIcon"), H = N("FmMenuItem"), U = N("FmMenu");
197
- return f(), v("div", {
195
+ ), (p, j) => {
196
+ const K = R("FmTab"), E = R("FmIcon"), X = R("FmMenuItem"), Y = R("FmMenu");
197
+ return v(), g("div", {
198
198
  ref_key: "containerRef",
199
- ref: _,
199
+ ref: b,
200
200
  class: "relative flex w-full flex-row items-center"
201
201
  }, [
202
- (f(!0), v(z, null, ce(x.value, (I) => (f(), Ce(B, {
202
+ (v(!0), g(z, null, ce(f.value, (I) => (v(), Te(K, {
203
203
  key: I.value,
204
204
  "model-value": t.modelValue,
205
205
  label: I.label,
206
206
  badge: I.badge,
207
207
  disabled: I.disabled,
208
208
  value: I.value,
209
- "onUpdate:modelValue": F
209
+ "onUpdate:modelValue": C
210
210
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"]))), 128)),
211
- D.value.length > 0 ? (f(), Ce(U, {
211
+ M.value.length > 0 ? (v(), Te(Y, {
212
212
  key: 0,
213
- "show-menu": y.value,
213
+ "show-menu": d.value,
214
214
  class: "max-w-[360px] min-w-[90px] rounded-sm",
215
215
  placement: "bottom-start",
216
- onMenuChanged: j[0] || (j[0] = (I) => y.value = I)
216
+ onMenuChanged: j[0] || (j[0] = (I) => d.value = I)
217
217
  }, {
218
- "menu-button": Y(() => [
219
- a("div", rs, [
220
- h(E, { name: "more_vert" }),
221
- a("span", is, l(u(d)("auditLog.modules.more")), 1)
218
+ "menu-button": B(() => [
219
+ a("div", is, [
220
+ y(E, { name: "more_vert" }),
221
+ a("span", us, l(u(c)("auditLog.modules.more")), 1)
222
222
  ])
223
223
  ]),
224
- default: Y(() => [
225
- (f(!0), v(z, null, ce(D.value, (I) => (f(), Ce(H, {
224
+ default: B(() => [
225
+ (v(!0), g(z, null, ce(M.value, (I) => (v(), Te(X, {
226
226
  key: I.value,
227
227
  "model-value": t.modelValue === I.value,
228
228
  label: I.label,
229
229
  disabled: I.disabled,
230
- onClick: (X) => F(I.value)
230
+ onClick: (Q) => C(I.value)
231
231
  }, null, 8, ["model-value", "label", "disabled", "onClick"]))), 128))
232
232
  ]),
233
233
  _: 1
234
- }, 8, ["show-menu"])) : M("", !0),
234
+ }, 8, ["show-menu"])) : F("", !0),
235
235
  a("div", {
236
236
  ref_key: "measurerRef",
237
- ref: g,
237
+ ref: _,
238
238
  "aria-hidden": "true",
239
239
  class: "pointer-events-none invisible absolute -left-[9999px] -top-[9999px] flex flex-row items-center"
240
240
  }, [
241
- (f(!0), v(z, null, ce(t.items, (I) => (f(), v("div", {
241
+ (v(!0), g(z, null, ce(t.items, (I) => (v(), g("div", {
242
242
  key: `measure-${I.value}`,
243
243
  "data-tab-measure": ""
244
244
  }, [
245
- h(B, {
245
+ y(K, {
246
246
  "model-value": t.modelValue,
247
247
  label: I.label,
248
248
  badge: I.badge,
@@ -250,28 +250,28 @@ const ls = {
250
250
  value: I.value
251
251
  }, null, 8, ["model-value", "label", "badge", "disabled", "value"])
252
252
  ]))), 128)),
253
- a("div", us, [
254
- h(E, { name: "more_vert" }),
255
- a("span", ds, l(u(d)("auditLog.modules.more")), 1)
253
+ a("div", ds, [
254
+ y(E, { name: "more_vert" }),
255
+ a("span", cs, l(u(c)("auditLog.modules.more")), 1)
256
256
  ])
257
257
  ], 512)
258
258
  ], 512);
259
259
  };
260
260
  }
261
- }), fs = qo("hrm-team", () => {
262
- const t = w([]), o = w(!1), n = w(!1), r = A(
263
- () => Object.fromEntries(t.value.map((g) => [g.doc.userId, g.name]))
261
+ }), ms = qo("hrm-team", () => {
262
+ const t = S([]), o = S(!1), n = S(!1), r = A(
263
+ () => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.name]))
264
+ ), c = A(
265
+ () => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.email]))
264
266
  ), d = A(
265
- () => Object.fromEntries(t.value.map((g) => [g.doc.userId, g.email]))
266
- ), y = A(
267
- () => Object.fromEntries(t.value.map((g) => [g.doc.userId, g.phoneNumber]))
267
+ () => Object.fromEntries(t.value.map((_) => [_.doc.userId, _.phoneNumber]))
268
268
  );
269
- async function _({ force: g = !1 } = {}) {
270
- if (!(!g && t.value.length > 0))
269
+ async function b({ force: _ = !1 } = {}) {
270
+ if (!(!_ && t.value.length > 0))
271
271
  try {
272
272
  o.value = !0;
273
- const S = await es.readTeamMembers();
274
- t.value = S.sort((O, i) => O.doc.isOwner ? -1 : O.name.localeCompare(i.name)), n.value = !0;
273
+ const w = await ts.readTeamMembers();
274
+ t.value = w.sort((D, O) => D.doc.isOwner ? -1 : D.name.localeCompare(O.name)), n.value = !0;
275
275
  } finally {
276
276
  o.value = !1;
277
277
  }
@@ -281,12 +281,12 @@ const ls = {
281
281
  isLoading: o,
282
282
  hasLoaded: n,
283
283
  userIdToName: r,
284
- userIdToEmail: d,
285
- userIdToPhone: y,
286
- readTeamMembers: _
284
+ userIdToEmail: c,
285
+ userIdToPhone: d,
286
+ readTeamMembers: b
287
287
  };
288
288
  });
289
- function ms(t) {
289
+ function vs(t) {
290
290
  const o = t.indexOf(".");
291
291
  return o <= 0 || o === t.length - 1 ? null : { entity: t.slice(0, o), verb: t.slice(o + 1) };
292
292
  }
@@ -294,76 +294,76 @@ function Ot(t) {
294
294
  const o = t.split("-").join(" ");
295
295
  return o.charAt(0).toUpperCase() + o.slice(1);
296
296
  }
297
- function vs(t, o, n) {
297
+ function ps(t, o, n) {
298
298
  const r = t(o, n);
299
299
  return r === o ? null : r;
300
300
  }
301
301
  function ut(t, o) {
302
- const { eventKey: n, params: r, operationLabel: d } = o;
302
+ const { eventKey: n, params: r, operationLabel: c } = o;
303
303
  if (n) {
304
- const y = vs(t, `auditLog.event.sentence.${n}`, r);
305
- if (y) return y;
306
- const _ = ms(n);
307
- if (_) {
308
- const g = `${Ot(_.verb)} ${Ot(_.entity)}`, S = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
309
- return S !== void 0 && S !== "" ? `${g} — ${S}` : g;
304
+ const d = ps(t, `auditLog.event.sentence.${n}`, r);
305
+ if (d) return d;
306
+ const b = vs(n);
307
+ if (b) {
308
+ const _ = `${Ot(b.verb)} ${Ot(b.entity)}`, w = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.name);
309
+ return w !== void 0 && w !== "" ? `${_} — ${w}` : _;
310
310
  }
311
311
  }
312
- return d ?? "";
312
+ return c ?? "";
313
313
  }
314
- function ps({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
315
- const d = ss(), y = as(), { t: _ } = dt(), g = ns();
316
- let S = 0;
317
- function O(x) {
318
- const { traceId: D, ...F } = d.query;
319
- (D ?? void 0) !== x && y.replace({ query: x ? { ...F, traceId: x } : F });
314
+ function gs({ logs: t, selectedLog: o, isSheetOpen: n, businessId: r }) {
315
+ const c = as(), d = ns(), { t: b } = dt(), _ = ls();
316
+ let w = 0;
317
+ function D(f) {
318
+ const { traceId: M, ...C } = c.query;
319
+ (M ?? void 0) !== f && d.replace({ query: f ? { ...C, traceId: f } : C });
320
320
  }
321
- function i(x) {
322
- O(x.traceId || void 0);
321
+ function O(f) {
322
+ D(f.traceId || void 0);
323
323
  }
324
- function P() {
325
- S++, O(void 0);
324
+ function i() {
325
+ w++, D(void 0);
326
326
  }
327
- async function $(x) {
328
- var b;
329
- if (((b = o.value) == null ? void 0 : b.traceId) === x) return;
330
- const D = ++S;
331
- let F = t.value.find((j) => j.traceId === x);
332
- if (!F) {
327
+ async function V(f) {
328
+ var p;
329
+ if (((p = o.value) == null ? void 0 : p.traceId) === f) return;
330
+ const M = ++w;
331
+ let C = t.value.find((j) => j.traceId === f);
332
+ if (!C) {
333
333
  try {
334
- [F] = await Oe.read({ traceId: x, limit: 1 });
334
+ [C] = await Ce.read({ traceId: f, limit: 1 });
335
335
  } catch {
336
- D === S && g.error(_("auditLog.deepLink.loadFailed"));
336
+ M === w && _.error(b("auditLog.deepLink.loadFailed"));
337
337
  return;
338
338
  }
339
- if (D !== S) return;
339
+ if (M !== w) return;
340
340
  }
341
- if (!F) {
342
- g.error(_("auditLog.deepLink.notFound")), O(void 0);
341
+ if (!C) {
342
+ _.error(b("auditLog.deepLink.notFound")), D(void 0);
343
343
  return;
344
344
  }
345
- o.value = F, n.value = !0;
345
+ o.value = C, n.value = !0;
346
346
  }
347
- oe(
348
- () => [d.query.traceId, r()],
349
- ([x, D], F) => {
350
- var b;
351
- if (F != null && F[1] && D !== F[1]) {
352
- S++, n.value = !1, o.value = null, O(void 0);
347
+ ae(
348
+ () => [c.query.traceId, r()],
349
+ ([f, M], C) => {
350
+ var p;
351
+ if (C != null && C[1] && M !== C[1]) {
352
+ w++, n.value = !1, o.value = null, D(void 0);
353
353
  return;
354
354
  }
355
- typeof x == "string" && x ? D && $(x) : (S++, (b = o.value) != null && b.traceId && n.value && (n.value = !1, o.value = null));
355
+ typeof f == "string" && f ? M && V(f) : (w++, (p = o.value) != null && p.traceId && n.value && (n.value = !1, o.value = null));
356
356
  },
357
357
  { immediate: !0 }
358
358
  );
359
- async function m() {
359
+ async function L() {
360
360
  try {
361
- await navigator.clipboard.writeText(window.location.href), g.success(_("auditLog.detail.linkCopied"));
361
+ await navigator.clipboard.writeText(window.location.href), _.success(b("auditLog.detail.linkCopied"));
362
362
  } catch {
363
- g.error(_("auditLog.detail.linkCopyFailed"));
363
+ _.error(b("auditLog.detail.linkCopyFailed"));
364
364
  }
365
365
  }
366
- return { onSheetOpened: i, onSheetClosed: P, copyLink: m };
366
+ return { onSheetOpened: O, onSheetClosed: i, copyLink: L };
367
367
  }
368
368
  function _e(t) {
369
369
  return typeof t == "object" && t !== null && !Array.isArray(t);
@@ -371,7 +371,7 @@ function _e(t) {
371
371
  function je(t) {
372
372
  return Array.isArray(t);
373
373
  }
374
- function Be(t) {
374
+ function Ke(t) {
375
375
  if (t === null) return "null";
376
376
  if (typeof t == "object")
377
377
  try {
@@ -381,7 +381,7 @@ function Be(t) {
381
381
  }
382
382
  return String(t);
383
383
  }
384
- function gs(t, o) {
384
+ function hs(t, o) {
385
385
  return t ? `${t}.${o}` : o;
386
386
  }
387
387
  function Ct(t) {
@@ -395,139 +395,139 @@ function Ct(t) {
395
395
  return { ok: !1, value: void 0 };
396
396
  }
397
397
  }
398
- const hs = ["_id", "id", "subject", "key", "name"];
399
- function ys(t, o) {
398
+ const ys = ["_id", "id", "subject", "key", "name"];
399
+ function bs(t, o) {
400
400
  if (t.length === 0 || o.length === 0) return null;
401
- const n = (d, y) => d.every((_) => _e(_) && _[y] !== void 0), r = (d, y) => {
402
- const _ = d.map((g) => g[y]);
403
- return _.length === new Set(_).size;
401
+ const n = (c, d) => c.every((b) => _e(b) && b[d] !== void 0), r = (c, d) => {
402
+ const b = c.map((_) => _[d]);
403
+ return b.length === new Set(b).size;
404
404
  };
405
- for (const d of hs)
406
- if (n(t, d) && n(o, d) && r(t, d) && r(o, d))
407
- return d;
405
+ for (const c of ys)
406
+ if (n(t, c) && n(o, c) && r(t, c) && r(o, c))
407
+ return c;
408
408
  return null;
409
409
  }
410
410
  function $t(t, o, n) {
411
- n.push({ path: t, type: "added", before: null, after: Be(o) });
411
+ n.push({ path: t, type: "added", before: null, after: Ke(o) });
412
412
  }
413
413
  function Et(t, o, n) {
414
- n.push({ path: t, type: "removed", before: Be(o), after: null });
414
+ n.push({ path: t, type: "removed", before: Ke(o), after: null });
415
415
  }
416
- function bs(t, o, n, r) {
417
- const d = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
418
- for (const y of Array.from(d)) {
419
- const _ = Object.prototype.hasOwnProperty.call(o, y), g = Object.prototype.hasOwnProperty.call(n, y);
420
- Ye(gs(t, y), o[y], _, n[y], g, r);
416
+ function _s(t, o, n, r) {
417
+ const c = /* @__PURE__ */ new Set([...Object.keys(o), ...Object.keys(n)]);
418
+ for (const d of Array.from(c)) {
419
+ const b = Object.prototype.hasOwnProperty.call(o, d), _ = Object.prototype.hasOwnProperty.call(n, d);
420
+ Ye(hs(t, d), o[d], b, n[d], _, r);
421
421
  }
422
422
  }
423
- function _s(t, o, n, r) {
424
- const d = ys(o, n);
425
- if (d) {
426
- const m = new Map(
427
- o.map((b) => [b[d], b])
428
- ), x = new Map(
429
- n.map((b) => [b[d], b])
430
- ), D = Array.from(m.keys()).concat(Array.from(x.keys())), F = Array.from(new Set(D));
431
- for (const b of F) {
432
- const j = m.has(b), B = x.has(b), E = `${t}[${String(b)}]`;
423
+ function xs(t, o, n, r) {
424
+ const c = bs(o, n);
425
+ if (c) {
426
+ const L = new Map(
427
+ o.map((p) => [p[c], p])
428
+ ), f = new Map(
429
+ n.map((p) => [p[c], p])
430
+ ), M = Array.from(L.keys()).concat(Array.from(f.keys())), C = Array.from(new Set(M));
431
+ for (const p of C) {
432
+ const j = L.has(p), K = f.has(p), E = `${t}[${String(p)}]`;
433
433
  Ye(
434
434
  E,
435
- m.get(b),
435
+ L.get(p),
436
436
  j,
437
- x.get(b),
438
- B,
437
+ f.get(p),
438
+ K,
439
439
  r
440
440
  );
441
441
  }
442
442
  return;
443
443
  }
444
- const y = o.map((m, x) => ({ sig: JSON.stringify(m), idx: x, item: m })), _ = n.map((m, x) => ({ sig: JSON.stringify(m), idx: x, item: m })), g = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map();
445
- for (const m of y)
446
- g.has(m.sig) || g.set(m.sig, []), g.get(m.sig).push(m);
447
- for (const m of _)
448
- S.has(m.sig) || S.set(m.sig, []), S.get(m.sig).push(m);
449
- const O = [], i = [], P = Array.from(g.keys()).concat(Array.from(S.keys())), $ = Array.from(new Set(P));
450
- for (const m of $) {
451
- const x = g.get(m) || [], D = S.get(m) || [], F = Math.min(x.length, D.length);
452
- for (let b = F; b < x.length; b++)
453
- O.push({ idx: x[b].idx, item: x[b].item });
454
- for (let b = F; b < D.length; b++)
455
- i.push({ idx: D[b].idx, item: D[b].item });
444
+ const d = o.map((L, f) => ({ sig: JSON.stringify(L), idx: f, item: L })), b = n.map((L, f) => ({ sig: JSON.stringify(L), idx: f, item: L })), _ = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
445
+ for (const L of d)
446
+ _.has(L.sig) || _.set(L.sig, []), _.get(L.sig).push(L);
447
+ for (const L of b)
448
+ w.has(L.sig) || w.set(L.sig, []), w.get(L.sig).push(L);
449
+ const D = [], O = [], i = Array.from(_.keys()).concat(Array.from(w.keys())), V = Array.from(new Set(i));
450
+ for (const L of V) {
451
+ const f = _.get(L) || [], M = w.get(L) || [], C = Math.min(f.length, M.length);
452
+ for (let p = C; p < f.length; p++)
453
+ D.push({ idx: f[p].idx, item: f[p].item });
454
+ for (let p = C; p < M.length; p++)
455
+ O.push({ idx: M[p].idx, item: M[p].item });
456
456
  }
457
- for (const { idx: m, item: x } of O)
458
- Et(`${t}[${m}]`, x, r);
459
- for (const { idx: m, item: x } of i)
460
- $t(`${t}[${m}]`, x, r);
457
+ for (const { idx: L, item: f } of D)
458
+ Et(`${t}[${L}]`, f, r);
459
+ for (const { idx: L, item: f } of O)
460
+ $t(`${t}[${L}]`, f, r);
461
461
  }
462
- function Ye(t, o, n, r, d, y) {
463
- if (!n && !d) return;
464
- if (n && !d) {
465
- Et(t, o, y);
462
+ function Ye(t, o, n, r, c, d) {
463
+ if (!n && !c) return;
464
+ if (n && !c) {
465
+ Et(t, o, d);
466
466
  return;
467
467
  }
468
- if (!n && d) {
469
- $t(t, r, y);
468
+ if (!n && c) {
469
+ $t(t, r, d);
470
470
  return;
471
471
  }
472
472
  if (JSON.stringify(o) === JSON.stringify(r)) return;
473
473
  if (_e(o) && _e(r)) {
474
- bs(t, o, r, y);
474
+ _s(t, o, r, d);
475
475
  return;
476
476
  }
477
477
  if (je(o) && je(r)) {
478
- _s(t, o, r, y);
478
+ xs(t, o, r, d);
479
479
  return;
480
480
  }
481
- const _ = Ct(o), g = Ct(r);
482
- if (_.ok && g.ok) {
483
- Ye(t, _.value, !0, g.value, !0, y);
481
+ const b = Ct(o), _ = Ct(r);
482
+ if (b.ok && _.ok) {
483
+ Ye(t, b.value, !0, _.value, !0, d);
484
484
  return;
485
485
  }
486
- y.push({
486
+ d.push({
487
487
  path: t,
488
488
  type: "changed",
489
- before: Be(o),
490
- after: Be(r)
489
+ before: Ke(o),
490
+ after: Ke(r)
491
491
  });
492
492
  }
493
- function xs(t, o) {
493
+ function Ls(t, o) {
494
494
  if (JSON.stringify(t) === JSON.stringify(o)) return [];
495
495
  const n = t == null, r = o == null;
496
- let d = t;
497
- n && (_e(o) ? d = {} : je(o) && (d = []));
498
- let y = o;
499
- r && (_e(t) ? y = {} : je(t) && (y = []));
500
- const _ = [];
501
- return Ye("", d, !0, y, !0, _), _;
496
+ let c = t;
497
+ n && (_e(o) ? c = {} : je(o) && (c = []));
498
+ let d = o;
499
+ r && (_e(t) ? d = {} : je(t) && (d = []));
500
+ const b = [];
501
+ return Ye("", c, !0, d, !0, b), b;
502
502
  }
503
- function jt(t) {
503
+ function Tt(t) {
504
504
  const o = t.operations;
505
505
  return !o || o.length === 0 ? !1 : o.some((n) => n.status === "failed");
506
506
  }
507
507
  function lt(t, o) {
508
- var d, y;
508
+ var c, d;
509
509
  if (t.source === "hrm-validate") return o("auditLog.pos.device.posV7");
510
- const n = (y = (d = t.metadata) == null ? void 0 : d.pos) == null ? void 0 : y.posMode, r = t.deviceId || "-";
510
+ const n = (d = (c = t.metadata) == null ? void 0 : c.pos) == null ? void 0 : d.posMode, r = t.deviceId || "-";
511
511
  return n ? `${r} · ${o(`auditLog.pos.mode.${n}`)}` : r;
512
512
  }
513
- function Ls(t, o) {
513
+ function ks(t, o) {
514
514
  var r;
515
515
  const n = t.actorName || t.userId || "-";
516
516
  return ((r = t.metadata) == null ? void 0 : r.actorKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
517
517
  }
518
- function Tt(t, o) {
519
- var d;
518
+ function jt(t, o) {
519
+ var c;
520
520
  const n = t.approverName || t.approverId;
521
521
  if (!n)
522
522
  return t.source === "hrm-validate" ? o("auditLog.pos.viaCode") : "-";
523
- const r = ((d = t.metadata) == null ? void 0 : d.approverKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
523
+ const r = ((c = t.metadata) == null ? void 0 : c.approverKnown) === !1 ? `${n} (${o("auditLog.pos.unverified")})` : n;
524
524
  return t.source === "hrm-validate" ? `${r} · ${o("auditLog.pos.viaCode")}` : r;
525
525
  }
526
- function ks(t, o) {
526
+ function Ss(t, o) {
527
527
  const n = t.approverName || t.approverId;
528
528
  return n ? ` · ${o("auditLog.pos.approverInline", { name: n })}` : "";
529
529
  }
530
- function Ss(t, o, n) {
530
+ function ws(t, o, n) {
531
531
  return o || !(t != null && t.length) ? { userIds: [], feedmeAdminActors: !1 } : {
532
532
  userIds: t.filter((r) => r !== n),
533
533
  feedmeAdminActors: t.includes(n)
@@ -536,7 +536,7 @@ function Ss(t, o, n) {
536
536
  function be(t) {
537
537
  return t === void 0 ? "—" : Array.isArray(t) ? t.length > 0 ? t.join(", ") : "—" : t || "—";
538
538
  }
539
- function ws(t) {
539
+ function Is(t) {
540
540
  return {
541
541
  label: t.label,
542
542
  labelKey: t.labelKey,
@@ -545,372 +545,372 @@ function ws(t) {
545
545
  afterDisplay: be(t.after)
546
546
  };
547
547
  }
548
- function Is(t) {
548
+ function As(t) {
549
549
  return Array.isArray(t) && t.length > 0;
550
550
  }
551
551
  function Rt(t, o, n) {
552
552
  return n.labelKey && o(n.labelKey) ? t(n.labelKey) : n.label;
553
553
  }
554
- function Nt(t, o) {
554
+ function Ut(t, o) {
555
555
  return ut(t, o) || t("auditLog.operation.unlabeled");
556
556
  }
557
- function As(t, o) {
557
+ function Fs(t, o) {
558
558
  return !o || o.length === 0 ? "" : o.map((n) => {
559
- const r = Nt(t, n), d = t(`auditLog.outcome.${n.status}`);
560
- let y = `${r}: ${d}`;
561
- return n.status === "failed" && n.errorMessage && (y += ` — ${n.errorMessage}`), y;
559
+ const r = Ut(t, n), c = t(`auditLog.outcome.${n.status}`);
560
+ let d = `${r}: ${c}`;
561
+ return n.status === "failed" && n.errorMessage && (d += ` — ${n.errorMessage}`), d;
562
562
  }).join(`
563
563
  `);
564
564
  }
565
- function Fs(t, o, n) {
565
+ function Ms(t, o, n) {
566
566
  const r = Rt(t, o, n);
567
567
  return n.type === "add" ? `${r}: + ${be(n.after)}` : n.type === "remove" ? `${r}: - ${be(n.before)}` : `${r}: ${be(n.before)} → ${be(n.after)}`;
568
568
  }
569
- function Ms(t, o, n) {
569
+ function Ds(t, o, n) {
570
570
  if (!n || n.length === 0) return "";
571
- const r = n.filter((_) => _.changeNodes && _.changeNodes.length > 0);
571
+ const r = n.filter((b) => b.changeNodes && b.changeNodes.length > 0);
572
572
  if (r.length === 0) return "";
573
- const d = r.length > 1;
574
- return r.map((_) => {
575
- const g = (_.changeNodes ?? []).map((S) => Fs(t, o, S));
576
- return d ? [`[${Nt(t, _)}]`, ...g].join(`
577
- `) : g.join(`
573
+ const c = r.length > 1;
574
+ return r.map((b) => {
575
+ const _ = (b.changeNodes ?? []).map((w) => Ms(t, o, w));
576
+ return c ? [`[${Ut(t, b)}]`, ..._].join(`
577
+ `) : _.join(`
578
578
  `);
579
579
  }).join(`
580
580
  `);
581
581
  }
582
- const Ds = {
582
+ const Os = {
583
583
  class: "flex flex-col gap-4 p-12 w-[260px]"
584
- }, Os = {
585
- class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
586
584
  }, Cs = {
585
+ class: "text-xs font-semibold text-fm-color-typo-secondary mb-4"
586
+ }, Ts = {
587
587
  class: "flex min-h-0 flex-1 flex-col gap-16"
588
588
  }, js = {
589
589
  class: "space-y-16"
590
- }, Ts = {
591
- class: "flex flex-wrap items-center gap-8"
592
590
  }, Ps = {
593
- key: 0,
594
- class: "w-fit"
591
+ class: "flex flex-wrap items-center gap-8"
595
592
  }, Vs = {
596
- key: 1,
593
+ key: 0,
597
594
  class: "w-fit"
598
595
  }, $s = {
596
+ key: 1,
599
597
  class: "w-fit"
600
598
  }, Es = {
601
599
  class: "w-fit"
602
600
  }, Rs = {
601
+ class: "w-fit"
602
+ }, Us = {
603
603
  key: 2,
604
604
  class: "w-fit"
605
605
  }, Ns = {
606
606
  class: "flex h-full flex-col overflow-auto"
607
- }, Us = {
607
+ }, Ks = {
608
608
  key: 0,
609
609
  class: "space-y-12 p-4 text-sm"
610
- }, Ks = {
610
+ }, Ys = {
611
611
  class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
612
612
  }, Bs = {
613
613
  class: "min-w-0 flex-1"
614
- }, Ys = {
615
- class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
616
614
  }, zs = {
615
+ class: "audit-log-operation-label-detail text-base font-bold leading-snug text-fm-color-typo-primary"
616
+ }, qs = {
617
617
  key: 0,
618
618
  class: "mt-4 break-all font-mono text-xs text-fm-color-typo-secondary"
619
- }, qs = {
619
+ }, Js = {
620
620
  key: 1,
621
621
  class: "mt-2 break-all font-mono text-xs text-fm-color-typo-secondary"
622
- }, Js = {
623
- class: "flex items-center gap-4"
624
622
  }, Hs = {
625
- class: "rounded-lg border border-fm-color-border-default p-12"
623
+ class: "flex items-center gap-4"
626
624
  }, Ws = {
627
- class: "space-y-12"
625
+ class: "rounded-lg border border-fm-color-border-default p-12"
628
626
  }, Gs = {
629
- class: "text-xs text-fm-color-typo-secondary"
627
+ class: "space-y-12"
630
628
  }, Xs = {
631
- class: "font-semibold"
632
- }, Qs = {
633
629
  class: "text-xs text-fm-color-typo-secondary"
634
- }, Zs = {
630
+ }, Qs = {
635
631
  class: "font-semibold"
636
- }, ea = {
632
+ }, Zs = {
637
633
  class: "text-xs text-fm-color-typo-secondary"
634
+ }, ea = {
635
+ class: "font-semibold"
638
636
  }, ta = {
639
- class: "break-all font-semibold"
637
+ class: "text-xs text-fm-color-typo-secondary"
640
638
  }, oa = {
641
- key: 0
639
+ class: "break-all font-semibold"
642
640
  }, sa = {
643
- class: "text-xs text-fm-color-typo-secondary"
641
+ key: 0
644
642
  }, aa = {
645
- class: "break-all font-mono text-xs font-semibold"
646
- }, na = {
647
643
  class: "text-xs text-fm-color-typo-secondary"
648
- }, la = {
644
+ }, na = {
649
645
  class: "break-all font-mono text-xs font-semibold"
650
- }, ra = {
646
+ }, la = {
651
647
  class: "text-xs text-fm-color-typo-secondary"
648
+ }, ra = {
649
+ class: "break-all font-mono text-xs font-semibold"
652
650
  }, ia = {
653
- class: "font-semibold"
651
+ class: "text-xs text-fm-color-typo-secondary"
654
652
  }, ua = {
655
- class: "rounded-lg border border-fm-color-border-default"
653
+ class: "font-semibold"
656
654
  }, da = {
657
- class: "p-12"
655
+ class: "rounded-lg border border-fm-color-border-default"
658
656
  }, ca = {
659
- class: "text-base font-bold text-fm-color-typo-primary"
657
+ class: "p-12"
660
658
  }, fa = {
661
- class: "space-y-12 p-12"
659
+ class: "text-base font-bold text-fm-color-typo-primary"
662
660
  }, ma = {
663
- class: "text-xs text-fm-color-typo-secondary"
661
+ class: "space-y-12 p-12"
664
662
  }, va = {
665
- class: "font-semibold"
663
+ class: "text-xs text-fm-color-typo-secondary"
666
664
  }, pa = {
667
- class: "rounded-lg border border-fm-color-border-default"
665
+ class: "font-semibold"
668
666
  }, ga = {
669
- class: "p-12"
667
+ class: "rounded-lg border border-fm-color-border-default"
670
668
  }, ha = {
671
- class: "text-base font-bold text-fm-color-typo-primary"
669
+ class: "p-12"
672
670
  }, ya = {
673
- class: "space-y-12 p-12"
671
+ class: "text-base font-bold text-fm-color-typo-primary"
674
672
  }, ba = {
675
- class: "text-xs text-fm-color-typo-secondary"
673
+ class: "space-y-12 p-12"
676
674
  }, _a = {
677
- class: "font-semibold"
675
+ class: "text-xs text-fm-color-typo-secondary"
678
676
  }, xa = {
679
- key: 0
677
+ class: "font-semibold"
680
678
  }, La = {
681
- class: "text-xs text-fm-color-typo-secondary"
679
+ key: 0
682
680
  }, ka = {
681
+ class: "text-xs text-fm-color-typo-secondary"
682
+ }, Sa = {
683
683
  key: 0,
684
684
  class: "font-semibold"
685
- }, Sa = {
685
+ }, wa = {
686
686
  key: 1,
687
687
  class: "break-all font-mono text-xs text-fm-color-typo-secondary"
688
- }, wa = {
689
- key: 1
690
688
  }, Ia = {
691
- class: "text-xs text-fm-color-typo-secondary"
689
+ key: 1
692
690
  }, Aa = {
693
- class: "font-semibold whitespace-pre-line"
694
- }, Fa = {
695
691
  class: "text-xs text-fm-color-typo-secondary"
692
+ }, Fa = {
693
+ class: "font-semibold whitespace-pre-line"
696
694
  }, Ma = {
697
- class: "font-semibold"
698
- }, Da = {
699
695
  class: "text-xs text-fm-color-typo-secondary"
696
+ }, Da = {
697
+ class: "font-semibold"
700
698
  }, Oa = {
701
- class: "break-all font-mono text-xs font-semibold"
702
- }, Ca = {
703
699
  class: "text-xs text-fm-color-typo-secondary"
704
- }, ja = {
700
+ }, Ca = {
705
701
  class: "break-all font-mono text-xs font-semibold"
706
702
  }, Ta = {
707
703
  class: "text-xs text-fm-color-typo-secondary"
704
+ }, ja = {
705
+ class: "break-all font-mono text-xs font-semibold"
708
706
  }, Pa = {
709
- class: "font-semibold"
707
+ class: "text-xs text-fm-color-typo-secondary"
710
708
  }, Va = {
709
+ class: "font-semibold"
710
+ }, $a = {
711
711
  key: 0,
712
712
  class: "break-all font-mono text-xs"
713
- }, $a = {
714
- key: 0
715
713
  }, Ea = {
716
- class: "text-xs text-fm-color-typo-secondary"
714
+ key: 0
717
715
  }, Ra = {
718
- class: "font-semibold"
719
- }, Na = {
720
716
  class: "text-xs text-fm-color-typo-secondary"
721
717
  }, Ua = {
722
718
  class: "font-semibold"
719
+ }, Na = {
720
+ class: "text-xs text-fm-color-typo-secondary"
723
721
  }, Ka = {
722
+ class: "font-semibold"
723
+ }, Ya = {
724
724
  class: "text-xs text-fm-color-typo-secondary"
725
725
  }, Ba = {
726
726
  class: "font-semibold"
727
- }, Ya = {
728
- key: 0
729
727
  }, za = {
730
- key: 1
728
+ key: 0
731
729
  }, qa = {
732
- class: "text-xs text-fm-color-typo-secondary"
730
+ key: 1
733
731
  }, Ja = {
734
- class: "whitespace-pre-wrap break-all font-mono text-xs"
732
+ class: "text-xs text-fm-color-typo-secondary"
735
733
  }, Ha = {
736
- key: 3
734
+ class: "whitespace-pre-wrap break-all font-mono text-xs"
737
735
  }, Wa = {
738
- class: "text-xs text-fm-color-typo-secondary"
736
+ key: 3
739
737
  }, Ga = {
740
- class: "mt-4 space-y-4"
738
+ class: "text-xs text-fm-color-typo-secondary"
741
739
  }, Xa = {
742
- class: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-fm-color-primary-default text-xs font-bold text-white"
740
+ class: "mt-4 space-y-4"
743
741
  }, Qa = {
744
- class: "text-xs font-semibold"
742
+ class: "flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-fm-color-primary-default text-xs font-bold text-white"
745
743
  }, Za = {
744
+ class: "text-xs font-semibold"
745
+ }, en = {
746
746
  key: 0,
747
747
  class: "text-fm-color-typo-secondary"
748
- }, en = {
749
- key: 4
750
748
  }, tn = {
751
- class: "text-xs text-fm-color-typo-secondary"
749
+ key: 4
752
750
  }, on = {
753
- class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
751
+ class: "text-xs text-fm-color-typo-secondary"
754
752
  }, sn = {
753
+ class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
754
+ }, an = {
755
755
  key: 0,
756
756
  class: "space-y-12 p-4 text-sm"
757
- }, an = {
758
- class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
759
757
  }, nn = {
760
- class: "min-w-0 flex-1"
758
+ class: "flex items-start justify-between gap-8 rounded-lg border border-fm-color-border-default p-12"
761
759
  }, ln = {
762
- class: "text-base font-bold leading-snug text-fm-color-typo-primary"
760
+ class: "min-w-0 flex-1"
763
761
  }, rn = {
762
+ class: "text-base font-bold leading-snug text-fm-color-typo-primary"
763
+ }, un = {
764
764
  key: 0,
765
765
  class: "text-xs text-fm-color-typo-secondary"
766
- }, un = {
767
- class: "rounded-lg border border-fm-color-border-default p-12"
768
766
  }, dn = {
769
- class: "space-y-12"
767
+ class: "rounded-lg border border-fm-color-border-default p-12"
770
768
  }, cn = {
771
- class: "text-xs text-fm-color-typo-secondary"
769
+ class: "space-y-12"
772
770
  }, fn = {
773
- class: "font-semibold"
771
+ class: "text-xs text-fm-color-typo-secondary"
774
772
  }, mn = {
775
- key: 0
773
+ class: "font-semibold"
776
774
  }, vn = {
777
- class: "text-xs text-fm-color-typo-secondary"
775
+ key: 0
778
776
  }, pn = {
779
- class: "font-semibold"
777
+ class: "text-xs text-fm-color-typo-secondary"
780
778
  }, gn = {
781
- key: 1
779
+ class: "font-semibold"
782
780
  }, hn = {
783
- class: "text-xs text-fm-color-typo-secondary"
781
+ key: 1
784
782
  }, yn = {
785
- class: "font-semibold"
783
+ class: "text-xs text-fm-color-typo-secondary"
786
784
  }, bn = {
785
+ class: "font-semibold"
786
+ }, _n = {
787
787
  key: 0,
788
788
  class: "rounded-lg border border-fm-color-border-default p-12"
789
- }, _n = {
790
- class: "text-xs text-fm-color-typo-secondary"
791
789
  }, xn = {
792
- class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
790
+ class: "text-xs text-fm-color-typo-secondary"
793
791
  }, Ln = {
794
- class: "rounded-lg border border-fm-color-border-default"
792
+ class: "whitespace-pre-line font-semibold text-fm-color-typo-error"
795
793
  }, kn = {
796
- class: "p-12"
794
+ class: "rounded-lg border border-fm-color-border-default"
797
795
  }, Sn = {
798
- class: "text-base font-bold text-fm-color-typo-primary"
799
- }, wn = {
800
796
  class: "p-12"
797
+ }, wn = {
798
+ class: "text-base font-bold text-fm-color-typo-primary"
801
799
  }, In = {
800
+ class: "p-12"
801
+ }, An = {
802
802
  key: 0,
803
803
  class: "divide-y divide-fm-color-border-default"
804
- }, An = {
805
- class: "flex flex-wrap items-center gap-8"
806
804
  }, Fn = {
807
- class: "break-all text-xs"
805
+ class: "flex flex-wrap items-center gap-8"
808
806
  }, Mn = {
809
- class: "break-all font-mono text-xs"
807
+ class: "break-all text-xs"
810
808
  }, Dn = {
809
+ class: "break-all font-mono text-xs"
810
+ }, On = {
811
811
  key: 0,
812
812
  class: "text-fm-color-typo-success"
813
- }, On = {
813
+ }, Cn = {
814
814
  key: 1,
815
815
  class: "text-fm-color-typo-error"
816
- }, Cn = {
816
+ }, Tn = {
817
817
  class: "text-fm-color-typo-error"
818
818
  }, jn = {
819
819
  class: "text-fm-color-typo-success"
820
- }, Tn = {
820
+ }, Pn = {
821
821
  key: 1,
822
822
  class: "divide-y divide-fm-color-border-default"
823
- }, Pn = {
824
- class: "flex flex-wrap items-center gap-8"
825
823
  }, Vn = {
826
- class: "break-all font-mono text-xs"
824
+ class: "flex flex-wrap items-center gap-8"
827
825
  }, $n = {
828
- class: "space-y-4"
826
+ class: "break-all font-mono text-xs"
829
827
  }, En = {
828
+ class: "space-y-4"
829
+ }, Rn = {
830
830
  key: 0,
831
831
  class: "text-fm-color-typo-success"
832
- }, Rn = {
832
+ }, Un = {
833
833
  key: 1,
834
834
  class: "text-fm-color-typo-error"
835
835
  }, Nn = {
836
836
  class: "text-fm-color-typo-error"
837
- }, Un = {
838
- class: "text-fm-color-typo-success"
839
837
  }, Kn = {
838
+ class: "text-fm-color-typo-success"
839
+ }, Yn = {
840
840
  key: 2,
841
841
  class: "text-fm-color-typo-secondary"
842
842
  }, Bn = {
843
843
  key: 1,
844
844
  class: "rounded-lg border border-fm-color-border-default"
845
- }, Yn = {
846
- class: "text-base font-bold text-fm-color-typo-primary"
847
845
  }, zn = {
848
- class: "space-y-12 p-12"
846
+ class: "text-base font-bold text-fm-color-typo-primary"
849
847
  }, qn = {
850
- key: 0
848
+ class: "space-y-12 p-12"
851
849
  }, Jn = {
852
- class: "text-xs text-fm-color-typo-secondary"
850
+ key: 0
853
851
  }, Hn = {
854
- class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
852
+ class: "text-xs text-fm-color-typo-secondary"
855
853
  }, Wn = {
856
- key: 1
854
+ class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
857
855
  }, Gn = {
858
- class: "text-xs text-fm-color-typo-secondary"
856
+ key: 1
859
857
  }, Xn = {
858
+ class: "text-xs text-fm-color-typo-secondary"
859
+ }, Qn = {
860
860
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner whitespace-pre-wrap break-all"
861
- }, De = 100, rt = 1e3, it = "__feedmeAdmin__", Qn = "D MMM YYYY h:mm A", Zn = "YYYY-MM-DD HH:mm", K = "YYYY-MM-DD", Pt = "audit-log-export-fields-v3", el = /* @__PURE__ */ Vt({
861
+ }, Oe = 100, rt = 1e3, it = "__feedmeAdmin__", Zn = "D MMM YYYY h:mm A", el = "YYYY-MM-DD HH:mm", N = "YYYY-MM-DD", Pt = "audit-log-export-fields-v3", tl = /* @__PURE__ */ Vt({
862
862
  __name: "AuditLogList",
863
863
  setup(t) {
864
864
  const {
865
865
  t: o,
866
866
  te: n
867
- } = dt(), r = Ho(), d = fs(), y = Xo(), {
867
+ } = dt(), r = Ho(), c = Wo(), d = ms(), b = Qo(), {
868
868
  restaurants: _
869
- } = Jo(y), g = w(!1), S = w(!1), O = w([]), i = w(null), P = w(!1), $ = w({}), m = w(null), x = w(!1);
870
- async function D(e) {
871
- const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), c = new DecompressionStream("gzip"), L = c.writable.getWriter();
872
- return await L.write(s), await L.close(), new Response(c.readable).text();
869
+ } = Jo(b), w = S(!1), D = S(!1), O = S([]), i = S(null), V = S(!1), L = S({}), f = S(null), M = S(!1);
870
+ async function C(e) {
871
+ const s = Uint8Array.from(atob(e), (k) => k.charCodeAt(0)), m = new DecompressionStream("gzip"), x = m.writable.getWriter();
872
+ return await x.write(s), await x.close(), new Response(m.readable).text();
873
873
  }
874
- const F = w("");
875
- let b = 0;
876
- oe(() => {
874
+ const p = S("");
875
+ let j = 0;
876
+ ae(() => {
877
877
  var e, s;
878
878
  return (s = (e = i.value) == null ? void 0 : e.metadata) == null ? void 0 : s.requestBody;
879
879
  }, async (e) => {
880
- const s = ++b;
880
+ const s = ++j;
881
881
  if (!e) {
882
- F.value = "";
882
+ p.value = "";
883
883
  return;
884
884
  }
885
885
  if (typeof e == "object") {
886
- F.value = JSON.stringify(e, null, 2);
886
+ p.value = JSON.stringify(e, null, 2);
887
887
  return;
888
888
  }
889
889
  if (e.startsWith("gzip:")) {
890
890
  try {
891
- const c = await D(e.slice(5));
892
- if (s !== b) return;
893
- F.value = JSON.stringify(JSON.parse(c), null, 2);
891
+ const m = await C(e.slice(5));
892
+ if (s !== j) return;
893
+ p.value = JSON.stringify(JSON.parse(m), null, 2);
894
894
  } catch {
895
- if (s !== b) return;
896
- F.value = e;
895
+ if (s !== j) return;
896
+ p.value = e;
897
897
  }
898
898
  return;
899
899
  }
900
900
  try {
901
- F.value = JSON.stringify(JSON.parse(e), null, 2);
901
+ p.value = JSON.stringify(JSON.parse(e), null, 2);
902
902
  } catch {
903
- F.value = e;
903
+ p.value = e;
904
904
  }
905
905
  }, {
906
906
  immediate: !0
907
907
  });
908
- async function j(e) {
908
+ async function K(e) {
909
909
  if (!e) return;
910
910
  let s = e;
911
911
  if (e.startsWith("gzip:"))
912
912
  try {
913
- s = await D(e.slice(5));
913
+ s = await C(e.slice(5));
914
914
  } catch {
915
915
  return e;
916
916
  }
@@ -920,7 +920,7 @@ const Ds = {
920
920
  return s;
921
921
  }
922
922
  }
923
- function B(e) {
923
+ function E(e) {
924
924
  if (e === void 0) return "";
925
925
  if (typeof e == "object" && e !== null)
926
926
  try {
@@ -930,144 +930,143 @@ const Ds = {
930
930
  }
931
931
  return String(e);
932
932
  }
933
- const E = w([]), H = w([]), U = w(""), I = w(""), X = w(!1);
934
- let ue = 0;
935
- oe(m, async (e) => {
936
- const s = ++ue;
937
- if (E.value = [], H.value = [], U.value = "", I.value = "", X.value = !1, !e) return;
938
- const [c, L] = await Promise.all([j(e.before), j(e.after)]);
939
- s === ue && (Is(e.changeNodes) ? H.value = e.changeNodes.map(ws) : E.value = xs(c, L), U.value = B(c), I.value = B(L));
933
+ const X = S([]), Y = S([]), I = S(""), Q = S(""), H = S(!1);
934
+ let xe = 0;
935
+ ae(f, async (e) => {
936
+ const s = ++xe;
937
+ if (X.value = [], Y.value = [], I.value = "", Q.value = "", H.value = !1, !e) return;
938
+ const [m, x] = await Promise.all([K(e.before), K(e.after)]);
939
+ s === xe && (As(e.changeNodes) ? Y.value = e.changeNodes.map(Is) : X.value = Ls(m, x), I.value = E(m), Q.value = E(x));
940
940
  });
941
- function Te(e) {
941
+ function ct(e) {
942
942
  return e === "added" ? "success" : e === "removed" ? "critical" : "warning";
943
943
  }
944
- function ct(e) {
944
+ function W(e) {
945
945
  return o(e === "added" ? "auditLog.operation.added" : e === "removed" ? "auditLog.operation.removed" : "auditLog.operation.updated");
946
946
  }
947
- function W(e) {
947
+ function Le(e) {
948
948
  return e.replace(/\[[^\]]*\]/g, "");
949
949
  }
950
- function xe(e) {
950
+ function Nt(e) {
951
951
  return e === "add" ? "success" : e === "remove" ? "critical" : "warning";
952
952
  }
953
- function Ut(e) {
953
+ function Kt(e) {
954
954
  return o(e === "add" ? "auditLog.operation.added" : e === "remove" ? "auditLog.operation.removed" : "auditLog.operation.updated");
955
955
  }
956
- function Kt(e) {
956
+ function Yt(e) {
957
957
  return Rt(o, n, e);
958
958
  }
959
959
  const ft = A(() => {
960
960
  const e = [], s = /* @__PURE__ */ new Map();
961
- for (const c of E.value) {
962
- const L = W(c.path), k = `${c.type}::${L}`;
963
- let C = s.get(k);
964
- C || (C = {
961
+ for (const m of X.value) {
962
+ const x = Le(m.path), k = `${m.type}::${x}`;
963
+ let T = s.get(k);
964
+ T || (T = {
965
965
  groupKey: k,
966
- displayKey: L,
967
- type: c.type,
966
+ displayKey: x,
967
+ type: m.type,
968
968
  rows: []
969
- }, s.set(k, C), e.push(C)), C.rows.push(c);
969
+ }, s.set(k, T), e.push(T)), T.rows.push(m);
970
970
  }
971
971
  return e;
972
- }), Pe = w(1), Bt = w(!1), ze = w(0), mt = A(() => Math.max(1, Math.ceil(ze.value / De))), vt = T().format("YYYY-MM-DD"), se = w({
972
+ }), Pe = S(1), Bt = S(!1), Be = S(0), mt = A(() => Math.max(1, Math.ceil(Be.value / Oe))), vt = P().format("YYYY-MM-DD"), ne = S({
973
973
  startDate: `${vt} 00:00`,
974
974
  endDate: `${vt} 23:59`
975
- }), fe = w(), Q = w(), ae = w(), ne = w(), le = w("all");
976
- function Yt(e) {
975
+ }), fe = S(), Z = S(), le = S(), re = S(), ie = S("all");
976
+ function zt(e) {
977
977
  return typeof e == "string" ? [e] : Array.isArray(e) ? e.filter((s) => typeof s == "string") : [];
978
978
  }
979
- const pt = Me.filter((e) => e.key !== "all").map((e) => e.key);
979
+ const pt = De.filter((e) => e.key !== "all").map((e) => e.key);
980
980
  function Ve(e) {
981
- const s = Me.find((c) => c.key !== "all" && c.subjectPrefixes.some((L) => e.startsWith(L)));
981
+ const s = De.find((m) => m.key !== "all" && m.subjectPrefixes.some((x) => e.startsWith(x)));
982
982
  return (s == null ? void 0 : s.key) ?? "other";
983
983
  }
984
984
  function gt(e) {
985
985
  const s = pt.indexOf(e);
986
986
  return s === -1 ? pt.length : s;
987
987
  }
988
- const zt = A(() => Me.map(({
988
+ const qt = ["all", "report", "hrm", "payment"], Jt = A(() => De.filter(({
989
+ key: e
990
+ }) => !c.isFoodCourt.value || qt.includes(e)).map(({
989
991
  key: e
990
992
  }) => ({
991
993
  label: o(`auditLog.modules.${e}`),
992
994
  value: e
993
- }))), $e = A(() => Me.find((e) => e.key === le.value) ?? Me[0]), qt = A(() => le.value === "all"), q = A(() => le.value === "pos"), pe = A(() => $e.value.sources ?? []);
994
- oe(q, (e) => {
995
- e && y.readRestaurants();
995
+ }))), $e = A(() => De.find((e) => e.key === ie.value) ?? De[0]), Ht = A(() => ie.value === "all"), q = A(() => ie.value === "pos"), pe = A(() => $e.value.sources ?? []);
996
+ ae(q, (e) => {
997
+ e && b.readRestaurants();
996
998
  }, {
997
999
  immediate: !0
998
1000
  });
999
- const Z = w([]), Jt = A(() => _.value.map((e) => ({
1001
+ const ee = S([]), Wt = A(() => _.value.map((e) => ({
1000
1002
  label: e.profile.name,
1001
1003
  value: String(e._id)
1002
- }))), Ht = A(() => Object.fromEntries(_.value.map((e) => [String(e._id), e.profile.name])));
1003
- oe(le, () => {
1004
- Z.value = [];
1004
+ }))), Gt = A(() => Object.fromEntries(_.value.map((e) => [String(e._id), e.profile.name])));
1005
+ ae(ie, () => {
1006
+ ee.value = [];
1005
1007
  });
1006
- const Le = w([]), Ee = w(!1), Wt = A(() => [...Ee.value ? [{
1008
+ const ke = S([]), Ee = S(!1), Xt = A(() => [...Ee.value ? [{
1007
1009
  label: o("auditLog.user.feedmeAdmin"),
1008
1010
  value: it
1009
1011
  }] : [], ...d.members.map((e) => ({
1010
1012
  label: e.name,
1011
1013
  value: e.doc.userId
1012
- })), ...Le.value.map((e) => ({
1014
+ })), ...ke.value.map((e) => ({
1013
1015
  label: `${e.name} (${o("auditLog.user.feedmeAdmin")})`,
1014
1016
  value: e.userId
1015
- }))]), re = A(() => Ss(fe.value, q.value, it)), qe = w(""), ee = w(""), Gt = ts(qe, (e) => {
1016
- ee.value = e.trim();
1017
+ }))]), ue = A(() => ws(fe.value, q.value, it)), ze = S(""), te = S(""), Qt = os(ze, (e) => {
1018
+ te.value = e.trim();
1017
1019
  });
1018
- Yo(Gt);
1020
+ Bo(Qt);
1019
1021
  const {
1020
- onSheetOpened: Xt,
1021
- onSheetClosed: Qt,
1022
- copyLink: Zt
1023
- } = ps({
1022
+ onSheetOpened: Zt,
1023
+ onSheetClosed: eo,
1024
+ copyLink: to
1025
+ } = gs({
1024
1026
  logs: O,
1025
1027
  selectedLog: i,
1026
- isSheetOpen: P,
1027
- businessId: () => {
1028
- var e;
1029
- return (e = r.currentBusiness.value) == null ? void 0 : e._id;
1030
- }
1028
+ isSheetOpen: V,
1029
+ businessId: () => c.id.value
1031
1030
  }), me = A(() => {
1032
- const e = ee.value.toLowerCase();
1031
+ const e = te.value.toLowerCase();
1033
1032
  if (!e) return [];
1034
1033
  const s = /* @__PURE__ */ new Set();
1035
- for (const c of d.members) {
1036
- const L = c.doc.userId;
1037
- ((d.userIdToName[L] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[L] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[L] ?? "").toLowerCase().includes(e)) && s.add(L);
1034
+ for (const m of d.members) {
1035
+ const x = m.doc.userId;
1036
+ ((d.userIdToName[x] ?? "").toLowerCase().includes(e) || (d.userIdToEmail[x] ?? "").toLowerCase().includes(e) || (d.userIdToPhone[x] ?? "").toLowerCase().includes(e)) && s.add(x);
1038
1037
  }
1039
- for (const c of Le.value)
1040
- c.name.toLowerCase().includes(e) && s.add(c.userId);
1038
+ for (const m of ke.value)
1039
+ m.name.toLowerCase().includes(e) && s.add(m.userId);
1041
1040
  return [...s];
1042
- }), Je = A(() => {
1043
- const e = Dt.flatMap((k) => Yt(k.subject).map((C) => ({
1041
+ }), qe = A(() => {
1042
+ const e = Dt.flatMap((k) => zt(k.subject).map((T) => ({
1044
1043
  label: k.label,
1045
- value: C
1046
- }))), s = Object.entries(Mt).map(([k, C]) => ({
1047
- label: C,
1044
+ value: T
1045
+ }))), s = Object.entries(Mt).map(([k, T]) => ({
1046
+ label: T,
1048
1047
  value: k
1049
- })), c = /* @__PURE__ */ new Set(), L = [];
1048
+ })), m = /* @__PURE__ */ new Set(), x = [];
1050
1049
  for (const k of [...e, ...s])
1051
- if (!c.has(k.value)) {
1052
- c.add(k.value);
1053
- const C = Ve(k.value);
1054
- L.push({
1050
+ if (!m.has(k.value)) {
1051
+ m.add(k.value);
1052
+ const T = Ve(k.value);
1053
+ x.push({
1055
1054
  ...k,
1056
- group: o(`auditLog.modules.${C}`)
1055
+ group: o(`auditLog.modules.${T}`)
1057
1056
  });
1058
1057
  }
1059
- return L.sort((k, C) => gt(Ve(k.value)) - gt(Ve(C.value)));
1058
+ return x.sort((k, T) => gt(Ve(k.value)) - gt(Ve(T.value)));
1060
1059
  }), ge = A(() => {
1061
- const e = ee.value.toLowerCase();
1060
+ const e = te.value.toLowerCase();
1062
1061
  if (!e) return [];
1063
1062
  const s = /* @__PURE__ */ new Set();
1064
- for (const c of Je.value)
1065
- c.label.toLowerCase().includes(e) && s.add(c.value);
1063
+ for (const m of qe.value)
1064
+ m.label.toLowerCase().includes(e) && s.add(m.value);
1066
1065
  return [...s];
1067
- }), eo = A(() => qt.value ? Je.value : Je.value.filter((e) => Ve(e.value) === le.value));
1068
- function to(e, s) {
1069
- const c = s.toLowerCase();
1070
- return e.label.toLowerCase().includes(c) || e.value.replace(/^business::/, "").toLowerCase().includes(c) ? !0 : e.value.toLowerCase().includes(c);
1066
+ }), oo = A(() => Ht.value ? qe.value : qe.value.filter((e) => Ve(e.value) === ie.value));
1067
+ function so(e, s) {
1068
+ const m = s.toLowerCase();
1069
+ return e.label.toLowerCase().includes(m) || e.value.replace(/^business::/, "").toLowerCase().includes(m) ? !0 : e.value.toLowerCase().includes(m);
1071
1070
  }
1072
1071
  const G = A(() => ({
1073
1072
  manage: o("auditLog.action.manage"),
@@ -1075,7 +1074,7 @@ const Ds = {
1075
1074
  read: o("auditLog.action.read"),
1076
1075
  update: o("auditLog.action.update"),
1077
1076
  delete: o("auditLog.action.delete")
1078
- })), oo = A(() => [{
1077
+ })), ao = A(() => [{
1079
1078
  label: G.value.manage,
1080
1079
  value: "manage"
1081
1080
  }, {
@@ -1094,26 +1093,26 @@ const Ds = {
1094
1093
  allowed: o("auditLog.outcome.success"),
1095
1094
  denied: o("auditLog.outcome.failed"),
1096
1095
  skipped: o("auditLog.outcome.skipped")
1097
- })), He = A(() => {
1096
+ })), Je = A(() => {
1098
1097
  var e;
1099
1098
  return ((e = r.sessionUser.value) == null ? void 0 : e.isInternal) ?? !1;
1100
1099
  });
1101
1100
  function ht(e) {
1102
- return !He.value && e === "skipped" ? "allowed" : e;
1101
+ return !Je.value && e === "skipped" ? "allowed" : e;
1103
1102
  }
1104
- function We(e) {
1105
- return !(e != null && e.length) || He.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
1103
+ function He(e) {
1104
+ return !(e != null && e.length) || Je.value ? e : e.includes("allowed") ? [.../* @__PURE__ */ new Set([...e, "skipped"])] : e;
1106
1105
  }
1107
- const so = A(() => [{
1106
+ const no = A(() => [{
1108
1107
  label: Re.value.allowed,
1109
1108
  value: "allowed"
1110
1109
  }, {
1111
1110
  label: Re.value.denied,
1112
1111
  value: "denied"
1113
- }, ...He.value ? [{
1112
+ }, ...Je.value ? [{
1114
1113
  label: Re.value.skipped,
1115
1114
  value: "skipped"
1116
- }] : []]), ao = A(() => ({
1115
+ }] : []]), lo = A(() => ({
1117
1116
  admin: o("auditLog.detail.resolvedFromValue.admin"),
1118
1117
  staff: o("auditLog.detail.resolvedFromValue.staff"),
1119
1118
  permissionSet: o("auditLog.detail.resolvedFromValue.permissionSet"),
@@ -1121,95 +1120,95 @@ const Ds = {
1121
1120
  custom: o("auditLog.detail.resolvedFromValue.custom"),
1122
1121
  "no-match": o("auditLog.detail.resolvedFromValue.noMatch"),
1123
1122
  unknown: o("auditLog.detail.resolvedFromValue.unknown")
1124
- })), no = A(() => ({
1123
+ })), ro = A(() => ({
1125
1124
  GET: G.value.read,
1126
1125
  POST: G.value.create,
1127
1126
  PUT: G.value.update,
1128
1127
  PATCH: G.value.update,
1129
1128
  DELETE: G.value.delete
1130
- })), lo = {
1129
+ })), io = {
1131
1130
  allowed: "success",
1132
1131
  denied: "critical",
1133
1132
  skipped: "warning"
1134
1133
  };
1135
- function Ne(e) {
1136
- return T(e).format(Qn);
1134
+ function Ue(e) {
1135
+ return P(e).format(Zn);
1137
1136
  }
1138
- const ro = A(() => {
1137
+ const uo = A(() => {
1139
1138
  const {
1140
1139
  startDate: e,
1141
1140
  endDate: s
1142
- } = se.value;
1143
- return e && s ? `${Ne(e)} – ${Ne(s)}` : e ? Ne(e) : s ? Ne(s) : o("auditLog.dateRange.placeholder");
1144
- }), io = A(() => [{
1141
+ } = ne.value;
1142
+ return e && s ? `${Ue(e)} – ${Ue(s)}` : e ? Ue(e) : s ? Ue(s) : o("auditLog.dateRange.placeholder");
1143
+ }), co = A(() => [{
1145
1144
  label: o("date.predefinedRanges.today"),
1146
1145
  value: {
1147
- startDate: T().format(K),
1148
- endDate: T().format(K)
1146
+ startDate: P().format(N),
1147
+ endDate: P().format(N)
1149
1148
  }
1150
1149
  }, {
1151
1150
  label: o("date.predefinedRanges.yesterday"),
1152
1151
  value: {
1153
- startDate: T().subtract(1, "day").format(K),
1154
- endDate: T().subtract(1, "day").format(K)
1152
+ startDate: P().subtract(1, "day").format(N),
1153
+ endDate: P().subtract(1, "day").format(N)
1155
1154
  }
1156
1155
  }, {
1157
1156
  label: o("date.predefinedRanges.thisWeek"),
1158
1157
  value: {
1159
- startDate: T().startOf("week").format(K),
1160
- endDate: T().endOf("week").format(K)
1158
+ startDate: P().startOf("week").format(N),
1159
+ endDate: P().endOf("week").format(N)
1161
1160
  }
1162
1161
  }, {
1163
1162
  label: o("date.predefinedRanges.lastWeek"),
1164
1163
  value: {
1165
- startDate: T().subtract(1, "week").startOf("week").format(K),
1166
- endDate: T().subtract(1, "week").endOf("week").format(K)
1164
+ startDate: P().subtract(1, "week").startOf("week").format(N),
1165
+ endDate: P().subtract(1, "week").endOf("week").format(N)
1167
1166
  }
1168
1167
  }, {
1169
1168
  label: o("date.predefinedRanges.last7Days"),
1170
1169
  value: {
1171
- startDate: T().subtract(7, "day").format(K),
1172
- endDate: T().subtract(1, "day").format(K)
1170
+ startDate: P().subtract(7, "day").format(N),
1171
+ endDate: P().subtract(1, "day").format(N)
1173
1172
  }
1174
1173
  }, {
1175
1174
  label: o("date.predefinedRanges.thisMonth"),
1176
1175
  value: {
1177
- startDate: T().startOf("month").format(K),
1178
- endDate: T().endOf("month").format(K)
1176
+ startDate: P().startOf("month").format(N),
1177
+ endDate: P().endOf("month").format(N)
1179
1178
  }
1180
1179
  }, {
1181
1180
  label: o("date.predefinedRanges.lastMonth"),
1182
1181
  value: {
1183
- startDate: T().subtract(1, "month").startOf("month").format(K),
1184
- endDate: T().subtract(1, "month").endOf("month").format(K)
1182
+ startDate: P().subtract(1, "month").startOf("month").format(N),
1183
+ endDate: P().subtract(1, "month").endOf("month").format(N)
1185
1184
  }
1186
1185
  }]);
1187
- function Ge(e) {
1186
+ function We(e) {
1188
1187
  var s;
1189
- return ((s = Dt.find((c) => c.subject === e)) == null ? void 0 : s.label) ?? Mt[e] ?? ls[e];
1188
+ return ((s = Dt.find((m) => m.subject === e)) == null ? void 0 : s.label) ?? Mt[e] ?? rs[e];
1190
1189
  }
1191
- function ke(e) {
1192
- var c, L;
1190
+ function Se(e) {
1191
+ var m, x;
1193
1192
  if (e.actorType === "posUser")
1194
- return Ls(e, o);
1193
+ return ks(e, o);
1195
1194
  if (e.actorType === "portalUser")
1196
1195
  return e.actorName ?? e.userId;
1197
1196
  if (e.actorType === "feedmeAdmin")
1198
- return (c = r.sessionUser.value) != null && c.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
1197
+ return (m = r.sessionUser.value) != null && m.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin");
1199
1198
  const s = d.userIdToName[e.userId];
1200
- return s || (d.hasLoaded ? (L = r.sessionUser.value) != null && L.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1199
+ return s || (d.hasLoaded ? (x = r.sessionUser.value) != null && x.isInternal ? `${e.actorName ?? e.userId} (${o("auditLog.user.feedmeAdmin")})` : o("auditLog.user.feedmeAdmin") : e.userId);
1201
1200
  }
1202
1201
  function yt(e) {
1203
1202
  return e.actorType === "posUser" ? q.value ? "" : lt(e, o) : d.userIdToPhone[e.userId] || "-";
1204
1203
  }
1205
- function uo(e) {
1204
+ function fo(e) {
1206
1205
  return d.userIdToEmail[e.userId] || "-";
1207
1206
  }
1208
1207
  function bt(e) {
1209
- return T(e).format("DD MMM YYYY, HH:mm");
1208
+ return P(e).format("DD MMM YYYY, HH:mm");
1210
1209
  }
1211
- function Xe(e) {
1212
- return T(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1210
+ function Ge(e) {
1211
+ return P(e).format("DD MMM YYYY, HH:mm:ss").toUpperCase();
1213
1212
  }
1214
1213
  function _t(e) {
1215
1214
  return G.value[e] ?? e;
@@ -1220,31 +1219,31 @@ const Ds = {
1220
1219
  params: e.params,
1221
1220
  operationLabel: e.metadata.operationLabel ?? _t(e.action)
1222
1221
  });
1223
- return e.actorType === "posUser" && !q.value ? s + ks(e, o) : s;
1222
+ return e.actorType === "posUser" && !q.value ? s + Ss(e, o) : s;
1224
1223
  }
1225
1224
  function Lt(e) {
1226
1225
  return ut(o, e) || o("auditLog.operation.unlabeled");
1227
1226
  }
1228
- function co(e) {
1229
- return Ge(e.subject) ?? e.subject;
1227
+ function mo(e) {
1228
+ return We(e.subject) ?? e.subject;
1230
1229
  }
1231
- function Qe(e) {
1230
+ function Xe(e) {
1232
1231
  return Re.value[ht(e)];
1233
1232
  }
1234
1233
  function kt(e) {
1235
- return lo[ht(e)] ?? "neutral";
1234
+ return io[ht(e)] ?? "neutral";
1236
1235
  }
1237
- function fo(e) {
1238
- return ao.value[e] ?? e;
1236
+ function vo(e) {
1237
+ return lo.value[e] ?? e;
1239
1238
  }
1240
- function mo(e) {
1241
- return e.metadata.requestMethod ? no.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : _t(e.action);
1239
+ function po(e) {
1240
+ return e.metadata.requestMethod ? ro.value[e.metadata.requestMethod] ?? e.metadata.requestMethod : _t(e.action);
1242
1241
  }
1243
1242
  function St(e) {
1244
1243
  const s = String(e ?? "");
1245
1244
  return `"${(/^[=+\-@\t\r]/.test(s) ? `'${s}` : s).replace(/"/g, '""')}"`;
1246
1245
  }
1247
- const Ze = [{
1246
+ const Qe = [{
1248
1247
  key: "timestamp",
1249
1248
  labelKey: "auditLog.exportFields.timestamp",
1250
1249
  getValue: (e) => bt(e.timestamp),
@@ -1252,7 +1251,7 @@ const Ds = {
1252
1251
  }, {
1253
1252
  key: "userName",
1254
1253
  labelKey: "auditLog.exportFields.userName",
1255
- getValue: (e) => ke(e),
1254
+ getValue: (e) => Se(e),
1256
1255
  defaultSelected: !0
1257
1256
  }, {
1258
1257
  key: "userPhone",
@@ -1262,7 +1261,7 @@ const Ds = {
1262
1261
  }, {
1263
1262
  key: "subject",
1264
1263
  labelKey: "auditLog.exportFields.subject",
1265
- getValue: (e) => Ge(e.subject) ?? e.subject,
1264
+ getValue: (e) => We(e.subject) ?? e.subject,
1266
1265
  defaultSelected: !0
1267
1266
  }, {
1268
1267
  key: "action",
@@ -1277,17 +1276,17 @@ const Ds = {
1277
1276
  }, {
1278
1277
  key: "outcome",
1279
1278
  labelKey: "auditLog.exportFields.outcome",
1280
- getValue: (e) => Qe(e.outcome),
1279
+ getValue: (e) => Xe(e.outcome),
1281
1280
  defaultSelected: !0
1282
1281
  }, {
1283
1282
  key: "operationEvents",
1284
1283
  labelKey: "auditLog.exportFields.operationEvents",
1285
- getValue: (e) => As(o, e.operations),
1284
+ getValue: (e) => Fs(o, e.operations),
1286
1285
  defaultSelected: !0
1287
1286
  }, {
1288
1287
  key: "changes",
1289
1288
  labelKey: "auditLog.exportFields.changes",
1290
- getValue: (e) => Ms(o, n, e.operations),
1289
+ getValue: (e) => Ds(o, n, e.operations),
1291
1290
  defaultSelected: !1
1292
1291
  }, {
1293
1292
  key: "businessId",
@@ -1334,7 +1333,7 @@ const Ds = {
1334
1333
  getValue: (e) => e.traceId ?? "",
1335
1334
  defaultSelected: !1
1336
1335
  }];
1337
- function vo() {
1336
+ function go() {
1338
1337
  try {
1339
1338
  const e = localStorage.getItem(Pt);
1340
1339
  if (e) {
@@ -1343,10 +1342,10 @@ const Ds = {
1343
1342
  }
1344
1343
  } catch {
1345
1344
  }
1346
- return new Set(Ze.filter((e) => e.defaultSelected).map((e) => e.key));
1345
+ return new Set(Qe.filter((e) => e.defaultSelected).map((e) => e.key));
1347
1346
  }
1348
- const he = w(vo());
1349
- function po(e) {
1347
+ const he = S(go());
1348
+ function ho(e) {
1350
1349
  const s = new Set(he.value);
1351
1350
  if (s.has(e)) {
1352
1351
  if (s.size <= 1) return;
@@ -1359,45 +1358,45 @@ const Ds = {
1359
1358
  } catch {
1360
1359
  }
1361
1360
  }
1362
- async function go() {
1363
- var e, s, c, L, k;
1364
- if (!S.value) {
1365
- S.value = !0;
1361
+ async function yo() {
1362
+ var e, s, m;
1363
+ if (!D.value) {
1364
+ D.value = !0;
1366
1365
  try {
1367
1366
  const {
1368
- startDate: C,
1369
- endDate: R
1370
- } = se.value, ie = $e.value.subjectPrefixes, Ue = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), we = R ? de(R) : null, Ke = we && we < Ue ? we : Ue, tt = {
1371
- ...C ? {
1372
- from: de(C)
1367
+ startDate: x,
1368
+ endDate: k
1369
+ } = ne.value, T = $e.value.subjectPrefixes, U = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " "), se = k ? de(k) : null, et = se && se < U ? se : U, tt = {
1370
+ ...x ? {
1371
+ from: de(x)
1373
1372
  } : {},
1374
- to: Ke,
1375
- ...re.value.userIds.length ? {
1376
- userIds: re.value.userIds
1373
+ to: et,
1374
+ ...ue.value.userIds.length ? {
1375
+ userIds: ue.value.userIds
1377
1376
  } : {},
1378
- ...re.value.feedmeAdminActors ? {
1377
+ ...ue.value.feedmeAdminActors ? {
1379
1378
  feedmeAdminActors: !0
1380
1379
  } : {},
1381
- ...(e = Q.value) != null && e.length ? {
1382
- subjects: Q.value
1380
+ ...(e = Z.value) != null && e.length ? {
1381
+ subjects: Z.value
1383
1382
  } : {},
1384
- ...ie.length ? {
1385
- subjectPrefixes: [...ie]
1383
+ ...T.length ? {
1384
+ subjectPrefixes: [...T]
1386
1385
  } : {},
1387
1386
  ...pe.value.length ? {
1388
1387
  sources: [...pe.value]
1389
1388
  } : {},
1390
- ...q.value && Z.value.length ? {
1391
- restaurantIds: [...Z.value]
1389
+ ...q.value && ee.value.length ? {
1390
+ restaurantIds: [...ee.value]
1392
1391
  } : {},
1393
- ...(s = ne.value) != null && s.length ? {
1394
- actions: ne.value
1392
+ ...(s = re.value) != null && s.length ? {
1393
+ actions: re.value
1395
1394
  } : {},
1396
- ...(c = ae.value) != null && c.length ? {
1397
- outcomes: We(ae.value)
1395
+ ...(m = le.value) != null && m.length ? {
1396
+ outcomes: He(le.value)
1398
1397
  } : {},
1399
- ...ee.value ? {
1400
- search: ee.value
1398
+ ...te.value ? {
1399
+ search: te.value
1401
1400
  } : {},
1402
1401
  ...me.value.length ? {
1403
1402
  searchUserIds: me.value
@@ -1406,35 +1405,35 @@ const Ds = {
1406
1405
  searchSubjects: ge.value
1407
1406
  } : {}
1408
1407
  }, Ie = [];
1409
- let p = 0;
1408
+ let Ne = 0;
1410
1409
  for (; ; ) {
1411
- const J = await Oe.read({
1410
+ const J = await Ce.read({
1412
1411
  ...tt,
1413
1412
  limit: rt,
1414
- offset: p
1413
+ offset: Ne
1415
1414
  });
1416
1415
  if (Ie.push(...J), J.length < rt) break;
1417
- p += rt;
1416
+ Ne += rt;
1418
1417
  }
1419
- const V = Ze.filter((J) => he.value.has(J.key)), Do = V.map((J) => o(J.labelKey)), Oo = Ie.map((J) => V.map((No) => No.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", jo = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), To = String(Math.abs(ot) % 60).padStart(2, "0"), Po = `UTC${Co}${jo}:${To}`, At = ((L = r.currentBusiness.value) == null ? void 0 : L.name) || "", Vo = [C, R].filter(Boolean).join(" – "), $o = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Vo}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${T().format("DD MMM YYYY, HH:mm")} (${Po})`], []].map((J) => J.map(St).join(",")), ...[Do, ...Oo].map((J) => J.map(St).join(","))].join(`
1420
- `), Eo = `audit-log_${(((k = r.currentBusiness.value) == null ? void 0 : k.name) || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${T().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${$o}`], {
1418
+ const Ae = Qe.filter((J) => he.value.has(J.key)), h = Ae.map((J) => o(J.labelKey)), $ = Ie.map((J) => Ae.map((Uo) => Uo.getValue(J) ?? "")), ot = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), Co = ot >= 0 ? "+" : "-", To = String(Math.floor(Math.abs(ot) / 60)).padStart(2, "0"), jo = String(Math.abs(ot) % 60).padStart(2, "0"), Po = `UTC${Co}${To}:${jo}`, At = c.name.value || "", Vo = [x, k].filter(Boolean).join(" – "), $o = [...[[o("auditLog.title")], [`${o("auditLog.frontMatter.date")}: ${Vo}`], ...At ? [[`${o("auditLog.frontMatter.business")}: ${At}`]] : [], [`${o("auditLog.frontMatter.generatedBy")}: ${P().format("DD MMM YYYY, HH:mm")} (${Po})`], []].map((J) => J.map(St).join(",")), ...[h, ...$].map((J) => J.map(St).join(","))].join(`
1419
+ `), Eo = `audit-log_${(c.name.value || "business").replace(/[^a-z0-9_-]+/gi, "_")}_${P().format("YYYYMMDD_HHmmss")}.csv`, Ro = new Blob([`\uFEFF${$o}`], {
1421
1420
  type: "text/csv;charset=utf-8;"
1422
- }), Ft = window.URL.createObjectURL(Ro), Ae = document.createElement("a");
1423
- Ae.href = Ft, Ae.download = Eo, document.body.appendChild(Ae), Ae.click(), Ae.remove(), window.URL.revokeObjectURL(Ft);
1421
+ }), Ft = window.URL.createObjectURL(Ro), Fe = document.createElement("a");
1422
+ Fe.href = Ft, Fe.download = Eo, document.body.appendChild(Fe), Fe.click(), Fe.remove(), window.URL.revokeObjectURL(Ft);
1424
1423
  } finally {
1425
- S.value = !1;
1424
+ D.value = !1;
1426
1425
  }
1427
1426
  }
1428
1427
  }
1429
- function te(e) {
1428
+ function oe(e) {
1430
1429
  return "status" in e;
1431
1430
  }
1432
- function ho(e) {
1433
- return jt(e) ? h(ve.FmTooltip, {
1431
+ function bo(e) {
1432
+ return Tt(e) ? y(ve.FmTooltip, {
1434
1433
  variant: "plain",
1435
1434
  placement: "top"
1436
1435
  }, {
1437
- default: () => h(ve.FmIcon, {
1436
+ default: () => y(ve.FmIcon, {
1438
1437
  name: "error",
1439
1438
  size: "sm",
1440
1439
  class: "cursor-help text-fm-color-typo-error"
@@ -1442,15 +1441,15 @@ const Ds = {
1442
1441
  content: () => o("auditLog.operation.partialFailure")
1443
1442
  }) : null;
1444
1443
  }
1445
- function yo(e) {
1446
- var c;
1444
+ function _o(e) {
1445
+ var m;
1447
1446
  const s = e.original;
1448
- return e.depth === 0 && !te(s) && !!((c = s.operations) != null && c.length);
1447
+ return e.depth === 0 && !oe(s) && !!((m = s.operations) != null && m.length);
1449
1448
  }
1450
- function bo(e) {
1451
- return te(e) ? void 0 : e.operations;
1449
+ function xo(e) {
1450
+ return oe(e) ? void 0 : e.operations;
1452
1451
  }
1453
- const Se = [{
1452
+ const we = [{
1454
1453
  accessorKey: "timestamp",
1455
1454
  header: () => o("auditLog.columns.timestamp"),
1456
1455
  cell(e) {
@@ -1463,18 +1462,18 @@ const Ds = {
1463
1462
  size: 220,
1464
1463
  cell(e) {
1465
1464
  const s = e.row.original;
1466
- return te(s) ? null : h("div", {
1465
+ return oe(s) ? null : y("div", {
1467
1466
  class: "flex items-center gap-8"
1468
- }, [h(ve.FmAvatar, {
1469
- name: ke(s),
1470
- initials: os(ke(s)),
1467
+ }, [y(ve.FmAvatar, {
1468
+ name: Se(s),
1469
+ initials: ss(Se(s)),
1471
1470
  size: "sm",
1472
1471
  class: "shrink-0"
1473
- }, null), h("div", {
1472
+ }, null), y("div", {
1474
1473
  class: "min-w-0"
1475
- }, [h("p", {
1474
+ }, [y("p", {
1476
1475
  class: "truncate font-semibold"
1477
- }, [ke(s)]), h("p", {
1476
+ }, [Se(s)]), y("p", {
1478
1477
  class: "truncate text-fm-color-typo-secondary"
1479
1478
  }, [yt(s)])])]);
1480
1479
  }
@@ -1483,9 +1482,9 @@ const Ds = {
1483
1482
  header: () => o("auditLog.columns.subject"),
1484
1483
  cell(e) {
1485
1484
  const s = e.row.original;
1486
- return te(s) ? h("span", {
1485
+ return oe(s) ? y("span", {
1487
1486
  class: "text-fm-color-typo-secondary"
1488
- }, [o("auditLog.operation.rowHint")]) : Ge(s.subject) ?? s.subject;
1487
+ }, [o("auditLog.operation.rowHint")]) : We(s.subject) ?? s.subject;
1489
1488
  }
1490
1489
  }, {
1491
1490
  accessorKey: "action",
@@ -1496,41 +1495,41 @@ const Ds = {
1496
1495
  cellSpanClass: "audit-log-action-label"
1497
1496
  },
1498
1497
  cell(e) {
1499
- var R;
1498
+ var U;
1500
1499
  const s = e.row.original;
1501
- if (te(s))
1502
- return h("span", {
1500
+ if (oe(s))
1501
+ return y("span", {
1503
1502
  class: "audit-op-marker flex flex-wrap items-baseline gap-4"
1504
- }, [h("span", {
1503
+ }, [y("span", {
1505
1504
  class: "text-fm-color-typo-secondary"
1506
- }, [ye("↳")]), h("span", {
1505
+ }, [ye("↳")]), y("span", {
1507
1506
  class: "font-semibold"
1508
- }, [Lt(s)]), s.entityId ? h("span", {
1507
+ }, [Lt(s)]), s.entityId ? y("span", {
1509
1508
  class: "text-fm-color-typo-secondary"
1510
- }, [ye("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? h("span", {
1509
+ }, [ye("· "), s.entityId]) : null, s.status === "failed" && s.errorMessage ? y("span", {
1511
1510
  class: "text-fm-color-typo-error"
1512
1511
  }, [ye("· "), s.errorMessage]) : null]);
1513
- const c = ((R = s.operations) == null ? void 0 : R.length) ?? 0, L = (ie) => {
1514
- ie.stopPropagation(), e.row.getToggleExpandedHandler()();
1512
+ const m = ((U = s.operations) == null ? void 0 : U.length) ?? 0, x = (se) => {
1513
+ se.stopPropagation(), e.row.getToggleExpandedHandler()();
1515
1514
  }, k = {
1516
1515
  variant: "tertiary",
1517
1516
  icon: e.row.getIsExpanded() ? "keyboard_arrow_up" : "keyboard_arrow_down",
1518
1517
  "aria-label": o("auditLog.operation.toggle"),
1519
1518
  class: "ml-auto shrink-0",
1520
- onClick: L
1521
- }, C = ve.FmButton;
1522
- return h("span", {
1519
+ onClick: x
1520
+ }, T = ve.FmButton;
1521
+ return y("span", {
1523
1522
  class: "flex items-center gap-8"
1524
- }, [h("span", null, [xt(s)]), c > 0 ? h("span", {
1523
+ }, [y("span", null, [xt(s)]), m > 0 ? y("span", {
1525
1524
  class: "cursor-pointer",
1526
- onClick: L
1527
- }, [h(ve.FmChip, {
1525
+ onClick: x
1526
+ }, [y(ve.FmChip, {
1528
1527
  variant: "neutral",
1529
1528
  compact: !0,
1530
1529
  label: o("auditLog.operation.badge", {
1531
- count: c
1530
+ count: m
1532
1531
  })
1533
- }, null)]) : null, e.row.getCanExpand() ? h(C, k, null) : null]);
1532
+ }, null)]) : null, e.row.getCanExpand() ? y(T, k, null) : null]);
1534
1533
  }
1535
1534
  }, {
1536
1535
  accessorKey: "outcome",
@@ -1538,22 +1537,22 @@ const Ds = {
1538
1537
  enableSorting: !1,
1539
1538
  cell(e) {
1540
1539
  const s = e.row.original;
1541
- return te(s) ? h(ve.FmChip, {
1540
+ return oe(s) ? y(ve.FmChip, {
1542
1541
  variant: s.status === "failed" ? "critical" : "success",
1543
1542
  label: s.status === "failed" ? o("auditLog.outcome.failed") : o("auditLog.outcome.success"),
1544
1543
  compact: !0
1545
- }, null) : h("span", {
1544
+ }, null) : y("span", {
1546
1545
  class: "flex items-center gap-4"
1547
- }, [h(ve.FmChip, {
1546
+ }, [y(ve.FmChip, {
1548
1547
  variant: kt(s.outcome),
1549
- label: Qe(s.outcome),
1548
+ label: Xe(s.outcome),
1550
1549
  compact: !0
1551
- }, null), ho(s)]);
1550
+ }, null), bo(s)]);
1552
1551
  }
1553
- }], _o = [
1554
- Se[0],
1552
+ }], Lo = [
1553
+ we[0],
1555
1554
  // timestamp: Date
1556
- Se.find((e) => e.accessorKey === "userId"),
1555
+ we.find((e) => e.accessorKey === "userId"),
1557
1556
  // User: getUserName -> posActorLabel for posUser rows
1558
1557
  {
1559
1558
  accessorKey: "restaurantId",
@@ -1561,7 +1560,7 @@ const Ds = {
1561
1560
  enableSorting: !1,
1562
1561
  cell(e) {
1563
1562
  const s = e.row.original;
1564
- return te(s) ? null : s.restaurantId && Ht.value[s.restaurantId] || s.restaurantId || "-";
1563
+ return oe(s) ? null : s.restaurantId && Gt.value[s.restaurantId] || s.restaurantId || "-";
1565
1564
  }
1566
1565
  },
1567
1566
  {
@@ -1570,7 +1569,7 @@ const Ds = {
1570
1569
  enableSorting: !1,
1571
1570
  cell(e) {
1572
1571
  const s = e.row.original;
1573
- return te(s) ? null : lt(s, o);
1572
+ return oe(s) ? null : lt(s, o);
1574
1573
  }
1575
1574
  },
1576
1575
  {
@@ -1579,60 +1578,60 @@ const Ds = {
1579
1578
  enableSorting: !1,
1580
1579
  cell(e) {
1581
1580
  const s = e.row.original;
1582
- return te(s) ? null : Tt(s, o);
1581
+ return oe(s) ? null : jt(s, o);
1583
1582
  }
1584
1583
  },
1585
- Se.find((e) => e.accessorKey === "action"),
1584
+ we.find((e) => e.accessorKey === "action"),
1586
1585
  // Action Description: event line
1587
- Se.find((e) => e.accessorKey === "outcome")
1586
+ we.find((e) => e.accessorKey === "outcome")
1588
1587
  // Status
1589
- ], xo = A(() => q.value ? _o : Se);
1588
+ ], ko = A(() => q.value ? Lo : we);
1590
1589
  function de(e) {
1591
- const s = T(e, Zn);
1590
+ const s = P(e, el);
1592
1591
  return new Date(s.year(), s.month(), s.date(), s.hour(), s.minute(), 0).toISOString().slice(0, 19).replace("T", " ");
1593
1592
  }
1594
1593
  async function wt() {
1595
- var e, s, c;
1596
- g.value = !0;
1594
+ var e, s, m;
1595
+ w.value = !0;
1597
1596
  try {
1598
1597
  const {
1599
- startDate: L,
1598
+ startDate: x,
1600
1599
  endDate: k
1601
- } = se.value, C = (Pe.value - 1) * De, R = $e.value.subjectPrefixes, ie = await Oe.read({
1602
- limit: De,
1603
- offset: C,
1604
- ...L ? {
1605
- from: de(L)
1600
+ } = ne.value, T = (Pe.value - 1) * Oe, U = $e.value.subjectPrefixes, se = await Ce.read({
1601
+ limit: Oe,
1602
+ offset: T,
1603
+ ...x ? {
1604
+ from: de(x)
1606
1605
  } : {},
1607
1606
  ...k ? {
1608
1607
  to: de(k)
1609
1608
  } : {},
1610
- ...re.value.userIds.length ? {
1611
- userIds: re.value.userIds
1609
+ ...ue.value.userIds.length ? {
1610
+ userIds: ue.value.userIds
1612
1611
  } : {},
1613
- ...re.value.feedmeAdminActors ? {
1612
+ ...ue.value.feedmeAdminActors ? {
1614
1613
  feedmeAdminActors: !0
1615
1614
  } : {},
1616
- ...(e = Q.value) != null && e.length ? {
1617
- subjects: Q.value
1615
+ ...(e = Z.value) != null && e.length ? {
1616
+ subjects: Z.value
1618
1617
  } : {},
1619
- ...R.length ? {
1620
- subjectPrefixes: [...R]
1618
+ ...U.length ? {
1619
+ subjectPrefixes: [...U]
1621
1620
  } : {},
1622
1621
  ...pe.value.length ? {
1623
1622
  sources: [...pe.value]
1624
1623
  } : {},
1625
- ...q.value && Z.value.length ? {
1626
- restaurantIds: [...Z.value]
1624
+ ...q.value && ee.value.length ? {
1625
+ restaurantIds: [...ee.value]
1627
1626
  } : {},
1628
- ...(s = ne.value) != null && s.length ? {
1629
- actions: ne.value
1627
+ ...(s = re.value) != null && s.length ? {
1628
+ actions: re.value
1630
1629
  } : {},
1631
- ...(c = ae.value) != null && c.length ? {
1632
- outcomes: We(ae.value)
1630
+ ...(m = le.value) != null && m.length ? {
1631
+ outcomes: He(le.value)
1633
1632
  } : {},
1634
- ...ee.value ? {
1635
- search: ee.value
1633
+ ...te.value ? {
1634
+ search: te.value
1636
1635
  } : {},
1637
1636
  ...me.value.length ? {
1638
1637
  searchUserIds: me.value
@@ -1641,68 +1640,65 @@ const Ds = {
1641
1640
  searchSubjects: ge.value
1642
1641
  } : {}
1643
1642
  });
1644
- O.value = ie, Bt.value = ie.length === De, $.value = {};
1643
+ O.value = se, Bt.value = se.length === Oe, L.value = {};
1645
1644
  } finally {
1646
- g.value = !1;
1645
+ w.value = !1;
1647
1646
  }
1648
1647
  }
1649
- const It = A(() => {
1650
- var e;
1651
- return JSON.stringify({
1652
- businessId: ((e = r.currentBusiness.value) == null ? void 0 : e._id) ?? "",
1653
- dateRange: se.value,
1654
- users: [...fe.value ?? []].sort(),
1655
- subjects: [...Q.value ?? []].sort(),
1656
- outcomes: [...ae.value ?? []].sort(),
1657
- actions: [...ne.value ?? []].sort(),
1658
- moduleKey: le.value,
1659
- restaurantIds: [...Z.value].sort(),
1660
- search: ee.value,
1661
- // Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
1662
- // every date-range change), so searchUserIds can change after the key above is
1663
- // computed — include it explicitly or a late-arriving match never refetches.
1664
- searchUserIds: [...me.value].sort()
1665
- });
1666
- });
1667
- async function Lo() {
1668
- var L, k, C;
1648
+ const It = A(() => JSON.stringify({
1649
+ businessId: c.id.value ?? "",
1650
+ dateRange: ne.value,
1651
+ users: [...fe.value ?? []].sort(),
1652
+ subjects: [...Z.value ?? []].sort(),
1653
+ outcomes: [...le.value ?? []].sort(),
1654
+ actions: [...re.value ?? []].sort(),
1655
+ moduleKey: ie.value,
1656
+ restaurantIds: [...ee.value].sort(),
1657
+ search: te.value,
1658
+ // Member/feedme-admin-actor lists resolve asynchronously (and actors refetch on
1659
+ // every date-range change), so searchUserIds can change after the key above is
1660
+ // computed — include it explicitly or a late-arriving match never refetches.
1661
+ searchUserIds: [...me.value].sort()
1662
+ }));
1663
+ async function So() {
1664
+ var x, k, T;
1669
1665
  const {
1670
1666
  startDate: e,
1671
1667
  endDate: s
1672
- } = se.value, c = $e.value.subjectPrefixes;
1673
- ze.value = await Oe.count({
1668
+ } = ne.value, m = $e.value.subjectPrefixes;
1669
+ Be.value = await Ce.count({
1674
1670
  ...e ? {
1675
1671
  from: de(e)
1676
1672
  } : {},
1677
1673
  ...s ? {
1678
1674
  to: de(s)
1679
1675
  } : {},
1680
- ...re.value.userIds.length ? {
1681
- userIds: re.value.userIds
1676
+ ...ue.value.userIds.length ? {
1677
+ userIds: ue.value.userIds
1682
1678
  } : {},
1683
- ...re.value.feedmeAdminActors ? {
1679
+ ...ue.value.feedmeAdminActors ? {
1684
1680
  feedmeAdminActors: !0
1685
1681
  } : {},
1686
- ...(L = Q.value) != null && L.length ? {
1687
- subjects: Q.value
1682
+ ...(x = Z.value) != null && x.length ? {
1683
+ subjects: Z.value
1688
1684
  } : {},
1689
- ...c.length ? {
1690
- subjectPrefixes: [...c]
1685
+ ...m.length ? {
1686
+ subjectPrefixes: [...m]
1691
1687
  } : {},
1692
1688
  ...pe.value.length ? {
1693
1689
  sources: [...pe.value]
1694
1690
  } : {},
1695
- ...q.value && Z.value.length ? {
1696
- restaurantIds: [...Z.value]
1691
+ ...q.value && ee.value.length ? {
1692
+ restaurantIds: [...ee.value]
1697
1693
  } : {},
1698
- ...(k = ne.value) != null && k.length ? {
1699
- actions: ne.value
1694
+ ...(k = re.value) != null && k.length ? {
1695
+ actions: re.value
1700
1696
  } : {},
1701
- ...(C = ae.value) != null && C.length ? {
1702
- outcomes: We(ae.value)
1697
+ ...(T = le.value) != null && T.length ? {
1698
+ outcomes: He(le.value)
1703
1699
  } : {},
1704
- ...ee.value ? {
1705
- search: ee.value
1700
+ ...te.value ? {
1701
+ search: te.value
1706
1702
  } : {},
1707
1703
  ...me.value.length ? {
1708
1704
  searchUserIds: me.value
@@ -1712,67 +1708,64 @@ const Ds = {
1712
1708
  } : {}
1713
1709
  });
1714
1710
  }
1715
- oe(It, async () => {
1716
- var e;
1717
- Pe.value = 1, (e = r.currentBusiness.value) != null && e._id && await Promise.all([Lo(), wt()]);
1711
+ ae(It, async () => {
1712
+ Pe.value = 1, c.id.value && await Promise.all([So(), wt()]);
1718
1713
  }, {
1719
1714
  immediate: !0
1720
- }), oe(le, () => {
1721
- Q.value = void 0, q.value && (fe.value = void 0);
1715
+ }), ae(ie, () => {
1716
+ Z.value = void 0, q.value && (fe.value = void 0);
1722
1717
  });
1723
- let et = !1;
1724
- async function ko({
1718
+ let Ze = !1;
1719
+ async function wo({
1725
1720
  pageIndex: e
1726
1721
  }) {
1727
- var s;
1728
- if ((s = r.currentBusiness.value) != null && s._id && !(e === 0 && Pe.value === 1) && !et) {
1729
- et = !0, Pe.value = e + 1;
1722
+ if (c.id.value && !(e === 0 && Pe.value === 1) && !Ze) {
1723
+ Ze = !0, Pe.value = e + 1;
1730
1724
  try {
1731
1725
  await wt();
1732
1726
  } finally {
1733
- et = !1;
1727
+ Ze = !1;
1734
1728
  }
1735
1729
  }
1736
1730
  }
1737
- function So(e) {
1738
- if (te(e)) {
1739
- Io(e);
1731
+ function Io(e) {
1732
+ if (oe(e)) {
1733
+ Fo(e);
1740
1734
  return;
1741
1735
  }
1742
- i.value = e, P.value = !0, Xt(e);
1736
+ i.value = e, V.value = !0, Zt(e);
1743
1737
  }
1744
- function wo() {
1745
- P.value = !1, i.value = null, Qt();
1738
+ function Ao() {
1739
+ V.value = !1, i.value = null, eo();
1746
1740
  }
1747
- function Io(e) {
1748
- m.value = e, x.value = !0;
1741
+ function Fo(e) {
1742
+ f.value = e, M.value = !0;
1749
1743
  }
1750
- function Ao() {
1751
- x.value = !1, m.value = null;
1744
+ function Mo() {
1745
+ M.value = !1, f.value = null;
1752
1746
  }
1753
- oe(r.currentBusiness, (e) => {
1747
+ ae(c.id, (e) => {
1754
1748
  e && d.readTeamMembers();
1755
1749
  }, {
1756
1750
  immediate: !0
1757
1751
  });
1758
- function Fo() {
1752
+ function Do() {
1759
1753
  const e = fe.value;
1760
1754
  if (!(e != null && e.length)) return;
1761
- const s = new Set(Le.value.map((k) => k.userId)), c = new Set(d.members.map((k) => k.doc.userId)), L = e.filter((k) => k === it ? Ee.value : d.hasLoaded ? c.has(k) || s.has(k) : !0);
1762
- L.length !== e.length && (fe.value = L.length ? L : void 0);
1755
+ const s = new Set(ke.value.map((k) => k.userId)), m = new Set(d.members.map((k) => k.doc.userId)), x = e.filter((k) => k === it ? Ee.value : d.hasLoaded ? m.has(k) || s.has(k) : !0);
1756
+ x.length !== e.length && (fe.value = x.length ? x : void 0);
1763
1757
  }
1764
- async function Mo() {
1765
- var c;
1766
- if (!((c = r.currentBusiness.value) != null && c._id)) return;
1758
+ async function Oo() {
1759
+ if (!c.id.value) return;
1767
1760
  const {
1768
1761
  startDate: e,
1769
1762
  endDate: s
1770
- } = se.value;
1763
+ } = ne.value;
1771
1764
  try {
1772
1765
  const {
1773
- actors: L,
1774
- showFeedmeAdminFilter: k
1775
- } = await Oe.getFeedmeAdminFilter({
1766
+ actors: m,
1767
+ showFeedmeAdminFilter: x
1768
+ } = await Ce.getFeedmeAdminFilter({
1776
1769
  ...e ? {
1777
1770
  from: de(e)
1778
1771
  } : {},
@@ -1780,252 +1773,249 @@ const Ds = {
1780
1773
  to: de(s)
1781
1774
  } : {}
1782
1775
  });
1783
- Le.value = L, Ee.value = k;
1776
+ ke.value = m, Ee.value = x;
1784
1777
  } catch {
1785
- Le.value = [], Ee.value = !1;
1778
+ ke.value = [], Ee.value = !1;
1786
1779
  }
1787
- Fo();
1780
+ Do();
1788
1781
  }
1789
- return oe(() => {
1790
- var e;
1791
- return {
1792
- businessId: (e = r.currentBusiness.value) == null ? void 0 : e._id,
1793
- range: se.value
1794
- };
1795
- }, () => Mo(), {
1782
+ return ae(() => ({
1783
+ businessId: c.id.value,
1784
+ range: ne.value
1785
+ }), () => Oo(), {
1796
1786
  immediate: !0,
1797
1787
  deep: !0
1798
1788
  }), (e, s) => {
1799
- const c = N("FmSpacer"), L = N("FmButton"), k = N("FmMenuItem"), C = N("FmMenu"), R = N("FmChip"), ie = N("FmDateRangePicker"), Ue = N("FmSearch"), we = N("FmTable"), Ke = N("FmIcon"), tt = N("FmTooltip"), Ie = N("FmSideSheet");
1800
- return f(), v(z, null, [h(Qo, {
1789
+ const m = R("FmSpacer"), x = R("FmButton"), k = R("FmMenuItem"), T = R("FmMenu"), U = R("FmChip"), se = R("FmDateRangePicker"), et = R("FmSearch"), tt = R("FmTable"), Ie = R("FmIcon"), Ne = R("FmTooltip"), Ae = R("FmSideSheet");
1790
+ return v(), g(z, null, [y(Zo, {
1801
1791
  heading: u(o)("auditLog.title")
1802
1792
  }, {
1803
- "append-heading": Y(() => [h(c), h(L, {
1793
+ "append-heading": B(() => [y(m), y(x, {
1804
1794
  variant: "primary",
1805
1795
  "prepend-icon": "upload",
1806
1796
  label: u(o)("auditLog.export"),
1807
- disabled: O.value.length === 0 || S.value || u(d).isLoading || u(d).members.length === 0,
1808
- loading: S.value,
1809
- onClick: go
1810
- }, null, 8, ["label", "disabled", "loading"]), h(C, {
1797
+ disabled: O.value.length === 0 || D.value || u(d).isLoading || u(d).members.length === 0,
1798
+ loading: D.value,
1799
+ onClick: yo
1800
+ }, null, 8, ["label", "disabled", "loading"]), y(T, {
1811
1801
  "close-on-click": !1,
1812
1802
  "z-index": 50
1813
1803
  }, {
1814
- "menu-button": Y(() => [h(L, {
1804
+ "menu-button": B(() => [y(x, {
1815
1805
  variant: "tertiary",
1816
1806
  icon: "settings",
1817
1807
  "aria-label": u(o)("auditLog.exportSettings.title"),
1818
- disabled: S.value
1808
+ disabled: D.value
1819
1809
  }, null, 8, ["aria-label", "disabled"])]),
1820
- default: Y(() => [a("div", Ds, [a("p", Os, l(u(o)("auditLog.exportSettings.title")), 1), (f(), v(z, null, ce(Ze, (p) => h(k, {
1821
- key: p.key,
1822
- label: u(o)(p.labelKey),
1810
+ default: B(() => [a("div", Os, [a("p", Cs, l(u(o)("auditLog.exportSettings.title")), 1), (v(), g(z, null, ce(Qe, (h) => y(k, {
1811
+ key: h.key,
1812
+ label: u(o)(h.labelKey),
1823
1813
  "has-checkbox": "",
1824
- "model-value": he.value.has(p.key),
1825
- disabled: he.value.has(p.key) && he.value.size === 1,
1826
- onClick: (V) => po(p.key)
1814
+ "model-value": he.value.has(h.key),
1815
+ disabled: he.value.has(h.key) && he.value.size === 1,
1816
+ onClick: ($) => ho(h.key)
1827
1817
  }, null, 8, ["label", "model-value", "disabled", "onClick"])), 64))])]),
1828
1818
  _: 1
1829
1819
  })]),
1830
- default: Y(() => [a("div", Cs, [a("div", js, [h(cs, {
1831
- modelValue: le.value,
1832
- "onUpdate:modelValue": s[0] || (s[0] = (p) => le.value = p),
1833
- items: zt.value
1834
- }, null, 8, ["modelValue", "items"]), a("div", Ts, [h(ie, {
1835
- modelValue: se.value,
1836
- "onUpdate:modelValue": s[1] || (s[1] = (p) => se.value = p),
1820
+ default: B(() => [a("div", Ts, [a("div", js, [y(fs, {
1821
+ modelValue: ie.value,
1822
+ "onUpdate:modelValue": s[0] || (s[0] = (h) => ie.value = h),
1823
+ items: Jt.value
1824
+ }, null, 8, ["modelValue", "items"]), a("div", Ps, [y(se, {
1825
+ modelValue: ne.value,
1826
+ "onUpdate:modelValue": s[1] || (s[1] = (h) => ne.value = h),
1837
1827
  "show-predefined-range": "",
1838
1828
  "show-time": "",
1839
- "predefined-range": io.value
1829
+ "predefined-range": co.value
1840
1830
  }, {
1841
- "trigger-button": Y(() => [h(R, {
1842
- label: ro.value,
1831
+ "trigger-button": B(() => [y(U, {
1832
+ label: uo.value,
1843
1833
  icon: "calendar_month"
1844
1834
  }, null, 8, ["label"])]),
1845
1835
  _: 1
1846
- }, 8, ["modelValue", "predefined-range"]), q.value ? M("", !0) : (f(), v("div", Ps, [h(Fe, {
1836
+ }, 8, ["modelValue", "predefined-range"]), q.value ? F("", !0) : (v(), g("div", Vs, [y(Me, {
1847
1837
  modelValue: fe.value,
1848
- "onUpdate:modelValue": s[2] || (s[2] = (p) => fe.value = p),
1849
- items: Wt.value,
1838
+ "onUpdate:modelValue": s[2] || (s[2] = (h) => fe.value = h),
1839
+ items: Xt.value,
1850
1840
  multiple: "",
1851
1841
  variant: "dark",
1852
1842
  placeholder: u(o)("auditLog.filter.user_placeholder"),
1853
1843
  "selected-prefix": u(o)("auditLog.filter.selected_user_prefix"),
1854
1844
  "chip-icon": "account_circle"
1855
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? M("", !0) : (f(), v("div", Vs, [h(Fe, {
1856
- modelValue: Q.value,
1857
- "onUpdate:modelValue": s[3] || (s[3] = (p) => Q.value = p),
1858
- items: eo.value,
1859
- "filter-fn": to,
1845
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), q.value ? F("", !0) : (v(), g("div", $s, [y(Me, {
1846
+ modelValue: Z.value,
1847
+ "onUpdate:modelValue": s[3] || (s[3] = (h) => Z.value = h),
1848
+ items: oo.value,
1849
+ "filter-fn": so,
1860
1850
  multiple: "",
1861
1851
  variant: "dark",
1862
1852
  placeholder: u(o)("auditLog.filter.subject_placeholder"),
1863
1853
  "selected-prefix": u(o)("auditLog.filter.selected_subject_prefix"),
1864
1854
  "chip-icon": "badge"
1865
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", $s, [h(Fe, {
1866
- modelValue: ne.value,
1867
- "onUpdate:modelValue": s[4] || (s[4] = (p) => ne.value = p),
1868
- items: oo.value,
1855
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])), a("div", Es, [y(Me, {
1856
+ modelValue: re.value,
1857
+ "onUpdate:modelValue": s[4] || (s[4] = (h) => re.value = h),
1858
+ items: ao.value,
1869
1859
  multiple: "",
1870
1860
  variant: "dark",
1871
1861
  placeholder: u(o)("auditLog.filter.action_placeholder"),
1872
1862
  "selected-prefix": u(o)("auditLog.filter.selected_action_prefix"),
1873
1863
  searchable: !1
1874
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Es, [h(Fe, {
1875
- modelValue: ae.value,
1876
- "onUpdate:modelValue": s[5] || (s[5] = (p) => ae.value = p),
1877
- items: so.value,
1864
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), a("div", Rs, [y(Me, {
1865
+ modelValue: le.value,
1866
+ "onUpdate:modelValue": s[5] || (s[5] = (h) => le.value = h),
1867
+ items: no.value,
1878
1868
  multiple: "",
1879
1869
  variant: "dark",
1880
1870
  placeholder: u(o)("auditLog.filter.status_placeholder"),
1881
1871
  "selected-prefix": u(o)("auditLog.filter.selected_status_prefix"),
1882
1872
  searchable: !1,
1883
1873
  "chip-icon": "check_circle"
1884
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (f(), v("div", Rs, [h(Fe, {
1885
- modelValue: Z.value,
1886
- "onUpdate:modelValue": s[6] || (s[6] = (p) => Z.value = p),
1887
- items: Jt.value,
1874
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])]), q.value ? (v(), g("div", Us, [y(Me, {
1875
+ modelValue: ee.value,
1876
+ "onUpdate:modelValue": s[6] || (s[6] = (h) => ee.value = h),
1877
+ items: Wt.value,
1888
1878
  multiple: "",
1889
1879
  variant: "dark",
1890
1880
  placeholder: u(o)("auditLog.filter.restaurant_placeholder"),
1891
1881
  "selected-prefix": u(o)("auditLog.filter.selected_restaurant_prefix"),
1892
1882
  "chip-icon": "storefront"
1893
- }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : M("", !0), h(Ue, {
1894
- modelValue: qe.value,
1895
- "onUpdate:modelValue": s[7] || (s[7] = (p) => qe.value = p),
1883
+ }, null, 8, ["modelValue", "items", "placeholder", "selected-prefix"])])) : F("", !0), y(et, {
1884
+ modelValue: ze.value,
1885
+ "onUpdate:modelValue": s[7] || (s[7] = (h) => ze.value = h),
1896
1886
  class: "ml-auto w-[280px]",
1897
1887
  placeholder: u(o)("auditLog.search.placeholder")
1898
- }, null, 8, ["modelValue", "placeholder"])])]), h(Wo, null, {
1899
- default: Y(() => [a("div", Ns, [h(Zo, {
1900
- "is-loading": g.value,
1888
+ }, null, 8, ["modelValue", "placeholder"])])]), y(Go, null, {
1889
+ default: B(() => [a("div", Ns, [y(es, {
1890
+ "is-loading": w.value,
1901
1891
  "is-empty": O.value.length === 0,
1902
1892
  title: u(o)("auditLog.noData.title"),
1903
1893
  subtitle: u(o)("auditLog.noData.subtitle")
1904
1894
  }, {
1905
- default: Y(() => [(f(), Ce(we, {
1895
+ default: B(() => [(v(), Te(tt, {
1906
1896
  key: It.value,
1907
- "column-defs": xo.value,
1897
+ "column-defs": ko.value,
1908
1898
  "row-data": O.value,
1909
- "page-size": De,
1899
+ "page-size": Oe,
1910
1900
  "page-count": mt.value,
1911
- "row-count": ze.value,
1912
- "fetch-fn": ko,
1901
+ "row-count": Be.value,
1902
+ "fetch-fn": wo,
1913
1903
  "hide-footer": mt.value <= 1,
1914
- loading: g.value,
1915
- "expanded-state": $.value,
1916
- "get-row-can-expand": yo,
1917
- "get-sub-row": bo,
1904
+ loading: w.value,
1905
+ "expanded-state": L.value,
1906
+ "get-row-can-expand": _o,
1907
+ "get-sub-row": xo,
1918
1908
  "pin-header-row": "",
1919
1909
  class: "audit-log-list-table cursor-pointer",
1920
- "onUpdate:expandedState": s[8] || (s[8] = (p) => $.value = p),
1921
- onRowClick: s[9] || (s[9] = (p) => So(p.original))
1910
+ "onUpdate:expandedState": s[8] || (s[8] = (h) => L.value = h),
1911
+ onRowClick: s[9] || (s[9] = (h) => Io(h.original))
1922
1912
  }, null, 8, ["column-defs", "row-data", "page-count", "row-count", "hide-footer", "loading", "expanded-state"]))]),
1923
1913
  _: 1
1924
1914
  }, 8, ["is-loading", "is-empty", "title", "subtitle"])])]),
1925
1915
  _: 1
1926
1916
  })])]),
1927
1917
  _: 1
1928
- }, 8, ["heading"]), h(Ie, {
1918
+ }, 8, ["heading"]), y(Ae, {
1929
1919
  header: u(o)("auditLog.detail.header"),
1930
- "model-value": P.value,
1920
+ "model-value": V.value,
1931
1921
  "max-width": 768,
1932
1922
  "dismiss-away": "",
1933
- "onUpdate:modelValue": s[10] || (s[10] = (p) => {
1934
- p || wo();
1923
+ "onUpdate:modelValue": s[10] || (s[10] = (h) => {
1924
+ h || Ao();
1935
1925
  })
1936
1926
  }, {
1937
- default: Y(() => [i.value ? (f(), v("div", Us, [a("div", Ks, [a("div", Bs, [a("p", Ys, l(co(i.value)), 1), i.value.traceId ? (f(), v("p", zs, [ye(" Trace ID: " + l(i.value.traceId) + " ", 1), h(L, {
1927
+ default: B(() => [i.value ? (v(), g("div", Ks, [a("div", Ys, [a("div", Bs, [a("p", zs, l(mo(i.value)), 1), i.value.traceId ? (v(), g("p", qs, [ye(" Trace ID: " + l(i.value.traceId) + " ", 1), y(x, {
1938
1928
  variant: "tertiary",
1939
1929
  icon: "link",
1940
1930
  class: "ml-4 align-middle",
1941
1931
  "aria-label": u(o)("auditLog.detail.copyLink"),
1942
- onClick: u(Zt)
1943
- }, null, 8, ["aria-label", "onClick"])])) : M("", !0), i.value.eventId ? (f(), v("p", qs, " Event ID: " + l(i.value.eventId), 1)) : M("", !0)]), a("div", Js, [h(R, {
1932
+ onClick: u(to)
1933
+ }, null, 8, ["aria-label", "onClick"])])) : F("", !0), i.value.eventId ? (v(), g("p", Js, " Event ID: " + l(i.value.eventId), 1)) : F("", !0)]), a("div", Hs, [y(U, {
1944
1934
  variant: kt(i.value.outcome),
1945
- label: Qe(i.value.outcome),
1935
+ label: Xe(i.value.outcome),
1946
1936
  compact: ""
1947
- }, null, 8, ["variant", "label"]), u(jt)(i.value) ? (f(), Ce(tt, {
1937
+ }, null, 8, ["variant", "label"]), u(Tt)(i.value) ? (v(), Te(Ne, {
1948
1938
  key: 0,
1949
1939
  variant: "plain",
1950
1940
  placement: "top"
1951
1941
  }, {
1952
- content: Y(() => [ye(l(u(o)("auditLog.operation.partialFailure")), 1)]),
1953
- default: Y(() => [h(Ke, {
1942
+ content: B(() => [ye(l(u(o)("auditLog.operation.partialFailure")), 1)]),
1943
+ default: B(() => [y(Ie, {
1954
1944
  name: "error",
1955
1945
  size: "sm",
1956
1946
  class: "cursor-help text-fm-color-typo-error"
1957
1947
  })]),
1958
1948
  _: 1
1959
- })) : M("", !0)])]), a("div", Hs, [a("div", Ws, [a("div", null, [a("p", Gs, l(u(o)("auditLog.detail.date")), 1), a("p", Xs, l(Xe(i.value.timestamp)), 1)]), a("div", null, [a("p", Qs, l(u(o)("auditLog.detail.user")), 1), a("p", Zs, l(ke(i.value)), 1)]), a("div", null, [a("p", ea, l(u(o)("auditLog.detail.email")), 1), a("p", ta, l(uo(i.value)), 1)]), i.value.field ? (f(), v("div", oa, [a("p", sa, l(u(o)("auditLog.detail.field")), 1), a("p", aa, l(i.value.field), 1)])) : M("", !0), a("div", null, [a("p", na, l(u(o)("auditLog.detail.business")), 1), a("p", la, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ra, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ia, l(i.value.restaurantId || "-"), 1)])])]), a("div", ua, [a("div", da, [a("p", ca, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
1949
+ })) : F("", !0)])]), a("div", Ws, [a("div", Gs, [a("div", null, [a("p", Xs, l(u(o)("auditLog.detail.date")), 1), a("p", Qs, l(Ge(i.value.timestamp)), 1)]), a("div", null, [a("p", Zs, l(u(o)("auditLog.detail.user")), 1), a("p", ea, l(Se(i.value)), 1)]), a("div", null, [a("p", ta, l(u(o)("auditLog.detail.email")), 1), a("p", oa, l(fo(i.value)), 1)]), i.value.field ? (v(), g("div", sa, [a("p", aa, l(u(o)("auditLog.detail.field")), 1), a("p", na, l(i.value.field), 1)])) : F("", !0), a("div", null, [a("p", la, l(u(o)("auditLog.detail.business")), 1), a("p", ra, l(i.value.businessId || "-"), 1)]), a("div", null, [a("p", ia, l(u(o)("auditLog.detail.restaurant")), 1), a("p", ua, l(i.value.restaurantId || "-"), 1)])])]), a("div", da, [a("div", ca, [a("p", fa, l(u(o)("auditLog.detail.eventDetails")), 1)]), s[13] || (s[13] = a("hr", {
1960
1950
  class: "border-fm-color-border-default"
1961
- }, null, -1)), a("div", fa, [a("div", null, [a("p", ma, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", va, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", pa, [a("div", ga, [a("p", ha, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
1951
+ }, null, -1)), a("div", ma, [a("div", null, [a("p", va, l(u(o)("auditLog.detail.actionDescription")), 1), a("p", pa, l(i.value.metadata.operationLabel || "-"), 1)])])]), a("div", ga, [a("div", ha, [a("p", ya, l(u(o)("auditLog.detail.metadata")), 1)]), s[14] || (s[14] = a("hr", {
1962
1952
  class: "border-fm-color-border-default"
1963
- }, null, -1)), a("div", ya, [a("div", null, [a("p", ba, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", _a, l(fo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (f(), v("div", xa, [a("p", La, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (f(), v("p", ka, l(i.value.metadata.permissionSetName), 1)) : M("", !0), i.value.metadata.permissionSetId ? (f(), v("p", Sa, l(i.value.metadata.permissionSetId), 1)) : M("", !0)])) : M("", !0), i.value.metadata.reason ? (f(), v("div", wa, [a("p", Ia, l(u(o)("auditLog.detail.reason")), 1), a("p", Aa, l(i.value.metadata.reason), 1)])) : M("", !0), a("div", null, [a("p", Fa, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Ma, l(mo(i.value)), 1)]), a("div", null, [a("p", Da, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Oa, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (f(), v(z, {
1953
+ }, null, -1)), a("div", ba, [a("div", null, [a("p", _a, l(u(o)("auditLog.detail.resolvedFrom")), 1), a("p", xa, l(vo(i.value.metadata.resolvedFrom)), 1)]), (i.value.metadata.resolvedFrom === "permissionSet" || i.value.metadata.resolvedFrom === "systemPermissionSet") && (i.value.metadata.permissionSetName || i.value.metadata.permissionSetId) ? (v(), g("div", La, [a("p", ka, l(u(o)("auditLog.detail.permissionSet")), 1), i.value.metadata.permissionSetName ? (v(), g("p", Sa, l(i.value.metadata.permissionSetName), 1)) : F("", !0), i.value.metadata.permissionSetId ? (v(), g("p", wa, l(i.value.metadata.permissionSetId), 1)) : F("", !0)])) : F("", !0), i.value.metadata.reason ? (v(), g("div", Ia, [a("p", Aa, l(u(o)("auditLog.detail.reason")), 1), a("p", Fa, l(i.value.metadata.reason), 1)])) : F("", !0), a("div", null, [a("p", Ma, l(u(o)("auditLog.detail.requestMethod")), 1), a("p", Da, l(po(i.value)), 1)]), a("div", null, [a("p", Oa, l(u(o)("auditLog.detail.requestPath")), 1), a("p", Ca, l(i.value.metadata.requestPath || "-"), 1)]), i.value.metadata.pos ? (v(), g(z, {
1964
1954
  key: 2
1965
- }, [a("div", null, [a("p", Ca, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", ja, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Ta, l(u(o)("auditLog.columns.device")), 1), a("p", Pa, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (f(), v("p", Va, l(i.value.metadata.pos.machineId), 1)) : M("", !0)]), i.value.metadata.pos.appVersion ? (f(), v("div", $a, [a("p", Ea, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ra, l(i.value.metadata.pos.appVersion), 1)])) : M("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ua, l(u(Tt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ka, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Xe(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (f(), v("span", Ya, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : M("", !0)])]), i.value.params ? (f(), v("div", za, [a("p", qa, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ja, l(i.value.params), 1)])) : M("", !0)], 64)) : M("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (f(), v("div", Ha, [a("p", Wa, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Ga, [(f(!0), v(z, null, ce(i.value.metadata.trace, (p, V) => (f(), v("li", {
1966
- key: V,
1955
+ }, [a("div", null, [a("p", Ta, l(u(o)("auditLog.pos.details.eventKey")), 1), a("p", ja, l(i.value.eventKey || "-"), 1)]), a("div", null, [a("p", Pa, l(u(o)("auditLog.columns.device")), 1), a("p", Va, l(u(lt)(i.value, u(o))), 1), i.value.metadata.pos.machineId ? (v(), g("p", $a, l(i.value.metadata.pos.machineId), 1)) : F("", !0)]), i.value.metadata.pos.appVersion ? (v(), g("div", Ea, [a("p", Ra, l(u(o)("auditLog.pos.details.appVersion")), 1), a("p", Ua, l(i.value.metadata.pos.appVersion), 1)])) : F("", !0), a("div", null, [a("p", Na, l(u(o)("auditLog.columns.approver")), 1), a("p", Ka, l(u(jt)(i.value, u(o))), 1)]), a("div", null, [a("p", Ya, l(u(o)("auditLog.pos.details.clock")), 1), a("p", Ba, [ye(l(Ge(new Date(i.value.metadata.pos.occurredAt))) + " · " + l(i.value.metadata.pos.clockSkewMs) + " ms", 1), i.value.metadata.pos.clockClamped ? (v(), g("span", za, " · " + l(u(o)("auditLog.pos.details.clamped")), 1)) : F("", !0)])]), i.value.params ? (v(), g("div", qa, [a("p", Ja, l(u(o)("auditLog.pos.details.params")), 1), a("pre", Ha, l(i.value.params), 1)])) : F("", !0)], 64)) : F("", !0), i.value.metadata.trace && i.value.metadata.trace.length > 0 ? (v(), g("div", Wa, [a("p", Ga, l(u(o)("auditLog.detail.permissionTrace")), 1), a("ol", Xa, [(v(!0), g(z, null, ce(i.value.metadata.trace, (h, $) => (v(), g("li", {
1956
+ key: $,
1967
1957
  class: "flex items-center gap-6"
1968
- }, [a("span", Xa, l(V + 1), 1), a("span", Qa, l(p), 1), V < i.value.metadata.trace.length - 1 ? (f(), v("span", Za, "→")) : M("", !0)]))), 128))])])) : M("", !0), F.value ? (f(), v("div", en, [a("p", tn, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", on, l(F.value), 1)])) : M("", !0)])])])) : M("", !0)]),
1958
+ }, [a("span", Qa, l($ + 1), 1), a("span", Za, l(h), 1), $ < i.value.metadata.trace.length - 1 ? (v(), g("span", en, "→")) : F("", !0)]))), 128))])])) : F("", !0), p.value ? (v(), g("div", tn, [a("p", on, l(u(o)("auditLog.detail.requestBody")), 1), a("pre", sn, l(p.value), 1)])) : F("", !0)])])])) : F("", !0)]),
1969
1959
  _: 1
1970
- }, 8, ["header", "model-value"]), h(Ie, {
1960
+ }, 8, ["header", "model-value"]), y(Ae, {
1971
1961
  header: u(o)("auditLog.operation.sheetHeader"),
1972
- "model-value": x.value,
1962
+ "model-value": M.value,
1973
1963
  "max-width": 768,
1974
1964
  "dismiss-away": "",
1975
- "onUpdate:modelValue": s[12] || (s[12] = (p) => {
1976
- p || Ao();
1965
+ "onUpdate:modelValue": s[12] || (s[12] = (h) => {
1966
+ h || Mo();
1977
1967
  })
1978
1968
  }, {
1979
- default: Y(() => [m.value ? (f(), v("div", sn, [a("div", an, [a("div", nn, [a("p", ln, l(Lt(m.value)), 1), m.value.entityId ? (f(), v("p", rn, l(m.value.entityId), 1)) : M("", !0)]), h(R, {
1980
- variant: m.value.status === "failed" ? "critical" : "success",
1981
- label: m.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
1969
+ default: B(() => [f.value ? (v(), g("div", an, [a("div", nn, [a("div", ln, [a("p", rn, l(Lt(f.value)), 1), f.value.entityId ? (v(), g("p", un, l(f.value.entityId), 1)) : F("", !0)]), y(U, {
1970
+ variant: f.value.status === "failed" ? "critical" : "success",
1971
+ label: f.value.status === "failed" ? u(o)("auditLog.outcome.failed") : u(o)("auditLog.outcome.success"),
1982
1972
  compact: ""
1983
- }, null, 8, ["variant", "label"])]), a("div", un, [a("div", dn, [a("div", null, [a("p", cn, l(u(o)("auditLog.detail.date")), 1), a("p", fn, l(Xe(m.value.timestamp)), 1)]), m.value.entityId ? (f(), v("div", mn, [a("p", vn, l(u(o)("auditLog.operation.entity")), 1), a("p", pn, l(m.value.entityId), 1)])) : M("", !0), m.value.durationMs !== void 0 ? (f(), v("div", gn, [a("p", hn, l(u(o)("auditLog.operation.duration")), 1), a("p", yn, l(u(o)("auditLog.operation.durationValue", {
1984
- ms: m.value.durationMs
1985
- })), 1)])) : M("", !0)])]), m.value.status === "failed" ? (f(), v("div", bn, [a("p", _n, l(u(o)("auditLog.operation.error")), 1), a("p", xn, l(m.value.errorMessage || "-"), 1)])) : M("", !0), a("div", Ln, [a("div", kn, [a("p", Sn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
1973
+ }, null, 8, ["variant", "label"])]), a("div", dn, [a("div", cn, [a("div", null, [a("p", fn, l(u(o)("auditLog.detail.date")), 1), a("p", mn, l(Ge(f.value.timestamp)), 1)]), f.value.entityId ? (v(), g("div", vn, [a("p", pn, l(u(o)("auditLog.operation.entity")), 1), a("p", gn, l(f.value.entityId), 1)])) : F("", !0), f.value.durationMs !== void 0 ? (v(), g("div", hn, [a("p", yn, l(u(o)("auditLog.operation.duration")), 1), a("p", bn, l(u(o)("auditLog.operation.durationValue", {
1974
+ ms: f.value.durationMs
1975
+ })), 1)])) : F("", !0)])]), f.value.status === "failed" ? (v(), g("div", _n, [a("p", xn, l(u(o)("auditLog.operation.error")), 1), a("p", Ln, l(f.value.errorMessage || "-"), 1)])) : F("", !0), a("div", kn, [a("div", Sn, [a("p", wn, l(u(o)("auditLog.operation.changes")), 1)]), s[17] || (s[17] = a("hr", {
1986
1976
  class: "border-fm-color-border-default"
1987
- }, null, -1)), a("div", wn, [H.value.length ? (f(), v("div", In, [(f(!0), v(z, null, ce(H.value, (p, V) => (f(), v("div", {
1988
- key: V,
1977
+ }, null, -1)), a("div", In, [Y.value.length ? (v(), g("div", An, [(v(!0), g(z, null, ce(Y.value, (h, $) => (v(), g("div", {
1978
+ key: $,
1989
1979
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
1990
- }, [a("div", An, [h(R, {
1991
- variant: xe(p.type),
1992
- label: Ut(p.type),
1980
+ }, [a("div", Fn, [y(U, {
1981
+ variant: Nt(h.type),
1982
+ label: Kt(h.type),
1993
1983
  compact: ""
1994
- }, null, 8, ["variant", "label"]), a("span", Fn, l(Kt(p)), 1)]), a("p", Mn, [p.type === "add" ? (f(), v("span", Dn, l(p.afterDisplay), 1)) : p.type === "remove" ? (f(), v("span", On, l(p.beforeDisplay), 1)) : (f(), v(z, {
1984
+ }, null, 8, ["variant", "label"]), a("span", Mn, l(Yt(h)), 1)]), a("p", Dn, [h.type === "add" ? (v(), g("span", On, l(h.afterDisplay), 1)) : h.type === "remove" ? (v(), g("span", Cn, l(h.beforeDisplay), 1)) : (v(), g(z, {
1995
1985
  key: 2
1996
- }, [a("span", Cn, l(p.beforeDisplay), 1), s[15] || (s[15] = a("span", {
1986
+ }, [a("span", Tn, l(h.beforeDisplay), 1), s[15] || (s[15] = a("span", {
1997
1987
  class: "text-fm-color-typo-secondary"
1998
- }, " → ", -1)), a("span", jn, l(p.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (f(), v("div", Tn, [(f(!0), v(z, null, ce(ft.value, (p) => (f(), v("div", {
1999
- key: p.groupKey,
1988
+ }, " → ", -1)), a("span", jn, l(h.afterDisplay), 1)], 64))])]))), 128))])) : ft.value.length ? (v(), g("div", Pn, [(v(!0), g(z, null, ce(ft.value, (h) => (v(), g("div", {
1989
+ key: h.groupKey,
2000
1990
  class: "space-y-4 py-8 first:pt-0 last:pb-0"
2001
- }, [a("div", Pn, [h(R, {
2002
- variant: Te(p.type),
2003
- label: ct(p.type),
1991
+ }, [a("div", Vn, [y(U, {
1992
+ variant: ct(h.type),
1993
+ label: W(h.type),
2004
1994
  compact: ""
2005
- }, null, 8, ["variant", "label"]), a("span", Vn, l(p.displayKey), 1)]), a("div", $n, [(f(!0), v(z, null, ce(p.rows, (V) => (f(), v("p", {
2006
- key: V.path,
1995
+ }, null, 8, ["variant", "label"]), a("span", $n, l(h.displayKey), 1)]), a("div", En, [(v(!0), g(z, null, ce(h.rows, ($) => (v(), g("p", {
1996
+ key: $.path,
2007
1997
  class: "break-all font-mono text-xs"
2008
- }, [V.type === "added" ? (f(), v("span", En, l(V.after ?? "—"), 1)) : V.type === "removed" ? (f(), v("span", Rn, l(V.before ?? "—"), 1)) : (f(), v(z, {
1998
+ }, [$.type === "added" ? (v(), g("span", Rn, l($.after ?? "—"), 1)) : $.type === "removed" ? (v(), g("span", Un, l($.before ?? "—"), 1)) : (v(), g(z, {
2009
1999
  key: 2
2010
- }, [a("span", Nn, l(V.before ?? "—"), 1), s[16] || (s[16] = a("span", {
2000
+ }, [a("span", Nn, l($.before ?? "—"), 1), s[16] || (s[16] = a("span", {
2011
2001
  class: "text-fm-color-typo-secondary"
2012
- }, " → ", -1)), a("span", Un, l(V.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (f(), v("p", Kn, l(u(o)("auditLog.operation.noChanges")), 1))])]), U.value || I.value ? (f(), v("div", Bn, [a("button", {
2002
+ }, " → ", -1)), a("span", Kn, l($.after ?? "—"), 1)], 64))]))), 128))])]))), 128))])) : (v(), g("p", Yn, l(u(o)("auditLog.operation.noChanges")), 1))])]), I.value || Q.value ? (v(), g("div", Bn, [a("button", {
2013
2003
  type: "button",
2014
2004
  class: "flex w-full items-center justify-between p-12 text-left",
2015
- onClick: s[11] || (s[11] = (p) => X.value = !X.value)
2016
- }, [a("p", Yn, l(u(o)("auditLog.operation.showData")), 1), h(Ke, {
2005
+ onClick: s[11] || (s[11] = (h) => H.value = !H.value)
2006
+ }, [a("p", zn, l(u(o)("auditLog.operation.showData")), 1), y(Ie, {
2017
2007
  name: "keyboard_arrow_down",
2018
- class: zo(["shrink-0 transition-transform", X.value ? "rotate-180" : ""])
2019
- }, null, 8, ["class"])]), X.value ? (f(), v(z, {
2008
+ class: zo(["shrink-0 transition-transform", H.value ? "rotate-180" : ""])
2009
+ }, null, 8, ["class"])]), H.value ? (v(), g(z, {
2020
2010
  key: 0
2021
2011
  }, [s[18] || (s[18] = a("hr", {
2022
2012
  class: "border-fm-color-border-default"
2023
- }, null, -1)), a("div", zn, [U.value ? (f(), v("div", qn, [a("p", Jn, l(u(o)("auditLog.operation.before")), 1), a("pre", Hn, l(U.value), 1)])) : M("", !0), I.value ? (f(), v("div", Wn, [a("p", Gn, l(u(o)("auditLog.operation.after")), 1), a("pre", Xn, l(I.value), 1)])) : M("", !0)])], 64)) : M("", !0)])) : M("", !0)])) : M("", !0)]),
2013
+ }, null, -1)), a("div", qn, [I.value ? (v(), g("div", Jn, [a("p", Hn, l(u(o)("auditLog.operation.before")), 1), a("pre", Wn, l(I.value), 1)])) : F("", !0), Q.value ? (v(), g("div", Gn, [a("p", Xn, l(u(o)("auditLog.operation.after")), 1), a("pre", Qn, l(Q.value), 1)])) : F("", !0)])], 64)) : F("", !0)])) : F("", !0)])) : F("", !0)]),
2024
2014
  _: 1
2025
2015
  }, 8, ["header", "model-value"])], 64);
2026
2016
  };
2027
2017
  }
2028
- }), yl = /* @__PURE__ */ Go(el, [["__scopeId", "data-v-277a4ae7"]]);
2018
+ }), bl = /* @__PURE__ */ Xo(tl, [["__scopeId", "data-v-4a88a042"]]);
2029
2019
  export {
2030
- yl as default
2020
+ bl as default
2031
2021
  };