@feedmepos/mf-hrm-portal 2.2.1-dev.4 → 2.2.1

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 (51) hide show
  1. package/dist/{ApprovalCodeList-CJpbX8H_.js → ApprovalCodeList-BWQBJGCZ.js} +5 -5
  2. package/dist/AuditLogList-CymSyHag.js +1149 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BWNAtv1G.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDOdtKwI.js} +2 -2
  4. package/dist/{EmployeeList-Gh8aU7BY.js → EmployeeList-BZ6fxRCN.js} +71 -71
  5. package/dist/{GrantUserList-vpaCAv1u.js → GrantUserList-CaVpRVzA.js} +6 -6
  6. package/dist/{Main-38YNSkW6.js → Main-CEKiyT80.js} +11 -11
  7. package/dist/{Main-GwRBJ3al.js → Main-CQpEciKH.js} +5 -5
  8. package/dist/{Main-CXjbH7aE.js → Main-DrfRLxA5.js} +8 -8
  9. package/dist/{PermissionSetList-CuzFQm7J.js → PermissionSetList-BgOSJy4y.js} +78 -77
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B2SX3ZoV.js +4174 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js} +1 -1
  12. package/dist/RoleList-C2PrTc1f.js +739 -0
  13. package/dist/{TeamMemberList-ChrUNLsA.js → TeamMemberList-BXk_pXjc.js} +312 -313
  14. package/dist/{TimesheetList-Dqx3RZ4c.js → TimesheetList-DgaZmgug.js} +7 -7
  15. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-rtbLyLSE.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B_Lc8Xmy.js} +3 -3
  16. package/dist/{app-CPByRtdD.js → app-DzagkC6l.js} +513 -809
  17. package/dist/app.js +1 -1
  18. package/dist/{approval-code-jIjkeVEb.js → approval-code-BRClD2HN.js} +1 -1
  19. package/dist/{dayjs.min-DeAdykwc.js → dayjs.min-CqJsImsm.js} +1 -1
  20. package/dist/{employee-dFHap_s3.js → employee-CXBuv0Bx.js} +4 -4
  21. package/dist/{grant-user-SNiDV22U.js → grant-user-Dhi3ilC_.js} +1 -1
  22. package/dist/{iteration-B_EcCwqv.js → iteration-BCfwR_XH.js} +1 -1
  23. package/dist/{lodash-C5UxxqU2.js → lodash-BJl3phr9.js} +1 -1
  24. package/dist/{restaurant-BTpBmfBV.js → restaurant-DiYb0pCm.js} +2 -2
  25. package/dist/{role-8ZQb8Cap.js → role-BfCNRnuy.js} +2 -2
  26. package/dist/{rule-DJZO_Kev.js → rule-B3Eg-J8O.js} +279 -259
  27. package/dist/src/api/audit-log/index.d.ts +0 -6
  28. package/dist/src/api/user/index.d.ts +2 -2
  29. package/dist/src/composables/useReportPermissions.d.ts +1 -0
  30. package/dist/src/helpers/rule.d.ts +2 -0
  31. package/dist/src/types/audit-log.d.ts +1 -1
  32. package/dist/src/types/role.d.ts +1 -0
  33. package/dist/src/views/audit-log/locales/index.d.ts +0 -300
  34. package/dist/src/views/hr/locales/index.d.ts +4 -0
  35. package/dist/style.css +1 -1
  36. package/dist/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/{useAppStore-DCwd8GWN.js → useAppStore-BGhlB1_1.js} +1 -1
  38. package/dist/useDebounce-CWb5QR9G.js +28 -0
  39. package/dist/{useLoading-CXzTpIVv.js → useLoading-CvgqVDbF.js} +1 -1
  40. package/dist/useReportPermissions-CXXq725N.js +82 -0
  41. package/package.json +1 -1
  42. package/dist/AuditLogList-A1217xlw.js +0 -1722
  43. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9bkMb41.js +0 -4169
  44. package/dist/RoleList-C5VZbU3f.js +0 -725
  45. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
  46. package/dist/src/views/audit-log/change-nodes.d.ts +0 -14
  47. package/dist/src/views/audit-log/event-line.d.ts +0 -13
  48. package/dist/src/views/audit-log/operation-status.d.ts +0 -2
  49. package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
  50. package/dist/useDebounce-B8ZPVS5C.js +0 -15
  51. package/dist/useReportPermissions-Phq7vqLK.js +0 -71
