@ibdop/platform-kit 1.0.12 → 1.0.13
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/README.md +0 -0
- package/dist/components/ErrorBoundary.d.ts +0 -0
- package/dist/components/ErrorBoundary.d.ts.map +0 -0
- package/dist/components/Notification.d.ts +0 -0
- package/dist/components/Notification.d.ts.map +0 -0
- package/dist/components/VersionInfo.d.ts +0 -0
- package/dist/components/VersionInfo.d.ts.map +0 -0
- package/dist/components/index.d.ts +0 -0
- package/dist/components/index.d.ts.map +0 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useApi.d.ts +13 -2
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/hooks/useFeatures.d.ts +0 -0
- package/dist/hooks/useFeatures.d.ts.map +0 -0
- package/dist/hooks/useInfoData.d.ts +0 -0
- package/dist/hooks/useInfoData.d.ts.map +0 -0
- package/dist/hooks/usePermissions.d.ts +0 -0
- package/dist/hooks/usePermissions.d.ts.map +0 -0
- package/dist/hooks/useShellAuth.d.ts +0 -0
- package/dist/hooks/useShellAuth.d.ts.map +0 -0
- package/dist/hooks/useV1Config.d.ts +0 -0
- package/dist/hooks/useV1Config.d.ts.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +10 -10
- package/dist/index.mjs +726 -701
- package/dist/index.umd.js +9 -9
- package/dist/services/api.d.ts +0 -0
- package/dist/services/api.d.ts.map +1 -1
- package/dist/services/index.d.ts +0 -0
- package/dist/services/index.d.ts.map +0 -0
- package/dist/services/logger.d.ts +0 -0
- package/dist/services/logger.d.ts.map +0 -0
- package/dist/types/index.d.ts +0 -23
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -0
- package/dist/utils/index.d.ts.map +0 -0
- package/dist/utils/mfeName.d.ts +0 -0
- package/dist/utils/mfeName.d.ts.map +0 -0
- package/dist/utils/shellAuth.d.ts +1 -0
- package/dist/utils/shellAuth.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/ErrorBoundary.tsx +0 -0
- package/src/components/Notification.tsx +0 -0
- package/src/components/VersionInfo.tsx +0 -0
- package/src/components/index.ts +0 -0
- package/src/global.d.ts +0 -0
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useApi.ts +48 -40
- package/src/hooks/useFeatures.ts +0 -0
- package/src/hooks/useInfoData.ts +0 -0
- package/src/hooks/usePermissions.ts +0 -0
- package/src/hooks/useShellAuth.ts +0 -0
- package/src/hooks/useV1Config.ts +0 -0
- package/src/index.ts +0 -0
- package/src/services/api.ts +4 -1
- package/src/services/index.ts +0 -0
- package/src/services/logger.ts +0 -0
- package/src/types/index.ts +1 -24
- package/src/utils/index.ts +0 -0
- package/src/utils/mfeName.ts +0 -0
- package/src/utils/shellAuth.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
function
|
|
1
|
+
import et, { useState as R, useRef as tt, useCallback as C, useEffect as U, useMemo as ye, Component as Lt, createContext as Ut, useContext as Vt } from "react";
|
|
2
|
+
import Bt from "axios";
|
|
3
|
+
function B() {
|
|
4
4
|
if (typeof window > "u") return null;
|
|
5
5
|
const t = window;
|
|
6
6
|
if (t.__SHELL_AUTH_INSTANCE__)
|
|
@@ -8,26 +8,26 @@ function V() {
|
|
|
8
8
|
const r = window;
|
|
9
9
|
return r.__SHELL_AUTH__?.authInstance ? r.__SHELL_AUTH__.authInstance : null;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const t =
|
|
11
|
+
function Wt() {
|
|
12
|
+
const t = B();
|
|
13
13
|
return t ? {
|
|
14
14
|
isAuthenticated: t.isAuthenticated,
|
|
15
15
|
user: t.user ?? void 0
|
|
16
16
|
} : { isAuthenticated: !1 };
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const t =
|
|
18
|
+
function dr() {
|
|
19
|
+
const t = B();
|
|
20
20
|
return t?.isAuthenticated ? t.user?.profile?.access_token ?? null : null;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
function pr() {
|
|
23
|
+
return B()?.isAuthenticated ?? !1;
|
|
24
24
|
}
|
|
25
|
-
async function
|
|
26
|
-
const t =
|
|
25
|
+
async function zt() {
|
|
26
|
+
const t = B();
|
|
27
27
|
t?.signinRedirect ? await t.signinRedirect() : typeof window < "u" && (window.location.href = "/");
|
|
28
28
|
}
|
|
29
|
-
async function
|
|
30
|
-
const t =
|
|
29
|
+
async function hr() {
|
|
30
|
+
const t = B();
|
|
31
31
|
t?.removeUser && await t.removeUser();
|
|
32
32
|
}
|
|
33
33
|
const Je = {
|
|
@@ -36,23 +36,23 @@ const Je = {
|
|
|
36
36
|
warn: (...t) => {
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
function
|
|
40
|
-
const [t, r] = R(null), [s, i] = R(!0),
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
r(
|
|
39
|
+
function ae() {
|
|
40
|
+
const [t, r] = R(null), [s, i] = R(!0), a = tt(0), d = 20, n = C(() => B(), []);
|
|
41
|
+
U(() => {
|
|
42
|
+
const v = n();
|
|
43
|
+
if (v) {
|
|
44
|
+
r(v), i(!1);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
r(
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
47
|
+
const c = (f) => {
|
|
48
|
+
r(f.detail), i(!1);
|
|
49
|
+
}, g = setInterval(() => {
|
|
50
|
+
a.current++;
|
|
51
|
+
const f = n();
|
|
52
|
+
f ? (Je.log("Auth found via polling, attempts:", a.current), r(f), i(!1), clearInterval(g)) : a.current >= d && (i(!1), clearInterval(g));
|
|
53
53
|
}, 500);
|
|
54
|
-
return window.addEventListener("shell-auth-ready",
|
|
55
|
-
clearInterval(
|
|
54
|
+
return window.addEventListener("shell-auth-ready", c), () => {
|
|
55
|
+
clearInterval(g), window.removeEventListener("shell-auth-ready", c);
|
|
56
56
|
};
|
|
57
57
|
}, [n]);
|
|
58
58
|
const l = t || {
|
|
@@ -60,17 +60,17 @@ function se() {
|
|
|
60
60
|
isAuthenticated: !1,
|
|
61
61
|
isLoading: s,
|
|
62
62
|
signinRedirect: async () => {
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const v = B();
|
|
64
|
+
v?.signinRedirect ? await v.signinRedirect() : typeof window < "u" && (window.location.href = "/");
|
|
65
65
|
},
|
|
66
66
|
removeUser: async () => {
|
|
67
|
-
const
|
|
68
|
-
|
|
67
|
+
const v = B();
|
|
68
|
+
v?.removeUser && await v.removeUser();
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
return Je.log("Auth result:", { isAuthenticated: l.isAuthenticated, isLoading: l.isLoading }), l;
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const Ht = {
|
|
74
74
|
log: (...t) => {
|
|
75
75
|
},
|
|
76
76
|
warn: (...t) => {
|
|
@@ -79,7 +79,7 @@ const zt = {
|
|
|
79
79
|
console.error("[useInfoData]", ...t);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
function
|
|
82
|
+
function Gt(t) {
|
|
83
83
|
if (t) return t;
|
|
84
84
|
if (typeof window < "u") {
|
|
85
85
|
const r = window;
|
|
@@ -87,31 +87,31 @@ function Ht(t) {
|
|
|
87
87
|
}
|
|
88
88
|
return "unknown-mfe";
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
const [r, s] = R(null), [i,
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
if (!
|
|
95
|
-
throw new Error(`HTTP ${
|
|
96
|
-
return
|
|
97
|
-
}).then((
|
|
98
|
-
s(
|
|
99
|
-
}).catch((
|
|
100
|
-
|
|
90
|
+
function Yt(t) {
|
|
91
|
+
const [r, s] = R(null), [i, a] = R(!0), [d, n] = R(null), p = C(() => {
|
|
92
|
+
const v = Gt(t?.mfeName).replace("@ib-dop/", "");
|
|
93
|
+
a(!0), n(null), fetch(`/svc/${v}/info.json`).then((c) => {
|
|
94
|
+
if (!c.ok)
|
|
95
|
+
throw new Error(`HTTP ${c.status}: ${c.statusText}`);
|
|
96
|
+
return c.json();
|
|
97
|
+
}).then((c) => {
|
|
98
|
+
s(c);
|
|
99
|
+
}).catch((c) => {
|
|
100
|
+
Ht.error("Failed to load info:", c), n(c instanceof Error ? c.message : String(c));
|
|
101
101
|
}).finally(() => {
|
|
102
|
-
|
|
102
|
+
a(!1);
|
|
103
103
|
});
|
|
104
104
|
}, [t?.mfeName]);
|
|
105
|
-
return
|
|
106
|
-
|
|
107
|
-
}, [
|
|
105
|
+
return U(() => {
|
|
106
|
+
p();
|
|
107
|
+
}, [p]), {
|
|
108
108
|
data: r,
|
|
109
109
|
isLoading: i,
|
|
110
|
-
error:
|
|
111
|
-
refetch:
|
|
110
|
+
error: d,
|
|
111
|
+
refetch: p
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
const
|
|
114
|
+
const _e = {
|
|
115
115
|
log: (...t) => {
|
|
116
116
|
},
|
|
117
117
|
warn: (...t) => {
|
|
@@ -119,28 +119,28 @@ const me = {
|
|
|
119
119
|
error: (...t) => {
|
|
120
120
|
console.error("[useV1Config]", ...t);
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, re = {
|
|
123
123
|
authority: "",
|
|
124
124
|
client_id: "",
|
|
125
125
|
environment: "development"
|
|
126
126
|
};
|
|
127
|
-
function
|
|
128
|
-
const [t, r] = R(null), [s, i] = R(!0), [
|
|
129
|
-
return
|
|
127
|
+
function gr() {
|
|
128
|
+
const [t, r] = R(null), [s, i] = R(!0), [a, d] = R(null);
|
|
129
|
+
return U(() => {
|
|
130
130
|
(() => {
|
|
131
131
|
if (typeof sessionStorage > "u") {
|
|
132
|
-
|
|
132
|
+
d("sessionStorage not available"), r(re), i(!1);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
try {
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
138
|
-
const l = JSON.parse(
|
|
139
|
-
r({ ...
|
|
136
|
+
const p = sessionStorage.getItem("config");
|
|
137
|
+
if (p) {
|
|
138
|
+
const l = JSON.parse(p);
|
|
139
|
+
r({ ...re, ...l }), d(null), _e.log("Config loaded successfully");
|
|
140
140
|
} else
|
|
141
|
-
r(
|
|
142
|
-
} catch (
|
|
143
|
-
|
|
141
|
+
r(re), d("Config not found in sessionStorage"), _e.warn("Config not found in sessionStorage");
|
|
142
|
+
} catch (p) {
|
|
143
|
+
_e.error("Error parsing config:", p), r(re), d("Error parsing config");
|
|
144
144
|
} finally {
|
|
145
145
|
i(!1);
|
|
146
146
|
}
|
|
@@ -148,10 +148,111 @@ function hr() {
|
|
|
148
148
|
}, []), {
|
|
149
149
|
data: t,
|
|
150
150
|
isLoading: s,
|
|
151
|
-
error:
|
|
151
|
+
error: a
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
const rt = "platform-kit", ne = {
|
|
155
|
+
log: (...t) => {
|
|
156
|
+
},
|
|
157
|
+
warn: (...t) => {
|
|
158
|
+
},
|
|
159
|
+
error: (...t) => {
|
|
160
|
+
console.error(`[${rt}]`, ...t);
|
|
161
|
+
},
|
|
162
|
+
info: (...t) => {
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
function qt(t) {
|
|
166
|
+
const r = t.response;
|
|
167
|
+
let s = "unknown";
|
|
168
|
+
return r ? r.status === 401 ? s = "unauthorized" : r.status === 403 ? s = "forbidden" : r.status === 404 ? s = "not_found" : r.status >= 500 && (s = "server") : s = "network", {
|
|
169
|
+
message: r?.data?.message ?? t.message ?? "Unknown error",
|
|
170
|
+
code: r?.data?.code,
|
|
171
|
+
status: r?.status,
|
|
172
|
+
type: s,
|
|
173
|
+
timestamp: Date.now(),
|
|
174
|
+
url: t.config?.url
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
const Jt = 3, Kt = 1e3;
|
|
178
|
+
function Xt(t) {
|
|
179
|
+
return !t || t >= 500 || t === 429;
|
|
180
|
+
}
|
|
181
|
+
function Zt(t) {
|
|
182
|
+
return new Promise((r) => setTimeout(r, t));
|
|
183
|
+
}
|
|
184
|
+
function Qt(t = {}) {
|
|
185
|
+
const r = t.name || rt, s = t.retries ?? Jt, i = t.retryDelay ?? Kt, a = {
|
|
186
|
+
log: (...n) => ne.log(`[API:${r}]`, ...n),
|
|
187
|
+
warn: (...n) => ne.warn(`[API:${r}]`, ...n),
|
|
188
|
+
error: (...n) => ne.error(`[API:${r}]`, ...n),
|
|
189
|
+
info: (...n) => ne.info(`[API:${r}]`, ...n)
|
|
190
|
+
}, d = Bt.create({
|
|
191
|
+
timeout: t.timeout ?? 1e4,
|
|
192
|
+
baseURL: t.baseURL ?? "",
|
|
193
|
+
headers: {
|
|
194
|
+
"Content-Type": "application/json"
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
return d.interceptors.request.use(
|
|
198
|
+
(n) => {
|
|
199
|
+
const p = Wt();
|
|
200
|
+
if (p?.isAuthenticated) {
|
|
201
|
+
const l = p.user?.access_token || p.user?.profile?.access_token;
|
|
202
|
+
l && n.headers ? (n.headers.Authorization = `Bearer ${l}`, a.info("Auth token attached")) : a.warn("User is authenticated but no token found");
|
|
203
|
+
} else
|
|
204
|
+
a.info("User not authenticated - request without token");
|
|
205
|
+
return a.log(`${n.method?.toUpperCase()} ${n.url}`), n;
|
|
206
|
+
},
|
|
207
|
+
(n) => (a.error("Request interceptor error:", n.message), Promise.reject(n))
|
|
208
|
+
), d.interceptors.response.use(
|
|
209
|
+
(n) => (a.log(`Response ${n.status}:`, n.config.url), n),
|
|
210
|
+
async (n) => {
|
|
211
|
+
const p = n.response?.status, l = n.config?.url, v = n.config?._retryCount ?? 0;
|
|
212
|
+
if (Xt(p) && v < s) {
|
|
213
|
+
const c = n.config;
|
|
214
|
+
c._retryCount = v + 1;
|
|
215
|
+
const g = i * Math.pow(2, v);
|
|
216
|
+
return a.warn(`Retrying (${c._retryCount}/${s}) after ${g}ms:`, l), await Zt(g), d.request(c);
|
|
217
|
+
}
|
|
218
|
+
return p === 401 ? (a.warn("401 Unauthorized - triggering re-auth"), zt()) : p === 403 ? a.warn("403 Forbidden - insufficient permissions") : p === 404 ? a.warn("404 Not found:", l) : p === 429 ? a.warn("429 Rate limited") : p === 500 ? a.error("500 Server error:", l) : n.response ? a.warn(`Error ${p}:`, n.message) : a.error("Network error - backend may be unavailable:", l), Promise.reject(qt(n));
|
|
219
|
+
}
|
|
220
|
+
), d;
|
|
221
|
+
}
|
|
222
|
+
const W = Qt();
|
|
223
|
+
async function mr(t, r, s = W) {
|
|
224
|
+
const i = await s.get(t, { params: r });
|
|
225
|
+
return {
|
|
226
|
+
data: i.data,
|
|
227
|
+
status: i.status,
|
|
228
|
+
ok: i.status >= 200 && i.status < 300
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
async function _r(t, r, s = W) {
|
|
232
|
+
const i = await s.post(t, r);
|
|
233
|
+
return {
|
|
234
|
+
data: i.data,
|
|
235
|
+
status: i.status,
|
|
236
|
+
ok: i.status >= 200 && i.status < 300
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
async function vr(t, r, s = W) {
|
|
240
|
+
const i = await s.put(t, r);
|
|
241
|
+
return {
|
|
242
|
+
data: i.data,
|
|
243
|
+
status: i.status,
|
|
244
|
+
ok: i.status >= 200 && i.status < 300
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
async function yr(t, r = W) {
|
|
248
|
+
const s = await r.delete(t);
|
|
249
|
+
return {
|
|
250
|
+
data: s.data,
|
|
251
|
+
status: s.status,
|
|
252
|
+
ok: s.status >= 200 && s.status < 300
|
|
152
253
|
};
|
|
153
254
|
}
|
|
154
|
-
function
|
|
255
|
+
function nt(t) {
|
|
155
256
|
if (typeof window > "u") return;
|
|
156
257
|
const r = window.__MF_NAME__ || "unknown", s = {
|
|
157
258
|
...t,
|
|
@@ -163,7 +264,7 @@ function tt(t) {
|
|
|
163
264
|
bubbles: !0
|
|
164
265
|
}));
|
|
165
266
|
}
|
|
166
|
-
function
|
|
267
|
+
function Ke(t, r) {
|
|
167
268
|
const s = {
|
|
168
269
|
network: {
|
|
169
270
|
title: "Нет подключения",
|
|
@@ -194,67 +295,67 @@ function qe(t, r) {
|
|
|
194
295
|
message: t.message || "Произошла неизвестная ошибка."
|
|
195
296
|
}
|
|
196
297
|
}, i = s[t.type] || s.unknown;
|
|
197
|
-
|
|
298
|
+
nt({
|
|
198
299
|
type: t.type === "network" ? "warning" : "error",
|
|
199
300
|
title: i.title,
|
|
200
301
|
message: r ? `${i.message} (${r})` : i.message
|
|
201
302
|
});
|
|
202
303
|
}
|
|
203
|
-
function
|
|
304
|
+
function er(t) {
|
|
204
305
|
return t instanceof Error && t.name === "AbortError";
|
|
205
306
|
}
|
|
206
|
-
function
|
|
307
|
+
function ie(t, r = {}) {
|
|
207
308
|
const {
|
|
208
309
|
notifyOnError: s = !0,
|
|
209
310
|
notifyOnSuccess: i = !1,
|
|
210
|
-
successMessage:
|
|
211
|
-
errorContext:
|
|
311
|
+
successMessage: a,
|
|
312
|
+
errorContext: d,
|
|
212
313
|
onSuccess: n,
|
|
213
|
-
onError:
|
|
214
|
-
} = r, [l,
|
|
215
|
-
|
|
216
|
-
|
|
314
|
+
onError: p
|
|
315
|
+
} = r, [l, v] = R(null), [c, g] = R(null), [f, E] = R(!1), y = tt(null), N = c !== null, T = l !== null && !f && !N;
|
|
316
|
+
U(() => () => {
|
|
317
|
+
y.current && y.current.abort();
|
|
217
318
|
}, []);
|
|
218
319
|
const x = C(() => {
|
|
219
|
-
|
|
320
|
+
y.current && (y.current.abort(), y.current = null, E(!1));
|
|
220
321
|
}, []), _ = C(async () => {
|
|
221
|
-
|
|
222
|
-
const j =
|
|
223
|
-
E(!0),
|
|
322
|
+
y.current && y.current.abort(), y.current = new AbortController();
|
|
323
|
+
const j = y.current.signal;
|
|
324
|
+
E(!0), g(null);
|
|
224
325
|
try {
|
|
225
|
-
const
|
|
326
|
+
const P = await t(j);
|
|
226
327
|
if (j.aborted)
|
|
227
328
|
return null;
|
|
228
|
-
if (
|
|
229
|
-
return
|
|
329
|
+
if (P.ok)
|
|
330
|
+
return v(P.data), i && a && nt({
|
|
230
331
|
type: "success",
|
|
231
332
|
title: "Успешно",
|
|
232
|
-
message:
|
|
233
|
-
}), n?.(
|
|
333
|
+
message: a
|
|
334
|
+
}), n?.(P.data), P.data;
|
|
234
335
|
{
|
|
235
336
|
const L = {
|
|
236
|
-
message:
|
|
237
|
-
status:
|
|
337
|
+
message: P.data || "Request failed",
|
|
338
|
+
status: P.status,
|
|
238
339
|
type: "client",
|
|
239
340
|
timestamp: Date.now()
|
|
240
341
|
};
|
|
241
|
-
return
|
|
342
|
+
return g(L), s && Ke(L, d), p?.(L), null;
|
|
242
343
|
}
|
|
243
|
-
} catch (
|
|
244
|
-
if (
|
|
344
|
+
} catch (P) {
|
|
345
|
+
if (er(P))
|
|
245
346
|
return null;
|
|
246
|
-
const L =
|
|
247
|
-
return
|
|
347
|
+
const L = P;
|
|
348
|
+
return g(L), s && Ke(L, d), p?.(L), null;
|
|
248
349
|
} finally {
|
|
249
|
-
j.aborted || E(!1),
|
|
350
|
+
j.aborted || E(!1), y.current = null;
|
|
250
351
|
}
|
|
251
|
-
}, [t, s, i,
|
|
252
|
-
|
|
352
|
+
}, [t, s, i, a, d, n, p]), k = C(() => {
|
|
353
|
+
v(null), g(null), E(!1);
|
|
253
354
|
}, []);
|
|
254
355
|
return {
|
|
255
356
|
data: l,
|
|
256
|
-
error:
|
|
257
|
-
isLoading:
|
|
357
|
+
error: c,
|
|
358
|
+
isLoading: f,
|
|
258
359
|
isError: N,
|
|
259
360
|
isSuccess: T,
|
|
260
361
|
execute: _,
|
|
@@ -262,7 +363,28 @@ function gr(t, r = {}) {
|
|
|
262
363
|
abort: x
|
|
263
364
|
};
|
|
264
365
|
}
|
|
265
|
-
|
|
366
|
+
function Er(t, r = {}) {
|
|
367
|
+
const { skip: s = !1, headers: i, immediate: a = !0, ...d } = r, n = ye(() => (l) => {
|
|
368
|
+
const v = i ? i() : {};
|
|
369
|
+
return W.get(t, {
|
|
370
|
+
headers: { "Content-Type": "application/json", ...v },
|
|
371
|
+
signal: l
|
|
372
|
+
}).then((c) => ({ data: c.data, status: c.status, ok: c.status >= 200 && c.status < 300 }));
|
|
373
|
+
}, [t, i]), p = ie(n, { ...d });
|
|
374
|
+
return U(() => {
|
|
375
|
+
a && !s && p.execute();
|
|
376
|
+
}, [a, s, t]), p;
|
|
377
|
+
}
|
|
378
|
+
function wr(t, r, s = {}) {
|
|
379
|
+
return ie((a) => W.post(t, r, { signal: a }).then((d) => ({ data: d.data, status: d.status, ok: d.status >= 200 && d.status < 300 })), s);
|
|
380
|
+
}
|
|
381
|
+
function br(t, r, s = {}) {
|
|
382
|
+
return ie((a) => W.put(t, r, { signal: a }).then((d) => ({ data: d.data, status: d.status, ok: d.status >= 200 && d.status < 300 })), s);
|
|
383
|
+
}
|
|
384
|
+
function xr(t, r = {}) {
|
|
385
|
+
return ie((i) => W.delete(t, { signal: i }).then((a) => ({ data: a.data, status: a.status, ok: a.status >= 200 && a.status < 300 })), r);
|
|
386
|
+
}
|
|
387
|
+
const tr = {
|
|
266
388
|
canView: ["all"],
|
|
267
389
|
canEdit: ["ibdop-user", "ibdop-admin", "ibdop-devops"],
|
|
268
390
|
canDelete: ["ibdop-admin", "ibdop-devops"],
|
|
@@ -271,75 +393,75 @@ const Jt = {
|
|
|
271
393
|
canExportData: ["ibdop-user"],
|
|
272
394
|
canManageUsers: ["ibdop-admin"]
|
|
273
395
|
};
|
|
274
|
-
function
|
|
275
|
-
const r =
|
|
276
|
-
...
|
|
396
|
+
function Ar(t = {}) {
|
|
397
|
+
const r = ae(), s = ye(() => ({
|
|
398
|
+
...tr,
|
|
277
399
|
...t
|
|
278
|
-
}), [t]), i =
|
|
279
|
-
const
|
|
280
|
-
return Array.isArray(
|
|
281
|
-
}, [r.user]),
|
|
400
|
+
}), [t]), i = ye(() => {
|
|
401
|
+
const d = r.user?.profile?.realm_roles || r.user?.profile?.roles || [];
|
|
402
|
+
return Array.isArray(d) ? d : [d];
|
|
403
|
+
}, [r.user]), a = (d) => d.includes("all") ? !0 : d.some((n) => i.includes(n));
|
|
282
404
|
return {
|
|
283
|
-
canView:
|
|
284
|
-
canEdit:
|
|
285
|
-
canDelete:
|
|
286
|
-
canAdmin:
|
|
287
|
-
canViewSensitiveData:
|
|
288
|
-
canExportData:
|
|
289
|
-
canManageUsers:
|
|
405
|
+
canView: a(s.canView),
|
|
406
|
+
canEdit: a(s.canEdit),
|
|
407
|
+
canDelete: a(s.canDelete),
|
|
408
|
+
canAdmin: a(s.canAdmin),
|
|
409
|
+
canViewSensitiveData: a(s.canViewSensitiveData),
|
|
410
|
+
canExportData: a(s.canExportData),
|
|
411
|
+
canManageUsers: a(s.canManageUsers)
|
|
290
412
|
};
|
|
291
413
|
}
|
|
292
|
-
function
|
|
293
|
-
const t =
|
|
414
|
+
function Sr() {
|
|
415
|
+
const t = ae(), [r, s] = R([]), [i, a] = R(0), [d, n] = R([]), [p, l] = R(!0), [v, c] = R(null), g = C(async () => {
|
|
294
416
|
if (!t.isAuthenticated) {
|
|
295
417
|
console.debug("[useFeatures] Not authenticated"), l(!1);
|
|
296
418
|
return;
|
|
297
419
|
}
|
|
298
|
-
l(!0),
|
|
420
|
+
l(!0), c(null);
|
|
299
421
|
try {
|
|
300
|
-
const
|
|
422
|
+
const y = {
|
|
301
423
|
"Content-Type": "application/json"
|
|
302
424
|
}, N = t.user?.access_token;
|
|
303
|
-
N && (
|
|
304
|
-
const T = await fetch("/api/features", { headers:
|
|
425
|
+
N && (y.Authorization = `Bearer ${N}`);
|
|
426
|
+
const T = await fetch("/api/features", { headers: y });
|
|
305
427
|
if (!T.ok)
|
|
306
428
|
throw new Error(`HTTP ${T.status}: ${T.statusText}`);
|
|
307
429
|
const x = await T.json();
|
|
308
|
-
s(x.features || []),
|
|
309
|
-
} catch (
|
|
310
|
-
console.debug("Features fetch error:",
|
|
430
|
+
s(x.features || []), a(x.totalCount || 0), n(x.userRoles || []);
|
|
431
|
+
} catch (y) {
|
|
432
|
+
console.debug("Features fetch error:", y), c(y instanceof Error ? y.message : String(y)), s([]), n([]);
|
|
311
433
|
} finally {
|
|
312
434
|
l(!1);
|
|
313
435
|
}
|
|
314
436
|
}, [t.isAuthenticated, t.user?.access_token]);
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}, [
|
|
318
|
-
const
|
|
319
|
-
(
|
|
437
|
+
U(() => {
|
|
438
|
+
g();
|
|
439
|
+
}, [g]);
|
|
440
|
+
const f = C(
|
|
441
|
+
(y) => r.find((T) => T.name === y)?.userEnabled ?? !1,
|
|
320
442
|
[r]
|
|
321
443
|
), E = C(
|
|
322
|
-
(
|
|
444
|
+
(y) => r.filter((N) => N.mfDependencies?.includes(y)),
|
|
323
445
|
[r]
|
|
324
446
|
);
|
|
325
447
|
return {
|
|
326
448
|
features: r,
|
|
327
449
|
totalCount: i,
|
|
328
|
-
userRoles:
|
|
329
|
-
isLoading:
|
|
330
|
-
error:
|
|
331
|
-
refetch:
|
|
332
|
-
isFeatureEnabled:
|
|
450
|
+
userRoles: d,
|
|
451
|
+
isLoading: p,
|
|
452
|
+
error: v,
|
|
453
|
+
refetch: g,
|
|
454
|
+
isFeatureEnabled: f,
|
|
333
455
|
getFeaturesByMf: E
|
|
334
456
|
};
|
|
335
457
|
}
|
|
336
|
-
function
|
|
337
|
-
const t =
|
|
458
|
+
function Rr() {
|
|
459
|
+
const t = ae(), [r, s] = R([]), [i, a] = R([]), [d, n] = R(!1), [p, l] = R(!0), [v, c] = R(null), g = C(async () => {
|
|
338
460
|
if (!t.isAuthenticated) {
|
|
339
461
|
console.debug("[useFeatureAdmin] Not authenticated"), l(!1);
|
|
340
462
|
return;
|
|
341
463
|
}
|
|
342
|
-
l(!0),
|
|
464
|
+
l(!0), c(null);
|
|
343
465
|
try {
|
|
344
466
|
const T = {
|
|
345
467
|
"Content-Type": "application/json"
|
|
@@ -348,19 +470,19 @@ function vr() {
|
|
|
348
470
|
const _ = await fetch("/api/features/admin", { headers: T });
|
|
349
471
|
if (!_.ok) {
|
|
350
472
|
if (_.status === 403) {
|
|
351
|
-
console.warn("[useFeatureAdmin] 403 Forbidden - checking if token has admin role"), n(!1), s([]),
|
|
473
|
+
console.warn("[useFeatureAdmin] 403 Forbidden - checking if token has admin role"), n(!1), s([]), a([]), l(!1);
|
|
352
474
|
return;
|
|
353
475
|
}
|
|
354
476
|
throw new Error(`HTTP ${_.status}: ${_.statusText}`);
|
|
355
477
|
}
|
|
356
478
|
const k = await _.json();
|
|
357
|
-
s(k.featureToggles || []),
|
|
479
|
+
s(k.featureToggles || []), a(k.microfrontends || []), n(k.isAdmin || !1);
|
|
358
480
|
} catch (T) {
|
|
359
|
-
console.debug("FeatureAdmin fetch error:", T), s([]),
|
|
481
|
+
console.debug("FeatureAdmin fetch error:", T), s([]), a([]), n(!1);
|
|
360
482
|
} finally {
|
|
361
483
|
l(!1);
|
|
362
484
|
}
|
|
363
|
-
}, [t.isAuthenticated, t.user?.access_token]),
|
|
485
|
+
}, [t.isAuthenticated, t.user?.access_token]), f = C(
|
|
364
486
|
async (T) => {
|
|
365
487
|
try {
|
|
366
488
|
const x = {
|
|
@@ -376,12 +498,12 @@ function vr() {
|
|
|
376
498
|
const j = await k.json().catch(() => ({}));
|
|
377
499
|
throw new Error(j.error || `HTTP ${k.status}`);
|
|
378
500
|
}
|
|
379
|
-
return await
|
|
501
|
+
return await g(), !0;
|
|
380
502
|
} catch (x) {
|
|
381
|
-
return
|
|
503
|
+
return c(x instanceof Error ? x.message : String(x)), !1;
|
|
382
504
|
}
|
|
383
505
|
},
|
|
384
|
-
[
|
|
506
|
+
[g]
|
|
385
507
|
), E = C(
|
|
386
508
|
async (T, x) => {
|
|
387
509
|
try {
|
|
@@ -395,16 +517,16 @@ function vr() {
|
|
|
395
517
|
body: JSON.stringify(x)
|
|
396
518
|
});
|
|
397
519
|
if (!j.ok) {
|
|
398
|
-
const
|
|
399
|
-
throw new Error(
|
|
520
|
+
const P = await j.json().catch(() => ({}));
|
|
521
|
+
throw new Error(P.error || `HTTP ${j.status}`);
|
|
400
522
|
}
|
|
401
|
-
return await
|
|
523
|
+
return await g(), !0;
|
|
402
524
|
} catch (_) {
|
|
403
|
-
return
|
|
525
|
+
return c(_ instanceof Error ? _.message : String(_)), !1;
|
|
404
526
|
}
|
|
405
527
|
},
|
|
406
|
-
[
|
|
407
|
-
),
|
|
528
|
+
[g]
|
|
529
|
+
), y = C(
|
|
408
530
|
async (T, x) => {
|
|
409
531
|
try {
|
|
410
532
|
const _ = {}, k = t.user?.access_token;
|
|
@@ -417,15 +539,15 @@ function vr() {
|
|
|
417
539
|
}
|
|
418
540
|
);
|
|
419
541
|
if (!j.ok) {
|
|
420
|
-
const
|
|
421
|
-
throw new Error(
|
|
542
|
+
const P = await j.json().catch(() => ({}));
|
|
543
|
+
throw new Error(P.error || `HTTP ${j.status}`);
|
|
422
544
|
}
|
|
423
|
-
return await
|
|
545
|
+
return await g(), !0;
|
|
424
546
|
} catch (_) {
|
|
425
|
-
return
|
|
547
|
+
return c(_ instanceof Error ? _.message : String(_)), !1;
|
|
426
548
|
}
|
|
427
549
|
},
|
|
428
|
-
[
|
|
550
|
+
[g]
|
|
429
551
|
), N = C(
|
|
430
552
|
async (T) => {
|
|
431
553
|
try {
|
|
@@ -439,125 +561,125 @@ function vr() {
|
|
|
439
561
|
const j = await k.json().catch(() => ({}));
|
|
440
562
|
throw new Error(j.error || `HTTP ${k.status}`);
|
|
441
563
|
}
|
|
442
|
-
return await
|
|
564
|
+
return await g(), !0;
|
|
443
565
|
} catch (x) {
|
|
444
|
-
return
|
|
566
|
+
return c(x instanceof Error ? x.message : String(x)), !1;
|
|
445
567
|
}
|
|
446
568
|
},
|
|
447
|
-
[
|
|
569
|
+
[g]
|
|
448
570
|
);
|
|
449
|
-
return
|
|
450
|
-
|
|
451
|
-
}, [
|
|
571
|
+
return U(() => {
|
|
572
|
+
g();
|
|
573
|
+
}, [g]), {
|
|
452
574
|
features: r,
|
|
453
575
|
microfrontends: i,
|
|
454
|
-
isAdmin:
|
|
455
|
-
isLoading:
|
|
456
|
-
error:
|
|
457
|
-
refetch:
|
|
458
|
-
createFeature:
|
|
576
|
+
isAdmin: d,
|
|
577
|
+
isLoading: p,
|
|
578
|
+
error: v,
|
|
579
|
+
refetch: g,
|
|
580
|
+
createFeature: f,
|
|
459
581
|
updateFeature: E,
|
|
460
|
-
toggleFeature:
|
|
582
|
+
toggleFeature: y,
|
|
461
583
|
deleteFeature: N
|
|
462
584
|
};
|
|
463
585
|
}
|
|
464
|
-
function
|
|
465
|
-
const t =
|
|
586
|
+
function Tr() {
|
|
587
|
+
const t = ae(), [r, s] = R([]), [i, a] = R(0), [d, n] = R(!0), [p, l] = R(null), v = C(async () => {
|
|
466
588
|
if (!t.isAuthenticated) {
|
|
467
589
|
n(!1);
|
|
468
590
|
return;
|
|
469
591
|
}
|
|
470
592
|
n(!0), l(null);
|
|
471
593
|
try {
|
|
472
|
-
const
|
|
594
|
+
const c = {
|
|
473
595
|
"Content-Type": "application/json"
|
|
474
|
-
},
|
|
475
|
-
|
|
476
|
-
const
|
|
477
|
-
if (!
|
|
478
|
-
throw new Error(`HTTP ${
|
|
479
|
-
const E = await
|
|
480
|
-
s(E.microfrontends || []),
|
|
481
|
-
} catch (
|
|
482
|
-
l(
|
|
596
|
+
}, g = t.user?.access_token;
|
|
597
|
+
g && (c.Authorization = `Bearer ${g}`);
|
|
598
|
+
const f = await fetch("/api/features/microfrontends", { headers: c });
|
|
599
|
+
if (!f.ok)
|
|
600
|
+
throw new Error(`HTTP ${f.status}: ${f.statusText}`);
|
|
601
|
+
const E = await f.json();
|
|
602
|
+
s(E.microfrontends || []), a(E.totalCount || 0);
|
|
603
|
+
} catch (c) {
|
|
604
|
+
l(c instanceof Error ? c.message : String(c));
|
|
483
605
|
} finally {
|
|
484
606
|
n(!1);
|
|
485
607
|
}
|
|
486
608
|
}, [t.isAuthenticated, t.user?.access_token]);
|
|
487
|
-
return
|
|
488
|
-
|
|
489
|
-
}, [
|
|
609
|
+
return U(() => {
|
|
610
|
+
v();
|
|
611
|
+
}, [v]), {
|
|
490
612
|
microfrontends: r,
|
|
491
613
|
totalCount: i,
|
|
492
|
-
isLoading:
|
|
493
|
-
error:
|
|
494
|
-
refetch:
|
|
614
|
+
isLoading: d,
|
|
615
|
+
error: p,
|
|
616
|
+
refetch: v
|
|
495
617
|
};
|
|
496
618
|
}
|
|
497
|
-
var
|
|
498
|
-
var
|
|
499
|
-
function
|
|
500
|
-
if (
|
|
501
|
-
|
|
502
|
-
var t =
|
|
503
|
-
function n(
|
|
504
|
-
var
|
|
505
|
-
|
|
506
|
-
for (
|
|
507
|
-
if (
|
|
508
|
-
return { $$typeof: r, type:
|
|
619
|
+
var oe = { exports: {} }, K = {};
|
|
620
|
+
var Xe;
|
|
621
|
+
function rr() {
|
|
622
|
+
if (Xe) return K;
|
|
623
|
+
Xe = 1;
|
|
624
|
+
var t = et, r = /* @__PURE__ */ Symbol.for("react.element"), s = /* @__PURE__ */ Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
625
|
+
function n(p, l, v) {
|
|
626
|
+
var c, g = {}, f = null, E = null;
|
|
627
|
+
v !== void 0 && (f = "" + v), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (E = l.ref);
|
|
628
|
+
for (c in l) i.call(l, c) && !d.hasOwnProperty(c) && (g[c] = l[c]);
|
|
629
|
+
if (p && p.defaultProps) for (c in l = p.defaultProps, l) g[c] === void 0 && (g[c] = l[c]);
|
|
630
|
+
return { $$typeof: r, type: p, key: f, ref: E, props: g, _owner: a.current };
|
|
509
631
|
}
|
|
510
|
-
return
|
|
632
|
+
return K.Fragment = s, K.jsx = n, K.jsxs = n, K;
|
|
511
633
|
}
|
|
512
|
-
var
|
|
513
|
-
var
|
|
514
|
-
function
|
|
515
|
-
return
|
|
516
|
-
var t =
|
|
634
|
+
var X = {};
|
|
635
|
+
var Ze;
|
|
636
|
+
function nr() {
|
|
637
|
+
return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
638
|
+
var t = et, r = /* @__PURE__ */ Symbol.for("react.element"), s = /* @__PURE__ */ Symbol.for("react.portal"), i = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"), n = /* @__PURE__ */ Symbol.for("react.provider"), p = /* @__PURE__ */ Symbol.for("react.context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), v = /* @__PURE__ */ Symbol.for("react.suspense"), c = /* @__PURE__ */ Symbol.for("react.suspense_list"), g = /* @__PURE__ */ Symbol.for("react.memo"), f = /* @__PURE__ */ Symbol.for("react.lazy"), E = /* @__PURE__ */ Symbol.for("react.offscreen"), y = Symbol.iterator, N = "@@iterator";
|
|
517
639
|
function T(e) {
|
|
518
640
|
if (e === null || typeof e != "object")
|
|
519
641
|
return null;
|
|
520
|
-
var o =
|
|
642
|
+
var o = y && e[y] || e[N];
|
|
521
643
|
return typeof o == "function" ? o : null;
|
|
522
644
|
}
|
|
523
645
|
var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
524
646
|
function _(e) {
|
|
525
647
|
{
|
|
526
|
-
for (var o = arguments.length,
|
|
527
|
-
|
|
528
|
-
k("error", e,
|
|
648
|
+
for (var o = arguments.length, u = new Array(o > 1 ? o - 1 : 0), h = 1; h < o; h++)
|
|
649
|
+
u[h - 1] = arguments[h];
|
|
650
|
+
k("error", e, u);
|
|
529
651
|
}
|
|
530
652
|
}
|
|
531
|
-
function k(e, o,
|
|
653
|
+
function k(e, o, u) {
|
|
532
654
|
{
|
|
533
|
-
var
|
|
534
|
-
A !== "" && (o += "%s",
|
|
535
|
-
var S =
|
|
655
|
+
var h = x.ReactDebugCurrentFrame, A = h.getStackAddendum();
|
|
656
|
+
A !== "" && (o += "%s", u = u.concat([A]));
|
|
657
|
+
var S = u.map(function(b) {
|
|
536
658
|
return String(b);
|
|
537
659
|
});
|
|
538
660
|
S.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, S);
|
|
539
661
|
}
|
|
540
662
|
}
|
|
541
|
-
var j = !1,
|
|
542
|
-
|
|
543
|
-
function
|
|
544
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e ===
|
|
663
|
+
var j = !1, P = !1, L = !1, ut = !1, ct = !1, Ae;
|
|
664
|
+
Ae = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
665
|
+
function lt(e) {
|
|
666
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === d || ct || e === a || e === v || e === c || ut || e === E || j || P || L || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === g || e.$$typeof === n || e.$$typeof === p || e.$$typeof === l || // This needs to include all possible module reference object
|
|
545
667
|
// types supported by any Flight configuration anywhere since
|
|
546
668
|
// we don't know which Flight build this will end up being used
|
|
547
669
|
// with.
|
|
548
|
-
e.$$typeof ===
|
|
670
|
+
e.$$typeof === Ae || e.getModuleId !== void 0));
|
|
549
671
|
}
|
|
550
|
-
function
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
553
|
-
return
|
|
672
|
+
function ft(e, o, u) {
|
|
673
|
+
var h = e.displayName;
|
|
674
|
+
if (h)
|
|
675
|
+
return h;
|
|
554
676
|
var A = o.displayName || o.name || "";
|
|
555
|
-
return A !== "" ?
|
|
677
|
+
return A !== "" ? u + "(" + A + ")" : u;
|
|
556
678
|
}
|
|
557
|
-
function
|
|
679
|
+
function Se(e) {
|
|
558
680
|
return e.displayName || "Context";
|
|
559
681
|
}
|
|
560
|
-
function
|
|
682
|
+
function V(e) {
|
|
561
683
|
if (e == null)
|
|
562
684
|
return null;
|
|
563
685
|
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -569,32 +691,32 @@ function Kt() {
|
|
|
569
691
|
return "Fragment";
|
|
570
692
|
case s:
|
|
571
693
|
return "Portal";
|
|
572
|
-
case
|
|
694
|
+
case d:
|
|
573
695
|
return "Profiler";
|
|
574
|
-
case
|
|
696
|
+
case a:
|
|
575
697
|
return "StrictMode";
|
|
576
|
-
case
|
|
698
|
+
case v:
|
|
577
699
|
return "Suspense";
|
|
578
|
-
case
|
|
700
|
+
case c:
|
|
579
701
|
return "SuspenseList";
|
|
580
702
|
}
|
|
581
703
|
if (typeof e == "object")
|
|
582
704
|
switch (e.$$typeof) {
|
|
583
|
-
case
|
|
705
|
+
case p:
|
|
584
706
|
var o = e;
|
|
585
|
-
return
|
|
707
|
+
return Se(o) + ".Consumer";
|
|
586
708
|
case n:
|
|
587
|
-
var
|
|
588
|
-
return
|
|
709
|
+
var u = e;
|
|
710
|
+
return Se(u._context) + ".Provider";
|
|
589
711
|
case l:
|
|
590
|
-
return
|
|
591
|
-
case
|
|
592
|
-
var
|
|
593
|
-
return
|
|
594
|
-
case
|
|
712
|
+
return ft(e, e.render, "ForwardRef");
|
|
713
|
+
case g:
|
|
714
|
+
var h = e.displayName || null;
|
|
715
|
+
return h !== null ? h : V(e.type) || "Memo";
|
|
716
|
+
case f: {
|
|
595
717
|
var A = e, S = A._payload, b = A._init;
|
|
596
718
|
try {
|
|
597
|
-
return
|
|
719
|
+
return V(b(S));
|
|
598
720
|
} catch {
|
|
599
721
|
return null;
|
|
600
722
|
}
|
|
@@ -602,18 +724,18 @@ function Kt() {
|
|
|
602
724
|
}
|
|
603
725
|
return null;
|
|
604
726
|
}
|
|
605
|
-
var
|
|
606
|
-
function
|
|
727
|
+
var z = Object.assign, q = 0, Re, Te, Ce, ke, Me, Ie, Ne;
|
|
728
|
+
function je() {
|
|
607
729
|
}
|
|
608
|
-
|
|
609
|
-
function
|
|
730
|
+
je.__reactDisabledLog = !0;
|
|
731
|
+
function dt() {
|
|
610
732
|
{
|
|
611
|
-
if (
|
|
612
|
-
|
|
733
|
+
if (q === 0) {
|
|
734
|
+
Re = console.log, Te = console.info, Ce = console.warn, ke = console.error, Me = console.group, Ie = console.groupCollapsed, Ne = console.groupEnd;
|
|
613
735
|
var e = {
|
|
614
736
|
configurable: !0,
|
|
615
737
|
enumerable: !0,
|
|
616
|
-
value:
|
|
738
|
+
value: je,
|
|
617
739
|
writable: !0
|
|
618
740
|
};
|
|
619
741
|
Object.defineProperties(console, {
|
|
@@ -626,77 +748,77 @@ function Kt() {
|
|
|
626
748
|
groupEnd: e
|
|
627
749
|
});
|
|
628
750
|
}
|
|
629
|
-
|
|
751
|
+
q++;
|
|
630
752
|
}
|
|
631
753
|
}
|
|
632
|
-
function
|
|
754
|
+
function pt() {
|
|
633
755
|
{
|
|
634
|
-
if (
|
|
756
|
+
if (q--, q === 0) {
|
|
635
757
|
var e = {
|
|
636
758
|
configurable: !0,
|
|
637
759
|
enumerable: !0,
|
|
638
760
|
writable: !0
|
|
639
761
|
};
|
|
640
762
|
Object.defineProperties(console, {
|
|
641
|
-
log:
|
|
642
|
-
value: Ae
|
|
643
|
-
}),
|
|
644
|
-
info: W({}, e, {
|
|
645
|
-
value: Se
|
|
646
|
-
}),
|
|
647
|
-
warn: W({}, e, {
|
|
763
|
+
log: z({}, e, {
|
|
648
764
|
value: Re
|
|
649
765
|
}),
|
|
650
|
-
|
|
766
|
+
info: z({}, e, {
|
|
651
767
|
value: Te
|
|
652
768
|
}),
|
|
653
|
-
|
|
769
|
+
warn: z({}, e, {
|
|
654
770
|
value: Ce
|
|
655
771
|
}),
|
|
656
|
-
|
|
772
|
+
error: z({}, e, {
|
|
657
773
|
value: ke
|
|
658
774
|
}),
|
|
659
|
-
|
|
775
|
+
group: z({}, e, {
|
|
660
776
|
value: Me
|
|
777
|
+
}),
|
|
778
|
+
groupCollapsed: z({}, e, {
|
|
779
|
+
value: Ie
|
|
780
|
+
}),
|
|
781
|
+
groupEnd: z({}, e, {
|
|
782
|
+
value: Ne
|
|
661
783
|
})
|
|
662
784
|
});
|
|
663
785
|
}
|
|
664
|
-
|
|
786
|
+
q < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
665
787
|
}
|
|
666
788
|
}
|
|
667
|
-
var
|
|
668
|
-
function
|
|
789
|
+
var ce = x.ReactCurrentDispatcher, le;
|
|
790
|
+
function Z(e, o, u) {
|
|
669
791
|
{
|
|
670
|
-
if (
|
|
792
|
+
if (le === void 0)
|
|
671
793
|
try {
|
|
672
794
|
throw Error();
|
|
673
795
|
} catch (A) {
|
|
674
|
-
var
|
|
675
|
-
|
|
796
|
+
var h = A.stack.trim().match(/\n( *(at )?)/);
|
|
797
|
+
le = h && h[1] || "";
|
|
676
798
|
}
|
|
677
799
|
return `
|
|
678
|
-
` +
|
|
800
|
+
` + le + e;
|
|
679
801
|
}
|
|
680
802
|
}
|
|
681
|
-
var
|
|
803
|
+
var fe = !1, Q;
|
|
682
804
|
{
|
|
683
|
-
var
|
|
684
|
-
|
|
805
|
+
var ht = typeof WeakMap == "function" ? WeakMap : Map;
|
|
806
|
+
Q = new ht();
|
|
685
807
|
}
|
|
686
|
-
function
|
|
687
|
-
if (!e ||
|
|
808
|
+
function Pe(e, o) {
|
|
809
|
+
if (!e || fe)
|
|
688
810
|
return "";
|
|
689
811
|
{
|
|
690
|
-
var
|
|
691
|
-
if (
|
|
692
|
-
return
|
|
812
|
+
var u = Q.get(e);
|
|
813
|
+
if (u !== void 0)
|
|
814
|
+
return u;
|
|
693
815
|
}
|
|
694
|
-
var
|
|
695
|
-
|
|
816
|
+
var h;
|
|
817
|
+
fe = !0;
|
|
696
818
|
var A = Error.prepareStackTrace;
|
|
697
819
|
Error.prepareStackTrace = void 0;
|
|
698
820
|
var S;
|
|
699
|
-
S =
|
|
821
|
+
S = ce.current, ce.current = null, dt();
|
|
700
822
|
try {
|
|
701
823
|
if (o) {
|
|
702
824
|
var b = function() {
|
|
@@ -710,14 +832,14 @@ function Kt() {
|
|
|
710
832
|
try {
|
|
711
833
|
Reflect.construct(b, []);
|
|
712
834
|
} catch (F) {
|
|
713
|
-
|
|
835
|
+
h = F;
|
|
714
836
|
}
|
|
715
837
|
Reflect.construct(e, [], b);
|
|
716
838
|
} else {
|
|
717
839
|
try {
|
|
718
840
|
b.call();
|
|
719
841
|
} catch (F) {
|
|
720
|
-
|
|
842
|
+
h = F;
|
|
721
843
|
}
|
|
722
844
|
e.call(b.prototype);
|
|
723
845
|
}
|
|
@@ -725,80 +847,80 @@ function Kt() {
|
|
|
725
847
|
try {
|
|
726
848
|
throw Error();
|
|
727
849
|
} catch (F) {
|
|
728
|
-
|
|
850
|
+
h = F;
|
|
729
851
|
}
|
|
730
852
|
e();
|
|
731
853
|
}
|
|
732
854
|
} catch (F) {
|
|
733
|
-
if (F &&
|
|
855
|
+
if (F && h && typeof F.stack == "string") {
|
|
734
856
|
for (var w = F.stack.split(`
|
|
735
|
-
`),
|
|
736
|
-
`), M = w.length - 1, I =
|
|
857
|
+
`), O = h.stack.split(`
|
|
858
|
+
`), M = w.length - 1, I = O.length - 1; M >= 1 && I >= 0 && w[M] !== O[I]; )
|
|
737
859
|
I--;
|
|
738
860
|
for (; M >= 1 && I >= 0; M--, I--)
|
|
739
|
-
if (w[M] !==
|
|
861
|
+
if (w[M] !== O[I]) {
|
|
740
862
|
if (M !== 1 || I !== 1)
|
|
741
863
|
do
|
|
742
|
-
if (M--, I--, I < 0 || w[M] !==
|
|
864
|
+
if (M--, I--, I < 0 || w[M] !== O[I]) {
|
|
743
865
|
var D = `
|
|
744
866
|
` + w[M].replace(" at new ", " at ");
|
|
745
|
-
return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
867
|
+
return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, D), D;
|
|
746
868
|
}
|
|
747
869
|
while (M >= 1 && I >= 0);
|
|
748
870
|
break;
|
|
749
871
|
}
|
|
750
872
|
}
|
|
751
873
|
} finally {
|
|
752
|
-
|
|
874
|
+
fe = !1, ce.current = S, pt(), Error.prepareStackTrace = A;
|
|
753
875
|
}
|
|
754
|
-
var
|
|
755
|
-
return typeof e == "function" &&
|
|
876
|
+
var Y = e ? e.displayName || e.name : "", H = Y ? Z(Y) : "";
|
|
877
|
+
return typeof e == "function" && Q.set(e, H), H;
|
|
756
878
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
879
|
+
function gt(e, o, u) {
|
|
880
|
+
return Pe(e, !1);
|
|
759
881
|
}
|
|
760
|
-
function
|
|
882
|
+
function mt(e) {
|
|
761
883
|
var o = e.prototype;
|
|
762
884
|
return !!(o && o.isReactComponent);
|
|
763
885
|
}
|
|
764
|
-
function
|
|
886
|
+
function ee(e, o, u) {
|
|
765
887
|
if (e == null)
|
|
766
888
|
return "";
|
|
767
889
|
if (typeof e == "function")
|
|
768
|
-
return
|
|
890
|
+
return Pe(e, mt(e));
|
|
769
891
|
if (typeof e == "string")
|
|
770
|
-
return
|
|
892
|
+
return Z(e);
|
|
771
893
|
switch (e) {
|
|
772
|
-
case
|
|
773
|
-
return
|
|
774
|
-
case
|
|
775
|
-
return
|
|
894
|
+
case v:
|
|
895
|
+
return Z("Suspense");
|
|
896
|
+
case c:
|
|
897
|
+
return Z("SuspenseList");
|
|
776
898
|
}
|
|
777
899
|
if (typeof e == "object")
|
|
778
900
|
switch (e.$$typeof) {
|
|
779
901
|
case l:
|
|
780
|
-
return
|
|
781
|
-
case
|
|
782
|
-
return
|
|
783
|
-
case
|
|
784
|
-
var
|
|
902
|
+
return gt(e.render);
|
|
903
|
+
case g:
|
|
904
|
+
return ee(e.type, o, u);
|
|
905
|
+
case f: {
|
|
906
|
+
var h = e, A = h._payload, S = h._init;
|
|
785
907
|
try {
|
|
786
|
-
return
|
|
908
|
+
return ee(S(A), o, u);
|
|
787
909
|
} catch {
|
|
788
910
|
}
|
|
789
911
|
}
|
|
790
912
|
}
|
|
791
913
|
return "";
|
|
792
914
|
}
|
|
793
|
-
var J = Object.prototype.hasOwnProperty,
|
|
794
|
-
function
|
|
915
|
+
var J = Object.prototype.hasOwnProperty, Oe = {}, Fe = x.ReactDebugCurrentFrame;
|
|
916
|
+
function te(e) {
|
|
795
917
|
if (e) {
|
|
796
|
-
var o = e._owner,
|
|
797
|
-
|
|
918
|
+
var o = e._owner, u = ee(e.type, e._source, o ? o.type : null);
|
|
919
|
+
Fe.setExtraStackFrame(u);
|
|
798
920
|
} else
|
|
799
|
-
|
|
921
|
+
Fe.setExtraStackFrame(null);
|
|
800
922
|
}
|
|
801
|
-
function
|
|
923
|
+
function _t(e, o, u, h, A) {
|
|
802
924
|
{
|
|
803
925
|
var S = Function.call.bind(J);
|
|
804
926
|
for (var b in e)
|
|
@@ -806,48 +928,48 @@ function Kt() {
|
|
|
806
928
|
var w = void 0;
|
|
807
929
|
try {
|
|
808
930
|
if (typeof e[b] != "function") {
|
|
809
|
-
var
|
|
810
|
-
throw
|
|
931
|
+
var O = Error((h || "React class") + ": " + u + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
932
|
+
throw O.name = "Invariant Violation", O;
|
|
811
933
|
}
|
|
812
|
-
w = e[b](o, b,
|
|
934
|
+
w = e[b](o, b, h, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
813
935
|
} catch (M) {
|
|
814
936
|
w = M;
|
|
815
937
|
}
|
|
816
|
-
w && !(w instanceof Error) && (
|
|
938
|
+
w && !(w instanceof Error) && (te(A), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", u, b, typeof w), te(null)), w instanceof Error && !(w.message in Oe) && (Oe[w.message] = !0, te(A), _("Failed %s type: %s", u, w.message), te(null));
|
|
817
939
|
}
|
|
818
940
|
}
|
|
819
941
|
}
|
|
820
|
-
var
|
|
821
|
-
function
|
|
822
|
-
return
|
|
942
|
+
var vt = Array.isArray;
|
|
943
|
+
function de(e) {
|
|
944
|
+
return vt(e);
|
|
823
945
|
}
|
|
824
|
-
function
|
|
946
|
+
function yt(e) {
|
|
825
947
|
{
|
|
826
|
-
var o = typeof Symbol == "function" && Symbol.toStringTag,
|
|
827
|
-
return
|
|
948
|
+
var o = typeof Symbol == "function" && Symbol.toStringTag, u = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
949
|
+
return u;
|
|
828
950
|
}
|
|
829
951
|
}
|
|
830
|
-
function
|
|
952
|
+
function Et(e) {
|
|
831
953
|
try {
|
|
832
|
-
return
|
|
954
|
+
return De(e), !1;
|
|
833
955
|
} catch {
|
|
834
956
|
return !0;
|
|
835
957
|
}
|
|
836
958
|
}
|
|
837
|
-
function
|
|
959
|
+
function De(e) {
|
|
838
960
|
return "" + e;
|
|
839
961
|
}
|
|
840
|
-
function
|
|
841
|
-
if (
|
|
842
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
962
|
+
function $e(e) {
|
|
963
|
+
if (Et(e))
|
|
964
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yt(e)), De(e);
|
|
843
965
|
}
|
|
844
|
-
var
|
|
966
|
+
var Le = x.ReactCurrentOwner, wt = {
|
|
845
967
|
key: !0,
|
|
846
968
|
ref: !0,
|
|
847
969
|
__self: !0,
|
|
848
970
|
__source: !0
|
|
849
|
-
},
|
|
850
|
-
function
|
|
971
|
+
}, Ue, Ve;
|
|
972
|
+
function bt(e) {
|
|
851
973
|
if (J.call(e, "ref")) {
|
|
852
974
|
var o = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
853
975
|
if (o && o.isReactWarning)
|
|
@@ -855,7 +977,7 @@ function Kt() {
|
|
|
855
977
|
}
|
|
856
978
|
return e.ref !== void 0;
|
|
857
979
|
}
|
|
858
|
-
function
|
|
980
|
+
function xt(e) {
|
|
859
981
|
if (J.call(e, "key")) {
|
|
860
982
|
var o = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
861
983
|
if (o && o.isReactWarning)
|
|
@@ -863,39 +985,39 @@ function Kt() {
|
|
|
863
985
|
}
|
|
864
986
|
return e.key !== void 0;
|
|
865
987
|
}
|
|
866
|
-
function xt(e, o) {
|
|
867
|
-
typeof e.ref == "string" && De.current;
|
|
868
|
-
}
|
|
869
988
|
function At(e, o) {
|
|
989
|
+
typeof e.ref == "string" && Le.current;
|
|
990
|
+
}
|
|
991
|
+
function St(e, o) {
|
|
870
992
|
{
|
|
871
|
-
var
|
|
872
|
-
|
|
993
|
+
var u = function() {
|
|
994
|
+
Ue || (Ue = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", o));
|
|
873
995
|
};
|
|
874
|
-
|
|
875
|
-
get:
|
|
996
|
+
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
997
|
+
get: u,
|
|
876
998
|
configurable: !0
|
|
877
999
|
});
|
|
878
1000
|
}
|
|
879
1001
|
}
|
|
880
|
-
function
|
|
1002
|
+
function Rt(e, o) {
|
|
881
1003
|
{
|
|
882
|
-
var
|
|
883
|
-
|
|
1004
|
+
var u = function() {
|
|
1005
|
+
Ve || (Ve = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", o));
|
|
884
1006
|
};
|
|
885
|
-
|
|
886
|
-
get:
|
|
1007
|
+
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
1008
|
+
get: u,
|
|
887
1009
|
configurable: !0
|
|
888
1010
|
});
|
|
889
1011
|
}
|
|
890
1012
|
}
|
|
891
|
-
var
|
|
1013
|
+
var Tt = function(e, o, u, h, A, S, b) {
|
|
892
1014
|
var w = {
|
|
893
1015
|
// This tag allows us to uniquely identify this as a React Element
|
|
894
1016
|
$$typeof: r,
|
|
895
1017
|
// Built-in properties that belong on the element
|
|
896
1018
|
type: e,
|
|
897
1019
|
key: o,
|
|
898
|
-
ref:
|
|
1020
|
+
ref: u,
|
|
899
1021
|
props: b,
|
|
900
1022
|
// Record the component responsible for creating this element.
|
|
901
1023
|
_owner: S
|
|
@@ -909,7 +1031,7 @@ function Kt() {
|
|
|
909
1031
|
configurable: !1,
|
|
910
1032
|
enumerable: !1,
|
|
911
1033
|
writable: !1,
|
|
912
|
-
value:
|
|
1034
|
+
value: h
|
|
913
1035
|
}), Object.defineProperty(w, "_source", {
|
|
914
1036
|
configurable: !1,
|
|
915
1037
|
enumerable: !1,
|
|
@@ -917,41 +1039,41 @@ function Kt() {
|
|
|
917
1039
|
value: A
|
|
918
1040
|
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
919
1041
|
};
|
|
920
|
-
function
|
|
1042
|
+
function Ct(e, o, u, h, A) {
|
|
921
1043
|
{
|
|
922
|
-
var S, b = {}, w = null,
|
|
923
|
-
|
|
1044
|
+
var S, b = {}, w = null, O = null;
|
|
1045
|
+
u !== void 0 && ($e(u), w = "" + u), xt(o) && ($e(o.key), w = "" + o.key), bt(o) && (O = o.ref, At(o, A));
|
|
924
1046
|
for (S in o)
|
|
925
|
-
J.call(o, S) && !
|
|
1047
|
+
J.call(o, S) && !wt.hasOwnProperty(S) && (b[S] = o[S]);
|
|
926
1048
|
if (e && e.defaultProps) {
|
|
927
1049
|
var M = e.defaultProps;
|
|
928
1050
|
for (S in M)
|
|
929
1051
|
b[S] === void 0 && (b[S] = M[S]);
|
|
930
1052
|
}
|
|
931
|
-
if (w ||
|
|
1053
|
+
if (w || O) {
|
|
932
1054
|
var I = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
933
|
-
w &&
|
|
1055
|
+
w && St(b, I), O && Rt(b, I);
|
|
934
1056
|
}
|
|
935
|
-
return
|
|
1057
|
+
return Tt(e, w, O, A, h, Le.current, b);
|
|
936
1058
|
}
|
|
937
1059
|
}
|
|
938
|
-
var
|
|
939
|
-
function
|
|
1060
|
+
var pe = x.ReactCurrentOwner, Be = x.ReactDebugCurrentFrame;
|
|
1061
|
+
function G(e) {
|
|
940
1062
|
if (e) {
|
|
941
|
-
var o = e._owner,
|
|
942
|
-
|
|
1063
|
+
var o = e._owner, u = ee(e.type, e._source, o ? o.type : null);
|
|
1064
|
+
Be.setExtraStackFrame(u);
|
|
943
1065
|
} else
|
|
944
|
-
|
|
1066
|
+
Be.setExtraStackFrame(null);
|
|
945
1067
|
}
|
|
946
|
-
var
|
|
947
|
-
|
|
948
|
-
function
|
|
1068
|
+
var he;
|
|
1069
|
+
he = !1;
|
|
1070
|
+
function ge(e) {
|
|
949
1071
|
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
950
1072
|
}
|
|
951
|
-
function
|
|
1073
|
+
function We() {
|
|
952
1074
|
{
|
|
953
|
-
if (
|
|
954
|
-
var e =
|
|
1075
|
+
if (pe.current) {
|
|
1076
|
+
var e = V(pe.current.type);
|
|
955
1077
|
if (e)
|
|
956
1078
|
return `
|
|
957
1079
|
|
|
@@ -960,161 +1082,161 @@ Check the render method of \`` + e + "`.";
|
|
|
960
1082
|
return "";
|
|
961
1083
|
}
|
|
962
1084
|
}
|
|
963
|
-
function
|
|
1085
|
+
function kt(e) {
|
|
964
1086
|
return "";
|
|
965
1087
|
}
|
|
966
|
-
var
|
|
967
|
-
function
|
|
1088
|
+
var ze = {};
|
|
1089
|
+
function Mt(e) {
|
|
968
1090
|
{
|
|
969
|
-
var o =
|
|
1091
|
+
var o = We();
|
|
970
1092
|
if (!o) {
|
|
971
|
-
var
|
|
972
|
-
|
|
1093
|
+
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
1094
|
+
u && (o = `
|
|
973
1095
|
|
|
974
|
-
Check the top-level render call using <` +
|
|
1096
|
+
Check the top-level render call using <` + u + ">.");
|
|
975
1097
|
}
|
|
976
1098
|
return o;
|
|
977
1099
|
}
|
|
978
1100
|
}
|
|
979
|
-
function
|
|
1101
|
+
function He(e, o) {
|
|
980
1102
|
{
|
|
981
1103
|
if (!e._store || e._store.validated || e.key != null)
|
|
982
1104
|
return;
|
|
983
1105
|
e._store.validated = !0;
|
|
984
|
-
var
|
|
985
|
-
if (
|
|
1106
|
+
var u = Mt(o);
|
|
1107
|
+
if (ze[u])
|
|
986
1108
|
return;
|
|
987
|
-
|
|
988
|
-
var
|
|
989
|
-
e && e._owner && e._owner !==
|
|
1109
|
+
ze[u] = !0;
|
|
1110
|
+
var h = "";
|
|
1111
|
+
e && e._owner && e._owner !== pe.current && (h = " It was passed a child from " + V(e._owner.type) + "."), G(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, h), G(null);
|
|
990
1112
|
}
|
|
991
1113
|
}
|
|
992
|
-
function
|
|
1114
|
+
function Ge(e, o) {
|
|
993
1115
|
{
|
|
994
1116
|
if (typeof e != "object")
|
|
995
1117
|
return;
|
|
996
|
-
if (
|
|
997
|
-
for (var
|
|
998
|
-
var
|
|
999
|
-
|
|
1118
|
+
if (de(e))
|
|
1119
|
+
for (var u = 0; u < e.length; u++) {
|
|
1120
|
+
var h = e[u];
|
|
1121
|
+
ge(h) && He(h, o);
|
|
1000
1122
|
}
|
|
1001
|
-
else if (
|
|
1123
|
+
else if (ge(e))
|
|
1002
1124
|
e._store && (e._store.validated = !0);
|
|
1003
1125
|
else if (e) {
|
|
1004
1126
|
var A = T(e);
|
|
1005
1127
|
if (typeof A == "function" && A !== e.entries)
|
|
1006
1128
|
for (var S = A.call(e), b; !(b = S.next()).done; )
|
|
1007
|
-
|
|
1129
|
+
ge(b.value) && He(b.value, o);
|
|
1008
1130
|
}
|
|
1009
1131
|
}
|
|
1010
1132
|
}
|
|
1011
|
-
function
|
|
1133
|
+
function It(e) {
|
|
1012
1134
|
{
|
|
1013
1135
|
var o = e.type;
|
|
1014
1136
|
if (o == null || typeof o == "string")
|
|
1015
1137
|
return;
|
|
1016
|
-
var
|
|
1138
|
+
var u;
|
|
1017
1139
|
if (typeof o == "function")
|
|
1018
|
-
|
|
1140
|
+
u = o.propTypes;
|
|
1019
1141
|
else if (typeof o == "object" && (o.$$typeof === l || // Note: Memo only checks outer props here.
|
|
1020
1142
|
// Inner props are checked in the reconciler.
|
|
1021
|
-
o.$$typeof ===
|
|
1022
|
-
|
|
1143
|
+
o.$$typeof === g))
|
|
1144
|
+
u = o.propTypes;
|
|
1023
1145
|
else
|
|
1024
1146
|
return;
|
|
1025
|
-
if (
|
|
1026
|
-
var
|
|
1027
|
-
|
|
1028
|
-
} else if (o.PropTypes !== void 0 && !
|
|
1029
|
-
|
|
1030
|
-
var A =
|
|
1147
|
+
if (u) {
|
|
1148
|
+
var h = V(o);
|
|
1149
|
+
_t(u, e.props, "prop", h, e);
|
|
1150
|
+
} else if (o.PropTypes !== void 0 && !he) {
|
|
1151
|
+
he = !0;
|
|
1152
|
+
var A = V(o);
|
|
1031
1153
|
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", A || "Unknown");
|
|
1032
1154
|
}
|
|
1033
1155
|
typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1034
1156
|
}
|
|
1035
1157
|
}
|
|
1036
|
-
function
|
|
1158
|
+
function Nt(e) {
|
|
1037
1159
|
{
|
|
1038
|
-
for (var o = Object.keys(e.props),
|
|
1039
|
-
var
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1160
|
+
for (var o = Object.keys(e.props), u = 0; u < o.length; u++) {
|
|
1161
|
+
var h = o[u];
|
|
1162
|
+
if (h !== "children" && h !== "key") {
|
|
1163
|
+
G(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), G(null);
|
|
1042
1164
|
break;
|
|
1043
1165
|
}
|
|
1044
1166
|
}
|
|
1045
|
-
e.ref !== null && (
|
|
1167
|
+
e.ref !== null && (G(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
|
|
1046
1168
|
}
|
|
1047
1169
|
}
|
|
1048
|
-
var
|
|
1049
|
-
function
|
|
1170
|
+
var Ye = {};
|
|
1171
|
+
function qe(e, o, u, h, A, S) {
|
|
1050
1172
|
{
|
|
1051
|
-
var b =
|
|
1173
|
+
var b = lt(e);
|
|
1052
1174
|
if (!b) {
|
|
1053
1175
|
var w = "";
|
|
1054
1176
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
1055
|
-
var
|
|
1056
|
-
|
|
1177
|
+
var O = kt();
|
|
1178
|
+
O ? w += O : w += We();
|
|
1057
1179
|
var M;
|
|
1058
|
-
e === null ? M = "null" :
|
|
1180
|
+
e === null ? M = "null" : de(e) ? M = "array" : e !== void 0 && e.$$typeof === r ? (M = "<" + (V(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : M = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", M, w);
|
|
1059
1181
|
}
|
|
1060
|
-
var I =
|
|
1182
|
+
var I = Ct(e, o, u, A, S);
|
|
1061
1183
|
if (I == null)
|
|
1062
1184
|
return I;
|
|
1063
1185
|
if (b) {
|
|
1064
1186
|
var D = o.children;
|
|
1065
1187
|
if (D !== void 0)
|
|
1066
|
-
if (
|
|
1067
|
-
if (
|
|
1068
|
-
for (var
|
|
1069
|
-
|
|
1188
|
+
if (h)
|
|
1189
|
+
if (de(D)) {
|
|
1190
|
+
for (var Y = 0; Y < D.length; Y++)
|
|
1191
|
+
Ge(D[Y], e);
|
|
1070
1192
|
Object.freeze && Object.freeze(D);
|
|
1071
1193
|
} else
|
|
1072
1194
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
1073
1195
|
else
|
|
1074
|
-
|
|
1196
|
+
Ge(D, e);
|
|
1075
1197
|
}
|
|
1076
1198
|
if (J.call(o, "key")) {
|
|
1077
|
-
var
|
|
1078
|
-
return
|
|
1079
|
-
}),
|
|
1080
|
-
if (!
|
|
1081
|
-
var
|
|
1199
|
+
var H = V(e), F = Object.keys(o).filter(function($t) {
|
|
1200
|
+
return $t !== "key";
|
|
1201
|
+
}), me = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1202
|
+
if (!Ye[H + me]) {
|
|
1203
|
+
var Dt = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
|
|
1082
1204
|
_(`A props object containing a "key" prop is being spread into JSX:
|
|
1083
1205
|
let props = %s;
|
|
1084
1206
|
<%s {...props} />
|
|
1085
1207
|
React keys must be passed directly to JSX without using spread:
|
|
1086
1208
|
let props = %s;
|
|
1087
|
-
<%s key={someKey} {...props} />`,
|
|
1209
|
+
<%s key={someKey} {...props} />`, me, H, Dt, H), Ye[H + me] = !0;
|
|
1088
1210
|
}
|
|
1089
1211
|
}
|
|
1090
|
-
return e === i ?
|
|
1212
|
+
return e === i ? Nt(I) : It(I), I;
|
|
1091
1213
|
}
|
|
1092
1214
|
}
|
|
1093
|
-
function
|
|
1094
|
-
return
|
|
1215
|
+
function jt(e, o, u) {
|
|
1216
|
+
return qe(e, o, u, !0);
|
|
1095
1217
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return
|
|
1218
|
+
function Pt(e, o, u) {
|
|
1219
|
+
return qe(e, o, u, !1);
|
|
1098
1220
|
}
|
|
1099
|
-
var Ot =
|
|
1100
|
-
|
|
1101
|
-
})()),
|
|
1221
|
+
var Ot = Pt, Ft = jt;
|
|
1222
|
+
X.Fragment = i, X.jsx = Ot, X.jsxs = Ft;
|
|
1223
|
+
})()), X;
|
|
1102
1224
|
}
|
|
1103
|
-
var
|
|
1104
|
-
function
|
|
1105
|
-
return
|
|
1225
|
+
var Qe;
|
|
1226
|
+
function or() {
|
|
1227
|
+
return Qe || (Qe = 1, process.env.NODE_ENV === "production" ? oe.exports = rr() : oe.exports = nr()), oe.exports;
|
|
1106
1228
|
}
|
|
1107
|
-
var
|
|
1108
|
-
const
|
|
1229
|
+
var m = or();
|
|
1230
|
+
const ot = "platform-kit", sr = !1, ve = {
|
|
1109
1231
|
log: (...t) => {
|
|
1110
1232
|
},
|
|
1111
1233
|
warn: (...t) => {
|
|
1112
1234
|
},
|
|
1113
1235
|
error: (...t) => {
|
|
1114
|
-
console.error(`[${
|
|
1236
|
+
console.error(`[${ot}]`, ...t);
|
|
1115
1237
|
}
|
|
1116
1238
|
};
|
|
1117
|
-
class
|
|
1239
|
+
class Cr extends Lt {
|
|
1118
1240
|
hasDispatched = !1;
|
|
1119
1241
|
constructor(r) {
|
|
1120
1242
|
super(r), this.state = { hasError: !1 };
|
|
@@ -1128,7 +1250,7 @@ class Er extends $t {
|
|
|
1128
1250
|
const r = window;
|
|
1129
1251
|
if (r.__MF_NAME__) return r.__MF_NAME__;
|
|
1130
1252
|
}
|
|
1131
|
-
return
|
|
1253
|
+
return ot;
|
|
1132
1254
|
}
|
|
1133
1255
|
/**
|
|
1134
1256
|
* Определить нужно ли показывать детали ошибки
|
|
@@ -1146,7 +1268,7 @@ class Er extends $t {
|
|
|
1146
1268
|
}
|
|
1147
1269
|
} catch {
|
|
1148
1270
|
}
|
|
1149
|
-
return
|
|
1271
|
+
return sr;
|
|
1150
1272
|
}
|
|
1151
1273
|
/**
|
|
1152
1274
|
* Dispatch ошибки в shell
|
|
@@ -1155,7 +1277,7 @@ class Er extends $t {
|
|
|
1155
1277
|
if (this.hasDispatched || typeof window > "u") return;
|
|
1156
1278
|
this.hasDispatched = !0;
|
|
1157
1279
|
const i = this.getMfeName();
|
|
1158
|
-
|
|
1280
|
+
ve.error("ErrorBoundary caught:", r);
|
|
1159
1281
|
try {
|
|
1160
1282
|
window.dispatchEvent(new CustomEvent("mfe-error", {
|
|
1161
1283
|
detail: {
|
|
@@ -1167,8 +1289,8 @@ class Er extends $t {
|
|
|
1167
1289
|
},
|
|
1168
1290
|
bubbles: !0
|
|
1169
1291
|
}));
|
|
1170
|
-
} catch (
|
|
1171
|
-
|
|
1292
|
+
} catch (a) {
|
|
1293
|
+
ve.error("Failed to dispatch mfe-error event:", a);
|
|
1172
1294
|
}
|
|
1173
1295
|
}
|
|
1174
1296
|
/**
|
|
@@ -1181,7 +1303,7 @@ class Er extends $t {
|
|
|
1181
1303
|
* Обработать ошибку
|
|
1182
1304
|
*/
|
|
1183
1305
|
componentDidCatch(r, s) {
|
|
1184
|
-
this.dispatchError(r, s),
|
|
1306
|
+
this.dispatchError(r, s), ve.error("Error info:", s.componentStack);
|
|
1185
1307
|
}
|
|
1186
1308
|
/**
|
|
1187
1309
|
* Копировать ошибку в буфер обмена
|
|
@@ -1213,8 +1335,8 @@ ${this.state.error?.stack}`;
|
|
|
1213
1335
|
*/
|
|
1214
1336
|
render() {
|
|
1215
1337
|
if (this.state.hasError) {
|
|
1216
|
-
const r = this.state.error?.message || "Unknown error", s = this.state.error?.stack || "", i = this.shouldShowDetails(),
|
|
1217
|
-
return /* @__PURE__ */
|
|
1338
|
+
const r = this.state.error?.message || "Unknown error", s = this.state.error?.stack || "", i = this.shouldShowDetails(), a = this.getMfeName();
|
|
1339
|
+
return /* @__PURE__ */ m.jsxs("div", { style: {
|
|
1218
1340
|
padding: "20px",
|
|
1219
1341
|
textAlign: "center",
|
|
1220
1342
|
color: "#d32f2f",
|
|
@@ -1224,12 +1346,12 @@ ${this.state.error?.stack}`;
|
|
|
1224
1346
|
borderRadius: "4px",
|
|
1225
1347
|
margin: "10px"
|
|
1226
1348
|
}, children: [
|
|
1227
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ m.jsxs("h2", { style: { fontSize: "16px", margin: "0 0 8px 0" }, children: [
|
|
1228
1350
|
"⚠️ Ошибка в ",
|
|
1229
|
-
|
|
1351
|
+
a
|
|
1230
1352
|
] }),
|
|
1231
|
-
/* @__PURE__ */
|
|
1232
|
-
i && /* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ m.jsx("p", { style: { fontSize: "12px", margin: 0 }, children: "Произошла ошибка в микрофронтенде. Сообщение отправлено в shell." }),
|
|
1354
|
+
i && /* @__PURE__ */ m.jsxs("details", { style: {
|
|
1233
1355
|
whiteSpace: "pre-wrap",
|
|
1234
1356
|
textAlign: "left",
|
|
1235
1357
|
marginTop: "10px",
|
|
@@ -1237,8 +1359,8 @@ ${this.state.error?.stack}`;
|
|
|
1237
1359
|
padding: "8px",
|
|
1238
1360
|
borderRadius: "4px"
|
|
1239
1361
|
}, children: [
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
/* @__PURE__ */
|
|
1362
|
+
/* @__PURE__ */ m.jsx("summary", { style: { cursor: "pointer", fontWeight: "bold" }, children: "Детали ошибки" }),
|
|
1363
|
+
/* @__PURE__ */ m.jsxs("pre", { style: {
|
|
1242
1364
|
fontSize: "11px",
|
|
1243
1365
|
overflow: "auto",
|
|
1244
1366
|
maxHeight: "150px",
|
|
@@ -1253,8 +1375,8 @@ ${this.state.error?.stack}`;
|
|
|
1253
1375
|
${s}`
|
|
1254
1376
|
] })
|
|
1255
1377
|
] }),
|
|
1256
|
-
/* @__PURE__ */
|
|
1257
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ m.jsxs("div", { style: { marginTop: "12px", display: "flex", gap: "8px", justifyContent: "center" }, children: [
|
|
1379
|
+
/* @__PURE__ */ m.jsx(
|
|
1258
1380
|
"button",
|
|
1259
1381
|
{
|
|
1260
1382
|
onClick: this.handleCopy,
|
|
@@ -1269,7 +1391,7 @@ ${s}`
|
|
|
1269
1391
|
children: "📋 Копировать"
|
|
1270
1392
|
}
|
|
1271
1393
|
),
|
|
1272
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ m.jsx(
|
|
1273
1395
|
"button",
|
|
1274
1396
|
{
|
|
1275
1397
|
onClick: this.handleRetry,
|
|
@@ -1284,7 +1406,7 @@ ${s}`
|
|
|
1284
1406
|
children: "🔄 Обновить"
|
|
1285
1407
|
}
|
|
1286
1408
|
),
|
|
1287
|
-
/* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ m.jsx(
|
|
1288
1410
|
"button",
|
|
1289
1411
|
{
|
|
1290
1412
|
onClick: this.handleGoHome,
|
|
@@ -1316,24 +1438,24 @@ const $ = {
|
|
|
1316
1438
|
tags: "🏷️",
|
|
1317
1439
|
spreadsheet: "📊"
|
|
1318
1440
|
};
|
|
1319
|
-
function
|
|
1320
|
-
const { data: r, isLoading: s, error: i } =
|
|
1441
|
+
function kr({ mfeName: t }) {
|
|
1442
|
+
const { data: r, isLoading: s, error: i } = Yt({ mfeName: t }), [a, d] = R(!1);
|
|
1321
1443
|
if (s)
|
|
1322
|
-
return /* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ m.jsxs("span", { className: "text-muted small me-2", children: [
|
|
1445
|
+
/* @__PURE__ */ m.jsx("span", { className: "me-1", children: "⏳" }),
|
|
1324
1446
|
"Загрузка..."
|
|
1325
1447
|
] });
|
|
1326
1448
|
if (i || !r)
|
|
1327
|
-
return /* @__PURE__ */
|
|
1328
|
-
/* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ m.jsxs("span", { className: "text-muted small me-2", title: `Ошибка: ${i || "нет данных"}`, children: [
|
|
1450
|
+
/* @__PURE__ */ m.jsx("span", { className: "me-1", children: "ℹ️" }),
|
|
1329
1451
|
"N/A"
|
|
1330
1452
|
] });
|
|
1331
|
-
const n = r,
|
|
1332
|
-
return n.APP_NAME && l.push({ key: "APP_NAME", value: n.APP_NAME, label: "Приложение", icon: $.apps }), n.BUILD_VERSION && l.push({ key: "BUILD_VERSION", value: n.BUILD_VERSION, label: "Версия", icon: $.tags }), n.IMAGE_VERSION && l.push({ key: "IMAGE_VERSION", value: n.IMAGE_VERSION, label: "Образ", icon: $.storage }), n.GIT_COMMIT && l.push({ key: "GIT_COMMIT", value: n.GIT_COMMIT, label: "Commit", icon: $.spreadsheet }), n.GIT_BRANCH && l.push({ key: "GIT_BRANCH", value: n.GIT_BRANCH, label: "Ветка", icon: $.spreadsheet }), n.CI_COMMIT_AUTHOR && l.push({ key: "CI_COMMIT_AUTHOR", value: n.CI_COMMIT_AUTHOR, label: "Автор", icon: $.user }), n.CI_COMMIT_TIMESTAMP && l.push({ key: "CI_COMMIT_TIMESTAMP", value: n.CI_COMMIT_TIMESTAMP, label: "Дата", icon: $.clock }), n.CI_JOB_URL && l.push({ key: "CI_JOB_URL", value: n.CI_JOB_URL, label: "CI Job", icon: $.link }), n.CI_PIPELINE_URL && l.push({ key: "CI_PIPELINE_URL", value: n.CI_PIPELINE_URL, label: "Pipeline", icon: $.link }), n.CI_COMMIT_MESSAGE && (n.CI_COMMIT_MESSAGE.length > 60 ? n.CI_COMMIT_MESSAGE.substring(0, 57) + "" : n.CI_COMMIT_MESSAGE, l.push({ key: "CI_COMMIT_MESSAGE", value: n.CI_COMMIT_MESSAGE, label: "Сообщение", icon: $.code })), /* @__PURE__ */
|
|
1333
|
-
/* @__PURE__ */
|
|
1453
|
+
const n = r, p = n.BUILD_VERSION || n.IMAGE_VERSION || n.APP_NAME || "N/A", l = [];
|
|
1454
|
+
return n.APP_NAME && l.push({ key: "APP_NAME", value: n.APP_NAME, label: "Приложение", icon: $.apps }), n.BUILD_VERSION && l.push({ key: "BUILD_VERSION", value: n.BUILD_VERSION, label: "Версия", icon: $.tags }), n.IMAGE_VERSION && l.push({ key: "IMAGE_VERSION", value: n.IMAGE_VERSION, label: "Образ", icon: $.storage }), n.GIT_COMMIT && l.push({ key: "GIT_COMMIT", value: n.GIT_COMMIT, label: "Commit", icon: $.spreadsheet }), n.GIT_BRANCH && l.push({ key: "GIT_BRANCH", value: n.GIT_BRANCH, label: "Ветка", icon: $.spreadsheet }), n.CI_COMMIT_AUTHOR && l.push({ key: "CI_COMMIT_AUTHOR", value: n.CI_COMMIT_AUTHOR, label: "Автор", icon: $.user }), n.CI_COMMIT_TIMESTAMP && l.push({ key: "CI_COMMIT_TIMESTAMP", value: n.CI_COMMIT_TIMESTAMP, label: "Дата", icon: $.clock }), n.CI_JOB_URL && l.push({ key: "CI_JOB_URL", value: n.CI_JOB_URL, label: "CI Job", icon: $.link }), n.CI_PIPELINE_URL && l.push({ key: "CI_PIPELINE_URL", value: n.CI_PIPELINE_URL, label: "Pipeline", icon: $.link }), n.CI_COMMIT_MESSAGE && (n.CI_COMMIT_MESSAGE.length > 60 ? n.CI_COMMIT_MESSAGE.substring(0, 57) + "" : n.CI_COMMIT_MESSAGE, l.push({ key: "CI_COMMIT_MESSAGE", value: n.CI_COMMIT_MESSAGE, label: "Сообщение", icon: $.code })), /* @__PURE__ */ m.jsxs("div", { style: { display: "inline-block", position: "relative" }, children: [
|
|
1455
|
+
/* @__PURE__ */ m.jsxs(
|
|
1334
1456
|
"button",
|
|
1335
1457
|
{
|
|
1336
|
-
onClick: () =>
|
|
1458
|
+
onClick: () => d(!a),
|
|
1337
1459
|
style: {
|
|
1338
1460
|
background: "transparent",
|
|
1339
1461
|
border: "none",
|
|
@@ -1345,12 +1467,12 @@ function wr({ mfeName: t }) {
|
|
|
1345
1467
|
},
|
|
1346
1468
|
title: "Информация о версии",
|
|
1347
1469
|
children: [
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ m.jsx("span", { className: "me-1", children: $.info }),
|
|
1471
|
+
/* @__PURE__ */ m.jsx("span", { className: "text-dark", children: p })
|
|
1350
1472
|
]
|
|
1351
1473
|
}
|
|
1352
1474
|
),
|
|
1353
|
-
|
|
1475
|
+
a && /* @__PURE__ */ m.jsxs(
|
|
1354
1476
|
"div",
|
|
1355
1477
|
{
|
|
1356
1478
|
style: {
|
|
@@ -1367,36 +1489,36 @@ function wr({ mfeName: t }) {
|
|
|
1367
1489
|
marginTop: "4px"
|
|
1368
1490
|
},
|
|
1369
1491
|
children: [
|
|
1370
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ m.jsxs("div", { style: {
|
|
1371
1493
|
marginBottom: "12px",
|
|
1372
1494
|
paddingBottom: "8px",
|
|
1373
1495
|
borderBottom: "1px solid #dee2e6",
|
|
1374
1496
|
display: "flex",
|
|
1375
1497
|
alignItems: "center"
|
|
1376
1498
|
}, children: [
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
/* @__PURE__ */
|
|
1499
|
+
/* @__PURE__ */ m.jsx("span", { className: "me-2", children: $.apps }),
|
|
1500
|
+
/* @__PURE__ */ m.jsx("strong", { children: n.APP_NAME || t })
|
|
1379
1501
|
] }),
|
|
1380
|
-
/* @__PURE__ */
|
|
1381
|
-
/* @__PURE__ */
|
|
1382
|
-
/* @__PURE__ */
|
|
1502
|
+
/* @__PURE__ */ m.jsxs("div", { style: { marginBottom: "12px" }, children: [
|
|
1503
|
+
/* @__PURE__ */ m.jsx("span", { className: "text-muted", children: "Версия: " }),
|
|
1504
|
+
/* @__PURE__ */ m.jsx("strong", { children: p })
|
|
1383
1505
|
] }),
|
|
1384
|
-
l.length > 0 && /* @__PURE__ */
|
|
1385
|
-
const E =
|
|
1386
|
-
return /* @__PURE__ */
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
/* @__PURE__ */
|
|
1390
|
-
/* @__PURE__ */
|
|
1506
|
+
l.length > 0 && /* @__PURE__ */ m.jsx("div", { style: { fontSize: "13px" }, children: l.map(({ key: v, value: c, label: g, icon: f }) => {
|
|
1507
|
+
const E = c.length > 40 && (v.includes("URL") || v.includes("MESSAGE")) ? `${c.substring(0, 37)}...` : c;
|
|
1508
|
+
return /* @__PURE__ */ m.jsxs("div", { style: { marginBottom: "8px", display: "flex", alignItems: "flex-start" }, children: [
|
|
1509
|
+
/* @__PURE__ */ m.jsx("span", { className: "me-2", style: { flexShrink: 0 }, children: f }),
|
|
1510
|
+
/* @__PURE__ */ m.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1511
|
+
/* @__PURE__ */ m.jsx("div", { className: "small text-muted", children: g }),
|
|
1512
|
+
/* @__PURE__ */ m.jsx(
|
|
1391
1513
|
"div",
|
|
1392
1514
|
{
|
|
1393
1515
|
className: "font-monospace small text-truncate",
|
|
1394
1516
|
style: { maxWidth: "100%" },
|
|
1395
|
-
title:
|
|
1396
|
-
children:
|
|
1517
|
+
title: c,
|
|
1518
|
+
children: v.includes("URL") ? /* @__PURE__ */ m.jsx(
|
|
1397
1519
|
"a",
|
|
1398
1520
|
{
|
|
1399
|
-
href:
|
|
1521
|
+
href: c,
|
|
1400
1522
|
target: "_blank",
|
|
1401
1523
|
rel: "noopener noreferrer",
|
|
1402
1524
|
style: { color: "#007bff" },
|
|
@@ -1406,10 +1528,10 @@ function wr({ mfeName: t }) {
|
|
|
1406
1528
|
}
|
|
1407
1529
|
)
|
|
1408
1530
|
] })
|
|
1409
|
-
] },
|
|
1531
|
+
] }, v);
|
|
1410
1532
|
}) }),
|
|
1411
|
-
l.length === 0 && /* @__PURE__ */
|
|
1412
|
-
/* @__PURE__ */
|
|
1533
|
+
l.length === 0 && /* @__PURE__ */ m.jsx("div", { className: "text-center text-muted py-2 small", children: "Нет информации о версии" }),
|
|
1534
|
+
/* @__PURE__ */ m.jsx("div", { style: {
|
|
1413
1535
|
marginTop: "12px",
|
|
1414
1536
|
paddingTop: "8px",
|
|
1415
1537
|
borderTop: "1px solid #dee2e6",
|
|
@@ -1417,10 +1539,10 @@ function wr({ mfeName: t }) {
|
|
|
1417
1539
|
fontSize: "12px",
|
|
1418
1540
|
color: "#6c757d"
|
|
1419
1541
|
}, children: "IngoBank DevOps Platform" }),
|
|
1420
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ m.jsx(
|
|
1421
1543
|
"button",
|
|
1422
1544
|
{
|
|
1423
|
-
onClick: () =>
|
|
1545
|
+
onClick: () => d(!1),
|
|
1424
1546
|
style: {
|
|
1425
1547
|
position: "absolute",
|
|
1426
1548
|
top: "8px",
|
|
@@ -1437,10 +1559,10 @@ function wr({ mfeName: t }) {
|
|
|
1437
1559
|
]
|
|
1438
1560
|
}
|
|
1439
1561
|
),
|
|
1440
|
-
|
|
1562
|
+
a && /* @__PURE__ */ m.jsx(
|
|
1441
1563
|
"div",
|
|
1442
1564
|
{
|
|
1443
|
-
onClick: () =>
|
|
1565
|
+
onClick: () => d(!1),
|
|
1444
1566
|
style: {
|
|
1445
1567
|
position: "fixed",
|
|
1446
1568
|
top: 0,
|
|
@@ -1453,64 +1575,64 @@ function wr({ mfeName: t }) {
|
|
|
1453
1575
|
)
|
|
1454
1576
|
] });
|
|
1455
1577
|
}
|
|
1456
|
-
const
|
|
1457
|
-
function
|
|
1458
|
-
const [r, s] = R([]), i = typeof window < "u" && window.__MF_NAME__ ||
|
|
1578
|
+
const Ee = "platform-kit", st = Ut(null);
|
|
1579
|
+
function Mr({ children: t }) {
|
|
1580
|
+
const [r, s] = R([]), i = typeof window < "u" && window.__MF_NAME__ || Ee, a = C((f, E, y, N) => ({
|
|
1459
1581
|
id: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
1460
|
-
type:
|
|
1582
|
+
type: f,
|
|
1461
1583
|
title: E,
|
|
1462
|
-
message:
|
|
1584
|
+
message: y,
|
|
1463
1585
|
mfeName: i,
|
|
1464
1586
|
timestamp: Date.now(),
|
|
1465
1587
|
duration: N
|
|
1466
|
-
}), [i]),
|
|
1467
|
-
s((
|
|
1468
|
-
const E =
|
|
1588
|
+
}), [i]), d = C((f) => {
|
|
1589
|
+
s((y) => [...y, f].slice(0, 5));
|
|
1590
|
+
const E = f.duration || 5e3;
|
|
1469
1591
|
E > 0 && setTimeout(() => {
|
|
1470
|
-
s((
|
|
1592
|
+
s((y) => y.filter((N) => N.id !== f.id));
|
|
1471
1593
|
}, E);
|
|
1472
|
-
}, []), n = C((
|
|
1473
|
-
const E =
|
|
1474
|
-
|
|
1594
|
+
}, []), n = C((f) => {
|
|
1595
|
+
const E = a(f.type, f.title, f.message, f.duration);
|
|
1596
|
+
d(E), typeof window < "u" && window.dispatchEvent(new CustomEvent("mfe-notification", {
|
|
1475
1597
|
detail: E,
|
|
1476
1598
|
bubbles: !0
|
|
1477
1599
|
}));
|
|
1478
|
-
}, [
|
|
1479
|
-
n({ type: "success", title: E, message:
|
|
1480
|
-
}, [n]), l = C((
|
|
1481
|
-
n({ type: "error", title: E, message:
|
|
1482
|
-
}, [n]),
|
|
1483
|
-
n({ type: "warning", title: E, message:
|
|
1484
|
-
}, [n]),
|
|
1485
|
-
n({ type: "info", title: E, message:
|
|
1486
|
-
}, [n]),
|
|
1487
|
-
s((E) => E.filter((
|
|
1600
|
+
}, [a, d]), p = C((f, E = "Успешно") => {
|
|
1601
|
+
n({ type: "success", title: E, message: f });
|
|
1602
|
+
}, [n]), l = C((f, E = "Ошибка") => {
|
|
1603
|
+
n({ type: "error", title: E, message: f });
|
|
1604
|
+
}, [n]), v = C((f, E = "Предупреждение") => {
|
|
1605
|
+
n({ type: "warning", title: E, message: f });
|
|
1606
|
+
}, [n]), c = C((f, E = "Информация") => {
|
|
1607
|
+
n({ type: "info", title: E, message: f });
|
|
1608
|
+
}, [n]), g = C((f) => {
|
|
1609
|
+
s((E) => E.filter((y) => y.id !== f));
|
|
1488
1610
|
}, []);
|
|
1489
|
-
return
|
|
1611
|
+
return U(() => {
|
|
1490
1612
|
if (typeof window > "u") return;
|
|
1491
|
-
const
|
|
1492
|
-
const
|
|
1493
|
-
if (
|
|
1613
|
+
const f = (E) => {
|
|
1614
|
+
const y = E.detail;
|
|
1615
|
+
if (y && y.type && y.title && y.message) {
|
|
1494
1616
|
const N = {
|
|
1495
|
-
...
|
|
1617
|
+
...y,
|
|
1496
1618
|
id: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
|
|
1497
1619
|
};
|
|
1498
|
-
|
|
1620
|
+
d(N);
|
|
1499
1621
|
}
|
|
1500
1622
|
};
|
|
1501
|
-
return window.addEventListener("mfe-notification",
|
|
1502
|
-
window.removeEventListener("mfe-notification",
|
|
1623
|
+
return window.addEventListener("mfe-notification", f), () => {
|
|
1624
|
+
window.removeEventListener("mfe-notification", f);
|
|
1503
1625
|
};
|
|
1504
|
-
}, [
|
|
1626
|
+
}, [d]), /* @__PURE__ */ m.jsxs(st.Provider, { value: {
|
|
1505
1627
|
notify: n,
|
|
1506
|
-
notifySuccess:
|
|
1628
|
+
notifySuccess: p,
|
|
1507
1629
|
notifyError: l,
|
|
1508
|
-
notifyWarning:
|
|
1509
|
-
notifyInfo:
|
|
1510
|
-
removeNotification:
|
|
1630
|
+
notifyWarning: v,
|
|
1631
|
+
notifyInfo: c,
|
|
1632
|
+
removeNotification: g
|
|
1511
1633
|
}, children: [
|
|
1512
1634
|
t,
|
|
1513
|
-
r.length > 0 && /* @__PURE__ */
|
|
1635
|
+
r.length > 0 && /* @__PURE__ */ m.jsx(
|
|
1514
1636
|
"div",
|
|
1515
1637
|
{
|
|
1516
1638
|
style: {
|
|
@@ -1525,31 +1647,31 @@ function br({ children: t }) {
|
|
|
1525
1647
|
gap: "8px",
|
|
1526
1648
|
pointerEvents: "none"
|
|
1527
1649
|
},
|
|
1528
|
-
children: r.map((
|
|
1650
|
+
children: r.map((f) => /* @__PURE__ */ m.jsxs(
|
|
1529
1651
|
"div",
|
|
1530
1652
|
{
|
|
1531
|
-
className: `notification notification-${
|
|
1653
|
+
className: `notification notification-${f.type}`,
|
|
1532
1654
|
style: {
|
|
1533
1655
|
pointerEvents: "auto",
|
|
1534
1656
|
padding: "12px 16px",
|
|
1535
1657
|
borderRadius: "8px",
|
|
1536
|
-
background:
|
|
1537
|
-
color:
|
|
1658
|
+
background: f.type === "success" ? "#d4edda" : f.type === "error" ? "#f8d7da" : f.type === "warning" ? "#fff3cd" : "#d1ecf1",
|
|
1659
|
+
color: f.type === "success" ? "#155724" : f.type === "error" ? "#721c24" : f.type === "warning" ? "#856404" : "#0c5460",
|
|
1538
1660
|
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
1539
1661
|
display: "flex",
|
|
1540
1662
|
alignItems: "flex-start",
|
|
1541
1663
|
gap: "12px"
|
|
1542
1664
|
},
|
|
1543
1665
|
children: [
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
/* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ m.jsxs("div", { style: { flex: 1 }, children: [
|
|
1667
|
+
/* @__PURE__ */ m.jsx("strong", { style: { display: "block", marginBottom: "4px" }, children: f.title }),
|
|
1668
|
+
/* @__PURE__ */ m.jsx("p", { style: { margin: 0, fontSize: "14px" }, children: f.message }),
|
|
1669
|
+
/* @__PURE__ */ m.jsx("small", { style: { opacity: 0.7, fontSize: "12px" }, children: f.mfeName })
|
|
1548
1670
|
] }),
|
|
1549
|
-
/* @__PURE__ */
|
|
1671
|
+
/* @__PURE__ */ m.jsx(
|
|
1550
1672
|
"button",
|
|
1551
1673
|
{
|
|
1552
|
-
onClick: () =>
|
|
1674
|
+
onClick: () => g(f.id),
|
|
1553
1675
|
style: {
|
|
1554
1676
|
background: "transparent",
|
|
1555
1677
|
border: "none",
|
|
@@ -1563,14 +1685,14 @@ function br({ children: t }) {
|
|
|
1563
1685
|
)
|
|
1564
1686
|
]
|
|
1565
1687
|
},
|
|
1566
|
-
|
|
1688
|
+
f.id
|
|
1567
1689
|
))
|
|
1568
1690
|
}
|
|
1569
1691
|
)
|
|
1570
1692
|
] });
|
|
1571
1693
|
}
|
|
1572
|
-
function
|
|
1573
|
-
const t =
|
|
1694
|
+
function Ir() {
|
|
1695
|
+
const t = Vt(st);
|
|
1574
1696
|
return t || {
|
|
1575
1697
|
notify: () => {
|
|
1576
1698
|
},
|
|
@@ -1586,9 +1708,9 @@ function xr() {
|
|
|
1586
1708
|
}
|
|
1587
1709
|
};
|
|
1588
1710
|
}
|
|
1589
|
-
function
|
|
1711
|
+
function Nr(t) {
|
|
1590
1712
|
if (typeof window > "u") return;
|
|
1591
|
-
const r = window.__MF_NAME__ ||
|
|
1713
|
+
const r = window.__MF_NAME__ || Ee, s = {
|
|
1592
1714
|
...t,
|
|
1593
1715
|
mfeName: r,
|
|
1594
1716
|
timestamp: Date.now()
|
|
@@ -1598,108 +1720,7 @@ function Ar(t) {
|
|
|
1598
1720
|
bubbles: !0
|
|
1599
1721
|
}));
|
|
1600
1722
|
}
|
|
1601
|
-
|
|
1602
|
-
log: (...t) => {
|
|
1603
|
-
},
|
|
1604
|
-
warn: (...t) => {
|
|
1605
|
-
},
|
|
1606
|
-
error: (...t) => {
|
|
1607
|
-
console.error(`[${ot}]`, ...t);
|
|
1608
|
-
},
|
|
1609
|
-
info: (...t) => {
|
|
1610
|
-
}
|
|
1611
|
-
};
|
|
1612
|
-
function Qt(t) {
|
|
1613
|
-
const r = t.response;
|
|
1614
|
-
let s = "unknown";
|
|
1615
|
-
return r ? r.status === 401 ? s = "unauthorized" : r.status === 403 ? s = "forbidden" : r.status === 404 ? s = "not_found" : r.status >= 500 && (s = "server") : s = "network", {
|
|
1616
|
-
message: r?.data?.message ?? t.message ?? "Unknown error",
|
|
1617
|
-
code: r?.data?.code,
|
|
1618
|
-
status: r?.status,
|
|
1619
|
-
type: s,
|
|
1620
|
-
timestamp: Date.now(),
|
|
1621
|
-
url: t.config?.url
|
|
1622
|
-
};
|
|
1623
|
-
}
|
|
1624
|
-
const er = 3, tr = 1e3;
|
|
1625
|
-
function rr(t) {
|
|
1626
|
-
return !t || t >= 500 || t === 429;
|
|
1627
|
-
}
|
|
1628
|
-
function nr(t) {
|
|
1629
|
-
return new Promise((r) => setTimeout(r, t));
|
|
1630
|
-
}
|
|
1631
|
-
function or(t = {}) {
|
|
1632
|
-
const r = t.name || ot, s = t.retries ?? er, i = t.retryDelay ?? tr, c = {
|
|
1633
|
-
log: (...n) => ne.log(`[API:${r}]`, ...n),
|
|
1634
|
-
warn: (...n) => ne.warn(`[API:${r}]`, ...n),
|
|
1635
|
-
error: (...n) => ne.error(`[API:${r}]`, ...n),
|
|
1636
|
-
info: (...n) => ne.info(`[API:${r}]`, ...n)
|
|
1637
|
-
}, p = Vt.create({
|
|
1638
|
-
timeout: t.timeout ?? 1e4,
|
|
1639
|
-
baseURL: t.baseURL ?? "",
|
|
1640
|
-
headers: {
|
|
1641
|
-
"Content-Type": "application/json"
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
return p.interceptors.request.use(
|
|
1645
|
-
(n) => {
|
|
1646
|
-
const m = Bt();
|
|
1647
|
-
if (m?.isAuthenticated) {
|
|
1648
|
-
const l = m.user?.profile?.access_token;
|
|
1649
|
-
l && n.headers && (n.headers.Authorization = `Bearer ${l}`, c.info("Auth token attached"));
|
|
1650
|
-
} else
|
|
1651
|
-
c.info("User not authenticated - request without token");
|
|
1652
|
-
return c.log(`${n.method?.toUpperCase()} ${n.url}`), n;
|
|
1653
|
-
},
|
|
1654
|
-
(n) => (c.error("Request interceptor error:", n.message), Promise.reject(n))
|
|
1655
|
-
), p.interceptors.response.use(
|
|
1656
|
-
(n) => (c.log(`Response ${n.status}:`, n.config.url), n),
|
|
1657
|
-
async (n) => {
|
|
1658
|
-
const m = n.response?.status, l = n.config?.url, y = n.config?._retryCount ?? 0;
|
|
1659
|
-
if (rr(m) && y < s) {
|
|
1660
|
-
const f = n.config;
|
|
1661
|
-
f._retryCount = y + 1;
|
|
1662
|
-
const h = i * Math.pow(2, y);
|
|
1663
|
-
return c.warn(`Retrying (${f._retryCount}/${s}) after ${h}ms:`, l), await nr(h), p.request(f);
|
|
1664
|
-
}
|
|
1665
|
-
return m === 401 ? (c.warn("401 Unauthorized - triggering re-auth"), Wt()) : m === 403 ? c.warn("403 Forbidden - insufficient permissions") : m === 404 ? c.warn("404 Not found:", l) : m === 429 ? c.warn("429 Rate limited") : m === 500 ? c.error("500 Server error:", l) : n.response ? c.warn(`Error ${m}:`, n.message) : c.error("Network error - backend may be unavailable:", l), Promise.reject(Qt(n));
|
|
1666
|
-
}
|
|
1667
|
-
), p;
|
|
1668
|
-
}
|
|
1669
|
-
const ae = or();
|
|
1670
|
-
async function Sr(t, r, s = ae) {
|
|
1671
|
-
const i = await s.get(t, { params: r });
|
|
1672
|
-
return {
|
|
1673
|
-
data: i.data,
|
|
1674
|
-
status: i.status,
|
|
1675
|
-
ok: i.status >= 200 && i.status < 300
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
async function Rr(t, r, s = ae) {
|
|
1679
|
-
const i = await s.post(t, r);
|
|
1680
|
-
return {
|
|
1681
|
-
data: i.data,
|
|
1682
|
-
status: i.status,
|
|
1683
|
-
ok: i.status >= 200 && i.status < 300
|
|
1684
|
-
};
|
|
1685
|
-
}
|
|
1686
|
-
async function Tr(t, r, s = ae) {
|
|
1687
|
-
const i = await s.put(t, r);
|
|
1688
|
-
return {
|
|
1689
|
-
data: i.data,
|
|
1690
|
-
status: i.status,
|
|
1691
|
-
ok: i.status >= 200 && i.status < 300
|
|
1692
|
-
};
|
|
1693
|
-
}
|
|
1694
|
-
async function Cr(t, r = ae) {
|
|
1695
|
-
const s = await r.delete(t);
|
|
1696
|
-
return {
|
|
1697
|
-
data: s.data,
|
|
1698
|
-
status: s.status,
|
|
1699
|
-
ok: s.status >= 200 && s.status < 300
|
|
1700
|
-
};
|
|
1701
|
-
}
|
|
1702
|
-
function ie(t, r) {
|
|
1723
|
+
function ue(t, r) {
|
|
1703
1724
|
const s = r?.prefix ? `[${r.prefix}]` : `[${t}]`;
|
|
1704
1725
|
return {
|
|
1705
1726
|
log: (...i) => {
|
|
@@ -1713,7 +1734,7 @@ function ie(t, r) {
|
|
|
1713
1734
|
}
|
|
1714
1735
|
};
|
|
1715
1736
|
}
|
|
1716
|
-
const
|
|
1737
|
+
const jr = ue("platform-kit", { prefix: "AUTH" }), Pr = ue("platform-kit", { prefix: "API" }), Or = ue("platform-kit", { prefix: "ERROR" }), Fr = ue("platform-kit", { prefix: "INFO" }), ar = {}, ir = {
|
|
1717
1738
|
log: (...t) => {
|
|
1718
1739
|
},
|
|
1719
1740
|
warn: (...t) => {
|
|
@@ -1722,15 +1743,15 @@ const kr = ie("platform-kit", { prefix: "AUTH" }), Mr = ie("platform-kit", { pre
|
|
|
1722
1743
|
console.error("[getMfeName]", ...t);
|
|
1723
1744
|
}
|
|
1724
1745
|
};
|
|
1725
|
-
function
|
|
1746
|
+
function be(t) {
|
|
1726
1747
|
return t ? t.mfeName ? t.mfeName : t.name ? t.name.replace("@ib-dop/", "") : null : null;
|
|
1727
1748
|
}
|
|
1728
|
-
function
|
|
1749
|
+
function at() {
|
|
1729
1750
|
if (typeof window > "u") return null;
|
|
1730
1751
|
const t = window;
|
|
1731
1752
|
return t.__MF_NAME__ ? t.__MF_NAME__ : null;
|
|
1732
1753
|
}
|
|
1733
|
-
function
|
|
1754
|
+
function it() {
|
|
1734
1755
|
if (typeof window > "u") return null;
|
|
1735
1756
|
try {
|
|
1736
1757
|
const t = sessionStorage.getItem("mf-config");
|
|
@@ -1744,81 +1765,85 @@ function at() {
|
|
|
1744
1765
|
}
|
|
1745
1766
|
return null;
|
|
1746
1767
|
}
|
|
1747
|
-
function
|
|
1748
|
-
const t =
|
|
1768
|
+
function xe() {
|
|
1769
|
+
const t = ar;
|
|
1749
1770
|
return t.VITE_MFE_NAME ? String(t.VITE_MFE_NAME) : t.MFE_NAME ? String(t.MFE_NAME) : null;
|
|
1750
1771
|
}
|
|
1751
|
-
let
|
|
1752
|
-
function
|
|
1753
|
-
const s =
|
|
1772
|
+
let se = null, we = !1;
|
|
1773
|
+
function ur(t, r) {
|
|
1774
|
+
const s = be(t);
|
|
1754
1775
|
if (s)
|
|
1755
1776
|
return s;
|
|
1756
|
-
if (
|
|
1757
|
-
return
|
|
1777
|
+
if (we && se)
|
|
1778
|
+
return se;
|
|
1758
1779
|
const i = [
|
|
1759
|
-
{ source: "window.__MF_NAME__", value:
|
|
1760
|
-
{ source: "sessionStorage.mf-config", value:
|
|
1761
|
-
{ source: "import.meta.env.VITE_MFE_NAME", value:
|
|
1780
|
+
{ source: "window.__MF_NAME__", value: at() },
|
|
1781
|
+
{ source: "sessionStorage.mf-config", value: it() },
|
|
1782
|
+
{ source: "import.meta.env.VITE_MFE_NAME", value: xe() }
|
|
1762
1783
|
];
|
|
1763
|
-
for (const { source:
|
|
1784
|
+
for (const { source: d, value: n } of i)
|
|
1764
1785
|
if (n)
|
|
1765
|
-
return
|
|
1786
|
+
return se = n, we = !0, n;
|
|
1766
1787
|
if (r)
|
|
1767
1788
|
return r;
|
|
1768
|
-
const
|
|
1769
|
-
throw
|
|
1789
|
+
const a = "Cannot determine MFE name. Please pass mfeName in props, set window.__MF_NAME__, sessionStorage.mf-config, or VITE_MFE_NAME";
|
|
1790
|
+
throw ir.error(a), new Error(a);
|
|
1770
1791
|
}
|
|
1771
|
-
function
|
|
1772
|
-
return
|
|
1792
|
+
function Dr(t) {
|
|
1793
|
+
return ur(t);
|
|
1773
1794
|
}
|
|
1774
|
-
function
|
|
1775
|
-
return
|
|
1795
|
+
function cr(t) {
|
|
1796
|
+
return be(t) ? "props.mfeName" : at() ? "window.__MF_NAME__" : it() ? "sessionStorage.mf-config" : xe() ? "import.meta.env.VITE_MFE_NAME" : null;
|
|
1776
1797
|
}
|
|
1777
|
-
function
|
|
1778
|
-
return
|
|
1798
|
+
function $r(t) {
|
|
1799
|
+
return cr(t) !== null;
|
|
1779
1800
|
}
|
|
1780
|
-
function
|
|
1781
|
-
|
|
1801
|
+
function Lr() {
|
|
1802
|
+
se = null, we = !1;
|
|
1782
1803
|
}
|
|
1783
|
-
function
|
|
1804
|
+
function Ur(t) {
|
|
1784
1805
|
const r = [];
|
|
1785
|
-
return
|
|
1806
|
+
return be(t) && r.push("props.mfeName"), typeof window < "u" && (window.__MF_NAME__ && r.push("window.__MF_NAME__"), sessionStorage.getItem("mf-config") && r.push("sessionStorage.mf-config")), xe() && r.push("import.meta.env.VITE_MFE_NAME"), r;
|
|
1786
1807
|
}
|
|
1787
1808
|
export {
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1809
|
+
Cr as ErrorBoundary,
|
|
1810
|
+
Mr as NotificationProvider,
|
|
1811
|
+
kr as VersionInfo,
|
|
1812
|
+
W as api,
|
|
1813
|
+
Pr as apiLogger,
|
|
1814
|
+
jr as authLogger,
|
|
1815
|
+
Qt as createApiClient,
|
|
1816
|
+
ue as createMfLogger,
|
|
1817
|
+
yr as del,
|
|
1818
|
+
Nr as dispatchNotification,
|
|
1819
|
+
Or as errorLogger,
|
|
1820
|
+
mr as get,
|
|
1821
|
+
dr as getAccessToken,
|
|
1822
|
+
Ur as getAllMfeNameSources,
|
|
1823
|
+
Wt as getAuthState,
|
|
1824
|
+
ur as getMfeName,
|
|
1825
|
+
cr as getMfeNameSource,
|
|
1826
|
+
B as getShellAuth,
|
|
1827
|
+
$r as hasMfeName,
|
|
1828
|
+
Fr as infoLogger,
|
|
1829
|
+
pr as isAuthenticated,
|
|
1830
|
+
hr as logout,
|
|
1831
|
+
_r as post,
|
|
1832
|
+
vr as put,
|
|
1833
|
+
zt as redirectToLogin,
|
|
1834
|
+
Dr as requireMfeName,
|
|
1835
|
+
Lr as resetMfeNameCache,
|
|
1836
|
+
ie as useApi,
|
|
1837
|
+
xr as useDel,
|
|
1838
|
+
Rr as useFeatureAdmin,
|
|
1839
|
+
Sr as useFeatures,
|
|
1840
|
+
Er as useGet,
|
|
1841
|
+
Yt as useInfoData,
|
|
1842
|
+
Tr as useMicrofrontendsFeatures,
|
|
1843
|
+
Ir as useNotification,
|
|
1844
|
+
Ar as usePermissions,
|
|
1845
|
+
wr as usePost,
|
|
1846
|
+
br as usePut,
|
|
1847
|
+
ae as useShellAuth,
|
|
1848
|
+
gr as useV1Config
|
|
1824
1849
|
};
|