@tracktor/shared-module 0.14.1 → 0.15.0
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/CHANGELOG.md +2 -2
- package/dist/components/Utils/SentryConfig.d.ts +15 -1
- package/dist/main.js +135 -133
- package/dist/main.umd.cjs +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,14 @@ interface SentryConfigProps<T> {
|
|
|
22
22
|
* ignored.
|
|
23
23
|
*/
|
|
24
24
|
tracesSampleRate: number;
|
|
25
|
+
/**
|
|
26
|
+
* Sample rate to determine session sampling.
|
|
27
|
+
*/
|
|
28
|
+
replaysOnErrorSampleRate: number;
|
|
29
|
+
/**
|
|
30
|
+
* Sample rate to determine session sampling.
|
|
31
|
+
*/
|
|
32
|
+
replaysSessionSampleRate: number;
|
|
25
33
|
}) => void;
|
|
26
34
|
BrowserTracing: any;
|
|
27
35
|
};
|
|
@@ -29,12 +37,18 @@ interface SentryConfigProps<T> {
|
|
|
29
37
|
* Sentry DSN
|
|
30
38
|
*/
|
|
31
39
|
dsn: string;
|
|
40
|
+
/**
|
|
41
|
+
* List of integrations that should be installed after SDK was initialized.
|
|
42
|
+
* Accepts either a list of integrations or a function that receives default integrations and returns a new, updated list.
|
|
43
|
+
*/
|
|
44
|
+
integrations?: any[];
|
|
32
45
|
}
|
|
33
46
|
/**
|
|
34
47
|
* This component is used to initialize Sentry
|
|
35
48
|
* @param dsn
|
|
36
49
|
* @param sentry
|
|
50
|
+
* @param integrations
|
|
37
51
|
* @constructor
|
|
38
52
|
*/
|
|
39
|
-
declare const SentryConfig: <T extends unknown>({ dsn, sentry }: SentryConfigProps<T>) => null;
|
|
53
|
+
declare const SentryConfig: <T extends unknown>({ dsn, sentry, integrations }: SentryConfigProps<T>) => null;
|
|
40
54
|
export default SentryConfig;
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Le, { createContext as pr, useMemo as ue, useContext as se, useState as gr, useLayoutEffect as X, Suspense as
|
|
1
|
+
import Le, { createContext as pr, useMemo as ue, useContext as se, useState as gr, useLayoutEffect as X, Suspense as mr, useEffect as hr, useCallback as J } from "react";
|
|
2
2
|
var ie = { exports: {} }, W = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -14,18 +14,18 @@ function Er() {
|
|
|
14
14
|
if ($e)
|
|
15
15
|
return W;
|
|
16
16
|
$e = 1;
|
|
17
|
-
var n = Le, a = Symbol.for("react.element"),
|
|
18
|
-
function s(
|
|
17
|
+
var n = Le, a = Symbol.for("react.element"), i = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, u = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function s(m, f, b) {
|
|
19
19
|
var E, w = {}, T = null, C = null;
|
|
20
|
-
|
|
20
|
+
b !== void 0 && (T = "" + b), f.key !== void 0 && (T = "" + f.key), f.ref !== void 0 && (C = f.ref);
|
|
21
21
|
for (E in f)
|
|
22
22
|
l.call(f, E) && !g.hasOwnProperty(E) && (w[E] = f[E]);
|
|
23
|
-
if (
|
|
24
|
-
for (E in f =
|
|
23
|
+
if (m && m.defaultProps)
|
|
24
|
+
for (E in f = m.defaultProps, f)
|
|
25
25
|
w[E] === void 0 && (w[E] = f[E]);
|
|
26
|
-
return { $$typeof: a, type:
|
|
26
|
+
return { $$typeof: a, type: m, key: T, ref: C, props: w, _owner: u.current };
|
|
27
27
|
}
|
|
28
|
-
return W.Fragment =
|
|
28
|
+
return W.Fragment = i, W.jsx = s, W.jsxs = s, W;
|
|
29
29
|
}
|
|
30
30
|
var M = {};
|
|
31
31
|
/**
|
|
@@ -38,9 +38,9 @@ var M = {};
|
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
40
|
var Ie;
|
|
41
|
-
function
|
|
41
|
+
function yr() {
|
|
42
42
|
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var n = Le, a = Symbol.for("react.element"),
|
|
43
|
+
var n = Le, a = Symbol.for("react.element"), i = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), m = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), A = Symbol.iterator, k = "@@iterator";
|
|
44
44
|
function N(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
@@ -59,16 +59,16 @@ function br() {
|
|
|
59
59
|
{
|
|
60
60
|
var o = S.ReactDebugCurrentFrame, p = o.getStackAddendum();
|
|
61
61
|
p !== "" && (r += "%s", t = t.concat([p]));
|
|
62
|
-
var
|
|
62
|
+
var h = t.map(function(d) {
|
|
63
63
|
return String(d);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
var ce = !1, Y = !1, We = !1, Me = !1, Ne = !1, fe;
|
|
69
69
|
fe = Symbol.for("react.module.reference");
|
|
70
70
|
function Ye(e) {
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === l || e === g || Ne || e ===
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === l || e === g || Ne || e === u || e === b || e === E || Me || e === C || ce || Y || We || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === w || e.$$typeof === s || e.$$typeof === m || e.$$typeof === f || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
@@ -94,20 +94,20 @@ function br() {
|
|
|
94
94
|
switch (e) {
|
|
95
95
|
case l:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case i:
|
|
98
98
|
return "Portal";
|
|
99
99
|
case g:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case u:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case b:
|
|
104
104
|
return "Suspense";
|
|
105
105
|
case E:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
|
-
case
|
|
110
|
+
case m:
|
|
111
111
|
var r = e;
|
|
112
112
|
return de(r) + ".Consumer";
|
|
113
113
|
case s:
|
|
@@ -119,9 +119,9 @@ function br() {
|
|
|
119
119
|
var o = e.displayName || null;
|
|
120
120
|
return o !== null ? o : j(e.type) || "Memo";
|
|
121
121
|
case T: {
|
|
122
|
-
var p = e,
|
|
122
|
+
var p = e, h = p._payload, d = p._init;
|
|
123
123
|
try {
|
|
124
|
-
return j(d(
|
|
124
|
+
return j(d(h));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,18 +129,18 @@ function br() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var D = Object.assign, I = 0, ve, pe, ge,
|
|
133
|
-
function
|
|
132
|
+
var D = Object.assign, I = 0, ve, pe, ge, me, he, Ee, ye;
|
|
133
|
+
function Re() {
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
Re.__reactDisabledLog = !0;
|
|
136
136
|
function qe() {
|
|
137
137
|
{
|
|
138
138
|
if (I === 0) {
|
|
139
|
-
ve = console.log, pe = console.info, ge = console.warn,
|
|
139
|
+
ve = console.log, pe = console.info, ge = console.warn, me = console.error, he = console.group, Ee = console.groupCollapsed, ye = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: Re,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -175,16 +175,16 @@ function br() {
|
|
|
175
175
|
value: ge
|
|
176
176
|
}),
|
|
177
177
|
error: D({}, e, {
|
|
178
|
-
value:
|
|
178
|
+
value: me
|
|
179
179
|
}),
|
|
180
180
|
group: D({}, e, {
|
|
181
|
-
value:
|
|
181
|
+
value: he
|
|
182
182
|
}),
|
|
183
183
|
groupCollapsed: D({}, e, {
|
|
184
184
|
value: Ee
|
|
185
185
|
}),
|
|
186
186
|
groupEnd: D({}, e, {
|
|
187
|
-
value:
|
|
187
|
+
value: ye
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
@@ -210,7 +210,7 @@ function br() {
|
|
|
210
210
|
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
211
|
q = new Ue();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function be(e, r) {
|
|
214
214
|
if (!e || Q)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
@@ -222,8 +222,8 @@ function br() {
|
|
|
222
222
|
Q = !0;
|
|
223
223
|
var p = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var h;
|
|
226
|
+
h = Z.current, Z.current = null, qe();
|
|
227
227
|
try {
|
|
228
228
|
if (r) {
|
|
229
229
|
var d = function() {
|
|
@@ -260,29 +260,29 @@ function br() {
|
|
|
260
260
|
if (P && o && typeof P.stack == "string") {
|
|
261
261
|
for (var c = P.stack.split(`
|
|
262
262
|
`), _ = o.stack.split(`
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (c[
|
|
267
|
-
if (
|
|
263
|
+
`), y = c.length - 1, R = _.length - 1; y >= 1 && R >= 0 && c[y] !== _[R]; )
|
|
264
|
+
R--;
|
|
265
|
+
for (; y >= 1 && R >= 0; y--, R--)
|
|
266
|
+
if (c[y] !== _[R]) {
|
|
267
|
+
if (y !== 1 || R !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
269
|
+
if (y--, R--, R < 0 || c[y] !== _[R]) {
|
|
270
270
|
var O = `
|
|
271
|
-
` + c[
|
|
271
|
+
` + c[y].replace(" at new ", " at ");
|
|
272
272
|
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, O), O;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (y >= 1 && R >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
Q = !1, Z.current =
|
|
279
|
+
Q = !1, Z.current = h, ze(), Error.prepareStackTrace = p;
|
|
280
280
|
}
|
|
281
281
|
var $ = e ? e.displayName || e.name : "", Fe = $ ? V($) : "";
|
|
282
282
|
return typeof e == "function" && q.set(e, Fe), Fe;
|
|
283
283
|
}
|
|
284
284
|
function Be(e, r, t) {
|
|
285
|
-
return
|
|
285
|
+
return be(e, !1);
|
|
286
286
|
}
|
|
287
287
|
function Ge(e) {
|
|
288
288
|
var r = e.prototype;
|
|
@@ -292,11 +292,11 @@ function br() {
|
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return be(e, Ge(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
297
|
return V(e);
|
|
298
298
|
switch (e) {
|
|
299
|
-
case
|
|
299
|
+
case b:
|
|
300
300
|
return V("Suspense");
|
|
301
301
|
case E:
|
|
302
302
|
return V("SuspenseList");
|
|
@@ -308,9 +308,9 @@ function br() {
|
|
|
308
308
|
case w:
|
|
309
309
|
return z(e.type, r, t);
|
|
310
310
|
case T: {
|
|
311
|
-
var o = e, p = o._payload,
|
|
311
|
+
var o = e, p = o._payload, h = o._init;
|
|
312
312
|
try {
|
|
313
|
-
return z(
|
|
313
|
+
return z(h(p), r, t);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
@@ -327,9 +327,9 @@ function br() {
|
|
|
327
327
|
}
|
|
328
328
|
function Je(e, r, t, o, p) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
330
|
+
var h = Function.call.bind(U);
|
|
331
331
|
for (var d in e)
|
|
332
|
-
if (
|
|
332
|
+
if (h(e, d)) {
|
|
333
333
|
var c = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof e[d] != "function") {
|
|
@@ -337,8 +337,8 @@ function br() {
|
|
|
337
337
|
throw _.name = "Invariant Violation", _;
|
|
338
338
|
}
|
|
339
339
|
c = e[d](r, d, o, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (
|
|
341
|
-
c =
|
|
340
|
+
} catch (y) {
|
|
341
|
+
c = y;
|
|
342
342
|
}
|
|
343
343
|
c && !(c instanceof Error) && (B(p), v("%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).", o || "React class", t, d, typeof c), B(null)), c instanceof Error && !(c.message in _e) && (_e[c.message] = !0, B(p), v("Failed %s type: %s", t, c.message), B(null));
|
|
344
344
|
}
|
|
@@ -419,7 +419,7 @@ function br() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var ar = function(e, r, t, o, p,
|
|
422
|
+
var ar = function(e, r, t, o, p, h, d) {
|
|
423
423
|
var c = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: a,
|
|
@@ -429,7 +429,7 @@ function br() {
|
|
|
429
429
|
ref: t,
|
|
430
430
|
props: d,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
432
|
+
_owner: h
|
|
433
433
|
};
|
|
434
434
|
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
@@ -450,18 +450,18 @@ function br() {
|
|
|
450
450
|
};
|
|
451
451
|
function or(e, r, t, o, p) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
453
|
+
var h, d = {}, c = null, _ = null;
|
|
454
454
|
t !== void 0 && (Te(t), c = "" + t), er(r) && (Te(r.key), c = "" + r.key), Qe(r) && (_ = r.ref, rr(r, p));
|
|
455
|
-
for (
|
|
456
|
-
U.call(r,
|
|
455
|
+
for (h in r)
|
|
456
|
+
U.call(r, h) && !Ke.hasOwnProperty(h) && (d[h] = r[h]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (
|
|
460
|
-
d[
|
|
458
|
+
var y = e.defaultProps;
|
|
459
|
+
for (h in y)
|
|
460
|
+
d[h] === void 0 && (d[h] = y[h]);
|
|
461
461
|
}
|
|
462
462
|
if (c || _) {
|
|
463
|
-
var
|
|
464
|
-
c && tr(d,
|
|
463
|
+
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
+
c && tr(d, R), _ && nr(d, R);
|
|
465
465
|
}
|
|
466
466
|
return ar(e, c, _, p, o, L.current, d);
|
|
467
467
|
}
|
|
@@ -542,7 +542,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
542
542
|
else if (e) {
|
|
543
543
|
var p = N(e);
|
|
544
544
|
if (typeof p == "function" && p !== e.entries)
|
|
545
|
-
for (var
|
|
545
|
+
for (var h = p.call(e), d; !(d = h.next()).done; )
|
|
546
546
|
ae(d.value) && Ae(d.value, r);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
@@ -584,7 +584,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
584
584
|
e.ref !== null && (F(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function De(e, r, t, o, p,
|
|
587
|
+
function De(e, r, t, o, p, h) {
|
|
588
588
|
{
|
|
589
589
|
var d = Ye(e);
|
|
590
590
|
if (!d) {
|
|
@@ -592,12 +592,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
592
592
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
593
593
|
var _ = ir(p);
|
|
594
594
|
_ ? c += _ : c += Pe();
|
|
595
|
-
var
|
|
596
|
-
e === null ?
|
|
595
|
+
var y;
|
|
596
|
+
e === null ? y = "null" : ee(e) ? y = "array" : e !== void 0 && e.$$typeof === a ? (y = "<" + (j(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, c);
|
|
597
597
|
}
|
|
598
|
-
var
|
|
599
|
-
if (
|
|
600
|
-
return
|
|
598
|
+
var R = or(e, r, t, p, h);
|
|
599
|
+
if (R == null)
|
|
600
|
+
return R;
|
|
601
601
|
if (d) {
|
|
602
602
|
var O = r.children;
|
|
603
603
|
if (O !== void 0)
|
|
@@ -611,7 +611,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
611
611
|
else
|
|
612
612
|
ke(O, e);
|
|
613
613
|
}
|
|
614
|
-
return e === l ? lr(
|
|
614
|
+
return e === l ? lr(R) : sr(R), R;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
function cr(e, r, t) {
|
|
@@ -624,7 +624,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
624
624
|
M.Fragment = l, M.jsx = dr, M.jsxs = vr;
|
|
625
625
|
}()), M;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ? ie.exports = Er() : ie.exports =
|
|
627
|
+
process.env.NODE_ENV === "production" ? ie.exports = Er() : ie.exports = yr();
|
|
628
628
|
var x = ie.exports;
|
|
629
629
|
const H = pr({
|
|
630
630
|
axios: void 0,
|
|
@@ -637,91 +637,91 @@ const H = pr({
|
|
|
637
637
|
}), Tr = ({
|
|
638
638
|
axios: n,
|
|
639
639
|
children: a,
|
|
640
|
-
translate:
|
|
640
|
+
translate: i,
|
|
641
641
|
useAuth: l,
|
|
642
|
-
Outlet:
|
|
642
|
+
Outlet: u,
|
|
643
643
|
Navigate: g,
|
|
644
644
|
useLocation: s,
|
|
645
|
-
useGoogleTagManager:
|
|
645
|
+
useGoogleTagManager: m
|
|
646
646
|
}) => {
|
|
647
647
|
const f = ue(
|
|
648
648
|
() => ({
|
|
649
649
|
axios: n,
|
|
650
650
|
Navigate: g,
|
|
651
|
-
Outlet:
|
|
652
|
-
translate:
|
|
651
|
+
Outlet: u,
|
|
652
|
+
translate: i,
|
|
653
653
|
useAuth: l,
|
|
654
|
-
useGoogleTagManager:
|
|
654
|
+
useGoogleTagManager: m,
|
|
655
655
|
useLocation: s
|
|
656
656
|
}),
|
|
657
|
-
[g,
|
|
657
|
+
[g, u, n, i, l, m, s]
|
|
658
658
|
);
|
|
659
659
|
return /* @__PURE__ */ x.jsx(H.Provider, { value: f, children: a });
|
|
660
660
|
}, G = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Or = ({
|
|
661
661
|
Fallback: n,
|
|
662
662
|
loginPath: a = "/login",
|
|
663
|
-
localStorageKey:
|
|
663
|
+
localStorageKey: i = "user",
|
|
664
664
|
redirect401Path: l = "/login",
|
|
665
|
-
...
|
|
665
|
+
...u
|
|
666
666
|
}) => {
|
|
667
667
|
var A, k, N, S;
|
|
668
668
|
const {
|
|
669
|
-
axios: g =
|
|
670
|
-
useLocation: s =
|
|
671
|
-
useAuth:
|
|
672
|
-
Outlet: f =
|
|
673
|
-
Navigate:
|
|
669
|
+
axios: g = u.axios,
|
|
670
|
+
useLocation: s = u.useLocation,
|
|
671
|
+
useAuth: m = u.useAuth,
|
|
672
|
+
Outlet: f = u.Outlet,
|
|
673
|
+
Navigate: b = u.Navigate
|
|
674
674
|
} = se(H);
|
|
675
|
-
if (
|
|
675
|
+
if (m === void 0)
|
|
676
676
|
throw new Error(G("useAuth"));
|
|
677
677
|
if (s === void 0)
|
|
678
678
|
throw new Error(G("useLocation"));
|
|
679
679
|
if (f === void 0)
|
|
680
680
|
throw new Error(G("Outlet"));
|
|
681
|
-
if (
|
|
681
|
+
if (b === void 0)
|
|
682
682
|
throw new Error(G("Navigate"));
|
|
683
|
-
const [E, w] = gr(null), { isLogged: T } =
|
|
683
|
+
const [E, w] = gr(null), { isLogged: T } = m(), C = s();
|
|
684
684
|
return X(() => {
|
|
685
685
|
g == null || g.interceptors.response.use(
|
|
686
686
|
(v) => v,
|
|
687
687
|
async (v) => {
|
|
688
688
|
var Y;
|
|
689
|
-
return typeof v == "object" && v && "response" in v && v.response && typeof v.response == "object" && "status" in v.response && v.response && typeof v.response == "object" && "status" in v.response && ((Y = v == null ? void 0 : v.response) == null ? void 0 : Y.status) === 401 && (g.defaults.headers.common.Authorization = null, localStorage.removeItem(
|
|
689
|
+
return typeof v == "object" && v && "response" in v && v.response && typeof v.response == "object" && "status" in v.response && v.response && typeof v.response == "object" && "status" in v.response && ((Y = v == null ? void 0 : v.response) == null ? void 0 : Y.status) === 401 && (g.defaults.headers.common.Authorization = null, localStorage.removeItem(i), w(l)), Promise.reject(v);
|
|
690
690
|
}
|
|
691
691
|
);
|
|
692
|
-
}, [g == null ? void 0 : g.defaults, g == null ? void 0 : g.interceptors.response,
|
|
692
|
+
}, [g == null ? void 0 : g.defaults, g == null ? void 0 : g.interceptors.response, i, l]), T && !E ? /* @__PURE__ */ x.jsx(mr, { fallback: n, children: (k = (A = C.state) == null ? void 0 : A.from) != null && k.state && ((S = (N = C.state) == null ? void 0 : N.from) == null ? void 0 : S.pathname) === a ? /* @__PURE__ */ x.jsx(b, { to: C.state.from.state.from.pathname + C.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ x.jsx(f, {}) }) : /* @__PURE__ */ x.jsx(b, { to: a, state: { from: C }, replace: !0 });
|
|
693
693
|
}, oe = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Sr = ({ ...n }) => {
|
|
694
694
|
const {
|
|
695
695
|
useLocation: a = n.useLocation,
|
|
696
|
-
Outlet:
|
|
696
|
+
Outlet: i = n.Outlet,
|
|
697
697
|
useGoogleTagManager: l = n.useGoogleTagManager
|
|
698
698
|
} = se(H);
|
|
699
699
|
if (a === void 0)
|
|
700
700
|
throw new Error(oe("useLocation"));
|
|
701
|
-
if (
|
|
701
|
+
if (i === void 0)
|
|
702
702
|
throw new Error(oe("Outlet"));
|
|
703
703
|
if (l === void 0)
|
|
704
704
|
throw new Error(oe("useGoogleTagManager"));
|
|
705
|
-
const { pathname:
|
|
706
|
-
return
|
|
707
|
-
g({ event: "pageView", pathname:
|
|
708
|
-
}, [
|
|
705
|
+
const { pathname: u } = a(), { sendEvent: g } = l();
|
|
706
|
+
return hr(() => {
|
|
707
|
+
g({ event: "pageView", pathname: u });
|
|
708
|
+
}, [u, g]), /* @__PURE__ */ x.jsx(i, {});
|
|
709
709
|
}, jr = ({
|
|
710
710
|
axios: n,
|
|
711
711
|
baseURL: a,
|
|
712
|
-
tokenTypeKey:
|
|
712
|
+
tokenTypeKey: i = "tokenType",
|
|
713
713
|
userLocalStorageKey: l = "user",
|
|
714
|
-
tokenKey:
|
|
714
|
+
tokenKey: u = "accessToken",
|
|
715
715
|
postContentType: g = "application/json"
|
|
716
716
|
}) => (X(() => {
|
|
717
717
|
if (!n.defaults)
|
|
718
718
|
return;
|
|
719
|
-
const s = localStorage.getItem(l),
|
|
719
|
+
const s = localStorage.getItem(l), m = s ? JSON.parse(s) : null, f = m != null && m[i] ? m[i] : null, b = m != null && m[u] ? m[u] : null, E = s ? `${f} ${b}` : null;
|
|
720
720
|
n.defaults.baseURL = a, n.defaults.headers.post["Content-Type"] = g, E && (n.defaults.headers.common.Authorization = E);
|
|
721
|
-
}, [n.defaults, a, g,
|
|
721
|
+
}, [n.defaults, a, g, u, i, l]), null), Pr = ({
|
|
722
722
|
i18n: n,
|
|
723
723
|
initReactI18next: a,
|
|
724
|
-
resources:
|
|
724
|
+
resources: i,
|
|
725
725
|
LanguageDetector: l
|
|
726
726
|
}) => (n.use(l).use(a).init({
|
|
727
727
|
debug: !1,
|
|
@@ -733,34 +733,36 @@ const H = pr({
|
|
|
733
733
|
react: {
|
|
734
734
|
useSuspense: !0
|
|
735
735
|
},
|
|
736
|
-
resources:
|
|
736
|
+
resources: i,
|
|
737
737
|
returnNull: !1
|
|
738
738
|
}).then(() => {
|
|
739
739
|
document.documentElement.lang !== n.resolvedLanguage && n.resolvedLanguage && document.documentElement.setAttribute("lang", n.resolvedLanguage);
|
|
740
|
-
}), n.on("languageChanged", (
|
|
741
|
-
document.documentElement.setAttribute("lang",
|
|
742
|
-
}), null), xr = ({ dsn: n, sentry: a }) => (X(() => {
|
|
740
|
+
}), n.on("languageChanged", (u) => {
|
|
741
|
+
document.documentElement.setAttribute("lang", u);
|
|
742
|
+
}), null), xr = ({ dsn: n, sentry: a, integrations: i }) => (X(() => {
|
|
743
743
|
process.env.NODE_ENV === "production" && a.init({
|
|
744
744
|
dsn: n,
|
|
745
|
-
integrations: [new a.BrowserTracing()],
|
|
745
|
+
integrations: i || [new a.BrowserTracing()],
|
|
746
|
+
replaysOnErrorSampleRate: 1,
|
|
747
|
+
replaysSessionSampleRate: 0.1,
|
|
746
748
|
tracesSampleRate: 1
|
|
747
749
|
});
|
|
748
|
-
}, [n, a]), null), Ar = ({ IMaskMixin: n, ...a }) => {
|
|
749
|
-
const
|
|
750
|
+
}, [n, i, a]), null), Ar = ({ IMaskMixin: n, ...a }) => {
|
|
751
|
+
const i = ue(
|
|
750
752
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
751
|
-
() => n(({ TextField: l, ...
|
|
753
|
+
() => n(({ TextField: l, ...u }) => /* @__PURE__ */ x.jsx(l, { ...u })),
|
|
752
754
|
[n]
|
|
753
755
|
);
|
|
754
|
-
return /* @__PURE__ */ x.jsx(
|
|
756
|
+
return /* @__PURE__ */ x.jsx(i, { ...a });
|
|
755
757
|
}, kr = ({ mapbox: n, accessToken: a }) => (X(() => {
|
|
756
758
|
n && a && (n.accessToken = a);
|
|
757
759
|
}, [a, n]), null), Dr = ({
|
|
758
760
|
children: n,
|
|
759
761
|
defaultOptions: a,
|
|
760
|
-
QueryClient:
|
|
762
|
+
QueryClient: i,
|
|
761
763
|
QueryClientProvider: l
|
|
762
764
|
}) => {
|
|
763
|
-
const
|
|
765
|
+
const u = new i({
|
|
764
766
|
defaultOptions: {
|
|
765
767
|
queries: {
|
|
766
768
|
refetchOnWindowFocus: !1,
|
|
@@ -769,44 +771,44 @@ const H = pr({
|
|
|
769
771
|
}
|
|
770
772
|
}
|
|
771
773
|
});
|
|
772
|
-
return /* @__PURE__ */ x.jsx(l, { client:
|
|
774
|
+
return /* @__PURE__ */ x.jsx(l, { client: u, children: n });
|
|
773
775
|
}, Fr = (n) => {
|
|
774
|
-
const { unknownErrorTranslationKey: a = "error.unknownError" } = n || {}, { translate:
|
|
776
|
+
const { unknownErrorTranslationKey: a = "error.unknownError" } = n || {}, { translate: i = n == null ? void 0 : n.translate } = se(H);
|
|
775
777
|
return { printError: J(
|
|
776
|
-
(
|
|
777
|
-
var
|
|
778
|
-
const g =
|
|
779
|
-
return
|
|
778
|
+
(u) => {
|
|
779
|
+
var m, f, b, E, w, T, C, A, k;
|
|
780
|
+
const g = i ? i(a) : "Unknown error", { response: s } = u || {};
|
|
781
|
+
return u != null && u.reason ? String(u.reason) : (m = s == null ? void 0 : s.data) != null && m.reason ? String(s.data.reason) : (f = s == null ? void 0 : s.data) != null && f.message ? String(s.data.message) : (E = (b = s == null ? void 0 : s.data) == null ? void 0 : b.detail) != null && E.length && Array.isArray((w = s == null ? void 0 : s.data) == null ? void 0 : w.detail) && ((C = (T = s == null ? void 0 : s.data) == null ? void 0 : T.detail[0]) != null && C.msg) && typeof ((k = (A = s == null ? void 0 : s.data) == null ? void 0 : A.detail[0]) == null ? void 0 : k.msg) == "string" ? String(s.data.detail[0].msg) : g;
|
|
780
782
|
},
|
|
781
|
-
[
|
|
783
|
+
[i, a]
|
|
782
784
|
) };
|
|
783
785
|
}, $r = ({
|
|
784
786
|
data: n,
|
|
785
787
|
fetchNextPage: a,
|
|
786
|
-
isFetchingNextPage:
|
|
788
|
+
isFetchingNextPage: i,
|
|
787
789
|
isInitialLoading: l,
|
|
788
|
-
isLoading:
|
|
790
|
+
isLoading: u,
|
|
789
791
|
enabled: g = !0
|
|
790
792
|
}) => {
|
|
791
793
|
const s = J(
|
|
792
794
|
async (f) => {
|
|
793
|
-
|
|
795
|
+
i || !g || await a({ pageParam: (f == null ? void 0 : f.pageParam) || f.visibleRowsCount });
|
|
794
796
|
},
|
|
795
|
-
[g, a,
|
|
796
|
-
),
|
|
797
|
+
[g, a, i]
|
|
798
|
+
), m = ue(() => {
|
|
797
799
|
if (n)
|
|
798
|
-
return n.pages.reduce((f,
|
|
800
|
+
return n.pages.reduce((f, b) => [...f, ...b], []);
|
|
799
801
|
}, [n]);
|
|
800
802
|
return {
|
|
801
803
|
fetchNextPageOnRowsScrollEnd: s,
|
|
802
|
-
isLoading:
|
|
804
|
+
isLoading: i || u,
|
|
803
805
|
loadingVariant: l ? "skeleton" : "linear",
|
|
804
|
-
rows:
|
|
806
|
+
rows: m
|
|
805
807
|
};
|
|
806
808
|
}, Ir = (n) => {
|
|
807
809
|
const a = J(
|
|
808
|
-
({ tokenType: l, accessToken:
|
|
809
|
-
n.defaults.headers.common.Authorization = `${l} ${
|
|
810
|
+
({ tokenType: l, accessToken: u }) => {
|
|
811
|
+
n.defaults.headers.common.Authorization = `${l} ${u}`;
|
|
810
812
|
},
|
|
811
813
|
[n.defaults.headers.common]
|
|
812
814
|
);
|
|
@@ -816,22 +818,22 @@ const H = pr({
|
|
|
816
818
|
}, [n.defaults.headers.common]),
|
|
817
819
|
setAuthenticationToken: a
|
|
818
820
|
};
|
|
819
|
-
},
|
|
820
|
-
const l = n.split("/").filter((
|
|
821
|
+
}, Rr = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), br = (n) => {
|
|
822
|
+
const l = n.split("/").filter((u) => u.length > 0).map((u) => u.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((f) => f.charAt(0).toUpperCase() + f.slice(1)).join("")).join("");
|
|
821
823
|
return l.charAt(0).toLowerCase() + l.slice(1);
|
|
822
|
-
}, _r = (n, a,
|
|
823
|
-
const l =
|
|
824
|
-
return `${l}${
|
|
824
|
+
}, _r = (n, a, i) => {
|
|
825
|
+
const l = br(a), u = Rr(i);
|
|
826
|
+
return `${l}${u}`;
|
|
825
827
|
}, wr = (n) => {
|
|
826
828
|
if (n)
|
|
827
|
-
return (n == null ? void 0 : n.reduce((a,
|
|
829
|
+
return (n == null ? void 0 : n.reduce((a, i) => (a[i] = {
|
|
828
830
|
query: {
|
|
829
831
|
useInfinite: !0,
|
|
830
832
|
useInfiniteQueryParam: "offset"
|
|
831
833
|
}
|
|
832
834
|
}, a), {})) || {};
|
|
833
835
|
}, Lr = (n) => {
|
|
834
|
-
const { input: a = "./openapi.json", operationsToGenerateInfiniteQueryHook:
|
|
836
|
+
const { input: a = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = n || {};
|
|
835
837
|
return {
|
|
836
838
|
api: {
|
|
837
839
|
hooks: {
|
|
@@ -852,7 +854,7 @@ const H = pr({
|
|
|
852
854
|
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
853
855
|
},
|
|
854
856
|
operationName: _r,
|
|
855
|
-
...(
|
|
857
|
+
...(i == null ? void 0 : i.length) && { operations: wr(i) },
|
|
856
858
|
query: {
|
|
857
859
|
useQuery: !0
|
|
858
860
|
}
|
package/dist/main.umd.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var se;function Ie(){if(se)return W;se=1;var n=E,a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function u(h,f,C){var y,T={},S=null,O=null;C!==void 0&&(S=""+C),f.key!==void 0&&(S=""+f.key),f.ref!==void 0&&(O=f.ref);for(y in f)l.call(f,y)&&!g.hasOwnProperty(y)&&(T[y]=f[y]);if(h&&h.defaultProps)for(y in f=h.defaultProps,f)T[y]===void 0&&(T[y]=f[y]);return{$$typeof:a,type:h,key:S,ref:O,props:T,_owner:s.current}}return W.Fragment=i,W.jsx=u,W.jsxs=u,W}var N={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+ee+e}}var te=!1,X;{var
|
|
17
|
+
*/var ue;function Le(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var n=E,a=Symbol.for("react.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function U(e){if(e===null||typeof e!="object")return null;var t=D&&e[D]||e[F];return typeof t=="function"?t:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];le("error",e,r)}}function le(e,t,r){{var o=k.ReactDebugCurrentFrame,p=o.getStackAddendum();p!==""&&(t+="%s",r=r.concat([p]));var m=r.map(function(d){return String(d)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var ce=!1,G=!1,et=!1,tt=!1,rt=!1,fe;fe=Symbol.for("react.module.reference");function nt(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===g||rt||e===s||e===C||e===y||tt||e===O||ce||G||et||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===T||e.$$typeof===u||e.$$typeof===h||e.$$typeof===f||e.$$typeof===fe||e.getModuleId!==void 0))}function at(e,t,r){var o=e.displayName;if(o)return o;var p=t.displayName||t.name||"";return p!==""?r+"("+p+")":r}function de(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case i:return"Portal";case g:return"Profiler";case s:return"StrictMode";case C:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var t=e;return de(t)+".Consumer";case u:var r=e;return de(r._context)+".Provider";case f:return at(e,e.render,"ForwardRef");case T:var o=e.displayName||null;return o!==null?o:A(e.type)||"Memo";case S:{var p=e,m=p._payload,d=p._init;try{return A(d(m))}catch{return null}}}return null}var I=Object.assign,V=0,ve,pe,ge,he,me,Ee,ye;function be(){}be.__reactDisabledLog=!0;function ot(){{if(V===0){ve=console.log,pe=console.info,ge=console.warn,he=console.error,me=console.group,Ee=console.groupCollapsed,ye=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function it(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:ve}),info:I({},e,{value:pe}),warn:I({},e,{value:ge}),error:I({},e,{value:he}),group:I({},e,{value:me}),groupCollapsed:I({},e,{value:Ee}),groupEnd:I({},e,{value:ye})})}V<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=k.ReactCurrentDispatcher,ee;function J(e,t,r){{if(ee===void 0)try{throw Error()}catch(p){var o=p.stack.trim().match(/\n( *(at )?)/);ee=o&&o[1]||""}return`
|
|
18
|
+
`+ee+e}}var te=!1,X;{var st=typeof WeakMap=="function"?WeakMap:Map;X=new st}function Re(e,t){if(!e||te)return"";{var r=X.get(e);if(r!==void 0)return r}var o;te=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=$.current,$.current=null,ot();try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(x){o=x}Reflect.construct(e,[],d)}else{try{d.call()}catch(x){o=x}e.call(d.prototype)}}else{try{throw Error()}catch(x){o=x}e()}}catch(x){if(x&&o&&typeof x.stack=="string"){for(var c=x.stack.split(`
|
|
19
19
|
`),w=o.stack.split(`
|
|
20
|
-
`),b=
|
|
21
|
-
`+
|
|
20
|
+
`),b=c.length-1,_=w.length-1;b>=1&&_>=0&&c[b]!==w[_];)_--;for(;b>=1&&_>=0;b--,_--)if(c[b]!==w[_]){if(b!==1||_!==1)do if(b--,_--,_<0||c[b]!==w[_]){var j=`
|
|
21
|
+
`+c[b].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,j),j}while(b>=1&&_>=0);break}}}finally{te=!1,$.current=m,it(),Error.prepareStackTrace=p}var M=e?e.displayName||e.name:"",Fe=M?J(M):"";return typeof e=="function"&&X.set(e,Fe),Fe}function ut(e,t,r){return Re(e,!1)}function lt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function H(e,t,r){if(e==null)return"";if(typeof e=="function")return Re(e,lt(e));if(typeof e=="string")return J(e);switch(e){case C:return J("Suspense");case y:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return ut(e.render);case T:return H(e.type,t,r);case S:{var o=e,p=o._payload,m=o._init;try{return H(m(p),t,r)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,_e={},Ce=k.ReactDebugCurrentFrame;function q(e){if(e){var t=e._owner,r=H(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(r)}else Ce.setExtraStackFrame(null)}function ct(e,t,r,o,p){{var m=Function.call.bind(Z);for(var d in e)if(m(e,d)){var c=void 0;try{if(typeof e[d]!="function"){var w=Error((o||"React class")+": "+r+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}c=e[d](t,d,o,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){c=b}c&&!(c instanceof Error)&&(q(p),v("%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).",o||"React class",r,d,typeof c),q(null)),c instanceof Error&&!(c.message in _e)&&(_e[c.message]=!0,q(p),v("Failed %s type: %s",r,c.message),q(null))}}}var ft=Array.isArray;function re(e){return ft(e)}function dt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function vt(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Te(e){if(vt(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dt(e)),we(e)}var z=k.ReactCurrentOwner,pt={key:!0,ref:!0,__self:!0,__source:!0},Oe,Se,ne;ne={};function gt(e){if(Z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function ht(e){if(Z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function mt(e,t){if(typeof e.ref=="string"&&z.current&&t&&z.current.stateNode!==t){var r=A(z.current.type);ne[r]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(z.current.type),e.ref),ne[r]=!0)}}function Et(e,t){{var r=function(){Oe||(Oe=!0,v("%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)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function yt(e,t){{var r=function(){Se||(Se=!0,v("%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)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var bt=function(e,t,r,o,p,m,d){var c={$$typeof:a,type:e,key:t,ref:r,props:d,_owner:m};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function Rt(e,t,r,o,p){{var m,d={},c=null,w=null;r!==void 0&&(Te(r),c=""+r),ht(t)&&(Te(t.key),c=""+t.key),gt(t)&&(w=t.ref,mt(t,p));for(m in t)Z.call(t,m)&&!pt.hasOwnProperty(m)&&(d[m]=t[m]);if(e&&e.defaultProps){var b=e.defaultProps;for(m in b)d[m]===void 0&&(d[m]=b[m])}if(c||w){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&Et(d,_),w&&yt(d,_)}return bt(e,c,w,p,o,z.current,d)}}var ae=k.ReactCurrentOwner,je=k.ReactDebugCurrentFrame;function L(e){if(e){var t=e._owner,r=H(e.type,e._source,t?t.type:null);je.setExtraStackFrame(r)}else je.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Pe(){{if(ae.current){var e=A(ae.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function _t(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+t+":"+r+"."}return""}}var ke={};function Ct(e){{var t=Pe();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+r+">.")}return t}}function Ae(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ct(t);if(ke[r])return;ke[r]=!0;var o="";e&&e._owner&&e._owner!==ae.current&&(o=" It was passed a child from "+A(e._owner.type)+"."),L(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,o),L(null)}}function xe(e,t){{if(typeof e!="object")return;if(re(e))for(var r=0;r<e.length;r++){var o=e[r];ie(o)&&Ae(o,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=U(e);if(typeof p=="function"&&p!==e.entries)for(var m=p.call(e),d;!(d=m.next()).done;)ie(d.value)&&Ae(d.value,t)}}}function wt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===f||t.$$typeof===T))r=t.propTypes;else return;if(r){var o=A(t);
|
|
27
|
+
Check the top-level render call using <`+r+">.")}return t}}function Ae(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ct(t);if(ke[r])return;ke[r]=!0;var o="";e&&e._owner&&e._owner!==ae.current&&(o=" It was passed a child from "+A(e._owner.type)+"."),L(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,o),L(null)}}function xe(e,t){{if(typeof e!="object")return;if(re(e))for(var r=0;r<e.length;r++){var o=e[r];ie(o)&&Ae(o,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=U(e);if(typeof p=="function"&&p!==e.entries)for(var m=p.call(e),d;!(d=m.next()).done;)ie(d.value)&&Ae(d.value,t)}}}function wt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===f||t.$$typeof===T))r=t.propTypes;else return;if(r){var o=A(t);ct(r,e.props,"prop",o,e)}else if(t.PropTypes!==void 0&&!oe){oe=!0;var p=A(t);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Tt(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var o=t[r];if(o!=="children"&&o!=="key"){L(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),L(null);break}}e.ref!==null&&(L(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}function De(e,t,r,o,p,m){{var d=nt(e);if(!d){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=_t(p);w?c+=w:c+=Pe();var b;e===null?b="null":re(e)?b="array":e!==void 0&&e.$$typeof===a?(b="<"+(A(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,c)}var _=Rt(e,t,r,p,m);if(_==null)return _;if(d){var j=t.children;if(j!==void 0)if(o)if(re(j)){for(var M=0;M<j.length;M++)xe(j[M],e);Object.freeze&&Object.freeze(j)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xe(j,e)}return e===l?Tt(_):wt(_),_}}function Ot(e,t,r){return De(e,t,r,!0)}function St(e,t,r){return De(e,t,r,!1)}var jt=St,Pt=Ot;N.Fragment=l,N.jsx=jt,N.jsxs=Pt}()),N}process.env.NODE_ENV==="production"?K.exports=Ie():K.exports=Le();var P=K.exports;const Y=E.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Me=({axios:n,children:a,translate:i,useAuth:l,Outlet:s,Navigate:g,useLocation:u,useGoogleTagManager:h})=>{const f=E.useMemo(()=>({axios:n,Navigate:g,Outlet:s,translate:i,useAuth:l,useGoogleTagManager:h,useLocation:u}),[g,s,n,i,l,h,u]);return P.jsx(Y.Provider,{value:f,children:a})},B=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:a="/login",localStorageKey:i="user",redirect401Path:l="/login",...s})=>{var D,F,U,k;const{axios:g=s.axios,useLocation:u=s.useLocation,useAuth:h=s.useAuth,Outlet:f=s.Outlet,Navigate:C=s.Navigate}=E.useContext(Y);if(h===void 0)throw new Error(B("useAuth"));if(u===void 0)throw new Error(B("useLocation"));if(f===void 0)throw new Error(B("Outlet"));if(C===void 0)throw new Error(B("Navigate"));const[y,T]=E.useState(null),{isLogged:S}=h(),O=u();return E.useLayoutEffect(()=>{g==null||g.interceptors.response.use(v=>v,async v=>{var G;return typeof v=="object"&&v&&"response"in v&&v.response&&typeof v.response=="object"&&"status"in v.response&&v.response&&typeof v.response=="object"&&"status"in v.response&&((G=v==null?void 0:v.response)==null?void 0:G.status)===401&&(g.defaults.headers.common.Authorization=null,localStorage.removeItem(i),T(l)),Promise.reject(v)})},[g==null?void 0:g.defaults,g==null?void 0:g.interceptors.response,i,l]),S&&!y?P.jsx(E.Suspense,{fallback:n,children:(F=(D=O.state)==null?void 0:D.from)!=null&&F.state&&((k=(U=O.state)==null?void 0:U.from)==null?void 0:k.pathname)===a?P.jsx(C,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):P.jsx(f,{})}):P.jsx(C,{to:a,state:{from:O},replace:!0})},Q=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ne=({...n})=>{const{useLocation:a=n.useLocation,Outlet:i=n.Outlet,useGoogleTagManager:l=n.useGoogleTagManager}=E.useContext(Y);if(a===void 0)throw new Error(Q("useLocation"));if(i===void 0)throw new Error(Q("Outlet"));if(l===void 0)throw new Error(Q("useGoogleTagManager"));const{pathname:s}=a(),{sendEvent:g}=l();return E.useEffect(()=>{g({event:"pageView",pathname:s})},[s,g]),P.jsx(i,{})},Ye=({axios:n,baseURL:a,tokenTypeKey:i="tokenType",userLocalStorageKey:l="user",tokenKey:s="accessToken",postContentType:g="application/json"})=>(E.useLayoutEffect(()=>{if(!n.defaults)return;const u=localStorage.getItem(l),h=u?JSON.parse(u):null,f=h!=null&&h[i]?h[i]:null,C=h!=null&&h[s]?h[s]:null,y=u?`${f} ${C}`:null;n.defaults.baseURL=a,n.defaults.headers.post["Content-Type"]=g,y&&(n.defaults.headers.common.Authorization=y)},[n.defaults,a,g,s,i,l]),null),Ve=({i18n:n,initReactI18next:a,resources:i,LanguageDetector:l})=>(n.use(l).use(a).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:i,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",s=>{document.documentElement.setAttribute("lang",s)}),null),ze=({dsn:n,sentry:a,integrations:i})=>(E.useLayoutEffect(()=>{process.env.NODE_ENV==="production"&&a.init({dsn:n,integrations:i||[new a.BrowserTracing],replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,tracesSampleRate:1})},[n,i,a]),null),Be=({IMaskMixin:n,...a})=>{const i=E.useMemo(()=>n(({TextField:l,...s})=>P.jsx(l,{...s})),[n]);return P.jsx(i,{...a})},Ue=({mapbox:n,accessToken:a})=>(E.useLayoutEffect(()=>{n&&a&&(n.accessToken=a)},[a,n]),null),Ge=({children:n,defaultOptions:a,QueryClient:i,QueryClientProvider:l})=>{const s=new i({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...a}}});return P.jsx(l,{client:s,children:n})},Je=n=>{const{unknownErrorTranslationKey:a="error.unknownError"}=n||{},{translate:i=n==null?void 0:n.translate}=E.useContext(Y);return{printError:E.useCallback(s=>{var h,f,C,y,T,S,O,D,F;const g=i?i(a):"Unknown error",{response:u}=s||{};return s!=null&&s.reason?String(s.reason):(h=u==null?void 0:u.data)!=null&&h.reason?String(u.data.reason):(f=u==null?void 0:u.data)!=null&&f.message?String(u.data.message):(y=(C=u==null?void 0:u.data)==null?void 0:C.detail)!=null&&y.length&&Array.isArray((T=u==null?void 0:u.data)==null?void 0:T.detail)&&((O=(S=u==null?void 0:u.data)==null?void 0:S.detail[0])!=null&&O.msg)&&typeof((F=(D=u==null?void 0:u.data)==null?void 0:D.detail[0])==null?void 0:F.msg)=="string"?String(u.data.detail[0].msg):g},[i,a])}},Xe=({data:n,fetchNextPage:a,isFetchingNextPage:i,isInitialLoading:l,isLoading:s,enabled:g=!0})=>{const u=E.useCallback(async f=>{i||!g||await a({pageParam:(f==null?void 0:f.pageParam)||f.visibleRowsCount})},[g,a,i]),h=E.useMemo(()=>{if(n)return n.pages.reduce((f,C)=>[...f,...C],[])},[n]);return{fetchNextPageOnRowsScrollEnd:u,isLoading:i||s,loadingVariant:l?"skeleton":"linear",rows:h}},He=n=>{const a=E.useCallback(({tokenType:l,accessToken:s})=>{n.defaults.headers.common.Authorization=`${l} ${s}`},[n.defaults.headers.common]);return{clearAuthenticationToken:E.useCallback(()=>{n.defaults.headers.common.Authorization=null},[n.defaults.headers.common]),setAuthenticationToken:a}},Ze=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),qe=n=>{const l=n.split("/").filter(s=>s.length>0).map(s=>s.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(f=>f.charAt(0).toUpperCase()+f.slice(1)).join("")).join("");return l.charAt(0).toLowerCase()+l.slice(1)},Ke=(n,a,i)=>{const l=qe(a),s=Ze(i);return`${l}${s}`},Qe=n=>{if(n)return(n==null?void 0:n.reduce((a,i)=>(a[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset"}},a),{}))||{}},$e=n=>{const{input:a="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=n||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:a,output:{client:"react-query",mode:"tags-split",override:{header:l=>["Generated by orval 🍺",...l.title?[l.title]:[],...l.description?[l.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:Ke,...(i==null?void 0:i.length)&&{operations:Qe(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};R.AxiosConfig=Ye,R.GTMSendPageView=Ne,R.I18nConfig=Ve,R.InjectDependenciesContext=Y,R.InjectDependenciesProvider=Me,R.MapBoxConfig=Ue,R.MaskTextField=Be,R.QueryClientConfigProvider=Ge,R.RequireAuth=We,R.SentryConfig=ze,R.getOrvalConfig=$e,R.useAuth=He,R.useInfiniteDataGrid=Xe,R.useResponseError=Je,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|