@tracktor/shared-module 0.7.0 → 0.7.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/MapBoxConfig.d.ts +20 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +149 -146
- package/dist/main.umd.cjs +9 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface MapBoxConfigProps<T> {
|
|
2
|
+
/**
|
|
3
|
+
* Mapbox instance
|
|
4
|
+
*/
|
|
5
|
+
mapbox: T & {
|
|
6
|
+
accessToken: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* MapBox access token
|
|
10
|
+
*/
|
|
11
|
+
accessToken?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This component is used to initialize MapBox
|
|
15
|
+
* @param mapbox
|
|
16
|
+
* @param accessToken
|
|
17
|
+
* @constructor
|
|
18
|
+
*/
|
|
19
|
+
declare const MapBoxConfig: <T extends unknown>({ mapbox, accessToken }: MapBoxConfigProps<T>) => null;
|
|
20
|
+
export default MapBoxConfig;
|
package/dist/main.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { default as SentryConfig } from './components/Utils/SentryConfig';
|
|
|
10
10
|
export * from './components/Utils/SentryConfig';
|
|
11
11
|
export { default as MaskTextField } from './components/Inputs/MaskTextField';
|
|
12
12
|
export * from './components/Inputs/MaskTextField';
|
|
13
|
+
export { default as MapBoxConfig } from './components/Utils/MapBoxConfig';
|
|
14
|
+
export * from './components/Utils/MapBoxConfig';
|
|
13
15
|
export { default as InjectDependenciesProvider } from './context/InjectDependenciesProvider';
|
|
14
16
|
export * from './context/InjectDependenciesProvider';
|
|
15
17
|
export { default as QueryClientConfigProvider } from './context/QueryClientConfigProvider';
|
package/dist/main.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import Ie, { createContext as vr, useMemo as Le, useContext as
|
|
2
|
-
var
|
|
1
|
+
import Ie, { createContext as vr, useMemo as Le, useContext as ie, useState as pr, useLayoutEffect as J, Suspense as gr, useEffect as hr, useCallback as mr } from "react";
|
|
2
|
+
var oe = {}, Er = {
|
|
3
3
|
get exports() {
|
|
4
|
-
return
|
|
4
|
+
return oe;
|
|
5
5
|
},
|
|
6
6
|
set exports(n) {
|
|
7
|
-
|
|
7
|
+
oe = n;
|
|
8
8
|
}
|
|
9
|
-
},
|
|
9
|
+
}, M = {};
|
|
10
10
|
/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.production.min.js
|
|
@@ -19,9 +19,9 @@ var ae = {}, Er = {
|
|
|
19
19
|
var De;
|
|
20
20
|
function yr() {
|
|
21
21
|
if (De)
|
|
22
|
-
return
|
|
22
|
+
return M;
|
|
23
23
|
De = 1;
|
|
24
|
-
var n = Ie,
|
|
24
|
+
var n = Ie, l = Symbol.for("react.element"), g = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, c = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
25
|
function i(y, p, T) {
|
|
26
26
|
var b, _ = {}, O = null, w = null;
|
|
27
27
|
T !== void 0 && (O = "" + T), p.key !== void 0 && (O = "" + p.key), p.ref !== void 0 && (w = p.ref);
|
|
@@ -30,11 +30,11 @@ function yr() {
|
|
|
30
30
|
if (y && y.defaultProps)
|
|
31
31
|
for (b in p = y.defaultProps, p)
|
|
32
32
|
_[b] === void 0 && (_[b] = p[b]);
|
|
33
|
-
return { $$typeof:
|
|
33
|
+
return { $$typeof: l, type: y, key: O, ref: w, props: _, _owner: c.current };
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return M.Fragment = g, M.jsx = i, M.jsxs = i, M;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var N = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -47,15 +47,15 @@ var W = {};
|
|
|
47
47
|
var Fe;
|
|
48
48
|
function br() {
|
|
49
49
|
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
-
var n = Ie,
|
|
51
|
-
function
|
|
50
|
+
var n = Ie, l = Symbol.for("react.element"), g = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), y = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), x = Symbol.iterator, A = "@@iterator";
|
|
51
|
+
function W(e) {
|
|
52
52
|
if (e === null || typeof e != "object")
|
|
53
53
|
return null;
|
|
54
54
|
var r = x && e[x] || e[A];
|
|
55
55
|
return typeof r == "function" ? r : null;
|
|
56
56
|
}
|
|
57
57
|
var S = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
58
|
-
function
|
|
58
|
+
function f(e) {
|
|
59
59
|
{
|
|
60
60
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
61
61
|
t[a - 1] = arguments[a];
|
|
@@ -64,29 +64,29 @@ function br() {
|
|
|
64
64
|
}
|
|
65
65
|
function ue(e, r, t) {
|
|
66
66
|
{
|
|
67
|
-
var a = S.ReactDebugCurrentFrame,
|
|
68
|
-
|
|
67
|
+
var a = S.ReactDebugCurrentFrame, d = a.getStackAddendum();
|
|
68
|
+
d !== "" && (r += "%s", t = t.concat([d]));
|
|
69
69
|
var v = t.map(function(s) {
|
|
70
70
|
return String(s);
|
|
71
71
|
});
|
|
72
72
|
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
var se = !1,
|
|
75
|
+
var se = !1, Y = !1, $e = !1, Me = !1, Ne = !1, le;
|
|
76
76
|
le = Symbol.for("react.module.reference");
|
|
77
|
-
function
|
|
78
|
-
return !!(typeof e == "string" || typeof e == "function" || e === h || e === u ||
|
|
77
|
+
function We(e) {
|
|
78
|
+
return !!(typeof e == "string" || typeof e == "function" || e === h || e === u || Ne || e === c || e === T || e === b || Me || e === w || se || Y || $e || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === _ || e.$$typeof === i || e.$$typeof === y || e.$$typeof === p || // This needs to include all possible module reference object
|
|
79
79
|
// types supported by any Flight configuration anywhere since
|
|
80
80
|
// we don't know which Flight build this will end up being used
|
|
81
81
|
// with.
|
|
82
82
|
e.$$typeof === le || e.getModuleId !== void 0));
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Ye(e, r, t) {
|
|
85
85
|
var a = e.displayName;
|
|
86
86
|
if (a)
|
|
87
87
|
return a;
|
|
88
|
-
var
|
|
89
|
-
return
|
|
88
|
+
var d = r.displayName || r.name || "";
|
|
89
|
+
return d !== "" ? t + "(" + d + ")" : t;
|
|
90
90
|
}
|
|
91
91
|
function ce(e) {
|
|
92
92
|
return e.displayName || "Context";
|
|
@@ -94,7 +94,7 @@ function br() {
|
|
|
94
94
|
function P(e) {
|
|
95
95
|
if (e == null)
|
|
96
96
|
return null;
|
|
97
|
-
if (typeof e.tag == "number" &&
|
|
97
|
+
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
98
98
|
return e.displayName || e.name || null;
|
|
99
99
|
if (typeof e == "string")
|
|
100
100
|
return e;
|
|
@@ -105,7 +105,7 @@ function br() {
|
|
|
105
105
|
return "Portal";
|
|
106
106
|
case u:
|
|
107
107
|
return "Profiler";
|
|
108
|
-
case
|
|
108
|
+
case c:
|
|
109
109
|
return "StrictMode";
|
|
110
110
|
case T:
|
|
111
111
|
return "Suspense";
|
|
@@ -121,12 +121,12 @@ function br() {
|
|
|
121
121
|
var t = e;
|
|
122
122
|
return ce(t._context) + ".Provider";
|
|
123
123
|
case p:
|
|
124
|
-
return
|
|
124
|
+
return Ye(e, e.render, "ForwardRef");
|
|
125
125
|
case _:
|
|
126
126
|
var a = e.displayName || null;
|
|
127
127
|
return a !== null ? a : P(e.type) || "Memo";
|
|
128
128
|
case O: {
|
|
129
|
-
var
|
|
129
|
+
var d = e, v = d._payload, s = d._init;
|
|
130
130
|
try {
|
|
131
131
|
return P(s(v));
|
|
132
132
|
} catch {
|
|
@@ -195,30 +195,30 @@ function br() {
|
|
|
195
195
|
})
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
L < 0 &&
|
|
198
|
+
L < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
var
|
|
201
|
+
var K = S.ReactCurrentDispatcher, X;
|
|
202
202
|
function V(e, r, t) {
|
|
203
203
|
{
|
|
204
|
-
if (
|
|
204
|
+
if (X === void 0)
|
|
205
205
|
try {
|
|
206
206
|
throw Error();
|
|
207
|
-
} catch (
|
|
208
|
-
var a =
|
|
209
|
-
|
|
207
|
+
} catch (d) {
|
|
208
|
+
var a = d.stack.trim().match(/\n( *(at )?)/);
|
|
209
|
+
X = a && a[1] || "";
|
|
210
210
|
}
|
|
211
211
|
return `
|
|
212
|
-
` +
|
|
212
|
+
` + X + e;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
var
|
|
215
|
+
var Q = !1, U;
|
|
216
216
|
{
|
|
217
217
|
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
218
218
|
U = new qe();
|
|
219
219
|
}
|
|
220
220
|
function ye(e, r) {
|
|
221
|
-
if (!e ||
|
|
221
|
+
if (!e || Q)
|
|
222
222
|
return "";
|
|
223
223
|
{
|
|
224
224
|
var t = U.get(e);
|
|
@@ -226,11 +226,11 @@ function br() {
|
|
|
226
226
|
return t;
|
|
227
227
|
}
|
|
228
228
|
var a;
|
|
229
|
-
|
|
230
|
-
var
|
|
229
|
+
Q = !0;
|
|
230
|
+
var d = Error.prepareStackTrace;
|
|
231
231
|
Error.prepareStackTrace = void 0;
|
|
232
232
|
var v;
|
|
233
|
-
v =
|
|
233
|
+
v = K.current, K.current = null, Ve();
|
|
234
234
|
try {
|
|
235
235
|
if (r) {
|
|
236
236
|
var s = function() {
|
|
@@ -283,7 +283,7 @@ function br() {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
} finally {
|
|
286
|
-
|
|
286
|
+
Q = !1, K.current = v, Ue(), Error.prepareStackTrace = d;
|
|
287
287
|
}
|
|
288
288
|
var I = e ? e.displayName || e.name : "", Ae = I ? V(I) : "";
|
|
289
289
|
return typeof e == "function" && U.set(e, Ae), Ae;
|
|
@@ -315,9 +315,9 @@ function br() {
|
|
|
315
315
|
case _:
|
|
316
316
|
return q(e.type, r, t);
|
|
317
317
|
case O: {
|
|
318
|
-
var a = e,
|
|
318
|
+
var a = e, d = a._payload, v = a._init;
|
|
319
319
|
try {
|
|
320
|
-
return q(v(
|
|
320
|
+
return q(v(d), r, t);
|
|
321
321
|
} catch {
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -332,7 +332,7 @@ function br() {
|
|
|
332
332
|
} else
|
|
333
333
|
Re.setExtraStackFrame(null);
|
|
334
334
|
}
|
|
335
|
-
function ze(e, r, t, a,
|
|
335
|
+
function ze(e, r, t, a, d) {
|
|
336
336
|
{
|
|
337
337
|
var v = Function.call.bind(B);
|
|
338
338
|
for (var s in e)
|
|
@@ -347,12 +347,12 @@ function br() {
|
|
|
347
347
|
} catch (m) {
|
|
348
348
|
o = m;
|
|
349
349
|
}
|
|
350
|
-
o && !(o instanceof Error) && (G(
|
|
350
|
+
o && !(o instanceof Error) && (G(d), f("%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, s, typeof o), G(null)), o instanceof Error && !(o.message in be) && (be[o.message] = !0, G(d), f("Failed %s type: %s", t, o.message), G(null));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
var Je = Array.isArray;
|
|
355
|
-
function
|
|
355
|
+
function Z(e) {
|
|
356
356
|
return Je(e);
|
|
357
357
|
}
|
|
358
358
|
function He(e) {
|
|
@@ -373,15 +373,15 @@ function br() {
|
|
|
373
373
|
}
|
|
374
374
|
function Te(e) {
|
|
375
375
|
if (Ke(e))
|
|
376
|
-
return
|
|
376
|
+
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), _e(e);
|
|
377
377
|
}
|
|
378
378
|
var $ = S.ReactCurrentOwner, Xe = {
|
|
379
379
|
key: !0,
|
|
380
380
|
ref: !0,
|
|
381
381
|
__self: !0,
|
|
382
382
|
__source: !0
|
|
383
|
-
}, we, Oe,
|
|
384
|
-
|
|
383
|
+
}, we, Oe, ee;
|
|
384
|
+
ee = {};
|
|
385
385
|
function Qe(e) {
|
|
386
386
|
if (B.call(e, "ref")) {
|
|
387
387
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -401,13 +401,13 @@ function br() {
|
|
|
401
401
|
function er(e, r) {
|
|
402
402
|
if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
|
|
403
403
|
var t = P($.current.type);
|
|
404
|
-
|
|
404
|
+
ee[t] || (f('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', P($.current.type), e.ref), ee[t] = !0);
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
function rr(e, r) {
|
|
408
408
|
{
|
|
409
409
|
var t = function() {
|
|
410
|
-
we || (we = !0,
|
|
410
|
+
we || (we = !0, f("%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));
|
|
411
411
|
};
|
|
412
412
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
413
413
|
get: t,
|
|
@@ -418,7 +418,7 @@ function br() {
|
|
|
418
418
|
function tr(e, r) {
|
|
419
419
|
{
|
|
420
420
|
var t = function() {
|
|
421
|
-
Oe || (Oe = !0,
|
|
421
|
+
Oe || (Oe = !0, f("%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));
|
|
422
422
|
};
|
|
423
423
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
424
424
|
get: t,
|
|
@@ -426,10 +426,10 @@ function br() {
|
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
var nr = function(e, r, t, a,
|
|
429
|
+
var nr = function(e, r, t, a, d, v, s) {
|
|
430
430
|
var o = {
|
|
431
431
|
// This tag allows us to uniquely identify this as a React Element
|
|
432
|
-
$$typeof:
|
|
432
|
+
$$typeof: l,
|
|
433
433
|
// Built-in properties that belong on the element
|
|
434
434
|
type: e,
|
|
435
435
|
key: r,
|
|
@@ -452,13 +452,13 @@ function br() {
|
|
|
452
452
|
configurable: !1,
|
|
453
453
|
enumerable: !1,
|
|
454
454
|
writable: !1,
|
|
455
|
-
value:
|
|
455
|
+
value: d
|
|
456
456
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
457
457
|
};
|
|
458
|
-
function ar(e, r, t, a,
|
|
458
|
+
function ar(e, r, t, a, d) {
|
|
459
459
|
{
|
|
460
460
|
var v, s = {}, o = null, R = null;
|
|
461
|
-
t !== void 0 && (Te(t), o = "" + t), Ze(r) && (Te(r.key), o = "" + r.key), Qe(r) && (R = r.ref, er(r,
|
|
461
|
+
t !== void 0 && (Te(t), o = "" + t), Ze(r) && (Te(r.key), o = "" + r.key), Qe(r) && (R = r.ref, er(r, d));
|
|
462
462
|
for (v in r)
|
|
463
463
|
B.call(r, v) && !Xe.hasOwnProperty(v) && (s[v] = r[v]);
|
|
464
464
|
if (e && e.defaultProps) {
|
|
@@ -470,10 +470,10 @@ function br() {
|
|
|
470
470
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
471
471
|
o && rr(s, E), R && tr(s, E);
|
|
472
472
|
}
|
|
473
|
-
return nr(e, o, R,
|
|
473
|
+
return nr(e, o, R, d, a, $.current, s);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
var
|
|
476
|
+
var re = S.ReactCurrentOwner, Ce = S.ReactDebugCurrentFrame;
|
|
477
477
|
function F(e) {
|
|
478
478
|
if (e) {
|
|
479
479
|
var r = e._owner, t = q(e.type, e._source, r ? r.type : null);
|
|
@@ -481,15 +481,15 @@ function br() {
|
|
|
481
481
|
} else
|
|
482
482
|
Ce.setExtraStackFrame(null);
|
|
483
483
|
}
|
|
484
|
-
var
|
|
485
|
-
|
|
486
|
-
function
|
|
487
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
484
|
+
var te;
|
|
485
|
+
te = !1;
|
|
486
|
+
function ne(e) {
|
|
487
|
+
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
488
488
|
}
|
|
489
489
|
function Se() {
|
|
490
490
|
{
|
|
491
|
-
if (
|
|
492
|
-
var e = P(
|
|
491
|
+
if (re.current) {
|
|
492
|
+
var e = P(re.current.type);
|
|
493
493
|
if (e)
|
|
494
494
|
return `
|
|
495
495
|
|
|
@@ -532,25 +532,25 @@ Check the top-level render call using <` + t + ">.");
|
|
|
532
532
|
return;
|
|
533
533
|
Pe[t] = !0;
|
|
534
534
|
var a = "";
|
|
535
|
-
e && e._owner && e._owner !==
|
|
535
|
+
e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + P(e._owner.type) + "."), F(e), f('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);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
function ke(e, r) {
|
|
539
539
|
{
|
|
540
540
|
if (typeof e != "object")
|
|
541
541
|
return;
|
|
542
|
-
if (
|
|
542
|
+
if (Z(e))
|
|
543
543
|
for (var t = 0; t < e.length; t++) {
|
|
544
544
|
var a = e[t];
|
|
545
|
-
|
|
545
|
+
ne(a) && je(a, r);
|
|
546
546
|
}
|
|
547
|
-
else if (
|
|
547
|
+
else if (ne(e))
|
|
548
548
|
e._store && (e._store.validated = !0);
|
|
549
549
|
else if (e) {
|
|
550
|
-
var
|
|
551
|
-
if (typeof
|
|
552
|
-
for (var v =
|
|
553
|
-
|
|
550
|
+
var d = W(e);
|
|
551
|
+
if (typeof d == "function" && d !== e.entries)
|
|
552
|
+
for (var v = d.call(e), s; !(s = v.next()).done; )
|
|
553
|
+
ne(s.value) && je(s.value, r);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
@@ -571,12 +571,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
571
571
|
if (t) {
|
|
572
572
|
var a = P(r);
|
|
573
573
|
ze(t, e.props, "prop", a, e);
|
|
574
|
-
} else if (r.PropTypes !== void 0 && !
|
|
575
|
-
|
|
576
|
-
var
|
|
577
|
-
|
|
574
|
+
} else if (r.PropTypes !== void 0 && !te) {
|
|
575
|
+
te = !0;
|
|
576
|
+
var d = P(r);
|
|
577
|
+
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
|
|
578
578
|
}
|
|
579
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
579
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
function sr(e) {
|
|
@@ -584,37 +584,37 @@ Check the top-level render call using <` + t + ">.");
|
|
|
584
584
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
585
585
|
var a = r[t];
|
|
586
586
|
if (a !== "children" && a !== "key") {
|
|
587
|
-
F(e),
|
|
587
|
+
F(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), F(null);
|
|
588
588
|
break;
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
e.ref !== null && (F(e),
|
|
591
|
+
e.ref !== null && (F(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
function xe(e, r, t, a,
|
|
594
|
+
function xe(e, r, t, a, d, v) {
|
|
595
595
|
{
|
|
596
|
-
var s =
|
|
596
|
+
var s = We(e);
|
|
597
597
|
if (!s) {
|
|
598
598
|
var o = "";
|
|
599
599
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
600
|
-
var R = or(
|
|
600
|
+
var R = or(d);
|
|
601
601
|
R ? o += R : o += Se();
|
|
602
602
|
var m;
|
|
603
|
-
e === null ? m = "null" :
|
|
603
|
+
e === null ? m = "null" : Z(e) ? m = "array" : e !== void 0 && e.$$typeof === l ? (m = "<" + (P(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : m = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", m, o);
|
|
604
604
|
}
|
|
605
|
-
var E = ar(e, r, t,
|
|
605
|
+
var E = ar(e, r, t, d, v);
|
|
606
606
|
if (E == null)
|
|
607
607
|
return E;
|
|
608
608
|
if (s) {
|
|
609
609
|
var C = r.children;
|
|
610
610
|
if (C !== void 0)
|
|
611
611
|
if (a)
|
|
612
|
-
if (
|
|
612
|
+
if (Z(C)) {
|
|
613
613
|
for (var I = 0; I < C.length; I++)
|
|
614
614
|
ke(C[I], e);
|
|
615
615
|
Object.freeze && Object.freeze(C);
|
|
616
616
|
} else
|
|
617
|
-
|
|
617
|
+
f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
618
618
|
else
|
|
619
619
|
ke(C, e);
|
|
620
620
|
}
|
|
@@ -628,13 +628,13 @@ Check the top-level render call using <` + t + ">.");
|
|
|
628
628
|
return xe(e, r, t, !1);
|
|
629
629
|
}
|
|
630
630
|
var fr = cr, dr = lr;
|
|
631
|
-
|
|
632
|
-
}()),
|
|
631
|
+
N.Fragment = h, N.jsx = fr, N.jsxs = dr;
|
|
632
|
+
}()), N;
|
|
633
633
|
}
|
|
634
634
|
(function(n) {
|
|
635
635
|
process.env.NODE_ENV === "production" ? n.exports = yr() : n.exports = br();
|
|
636
636
|
})(Er);
|
|
637
|
-
const k =
|
|
637
|
+
const k = oe.jsx, H = vr({
|
|
638
638
|
axios: void 0,
|
|
639
639
|
children: void 0,
|
|
640
640
|
Navigate: void 0,
|
|
@@ -644,10 +644,10 @@ const k = ae.jsx, J = vr({
|
|
|
644
644
|
useLocation: void 0
|
|
645
645
|
}), _r = ({
|
|
646
646
|
axios: n,
|
|
647
|
-
children:
|
|
647
|
+
children: l,
|
|
648
648
|
translate: g,
|
|
649
649
|
useAuth: h,
|
|
650
|
-
Outlet:
|
|
650
|
+
Outlet: c,
|
|
651
651
|
Navigate: u,
|
|
652
652
|
useLocation: i,
|
|
653
653
|
useGoogleTagManager: y
|
|
@@ -656,30 +656,30 @@ const k = ae.jsx, J = vr({
|
|
|
656
656
|
() => ({
|
|
657
657
|
axios: n,
|
|
658
658
|
Navigate: u,
|
|
659
|
-
Outlet:
|
|
659
|
+
Outlet: c,
|
|
660
660
|
translate: g,
|
|
661
661
|
useAuth: h,
|
|
662
662
|
useGoogleTagManager: y,
|
|
663
663
|
useLocation: i
|
|
664
664
|
}),
|
|
665
|
-
[u,
|
|
665
|
+
[u, c, n, g, h, y, i]
|
|
666
666
|
);
|
|
667
|
-
return /* @__PURE__ */ k(
|
|
667
|
+
return /* @__PURE__ */ k(H.Provider, { value: p, children: l });
|
|
668
668
|
}, z = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Tr = ({
|
|
669
669
|
Fallback: n,
|
|
670
|
-
loginPath:
|
|
670
|
+
loginPath: l = "/login",
|
|
671
671
|
localStorageKey: g = "user",
|
|
672
672
|
redirect401Path: h = "/login",
|
|
673
|
-
...
|
|
673
|
+
...c
|
|
674
674
|
}) => {
|
|
675
|
-
var x, A,
|
|
675
|
+
var x, A, W, S;
|
|
676
676
|
const {
|
|
677
|
-
axios: u =
|
|
678
|
-
useLocation: i =
|
|
679
|
-
useAuth: y =
|
|
680
|
-
Outlet: p =
|
|
681
|
-
Navigate: T =
|
|
682
|
-
} =
|
|
677
|
+
axios: u = c.axios,
|
|
678
|
+
useLocation: i = c.useLocation,
|
|
679
|
+
useAuth: y = c.useAuth,
|
|
680
|
+
Outlet: p = c.Outlet,
|
|
681
|
+
Navigate: T = c.Navigate
|
|
682
|
+
} = ie(H);
|
|
683
683
|
if (y === void 0)
|
|
684
684
|
throw new Error(z("useAuth"));
|
|
685
685
|
if (i === void 0)
|
|
@@ -689,55 +689,55 @@ const k = ae.jsx, J = vr({
|
|
|
689
689
|
if (T === void 0)
|
|
690
690
|
throw new Error(z("Navigate"));
|
|
691
691
|
const [b, _] = pr(null), { isLogged: O } = y(), w = i();
|
|
692
|
-
return
|
|
692
|
+
return J(() => {
|
|
693
693
|
u == null || u.interceptors.response.use(
|
|
694
|
-
(
|
|
695
|
-
async (
|
|
696
|
-
var
|
|
697
|
-
return typeof
|
|
694
|
+
(f) => f,
|
|
695
|
+
async (f) => {
|
|
696
|
+
var Y;
|
|
697
|
+
return typeof f == "object" && f && "response" in f && f.response && typeof f.response == "object" && "status" in f.response && f.response && typeof f.response == "object" && "status" in f.response && ((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 401 && (u.defaults.headers.common.Authorization = null, localStorage.removeItem(g), _(h)), Promise.reject(f);
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
|
-
}, [u == null ? void 0 : u.defaults, u == null ? void 0 : u.interceptors.response, g, h]), O && !b ? /* @__PURE__ */ k(gr, { fallback: n, children: (A = (x = w.state) == null ? void 0 : x.from) != null && A.state && ((S = (
|
|
701
|
-
},
|
|
700
|
+
}, [u == null ? void 0 : u.defaults, u == null ? void 0 : u.interceptors.response, g, h]), O && !b ? /* @__PURE__ */ k(gr, { fallback: n, children: (A = (x = w.state) == null ? void 0 : x.from) != null && A.state && ((S = (W = w.state) == null ? void 0 : W.from) == null ? void 0 : S.pathname) === l ? /* @__PURE__ */ k(T, { to: w.state.from.state.from.pathname + w.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k(p, {}) }) : /* @__PURE__ */ k(T, { to: l, state: { from: w }, replace: !0 });
|
|
701
|
+
}, ae = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, wr = ({ ...n }) => {
|
|
702
702
|
const {
|
|
703
|
-
useLocation:
|
|
703
|
+
useLocation: l = n.useLocation,
|
|
704
704
|
Outlet: g = n.Outlet,
|
|
705
705
|
useGoogleTagManager: h = n.useGoogleTagManager
|
|
706
|
-
} =
|
|
707
|
-
if (
|
|
708
|
-
throw new Error(
|
|
706
|
+
} = ie(H);
|
|
707
|
+
if (l === void 0)
|
|
708
|
+
throw new Error(ae("useLocation"));
|
|
709
709
|
if (g === void 0)
|
|
710
|
-
throw new Error(
|
|
710
|
+
throw new Error(ae("Outlet"));
|
|
711
711
|
if (h === void 0)
|
|
712
|
-
throw new Error(
|
|
713
|
-
const { pathname:
|
|
712
|
+
throw new Error(ae("useGoogleTagManager"));
|
|
713
|
+
const { pathname: c } = l(), { sendEvent: u } = h();
|
|
714
714
|
return hr(() => {
|
|
715
|
-
u({ event: "pageView", pathname:
|
|
716
|
-
}, [
|
|
715
|
+
u({ event: "pageView", pathname: c });
|
|
716
|
+
}, [c, u]), /* @__PURE__ */ k(g, {});
|
|
717
717
|
}, Or = ({
|
|
718
718
|
axios: n,
|
|
719
|
-
baseURL:
|
|
719
|
+
baseURL: l,
|
|
720
720
|
userLocalStorageKey: g = "user",
|
|
721
721
|
postContentType: h = "application/json"
|
|
722
|
-
}) => (
|
|
722
|
+
}) => (J(() => {
|
|
723
723
|
if (!n.defaults)
|
|
724
724
|
return;
|
|
725
|
-
const
|
|
726
|
-
n.defaults.baseURL =
|
|
725
|
+
const c = localStorage.getItem(g), u = c ? JSON.parse(c) : null, i = u && typeof u == "object" && "tokenType" in u && u.tokenType ? u.tokenType : null, y = u && typeof u == "object" && "accessToken" in u && u.accessToken ? u.accessToken : null, p = c ? `${i} ${y}` : null;
|
|
726
|
+
n.defaults.baseURL = l, n.defaults.headers.post["Content-Type"] = h, p && (n.defaults.headers.common.Authorization = p);
|
|
727
727
|
}, [
|
|
728
728
|
n.defaults,
|
|
729
729
|
n.defaults.baseURL,
|
|
730
730
|
n.defaults.headers.common,
|
|
731
731
|
n.defaults.headers.post,
|
|
732
|
-
|
|
732
|
+
l,
|
|
733
733
|
h,
|
|
734
734
|
g
|
|
735
735
|
]), null), Cr = ({
|
|
736
736
|
i18n: n,
|
|
737
|
-
initReactI18next:
|
|
737
|
+
initReactI18next: l,
|
|
738
738
|
resources: g,
|
|
739
739
|
LanguageDetector: h
|
|
740
|
-
}) => (n.use(h).use(
|
|
740
|
+
}) => (n.use(h).use(l).init({
|
|
741
741
|
debug: !1,
|
|
742
742
|
fallbackLng: "en",
|
|
743
743
|
interpolation: {
|
|
@@ -751,57 +751,60 @@ const k = ae.jsx, J = vr({
|
|
|
751
751
|
returnNull: !1
|
|
752
752
|
}).then(() => {
|
|
753
753
|
document.documentElement.lang !== n.resolvedLanguage && n.resolvedLanguage && document.documentElement.setAttribute("lang", n.resolvedLanguage);
|
|
754
|
-
}), n.on("languageChanged", (
|
|
755
|
-
document.documentElement.setAttribute("lang",
|
|
756
|
-
}), null), Sr = ({ dsn: n, sentry:
|
|
757
|
-
|
|
754
|
+
}), n.on("languageChanged", (c) => {
|
|
755
|
+
document.documentElement.setAttribute("lang", c);
|
|
756
|
+
}), null), Sr = ({ dsn: n, sentry: l }) => (J(() => {
|
|
757
|
+
l && process.env.NODE_ENV !== "development" && l.init({
|
|
758
758
|
dsn: n,
|
|
759
|
-
integrations: [new
|
|
759
|
+
integrations: [new l.BrowserTracing()],
|
|
760
760
|
tracesSampleRate: 1
|
|
761
761
|
});
|
|
762
|
-
}, [n,
|
|
762
|
+
}, [n, l]), null), Pr = ({ IMaskMixin: n, ...l }) => {
|
|
763
763
|
const g = Le(
|
|
764
764
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
765
|
-
() => n(({ TextField: h, ...
|
|
765
|
+
() => n(({ TextField: h, ...c }) => /* @__PURE__ */ k(h, { ...c })),
|
|
766
766
|
[n]
|
|
767
767
|
);
|
|
768
|
-
return /* @__PURE__ */ k(g, { ...
|
|
769
|
-
}, jr = ({
|
|
768
|
+
return /* @__PURE__ */ k(g, { ...l });
|
|
769
|
+
}, jr = ({ mapbox: n, accessToken: l }) => (J(() => {
|
|
770
|
+
n && (n.accessToken = l || "");
|
|
771
|
+
}, [l, n]), null), kr = ({
|
|
770
772
|
children: n,
|
|
771
|
-
defaultOptions:
|
|
773
|
+
defaultOptions: l,
|
|
772
774
|
QueryClient: g,
|
|
773
775
|
QueryClientProvider: h
|
|
774
776
|
}) => {
|
|
775
|
-
const
|
|
777
|
+
const c = new g({
|
|
776
778
|
defaultOptions: {
|
|
777
779
|
queries: {
|
|
778
780
|
refetchOnWindowFocus: !1,
|
|
779
781
|
retry: 3,
|
|
780
|
-
...
|
|
782
|
+
...l
|
|
781
783
|
}
|
|
782
784
|
}
|
|
783
785
|
});
|
|
784
|
-
return /* @__PURE__ */ k(h, { client:
|
|
785
|
-
},
|
|
786
|
-
const { unknownErrorTranslationKey:
|
|
786
|
+
return /* @__PURE__ */ k(h, { client: c, children: n });
|
|
787
|
+
}, xr = (n) => {
|
|
788
|
+
const { unknownErrorTranslationKey: l = "error.unknownError" } = n || {}, { translate: g = n == null ? void 0 : n.translate } = ie(H);
|
|
787
789
|
return { printError: mr(
|
|
788
|
-
(
|
|
790
|
+
(c) => {
|
|
789
791
|
var y, p, T, b, _, O, w, x, A;
|
|
790
|
-
const u = g ? g(
|
|
791
|
-
return
|
|
792
|
+
const u = g ? g(l) : "Unknown error", { response: i } = c || {};
|
|
793
|
+
return c != null && c.reason ? String(c.reason) : (y = i == null ? void 0 : i.data) != null && y.reason ? String(i.data.reason) : (p = i == null ? void 0 : i.data) != null && p.message ? String(i.data.message) : (b = (T = i == null ? void 0 : i.data) == null ? void 0 : T.detail) != null && b.length && Array.isArray((_ = i == null ? void 0 : i.data) == null ? void 0 : _.detail) && ((w = (O = i == null ? void 0 : i.data) == null ? void 0 : O.detail[0]) != null && w.msg) && typeof ((A = (x = i == null ? void 0 : i.data) == null ? void 0 : x.detail[0]) == null ? void 0 : A.msg) == "string" ? String(i.data.detail[0].msg) : u;
|
|
792
794
|
},
|
|
793
|
-
[g,
|
|
795
|
+
[g, l]
|
|
794
796
|
) };
|
|
795
797
|
};
|
|
796
798
|
export {
|
|
797
799
|
Or as AxiosConfig,
|
|
798
800
|
wr as GTMSendPageView,
|
|
799
801
|
Cr as I18nConfig,
|
|
800
|
-
|
|
802
|
+
H as InjectDependenciesContext,
|
|
801
803
|
_r as InjectDependenciesProvider,
|
|
804
|
+
jr as MapBoxConfig,
|
|
802
805
|
Pr as MaskTextField,
|
|
803
|
-
|
|
806
|
+
kr as QueryClientConfigProvider,
|
|
804
807
|
Tr as RequireAuth,
|
|
805
808
|
Sr as SentryConfig,
|
|
806
|
-
|
|
809
|
+
xr as useResponseError
|
|
807
810
|
};
|
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 Z={},Ie={get exports(){return Z},set exports(n){Z=n}},N={};/**
|
|
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 ue;function Le(){if(ue)return N;ue=1;var n=
|
|
9
|
+
*/var ue;function Le(){if(ue)return N;ue=1;var n=E,c=Symbol.for("react.element"),p=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function i(b,g,C){var R,w={},S=null,O=null;C!==void 0&&(S=""+C),g.key!==void 0&&(S=""+g.key),g.ref!==void 0&&(O=g.ref);for(R in g)h.call(g,R)&&!u.hasOwnProperty(R)&&(w[R]=g[R]);if(b&&b.defaultProps)for(R in g=b.defaultProps,g)w[R]===void 0&&(w[R]=g[R]);return{$$typeof:c,type:b,key:S,ref:O,props:w,_owner:l.current}}return N.Fragment=p,N.jsx=i,N.jsxs=i,N}var W={};/**
|
|
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 se;function Me(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var n=
|
|
18
|
-
`+ee+e}}var re=!1,H;{var
|
|
17
|
+
*/var se;function Me(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var n=E,c=Symbol.for("react.element"),p=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),b=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function G(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 f(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,d=a.getStackAddendum();d!==""&&(r+="%s",t=t.concat([d]));var v=t.map(function(s){return String(s)});v.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,v)}}var le=!1,z=!1,Ke=!1,Xe=!1,Qe=!1,fe;fe=Symbol.for("react.module.reference");function Ze(e){return!!(typeof e=="string"||typeof e=="function"||e===h||e===u||Qe||e===l||e===C||e===R||Xe||e===O||le||z||Ke||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===w||e.$$typeof===i||e.$$typeof===b||e.$$typeof===g||e.$$typeof===fe||e.getModuleId!==void 0))}function qe(e,r,t){var a=e.displayName;if(a)return a;var d=r.displayName||r.name||"";return d!==""?t+"("+d+")":t}function de(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&f("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 h:return"Fragment";case p:return"Portal";case u:return"Profiler";case l:return"StrictMode";case C:return"Suspense";case R:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:var r=e;return de(r)+".Consumer";case i:var t=e;return de(t._context)+".Provider";case g:return qe(e,e.render,"ForwardRef");case w:var a=e.displayName||null;return a!==null?a:A(e.type)||"Memo";case S:{var d=e,v=d._payload,s=d._init;try{return A(s(v))}catch{return null}}}return null}var I=Object.assign,V=0,ve,ge,pe,he,me,Ee,ye;function be(){}be.__reactDisabledLog=!0;function $e(){{if(V===0){ve=console.log,ge=console.info,pe=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 er(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:ve}),info:I({},e,{value:ge}),warn:I({},e,{value:pe}),error:I({},e,{value:he}),group:I({},e,{value:me}),groupCollapsed:I({},e,{value:Ee}),groupEnd:I({},e,{value:ye})})}V<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=k.ReactCurrentDispatcher,ee;function J(e,r,t){{if(ee===void 0)try{throw Error()}catch(d){var a=d.stack.trim().match(/\n( *(at )?)/);ee=a&&a[1]||""}return`
|
|
18
|
+
`+ee+e}}var re=!1,H;{var rr=typeof WeakMap=="function"?WeakMap:Map;H=new rr}function Re(e,r){if(!e||re)return"";{var t=H.get(e);if(t!==void 0)return t}var a;re=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=$.current,$.current=null,$e();try{if(r){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(x){a=x}Reflect.construct(e,[],s)}else{try{s.call()}catch(x){a=x}e.call(s.prototype)}}else{try{throw Error()}catch(x){a=x}e()}}catch(x){if(x&&a&&typeof x.stack=="string"){for(var o=x.stack.split(`
|
|
19
19
|
`),T=a.stack.split(`
|
|
20
|
-
`),m=o.length-1,
|
|
21
|
-
`+o[m].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,P),P}while(m>=1&&
|
|
20
|
+
`),m=o.length-1,y=T.length-1;m>=1&&y>=0&&o[m]!==T[y];)y--;for(;m>=1&&y>=0;m--,y--)if(o[m]!==T[y]){if(m!==1||y!==1)do if(m--,y--,y<0||o[m]!==T[y]){var P=`
|
|
21
|
+
`+o[m].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,P),P}while(m>=1&&y>=0);break}}}finally{re=!1,$.current=v,er(),Error.prepareStackTrace=d}var M=e?e.displayName||e.name:"",Fe=M?J(M):"";return typeof e=="function"&&H.set(e,Fe),Fe}function tr(e,r,t){return Re(e,!1)}function nr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return Re(e,nr(e));if(typeof e=="string")return J(e);switch(e){case C:return J("Suspense");case R:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return tr(e.render);case w:return K(e.type,r,t);case S:{var a=e,d=a._payload,v=a._init;try{return K(v(d),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,_e={},Te=k.ReactDebugCurrentFrame;function Q(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function ar(e,r,t,a,d){{var v=Function.call.bind(X);for(var s in e)if(v(e,s)){var o=void 0;try{if(typeof e[s]!="function"){var T=Error((a||"React class")+": "+t+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}o=e[s](r,s,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(Q(d),f("%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,s,typeof o),Q(null)),o instanceof Error&&!(o.message in _e)&&(_e[o.message]=!0,Q(d),f("Failed %s type: %s",t,o.message),Q(null))}}}var or=Array.isArray;function te(e){return or(e)}function ir(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ur(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Ce(e){if(ur(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ir(e)),we(e)}var U=k.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Oe,Se,ne;ne={};function cr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function lr(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function fr(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=A(U.current.type);ne[t]||(f('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(U.current.type),e.ref),ne[t]=!0)}}function dr(e,r){{var t=function(){Oe||(Oe=!0,f("%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 vr(e,r){{var t=function(){Se||(Se=!0,f("%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 gr=function(e,r,t,a,d,v,s){var o={$$typeof:c,type:e,key:r,ref:t,props:s,_owner:v};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function pr(e,r,t,a,d){{var v,s={},o=null,T=null;t!==void 0&&(Ce(t),o=""+t),lr(r)&&(Ce(r.key),o=""+r.key),cr(r)&&(T=r.ref,fr(r,d));for(v in r)X.call(r,v)&&!sr.hasOwnProperty(v)&&(s[v]=r[v]);if(e&&e.defaultProps){var m=e.defaultProps;for(v in m)s[v]===void 0&&(s[v]=m[v])}if(o||T){var y=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&dr(s,y),T&&vr(s,y)}return gr(e,o,T,d,a,U.current,s)}}var ae=k.ReactCurrentOwner,Pe=k.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===c}function je(){{if(ae.current){var e=A(ae.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function hr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var ke={};function
|
|
25
|
+
Check your code at `+r+":"+t+"."}return""}}var ke={};function mr(e){{var r=je();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
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ae(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=mr(r);if(ke[t])return;ke[t]=!0;var a="";e&&e._owner&&e._owner!==ae.current&&(a=" It was passed a child from "+A(e._owner.type)+"."),L(e),f('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 xe(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var a=e[t];ie(a)&&Ae(a,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var d=G(e);if(typeof d=="function"&&d!==e.entries)for(var v=d.call(e),s;!(s=v.next()).done;)ie(s.value)&&Ae(s.value,r)}}}function Er(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===g||r.$$typeof===w))t=r.propTypes;else return;if(t){var a=A(r);ar(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var d=A(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",d||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function yr(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),f("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),f("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}function De(e,r,t,a,d,v){{var s=Ze(e);if(!s){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" 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 T=hr(d);T?o+=T:o+=je();var m;e===null?m="null":te(e)?m="array":e!==void 0&&e.$$typeof===c?(m="<"+(A(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var y=pr(e,r,t,d,v);if(y==null)return y;if(s){var P=r.children;if(P!==void 0)if(a)if(te(P)){for(var M=0;M<P.length;M++)xe(P[M],e);Object.freeze&&Object.freeze(P)}else f("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(P,e)}return e===h?yr(y):Er(y),y}}function br(e,r,t){return De(e,r,t,!0)}function Rr(e,r,t){return De(e,r,t,!1)}var _r=Rr,Tr=br;W.Fragment=h,W.jsx=_r,W.jsxs=Tr}()),W}(function(n){process.env.NODE_ENV==="production"?n.exports=Le():n.exports=Me()})(Ie);const j=Z.jsx,Y=E.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Ne=({axios:n,children:c,translate:p,useAuth:h,Outlet:l,Navigate:u,useLocation:i,useGoogleTagManager:b})=>{const g=E.useMemo(()=>({axios:n,Navigate:u,Outlet:l,translate:p,useAuth:h,useGoogleTagManager:b,useLocation:i}),[u,l,n,p,h,b,i]);return j(Y.Provider,{value:g,children:c})},B=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:c="/login",localStorageKey:p="user",redirect401Path:h="/login",...l})=>{var D,F,G,k;const{axios:u=l.axios,useLocation:i=l.useLocation,useAuth:b=l.useAuth,Outlet:g=l.Outlet,Navigate:C=l.Navigate}=E.useContext(Y);if(b===void 0)throw new Error(B("useAuth"));if(i===void 0)throw new Error(B("useLocation"));if(g===void 0)throw new Error(B("Outlet"));if(C===void 0)throw new Error(B("Navigate"));const[R,w]=E.useState(null),{isLogged:S}=b(),O=i();return E.useLayoutEffect(()=>{u==null||u.interceptors.response.use(f=>f,async f=>{var z;return typeof f=="object"&&f&&"response"in f&&f.response&&typeof f.response=="object"&&"status"in f.response&&f.response&&typeof f.response=="object"&&"status"in f.response&&((z=f==null?void 0:f.response)==null?void 0:z.status)===401&&(u.defaults.headers.common.Authorization=null,localStorage.removeItem(p),w(h)),Promise.reject(f)})},[u==null?void 0:u.defaults,u==null?void 0:u.interceptors.response,p,h]),S&&!R?j(E.Suspense,{fallback:n,children:(F=(D=O.state)==null?void 0:D.from)!=null&&F.state&&((k=(G=O.state)==null?void 0:G.from)==null?void 0:k.pathname)===c?j(C,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):j(g,{})}):j(C,{to:c,state:{from:O},replace:!0})},q=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({...n})=>{const{useLocation:c=n.useLocation,Outlet:p=n.Outlet,useGoogleTagManager:h=n.useGoogleTagManager}=E.useContext(Y);if(c===void 0)throw new Error(q("useLocation"));if(p===void 0)throw new Error(q("Outlet"));if(h===void 0)throw new Error(q("useGoogleTagManager"));const{pathname:l}=c(),{sendEvent:u}=h();return E.useEffect(()=>{u({event:"pageView",pathname:l})},[l,u]),j(p,{})},Ve=({axios:n,baseURL:c,userLocalStorageKey:p="user",postContentType:h="application/json"})=>(E.useLayoutEffect(()=>{if(!n.defaults)return;const l=localStorage.getItem(p),u=l?JSON.parse(l):null,i=u&&typeof u=="object"&&"tokenType"in u&&u.tokenType?u.tokenType:null,b=u&&typeof u=="object"&&"accessToken"in u&&u.accessToken?u.accessToken:null,g=l?`${i} ${b}`:null;n.defaults.baseURL=c,n.defaults.headers.post["Content-Type"]=h,g&&(n.defaults.headers.common.Authorization=g)},[n.defaults,n.defaults.baseURL,n.defaults.headers.common,n.defaults.headers.post,c,h,p]),null),Ue=({i18n:n,initReactI18next:c,resources:p,LanguageDetector:h})=>(n.use(h).use(c).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:p,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",l=>{document.documentElement.setAttribute("lang",l)}),null),Be=({dsn:n,sentry:c})=>(E.useLayoutEffect(()=>{c&&process.env.NODE_ENV!=="development"&&c.init({dsn:n,integrations:[new c.BrowserTracing],tracesSampleRate:1})},[n,c]),null),Ge=({IMaskMixin:n,...c})=>{const p=E.useMemo(()=>n(({TextField:h,...l})=>j(h,{...l})),[n]);return j(p,{...c})},ze=({mapbox:n,accessToken:c})=>(E.useLayoutEffect(()=>{n&&(n.accessToken=c||"")},[c,n]),null),Je=({children:n,defaultOptions:c,QueryClient:p,QueryClientProvider:h})=>{const l=new p({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...c}}});return j(h,{client:l,children:n})},He=n=>{const{unknownErrorTranslationKey:c="error.unknownError"}=n||{},{translate:p=n==null?void 0:n.translate}=E.useContext(Y);return{printError:E.useCallback(l=>{var b,g,C,R,w,S,O,D,F;const u=p?p(c):"Unknown error",{response:i}=l||{};return l!=null&&l.reason?String(l.reason):(b=i==null?void 0:i.data)!=null&&b.reason?String(i.data.reason):(g=i==null?void 0:i.data)!=null&&g.message?String(i.data.message):(R=(C=i==null?void 0:i.data)==null?void 0:C.detail)!=null&&R.length&&Array.isArray((w=i==null?void 0:i.data)==null?void 0:w.detail)&&((O=(S=i==null?void 0:i.data)==null?void 0:S.detail[0])!=null&&O.msg)&&typeof((F=(D=i==null?void 0:i.data)==null?void 0:D.detail[0])==null?void 0:F.msg)=="string"?String(i.data.detail[0].msg):u},[p,c])}};_.AxiosConfig=Ve,_.GTMSendPageView=Ye,_.I18nConfig=Ue,_.InjectDependenciesContext=Y,_.InjectDependenciesProvider=Ne,_.MapBoxConfig=ze,_.MaskTextField=Ge,_.QueryClientConfigProvider=Je,_.RequireAuth=We,_.SentryConfig=Be,_.useResponseError=He,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|