@ibdop/platform-kit 1.0.10 → 1.0.12

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