@@ -0,0 +1,4174 @@
1
+ import { getCurrentInstance as Zt, inject as ur, ref as rt, shallowRef as mr, computed as K, watch as wt, onMounted as xn, onUnmounted as dr, defineComponent as Ae, h as Wn, createVNode as ue, Text as fr, Fragment as Re, resolveComponent as we, createBlock as Ce, openBlock as J, withCtx as me, createElementVNode as ae, createElementBlock as ie, toDisplayString as Oe, unref as H, renderList as Ee, toRef as en, normalizeStyle as nt, renderSlot as Se, createCommentVNode as Me, createTextVNode as _r, useSlots as pr, normalizeClass as qe, createSlots as et, mergeModels as tn, useModel as vr } from "vue";
2
+ import { useI18n as He, useCoreStore as hr } from "@feedmepos/mf-common";
3
+ import { useDialog as br, useBreakpoints as gr } from "@feedmepos/ui-library";
4
+ import "@vue/devtools-api";
5
+ import { p as Gn, N as Bn, i as yr, P as Ir, y as Lt, l as Er, k as Cr } from "./rule-B3Eg-J8O.js";
6
+ import { _ as Xt, a as Nr, b as nn, u as Tr } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDOdtKwI.js";
7
+ import { u as Or, b as Sr, P as Yn, S as Dt, A as tt, e as he, k as rn, d as Lr } from "./app-DzagkC6l.js";
8
+ import { c as yt } from "./iteration-BCfwR_XH.js";
9
+ import { g as Ar, b as kr } from "./restaurant-DiYb0pCm.js";
10
+ import { u as Rr } from "./role-BfCNRnuy.js";
11
+ function Zn(e, t) {
12
+ return Array.isArray(e) ? e.includes(t) : e === t;
13
+ }
14
+ function Mr(e) {
15
+ return Array.isArray(e) ? e[0] : e;
16
+ }
17
+ function wr(e, t) {
18
+ const n = t.find((l) => Zn(l.subject, e));
19
+ if (!(n != null && n.category) || n.isCategoryCover) return;
20
+ const r = t.find((l) => l.category === n.category && l.isCategoryCover);
21
+ if (r)
22
+ return Mr(r.subject);
23
+ }
24
+ function sn(e, t) {
25
+ const n = t.find((r) => Zn(r.subject, e));
26
+ return !!(n != null && n.isCategoryCover);
27
+ }
28
+ /*!
29
+ * shared v10.0.5
30
+ * (c) 2024 kazuya kawaguchi
31
+ * Released under the MIT License.
32
+ */
33
+ const on = typeof window < "u", $e = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Dr = (e, t, n) => Fr({ l: e, k: t, s: n }), Fr = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ge = (e) => typeof e == "number" && isFinite(e), Pr = (e) => Ht(e) === "[object Date]", Et = (e) => Ht(e) === "[object RegExp]", Nt = (e) => ee(e) && Object.keys(e).length === 0, ye = Object.assign, jr = Object.create, oe = (e = null) => jr(e);
34
+ let an;
35
+ const Xe = () => an || (an = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : oe());
36
+ function ln(e) {
37
+ return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
38
+ }
39
+ const Ur = Object.prototype.hasOwnProperty;
40
+ function Le(e, t) {
41
+ return Ur.call(e, t);
42
+ }
43
+ const be = Array.isArray, de = (e) => typeof e == "function", B = (e) => typeof e == "string", ve = (e) => typeof e == "boolean", te = (e) => e !== null && typeof e == "object", Vr = (e) => te(e) && de(e.then) && de(e.catch), Xn = Object.prototype.toString, Ht = (e) => Xn.call(e), ee = (e) => Ht(e) === "[object Object]", xr = (e) => e == null ? "" : be(e) || ee(e) && e.toString === Xn ? JSON.stringify(e, null, 2) : String(e);
44
+ function $t(e, t = "") {
45
+ return e.reduce((n, r, l) => l === 0 ? n + r : n + t + r, "");
46
+ }
47
+ function Wr(e, t) {
48
+ typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
49
+ }
50
+ const ft = (e) => !te(e) || be(e);
51
+ function It(e, t) {
52
+ if (ft(e) || ft(t))
53
+ throw new Error("Invalid value");
54
+ const n = [{ src: e, des: t }];
55
+ for (; n.length; ) {
56
+ const { src: r, des: l } = n.pop();
57
+ Object.keys(r).forEach((a) => {
58
+ a !== "__proto__" && (te(r[a]) && !te(l[a]) && (l[a] = Array.isArray(r[a]) ? [] : oe()), ft(l[a]) || ft(r[a]) ? l[a] = r[a] : n.push({ src: r[a], des: l[a] }));
59
+ });
60
+ }
61
+ }
62
+ function Gr(e, t, n) {
63
+ return { line: e, column: t, offset: n };
64
+ }
65
+ function Ft(e, t, n) {
66
+ return { start: e, end: t };
67
+ }
68
+ const re = {
69
+ // tokenizer error codes
70
+ EXPECTED_TOKEN: 1,
71
+ INVALID_TOKEN_IN_PLACEHOLDER: 2,
72
+ UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
73
+ UNKNOWN_ESCAPE_SEQUENCE: 4,
74
+ INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
75
+ UNBALANCED_CLOSING_BRACE: 6,
76
+ UNTERMINATED_CLOSING_BRACE: 7,
77
+ EMPTY_PLACEHOLDER: 8,
78
+ NOT_ALLOW_NEST_PLACEHOLDER: 9,
79
+ INVALID_LINKED_FORMAT: 10,
80
+ // parser error codes
81
+ MUST_HAVE_MESSAGES_IN_PLURAL: 11,
82
+ UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
83
+ UNEXPECTED_EMPTY_LINKED_KEY: 13,
84
+ UNEXPECTED_LEXICAL_ANALYSIS: 14
85
+ }, Br = 17;
86
+ function Tt(e, t, n = {}) {
87
+ const { domain: r, messages: l, args: a } = n, m = e, u = new SyntaxError(String(m));
88
+ return u.code = e, t && (u.location = t), u.domain = r, u;
89
+ }
90
+ function Yr(e) {
91
+ throw e;
92
+ }
93
+ const Pe = " ", Zr = "\r", Ie = `
94
+ `, Xr = "\u2028", Hr = "\u2029";
95
+ function $r(e) {
96
+ const t = e;
97
+ let n = 0, r = 1, l = 1, a = 0;
98
+ const m = (p) => t[p] === Zr && t[p + 1] === Ie, u = (p) => t[p] === Ie, i = (p) => t[p] === Hr, g = (p) => t[p] === Xr, I = (p) => m(p) || u(p) || i(p) || g(p), T = () => n, C = () => r, F = () => l, w = () => a, A = (p) => m(p) || i(p) || g(p) ? Ie : t[p], D = () => A(n), f = () => A(n + a);
99
+ function h() {
100
+ return a = 0, I(n) && (r++, l = 0), m(n) && n++, n++, l++, t[n];
101
+ }
102
+ function S() {
103
+ return m(n + a) && a++, a++, t[n + a];
104
+ }
105
+ function c() {
106
+ n = 0, r = 1, l = 1, a = 0;
107
+ }
108
+ function b(p = 0) {
109
+ a = p;
110
+ }
111
+ function y() {
112
+ const p = n + a;
113
+ for (; p !== n; )
114
+ h();
115
+ a = 0;
116
+ }
117
+ return {
118
+ index: T,
119
+ line: C,
120
+ column: F,
121
+ peekOffset: w,
122
+ charAt: A,
123
+ currentChar: D,
124
+ currentPeek: f,
125
+ next: h,
126
+ peek: S,
127
+ reset: c,
128
+ resetPeek: b,
129
+ skipToPeek: y
130
+ };
131
+ }
132
+ const xe = void 0, Jr = ".", cn = "'", zr = "tokenizer";
133
+ function Kr(e, t = {}) {
134
+ const n = t.location !== !1, r = $r(e), l = () => r.index(), a = () => Gr(r.line(), r.column(), r.index()), m = a(), u = l(), i = {
135
+ currentType: 13,
136
+ offset: u,
137
+ startLoc: m,
138
+ endLoc: m,
139
+ lastType: 13,
140
+ lastOffset: u,
141
+ lastStartLoc: m,
142
+ lastEndLoc: m,
143
+ braceNest: 0,
144
+ inLinked: !1,
145
+ text: ""
146
+ }, g = () => i, { onError: I } = t;
147
+ function T(s, o, _, ...k) {
148
+ const M = g();
149
+ if (o.column += _, o.offset += _, I) {
150
+ const P = n ? Ft(M.startLoc, o) : null, v = Tt(s, P, {
151
+ domain: zr,
152
+ args: k
153
+ });
154
+ I(v);
155
+ }
156
+ }
157
+ function C(s, o, _) {
158
+ s.endLoc = a(), s.currentType = o;
159
+ const k = { type: o };
160
+ return n && (k.loc = Ft(s.startLoc, s.endLoc)), _ != null && (k.value = _), k;
161
+ }
162
+ const F = (s) => C(
163
+ s,
164
+ 13
165
+ /* TokenTypes.EOF */
166
+ );
167
+ function w(s, o) {
168
+ return s.currentChar() === o ? (s.next(), o) : (T(re.EXPECTED_TOKEN, a(), 0, o), "");
169
+ }
170
+ function A(s) {
171
+ let o = "";
172
+ for (; s.currentPeek() === Pe || s.currentPeek() === Ie; )
173
+ o += s.currentPeek(), s.peek();
174
+ return o;
175
+ }
176
+ function D(s) {
177
+ const o = A(s);
178
+ return s.skipToPeek(), o;
179
+ }
180
+ function f(s) {
181
+ if (s === xe)
182
+ return !1;
183
+ const o = s.charCodeAt(0);
184
+ return o >= 97 && o <= 122 || // a-z
185
+ o >= 65 && o <= 90 || // A-Z
186
+ o === 95;
187
+ }
188
+ function h(s) {
189
+ if (s === xe)
190
+ return !1;
191
+ const o = s.charCodeAt(0);
192
+ return o >= 48 && o <= 57;
193
+ }
194
+ function S(s, o) {
195
+ const { currentType: _ } = o;
196
+ if (_ !== 2)
197
+ return !1;
198
+ A(s);
199
+ const k = f(s.currentPeek());
200
+ return s.resetPeek(), k;
201
+ }
202
+ function c(s, o) {
203
+ const { currentType: _ } = o;
204
+ if (_ !== 2)
205
+ return !1;
206
+ A(s);
207
+ const k = s.currentPeek() === "-" ? s.peek() : s.currentPeek(), M = h(k);
208
+ return s.resetPeek(), M;
209
+ }
210
+ function b(s, o) {
211
+ const { currentType: _ } = o;
212
+ if (_ !== 2)
213
+ return !1;
214
+ A(s);
215
+ const k = s.currentPeek() === cn;
216
+ return s.resetPeek(), k;
217
+ }
218
+ function y(s, o) {
219
+ const { currentType: _ } = o;
220
+ if (_ !== 7)
221
+ return !1;
222
+ A(s);
223
+ const k = s.currentPeek() === ".";
224
+ return s.resetPeek(), k;
225
+ }
226
+ function p(s, o) {
227
+ const { currentType: _ } = o;
228
+ if (_ !== 8)
229
+ return !1;
230
+ A(s);
231
+ const k = f(s.currentPeek());
232
+ return s.resetPeek(), k;
233
+ }
234
+ function R(s, o) {
235
+ const { currentType: _ } = o;
236
+ if (!(_ === 7 || _ === 11))
237
+ return !1;
238
+ A(s);
239
+ const k = s.currentPeek() === ":";
240
+ return s.resetPeek(), k;
241
+ }
242
+ function L(s, o) {
243
+ const { currentType: _ } = o;
244
+ if (_ !== 9)
245
+ return !1;
246
+ const k = () => {
247
+ const P = s.currentPeek();
248
+ return P === "{" ? f(s.peek()) : P === "@" || P === "|" || P === ":" || P === "." || P === Pe || !P ? !1 : P === Ie ? (s.peek(), k()) : x(s, !1);
249
+ }, M = k();
250
+ return s.resetPeek(), M;
251
+ }
252
+ function X(s) {
253
+ A(s);
254
+ const o = s.currentPeek() === "|";
255
+ return s.resetPeek(), o;
256
+ }
257
+ function x(s, o = !0) {
258
+ const _ = (M = !1, P = "") => {
259
+ const v = s.currentPeek();
260
+ return v === "{" || v === "@" || !v ? M : v === "|" ? !(P === Pe || P === Ie) : v === Pe ? (s.peek(), _(!0, Pe)) : v === Ie ? (s.peek(), _(!0, Ie)) : !0;
261
+ }, k = _();
262
+ return o && s.resetPeek(), k;
263
+ }
264
+ function d(s, o) {
265
+ const _ = s.currentChar();
266
+ return _ === xe ? xe : o(_) ? (s.next(), _) : null;
267
+ }
268
+ function N(s) {
269
+ const o = s.charCodeAt(0);
270
+ return o >= 97 && o <= 122 || // a-z
271
+ o >= 65 && o <= 90 || // A-Z
272
+ o >= 48 && o <= 57 || // 0-9
273
+ o === 95 || // _
274
+ o === 36;
275
+ }
276
+ function U(s) {
277
+ return d(s, N);
278
+ }
279
+ function V(s) {
280
+ const o = s.charCodeAt(0);
281
+ return o >= 97 && o <= 122 || // a-z
282
+ o >= 65 && o <= 90 || // A-Z
283
+ o >= 48 && o <= 57 || // 0-9
284
+ o === 95 || // _
285
+ o === 36 || // $
286
+ o === 45;
287
+ }
288
+ function j(s) {
289
+ return d(s, V);
290
+ }
291
+ function G(s) {
292
+ const o = s.charCodeAt(0);
293
+ return o >= 48 && o <= 57;
294
+ }
295
+ function W(s) {
296
+ return d(s, G);
297
+ }
298
+ function Y(s) {
299
+ const o = s.charCodeAt(0);
300
+ return o >= 48 && o <= 57 || // 0-9
301
+ o >= 65 && o <= 70 || // A-F
302
+ o >= 97 && o <= 102;
303
+ }
304
+ function Z(s) {
305
+ return d(s, Y);
306
+ }
307
+ function ne(s) {
308
+ let o = "", _ = "";
309
+ for (; o = W(s); )
310
+ _ += o;
311
+ return _;
312
+ }
313
+ function Q(s) {
314
+ let o = "";
315
+ for (; ; ) {
316
+ const _ = s.currentChar();
317
+ if (_ === "{" || _ === "}" || _ === "@" || _ === "|" || !_)
318
+ break;
319
+ if (_ === Pe || _ === Ie)
320
+ if (x(s))
321
+ o += _, s.next();
322
+ else {
323
+ if (X(s))
324
+ break;
325
+ o += _, s.next();
326
+ }
327
+ else
328
+ o += _, s.next();
329
+ }
330
+ return o;
331
+ }
332
+ function _e(s) {
333
+ D(s);
334
+ let o = "", _ = "";
335
+ for (; o = j(s); )
336
+ _ += o;
337
+ return s.currentChar() === xe && T(re.UNTERMINATED_CLOSING_BRACE, a(), 0), _;
338
+ }
339
+ function ce(s) {
340
+ D(s);
341
+ let o = "";
342
+ return s.currentChar() === "-" ? (s.next(), o += `-${ne(s)}`) : o += ne(s), s.currentChar() === xe && T(re.UNTERMINATED_CLOSING_BRACE, a(), 0), o;
343
+ }
344
+ function se(s) {
345
+ return s !== cn && s !== Ie;
346
+ }
347
+ function fe(s) {
348
+ D(s), w(s, "'");
349
+ let o = "", _ = "";
350
+ for (; o = d(s, se); )
351
+ o === "\\" ? _ += q(s) : _ += o;
352
+ const k = s.currentChar();
353
+ return k === Ie || k === xe ? (T(re.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), k === Ie && (s.next(), w(s, "'")), _) : (w(s, "'"), _);
354
+ }
355
+ function q(s) {
356
+ const o = s.currentChar();
357
+ switch (o) {
358
+ case "\\":
359
+ case "'":
360
+ return s.next(), `\\${o}`;
361
+ case "u":
362
+ return De(s, o, 4);
363
+ case "U":
364
+ return De(s, o, 6);
365
+ default:
366
+ return T(re.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, o), "";
367
+ }
368
+ }
369
+ function De(s, o, _) {
370
+ w(s, o);
371
+ let k = "";
372
+ for (let M = 0; M < _; M++) {
373
+ const P = Z(s);
374
+ if (!P) {
375
+ T(re.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${o}${k}${s.currentChar()}`);
376
+ break;
377
+ }
378
+ k += P;
379
+ }
380
+ return `\\${o}${k}`;
381
+ }
382
+ function z(s) {
383
+ return s !== "{" && s !== "}" && s !== Pe && s !== Ie;
384
+ }
385
+ function pe(s) {
386
+ D(s);
387
+ let o = "", _ = "";
388
+ for (; o = d(s, z); )
389
+ _ += o;
390
+ return _;
391
+ }
392
+ function Je(s) {
393
+ let o = "", _ = "";
394
+ for (; o = U(s); )
395
+ _ += o;
396
+ return _;
397
+ }
398
+ function ze(s) {
399
+ const o = (_) => {
400
+ const k = s.currentChar();
401
+ return k === "{" || k === "@" || k === "|" || k === "(" || k === ")" || !k || k === Pe ? _ : (_ += k, s.next(), o(_));
402
+ };
403
+ return o("");
404
+ }
405
+ function Ve(s) {
406
+ D(s);
407
+ const o = w(
408
+ s,
409
+ "|"
410
+ /* TokenChars.Pipe */
411
+ );
412
+ return D(s), o;
413
+ }
414
+ function Fe(s, o) {
415
+ let _ = null;
416
+ switch (s.currentChar()) {
417
+ case "{":
418
+ return o.braceNest >= 1 && T(re.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), s.next(), _ = C(
419
+ o,
420
+ 2,
421
+ "{"
422
+ /* TokenChars.BraceLeft */
423
+ ), D(s), o.braceNest++, _;
424
+ case "}":
425
+ return o.braceNest > 0 && o.currentType === 2 && T(re.EMPTY_PLACEHOLDER, a(), 0), s.next(), _ = C(
426
+ o,
427
+ 3,
428
+ "}"
429
+ /* TokenChars.BraceRight */
430
+ ), o.braceNest--, o.braceNest > 0 && D(s), o.inLinked && o.braceNest === 0 && (o.inLinked = !1), _;
431
+ case "@":
432
+ return o.braceNest > 0 && T(re.UNTERMINATED_CLOSING_BRACE, a(), 0), _ = Ne(s, o) || F(o), o.braceNest = 0, _;
433
+ default: {
434
+ let M = !0, P = !0, v = !0;
435
+ if (X(s))
436
+ return o.braceNest > 0 && T(re.UNTERMINATED_CLOSING_BRACE, a(), 0), _ = C(o, 1, Ve(s)), o.braceNest = 0, o.inLinked = !1, _;
437
+ if (o.braceNest > 0 && (o.currentType === 4 || o.currentType === 5 || o.currentType === 6))
438
+ return T(re.UNTERMINATED_CLOSING_BRACE, a(), 0), o.braceNest = 0, Ye(s, o);
439
+ if (M = S(s, o))
440
+ return _ = C(o, 4, _e(s)), D(s), _;
441
+ if (P = c(s, o))
442
+ return _ = C(o, 5, ce(s)), D(s), _;
443
+ if (v = b(s, o))
444
+ return _ = C(o, 6, fe(s)), D(s), _;
445
+ if (!M && !P && !v)
446
+ return _ = C(o, 12, pe(s)), T(re.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, _.value), D(s), _;
447
+ break;
448
+ }
449
+ }
450
+ return _;
451
+ }
452
+ function Ne(s, o) {
453
+ const { currentType: _ } = o;
454
+ let k = null;
455
+ const M = s.currentChar();
456
+ switch ((_ === 7 || _ === 8 || _ === 11 || _ === 9) && (M === Ie || M === Pe) && T(re.INVALID_LINKED_FORMAT, a(), 0), M) {
457
+ case "@":
458
+ return s.next(), k = C(
459
+ o,
460
+ 7,
461
+ "@"
462
+ /* TokenChars.LinkedAlias */
463
+ ), o.inLinked = !0, k;
464
+ case ".":
465
+ return D(s), s.next(), C(
466
+ o,
467
+ 8,
468
+ "."
469
+ /* TokenChars.LinkedDot */
470
+ );
471
+ case ":":
472
+ return D(s), s.next(), C(
473
+ o,
474
+ 9,
475
+ ":"
476
+ /* TokenChars.LinkedDelimiter */
477
+ );
478
+ default:
479
+ return X(s) ? (k = C(o, 1, Ve(s)), o.braceNest = 0, o.inLinked = !1, k) : y(s, o) || R(s, o) ? (D(s), Ne(s, o)) : p(s, o) ? (D(s), C(o, 11, Je(s))) : L(s, o) ? (D(s), M === "{" ? Fe(s, o) || k : C(o, 10, ze(s))) : (_ === 7 && T(re.INVALID_LINKED_FORMAT, a(), 0), o.braceNest = 0, o.inLinked = !1, Ye(s, o));
480
+ }
481
+ }
482
+ function Ye(s, o) {
483
+ let _ = {
484
+ type: 13
485
+ /* TokenTypes.EOF */
486
+ };
487
+ if (o.braceNest > 0)
488
+ return Fe(s, o) || F(o);
489
+ if (o.inLinked)
490
+ return Ne(s, o) || F(o);
491
+ switch (s.currentChar()) {
492
+ case "{":
493
+ return Fe(s, o) || F(o);
494
+ case "}":
495
+ return T(re.UNBALANCED_CLOSING_BRACE, a(), 0), s.next(), C(
496
+ o,
497
+ 3,
498
+ "}"
499
+ /* TokenChars.BraceRight */
500
+ );
501
+ case "@":
502
+ return Ne(s, o) || F(o);
503
+ default: {
504
+ if (X(s))
505
+ return _ = C(o, 1, Ve(s)), o.braceNest = 0, o.inLinked = !1, _;
506
+ if (x(s))
507
+ return C(o, 0, Q(s));
508
+ break;
509
+ }
510
+ }
511
+ return _;
512
+ }
513
+ function O() {
514
+ const { currentType: s, offset: o, startLoc: _, endLoc: k } = i;
515
+ return i.lastType = s, i.lastOffset = o, i.lastStartLoc = _, i.lastEndLoc = k, i.offset = l(), i.startLoc = a(), r.currentChar() === xe ? C(
516
+ i,
517
+ 13
518
+ /* TokenTypes.EOF */
519
+ ) : Ye(r, i);
520
+ }
521
+ return {
522
+ nextToken: O,
523
+ currentOffset: l,
524
+ currentPosition: a,
525
+ context: g
526
+ };
527
+ }
528
+ const Qr = "parser", qr = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
529
+ function es(e, t, n) {
530
+ switch (e) {
531
+ case "\\\\":
532
+ return "\\";
533
+ case "\\'":
534
+ return "'";
535
+ default: {
536
+ const r = parseInt(t || n, 16);
537
+ return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "�";
538
+ }
539
+ }
540
+ }
541
+ function ts(e = {}) {
542
+ const t = e.location !== !1, { onError: n } = e;
543
+ function r(f, h, S, c, ...b) {
544
+ const y = f.currentPosition();
545
+ if (y.offset += c, y.column += c, n) {
546
+ const p = t ? Ft(S, y) : null, R = Tt(h, p, {
547
+ domain: Qr,
548
+ args: b
549
+ });
550
+ n(R);
551
+ }
552
+ }
553
+ function l(f, h, S) {
554
+ const c = { type: f };
555
+ return t && (c.start = h, c.end = h, c.loc = { start: S, end: S }), c;
556
+ }
557
+ function a(f, h, S, c) {
558
+ t && (f.end = h, f.loc && (f.loc.end = S));
559
+ }
560
+ function m(f, h) {
561
+ const S = f.context(), c = l(3, S.offset, S.startLoc);
562
+ return c.value = h, a(c, f.currentOffset(), f.currentPosition()), c;
563
+ }
564
+ function u(f, h) {
565
+ const S = f.context(), { lastOffset: c, lastStartLoc: b } = S, y = l(5, c, b);
566
+ return y.index = parseInt(h, 10), f.nextToken(), a(y, f.currentOffset(), f.currentPosition()), y;
567
+ }
568
+ function i(f, h) {
569
+ const S = f.context(), { lastOffset: c, lastStartLoc: b } = S, y = l(4, c, b);
570
+ return y.key = h, f.nextToken(), a(y, f.currentOffset(), f.currentPosition()), y;
571
+ }
572
+ function g(f, h) {
573
+ const S = f.context(), { lastOffset: c, lastStartLoc: b } = S, y = l(9, c, b);
574
+ return y.value = h.replace(qr, es), f.nextToken(), a(y, f.currentOffset(), f.currentPosition()), y;
575
+ }
576
+ function I(f) {
577
+ const h = f.nextToken(), S = f.context(), { lastOffset: c, lastStartLoc: b } = S, y = l(8, c, b);
578
+ return h.type !== 11 ? (r(f, re.UNEXPECTED_EMPTY_LINKED_MODIFIER, S.lastStartLoc, 0), y.value = "", a(y, c, b), {
579
+ nextConsumeToken: h,
580
+ node: y
581
+ }) : (h.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, ke(h)), y.value = h.value || "", a(y, f.currentOffset(), f.currentPosition()), {
582
+ node: y
583
+ });
584
+ }
585
+ function T(f, h) {
586
+ const S = f.context(), c = l(7, S.offset, S.startLoc);
587
+ return c.value = h, a(c, f.currentOffset(), f.currentPosition()), c;
588
+ }
589
+ function C(f) {
590
+ const h = f.context(), S = l(6, h.offset, h.startLoc);
591
+ let c = f.nextToken();
592
+ if (c.type === 8) {
593
+ const b = I(f);
594
+ S.modifier = b.node, c = b.nextConsumeToken || f.nextToken();
595
+ }
596
+ switch (c.type !== 9 && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(c)), c = f.nextToken(), c.type === 2 && (c = f.nextToken()), c.type) {
597
+ case 10:
598
+ c.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(c)), S.key = T(f, c.value || "");
599
+ break;
600
+ case 4:
601
+ c.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(c)), S.key = i(f, c.value || "");
602
+ break;
603
+ case 5:
604
+ c.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(c)), S.key = u(f, c.value || "");
605
+ break;
606
+ case 6:
607
+ c.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(c)), S.key = g(f, c.value || "");
608
+ break;
609
+ default: {
610
+ r(f, re.UNEXPECTED_EMPTY_LINKED_KEY, h.lastStartLoc, 0);
611
+ const b = f.context(), y = l(7, b.offset, b.startLoc);
612
+ return y.value = "", a(y, b.offset, b.startLoc), S.key = y, a(S, b.offset, b.startLoc), {
613
+ nextConsumeToken: c,
614
+ node: S
615
+ };
616
+ }
617
+ }
618
+ return a(S, f.currentOffset(), f.currentPosition()), {
619
+ node: S
620
+ };
621
+ }
622
+ function F(f) {
623
+ const h = f.context(), S = h.currentType === 1 ? f.currentOffset() : h.offset, c = h.currentType === 1 ? h.endLoc : h.startLoc, b = l(2, S, c);
624
+ b.items = [];
625
+ let y = null;
626
+ do {
627
+ const L = y || f.nextToken();
628
+ switch (y = null, L.type) {
629
+ case 0:
630
+ L.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(L)), b.items.push(m(f, L.value || ""));
631
+ break;
632
+ case 5:
633
+ L.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(L)), b.items.push(u(f, L.value || ""));
634
+ break;
635
+ case 4:
636
+ L.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(L)), b.items.push(i(f, L.value || ""));
637
+ break;
638
+ case 6:
639
+ L.value == null && r(f, re.UNEXPECTED_LEXICAL_ANALYSIS, h.lastStartLoc, 0, ke(L)), b.items.push(g(f, L.value || ""));
640
+ break;
641
+ case 7: {
642
+ const X = C(f);
643
+ b.items.push(X.node), y = X.nextConsumeToken || null;
644
+ break;
645
+ }
646
+ }
647
+ } while (h.currentType !== 13 && h.currentType !== 1);
648
+ const p = h.currentType === 1 ? h.lastOffset : f.currentOffset(), R = h.currentType === 1 ? h.lastEndLoc : f.currentPosition();
649
+ return a(b, p, R), b;
650
+ }
651
+ function w(f, h, S, c) {
652
+ const b = f.context();
653
+ let y = c.items.length === 0;
654
+ const p = l(1, h, S);
655
+ p.cases = [], p.cases.push(c);
656
+ do {
657
+ const R = F(f);
658
+ y || (y = R.items.length === 0), p.cases.push(R);
659
+ } while (b.currentType !== 13);
660
+ return y && r(f, re.MUST_HAVE_MESSAGES_IN_PLURAL, S, 0), a(p, f.currentOffset(), f.currentPosition()), p;
661
+ }
662
+ function A(f) {
663
+ const h = f.context(), { offset: S, startLoc: c } = h, b = F(f);
664
+ return h.currentType === 13 ? b : w(f, S, c, b);
665
+ }
666
+ function D(f) {
667
+ const h = Kr(f, ye({}, e)), S = h.context(), c = l(0, S.offset, S.startLoc);
668
+ return t && c.loc && (c.loc.source = f), c.body = A(h), e.onCacheKey && (c.cacheKey = e.onCacheKey(f)), S.currentType !== 13 && r(h, re.UNEXPECTED_LEXICAL_ANALYSIS, S.lastStartLoc, 0, f[S.offset] || ""), a(c, h.currentOffset(), h.currentPosition()), c;
669
+ }
670
+ return { parse: D };
671
+ }
672
+ function ke(e) {
673
+ if (e.type === 13)
674
+ return "EOF";
675
+ const t = (e.value || "").replace(/\r?\n/gu, "\\n");
676
+ return t.length > 10 ? t.slice(0, 9) + "…" : t;
677
+ }
678
+ function ns(e, t = {}) {
679
+ const n = {
680
+ ast: e,
681
+ helpers: /* @__PURE__ */ new Set()
682
+ };
683
+ return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
684
+ }
685
+ function un(e, t) {
686
+ for (let n = 0; n < e.length; n++)
687
+ Jt(e[n], t);
688
+ }
689
+ function Jt(e, t) {
690
+ switch (e.type) {
691
+ case 1:
692
+ un(e.cases, t), t.helper(
693
+ "plural"
694
+ /* HelperNameMap.PLURAL */
695
+ );
696
+ break;
697
+ case 2:
698
+ un(e.items, t);
699
+ break;
700
+ case 6: {
701
+ Jt(e.key, t), t.helper(
702
+ "linked"
703
+ /* HelperNameMap.LINKED */
704
+ ), t.helper(
705
+ "type"
706
+ /* HelperNameMap.TYPE */
707
+ );
708
+ break;
709
+ }
710
+ case 5:
711
+ t.helper(
712
+ "interpolate"
713
+ /* HelperNameMap.INTERPOLATE */
714
+ ), t.helper(
715
+ "list"
716
+ /* HelperNameMap.LIST */
717
+ );
718
+ break;
719
+ case 4:
720
+ t.helper(
721
+ "interpolate"
722
+ /* HelperNameMap.INTERPOLATE */
723
+ ), t.helper(
724
+ "named"
725
+ /* HelperNameMap.NAMED */
726
+ );
727
+ break;
728
+ }
729
+ }
730
+ function rs(e, t = {}) {
731
+ const n = ns(e);
732
+ n.helper(
733
+ "normalize"
734
+ /* HelperNameMap.NORMALIZE */
735
+ ), e.body && Jt(e.body, n);
736
+ const r = n.context();
737
+ e.helpers = Array.from(r.helpers);
738
+ }
739
+ function ss(e) {
740
+ const t = e.body;
741
+ return t.type === 2 ? mn(t) : t.cases.forEach((n) => mn(n)), e;
742
+ }
743
+ function mn(e) {
744
+ if (e.items.length === 1) {
745
+ const t = e.items[0];
746
+ (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
747
+ } else {
748
+ const t = [];
749
+ for (let n = 0; n < e.items.length; n++) {
750
+ const r = e.items[n];
751
+ if (!(r.type === 3 || r.type === 9) || r.value == null)
752
+ break;
753
+ t.push(r.value);
754
+ }
755
+ if (t.length === e.items.length) {
756
+ e.static = $t(t);
757
+ for (let n = 0; n < e.items.length; n++) {
758
+ const r = e.items[n];
759
+ (r.type === 3 || r.type === 9) && delete r.value;
760
+ }
761
+ }
762
+ }
763
+ }
764
+ function Qe(e) {
765
+ switch (e.t = e.type, e.type) {
766
+ case 0: {
767
+ const t = e;
768
+ Qe(t.body), t.b = t.body, delete t.body;
769
+ break;
770
+ }
771
+ case 1: {
772
+ const t = e, n = t.cases;
773
+ for (let r = 0; r < n.length; r++)
774
+ Qe(n[r]);
775
+ t.c = n, delete t.cases;
776
+ break;
777
+ }
778
+ case 2: {
779
+ const t = e, n = t.items;
780
+ for (let r = 0; r < n.length; r++)
781
+ Qe(n[r]);
782
+ t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
783
+ break;
784
+ }
785
+ case 3:
786
+ case 9:
787
+ case 8:
788
+ case 7: {
789
+ const t = e;
790
+ t.value && (t.v = t.value, delete t.value);
791
+ break;
792
+ }
793
+ case 6: {
794
+ const t = e;
795
+ Qe(t.key), t.k = t.key, delete t.key, t.modifier && (Qe(t.modifier), t.m = t.modifier, delete t.modifier);
796
+ break;
797
+ }
798
+ case 5: {
799
+ const t = e;
800
+ t.i = t.index, delete t.index;
801
+ break;
802
+ }
803
+ case 4: {
804
+ const t = e;
805
+ t.k = t.key, delete t.key;
806
+ break;
807
+ }
808
+ }
809
+ delete e.type;
810
+ }
811
+ function os(e, t) {
812
+ const { filename: n, breakLineCode: r, needIndent: l } = t, a = t.location !== !1, m = {
813
+ filename: n,
814
+ code: "",
815
+ column: 1,
816
+ line: 1,
817
+ offset: 0,
818
+ map: void 0,
819
+ breakLineCode: r,
820
+ needIndent: l,
821
+ indentLevel: 0
822
+ };
823
+ a && e.loc && (m.source = e.loc.source);
824
+ const u = () => m;
825
+ function i(A, D) {
826
+ m.code += A;
827
+ }
828
+ function g(A, D = !0) {
829
+ const f = D ? r : "";
830
+ i(l ? f + " ".repeat(A) : f);
831
+ }
832
+ function I(A = !0) {
833
+ const D = ++m.indentLevel;
834
+ A && g(D);
835
+ }
836
+ function T(A = !0) {
837
+ const D = --m.indentLevel;
838
+ A && g(D);
839
+ }
840
+ function C() {
841
+ g(m.indentLevel);
842
+ }
843
+ return {
844
+ context: u,
845
+ push: i,
846
+ indent: I,
847
+ deindent: T,
848
+ newline: C,
849
+ helper: (A) => `_${A}`,
850
+ needIndent: () => m.needIndent
851
+ };
852
+ }
853
+ function as(e, t) {
854
+ const { helper: n } = e;
855
+ e.push(`${n(
856
+ "linked"
857
+ /* HelperNameMap.LINKED */
858
+ )}(`), st(e, t.key), t.modifier ? (e.push(", "), st(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
859
+ }
860
+ function ls(e, t) {
861
+ const { helper: n, needIndent: r } = e;
862
+ e.push(`${n(
863
+ "normalize"
864
+ /* HelperNameMap.NORMALIZE */
865
+ )}([`), e.indent(r());
866
+ const l = t.items.length;
867
+ for (let a = 0; a < l && (st(e, t.items[a]), a !== l - 1); a++)
868
+ e.push(", ");
869
+ e.deindent(r()), e.push("])");
870
+ }
871
+ function is(e, t) {
872
+ const { helper: n, needIndent: r } = e;
873
+ if (t.cases.length > 1) {
874
+ e.push(`${n(
875
+ "plural"
876
+ /* HelperNameMap.PLURAL */
877
+ )}([`), e.indent(r());
878
+ const l = t.cases.length;
879
+ for (let a = 0; a < l && (st(e, t.cases[a]), a !== l - 1); a++)
880
+ e.push(", ");
881
+ e.deindent(r()), e.push("])");
882
+ }
883
+ }
884
+ function cs(e, t) {
885
+ t.body ? st(e, t.body) : e.push("null");
886
+ }
887
+ function st(e, t) {
888
+ const { helper: n } = e;
889
+ switch (t.type) {
890
+ case 0:
891
+ cs(e, t);
892
+ break;
893
+ case 1:
894
+ is(e, t);
895
+ break;
896
+ case 2:
897
+ ls(e, t);
898
+ break;
899
+ case 6:
900
+ as(e, t);
901
+ break;
902
+ case 8:
903
+ e.push(JSON.stringify(t.value), t);
904
+ break;
905
+ case 7:
906
+ e.push(JSON.stringify(t.value), t);
907
+ break;
908
+ case 5:
909
+ e.push(`${n(
910
+ "interpolate"
911
+ /* HelperNameMap.INTERPOLATE */
912
+ )}(${n(
913
+ "list"
914
+ /* HelperNameMap.LIST */
915
+ )}(${t.index}))`, t);
916
+ break;
917
+ case 4:
918
+ e.push(`${n(
919
+ "interpolate"
920
+ /* HelperNameMap.INTERPOLATE */
921
+ )}(${n(
922
+ "named"
923
+ /* HelperNameMap.NAMED */
924
+ )}(${JSON.stringify(t.key)}))`, t);
925
+ break;
926
+ case 9:
927
+ e.push(JSON.stringify(t.value), t);
928
+ break;
929
+ case 3:
930
+ e.push(JSON.stringify(t.value), t);
931
+ break;
932
+ }
933
+ }
934
+ const us = (e, t = {}) => {
935
+ const n = B(t.mode) ? t.mode : "normal", r = B(t.filename) ? t.filename : "message.intl";
936
+ t.sourceMap;
937
+ const l = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
938
+ `, a = t.needIndent ? t.needIndent : n !== "arrow", m = e.helpers || [], u = os(e, {
939
+ filename: r,
940
+ breakLineCode: l,
941
+ needIndent: a
942
+ });
943
+ u.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), u.indent(a), m.length > 0 && (u.push(`const { ${$t(m.map((I) => `${I}: _${I}`), ", ")} } = ctx`), u.newline()), u.push("return "), st(u, e), u.deindent(a), u.push("}"), delete e.helpers;
944
+ const { code: i, map: g } = u.context();
945
+ return {
946
+ ast: e,
947
+ code: i,
948
+ map: g ? g.toJSON() : void 0
949
+ // eslint-disable-line @typescript-eslint/no-explicit-any
950
+ };
951
+ };
952
+ function ms(e, t = {}) {
953
+ const n = ye({}, t), r = !!n.jit, l = !!n.minify, a = n.optimize == null ? !0 : n.optimize, u = ts(n).parse(e);
954
+ return r ? (a && ss(u), l && Qe(u), { ast: u, code: "" }) : (rs(u, n), us(u, n));
955
+ }
956
+ var ds = { env: { NODE_ENV: "production" } };
957
+ function fs() {
958
+ typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Xe().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Xe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
959
+ }
960
+ function At(e) {
961
+ return (n) => _s(n, e);
962
+ }
963
+ function _s(e, t) {
964
+ const n = vs(t);
965
+ if (n == null)
966
+ throw it(
967
+ 0
968
+ /* NodeTypes.Resource */
969
+ );
970
+ if (zt(n) === 1) {
971
+ const a = bs(n);
972
+ return e.plural(a.reduce((m, u) => [
973
+ ...m,
974
+ dn(e, u)
975
+ ], []));
976
+ } else
977
+ return dn(e, n);
978
+ }
979
+ const ps = ["b", "body"];
980
+ function vs(e) {
981
+ return Ge(e, ps);
982
+ }
983
+ const hs = ["c", "cases"];
984
+ function bs(e) {
985
+ return Ge(e, hs, []);
986
+ }
987
+ function dn(e, t) {
988
+ const n = ys(t);
989
+ if (n != null)
990
+ return e.type === "text" ? n : e.normalize([n]);
991
+ {
992
+ const r = Es(t).reduce((l, a) => [...l, Pt(e, a)], []);
993
+ return e.normalize(r);
994
+ }
995
+ }
996
+ const gs = ["s", "static"];
997
+ function ys(e) {
998
+ return Ge(e, gs);
999
+ }
1000
+ const Is = ["i", "items"];
1001
+ function Es(e) {
1002
+ return Ge(e, Is, []);
1003
+ }
1004
+ function Pt(e, t) {
1005
+ const n = zt(t);
1006
+ switch (n) {
1007
+ case 3:
1008
+ return _t(t, n);
1009
+ case 9:
1010
+ return _t(t, n);
1011
+ case 4: {
1012
+ const r = t;
1013
+ if (Le(r, "k") && r.k)
1014
+ return e.interpolate(e.named(r.k));
1015
+ if (Le(r, "key") && r.key)
1016
+ return e.interpolate(e.named(r.key));
1017
+ throw it(n);
1018
+ }
1019
+ case 5: {
1020
+ const r = t;
1021
+ if (Le(r, "i") && ge(r.i))
1022
+ return e.interpolate(e.list(r.i));
1023
+ if (Le(r, "index") && ge(r.index))
1024
+ return e.interpolate(e.list(r.index));
1025
+ throw it(n);
1026
+ }
1027
+ case 6: {
1028
+ const r = t, l = Os(r), a = Ls(r);
1029
+ return e.linked(Pt(e, a), l ? Pt(e, l) : void 0, e.type);
1030
+ }
1031
+ case 7:
1032
+ return _t(t, n);
1033
+ case 8:
1034
+ return _t(t, n);
1035
+ default:
1036
+ throw new Error(`unhandled node on format message part: ${n}`);
1037
+ }
1038
+ }
1039
+ const Cs = ["t", "type"];
1040
+ function zt(e) {
1041
+ return Ge(e, Cs);
1042
+ }
1043
+ const Ns = ["v", "value"];
1044
+ function _t(e, t) {
1045
+ const n = Ge(e, Ns);
1046
+ if (n)
1047
+ return n;
1048
+ throw it(t);
1049
+ }
1050
+ const Ts = ["m", "modifier"];
1051
+ function Os(e) {
1052
+ return Ge(e, Ts);
1053
+ }
1054
+ const Ss = ["k", "key"];
1055
+ function Ls(e) {
1056
+ const t = Ge(e, Ss);
1057
+ if (t)
1058
+ return t;
1059
+ throw it(
1060
+ 6
1061
+ /* NodeTypes.Linked */
1062
+ );
1063
+ }
1064
+ function Ge(e, t, n) {
1065
+ for (let r = 0; r < t.length; r++) {
1066
+ const l = t[r];
1067
+ if (Le(e, l) && e[l] != null)
1068
+ return e[l];
1069
+ }
1070
+ return n;
1071
+ }
1072
+ function it(e) {
1073
+ return new Error(`unhandled node type: ${e}`);
1074
+ }
1075
+ const As = (e) => e;
1076
+ let pt = oe();
1077
+ function ot(e) {
1078
+ return te(e) && zt(e) === 0 && (Le(e, "b") || Le(e, "body"));
1079
+ }
1080
+ function ks(e, t = {}) {
1081
+ let n = !1;
1082
+ const r = t.onError || Yr;
1083
+ return t.onError = (l) => {
1084
+ n = !0, r(l);
1085
+ }, { ...ms(e, t), detectError: n };
1086
+ }
1087
+ // @__NO_SIDE_EFFECTS__
1088
+ function Rs(e, t) {
1089
+ if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && B(e)) {
1090
+ ve(t.warnHtmlMessage) && t.warnHtmlMessage;
1091
+ const r = (t.onCacheKey || As)(e), l = pt[r];
1092
+ if (l)
1093
+ return l;
1094
+ const { ast: a, detectError: m } = ks(e, {
1095
+ ...t,
1096
+ location: ds.env.NODE_ENV !== "production",
1097
+ jit: !0
1098
+ }), u = At(a);
1099
+ return m ? u : pt[r] = u;
1100
+ } else {
1101
+ const n = e.cacheKey;
1102
+ if (n) {
1103
+ const r = pt[n];
1104
+ return r || (pt[n] = At(e));
1105
+ } else
1106
+ return At(e);
1107
+ }
1108
+ }
1109
+ let ct = null;
1110
+ function Ms(e) {
1111
+ ct = e;
1112
+ }
1113
+ function ws(e, t, n) {
1114
+ ct && ct.emit("i18n:init", {
1115
+ timestamp: Date.now(),
1116
+ i18n: e,
1117
+ version: t,
1118
+ meta: n
1119
+ });
1120
+ }
1121
+ const Ds = /* @__PURE__ */ Fs("function:translate");
1122
+ function Fs(e) {
1123
+ return (t) => ct && ct.emit(e, t);
1124
+ }
1125
+ const je = {
1126
+ INVALID_ARGUMENT: Br,
1127
+ // 17
1128
+ INVALID_DATE_ARGUMENT: 18,
1129
+ INVALID_ISO_DATE_ARGUMENT: 19,
1130
+ NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
1131
+ NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
1132
+ NOT_SUPPORT_LOCALE_TYPE: 23
1133
+ }, Ps = 24;
1134
+ function Ue(e) {
1135
+ return Tt(e, null, void 0);
1136
+ }
1137
+ function Kt(e, t) {
1138
+ return t.locale != null ? fn(t.locale) : fn(e.locale);
1139
+ }
1140
+ let kt;
1141
+ function fn(e) {
1142
+ if (B(e))
1143
+ return e;
1144
+ if (de(e)) {
1145
+ if (e.resolvedOnce && kt != null)
1146
+ return kt;
1147
+ if (e.constructor.name === "Function") {
1148
+ const t = e();
1149
+ if (Vr(t))
1150
+ throw Ue(je.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1151
+ return kt = t;
1152
+ } else
1153
+ throw Ue(je.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1154
+ } else
1155
+ throw Ue(je.NOT_SUPPORT_LOCALE_TYPE);
1156
+ }
1157
+ function js(e, t, n) {
1158
+ return [.../* @__PURE__ */ new Set([
1159
+ n,
1160
+ ...be(t) ? t : te(t) ? Object.keys(t) : B(t) ? [t] : [n]
1161
+ ])];
1162
+ }
1163
+ function Hn(e, t, n) {
1164
+ const r = B(n) ? n : Ct, l = e;
1165
+ l.__localeChainCache || (l.__localeChainCache = /* @__PURE__ */ new Map());
1166
+ let a = l.__localeChainCache.get(r);
1167
+ if (!a) {
1168
+ a = [];
1169
+ let m = [n];
1170
+ for (; be(m); )
1171
+ m = _n(a, m, t);
1172
+ const u = be(t) || !ee(t) ? t : t.default ? t.default : null;
1173
+ m = B(u) ? [u] : u, be(m) && _n(a, m, !1), l.__localeChainCache.set(r, a);
1174
+ }
1175
+ return a;
1176
+ }
1177
+ function _n(e, t, n) {
1178
+ let r = !0;
1179
+ for (let l = 0; l < t.length && ve(r); l++) {
1180
+ const a = t[l];
1181
+ B(a) && (r = Us(e, t[l], n));
1182
+ }
1183
+ return r;
1184
+ }
1185
+ function Us(e, t, n) {
1186
+ let r;
1187
+ const l = t.split("-");
1188
+ do {
1189
+ const a = l.join("-");
1190
+ r = Vs(e, a, n), l.splice(-1, 1);
1191
+ } while (l.length && r === !0);
1192
+ return r;
1193
+ }
1194
+ function Vs(e, t, n) {
1195
+ let r = !1;
1196
+ if (!e.includes(t) && (r = !0, t)) {
1197
+ r = t[t.length - 1] !== "!";
1198
+ const l = t.replace(/!/g, "");
1199
+ e.push(l), (be(n) || ee(n)) && n[l] && (r = n[l]);
1200
+ }
1201
+ return r;
1202
+ }
1203
+ const Be = [];
1204
+ Be[
1205
+ 0
1206
+ /* States.BEFORE_PATH */
1207
+ ] = {
1208
+ w: [
1209
+ 0
1210
+ /* States.BEFORE_PATH */
1211
+ ],
1212
+ i: [
1213
+ 3,
1214
+ 0
1215
+ /* Actions.APPEND */
1216
+ ],
1217
+ "[": [
1218
+ 4
1219
+ /* States.IN_SUB_PATH */
1220
+ ],
1221
+ o: [
1222
+ 7
1223
+ /* States.AFTER_PATH */
1224
+ ]
1225
+ };
1226
+ Be[
1227
+ 1
1228
+ /* States.IN_PATH */
1229
+ ] = {
1230
+ w: [
1231
+ 1
1232
+ /* States.IN_PATH */
1233
+ ],
1234
+ ".": [
1235
+ 2
1236
+ /* States.BEFORE_IDENT */
1237
+ ],
1238
+ "[": [
1239
+ 4
1240
+ /* States.IN_SUB_PATH */
1241
+ ],
1242
+ o: [
1243
+ 7
1244
+ /* States.AFTER_PATH */
1245
+ ]
1246
+ };
1247
+ Be[
1248
+ 2
1249
+ /* States.BEFORE_IDENT */
1250
+ ] = {
1251
+ w: [
1252
+ 2
1253
+ /* States.BEFORE_IDENT */
1254
+ ],
1255
+ i: [
1256
+ 3,
1257
+ 0
1258
+ /* Actions.APPEND */
1259
+ ],
1260
+ 0: [
1261
+ 3,
1262
+ 0
1263
+ /* Actions.APPEND */
1264
+ ]
1265
+ };
1266
+ Be[
1267
+ 3
1268
+ /* States.IN_IDENT */
1269
+ ] = {
1270
+ i: [
1271
+ 3,
1272
+ 0
1273
+ /* Actions.APPEND */
1274
+ ],
1275
+ 0: [
1276
+ 3,
1277
+ 0
1278
+ /* Actions.APPEND */
1279
+ ],
1280
+ w: [
1281
+ 1,
1282
+ 1
1283
+ /* Actions.PUSH */
1284
+ ],
1285
+ ".": [
1286
+ 2,
1287
+ 1
1288
+ /* Actions.PUSH */
1289
+ ],
1290
+ "[": [
1291
+ 4,
1292
+ 1
1293
+ /* Actions.PUSH */
1294
+ ],
1295
+ o: [
1296
+ 7,
1297
+ 1
1298
+ /* Actions.PUSH */
1299
+ ]
1300
+ };
1301
+ Be[
1302
+ 4
1303
+ /* States.IN_SUB_PATH */
1304
+ ] = {
1305
+ "'": [
1306
+ 5,
1307
+ 0
1308
+ /* Actions.APPEND */
1309
+ ],
1310
+ '"': [
1311
+ 6,
1312
+ 0
1313
+ /* Actions.APPEND */
1314
+ ],
1315
+ "[": [
1316
+ 4,
1317
+ 2
1318
+ /* Actions.INC_SUB_PATH_DEPTH */
1319
+ ],
1320
+ "]": [
1321
+ 1,
1322
+ 3
1323
+ /* Actions.PUSH_SUB_PATH */
1324
+ ],
1325
+ o: 8,
1326
+ l: [
1327
+ 4,
1328
+ 0
1329
+ /* Actions.APPEND */
1330
+ ]
1331
+ };
1332
+ Be[
1333
+ 5
1334
+ /* States.IN_SINGLE_QUOTE */
1335
+ ] = {
1336
+ "'": [
1337
+ 4,
1338
+ 0
1339
+ /* Actions.APPEND */
1340
+ ],
1341
+ o: 8,
1342
+ l: [
1343
+ 5,
1344
+ 0
1345
+ /* Actions.APPEND */
1346
+ ]
1347
+ };
1348
+ Be[
1349
+ 6
1350
+ /* States.IN_DOUBLE_QUOTE */
1351
+ ] = {
1352
+ '"': [
1353
+ 4,
1354
+ 0
1355
+ /* Actions.APPEND */
1356
+ ],
1357
+ o: 8,
1358
+ l: [
1359
+ 6,
1360
+ 0
1361
+ /* Actions.APPEND */
1362
+ ]
1363
+ };
1364
+ const xs = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1365
+ function Ws(e) {
1366
+ return xs.test(e);
1367
+ }
1368
+ function Gs(e) {
1369
+ const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
1370
+ return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1371
+ }
1372
+ function Bs(e) {
1373
+ if (e == null)
1374
+ return "o";
1375
+ switch (e.charCodeAt(0)) {
1376
+ case 91:
1377
+ case 93:
1378
+ case 46:
1379
+ case 34:
1380
+ case 39:
1381
+ return e;
1382
+ case 95:
1383
+ case 36:
1384
+ case 45:
1385
+ return "i";
1386
+ case 9:
1387
+ case 10:
1388
+ case 13:
1389
+ case 160:
1390
+ case 65279:
1391
+ case 8232:
1392
+ case 8233:
1393
+ return "w";
1394
+ }
1395
+ return "i";
1396
+ }
1397
+ function Ys(e) {
1398
+ const t = e.trim();
1399
+ return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Ws(t) ? Gs(t) : "*" + t;
1400
+ }
1401
+ function Zs(e) {
1402
+ const t = [];
1403
+ let n = -1, r = 0, l = 0, a, m, u, i, g, I, T;
1404
+ const C = [];
1405
+ C[
1406
+ 0
1407
+ /* Actions.APPEND */
1408
+ ] = () => {
1409
+ m === void 0 ? m = u : m += u;
1410
+ }, C[
1411
+ 1
1412
+ /* Actions.PUSH */
1413
+ ] = () => {
1414
+ m !== void 0 && (t.push(m), m = void 0);
1415
+ }, C[
1416
+ 2
1417
+ /* Actions.INC_SUB_PATH_DEPTH */
1418
+ ] = () => {
1419
+ C[
1420
+ 0
1421
+ /* Actions.APPEND */
1422
+ ](), l++;
1423
+ }, C[
1424
+ 3
1425
+ /* Actions.PUSH_SUB_PATH */
1426
+ ] = () => {
1427
+ if (l > 0)
1428
+ l--, r = 4, C[
1429
+ 0
1430
+ /* Actions.APPEND */
1431
+ ]();
1432
+ else {
1433
+ if (l = 0, m === void 0 || (m = Ys(m), m === !1))
1434
+ return !1;
1435
+ C[
1436
+ 1
1437
+ /* Actions.PUSH */
1438
+ ]();
1439
+ }
1440
+ };
1441
+ function F() {
1442
+ const w = e[n + 1];
1443
+ if (r === 5 && w === "'" || r === 6 && w === '"')
1444
+ return n++, u = "\\" + w, C[
1445
+ 0
1446
+ /* Actions.APPEND */
1447
+ ](), !0;
1448
+ }
1449
+ for (; r !== null; )
1450
+ if (n++, a = e[n], !(a === "\\" && F())) {
1451
+ if (i = Bs(a), T = Be[r], g = T[i] || T.l || 8, g === 8 || (r = g[0], g[1] !== void 0 && (I = C[g[1]], I && (u = a, I() === !1))))
1452
+ return;
1453
+ if (r === 7)
1454
+ return t;
1455
+ }
1456
+ }
1457
+ const pn = /* @__PURE__ */ new Map();
1458
+ function Xs(e, t) {
1459
+ return te(e) ? e[t] : null;
1460
+ }
1461
+ function Hs(e, t) {
1462
+ if (!te(e))
1463
+ return null;
1464
+ let n = pn.get(t);
1465
+ if (n || (n = Zs(t), n && pn.set(t, n)), !n)
1466
+ return null;
1467
+ const r = n.length;
1468
+ let l = e, a = 0;
1469
+ for (; a < r; ) {
1470
+ const m = l[n[a]];
1471
+ if (m === void 0 || de(l))
1472
+ return null;
1473
+ l = m, a++;
1474
+ }
1475
+ return l;
1476
+ }
1477
+ const $s = "10.0.5", Ot = -1, Ct = "en-US", vn = "", hn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1478
+ function Js() {
1479
+ return {
1480
+ upper: (e, t) => t === "text" && B(e) ? e.toUpperCase() : t === "vnode" && te(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
1481
+ lower: (e, t) => t === "text" && B(e) ? e.toLowerCase() : t === "vnode" && te(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
1482
+ capitalize: (e, t) => t === "text" && B(e) ? hn(e) : t === "vnode" && te(e) && "__v_isVNode" in e ? hn(e.children) : e
1483
+ };
1484
+ }
1485
+ let $n;
1486
+ function zs(e) {
1487
+ $n = e;
1488
+ }
1489
+ let Jn;
1490
+ function Ks(e) {
1491
+ Jn = e;
1492
+ }
1493
+ let zn;
1494
+ function Qs(e) {
1495
+ zn = e;
1496
+ }
1497
+ let Kn = null;
1498
+ const qs = /* @__NO_SIDE_EFFECTS__ */ (e) => {
1499
+ Kn = e;
1500
+ }, eo = /* @__NO_SIDE_EFFECTS__ */ () => Kn;
1501
+ let Qn = null;
1502
+ const bn = (e) => {
1503
+ Qn = e;
1504
+ }, to = () => Qn;
1505
+ let gn = 0;
1506
+ function no(e = {}) {
1507
+ const t = de(e.onWarn) ? e.onWarn : Wr, n = B(e.version) ? e.version : $s, r = B(e.locale) || de(e.locale) ? e.locale : Ct, l = de(r) ? Ct : r, a = be(e.fallbackLocale) || ee(e.fallbackLocale) || B(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l, m = ee(e.messages) ? e.messages : Rt(l), u = ee(e.datetimeFormats) ? e.datetimeFormats : Rt(l), i = ee(e.numberFormats) ? e.numberFormats : Rt(l), g = ye(oe(), e.modifiers, Js()), I = e.pluralRules || oe(), T = de(e.missing) ? e.missing : null, C = ve(e.missingWarn) || Et(e.missingWarn) ? e.missingWarn : !0, F = ve(e.fallbackWarn) || Et(e.fallbackWarn) ? e.fallbackWarn : !0, w = !!e.fallbackFormat, A = !!e.unresolving, D = de(e.postTranslation) ? e.postTranslation : null, f = ee(e.processor) ? e.processor : null, h = ve(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, S = !!e.escapeParameter, c = de(e.messageCompiler) ? e.messageCompiler : $n, b = de(e.messageResolver) ? e.messageResolver : Jn || Xs, y = de(e.localeFallbacker) ? e.localeFallbacker : zn || js, p = te(e.fallbackContext) ? e.fallbackContext : void 0, R = e, L = te(R.__datetimeFormatters) ? R.__datetimeFormatters : /* @__PURE__ */ new Map(), X = te(R.__numberFormatters) ? R.__numberFormatters : /* @__PURE__ */ new Map(), x = te(R.__meta) ? R.__meta : {};
1508
+ gn++;
1509
+ const d = {
1510
+ version: n,
1511
+ cid: gn,
1512
+ locale: r,
1513
+ fallbackLocale: a,
1514
+ messages: m,
1515
+ modifiers: g,
1516
+ pluralRules: I,
1517
+ missing: T,
1518
+ missingWarn: C,
1519
+ fallbackWarn: F,
1520
+ fallbackFormat: w,
1521
+ unresolving: A,
1522
+ postTranslation: D,
1523
+ processor: f,
1524
+ warnHtmlMessage: h,
1525
+ escapeParameter: S,
1526
+ messageCompiler: c,
1527
+ messageResolver: b,
1528
+ localeFallbacker: y,
1529
+ fallbackContext: p,
1530
+ onWarn: t,
1531
+ __meta: x
1532
+ };
1533
+ return d.datetimeFormats = u, d.numberFormats = i, d.__datetimeFormatters = L, d.__numberFormatters = X, __INTLIFY_PROD_DEVTOOLS__ && ws(d, n, x), d;
1534
+ }
1535
+ const Rt = (e) => ({ [e]: oe() });
1536
+ function Qt(e, t, n, r, l) {
1537
+ const { missing: a, onWarn: m } = e;
1538
+ if (a !== null) {
1539
+ const u = a(e, n, t, l);
1540
+ return B(u) ? u : t;
1541
+ } else
1542
+ return t;
1543
+ }
1544
+ function lt(e, t, n) {
1545
+ const r = e;
1546
+ r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
1547
+ }
1548
+ function ro(e, t) {
1549
+ return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
1550
+ }
1551
+ function so(e, t) {
1552
+ const n = t.indexOf(e);
1553
+ if (n === -1)
1554
+ return !1;
1555
+ for (let r = n + 1; r < t.length; r++)
1556
+ if (ro(e, t[r]))
1557
+ return !0;
1558
+ return !1;
1559
+ }
1560
+ function yn(e, ...t) {
1561
+ const { datetimeFormats: n, unresolving: r, fallbackLocale: l, onWarn: a, localeFallbacker: m } = e, { __datetimeFormatters: u } = e, [i, g, I, T] = jt(...t), C = ve(I.missingWarn) ? I.missingWarn : e.missingWarn;
1562
+ ve(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn;
1563
+ const F = !!I.part, w = Kt(e, I), A = m(
1564
+ e,
1565
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1566
+ l,
1567
+ w
1568
+ );
1569
+ if (!B(i) || i === "")
1570
+ return new Intl.DateTimeFormat(w, T).format(g);
1571
+ let D = {}, f, h = null;
1572
+ const S = "datetime format";
1573
+ for (let y = 0; y < A.length && (f = A[y], D = n[f] || {}, h = D[i], !ee(h)); y++)
1574
+ Qt(e, i, f, C, S);
1575
+ if (!ee(h) || !B(f))
1576
+ return r ? Ot : i;
1577
+ let c = `${f}__${i}`;
1578
+ Nt(T) || (c = `${c}__${JSON.stringify(T)}`);
1579
+ let b = u.get(c);
1580
+ return b || (b = new Intl.DateTimeFormat(f, ye({}, h, T)), u.set(c, b)), F ? b.formatToParts(g) : b.format(g);
1581
+ }
1582
+ const qn = [
1583
+ "localeMatcher",
1584
+ "weekday",
1585
+ "era",
1586
+ "year",
1587
+ "month",
1588
+ "day",
1589
+ "hour",
1590
+ "minute",
1591
+ "second",
1592
+ "timeZoneName",
1593
+ "formatMatcher",
1594
+ "hour12",
1595
+ "timeZone",
1596
+ "dateStyle",
1597
+ "timeStyle",
1598
+ "calendar",
1599
+ "dayPeriod",
1600
+ "numberingSystem",
1601
+ "hourCycle",
1602
+ "fractionalSecondDigits"
1603
+ ];
1604
+ function jt(...e) {
1605
+ const [t, n, r, l] = e, a = oe();
1606
+ let m = oe(), u;
1607
+ if (B(t)) {
1608
+ const i = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
1609
+ if (!i)
1610
+ throw Ue(je.INVALID_ISO_DATE_ARGUMENT);
1611
+ const g = i[3] ? i[3].trim().startsWith("T") ? `${i[1].trim()}${i[3].trim()}` : `${i[1].trim()}T${i[3].trim()}` : i[1].trim();
1612
+ u = new Date(g);
1613
+ try {
1614
+ u.toISOString();
1615
+ } catch {
1616
+ throw Ue(je.INVALID_ISO_DATE_ARGUMENT);
1617
+ }
1618
+ } else if (Pr(t)) {
1619
+ if (isNaN(t.getTime()))
1620
+ throw Ue(je.INVALID_DATE_ARGUMENT);
1621
+ u = t;
1622
+ } else if (ge(t))
1623
+ u = t;
1624
+ else
1625
+ throw Ue(je.INVALID_ARGUMENT);
1626
+ return B(n) ? a.key = n : ee(n) && Object.keys(n).forEach((i) => {
1627
+ qn.includes(i) ? m[i] = n[i] : a[i] = n[i];
1628
+ }), B(r) ? a.locale = r : ee(r) && (m = r), ee(l) && (m = l), [a.key || "", u, a, m];
1629
+ }
1630
+ function In(e, t, n) {
1631
+ const r = e;
1632
+ for (const l in n) {
1633
+ const a = `${t}__${l}`;
1634
+ r.__datetimeFormatters.has(a) && r.__datetimeFormatters.delete(a);
1635
+ }
1636
+ }
1637
+ function En(e, ...t) {
1638
+ const { numberFormats: n, unresolving: r, fallbackLocale: l, onWarn: a, localeFallbacker: m } = e, { __numberFormatters: u } = e, [i, g, I, T] = Ut(...t), C = ve(I.missingWarn) ? I.missingWarn : e.missingWarn;
1639
+ ve(I.fallbackWarn) ? I.fallbackWarn : e.fallbackWarn;
1640
+ const F = !!I.part, w = Kt(e, I), A = m(
1641
+ e,
1642
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1643
+ l,
1644
+ w
1645
+ );
1646
+ if (!B(i) || i === "")
1647
+ return new Intl.NumberFormat(w, T).format(g);
1648
+ let D = {}, f, h = null;
1649
+ const S = "number format";
1650
+ for (let y = 0; y < A.length && (f = A[y], D = n[f] || {}, h = D[i], !ee(h)); y++)
1651
+ Qt(e, i, f, C, S);
1652
+ if (!ee(h) || !B(f))
1653
+ return r ? Ot : i;
1654
+ let c = `${f}__${i}`;
1655
+ Nt(T) || (c = `${c}__${JSON.stringify(T)}`);
1656
+ let b = u.get(c);
1657
+ return b || (b = new Intl.NumberFormat(f, ye({}, h, T)), u.set(c, b)), F ? b.formatToParts(g) : b.format(g);
1658
+ }
1659
+ const er = [
1660
+ "localeMatcher",
1661
+ "style",
1662
+ "currency",
1663
+ "currencyDisplay",
1664
+ "currencySign",
1665
+ "useGrouping",
1666
+ "minimumIntegerDigits",
1667
+ "minimumFractionDigits",
1668
+ "maximumFractionDigits",
1669
+ "minimumSignificantDigits",
1670
+ "maximumSignificantDigits",
1671
+ "compactDisplay",
1672
+ "notation",
1673
+ "signDisplay",
1674
+ "unit",
1675
+ "unitDisplay",
1676
+ "roundingMode",
1677
+ "roundingPriority",
1678
+ "roundingIncrement",
1679
+ "trailingZeroDisplay"
1680
+ ];
1681
+ function Ut(...e) {
1682
+ const [t, n, r, l] = e, a = oe();
1683
+ let m = oe();
1684
+ if (!ge(t))
1685
+ throw Ue(je.INVALID_ARGUMENT);
1686
+ const u = t;
1687
+ return B(n) ? a.key = n : ee(n) && Object.keys(n).forEach((i) => {
1688
+ er.includes(i) ? m[i] = n[i] : a[i] = n[i];
1689
+ }), B(r) ? a.locale = r : ee(r) && (m = r), ee(l) && (m = l), [a.key || "", u, a, m];
1690
+ }
1691
+ function Cn(e, t, n) {
1692
+ const r = e;
1693
+ for (const l in n) {
1694
+ const a = `${t}__${l}`;
1695
+ r.__numberFormatters.has(a) && r.__numberFormatters.delete(a);
1696
+ }
1697
+ }
1698
+ const oo = (e) => e, ao = (e) => "", lo = "text", io = (e) => e.length === 0 ? "" : $t(e), co = xr;
1699
+ function Nn(e, t) {
1700
+ return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
1701
+ }
1702
+ function uo(e) {
1703
+ const t = ge(e.pluralIndex) ? e.pluralIndex : -1;
1704
+ return e.named && (ge(e.named.count) || ge(e.named.n)) ? ge(e.named.count) ? e.named.count : ge(e.named.n) ? e.named.n : t : t;
1705
+ }
1706
+ function mo(e, t) {
1707
+ t.count || (t.count = e), t.n || (t.n = e);
1708
+ }
1709
+ function fo(e = {}) {
1710
+ const t = e.locale, n = uo(e), r = te(e.pluralRules) && B(t) && de(e.pluralRules[t]) ? e.pluralRules[t] : Nn, l = te(e.pluralRules) && B(t) && de(e.pluralRules[t]) ? Nn : void 0, a = (f) => f[r(n, f.length, l)], m = e.list || [], u = (f) => m[f], i = e.named || oe();
1711
+ ge(e.pluralIndex) && mo(n, i);
1712
+ const g = (f) => i[f];
1713
+ function I(f, h) {
1714
+ const S = de(e.messages) ? e.messages(f, !!h) : te(e.messages) ? e.messages[f] : !1;
1715
+ return S || (e.parent ? e.parent.message(f) : ao);
1716
+ }
1717
+ const T = (f) => e.modifiers ? e.modifiers[f] : oo, C = ee(e.processor) && de(e.processor.normalize) ? e.processor.normalize : io, F = ee(e.processor) && de(e.processor.interpolate) ? e.processor.interpolate : co, w = ee(e.processor) && B(e.processor.type) ? e.processor.type : lo, D = {
1718
+ list: u,
1719
+ named: g,
1720
+ plural: a,
1721
+ linked: (f, ...h) => {
1722
+ const [S, c] = h;
1723
+ let b = "text", y = "";
1724
+ h.length === 1 ? te(S) ? (y = S.modifier || y, b = S.type || b) : B(S) && (y = S || y) : h.length === 2 && (B(S) && (y = S || y), B(c) && (b = c || b));
1725
+ const p = I(f, !0)(D), R = (
1726
+ // The message in vnode resolved with linked are returned as an array by processor.nomalize
1727
+ b === "vnode" && be(p) && y ? p[0] : p
1728
+ );
1729
+ return y ? T(y)(R, b) : R;
1730
+ },
1731
+ message: I,
1732
+ type: w,
1733
+ interpolate: F,
1734
+ normalize: C,
1735
+ values: ye(oe(), m, i)
1736
+ };
1737
+ return D;
1738
+ }
1739
+ const Tn = () => "", Te = (e) => de(e);
1740
+ function On(e, ...t) {
1741
+ const { fallbackFormat: n, postTranslation: r, unresolving: l, messageCompiler: a, fallbackLocale: m, messages: u } = e, [i, g] = Vt(...t), I = ve(g.missingWarn) ? g.missingWarn : e.missingWarn, T = ve(g.fallbackWarn) ? g.fallbackWarn : e.fallbackWarn, C = ve(g.escapeParameter) ? g.escapeParameter : e.escapeParameter, F = !!g.resolvedMessage, w = B(g.default) || ve(g.default) ? ve(g.default) ? a ? i : () => i : g.default : n ? a ? i : () => i : null, A = n || w != null && (B(w) || de(w)), D = Kt(e, g);
1742
+ C && _o(g);
1743
+ let [f, h, S] = F ? [
1744
+ i,
1745
+ D,
1746
+ u[D] || oe()
1747
+ ] : tr(e, i, D, m, T, I), c = f, b = i;
1748
+ if (!F && !(B(c) || ot(c) || Te(c)) && A && (c = w, b = c), !F && (!(B(c) || ot(c) || Te(c)) || !B(h)))
1749
+ return l ? Ot : i;
1750
+ let y = !1;
1751
+ const p = () => {
1752
+ y = !0;
1753
+ }, R = Te(c) ? c : nr(e, i, h, c, b, p);
1754
+ if (y)
1755
+ return c;
1756
+ const L = ho(e, h, S, g), X = fo(L), x = po(e, R, X), d = r ? r(x, i) : x;
1757
+ if (__INTLIFY_PROD_DEVTOOLS__) {
1758
+ const N = {
1759
+ timestamp: Date.now(),
1760
+ key: B(i) ? i : Te(c) ? c.key : "",
1761
+ locale: h || (Te(c) ? c.locale : ""),
1762
+ format: B(c) ? c : Te(c) ? c.source : "",
1763
+ message: d
1764
+ };
1765
+ N.meta = ye({}, e.__meta, /* @__PURE__ */ eo() || {}), Ds(N);
1766
+ }
1767
+ return d;
1768
+ }
1769
+ function _o(e) {
1770
+ be(e.list) ? e.list = e.list.map((t) => B(t) ? ln(t) : t) : te(e.named) && Object.keys(e.named).forEach((t) => {
1771
+ B(e.named[t]) && (e.named[t] = ln(e.named[t]));
1772
+ });
1773
+ }
1774
+ function tr(e, t, n, r, l, a) {
1775
+ const { messages: m, onWarn: u, messageResolver: i, localeFallbacker: g } = e, I = g(e, r, n);
1776
+ let T = oe(), C, F = null;
1777
+ const w = "translate";
1778
+ for (let A = 0; A < I.length && (C = I[A], T = m[C] || oe(), (F = i(T, t)) === null && (F = T[t]), !(B(F) || ot(F) || Te(F))); A++)
1779
+ if (!so(C, I)) {
1780
+ const D = Qt(
1781
+ e,
1782
+ // eslint-disable-line @typescript-eslint/no-explicit-any
1783
+ t,
1784
+ C,
1785
+ a,
1786
+ w
1787
+ );
1788
+ D !== t && (F = D);
1789
+ }
1790
+ return [F, C, T];
1791
+ }
1792
+ function nr(e, t, n, r, l, a) {
1793
+ const { messageCompiler: m, warnHtmlMessage: u } = e;
1794
+ if (Te(r)) {
1795
+ const g = r;
1796
+ return g.locale = g.locale || n, g.key = g.key || t, g;
1797
+ }
1798
+ if (m == null) {
1799
+ const g = () => r;
1800
+ return g.locale = n, g.key = t, g;
1801
+ }
1802
+ const i = m(r, vo(e, n, l, r, u, a));
1803
+ return i.locale = n, i.key = t, i.source = r, i;
1804
+ }
1805
+ function po(e, t, n) {
1806
+ return t(n);
1807
+ }
1808
+ function Vt(...e) {
1809
+ const [t, n, r] = e, l = oe();
1810
+ if (!B(t) && !ge(t) && !Te(t) && !ot(t))
1811
+ throw Ue(je.INVALID_ARGUMENT);
1812
+ const a = ge(t) ? String(t) : (Te(t), t);
1813
+ return ge(n) ? l.plural = n : B(n) ? l.default = n : ee(n) && !Nt(n) ? l.named = n : be(n) && (l.list = n), ge(r) ? l.plural = r : B(r) ? l.default = r : ee(r) && ye(l, r), [a, l];
1814
+ }
1815
+ function vo(e, t, n, r, l, a) {
1816
+ return {
1817
+ locale: t,
1818
+ key: n,
1819
+ warnHtmlMessage: l,
1820
+ onError: (m) => {
1821
+ throw a && a(m), m;
1822
+ },
1823
+ onCacheKey: (m) => Dr(t, n, m)
1824
+ };
1825
+ }
1826
+ function ho(e, t, n, r) {
1827
+ const { modifiers: l, pluralRules: a, messageResolver: m, fallbackLocale: u, fallbackWarn: i, missingWarn: g, fallbackContext: I } = e, C = {
1828
+ locale: t,
1829
+ modifiers: l,
1830
+ pluralRules: a,
1831
+ messages: (F, w) => {
1832
+ let A = m(n, F);
1833
+ if (A == null && (I || w)) {
1834
+ const [, , D] = tr(
1835
+ I || e,
1836
+ // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
1837
+ F,
1838
+ t,
1839
+ u,
1840
+ i,
1841
+ g
1842
+ );
1843
+ A = m(D, F);
1844
+ }
1845
+ if (B(A) || ot(A)) {
1846
+ let D = !1;
1847
+ const h = nr(e, F, t, A, F, () => {
1848
+ D = !0;
1849
+ });
1850
+ return D ? Tn : h;
1851
+ } else return Te(A) ? A : Tn;
1852
+ }
1853
+ };
1854
+ return e.processor && (C.processor = e.processor), r.list && (C.list = r.list), r.named && (C.named = r.named), ge(r.plural) && (C.pluralIndex = r.plural), C;
1855
+ }
1856
+ fs();
1857
+ var bo = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_13374505-0ea2-4612-9430-46780b611f87", DOTNET_NOLOGO: "1", USER: "runner", npm_config_always_auth: "", npm_config_user_agent: "pnpm/10.8.0 npm/? node/v24.5.0 linux x64", CI: "true", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_13374505-0ea2-4612-9430-46780b611f87", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", HOME: "/home/runner", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_config_save_workspace_protocol: "true", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", NODE_OPTIONS: "--max-old-space-size=10240", GRADLE_HOME: "/usr/share/gradle-9.7.0", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "1751", ACTIONS_ORCHESTRATION_ID: "0bfbd9c5-e17f-4231-9695-0e0571460fc2.publish.publish.__default", npm_config_engine_strict: "true", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_config_prefer_workspace_packages: "true", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260810.271.1", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GITHUB_ARTIFACTS: "/home/runner/work/_temp/_runner_file_commands/artifacts_13374505-0ea2-4612-9430-46780b611f87", SWIFT_PATH: "/usr/share/swift/usr/bin", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:13364", GITHUB_WORKFLOW: "Publish hrm-portal", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.12/x64", GITHUB_RUN_ID: "32007988591", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "ac597f10bffb4ac39133e862ae2c01ee59014142", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.5/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", GITHUB_WORKFLOW_REF: "feedmepos/hrm-service/.github/workflows/publish-hrm-portal-trusted.yml@refs/heads/main", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6M31dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOjZmOTZmYTg5LWI3YmYtNDg3OC1iYWQzLTg5ODAwNjU2NmI2ZSIsImJpbGxpbmdfb3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJleHAiOjE3ODY5NzU1NjcsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc4Njk1MzM2NywiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6IjM0MGQ2MzM5LWQyMzAtNTIyMy1iZWU2LTM2MzJiOTQ5NWVmZCIsImpvYl93b3JrZmxvd19yZWYiOiJmZWVkbWVwb3MvYWN0aW9ucy8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoLW5wbS1naXRodWIueWFtbEByZWZzL2hlYWRzL21haW4iLCJqb2Jfd29ya2Zsb3dfc2hhIjoiODkzYjFlOWU1YjA1NjE2Y2YwYjQ2MzZjMGU3YzM3ODc3YTAzYWZkMCIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc4Njk1MzA2Nywib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJqdW4tbGVlLWZlZWRtZVwiLFwiYWN0b3JfaWRcIjpcIjIzOTI4Mjg2MlwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI5NTMyMTM2Mzk0MFwiLFwiZXZlbnRfbmFtZVwiOlwid29ya2Zsb3dfZGlzcGF0Y2hcIixcImhlYWRfcmVmXCI6XCJcIixcImpvYl93b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9hY3Rpb25zLy5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2gtbnBtLWdpdGh1Yi55YW1sQHJlZnMvaGVhZHMvbWFpblwiLFwiam9iX3dvcmtmbG93X3NoYVwiOlwiODkzYjFlOWU1YjA1NjE2Y2YwYjQ2MzZjMGU3YzM3ODc3YTAzYWZkMFwiLFwicmVmXCI6XCJyZWZzL2hlYWRzL21haW5cIixcInJlZl9wcm90ZWN0ZWRcIjpcInRydWVcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImZlZWRtZXBvcy9ocm0tc2VydmljZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiMTEyNDY3MjIzNVwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiZmVlZG1lcG9zXCIsXCJyZXBvc2l0b3J5X293bmVyX2lkXCI6XCI1NDgzMTUxNVwiLFwicmVwb3NpdG9yeV92aXNpYmlsaXR5XCI6XCJwcml2YXRlXCIsXCJydW5fYXR0ZW1wdFwiOlwiMVwiLFwicnVuX2lkXCI6XCIzMjAwNzk4ODU5MVwiLFwicnVuX251bWJlclwiOlwiMTU5XCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIixcInNoYVwiOlwiYWM1OTdmMTBiZmZiNGFjMzkxMzNlODYyYWUyYzAxZWU1OTAxNDE0MlwiLFwid29ya2Zsb3dcIjpcIlB1Ymxpc2ggaHJtLXBvcnRhbFwiLFwid29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvaHJtLXNlcnZpY2UvLmdpdGh1Yi93b3JrZmxvd3MvcHVibGlzaC1ocm0tcG9ydGFsLXRydXN0ZWQueW1sQHJlZnMvaGVhZHMvbWFpblwiLFwid29ya2Zsb3dfc2hhXCI6XCJhYzU5N2YxMGJmZmI0YWMzOTEzM2U4NjJhZTJjMDFlZTU5MDE0MTQyXCJ9Iiwib2lkY19zdWIiOiJyZXBvOmZlZWRtZXBvcy9ocm0tc2VydmljZTpyZWY6cmVmcy9oZWFkcy9tYWluIiwib3JjaF9pZCI6IjBiZmJkOWM1LWUxN2YtNDIzMS05Njk1LTBlMDU3MTQ2MGZjMi5wdWJsaXNoLnB1Ymxpc2guX19kZWZhdWx0Iiwib3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJwbGFuX2lkIjoiMGJmYmQ5YzUtZTE3Zi00MjMxLTk2OTUtMGUwNTcxNDYwZmMyIiwicmVwb3NpdG9yeV9pZCI6IjExMjQ2NzIyMzUiLCJyZXBvc2l0b3J5X293bmVyX2lkIjoiNTQ4MzE1MTUiLCJyZXBvc2l0b3J5X3Zpc2liaWxpdHkiOiJwcml2YXRlIiwicnVuX2lkIjoiMzIwMDc5ODg1OTEiLCJydW5fbnVtYmVyIjoiMTU5IiwicnVuX3R5cGUiOiJmdWxsIiwicnVubmVyX2lkIjoiMTAwMDExMjA1MiIsInJ1bm5lcl90eXBlIjoiaG9zdGVkIiwic2NwIjoiQWN0aW9ucy5SZXN1bHRzOjBiZmJkOWM1LWUxN2YtNDIzMS05Njk1LTBlMDU3MTQ2MGZjMjozNDBkNjMzOS1kMjMwLTUyMjMtYmVlNi0zNjMyYjk0OTVlZmQgQWN0aW9ucy5SdW5uZXI6MGJmYmQ5YzUtZTE3Zi00MjMxLTk2OTUtMGUwNTcxNDYwZmMyOjM0MGQ2MzM5LWQyMzAtNTIyMy1iZWU2LTM2MzJiOTQ5NWVmZCBBY3Rpb25zLlVwbG9hZEFydGlmYWN0czowYmZiZDljNS1lMTdmLTQyMzEtOTY5NS0wZTA1NzE0NjBmYzI6MzQwZDYzMzktZDIzMC01MjIzLWJlZTYtMzYzMmI5NDk1ZWZkIGdlbmVyYXRlX2lkX3Rva2VuOjBiZmJkOWM1LWUxN2YtNDIzMS05Njk1LTBlMDU3MTQ2MGZjMjozNDBkNjMzOS1kMjMwLTUyMjMtYmVlNi0zNjMyYjk0OTVlZmQgQWN0aW9ucy5HZW5lcmljUmVhZDowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJzaGEiOiJhYzU5N2YxMGJmZmI0YWMzOTEzM2U4NjJhZTJjMDFlZTU5MDE0MTQyIiwidHJ1c3RfdGllciI6IjEifQ.TqYg91oAg7xuF3nEt0gFdKG_RUXfUeJOlrF5_305gsX74pTCjzYSS3-Oeam7efKuzu6oXPDp60P8PHSqSAH1Egc8SnzWj0505-ahoYTZD5p7OUPDX7-XXdMROwBOIgrjzfrvYDTXBFCBN0vctt9Eg2Gvq46qjosdgjjp64sYwfONemI3Qw1nQTmF7KGuTPTV1j8nOVx7Pb_lDleXTRkhy1AWwaiMmj9hMsVVmq_Zjo7YYbkxgyEeCvZvQ7uRlQOfrlcVtWATKY1S5yCBR6IZ1aUvCmugIx_pWnVHz0UdTSPvzq3JCz8o1U0urCrai642if8r2P4PrERuO-0hoM394Q", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/work/hrm-service/hrm-service/apps/hrm-portal/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/hrm-service/hrm-service/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.5.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_5d98021a-84e6-4de4-92b7-7197afc08ff4", INVOCATION_ID: "e38d9d955e804adf88c6694c92427eee", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/24.5.0/x64/bin/node", npm_package_name: "@feedmepos/mf-hrm-portal", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "159", GITHUB_TRIGGERING_ACTOR: "jun-lee-feedme", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000112052", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "feedmepos/hrm-service", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "1124672235", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/bin/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules/vite/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/vite@5.4.21_@types+node@18.19.130_sass-embedded@1.97.1_sass@1.97.1_terser@5.44.1/node_modules:/home/runner/work/hrm-service/hrm-service/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "2.2.1", npm_config_verify_deps_before_run: "false", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "true", GITHUB_WORKSPACE: "/home/runner/work/hrm-service/hrm-service", ACCEPT_EULA: "Y", GITHUB_JOB: "publish", GITHUB_SHA: "ac597f10bffb4ac39133e862ae2c01ee59014142", GITHUB_RUN_ATTEMPT: "1", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "jun-lee-feedme", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_13374505-0ea2-4612-9430-46780b611f87", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", GITHUB_ACTOR_ID: "239282862", RUNNER_WORKSPACE: "/home/runner/work/hrm-service", npm_config_link_workspace_packages: "true", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.8.0/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", ACTIONS_ID_TOKEN_REQUEST_URL: "https://run-actions-3-azure-eastus.actions.githubusercontent.com/89//idtoken/0bfbd9c5-e17f-4231-9695-0e0571460fc2/340d6339-d230-5223-bee6-3632b9495efd?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_13374505-0ea2-4612-9430-46780b611f87", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ARTIFACTS_LIST: "/home/runner/work/_temp/_runner_file_commands/artifacts_list_13374505-0ea2-4612-9430-46780b611f87", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_13374505-0ea2-4612-9430-46780b611f87", INIT_CWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", NODE_ENV: "production" } };
1858
+ const go = "10.0.5";
1859
+ function yo() {
1860
+ typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Xe().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Xe().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Xe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Xe().__INTLIFY_PROD_DEVTOOLS__ = !1);
1861
+ }
1862
+ const at = {
1863
+ // composer module errors
1864
+ UNEXPECTED_RETURN_TYPE: Ps,
1865
+ // 24
1866
+ // legacy module errors
1867
+ INVALID_ARGUMENT: 25,
1868
+ // i18n module errors
1869
+ MUST_BE_CALL_SETUP_TOP: 26,
1870
+ NOT_INSTALLED: 27,
1871
+ NOT_INSTALLED_WITH_PROVIDE: 31,
1872
+ // unexpected error
1873
+ UNEXPECTED_ERROR: 32
1874
+ };
1875
+ function ut(e, ...t) {
1876
+ return Tt(e, null, void 0);
1877
+ }
1878
+ const xt = /* @__PURE__ */ $e("__translateVNode"), Wt = /* @__PURE__ */ $e("__datetimeParts"), Gt = /* @__PURE__ */ $e("__numberParts"), Io = $e("__setPluralRules"), rr = /* @__PURE__ */ $e("__injectWithOption"), Bt = /* @__PURE__ */ $e("__dispose");
1879
+ function mt(e) {
1880
+ if (!te(e))
1881
+ return e;
1882
+ for (const t in e)
1883
+ if (Le(e, t))
1884
+ if (!t.includes("."))
1885
+ te(e[t]) && mt(e[t]);
1886
+ else {
1887
+ const n = t.split("."), r = n.length - 1;
1888
+ let l = e, a = !1;
1889
+ for (let m = 0; m < r; m++) {
1890
+ if (n[m] in l || (l[n[m]] = oe()), !te(l[n[m]])) {
1891
+ a = !0;
1892
+ break;
1893
+ }
1894
+ l = l[n[m]];
1895
+ }
1896
+ a || (l[n[r]] = e[t], delete e[t]), te(l[n[r]]) && mt(l[n[r]]);
1897
+ }
1898
+ return e;
1899
+ }
1900
+ function sr(e, t) {
1901
+ const { messages: n, __i18n: r, messageResolver: l, flatJson: a } = t, m = ee(n) ? n : be(r) ? oe() : { [e]: oe() };
1902
+ if (be(r) && r.forEach((u) => {
1903
+ if ("locale" in u && "resource" in u) {
1904
+ const { locale: i, resource: g } = u;
1905
+ i ? (m[i] = m[i] || oe(), It(g, m[i])) : It(g, m);
1906
+ } else
1907
+ B(u) && It(JSON.parse(u), m);
1908
+ }), l == null && a)
1909
+ for (const u in m)
1910
+ Le(m, u) && mt(m[u]);
1911
+ return m;
1912
+ }
1913
+ function or(e) {
1914
+ return e.type;
1915
+ }
1916
+ function Eo(e, t, n) {
1917
+ let r = te(t.messages) ? t.messages : oe();
1918
+ "__i18nGlobal" in n && (r = sr(e.locale.value, {
1919
+ messages: r,
1920
+ __i18n: n.__i18nGlobal
1921
+ }));
1922
+ const l = Object.keys(r);
1923
+ l.length && l.forEach((a) => {
1924
+ e.mergeLocaleMessage(a, r[a]);
1925
+ });
1926
+ {
1927
+ if (te(t.datetimeFormats)) {
1928
+ const a = Object.keys(t.datetimeFormats);
1929
+ a.length && a.forEach((m) => {
1930
+ e.mergeDateTimeFormat(m, t.datetimeFormats[m]);
1931
+ });
1932
+ }
1933
+ if (te(t.numberFormats)) {
1934
+ const a = Object.keys(t.numberFormats);
1935
+ a.length && a.forEach((m) => {
1936
+ e.mergeNumberFormat(m, t.numberFormats[m]);
1937
+ });
1938
+ }
1939
+ }
1940
+ }
1941
+ function Sn(e) {
1942
+ return ue(fr, null, e, 0);
1943
+ }
1944
+ const Ln = "__INTLIFY_META__", An = () => [], Co = () => !1;
1945
+ let kn = 0;
1946
+ function Rn(e) {
1947
+ return (t, n, r, l) => e(n, r, Zt() || void 0, l);
1948
+ }
1949
+ const No = /* @__NO_SIDE_EFFECTS__ */ () => {
1950
+ const e = Zt();
1951
+ let t = null;
1952
+ return e && (t = or(e)[Ln]) ? { [Ln]: t } : null;
1953
+ };
1954
+ function To(e = {}) {
1955
+ const { __root: t, __injectWithOption: n } = e, r = t === void 0, l = e.flatJson, a = on ? rt : mr;
1956
+ let m = ve(e.inheritLocale) ? e.inheritLocale : !0;
1957
+ const u = a(
1958
+ // prettier-ignore
1959
+ t && m ? t.locale.value : B(e.locale) ? e.locale : Ct
1960
+ ), i = a(
1961
+ // prettier-ignore
1962
+ t && m ? t.fallbackLocale.value : B(e.fallbackLocale) || be(e.fallbackLocale) || ee(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : u.value
1963
+ ), g = a(sr(u.value, e)), I = a(ee(e.datetimeFormats) ? e.datetimeFormats : { [u.value]: {} }), T = a(ee(e.numberFormats) ? e.numberFormats : { [u.value]: {} });
1964
+ let C = t ? t.missingWarn : ve(e.missingWarn) || Et(e.missingWarn) ? e.missingWarn : !0, F = t ? t.fallbackWarn : ve(e.fallbackWarn) || Et(e.fallbackWarn) ? e.fallbackWarn : !0, w = t ? t.fallbackRoot : ve(e.fallbackRoot) ? e.fallbackRoot : !0, A = !!e.fallbackFormat, D = de(e.missing) ? e.missing : null, f = de(e.missing) ? Rn(e.missing) : null, h = de(e.postTranslation) ? e.postTranslation : null, S = t ? t.warnHtmlMessage : ve(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, c = !!e.escapeParameter;
1965
+ const b = t ? t.modifiers : ee(e.modifiers) ? e.modifiers : {};
1966
+ let y = e.pluralRules || t && t.pluralRules, p;
1967
+ p = (() => {
1968
+ r && bn(null);
1969
+ const v = {
1970
+ version: go,
1971
+ locale: u.value,
1972
+ fallbackLocale: i.value,
1973
+ messages: g.value,
1974
+ modifiers: b,
1975
+ pluralRules: y,
1976
+ missing: f === null ? void 0 : f,
1977
+ missingWarn: C,
1978
+ fallbackWarn: F,
1979
+ fallbackFormat: A,
1980
+ unresolving: !0,
1981
+ postTranslation: h === null ? void 0 : h,
1982
+ warnHtmlMessage: S,
1983
+ escapeParameter: c,
1984
+ messageResolver: e.messageResolver,
1985
+ messageCompiler: e.messageCompiler,
1986
+ __meta: { framework: "vue" }
1987
+ };
1988
+ v.datetimeFormats = I.value, v.numberFormats = T.value, v.__datetimeFormatters = ee(p) ? p.__datetimeFormatters : void 0, v.__numberFormatters = ee(p) ? p.__numberFormatters : void 0;
1989
+ const E = no(v);
1990
+ return r && bn(E), E;
1991
+ })(), lt(p, u.value, i.value);
1992
+ function L() {
1993
+ return [
1994
+ u.value,
1995
+ i.value,
1996
+ g.value,
1997
+ I.value,
1998
+ T.value
1999
+ ];
2000
+ }
2001
+ const X = K({
2002
+ get: () => u.value,
2003
+ set: (v) => {
2004
+ u.value = v, p.locale = u.value;
2005
+ }
2006
+ }), x = K({
2007
+ get: () => i.value,
2008
+ set: (v) => {
2009
+ i.value = v, p.fallbackLocale = i.value, lt(p, u.value, v);
2010
+ }
2011
+ }), d = K(() => g.value), N = /* @__PURE__ */ K(() => I.value), U = /* @__PURE__ */ K(() => T.value);
2012
+ function V() {
2013
+ return de(h) ? h : null;
2014
+ }
2015
+ function j(v) {
2016
+ h = v, p.postTranslation = v;
2017
+ }
2018
+ function G() {
2019
+ return D;
2020
+ }
2021
+ function W(v) {
2022
+ v !== null && (f = Rn(v)), D = v, p.missing = f;
2023
+ }
2024
+ const Y = (v, E, $, le, Ze, dt) => {
2025
+ L();
2026
+ let Ke;
2027
+ try {
2028
+ bo.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = t ? to() : void 0), Ke = v(p);
2029
+ } finally {
2030
+ __INTLIFY_PROD_DEVTOOLS__, r || (p.fallbackContext = void 0);
2031
+ }
2032
+ if ($ !== "translate exists" && // for not `te` (e.g `t`)
2033
+ ge(Ke) && Ke === Ot || $ === "translate exists" && !Ke) {
2034
+ const [cr, Ea] = E();
2035
+ return t && w ? le(t) : Ze(cr);
2036
+ } else {
2037
+ if (dt(Ke))
2038
+ return Ke;
2039
+ throw ut(at.UNEXPECTED_RETURN_TYPE);
2040
+ }
2041
+ };
2042
+ function Z(...v) {
2043
+ return Y((E) => Reflect.apply(On, null, [E, ...v]), () => Vt(...v), "translate", (E) => Reflect.apply(E.t, E, [...v]), (E) => E, (E) => B(E));
2044
+ }
2045
+ function ne(...v) {
2046
+ const [E, $, le] = v;
2047
+ if (le && !te(le))
2048
+ throw ut(at.INVALID_ARGUMENT);
2049
+ return Z(E, $, ye({ resolvedMessage: !0 }, le || {}));
2050
+ }
2051
+ function Q(...v) {
2052
+ return Y((E) => Reflect.apply(yn, null, [E, ...v]), () => jt(...v), "datetime format", (E) => Reflect.apply(E.d, E, [...v]), () => vn, (E) => B(E));
2053
+ }
2054
+ function _e(...v) {
2055
+ return Y((E) => Reflect.apply(En, null, [E, ...v]), () => Ut(...v), "number format", (E) => Reflect.apply(E.n, E, [...v]), () => vn, (E) => B(E));
2056
+ }
2057
+ function ce(v) {
2058
+ return v.map((E) => B(E) || ge(E) || ve(E) ? Sn(String(E)) : E);
2059
+ }
2060
+ const fe = {
2061
+ normalize: ce,
2062
+ interpolate: (v) => v,
2063
+ type: "vnode"
2064
+ };
2065
+ function q(...v) {
2066
+ return Y((E) => {
2067
+ let $;
2068
+ const le = E;
2069
+ try {
2070
+ le.processor = fe, $ = Reflect.apply(On, null, [le, ...v]);
2071
+ } finally {
2072
+ le.processor = null;
2073
+ }
2074
+ return $;
2075
+ }, () => Vt(...v), "translate", (E) => E[xt](...v), (E) => [Sn(E)], (E) => be(E));
2076
+ }
2077
+ function De(...v) {
2078
+ return Y((E) => Reflect.apply(En, null, [E, ...v]), () => Ut(...v), "number format", (E) => E[Gt](...v), An, (E) => B(E) || be(E));
2079
+ }
2080
+ function z(...v) {
2081
+ return Y((E) => Reflect.apply(yn, null, [E, ...v]), () => jt(...v), "datetime format", (E) => E[Wt](...v), An, (E) => B(E) || be(E));
2082
+ }
2083
+ function pe(v) {
2084
+ y = v, p.pluralRules = y;
2085
+ }
2086
+ function Je(v, E) {
2087
+ return Y(() => {
2088
+ if (!v)
2089
+ return !1;
2090
+ const $ = B(E) ? E : u.value, le = Fe($), Ze = p.messageResolver(le, v);
2091
+ return ot(Ze) || Te(Ze) || B(Ze);
2092
+ }, () => [v], "translate exists", ($) => Reflect.apply($.te, $, [v, E]), Co, ($) => ve($));
2093
+ }
2094
+ function ze(v) {
2095
+ let E = null;
2096
+ const $ = Hn(p, i.value, u.value);
2097
+ for (let le = 0; le < $.length; le++) {
2098
+ const Ze = g.value[$[le]] || {}, dt = p.messageResolver(Ze, v);
2099
+ if (dt != null) {
2100
+ E = dt;
2101
+ break;
2102
+ }
2103
+ }
2104
+ return E;
2105
+ }
2106
+ function Ve(v) {
2107
+ const E = ze(v);
2108
+ return E ?? (t ? t.tm(v) || {} : {});
2109
+ }
2110
+ function Fe(v) {
2111
+ return g.value[v] || {};
2112
+ }
2113
+ function Ne(v, E) {
2114
+ if (l) {
2115
+ const $ = { [v]: E };
2116
+ for (const le in $)
2117
+ Le($, le) && mt($[le]);
2118
+ E = $[v];
2119
+ }
2120
+ g.value[v] = E, p.messages = g.value;
2121
+ }
2122
+ function Ye(v, E) {
2123
+ g.value[v] = g.value[v] || {};
2124
+ const $ = { [v]: E };
2125
+ if (l)
2126
+ for (const le in $)
2127
+ Le($, le) && mt($[le]);
2128
+ E = $[v], It(E, g.value[v]), p.messages = g.value;
2129
+ }
2130
+ function O(v) {
2131
+ return I.value[v] || {};
2132
+ }
2133
+ function s(v, E) {
2134
+ I.value[v] = E, p.datetimeFormats = I.value, In(p, v, E);
2135
+ }
2136
+ function o(v, E) {
2137
+ I.value[v] = ye(I.value[v] || {}, E), p.datetimeFormats = I.value, In(p, v, E);
2138
+ }
2139
+ function _(v) {
2140
+ return T.value[v] || {};
2141
+ }
2142
+ function k(v, E) {
2143
+ T.value[v] = E, p.numberFormats = T.value, Cn(p, v, E);
2144
+ }
2145
+ function M(v, E) {
2146
+ T.value[v] = ye(T.value[v] || {}, E), p.numberFormats = T.value, Cn(p, v, E);
2147
+ }
2148
+ kn++, t && on && (wt(t.locale, (v) => {
2149
+ m && (u.value = v, p.locale = v, lt(p, u.value, i.value));
2150
+ }), wt(t.fallbackLocale, (v) => {
2151
+ m && (i.value = v, p.fallbackLocale = v, lt(p, u.value, i.value));
2152
+ }));
2153
+ const P = {
2154
+ id: kn,
2155
+ locale: X,
2156
+ fallbackLocale: x,
2157
+ get inheritLocale() {
2158
+ return m;
2159
+ },
2160
+ set inheritLocale(v) {
2161
+ m = v, v && t && (u.value = t.locale.value, i.value = t.fallbackLocale.value, lt(p, u.value, i.value));
2162
+ },
2163
+ get availableLocales() {
2164
+ return Object.keys(g.value).sort();
2165
+ },
2166
+ messages: d,
2167
+ get modifiers() {
2168
+ return b;
2169
+ },
2170
+ get pluralRules() {
2171
+ return y || {};
2172
+ },
2173
+ get isGlobal() {
2174
+ return r;
2175
+ },
2176
+ get missingWarn() {
2177
+ return C;
2178
+ },
2179
+ set missingWarn(v) {
2180
+ C = v, p.missingWarn = C;
2181
+ },
2182
+ get fallbackWarn() {
2183
+ return F;
2184
+ },
2185
+ set fallbackWarn(v) {
2186
+ F = v, p.fallbackWarn = F;
2187
+ },
2188
+ get fallbackRoot() {
2189
+ return w;
2190
+ },
2191
+ set fallbackRoot(v) {
2192
+ w = v;
2193
+ },
2194
+ get fallbackFormat() {
2195
+ return A;
2196
+ },
2197
+ set fallbackFormat(v) {
2198
+ A = v, p.fallbackFormat = A;
2199
+ },
2200
+ get warnHtmlMessage() {
2201
+ return S;
2202
+ },
2203
+ set warnHtmlMessage(v) {
2204
+ S = v, p.warnHtmlMessage = v;
2205
+ },
2206
+ get escapeParameter() {
2207
+ return c;
2208
+ },
2209
+ set escapeParameter(v) {
2210
+ c = v, p.escapeParameter = v;
2211
+ },
2212
+ t: Z,
2213
+ getLocaleMessage: Fe,
2214
+ setLocaleMessage: Ne,
2215
+ mergeLocaleMessage: Ye,
2216
+ getPostTranslationHandler: V,
2217
+ setPostTranslationHandler: j,
2218
+ getMissingHandler: G,
2219
+ setMissingHandler: W,
2220
+ [Io]: pe
2221
+ };
2222
+ return P.datetimeFormats = N, P.numberFormats = U, P.rt = ne, P.te = Je, P.tm = Ve, P.d = Q, P.n = _e, P.getDateTimeFormat = O, P.setDateTimeFormat = s, P.mergeDateTimeFormat = o, P.getNumberFormat = _, P.setNumberFormat = k, P.mergeNumberFormat = M, P[rr] = n, P[xt] = q, P[Wt] = z, P[Gt] = De, P;
2223
+ }
2224
+ const qt = {
2225
+ tag: {
2226
+ type: [String, Object]
2227
+ },
2228
+ locale: {
2229
+ type: String
2230
+ },
2231
+ scope: {
2232
+ type: String,
2233
+ // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
2234
+ validator: (e) => e === "parent" || e === "global",
2235
+ default: "parent"
2236
+ /* ComponentI18nScope */
2237
+ },
2238
+ i18n: {
2239
+ type: Object
2240
+ }
2241
+ };
2242
+ function Oo({ slots: e }, t) {
2243
+ return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, l) => [
2244
+ ...r,
2245
+ // prettier-ignore
2246
+ ...l.type === Re ? l.children : [l]
2247
+ ], []) : t.reduce((n, r) => {
2248
+ const l = e[r];
2249
+ return l && (n[r] = l()), n;
2250
+ }, oe());
2251
+ }
2252
+ function ar() {
2253
+ return Re;
2254
+ }
2255
+ ye({
2256
+ keypath: {
2257
+ type: String,
2258
+ required: !0
2259
+ },
2260
+ plural: {
2261
+ type: [Number, String],
2262
+ validator: (e) => ge(e) || !isNaN(e)
2263
+ }
2264
+ }, qt);
2265
+ function So(e) {
2266
+ return be(e) && !B(e[0]);
2267
+ }
2268
+ function lr(e, t, n, r) {
2269
+ const { slots: l, attrs: a } = t;
2270
+ return () => {
2271
+ const m = { part: !0 };
2272
+ let u = oe();
2273
+ e.locale && (m.locale = e.locale), B(e.format) ? m.key = e.format : te(e.format) && (B(e.format.key) && (m.key = e.format.key), u = Object.keys(e.format).reduce((C, F) => n.includes(F) ? ye(oe(), C, { [F]: e.format[F] }) : C, oe()));
2274
+ const i = r(e.value, m, u);
2275
+ let g = [m.key];
2276
+ be(i) ? g = i.map((C, F) => {
2277
+ const w = l[C.type], A = w ? w({ [C.type]: C.value, index: F, parts: i }) : [C.value];
2278
+ return So(A) && (A[0].key = `${C.type}-${F}`), A;
2279
+ }) : B(i) && (g = [i]);
2280
+ const I = ye(oe(), a), T = B(e.tag) || te(e.tag) ? e.tag : ar();
2281
+ return Wn(T, I, g);
2282
+ };
2283
+ }
2284
+ ye({
2285
+ value: {
2286
+ type: Number,
2287
+ required: !0
2288
+ },
2289
+ format: {
2290
+ type: [String, Object]
2291
+ }
2292
+ }, qt);
2293
+ ye({
2294
+ value: {
2295
+ type: [Number, Date],
2296
+ required: !0
2297
+ },
2298
+ format: {
2299
+ type: [String, Object]
2300
+ }
2301
+ }, qt);
2302
+ const Lo = /* @__PURE__ */ $e("global-vue-i18n");
2303
+ function St(e = {}) {
2304
+ const t = Zt();
2305
+ if (t == null)
2306
+ throw ut(at.MUST_BE_CALL_SETUP_TOP);
2307
+ if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
2308
+ throw ut(at.NOT_INSTALLED);
2309
+ const n = Ao(t), r = Ro(n), l = or(t), a = ko(e, l);
2310
+ if (a === "global")
2311
+ return Eo(r, e, l), r;
2312
+ if (a === "parent") {
2313
+ let i = Mo(n, t, e.__useComponent);
2314
+ return i == null && (i = r), i;
2315
+ }
2316
+ const m = n;
2317
+ let u = m.__getInstance(t);
2318
+ if (u == null) {
2319
+ const i = ye({}, e);
2320
+ "__i18n" in l && (i.__i18n = l.__i18n), r && (i.__root = r), u = To(i), m.__composerExtend && (u[Bt] = m.__composerExtend(u)), Do(m, t, u), m.__setInstance(t, u);
2321
+ }
2322
+ return u;
2323
+ }
2324
+ function Ao(e) {
2325
+ const t = ur(e.isCE ? Lo : e.appContext.app.__VUE_I18N_SYMBOL__);
2326
+ if (!t)
2327
+ throw ut(e.isCE ? at.NOT_INSTALLED_WITH_PROVIDE : at.UNEXPECTED_ERROR);
2328
+ return t;
2329
+ }
2330
+ function ko(e, t) {
2331
+ return Nt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
2332
+ }
2333
+ function Ro(e) {
2334
+ return e.mode === "composition" ? e.global : e.global.__composer;
2335
+ }
2336
+ function Mo(e, t, n = !1) {
2337
+ let r = null;
2338
+ const l = t.root;
2339
+ let a = wo(t, n);
2340
+ for (; a != null; ) {
2341
+ const m = e;
2342
+ if (e.mode === "composition")
2343
+ r = m.__getInstance(a);
2344
+ else if (__VUE_I18N_LEGACY_API__) {
2345
+ const u = m.__getInstance(a);
2346
+ u != null && (r = u.__composer, n && r && !r[rr] && (r = null));
2347
+ }
2348
+ if (r != null || l === a)
2349
+ break;
2350
+ a = a.parent;
2351
+ }
2352
+ return r;
2353
+ }
2354
+ function wo(e, t = !1) {
2355
+ return e == null ? null : t && e.vnode.ctx || e.parent;
2356
+ }
2357
+ function Do(e, t, n) {
2358
+ xn(() => {
2359
+ }, t), dr(() => {
2360
+ const r = n;
2361
+ e.__deleteInstance(t);
2362
+ const l = r[Bt];
2363
+ l && (l(), delete r[Bt]);
2364
+ }, t);
2365
+ }
2366
+ yo();
2367
+ zs(Rs);
2368
+ Ks(Hs);
2369
+ Qs(Hn);
2370
+ if (__INTLIFY_PROD_DEVTOOLS__) {
2371
+ const e = Xe();
2372
+ e.__INTLIFY__ = !0, Ms(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
2373
+ }
2374
+ const vt = /* @__PURE__ */ Ae({
2375
+ __name: "InheritPermissionTooltip",
2376
+ props: {
2377
+ item: {
2378
+ type: Object,
2379
+ required: !0
2380
+ }
2381
+ },
2382
+ setup(e) {
2383
+ const { t } = St();
2384
+ return (n, r) => {
2385
+ const l = we("FmIcon"), a = we("FmTooltip");
2386
+ return J(), Ce(a, {
2387
+ variant: "plain",
2388
+ placement: "right",
2389
+ "z-index": 50
2390
+ }, {
2391
+ content: me(() => [
2392
+ ae("div", null, Oe(H(t)("team.memberForm.permissions.inherited")), 1),
2393
+ (J(!0), ie(Re, null, Ee(e.item.setNames, (m) => (J(), ie("div", { key: m }, [
2394
+ ae("div", null, "- " + Oe(m), 1)
2395
+ ]))), 128))
2396
+ ]),
2397
+ default: me(() => [
2398
+ ue(l, {
2399
+ name: "admin_panel_settings",
2400
+ size: "sm",
2401
+ class: "ml-1 text-fm-color-typo-info"
2402
+ })
2403
+ ]),
2404
+ _: 1
2405
+ });
2406
+ };
2407
+ }
2408
+ });
2409
+ function Mn(e, t, n) {
2410
+ const r = n.filter((u) => u !== "manage");
2411
+ if (r.length === 0) return;
2412
+ const l = e.findIndex((u) => u.subject === t && !u.inverted);
2413
+ if (l < 0) return;
2414
+ const a = new Set(e[l].actions), m = r.every((u) => a.has(u));
2415
+ m && !a.has("manage") ? (a.add("manage"), e[l] = {
2416
+ ...e[l],
2417
+ actions: Array.from(a)
2418
+ }) : !m && a.has("manage") && (a.delete("manage"), a.size === 0 ? e.splice(l, 1) : e[l] = {
2419
+ ...e[l],
2420
+ actions: Array.from(a)
2421
+ });
2422
+ }
2423
+ const wn = Object.values(Sr), Fo = {
2424
+ read: "View",
2425
+ create: "Duplicate",
2426
+ update: "Edit"
2427
+ };
2428
+ function Po(e, t, n, r) {
2429
+ const { t: l } = He(), { getFlagValue: a, getFlag: m } = Or(), u = K(() => {
2430
+ var j;
2431
+ const d = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
2432
+ for (const G of t.value) {
2433
+ const W = G.category;
2434
+ if (!W) continue;
2435
+ const Y = G.subject;
2436
+ if (n.value.includes(G.subject) || G.showByFeatureFlag && ((j = m(G.showByFeatureFlag)) == null ? void 0 : j.enabled) === !1 && a(G.showByFeatureFlag) === "true")
2437
+ continue;
2438
+ d.has(W) || d.set(W, []);
2439
+ const Z = U.get(Y) ?? 0;
2440
+ U.set(Y, Z + 1), d.get(W).push({
2441
+ label: l(`permissionSet.permissionLabels.${Y}`, G.label),
2442
+ value: Y,
2443
+ optionKey: `${Y}::${Z}`
2444
+ }), N.has(Y) || N.set(Y, G);
2445
+ }
2446
+ return [...d.keys()].sort((G, W) => {
2447
+ const Y = wn.indexOf(G), Z = wn.indexOf(W);
2448
+ return Y === -1 && Z === -1 ? G.localeCompare(W) : Y === -1 ? 1 : Z === -1 ? -1 : Y - Z;
2449
+ }).map((G) => {
2450
+ const W = d.get(G), Y = l(`permissionSet.categoryLabels.${G}`, G), Z = /* @__PURE__ */ new Map();
2451
+ for (const z of W) {
2452
+ const pe = N.get(z.value);
2453
+ pe && Z.set(z.value, pe.actions);
2454
+ }
2455
+ const ne = W.some((z) => {
2456
+ const pe = Z.get(z.value);
2457
+ return pe && pe.length > 1;
2458
+ }), Q = ne ? [
2459
+ ...new Set(
2460
+ W.flatMap((z) => Z.get(z.value) ?? []).filter((z) => z !== "manage")
2461
+ )
2462
+ ] : [], _e = /* @__PURE__ */ new Map();
2463
+ for (const z of e.value)
2464
+ W.some((pe) => pe.value === z.subject) && !z.inverted && _e.set(z.subject, new Set(z.actions));
2465
+ const ce = ne ? e.value.filter(
2466
+ (z) => W.some((pe) => pe.value === z.subject) && !z.inverted && z.actions.includes("manage")
2467
+ ).map((z) => z.subject) : e.value.filter((z) => W.some((pe) => pe.value === z.subject) && !z.inverted).map((z) => z.subject), se = W.find((z) => {
2468
+ var pe;
2469
+ return (pe = N.get(z.value)) == null ? void 0 : pe.isCategoryCover;
2470
+ }), fe = (se == null ? void 0 : se.value) ?? null, q = fe ? _e.get(fe) ?? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set(), De = q.has("manage");
2471
+ return {
2472
+ category: G,
2473
+ label: Y,
2474
+ options: W,
2475
+ selectedSubjects: ce,
2476
+ isMultiAction: ne,
2477
+ actionColumns: Q,
2478
+ permissionActionsMap: Z,
2479
+ selectedActionsMap: _e,
2480
+ coverSubject: fe,
2481
+ coverSelectedActions: q,
2482
+ coverCoversAll: De
2483
+ };
2484
+ });
2485
+ });
2486
+ function i(d, N) {
2487
+ const U = u.value.find((Q) => Q.category === d), V = (U == null ? void 0 : U.options) ?? [], j = new Set(V.map((Q) => Q.value)), G = new Set(N), W = /* @__PURE__ */ new Map();
2488
+ for (const Q of e.value)
2489
+ j.has(Q.subject) && !Q.inverted && W.set(Q.subject, Q.conditions);
2490
+ const Y = U != null && U.coverSubject ? W.get(U.coverSubject) : void 0, Z = /* @__PURE__ */ new Set(), ne = t.value.flatMap(
2491
+ ({ category: Q, showByFeatureFlag: _e, isCategoryCover: ce, ...se }) => {
2492
+ const fe = se.subject;
2493
+ if (!G.has(fe) || Z.has(fe)) return [];
2494
+ Z.add(fe);
2495
+ let q;
2496
+ return W.has(fe) ? q = W.get(fe) : U != null && U.coverSubject && fe !== U.coverSubject && (q = Y), [
2497
+ { ...se, ...q !== void 0 && { conditions: q } }
2498
+ ];
2499
+ }
2500
+ );
2501
+ r("update:model-value", [
2502
+ ...e.value.filter((Q) => !j.has(Q.subject)),
2503
+ ...ne
2504
+ ]);
2505
+ }
2506
+ function g(d, N) {
2507
+ return F(d, N) || c(d, N);
2508
+ }
2509
+ function I(d) {
2510
+ return d.options.length > 0 && d.options.every((N) => g(d, N.value));
2511
+ }
2512
+ function T(d) {
2513
+ return d.options.length === 0 || I(d) ? !1 : d.options.some(
2514
+ (N) => g(d, N.value) || w(d, N.value).length > 0
2515
+ );
2516
+ }
2517
+ function C(d) {
2518
+ const N = new Set(d.options.map((V) => V.value)), U = e.value.filter((V) => !N.has(V.subject));
2519
+ if (I(d))
2520
+ r("update:model-value", U);
2521
+ else {
2522
+ const V = /* @__PURE__ */ new Map();
2523
+ for (const Y of e.value)
2524
+ N.has(Y.subject) && !Y.inverted && V.set(Y.subject, Y.conditions);
2525
+ const j = d.coverSubject ? V.get(d.coverSubject) : void 0, G = /* @__PURE__ */ new Set(), W = t.value.flatMap(
2526
+ ({ category: Y, showByFeatureFlag: Z, isCategoryCover: ne, ...Q }) => {
2527
+ const _e = Q.subject;
2528
+ if (!N.has(_e) || G.has(_e)) return [];
2529
+ G.add(_e);
2530
+ let ce;
2531
+ return V.has(_e) ? ce = V.get(_e) : d.coverSubject && _e !== d.coverSubject && (ce = j), [
2532
+ { ...Q, ...ce !== void 0 && { conditions: ce } }
2533
+ ];
2534
+ }
2535
+ );
2536
+ r("update:model-value", [...U, ...W]);
2537
+ }
2538
+ }
2539
+ function F(d, N) {
2540
+ const U = d.selectedActionsMap.get(N);
2541
+ return U ? U.has("manage") : !1;
2542
+ }
2543
+ function w(d, N) {
2544
+ const U = d.permissionActionsMap.get(N);
2545
+ return U ? U.filter((j) => j !== "manage").filter(
2546
+ (j) => S(d, N, j) || b(d, N, j)
2547
+ ) : [];
2548
+ }
2549
+ function A(d, N) {
2550
+ return c(d, N) ? !1 : !F(d, N) && w(d, N).length > 0;
2551
+ }
2552
+ function D(d, N) {
2553
+ if (!d.coverSubject || N === d.coverSubject) return;
2554
+ const U = e.value.find(
2555
+ (V) => !V.inverted && V.subject === d.coverSubject
2556
+ );
2557
+ return (U == null ? void 0 : U.conditions) || void 0;
2558
+ }
2559
+ function f(d, N, U) {
2560
+ if (U) {
2561
+ const V = t.value.find((Q) => Q.subject === N);
2562
+ if (!V) return;
2563
+ const {
2564
+ category: j,
2565
+ showByFeatureFlag: G,
2566
+ isCategoryCover: W,
2567
+ ...Y
2568
+ } = V, Z = D(d, N), ne = e.value.filter((Q) => Q.subject !== N);
2569
+ ne.push({
2570
+ ...Y,
2571
+ ...Z !== void 0 && { conditions: Z }
2572
+ }), r("update:model-value", ne);
2573
+ } else
2574
+ r(
2575
+ "update:model-value",
2576
+ e.value.filter((V) => V.subject !== N)
2577
+ );
2578
+ }
2579
+ function h(d, N) {
2580
+ const U = d.permissionActionsMap.get(N);
2581
+ return U ? U.some((V) => V !== "manage") : !1;
2582
+ }
2583
+ function S(d, N, U) {
2584
+ const V = d.selectedActionsMap.get(N);
2585
+ return V ? V.has(U) : !1;
2586
+ }
2587
+ function c(d, N) {
2588
+ return !d.coverSubject || N === d.coverSubject ? !1 : d.coverCoversAll;
2589
+ }
2590
+ function b(d, N, U) {
2591
+ return !d.coverSubject || N === d.coverSubject ? !1 : d.coverCoversAll ? !0 : d.coverSelectedActions.has(U);
2592
+ }
2593
+ function y(d, N, U) {
2594
+ const V = d.permissionActionsMap.get(N);
2595
+ return V ? V.includes(U) : !1;
2596
+ }
2597
+ function p(d, N, U) {
2598
+ const V = [...e.value], j = V.findIndex((W) => W.subject === d && !W.inverted);
2599
+ if (U)
2600
+ if (j >= 0) {
2601
+ const W = { ...V[j] }, Y = new Set(W.actions);
2602
+ Y.add(N), W.actions = Array.from(Y), V[j] = W;
2603
+ } else {
2604
+ const W = t.value.find((se) => se.subject === d);
2605
+ if (!W) return;
2606
+ const {
2607
+ category: Y,
2608
+ showByFeatureFlag: Z,
2609
+ isCategoryCover: ne,
2610
+ ...Q
2611
+ } = W, _e = u.value.find(
2612
+ (se) => se.options.some((fe) => fe.value === d)
2613
+ ), ce = _e ? D(_e, d) : void 0;
2614
+ V.push({
2615
+ ...Q,
2616
+ actions: [N],
2617
+ ...ce !== void 0 && { conditions: ce }
2618
+ });
2619
+ }
2620
+ else if (j >= 0) {
2621
+ const W = { ...V[j] }, Y = W.actions.filter((Z) => Z !== N);
2622
+ Y.length === 0 ? V.splice(j, 1) : (W.actions = Y, V[j] = W);
2623
+ }
2624
+ const G = t.value.find((W) => W.subject === d);
2625
+ G && Mn(V, d, G.actions), r("update:model-value", V);
2626
+ }
2627
+ function R(d, N) {
2628
+ const U = d.options.filter(
2629
+ (V) => y(d, V.value, N)
2630
+ );
2631
+ return U.length === 0 ? !1 : U.every(
2632
+ (V) => S(d, V.value, N) || b(d, V.value, N)
2633
+ );
2634
+ }
2635
+ function L(d, N) {
2636
+ const U = d.options.filter(
2637
+ (j) => y(d, j.value, N)
2638
+ );
2639
+ if (U.length === 0) return !1;
2640
+ const V = U.filter(
2641
+ (j) => S(d, j.value, N) || b(d, j.value, N)
2642
+ ).length;
2643
+ return V > 0 && V < U.length;
2644
+ }
2645
+ function X(d, N, U) {
2646
+ const V = [...e.value];
2647
+ for (const j of d.options) {
2648
+ if (!y(d, j.value, N)) continue;
2649
+ const G = j.value, W = V.findIndex(
2650
+ (Z) => Z.subject === G && !Z.inverted
2651
+ );
2652
+ if (U)
2653
+ if (W >= 0) {
2654
+ const Z = { ...V[W] }, ne = new Set(Z.actions);
2655
+ ne.add(N), Z.actions = Array.from(ne), V[W] = Z;
2656
+ } else {
2657
+ const Z = t.value.find((fe) => fe.subject === G);
2658
+ if (!Z) continue;
2659
+ const {
2660
+ category: ne,
2661
+ showByFeatureFlag: Q,
2662
+ isCategoryCover: _e,
2663
+ ...ce
2664
+ } = Z, se = D(d, G);
2665
+ V.push({
2666
+ ...ce,
2667
+ actions: [N],
2668
+ ...se !== void 0 && { conditions: se }
2669
+ });
2670
+ }
2671
+ else if (W >= 0) {
2672
+ const Z = { ...V[W] }, ne = Z.actions.filter((Q) => Q !== N);
2673
+ ne.length === 0 ? V.splice(W, 1) : (Z.actions = ne, V[W] = Z);
2674
+ }
2675
+ const Y = t.value.find((Z) => Z.subject === G);
2676
+ Y && Mn(V, G, Y.actions);
2677
+ }
2678
+ r("update:model-value", V);
2679
+ }
2680
+ function x(d) {
2681
+ const N = `permissionSet.actionLabels.${d}`, U = Fo[d] ?? d.charAt(0).toUpperCase() + d.slice(1);
2682
+ return l(N, U);
2683
+ }
2684
+ return {
2685
+ categoryGroups: u,
2686
+ toggleCategory: i,
2687
+ isAllManageChecked: I,
2688
+ isAllManageIndeterminate: T,
2689
+ toggleAllManage: C,
2690
+ isManageChecked: F,
2691
+ isManageIndeterminate: A,
2692
+ toggleManage: f,
2693
+ hasNonManageActions: h,
2694
+ isActionChecked: S,
2695
+ isRowFullyCoveredByCover: c,
2696
+ isActionCoveredByCover: b,
2697
+ permissionDefinesAction: y,
2698
+ toggleAction: p,
2699
+ isAllActionChecked: R,
2700
+ isAllActionIndeterminate: L,
2701
+ toggleAllAction: X,
2702
+ actionLabel: x
2703
+ };
2704
+ }
2705
+ const jo = { class: "flex flex-col gap-16" }, Uo = { class: "fm-typo-en-title-sm-600" }, Vo = { class: "mt-16" }, xo = { class: "text-center text-sm font-semibold text-fm-color-typo-primary" }, Wo = ["onClick"], Go = { class: "flex justify-center" }, Bo = { class: "flex items-center min-w-0 gap-8" }, Yo = ["title", "onClick"], Zo = { class: "flex justify-center" }, Xo = /* @__PURE__ */ Ae({
2706
+ __name: "BasePermission",
2707
+ props: {
2708
+ modelValue: {
2709
+ type: Array,
2710
+ required: !0
2711
+ },
2712
+ disable: {
2713
+ type: Boolean,
2714
+ default: !1
2715
+ },
2716
+ excludedSubjects: {
2717
+ type: Array,
2718
+ required: !0
2719
+ },
2720
+ additionalPermissions: {
2721
+ type: Array,
2722
+ default: () => []
2723
+ }
2724
+ },
2725
+ emits: ["update:model-value"],
2726
+ setup(e, { emit: t }) {
2727
+ const n = e, r = t, { t: l } = He(), a = K(() => [...Gn, ...n.additionalPermissions]), {
2728
+ categoryGroups: m,
2729
+ isAllManageChecked: u,
2730
+ isAllManageIndeterminate: i,
2731
+ toggleAllManage: g,
2732
+ isManageChecked: I,
2733
+ isManageIndeterminate: T,
2734
+ toggleManage: C,
2735
+ isActionChecked: F,
2736
+ isRowFullyCoveredByCover: w,
2737
+ isActionCoveredByCover: A,
2738
+ permissionDefinesAction: D,
2739
+ toggleAction: f,
2740
+ isAllActionChecked: h,
2741
+ isAllActionIndeterminate: S,
2742
+ toggleAllAction: c,
2743
+ actionLabel: b
2744
+ } = Po(
2745
+ en(n, "modelValue"),
2746
+ a,
2747
+ en(n, "excludedSubjects"),
2748
+ (R, L) => r("update:model-value", L)
2749
+ );
2750
+ function y(R) {
2751
+ const L = R.selectedSubjects.length;
2752
+ return L === 0 ? "" : l("team.memberForm.permissions.allowedCount", { count: L });
2753
+ }
2754
+ function p(R, L) {
2755
+ return I(R, L) || w(R, L) ? !0 : R.actionColumns.some(
2756
+ (X) => D(R, L, X) && (F(R, L, X) || A(R, L, X))
2757
+ );
2758
+ }
2759
+ return (R, L) => {
2760
+ const X = we("FmCheckbox");
2761
+ return J(), ie("div", jo, [
2762
+ (J(!0), ie(Re, null, Ee(H(m), (x) => (J(), Ce(Xt, {
2763
+ key: x.category,
2764
+ subtitle: y(x)
2765
+ }, {
2766
+ title: me(() => [
2767
+ ae("p", Uo, Oe(x.label), 1)
2768
+ ]),
2769
+ default: me(() => [
2770
+ ae("div", Vo, [
2771
+ ae("div", {
2772
+ class: "grid items-center px-12 py-8",
2773
+ style: nt({
2774
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${x.actionColumns.length + 1}, 80px)`
2775
+ })
2776
+ }, [
2777
+ L[0] || (L[0] = ae("div", null, null, -1)),
2778
+ ae("div", xo, Oe(H(l)("team.memberForm.permissions.columnManage")), 1),
2779
+ (J(!0), ie(Re, null, Ee(x.actionColumns, (d) => (J(), ie("div", {
2780
+ key: `header-${d}`,
2781
+ class: "text-center text-sm font-semibold text-fm-color-typo-primary"
2782
+ }, Oe(H(b)(d)), 1))), 128))
2783
+ ], 4),
2784
+ ae("div", {
2785
+ class: "grid items-center bg-fm-color-neutral-gray-100 px-12 py-8",
2786
+ style: nt({
2787
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${x.actionColumns.length + 1}, 80px)`
2788
+ })
2789
+ }, [
2790
+ ae("div", {
2791
+ class: "cursor-pointer font-semibold",
2792
+ onClick: (d) => !e.disable && H(g)(x)
2793
+ }, Oe(H(l)("team.labels.all")), 9, Wo),
2794
+ ae("div", Go, [
2795
+ ue(X, {
2796
+ "model-value": H(u)(x),
2797
+ indeterminate: H(i)(x),
2798
+ value: !0,
2799
+ disabled: e.disable,
2800
+ size: "sm",
2801
+ dense: "",
2802
+ "onUpdate:modelValue": (d) => H(g)(x)
2803
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onUpdate:modelValue"])
2804
+ ]),
2805
+ (J(!0), ie(Re, null, Ee(x.actionColumns, (d) => (J(), ie("div", {
2806
+ key: `all-${d}`,
2807
+ class: "flex justify-center"
2808
+ }, [
2809
+ ue(X, {
2810
+ "model-value": H(h)(x, d),
2811
+ indeterminate: H(S)(x, d),
2812
+ value: d,
2813
+ disabled: e.disable,
2814
+ size: "sm",
2815
+ dense: "",
2816
+ "onUpdate:modelValue": (N) => H(c)(x, d, N)
2817
+ }, null, 8, ["model-value", "indeterminate", "value", "disabled", "onUpdate:modelValue"])
2818
+ ]))), 128))
2819
+ ], 4),
2820
+ L[1] || (L[1] = ae("div", { class: "h-px bg-fm-color-neutral-gray-200" }, null, -1)),
2821
+ (J(!0), ie(Re, null, Ee(x.options, (d) => (J(), ie("div", {
2822
+ key: d.optionKey,
2823
+ class: "grid items-center rounded px-12 py-8 transition-colors hover:bg-fm-color-neutral-gray-100",
2824
+ style: nt({
2825
+ gridTemplateColumns: `minmax(0, 1fr) repeat(${x.actionColumns.length + 1}, 80px)`
2826
+ })
2827
+ }, [
2828
+ ae("div", Bo, [
2829
+ ae("span", {
2830
+ class: "block truncate cursor-pointer",
2831
+ title: d.label,
2832
+ onClick: (N) => !e.disable && !H(w)(x, d.value) && H(C)(x, d.value, !H(I)(x, d.value))
2833
+ }, Oe(d.label), 9, Yo),
2834
+ Se(R.$slots, `checkbox-${d.value}-append`, {
2835
+ option: d,
2836
+ isEffectiveSelected: p(x, d.value),
2837
+ isCoveredByCover: H(w)(x, d.value) || x.actionColumns.some((N) => H(A)(x, d.value, N))
2838
+ }),
2839
+ Se(R.$slots, `checkbox-${d.value}-icon`, {
2840
+ option: d,
2841
+ isEffectiveSelected: p(x, d.value),
2842
+ isCoveredByCover: H(w)(x, d.value) || x.actionColumns.some((N) => H(A)(x, d.value, N))
2843
+ })
2844
+ ]),
2845
+ ae("div", Zo, [
2846
+ ue(X, {
2847
+ "model-value": H(I)(x, d.value) || H(w)(x, d.value),
2848
+ value: d.value,
2849
+ disabled: e.disable || H(w)(x, d.value),
2850
+ indeterminate: H(T)(x, d.value),
2851
+ size: "sm",
2852
+ "onUpdate:modelValue": (N) => H(C)(x, d.value, N)
2853
+ }, null, 8, ["model-value", "value", "disabled", "indeterminate", "onUpdate:modelValue"])
2854
+ ]),
2855
+ (J(!0), ie(Re, null, Ee(x.actionColumns, (N) => (J(), ie("div", {
2856
+ key: `${d.optionKey}-${N}`,
2857
+ class: "flex justify-center"
2858
+ }, [
2859
+ H(D)(x, d.value, N) ? (J(), Ce(X, {
2860
+ key: 0,
2861
+ "model-value": H(F)(x, d.value, N) || H(A)(x, d.value, N),
2862
+ value: N,
2863
+ disabled: e.disable || H(A)(x, d.value, N),
2864
+ size: "sm",
2865
+ "onUpdate:modelValue": (U) => H(f)(d.value, N, U)
2866
+ }, null, 8, ["model-value", "value", "disabled", "onUpdate:modelValue"])) : Me("", !0)
2867
+ ]))), 128))
2868
+ ], 4))), 128))
2869
+ ])
2870
+ ]),
2871
+ _: 2
2872
+ }, 1032, ["subtitle"]))), 128))
2873
+ ]);
2874
+ };
2875
+ }
2876
+ }), Ho = { class: "space-y-16" }, $o = {
2877
+ key: 0,
2878
+ class: "flex fm-typo-en-title-sm-600"
2879
+ }, Jo = {
2880
+ key: 0,
2881
+ class: "q-mr-xs text-red col"
2882
+ }, zo = { class: "form-input" }, Ko = /* @__PURE__ */ Ae({
2883
+ __name: "AppForm",
2884
+ props: {
2885
+ title: {
2886
+ type: String,
2887
+ default: void 0
2888
+ },
2889
+ required: {
2890
+ type: [Boolean, String],
2891
+ default: !1
2892
+ },
2893
+ inline: {
2894
+ type: Boolean,
2895
+ default: !1
2896
+ }
2897
+ },
2898
+ setup(e) {
2899
+ const t = e;
2900
+ return (n, r) => (J(), ie("div", Ho, [
2901
+ Se(n.$slots, "top", {}, () => [
2902
+ t.title ? (J(), ie("div", $o, [
2903
+ ae("div", null, [
2904
+ t.required ? (J(), ie("span", Jo, "*")) : Me("", !0),
2905
+ _r(Oe(t.title), 1)
2906
+ ]),
2907
+ Se(n.$slots, "title-right")
2908
+ ])) : Me("", !0)
2909
+ ]),
2910
+ ae("div", zo, [
2911
+ Se(n.$slots, "default")
2912
+ ])
2913
+ ]));
2914
+ }
2915
+ });
2916
+ function Qo(e, t) {
2917
+ let n = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2918
+ const l = r.length;
2919
+ for (let a = 0; a < e; a++)
2920
+ n += r.charAt(Math.floor(Math.random() * l));
2921
+ return n;
2922
+ }
2923
+ const qo = { class: "col flex items-center" }, ea = {
2924
+ key: 1,
2925
+ class: "q-pa-sm form-error-message text-error"
2926
+ }, ir = /* @__PURE__ */ Ae({
2927
+ __name: "CheckboxInput",
2928
+ props: {
2929
+ options: {
2930
+ type: Array,
2931
+ required: !0
2932
+ },
2933
+ title: {
2934
+ type: String,
2935
+ required: !0
2936
+ },
2937
+ modelValue: {
2938
+ type: Array,
2939
+ required: !0
2940
+ },
2941
+ showAllToggle: {
2942
+ type: [Boolean, String],
2943
+ default: !0
2944
+ },
2945
+ includeDisabledOptionsWhenSelectAll: {
2946
+ type: Boolean,
2947
+ default: !1
2948
+ },
2949
+ disable: {
2950
+ type: Boolean,
2951
+ default: !1
2952
+ },
2953
+ min: {
2954
+ type: Number,
2955
+ default: 0
2956
+ },
2957
+ max: {
2958
+ type: Number,
2959
+ default: void 0
2960
+ },
2961
+ showIntermediate: {
2962
+ type: Boolean,
2963
+ default: !0
2964
+ },
2965
+ gutter: {
2966
+ type: Number,
2967
+ default: void 0
2968
+ },
2969
+ falsyShowSlot: {
2970
+ type: Boolean,
2971
+ default: !1
2972
+ },
2973
+ bottomSlotIndent: {
2974
+ type: String,
2975
+ default: "36px"
2976
+ },
2977
+ alignCenter: {
2978
+ type: Boolean,
2979
+ default: !0
2980
+ }
2981
+ },
2982
+ emits: ["update:model-value"],
2983
+ setup(e, { emit: t }) {
2984
+ const n = e, r = t, { t: l } = He(), a = rt(!1), m = pr(), u = K(() => n.modelValue.length < n.min ? `Min selection ${n.min}` : n.max !== void 0 && n.modelValue.length > n.max ? `Max selection ${n.max}` : !0), i = `checkbox-${Qo(6)}`, g = K(() => u.value !== !0), I = K(
2985
+ () => n.modelValue.filter((A) => n.options.some((D) => D.value === A))
2986
+ ), T = K(
2987
+ () => typeof n.showAllToggle == "boolean" ? l("team.labels.all") : n.showAllToggle
2988
+ ), C = K(() => n.options.length > 0 && n.options.length === I.value.length);
2989
+ function F() {
2990
+ const A = n.modelValue.filter((D) => !I.value.includes(D));
2991
+ if (C.value === !0)
2992
+ r("update:model-value", A);
2993
+ else {
2994
+ const D = n.includeDisabledOptionsWhenSelectAll ? n.options.map((f) => f.value) : n.options.filter((f) => !f.disabled).map((f) => f.value);
2995
+ r("update:model-value", [...A, ...D]);
2996
+ }
2997
+ }
2998
+ function w(A, D) {
2999
+ let f = yt(n.modelValue);
3000
+ D ? f.every((h) => h !== A) && f.push(A) : f = f.filter((h) => h !== A), r("update:model-value", f);
3001
+ }
3002
+ return (A, D) => {
3003
+ const f = we("FmCheckbox");
3004
+ return J(), Ce(Ko, {
3005
+ id: i,
3006
+ title: e.title,
3007
+ required: !1
3008
+ }, {
3009
+ top: me(() => [
3010
+ Se(A.$slots, "top")
3011
+ ]),
3012
+ default: me(() => [
3013
+ n.showAllToggle ? (J(), Ce(f, {
3014
+ key: 0,
3015
+ "model-value": C.value,
3016
+ disabled: e.disable,
3017
+ label: T.value,
3018
+ style: nt(`margin-bottom: ${n.gutter}px`),
3019
+ size: "sm",
3020
+ dense: "",
3021
+ value: T.value,
3022
+ "onUpdate:modelValue": F
3023
+ }, null, 8, ["model-value", "disabled", "label", "style", "value"])) : Me("", !0),
3024
+ (J(!0), ie(Re, null, Ee(e.options, (h, S) => (J(), ie("div", {
3025
+ key: h.value,
3026
+ style: nt(`margin-bottom: ${S < e.options.length - 1 ? n.gutter : 0}px`),
3027
+ class: qe(S < e.options.length - 1 ? "q-mb-sm" : "")
3028
+ }, [
3029
+ ae("div", {
3030
+ class: qe(["row justify-between", e.alignCenter ? "items-center" : "items-start"])
3031
+ }, [
3032
+ ae("div", qo, [
3033
+ ue(f, {
3034
+ "model-value": e.modelValue.includes(h.value),
3035
+ disabled: e.disable || h.disabled,
3036
+ size: "sm",
3037
+ label: h.label,
3038
+ value: h.label,
3039
+ "onUpdate:modelValue": (c) => w(h.value, c)
3040
+ }, null, 8, ["model-value", "disabled", "label", "value", "onUpdate:modelValue"]),
3041
+ Se(A.$slots, `checkbox-${h.key || h.value}-append`, {
3042
+ option: h,
3043
+ selected: e.modelValue.includes(h.value)
3044
+ })
3045
+ ]),
3046
+ H(m)[`checkbox-${h.key || h.value}-end`] && (e.modelValue.includes(h.value) || e.falsyShowSlot) ? (J(), ie("div", {
3047
+ key: 0,
3048
+ class: qe([{ "q-checkbox disabled": e.disable || h.disabled }, "col"])
3049
+ }, [
3050
+ Se(A.$slots, `checkbox-${h.key || h.value}-end`, {
3051
+ option: h,
3052
+ value: e.modelValue.includes(h.value),
3053
+ disable: e.disable || h.disabled
3054
+ })
3055
+ ], 2)) : Me("", !0)
3056
+ ], 2),
3057
+ H(m)[`checkbox-${h.key || h.value}-bottom`] && (e.modelValue.includes(h.value) || e.falsyShowSlot) ? (J(), ie("div", {
3058
+ key: 0,
3059
+ class: qe(["q-mt-sm", { "q-checkbox disabled": e.disable || h.disabled }]),
3060
+ style: nt(`margin-left: ${e.bottomSlotIndent}`)
3061
+ }, [
3062
+ Se(A.$slots, `checkbox-${h.key || h.value}-bottom`, {
3063
+ option: h,
3064
+ disable: e.disable || h.disabled,
3065
+ value: e.modelValue.includes(h.value)
3066
+ })
3067
+ ], 6)) : Me("", !0)
3068
+ ], 6))), 128)),
3069
+ a.value && g.value ? (J(), ie("div", ea, Oe(u.value), 1)) : Me("", !0)
3070
+ ]),
3071
+ _: 3
3072
+ }, 8, ["title"]);
3073
+ };
3074
+ }
3075
+ }), ta = { class: "fm-typo-en-title-sm-600" }, ht = "includedFuture", Dn = /* @__PURE__ */ Ae({
3076
+ __name: "ConditionPermission",
3077
+ props: {
3078
+ modelValue: {
3079
+ type: Array,
3080
+ default: null
3081
+ },
3082
+ options: {
3083
+ type: Array,
3084
+ required: !0
3085
+ },
3086
+ disable: {
3087
+ type: Boolean,
3088
+ default: !1
3089
+ },
3090
+ context: {
3091
+ type: String,
3092
+ required: !0
3093
+ }
3094
+ },
3095
+ emits: ["update:model-value"],
3096
+ setup(e, { emit: t }) {
3097
+ const n = e, r = t, { t: l } = He(), a = K(() => [
3098
+ {
3099
+ label: l("team.memberForm.permissions.includedFuture", { context: n.context }),
3100
+ value: ht,
3101
+ // Can only be selected if all other options are selected
3102
+ disabled: !!n.modelValue && n.options.length > n.modelValue.length
3103
+ },
3104
+ ...n.options.filter(
3105
+ (I) => I.label.toLocaleLowerCase().includes(g.value.toLocaleLowerCase())
3106
+ )
3107
+ ]), m = K(() => n.modelValue ? n.modelValue : [ht, ...n.options.map((I) => I.value)]), u = K(() => {
3108
+ const I = m.value.filter((T) => T !== ht).length;
3109
+ return I === 0 ? "" : l("team.memberForm.permissions.allowedCount", { count: I });
3110
+ });
3111
+ function i(I) {
3112
+ const T = I.length === a.value.length;
3113
+ r("update:model-value", T ? null : I.filter((C) => C !== ht));
3114
+ }
3115
+ const g = rt("");
3116
+ return (I, T) => {
3117
+ const C = we("fm-search");
3118
+ return J(), Ce(Xt, { subtitle: u.value }, {
3119
+ title: me(() => [
3120
+ ae("p", ta, Oe(H(l)("team.memberForm.permissions.manageable", { context: e.context })), 1)
3121
+ ]),
3122
+ default: me(() => [
3123
+ e.options.length > 1 ? (J(), Ce(C, {
3124
+ key: 0,
3125
+ modelValue: g.value,
3126
+ "onUpdate:modelValue": T[0] || (T[0] = (F) => g.value = F),
3127
+ class: "mt-16",
3128
+ placeholder: H(l)("team.memberForm.permissions.search", { context: e.context })
3129
+ }, null, 8, ["modelValue", "placeholder"])) : Me("", !0),
3130
+ ue(ir, {
3131
+ "model-value": m.value,
3132
+ options: a.value,
3133
+ "show-intermediate": !1,
3134
+ "show-all-toggle": !0,
3135
+ disable: e.disable,
3136
+ "include-disabled-options-when-select-all": !0,
3137
+ title: "",
3138
+ class: "mt-16",
3139
+ "onUpdate:modelValue": i
3140
+ }, et({ _: 2 }, [
3141
+ Ee(a.value, (F) => ({
3142
+ name: `checkbox-${F.value}-append`,
3143
+ fn: me(({ option: w }) => [
3144
+ Se(I.$slots, `checkbox-${F.value}-append`, { option: w })
3145
+ ])
3146
+ }))
3147
+ ]), 1032, ["model-value", "options", "disable"])
3148
+ ]),
3149
+ _: 3
3150
+ }, 8, ["subtitle"]);
3151
+ };
3152
+ }
3153
+ }), na = { class: "fm-typo-en-title-sm-600" }, bt = "includedNewRole", ra = /* @__PURE__ */ Ae({
3154
+ __name: "PosRolePermission",
3155
+ props: {
3156
+ modelValue: {
3157
+ type: Array,
3158
+ default: null
3159
+ },
3160
+ roles: {
3161
+ type: Array,
3162
+ required: !0
3163
+ },
3164
+ restaurantIds: {
3165
+ type: Array,
3166
+ default: null
3167
+ },
3168
+ disable: {
3169
+ type: Boolean,
3170
+ default: !1
3171
+ }
3172
+ },
3173
+ emits: ["update:model-value"],
3174
+ setup(e, { emit: t }) {
3175
+ const n = e, r = t, { t: l } = He(), a = K(() => {
3176
+ const g = n.restaurantIds;
3177
+ return [
3178
+ {
3179
+ label: l("team.memberForm.permissions.includedNewRole"),
3180
+ value: bt,
3181
+ disabled: !!n.modelValue && n.roles.length > n.modelValue.length
3182
+ },
3183
+ ...n.roles.map((I) => ({
3184
+ label: I.name,
3185
+ value: I._id,
3186
+ disabled: !!g && I.restaurants.every(({ id: T }) => !g.includes(T))
3187
+ }))
3188
+ ];
3189
+ }), m = K(() => n.modelValue ? n.modelValue : [bt, ...n.roles.map((g) => g._id)]), u = K(() => {
3190
+ const g = m.value.filter((I) => I !== bt).length;
3191
+ return g === 0 ? "" : l("team.memberForm.permissions.allowedCount", { count: g });
3192
+ });
3193
+ function i(g) {
3194
+ const I = g.length === a.value.length;
3195
+ r("update:model-value", I ? null : g.filter((T) => T !== bt));
3196
+ }
3197
+ return (g, I) => (J(), Ce(Xt, { subtitle: u.value }, {
3198
+ title: me(() => [
3199
+ ae("p", na, Oe(H(l)("team.memberForm.permissions.roles")), 1)
3200
+ ]),
3201
+ default: me(() => [
3202
+ ue(ir, {
3203
+ "model-value": m.value,
3204
+ options: a.value,
3205
+ "show-intermediate": !1,
3206
+ "show-all-toggle": !1,
3207
+ disable: e.disable,
3208
+ title: "",
3209
+ class: "mt-16",
3210
+ "onUpdate:modelValue": i
3211
+ }, et({ _: 2 }, [
3212
+ Ee(a.value, (T) => ({
3213
+ name: `checkbox-${T.value}-append`,
3214
+ fn: me(({ option: C }) => [
3215
+ Se(g.$slots, `checkbox-${T.value}-append`, { option: C })
3216
+ ])
3217
+ }))
3218
+ ]), 1032, ["model-value", "options", "disable"])
3219
+ ]),
3220
+ _: 3
3221
+ }, 8, ["subtitle"]));
3222
+ }
3223
+ }), sa = {
3224
+ key: 0,
3225
+ class: "flex flex-col gap-8"
3226
+ }, oa = {
3227
+ key: 0,
3228
+ class: "ml-32",
3229
+ style: { "font-size": "12px", "line-height": "16px", color: "#8a8f98", "font-weight": "400" }
3230
+ }, aa = {
3231
+ key: 0,
3232
+ class: "ml-32"
3233
+ }, Fn = /* @__PURE__ */ Ae({
3234
+ __name: "PortalConditionForm",
3235
+ props: {
3236
+ entry: {},
3237
+ builders: {},
3238
+ subject: {},
3239
+ timeZone: {},
3240
+ coverOverride: {},
3241
+ inheritModeFor: {},
3242
+ formValueFor: {},
3243
+ hasChanges: { type: Boolean },
3244
+ disable: { type: Boolean, default: !1 },
3245
+ fullWidth: { type: Boolean, default: !1 },
3246
+ title: { default: "" }
3247
+ },
3248
+ emits: ["update-inherit-mode", "update-form", "apply"],
3249
+ setup(e, { emit: t }) {
3250
+ const n = t, { t: r } = He();
3251
+ return (l, a) => {
3252
+ const m = we("FmRadio"), u = we("FmRadioGroup");
3253
+ return J(), Ce(Nr, {
3254
+ title: e.title,
3255
+ builders: e.builders,
3256
+ "form-value-for": e.formValueFor,
3257
+ "has-changes": e.hasChanges,
3258
+ disable: e.disable,
3259
+ "full-width": e.fullWidth,
3260
+ onUpdateForm: a[0] || (a[0] = (i) => n("update-form", i)),
3261
+ onApply: a[1] || (a[1] = (i) => n("apply"))
3262
+ }, {
3263
+ section: me(({ builder: i }) => [
3264
+ e.coverOverride.shouldShowInheritToggle(e.entry, i) ? (J(), ie("div", sa, [
3265
+ ue(u, {
3266
+ "model-value": e.inheritModeFor(i),
3267
+ disabled: e.disable,
3268
+ "onUpdate:modelValue": (g) => n("update-inherit-mode", { builder: i, mode: g })
3269
+ }, {
3270
+ default: me(() => [
3271
+ ae("div", null, [
3272
+ ue(m, {
3273
+ value: "inherit",
3274
+ label: H(r)("team.memberForm.permissions.conditionCover.inherit", {
3275
+ cover: e.coverOverride.coverLabel(e.subject)
3276
+ })
3277
+ }, null, 8, ["label"]),
3278
+ e.coverOverride.inheritedSummary(e.entry, i, e.timeZone) ? (J(), ie("p", oa, " (" + Oe(H(r)(
3279
+ e.coverOverride.inheritedSummary(e.entry, i, e.timeZone).labelKey,
3280
+ e.coverOverride.inheritedSummary(e.entry, i, e.timeZone).params ?? {}
3281
+ )) + ") ", 1)) : Me("", !0)
3282
+ ]),
3283
+ ue(m, {
3284
+ value: "custom",
3285
+ label: H(r)("team.memberForm.permissions.conditionCover.custom")
3286
+ }, null, 8, ["label"])
3287
+ ]),
3288
+ _: 2
3289
+ }, 1032, ["model-value", "disabled", "onUpdate:modelValue"]),
3290
+ e.inheritModeFor(i) === "custom" ? (J(), ie("div", aa, [
3291
+ ue(nn, {
3292
+ builder: i,
3293
+ "model-value": e.formValueFor(i),
3294
+ disable: e.disable,
3295
+ "onUpdate:modelValue": (g) => n("update-form", { builder: i, form: g })
3296
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
3297
+ ])) : Me("", !0)
3298
+ ])) : (J(), Ce(nn, {
3299
+ key: 1,
3300
+ builder: i,
3301
+ "model-value": e.formValueFor(i),
3302
+ disable: e.disable,
3303
+ "onUpdate:modelValue": (g) => n("update-form", { builder: i, form: g })
3304
+ }, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"]))
3305
+ ]),
3306
+ _: 1
3307
+ }, 8, ["title", "builders", "form-value-for", "has-changes", "disable", "full-width"]);
3308
+ };
3309
+ }
3310
+ }), la = {
3311
+ async readWarehouses() {
3312
+ return Ar(await kr().get("/warehouses"));
3313
+ }
3314
+ };
3315
+ function Pn(e, t) {
3316
+ return Bn(e, Yn).some(
3317
+ (n) => n.subject === t && !n.inverted && n.actions.includes("manage")
3318
+ );
3319
+ }
3320
+ function jn(e, t) {
3321
+ return e.some((n) => n.subject === t && n.inverted) ? e : [...e, { subject: t, actions: ["manage"], inverted: !0 }];
3322
+ }
3323
+ function Un(e, t, n) {
3324
+ const { category: r, showByFeatureFlag: l, isCategoryCover: a, ...m } = e;
3325
+ return {
3326
+ ...m,
3327
+ actions: t,
3328
+ ...n !== void 0 && { conditions: n }
3329
+ };
3330
+ }
3331
+ function ia(e, t, n, r) {
3332
+ const l = new Set(
3333
+ e.filter((i) => !i.inverted).map((i) => i.subject)
3334
+ ), a = new Set(
3335
+ t.filter((i) => !i.inverted).map((i) => i.subject)
3336
+ ), m = new Set(
3337
+ n.filter((i) => !i.inverted).map((i) => i.subject)
3338
+ );
3339
+ let u = [...n];
3340
+ for (const i of l)
3341
+ a.has(i) || (m.has(i) && (u = u.filter((I) => I.subject !== i)), (!m.has(i) || Pn(u, i)) && (u = jn(u, i)));
3342
+ for (const i of a)
3343
+ if (!l.has(i)) {
3344
+ const g = u.some((I) => I.subject === i && I.inverted);
3345
+ if (u = u.filter((I) => !(I.subject === i && I.inverted)), !g && !m.has(i)) {
3346
+ const I = t.find(
3347
+ (C) => C.subject === i && !C.inverted
3348
+ ), T = r(i);
3349
+ T && I && u.push(Un(T, I.actions, I.conditions));
3350
+ }
3351
+ }
3352
+ for (const i of a) {
3353
+ if (!l.has(i)) continue;
3354
+ const g = e.find((w) => w.subject === i && !w.inverted), I = t.find((w) => w.subject === i && !w.inverted);
3355
+ if (!g || !I) continue;
3356
+ const T = new Set(g.actions), C = new Set(I.actions);
3357
+ if (T.size === C.size && [...T].every((w) => C.has(w)))
3358
+ continue;
3359
+ const F = u.findIndex((w) => w.subject === i && !w.inverted);
3360
+ if (F >= 0)
3361
+ u[F] = {
3362
+ ...u[F],
3363
+ actions: Array.from(C)
3364
+ };
3365
+ else {
3366
+ const w = r(i);
3367
+ w && u.push(Un(w, Array.from(C)));
3368
+ }
3369
+ T.has("manage") && !C.has("manage") && Pn(u, i) && (u = jn(u, i)), !T.has("manage") && C.has("manage") && (u = u.filter((w) => !(w.subject === i && w.inverted)));
3370
+ }
3371
+ return u;
3372
+ }
3373
+ const ca = {
3374
+ MY: "Asia/Kuala_Lumpur",
3375
+ SG: "Asia/Singapore",
3376
+ TH: "Asia/Bangkok",
3377
+ ID: "Asia/Jakarta",
3378
+ MO: "Asia/Macau",
3379
+ BN: "Asia/Brunei",
3380
+ PK: "Asia/Karachi",
3381
+ MV: "Indian/Maldives",
3382
+ VN: "Asia/Ho_Chi_Minh",
3383
+ JP: "Asia/Tokyo",
3384
+ AU: "Australia/Sydney",
3385
+ AE: "Asia/Dubai",
3386
+ UK: "Europe/London"
3387
+ };
3388
+ function ua(e) {
3389
+ const t = (e || "").toUpperCase();
3390
+ return ca[t] ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
3391
+ }
3392
+ function ma(e, t) {
3393
+ return e != null && e.timezone ? e.timezone : e != null && e.timeZone ? e.timeZone : ua((e == null ? void 0 : e.country) ?? t);
3394
+ }
3395
+ function gt(e, t) {
3396
+ return `${e}::${t.builderKey}`;
3397
+ }
3398
+ function We(e) {
3399
+ try {
3400
+ return e.conditions ? JSON.parse(e.conditions) : void 0;
3401
+ } catch {
3402
+ return;
3403
+ }
3404
+ }
3405
+ function da(e, t) {
3406
+ return e.find((n) => !n.inverted && n.subject === t);
3407
+ }
3408
+ function Mt(e, t) {
3409
+ const n = new Set(e.actions);
3410
+ return n.has(he.Action.manage) ? !0 : t.actions.every((r) => n.has(r));
3411
+ }
3412
+ function Yt(e, t) {
3413
+ const n = We(e);
3414
+ return Dt(n, [{ builder: t, formValue: t.fromCondition(void 0) }]);
3415
+ }
3416
+ function Vn(e, t, n) {
3417
+ return {
3418
+ ...Yt(e, n),
3419
+ ...tt(We(t), n)
3420
+ };
3421
+ }
3422
+ function fa(e, t, n) {
3423
+ const r = rt(/* @__PURE__ */ new Set());
3424
+ function l(c) {
3425
+ return wr(c, t.value);
3426
+ }
3427
+ function a(c) {
3428
+ return t.value.find((b) => b.subject === c);
3429
+ }
3430
+ function m(c) {
3431
+ var y;
3432
+ const b = l(c);
3433
+ return b ? (y = a(b)) == null ? void 0 : y.label : void 0;
3434
+ }
3435
+ function u(c) {
3436
+ return da(e.value, c);
3437
+ }
3438
+ function i(c, b) {
3439
+ return tt(We(c), b);
3440
+ }
3441
+ function g(c, b) {
3442
+ var R;
3443
+ if (!(((R = b.appliesToActions) == null ? void 0 : R.call(b, c.actions)) ?? !0)) return !1;
3444
+ const y = l(c.subject);
3445
+ if (!y) return !1;
3446
+ const p = u(y);
3447
+ return p ? Object.keys(i(p, b)).length > 0 : !1;
3448
+ }
3449
+ function I(c, b) {
3450
+ if (!g(c, b) || r.value.has(gt(c.subject, b))) return "custom";
3451
+ if (c.index === null) return "inherit";
3452
+ const y = e.value[c.index], p = l(c.subject), R = p ? u(p) : void 0;
3453
+ if (y && R) {
3454
+ const L = tt(We(y), b), X = i(R, b);
3455
+ if (JSON.stringify(L) === JSON.stringify(X)) return "inherit";
3456
+ }
3457
+ return "custom";
3458
+ }
3459
+ function T(c, b, y) {
3460
+ if (!b.summarizeForm) return;
3461
+ const p = l(c.subject);
3462
+ if (!p) return;
3463
+ const R = u(p);
3464
+ if (!R) return;
3465
+ const L = b.fromCondition(i(R, b));
3466
+ return b.summarizeForm(L, { timeZone: y });
3467
+ }
3468
+ function C(c, b) {
3469
+ if (c.index === null) return;
3470
+ const y = [...e.value], p = { ...y[c.index] }, R = Yt(p, b), L = Object.keys(R).length === 0, X = l(c.subject), x = X ? u(X) : void 0, d = x ? Mt(x, p) : !1;
3471
+ if (L && d)
3472
+ y.splice(c.index, 1);
3473
+ else if (x) {
3474
+ const N = Vn(p, x, b);
3475
+ Object.keys(N).length === 0 ? delete p.conditions : p.conditions = JSON.stringify(N), y[c.index] = p;
3476
+ } else
3477
+ L ? delete p.conditions : p.conditions = JSON.stringify(R), y[c.index] = p;
3478
+ n(y);
3479
+ }
3480
+ function F(c, b, y) {
3481
+ const p = gt(c.subject, b);
3482
+ if (y === "inherit") {
3483
+ const L = new Set(r.value);
3484
+ L.delete(p), r.value = L, C(c, b);
3485
+ return;
3486
+ }
3487
+ const R = new Set(r.value);
3488
+ R.add(p), r.value = R, c.index === null && h(c, b, b.fromCondition(void 0), {
3489
+ forceCreateRule: !0
3490
+ });
3491
+ }
3492
+ function w(c) {
3493
+ const b = l(c);
3494
+ if (!b) return [];
3495
+ const y = u(b);
3496
+ return (y == null ? void 0 : y.actions) ?? [];
3497
+ }
3498
+ function A(c, b) {
3499
+ return e.value.filter((y) => {
3500
+ if (y.inverted) return !1;
3501
+ const p = y.subject;
3502
+ return p === c || l(p) !== c ? !1 : r.value.has(gt(p, b)) ? !0 : Object.keys(tt(We(y), b)).length > 0;
3503
+ });
3504
+ }
3505
+ function D(c, b) {
3506
+ const y = `::${b.builderKey}`, p = new Set(r.value);
3507
+ for (const R of p) {
3508
+ if (!R.endsWith(y)) continue;
3509
+ const L = R.slice(0, -y.length);
3510
+ l(L) === c && p.delete(R);
3511
+ }
3512
+ r.value = p;
3513
+ }
3514
+ function f(c, b, y) {
3515
+ const p = b.subject;
3516
+ return c.reduce((R, L) => {
3517
+ if (L.inverted)
3518
+ return R.push(L), R;
3519
+ const X = L.subject;
3520
+ if (X === p || l(X) !== p)
3521
+ return R.push(L), R;
3522
+ if (Mt(b, L) && Object.keys(Yt(L, y)).length === 0)
3523
+ return R;
3524
+ const d = Vn(L, b, y);
3525
+ if (Object.keys(d).length === 0) {
3526
+ const { conditions: N, ...U } = L;
3527
+ R.push(U);
3528
+ } else
3529
+ R.push({ ...L, conditions: JSON.stringify(d) });
3530
+ return R;
3531
+ }, []);
3532
+ }
3533
+ function h(c, b, y, p = {}) {
3534
+ var V;
3535
+ const R = [...e.value];
3536
+ let L = c.index;
3537
+ const X = b.toCondition(y), x = Object.keys(X).length > 0;
3538
+ if (L === null && !x && !p.forceCreateRule) return;
3539
+ if (L === null) {
3540
+ const j = R.findIndex((G) => !G.inverted && G.subject === c.subject);
3541
+ if (j !== -1)
3542
+ L = j;
3543
+ else {
3544
+ const G = t.value.find((Q) => Q.subject === c.subject);
3545
+ if (!G) return;
3546
+ const {
3547
+ category: W,
3548
+ showByFeatureFlag: Y,
3549
+ isCategoryCover: Z,
3550
+ ...ne
3551
+ } = G;
3552
+ R.push({
3553
+ ...ne,
3554
+ actions: c.actions.length > 0 ? c.actions : ne.actions
3555
+ }), L = R.length - 1;
3556
+ }
3557
+ }
3558
+ const d = { ...R[L] };
3559
+ d.actions = [
3560
+ .../* @__PURE__ */ new Set([...d.actions, ...c.actions])
3561
+ ];
3562
+ const N = We(d), U = Dt(N, [{ builder: b, formValue: y }]);
3563
+ if (Object.keys(U).length === 0 ? delete d.conditions : d.conditions = JSON.stringify(U), R[L] = d, sn(c.subject, t.value)) {
3564
+ const j = A(c.subject, b), G = () => {
3565
+ var Y;
3566
+ D(c.subject, b), n(f(R, d, b)), (Y = p.afterCommit) == null || Y.call(p);
3567
+ }, W = () => {
3568
+ var Y;
3569
+ n(R), (Y = p.afterCommit) == null || Y.call(p);
3570
+ };
3571
+ if (j.length === 0) {
3572
+ G();
3573
+ return;
3574
+ }
3575
+ p.onOverridesConflict ? p.onOverridesConflict({ override: G, keep: W }) : W();
3576
+ return;
3577
+ }
3578
+ n(R), (V = p.afterCommit) == null || V.call(p);
3579
+ }
3580
+ function S(c, b, y = {}) {
3581
+ if (b.length === 0) return;
3582
+ const p = [...e.value];
3583
+ let R = p.findIndex((j) => !j.inverted && j.subject === c.subject), L = R === -1 ? void 0 : { ...p[R] }, X = We(L ?? {}) ?? {};
3584
+ for (const j of b) {
3585
+ const G = j.mode === "inherit" ? j.builder.fromCondition(void 0) : j.form;
3586
+ X = Dt(X, [{ builder: j.builder, formValue: G }]);
3587
+ }
3588
+ const x = b.some((j) => j.mode === "custom");
3589
+ if (!L && (Object.keys(X).length > 0 || x)) {
3590
+ const j = t.value.find((ne) => ne.subject === c.subject);
3591
+ if (!j) return;
3592
+ const {
3593
+ category: G,
3594
+ showByFeatureFlag: W,
3595
+ isCategoryCover: Y,
3596
+ ...Z
3597
+ } = j;
3598
+ L = {
3599
+ ...Z,
3600
+ actions: c.actions.length > 0 ? c.actions : Z.actions
3601
+ }, p.push(L), R = p.length - 1;
3602
+ }
3603
+ if (L) {
3604
+ const j = l(c.subject), G = j ? u(j) : void 0;
3605
+ if (!x && Object.keys(X).length === 0 && !!G && Mt(G, L))
3606
+ p.splice(R, 1), L = void 0;
3607
+ else {
3608
+ if (L.actions = [
3609
+ .../* @__PURE__ */ new Set([...L.actions, ...c.actions])
3610
+ ], G)
3611
+ for (const Y of b)
3612
+ Y.mode === "inherit" && (X = {
3613
+ ...X,
3614
+ ...tt(We(G), Y.builder)
3615
+ });
3616
+ Object.keys(X).length === 0 ? delete L.conditions : L.conditions = JSON.stringify(X), p[R] = L;
3617
+ }
3618
+ }
3619
+ const d = () => {
3620
+ const j = new Set(r.value);
3621
+ for (const G of b) {
3622
+ const W = gt(c.subject, G.builder);
3623
+ G.mode === "custom" ? j.add(W) : j.delete(W);
3624
+ }
3625
+ r.value = j;
3626
+ }, N = (j) => {
3627
+ var G;
3628
+ d(), n(j), (G = y.afterCommit) == null || G.call(y);
3629
+ };
3630
+ if (!sn(c.subject, t.value) || !L) {
3631
+ N(p);
3632
+ return;
3633
+ }
3634
+ const U = b.map((j) => j.builder).filter((j) => A(c.subject, j).length > 0), V = () => {
3635
+ let j = p;
3636
+ for (const G of b.map((W) => W.builder))
3637
+ D(c.subject, G), j = f(j, L, G);
3638
+ N(j);
3639
+ };
3640
+ if (U.length > 0 && y.onOverridesConflict) {
3641
+ y.onOverridesConflict({ override: V, keep: () => N(p) });
3642
+ return;
3643
+ }
3644
+ U.length > 0 ? N(p) : V();
3645
+ }
3646
+ return {
3647
+ getCoverSubject: l,
3648
+ coverLabel: m,
3649
+ shouldShowInheritToggle: g,
3650
+ inheritMode: I,
3651
+ setInheritMode: F,
3652
+ inheritedSummary: T,
3653
+ getEffectiveActions: w,
3654
+ updateBuilderCondition: h,
3655
+ applyConditionDrafts: S
3656
+ };
3657
+ }
3658
+ const _a = { class: "flex flex-col gap-32" }, pa = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, va = { class: "h-[24px] w-[24px] flex items-center justify-center" }, ha = { class: "h-[24px] w-[24px] flex items-center justify-center" }, ba = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, ga = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, ya = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, Ia = "condition-form-select-menu", wa = /* @__PURE__ */ Ae({
3659
+ __name: "PortalPermissionEditor",
3660
+ props: /* @__PURE__ */ tn({
3661
+ disable: {
3662
+ type: Boolean,
3663
+ default: !1
3664
+ },
3665
+ inheritPermissions: {
3666
+ type: Array,
3667
+ default: () => []
3668
+ }
3669
+ }, {
3670
+ modelValue: { default: () => [] },
3671
+ modelModifiers: {}
3672
+ }),
3673
+ emits: /* @__PURE__ */ tn(["permissionChanged"], ["update:modelValue"]),
3674
+ setup(e, { emit: t }) {
3675
+ const n = vr(e, "modelValue"), r = e, l = t, { t: a } = He(), m = hr(), u = br(), { breakpoints: i } = gr(), g = K(() => i.value.xs || i.value.sm), {
3676
+ fetchCustomReportPermissions: I,
3677
+ customReportPermissions: T
3678
+ } = yr(), C = K(() => [
3679
+ ...Gn,
3680
+ ...T.value
3681
+ ]), F = K(() => {
3682
+ const O = m.currentBusiness.value, s = m.currentCountry.value, o = s instanceof Object ? s.code : s;
3683
+ return ma(O, o);
3684
+ });
3685
+ function w(O) {
3686
+ return C.value.find((s) => s.subject === O);
3687
+ }
3688
+ function A(O, s) {
3689
+ return rn(O).filter(
3690
+ (o) => {
3691
+ var _;
3692
+ return ((_ = o.appliesToActions) == null ? void 0 : _.call(o, s)) ?? !0;
3693
+ }
3694
+ );
3695
+ }
3696
+ const D = K(() => {
3697
+ const O = C.value.filter((o) => !c.includes(o.subject)).map((o) => o.subject);
3698
+ return Ir(
3699
+ r.inheritPermissions.map((o) => ({
3700
+ ...o,
3701
+ permissions: o.permissions.filter((_) => O.includes(_.subject))
3702
+ }))
3703
+ ).map((o) => ({
3704
+ id: o.subject,
3705
+ setNames: o.setNames
3706
+ }));
3707
+ }), f = K(() => {
3708
+ const O = r.inheritPermissions.map((s) => ({
3709
+ ...s,
3710
+ permissions: s.permissions.filter(
3711
+ (o) => o.subject === he.Subject.Business.inventory_stock
3712
+ )
3713
+ }));
3714
+ return Lt(
3715
+ O,
3716
+ "warehouseId",
3717
+ y.value.map((s) => s._id)
3718
+ );
3719
+ }), h = K(() => {
3720
+ const O = r.inheritPermissions.map((s) => ({
3721
+ ...s,
3722
+ permissions: s.permissions.filter(
3723
+ (o) => o.subject === he.Subject.Restaurant.restaurant
3724
+ )
3725
+ }));
3726
+ return Lt(
3727
+ O,
3728
+ "restaurantId",
3729
+ X.value.map((s) => s._id)
3730
+ );
3731
+ }), S = K(() => {
3732
+ const O = r.inheritPermissions.map((s) => ({
3733
+ ...s,
3734
+ permissions: s.permissions.filter((o) => o.subject === he.Subject.Business.role)
3735
+ }));
3736
+ return Lt(
3737
+ O,
3738
+ "roleId",
3739
+ x.value.map((s) => s._id)
3740
+ );
3741
+ }), c = [
3742
+ he.Subject.Business.restaurant,
3743
+ he.Subject.Business.role,
3744
+ he.Subject.Restaurant.restaurant,
3745
+ he.Subject.Business.inventory_stock
3746
+ ], b = K(() => {
3747
+ var s;
3748
+ const O = (s = n.value) == null ? void 0 : s.find(
3749
+ (o) => o.subject === he.Subject.Business.inventory_stock
3750
+ );
3751
+ return O ? O.conditions ? JSON.parse(O.conditions).warehouseId.$in : null : [];
3752
+ }), y = rt([]), p = K(() => y.value.map((O) => ({
3753
+ label: O.profile.name,
3754
+ value: O._id
3755
+ })));
3756
+ function R(O) {
3757
+ const s = L(n.value, O);
3758
+ n.value = s;
3759
+ }
3760
+ function L(O, s) {
3761
+ let o = yt(
3762
+ O.filter((_) => _.subject !== he.Subject.Business.inventory_stock)
3763
+ );
3764
+ if (!s || s.length > 0) {
3765
+ const _ = {
3766
+ actions: [he.Action.manage],
3767
+ subject: he.Subject.Business.inventory_stock
3768
+ };
3769
+ s && (_.conditions = JSON.stringify({ warehouseId: { $in: s } })), o.push(_);
3770
+ }
3771
+ return o;
3772
+ }
3773
+ const { restaurants: X } = m, x = Rr().roles, d = K(() => X.value.map((O) => ({
3774
+ label: `${O.profile.code ? O.profile.code + "-" : ""}${O.profile.name}`,
3775
+ value: O._id
3776
+ }))), N = K(() => X.value.reduce((O, s) => (O[s._id] = x.value.filter((o) => o.restaurants.some((_) => _.id === s._id)).map((o) => o._id), O), {})), U = K(() => Er(n.value));
3777
+ function V(O) {
3778
+ const s = G(n.value, O);
3779
+ n.value = s;
3780
+ }
3781
+ const j = K(() => Cr(n.value));
3782
+ function G(O, s) {
3783
+ var _;
3784
+ let o = yt(
3785
+ O.filter(
3786
+ (k) => k.subject !== he.Subject.Business.restaurant && k.subject !== he.Subject.Restaurant.restaurant
3787
+ )
3788
+ );
3789
+ if (!s || s.length > 0) {
3790
+ const {
3791
+ category: k,
3792
+ showByFeatureFlag: M,
3793
+ ...P
3794
+ } = Lr.restaurant;
3795
+ o.push(P);
3796
+ const v = {
3797
+ actions: [he.Action.manage],
3798
+ subject: he.Subject.Restaurant.restaurant
3799
+ };
3800
+ s && (v.conditions = JSON.stringify({ restaurantId: { $in: s } })), o.push(v);
3801
+ }
3802
+ if (s) {
3803
+ const k = [
3804
+ ...new Set(s.map((P) => N.value[P]).flatMap((P) => P))
3805
+ ], M = x.value.map((P) => P._id);
3806
+ k.length !== M.length && (o = Y(
3807
+ o,
3808
+ (_ = j.value || M) == null ? void 0 : _.filter((P) => k.includes(P))
3809
+ ));
3810
+ }
3811
+ return o;
3812
+ }
3813
+ function W(O) {
3814
+ const s = Y(n.value, O);
3815
+ n.value = s;
3816
+ }
3817
+ function Y(O, s) {
3818
+ let o = yt(
3819
+ O.filter((_) => _.subject !== he.Subject.Business.role)
3820
+ );
3821
+ if (s && s.length > 0) {
3822
+ const _ = {
3823
+ actions: [he.Action.manage],
3824
+ subject: he.Subject.Business.role,
3825
+ conditions: JSON.stringify({ roleId: { $in: s } })
3826
+ };
3827
+ o.push(_);
3828
+ }
3829
+ return o;
3830
+ }
3831
+ xn(async () => {
3832
+ await Promise.all([
3833
+ la.readWarehouses().then((O) => y.value = O),
3834
+ I()
3835
+ ]);
3836
+ });
3837
+ const Z = K(() => Bn(
3838
+ n.value,
3839
+ Yn
3840
+ ).filter((o) => {
3841
+ const _ = o.source;
3842
+ return (_ == null ? void 0 : _.type) !== "systemPermissionSet" ? !0 : o.actions.includes("manage");
3843
+ }).map((o) => {
3844
+ if (o.inverted) return o;
3845
+ const _ = o.actions;
3846
+ if (!_.includes("manage")) return o;
3847
+ const k = w(o.subject);
3848
+ if (!k) return o;
3849
+ const M = k.actions;
3850
+ return M.length <= 1 || M.filter((v) => !_.includes(v)).length === 0 ? o : { ...o, actions: [...M] };
3851
+ }));
3852
+ function ne(O) {
3853
+ n.value = ia(
3854
+ Z.value,
3855
+ O,
3856
+ n.value,
3857
+ w
3858
+ );
3859
+ }
3860
+ const Q = K(() => new Set(
3861
+ C.value.filter((O) => rn(O.subject).length > 0).map((O) => O.subject)
3862
+ )), _e = K(() => {
3863
+ const O = /* @__PURE__ */ new Map();
3864
+ return Z.value.map((s) => ({
3865
+ rule: s,
3866
+ index: n.value.findIndex(
3867
+ (o) => !o.inverted && o.subject === s.subject
3868
+ )
3869
+ })).filter(({ rule: s }) => !s.inverted).forEach(({ rule: s, index: o }) => {
3870
+ var P;
3871
+ const _ = s.actions, k = A(s.subject, _);
3872
+ if (k.length === 0) return;
3873
+ let M;
3874
+ try {
3875
+ M = s.conditions ? JSON.parse(s.conditions) : void 0;
3876
+ } catch {
3877
+ M = void 0;
3878
+ }
3879
+ O.set(s.subject, {
3880
+ index: o >= 0 ? o : null,
3881
+ subject: s.subject,
3882
+ label: ((P = w(s.subject)) == null ? void 0 : P.label) ?? s.subject,
3883
+ actions: _,
3884
+ // Each builder only ever sees its own slice of the stored condition.
3885
+ sections: k.map((v) => ({
3886
+ builder: v,
3887
+ formValue: v.fromCondition(tt(M, v))
3888
+ }))
3889
+ });
3890
+ }), O;
3891
+ }), ce = fa(n, C, (O) => {
3892
+ n.value = O;
3893
+ }), se = Tr(n), fe = rt(null);
3894
+ function q(O, s) {
3895
+ const o = _e.value.get(O);
3896
+ if (o) return o;
3897
+ const _ = ce.getEffectiveActions(O), k = A(O, _);
3898
+ if (k.length !== 0)
3899
+ return {
3900
+ index: null,
3901
+ subject: O,
3902
+ label: s,
3903
+ actions: _,
3904
+ sections: k.map((M) => ({
3905
+ builder: M,
3906
+ formValue: M.fromCondition(void 0)
3907
+ }))
3908
+ };
3909
+ }
3910
+ function De(O, s) {
3911
+ const o = se.getDraft({ subject: O.subject, builderKey: s.builderKey });
3912
+ if (o) return o.formValue;
3913
+ const _ = O.sections.find((k) => k.builder.builderKey === s.builderKey);
3914
+ return _ == null ? void 0 : _.formValue;
3915
+ }
3916
+ function z(O, s) {
3917
+ const o = se.getDraft({ subject: O.subject, builderKey: s.builderKey });
3918
+ return o != null && o.inheritMode ? o.inheritMode : ce.inheritMode(O, s);
3919
+ }
3920
+ function pe(O, s, o) {
3921
+ const _ = se.getDraft({
3922
+ subject: O.subject,
3923
+ builderKey: s.builderKey
3924
+ });
3925
+ se.setDraft(
3926
+ { subject: O.subject, builderKey: s.builderKey },
3927
+ {
3928
+ formValue: o,
3929
+ inheritMode: (_ == null ? void 0 : _.inheritMode) ?? z(O, s)
3930
+ }
3931
+ );
3932
+ }
3933
+ function Je(O, s, o) {
3934
+ const _ = se.getDraft({
3935
+ subject: O.subject,
3936
+ builderKey: s.builderKey
3937
+ }), k = O.sections.find((M) => M.builder.builderKey === s.builderKey);
3938
+ se.setDraft(
3939
+ { subject: O.subject, builderKey: s.builderKey },
3940
+ {
3941
+ formValue: (_ == null ? void 0 : _.formValue) ?? (k == null ? void 0 : k.formValue),
3942
+ inheritMode: o
3943
+ }
3944
+ );
3945
+ }
3946
+ function ze(O) {
3947
+ return se.hasDraftsForSubject(O);
3948
+ }
3949
+ function Ve(O, s) {
3950
+ const o = O.sections.flatMap((_) => {
3951
+ const k = se.getDraft({
3952
+ subject: O.subject,
3953
+ builderKey: _.builder.builderKey
3954
+ });
3955
+ return k ? [{ builder: _.builder, form: k.formValue, mode: k.inheritMode ?? "custom" }] : [];
3956
+ });
3957
+ ce.applyConditionDrafts(O, o, {
3958
+ afterCommit: () => {
3959
+ se.clearDraftsForSubject(O.subject), s();
3960
+ },
3961
+ onOverridesConflict: Ye(O).onOverridesConflict
3962
+ });
3963
+ }
3964
+ function Fe(O) {
3965
+ return O.sections.some((s) => ce.shouldShowInheritToggle(O, s.builder) ? ce.inheritMode(O, s.builder) === "custom" : Object.keys(s.builder.toCondition(s.formValue)).length > 0);
3966
+ }
3967
+ let Ne = !1;
3968
+ function Ye(O, s = {}) {
3969
+ return {
3970
+ ...s,
3971
+ onOverridesConflict: ({ override: o, keep: _ }) => {
3972
+ Ne || (Ne = !0, u.open({
3973
+ title: a("team.memberForm.permissions.conditionCover.confirmTitle"),
3974
+ message: a("team.memberForm.permissions.conditionCover.confirmMessage", {
3975
+ cover: O.label
3976
+ }),
3977
+ minWidth: i.value.lg ? 588 : 0,
3978
+ zIndex: 200,
3979
+ primaryActions: {
3980
+ text: a("team.memberForm.permissions.conditionCover.override"),
3981
+ close: !1
3982
+ },
3983
+ secondaryActions: {
3984
+ text: a("team.memberForm.permissions.conditionCover.keep"),
3985
+ close: !1
3986
+ }
3987
+ }).onPrimary(() => {
3988
+ o(), Ne = !1, u.close();
3989
+ }).onSecondary(() => {
3990
+ _(), Ne = !1, u.close();
3991
+ }).onClose(() => {
3992
+ Ne = !1;
3993
+ }));
3994
+ }
3995
+ };
3996
+ }
3997
+ return wt(
3998
+ n,
3999
+ (O) => {
4000
+ l("permissionChanged", O);
4001
+ },
4002
+ { deep: !0 }
4003
+ ), (O, s) => {
4004
+ const o = we("FmIcon"), _ = we("FmBottomSheet"), k = we("FmPopover");
4005
+ return J(), ie("div", _a, [
4006
+ ae("div", pa, [
4007
+ ue(Xo, {
4008
+ "model-value": Z.value,
4009
+ "excluded-subjects": c,
4010
+ "additional-permissions": H(T),
4011
+ "onUpdate:modelValue": ne
4012
+ }, et({ _: 2 }, [
4013
+ Ee(D.value, (M) => ({
4014
+ name: `checkbox-${M.id}-append`,
4015
+ fn: me(() => [
4016
+ ue(vt, { item: M }, null, 8, ["item"])
4017
+ ])
4018
+ })),
4019
+ Ee(Q.value, (M) => ({
4020
+ name: `checkbox-${M}-icon`,
4021
+ fn: me(({ option: P, isEffectiveSelected: v }) => [
4022
+ v && q(M, P.label) ? (J(), ie(Re, { key: 0 }, [
4023
+ g.value ? (J(), Ce(_, {
4024
+ key: 0,
4025
+ "model-value": fe.value === M,
4026
+ header: H(a)("team.memberForm.permissions.conditionTitle", {
4027
+ context: q(M, P.label).label
4028
+ }),
4029
+ "dismiss-away": "",
4030
+ "z-index": 100,
4031
+ class: "h-5 flex items-center",
4032
+ "onUpdate:modelValue": (E) => {
4033
+ fe.value = E ? M : null, E || H(se).clearDraftsForSubject(M);
4034
+ }
4035
+ }, {
4036
+ "bottom-sheet-button": me(() => [
4037
+ ae("div", va, [
4038
+ ue(o, {
4039
+ name: "settings",
4040
+ size: "sm",
4041
+ class: qe([
4042
+ "cursor-pointer transition-colors",
4043
+ Fe(q(M, P.label)) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
4044
+ ])
4045
+ }, null, 8, ["class"])
4046
+ ])
4047
+ ]),
4048
+ default: me(() => [
4049
+ ue(Fn, {
4050
+ entry: q(M, P.label),
4051
+ builders: q(M, P.label).sections.map((E) => E.builder),
4052
+ subject: M,
4053
+ "time-zone": F.value,
4054
+ "cover-override": H(ce),
4055
+ "inherit-mode-for": (E) => z(q(M, P.label), E),
4056
+ "form-value-for": (E) => De(q(M, P.label), E),
4057
+ "has-changes": ze(M),
4058
+ disable: e.disable,
4059
+ "full-width": !0,
4060
+ onUpdateInheritMode: ({ builder: E, mode: $ }) => Je(q(M, P.label), E, $),
4061
+ onUpdateForm: ({ builder: E, form: $ }) => pe(q(M, P.label), E, $),
4062
+ onApply: (E) => Ve(q(M, P.label), () => fe.value = null)
4063
+ }, null, 8, ["entry", "builders", "subject", "time-zone", "cover-override", "inherit-mode-for", "form-value-for", "has-changes", "disable", "onUpdateInheritMode", "onUpdateForm", "onApply"])
4064
+ ]),
4065
+ _: 2
4066
+ }, 1032, ["model-value", "header", "onUpdate:modelValue"])) : (J(), Ce(k, {
4067
+ key: 1,
4068
+ disabled: e.disable,
4069
+ "z-index": 100,
4070
+ "exclude-el-from-click-outside": [Ia],
4071
+ class: "h-5 flex items-center",
4072
+ onPopoverChanged: (E) => {
4073
+ E || H(se).clearDraftsForSubject(M);
4074
+ }
4075
+ }, {
4076
+ "popover-button": me(() => [
4077
+ ae("div", ha, [
4078
+ ue(o, {
4079
+ name: "settings",
4080
+ size: "sm",
4081
+ class: qe([
4082
+ "cursor-pointer transition-colors",
4083
+ Fe(q(M, P.label)) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
4084
+ ])
4085
+ }, null, 8, ["class"])
4086
+ ])
4087
+ ]),
4088
+ default: me(({ hide: E }) => [
4089
+ ue(Fn, {
4090
+ entry: q(M, P.label),
4091
+ builders: q(M, P.label).sections.map(($) => $.builder),
4092
+ subject: M,
4093
+ "time-zone": F.value,
4094
+ "cover-override": H(ce),
4095
+ title: H(a)("team.memberForm.permissions.conditionTitle", {
4096
+ context: q(M, P.label).label
4097
+ }),
4098
+ "inherit-mode-for": ($) => z(q(M, P.label), $),
4099
+ "form-value-for": ($) => De(q(M, P.label), $),
4100
+ "has-changes": ze(M),
4101
+ disable: e.disable,
4102
+ onUpdateInheritMode: ({ builder: $, mode: le }) => Je(
4103
+ q(M, P.label),
4104
+ $,
4105
+ le
4106
+ ),
4107
+ onUpdateForm: ({ builder: $, form: le }) => pe(q(M, P.label), $, le),
4108
+ onApply: ($) => Ve(q(M, P.label), E)
4109
+ }, null, 8, ["entry", "builders", "subject", "time-zone", "cover-override", "title", "inherit-mode-for", "form-value-for", "has-changes", "disable", "onUpdateInheritMode", "onUpdateForm", "onApply"])
4110
+ ]),
4111
+ _: 2
4112
+ }, 1032, ["disabled", "exclude-el-from-click-outside", "onPopoverChanged"]))
4113
+ ], 64)) : (J(), Ce(o, {
4114
+ key: 1,
4115
+ name: "settings",
4116
+ size: "sm",
4117
+ class: "invisible"
4118
+ }))
4119
+ ])
4120
+ }))
4121
+ ]), 1032, ["model-value", "additional-permissions"])
4122
+ ]),
4123
+ ae("div", ba, [
4124
+ ue(Dn, {
4125
+ "model-value": b.value,
4126
+ options: p.value,
4127
+ context: H(a)("team.labels.warehouse"),
4128
+ "onUpdate:modelValue": R
4129
+ }, et({ _: 2 }, [
4130
+ Ee(f.value, (M) => ({
4131
+ name: `checkbox-${M.id}-append`,
4132
+ fn: me(() => [
4133
+ ue(vt, { item: M }, null, 8, ["item"])
4134
+ ])
4135
+ }))
4136
+ ]), 1032, ["model-value", "options", "context"])
4137
+ ]),
4138
+ ae("div", ga, [
4139
+ ue(Dn, {
4140
+ "model-value": U.value,
4141
+ options: d.value,
4142
+ context: H(a)("team.labels.restaurant"),
4143
+ "onUpdate:modelValue": V
4144
+ }, et({ _: 2 }, [
4145
+ Ee(h.value, (M) => ({
4146
+ name: `checkbox-${M.id}-append`,
4147
+ fn: me(() => [
4148
+ ue(vt, { item: M }, null, 8, ["item"])
4149
+ ])
4150
+ }))
4151
+ ]), 1032, ["model-value", "options", "context"])
4152
+ ]),
4153
+ ae("div", ya, [
4154
+ ue(ra, {
4155
+ roles: H(x),
4156
+ "model-value": j.value,
4157
+ "restaurant-ids": U.value,
4158
+ "onUpdate:modelValue": W
4159
+ }, et({ _: 2 }, [
4160
+ Ee(S.value, (M) => ({
4161
+ name: `checkbox-${M.id}-append`,
4162
+ fn: me(() => [
4163
+ ue(vt, { item: M }, null, 8, ["item"])
4164
+ ])
4165
+ }))
4166
+ ]), 1032, ["roles", "model-value", "restaurant-ids"])
4167
+ ])
4168
+ ]);
4169
+ };
4170
+ }
4171
+ });
4172
+ export {
4173
+ wa as _
4174
+ };