@tracktor/shared-module 0.11.2 → 0.12.1
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/AxiosConfig.d.ts +15 -1
- package/dist/config/orval/orval.d.ts +3 -0
- package/dist/main.js +278 -273
- package/dist/main.umd.cjs +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,7 @@ interface AxiosConfigProps<T> {
|
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* User local storage key
|
|
20
|
+
* @default user
|
|
20
21
|
*/
|
|
21
22
|
userLocalStorageKey?: string;
|
|
22
23
|
/**
|
|
@@ -25,16 +26,29 @@ interface AxiosConfigProps<T> {
|
|
|
25
26
|
baseURL?: string;
|
|
26
27
|
/**
|
|
27
28
|
* Post content type for Axios instance
|
|
29
|
+
* @default application/json
|
|
28
30
|
*/
|
|
29
31
|
postContentType?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Token type key for Axios instance
|
|
34
|
+
* @default tokenType
|
|
35
|
+
*/
|
|
36
|
+
tokenTypeKey?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Token key for Axios instance
|
|
39
|
+
* @default accessToken
|
|
40
|
+
*/
|
|
41
|
+
tokenKey?: string;
|
|
30
42
|
}
|
|
31
43
|
/**
|
|
32
44
|
* This component initialize Axios instance with custom default config options
|
|
33
45
|
* @param axios
|
|
34
46
|
* @param baseURL
|
|
47
|
+
* @param tokenTypeKey
|
|
35
48
|
* @param userLocalStorageKey
|
|
49
|
+
* @param tokenKey
|
|
36
50
|
* @param postContentType
|
|
37
51
|
* @constructor
|
|
38
52
|
*/
|
|
39
|
-
declare const AxiosConfig: <T extends unknown>({ axios, baseURL, userLocalStorageKey, postContentType, }: AxiosConfigProps<T>) => null;
|
|
53
|
+
declare const AxiosConfig: <T extends unknown>({ axios, baseURL, tokenTypeKey, userLocalStorageKey, tokenKey, postContentType, }: AxiosConfigProps<T>) => null;
|
|
40
54
|
export default AxiosConfig;
|
|
@@ -31,6 +31,9 @@ export declare const getOrvalOperationName: (_: any, route: string, method: stri
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const getOrvalConfig: (config?: CustomOrvalConfig) => {
|
|
33
33
|
readonly api: {
|
|
34
|
+
readonly hooks: {
|
|
35
|
+
readonly afterAllFilesWrite: "prettier src/api/ --write";
|
|
36
|
+
};
|
|
34
37
|
readonly input: string;
|
|
35
38
|
readonly output: {
|
|
36
39
|
readonly client: "react-query";
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Ie, { createContext as pr, useMemo as ie, useContext as
|
|
1
|
+
import Ie, { createContext as pr, useMemo as ie, useContext as ue, useState as gr, useLayoutEffect as J, Suspense as mr, useEffect as hr, useCallback as Le } from "react";
|
|
2
2
|
var oe = { exports: {} }, W = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -14,18 +14,18 @@ function Er() {
|
|
|
14
14
|
if (Fe)
|
|
15
15
|
return W;
|
|
16
16
|
Fe = 1;
|
|
17
|
-
var n = Ie, o = Symbol.for("react.element"),
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
R !== void 0 && (
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
for (
|
|
25
|
-
w[
|
|
26
|
-
return { $$typeof: o, type:
|
|
17
|
+
var n = Ie, o = Symbol.for("react.element"), i = Symbol.for("react.fragment"), d = 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, c, R) {
|
|
19
|
+
var E, w = {}, O = null, C = null;
|
|
20
|
+
R !== void 0 && (O = "" + R), c.key !== void 0 && (O = "" + c.key), c.ref !== void 0 && (C = c.ref);
|
|
21
|
+
for (E in c)
|
|
22
|
+
d.call(c, E) && !g.hasOwnProperty(E) && (w[E] = c[E]);
|
|
23
|
+
if (m && m.defaultProps)
|
|
24
|
+
for (E in c = m.defaultProps, c)
|
|
25
|
+
w[E] === void 0 && (w[E] = c[E]);
|
|
26
|
+
return { $$typeof: o, type: m, key: O, 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,90 +38,90 @@ var M = {};
|
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
40
|
var $e;
|
|
41
|
-
function
|
|
41
|
+
function br() {
|
|
42
42
|
return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var n = Ie, o = Symbol.for("react.element"),
|
|
43
|
+
var n = Ie, o = Symbol.for("react.element"), i = Symbol.for("react.portal"), d = 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"), c = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), k = Symbol.iterator, A = "@@iterator";
|
|
44
44
|
function N(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
47
|
var r = k && e[k] || e[A];
|
|
48
48
|
return typeof r == "function" ? r : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var S = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function v(e) {
|
|
52
52
|
{
|
|
53
53
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
54
54
|
t[a - 1] = arguments[a];
|
|
55
|
-
|
|
55
|
+
se("error", e, t);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function se(e, r, t) {
|
|
59
59
|
{
|
|
60
|
-
var a =
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return String(
|
|
60
|
+
var a = S.ReactDebugCurrentFrame, p = a.getStackAddendum();
|
|
61
|
+
p !== "" && (r += "%s", t = t.concat([p]));
|
|
62
|
+
var h = t.map(function(f) {
|
|
63
|
+
return String(f);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
68
|
+
var le = !1, Y = !1, We = !1, Me = !1, Ne = !1, ce;
|
|
69
|
+
ce = Symbol.for("react.module.reference");
|
|
70
70
|
function Ye(e) {
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === d || e === g || Ne || e === u || e === R || e === E || Me || e === C || le || Y || We || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === w || e.$$typeof === s || e.$$typeof === m || e.$$typeof === c || // 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.
|
|
75
|
-
e.$$typeof ===
|
|
75
|
+
e.$$typeof === ce || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
77
|
function Ve(e, r, t) {
|
|
78
78
|
var a = e.displayName;
|
|
79
79
|
if (a)
|
|
80
80
|
return a;
|
|
81
|
-
var
|
|
82
|
-
return
|
|
81
|
+
var p = r.displayName || r.name || "";
|
|
82
|
+
return p !== "" ? t + "(" + p + ")" : t;
|
|
83
83
|
}
|
|
84
84
|
function fe(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function j(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
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")
|
|
91
91
|
return e.displayName || e.name || null;
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
94
94
|
switch (e) {
|
|
95
|
-
case
|
|
95
|
+
case d:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case i:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case g:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case u:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case R:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
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 fe(r) + ".Consumer";
|
|
113
|
-
case
|
|
113
|
+
case s:
|
|
114
114
|
var t = e;
|
|
115
115
|
return fe(t._context) + ".Provider";
|
|
116
|
-
case
|
|
116
|
+
case c:
|
|
117
117
|
return Ve(e, e.render, "ForwardRef");
|
|
118
118
|
case w:
|
|
119
119
|
var a = e.displayName || null;
|
|
120
|
-
return a !== null ? a :
|
|
121
|
-
case
|
|
122
|
-
var
|
|
120
|
+
return a !== null ? a : j(e.type) || "Memo";
|
|
121
|
+
case O: {
|
|
122
|
+
var p = e, h = p._payload, f = p._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return j(f(h));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -130,9 +130,9 @@ function yr() {
|
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
132
|
var D = Object.assign, I = 0, de, ve, pe, ge, me, he, Ee;
|
|
133
|
-
function
|
|
133
|
+
function be() {
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
be.__reactDisabledLog = !0;
|
|
136
136
|
function qe() {
|
|
137
137
|
{
|
|
138
138
|
if (I === 0) {
|
|
@@ -140,7 +140,7 @@ function yr() {
|
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: be,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -188,30 +188,30 @@ function yr() {
|
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
I < 0 &&
|
|
191
|
+
I < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var H = S.ReactCurrentDispatcher, Z;
|
|
195
195
|
function V(e, r, t) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (Z === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var a =
|
|
202
|
-
|
|
200
|
+
} catch (p) {
|
|
201
|
+
var a = p.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
Z = a && a[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + Z + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var K = !1, q;
|
|
209
209
|
{
|
|
210
210
|
var Be = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
211
|
q = new Be();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
213
|
+
function ye(e, r) {
|
|
214
|
+
if (!e || K)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
217
|
var t = q.get(e);
|
|
@@ -219,34 +219,34 @@ function yr() {
|
|
|
219
219
|
return t;
|
|
220
220
|
}
|
|
221
221
|
var a;
|
|
222
|
-
|
|
223
|
-
var
|
|
222
|
+
K = !0;
|
|
223
|
+
var p = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var h;
|
|
226
|
+
h = H.current, H.current = null, qe();
|
|
227
227
|
try {
|
|
228
228
|
if (r) {
|
|
229
|
-
var
|
|
229
|
+
var f = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(f.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
238
|
+
Reflect.construct(f, []);
|
|
239
239
|
} catch (P) {
|
|
240
240
|
a = P;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], f);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
245
|
+
f.call();
|
|
246
246
|
} catch (P) {
|
|
247
247
|
a = P;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(f.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
@@ -258,31 +258,31 @@ function yr() {
|
|
|
258
258
|
}
|
|
259
259
|
} catch (P) {
|
|
260
260
|
if (P && a && typeof P.stack == "string") {
|
|
261
|
-
for (var
|
|
261
|
+
for (var l = P.stack.split(`
|
|
262
262
|
`), _ = a.stack.split(`
|
|
263
|
-
`),
|
|
263
|
+
`), b = l.length - 1, y = _.length - 1; b >= 1 && y >= 0 && l[b] !== _[y]; )
|
|
264
264
|
y--;
|
|
265
|
-
for (;
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
265
|
+
for (; b >= 1 && y >= 0; b--, y--)
|
|
266
|
+
if (l[b] !== _[y]) {
|
|
267
|
+
if (b !== 1 || y !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
271
|
-
` +
|
|
272
|
-
return e.displayName &&
|
|
269
|
+
if (b--, y--, y < 0 || l[b] !== _[y]) {
|
|
270
|
+
var T = `
|
|
271
|
+
` + l[b].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, T), T;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (b >= 1 && y >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
K = !1, H.current = h, Ue(), Error.prepareStackTrace = p;
|
|
280
280
|
}
|
|
281
281
|
var $ = e ? e.displayName || e.name : "", De = $ ? V($) : "";
|
|
282
282
|
return typeof e == "function" && q.set(e, De), De;
|
|
283
283
|
}
|
|
284
284
|
function ze(e, r, t) {
|
|
285
|
-
return
|
|
285
|
+
return ye(e, !1);
|
|
286
286
|
}
|
|
287
287
|
function Ge(e) {
|
|
288
288
|
var r = e.prototype;
|
|
@@ -292,32 +292,32 @@ function yr() {
|
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return ye(e, Ge(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
297
|
return V(e);
|
|
298
298
|
switch (e) {
|
|
299
299
|
case R:
|
|
300
300
|
return V("Suspense");
|
|
301
|
-
case
|
|
301
|
+
case E:
|
|
302
302
|
return V("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
306
|
+
case c:
|
|
307
307
|
return ze(e.render);
|
|
308
308
|
case w:
|
|
309
309
|
return U(e.type, r, t);
|
|
310
|
-
case
|
|
311
|
-
var a = e,
|
|
310
|
+
case O: {
|
|
311
|
+
var a = e, p = a._payload, h = a._init;
|
|
312
312
|
try {
|
|
313
|
-
return U(
|
|
313
|
+
return U(h(p), r, t);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var B = Object.prototype.hasOwnProperty, Re = {}, _e =
|
|
320
|
+
var B = Object.prototype.hasOwnProperty, Re = {}, _e = S.ReactDebugCurrentFrame;
|
|
321
321
|
function z(e) {
|
|
322
322
|
if (e) {
|
|
323
323
|
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
@@ -325,36 +325,36 @@ function yr() {
|
|
|
325
325
|
} else
|
|
326
326
|
_e.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function Je(e, r, t, a,
|
|
328
|
+
function Je(e, r, t, a, p) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
331
|
-
for (var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
330
|
+
var h = Function.call.bind(B);
|
|
331
|
+
for (var f in e)
|
|
332
|
+
if (h(e, f)) {
|
|
333
|
+
var l = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var _ = Error((a || "React class") + ": " + t + " type `" +
|
|
335
|
+
if (typeof e[f] != "function") {
|
|
336
|
+
var _ = Error((a || "React class") + ": " + t + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw _.name = "Invariant Violation", _;
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
} catch (
|
|
341
|
-
|
|
339
|
+
l = e[f](r, f, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (b) {
|
|
341
|
+
l = b;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
l && !(l instanceof Error) && (z(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).", a || "React class", t, f, typeof l), z(null)), l instanceof Error && !(l.message in Re) && (Re[l.message] = !0, z(p), v("Failed %s type: %s", t, l.message), z(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
347
|
+
var Xe = Array.isArray;
|
|
348
348
|
function Q(e) {
|
|
349
|
-
return
|
|
349
|
+
return Xe(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function He(e) {
|
|
352
352
|
{
|
|
353
353
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
354
|
return t;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Ze(e) {
|
|
358
358
|
try {
|
|
359
359
|
return we(e), !1;
|
|
360
360
|
} catch {
|
|
@@ -365,15 +365,15 @@ function yr() {
|
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
367
|
function Ce(e) {
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
368
|
+
if (Ze(e))
|
|
369
|
+
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), we(e);
|
|
370
370
|
}
|
|
371
|
-
var L =
|
|
371
|
+
var L = S.ReactCurrentOwner, Ke = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
376
|
+
}, Oe, Te, ee;
|
|
377
377
|
ee = {};
|
|
378
378
|
function Qe(e) {
|
|
379
379
|
if (B.call(e, "ref")) {
|
|
@@ -393,14 +393,14 @@ function yr() {
|
|
|
393
393
|
}
|
|
394
394
|
function rr(e, r) {
|
|
395
395
|
if (typeof e.ref == "string" && L.current && r && L.current.stateNode !== r) {
|
|
396
|
-
var t =
|
|
397
|
-
ee[t] || (
|
|
396
|
+
var t = j(L.current.type);
|
|
397
|
+
ee[t] || (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', j(L.current.type), e.ref), ee[t] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function tr(e, r) {
|
|
401
401
|
{
|
|
402
402
|
var t = function() {
|
|
403
|
-
|
|
403
|
+
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)", r));
|
|
404
404
|
};
|
|
405
405
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
406
|
get: t,
|
|
@@ -411,7 +411,7 @@ function yr() {
|
|
|
411
411
|
function nr(e, r) {
|
|
412
412
|
{
|
|
413
413
|
var t = function() {
|
|
414
|
-
|
|
414
|
+
Te || (Te = !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)", r));
|
|
415
415
|
};
|
|
416
416
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
417
|
get: t,
|
|
@@ -419,70 +419,70 @@ function yr() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var ar = function(e, r, t, a,
|
|
423
|
-
var
|
|
422
|
+
var ar = function(e, r, t, a, p, h, f) {
|
|
423
|
+
var l = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: o,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
429
429
|
ref: t,
|
|
430
|
-
props:
|
|
430
|
+
props: f,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
432
|
+
_owner: h
|
|
433
433
|
};
|
|
434
|
-
return
|
|
434
|
+
return l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
436
436
|
enumerable: !1,
|
|
437
437
|
writable: !0,
|
|
438
438
|
value: !1
|
|
439
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(l, "_self", {
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
443
|
value: a
|
|
444
|
-
}), Object.defineProperty(
|
|
444
|
+
}), Object.defineProperty(l, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
|
-
value:
|
|
449
|
-
}), Object.freeze && (Object.freeze(
|
|
448
|
+
value: p
|
|
449
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
450
450
|
};
|
|
451
|
-
function or(e, r, t, a,
|
|
451
|
+
function or(e, r, t, a, p) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
454
|
-
t !== void 0 && (Ce(t),
|
|
455
|
-
for (
|
|
456
|
-
B.call(r,
|
|
453
|
+
var h, f = {}, l = null, _ = null;
|
|
454
|
+
t !== void 0 && (Ce(t), l = "" + t), er(r) && (Ce(r.key), l = "" + r.key), Qe(r) && (_ = r.ref, rr(r, p));
|
|
455
|
+
for (h in r)
|
|
456
|
+
B.call(r, h) && !Ke.hasOwnProperty(h) && (f[h] = r[h]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (
|
|
460
|
-
|
|
458
|
+
var b = e.defaultProps;
|
|
459
|
+
for (h in b)
|
|
460
|
+
f[h] === void 0 && (f[h] = b[h]);
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
462
|
+
if (l || _) {
|
|
463
463
|
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
-
|
|
464
|
+
l && tr(f, y), _ && nr(f, y);
|
|
465
465
|
}
|
|
466
|
-
return ar(e,
|
|
466
|
+
return ar(e, l, _, p, a, L.current, f);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var re =
|
|
469
|
+
var re = S.ReactCurrentOwner, Se = S.ReactDebugCurrentFrame;
|
|
470
470
|
function F(e) {
|
|
471
471
|
if (e) {
|
|
472
472
|
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
473
|
-
|
|
473
|
+
Se.setExtraStackFrame(t);
|
|
474
474
|
} else
|
|
475
|
-
|
|
475
|
+
Se.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
477
|
var te;
|
|
478
478
|
te = !1;
|
|
479
479
|
function ne(e) {
|
|
480
480
|
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function je() {
|
|
483
483
|
{
|
|
484
484
|
if (re.current) {
|
|
485
|
-
var e =
|
|
485
|
+
var e = j(re.current.type);
|
|
486
486
|
if (e)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -503,9 +503,9 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
var Pe = {};
|
|
506
|
-
function
|
|
506
|
+
function ur(e) {
|
|
507
507
|
{
|
|
508
|
-
var r =
|
|
508
|
+
var r = je();
|
|
509
509
|
if (!r) {
|
|
510
510
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
511
511
|
t && (r = `
|
|
@@ -520,12 +520,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
520
520
|
if (!e._store || e._store.validated || e.key != null)
|
|
521
521
|
return;
|
|
522
522
|
e._store.validated = !0;
|
|
523
|
-
var t =
|
|
523
|
+
var t = ur(r);
|
|
524
524
|
if (Pe[t])
|
|
525
525
|
return;
|
|
526
526
|
Pe[t] = !0;
|
|
527
527
|
var a = "";
|
|
528
|
-
e && e._owner && e._owner !== re.current && (a = " It was passed a child from " +
|
|
528
|
+
e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + j(e._owner.type) + "."), F(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.', t, a), F(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
function ke(e, r) {
|
|
@@ -540,14 +540,14 @@ Check the top-level render call using <` + t + ">.");
|
|
|
540
540
|
else if (ne(e))
|
|
541
541
|
e._store && (e._store.validated = !0);
|
|
542
542
|
else if (e) {
|
|
543
|
-
var
|
|
544
|
-
if (typeof
|
|
545
|
-
for (var
|
|
546
|
-
ne(
|
|
543
|
+
var p = N(e);
|
|
544
|
+
if (typeof p == "function" && p !== e.entries)
|
|
545
|
+
for (var h = p.call(e), f; !(f = h.next()).done; )
|
|
546
|
+
ne(f.value) && xe(f.value, r);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function sr(e) {
|
|
551
551
|
{
|
|
552
552
|
var r = e.type;
|
|
553
553
|
if (r == null || typeof r == "string")
|
|
@@ -555,78 +555,78 @@ Check the top-level render call using <` + t + ">.");
|
|
|
555
555
|
var t;
|
|
556
556
|
if (typeof r == "function")
|
|
557
557
|
t = r.propTypes;
|
|
558
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
558
|
+
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
|
|
559
559
|
// Inner props are checked in the reconciler.
|
|
560
560
|
r.$$typeof === w))
|
|
561
561
|
t = r.propTypes;
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
564
|
if (t) {
|
|
565
|
-
var a =
|
|
565
|
+
var a = j(r);
|
|
566
566
|
Je(t, e.props, "prop", a, e);
|
|
567
567
|
} else if (r.PropTypes !== void 0 && !te) {
|
|
568
568
|
te = !0;
|
|
569
|
-
var
|
|
570
|
-
|
|
569
|
+
var p = j(r);
|
|
570
|
+
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
572
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function lr(e) {
|
|
576
576
|
{
|
|
577
577
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
578
578
|
var a = r[t];
|
|
579
579
|
if (a !== "children" && a !== "key") {
|
|
580
|
-
F(e),
|
|
580
|
+
F(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), F(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
e.ref !== null && (F(e),
|
|
584
|
+
e.ref !== null && (F(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function Ae(e, r, t, a,
|
|
587
|
+
function Ae(e, r, t, a, p, h) {
|
|
588
588
|
{
|
|
589
|
-
var
|
|
590
|
-
if (!
|
|
591
|
-
var
|
|
592
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
593
|
-
var _ = ir(
|
|
594
|
-
_ ?
|
|
595
|
-
var
|
|
596
|
-
e === null ?
|
|
589
|
+
var f = Ye(e);
|
|
590
|
+
if (!f) {
|
|
591
|
+
var l = "";
|
|
592
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " 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
|
+
var _ = ir(p);
|
|
594
|
+
_ ? l += _ : l += je();
|
|
595
|
+
var b;
|
|
596
|
+
e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === o ? (b = "<" + (j(e.type) || "Unknown") + " />", l = " 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, l);
|
|
597
597
|
}
|
|
598
|
-
var y = or(e, r, t,
|
|
598
|
+
var y = or(e, r, t, p, h);
|
|
599
599
|
if (y == null)
|
|
600
600
|
return y;
|
|
601
|
-
if (
|
|
602
|
-
var
|
|
603
|
-
if (
|
|
601
|
+
if (f) {
|
|
602
|
+
var T = r.children;
|
|
603
|
+
if (T !== void 0)
|
|
604
604
|
if (a)
|
|
605
|
-
if (Q(
|
|
606
|
-
for (var $ = 0; $ <
|
|
607
|
-
ke(
|
|
608
|
-
Object.freeze && Object.freeze(
|
|
605
|
+
if (Q(T)) {
|
|
606
|
+
for (var $ = 0; $ < T.length; $++)
|
|
607
|
+
ke(T[$], e);
|
|
608
|
+
Object.freeze && Object.freeze(T);
|
|
609
609
|
} else
|
|
610
|
-
|
|
610
|
+
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.");
|
|
611
611
|
else
|
|
612
|
-
ke(
|
|
612
|
+
ke(T, e);
|
|
613
613
|
}
|
|
614
|
-
return e ===
|
|
614
|
+
return e === d ? lr(y) : sr(y), y;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function cr(e, r, t) {
|
|
618
618
|
return Ae(e, r, t, !0);
|
|
619
619
|
}
|
|
620
620
|
function fr(e, r, t) {
|
|
621
621
|
return Ae(e, r, t, !1);
|
|
622
622
|
}
|
|
623
|
-
var dr = fr, vr =
|
|
624
|
-
M.Fragment =
|
|
623
|
+
var dr = fr, vr = cr;
|
|
624
|
+
M.Fragment = d, M.jsx = dr, M.jsxs = vr;
|
|
625
625
|
}()), M;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ? oe.exports = Er() : oe.exports =
|
|
627
|
+
process.env.NODE_ENV === "production" ? oe.exports = Er() : oe.exports = br();
|
|
628
628
|
var x = oe.exports;
|
|
629
|
-
const
|
|
629
|
+
const X = pr({
|
|
630
630
|
axios: void 0,
|
|
631
631
|
children: void 0,
|
|
632
632
|
Navigate: void 0,
|
|
@@ -634,94 +634,96 @@ const K = pr({
|
|
|
634
634
|
translate: void 0,
|
|
635
635
|
useAuth: void 0,
|
|
636
636
|
useLocation: void 0
|
|
637
|
-
}),
|
|
637
|
+
}), Or = ({
|
|
638
638
|
axios: n,
|
|
639
639
|
children: o,
|
|
640
|
-
translate:
|
|
641
|
-
useAuth:
|
|
642
|
-
Outlet:
|
|
643
|
-
Navigate:
|
|
644
|
-
useLocation:
|
|
645
|
-
useGoogleTagManager:
|
|
640
|
+
translate: i,
|
|
641
|
+
useAuth: d,
|
|
642
|
+
Outlet: u,
|
|
643
|
+
Navigate: g,
|
|
644
|
+
useLocation: s,
|
|
645
|
+
useGoogleTagManager: m
|
|
646
646
|
}) => {
|
|
647
|
-
const
|
|
647
|
+
const c = ie(
|
|
648
648
|
() => ({
|
|
649
649
|
axios: n,
|
|
650
|
-
Navigate:
|
|
651
|
-
Outlet:
|
|
652
|
-
translate:
|
|
653
|
-
useAuth:
|
|
654
|
-
useGoogleTagManager:
|
|
655
|
-
useLocation:
|
|
650
|
+
Navigate: g,
|
|
651
|
+
Outlet: u,
|
|
652
|
+
translate: i,
|
|
653
|
+
useAuth: d,
|
|
654
|
+
useGoogleTagManager: m,
|
|
655
|
+
useLocation: s
|
|
656
656
|
}),
|
|
657
|
-
[
|
|
657
|
+
[g, u, n, i, d, m, s]
|
|
658
658
|
);
|
|
659
|
-
return /* @__PURE__ */ x.jsx(
|
|
660
|
-
}, G = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,
|
|
659
|
+
return /* @__PURE__ */ x.jsx(X.Provider, { value: c, children: o });
|
|
660
|
+
}, G = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Tr = ({
|
|
661
661
|
Fallback: n,
|
|
662
662
|
loginPath: o = "/login",
|
|
663
|
-
localStorageKey:
|
|
664
|
-
redirect401Path:
|
|
665
|
-
...
|
|
663
|
+
localStorageKey: i = "user",
|
|
664
|
+
redirect401Path: d = "/login",
|
|
665
|
+
...u
|
|
666
666
|
}) => {
|
|
667
|
-
var k, A, N,
|
|
667
|
+
var k, A, N, S;
|
|
668
668
|
const {
|
|
669
|
-
axios:
|
|
670
|
-
useLocation:
|
|
671
|
-
useAuth:
|
|
672
|
-
Outlet:
|
|
673
|
-
Navigate: R =
|
|
674
|
-
} =
|
|
675
|
-
if (
|
|
669
|
+
axios: g = u.axios,
|
|
670
|
+
useLocation: s = u.useLocation,
|
|
671
|
+
useAuth: m = u.useAuth,
|
|
672
|
+
Outlet: c = u.Outlet,
|
|
673
|
+
Navigate: R = u.Navigate
|
|
674
|
+
} = ue(X);
|
|
675
|
+
if (m === void 0)
|
|
676
676
|
throw new Error(G("useAuth"));
|
|
677
|
-
if (
|
|
677
|
+
if (s === void 0)
|
|
678
678
|
throw new Error(G("useLocation"));
|
|
679
|
-
if (
|
|
679
|
+
if (c === void 0)
|
|
680
680
|
throw new Error(G("Outlet"));
|
|
681
681
|
if (R === void 0)
|
|
682
682
|
throw new Error(G("Navigate"));
|
|
683
|
-
const [
|
|
683
|
+
const [E, w] = gr(null), { isLogged: O } = m(), C = s();
|
|
684
684
|
return J(() => {
|
|
685
|
-
|
|
686
|
-
(
|
|
687
|
-
async (
|
|
685
|
+
g == null || g.interceptors.response.use(
|
|
686
|
+
(v) => v,
|
|
687
|
+
async (v) => {
|
|
688
688
|
var Y;
|
|
689
|
-
return typeof
|
|
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(d)), Promise.reject(v);
|
|
690
690
|
}
|
|
691
691
|
);
|
|
692
|
-
}, [
|
|
693
|
-
}, ae = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,
|
|
692
|
+
}, [g == null ? void 0 : g.defaults, g == null ? void 0 : g.interceptors.response, i, d]), O && !E ? /* @__PURE__ */ x.jsx(mr, { fallback: n, children: (A = (k = C.state) == null ? void 0 : k.from) != null && A.state && ((S = (N = C.state) == null ? void 0 : N.from) == null ? void 0 : S.pathname) === o ? /* @__PURE__ */ x.jsx(R, { to: C.state.from.state.from.pathname + C.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ x.jsx(c, {}) }) : /* @__PURE__ */ x.jsx(R, { to: o, state: { from: C }, replace: !0 });
|
|
693
|
+
}, ae = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Sr = ({ ...n }) => {
|
|
694
694
|
const {
|
|
695
695
|
useLocation: o = n.useLocation,
|
|
696
|
-
Outlet:
|
|
697
|
-
useGoogleTagManager:
|
|
698
|
-
} =
|
|
696
|
+
Outlet: i = n.Outlet,
|
|
697
|
+
useGoogleTagManager: d = n.useGoogleTagManager
|
|
698
|
+
} = ue(X);
|
|
699
699
|
if (o === void 0)
|
|
700
700
|
throw new Error(ae("useLocation"));
|
|
701
|
-
if (
|
|
701
|
+
if (i === void 0)
|
|
702
702
|
throw new Error(ae("Outlet"));
|
|
703
|
-
if (
|
|
703
|
+
if (d === void 0)
|
|
704
704
|
throw new Error(ae("useGoogleTagManager"));
|
|
705
|
-
const { pathname:
|
|
705
|
+
const { pathname: u } = o(), { sendEvent: g } = d();
|
|
706
706
|
return hr(() => {
|
|
707
|
-
|
|
708
|
-
}, [
|
|
709
|
-
},
|
|
707
|
+
g({ event: "pageView", pathname: u });
|
|
708
|
+
}, [u, g]), /* @__PURE__ */ x.jsx(i, {});
|
|
709
|
+
}, jr = ({
|
|
710
710
|
axios: n,
|
|
711
711
|
baseURL: o,
|
|
712
|
-
|
|
713
|
-
|
|
712
|
+
tokenTypeKey: i = "tokenType",
|
|
713
|
+
userLocalStorageKey: d = "user",
|
|
714
|
+
tokenKey: u = "accessToken",
|
|
715
|
+
postContentType: g = "application/json"
|
|
714
716
|
}) => (J(() => {
|
|
715
717
|
if (!n.defaults)
|
|
716
718
|
return;
|
|
717
|
-
const
|
|
718
|
-
n.defaults.baseURL = o, n.defaults.headers.post["Content-Type"] =
|
|
719
|
-
}, [n.defaults, o,
|
|
719
|
+
const s = localStorage.getItem(d), m = s ? JSON.parse(s) : null, c = m != null && m[i] ? m[i] : null, R = m != null && m[u] ? m[u] : null, E = s ? `${c} ${R}` : null;
|
|
720
|
+
n.defaults.baseURL = o, n.defaults.headers.post["Content-Type"] = g, E && (n.defaults.headers.common.Authorization = E);
|
|
721
|
+
}, [n.defaults, o, g, u, i, d]), null), Pr = ({
|
|
720
722
|
i18n: n,
|
|
721
723
|
initReactI18next: o,
|
|
722
|
-
resources:
|
|
723
|
-
LanguageDetector:
|
|
724
|
-
}) => (n.use(
|
|
724
|
+
resources: i,
|
|
725
|
+
LanguageDetector: d
|
|
726
|
+
}) => (n.use(d).use(o).init({
|
|
725
727
|
debug: !1,
|
|
726
728
|
fallbackLng: "en",
|
|
727
729
|
interpolation: {
|
|
@@ -731,12 +733,12 @@ const K = pr({
|
|
|
731
733
|
react: {
|
|
732
734
|
useSuspense: !0
|
|
733
735
|
},
|
|
734
|
-
resources:
|
|
736
|
+
resources: i,
|
|
735
737
|
returnNull: !1
|
|
736
738
|
}).then(() => {
|
|
737
739
|
document.documentElement.lang !== n.resolvedLanguage && n.resolvedLanguage && document.documentElement.setAttribute("lang", n.resolvedLanguage);
|
|
738
|
-
}), n.on("languageChanged", (
|
|
739
|
-
document.documentElement.setAttribute("lang",
|
|
740
|
+
}), n.on("languageChanged", (u) => {
|
|
741
|
+
document.documentElement.setAttribute("lang", u);
|
|
740
742
|
}), null), xr = ({ dsn: n, sentry: o }) => (J(() => {
|
|
741
743
|
process.env.NODE_ENV === "production" && o.init({
|
|
742
744
|
dsn: n,
|
|
@@ -744,21 +746,21 @@ const K = pr({
|
|
|
744
746
|
tracesSampleRate: 1
|
|
745
747
|
});
|
|
746
748
|
}, [n, o]), null), kr = ({ IMaskMixin: n, ...o }) => {
|
|
747
|
-
const
|
|
749
|
+
const i = ie(
|
|
748
750
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
749
|
-
() => n(({ TextField:
|
|
751
|
+
() => n(({ TextField: d, ...u }) => /* @__PURE__ */ x.jsx(d, { ...u })),
|
|
750
752
|
[n]
|
|
751
753
|
);
|
|
752
|
-
return /* @__PURE__ */ x.jsx(
|
|
754
|
+
return /* @__PURE__ */ x.jsx(i, { ...o });
|
|
753
755
|
}, Ar = ({ mapbox: n, accessToken: o }) => (J(() => {
|
|
754
756
|
n && o && (n.accessToken = o);
|
|
755
757
|
}, [o, n]), null), Dr = ({
|
|
756
758
|
children: n,
|
|
757
759
|
defaultOptions: o,
|
|
758
|
-
QueryClient:
|
|
759
|
-
QueryClientProvider:
|
|
760
|
+
QueryClient: i,
|
|
761
|
+
QueryClientProvider: d
|
|
760
762
|
}) => {
|
|
761
|
-
const
|
|
763
|
+
const u = new i({
|
|
762
764
|
defaultOptions: {
|
|
763
765
|
queries: {
|
|
764
766
|
refetchOnWindowFocus: !1,
|
|
@@ -767,58 +769,61 @@ const K = pr({
|
|
|
767
769
|
}
|
|
768
770
|
}
|
|
769
771
|
});
|
|
770
|
-
return /* @__PURE__ */ x.jsx(
|
|
772
|
+
return /* @__PURE__ */ x.jsx(d, { client: u, children: n });
|
|
771
773
|
}, Fr = (n) => {
|
|
772
|
-
const { unknownErrorTranslationKey: o = "error.unknownError" } = n || {}, { translate:
|
|
774
|
+
const { unknownErrorTranslationKey: o = "error.unknownError" } = n || {}, { translate: i = n == null ? void 0 : n.translate } = ue(X);
|
|
773
775
|
return { printError: Le(
|
|
774
|
-
(
|
|
775
|
-
var
|
|
776
|
-
const
|
|
777
|
-
return
|
|
776
|
+
(u) => {
|
|
777
|
+
var m, c, R, E, w, O, C, k, A;
|
|
778
|
+
const g = i ? i(o) : "Unknown error", { response: s } = u || {};
|
|
779
|
+
return u != null && u.reason ? String(u.reason) : (m = s == null ? void 0 : s.data) != null && m.reason ? String(s.data.reason) : (c = s == null ? void 0 : s.data) != null && c.message ? String(s.data.message) : (E = (R = s == null ? void 0 : s.data) == null ? void 0 : R.detail) != null && E.length && Array.isArray((w = s == null ? void 0 : s.data) == null ? void 0 : w.detail) && ((C = (O = s == null ? void 0 : s.data) == null ? void 0 : O.detail[0]) != null && C.msg) && typeof ((A = (k = s == null ? void 0 : s.data) == null ? void 0 : k.detail[0]) == null ? void 0 : A.msg) == "string" ? String(s.data.detail[0].msg) : g;
|
|
778
780
|
},
|
|
779
|
-
[
|
|
781
|
+
[i, o]
|
|
780
782
|
) };
|
|
781
783
|
}, $r = ({
|
|
782
784
|
data: n,
|
|
783
785
|
fetchNextPage: o,
|
|
784
|
-
isFetchingNextPage:
|
|
785
|
-
isInitialLoading:
|
|
786
|
-
isLoading:
|
|
787
|
-
enabled:
|
|
786
|
+
isFetchingNextPage: i,
|
|
787
|
+
isInitialLoading: d,
|
|
788
|
+
isLoading: u,
|
|
789
|
+
enabled: g = !0
|
|
788
790
|
}) => {
|
|
789
|
-
const
|
|
790
|
-
async (
|
|
791
|
-
|
|
791
|
+
const s = Le(
|
|
792
|
+
async (c) => {
|
|
793
|
+
i || !g || await o({ pageParam: (c == null ? void 0 : c.pageParam) || c.visibleRowsCount });
|
|
792
794
|
},
|
|
793
|
-
[
|
|
794
|
-
),
|
|
795
|
+
[g, o, i]
|
|
796
|
+
), m = ie(() => {
|
|
795
797
|
if (n)
|
|
796
|
-
return n.pages.reduce((
|
|
798
|
+
return n.pages.reduce((c, R) => [...c, ...R], []);
|
|
797
799
|
}, [n]);
|
|
798
800
|
return {
|
|
799
|
-
fetchNextPageOnRowsScrollEnd:
|
|
800
|
-
isLoading:
|
|
801
|
-
loadingVariant:
|
|
802
|
-
rows:
|
|
801
|
+
fetchNextPageOnRowsScrollEnd: s,
|
|
802
|
+
isLoading: i || u,
|
|
803
|
+
loadingVariant: d ? "skeleton" : "linear",
|
|
804
|
+
rows: m
|
|
803
805
|
};
|
|
804
|
-
},
|
|
805
|
-
const
|
|
806
|
-
return
|
|
807
|
-
}, _r = (n, o,
|
|
808
|
-
const
|
|
809
|
-
return `${
|
|
806
|
+
}, yr = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), Rr = (n) => {
|
|
807
|
+
const d = n.split("/").filter((u) => u.length > 0).map((u) => u.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((c) => c.charAt(0).toUpperCase() + c.slice(1)).join("")).join("");
|
|
808
|
+
return d.charAt(0).toLowerCase() + d.slice(1);
|
|
809
|
+
}, _r = (n, o, i) => {
|
|
810
|
+
const d = Rr(o), u = yr(i);
|
|
811
|
+
return `${d}${u}`;
|
|
810
812
|
}, wr = (n) => {
|
|
811
813
|
if (n)
|
|
812
|
-
return (n == null ? void 0 : n.reduce((o,
|
|
814
|
+
return (n == null ? void 0 : n.reduce((o, i) => (o[i] = {
|
|
813
815
|
query: {
|
|
814
816
|
useInfinite: !0,
|
|
815
817
|
useInfiniteQueryParam: "offset"
|
|
816
818
|
}
|
|
817
819
|
}, o), {})) || {};
|
|
818
820
|
}, Ir = (n) => {
|
|
819
|
-
const { input: o = "./openapi.json", operationsToGenerateInfiniteQueryHook:
|
|
821
|
+
const { input: o = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = n || {};
|
|
820
822
|
return {
|
|
821
823
|
api: {
|
|
824
|
+
hooks: {
|
|
825
|
+
afterAllFilesWrite: "prettier src/api/ --write"
|
|
826
|
+
},
|
|
822
827
|
input: o,
|
|
823
828
|
output: {
|
|
824
829
|
client: "react-query",
|
|
@@ -829,7 +834,7 @@ const K = pr({
|
|
|
829
834
|
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
830
835
|
},
|
|
831
836
|
operationName: _r,
|
|
832
|
-
...(
|
|
837
|
+
...(i == null ? void 0 : i.length) && { operations: wr(i) },
|
|
833
838
|
query: {
|
|
834
839
|
useQuery: !0
|
|
835
840
|
}
|
|
@@ -841,15 +846,15 @@ const K = pr({
|
|
|
841
846
|
};
|
|
842
847
|
};
|
|
843
848
|
export {
|
|
844
|
-
|
|
845
|
-
|
|
849
|
+
jr as AxiosConfig,
|
|
850
|
+
Sr as GTMSendPageView,
|
|
846
851
|
Pr as I18nConfig,
|
|
847
|
-
|
|
848
|
-
|
|
852
|
+
X as InjectDependenciesContext,
|
|
853
|
+
Or as InjectDependenciesProvider,
|
|
849
854
|
Ar as MapBoxConfig,
|
|
850
855
|
kr as MaskTextField,
|
|
851
856
|
Dr as QueryClientConfigProvider,
|
|
852
|
-
|
|
857
|
+
Tr as RequireAuth,
|
|
853
858
|
xr as SentryConfig,
|
|
854
859
|
Ir as getOrvalConfig,
|
|
855
860
|
$r as useInfiniteDataGrid,
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(_=typeof globalThis<"u"?globalThis:_||self,E(_["@tracktor/shared-module"]={},_.React))})(this,function(_,E){"use strict";var K={exports:{}},W={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -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 se;function Ie(){if(se)return W;se=1;var n=
|
|
9
|
+
*/var se;function Ie(){if(se)return W;se=1;var n=E,o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),d=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(m,l,C){var y,T={},S=null,O=null;C!==void 0&&(S=""+C),l.key!==void 0&&(S=""+l.key),l.ref!==void 0&&(O=l.ref);for(y in l)d.call(l,y)&&!g.hasOwnProperty(y)&&(T[y]=l[y]);if(m&&m.defaultProps)for(y in l=m.defaultProps,l)T[y]===void 0&&(T[y]=l[y]);return{$$typeof:o,type:m,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 ue;function Le(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var n=
|
|
18
|
-
`+ee+e}}var re=!1,
|
|
17
|
+
*/var ue;function Le(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var n=E,o=Symbol.for("react.element"),i=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),m=Symbol.for("react.context"),l=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 z(e){if(e===null||typeof e!="object")return null;var r=D&&e[D]||e[F];return typeof r=="function"?r:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ce("error",e,t)}}function ce(e,r,t){{var a=k.ReactDebugCurrentFrame,p=a.getStackAddendum();p!==""&&(r+="%s",t=t.concat([p]));var h=t.map(function(f){return String(f)});h.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,h)}}var le=!1,G=!1,Qe=!1,er=!1,rr=!1,fe;fe=Symbol.for("react.module.reference");function tr(e){return!!(typeof e=="string"||typeof e=="function"||e===d||e===g||rr||e===s||e===C||e===y||er||e===O||le||G||Qe||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===T||e.$$typeof===u||e.$$typeof===m||e.$$typeof===l||e.$$typeof===fe||e.getModuleId!==void 0))}function nr(e,r,t){var a=e.displayName;if(a)return a;var p=r.displayName||r.name||"";return p!==""?t+"("+p+")":t}function de(e){return e.displayName||"Context"}function x(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 d: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 m:var r=e;return de(r)+".Consumer";case u:var t=e;return de(t._context)+".Provider";case l:return nr(e,e.render,"ForwardRef");case T:var a=e.displayName||null;return a!==null?a:x(e.type)||"Memo";case S:{var p=e,h=p._payload,f=p._init;try{return x(f(h))}catch{return null}}}return null}var I=Object.assign,V=0,ve,pe,ge,me,he,Ee,ye;function be(){}be.__reactDisabledLog=!0;function ar(){{if(V===0){ve=console.log,pe=console.info,ge=console.warn,me=console.error,he=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 or(){{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:me}),group:I({},e,{value:he}),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 Q=k.ReactCurrentDispatcher,ee;function J(e,r,t){{if(ee===void 0)try{throw Error()}catch(p){var a=p.stack.trim().match(/\n( *(at )?)/);ee=a&&a[1]||""}return`
|
|
18
|
+
`+ee+e}}var re=!1,X;{var ir=typeof WeakMap=="function"?WeakMap:Map;X=new ir}function Re(e,r){if(!e||re)return"";{var t=X.get(e);if(t!==void 0)return t}var a;re=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var h;h=Q.current,Q.current=null,ar();try{if(r){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(A){a=A}Reflect.construct(e,[],f)}else{try{f.call()}catch(A){a=A}e.call(f.prototype)}}else{try{throw Error()}catch(A){a=A}e()}}catch(A){if(A&&a&&typeof A.stack=="string"){for(var c=A.stack.split(`
|
|
19
19
|
`),w=a.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
20
|
+
`),b=c.length-1,R=w.length-1;b>=1&&R>=0&&c[b]!==w[R];)R--;for(;b>=1&&R>=0;b--,R--)if(c[b]!==w[R]){if(b!==1||R!==1)do if(b--,R--,R<0||c[b]!==w[R]){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&&R>=0);break}}}finally{re=!1,Q.current=h,or(),Error.prepareStackTrace=p}var M=e?e.displayName||e.name:"",Fe=M?J(M):"";return typeof e=="function"&&X.set(e,Fe),Fe}function sr(e,r,t){return Re(e,!1)}function ur(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,t){if(e==null)return"";if(typeof e=="function")return Re(e,ur(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 l:return sr(e.render);case T:return H(e.type,r,t);case S:{var a=e,p=a._payload,h=a._init;try{return H(h(p),r,t)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,_e={},Ce=k.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}function cr(e,r,t,a,p){{var h=Function.call.bind(q);for(var f in e)if(h(e,f)){var c=void 0;try{if(typeof e[f]!="function"){var w=Error((a||"React class")+": "+t+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}c=e[f](r,f,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){c=b}c&&!(c instanceof Error)&&(Z(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).",a||"React class",t,f,typeof c),Z(null)),c instanceof Error&&!(c.message in _e)&&(_e[c.message]=!0,Z(p),v("Failed %s type: %s",t,c.message),Z(null))}}}var lr=Array.isArray;function te(e){return lr(e)}function fr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function dr(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Te(e){if(dr(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",fr(e)),we(e)}var B=k.ReactCurrentOwner,vr={key:!0,ref:!0,__self:!0,__source:!0},Oe,Se,ne;ne={};function pr(e){if(q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function gr(e){if(q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function mr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var t=x(B.current.type);ne[t]||(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',x(B.current.type),e.ref),ne[t]=!0)}}function hr(e,r){{var t=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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Er(e,r){{var t=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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var yr=function(e,r,t,a,p,h,f){var c={$$typeof:o,type:e,key:r,ref:t,props:f,_owner:h};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:a}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function br(e,r,t,a,p){{var h,f={},c=null,w=null;t!==void 0&&(Te(t),c=""+t),gr(r)&&(Te(r.key),c=""+r.key),pr(r)&&(w=r.ref,mr(r,p));for(h in r)q.call(r,h)&&!vr.hasOwnProperty(h)&&(f[h]=r[h]);if(e&&e.defaultProps){var b=e.defaultProps;for(h in b)f[h]===void 0&&(f[h]=b[h])}if(c||w){var R=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&hr(f,R),w&&Er(f,R)}return yr(e,c,w,p,a,B.current,f)}}var ae=k.ReactCurrentOwner,je=k.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Pe(){{if(ae.current){var e=x(ae.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function Rr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var ke={};function _r(e){{var r=Pe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=_r(r);if(ke[t])return;ke[t]=!0;var a="";e&&e._owner&&e._owner!==ae.current&&(a=" It was passed a child from "+x(e._owner.type)+"."),L(e),
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=_r(r);if(ke[t])return;ke[t]=!0;var a="";e&&e._owner&&e._owner!==ae.current&&(a=" It was passed a child from "+x(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.',t,a),L(null)}}function Ae(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var a=e[t];ie(a)&&xe(a,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=z(e);if(typeof p=="function"&&p!==e.entries)for(var h=p.call(e),f;!(f=h.next()).done;)ie(f.value)&&xe(f.value,r)}}}function Cr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===T))t=r.propTypes;else return;if(t){var a=x(r);cr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var p=x(r);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function wr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){L(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}function De(e,r,t,a,p,h){{var f=tr(e);if(!f){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=Rr(p);w?c+=w:c+=Pe();var b;e===null?b="null":te(e)?b="array":e!==void 0&&e.$$typeof===o?(b="<"+(x(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 R=br(e,r,t,p,h);if(R==null)return R;if(f){var j=r.children;if(j!==void 0)if(a)if(te(j)){for(var M=0;M<j.length;M++)Ae(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 Ae(j,e)}return e===d?wr(R):Cr(R),R}}function Tr(e,r,t){return De(e,r,t,!0)}function Or(e,r,t){return De(e,r,t,!1)}var Sr=Or,jr=Tr;N.Fragment=d,N.jsx=Sr,N.jsxs=jr}()),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:o,translate:i,useAuth:d,Outlet:s,Navigate:g,useLocation:u,useGoogleTagManager:m})=>{const l=E.useMemo(()=>({axios:n,Navigate:g,Outlet:s,translate:i,useAuth:d,useGoogleTagManager:m,useLocation:u}),[g,s,n,i,d,m,u]);return P.jsx(Y.Provider,{value:l,children:o})},U=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:o="/login",localStorageKey:i="user",redirect401Path:d="/login",...s})=>{var D,F,z,k;const{axios:g=s.axios,useLocation:u=s.useLocation,useAuth:m=s.useAuth,Outlet:l=s.Outlet,Navigate:C=s.Navigate}=E.useContext(Y);if(m===void 0)throw new Error(U("useAuth"));if(u===void 0)throw new Error(U("useLocation"));if(l===void 0)throw new Error(U("Outlet"));if(C===void 0)throw new Error(U("Navigate"));const[y,T]=E.useState(null),{isLogged:S}=m(),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(d)),Promise.reject(v)})},[g==null?void 0:g.defaults,g==null?void 0:g.interceptors.response,i,d]),S&&!y?P.jsx(E.Suspense,{fallback:n,children:(F=(D=O.state)==null?void 0:D.from)!=null&&F.state&&((k=(z=O.state)==null?void 0:z.from)==null?void 0:k.pathname)===o?P.jsx(C,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):P.jsx(l,{})}):P.jsx(C,{to:o,state:{from:O},replace:!0})},$=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ne=({...n})=>{const{useLocation:o=n.useLocation,Outlet:i=n.Outlet,useGoogleTagManager:d=n.useGoogleTagManager}=E.useContext(Y);if(o===void 0)throw new Error($("useLocation"));if(i===void 0)throw new Error($("Outlet"));if(d===void 0)throw new Error($("useGoogleTagManager"));const{pathname:s}=o(),{sendEvent:g}=d();return E.useEffect(()=>{g({event:"pageView",pathname:s})},[s,g]),P.jsx(i,{})},Ye=({axios:n,baseURL:o,tokenTypeKey:i="tokenType",userLocalStorageKey:d="user",tokenKey:s="accessToken",postContentType:g="application/json"})=>(E.useLayoutEffect(()=>{if(!n.defaults)return;const u=localStorage.getItem(d),m=u?JSON.parse(u):null,l=m!=null&&m[i]?m[i]:null,C=m!=null&&m[s]?m[s]:null,y=u?`${l} ${C}`:null;n.defaults.baseURL=o,n.defaults.headers.post["Content-Type"]=g,y&&(n.defaults.headers.common.Authorization=y)},[n.defaults,o,g,s,i,d]),null),Ve=({i18n:n,initReactI18next:o,resources:i,LanguageDetector:d})=>(n.use(d).use(o).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),Be=({dsn:n,sentry:o})=>(E.useLayoutEffect(()=>{process.env.NODE_ENV==="production"&&o.init({dsn:n,integrations:[new o.BrowserTracing],tracesSampleRate:1})},[n,o]),null),Ue=({IMaskMixin:n,...o})=>{const i=E.useMemo(()=>n(({TextField:d,...s})=>P.jsx(d,{...s})),[n]);return P.jsx(i,{...o})},ze=({mapbox:n,accessToken:o})=>(E.useLayoutEffect(()=>{n&&o&&(n.accessToken=o)},[o,n]),null),Ge=({children:n,defaultOptions:o,QueryClient:i,QueryClientProvider:d})=>{const s=new i({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...o}}});return P.jsx(d,{client:s,children:n})},Je=n=>{const{unknownErrorTranslationKey:o="error.unknownError"}=n||{},{translate:i=n==null?void 0:n.translate}=E.useContext(Y);return{printError:E.useCallback(s=>{var m,l,C,y,T,S,O,D,F;const g=i?i(o):"Unknown error",{response:u}=s||{};return s!=null&&s.reason?String(s.reason):(m=u==null?void 0:u.data)!=null&&m.reason?String(u.data.reason):(l=u==null?void 0:u.data)!=null&&l.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,o])}},Xe=({data:n,fetchNextPage:o,isFetchingNextPage:i,isInitialLoading:d,isLoading:s,enabled:g=!0})=>{const u=E.useCallback(async l=>{i||!g||await o({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[g,o,i]),m=E.useMemo(()=>{if(n)return n.pages.reduce((l,C)=>[...l,...C],[])},[n]);return{fetchNextPageOnRowsScrollEnd:u,isLoading:i||s,loadingVariant:d?"skeleton":"linear",rows:m}},He=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),qe=n=>{const d=n.split("/").filter(s=>s.length>0).map(s=>s.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("")).join("");return d.charAt(0).toLowerCase()+d.slice(1)},Ze=(n,o,i)=>{const d=qe(o),s=He(i);return`${d}${s}`},Ke=n=>{if(n)return(n==null?void 0:n.reduce((o,i)=>(o[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset"}},o),{}))||{}},$e=n=>{const{input:o="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=n||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:o,output:{client:"react-query",mode:"tags-split",override:{mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:Ze,...(i==null?void 0:i.length)&&{operations:Ke(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};_.AxiosConfig=Ye,_.GTMSendPageView=Ne,_.I18nConfig=Ve,_.InjectDependenciesContext=Y,_.InjectDependenciesProvider=Me,_.MapBoxConfig=ze,_.MaskTextField=Ue,_.QueryClientConfigProvider=Ge,_.RequireAuth=We,_.SentryConfig=Be,_.getOrvalConfig=$e,_.useInfiniteDataGrid=Xe,_.useResponseError=Je,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|