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