react-luminus-components 2.0.3-beta.r19-15 → 2.0.3-beta.r19-16
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/.vite/manifest.json +42 -36
- package/dist/FormDisabledProvider-DXNc2136.js +51 -0
- package/dist/FormDisabledProvider-vg-vA0WK.cjs +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +535 -288
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +194 -125
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +277 -131
- package/dist/{localStorageUtils-B7BmbR_u.js → localStorageUtils-CZ4HDRzi.js} +17 -7
- package/dist/main.cjs.js +13 -13
- package/dist/main.es.js +10407 -5547
- package/dist/nivo-bar-BZDK_ha3.js +41897 -0
- package/dist/nivo-bar-D02kyst9.cjs +326 -0
- package/dist/useEmployeePhotoPath-TFR1dZzz.cjs +1 -0
- package/dist/useEmployeePhotoPath-_slBRHnm.js +111 -0
- package/dist/useLocalStorageState-B0hJPCtQ.cjs +1 -0
- package/dist/useLocalStorageState-DcSLbUf2.js +96 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +41 -69
- package/package.json +2 -1
- package/dist/FormDisabledProvider-B62seaHO.cjs +0 -1
- package/dist/FormDisabledProvider-qklvful2.js +0 -40
- package/dist/nivo-bar-C5h-CRYO.cjs +0 -306
- package/dist/nivo-bar-FuUHRilH.js +0 -40076
- package/dist/useEmployeePhotoPath-DdMmh1qU.js +0 -65
- package/dist/useEmployeePhotoPath-Q0EhpWOh.cjs +0 -1
- package/dist/useLocalStorageState-BWVTT0cO.js +0 -80
- package/dist/useLocalStorageState-iaJubQoG.cjs +0 -1
package/dist/contexts.es.js
CHANGED
|
@@ -1,354 +1,601 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { EventType as
|
|
6
|
-
import { MsalProvider as
|
|
1
|
+
import { t as J, bK as ue, c as N, bL as fe, Q as X, am as de, bM as ae, a4 as M, aj as me, R as W, bN as he, aq as ge, ao as Se, bc as ie, by as ce, be as H, ap as xe, bO as ye, aD as se, bP as ve, bQ as be, an as pe, b7 as Ce, a5 as we } from "./nivo-bar-BZDK_ha3.js";
|
|
2
|
+
import { bR as ct, ag as ut } from "./nivo-bar-BZDK_ha3.js";
|
|
3
|
+
import { jsxs as E, jsx as v } from "react/jsx-runtime";
|
|
4
|
+
import { useState as k, useContext as R, useEffect as U, useRef as oe, useMemo as Q, useCallback as te } from "react";
|
|
5
|
+
import { EventType as ne, InteractionRequiredAuthError as De } from "@azure/msal-browser";
|
|
6
|
+
import { MsalProvider as _e } from "@azure/msal-react";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
8
|
import "react-router";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
import "react-hook-form";
|
|
11
11
|
import "react-flexmonster";
|
|
12
|
-
import { L as
|
|
13
|
-
import { F as
|
|
14
|
-
import { a as
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return
|
|
12
|
+
import { L as ke, b as Te } from "./FormDisabledProvider-DXNc2136.js";
|
|
13
|
+
import { F as dt } from "./FormDisabledProvider-DXNc2136.js";
|
|
14
|
+
import { a as Pe, u as Le } from "./useLocalStorageState-DcSLbUf2.js";
|
|
15
|
+
function Ee(t) {
|
|
16
|
+
const e = J(t);
|
|
17
|
+
return e.setHours(23, 59, 59, 999), e;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function Ae() {
|
|
20
|
+
return Ee(Date.now());
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
+
|
|
25
|
-
+
|
|
26
|
-
].sort((
|
|
27
|
-
return
|
|
22
|
+
function Oe(t, e) {
|
|
23
|
+
const u = +J(t), [n, s] = [
|
|
24
|
+
+J(e.start),
|
|
25
|
+
+J(e.end)
|
|
26
|
+
].sort((a, o) => a - o);
|
|
27
|
+
return u >= n && u <= s;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function Me() {
|
|
30
|
+
return ue(Date.now());
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
}, []),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
const Ne = (t) => {
|
|
33
|
+
const e = N.c(10), {
|
|
34
|
+
children: u
|
|
35
|
+
} = t, [n, s] = k(!1), [a, o] = k(""), [c, g] = k(void 0);
|
|
36
|
+
let h;
|
|
37
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = (y, x) => {
|
|
38
|
+
s(!0), o(y), g(x);
|
|
39
|
+
}, e[0] = h) : h = e[0];
|
|
40
|
+
const m = h;
|
|
41
|
+
let d;
|
|
42
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
43
|
+
s(!1);
|
|
44
|
+
}, e[1] = d) : d = e[1];
|
|
45
|
+
const r = d;
|
|
46
|
+
let l;
|
|
47
|
+
e[2] !== n || e[3] !== a || e[4] !== c ? (l = {
|
|
48
|
+
show: n,
|
|
49
|
+
text: a,
|
|
50
|
+
showConfirm: m,
|
|
51
|
+
hideConfirm: r,
|
|
52
|
+
textSm: c
|
|
53
|
+
}, e[2] = n, e[3] = a, e[4] = c, e[5] = l) : l = e[5];
|
|
54
|
+
const f = l;
|
|
55
|
+
let i;
|
|
56
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ v(Fe, {}), e[6] = i) : i = e[6];
|
|
57
|
+
let S;
|
|
58
|
+
return e[7] !== u || e[8] !== f ? (S = /* @__PURE__ */ E(fe.Provider, { value: f, children: [
|
|
59
|
+
i,
|
|
60
|
+
u
|
|
61
|
+
] }), e[7] = u, e[8] = f, e[9] = S) : S = e[9], S;
|
|
62
|
+
}, Ie = () => {
|
|
63
|
+
const t = N.c(43), {
|
|
64
|
+
texts: e
|
|
65
|
+
} = R(X), {
|
|
66
|
+
confirm: u
|
|
67
|
+
} = e, {
|
|
68
|
+
isShown: n,
|
|
69
|
+
text: s,
|
|
70
|
+
onFinish: a
|
|
71
|
+
} = de(), {
|
|
72
|
+
options: o
|
|
73
|
+
} = R(ae), [c, g] = k(o.defaultValue ?? "");
|
|
74
|
+
let h;
|
|
75
|
+
t[0] !== a ? (h = () => {
|
|
76
|
+
a(null);
|
|
77
|
+
}, t[0] = a, t[1] = h) : h = t[1];
|
|
78
|
+
const m = h;
|
|
79
|
+
let d;
|
|
80
|
+
t[2] !== a || t[3] !== o.required || t[4] !== c ? (d = (I) => {
|
|
81
|
+
I.preventDefault(), !(o.required && !c) && (a(c), g(""));
|
|
82
|
+
}, t[2] = a, t[3] = o.required, t[4] = c, t[5] = d) : d = t[5];
|
|
83
|
+
const r = d;
|
|
84
|
+
let l;
|
|
85
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (l = (I) => g(I.currentTarget.value), t[6] = l) : l = t[6];
|
|
86
|
+
let f;
|
|
87
|
+
t[7] !== c ? (f = {
|
|
88
|
+
value: c,
|
|
89
|
+
onChange: l,
|
|
50
90
|
className: "w-100",
|
|
51
91
|
autoFocus: !0,
|
|
52
92
|
tabIndex: 0
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
}),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}), [
|
|
93
|
+
}, t[7] = c, t[8] = f) : f = t[8];
|
|
94
|
+
const i = f;
|
|
95
|
+
let S, y;
|
|
96
|
+
t[9] !== n || t[10] !== o.defaultValue ? (S = () => {
|
|
97
|
+
n === !0 && g(o.defaultValue ?? "");
|
|
98
|
+
}, y = [n, o.defaultValue], t[9] = n, t[10] = o.defaultValue, t[11] = S, t[12] = y) : (S = t[11], y = t[12]), U(S, y);
|
|
99
|
+
let x;
|
|
100
|
+
t[13] !== s ? (x = /* @__PURE__ */ v(M.Header, { className: "justify-content-center", children: /* @__PURE__ */ v(M.Title, { children: s }) }), t[13] = s, t[14] = x) : x = t[14];
|
|
101
|
+
let b;
|
|
102
|
+
t[15] !== i || t[16] !== o.input ? (b = o.input === "textarea" ? /* @__PURE__ */ v("textarea", { ...i, rows: 5 }) : void 0, t[15] = i, t[16] = o.input, t[17] = b) : b = t[17];
|
|
103
|
+
let C;
|
|
104
|
+
t[18] !== i || t[19] !== o.input || t[20] !== o.type ? (C = o.input === "input" ? /* @__PURE__ */ v(me, { ...i, type: o.type }) : void 0, t[18] = i, t[19] = o.input, t[20] = o.type, t[21] = C) : C = t[21];
|
|
105
|
+
let p;
|
|
106
|
+
t[22] !== b || t[23] !== C ? (p = /* @__PURE__ */ E(M.Body, { children: [
|
|
107
|
+
b,
|
|
108
|
+
C
|
|
109
|
+
] }), t[22] = b, t[23] = C, t[24] = p) : p = t[24];
|
|
110
|
+
let D;
|
|
111
|
+
t[25] !== u.cancel || t[26] !== m ? (D = /* @__PURE__ */ v(W, { variant: "outlined", color: "secondary", onClick: m, className: "flex-grow-1", children: u.cancel }), t[25] = u.cancel, t[26] = m, t[27] = D) : D = t[27];
|
|
112
|
+
const G = o.required && !c;
|
|
113
|
+
let T;
|
|
114
|
+
t[28] !== u.confirm || t[29] !== G ? (T = /* @__PURE__ */ v(W, { color: "primary", disabled: G, type: "submit", className: "flex-grow-1", children: u.confirm }), t[28] = u.confirm, t[29] = G, t[30] = T) : T = t[30];
|
|
115
|
+
let A;
|
|
116
|
+
t[31] !== D || t[32] !== T ? (A = /* @__PURE__ */ E(M.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
117
|
+
D,
|
|
118
|
+
T
|
|
119
|
+
] }), t[31] = D, t[32] = T, t[33] = A) : A = t[33];
|
|
120
|
+
let P;
|
|
121
|
+
t[34] !== r || t[35] !== p || t[36] !== A ? (P = /* @__PURE__ */ E("form", { onSubmit: r, onKeyDown: Ge, children: [
|
|
122
|
+
p,
|
|
123
|
+
A
|
|
124
|
+
] }), t[34] = r, t[35] = p, t[36] = A, t[37] = P) : P = t[37];
|
|
125
|
+
let w;
|
|
126
|
+
return t[38] !== n || t[39] !== m || t[40] !== P || t[41] !== x ? (w = /* @__PURE__ */ E(M, { show: n, size: "sm", centered: !0, onHide: m, children: [
|
|
127
|
+
x,
|
|
128
|
+
P
|
|
129
|
+
] }), t[38] = n, t[39] = m, t[40] = P, t[41] = x, t[42] = w) : w = t[42], w;
|
|
130
|
+
};
|
|
131
|
+
function Ge(t) {
|
|
132
|
+
return t.stopPropagation();
|
|
133
|
+
}
|
|
134
|
+
const Ue = (t) => {
|
|
135
|
+
const e = N.c(11), {
|
|
136
|
+
children: u
|
|
137
|
+
} = t, [n, s] = k(!1), [a, o] = k("");
|
|
138
|
+
let c;
|
|
139
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (c = {
|
|
140
|
+
input: "textarea",
|
|
141
|
+
type: "text"
|
|
142
|
+
}, e[0] = c) : c = e[0];
|
|
143
|
+
const [g, h] = k(c), m = oe($e);
|
|
144
|
+
let d;
|
|
145
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (d = (b) => {
|
|
146
|
+
o(b), s(!0);
|
|
147
|
+
}, e[1] = d) : d = e[1];
|
|
148
|
+
const r = d;
|
|
149
|
+
let l;
|
|
150
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (l = () => {
|
|
151
|
+
s(!1);
|
|
152
|
+
}, e[2] = l) : l = e[2];
|
|
153
|
+
const f = l;
|
|
154
|
+
let i;
|
|
155
|
+
e[3] !== n || e[4] !== g || e[5] !== a ? (i = {
|
|
156
|
+
isShown: n,
|
|
157
|
+
text: a,
|
|
158
|
+
showPrompt: r,
|
|
159
|
+
hidePrompt: f,
|
|
160
|
+
resolveRef: m,
|
|
161
|
+
options: g,
|
|
162
|
+
setOptions: h
|
|
163
|
+
}, e[3] = n, e[4] = g, e[5] = a, e[6] = i) : i = e[6];
|
|
164
|
+
const S = i;
|
|
165
|
+
let y;
|
|
166
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ v(Ie, {}), e[7] = y) : y = e[7];
|
|
167
|
+
let x;
|
|
168
|
+
return e[8] !== u || e[9] !== S ? (x = /* @__PURE__ */ E(ae.Provider, { value: S, children: [
|
|
169
|
+
u,
|
|
170
|
+
y
|
|
171
|
+
] }), e[8] = u, e[9] = S, e[10] = x) : x = e[10], x;
|
|
172
|
+
};
|
|
173
|
+
function $e() {
|
|
174
|
+
}
|
|
175
|
+
const tt = (t) => {
|
|
176
|
+
const e = N.c(14), {
|
|
177
|
+
cookieDomain: u,
|
|
178
|
+
axiosOptions: n,
|
|
179
|
+
language: s,
|
|
180
|
+
texts: a,
|
|
181
|
+
ProjectIconComponent: o,
|
|
182
|
+
localizationContext: c,
|
|
183
|
+
chartColorPalette: g,
|
|
184
|
+
children: h
|
|
185
|
+
} = t;
|
|
186
|
+
let m;
|
|
187
|
+
e[0] !== o || e[1] !== n || e[2] !== g || e[3] !== u || e[4] !== s || e[5] !== c || e[6] !== a ? (m = {
|
|
188
|
+
axiosOptions: n,
|
|
189
|
+
cookieDomain: u,
|
|
190
|
+
language: s,
|
|
191
|
+
texts: a,
|
|
192
|
+
ProjectIconComponent: o,
|
|
193
|
+
localizationContext: c,
|
|
194
|
+
chartColorPalette: g
|
|
195
|
+
}, e[0] = o, e[1] = n, e[2] = g, e[3] = u, e[4] = s, e[5] = c, e[6] = a, e[7] = m) : m = e[7];
|
|
196
|
+
const d = m;
|
|
197
|
+
let r;
|
|
198
|
+
e[8] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ v(he, {}), e[8] = r) : r = e[8];
|
|
199
|
+
let l;
|
|
200
|
+
e[9] !== h ? (l = /* @__PURE__ */ v(Ne, { children: /* @__PURE__ */ E(Ue, { children: [
|
|
98
201
|
r,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
]
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
202
|
+
h
|
|
203
|
+
] }) }), e[9] = h, e[10] = l) : l = e[10];
|
|
204
|
+
let f;
|
|
205
|
+
return e[11] !== d || e[12] !== l ? (f = /* @__PURE__ */ v(X.Provider, { value: d, children: l }), e[11] = d, e[12] = l, e[13] = f) : f = e[13], f;
|
|
206
|
+
}, nt = (t) => {
|
|
207
|
+
const e = N.c(15), {
|
|
208
|
+
children: u
|
|
209
|
+
} = t, [n, s] = k(!1);
|
|
210
|
+
let a;
|
|
211
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ new Set(), e[0] = a) : a = e[0];
|
|
212
|
+
const [o] = k(a);
|
|
213
|
+
let c;
|
|
214
|
+
e[1] !== o ? (c = (i) => {
|
|
215
|
+
o.add(i), s(!0);
|
|
216
|
+
}, e[1] = o, e[2] = c) : c = e[2];
|
|
217
|
+
const g = c;
|
|
218
|
+
let h;
|
|
219
|
+
e[3] !== o ? (h = (i) => {
|
|
220
|
+
o.delete(i), o.size === 0 && s(!1);
|
|
221
|
+
}, e[3] = o, e[4] = h) : h = e[4];
|
|
222
|
+
const m = h;
|
|
223
|
+
let d;
|
|
224
|
+
e[5] !== n || e[6] !== g || e[7] !== m ? (d = {
|
|
225
|
+
isLoading: n,
|
|
226
|
+
startLoading: g,
|
|
227
|
+
stopLoading: m
|
|
228
|
+
}, e[5] = n, e[6] = g, e[7] = m, e[8] = d) : d = e[8];
|
|
229
|
+
const r = d;
|
|
230
|
+
let l;
|
|
231
|
+
e[9] !== n ? (l = n && /* @__PURE__ */ v(ke, {}), e[9] = n, e[10] = l) : l = e[10];
|
|
232
|
+
let f;
|
|
233
|
+
return e[11] !== u || e[12] !== r || e[13] !== l ? (f = /* @__PURE__ */ E(ge.Provider, { value: r, children: [
|
|
234
|
+
l,
|
|
235
|
+
u
|
|
236
|
+
] }), e[11] = u, e[12] = r, e[13] = l, e[14] = f) : f = e[14], f;
|
|
237
|
+
}, ot = (t) => {
|
|
238
|
+
const e = N.c(41), {
|
|
239
|
+
children: u
|
|
240
|
+
} = t, n = Se(), {
|
|
241
|
+
msalInstance: s,
|
|
242
|
+
getToken: a
|
|
243
|
+
} = R(ie), {
|
|
244
|
+
delegation: o,
|
|
245
|
+
setDelegation: c,
|
|
246
|
+
setAvailableDelegations: g,
|
|
247
|
+
refreshAvailableDelegations: h
|
|
248
|
+
} = R(ce), [m, d] = k(null);
|
|
249
|
+
let r;
|
|
250
|
+
e[0] !== a ? (r = async () => {
|
|
251
|
+
const _ = await a();
|
|
252
|
+
_ && d(_.token);
|
|
253
|
+
}, e[0] = a, e[1] = r) : r = e[1];
|
|
254
|
+
const l = r;
|
|
255
|
+
let f, i;
|
|
256
|
+
e[2] !== l ? (f = () => {
|
|
257
|
+
l();
|
|
258
|
+
}, i = [l], e[2] = l, e[3] = f, e[4] = i) : (f = e[3], i = e[4]), U(f, i);
|
|
259
|
+
const S = He;
|
|
260
|
+
let y;
|
|
261
|
+
e[5] === Symbol.for("react.memo_cache_sentinel") ? (y = S(), e[5] = y) : y = e[5];
|
|
262
|
+
const x = y;
|
|
263
|
+
let b;
|
|
264
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
265
|
+
state: x ? H.LOGGED_IN : H.LOGGING_IN,
|
|
266
|
+
user: x
|
|
267
|
+
}, e[6] = b) : b = e[6];
|
|
268
|
+
const [C, p] = k(b);
|
|
269
|
+
let D;
|
|
270
|
+
e[7] !== n ? (D = async (_) => {
|
|
271
|
+
let L = null;
|
|
272
|
+
return await n.get("/user/detail", _ ? {
|
|
273
|
+
headers: {
|
|
274
|
+
Authorization: `Bearer ${_}`
|
|
275
|
+
}
|
|
276
|
+
} : void 0).then((ee) => {
|
|
277
|
+
L = ee.data;
|
|
138
278
|
}).catch(() => {
|
|
139
|
-
|
|
140
|
-
}),
|
|
141
|
-
}, [
|
|
142
|
-
|
|
143
|
-
|
|
279
|
+
L = null;
|
|
280
|
+
}), L;
|
|
281
|
+
}, e[7] = n, e[8] = D) : D = e[8];
|
|
282
|
+
const G = D;
|
|
283
|
+
let T;
|
|
284
|
+
e[9] !== g || e[10] !== c ? (T = () => {
|
|
285
|
+
localStorage.removeItem("user"), p({
|
|
286
|
+
state: H.LOGGED_OUT,
|
|
144
287
|
user: null
|
|
145
|
-
}),
|
|
146
|
-
}, [
|
|
147
|
-
|
|
148
|
-
|
|
288
|
+
}), c(null), g(null);
|
|
289
|
+
}, e[9] = g, e[10] = c, e[11] = T) : T = e[11];
|
|
290
|
+
const A = T;
|
|
291
|
+
let P;
|
|
292
|
+
e[12] !== G || e[13] !== h ? (P = async (_) => {
|
|
293
|
+
p({
|
|
294
|
+
state: H.LOGGING_IN,
|
|
149
295
|
user: null
|
|
150
296
|
});
|
|
151
|
-
const
|
|
152
|
-
return
|
|
153
|
-
state:
|
|
154
|
-
user:
|
|
155
|
-
}), localStorage.setItem("user", JSON.stringify(
|
|
156
|
-
state:
|
|
297
|
+
const L = await G(_);
|
|
298
|
+
return L ? (p({
|
|
299
|
+
state: H.LOGGED_IN,
|
|
300
|
+
user: L
|
|
301
|
+
}), localStorage.setItem("user", JSON.stringify(L)), await h(), !0) : (p({
|
|
302
|
+
state: H.LOGIN_FAILED,
|
|
157
303
|
user: null
|
|
158
304
|
}), !1);
|
|
159
|
-
}, [
|
|
305
|
+
}, e[12] = G, e[13] = h, e[14] = P) : P = e[14];
|
|
306
|
+
const w = P;
|
|
307
|
+
let I;
|
|
308
|
+
e[15] !== A ? (I = () => {
|
|
160
309
|
A();
|
|
161
|
-
}, [A]);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
310
|
+
}, e[15] = A, e[16] = I) : I = e[16];
|
|
311
|
+
const O = I;
|
|
312
|
+
let q;
|
|
313
|
+
e[17] !== s ? (q = () => {
|
|
314
|
+
if (s) {
|
|
315
|
+
const _ = s.addEventCallback((L) => {
|
|
316
|
+
if (L.eventType === ne.LOGIN_SUCCESS && L.payload) {
|
|
317
|
+
const ee = L.payload;
|
|
318
|
+
d(ee.accessToken);
|
|
168
319
|
}
|
|
169
320
|
});
|
|
170
321
|
return () => {
|
|
171
|
-
|
|
322
|
+
_ && s.removeEventCallback(_);
|
|
172
323
|
};
|
|
173
324
|
}
|
|
174
|
-
return
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
325
|
+
return Re;
|
|
326
|
+
}, e[17] = s, e[18] = q) : q = e[18];
|
|
327
|
+
let F;
|
|
328
|
+
e[19] !== w || e[20] !== O || e[21] !== s ? (F = [s, w, O], e[19] = w, e[20] = O, e[21] = s, e[22] = F) : F = e[22], U(q, F);
|
|
329
|
+
let z;
|
|
330
|
+
e[23] !== w || e[24] !== O || e[25] !== c ? (z = async (_) => {
|
|
331
|
+
_ && await w(_).catch(() => {
|
|
332
|
+
O(), c(null);
|
|
180
333
|
});
|
|
181
|
-
}, [
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
334
|
+
}, e[23] = w, e[24] = O, e[25] = c, e[26] = z) : z = e[26];
|
|
335
|
+
const $ = z;
|
|
336
|
+
let j;
|
|
337
|
+
e[27] !== m || e[28] !== $ ? (j = () => {
|
|
338
|
+
$(m);
|
|
339
|
+
}, e[27] = m, e[28] = $, e[29] = j) : j = e[29];
|
|
340
|
+
const Y = o == null ? void 0 : o.id;
|
|
341
|
+
let K;
|
|
342
|
+
e[30] !== m || e[31] !== $ || e[32] !== Y ? (K = [m, Y, $], e[30] = m, e[31] = $, e[32] = Y, e[33] = K) : K = e[33], U(j, K);
|
|
343
|
+
let B;
|
|
344
|
+
e[34] !== w || e[35] !== O || e[36] !== C ? (B = {
|
|
186
345
|
user: C.user,
|
|
187
346
|
userLoginState: C,
|
|
188
|
-
loginUser:
|
|
189
|
-
logoutUser:
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
347
|
+
loginUser: w,
|
|
348
|
+
logoutUser: O
|
|
349
|
+
}, e[34] = w, e[35] = O, e[36] = C, e[37] = B) : B = e[37];
|
|
350
|
+
const Z = B;
|
|
351
|
+
let V;
|
|
352
|
+
return e[38] !== u || e[39] !== Z ? (V = /* @__PURE__ */ v(xe.Provider, { value: Z, children: u }), e[38] = u, e[39] = Z, e[40] = V) : V = e[40], V;
|
|
353
|
+
};
|
|
354
|
+
function He() {
|
|
355
|
+
const t = localStorage.getItem("user") ?? null;
|
|
356
|
+
return t ? JSON.parse(t ?? "") : null;
|
|
357
|
+
}
|
|
358
|
+
function Re() {
|
|
359
|
+
}
|
|
360
|
+
const st = ({
|
|
361
|
+
...t
|
|
362
|
+
}) => {
|
|
363
|
+
const {
|
|
364
|
+
cookieDomain: e
|
|
365
|
+
} = R(X), [, u] = ye(["Authorization"]), n = Q(
|
|
194
366
|
() => t.useMsal ? t.msalInstance : null,
|
|
195
367
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
196
368
|
[t.useMsal, t.useMsal ? t.msalInstance : null]
|
|
197
|
-
),
|
|
369
|
+
), s = Q(
|
|
198
370
|
() => t.useMsal ? t.msalScopes : [],
|
|
199
371
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
200
372
|
[t.useMsal, t.useMsal ? t.msalScopes : null]
|
|
201
|
-
),
|
|
373
|
+
), a = Q(
|
|
202
374
|
() => t.useMsal ? t.msalExtraScopes : [],
|
|
203
375
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
204
376
|
[t.useMsal, t.useMsal ? t.msalExtraScopes : null]
|
|
205
|
-
),
|
|
377
|
+
), o = oe(null), c = te(() => {
|
|
206
378
|
const d = localStorage.getItem("token");
|
|
207
379
|
return d ? {
|
|
208
380
|
token: d,
|
|
209
|
-
expiresOn:
|
|
381
|
+
expiresOn: Te(new Date(Date.now()), 1)
|
|
210
382
|
} : null;
|
|
211
|
-
}, []),
|
|
212
|
-
var
|
|
213
|
-
if (
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
scopes: n,
|
|
229
|
-
extraScopesToConsent: s
|
|
383
|
+
}, []), g = te(async () => {
|
|
384
|
+
var f;
|
|
385
|
+
if (o.current) return o.current;
|
|
386
|
+
const d = n == null ? void 0 : n.getActiveAccount(), r = d ?? ((f = n == null ? void 0 : n.getAllAccounts()) == null ? void 0 : f.at(0)) ?? void 0;
|
|
387
|
+
if (!r) return null;
|
|
388
|
+
d || n == null || n.setActiveAccount(r);
|
|
389
|
+
const l = n == null ? void 0 : n.acquireTokenSilent({
|
|
390
|
+
scopes: s,
|
|
391
|
+
account: r
|
|
392
|
+
}).then((i) => ({
|
|
393
|
+
token: i.accessToken,
|
|
394
|
+
expiresOn: i.expiresOn ?? new Date(Date.now())
|
|
395
|
+
})).catch((i) => {
|
|
396
|
+
if (console.error("Error acquiring token", i), i instanceof De)
|
|
397
|
+
return console.log("Silent token acquisition failed. Acquiring token using redirect"), n == null || n.acquireTokenRedirect({
|
|
398
|
+
scopes: s,
|
|
399
|
+
extraScopesToConsent: a
|
|
230
400
|
}), null;
|
|
231
|
-
throw
|
|
401
|
+
throw i;
|
|
232
402
|
}).finally(() => {
|
|
233
|
-
|
|
403
|
+
o.current = null;
|
|
234
404
|
});
|
|
235
|
-
return
|
|
236
|
-
}, [
|
|
405
|
+
return o.current = l ?? null, l ?? null;
|
|
406
|
+
}, [n, s, a]), h = te(async () => t.useMsal ? g() : c(), [c, g, t.useMsal]), m = Q(() => ({
|
|
237
407
|
useMsal: t.useMsal ?? !1,
|
|
238
|
-
msalInstance:
|
|
239
|
-
msalScopes:
|
|
240
|
-
msalExtraScopes:
|
|
241
|
-
getToken:
|
|
242
|
-
}), [t.useMsal,
|
|
243
|
-
return
|
|
244
|
-
if (t.useMsal &&
|
|
245
|
-
const d =
|
|
246
|
-
if (
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
|
|
408
|
+
msalInstance: n,
|
|
409
|
+
msalScopes: s,
|
|
410
|
+
msalExtraScopes: a,
|
|
411
|
+
getToken: h
|
|
412
|
+
}), [t.useMsal, n, s, a, h]);
|
|
413
|
+
return U(() => {
|
|
414
|
+
if (t.useMsal && n) {
|
|
415
|
+
const d = n.addEventCallback((r) => {
|
|
416
|
+
if (r.eventType === ne.LOGIN_SUCCESS || r.eventType === ne.ACQUIRE_TOKEN_SUCCESS && r.payload) {
|
|
417
|
+
const l = r.payload, f = l.account;
|
|
418
|
+
n.setActiveAccount(f);
|
|
419
|
+
const i = l.accessToken, S = l.expiresOn;
|
|
420
|
+
u("Authorization", i, {
|
|
251
421
|
path: "/",
|
|
252
422
|
secure: !0,
|
|
253
423
|
sameSite: "none",
|
|
254
|
-
domain:
|
|
255
|
-
expires:
|
|
424
|
+
domain: e,
|
|
425
|
+
expires: S ?? void 0
|
|
256
426
|
});
|
|
257
427
|
}
|
|
258
|
-
|
|
428
|
+
r.error && console.error("AuthProvider MSAL Error", r);
|
|
259
429
|
});
|
|
260
430
|
return () => {
|
|
261
|
-
d &&
|
|
431
|
+
d && n.removeEventCallback(d);
|
|
262
432
|
};
|
|
263
433
|
}
|
|
264
434
|
return () => {
|
|
265
435
|
};
|
|
266
|
-
}, [t.useMsal,
|
|
267
|
-
},
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
436
|
+
}, [t.useMsal, n, u, e]), /* @__PURE__ */ v(ie.Provider, { value: m, children: t.useMsal ? /* @__PURE__ */ v(_e, { instance: t.msalInstance, children: t.children }) : t.children });
|
|
437
|
+
}, lt = (t) => {
|
|
438
|
+
const e = N.c(18), {
|
|
439
|
+
children: u,
|
|
440
|
+
relativeEndpoint: n
|
|
441
|
+
} = t, [s, a, o] = Pe("user-delegation", null);
|
|
442
|
+
let c;
|
|
443
|
+
e: {
|
|
444
|
+
if (!s) {
|
|
445
|
+
c = null;
|
|
446
|
+
break e;
|
|
447
|
+
}
|
|
448
|
+
const p = s.from ? se(s.from) : Me(), D = s.to ? se(s.to) : Ae();
|
|
449
|
+
if (!Oe(new Date(Date.now()), {
|
|
450
|
+
start: p,
|
|
451
|
+
end: D
|
|
452
|
+
})) {
|
|
453
|
+
a(null), c = null;
|
|
454
|
+
break e;
|
|
455
|
+
}
|
|
456
|
+
c = s;
|
|
457
|
+
}
|
|
458
|
+
const g = c;
|
|
459
|
+
let h;
|
|
460
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
274
461
|
nullStateBeforeLoad: !1,
|
|
275
462
|
nullStateOnFail: !0
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
463
|
+
}, e[0] = h) : h = e[0];
|
|
464
|
+
const {
|
|
465
|
+
data: m,
|
|
466
|
+
setData: d,
|
|
467
|
+
reloadData: r
|
|
468
|
+
} = Le(n, h), l = oe(null);
|
|
469
|
+
let f, i;
|
|
470
|
+
e[1] !== r ? (f = () => {
|
|
471
|
+
const p = () => {
|
|
472
|
+
r(), l.current = window.setTimeout(p, ve() + 5e3);
|
|
280
473
|
};
|
|
281
|
-
return
|
|
282
|
-
|
|
474
|
+
return p(), () => {
|
|
475
|
+
l.current !== null && window.clearTimeout(l.current);
|
|
283
476
|
};
|
|
284
|
-
}, [i]),
|
|
285
|
-
|
|
286
|
-
|
|
477
|
+
}, i = [r], e[1] = r, e[2] = f, e[3] = i) : (f = e[2], i = e[3]), U(f, i);
|
|
478
|
+
let S;
|
|
479
|
+
e[4] !== o ? (S = () => {
|
|
480
|
+
const p = () => {
|
|
481
|
+
o();
|
|
287
482
|
};
|
|
288
|
-
return window.addEventListener("focus",
|
|
289
|
-
window.removeEventListener("focus",
|
|
483
|
+
return window.addEventListener("focus", p), () => {
|
|
484
|
+
window.removeEventListener("focus", p);
|
|
290
485
|
};
|
|
291
|
-
}, [
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
]);
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
]
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
486
|
+
}, e[4] = o, e[5] = S) : S = e[5];
|
|
487
|
+
let y;
|
|
488
|
+
e[6] !== o || e[7] !== r ? (y = [o, r], e[6] = o, e[7] = r, e[8] = y) : y = e[8], U(S, y);
|
|
489
|
+
let x;
|
|
490
|
+
e[9] !== m || e[10] !== r || e[11] !== d || e[12] !== a || e[13] !== g ? (x = {
|
|
491
|
+
delegation: g,
|
|
492
|
+
setDelegation: a,
|
|
493
|
+
availableDelegations: m,
|
|
494
|
+
setAvailableDelegations: d,
|
|
495
|
+
refreshAvailableDelegations: r
|
|
496
|
+
}, e[9] = m, e[10] = r, e[11] = d, e[12] = a, e[13] = g, e[14] = x) : x = e[14];
|
|
497
|
+
const b = x;
|
|
498
|
+
let C;
|
|
499
|
+
return e[15] !== u || e[16] !== b ? (C = /* @__PURE__ */ v(ce.Provider, { value: b, children: u }), e[15] = u, e[16] = b, e[17] = C) : C = e[17], C;
|
|
500
|
+
}, le = (t, e) => t ? `${t} | ${e}` : e, rt = (t) => {
|
|
501
|
+
const e = N.c(18), {
|
|
502
|
+
defaultHelmet: u,
|
|
503
|
+
children: n,
|
|
504
|
+
helmetPrefix: s
|
|
505
|
+
} = t, a = s ?? "";
|
|
506
|
+
let o;
|
|
507
|
+
e[0] !== u || e[1] !== a ? (o = le(a, u), e[0] = u, e[1] = a, e[2] = o) : o = e[2];
|
|
508
|
+
let c;
|
|
509
|
+
e[3] !== o ? (c = [o], e[3] = o, e[4] = c) : c = e[4];
|
|
510
|
+
const [g, h] = k(c);
|
|
511
|
+
let m;
|
|
512
|
+
e[5] !== s ? (m = (C) => {
|
|
513
|
+
h((p) => [...p, le(s ?? "", C)]);
|
|
514
|
+
}, e[5] = s, e[6] = m) : m = e[6];
|
|
515
|
+
const d = m;
|
|
516
|
+
let r;
|
|
517
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
518
|
+
h(qe);
|
|
519
|
+
}, e[7] = r) : r = e[7];
|
|
520
|
+
const l = r;
|
|
521
|
+
let f;
|
|
522
|
+
e[8] !== g ? (f = g.at(-1) ?? "", e[8] = g, e[9] = f) : f = e[9];
|
|
523
|
+
const i = f;
|
|
524
|
+
let S;
|
|
525
|
+
e[10] !== d ? (S = {
|
|
526
|
+
addHelmet: d,
|
|
527
|
+
removeHelmet: l
|
|
528
|
+
}, e[10] = d, e[11] = S) : S = e[11];
|
|
529
|
+
const y = S;
|
|
530
|
+
let x;
|
|
531
|
+
e[12] !== i ? (x = /* @__PURE__ */ v("title", { children: i }), e[12] = i, e[13] = x) : x = e[13];
|
|
532
|
+
let b;
|
|
533
|
+
return e[14] !== n || e[15] !== y || e[16] !== x ? (b = /* @__PURE__ */ E(be.Provider, { value: y, children: [
|
|
534
|
+
x,
|
|
535
|
+
n
|
|
536
|
+
] }), e[14] = n, e[15] = y, e[16] = x, e[17] = b) : b = e[17], b;
|
|
537
|
+
};
|
|
538
|
+
function qe(t) {
|
|
539
|
+
return t.length > 1 ? t.slice(0, -1) : t;
|
|
540
|
+
}
|
|
541
|
+
const re = 50, Fe = () => {
|
|
542
|
+
const t = N.c(22), {
|
|
543
|
+
texts: e
|
|
544
|
+
} = R(X), {
|
|
545
|
+
confirm: u
|
|
546
|
+
} = e, {
|
|
547
|
+
onConfirm: n,
|
|
548
|
+
onCancel: s,
|
|
549
|
+
text: a,
|
|
550
|
+
show: o,
|
|
551
|
+
textSm: c
|
|
552
|
+
} = pe(), g = c === void 0 ? a.length > re : c, h = a.length > re;
|
|
553
|
+
let m;
|
|
554
|
+
t[0] !== s || t[1] !== n || t[2] !== o ? (m = (x) => {
|
|
555
|
+
if (o)
|
|
556
|
+
e: switch (x.key) {
|
|
557
|
+
case "Enter": {
|
|
558
|
+
x.preventDefault(), x.stopPropagation(), n();
|
|
559
|
+
break e;
|
|
560
|
+
}
|
|
561
|
+
case "Escape": {
|
|
562
|
+
x.preventDefault(), x.stopPropagation(), s();
|
|
563
|
+
break e;
|
|
564
|
+
}
|
|
328
565
|
}
|
|
329
|
-
}, [
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
] });
|
|
566
|
+
}, t[0] = s, t[1] = n, t[2] = o, t[3] = m) : m = t[3], Ce(m);
|
|
567
|
+
const r = h ? void 0 : "sm";
|
|
568
|
+
let l;
|
|
569
|
+
t[4] !== g || t[5] !== a ? (l = /* @__PURE__ */ v(M.Header, { className: "justify-content-center", children: g ? /* @__PURE__ */ v(we, { variant: "body", children: a }) : /* @__PURE__ */ v(M.Title, { children: a }) }), t[4] = g, t[5] = a, t[6] = l) : l = t[6];
|
|
570
|
+
let f;
|
|
571
|
+
t[7] !== u.no || t[8] !== s ? (f = /* @__PURE__ */ v(W, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: s, children: u.no }), t[7] = u.no, t[8] = s, t[9] = f) : f = t[9];
|
|
572
|
+
let i;
|
|
573
|
+
t[10] !== u.yes || t[11] !== n ? (i = /* @__PURE__ */ v(W, { type: "button", color: "primary", onClick: n, className: "w-100 ml", children: u.yes }), t[10] = u.yes, t[11] = n, t[12] = i) : i = t[12];
|
|
574
|
+
let S;
|
|
575
|
+
t[13] !== f || t[14] !== i ? (S = /* @__PURE__ */ v(M.Body, { children: /* @__PURE__ */ E("div", { className: "w-100 d-flex gap-5", children: [
|
|
576
|
+
f,
|
|
577
|
+
i
|
|
578
|
+
] }) }), t[13] = f, t[14] = i, t[15] = S) : S = t[15];
|
|
579
|
+
let y;
|
|
580
|
+
return t[16] !== s || t[17] !== o || t[18] !== r || t[19] !== l || t[20] !== S ? (y = /* @__PURE__ */ E(M, { show: o, size: r, centered: !0, onHide: s, children: [
|
|
581
|
+
l,
|
|
582
|
+
S
|
|
583
|
+
] }), t[16] = s, t[17] = o, t[18] = r, t[19] = l, t[20] = S, t[21] = y) : y = t[21], y;
|
|
337
584
|
};
|
|
338
585
|
export {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
586
|
+
ie as AuthContext,
|
|
587
|
+
st as AuthProvider,
|
|
588
|
+
ce as DelegationContext,
|
|
589
|
+
lt as DelegationProvider,
|
|
590
|
+
ct as FormDisabledContext,
|
|
591
|
+
dt as FormDisabledProvider,
|
|
592
|
+
be as HelmetContext,
|
|
593
|
+
rt as HelmetProvider,
|
|
594
|
+
ge as LoadingContext,
|
|
595
|
+
nt as LoadingProvider,
|
|
596
|
+
X as LuminusComponentsContext,
|
|
597
|
+
tt as LuminusComponentsProvider,
|
|
598
|
+
xe as UserContext,
|
|
599
|
+
ot as UserProvider,
|
|
600
|
+
ut as useFormDisabledContext
|
|
354
601
|
};
|