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