@feedmepos/mf-hrm-portal 2.0.8-dev.1 → 2.0.8-dev.3
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/{AuditLogList-YGP3G14A.js → AuditLogList-DU9bvapH.js} +5 -5
- package/dist/{EmployeeList-DuRlCrqN.js → EmployeeList-C0Kt6J2s.js} +5 -5
- package/dist/{Main-BfDH3uAt.js → Main-CGoSOSHf.js} +9 -9
- package/dist/{Main-D4ueBOl0.js → Main-YgAJrDXR.js} +6 -6
- package/dist/{Main-QpKV1hdj.js → Main-wneSr3Yj.js} +4 -4
- package/dist/{PermissionSetList-DfAZmUkI.js → PermissionSetList-BG5FcHDo.js} +5 -5
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Dfey316Z.js +3471 -0
- package/dist/{RoleList-D4mup6LW.js → RoleList-D6aapDtQ.js} +7 -7
- package/dist/{TeamMemberList-D9rTKS5N.js → TeamMemberList-BQ3xq4Q2.js} +8 -8
- package/dist/{TimesheetList-CBudjg1y.js → TimesheetList-DqEtBC_2.js} +7 -7
- package/dist/{app-BO9lM0sJ.js → app-efNRBiJB.js} +255 -226
- package/dist/app.js +2 -2
- package/dist/{dayjs.min-lY-LRZuh.js → dayjs.min-O2mY8Dsx.js} +1 -1
- package/dist/{employee-DXp_u8jd.js → employee-Cr5TX4u1.js} +4 -4
- package/dist/{index-BigKo-lS.js → index-CMFJQ1p8.js} +1 -1
- package/dist/{index-DAuOIotV.js → index-DPcm9B8U.js} +2 -2
- package/dist/{iteration-DgaP-HFg.js → iteration-BzPWNf3I.js} +1 -1
- package/dist/{lodash-Mhrrz947.js → lodash-rnloBy2O.js} +1 -1
- package/dist/src/composables/useBasePermission.d.ts +37 -0
- package/dist/src/helpers/permission-sync.d.ts +12 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +1 -1
- package/dist/{team-oeTIbsa-.js → team-CJ3xjFT7.js} +1 -1
- package/dist/{timesheet-B4XO3Kjx.js → timesheet-BABSsqqp.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Cu5QCTlx.js → useAppStore-DxEeYbWz.js} +1 -1
- package/dist/{useLoading-DKnxkHGF.js → useLoading-zLCQaKfz.js} +1 -1
- package/dist/{useReportPermissions-B_w5FiAK.js → useReportPermissions-BB-vWjkE.js} +3 -3
- package/package.json +1 -1
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DokyDyxJ.js +0 -3432
|
@@ -0,0 +1,3471 @@
|
|
|
1
|
+
import { getCurrentInstance as xt, inject as Jn, ref as Ue, shallowRef as Kn, computed as q, watch as St, onMounted as Yt, onUnmounted as An, defineComponent as ye, h as Sn, createVNode as de, Text as zn, Fragment as Ie, resolveComponent as Ze, createBlock as Se, openBlock as H, withCtx as he, createElementVNode as te, createElementBlock as ee, toDisplayString as Ae, unref as B, renderList as pe, renderSlot as be, createCommentVNode as Le, createTextVNode as Qn, useSlots as qn, normalizeStyle as ct, normalizeClass as qe, toRef as Qt, createSlots as Fe, nextTick as es, mergeModels as qt, useModel as ts } from "vue";
|
|
2
|
+
import { useI18n as _t, useCoreStore as ns } from "@feedmepos/mf-common";
|
|
3
|
+
import "@vue/devtools-api";
|
|
4
|
+
import { p as Dt, j as ss, x as as, y as yt, z as rs, l as ls, $ as Tt } from "./index-DPcm9B8U.js";
|
|
5
|
+
import { d as ut, g as os, b as is } from "./iteration-BzPWNf3I.js";
|
|
6
|
+
import { h as cs, d as ce, N as us, a as kt } from "./app-efNRBiJB.js";
|
|
7
|
+
import { u as ms } from "./index-CMFJQ1p8.js";
|
|
8
|
+
import { u as ds } from "./useAppStore-DxEeYbWz.js";
|
|
9
|
+
/*!
|
|
10
|
+
* shared v10.0.5
|
|
11
|
+
* (c) 2024 kazuya kawaguchi
|
|
12
|
+
* Released under the MIT License.
|
|
13
|
+
*/
|
|
14
|
+
const en = typeof window < "u", Ve = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), fs = (e, t, n) => _s({ l: e, k: t, s: n }), _s = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ue = (e) => typeof e == "number" && isFinite(e), ps = (e) => Zt(e) === "[object Date]", dt = (e) => Zt(e) === "[object RegExp]", pt = (e) => $(e) && Object.keys(e).length === 0, me = Object.assign, hs = Object.create, z = (e = null) => hs(e);
|
|
15
|
+
let tn;
|
|
16
|
+
const je = () => tn || (tn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : z());
|
|
17
|
+
function nn(e) {
|
|
18
|
+
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
19
|
+
}
|
|
20
|
+
const bs = Object.prototype.hasOwnProperty;
|
|
21
|
+
function Ne(e, t) {
|
|
22
|
+
return bs.call(e, t);
|
|
23
|
+
}
|
|
24
|
+
const ie = Array.isArray, se = (e) => typeof e == "function", P = (e) => typeof e == "string", oe = (e) => typeof e == "boolean", J = (e) => e !== null && typeof e == "object", gs = (e) => J(e) && se(e.then) && se(e.catch), Dn = Object.prototype.toString, Zt = (e) => Dn.call(e), $ = (e) => Zt(e) === "[object Object]", vs = (e) => e == null ? "" : ie(e) || $(e) && e.toString === Dn ? JSON.stringify(e, null, 2) : String(e);
|
|
25
|
+
function Xt(e, t = "") {
|
|
26
|
+
return e.reduce((n, s, l) => l === 0 ? n + s : n + t + s, "");
|
|
27
|
+
}
|
|
28
|
+
function Es(e, t) {
|
|
29
|
+
typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack));
|
|
30
|
+
}
|
|
31
|
+
const rt = (e) => !J(e) || ie(e);
|
|
32
|
+
function mt(e, t) {
|
|
33
|
+
if (rt(e) || rt(t))
|
|
34
|
+
throw new Error("Invalid value");
|
|
35
|
+
const n = [{ src: e, des: t }];
|
|
36
|
+
for (; n.length; ) {
|
|
37
|
+
const { src: s, des: l } = n.pop();
|
|
38
|
+
Object.keys(s).forEach((a) => {
|
|
39
|
+
a !== "__proto__" && (J(s[a]) && !J(l[a]) && (l[a] = Array.isArray(s[a]) ? [] : z()), rt(l[a]) || rt(s[a]) ? l[a] = s[a] : n.push({ src: s[a], des: l[a] }));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function Is(e, t, n) {
|
|
44
|
+
return { line: e, column: t, offset: n };
|
|
45
|
+
}
|
|
46
|
+
function Mt(e, t, n) {
|
|
47
|
+
return { start: e, end: t };
|
|
48
|
+
}
|
|
49
|
+
const K = {
|
|
50
|
+
// tokenizer error codes
|
|
51
|
+
EXPECTED_TOKEN: 1,
|
|
52
|
+
INVALID_TOKEN_IN_PLACEHOLDER: 2,
|
|
53
|
+
UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
|
|
54
|
+
UNKNOWN_ESCAPE_SEQUENCE: 4,
|
|
55
|
+
INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
|
|
56
|
+
UNBALANCED_CLOSING_BRACE: 6,
|
|
57
|
+
UNTERMINATED_CLOSING_BRACE: 7,
|
|
58
|
+
EMPTY_PLACEHOLDER: 8,
|
|
59
|
+
NOT_ALLOW_NEST_PLACEHOLDER: 9,
|
|
60
|
+
INVALID_LINKED_FORMAT: 10,
|
|
61
|
+
// parser error codes
|
|
62
|
+
MUST_HAVE_MESSAGES_IN_PLURAL: 11,
|
|
63
|
+
UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
|
|
64
|
+
UNEXPECTED_EMPTY_LINKED_KEY: 13,
|
|
65
|
+
UNEXPECTED_LEXICAL_ANALYSIS: 14
|
|
66
|
+
}, Ns = 17;
|
|
67
|
+
function ht(e, t, n = {}) {
|
|
68
|
+
const { domain: s, messages: l, args: a } = n, c = e, d = new SyntaxError(String(c));
|
|
69
|
+
return d.code = e, t && (d.location = t), d.domain = s, d;
|
|
70
|
+
}
|
|
71
|
+
function ys(e) {
|
|
72
|
+
throw e;
|
|
73
|
+
}
|
|
74
|
+
const ke = " ", Ts = "\r", fe = `
|
|
75
|
+
`, ks = "\u2028", Ls = "\u2029";
|
|
76
|
+
function Os(e) {
|
|
77
|
+
const t = e;
|
|
78
|
+
let n = 0, s = 1, l = 1, a = 0;
|
|
79
|
+
const c = (m) => t[m] === Ts && t[m + 1] === fe, d = (m) => t[m] === fe, u = (m) => t[m] === Ls, b = (m) => t[m] === ks, T = (m) => c(m) || d(m) || u(m) || b(m), L = () => n, I = () => s, w = () => l, V = () => a, y = (m) => c(m) || u(m) || b(m) ? fe : t[m], A = () => y(n), i = () => y(n + a);
|
|
80
|
+
function f() {
|
|
81
|
+
return a = 0, T(n) && (s++, l = 0), c(n) && n++, n++, l++, t[n];
|
|
82
|
+
}
|
|
83
|
+
function N() {
|
|
84
|
+
return c(n + a) && a++, a++, t[n + a];
|
|
85
|
+
}
|
|
86
|
+
function h() {
|
|
87
|
+
n = 0, s = 1, l = 1, a = 0;
|
|
88
|
+
}
|
|
89
|
+
function S(m = 0) {
|
|
90
|
+
a = m;
|
|
91
|
+
}
|
|
92
|
+
function C() {
|
|
93
|
+
const m = n + a;
|
|
94
|
+
for (; m !== n; )
|
|
95
|
+
f();
|
|
96
|
+
a = 0;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
index: L,
|
|
100
|
+
line: I,
|
|
101
|
+
column: w,
|
|
102
|
+
peekOffset: V,
|
|
103
|
+
charAt: y,
|
|
104
|
+
currentChar: A,
|
|
105
|
+
currentPeek: i,
|
|
106
|
+
next: f,
|
|
107
|
+
peek: N,
|
|
108
|
+
reset: h,
|
|
109
|
+
resetPeek: S,
|
|
110
|
+
skipToPeek: C
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const Ce = void 0, Rs = ".", sn = "'", Cs = "tokenizer";
|
|
114
|
+
function As(e, t = {}) {
|
|
115
|
+
const n = t.location !== !1, s = Os(e), l = () => s.index(), a = () => Is(s.line(), s.column(), s.index()), c = a(), d = l(), u = {
|
|
116
|
+
currentType: 13,
|
|
117
|
+
offset: d,
|
|
118
|
+
startLoc: c,
|
|
119
|
+
endLoc: c,
|
|
120
|
+
lastType: 13,
|
|
121
|
+
lastOffset: d,
|
|
122
|
+
lastStartLoc: c,
|
|
123
|
+
lastEndLoc: c,
|
|
124
|
+
braceNest: 0,
|
|
125
|
+
inLinked: !1,
|
|
126
|
+
text: ""
|
|
127
|
+
}, b = () => u, { onError: T } = t;
|
|
128
|
+
function L(r, o, g, ...j) {
|
|
129
|
+
const re = b();
|
|
130
|
+
if (o.column += g, o.offset += g, T) {
|
|
131
|
+
const Z = n ? Mt(re.startLoc, o) : null, _ = ht(r, Z, {
|
|
132
|
+
domain: Cs,
|
|
133
|
+
args: j
|
|
134
|
+
});
|
|
135
|
+
T(_);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function I(r, o, g) {
|
|
139
|
+
r.endLoc = a(), r.currentType = o;
|
|
140
|
+
const j = { type: o };
|
|
141
|
+
return n && (j.loc = Mt(r.startLoc, r.endLoc)), g != null && (j.value = g), j;
|
|
142
|
+
}
|
|
143
|
+
const w = (r) => I(
|
|
144
|
+
r,
|
|
145
|
+
13
|
|
146
|
+
/* TokenTypes.EOF */
|
|
147
|
+
);
|
|
148
|
+
function V(r, o) {
|
|
149
|
+
return r.currentChar() === o ? (r.next(), o) : (L(K.EXPECTED_TOKEN, a(), 0, o), "");
|
|
150
|
+
}
|
|
151
|
+
function y(r) {
|
|
152
|
+
let o = "";
|
|
153
|
+
for (; r.currentPeek() === ke || r.currentPeek() === fe; )
|
|
154
|
+
o += r.currentPeek(), r.peek();
|
|
155
|
+
return o;
|
|
156
|
+
}
|
|
157
|
+
function A(r) {
|
|
158
|
+
const o = y(r);
|
|
159
|
+
return r.skipToPeek(), o;
|
|
160
|
+
}
|
|
161
|
+
function i(r) {
|
|
162
|
+
if (r === Ce)
|
|
163
|
+
return !1;
|
|
164
|
+
const o = r.charCodeAt(0);
|
|
165
|
+
return o >= 97 && o <= 122 || // a-z
|
|
166
|
+
o >= 65 && o <= 90 || // A-Z
|
|
167
|
+
o === 95;
|
|
168
|
+
}
|
|
169
|
+
function f(r) {
|
|
170
|
+
if (r === Ce)
|
|
171
|
+
return !1;
|
|
172
|
+
const o = r.charCodeAt(0);
|
|
173
|
+
return o >= 48 && o <= 57;
|
|
174
|
+
}
|
|
175
|
+
function N(r, o) {
|
|
176
|
+
const { currentType: g } = o;
|
|
177
|
+
if (g !== 2)
|
|
178
|
+
return !1;
|
|
179
|
+
y(r);
|
|
180
|
+
const j = i(r.currentPeek());
|
|
181
|
+
return r.resetPeek(), j;
|
|
182
|
+
}
|
|
183
|
+
function h(r, o) {
|
|
184
|
+
const { currentType: g } = o;
|
|
185
|
+
if (g !== 2)
|
|
186
|
+
return !1;
|
|
187
|
+
y(r);
|
|
188
|
+
const j = r.currentPeek() === "-" ? r.peek() : r.currentPeek(), re = f(j);
|
|
189
|
+
return r.resetPeek(), re;
|
|
190
|
+
}
|
|
191
|
+
function S(r, o) {
|
|
192
|
+
const { currentType: g } = o;
|
|
193
|
+
if (g !== 2)
|
|
194
|
+
return !1;
|
|
195
|
+
y(r);
|
|
196
|
+
const j = r.currentPeek() === sn;
|
|
197
|
+
return r.resetPeek(), j;
|
|
198
|
+
}
|
|
199
|
+
function C(r, o) {
|
|
200
|
+
const { currentType: g } = o;
|
|
201
|
+
if (g !== 7)
|
|
202
|
+
return !1;
|
|
203
|
+
y(r);
|
|
204
|
+
const j = r.currentPeek() === ".";
|
|
205
|
+
return r.resetPeek(), j;
|
|
206
|
+
}
|
|
207
|
+
function m(r, o) {
|
|
208
|
+
const { currentType: g } = o;
|
|
209
|
+
if (g !== 8)
|
|
210
|
+
return !1;
|
|
211
|
+
y(r);
|
|
212
|
+
const j = i(r.currentPeek());
|
|
213
|
+
return r.resetPeek(), j;
|
|
214
|
+
}
|
|
215
|
+
function R(r, o) {
|
|
216
|
+
const { currentType: g } = o;
|
|
217
|
+
if (!(g === 7 || g === 11))
|
|
218
|
+
return !1;
|
|
219
|
+
y(r);
|
|
220
|
+
const j = r.currentPeek() === ":";
|
|
221
|
+
return r.resetPeek(), j;
|
|
222
|
+
}
|
|
223
|
+
function v(r, o) {
|
|
224
|
+
const { currentType: g } = o;
|
|
225
|
+
if (g !== 9)
|
|
226
|
+
return !1;
|
|
227
|
+
const j = () => {
|
|
228
|
+
const Z = r.currentPeek();
|
|
229
|
+
return Z === "{" ? i(r.peek()) : Z === "@" || Z === "|" || Z === ":" || Z === "." || Z === ke || !Z ? !1 : Z === fe ? (r.peek(), j()) : D(r, !1);
|
|
230
|
+
}, re = j();
|
|
231
|
+
return r.resetPeek(), re;
|
|
232
|
+
}
|
|
233
|
+
function p(r) {
|
|
234
|
+
y(r);
|
|
235
|
+
const o = r.currentPeek() === "|";
|
|
236
|
+
return r.resetPeek(), o;
|
|
237
|
+
}
|
|
238
|
+
function D(r, o = !0) {
|
|
239
|
+
const g = (re = !1, Z = "") => {
|
|
240
|
+
const _ = r.currentPeek();
|
|
241
|
+
return _ === "{" || _ === "@" || !_ ? re : _ === "|" ? !(Z === ke || Z === fe) : _ === ke ? (r.peek(), g(!0, ke)) : _ === fe ? (r.peek(), g(!0, fe)) : !0;
|
|
242
|
+
}, j = g();
|
|
243
|
+
return o && r.resetPeek(), j;
|
|
244
|
+
}
|
|
245
|
+
function F(r, o) {
|
|
246
|
+
const g = r.currentChar();
|
|
247
|
+
return g === Ce ? Ce : o(g) ? (r.next(), g) : null;
|
|
248
|
+
}
|
|
249
|
+
function U(r) {
|
|
250
|
+
const o = r.charCodeAt(0);
|
|
251
|
+
return o >= 97 && o <= 122 || // a-z
|
|
252
|
+
o >= 65 && o <= 90 || // A-Z
|
|
253
|
+
o >= 48 && o <= 57 || // 0-9
|
|
254
|
+
o === 95 || // _
|
|
255
|
+
o === 36;
|
|
256
|
+
}
|
|
257
|
+
function ae(r) {
|
|
258
|
+
return F(r, U);
|
|
259
|
+
}
|
|
260
|
+
function O(r) {
|
|
261
|
+
const o = r.charCodeAt(0);
|
|
262
|
+
return o >= 97 && o <= 122 || // a-z
|
|
263
|
+
o >= 65 && o <= 90 || // A-Z
|
|
264
|
+
o >= 48 && o <= 57 || // 0-9
|
|
265
|
+
o === 95 || // _
|
|
266
|
+
o === 36 || // $
|
|
267
|
+
o === 45;
|
|
268
|
+
}
|
|
269
|
+
function k(r) {
|
|
270
|
+
return F(r, O);
|
|
271
|
+
}
|
|
272
|
+
function M(r) {
|
|
273
|
+
const o = r.charCodeAt(0);
|
|
274
|
+
return o >= 48 && o <= 57;
|
|
275
|
+
}
|
|
276
|
+
function X(r) {
|
|
277
|
+
return F(r, M);
|
|
278
|
+
}
|
|
279
|
+
function x(r) {
|
|
280
|
+
const o = r.charCodeAt(0);
|
|
281
|
+
return o >= 48 && o <= 57 || // 0-9
|
|
282
|
+
o >= 65 && o <= 70 || // A-F
|
|
283
|
+
o >= 97 && o <= 102;
|
|
284
|
+
}
|
|
285
|
+
function W(r) {
|
|
286
|
+
return F(r, x);
|
|
287
|
+
}
|
|
288
|
+
function G(r) {
|
|
289
|
+
let o = "", g = "";
|
|
290
|
+
for (; o = X(r); )
|
|
291
|
+
g += o;
|
|
292
|
+
return g;
|
|
293
|
+
}
|
|
294
|
+
function Y(r) {
|
|
295
|
+
let o = "";
|
|
296
|
+
for (; ; ) {
|
|
297
|
+
const g = r.currentChar();
|
|
298
|
+
if (g === "{" || g === "}" || g === "@" || g === "|" || !g)
|
|
299
|
+
break;
|
|
300
|
+
if (g === ke || g === fe)
|
|
301
|
+
if (D(r))
|
|
302
|
+
o += g, r.next();
|
|
303
|
+
else {
|
|
304
|
+
if (p(r))
|
|
305
|
+
break;
|
|
306
|
+
o += g, r.next();
|
|
307
|
+
}
|
|
308
|
+
else
|
|
309
|
+
o += g, r.next();
|
|
310
|
+
}
|
|
311
|
+
return o;
|
|
312
|
+
}
|
|
313
|
+
function ve(r) {
|
|
314
|
+
A(r);
|
|
315
|
+
let o = "", g = "";
|
|
316
|
+
for (; o = k(r); )
|
|
317
|
+
g += o;
|
|
318
|
+
return r.currentChar() === Ce && L(K.UNTERMINATED_CLOSING_BRACE, a(), 0), g;
|
|
319
|
+
}
|
|
320
|
+
function _e(r) {
|
|
321
|
+
A(r);
|
|
322
|
+
let o = "";
|
|
323
|
+
return r.currentChar() === "-" ? (r.next(), o += `-${G(r)}`) : o += G(r), r.currentChar() === Ce && L(K.UNTERMINATED_CLOSING_BRACE, a(), 0), o;
|
|
324
|
+
}
|
|
325
|
+
function we(r) {
|
|
326
|
+
return r !== sn && r !== fe;
|
|
327
|
+
}
|
|
328
|
+
function ne(r) {
|
|
329
|
+
A(r), V(r, "'");
|
|
330
|
+
let o = "", g = "";
|
|
331
|
+
for (; o = F(r, we); )
|
|
332
|
+
o === "\\" ? g += Ee(r) : g += o;
|
|
333
|
+
const j = r.currentChar();
|
|
334
|
+
return j === fe || j === Ce ? (L(K.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), j === fe && (r.next(), V(r, "'")), g) : (V(r, "'"), g);
|
|
335
|
+
}
|
|
336
|
+
function Ee(r) {
|
|
337
|
+
const o = r.currentChar();
|
|
338
|
+
switch (o) {
|
|
339
|
+
case "\\":
|
|
340
|
+
case "'":
|
|
341
|
+
return r.next(), `\\${o}`;
|
|
342
|
+
case "u":
|
|
343
|
+
return $e(r, o, 4);
|
|
344
|
+
case "U":
|
|
345
|
+
return $e(r, o, 6);
|
|
346
|
+
default:
|
|
347
|
+
return L(K.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, o), "";
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function $e(r, o, g) {
|
|
351
|
+
V(r, o);
|
|
352
|
+
let j = "";
|
|
353
|
+
for (let re = 0; re < g; re++) {
|
|
354
|
+
const Z = W(r);
|
|
355
|
+
if (!Z) {
|
|
356
|
+
L(K.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${o}${j}${r.currentChar()}`);
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
j += Z;
|
|
360
|
+
}
|
|
361
|
+
return `\\${o}${j}`;
|
|
362
|
+
}
|
|
363
|
+
function Je(r) {
|
|
364
|
+
return r !== "{" && r !== "}" && r !== ke && r !== fe;
|
|
365
|
+
}
|
|
366
|
+
function vt(r) {
|
|
367
|
+
A(r);
|
|
368
|
+
let o = "", g = "";
|
|
369
|
+
for (; o = F(r, Je); )
|
|
370
|
+
g += o;
|
|
371
|
+
return g;
|
|
372
|
+
}
|
|
373
|
+
function Et(r) {
|
|
374
|
+
let o = "", g = "";
|
|
375
|
+
for (; o = ae(r); )
|
|
376
|
+
g += o;
|
|
377
|
+
return g;
|
|
378
|
+
}
|
|
379
|
+
function It(r) {
|
|
380
|
+
const o = (g) => {
|
|
381
|
+
const j = r.currentChar();
|
|
382
|
+
return j === "{" || j === "@" || j === "|" || j === "(" || j === ")" || !j || j === ke ? g : (g += j, r.next(), o(g));
|
|
383
|
+
};
|
|
384
|
+
return o("");
|
|
385
|
+
}
|
|
386
|
+
function Ke(r) {
|
|
387
|
+
A(r);
|
|
388
|
+
const o = V(
|
|
389
|
+
r,
|
|
390
|
+
"|"
|
|
391
|
+
/* TokenChars.Pipe */
|
|
392
|
+
);
|
|
393
|
+
return A(r), o;
|
|
394
|
+
}
|
|
395
|
+
function We(r, o) {
|
|
396
|
+
let g = null;
|
|
397
|
+
switch (r.currentChar()) {
|
|
398
|
+
case "{":
|
|
399
|
+
return o.braceNest >= 1 && L(K.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), r.next(), g = I(
|
|
400
|
+
o,
|
|
401
|
+
2,
|
|
402
|
+
"{"
|
|
403
|
+
/* TokenChars.BraceLeft */
|
|
404
|
+
), A(r), o.braceNest++, g;
|
|
405
|
+
case "}":
|
|
406
|
+
return o.braceNest > 0 && o.currentType === 2 && L(K.EMPTY_PLACEHOLDER, a(), 0), r.next(), g = I(
|
|
407
|
+
o,
|
|
408
|
+
3,
|
|
409
|
+
"}"
|
|
410
|
+
/* TokenChars.BraceRight */
|
|
411
|
+
), o.braceNest--, o.braceNest > 0 && A(r), o.inLinked && o.braceNest === 0 && (o.inLinked = !1), g;
|
|
412
|
+
case "@":
|
|
413
|
+
return o.braceNest > 0 && L(K.UNTERMINATED_CLOSING_BRACE, a(), 0), g = Ge(r, o) || w(o), o.braceNest = 0, g;
|
|
414
|
+
default: {
|
|
415
|
+
let re = !0, Z = !0, _ = !0;
|
|
416
|
+
if (p(r))
|
|
417
|
+
return o.braceNest > 0 && L(K.UNTERMINATED_CLOSING_BRACE, a(), 0), g = I(o, 1, Ke(r)), o.braceNest = 0, o.inLinked = !1, g;
|
|
418
|
+
if (o.braceNest > 0 && (o.currentType === 4 || o.currentType === 5 || o.currentType === 6))
|
|
419
|
+
return L(K.UNTERMINATED_CLOSING_BRACE, a(), 0), o.braceNest = 0, ze(r, o);
|
|
420
|
+
if (re = N(r, o))
|
|
421
|
+
return g = I(o, 4, ve(r)), A(r), g;
|
|
422
|
+
if (Z = h(r, o))
|
|
423
|
+
return g = I(o, 5, _e(r)), A(r), g;
|
|
424
|
+
if (_ = S(r, o))
|
|
425
|
+
return g = I(o, 6, ne(r)), A(r), g;
|
|
426
|
+
if (!re && !Z && !_)
|
|
427
|
+
return g = I(o, 12, vt(r)), L(K.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, g.value), A(r), g;
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return g;
|
|
432
|
+
}
|
|
433
|
+
function Ge(r, o) {
|
|
434
|
+
const { currentType: g } = o;
|
|
435
|
+
let j = null;
|
|
436
|
+
const re = r.currentChar();
|
|
437
|
+
switch ((g === 7 || g === 8 || g === 11 || g === 9) && (re === fe || re === ke) && L(K.INVALID_LINKED_FORMAT, a(), 0), re) {
|
|
438
|
+
case "@":
|
|
439
|
+
return r.next(), j = I(
|
|
440
|
+
o,
|
|
441
|
+
7,
|
|
442
|
+
"@"
|
|
443
|
+
/* TokenChars.LinkedAlias */
|
|
444
|
+
), o.inLinked = !0, j;
|
|
445
|
+
case ".":
|
|
446
|
+
return A(r), r.next(), I(
|
|
447
|
+
o,
|
|
448
|
+
8,
|
|
449
|
+
"."
|
|
450
|
+
/* TokenChars.LinkedDot */
|
|
451
|
+
);
|
|
452
|
+
case ":":
|
|
453
|
+
return A(r), r.next(), I(
|
|
454
|
+
o,
|
|
455
|
+
9,
|
|
456
|
+
":"
|
|
457
|
+
/* TokenChars.LinkedDelimiter */
|
|
458
|
+
);
|
|
459
|
+
default:
|
|
460
|
+
return p(r) ? (j = I(o, 1, Ke(r)), o.braceNest = 0, o.inLinked = !1, j) : C(r, o) || R(r, o) ? (A(r), Ge(r, o)) : m(r, o) ? (A(r), I(o, 11, Et(r))) : v(r, o) ? (A(r), re === "{" ? We(r, o) || j : I(o, 10, It(r))) : (g === 7 && L(K.INVALID_LINKED_FORMAT, a(), 0), o.braceNest = 0, o.inLinked = !1, ze(r, o));
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function ze(r, o) {
|
|
464
|
+
let g = {
|
|
465
|
+
type: 13
|
|
466
|
+
/* TokenTypes.EOF */
|
|
467
|
+
};
|
|
468
|
+
if (o.braceNest > 0)
|
|
469
|
+
return We(r, o) || w(o);
|
|
470
|
+
if (o.inLinked)
|
|
471
|
+
return Ge(r, o) || w(o);
|
|
472
|
+
switch (r.currentChar()) {
|
|
473
|
+
case "{":
|
|
474
|
+
return We(r, o) || w(o);
|
|
475
|
+
case "}":
|
|
476
|
+
return L(K.UNBALANCED_CLOSING_BRACE, a(), 0), r.next(), I(
|
|
477
|
+
o,
|
|
478
|
+
3,
|
|
479
|
+
"}"
|
|
480
|
+
/* TokenChars.BraceRight */
|
|
481
|
+
);
|
|
482
|
+
case "@":
|
|
483
|
+
return Ge(r, o) || w(o);
|
|
484
|
+
default: {
|
|
485
|
+
if (p(r))
|
|
486
|
+
return g = I(o, 1, Ke(r)), o.braceNest = 0, o.inLinked = !1, g;
|
|
487
|
+
if (D(r))
|
|
488
|
+
return I(o, 0, Y(r));
|
|
489
|
+
break;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return g;
|
|
493
|
+
}
|
|
494
|
+
function Nt() {
|
|
495
|
+
const { currentType: r, offset: o, startLoc: g, endLoc: j } = u;
|
|
496
|
+
return u.lastType = r, u.lastOffset = o, u.lastStartLoc = g, u.lastEndLoc = j, u.offset = l(), u.startLoc = a(), s.currentChar() === Ce ? I(
|
|
497
|
+
u,
|
|
498
|
+
13
|
|
499
|
+
/* TokenTypes.EOF */
|
|
500
|
+
) : ze(s, u);
|
|
501
|
+
}
|
|
502
|
+
return {
|
|
503
|
+
nextToken: Nt,
|
|
504
|
+
currentOffset: l,
|
|
505
|
+
currentPosition: a,
|
|
506
|
+
context: b
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
const Ss = "parser", Ds = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
|
|
510
|
+
function Ms(e, t, n) {
|
|
511
|
+
switch (e) {
|
|
512
|
+
case "\\\\":
|
|
513
|
+
return "\\";
|
|
514
|
+
case "\\'":
|
|
515
|
+
return "'";
|
|
516
|
+
default: {
|
|
517
|
+
const s = parseInt(t || n, 16);
|
|
518
|
+
return s <= 55295 || s >= 57344 ? String.fromCodePoint(s) : "�";
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
function ws(e = {}) {
|
|
523
|
+
const t = e.location !== !1, { onError: n } = e;
|
|
524
|
+
function s(i, f, N, h, ...S) {
|
|
525
|
+
const C = i.currentPosition();
|
|
526
|
+
if (C.offset += h, C.column += h, n) {
|
|
527
|
+
const m = t ? Mt(N, C) : null, R = ht(f, m, {
|
|
528
|
+
domain: Ss,
|
|
529
|
+
args: S
|
|
530
|
+
});
|
|
531
|
+
n(R);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
function l(i, f, N) {
|
|
535
|
+
const h = { type: i };
|
|
536
|
+
return t && (h.start = f, h.end = f, h.loc = { start: N, end: N }), h;
|
|
537
|
+
}
|
|
538
|
+
function a(i, f, N, h) {
|
|
539
|
+
t && (i.end = f, i.loc && (i.loc.end = N));
|
|
540
|
+
}
|
|
541
|
+
function c(i, f) {
|
|
542
|
+
const N = i.context(), h = l(3, N.offset, N.startLoc);
|
|
543
|
+
return h.value = f, a(h, i.currentOffset(), i.currentPosition()), h;
|
|
544
|
+
}
|
|
545
|
+
function d(i, f) {
|
|
546
|
+
const N = i.context(), { lastOffset: h, lastStartLoc: S } = N, C = l(5, h, S);
|
|
547
|
+
return C.index = parseInt(f, 10), i.nextToken(), a(C, i.currentOffset(), i.currentPosition()), C;
|
|
548
|
+
}
|
|
549
|
+
function u(i, f) {
|
|
550
|
+
const N = i.context(), { lastOffset: h, lastStartLoc: S } = N, C = l(4, h, S);
|
|
551
|
+
return C.key = f, i.nextToken(), a(C, i.currentOffset(), i.currentPosition()), C;
|
|
552
|
+
}
|
|
553
|
+
function b(i, f) {
|
|
554
|
+
const N = i.context(), { lastOffset: h, lastStartLoc: S } = N, C = l(9, h, S);
|
|
555
|
+
return C.value = f.replace(Ds, Ms), i.nextToken(), a(C, i.currentOffset(), i.currentPosition()), C;
|
|
556
|
+
}
|
|
557
|
+
function T(i) {
|
|
558
|
+
const f = i.nextToken(), N = i.context(), { lastOffset: h, lastStartLoc: S } = N, C = l(8, h, S);
|
|
559
|
+
return f.type !== 11 ? (s(i, K.UNEXPECTED_EMPTY_LINKED_MODIFIER, N.lastStartLoc, 0), C.value = "", a(C, h, S), {
|
|
560
|
+
nextConsumeToken: f,
|
|
561
|
+
node: C
|
|
562
|
+
}) : (f.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, N.lastStartLoc, 0, Te(f)), C.value = f.value || "", a(C, i.currentOffset(), i.currentPosition()), {
|
|
563
|
+
node: C
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
function L(i, f) {
|
|
567
|
+
const N = i.context(), h = l(7, N.offset, N.startLoc);
|
|
568
|
+
return h.value = f, a(h, i.currentOffset(), i.currentPosition()), h;
|
|
569
|
+
}
|
|
570
|
+
function I(i) {
|
|
571
|
+
const f = i.context(), N = l(6, f.offset, f.startLoc);
|
|
572
|
+
let h = i.nextToken();
|
|
573
|
+
if (h.type === 8) {
|
|
574
|
+
const S = T(i);
|
|
575
|
+
N.modifier = S.node, h = S.nextConsumeToken || i.nextToken();
|
|
576
|
+
}
|
|
577
|
+
switch (h.type !== 9 && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(h)), h = i.nextToken(), h.type === 2 && (h = i.nextToken()), h.type) {
|
|
578
|
+
case 10:
|
|
579
|
+
h.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(h)), N.key = L(i, h.value || "");
|
|
580
|
+
break;
|
|
581
|
+
case 4:
|
|
582
|
+
h.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(h)), N.key = u(i, h.value || "");
|
|
583
|
+
break;
|
|
584
|
+
case 5:
|
|
585
|
+
h.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(h)), N.key = d(i, h.value || "");
|
|
586
|
+
break;
|
|
587
|
+
case 6:
|
|
588
|
+
h.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(h)), N.key = b(i, h.value || "");
|
|
589
|
+
break;
|
|
590
|
+
default: {
|
|
591
|
+
s(i, K.UNEXPECTED_EMPTY_LINKED_KEY, f.lastStartLoc, 0);
|
|
592
|
+
const S = i.context(), C = l(7, S.offset, S.startLoc);
|
|
593
|
+
return C.value = "", a(C, S.offset, S.startLoc), N.key = C, a(N, S.offset, S.startLoc), {
|
|
594
|
+
nextConsumeToken: h,
|
|
595
|
+
node: N
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return a(N, i.currentOffset(), i.currentPosition()), {
|
|
600
|
+
node: N
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
function w(i) {
|
|
604
|
+
const f = i.context(), N = f.currentType === 1 ? i.currentOffset() : f.offset, h = f.currentType === 1 ? f.endLoc : f.startLoc, S = l(2, N, h);
|
|
605
|
+
S.items = [];
|
|
606
|
+
let C = null;
|
|
607
|
+
do {
|
|
608
|
+
const v = C || i.nextToken();
|
|
609
|
+
switch (C = null, v.type) {
|
|
610
|
+
case 0:
|
|
611
|
+
v.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(v)), S.items.push(c(i, v.value || ""));
|
|
612
|
+
break;
|
|
613
|
+
case 5:
|
|
614
|
+
v.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(v)), S.items.push(d(i, v.value || ""));
|
|
615
|
+
break;
|
|
616
|
+
case 4:
|
|
617
|
+
v.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(v)), S.items.push(u(i, v.value || ""));
|
|
618
|
+
break;
|
|
619
|
+
case 6:
|
|
620
|
+
v.value == null && s(i, K.UNEXPECTED_LEXICAL_ANALYSIS, f.lastStartLoc, 0, Te(v)), S.items.push(b(i, v.value || ""));
|
|
621
|
+
break;
|
|
622
|
+
case 7: {
|
|
623
|
+
const p = I(i);
|
|
624
|
+
S.items.push(p.node), C = p.nextConsumeToken || null;
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
} while (f.currentType !== 13 && f.currentType !== 1);
|
|
629
|
+
const m = f.currentType === 1 ? f.lastOffset : i.currentOffset(), R = f.currentType === 1 ? f.lastEndLoc : i.currentPosition();
|
|
630
|
+
return a(S, m, R), S;
|
|
631
|
+
}
|
|
632
|
+
function V(i, f, N, h) {
|
|
633
|
+
const S = i.context();
|
|
634
|
+
let C = h.items.length === 0;
|
|
635
|
+
const m = l(1, f, N);
|
|
636
|
+
m.cases = [], m.cases.push(h);
|
|
637
|
+
do {
|
|
638
|
+
const R = w(i);
|
|
639
|
+
C || (C = R.items.length === 0), m.cases.push(R);
|
|
640
|
+
} while (S.currentType !== 13);
|
|
641
|
+
return C && s(i, K.MUST_HAVE_MESSAGES_IN_PLURAL, N, 0), a(m, i.currentOffset(), i.currentPosition()), m;
|
|
642
|
+
}
|
|
643
|
+
function y(i) {
|
|
644
|
+
const f = i.context(), { offset: N, startLoc: h } = f, S = w(i);
|
|
645
|
+
return f.currentType === 13 ? S : V(i, N, h, S);
|
|
646
|
+
}
|
|
647
|
+
function A(i) {
|
|
648
|
+
const f = As(i, me({}, e)), N = f.context(), h = l(0, N.offset, N.startLoc);
|
|
649
|
+
return t && h.loc && (h.loc.source = i), h.body = y(f), e.onCacheKey && (h.cacheKey = e.onCacheKey(i)), N.currentType !== 13 && s(f, K.UNEXPECTED_LEXICAL_ANALYSIS, N.lastStartLoc, 0, i[N.offset] || ""), a(h, f.currentOffset(), f.currentPosition()), h;
|
|
650
|
+
}
|
|
651
|
+
return { parse: A };
|
|
652
|
+
}
|
|
653
|
+
function Te(e) {
|
|
654
|
+
if (e.type === 13)
|
|
655
|
+
return "EOF";
|
|
656
|
+
const t = (e.value || "").replace(/\r?\n/gu, "\\n");
|
|
657
|
+
return t.length > 10 ? t.slice(0, 9) + "…" : t;
|
|
658
|
+
}
|
|
659
|
+
function Ps(e, t = {}) {
|
|
660
|
+
const n = {
|
|
661
|
+
ast: e,
|
|
662
|
+
helpers: /* @__PURE__ */ new Set()
|
|
663
|
+
};
|
|
664
|
+
return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
|
|
665
|
+
}
|
|
666
|
+
function an(e, t) {
|
|
667
|
+
for (let n = 0; n < e.length; n++)
|
|
668
|
+
Ht(e[n], t);
|
|
669
|
+
}
|
|
670
|
+
function Ht(e, t) {
|
|
671
|
+
switch (e.type) {
|
|
672
|
+
case 1:
|
|
673
|
+
an(e.cases, t), t.helper(
|
|
674
|
+
"plural"
|
|
675
|
+
/* HelperNameMap.PLURAL */
|
|
676
|
+
);
|
|
677
|
+
break;
|
|
678
|
+
case 2:
|
|
679
|
+
an(e.items, t);
|
|
680
|
+
break;
|
|
681
|
+
case 6: {
|
|
682
|
+
Ht(e.key, t), t.helper(
|
|
683
|
+
"linked"
|
|
684
|
+
/* HelperNameMap.LINKED */
|
|
685
|
+
), t.helper(
|
|
686
|
+
"type"
|
|
687
|
+
/* HelperNameMap.TYPE */
|
|
688
|
+
);
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
case 5:
|
|
692
|
+
t.helper(
|
|
693
|
+
"interpolate"
|
|
694
|
+
/* HelperNameMap.INTERPOLATE */
|
|
695
|
+
), t.helper(
|
|
696
|
+
"list"
|
|
697
|
+
/* HelperNameMap.LIST */
|
|
698
|
+
);
|
|
699
|
+
break;
|
|
700
|
+
case 4:
|
|
701
|
+
t.helper(
|
|
702
|
+
"interpolate"
|
|
703
|
+
/* HelperNameMap.INTERPOLATE */
|
|
704
|
+
), t.helper(
|
|
705
|
+
"named"
|
|
706
|
+
/* HelperNameMap.NAMED */
|
|
707
|
+
);
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
function Fs(e, t = {}) {
|
|
712
|
+
const n = Ps(e);
|
|
713
|
+
n.helper(
|
|
714
|
+
"normalize"
|
|
715
|
+
/* HelperNameMap.NORMALIZE */
|
|
716
|
+
), e.body && Ht(e.body, n);
|
|
717
|
+
const s = n.context();
|
|
718
|
+
e.helpers = Array.from(s.helpers);
|
|
719
|
+
}
|
|
720
|
+
function js(e) {
|
|
721
|
+
const t = e.body;
|
|
722
|
+
return t.type === 2 ? rn(t) : t.cases.forEach((n) => rn(n)), e;
|
|
723
|
+
}
|
|
724
|
+
function rn(e) {
|
|
725
|
+
if (e.items.length === 1) {
|
|
726
|
+
const t = e.items[0];
|
|
727
|
+
(t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
|
|
728
|
+
} else {
|
|
729
|
+
const t = [];
|
|
730
|
+
for (let n = 0; n < e.items.length; n++) {
|
|
731
|
+
const s = e.items[n];
|
|
732
|
+
if (!(s.type === 3 || s.type === 9) || s.value == null)
|
|
733
|
+
break;
|
|
734
|
+
t.push(s.value);
|
|
735
|
+
}
|
|
736
|
+
if (t.length === e.items.length) {
|
|
737
|
+
e.static = Xt(t);
|
|
738
|
+
for (let n = 0; n < e.items.length; n++) {
|
|
739
|
+
const s = e.items[n];
|
|
740
|
+
(s.type === 3 || s.type === 9) && delete s.value;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
function Ye(e) {
|
|
746
|
+
switch (e.t = e.type, e.type) {
|
|
747
|
+
case 0: {
|
|
748
|
+
const t = e;
|
|
749
|
+
Ye(t.body), t.b = t.body, delete t.body;
|
|
750
|
+
break;
|
|
751
|
+
}
|
|
752
|
+
case 1: {
|
|
753
|
+
const t = e, n = t.cases;
|
|
754
|
+
for (let s = 0; s < n.length; s++)
|
|
755
|
+
Ye(n[s]);
|
|
756
|
+
t.c = n, delete t.cases;
|
|
757
|
+
break;
|
|
758
|
+
}
|
|
759
|
+
case 2: {
|
|
760
|
+
const t = e, n = t.items;
|
|
761
|
+
for (let s = 0; s < n.length; s++)
|
|
762
|
+
Ye(n[s]);
|
|
763
|
+
t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
|
|
764
|
+
break;
|
|
765
|
+
}
|
|
766
|
+
case 3:
|
|
767
|
+
case 9:
|
|
768
|
+
case 8:
|
|
769
|
+
case 7: {
|
|
770
|
+
const t = e;
|
|
771
|
+
t.value && (t.v = t.value, delete t.value);
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
case 6: {
|
|
775
|
+
const t = e;
|
|
776
|
+
Ye(t.key), t.k = t.key, delete t.key, t.modifier && (Ye(t.modifier), t.m = t.modifier, delete t.modifier);
|
|
777
|
+
break;
|
|
778
|
+
}
|
|
779
|
+
case 5: {
|
|
780
|
+
const t = e;
|
|
781
|
+
t.i = t.index, delete t.index;
|
|
782
|
+
break;
|
|
783
|
+
}
|
|
784
|
+
case 4: {
|
|
785
|
+
const t = e;
|
|
786
|
+
t.k = t.key, delete t.key;
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
delete e.type;
|
|
791
|
+
}
|
|
792
|
+
function Us(e, t) {
|
|
793
|
+
const { filename: n, breakLineCode: s, needIndent: l } = t, a = t.location !== !1, c = {
|
|
794
|
+
filename: n,
|
|
795
|
+
code: "",
|
|
796
|
+
column: 1,
|
|
797
|
+
line: 1,
|
|
798
|
+
offset: 0,
|
|
799
|
+
map: void 0,
|
|
800
|
+
breakLineCode: s,
|
|
801
|
+
needIndent: l,
|
|
802
|
+
indentLevel: 0
|
|
803
|
+
};
|
|
804
|
+
a && e.loc && (c.source = e.loc.source);
|
|
805
|
+
const d = () => c;
|
|
806
|
+
function u(y, A) {
|
|
807
|
+
c.code += y;
|
|
808
|
+
}
|
|
809
|
+
function b(y, A = !0) {
|
|
810
|
+
const i = A ? s : "";
|
|
811
|
+
u(l ? i + " ".repeat(y) : i);
|
|
812
|
+
}
|
|
813
|
+
function T(y = !0) {
|
|
814
|
+
const A = ++c.indentLevel;
|
|
815
|
+
y && b(A);
|
|
816
|
+
}
|
|
817
|
+
function L(y = !0) {
|
|
818
|
+
const A = --c.indentLevel;
|
|
819
|
+
y && b(A);
|
|
820
|
+
}
|
|
821
|
+
function I() {
|
|
822
|
+
b(c.indentLevel);
|
|
823
|
+
}
|
|
824
|
+
return {
|
|
825
|
+
context: d,
|
|
826
|
+
push: u,
|
|
827
|
+
indent: T,
|
|
828
|
+
deindent: L,
|
|
829
|
+
newline: I,
|
|
830
|
+
helper: (y) => `_${y}`,
|
|
831
|
+
needIndent: () => c.needIndent
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
function Vs(e, t) {
|
|
835
|
+
const { helper: n } = e;
|
|
836
|
+
e.push(`${n(
|
|
837
|
+
"linked"
|
|
838
|
+
/* HelperNameMap.LINKED */
|
|
839
|
+
)}(`), Xe(e, t.key), t.modifier ? (e.push(", "), Xe(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
|
|
840
|
+
}
|
|
841
|
+
function Ws(e, t) {
|
|
842
|
+
const { helper: n, needIndent: s } = e;
|
|
843
|
+
e.push(`${n(
|
|
844
|
+
"normalize"
|
|
845
|
+
/* HelperNameMap.NORMALIZE */
|
|
846
|
+
)}([`), e.indent(s());
|
|
847
|
+
const l = t.items.length;
|
|
848
|
+
for (let a = 0; a < l && (Xe(e, t.items[a]), a !== l - 1); a++)
|
|
849
|
+
e.push(", ");
|
|
850
|
+
e.deindent(s()), e.push("])");
|
|
851
|
+
}
|
|
852
|
+
function Gs(e, t) {
|
|
853
|
+
const { helper: n, needIndent: s } = e;
|
|
854
|
+
if (t.cases.length > 1) {
|
|
855
|
+
e.push(`${n(
|
|
856
|
+
"plural"
|
|
857
|
+
/* HelperNameMap.PLURAL */
|
|
858
|
+
)}([`), e.indent(s());
|
|
859
|
+
const l = t.cases.length;
|
|
860
|
+
for (let a = 0; a < l && (Xe(e, t.cases[a]), a !== l - 1); a++)
|
|
861
|
+
e.push(", ");
|
|
862
|
+
e.deindent(s()), e.push("])");
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function xs(e, t) {
|
|
866
|
+
t.body ? Xe(e, t.body) : e.push("null");
|
|
867
|
+
}
|
|
868
|
+
function Xe(e, t) {
|
|
869
|
+
const { helper: n } = e;
|
|
870
|
+
switch (t.type) {
|
|
871
|
+
case 0:
|
|
872
|
+
xs(e, t);
|
|
873
|
+
break;
|
|
874
|
+
case 1:
|
|
875
|
+
Gs(e, t);
|
|
876
|
+
break;
|
|
877
|
+
case 2:
|
|
878
|
+
Ws(e, t);
|
|
879
|
+
break;
|
|
880
|
+
case 6:
|
|
881
|
+
Vs(e, t);
|
|
882
|
+
break;
|
|
883
|
+
case 8:
|
|
884
|
+
e.push(JSON.stringify(t.value), t);
|
|
885
|
+
break;
|
|
886
|
+
case 7:
|
|
887
|
+
e.push(JSON.stringify(t.value), t);
|
|
888
|
+
break;
|
|
889
|
+
case 5:
|
|
890
|
+
e.push(`${n(
|
|
891
|
+
"interpolate"
|
|
892
|
+
/* HelperNameMap.INTERPOLATE */
|
|
893
|
+
)}(${n(
|
|
894
|
+
"list"
|
|
895
|
+
/* HelperNameMap.LIST */
|
|
896
|
+
)}(${t.index}))`, t);
|
|
897
|
+
break;
|
|
898
|
+
case 4:
|
|
899
|
+
e.push(`${n(
|
|
900
|
+
"interpolate"
|
|
901
|
+
/* HelperNameMap.INTERPOLATE */
|
|
902
|
+
)}(${n(
|
|
903
|
+
"named"
|
|
904
|
+
/* HelperNameMap.NAMED */
|
|
905
|
+
)}(${JSON.stringify(t.key)}))`, t);
|
|
906
|
+
break;
|
|
907
|
+
case 9:
|
|
908
|
+
e.push(JSON.stringify(t.value), t);
|
|
909
|
+
break;
|
|
910
|
+
case 3:
|
|
911
|
+
e.push(JSON.stringify(t.value), t);
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
const Ys = (e, t = {}) => {
|
|
916
|
+
const n = P(t.mode) ? t.mode : "normal", s = P(t.filename) ? t.filename : "message.intl";
|
|
917
|
+
t.sourceMap;
|
|
918
|
+
const l = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
|
|
919
|
+
`, a = t.needIndent ? t.needIndent : n !== "arrow", c = e.helpers || [], d = Us(e, {
|
|
920
|
+
filename: s,
|
|
921
|
+
breakLineCode: l,
|
|
922
|
+
needIndent: a
|
|
923
|
+
});
|
|
924
|
+
d.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), d.indent(a), c.length > 0 && (d.push(`const { ${Xt(c.map((T) => `${T}: _${T}`), ", ")} } = ctx`), d.newline()), d.push("return "), Xe(d, e), d.deindent(a), d.push("}"), delete e.helpers;
|
|
925
|
+
const { code: u, map: b } = d.context();
|
|
926
|
+
return {
|
|
927
|
+
ast: e,
|
|
928
|
+
code: u,
|
|
929
|
+
map: b ? b.toJSON() : void 0
|
|
930
|
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
function Zs(e, t = {}) {
|
|
934
|
+
const n = me({}, t), s = !!n.jit, l = !!n.minify, a = n.optimize == null ? !0 : n.optimize, d = ws(n).parse(e);
|
|
935
|
+
return s ? (a && js(d), l && Ye(d), { ast: d, code: "" }) : (Fs(d, n), Ys(d, n));
|
|
936
|
+
}
|
|
937
|
+
var Xs = { env: { NODE_ENV: "production" } };
|
|
938
|
+
function Hs() {
|
|
939
|
+
typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (je().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (je().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
|
|
940
|
+
}
|
|
941
|
+
function Lt(e) {
|
|
942
|
+
return (n) => Bs(n, e);
|
|
943
|
+
}
|
|
944
|
+
function Bs(e, t) {
|
|
945
|
+
const n = Js(t);
|
|
946
|
+
if (n == null)
|
|
947
|
+
throw et(
|
|
948
|
+
0
|
|
949
|
+
/* NodeTypes.Resource */
|
|
950
|
+
);
|
|
951
|
+
if (Bt(n) === 1) {
|
|
952
|
+
const a = zs(n);
|
|
953
|
+
return e.plural(a.reduce((c, d) => [
|
|
954
|
+
...c,
|
|
955
|
+
ln(e, d)
|
|
956
|
+
], []));
|
|
957
|
+
} else
|
|
958
|
+
return ln(e, n);
|
|
959
|
+
}
|
|
960
|
+
const $s = ["b", "body"];
|
|
961
|
+
function Js(e) {
|
|
962
|
+
return De(e, $s);
|
|
963
|
+
}
|
|
964
|
+
const Ks = ["c", "cases"];
|
|
965
|
+
function zs(e) {
|
|
966
|
+
return De(e, Ks, []);
|
|
967
|
+
}
|
|
968
|
+
function ln(e, t) {
|
|
969
|
+
const n = qs(t);
|
|
970
|
+
if (n != null)
|
|
971
|
+
return e.type === "text" ? n : e.normalize([n]);
|
|
972
|
+
{
|
|
973
|
+
const s = ta(t).reduce((l, a) => [...l, wt(e, a)], []);
|
|
974
|
+
return e.normalize(s);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
const Qs = ["s", "static"];
|
|
978
|
+
function qs(e) {
|
|
979
|
+
return De(e, Qs);
|
|
980
|
+
}
|
|
981
|
+
const ea = ["i", "items"];
|
|
982
|
+
function ta(e) {
|
|
983
|
+
return De(e, ea, []);
|
|
984
|
+
}
|
|
985
|
+
function wt(e, t) {
|
|
986
|
+
const n = Bt(t);
|
|
987
|
+
switch (n) {
|
|
988
|
+
case 3:
|
|
989
|
+
return lt(t, n);
|
|
990
|
+
case 9:
|
|
991
|
+
return lt(t, n);
|
|
992
|
+
case 4: {
|
|
993
|
+
const s = t;
|
|
994
|
+
if (Ne(s, "k") && s.k)
|
|
995
|
+
return e.interpolate(e.named(s.k));
|
|
996
|
+
if (Ne(s, "key") && s.key)
|
|
997
|
+
return e.interpolate(e.named(s.key));
|
|
998
|
+
throw et(n);
|
|
999
|
+
}
|
|
1000
|
+
case 5: {
|
|
1001
|
+
const s = t;
|
|
1002
|
+
if (Ne(s, "i") && ue(s.i))
|
|
1003
|
+
return e.interpolate(e.list(s.i));
|
|
1004
|
+
if (Ne(s, "index") && ue(s.index))
|
|
1005
|
+
return e.interpolate(e.list(s.index));
|
|
1006
|
+
throw et(n);
|
|
1007
|
+
}
|
|
1008
|
+
case 6: {
|
|
1009
|
+
const s = t, l = ra(s), a = oa(s);
|
|
1010
|
+
return e.linked(wt(e, a), l ? wt(e, l) : void 0, e.type);
|
|
1011
|
+
}
|
|
1012
|
+
case 7:
|
|
1013
|
+
return lt(t, n);
|
|
1014
|
+
case 8:
|
|
1015
|
+
return lt(t, n);
|
|
1016
|
+
default:
|
|
1017
|
+
throw new Error(`unhandled node on format message part: ${n}`);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
const na = ["t", "type"];
|
|
1021
|
+
function Bt(e) {
|
|
1022
|
+
return De(e, na);
|
|
1023
|
+
}
|
|
1024
|
+
const sa = ["v", "value"];
|
|
1025
|
+
function lt(e, t) {
|
|
1026
|
+
const n = De(e, sa);
|
|
1027
|
+
if (n)
|
|
1028
|
+
return n;
|
|
1029
|
+
throw et(t);
|
|
1030
|
+
}
|
|
1031
|
+
const aa = ["m", "modifier"];
|
|
1032
|
+
function ra(e) {
|
|
1033
|
+
return De(e, aa);
|
|
1034
|
+
}
|
|
1035
|
+
const la = ["k", "key"];
|
|
1036
|
+
function oa(e) {
|
|
1037
|
+
const t = De(e, la);
|
|
1038
|
+
if (t)
|
|
1039
|
+
return t;
|
|
1040
|
+
throw et(
|
|
1041
|
+
6
|
|
1042
|
+
/* NodeTypes.Linked */
|
|
1043
|
+
);
|
|
1044
|
+
}
|
|
1045
|
+
function De(e, t, n) {
|
|
1046
|
+
for (let s = 0; s < t.length; s++) {
|
|
1047
|
+
const l = t[s];
|
|
1048
|
+
if (Ne(e, l) && e[l] != null)
|
|
1049
|
+
return e[l];
|
|
1050
|
+
}
|
|
1051
|
+
return n;
|
|
1052
|
+
}
|
|
1053
|
+
function et(e) {
|
|
1054
|
+
return new Error(`unhandled node type: ${e}`);
|
|
1055
|
+
}
|
|
1056
|
+
const ia = (e) => e;
|
|
1057
|
+
let ot = z();
|
|
1058
|
+
function He(e) {
|
|
1059
|
+
return J(e) && Bt(e) === 0 && (Ne(e, "b") || Ne(e, "body"));
|
|
1060
|
+
}
|
|
1061
|
+
function ca(e, t = {}) {
|
|
1062
|
+
let n = !1;
|
|
1063
|
+
const s = t.onError || ys;
|
|
1064
|
+
return t.onError = (l) => {
|
|
1065
|
+
n = !0, s(l);
|
|
1066
|
+
}, { ...Zs(e, t), detectError: n };
|
|
1067
|
+
}
|
|
1068
|
+
// @__NO_SIDE_EFFECTS__
|
|
1069
|
+
function ua(e, t) {
|
|
1070
|
+
if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && P(e)) {
|
|
1071
|
+
oe(t.warnHtmlMessage) && t.warnHtmlMessage;
|
|
1072
|
+
const s = (t.onCacheKey || ia)(e), l = ot[s];
|
|
1073
|
+
if (l)
|
|
1074
|
+
return l;
|
|
1075
|
+
const { ast: a, detectError: c } = ca(e, {
|
|
1076
|
+
...t,
|
|
1077
|
+
location: Xs.env.NODE_ENV !== "production",
|
|
1078
|
+
jit: !0
|
|
1079
|
+
}), d = Lt(a);
|
|
1080
|
+
return c ? d : ot[s] = d;
|
|
1081
|
+
} else {
|
|
1082
|
+
const n = e.cacheKey;
|
|
1083
|
+
if (n) {
|
|
1084
|
+
const s = ot[n];
|
|
1085
|
+
return s || (ot[n] = Lt(e));
|
|
1086
|
+
} else
|
|
1087
|
+
return Lt(e);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
let tt = null;
|
|
1091
|
+
function ma(e) {
|
|
1092
|
+
tt = e;
|
|
1093
|
+
}
|
|
1094
|
+
function da(e, t, n) {
|
|
1095
|
+
tt && tt.emit("i18n:init", {
|
|
1096
|
+
timestamp: Date.now(),
|
|
1097
|
+
i18n: e,
|
|
1098
|
+
version: t,
|
|
1099
|
+
meta: n
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
const fa = /* @__PURE__ */ _a("function:translate");
|
|
1103
|
+
function _a(e) {
|
|
1104
|
+
return (t) => tt && tt.emit(e, t);
|
|
1105
|
+
}
|
|
1106
|
+
const Oe = {
|
|
1107
|
+
INVALID_ARGUMENT: Ns,
|
|
1108
|
+
// 17
|
|
1109
|
+
INVALID_DATE_ARGUMENT: 18,
|
|
1110
|
+
INVALID_ISO_DATE_ARGUMENT: 19,
|
|
1111
|
+
NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
|
|
1112
|
+
NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
|
|
1113
|
+
NOT_SUPPORT_LOCALE_TYPE: 23
|
|
1114
|
+
}, pa = 24;
|
|
1115
|
+
function Re(e) {
|
|
1116
|
+
return ht(e, null, void 0);
|
|
1117
|
+
}
|
|
1118
|
+
function $t(e, t) {
|
|
1119
|
+
return t.locale != null ? on(t.locale) : on(e.locale);
|
|
1120
|
+
}
|
|
1121
|
+
let Ot;
|
|
1122
|
+
function on(e) {
|
|
1123
|
+
if (P(e))
|
|
1124
|
+
return e;
|
|
1125
|
+
if (se(e)) {
|
|
1126
|
+
if (e.resolvedOnce && Ot != null)
|
|
1127
|
+
return Ot;
|
|
1128
|
+
if (e.constructor.name === "Function") {
|
|
1129
|
+
const t = e();
|
|
1130
|
+
if (gs(t))
|
|
1131
|
+
throw Re(Oe.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
|
|
1132
|
+
return Ot = t;
|
|
1133
|
+
} else
|
|
1134
|
+
throw Re(Oe.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
|
|
1135
|
+
} else
|
|
1136
|
+
throw Re(Oe.NOT_SUPPORT_LOCALE_TYPE);
|
|
1137
|
+
}
|
|
1138
|
+
function ha(e, t, n) {
|
|
1139
|
+
return [.../* @__PURE__ */ new Set([
|
|
1140
|
+
n,
|
|
1141
|
+
...ie(t) ? t : J(t) ? Object.keys(t) : P(t) ? [t] : [n]
|
|
1142
|
+
])];
|
|
1143
|
+
}
|
|
1144
|
+
function Mn(e, t, n) {
|
|
1145
|
+
const s = P(n) ? n : ft, l = e;
|
|
1146
|
+
l.__localeChainCache || (l.__localeChainCache = /* @__PURE__ */ new Map());
|
|
1147
|
+
let a = l.__localeChainCache.get(s);
|
|
1148
|
+
if (!a) {
|
|
1149
|
+
a = [];
|
|
1150
|
+
let c = [n];
|
|
1151
|
+
for (; ie(c); )
|
|
1152
|
+
c = cn(a, c, t);
|
|
1153
|
+
const d = ie(t) || !$(t) ? t : t.default ? t.default : null;
|
|
1154
|
+
c = P(d) ? [d] : d, ie(c) && cn(a, c, !1), l.__localeChainCache.set(s, a);
|
|
1155
|
+
}
|
|
1156
|
+
return a;
|
|
1157
|
+
}
|
|
1158
|
+
function cn(e, t, n) {
|
|
1159
|
+
let s = !0;
|
|
1160
|
+
for (let l = 0; l < t.length && oe(s); l++) {
|
|
1161
|
+
const a = t[l];
|
|
1162
|
+
P(a) && (s = ba(e, t[l], n));
|
|
1163
|
+
}
|
|
1164
|
+
return s;
|
|
1165
|
+
}
|
|
1166
|
+
function ba(e, t, n) {
|
|
1167
|
+
let s;
|
|
1168
|
+
const l = t.split("-");
|
|
1169
|
+
do {
|
|
1170
|
+
const a = l.join("-");
|
|
1171
|
+
s = ga(e, a, n), l.splice(-1, 1);
|
|
1172
|
+
} while (l.length && s === !0);
|
|
1173
|
+
return s;
|
|
1174
|
+
}
|
|
1175
|
+
function ga(e, t, n) {
|
|
1176
|
+
let s = !1;
|
|
1177
|
+
if (!e.includes(t) && (s = !0, t)) {
|
|
1178
|
+
s = t[t.length - 1] !== "!";
|
|
1179
|
+
const l = t.replace(/!/g, "");
|
|
1180
|
+
e.push(l), (ie(n) || $(n)) && n[l] && (s = n[l]);
|
|
1181
|
+
}
|
|
1182
|
+
return s;
|
|
1183
|
+
}
|
|
1184
|
+
const Me = [];
|
|
1185
|
+
Me[
|
|
1186
|
+
0
|
|
1187
|
+
/* States.BEFORE_PATH */
|
|
1188
|
+
] = {
|
|
1189
|
+
w: [
|
|
1190
|
+
0
|
|
1191
|
+
/* States.BEFORE_PATH */
|
|
1192
|
+
],
|
|
1193
|
+
i: [
|
|
1194
|
+
3,
|
|
1195
|
+
0
|
|
1196
|
+
/* Actions.APPEND */
|
|
1197
|
+
],
|
|
1198
|
+
"[": [
|
|
1199
|
+
4
|
|
1200
|
+
/* States.IN_SUB_PATH */
|
|
1201
|
+
],
|
|
1202
|
+
o: [
|
|
1203
|
+
7
|
|
1204
|
+
/* States.AFTER_PATH */
|
|
1205
|
+
]
|
|
1206
|
+
};
|
|
1207
|
+
Me[
|
|
1208
|
+
1
|
|
1209
|
+
/* States.IN_PATH */
|
|
1210
|
+
] = {
|
|
1211
|
+
w: [
|
|
1212
|
+
1
|
|
1213
|
+
/* States.IN_PATH */
|
|
1214
|
+
],
|
|
1215
|
+
".": [
|
|
1216
|
+
2
|
|
1217
|
+
/* States.BEFORE_IDENT */
|
|
1218
|
+
],
|
|
1219
|
+
"[": [
|
|
1220
|
+
4
|
|
1221
|
+
/* States.IN_SUB_PATH */
|
|
1222
|
+
],
|
|
1223
|
+
o: [
|
|
1224
|
+
7
|
|
1225
|
+
/* States.AFTER_PATH */
|
|
1226
|
+
]
|
|
1227
|
+
};
|
|
1228
|
+
Me[
|
|
1229
|
+
2
|
|
1230
|
+
/* States.BEFORE_IDENT */
|
|
1231
|
+
] = {
|
|
1232
|
+
w: [
|
|
1233
|
+
2
|
|
1234
|
+
/* States.BEFORE_IDENT */
|
|
1235
|
+
],
|
|
1236
|
+
i: [
|
|
1237
|
+
3,
|
|
1238
|
+
0
|
|
1239
|
+
/* Actions.APPEND */
|
|
1240
|
+
],
|
|
1241
|
+
0: [
|
|
1242
|
+
3,
|
|
1243
|
+
0
|
|
1244
|
+
/* Actions.APPEND */
|
|
1245
|
+
]
|
|
1246
|
+
};
|
|
1247
|
+
Me[
|
|
1248
|
+
3
|
|
1249
|
+
/* States.IN_IDENT */
|
|
1250
|
+
] = {
|
|
1251
|
+
i: [
|
|
1252
|
+
3,
|
|
1253
|
+
0
|
|
1254
|
+
/* Actions.APPEND */
|
|
1255
|
+
],
|
|
1256
|
+
0: [
|
|
1257
|
+
3,
|
|
1258
|
+
0
|
|
1259
|
+
/* Actions.APPEND */
|
|
1260
|
+
],
|
|
1261
|
+
w: [
|
|
1262
|
+
1,
|
|
1263
|
+
1
|
|
1264
|
+
/* Actions.PUSH */
|
|
1265
|
+
],
|
|
1266
|
+
".": [
|
|
1267
|
+
2,
|
|
1268
|
+
1
|
|
1269
|
+
/* Actions.PUSH */
|
|
1270
|
+
],
|
|
1271
|
+
"[": [
|
|
1272
|
+
4,
|
|
1273
|
+
1
|
|
1274
|
+
/* Actions.PUSH */
|
|
1275
|
+
],
|
|
1276
|
+
o: [
|
|
1277
|
+
7,
|
|
1278
|
+
1
|
|
1279
|
+
/* Actions.PUSH */
|
|
1280
|
+
]
|
|
1281
|
+
};
|
|
1282
|
+
Me[
|
|
1283
|
+
4
|
|
1284
|
+
/* States.IN_SUB_PATH */
|
|
1285
|
+
] = {
|
|
1286
|
+
"'": [
|
|
1287
|
+
5,
|
|
1288
|
+
0
|
|
1289
|
+
/* Actions.APPEND */
|
|
1290
|
+
],
|
|
1291
|
+
'"': [
|
|
1292
|
+
6,
|
|
1293
|
+
0
|
|
1294
|
+
/* Actions.APPEND */
|
|
1295
|
+
],
|
|
1296
|
+
"[": [
|
|
1297
|
+
4,
|
|
1298
|
+
2
|
|
1299
|
+
/* Actions.INC_SUB_PATH_DEPTH */
|
|
1300
|
+
],
|
|
1301
|
+
"]": [
|
|
1302
|
+
1,
|
|
1303
|
+
3
|
|
1304
|
+
/* Actions.PUSH_SUB_PATH */
|
|
1305
|
+
],
|
|
1306
|
+
o: 8,
|
|
1307
|
+
l: [
|
|
1308
|
+
4,
|
|
1309
|
+
0
|
|
1310
|
+
/* Actions.APPEND */
|
|
1311
|
+
]
|
|
1312
|
+
};
|
|
1313
|
+
Me[
|
|
1314
|
+
5
|
|
1315
|
+
/* States.IN_SINGLE_QUOTE */
|
|
1316
|
+
] = {
|
|
1317
|
+
"'": [
|
|
1318
|
+
4,
|
|
1319
|
+
0
|
|
1320
|
+
/* Actions.APPEND */
|
|
1321
|
+
],
|
|
1322
|
+
o: 8,
|
|
1323
|
+
l: [
|
|
1324
|
+
5,
|
|
1325
|
+
0
|
|
1326
|
+
/* Actions.APPEND */
|
|
1327
|
+
]
|
|
1328
|
+
};
|
|
1329
|
+
Me[
|
|
1330
|
+
6
|
|
1331
|
+
/* States.IN_DOUBLE_QUOTE */
|
|
1332
|
+
] = {
|
|
1333
|
+
'"': [
|
|
1334
|
+
4,
|
|
1335
|
+
0
|
|
1336
|
+
/* Actions.APPEND */
|
|
1337
|
+
],
|
|
1338
|
+
o: 8,
|
|
1339
|
+
l: [
|
|
1340
|
+
6,
|
|
1341
|
+
0
|
|
1342
|
+
/* Actions.APPEND */
|
|
1343
|
+
]
|
|
1344
|
+
};
|
|
1345
|
+
const va = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
|
|
1346
|
+
function Ea(e) {
|
|
1347
|
+
return va.test(e);
|
|
1348
|
+
}
|
|
1349
|
+
function Ia(e) {
|
|
1350
|
+
const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
|
|
1351
|
+
return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
|
|
1352
|
+
}
|
|
1353
|
+
function Na(e) {
|
|
1354
|
+
if (e == null)
|
|
1355
|
+
return "o";
|
|
1356
|
+
switch (e.charCodeAt(0)) {
|
|
1357
|
+
case 91:
|
|
1358
|
+
case 93:
|
|
1359
|
+
case 46:
|
|
1360
|
+
case 34:
|
|
1361
|
+
case 39:
|
|
1362
|
+
return e;
|
|
1363
|
+
case 95:
|
|
1364
|
+
case 36:
|
|
1365
|
+
case 45:
|
|
1366
|
+
return "i";
|
|
1367
|
+
case 9:
|
|
1368
|
+
case 10:
|
|
1369
|
+
case 13:
|
|
1370
|
+
case 160:
|
|
1371
|
+
case 65279:
|
|
1372
|
+
case 8232:
|
|
1373
|
+
case 8233:
|
|
1374
|
+
return "w";
|
|
1375
|
+
}
|
|
1376
|
+
return "i";
|
|
1377
|
+
}
|
|
1378
|
+
function ya(e) {
|
|
1379
|
+
const t = e.trim();
|
|
1380
|
+
return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : Ea(t) ? Ia(t) : "*" + t;
|
|
1381
|
+
}
|
|
1382
|
+
function Ta(e) {
|
|
1383
|
+
const t = [];
|
|
1384
|
+
let n = -1, s = 0, l = 0, a, c, d, u, b, T, L;
|
|
1385
|
+
const I = [];
|
|
1386
|
+
I[
|
|
1387
|
+
0
|
|
1388
|
+
/* Actions.APPEND */
|
|
1389
|
+
] = () => {
|
|
1390
|
+
c === void 0 ? c = d : c += d;
|
|
1391
|
+
}, I[
|
|
1392
|
+
1
|
|
1393
|
+
/* Actions.PUSH */
|
|
1394
|
+
] = () => {
|
|
1395
|
+
c !== void 0 && (t.push(c), c = void 0);
|
|
1396
|
+
}, I[
|
|
1397
|
+
2
|
|
1398
|
+
/* Actions.INC_SUB_PATH_DEPTH */
|
|
1399
|
+
] = () => {
|
|
1400
|
+
I[
|
|
1401
|
+
0
|
|
1402
|
+
/* Actions.APPEND */
|
|
1403
|
+
](), l++;
|
|
1404
|
+
}, I[
|
|
1405
|
+
3
|
|
1406
|
+
/* Actions.PUSH_SUB_PATH */
|
|
1407
|
+
] = () => {
|
|
1408
|
+
if (l > 0)
|
|
1409
|
+
l--, s = 4, I[
|
|
1410
|
+
0
|
|
1411
|
+
/* Actions.APPEND */
|
|
1412
|
+
]();
|
|
1413
|
+
else {
|
|
1414
|
+
if (l = 0, c === void 0 || (c = ya(c), c === !1))
|
|
1415
|
+
return !1;
|
|
1416
|
+
I[
|
|
1417
|
+
1
|
|
1418
|
+
/* Actions.PUSH */
|
|
1419
|
+
]();
|
|
1420
|
+
}
|
|
1421
|
+
};
|
|
1422
|
+
function w() {
|
|
1423
|
+
const V = e[n + 1];
|
|
1424
|
+
if (s === 5 && V === "'" || s === 6 && V === '"')
|
|
1425
|
+
return n++, d = "\\" + V, I[
|
|
1426
|
+
0
|
|
1427
|
+
/* Actions.APPEND */
|
|
1428
|
+
](), !0;
|
|
1429
|
+
}
|
|
1430
|
+
for (; s !== null; )
|
|
1431
|
+
if (n++, a = e[n], !(a === "\\" && w())) {
|
|
1432
|
+
if (u = Na(a), L = Me[s], b = L[u] || L.l || 8, b === 8 || (s = b[0], b[1] !== void 0 && (T = I[b[1]], T && (d = a, T() === !1))))
|
|
1433
|
+
return;
|
|
1434
|
+
if (s === 7)
|
|
1435
|
+
return t;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
const un = /* @__PURE__ */ new Map();
|
|
1439
|
+
function ka(e, t) {
|
|
1440
|
+
return J(e) ? e[t] : null;
|
|
1441
|
+
}
|
|
1442
|
+
function La(e, t) {
|
|
1443
|
+
if (!J(e))
|
|
1444
|
+
return null;
|
|
1445
|
+
let n = un.get(t);
|
|
1446
|
+
if (n || (n = Ta(t), n && un.set(t, n)), !n)
|
|
1447
|
+
return null;
|
|
1448
|
+
const s = n.length;
|
|
1449
|
+
let l = e, a = 0;
|
|
1450
|
+
for (; a < s; ) {
|
|
1451
|
+
const c = l[n[a]];
|
|
1452
|
+
if (c === void 0 || se(l))
|
|
1453
|
+
return null;
|
|
1454
|
+
l = c, a++;
|
|
1455
|
+
}
|
|
1456
|
+
return l;
|
|
1457
|
+
}
|
|
1458
|
+
const Oa = "10.0.5", bt = -1, ft = "en-US", mn = "", dn = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
|
|
1459
|
+
function Ra() {
|
|
1460
|
+
return {
|
|
1461
|
+
upper: (e, t) => t === "text" && P(e) ? e.toUpperCase() : t === "vnode" && J(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
|
|
1462
|
+
lower: (e, t) => t === "text" && P(e) ? e.toLowerCase() : t === "vnode" && J(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
|
|
1463
|
+
capitalize: (e, t) => t === "text" && P(e) ? dn(e) : t === "vnode" && J(e) && "__v_isVNode" in e ? dn(e.children) : e
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
let wn;
|
|
1467
|
+
function Ca(e) {
|
|
1468
|
+
wn = e;
|
|
1469
|
+
}
|
|
1470
|
+
let Pn;
|
|
1471
|
+
function Aa(e) {
|
|
1472
|
+
Pn = e;
|
|
1473
|
+
}
|
|
1474
|
+
let Fn;
|
|
1475
|
+
function Sa(e) {
|
|
1476
|
+
Fn = e;
|
|
1477
|
+
}
|
|
1478
|
+
let jn = null;
|
|
1479
|
+
const Da = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
1480
|
+
jn = e;
|
|
1481
|
+
}, Ma = /* @__NO_SIDE_EFFECTS__ */ () => jn;
|
|
1482
|
+
let Un = null;
|
|
1483
|
+
const fn = (e) => {
|
|
1484
|
+
Un = e;
|
|
1485
|
+
}, wa = () => Un;
|
|
1486
|
+
let _n = 0;
|
|
1487
|
+
function Pa(e = {}) {
|
|
1488
|
+
const t = se(e.onWarn) ? e.onWarn : Es, n = P(e.version) ? e.version : Oa, s = P(e.locale) || se(e.locale) ? e.locale : ft, l = se(s) ? ft : s, a = ie(e.fallbackLocale) || $(e.fallbackLocale) || P(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : l, c = $(e.messages) ? e.messages : Rt(l), d = $(e.datetimeFormats) ? e.datetimeFormats : Rt(l), u = $(e.numberFormats) ? e.numberFormats : Rt(l), b = me(z(), e.modifiers, Ra()), T = e.pluralRules || z(), L = se(e.missing) ? e.missing : null, I = oe(e.missingWarn) || dt(e.missingWarn) ? e.missingWarn : !0, w = oe(e.fallbackWarn) || dt(e.fallbackWarn) ? e.fallbackWarn : !0, V = !!e.fallbackFormat, y = !!e.unresolving, A = se(e.postTranslation) ? e.postTranslation : null, i = $(e.processor) ? e.processor : null, f = oe(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, N = !!e.escapeParameter, h = se(e.messageCompiler) ? e.messageCompiler : wn, S = se(e.messageResolver) ? e.messageResolver : Pn || ka, C = se(e.localeFallbacker) ? e.localeFallbacker : Fn || ha, m = J(e.fallbackContext) ? e.fallbackContext : void 0, R = e, v = J(R.__datetimeFormatters) ? R.__datetimeFormatters : /* @__PURE__ */ new Map(), p = J(R.__numberFormatters) ? R.__numberFormatters : /* @__PURE__ */ new Map(), D = J(R.__meta) ? R.__meta : {};
|
|
1489
|
+
_n++;
|
|
1490
|
+
const F = {
|
|
1491
|
+
version: n,
|
|
1492
|
+
cid: _n,
|
|
1493
|
+
locale: s,
|
|
1494
|
+
fallbackLocale: a,
|
|
1495
|
+
messages: c,
|
|
1496
|
+
modifiers: b,
|
|
1497
|
+
pluralRules: T,
|
|
1498
|
+
missing: L,
|
|
1499
|
+
missingWarn: I,
|
|
1500
|
+
fallbackWarn: w,
|
|
1501
|
+
fallbackFormat: V,
|
|
1502
|
+
unresolving: y,
|
|
1503
|
+
postTranslation: A,
|
|
1504
|
+
processor: i,
|
|
1505
|
+
warnHtmlMessage: f,
|
|
1506
|
+
escapeParameter: N,
|
|
1507
|
+
messageCompiler: h,
|
|
1508
|
+
messageResolver: S,
|
|
1509
|
+
localeFallbacker: C,
|
|
1510
|
+
fallbackContext: m,
|
|
1511
|
+
onWarn: t,
|
|
1512
|
+
__meta: D
|
|
1513
|
+
};
|
|
1514
|
+
return F.datetimeFormats = d, F.numberFormats = u, F.__datetimeFormatters = v, F.__numberFormatters = p, __INTLIFY_PROD_DEVTOOLS__ && da(F, n, D), F;
|
|
1515
|
+
}
|
|
1516
|
+
const Rt = (e) => ({ [e]: z() });
|
|
1517
|
+
function Jt(e, t, n, s, l) {
|
|
1518
|
+
const { missing: a, onWarn: c } = e;
|
|
1519
|
+
if (a !== null) {
|
|
1520
|
+
const d = a(e, n, t, l);
|
|
1521
|
+
return P(d) ? d : t;
|
|
1522
|
+
} else
|
|
1523
|
+
return t;
|
|
1524
|
+
}
|
|
1525
|
+
function Qe(e, t, n) {
|
|
1526
|
+
const s = e;
|
|
1527
|
+
s.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
|
|
1528
|
+
}
|
|
1529
|
+
function Fa(e, t) {
|
|
1530
|
+
return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
|
|
1531
|
+
}
|
|
1532
|
+
function ja(e, t) {
|
|
1533
|
+
const n = t.indexOf(e);
|
|
1534
|
+
if (n === -1)
|
|
1535
|
+
return !1;
|
|
1536
|
+
for (let s = n + 1; s < t.length; s++)
|
|
1537
|
+
if (Fa(e, t[s]))
|
|
1538
|
+
return !0;
|
|
1539
|
+
return !1;
|
|
1540
|
+
}
|
|
1541
|
+
function pn(e, ...t) {
|
|
1542
|
+
const { datetimeFormats: n, unresolving: s, fallbackLocale: l, onWarn: a, localeFallbacker: c } = e, { __datetimeFormatters: d } = e, [u, b, T, L] = Pt(...t), I = oe(T.missingWarn) ? T.missingWarn : e.missingWarn;
|
|
1543
|
+
oe(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn;
|
|
1544
|
+
const w = !!T.part, V = $t(e, T), y = c(
|
|
1545
|
+
e,
|
|
1546
|
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1547
|
+
l,
|
|
1548
|
+
V
|
|
1549
|
+
);
|
|
1550
|
+
if (!P(u) || u === "")
|
|
1551
|
+
return new Intl.DateTimeFormat(V, L).format(b);
|
|
1552
|
+
let A = {}, i, f = null;
|
|
1553
|
+
const N = "datetime format";
|
|
1554
|
+
for (let C = 0; C < y.length && (i = y[C], A = n[i] || {}, f = A[u], !$(f)); C++)
|
|
1555
|
+
Jt(e, u, i, I, N);
|
|
1556
|
+
if (!$(f) || !P(i))
|
|
1557
|
+
return s ? bt : u;
|
|
1558
|
+
let h = `${i}__${u}`;
|
|
1559
|
+
pt(L) || (h = `${h}__${JSON.stringify(L)}`);
|
|
1560
|
+
let S = d.get(h);
|
|
1561
|
+
return S || (S = new Intl.DateTimeFormat(i, me({}, f, L)), d.set(h, S)), w ? S.formatToParts(b) : S.format(b);
|
|
1562
|
+
}
|
|
1563
|
+
const Vn = [
|
|
1564
|
+
"localeMatcher",
|
|
1565
|
+
"weekday",
|
|
1566
|
+
"era",
|
|
1567
|
+
"year",
|
|
1568
|
+
"month",
|
|
1569
|
+
"day",
|
|
1570
|
+
"hour",
|
|
1571
|
+
"minute",
|
|
1572
|
+
"second",
|
|
1573
|
+
"timeZoneName",
|
|
1574
|
+
"formatMatcher",
|
|
1575
|
+
"hour12",
|
|
1576
|
+
"timeZone",
|
|
1577
|
+
"dateStyle",
|
|
1578
|
+
"timeStyle",
|
|
1579
|
+
"calendar",
|
|
1580
|
+
"dayPeriod",
|
|
1581
|
+
"numberingSystem",
|
|
1582
|
+
"hourCycle",
|
|
1583
|
+
"fractionalSecondDigits"
|
|
1584
|
+
];
|
|
1585
|
+
function Pt(...e) {
|
|
1586
|
+
const [t, n, s, l] = e, a = z();
|
|
1587
|
+
let c = z(), d;
|
|
1588
|
+
if (P(t)) {
|
|
1589
|
+
const u = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
|
|
1590
|
+
if (!u)
|
|
1591
|
+
throw Re(Oe.INVALID_ISO_DATE_ARGUMENT);
|
|
1592
|
+
const b = u[3] ? u[3].trim().startsWith("T") ? `${u[1].trim()}${u[3].trim()}` : `${u[1].trim()}T${u[3].trim()}` : u[1].trim();
|
|
1593
|
+
d = new Date(b);
|
|
1594
|
+
try {
|
|
1595
|
+
d.toISOString();
|
|
1596
|
+
} catch {
|
|
1597
|
+
throw Re(Oe.INVALID_ISO_DATE_ARGUMENT);
|
|
1598
|
+
}
|
|
1599
|
+
} else if (ps(t)) {
|
|
1600
|
+
if (isNaN(t.getTime()))
|
|
1601
|
+
throw Re(Oe.INVALID_DATE_ARGUMENT);
|
|
1602
|
+
d = t;
|
|
1603
|
+
} else if (ue(t))
|
|
1604
|
+
d = t;
|
|
1605
|
+
else
|
|
1606
|
+
throw Re(Oe.INVALID_ARGUMENT);
|
|
1607
|
+
return P(n) ? a.key = n : $(n) && Object.keys(n).forEach((u) => {
|
|
1608
|
+
Vn.includes(u) ? c[u] = n[u] : a[u] = n[u];
|
|
1609
|
+
}), P(s) ? a.locale = s : $(s) && (c = s), $(l) && (c = l), [a.key || "", d, a, c];
|
|
1610
|
+
}
|
|
1611
|
+
function hn(e, t, n) {
|
|
1612
|
+
const s = e;
|
|
1613
|
+
for (const l in n) {
|
|
1614
|
+
const a = `${t}__${l}`;
|
|
1615
|
+
s.__datetimeFormatters.has(a) && s.__datetimeFormatters.delete(a);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
function bn(e, ...t) {
|
|
1619
|
+
const { numberFormats: n, unresolving: s, fallbackLocale: l, onWarn: a, localeFallbacker: c } = e, { __numberFormatters: d } = e, [u, b, T, L] = Ft(...t), I = oe(T.missingWarn) ? T.missingWarn : e.missingWarn;
|
|
1620
|
+
oe(T.fallbackWarn) ? T.fallbackWarn : e.fallbackWarn;
|
|
1621
|
+
const w = !!T.part, V = $t(e, T), y = c(
|
|
1622
|
+
e,
|
|
1623
|
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1624
|
+
l,
|
|
1625
|
+
V
|
|
1626
|
+
);
|
|
1627
|
+
if (!P(u) || u === "")
|
|
1628
|
+
return new Intl.NumberFormat(V, L).format(b);
|
|
1629
|
+
let A = {}, i, f = null;
|
|
1630
|
+
const N = "number format";
|
|
1631
|
+
for (let C = 0; C < y.length && (i = y[C], A = n[i] || {}, f = A[u], !$(f)); C++)
|
|
1632
|
+
Jt(e, u, i, I, N);
|
|
1633
|
+
if (!$(f) || !P(i))
|
|
1634
|
+
return s ? bt : u;
|
|
1635
|
+
let h = `${i}__${u}`;
|
|
1636
|
+
pt(L) || (h = `${h}__${JSON.stringify(L)}`);
|
|
1637
|
+
let S = d.get(h);
|
|
1638
|
+
return S || (S = new Intl.NumberFormat(i, me({}, f, L)), d.set(h, S)), w ? S.formatToParts(b) : S.format(b);
|
|
1639
|
+
}
|
|
1640
|
+
const Wn = [
|
|
1641
|
+
"localeMatcher",
|
|
1642
|
+
"style",
|
|
1643
|
+
"currency",
|
|
1644
|
+
"currencyDisplay",
|
|
1645
|
+
"currencySign",
|
|
1646
|
+
"useGrouping",
|
|
1647
|
+
"minimumIntegerDigits",
|
|
1648
|
+
"minimumFractionDigits",
|
|
1649
|
+
"maximumFractionDigits",
|
|
1650
|
+
"minimumSignificantDigits",
|
|
1651
|
+
"maximumSignificantDigits",
|
|
1652
|
+
"compactDisplay",
|
|
1653
|
+
"notation",
|
|
1654
|
+
"signDisplay",
|
|
1655
|
+
"unit",
|
|
1656
|
+
"unitDisplay",
|
|
1657
|
+
"roundingMode",
|
|
1658
|
+
"roundingPriority",
|
|
1659
|
+
"roundingIncrement",
|
|
1660
|
+
"trailingZeroDisplay"
|
|
1661
|
+
];
|
|
1662
|
+
function Ft(...e) {
|
|
1663
|
+
const [t, n, s, l] = e, a = z();
|
|
1664
|
+
let c = z();
|
|
1665
|
+
if (!ue(t))
|
|
1666
|
+
throw Re(Oe.INVALID_ARGUMENT);
|
|
1667
|
+
const d = t;
|
|
1668
|
+
return P(n) ? a.key = n : $(n) && Object.keys(n).forEach((u) => {
|
|
1669
|
+
Wn.includes(u) ? c[u] = n[u] : a[u] = n[u];
|
|
1670
|
+
}), P(s) ? a.locale = s : $(s) && (c = s), $(l) && (c = l), [a.key || "", d, a, c];
|
|
1671
|
+
}
|
|
1672
|
+
function gn(e, t, n) {
|
|
1673
|
+
const s = e;
|
|
1674
|
+
for (const l in n) {
|
|
1675
|
+
const a = `${t}__${l}`;
|
|
1676
|
+
s.__numberFormatters.has(a) && s.__numberFormatters.delete(a);
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
const Ua = (e) => e, Va = (e) => "", Wa = "text", Ga = (e) => e.length === 0 ? "" : Xt(e), xa = vs;
|
|
1680
|
+
function vn(e, t) {
|
|
1681
|
+
return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
|
|
1682
|
+
}
|
|
1683
|
+
function Ya(e) {
|
|
1684
|
+
const t = ue(e.pluralIndex) ? e.pluralIndex : -1;
|
|
1685
|
+
return e.named && (ue(e.named.count) || ue(e.named.n)) ? ue(e.named.count) ? e.named.count : ue(e.named.n) ? e.named.n : t : t;
|
|
1686
|
+
}
|
|
1687
|
+
function Za(e, t) {
|
|
1688
|
+
t.count || (t.count = e), t.n || (t.n = e);
|
|
1689
|
+
}
|
|
1690
|
+
function Xa(e = {}) {
|
|
1691
|
+
const t = e.locale, n = Ya(e), s = J(e.pluralRules) && P(t) && se(e.pluralRules[t]) ? e.pluralRules[t] : vn, l = J(e.pluralRules) && P(t) && se(e.pluralRules[t]) ? vn : void 0, a = (i) => i[s(n, i.length, l)], c = e.list || [], d = (i) => c[i], u = e.named || z();
|
|
1692
|
+
ue(e.pluralIndex) && Za(n, u);
|
|
1693
|
+
const b = (i) => u[i];
|
|
1694
|
+
function T(i, f) {
|
|
1695
|
+
const N = se(e.messages) ? e.messages(i, !!f) : J(e.messages) ? e.messages[i] : !1;
|
|
1696
|
+
return N || (e.parent ? e.parent.message(i) : Va);
|
|
1697
|
+
}
|
|
1698
|
+
const L = (i) => e.modifiers ? e.modifiers[i] : Ua, I = $(e.processor) && se(e.processor.normalize) ? e.processor.normalize : Ga, w = $(e.processor) && se(e.processor.interpolate) ? e.processor.interpolate : xa, V = $(e.processor) && P(e.processor.type) ? e.processor.type : Wa, A = {
|
|
1699
|
+
list: d,
|
|
1700
|
+
named: b,
|
|
1701
|
+
plural: a,
|
|
1702
|
+
linked: (i, ...f) => {
|
|
1703
|
+
const [N, h] = f;
|
|
1704
|
+
let S = "text", C = "";
|
|
1705
|
+
f.length === 1 ? J(N) ? (C = N.modifier || C, S = N.type || S) : P(N) && (C = N || C) : f.length === 2 && (P(N) && (C = N || C), P(h) && (S = h || S));
|
|
1706
|
+
const m = T(i, !0)(A), R = (
|
|
1707
|
+
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
|
1708
|
+
S === "vnode" && ie(m) && C ? m[0] : m
|
|
1709
|
+
);
|
|
1710
|
+
return C ? L(C)(R, S) : R;
|
|
1711
|
+
},
|
|
1712
|
+
message: T,
|
|
1713
|
+
type: V,
|
|
1714
|
+
interpolate: w,
|
|
1715
|
+
normalize: I,
|
|
1716
|
+
values: me(z(), c, u)
|
|
1717
|
+
};
|
|
1718
|
+
return A;
|
|
1719
|
+
}
|
|
1720
|
+
const En = () => "", ge = (e) => se(e);
|
|
1721
|
+
function In(e, ...t) {
|
|
1722
|
+
const { fallbackFormat: n, postTranslation: s, unresolving: l, messageCompiler: a, fallbackLocale: c, messages: d } = e, [u, b] = jt(...t), T = oe(b.missingWarn) ? b.missingWarn : e.missingWarn, L = oe(b.fallbackWarn) ? b.fallbackWarn : e.fallbackWarn, I = oe(b.escapeParameter) ? b.escapeParameter : e.escapeParameter, w = !!b.resolvedMessage, V = P(b.default) || oe(b.default) ? oe(b.default) ? a ? u : () => u : b.default : n ? a ? u : () => u : null, y = n || V != null && (P(V) || se(V)), A = $t(e, b);
|
|
1723
|
+
I && Ha(b);
|
|
1724
|
+
let [i, f, N] = w ? [
|
|
1725
|
+
u,
|
|
1726
|
+
A,
|
|
1727
|
+
d[A] || z()
|
|
1728
|
+
] : Gn(e, u, A, c, L, T), h = i, S = u;
|
|
1729
|
+
if (!w && !(P(h) || He(h) || ge(h)) && y && (h = V, S = h), !w && (!(P(h) || He(h) || ge(h)) || !P(f)))
|
|
1730
|
+
return l ? bt : u;
|
|
1731
|
+
let C = !1;
|
|
1732
|
+
const m = () => {
|
|
1733
|
+
C = !0;
|
|
1734
|
+
}, R = ge(h) ? h : xn(e, u, f, h, S, m);
|
|
1735
|
+
if (C)
|
|
1736
|
+
return h;
|
|
1737
|
+
const v = Ja(e, f, N, b), p = Xa(v), D = Ba(e, R, p), F = s ? s(D, u) : D;
|
|
1738
|
+
if (__INTLIFY_PROD_DEVTOOLS__) {
|
|
1739
|
+
const U = {
|
|
1740
|
+
timestamp: Date.now(),
|
|
1741
|
+
key: P(u) ? u : ge(h) ? h.key : "",
|
|
1742
|
+
locale: f || (ge(h) ? h.locale : ""),
|
|
1743
|
+
format: P(h) ? h : ge(h) ? h.source : "",
|
|
1744
|
+
message: F
|
|
1745
|
+
};
|
|
1746
|
+
U.meta = me({}, e.__meta, /* @__PURE__ */ Ma() || {}), fa(U);
|
|
1747
|
+
}
|
|
1748
|
+
return F;
|
|
1749
|
+
}
|
|
1750
|
+
function Ha(e) {
|
|
1751
|
+
ie(e.list) ? e.list = e.list.map((t) => P(t) ? nn(t) : t) : J(e.named) && Object.keys(e.named).forEach((t) => {
|
|
1752
|
+
P(e.named[t]) && (e.named[t] = nn(e.named[t]));
|
|
1753
|
+
});
|
|
1754
|
+
}
|
|
1755
|
+
function Gn(e, t, n, s, l, a) {
|
|
1756
|
+
const { messages: c, onWarn: d, messageResolver: u, localeFallbacker: b } = e, T = b(e, s, n);
|
|
1757
|
+
let L = z(), I, w = null;
|
|
1758
|
+
const V = "translate";
|
|
1759
|
+
for (let y = 0; y < T.length && (I = T[y], L = c[I] || z(), (w = u(L, t)) === null && (w = L[t]), !(P(w) || He(w) || ge(w))); y++)
|
|
1760
|
+
if (!ja(I, T)) {
|
|
1761
|
+
const A = Jt(
|
|
1762
|
+
e,
|
|
1763
|
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1764
|
+
t,
|
|
1765
|
+
I,
|
|
1766
|
+
a,
|
|
1767
|
+
V
|
|
1768
|
+
);
|
|
1769
|
+
A !== t && (w = A);
|
|
1770
|
+
}
|
|
1771
|
+
return [w, I, L];
|
|
1772
|
+
}
|
|
1773
|
+
function xn(e, t, n, s, l, a) {
|
|
1774
|
+
const { messageCompiler: c, warnHtmlMessage: d } = e;
|
|
1775
|
+
if (ge(s)) {
|
|
1776
|
+
const b = s;
|
|
1777
|
+
return b.locale = b.locale || n, b.key = b.key || t, b;
|
|
1778
|
+
}
|
|
1779
|
+
if (c == null) {
|
|
1780
|
+
const b = () => s;
|
|
1781
|
+
return b.locale = n, b.key = t, b;
|
|
1782
|
+
}
|
|
1783
|
+
const u = c(s, $a(e, n, l, s, d, a));
|
|
1784
|
+
return u.locale = n, u.key = t, u.source = s, u;
|
|
1785
|
+
}
|
|
1786
|
+
function Ba(e, t, n) {
|
|
1787
|
+
return t(n);
|
|
1788
|
+
}
|
|
1789
|
+
function jt(...e) {
|
|
1790
|
+
const [t, n, s] = e, l = z();
|
|
1791
|
+
if (!P(t) && !ue(t) && !ge(t) && !He(t))
|
|
1792
|
+
throw Re(Oe.INVALID_ARGUMENT);
|
|
1793
|
+
const a = ue(t) ? String(t) : (ge(t), t);
|
|
1794
|
+
return ue(n) ? l.plural = n : P(n) ? l.default = n : $(n) && !pt(n) ? l.named = n : ie(n) && (l.list = n), ue(s) ? l.plural = s : P(s) ? l.default = s : $(s) && me(l, s), [a, l];
|
|
1795
|
+
}
|
|
1796
|
+
function $a(e, t, n, s, l, a) {
|
|
1797
|
+
return {
|
|
1798
|
+
locale: t,
|
|
1799
|
+
key: n,
|
|
1800
|
+
warnHtmlMessage: l,
|
|
1801
|
+
onError: (c) => {
|
|
1802
|
+
throw a && a(c), c;
|
|
1803
|
+
},
|
|
1804
|
+
onCacheKey: (c) => fs(t, n, c)
|
|
1805
|
+
};
|
|
1806
|
+
}
|
|
1807
|
+
function Ja(e, t, n, s) {
|
|
1808
|
+
const { modifiers: l, pluralRules: a, messageResolver: c, fallbackLocale: d, fallbackWarn: u, missingWarn: b, fallbackContext: T } = e, I = {
|
|
1809
|
+
locale: t,
|
|
1810
|
+
modifiers: l,
|
|
1811
|
+
pluralRules: a,
|
|
1812
|
+
messages: (w, V) => {
|
|
1813
|
+
let y = c(n, w);
|
|
1814
|
+
if (y == null && (T || V)) {
|
|
1815
|
+
const [, , A] = Gn(
|
|
1816
|
+
T || e,
|
|
1817
|
+
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
|
1818
|
+
w,
|
|
1819
|
+
t,
|
|
1820
|
+
d,
|
|
1821
|
+
u,
|
|
1822
|
+
b
|
|
1823
|
+
);
|
|
1824
|
+
y = c(A, w);
|
|
1825
|
+
}
|
|
1826
|
+
if (P(y) || He(y)) {
|
|
1827
|
+
let A = !1;
|
|
1828
|
+
const f = xn(e, w, t, y, w, () => {
|
|
1829
|
+
A = !0;
|
|
1830
|
+
});
|
|
1831
|
+
return A ? En : f;
|
|
1832
|
+
} else return ge(y) ? y : En;
|
|
1833
|
+
}
|
|
1834
|
+
};
|
|
1835
|
+
return e.processor && (I.processor = e.processor), s.list && (I.list = s.list), s.named && (I.named = s.named), ue(s.plural) && (I.pluralIndex = s.plural), I;
|
|
1836
|
+
}
|
|
1837
|
+
Hs();
|
|
1838
|
+
var Ka = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_580c8e1b-ba20-445c-a23b-92f31258140d", npm_package_devDependencies__types_node: "^18.17.17", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_devDependencies_vitest: "^1.2.0", USER: "runner", npm_config_always_auth: "", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v24.5.0 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.16", npm_package_devDependencies_vue_i18n: "10.0.5", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_580c8e1b-ba20-445c-a23b-92f31258140d", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.2.0", 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", npm_package_files_0: "dist", npm_package_devDependencies_eslint_import_resolver_typescript: "^4.4.4", HOME: "/home/runner", npm_package_devDependencies__eslint_js: "^9.39.2", npm_package_devDependencies__typescript_eslint_parser: "^8.52.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_devDependencies_eslint_config_prettier: "^10.1.8", 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.4.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_scripts_type_check: "vue-tsc --noEmit -p tsconfig.app.json --composite false", npm_package_dependencies__feedmepos_mf_common: "^1.29.10", npm_package_devDependencies_code_inspector_plugin: "^0.20.16", npm_package_devDependencies_npm_run_all2: "^6.0.6", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "1864", ACTIONS_ORCHESTRATION_ID: "086a86ac-2b3a-48f4-9b94-385ca8080e29.publish.publish.__default", npm_package_dependencies__feedmepos_ui_library: "^1.7.0", npm_package_dependencies_dayjs: "^1.11.10", npm_package_devDependencies__tsconfig_node18: "^18.2.2", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "VITE_TARGET_ENV=dev pnpm build:mf && pnpm build:dts", npm_package_devDependencies_tailwindcss: "^3.3.3", npm_package_devDependencies_typescript: "^5.9.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.6", npm_config_prefer_workspace_packages: "true", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260413.86.1", npm_package_scripts_dev: "vite", npm_package_devDependencies_prettier: "^3.7.4", npm_package_devDependencies_sass_embedded: "^1.93.3", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", npm_package_devDependencies__vue_tsconfig: "^0.4.0", npm_package_devDependencies_eslint_plugin_import: "^2.32.0", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.12/x64", JOURNAL_STREAM: "9:13179", GITHUB_WORKFLOW: "Publish hrm-portal", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.16", 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_package_scripts_lint: "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^8.52.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.9/x64", GITHUB_RUN_ID: "25041178544", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "cd8c03f49f5ed9c19b16c3f4fe68130f16fa4f9b", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", GITHUB_WORKFLOW_REF: "feedmepos/hrm-service/.github/workflows/publish-hrm-portal-trusted.yml@refs/heads/main", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6M31dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOjZmOTZmYTg5LWI3YmYtNDg3OC1iYWQzLTg5ODAwNjU2NmI2ZSIsImJpbGxpbmdfb3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJleHAiOjE3NzczODU1MDEsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc3NzM2MzMwMSwiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6ImYzZGE2OTEzLTZkYmQtNWVlOC1hMDRhLWYxZDFhMzVkYWFhNCIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc3NzM2MzAwMSwib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJqdW4tbGVlLWZlZWRtZVwiLFwiYWN0b3JfaWRcIjpcIjIzOTI4Mjg2MlwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI3MzM0NDU1NTU3MVwiLFwiZXZlbnRfbmFtZVwiOlwid29ya2Zsb3dfZGlzcGF0Y2hcIixcImhlYWRfcmVmXCI6XCJcIixcImpvYl93b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9hY3Rpb25zLy5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2gtbnBtLWdpdGh1Yi55YW1sQHJlZnMvaGVhZHMvbWFpblwiLFwiam9iX3dvcmtmbG93X3NoYVwiOlwiYTg0NzUwOGVmMWRhNmJkYWU4ZDBiZjdkOWIxY2E3YzVlYTczMGYzYVwiLFwicmVmXCI6XCJyZWZzL2hlYWRzL21haW5cIixcInJlZl9wcm90ZWN0ZWRcIjpcInRydWVcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImZlZWRtZXBvcy9ocm0tc2VydmljZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiMTEyNDY3MjIzNVwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiZmVlZG1lcG9zXCIsXCJyZXBvc2l0b3J5X293bmVyX2lkXCI6XCI1NDgzMTUxNVwiLFwicmVwb3NpdG9yeV92aXNpYmlsaXR5XCI6XCJwcml2YXRlXCIsXCJydW5fYXR0ZW1wdFwiOlwiMVwiLFwicnVuX2lkXCI6XCIyNTA0MTE3ODU0NFwiLFwicnVuX251bWJlclwiOlwiNTZcIixcInJ1bm5lcl9lbnZpcm9ubWVudFwiOlwiZ2l0aHViLWhvc3RlZFwiLFwic2hhXCI6XCJjZDhjMDNmNDlmNWVkOWMxOWIxNmMzZjRmZTY4MTMwZjE2ZmE0ZjliXCIsXCJ3b3JrZmxvd1wiOlwiUHVibGlzaCBocm0tcG9ydGFsXCIsXCJ3b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9ocm0tc2VydmljZS8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoLWhybS1wb3J0YWwtdHJ1c3RlZC55bWxAcmVmcy9oZWFkcy9tYWluXCIsXCJ3b3JrZmxvd19zaGFcIjpcImNkOGMwM2Y0OWY1ZWQ5YzE5YjE2YzNmNGZlNjgxMzBmMTZmYTRmOWJcIn0iLCJvaWRjX3N1YiI6InJlcG86ZmVlZG1lcG9zL2hybS1zZXJ2aWNlOnJlZjpyZWZzL2hlYWRzL21haW4iLCJvcmNoX2lkIjoiMDg2YTg2YWMtMmIzYS00OGY0LTliOTQtMzg1Y2E4MDgwZTI5LnB1Ymxpc2gucHVibGlzaC5fX2RlZmF1bHQiLCJvd25lcl9pZCI6IkVfa2dET0FBSm9ZUSIsInBsYW5faWQiOiIwODZhODZhYy0yYjNhLTQ4ZjQtOWI5NC0zODVjYTgwODBlMjkiLCJyZXBvc2l0b3J5X2lkIjoiMTEyNDY3MjIzNSIsInJ1bl9pZCI6IjI1MDQxMTc4NTQ0IiwicnVuX251bWJlciI6IjU2IiwicnVuX3R5cGUiOiJmdWxsIiwicnVubmVyX2lkIjoiMTAwMDA2Mzk1NSIsInJ1bm5lcl90eXBlIjoiaG9zdGVkIiwic2NwIjoiQWN0aW9ucy5SZXN1bHRzOjA4NmE4NmFjLTJiM2EtNDhmNC05Yjk0LTM4NWNhODA4MGUyOTpmM2RhNjkxMy02ZGJkLTVlZTgtYTA0YS1mMWQxYTM1ZGFhYTQgQWN0aW9ucy5SdW5uZXI6MDg2YTg2YWMtMmIzYS00OGY0LTliOTQtMzg1Y2E4MDgwZTI5OmYzZGE2OTEzLTZkYmQtNWVlOC1hMDRhLWYxZDFhMzVkYWFhNCBBY3Rpb25zLlVwbG9hZEFydGlmYWN0czowODZhODZhYy0yYjNhLTQ4ZjQtOWI5NC0zODVjYTgwODBlMjk6ZjNkYTY5MTMtNmRiZC01ZWU4LWEwNGEtZjFkMWEzNWRhYWE0IGdlbmVyYXRlX2lkX3Rva2VuOjA4NmE4NmFjLTJiM2EtNDhmNC05Yjk0LTM4NWNhODA4MGUyOTpmM2RhNjkxMy02ZGJkLTVlZTgtYTA0YS1mMWQxYTM1ZGFhYTQgQWN0aW9ucy5HZW5lcmljUmVhZDowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJzaGEiOiJjZDhjMDNmNDlmNWVkOWMxOWIxNmMzZjRmZTY4MTMwZjE2ZmE0ZjliIiwidHJ1c3RfdGllciI6IjEifQ.DlN_bXve2rWU7feGv2vQcwMJFkc2N8QsJ1E46IazbtGAfeT8cR-vNZZnWqQKe9KPGVNPL5w2Hep6Uy3QI3DFU_juWewLp5xGP2B301n47J0KtMth-dqUSLLPwj0w0-eEdLhs1SlkYnQtVLHNiuTRm3sxtW9F8ImLfN8_Qk_Zvt7uz4VMCT6cbtakAV-q_8L73uI4DmGQi-Iq1Tzm-xkSC3R23h77h2REO3Tf1IF4aRqCy96V-5aTzNSWYeZ-YpVyJcerPXdw7kJii7iSOsz0_sSe7erne1kYooJh4d9sfvy7gL41kQiTLafUt5O4wnmUpqgob6NjTpKi86obHuBZcA", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.7", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/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@9.15.9/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@9.15.9/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_8e81533e-0f51-4c7b-bf6e-b8055d3a8f4f", INVOCATION_ID: "e31828eb3a60437e9db93ce44d555956", 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_4", GITHUB_RUN_NUMBER: "56", GITHUB_TRIGGERING_ACTOR: "jun-lee-feedme", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_build_mf: "vite build --mode fmmf", npm_package_scripts_publish_npm: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag latest --no-git-checks", npm_package_scripts_publish_npm_beta: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --access public --tag beta --no-git-checks", npm_package_scripts_publish_github: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --tag latest --no-git-checks", npm_package_scripts_publish_github_beta: "pnpm build && pnpm publish --registry https://npm.pkg.github.com/ --tag beta --no-git-checks", npm_config_frozen_lockfile: "", npm_package_devDependencies__vitest_ui: "^1.2.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_devDependencies__vue_eslint_config_typescript: "^12.0.0", npm_package_devDependencies_eslint: "^9.39.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000063955", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "feedmepos/hrm-service", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist", npm_package_dependencies__feedmepos_core: "^2.14.36", 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", npm_package_scripts_test: "vitest", npm_package_dependencies_vue3_lottie: "^3.3.0", npm_package_devDependencies__casl_ability: "^3.4.0", npm_package_devDependencies__vitejs_plugin_vue_jsx: "^4.0.0", npm_package_devDependencies__vue_eslint_config_prettier: "^8.0.0", 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@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "2.0.8-dev.3", npm_package_scripts_build_only: "pnpm build:mf && pnpm build:dts", npm_package_dependencies__feedmepos_hrm_permission: "workspace:*", npm_package_devDependencies__rushstack_eslint_patch: "^1.3.3", npm_package_devDependencies_eslint_plugin_unused_imports: "^4.3.0", npm_package_devDependencies_jsdom: "^24.0.0", npm_lifecycle_event: "build:mf", GITHUB_REF_PROTECTED: "true", npm_package_scripts_build: 'run-p type-check "build-only {@}" --', npm_package_dependencies_uuid: "^10.0.0", GITHUB_WORKSPACE: "/home/runner/work/hrm-service/hrm-service", ACCEPT_EULA: "Y", GITHUB_JOB: "publish", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "cd8c03f49f5ed9c19b16c3f4fe68130f16fa4f9b", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.3.2", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "jun-lee-feedme", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", VITE_TARGET_ENV: "dev", npm_package_devDependencies_globals: "^16.5.0", npm_package_scripts_format: "prettier --write src/", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_580c8e1b-ba20-445c-a23b-92f31258140d", 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_package_devDependencies_vue_eslint_parser: "^10.2.0", npm_config_link_workspace_packages: "true", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", ACTIONS_ID_TOKEN_REQUEST_URL: "https://run-actions-3-azure-eastus.actions.githubusercontent.com/99//idtoken/086a86ac-2b3a-48f4-9b94-385ca8080e29/f3da6913-6dbd-5ee8-a04a-f1d1a35daaa4?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_580c8e1b-ba20-445c-a23b-92f31258140d", npm_package_exports___types: "./dist/app.d.ts", npm_package_dependencies__feedmepos_auth: "^1.1.14", npm_package_dependencies__feedmepos_feature_flag: "^0.0.15", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_package_devDependencies_eslint_plugin_vue: "^9.33.0", npm_package_devDependencies_postcss: "^8.4.31", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_14.6.0", 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_580c8e1b-ba20-445c-a23b-92f31258140d", INIT_CWD: "/home/runner/work/hrm-service/hrm-service/apps/hrm-portal", npm_package_dependencies_libphonenumber_js: "^1.11.1", NODE_ENV: "production" } };
|
|
1839
|
+
const za = "10.0.5";
|
|
1840
|
+
function Qa() {
|
|
1841
|
+
typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (je().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (je().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (je().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (je().__INTLIFY_PROD_DEVTOOLS__ = !1);
|
|
1842
|
+
}
|
|
1843
|
+
const Be = {
|
|
1844
|
+
// composer module errors
|
|
1845
|
+
UNEXPECTED_RETURN_TYPE: pa,
|
|
1846
|
+
// 24
|
|
1847
|
+
// legacy module errors
|
|
1848
|
+
INVALID_ARGUMENT: 25,
|
|
1849
|
+
// i18n module errors
|
|
1850
|
+
MUST_BE_CALL_SETUP_TOP: 26,
|
|
1851
|
+
NOT_INSTALLED: 27,
|
|
1852
|
+
NOT_INSTALLED_WITH_PROVIDE: 31,
|
|
1853
|
+
// unexpected error
|
|
1854
|
+
UNEXPECTED_ERROR: 32
|
|
1855
|
+
};
|
|
1856
|
+
function nt(e, ...t) {
|
|
1857
|
+
return ht(e, null, void 0);
|
|
1858
|
+
}
|
|
1859
|
+
const Ut = /* @__PURE__ */ Ve("__translateVNode"), Vt = /* @__PURE__ */ Ve("__datetimeParts"), Wt = /* @__PURE__ */ Ve("__numberParts"), qa = Ve("__setPluralRules"), Yn = /* @__PURE__ */ Ve("__injectWithOption"), Gt = /* @__PURE__ */ Ve("__dispose");
|
|
1860
|
+
function st(e) {
|
|
1861
|
+
if (!J(e))
|
|
1862
|
+
return e;
|
|
1863
|
+
for (const t in e)
|
|
1864
|
+
if (Ne(e, t))
|
|
1865
|
+
if (!t.includes("."))
|
|
1866
|
+
J(e[t]) && st(e[t]);
|
|
1867
|
+
else {
|
|
1868
|
+
const n = t.split("."), s = n.length - 1;
|
|
1869
|
+
let l = e, a = !1;
|
|
1870
|
+
for (let c = 0; c < s; c++) {
|
|
1871
|
+
if (n[c] in l || (l[n[c]] = z()), !J(l[n[c]])) {
|
|
1872
|
+
a = !0;
|
|
1873
|
+
break;
|
|
1874
|
+
}
|
|
1875
|
+
l = l[n[c]];
|
|
1876
|
+
}
|
|
1877
|
+
a || (l[n[s]] = e[t], delete e[t]), J(l[n[s]]) && st(l[n[s]]);
|
|
1878
|
+
}
|
|
1879
|
+
return e;
|
|
1880
|
+
}
|
|
1881
|
+
function Zn(e, t) {
|
|
1882
|
+
const { messages: n, __i18n: s, messageResolver: l, flatJson: a } = t, c = $(n) ? n : ie(s) ? z() : { [e]: z() };
|
|
1883
|
+
if (ie(s) && s.forEach((d) => {
|
|
1884
|
+
if ("locale" in d && "resource" in d) {
|
|
1885
|
+
const { locale: u, resource: b } = d;
|
|
1886
|
+
u ? (c[u] = c[u] || z(), mt(b, c[u])) : mt(b, c);
|
|
1887
|
+
} else
|
|
1888
|
+
P(d) && mt(JSON.parse(d), c);
|
|
1889
|
+
}), l == null && a)
|
|
1890
|
+
for (const d in c)
|
|
1891
|
+
Ne(c, d) && st(c[d]);
|
|
1892
|
+
return c;
|
|
1893
|
+
}
|
|
1894
|
+
function Xn(e) {
|
|
1895
|
+
return e.type;
|
|
1896
|
+
}
|
|
1897
|
+
function er(e, t, n) {
|
|
1898
|
+
let s = J(t.messages) ? t.messages : z();
|
|
1899
|
+
"__i18nGlobal" in n && (s = Zn(e.locale.value, {
|
|
1900
|
+
messages: s,
|
|
1901
|
+
__i18n: n.__i18nGlobal
|
|
1902
|
+
}));
|
|
1903
|
+
const l = Object.keys(s);
|
|
1904
|
+
l.length && l.forEach((a) => {
|
|
1905
|
+
e.mergeLocaleMessage(a, s[a]);
|
|
1906
|
+
});
|
|
1907
|
+
{
|
|
1908
|
+
if (J(t.datetimeFormats)) {
|
|
1909
|
+
const a = Object.keys(t.datetimeFormats);
|
|
1910
|
+
a.length && a.forEach((c) => {
|
|
1911
|
+
e.mergeDateTimeFormat(c, t.datetimeFormats[c]);
|
|
1912
|
+
});
|
|
1913
|
+
}
|
|
1914
|
+
if (J(t.numberFormats)) {
|
|
1915
|
+
const a = Object.keys(t.numberFormats);
|
|
1916
|
+
a.length && a.forEach((c) => {
|
|
1917
|
+
e.mergeNumberFormat(c, t.numberFormats[c]);
|
|
1918
|
+
});
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
function Nn(e) {
|
|
1923
|
+
return de(zn, null, e, 0);
|
|
1924
|
+
}
|
|
1925
|
+
const yn = "__INTLIFY_META__", Tn = () => [], tr = () => !1;
|
|
1926
|
+
let kn = 0;
|
|
1927
|
+
function Ln(e) {
|
|
1928
|
+
return (t, n, s, l) => e(n, s, xt() || void 0, l);
|
|
1929
|
+
}
|
|
1930
|
+
const nr = /* @__NO_SIDE_EFFECTS__ */ () => {
|
|
1931
|
+
const e = xt();
|
|
1932
|
+
let t = null;
|
|
1933
|
+
return e && (t = Xn(e)[yn]) ? { [yn]: t } : null;
|
|
1934
|
+
};
|
|
1935
|
+
function sr(e = {}) {
|
|
1936
|
+
const { __root: t, __injectWithOption: n } = e, s = t === void 0, l = e.flatJson, a = en ? Ue : Kn;
|
|
1937
|
+
let c = oe(e.inheritLocale) ? e.inheritLocale : !0;
|
|
1938
|
+
const d = a(
|
|
1939
|
+
// prettier-ignore
|
|
1940
|
+
t && c ? t.locale.value : P(e.locale) ? e.locale : ft
|
|
1941
|
+
), u = a(
|
|
1942
|
+
// prettier-ignore
|
|
1943
|
+
t && c ? t.fallbackLocale.value : P(e.fallbackLocale) || ie(e.fallbackLocale) || $(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : d.value
|
|
1944
|
+
), b = a(Zn(d.value, e)), T = a($(e.datetimeFormats) ? e.datetimeFormats : { [d.value]: {} }), L = a($(e.numberFormats) ? e.numberFormats : { [d.value]: {} });
|
|
1945
|
+
let I = t ? t.missingWarn : oe(e.missingWarn) || dt(e.missingWarn) ? e.missingWarn : !0, w = t ? t.fallbackWarn : oe(e.fallbackWarn) || dt(e.fallbackWarn) ? e.fallbackWarn : !0, V = t ? t.fallbackRoot : oe(e.fallbackRoot) ? e.fallbackRoot : !0, y = !!e.fallbackFormat, A = se(e.missing) ? e.missing : null, i = se(e.missing) ? Ln(e.missing) : null, f = se(e.postTranslation) ? e.postTranslation : null, N = t ? t.warnHtmlMessage : oe(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, h = !!e.escapeParameter;
|
|
1946
|
+
const S = t ? t.modifiers : $(e.modifiers) ? e.modifiers : {};
|
|
1947
|
+
let C = e.pluralRules || t && t.pluralRules, m;
|
|
1948
|
+
m = (() => {
|
|
1949
|
+
s && fn(null);
|
|
1950
|
+
const _ = {
|
|
1951
|
+
version: za,
|
|
1952
|
+
locale: d.value,
|
|
1953
|
+
fallbackLocale: u.value,
|
|
1954
|
+
messages: b.value,
|
|
1955
|
+
modifiers: S,
|
|
1956
|
+
pluralRules: C,
|
|
1957
|
+
missing: i === null ? void 0 : i,
|
|
1958
|
+
missingWarn: I,
|
|
1959
|
+
fallbackWarn: w,
|
|
1960
|
+
fallbackFormat: y,
|
|
1961
|
+
unresolving: !0,
|
|
1962
|
+
postTranslation: f === null ? void 0 : f,
|
|
1963
|
+
warnHtmlMessage: N,
|
|
1964
|
+
escapeParameter: h,
|
|
1965
|
+
messageResolver: e.messageResolver,
|
|
1966
|
+
messageCompiler: e.messageCompiler,
|
|
1967
|
+
__meta: { framework: "vue" }
|
|
1968
|
+
};
|
|
1969
|
+
_.datetimeFormats = T.value, _.numberFormats = L.value, _.__datetimeFormatters = $(m) ? m.__datetimeFormatters : void 0, _.__numberFormatters = $(m) ? m.__numberFormatters : void 0;
|
|
1970
|
+
const E = Pa(_);
|
|
1971
|
+
return s && fn(E), E;
|
|
1972
|
+
})(), Qe(m, d.value, u.value);
|
|
1973
|
+
function v() {
|
|
1974
|
+
return [
|
|
1975
|
+
d.value,
|
|
1976
|
+
u.value,
|
|
1977
|
+
b.value,
|
|
1978
|
+
T.value,
|
|
1979
|
+
L.value
|
|
1980
|
+
];
|
|
1981
|
+
}
|
|
1982
|
+
const p = q({
|
|
1983
|
+
get: () => d.value,
|
|
1984
|
+
set: (_) => {
|
|
1985
|
+
d.value = _, m.locale = d.value;
|
|
1986
|
+
}
|
|
1987
|
+
}), D = q({
|
|
1988
|
+
get: () => u.value,
|
|
1989
|
+
set: (_) => {
|
|
1990
|
+
u.value = _, m.fallbackLocale = u.value, Qe(m, d.value, _);
|
|
1991
|
+
}
|
|
1992
|
+
}), F = q(() => b.value), U = /* @__PURE__ */ q(() => T.value), ae = /* @__PURE__ */ q(() => L.value);
|
|
1993
|
+
function O() {
|
|
1994
|
+
return se(f) ? f : null;
|
|
1995
|
+
}
|
|
1996
|
+
function k(_) {
|
|
1997
|
+
f = _, m.postTranslation = _;
|
|
1998
|
+
}
|
|
1999
|
+
function M() {
|
|
2000
|
+
return A;
|
|
2001
|
+
}
|
|
2002
|
+
function X(_) {
|
|
2003
|
+
_ !== null && (i = Ln(_)), A = _, m.missing = i;
|
|
2004
|
+
}
|
|
2005
|
+
const x = (_, E, Q, le, Pe, at) => {
|
|
2006
|
+
v();
|
|
2007
|
+
let xe;
|
|
2008
|
+
try {
|
|
2009
|
+
Ka.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__, s || (m.fallbackContext = t ? wa() : void 0), xe = _(m);
|
|
2010
|
+
} finally {
|
|
2011
|
+
__INTLIFY_PROD_DEVTOOLS__, s || (m.fallbackContext = void 0);
|
|
2012
|
+
}
|
|
2013
|
+
if (Q !== "translate exists" && // for not `te` (e.g `t`)
|
|
2014
|
+
ue(xe) && xe === bt || Q === "translate exists" && !xe) {
|
|
2015
|
+
const [$n, Hr] = E();
|
|
2016
|
+
return t && V ? le(t) : Pe($n);
|
|
2017
|
+
} else {
|
|
2018
|
+
if (at(xe))
|
|
2019
|
+
return xe;
|
|
2020
|
+
throw nt(Be.UNEXPECTED_RETURN_TYPE);
|
|
2021
|
+
}
|
|
2022
|
+
};
|
|
2023
|
+
function W(..._) {
|
|
2024
|
+
return x((E) => Reflect.apply(In, null, [E, ..._]), () => jt(..._), "translate", (E) => Reflect.apply(E.t, E, [..._]), (E) => E, (E) => P(E));
|
|
2025
|
+
}
|
|
2026
|
+
function G(..._) {
|
|
2027
|
+
const [E, Q, le] = _;
|
|
2028
|
+
if (le && !J(le))
|
|
2029
|
+
throw nt(Be.INVALID_ARGUMENT);
|
|
2030
|
+
return W(E, Q, me({ resolvedMessage: !0 }, le || {}));
|
|
2031
|
+
}
|
|
2032
|
+
function Y(..._) {
|
|
2033
|
+
return x((E) => Reflect.apply(pn, null, [E, ..._]), () => Pt(..._), "datetime format", (E) => Reflect.apply(E.d, E, [..._]), () => mn, (E) => P(E));
|
|
2034
|
+
}
|
|
2035
|
+
function ve(..._) {
|
|
2036
|
+
return x((E) => Reflect.apply(bn, null, [E, ..._]), () => Ft(..._), "number format", (E) => Reflect.apply(E.n, E, [..._]), () => mn, (E) => P(E));
|
|
2037
|
+
}
|
|
2038
|
+
function _e(_) {
|
|
2039
|
+
return _.map((E) => P(E) || ue(E) || oe(E) ? Nn(String(E)) : E);
|
|
2040
|
+
}
|
|
2041
|
+
const ne = {
|
|
2042
|
+
normalize: _e,
|
|
2043
|
+
interpolate: (_) => _,
|
|
2044
|
+
type: "vnode"
|
|
2045
|
+
};
|
|
2046
|
+
function Ee(..._) {
|
|
2047
|
+
return x((E) => {
|
|
2048
|
+
let Q;
|
|
2049
|
+
const le = E;
|
|
2050
|
+
try {
|
|
2051
|
+
le.processor = ne, Q = Reflect.apply(In, null, [le, ..._]);
|
|
2052
|
+
} finally {
|
|
2053
|
+
le.processor = null;
|
|
2054
|
+
}
|
|
2055
|
+
return Q;
|
|
2056
|
+
}, () => jt(..._), "translate", (E) => E[Ut](..._), (E) => [Nn(E)], (E) => ie(E));
|
|
2057
|
+
}
|
|
2058
|
+
function $e(..._) {
|
|
2059
|
+
return x((E) => Reflect.apply(bn, null, [E, ..._]), () => Ft(..._), "number format", (E) => E[Wt](..._), Tn, (E) => P(E) || ie(E));
|
|
2060
|
+
}
|
|
2061
|
+
function Je(..._) {
|
|
2062
|
+
return x((E) => Reflect.apply(pn, null, [E, ..._]), () => Pt(..._), "datetime format", (E) => E[Vt](..._), Tn, (E) => P(E) || ie(E));
|
|
2063
|
+
}
|
|
2064
|
+
function vt(_) {
|
|
2065
|
+
C = _, m.pluralRules = C;
|
|
2066
|
+
}
|
|
2067
|
+
function Et(_, E) {
|
|
2068
|
+
return x(() => {
|
|
2069
|
+
if (!_)
|
|
2070
|
+
return !1;
|
|
2071
|
+
const Q = P(E) ? E : d.value, le = We(Q), Pe = m.messageResolver(le, _);
|
|
2072
|
+
return He(Pe) || ge(Pe) || P(Pe);
|
|
2073
|
+
}, () => [_], "translate exists", (Q) => Reflect.apply(Q.te, Q, [_, E]), tr, (Q) => oe(Q));
|
|
2074
|
+
}
|
|
2075
|
+
function It(_) {
|
|
2076
|
+
let E = null;
|
|
2077
|
+
const Q = Mn(m, u.value, d.value);
|
|
2078
|
+
for (let le = 0; le < Q.length; le++) {
|
|
2079
|
+
const Pe = b.value[Q[le]] || {}, at = m.messageResolver(Pe, _);
|
|
2080
|
+
if (at != null) {
|
|
2081
|
+
E = at;
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
return E;
|
|
2086
|
+
}
|
|
2087
|
+
function Ke(_) {
|
|
2088
|
+
const E = It(_);
|
|
2089
|
+
return E ?? (t ? t.tm(_) || {} : {});
|
|
2090
|
+
}
|
|
2091
|
+
function We(_) {
|
|
2092
|
+
return b.value[_] || {};
|
|
2093
|
+
}
|
|
2094
|
+
function Ge(_, E) {
|
|
2095
|
+
if (l) {
|
|
2096
|
+
const Q = { [_]: E };
|
|
2097
|
+
for (const le in Q)
|
|
2098
|
+
Ne(Q, le) && st(Q[le]);
|
|
2099
|
+
E = Q[_];
|
|
2100
|
+
}
|
|
2101
|
+
b.value[_] = E, m.messages = b.value;
|
|
2102
|
+
}
|
|
2103
|
+
function ze(_, E) {
|
|
2104
|
+
b.value[_] = b.value[_] || {};
|
|
2105
|
+
const Q = { [_]: E };
|
|
2106
|
+
if (l)
|
|
2107
|
+
for (const le in Q)
|
|
2108
|
+
Ne(Q, le) && st(Q[le]);
|
|
2109
|
+
E = Q[_], mt(E, b.value[_]), m.messages = b.value;
|
|
2110
|
+
}
|
|
2111
|
+
function Nt(_) {
|
|
2112
|
+
return T.value[_] || {};
|
|
2113
|
+
}
|
|
2114
|
+
function r(_, E) {
|
|
2115
|
+
T.value[_] = E, m.datetimeFormats = T.value, hn(m, _, E);
|
|
2116
|
+
}
|
|
2117
|
+
function o(_, E) {
|
|
2118
|
+
T.value[_] = me(T.value[_] || {}, E), m.datetimeFormats = T.value, hn(m, _, E);
|
|
2119
|
+
}
|
|
2120
|
+
function g(_) {
|
|
2121
|
+
return L.value[_] || {};
|
|
2122
|
+
}
|
|
2123
|
+
function j(_, E) {
|
|
2124
|
+
L.value[_] = E, m.numberFormats = L.value, gn(m, _, E);
|
|
2125
|
+
}
|
|
2126
|
+
function re(_, E) {
|
|
2127
|
+
L.value[_] = me(L.value[_] || {}, E), m.numberFormats = L.value, gn(m, _, E);
|
|
2128
|
+
}
|
|
2129
|
+
kn++, t && en && (St(t.locale, (_) => {
|
|
2130
|
+
c && (d.value = _, m.locale = _, Qe(m, d.value, u.value));
|
|
2131
|
+
}), St(t.fallbackLocale, (_) => {
|
|
2132
|
+
c && (u.value = _, m.fallbackLocale = _, Qe(m, d.value, u.value));
|
|
2133
|
+
}));
|
|
2134
|
+
const Z = {
|
|
2135
|
+
id: kn,
|
|
2136
|
+
locale: p,
|
|
2137
|
+
fallbackLocale: D,
|
|
2138
|
+
get inheritLocale() {
|
|
2139
|
+
return c;
|
|
2140
|
+
},
|
|
2141
|
+
set inheritLocale(_) {
|
|
2142
|
+
c = _, _ && t && (d.value = t.locale.value, u.value = t.fallbackLocale.value, Qe(m, d.value, u.value));
|
|
2143
|
+
},
|
|
2144
|
+
get availableLocales() {
|
|
2145
|
+
return Object.keys(b.value).sort();
|
|
2146
|
+
},
|
|
2147
|
+
messages: F,
|
|
2148
|
+
get modifiers() {
|
|
2149
|
+
return S;
|
|
2150
|
+
},
|
|
2151
|
+
get pluralRules() {
|
|
2152
|
+
return C || {};
|
|
2153
|
+
},
|
|
2154
|
+
get isGlobal() {
|
|
2155
|
+
return s;
|
|
2156
|
+
},
|
|
2157
|
+
get missingWarn() {
|
|
2158
|
+
return I;
|
|
2159
|
+
},
|
|
2160
|
+
set missingWarn(_) {
|
|
2161
|
+
I = _, m.missingWarn = I;
|
|
2162
|
+
},
|
|
2163
|
+
get fallbackWarn() {
|
|
2164
|
+
return w;
|
|
2165
|
+
},
|
|
2166
|
+
set fallbackWarn(_) {
|
|
2167
|
+
w = _, m.fallbackWarn = w;
|
|
2168
|
+
},
|
|
2169
|
+
get fallbackRoot() {
|
|
2170
|
+
return V;
|
|
2171
|
+
},
|
|
2172
|
+
set fallbackRoot(_) {
|
|
2173
|
+
V = _;
|
|
2174
|
+
},
|
|
2175
|
+
get fallbackFormat() {
|
|
2176
|
+
return y;
|
|
2177
|
+
},
|
|
2178
|
+
set fallbackFormat(_) {
|
|
2179
|
+
y = _, m.fallbackFormat = y;
|
|
2180
|
+
},
|
|
2181
|
+
get warnHtmlMessage() {
|
|
2182
|
+
return N;
|
|
2183
|
+
},
|
|
2184
|
+
set warnHtmlMessage(_) {
|
|
2185
|
+
N = _, m.warnHtmlMessage = _;
|
|
2186
|
+
},
|
|
2187
|
+
get escapeParameter() {
|
|
2188
|
+
return h;
|
|
2189
|
+
},
|
|
2190
|
+
set escapeParameter(_) {
|
|
2191
|
+
h = _, m.escapeParameter = _;
|
|
2192
|
+
},
|
|
2193
|
+
t: W,
|
|
2194
|
+
getLocaleMessage: We,
|
|
2195
|
+
setLocaleMessage: Ge,
|
|
2196
|
+
mergeLocaleMessage: ze,
|
|
2197
|
+
getPostTranslationHandler: O,
|
|
2198
|
+
setPostTranslationHandler: k,
|
|
2199
|
+
getMissingHandler: M,
|
|
2200
|
+
setMissingHandler: X,
|
|
2201
|
+
[qa]: vt
|
|
2202
|
+
};
|
|
2203
|
+
return Z.datetimeFormats = U, Z.numberFormats = ae, Z.rt = G, Z.te = Et, Z.tm = Ke, Z.d = Y, Z.n = ve, Z.getDateTimeFormat = Nt, Z.setDateTimeFormat = r, Z.mergeDateTimeFormat = o, Z.getNumberFormat = g, Z.setNumberFormat = j, Z.mergeNumberFormat = re, Z[Yn] = n, Z[Ut] = Ee, Z[Vt] = Je, Z[Wt] = $e, Z;
|
|
2204
|
+
}
|
|
2205
|
+
const Kt = {
|
|
2206
|
+
tag: {
|
|
2207
|
+
type: [String, Object]
|
|
2208
|
+
},
|
|
2209
|
+
locale: {
|
|
2210
|
+
type: String
|
|
2211
|
+
},
|
|
2212
|
+
scope: {
|
|
2213
|
+
type: String,
|
|
2214
|
+
// NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
|
|
2215
|
+
validator: (e) => e === "parent" || e === "global",
|
|
2216
|
+
default: "parent"
|
|
2217
|
+
/* ComponentI18nScope */
|
|
2218
|
+
},
|
|
2219
|
+
i18n: {
|
|
2220
|
+
type: Object
|
|
2221
|
+
}
|
|
2222
|
+
};
|
|
2223
|
+
function ar({ slots: e }, t) {
|
|
2224
|
+
return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((s, l) => [
|
|
2225
|
+
...s,
|
|
2226
|
+
// prettier-ignore
|
|
2227
|
+
...l.type === Ie ? l.children : [l]
|
|
2228
|
+
], []) : t.reduce((n, s) => {
|
|
2229
|
+
const l = e[s];
|
|
2230
|
+
return l && (n[s] = l()), n;
|
|
2231
|
+
}, z());
|
|
2232
|
+
}
|
|
2233
|
+
function Hn() {
|
|
2234
|
+
return Ie;
|
|
2235
|
+
}
|
|
2236
|
+
me({
|
|
2237
|
+
keypath: {
|
|
2238
|
+
type: String,
|
|
2239
|
+
required: !0
|
|
2240
|
+
},
|
|
2241
|
+
plural: {
|
|
2242
|
+
type: [Number, String],
|
|
2243
|
+
validator: (e) => ue(e) || !isNaN(e)
|
|
2244
|
+
}
|
|
2245
|
+
}, Kt);
|
|
2246
|
+
function rr(e) {
|
|
2247
|
+
return ie(e) && !P(e[0]);
|
|
2248
|
+
}
|
|
2249
|
+
function Bn(e, t, n, s) {
|
|
2250
|
+
const { slots: l, attrs: a } = t;
|
|
2251
|
+
return () => {
|
|
2252
|
+
const c = { part: !0 };
|
|
2253
|
+
let d = z();
|
|
2254
|
+
e.locale && (c.locale = e.locale), P(e.format) ? c.key = e.format : J(e.format) && (P(e.format.key) && (c.key = e.format.key), d = Object.keys(e.format).reduce((I, w) => n.includes(w) ? me(z(), I, { [w]: e.format[w] }) : I, z()));
|
|
2255
|
+
const u = s(e.value, c, d);
|
|
2256
|
+
let b = [c.key];
|
|
2257
|
+
ie(u) ? b = u.map((I, w) => {
|
|
2258
|
+
const V = l[I.type], y = V ? V({ [I.type]: I.value, index: w, parts: u }) : [I.value];
|
|
2259
|
+
return rr(y) && (y[0].key = `${I.type}-${w}`), y;
|
|
2260
|
+
}) : P(u) && (b = [u]);
|
|
2261
|
+
const T = me(z(), a), L = P(e.tag) || J(e.tag) ? e.tag : Hn();
|
|
2262
|
+
return Sn(L, T, b);
|
|
2263
|
+
};
|
|
2264
|
+
}
|
|
2265
|
+
me({
|
|
2266
|
+
value: {
|
|
2267
|
+
type: Number,
|
|
2268
|
+
required: !0
|
|
2269
|
+
},
|
|
2270
|
+
format: {
|
|
2271
|
+
type: [String, Object]
|
|
2272
|
+
}
|
|
2273
|
+
}, Kt);
|
|
2274
|
+
me({
|
|
2275
|
+
value: {
|
|
2276
|
+
type: [Number, Date],
|
|
2277
|
+
required: !0
|
|
2278
|
+
},
|
|
2279
|
+
format: {
|
|
2280
|
+
type: [String, Object]
|
|
2281
|
+
}
|
|
2282
|
+
}, Kt);
|
|
2283
|
+
const lr = /* @__PURE__ */ Ve("global-vue-i18n");
|
|
2284
|
+
function gt(e = {}) {
|
|
2285
|
+
const t = xt();
|
|
2286
|
+
if (t == null)
|
|
2287
|
+
throw nt(Be.MUST_BE_CALL_SETUP_TOP);
|
|
2288
|
+
if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
|
|
2289
|
+
throw nt(Be.NOT_INSTALLED);
|
|
2290
|
+
const n = or(t), s = cr(n), l = Xn(t), a = ir(e, l);
|
|
2291
|
+
if (a === "global")
|
|
2292
|
+
return er(s, e, l), s;
|
|
2293
|
+
if (a === "parent") {
|
|
2294
|
+
let u = ur(n, t, e.__useComponent);
|
|
2295
|
+
return u == null && (u = s), u;
|
|
2296
|
+
}
|
|
2297
|
+
const c = n;
|
|
2298
|
+
let d = c.__getInstance(t);
|
|
2299
|
+
if (d == null) {
|
|
2300
|
+
const u = me({}, e);
|
|
2301
|
+
"__i18n" in l && (u.__i18n = l.__i18n), s && (u.__root = s), d = sr(u), c.__composerExtend && (d[Gt] = c.__composerExtend(d)), dr(c, t, d), c.__setInstance(t, d);
|
|
2302
|
+
}
|
|
2303
|
+
return d;
|
|
2304
|
+
}
|
|
2305
|
+
function or(e) {
|
|
2306
|
+
const t = Jn(e.isCE ? lr : e.appContext.app.__VUE_I18N_SYMBOL__);
|
|
2307
|
+
if (!t)
|
|
2308
|
+
throw nt(e.isCE ? Be.NOT_INSTALLED_WITH_PROVIDE : Be.UNEXPECTED_ERROR);
|
|
2309
|
+
return t;
|
|
2310
|
+
}
|
|
2311
|
+
function ir(e, t) {
|
|
2312
|
+
return pt(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
|
|
2313
|
+
}
|
|
2314
|
+
function cr(e) {
|
|
2315
|
+
return e.mode === "composition" ? e.global : e.global.__composer;
|
|
2316
|
+
}
|
|
2317
|
+
function ur(e, t, n = !1) {
|
|
2318
|
+
let s = null;
|
|
2319
|
+
const l = t.root;
|
|
2320
|
+
let a = mr(t, n);
|
|
2321
|
+
for (; a != null; ) {
|
|
2322
|
+
const c = e;
|
|
2323
|
+
if (e.mode === "composition")
|
|
2324
|
+
s = c.__getInstance(a);
|
|
2325
|
+
else if (__VUE_I18N_LEGACY_API__) {
|
|
2326
|
+
const d = c.__getInstance(a);
|
|
2327
|
+
d != null && (s = d.__composer, n && s && !s[Yn] && (s = null));
|
|
2328
|
+
}
|
|
2329
|
+
if (s != null || l === a)
|
|
2330
|
+
break;
|
|
2331
|
+
a = a.parent;
|
|
2332
|
+
}
|
|
2333
|
+
return s;
|
|
2334
|
+
}
|
|
2335
|
+
function mr(e, t = !1) {
|
|
2336
|
+
return e == null ? null : t && e.vnode.ctx || e.parent;
|
|
2337
|
+
}
|
|
2338
|
+
function dr(e, t, n) {
|
|
2339
|
+
Yt(() => {
|
|
2340
|
+
}, t), An(() => {
|
|
2341
|
+
const s = n;
|
|
2342
|
+
e.__deleteInstance(t);
|
|
2343
|
+
const l = s[Gt];
|
|
2344
|
+
l && (l(), delete s[Gt]);
|
|
2345
|
+
}, t);
|
|
2346
|
+
}
|
|
2347
|
+
Qa();
|
|
2348
|
+
Ca(ua);
|
|
2349
|
+
Aa(La);
|
|
2350
|
+
Sa(Mn);
|
|
2351
|
+
if (__INTLIFY_PROD_DEVTOOLS__) {
|
|
2352
|
+
const e = je();
|
|
2353
|
+
e.__INTLIFY__ = !0, ma(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
|
|
2354
|
+
}
|
|
2355
|
+
const it = /* @__PURE__ */ ye({
|
|
2356
|
+
__name: "InheritPermissionTooltip",
|
|
2357
|
+
props: {
|
|
2358
|
+
item: {
|
|
2359
|
+
type: Object,
|
|
2360
|
+
required: !0
|
|
2361
|
+
}
|
|
2362
|
+
},
|
|
2363
|
+
setup(e) {
|
|
2364
|
+
const { t } = gt();
|
|
2365
|
+
return (n, s) => {
|
|
2366
|
+
const l = Ze("FmIcon"), a = Ze("FmTooltip");
|
|
2367
|
+
return H(), Se(a, {
|
|
2368
|
+
variant: "plain",
|
|
2369
|
+
placement: "right",
|
|
2370
|
+
"z-index": 50
|
|
2371
|
+
}, {
|
|
2372
|
+
content: he(() => [
|
|
2373
|
+
te("div", null, Ae(B(t)("team.memberForm.permissions.inherited")), 1),
|
|
2374
|
+
(H(!0), ee(Ie, null, pe(e.item.setNames, (c) => (H(), ee("div", { key: c }, [
|
|
2375
|
+
te("div", null, "- " + Ae(c), 1)
|
|
2376
|
+
]))), 128))
|
|
2377
|
+
]),
|
|
2378
|
+
default: he(() => [
|
|
2379
|
+
de(l, {
|
|
2380
|
+
name: "admin_panel_settings",
|
|
2381
|
+
size: "sm",
|
|
2382
|
+
class: "ml-1 text-fm-color-typo-info"
|
|
2383
|
+
})
|
|
2384
|
+
]),
|
|
2385
|
+
_: 1
|
|
2386
|
+
});
|
|
2387
|
+
};
|
|
2388
|
+
}
|
|
2389
|
+
}), fr = { class: "space-y-16" }, _r = {
|
|
2390
|
+
key: 0,
|
|
2391
|
+
class: "flex fm-typo-en-title-sm-600"
|
|
2392
|
+
}, pr = {
|
|
2393
|
+
key: 0,
|
|
2394
|
+
class: "q-mr-xs text-red col"
|
|
2395
|
+
}, hr = { class: "form-input" }, br = /* @__PURE__ */ ye({
|
|
2396
|
+
__name: "AppForm",
|
|
2397
|
+
props: {
|
|
2398
|
+
title: {
|
|
2399
|
+
type: String,
|
|
2400
|
+
default: void 0
|
|
2401
|
+
},
|
|
2402
|
+
required: {
|
|
2403
|
+
type: [Boolean, String],
|
|
2404
|
+
default: !1
|
|
2405
|
+
},
|
|
2406
|
+
inline: {
|
|
2407
|
+
type: Boolean,
|
|
2408
|
+
default: !1
|
|
2409
|
+
}
|
|
2410
|
+
},
|
|
2411
|
+
setup(e) {
|
|
2412
|
+
const t = e;
|
|
2413
|
+
return (n, s) => (H(), ee("div", fr, [
|
|
2414
|
+
be(n.$slots, "top", {}, () => [
|
|
2415
|
+
t.title ? (H(), ee("div", _r, [
|
|
2416
|
+
te("div", null, [
|
|
2417
|
+
t.required ? (H(), ee("span", pr, "*")) : Le("", !0),
|
|
2418
|
+
Qn(Ae(t.title), 1)
|
|
2419
|
+
]),
|
|
2420
|
+
be(n.$slots, "title-right")
|
|
2421
|
+
])) : Le("", !0)
|
|
2422
|
+
]),
|
|
2423
|
+
te("div", hr, [
|
|
2424
|
+
be(n.$slots, "default")
|
|
2425
|
+
])
|
|
2426
|
+
]));
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2429
|
+
function gr(e, t) {
|
|
2430
|
+
let n = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
2431
|
+
const l = s.length;
|
|
2432
|
+
for (let a = 0; a < e; a++)
|
|
2433
|
+
n += s.charAt(Math.floor(Math.random() * l));
|
|
2434
|
+
return n;
|
|
2435
|
+
}
|
|
2436
|
+
const vr = { class: "col flex items-center" }, Er = {
|
|
2437
|
+
key: 1,
|
|
2438
|
+
class: "q-pa-sm form-error-message text-error"
|
|
2439
|
+
}, zt = /* @__PURE__ */ ye({
|
|
2440
|
+
__name: "CheckboxInput",
|
|
2441
|
+
props: {
|
|
2442
|
+
options: {
|
|
2443
|
+
type: Array,
|
|
2444
|
+
required: !0
|
|
2445
|
+
},
|
|
2446
|
+
title: {
|
|
2447
|
+
type: String,
|
|
2448
|
+
required: !0
|
|
2449
|
+
},
|
|
2450
|
+
modelValue: {
|
|
2451
|
+
type: Array,
|
|
2452
|
+
required: !0
|
|
2453
|
+
},
|
|
2454
|
+
showAllToggle: {
|
|
2455
|
+
type: [Boolean, String],
|
|
2456
|
+
default: !0
|
|
2457
|
+
},
|
|
2458
|
+
includeDisabledOptionsWhenSelectAll: {
|
|
2459
|
+
type: Boolean,
|
|
2460
|
+
default: !1
|
|
2461
|
+
},
|
|
2462
|
+
disable: {
|
|
2463
|
+
type: Boolean,
|
|
2464
|
+
default: !1
|
|
2465
|
+
},
|
|
2466
|
+
min: {
|
|
2467
|
+
type: Number,
|
|
2468
|
+
default: 0
|
|
2469
|
+
},
|
|
2470
|
+
max: {
|
|
2471
|
+
type: Number,
|
|
2472
|
+
default: void 0
|
|
2473
|
+
},
|
|
2474
|
+
showIntermediate: {
|
|
2475
|
+
type: Boolean,
|
|
2476
|
+
default: !0
|
|
2477
|
+
},
|
|
2478
|
+
gutter: {
|
|
2479
|
+
type: Number,
|
|
2480
|
+
default: void 0
|
|
2481
|
+
},
|
|
2482
|
+
falsyShowSlot: {
|
|
2483
|
+
type: Boolean,
|
|
2484
|
+
default: !1
|
|
2485
|
+
},
|
|
2486
|
+
bottomSlotIndent: {
|
|
2487
|
+
type: String,
|
|
2488
|
+
default: "36px"
|
|
2489
|
+
},
|
|
2490
|
+
alignCenter: {
|
|
2491
|
+
type: Boolean,
|
|
2492
|
+
default: !0
|
|
2493
|
+
}
|
|
2494
|
+
},
|
|
2495
|
+
emits: ["update:model-value"],
|
|
2496
|
+
setup(e, { emit: t }) {
|
|
2497
|
+
const n = e, s = t, { t: l } = _t(), a = Ue(!1), c = qn(), d = q(() => n.modelValue.length < n.min ? `Min selection ${n.min}` : n.max !== void 0 && n.modelValue.length > n.max ? `Max selection ${n.max}` : !0), u = `checkbox-${gr(6)}`, b = q(() => d.value !== !0), T = q(
|
|
2498
|
+
() => n.modelValue.filter((y) => n.options.some((A) => A.value === y))
|
|
2499
|
+
), L = q(
|
|
2500
|
+
() => typeof n.showAllToggle == "boolean" ? l("team.labels.all") : n.showAllToggle
|
|
2501
|
+
), I = q(() => n.options.length > 0 && n.options.length === T.value.length);
|
|
2502
|
+
function w() {
|
|
2503
|
+
const y = n.modelValue.filter((A) => !T.value.includes(A));
|
|
2504
|
+
if (I.value === !0)
|
|
2505
|
+
s("update:model-value", y);
|
|
2506
|
+
else {
|
|
2507
|
+
const A = n.includeDisabledOptionsWhenSelectAll ? n.options.map((i) => i.value) : n.options.filter((i) => !i.disabled).map((i) => i.value);
|
|
2508
|
+
s("update:model-value", [...y, ...A]);
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
function V(y, A) {
|
|
2512
|
+
let i = ut(n.modelValue);
|
|
2513
|
+
A ? i.every((f) => f !== y) && i.push(y) : i = i.filter((f) => f !== y), s("update:model-value", i);
|
|
2514
|
+
}
|
|
2515
|
+
return (y, A) => {
|
|
2516
|
+
const i = Ze("FmCheckbox");
|
|
2517
|
+
return H(), Se(br, {
|
|
2518
|
+
id: u,
|
|
2519
|
+
title: e.title,
|
|
2520
|
+
required: !1
|
|
2521
|
+
}, {
|
|
2522
|
+
top: he(() => [
|
|
2523
|
+
be(y.$slots, "top")
|
|
2524
|
+
]),
|
|
2525
|
+
default: he(() => [
|
|
2526
|
+
n.showAllToggle ? (H(), Se(i, {
|
|
2527
|
+
key: 0,
|
|
2528
|
+
"model-value": I.value,
|
|
2529
|
+
disabled: e.disable,
|
|
2530
|
+
label: L.value,
|
|
2531
|
+
style: ct(`margin-bottom: ${n.gutter}px`),
|
|
2532
|
+
size: "sm",
|
|
2533
|
+
dense: "",
|
|
2534
|
+
value: L.value,
|
|
2535
|
+
"onUpdate:modelValue": w
|
|
2536
|
+
}, null, 8, ["model-value", "disabled", "label", "style", "value"])) : Le("", !0),
|
|
2537
|
+
(H(!0), ee(Ie, null, pe(e.options, (f, N) => (H(), ee("div", {
|
|
2538
|
+
key: f.value,
|
|
2539
|
+
style: ct(`margin-bottom: ${N < e.options.length - 1 ? n.gutter : 0}px`),
|
|
2540
|
+
class: qe(N < e.options.length - 1 ? "q-mb-sm" : "")
|
|
2541
|
+
}, [
|
|
2542
|
+
te("div", {
|
|
2543
|
+
class: qe(["row justify-between", e.alignCenter ? "items-center" : "items-start"])
|
|
2544
|
+
}, [
|
|
2545
|
+
te("div", vr, [
|
|
2546
|
+
de(i, {
|
|
2547
|
+
"model-value": e.modelValue.includes(f.value),
|
|
2548
|
+
disabled: e.disable || f.disabled,
|
|
2549
|
+
size: "sm",
|
|
2550
|
+
label: f.label,
|
|
2551
|
+
value: f.label,
|
|
2552
|
+
"onUpdate:modelValue": (h) => V(f.value, h)
|
|
2553
|
+
}, null, 8, ["model-value", "disabled", "label", "value", "onUpdate:modelValue"]),
|
|
2554
|
+
be(y.$slots, `checkbox-${f.key || f.value}-append`, {
|
|
2555
|
+
option: f,
|
|
2556
|
+
selected: e.modelValue.includes(f.value)
|
|
2557
|
+
})
|
|
2558
|
+
]),
|
|
2559
|
+
B(c)[`checkbox-${f.key || f.value}-end`] && (e.modelValue.includes(f.value) || e.falsyShowSlot) ? (H(), ee("div", {
|
|
2560
|
+
key: 0,
|
|
2561
|
+
class: qe([{ "q-checkbox disabled": e.disable || f.disabled }, "col"])
|
|
2562
|
+
}, [
|
|
2563
|
+
be(y.$slots, `checkbox-${f.key || f.value}-end`, {
|
|
2564
|
+
option: f,
|
|
2565
|
+
value: e.modelValue.includes(f.value),
|
|
2566
|
+
disable: e.disable || f.disabled
|
|
2567
|
+
})
|
|
2568
|
+
], 2)) : Le("", !0)
|
|
2569
|
+
], 2),
|
|
2570
|
+
B(c)[`checkbox-${f.key || f.value}-bottom`] && (e.modelValue.includes(f.value) || e.falsyShowSlot) ? (H(), ee("div", {
|
|
2571
|
+
key: 0,
|
|
2572
|
+
class: qe(["q-mt-sm", { "q-checkbox disabled": e.disable || f.disabled }]),
|
|
2573
|
+
style: ct(`margin-left: ${e.bottomSlotIndent}`)
|
|
2574
|
+
}, [
|
|
2575
|
+
be(y.$slots, `checkbox-${f.key || f.value}-bottom`, {
|
|
2576
|
+
option: f,
|
|
2577
|
+
disable: e.disable || f.disabled,
|
|
2578
|
+
value: e.modelValue.includes(f.value)
|
|
2579
|
+
})
|
|
2580
|
+
], 6)) : Le("", !0)
|
|
2581
|
+
], 6))), 128)),
|
|
2582
|
+
a.value && b.value ? (H(), ee("div", Er, Ae(d.value), 1)) : Le("", !0)
|
|
2583
|
+
]),
|
|
2584
|
+
_: 3
|
|
2585
|
+
}, 8, ["title"]);
|
|
2586
|
+
};
|
|
2587
|
+
}
|
|
2588
|
+
});
|
|
2589
|
+
function On(e, t, n) {
|
|
2590
|
+
const s = n.filter((d) => d !== "manage");
|
|
2591
|
+
if (s.length === 0) return;
|
|
2592
|
+
const l = e.findIndex((d) => d.subject === t && !d.inverted);
|
|
2593
|
+
if (l < 0) return;
|
|
2594
|
+
const a = new Set(e[l].actions), c = s.every((d) => a.has(d));
|
|
2595
|
+
c && !a.has("manage") ? (a.add("manage"), e[l] = {
|
|
2596
|
+
...e[l],
|
|
2597
|
+
actions: Array.from(a)
|
|
2598
|
+
}) : !c && a.has("manage") && (a.delete("manage"), a.size === 0 ? e.splice(l, 1) : e[l] = {
|
|
2599
|
+
...e[l],
|
|
2600
|
+
actions: Array.from(a)
|
|
2601
|
+
});
|
|
2602
|
+
}
|
|
2603
|
+
const Rn = Object.values(cs);
|
|
2604
|
+
function Ir(e, t, n, s) {
|
|
2605
|
+
const { getFlagValue: l } = ms(), a = q(() => {
|
|
2606
|
+
const m = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
|
|
2607
|
+
for (const p of t.value) {
|
|
2608
|
+
const D = p.category;
|
|
2609
|
+
D && (n.value.includes(p.subject) || p.showByFeatureFlag && l(p.showByFeatureFlag) === "false" || (m.has(D) || m.set(D, []), m.get(D).push({ label: p.label, value: p.subject }), R.set(p.subject, p)));
|
|
2610
|
+
}
|
|
2611
|
+
return [...m.keys()].sort((p, D) => {
|
|
2612
|
+
const F = Rn.indexOf(p), U = Rn.indexOf(D);
|
|
2613
|
+
return F === -1 && U === -1 ? p.localeCompare(D) : F === -1 ? 1 : U === -1 ? -1 : F - U;
|
|
2614
|
+
}).map((p) => {
|
|
2615
|
+
const D = m.get(p), F = /* @__PURE__ */ new Map();
|
|
2616
|
+
for (const G of D) {
|
|
2617
|
+
const Y = R.get(G.value);
|
|
2618
|
+
Y && F.set(G.value, Y.actions);
|
|
2619
|
+
}
|
|
2620
|
+
const U = D.some((G) => {
|
|
2621
|
+
const Y = F.get(G.value);
|
|
2622
|
+
return Y && Y.length > 1;
|
|
2623
|
+
}), ae = U ? [
|
|
2624
|
+
...new Set(
|
|
2625
|
+
D.flatMap((G) => F.get(G.value) ?? []).filter((G) => G !== "manage")
|
|
2626
|
+
)
|
|
2627
|
+
] : [], O = /* @__PURE__ */ new Map();
|
|
2628
|
+
for (const G of e.value)
|
|
2629
|
+
D.some((Y) => Y.value === G.subject) && !G.inverted && O.set(G.subject, new Set(G.actions));
|
|
2630
|
+
const k = U ? e.value.filter(
|
|
2631
|
+
(G) => D.some((Y) => Y.value === G.subject) && !G.inverted && G.actions.includes("manage")
|
|
2632
|
+
).map((G) => G.subject) : e.value.filter((G) => D.some((Y) => Y.value === G.subject) && !G.inverted).map((G) => G.subject), M = D.find((G) => {
|
|
2633
|
+
var Y;
|
|
2634
|
+
return (Y = R.get(G.value)) == null ? void 0 : Y.isCategoryCover;
|
|
2635
|
+
}), X = (M == null ? void 0 : M.value) ?? null, x = X ? O.get(X) ?? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set(), W = x.has("manage");
|
|
2636
|
+
return {
|
|
2637
|
+
category: p,
|
|
2638
|
+
options: D,
|
|
2639
|
+
selectedSubjects: k,
|
|
2640
|
+
isMultiAction: U,
|
|
2641
|
+
actionColumns: ae,
|
|
2642
|
+
permissionActionsMap: F,
|
|
2643
|
+
selectedActionsMap: O,
|
|
2644
|
+
coverSubject: X,
|
|
2645
|
+
coverSelectedActions: x,
|
|
2646
|
+
coverCoversAll: W
|
|
2647
|
+
};
|
|
2648
|
+
});
|
|
2649
|
+
});
|
|
2650
|
+
function c(m, R) {
|
|
2651
|
+
var p;
|
|
2652
|
+
const v = ((p = a.value.find((D) => D.category === m)) == null ? void 0 : p.options) ?? [];
|
|
2653
|
+
s("update:model-value", [
|
|
2654
|
+
...e.value.filter((D) => !v.some((F) => F.value === D.subject)),
|
|
2655
|
+
...t.value.filter((D) => R.includes(D.subject)).map(
|
|
2656
|
+
({ category: D, showByFeatureFlag: F, isCategoryCover: U, ...ae }) => ae
|
|
2657
|
+
)
|
|
2658
|
+
]);
|
|
2659
|
+
}
|
|
2660
|
+
function d(m) {
|
|
2661
|
+
return m.options.length > 0 && m.options.every((R) => m.selectedSubjects.includes(R.value));
|
|
2662
|
+
}
|
|
2663
|
+
function u(m) {
|
|
2664
|
+
const R = e.value.filter(
|
|
2665
|
+
(v) => !m.options.some((p) => p.value === v.subject)
|
|
2666
|
+
);
|
|
2667
|
+
if (d(m))
|
|
2668
|
+
s("update:model-value", R);
|
|
2669
|
+
else {
|
|
2670
|
+
const v = t.value.filter((p) => m.options.some((D) => D.value === p.subject)).map(
|
|
2671
|
+
({ category: p, showByFeatureFlag: D, isCategoryCover: F, ...U }) => U
|
|
2672
|
+
);
|
|
2673
|
+
s("update:model-value", [...R, ...v]);
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
function b(m, R) {
|
|
2677
|
+
const v = m.selectedActionsMap.get(R);
|
|
2678
|
+
return v ? v.has("manage") : !1;
|
|
2679
|
+
}
|
|
2680
|
+
function T(m, R) {
|
|
2681
|
+
const v = m.permissionActionsMap.get(R);
|
|
2682
|
+
if (!v) return !1;
|
|
2683
|
+
const p = v.filter((U) => U !== "manage");
|
|
2684
|
+
if (p.length === 0) return !1;
|
|
2685
|
+
const D = m.selectedActionsMap.get(R);
|
|
2686
|
+
if (!D) return !1;
|
|
2687
|
+
const F = p.filter((U) => D.has(U));
|
|
2688
|
+
return F.length > 0 && F.length < p.length;
|
|
2689
|
+
}
|
|
2690
|
+
function L(m, R, v) {
|
|
2691
|
+
if (v) {
|
|
2692
|
+
const p = t.value.find((k) => k.subject === R);
|
|
2693
|
+
if (!p) return;
|
|
2694
|
+
const {
|
|
2695
|
+
category: D,
|
|
2696
|
+
showByFeatureFlag: F,
|
|
2697
|
+
isCategoryCover: U,
|
|
2698
|
+
...ae
|
|
2699
|
+
} = p, O = e.value.filter((k) => k.subject !== R);
|
|
2700
|
+
O.push(ae), s("update:model-value", O);
|
|
2701
|
+
} else
|
|
2702
|
+
s(
|
|
2703
|
+
"update:model-value",
|
|
2704
|
+
e.value.filter((p) => p.subject !== R)
|
|
2705
|
+
);
|
|
2706
|
+
}
|
|
2707
|
+
function I(m, R) {
|
|
2708
|
+
const v = m.permissionActionsMap.get(R);
|
|
2709
|
+
return v ? v.some((p) => p !== "manage") : !1;
|
|
2710
|
+
}
|
|
2711
|
+
function w(m, R, v) {
|
|
2712
|
+
const p = m.selectedActionsMap.get(R);
|
|
2713
|
+
return p ? p.has(v) : !1;
|
|
2714
|
+
}
|
|
2715
|
+
function V(m, R) {
|
|
2716
|
+
return !m.coverSubject || R === m.coverSubject ? !1 : m.coverCoversAll;
|
|
2717
|
+
}
|
|
2718
|
+
function y(m, R, v) {
|
|
2719
|
+
return !m.coverSubject || R === m.coverSubject ? !1 : m.coverCoversAll ? !0 : m.coverSelectedActions.has(v);
|
|
2720
|
+
}
|
|
2721
|
+
function A(m, R, v) {
|
|
2722
|
+
const p = m.permissionActionsMap.get(R);
|
|
2723
|
+
return p ? p.includes(v) : !1;
|
|
2724
|
+
}
|
|
2725
|
+
function i(m, R, v) {
|
|
2726
|
+
const p = [...e.value], D = p.findIndex((U) => U.subject === m && !U.inverted);
|
|
2727
|
+
if (v)
|
|
2728
|
+
if (D >= 0) {
|
|
2729
|
+
const U = { ...p[D] }, ae = new Set(U.actions);
|
|
2730
|
+
ae.add(R), U.actions = Array.from(ae), p[D] = U;
|
|
2731
|
+
} else {
|
|
2732
|
+
const U = t.value.find((X) => X.subject === m);
|
|
2733
|
+
if (!U) return;
|
|
2734
|
+
const {
|
|
2735
|
+
category: ae,
|
|
2736
|
+
showByFeatureFlag: O,
|
|
2737
|
+
isCategoryCover: k,
|
|
2738
|
+
...M
|
|
2739
|
+
} = U;
|
|
2740
|
+
p.push({ ...M, actions: [R] });
|
|
2741
|
+
}
|
|
2742
|
+
else if (D >= 0) {
|
|
2743
|
+
const U = { ...p[D] }, ae = U.actions.filter((O) => O !== R);
|
|
2744
|
+
ae.length === 0 ? p.splice(D, 1) : (U.actions = ae, p[D] = U);
|
|
2745
|
+
}
|
|
2746
|
+
const F = t.value.find((U) => U.subject === m);
|
|
2747
|
+
F && On(p, m, F.actions), s("update:model-value", p);
|
|
2748
|
+
}
|
|
2749
|
+
function f(m, R) {
|
|
2750
|
+
const v = m.options.filter(
|
|
2751
|
+
(p) => A(m, p.value, R)
|
|
2752
|
+
);
|
|
2753
|
+
return v.length === 0 ? !1 : v.every(
|
|
2754
|
+
(p) => w(m, p.value, R) || y(m, p.value, R)
|
|
2755
|
+
);
|
|
2756
|
+
}
|
|
2757
|
+
function N(m, R) {
|
|
2758
|
+
const v = m.options.filter(
|
|
2759
|
+
(D) => A(m, D.value, R)
|
|
2760
|
+
);
|
|
2761
|
+
if (v.length === 0) return !1;
|
|
2762
|
+
const p = v.filter(
|
|
2763
|
+
(D) => w(m, D.value, R) || y(m, D.value, R)
|
|
2764
|
+
).length;
|
|
2765
|
+
return p > 0 && p < v.length;
|
|
2766
|
+
}
|
|
2767
|
+
function h(m, R, v) {
|
|
2768
|
+
const p = [...e.value];
|
|
2769
|
+
for (const D of m.options) {
|
|
2770
|
+
if (!A(m, D.value, R)) continue;
|
|
2771
|
+
const F = D.value, U = p.findIndex(
|
|
2772
|
+
(O) => O.subject === F && !O.inverted
|
|
2773
|
+
);
|
|
2774
|
+
if (v)
|
|
2775
|
+
if (U >= 0) {
|
|
2776
|
+
const O = { ...p[U] }, k = new Set(O.actions);
|
|
2777
|
+
k.add(R), O.actions = Array.from(k), p[U] = O;
|
|
2778
|
+
} else {
|
|
2779
|
+
const O = t.value.find((W) => W.subject === F);
|
|
2780
|
+
if (!O) continue;
|
|
2781
|
+
const {
|
|
2782
|
+
category: k,
|
|
2783
|
+
showByFeatureFlag: M,
|
|
2784
|
+
isCategoryCover: X,
|
|
2785
|
+
...x
|
|
2786
|
+
} = O;
|
|
2787
|
+
p.push({ ...x, actions: [R] });
|
|
2788
|
+
}
|
|
2789
|
+
else if (U >= 0) {
|
|
2790
|
+
const O = { ...p[U] }, k = O.actions.filter((M) => M !== R);
|
|
2791
|
+
k.length === 0 ? p.splice(U, 1) : (O.actions = k, p[U] = O);
|
|
2792
|
+
}
|
|
2793
|
+
const ae = t.value.find((O) => O.subject === F);
|
|
2794
|
+
ae && On(p, F, ae.actions);
|
|
2795
|
+
}
|
|
2796
|
+
s("update:model-value", p);
|
|
2797
|
+
}
|
|
2798
|
+
const S = {
|
|
2799
|
+
read: "View",
|
|
2800
|
+
create: "Duplicate",
|
|
2801
|
+
update: "Edit"
|
|
2802
|
+
};
|
|
2803
|
+
function C(m) {
|
|
2804
|
+
return S[m] ?? m.charAt(0).toUpperCase() + m.slice(1);
|
|
2805
|
+
}
|
|
2806
|
+
return {
|
|
2807
|
+
categoryGroups: a,
|
|
2808
|
+
toggleCategory: c,
|
|
2809
|
+
isAllManageChecked: d,
|
|
2810
|
+
toggleAllManage: u,
|
|
2811
|
+
isManageChecked: b,
|
|
2812
|
+
isManageIndeterminate: T,
|
|
2813
|
+
toggleManage: L,
|
|
2814
|
+
hasNonManageActions: I,
|
|
2815
|
+
isActionChecked: w,
|
|
2816
|
+
isRowFullyCoveredByCover: V,
|
|
2817
|
+
isActionCoveredByCover: y,
|
|
2818
|
+
permissionDefinesAction: A,
|
|
2819
|
+
toggleAction: i,
|
|
2820
|
+
isAllActionChecked: f,
|
|
2821
|
+
isAllActionIndeterminate: N,
|
|
2822
|
+
toggleAllAction: h,
|
|
2823
|
+
actionLabel: C
|
|
2824
|
+
};
|
|
2825
|
+
}
|
|
2826
|
+
const Nr = { class: "flex flex-col gap-16" }, yr = {
|
|
2827
|
+
key: 1,
|
|
2828
|
+
class: "space-y-16"
|
|
2829
|
+
}, Tr = { class: "flex items-end justify-between" }, kr = { class: "fm-typo-en-title-sm-600" }, Lr = { class: "flex" }, Or = { class: "form-input" }, Rr = { class: "flex items-center justify-between q-mb-xs" }, Cr = { class: "flex shrink-0" }, Ar = { class: "flex items-center justify-between gap-4" }, Sr = { class: "flex items-center min-w-0 flex-1 gap-8" }, Dr = ["title", "onClick"], Mr = {
|
|
2830
|
+
key: 0,
|
|
2831
|
+
class: "flex shrink-0"
|
|
2832
|
+
}, wr = /* @__PURE__ */ ye({
|
|
2833
|
+
__name: "BasePermission",
|
|
2834
|
+
props: {
|
|
2835
|
+
modelValue: {
|
|
2836
|
+
type: Array,
|
|
2837
|
+
required: !0
|
|
2838
|
+
},
|
|
2839
|
+
disable: {
|
|
2840
|
+
type: Boolean,
|
|
2841
|
+
default: !1
|
|
2842
|
+
},
|
|
2843
|
+
excludedSubjects: {
|
|
2844
|
+
type: Array,
|
|
2845
|
+
required: !0
|
|
2846
|
+
},
|
|
2847
|
+
additionalPermissions: {
|
|
2848
|
+
type: Array,
|
|
2849
|
+
default: () => []
|
|
2850
|
+
}
|
|
2851
|
+
},
|
|
2852
|
+
emits: ["update:model-value"],
|
|
2853
|
+
setup(e, { emit: t }) {
|
|
2854
|
+
const n = e, s = t, l = q(() => [...Dt, ...n.additionalPermissions]), {
|
|
2855
|
+
categoryGroups: a,
|
|
2856
|
+
toggleCategory: c,
|
|
2857
|
+
isAllManageChecked: d,
|
|
2858
|
+
toggleAllManage: u,
|
|
2859
|
+
isManageChecked: b,
|
|
2860
|
+
isManageIndeterminate: T,
|
|
2861
|
+
toggleManage: L,
|
|
2862
|
+
hasNonManageActions: I,
|
|
2863
|
+
isActionChecked: w,
|
|
2864
|
+
isRowFullyCoveredByCover: V,
|
|
2865
|
+
isActionCoveredByCover: y,
|
|
2866
|
+
permissionDefinesAction: A,
|
|
2867
|
+
toggleAction: i,
|
|
2868
|
+
isAllActionChecked: f,
|
|
2869
|
+
isAllActionIndeterminate: N,
|
|
2870
|
+
toggleAllAction: h,
|
|
2871
|
+
actionLabel: S
|
|
2872
|
+
} = Ir(
|
|
2873
|
+
Qt(n, "modelValue"),
|
|
2874
|
+
l,
|
|
2875
|
+
Qt(n, "excludedSubjects"),
|
|
2876
|
+
(C, m) => s("update:model-value", m)
|
|
2877
|
+
);
|
|
2878
|
+
return (C, m) => {
|
|
2879
|
+
const R = Ze("FmCheckbox");
|
|
2880
|
+
return H(), ee("div", Nr, [
|
|
2881
|
+
(H(!0), ee(Ie, null, pe(B(a), (v) => (H(), ee(Ie, {
|
|
2882
|
+
key: v.category
|
|
2883
|
+
}, [
|
|
2884
|
+
v.isMultiAction ? (H(), ee("div", yr, [
|
|
2885
|
+
te("div", Tr, [
|
|
2886
|
+
te("div", kr, Ae(v.category), 1),
|
|
2887
|
+
te("div", Lr, [
|
|
2888
|
+
(H(!0), ee(Ie, null, pe(v.actionColumns, (p) => (H(), ee("span", {
|
|
2889
|
+
key: p,
|
|
2890
|
+
class: "w-[56px] text-center fm-typo-en-body-sm-400 text-fm-color-neutral-gray-600"
|
|
2891
|
+
}, Ae(B(S)(p)), 1))), 128))
|
|
2892
|
+
])
|
|
2893
|
+
]),
|
|
2894
|
+
te("div", Or, [
|
|
2895
|
+
te("div", Rr, [
|
|
2896
|
+
de(R, {
|
|
2897
|
+
"model-value": B(d)(v),
|
|
2898
|
+
value: !0,
|
|
2899
|
+
disabled: e.disable,
|
|
2900
|
+
label: "All",
|
|
2901
|
+
size: "sm",
|
|
2902
|
+
dense: "",
|
|
2903
|
+
"onUpdate:modelValue": (p) => B(u)(v)
|
|
2904
|
+
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
|
|
2905
|
+
te("div", Cr, [
|
|
2906
|
+
(H(!0), ee(Ie, null, pe(v.actionColumns, (p) => (H(), ee("div", {
|
|
2907
|
+
key: p,
|
|
2908
|
+
class: "w-[56px] flex justify-center"
|
|
2909
|
+
}, [
|
|
2910
|
+
de(R, {
|
|
2911
|
+
"model-value": B(f)(v, p),
|
|
2912
|
+
indeterminate: B(N)(v, p),
|
|
2913
|
+
value: p,
|
|
2914
|
+
disabled: e.disable,
|
|
2915
|
+
size: "sm",
|
|
2916
|
+
dense: "",
|
|
2917
|
+
"onUpdate:modelValue": (D) => B(h)(v, p, D)
|
|
2918
|
+
}, null, 8, ["model-value", "indeterminate", "value", "disabled", "onUpdate:modelValue"])
|
|
2919
|
+
]))), 128))
|
|
2920
|
+
])
|
|
2921
|
+
]),
|
|
2922
|
+
(H(!0), ee(Ie, null, pe(v.options, (p, D) => (H(), ee("div", {
|
|
2923
|
+
key: p.value,
|
|
2924
|
+
class: qe(D < v.options.length - 1 ? "q-mb-xs" : "")
|
|
2925
|
+
}, [
|
|
2926
|
+
te("div", Ar, [
|
|
2927
|
+
te("div", Sr, [
|
|
2928
|
+
de(R, {
|
|
2929
|
+
"model-value": B(b)(v, p.value) || B(V)(v, p.value),
|
|
2930
|
+
value: p.value,
|
|
2931
|
+
disabled: e.disable || B(V)(v, p.value),
|
|
2932
|
+
indeterminate: B(T)(v, p.value),
|
|
2933
|
+
size: "sm",
|
|
2934
|
+
class: "shrink-0",
|
|
2935
|
+
"onUpdate:modelValue": (F) => B(L)(v, p.value, F)
|
|
2936
|
+
}, null, 8, ["model-value", "value", "disabled", "indeterminate", "onUpdate:modelValue"]),
|
|
2937
|
+
te("span", {
|
|
2938
|
+
class: "block truncate cursor-pointer",
|
|
2939
|
+
title: p.label,
|
|
2940
|
+
onClick: (F) => !e.disable && !B(V)(v, p.value) && B(L)(v, p.value, !B(b)(v, p.value))
|
|
2941
|
+
}, Ae(p.label), 9, Dr),
|
|
2942
|
+
be(C.$slots, `checkbox-${p.value}-append`, { option: p })
|
|
2943
|
+
]),
|
|
2944
|
+
B(I)(v, p.value) ? (H(), ee("div", Mr, [
|
|
2945
|
+
(H(!0), ee(Ie, null, pe(v.actionColumns, (F) => (H(), ee("div", {
|
|
2946
|
+
key: F,
|
|
2947
|
+
class: "w-[56px] flex justify-center"
|
|
2948
|
+
}, [
|
|
2949
|
+
B(A)(v, p.value, F) ? (H(), Se(R, {
|
|
2950
|
+
key: 0,
|
|
2951
|
+
"model-value": B(w)(v, p.value, F) || B(y)(v, p.value, F),
|
|
2952
|
+
value: F,
|
|
2953
|
+
disabled: e.disable || B(y)(v, p.value, F),
|
|
2954
|
+
size: "sm",
|
|
2955
|
+
"onUpdate:modelValue": (U) => B(i)(p.value, F, U)
|
|
2956
|
+
}, null, 8, ["model-value", "value", "disabled", "onUpdate:modelValue"])) : Le("", !0)
|
|
2957
|
+
]))), 128))
|
|
2958
|
+
])) : Le("", !0)
|
|
2959
|
+
])
|
|
2960
|
+
], 2))), 128))
|
|
2961
|
+
])
|
|
2962
|
+
])) : (H(), Se(zt, {
|
|
2963
|
+
key: 0,
|
|
2964
|
+
"model-value": v.selectedSubjects,
|
|
2965
|
+
options: v.options,
|
|
2966
|
+
disable: e.disable,
|
|
2967
|
+
title: v.category,
|
|
2968
|
+
"onUpdate:modelValue": (p) => B(c)(v.category, p)
|
|
2969
|
+
}, Fe({ _: 2 }, [
|
|
2970
|
+
pe(v.options, (p) => ({
|
|
2971
|
+
name: `checkbox-${p.value}-append`,
|
|
2972
|
+
fn: he(({ option: D }) => [
|
|
2973
|
+
be(C.$slots, `checkbox-${p.value}-append`, { option: D })
|
|
2974
|
+
])
|
|
2975
|
+
}))
|
|
2976
|
+
]), 1032, ["model-value", "options", "disable", "title", "onUpdate:modelValue"]))
|
|
2977
|
+
], 64))), 128))
|
|
2978
|
+
]);
|
|
2979
|
+
};
|
|
2980
|
+
}
|
|
2981
|
+
}), Pr = { class: "flex items-center" }, Fr = { class: "ml-auto" }, jr = /* @__PURE__ */ ye({
|
|
2982
|
+
__name: "CollapsibleWrapper",
|
|
2983
|
+
props: {
|
|
2984
|
+
title: { default: "" },
|
|
2985
|
+
initiallyCollapsed: { type: Boolean, default: !1 }
|
|
2986
|
+
},
|
|
2987
|
+
setup(e) {
|
|
2988
|
+
const n = Ue(e.initiallyCollapsed), s = Ue(), l = Ue(0);
|
|
2989
|
+
let a;
|
|
2990
|
+
function c() {
|
|
2991
|
+
n.value = !n.value;
|
|
2992
|
+
}
|
|
2993
|
+
function d() {
|
|
2994
|
+
s.value && (l.value = s.value.scrollHeight);
|
|
2995
|
+
}
|
|
2996
|
+
return Yt(async () => {
|
|
2997
|
+
await es(), s.value && (a = new ResizeObserver(() => {
|
|
2998
|
+
d();
|
|
2999
|
+
}), a.observe(s.value));
|
|
3000
|
+
}), An(() => {
|
|
3001
|
+
a == null || a.disconnect();
|
|
3002
|
+
}), (u, b) => {
|
|
3003
|
+
const T = Ze("FmButton");
|
|
3004
|
+
return H(), ee(Ie, null, [
|
|
3005
|
+
te("div", { onClick: c }, [
|
|
3006
|
+
te("div", Pr, [
|
|
3007
|
+
be(u.$slots, "title"),
|
|
3008
|
+
te("div", Fr, [
|
|
3009
|
+
de(T, {
|
|
3010
|
+
icon: n.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
|
|
3011
|
+
"text-color": "neutral-gray-400",
|
|
3012
|
+
variant: "tertiary",
|
|
3013
|
+
size: "md"
|
|
3014
|
+
}, null, 8, ["icon"])
|
|
3015
|
+
])
|
|
3016
|
+
])
|
|
3017
|
+
]),
|
|
3018
|
+
te("div", {
|
|
3019
|
+
ref_key: "contentRef",
|
|
3020
|
+
ref: s,
|
|
3021
|
+
class: "transition-all duration-300 ease-in-out overflow-hidden",
|
|
3022
|
+
style: ct({ maxHeight: n.value ? "0" : l.value + "px" })
|
|
3023
|
+
}, [
|
|
3024
|
+
be(u.$slots, "default")
|
|
3025
|
+
], 4)
|
|
3026
|
+
], 64);
|
|
3027
|
+
};
|
|
3028
|
+
}
|
|
3029
|
+
}), Ur = { class: "fm-typo-en-title-sm-600" }, Ct = "includedFuture", Cn = /* @__PURE__ */ ye({
|
|
3030
|
+
__name: "ConditionPermission",
|
|
3031
|
+
props: {
|
|
3032
|
+
modelValue: {
|
|
3033
|
+
type: Array,
|
|
3034
|
+
default: null
|
|
3035
|
+
},
|
|
3036
|
+
options: {
|
|
3037
|
+
type: Array,
|
|
3038
|
+
required: !0
|
|
3039
|
+
},
|
|
3040
|
+
disable: {
|
|
3041
|
+
type: Boolean,
|
|
3042
|
+
default: !1
|
|
3043
|
+
},
|
|
3044
|
+
context: {
|
|
3045
|
+
type: String,
|
|
3046
|
+
required: !0
|
|
3047
|
+
}
|
|
3048
|
+
},
|
|
3049
|
+
emits: ["update:model-value"],
|
|
3050
|
+
setup(e, { emit: t }) {
|
|
3051
|
+
const n = e, s = t, { t: l } = _t(), a = q(() => [
|
|
3052
|
+
{
|
|
3053
|
+
label: l("team.memberForm.permissions.includedFuture", { context: n.context }),
|
|
3054
|
+
value: Ct,
|
|
3055
|
+
// Can only be selected if all other options are selected
|
|
3056
|
+
disable: !!n.modelValue && n.options.length > n.modelValue.length
|
|
3057
|
+
},
|
|
3058
|
+
...n.options.filter(
|
|
3059
|
+
(b) => b.label.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())
|
|
3060
|
+
)
|
|
3061
|
+
]), c = q(() => n.modelValue ? n.modelValue : [Ct, ...n.options.map((b) => b.value)]);
|
|
3062
|
+
function d(b) {
|
|
3063
|
+
const T = b.length === a.value.length;
|
|
3064
|
+
s("update:model-value", T ? null : b.filter((L) => L !== Ct));
|
|
3065
|
+
}
|
|
3066
|
+
const u = Ue("");
|
|
3067
|
+
return (b, T) => {
|
|
3068
|
+
const L = Ze("fm-search");
|
|
3069
|
+
return H(), Se(jr, null, {
|
|
3070
|
+
title: he(() => [
|
|
3071
|
+
te("p", Ur, Ae(B(l)("team.memberForm.permissions.manageable", { context: e.context })), 1)
|
|
3072
|
+
]),
|
|
3073
|
+
default: he(() => [
|
|
3074
|
+
e.options.length > 1 ? (H(), Se(L, {
|
|
3075
|
+
key: 0,
|
|
3076
|
+
modelValue: u.value,
|
|
3077
|
+
"onUpdate:modelValue": T[0] || (T[0] = (I) => u.value = I),
|
|
3078
|
+
class: "mt-16",
|
|
3079
|
+
placeholder: B(l)("team.memberForm.permissions.search", { context: e.context })
|
|
3080
|
+
}, null, 8, ["modelValue", "placeholder"])) : Le("", !0),
|
|
3081
|
+
de(zt, {
|
|
3082
|
+
"model-value": c.value,
|
|
3083
|
+
options: a.value,
|
|
3084
|
+
"show-intermediate": !1,
|
|
3085
|
+
"show-all-toggle": !0,
|
|
3086
|
+
disable: e.disable,
|
|
3087
|
+
"include-disabled-options-when-select-all": !0,
|
|
3088
|
+
title: "",
|
|
3089
|
+
class: "mt-16",
|
|
3090
|
+
"onUpdate:modelValue": d
|
|
3091
|
+
}, Fe({ _: 2 }, [
|
|
3092
|
+
pe(a.value, (I) => ({
|
|
3093
|
+
name: `checkbox-${I.value}-append`,
|
|
3094
|
+
fn: he(({ option: w }) => [
|
|
3095
|
+
be(b.$slots, `checkbox-${I.value}-append`, { option: w })
|
|
3096
|
+
])
|
|
3097
|
+
}))
|
|
3098
|
+
]), 1032, ["model-value", "options", "disable"])
|
|
3099
|
+
]),
|
|
3100
|
+
_: 3
|
|
3101
|
+
});
|
|
3102
|
+
};
|
|
3103
|
+
}
|
|
3104
|
+
}), At = "includedNewRole", Vr = /* @__PURE__ */ ye({
|
|
3105
|
+
__name: "PosRolePermission",
|
|
3106
|
+
props: {
|
|
3107
|
+
modelValue: {
|
|
3108
|
+
type: Array,
|
|
3109
|
+
default: null
|
|
3110
|
+
},
|
|
3111
|
+
roles: {
|
|
3112
|
+
type: Array,
|
|
3113
|
+
required: !0
|
|
3114
|
+
},
|
|
3115
|
+
restaurantIds: {
|
|
3116
|
+
type: Array,
|
|
3117
|
+
default: null
|
|
3118
|
+
},
|
|
3119
|
+
disable: {
|
|
3120
|
+
type: Boolean,
|
|
3121
|
+
default: !1
|
|
3122
|
+
}
|
|
3123
|
+
},
|
|
3124
|
+
emits: ["update:model-value"],
|
|
3125
|
+
setup(e, { emit: t }) {
|
|
3126
|
+
const n = e, s = t, { t: l } = _t(), a = q(() => {
|
|
3127
|
+
const u = n.restaurantIds;
|
|
3128
|
+
return [
|
|
3129
|
+
{
|
|
3130
|
+
label: l("team.memberForm.permissions.includedNewRole"),
|
|
3131
|
+
value: At,
|
|
3132
|
+
disable: !!n.modelValue && n.roles.length > n.modelValue.length
|
|
3133
|
+
},
|
|
3134
|
+
...n.roles.map((b) => ({
|
|
3135
|
+
label: b.name,
|
|
3136
|
+
value: b._id,
|
|
3137
|
+
disable: !!u && b.restaurants.every(({ id: T }) => !u.includes(T))
|
|
3138
|
+
}))
|
|
3139
|
+
];
|
|
3140
|
+
}), c = q(() => n.modelValue ? n.modelValue : [At, ...n.roles.map((u) => u._id)]);
|
|
3141
|
+
function d(u) {
|
|
3142
|
+
const b = u.length === a.value.length;
|
|
3143
|
+
s("update:model-value", b ? null : u.filter((T) => T !== At));
|
|
3144
|
+
}
|
|
3145
|
+
return (u, b) => (H(), Se(zt, {
|
|
3146
|
+
"model-value": c.value,
|
|
3147
|
+
options: a.value,
|
|
3148
|
+
"show-intermediate": !1,
|
|
3149
|
+
"show-all-toggle": !1,
|
|
3150
|
+
disable: e.disable,
|
|
3151
|
+
title: B(l)("team.memberForm.permissions.roles"),
|
|
3152
|
+
"onUpdate:modelValue": d
|
|
3153
|
+
}, Fe({ _: 2 }, [
|
|
3154
|
+
pe(a.value, (T) => ({
|
|
3155
|
+
name: `checkbox-${T.value}-append`,
|
|
3156
|
+
fn: he(({ option: L }) => [
|
|
3157
|
+
be(u.$slots, `checkbox-${T.value}-append`, { option: L })
|
|
3158
|
+
])
|
|
3159
|
+
}))
|
|
3160
|
+
]), 1032, ["model-value", "options", "disable", "title"]));
|
|
3161
|
+
}
|
|
3162
|
+
}), Wr = {
|
|
3163
|
+
async readWarehouses() {
|
|
3164
|
+
return os(await is().get("/warehouses"));
|
|
3165
|
+
}
|
|
3166
|
+
}, Gr = { class: "flex flex-col gap-32" }, xr = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, Yr = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, Zr = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, Xr = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, tl = /* @__PURE__ */ ye({
|
|
3167
|
+
__name: "PortalPermissionEditor",
|
|
3168
|
+
props: /* @__PURE__ */ qt({
|
|
3169
|
+
disable: {
|
|
3170
|
+
type: Boolean,
|
|
3171
|
+
default: !1
|
|
3172
|
+
},
|
|
3173
|
+
inheritPermissions: {
|
|
3174
|
+
type: Array,
|
|
3175
|
+
default: () => []
|
|
3176
|
+
}
|
|
3177
|
+
}, {
|
|
3178
|
+
modelValue: { default: () => [] },
|
|
3179
|
+
modelModifiers: {}
|
|
3180
|
+
}),
|
|
3181
|
+
emits: /* @__PURE__ */ qt(["permissionChanged"], ["update:modelValue"]),
|
|
3182
|
+
setup(e, { emit: t }) {
|
|
3183
|
+
const n = ts(e, "modelValue"), s = e, l = t, { t: a } = _t(), { fetchCustomReportPermissions: c, customReportPermissions: d } = ss();
|
|
3184
|
+
function u(O) {
|
|
3185
|
+
return Dt.find((k) => k.subject === O) ?? d.value.find((k) => k.subject === O);
|
|
3186
|
+
}
|
|
3187
|
+
const b = q(() => {
|
|
3188
|
+
const O = [...Dt, ...d.value].filter((M) => !w.includes(M.subject)).map((M) => M.subject);
|
|
3189
|
+
return as(
|
|
3190
|
+
s.inheritPermissions.map((M) => ({
|
|
3191
|
+
...M,
|
|
3192
|
+
permissions: M.permissions.filter((X) => O.includes(X.subject))
|
|
3193
|
+
}))
|
|
3194
|
+
).map((M) => ({
|
|
3195
|
+
id: M.subject,
|
|
3196
|
+
setNames: M.setNames
|
|
3197
|
+
}));
|
|
3198
|
+
}), T = q(() => {
|
|
3199
|
+
const O = s.inheritPermissions.map((k) => ({
|
|
3200
|
+
...k,
|
|
3201
|
+
permissions: k.permissions.filter(
|
|
3202
|
+
(M) => M.subject === ce.Subject.Business.inventory_stock
|
|
3203
|
+
)
|
|
3204
|
+
}));
|
|
3205
|
+
return yt(
|
|
3206
|
+
O,
|
|
3207
|
+
"warehouseId",
|
|
3208
|
+
y.value.map((k) => k._id)
|
|
3209
|
+
);
|
|
3210
|
+
}), L = q(() => {
|
|
3211
|
+
const O = s.inheritPermissions.map((k) => ({
|
|
3212
|
+
...k,
|
|
3213
|
+
permissions: k.permissions.filter(
|
|
3214
|
+
(M) => M.subject === ce.Subject.Restaurant.restaurant
|
|
3215
|
+
)
|
|
3216
|
+
}));
|
|
3217
|
+
return yt(
|
|
3218
|
+
O,
|
|
3219
|
+
"restaurantId",
|
|
3220
|
+
N.value.map((k) => k._id)
|
|
3221
|
+
);
|
|
3222
|
+
}), I = q(() => {
|
|
3223
|
+
const O = s.inheritPermissions.map((k) => ({
|
|
3224
|
+
...k,
|
|
3225
|
+
permissions: k.permissions.filter((M) => M.subject === ce.Subject.Business.role)
|
|
3226
|
+
}));
|
|
3227
|
+
return yt(
|
|
3228
|
+
O,
|
|
3229
|
+
"roleId",
|
|
3230
|
+
h.value.map((k) => k._id)
|
|
3231
|
+
);
|
|
3232
|
+
}), w = [
|
|
3233
|
+
ce.Subject.Business.restaurant,
|
|
3234
|
+
ce.Subject.Business.role,
|
|
3235
|
+
ce.Subject.Restaurant.restaurant,
|
|
3236
|
+
ce.Subject.Business.inventory_stock
|
|
3237
|
+
], V = q(() => {
|
|
3238
|
+
var k;
|
|
3239
|
+
const O = (k = n.value) == null ? void 0 : k.find(
|
|
3240
|
+
(M) => M.subject === ce.Subject.Business.inventory_stock
|
|
3241
|
+
);
|
|
3242
|
+
return O ? O.conditions ? JSON.parse(O.conditions).warehouseId.$in : null : [];
|
|
3243
|
+
}), y = Ue([]), A = q(() => y.value.map((O) => ({
|
|
3244
|
+
label: O.profile.name,
|
|
3245
|
+
value: O._id
|
|
3246
|
+
})));
|
|
3247
|
+
function i(O) {
|
|
3248
|
+
const k = f(n.value, O);
|
|
3249
|
+
n.value = k;
|
|
3250
|
+
}
|
|
3251
|
+
function f(O, k) {
|
|
3252
|
+
let M = ut(
|
|
3253
|
+
O.filter((X) => X.subject !== ce.Subject.Business.inventory_stock)
|
|
3254
|
+
);
|
|
3255
|
+
if (!k || k.length > 0) {
|
|
3256
|
+
const X = {
|
|
3257
|
+
actions: [ce.Action.manage],
|
|
3258
|
+
subject: ce.Subject.Business.inventory_stock
|
|
3259
|
+
};
|
|
3260
|
+
k && (X.conditions = JSON.stringify({ warehouseId: { $in: k } })), M.push(X);
|
|
3261
|
+
}
|
|
3262
|
+
return M;
|
|
3263
|
+
}
|
|
3264
|
+
const { restaurants: N } = ns(), h = ds().roles, S = q(() => N.value.map((O) => ({
|
|
3265
|
+
label: `${O.profile.code ? O.profile.code + "-" : ""}${O.profile.name}`,
|
|
3266
|
+
value: O._id
|
|
3267
|
+
}))), C = q(() => N.value.reduce((O, k) => (O[k._id] = h.value.filter((M) => M.restaurants.some((X) => X.id === k._id)).map((M) => M._id), O), {})), m = q(() => rs(n.value));
|
|
3268
|
+
function R(O) {
|
|
3269
|
+
const k = p(n.value, O);
|
|
3270
|
+
n.value = k;
|
|
3271
|
+
}
|
|
3272
|
+
const v = q(() => ls(n.value));
|
|
3273
|
+
function p(O, k) {
|
|
3274
|
+
var X;
|
|
3275
|
+
let M = ut(
|
|
3276
|
+
O.filter(
|
|
3277
|
+
(x) => x.subject !== ce.Subject.Business.restaurant && x.subject !== ce.Subject.Restaurant.restaurant
|
|
3278
|
+
)
|
|
3279
|
+
);
|
|
3280
|
+
if (!k || k.length > 0) {
|
|
3281
|
+
const {
|
|
3282
|
+
category: x,
|
|
3283
|
+
showByFeatureFlag: W,
|
|
3284
|
+
...G
|
|
3285
|
+
} = us.restaurant;
|
|
3286
|
+
M.push(G);
|
|
3287
|
+
const Y = {
|
|
3288
|
+
actions: [ce.Action.manage],
|
|
3289
|
+
subject: ce.Subject.Restaurant.restaurant
|
|
3290
|
+
};
|
|
3291
|
+
k && (Y.conditions = JSON.stringify({ restaurantId: { $in: k } })), M.push(Y);
|
|
3292
|
+
}
|
|
3293
|
+
if (k) {
|
|
3294
|
+
const x = [
|
|
3295
|
+
...new Set(k.map((G) => C.value[G]).flatMap((G) => G))
|
|
3296
|
+
], W = h.value.map((G) => G._id);
|
|
3297
|
+
x.length !== W.length && (M = F(
|
|
3298
|
+
M,
|
|
3299
|
+
(X = v.value || W) == null ? void 0 : X.filter((G) => x.includes(G))
|
|
3300
|
+
));
|
|
3301
|
+
}
|
|
3302
|
+
return M;
|
|
3303
|
+
}
|
|
3304
|
+
function D(O) {
|
|
3305
|
+
const k = F(n.value, O);
|
|
3306
|
+
n.value = k;
|
|
3307
|
+
}
|
|
3308
|
+
function F(O, k) {
|
|
3309
|
+
let M = ut(
|
|
3310
|
+
O.filter((X) => X.subject !== ce.Subject.Business.role)
|
|
3311
|
+
);
|
|
3312
|
+
if (k && k.length > 0) {
|
|
3313
|
+
const X = {
|
|
3314
|
+
actions: [ce.Action.manage],
|
|
3315
|
+
subject: ce.Subject.Business.role,
|
|
3316
|
+
conditions: JSON.stringify({ roleId: { $in: k } })
|
|
3317
|
+
};
|
|
3318
|
+
M.push(X);
|
|
3319
|
+
}
|
|
3320
|
+
return M;
|
|
3321
|
+
}
|
|
3322
|
+
Yt(async () => {
|
|
3323
|
+
await Promise.all([
|
|
3324
|
+
Wr.readWarehouses().then((O) => y.value = O),
|
|
3325
|
+
c()
|
|
3326
|
+
]);
|
|
3327
|
+
});
|
|
3328
|
+
const U = q(() => Tt(
|
|
3329
|
+
n.value,
|
|
3330
|
+
kt
|
|
3331
|
+
).map((k) => {
|
|
3332
|
+
if (k.inverted) return k;
|
|
3333
|
+
const M = k.actions;
|
|
3334
|
+
if (!M.includes("manage")) return k;
|
|
3335
|
+
const X = u(k.subject);
|
|
3336
|
+
if (!X) return k;
|
|
3337
|
+
const x = X.actions;
|
|
3338
|
+
return x.length <= 1 || x.filter((G) => !M.includes(G)).length === 0 ? k : { ...k, actions: [...x] };
|
|
3339
|
+
}));
|
|
3340
|
+
function ae(O) {
|
|
3341
|
+
const k = new Set(
|
|
3342
|
+
U.value.filter((W) => !W.inverted).map((W) => W.subject)
|
|
3343
|
+
), M = new Set(
|
|
3344
|
+
O.filter((W) => !W.inverted).map((W) => W.subject)
|
|
3345
|
+
), X = new Set(
|
|
3346
|
+
n.value.filter((W) => !W.inverted).map((W) => W.subject)
|
|
3347
|
+
);
|
|
3348
|
+
let x = [...n.value];
|
|
3349
|
+
for (const W of k)
|
|
3350
|
+
M.has(W) || (X.has(W) && (x = x.filter((Y) => Y.subject !== W)), (!X.has(W) || Tt(
|
|
3351
|
+
x,
|
|
3352
|
+
kt
|
|
3353
|
+
).some((Y) => Y.subject === W && !Y.inverted)) && !x.some((Y) => Y.subject === W && Y.inverted) && x.push({ subject: W, actions: ["manage"], inverted: !0 }));
|
|
3354
|
+
for (const W of M)
|
|
3355
|
+
if (!k.has(W)) {
|
|
3356
|
+
const G = x.some((Y) => Y.subject === W && Y.inverted);
|
|
3357
|
+
if (x = x.filter((Y) => !(Y.subject === W && Y.inverted)), !G && !X.has(W)) {
|
|
3358
|
+
const Y = O.find(
|
|
3359
|
+
(_e) => _e.subject === W && !_e.inverted
|
|
3360
|
+
), ve = u(W);
|
|
3361
|
+
if (ve && Y) {
|
|
3362
|
+
const { category: _e, showByFeatureFlag: we, ...ne } = ve;
|
|
3363
|
+
x.push({ ...ne, actions: Y.actions });
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
for (const W of M) {
|
|
3368
|
+
if (!k.has(W)) continue;
|
|
3369
|
+
const G = U.value.find(
|
|
3370
|
+
(ne) => ne.subject === W && !ne.inverted
|
|
3371
|
+
), Y = O.find((ne) => ne.subject === W && !ne.inverted);
|
|
3372
|
+
if (!G || !Y) continue;
|
|
3373
|
+
const ve = new Set(G.actions), _e = new Set(Y.actions);
|
|
3374
|
+
if (ve.size === _e.size && [...ve].every((ne) => _e.has(ne)))
|
|
3375
|
+
continue;
|
|
3376
|
+
const we = x.findIndex((ne) => ne.subject === W && !ne.inverted);
|
|
3377
|
+
if (we >= 0)
|
|
3378
|
+
x[we] = {
|
|
3379
|
+
...x[we],
|
|
3380
|
+
actions: Array.from(_e)
|
|
3381
|
+
};
|
|
3382
|
+
else {
|
|
3383
|
+
const ne = u(W);
|
|
3384
|
+
if (ne) {
|
|
3385
|
+
const { category: Ee, showByFeatureFlag: $e, ...Je } = ne;
|
|
3386
|
+
x.push({ ...Je, actions: Array.from(_e) });
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
ve.has("manage") && !_e.has("manage") && Tt(
|
|
3390
|
+
x,
|
|
3391
|
+
kt
|
|
3392
|
+
).some(
|
|
3393
|
+
(Ee) => Ee.subject === W && !Ee.inverted && Ee.actions.includes("manage")
|
|
3394
|
+
) && !x.some((Ee) => Ee.subject === W && Ee.inverted) && x.push({ subject: W, actions: ["manage"], inverted: !0 }), !ve.has("manage") && _e.has("manage") && (x = x.filter((ne) => !(ne.subject === W && ne.inverted)));
|
|
3395
|
+
}
|
|
3396
|
+
n.value = x;
|
|
3397
|
+
}
|
|
3398
|
+
return St(
|
|
3399
|
+
n,
|
|
3400
|
+
(O) => {
|
|
3401
|
+
l("permissionChanged", O);
|
|
3402
|
+
},
|
|
3403
|
+
{ deep: !0 }
|
|
3404
|
+
), (O, k) => (H(), ee("div", Gr, [
|
|
3405
|
+
te("div", xr, [
|
|
3406
|
+
de(wr, {
|
|
3407
|
+
"model-value": U.value,
|
|
3408
|
+
"excluded-subjects": w,
|
|
3409
|
+
"additional-permissions": B(d),
|
|
3410
|
+
"onUpdate:modelValue": ae
|
|
3411
|
+
}, Fe({ _: 2 }, [
|
|
3412
|
+
pe(b.value, (M) => ({
|
|
3413
|
+
name: `checkbox-${M.id}-append`,
|
|
3414
|
+
fn: he(() => [
|
|
3415
|
+
de(it, { item: M }, null, 8, ["item"])
|
|
3416
|
+
])
|
|
3417
|
+
}))
|
|
3418
|
+
]), 1032, ["model-value", "additional-permissions"])
|
|
3419
|
+
]),
|
|
3420
|
+
te("div", Yr, [
|
|
3421
|
+
de(Cn, {
|
|
3422
|
+
"model-value": V.value,
|
|
3423
|
+
options: A.value,
|
|
3424
|
+
context: B(a)("team.labels.warehouse"),
|
|
3425
|
+
"onUpdate:modelValue": i
|
|
3426
|
+
}, Fe({ _: 2 }, [
|
|
3427
|
+
pe(T.value, (M) => ({
|
|
3428
|
+
name: `checkbox-${M.id}-append`,
|
|
3429
|
+
fn: he(() => [
|
|
3430
|
+
de(it, { item: M }, null, 8, ["item"])
|
|
3431
|
+
])
|
|
3432
|
+
}))
|
|
3433
|
+
]), 1032, ["model-value", "options", "context"])
|
|
3434
|
+
]),
|
|
3435
|
+
te("div", Zr, [
|
|
3436
|
+
de(Cn, {
|
|
3437
|
+
"model-value": m.value,
|
|
3438
|
+
options: S.value,
|
|
3439
|
+
context: B(a)("team.labels.restaurant"),
|
|
3440
|
+
"onUpdate:modelValue": R
|
|
3441
|
+
}, Fe({ _: 2 }, [
|
|
3442
|
+
pe(L.value, (M) => ({
|
|
3443
|
+
name: `checkbox-${M.id}-append`,
|
|
3444
|
+
fn: he(() => [
|
|
3445
|
+
de(it, { item: M }, null, 8, ["item"])
|
|
3446
|
+
])
|
|
3447
|
+
}))
|
|
3448
|
+
]), 1032, ["model-value", "options", "context"])
|
|
3449
|
+
]),
|
|
3450
|
+
te("div", Xr, [
|
|
3451
|
+
de(Vr, {
|
|
3452
|
+
roles: B(h),
|
|
3453
|
+
"model-value": v.value,
|
|
3454
|
+
"restaurant-ids": m.value,
|
|
3455
|
+
"onUpdate:modelValue": D
|
|
3456
|
+
}, Fe({ _: 2 }, [
|
|
3457
|
+
pe(I.value, (M) => ({
|
|
3458
|
+
name: `checkbox-${M.id}-append`,
|
|
3459
|
+
fn: he(() => [
|
|
3460
|
+
de(it, { item: M }, null, 8, ["item"])
|
|
3461
|
+
])
|
|
3462
|
+
}))
|
|
3463
|
+
]), 1032, ["roles", "model-value", "restaurant-ids"])
|
|
3464
|
+
])
|
|
3465
|
+
]));
|
|
3466
|
+
}
|
|
3467
|
+
});
|
|
3468
|
+
export {
|
|
3469
|
+
zt as _,
|
|
3470
|
+
tl as a
|
|
3471
|
+
};
|