@tracktor/shared-module 0.14.1 → 0.15.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/SentryConfig.d.ts +28 -1
- package/dist/main.js +218 -197
- package/dist/main.umd.cjs +8 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -22,19 +22,46 @@ interface SentryConfigProps<T> {
|
|
|
22
22
|
* ignored.
|
|
23
23
|
*/
|
|
24
24
|
tracesSampleRate: number;
|
|
25
|
+
/**
|
|
26
|
+
* Sample rate to determine session sampling.
|
|
27
|
+
*/
|
|
28
|
+
replaysOnErrorSampleRate: number;
|
|
29
|
+
/**
|
|
30
|
+
* Sample rate to determine session sampling.
|
|
31
|
+
*/
|
|
32
|
+
replaysSessionSampleRate: number;
|
|
25
33
|
}) => void;
|
|
26
34
|
BrowserTracing: any;
|
|
35
|
+
/**
|
|
36
|
+
* This function is used to instrument React Router v6.
|
|
37
|
+
*/
|
|
38
|
+
Replay: any;
|
|
39
|
+
/**
|
|
40
|
+
* This function is used to instrument React Router v6.
|
|
41
|
+
*/
|
|
42
|
+
reactRouterV6Instrumentation: any;
|
|
27
43
|
};
|
|
28
44
|
/**
|
|
29
45
|
* Sentry DSN
|
|
30
46
|
*/
|
|
31
47
|
dsn: string;
|
|
48
|
+
/**
|
|
49
|
+
* List of integrations that should be installed after SDK was initialized.
|
|
50
|
+
*/
|
|
51
|
+
routingInstrumentationDependencies: {
|
|
52
|
+
useEffect: any;
|
|
53
|
+
useLocation: any;
|
|
54
|
+
useNavigationType: any;
|
|
55
|
+
createRoutesFromChildren: any;
|
|
56
|
+
matchRoutes: any;
|
|
57
|
+
};
|
|
32
58
|
}
|
|
33
59
|
/**
|
|
34
60
|
* This component is used to initialize Sentry
|
|
35
61
|
* @param dsn
|
|
36
62
|
* @param sentry
|
|
63
|
+
* @param integrations
|
|
37
64
|
* @constructor
|
|
38
65
|
*/
|
|
39
|
-
declare const SentryConfig: <T extends unknown>({ dsn, sentry }: SentryConfigProps<T>) => null;
|
|
66
|
+
declare const SentryConfig: <T extends unknown>({ dsn, sentry, routingInstrumentationDependencies }: SentryConfigProps<T>) => null;
|
|
40
67
|
export default SentryConfig;
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var ie = { exports: {} },
|
|
1
|
+
import We, { createContext as pr, useMemo as ue, useContext as se, useState as gr, useLayoutEffect as X, Suspense as hr, useEffect as mr, useCallback as J } from "react";
|
|
2
|
+
var ie = { exports: {} }, N = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,25 +9,25 @@ var ie = { exports: {} }, W = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
12
|
+
var De;
|
|
13
13
|
function Er() {
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
var n =
|
|
18
|
-
function s(h, f,
|
|
14
|
+
if (De)
|
|
15
|
+
return N;
|
|
16
|
+
De = 1;
|
|
17
|
+
var n = We, o = Symbol.for("react.element"), a = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, u = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function s(h, f, b) {
|
|
19
19
|
var E, w = {}, T = null, C = null;
|
|
20
|
-
|
|
20
|
+
b !== void 0 && (T = "" + b), f.key !== void 0 && (T = "" + f.key), f.ref !== void 0 && (C = f.ref);
|
|
21
21
|
for (E in f)
|
|
22
22
|
l.call(f, E) && !g.hasOwnProperty(E) && (w[E] = f[E]);
|
|
23
23
|
if (h && h.defaultProps)
|
|
24
24
|
for (E in f = h.defaultProps, f)
|
|
25
25
|
w[E] === void 0 && (w[E] = f[E]);
|
|
26
|
-
return { $$typeof:
|
|
26
|
+
return { $$typeof: o, type: h, key: T, ref: C, props: w, _owner: u.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return N.Fragment = a, N.jsx = s, N.jsxs = s, N;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var I = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -37,11 +37,11 @@ var M = {};
|
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
var n =
|
|
44
|
-
function
|
|
40
|
+
var Le;
|
|
41
|
+
function Rr() {
|
|
42
|
+
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var n = We, o = Symbol.for("react.element"), a = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), h = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), A = Symbol.iterator, k = "@@iterator";
|
|
44
|
+
function M(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
47
|
var r = A && e[A] || e[k];
|
|
@@ -50,14 +50,14 @@ function br() {
|
|
|
50
50
|
var S = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
51
|
function v(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
54
|
-
t[
|
|
53
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
54
|
+
t[i - 1] = arguments[i];
|
|
55
55
|
le("error", e, t);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function le(e, r, t) {
|
|
59
59
|
{
|
|
60
|
-
var
|
|
60
|
+
var i = S.ReactDebugCurrentFrame, p = i.getStackAddendum();
|
|
61
61
|
p !== "" && (r += "%s", t = t.concat([p]));
|
|
62
62
|
var m = t.map(function(d) {
|
|
63
63
|
return String(d);
|
|
@@ -65,19 +65,19 @@ function br() {
|
|
|
65
65
|
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var ce = !1, Y = !1,
|
|
68
|
+
var ce = !1, Y = !1, Ne = !1, Ie = !1, Me = !1, fe;
|
|
69
69
|
fe = Symbol.for("react.module.reference");
|
|
70
70
|
function Ye(e) {
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === l || e === g ||
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === l || e === g || Me || e === u || e === b || e === E || Ie || e === C || ce || Y || Ne || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === w || e.$$typeof === s || e.$$typeof === h || e.$$typeof === f || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
75
|
e.$$typeof === fe || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
77
|
function Ve(e, r, t) {
|
|
78
|
-
var
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
78
|
+
var i = e.displayName;
|
|
79
|
+
if (i)
|
|
80
|
+
return i;
|
|
81
81
|
var p = r.displayName || r.name || "";
|
|
82
82
|
return p !== "" ? t + "(" + p + ")" : t;
|
|
83
83
|
}
|
|
@@ -94,13 +94,13 @@ function br() {
|
|
|
94
94
|
switch (e) {
|
|
95
95
|
case l:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case a:
|
|
98
98
|
return "Portal";
|
|
99
99
|
case g:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case u:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case b:
|
|
104
104
|
return "Suspense";
|
|
105
105
|
case E:
|
|
106
106
|
return "SuspenseList";
|
|
@@ -116,8 +116,8 @@ function br() {
|
|
|
116
116
|
case f:
|
|
117
117
|
return Ve(e, e.render, "ForwardRef");
|
|
118
118
|
case w:
|
|
119
|
-
var
|
|
120
|
-
return
|
|
119
|
+
var i = e.displayName || null;
|
|
120
|
+
return i !== null ? i : j(e.type) || "Memo";
|
|
121
121
|
case T: {
|
|
122
122
|
var p = e, m = p._payload, d = p._init;
|
|
123
123
|
try {
|
|
@@ -129,14 +129,14 @@ function br() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
132
|
+
var F = Object.assign, L = 0, ve, pe, ge, he, me, Ee, Re;
|
|
133
133
|
function ye() {
|
|
134
134
|
}
|
|
135
135
|
ye.__reactDisabledLog = !0;
|
|
136
136
|
function qe() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
ve = console.log, pe = console.info, ge = console.warn, he = console.error, me = console.group, Ee = console.groupCollapsed,
|
|
138
|
+
if (L === 0) {
|
|
139
|
+
ve = console.log, pe = console.info, ge = console.warn, he = console.error, me = console.group, Ee = console.groupCollapsed, Re = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -153,42 +153,42 @@ function br() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
L++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function ze() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (L--, L === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
168
|
+
log: F({}, e, {
|
|
169
169
|
value: ve
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
171
|
+
info: F({}, e, {
|
|
172
172
|
value: pe
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
174
|
+
warn: F({}, e, {
|
|
175
175
|
value: ge
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
177
|
+
error: F({}, e, {
|
|
178
178
|
value: he
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
180
|
+
group: F({}, e, {
|
|
181
181
|
value: me
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
183
|
+
groupCollapsed: F({}, e, {
|
|
184
184
|
value: Ee
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
187
|
-
value:
|
|
186
|
+
groupEnd: F({}, e, {
|
|
187
|
+
value: Re
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
L < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
var Z = S.ReactCurrentDispatcher, K;
|
|
@@ -198,8 +198,8 @@ function br() {
|
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
200
|
} catch (p) {
|
|
201
|
-
var
|
|
202
|
-
K =
|
|
201
|
+
var i = p.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
K = i && i[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
205
|
` + K + e;
|
|
@@ -210,7 +210,7 @@ function br() {
|
|
|
210
210
|
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
211
|
q = new Ue();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function be(e, r) {
|
|
214
214
|
if (!e || Q)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
@@ -218,7 +218,7 @@ function br() {
|
|
|
218
218
|
if (t !== void 0)
|
|
219
219
|
return t;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
221
|
+
var i;
|
|
222
222
|
Q = !0;
|
|
223
223
|
var p = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
@@ -237,14 +237,14 @@ function br() {
|
|
|
237
237
|
try {
|
|
238
238
|
Reflect.construct(d, []);
|
|
239
239
|
} catch (P) {
|
|
240
|
-
|
|
240
|
+
i = P;
|
|
241
241
|
}
|
|
242
242
|
Reflect.construct(e, [], d);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
245
|
d.call();
|
|
246
246
|
} catch (P) {
|
|
247
|
-
|
|
247
|
+
i = P;
|
|
248
248
|
}
|
|
249
249
|
e.call(d.prototype);
|
|
250
250
|
}
|
|
@@ -252,37 +252,37 @@ function br() {
|
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
254
|
} catch (P) {
|
|
255
|
-
|
|
255
|
+
i = P;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
259
|
} catch (P) {
|
|
260
|
-
if (P &&
|
|
260
|
+
if (P && i && typeof P.stack == "string") {
|
|
261
261
|
for (var c = P.stack.split(`
|
|
262
|
-
`), _ =
|
|
263
|
-
`),
|
|
262
|
+
`), _ = i.stack.split(`
|
|
263
|
+
`), R = c.length - 1, y = _.length - 1; R >= 1 && y >= 0 && c[R] !== _[y]; )
|
|
264
264
|
y--;
|
|
265
|
-
for (;
|
|
266
|
-
if (c[
|
|
267
|
-
if (
|
|
265
|
+
for (; R >= 1 && y >= 0; R--, y--)
|
|
266
|
+
if (c[R] !== _[y]) {
|
|
267
|
+
if (R !== 1 || y !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
269
|
+
if (R--, y--, y < 0 || c[R] !== _[y]) {
|
|
270
270
|
var O = `
|
|
271
|
-
` + c[
|
|
271
|
+
` + c[R].replace(" at new ", " at ");
|
|
272
272
|
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, O), O;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (R >= 1 && y >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
279
|
Q = !1, Z.current = m, ze(), Error.prepareStackTrace = p;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" && q.set(e,
|
|
281
|
+
var D = e ? e.displayName || e.name : "", $e = D ? V(D) : "";
|
|
282
|
+
return typeof e == "function" && q.set(e, $e), $e;
|
|
283
283
|
}
|
|
284
284
|
function Be(e, r, t) {
|
|
285
|
-
return
|
|
285
|
+
return be(e, !1);
|
|
286
286
|
}
|
|
287
287
|
function Ge(e) {
|
|
288
288
|
var r = e.prototype;
|
|
@@ -292,11 +292,11 @@ function br() {
|
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return be(e, Ge(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
297
|
return V(e);
|
|
298
298
|
switch (e) {
|
|
299
|
-
case
|
|
299
|
+
case b:
|
|
300
300
|
return V("Suspense");
|
|
301
301
|
case E:
|
|
302
302
|
return V("SuspenseList");
|
|
@@ -308,7 +308,7 @@ function br() {
|
|
|
308
308
|
case w:
|
|
309
309
|
return z(e.type, r, t);
|
|
310
310
|
case T: {
|
|
311
|
-
var
|
|
311
|
+
var i = e, p = i._payload, m = i._init;
|
|
312
312
|
try {
|
|
313
313
|
return z(m(p), r, t);
|
|
314
314
|
} catch {
|
|
@@ -325,7 +325,7 @@ function br() {
|
|
|
325
325
|
} else
|
|
326
326
|
we.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function Je(e, r, t,
|
|
328
|
+
function Je(e, r, t, i, p) {
|
|
329
329
|
{
|
|
330
330
|
var m = Function.call.bind(U);
|
|
331
331
|
for (var d in e)
|
|
@@ -333,14 +333,14 @@ function br() {
|
|
|
333
333
|
var c = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof e[d] != "function") {
|
|
336
|
-
var _ = Error((
|
|
336
|
+
var _ = Error((i || "React class") + ": " + t + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw _.name = "Invariant Violation", _;
|
|
338
338
|
}
|
|
339
|
-
c = e[d](r, d,
|
|
340
|
-
} catch (
|
|
341
|
-
c =
|
|
339
|
+
c = e[d](r, d, i, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (R) {
|
|
341
|
+
c = R;
|
|
342
342
|
}
|
|
343
|
-
c && !(c instanceof Error) && (B(p), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",
|
|
343
|
+
c && !(c instanceof Error) && (B(p), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", i || "React class", t, d, typeof c), B(null)), c instanceof Error && !(c.message in _e) && (_e[c.message] = !0, B(p), v("Failed %s type: %s", t, c.message), B(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -368,7 +368,7 @@ function br() {
|
|
|
368
368
|
if (Ze(e))
|
|
369
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)), Ce(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var W = S.ReactCurrentOwner, Ke = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
@@ -392,9 +392,9 @@ function br() {
|
|
|
392
392
|
return e.key !== void 0;
|
|
393
393
|
}
|
|
394
394
|
function rr(e, r) {
|
|
395
|
-
if (typeof e.ref == "string" &&
|
|
396
|
-
var t = j(
|
|
397
|
-
re[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(
|
|
395
|
+
if (typeof e.ref == "string" && W.current && r && W.current.stateNode !== r) {
|
|
396
|
+
var t = j(W.current.type);
|
|
397
|
+
re[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(W.current.type), e.ref), re[t] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function tr(e, r) {
|
|
@@ -419,10 +419,10 @@ function br() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var ar = function(e, r, t,
|
|
422
|
+
var ar = function(e, r, t, i, p, m, d) {
|
|
423
423
|
var c = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof:
|
|
425
|
+
$$typeof: o,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
@@ -440,7 +440,7 @@ function br() {
|
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
|
-
value:
|
|
443
|
+
value: i
|
|
444
444
|
}), Object.defineProperty(c, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
@@ -448,26 +448,26 @@ function br() {
|
|
|
448
448
|
value: p
|
|
449
449
|
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
450
450
|
};
|
|
451
|
-
function or(e, r, t,
|
|
451
|
+
function or(e, r, t, i, p) {
|
|
452
452
|
{
|
|
453
453
|
var m, d = {}, c = null, _ = null;
|
|
454
454
|
t !== void 0 && (Te(t), c = "" + t), er(r) && (Te(r.key), c = "" + r.key), Qe(r) && (_ = r.ref, rr(r, p));
|
|
455
455
|
for (m in r)
|
|
456
456
|
U.call(r, m) && !Ke.hasOwnProperty(m) && (d[m] = r[m]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (m in
|
|
460
|
-
d[m] === void 0 && (d[m] =
|
|
458
|
+
var R = e.defaultProps;
|
|
459
|
+
for (m in R)
|
|
460
|
+
d[m] === void 0 && (d[m] = R[m]);
|
|
461
461
|
}
|
|
462
462
|
if (c || _) {
|
|
463
463
|
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
464
|
c && tr(d, y), _ && nr(d, y);
|
|
465
465
|
}
|
|
466
|
-
return ar(e, c, _, p,
|
|
466
|
+
return ar(e, c, _, p, i, W.current, d);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
var te = S.ReactCurrentOwner, je = S.ReactDebugCurrentFrame;
|
|
470
|
-
function
|
|
470
|
+
function $(e) {
|
|
471
471
|
if (e) {
|
|
472
472
|
var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
|
|
473
473
|
je.setExtraStackFrame(t);
|
|
@@ -477,7 +477,7 @@ function br() {
|
|
|
477
477
|
var ne;
|
|
478
478
|
ne = !1;
|
|
479
479
|
function ae(e) {
|
|
480
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
480
|
+
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
481
481
|
}
|
|
482
482
|
function Pe() {
|
|
483
483
|
{
|
|
@@ -524,8 +524,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
524
524
|
if (xe[t])
|
|
525
525
|
return;
|
|
526
526
|
xe[t] = !0;
|
|
527
|
-
var
|
|
528
|
-
e && e._owner && e._owner !== te.current && (
|
|
527
|
+
var i = "";
|
|
528
|
+
e && e._owner && e._owner !== te.current && (i = " It was passed a child from " + j(e._owner.type) + "."), $(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, i), $(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
function ke(e, r) {
|
|
@@ -534,13 +534,13 @@ Check the top-level render call using <` + t + ">.");
|
|
|
534
534
|
return;
|
|
535
535
|
if (ee(e))
|
|
536
536
|
for (var t = 0; t < e.length; t++) {
|
|
537
|
-
var
|
|
538
|
-
ae(
|
|
537
|
+
var i = e[t];
|
|
538
|
+
ae(i) && Ae(i, r);
|
|
539
539
|
}
|
|
540
540
|
else if (ae(e))
|
|
541
541
|
e._store && (e._store.validated = !0);
|
|
542
542
|
else if (e) {
|
|
543
|
-
var p =
|
|
543
|
+
var p = M(e);
|
|
544
544
|
if (typeof p == "function" && p !== e.entries)
|
|
545
545
|
for (var m = p.call(e), d; !(d = m.next()).done; )
|
|
546
546
|
ae(d.value) && Ae(d.value, r);
|
|
@@ -562,8 +562,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
564
|
if (t) {
|
|
565
|
-
var
|
|
566
|
-
Je(t, e.props, "prop",
|
|
565
|
+
var i = j(r);
|
|
566
|
+
Je(t, e.props, "prop", i, e);
|
|
567
567
|
} else if (r.PropTypes !== void 0 && !ne) {
|
|
568
568
|
ne = !0;
|
|
569
569
|
var p = j(r);
|
|
@@ -575,16 +575,16 @@ Check the top-level render call using <` + t + ">.");
|
|
|
575
575
|
function lr(e) {
|
|
576
576
|
{
|
|
577
577
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
578
|
-
var
|
|
579
|
-
if (
|
|
580
|
-
|
|
578
|
+
var i = r[t];
|
|
579
|
+
if (i !== "children" && i !== "key") {
|
|
580
|
+
$(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), $(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
e.ref !== null && (
|
|
584
|
+
e.ref !== null && ($(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Fe(e, r, t, i, p, m) {
|
|
588
588
|
{
|
|
589
589
|
var d = Ye(e);
|
|
590
590
|
if (!d) {
|
|
@@ -592,8 +592,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
592
592
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
593
593
|
var _ = ir(p);
|
|
594
594
|
_ ? c += _ : c += Pe();
|
|
595
|
-
var
|
|
596
|
-
e === null ?
|
|
595
|
+
var R;
|
|
596
|
+
e === null ? R = "null" : ee(e) ? R = "array" : e !== void 0 && e.$$typeof === o ? (R = "<" + (j(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : R = 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", R, c);
|
|
597
597
|
}
|
|
598
598
|
var y = or(e, r, t, p, m);
|
|
599
599
|
if (y == null)
|
|
@@ -601,10 +601,10 @@ Check the top-level render call using <` + t + ">.");
|
|
|
601
601
|
if (d) {
|
|
602
602
|
var O = r.children;
|
|
603
603
|
if (O !== void 0)
|
|
604
|
-
if (
|
|
604
|
+
if (i)
|
|
605
605
|
if (ee(O)) {
|
|
606
|
-
for (var
|
|
607
|
-
ke(O[
|
|
606
|
+
for (var D = 0; D < O.length; D++)
|
|
607
|
+
ke(O[D], e);
|
|
608
608
|
Object.freeze && Object.freeze(O);
|
|
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.");
|
|
@@ -615,16 +615,16 @@ Check the top-level render call using <` + t + ">.");
|
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
function cr(e, r, t) {
|
|
618
|
-
return
|
|
618
|
+
return Fe(e, r, t, !0);
|
|
619
619
|
}
|
|
620
620
|
function fr(e, r, t) {
|
|
621
|
-
return
|
|
621
|
+
return Fe(e, r, t, !1);
|
|
622
622
|
}
|
|
623
623
|
var dr = fr, vr = cr;
|
|
624
|
-
|
|
625
|
-
}()),
|
|
624
|
+
I.Fragment = l, I.jsx = dr, I.jsxs = vr;
|
|
625
|
+
}()), I;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ? ie.exports = Er() : ie.exports =
|
|
627
|
+
process.env.NODE_ENV === "production" ? ie.exports = Er() : ie.exports = Rr();
|
|
628
628
|
var x = ie.exports;
|
|
629
629
|
const H = pr({
|
|
630
630
|
axios: void 0,
|
|
@@ -636,10 +636,10 @@ const H = pr({
|
|
|
636
636
|
useLocation: void 0
|
|
637
637
|
}), Tr = ({
|
|
638
638
|
axios: n,
|
|
639
|
-
children:
|
|
640
|
-
translate:
|
|
639
|
+
children: o,
|
|
640
|
+
translate: a,
|
|
641
641
|
useAuth: l,
|
|
642
|
-
Outlet:
|
|
642
|
+
Outlet: u,
|
|
643
643
|
Navigate: g,
|
|
644
644
|
useLocation: s,
|
|
645
645
|
useGoogleTagManager: h
|
|
@@ -648,29 +648,29 @@ const H = pr({
|
|
|
648
648
|
() => ({
|
|
649
649
|
axios: n,
|
|
650
650
|
Navigate: g,
|
|
651
|
-
Outlet:
|
|
652
|
-
translate:
|
|
651
|
+
Outlet: u,
|
|
652
|
+
translate: a,
|
|
653
653
|
useAuth: l,
|
|
654
654
|
useGoogleTagManager: h,
|
|
655
655
|
useLocation: s
|
|
656
656
|
}),
|
|
657
|
-
[g,
|
|
657
|
+
[g, u, n, a, l, h, s]
|
|
658
658
|
);
|
|
659
|
-
return /* @__PURE__ */ x.jsx(H.Provider, { value: f, children:
|
|
659
|
+
return /* @__PURE__ */ x.jsx(H.Provider, { value: f, children: o });
|
|
660
660
|
}, G = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Or = ({
|
|
661
661
|
Fallback: n,
|
|
662
|
-
loginPath:
|
|
663
|
-
localStorageKey:
|
|
662
|
+
loginPath: o = "/login",
|
|
663
|
+
localStorageKey: a = "user",
|
|
664
664
|
redirect401Path: l = "/login",
|
|
665
|
-
...
|
|
665
|
+
...u
|
|
666
666
|
}) => {
|
|
667
|
-
var A, k,
|
|
667
|
+
var A, k, M, S;
|
|
668
668
|
const {
|
|
669
|
-
axios: g =
|
|
670
|
-
useLocation: s =
|
|
671
|
-
useAuth: h =
|
|
672
|
-
Outlet: f =
|
|
673
|
-
Navigate:
|
|
669
|
+
axios: g = u.axios,
|
|
670
|
+
useLocation: s = u.useLocation,
|
|
671
|
+
useAuth: h = u.useAuth,
|
|
672
|
+
Outlet: f = u.Outlet,
|
|
673
|
+
Navigate: b = u.Navigate
|
|
674
674
|
} = se(H);
|
|
675
675
|
if (h === void 0)
|
|
676
676
|
throw new Error(G("useAuth"));
|
|
@@ -678,7 +678,7 @@ const H = pr({
|
|
|
678
678
|
throw new Error(G("useLocation"));
|
|
679
679
|
if (f === void 0)
|
|
680
680
|
throw new Error(G("Outlet"));
|
|
681
|
-
if (
|
|
681
|
+
if (b === void 0)
|
|
682
682
|
throw new Error(G("Navigate"));
|
|
683
683
|
const [E, w] = gr(null), { isLogged: T } = h(), C = s();
|
|
684
684
|
return X(() => {
|
|
@@ -686,44 +686,44 @@ const H = pr({
|
|
|
686
686
|
(v) => v,
|
|
687
687
|
async (v) => {
|
|
688
688
|
var Y;
|
|
689
|
-
return typeof v == "object" && v && "response" in v && v.response && typeof v.response == "object" && "status" in v.response && v.response && typeof v.response == "object" && "status" in v.response && ((Y = v == null ? void 0 : v.response) == null ? void 0 : Y.status) === 401 && (g.defaults.headers.common.Authorization = null, localStorage.removeItem(
|
|
689
|
+
return typeof v == "object" && v && "response" in v && v.response && typeof v.response == "object" && "status" in v.response && v.response && typeof v.response == "object" && "status" in v.response && ((Y = v == null ? void 0 : v.response) == null ? void 0 : Y.status) === 401 && (g.defaults.headers.common.Authorization = null, localStorage.removeItem(a), w(l)), Promise.reject(v);
|
|
690
690
|
}
|
|
691
691
|
);
|
|
692
|
-
}, [g == null ? void 0 : g.defaults, g == null ? void 0 : g.interceptors.response,
|
|
692
|
+
}, [g == null ? void 0 : g.defaults, g == null ? void 0 : g.interceptors.response, a, l]), T && !E ? /* @__PURE__ */ x.jsx(hr, { fallback: n, children: (k = (A = C.state) == null ? void 0 : A.from) != null && k.state && ((S = (M = C.state) == null ? void 0 : M.from) == null ? void 0 : S.pathname) === o ? /* @__PURE__ */ x.jsx(b, { to: C.state.from.state.from.pathname + C.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ x.jsx(f, {}) }) : /* @__PURE__ */ x.jsx(b, { to: o, state: { from: C }, replace: !0 });
|
|
693
693
|
}, oe = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Sr = ({ ...n }) => {
|
|
694
694
|
const {
|
|
695
|
-
useLocation:
|
|
696
|
-
Outlet:
|
|
695
|
+
useLocation: o = n.useLocation,
|
|
696
|
+
Outlet: a = n.Outlet,
|
|
697
697
|
useGoogleTagManager: l = n.useGoogleTagManager
|
|
698
698
|
} = se(H);
|
|
699
|
-
if (
|
|
699
|
+
if (o === void 0)
|
|
700
700
|
throw new Error(oe("useLocation"));
|
|
701
|
-
if (
|
|
701
|
+
if (a === void 0)
|
|
702
702
|
throw new Error(oe("Outlet"));
|
|
703
703
|
if (l === void 0)
|
|
704
704
|
throw new Error(oe("useGoogleTagManager"));
|
|
705
|
-
const { pathname:
|
|
705
|
+
const { pathname: u } = o(), { sendEvent: g } = l();
|
|
706
706
|
return mr(() => {
|
|
707
|
-
g({ event: "pageView", pathname:
|
|
708
|
-
}, [
|
|
707
|
+
g({ event: "pageView", pathname: u });
|
|
708
|
+
}, [u, g]), /* @__PURE__ */ x.jsx(a, {});
|
|
709
709
|
}, jr = ({
|
|
710
710
|
axios: n,
|
|
711
|
-
baseURL:
|
|
712
|
-
tokenTypeKey:
|
|
711
|
+
baseURL: o,
|
|
712
|
+
tokenTypeKey: a = "tokenType",
|
|
713
713
|
userLocalStorageKey: l = "user",
|
|
714
|
-
tokenKey:
|
|
714
|
+
tokenKey: u = "accessToken",
|
|
715
715
|
postContentType: g = "application/json"
|
|
716
716
|
}) => (X(() => {
|
|
717
717
|
if (!n.defaults)
|
|
718
718
|
return;
|
|
719
|
-
const s = localStorage.getItem(l), h = s ? JSON.parse(s) : null, f = h != null && h[
|
|
720
|
-
n.defaults.baseURL =
|
|
721
|
-
}, [n.defaults,
|
|
719
|
+
const s = localStorage.getItem(l), h = s ? JSON.parse(s) : null, f = h != null && h[a] ? h[a] : null, b = h != null && h[u] ? h[u] : null, E = s ? `${f} ${b}` : 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, a, l]), null), Pr = ({
|
|
722
722
|
i18n: n,
|
|
723
|
-
initReactI18next:
|
|
724
|
-
resources:
|
|
723
|
+
initReactI18next: o,
|
|
724
|
+
resources: a,
|
|
725
725
|
LanguageDetector: l
|
|
726
|
-
}) => (n.use(l).use(
|
|
726
|
+
}) => (n.use(l).use(o).init({
|
|
727
727
|
debug: !1,
|
|
728
728
|
fallbackLng: "en",
|
|
729
729
|
interpolation: {
|
|
@@ -733,80 +733,101 @@ const H = pr({
|
|
|
733
733
|
react: {
|
|
734
734
|
useSuspense: !0
|
|
735
735
|
},
|
|
736
|
-
resources:
|
|
736
|
+
resources: a,
|
|
737
737
|
returnNull: !1
|
|
738
738
|
}).then(() => {
|
|
739
739
|
document.documentElement.lang !== n.resolvedLanguage && n.resolvedLanguage && document.documentElement.setAttribute("lang", n.resolvedLanguage);
|
|
740
|
-
}), n.on("languageChanged", (
|
|
741
|
-
document.documentElement.setAttribute("lang",
|
|
742
|
-
}), null), xr = ({ dsn: n, sentry: a }) => (X(() => {
|
|
743
|
-
process.env.NODE_ENV === "production" &&
|
|
740
|
+
}), n.on("languageChanged", (u) => {
|
|
741
|
+
document.documentElement.setAttribute("lang", u);
|
|
742
|
+
}), null), xr = ({ dsn: n, sentry: o, routingInstrumentationDependencies: a }) => (X(() => {
|
|
743
|
+
process.env.NODE_ENV === "production" && o.init({
|
|
744
744
|
dsn: n,
|
|
745
|
-
integrations: [
|
|
745
|
+
integrations: [
|
|
746
|
+
new o.BrowserTracing({
|
|
747
|
+
routingInstrumentation: o.reactRouterV6Instrumentation(
|
|
748
|
+
a.useEffect,
|
|
749
|
+
a.useLocation,
|
|
750
|
+
a.useNavigationType,
|
|
751
|
+
a.createRoutesFromChildren,
|
|
752
|
+
a.matchRoutes
|
|
753
|
+
)
|
|
754
|
+
}),
|
|
755
|
+
new o.Replay()
|
|
756
|
+
],
|
|
757
|
+
replaysOnErrorSampleRate: 1,
|
|
758
|
+
replaysSessionSampleRate: 0.1,
|
|
746
759
|
tracesSampleRate: 1
|
|
747
760
|
});
|
|
748
|
-
}, [
|
|
749
|
-
|
|
761
|
+
}, [
|
|
762
|
+
n,
|
|
763
|
+
a.createRoutesFromChildren,
|
|
764
|
+
a.matchRoutes,
|
|
765
|
+
a.useEffect,
|
|
766
|
+
a.useLocation,
|
|
767
|
+
a.useNavigationType,
|
|
768
|
+
o
|
|
769
|
+
]), null), Ar = ({ IMaskMixin: n, ...o }) => {
|
|
770
|
+
const a = ue(
|
|
750
771
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
751
|
-
() => n(({ TextField: l, ...
|
|
772
|
+
() => n(({ TextField: l, ...u }) => /* @__PURE__ */ x.jsx(l, { ...u })),
|
|
752
773
|
[n]
|
|
753
774
|
);
|
|
754
|
-
return /* @__PURE__ */ x.jsx(
|
|
755
|
-
}, kr = ({ mapbox: n, accessToken:
|
|
756
|
-
n &&
|
|
757
|
-
}, [
|
|
775
|
+
return /* @__PURE__ */ x.jsx(a, { ...o });
|
|
776
|
+
}, kr = ({ mapbox: n, accessToken: o }) => (X(() => {
|
|
777
|
+
n && o && (n.accessToken = o);
|
|
778
|
+
}, [o, n]), null), Fr = ({
|
|
758
779
|
children: n,
|
|
759
|
-
defaultOptions:
|
|
760
|
-
QueryClient:
|
|
780
|
+
defaultOptions: o,
|
|
781
|
+
QueryClient: a,
|
|
761
782
|
QueryClientProvider: l
|
|
762
783
|
}) => {
|
|
763
|
-
const
|
|
784
|
+
const u = new a({
|
|
764
785
|
defaultOptions: {
|
|
765
786
|
queries: {
|
|
766
787
|
refetchOnWindowFocus: !1,
|
|
767
788
|
retry: 3,
|
|
768
|
-
...
|
|
789
|
+
...o
|
|
769
790
|
}
|
|
770
791
|
}
|
|
771
792
|
});
|
|
772
|
-
return /* @__PURE__ */ x.jsx(l, { client:
|
|
773
|
-
},
|
|
774
|
-
const { unknownErrorTranslationKey:
|
|
793
|
+
return /* @__PURE__ */ x.jsx(l, { client: u, children: n });
|
|
794
|
+
}, $r = (n) => {
|
|
795
|
+
const { unknownErrorTranslationKey: o = "error.unknownError" } = n || {}, { translate: a = n == null ? void 0 : n.translate } = se(H);
|
|
775
796
|
return { printError: J(
|
|
776
|
-
(
|
|
777
|
-
var h, f,
|
|
778
|
-
const g =
|
|
779
|
-
return
|
|
797
|
+
(u) => {
|
|
798
|
+
var h, f, b, E, w, T, C, A, k;
|
|
799
|
+
const g = a ? a(o) : "Unknown error", { response: s } = u || {};
|
|
800
|
+
return u != null && u.reason ? String(u.reason) : (h = s == null ? void 0 : s.data) != null && h.reason ? String(s.data.reason) : (f = s == null ? void 0 : s.data) != null && f.message ? String(s.data.message) : (E = (b = s == null ? void 0 : s.data) == null ? void 0 : b.detail) != null && E.length && Array.isArray((w = s == null ? void 0 : s.data) == null ? void 0 : w.detail) && ((C = (T = s == null ? void 0 : s.data) == null ? void 0 : T.detail[0]) != null && C.msg) && typeof ((k = (A = s == null ? void 0 : s.data) == null ? void 0 : A.detail[0]) == null ? void 0 : k.msg) == "string" ? String(s.data.detail[0].msg) : g;
|
|
780
801
|
},
|
|
781
|
-
[
|
|
802
|
+
[a, o]
|
|
782
803
|
) };
|
|
783
|
-
},
|
|
804
|
+
}, Dr = ({
|
|
784
805
|
data: n,
|
|
785
|
-
fetchNextPage:
|
|
786
|
-
isFetchingNextPage:
|
|
806
|
+
fetchNextPage: o,
|
|
807
|
+
isFetchingNextPage: a,
|
|
787
808
|
isInitialLoading: l,
|
|
788
|
-
isLoading:
|
|
809
|
+
isLoading: u,
|
|
789
810
|
enabled: g = !0
|
|
790
811
|
}) => {
|
|
791
812
|
const s = J(
|
|
792
813
|
async (f) => {
|
|
793
|
-
|
|
814
|
+
a || !g || await o({ pageParam: (f == null ? void 0 : f.pageParam) || f.visibleRowsCount });
|
|
794
815
|
},
|
|
795
|
-
[g,
|
|
816
|
+
[g, o, a]
|
|
796
817
|
), h = ue(() => {
|
|
797
818
|
if (n)
|
|
798
|
-
return n.pages.reduce((f,
|
|
819
|
+
return n.pages.reduce((f, b) => [...f, ...b], []);
|
|
799
820
|
}, [n]);
|
|
800
821
|
return {
|
|
801
822
|
fetchNextPageOnRowsScrollEnd: s,
|
|
802
|
-
isLoading:
|
|
823
|
+
isLoading: a || u,
|
|
803
824
|
loadingVariant: l ? "skeleton" : "linear",
|
|
804
825
|
rows: h
|
|
805
826
|
};
|
|
806
|
-
},
|
|
807
|
-
const
|
|
808
|
-
({ tokenType: l, accessToken:
|
|
809
|
-
n.defaults.headers.common.Authorization = `${l} ${
|
|
827
|
+
}, Lr = (n) => {
|
|
828
|
+
const o = J(
|
|
829
|
+
({ tokenType: l, accessToken: u }) => {
|
|
830
|
+
n.defaults.headers.common.Authorization = `${l} ${u}`;
|
|
810
831
|
},
|
|
811
832
|
[n.defaults.headers.common]
|
|
812
833
|
);
|
|
@@ -814,30 +835,30 @@ const H = pr({
|
|
|
814
835
|
clearAuthenticationToken: J(() => {
|
|
815
836
|
n.defaults.headers.common.Authorization = null;
|
|
816
837
|
}, [n.defaults.headers.common]),
|
|
817
|
-
setAuthenticationToken:
|
|
838
|
+
setAuthenticationToken: o
|
|
818
839
|
};
|
|
819
|
-
}, yr = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(),
|
|
820
|
-
const l = n.split("/").filter((
|
|
840
|
+
}, yr = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), br = (n) => {
|
|
841
|
+
const l = n.split("/").filter((u) => u.length > 0).map((u) => u.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((f) => f.charAt(0).toUpperCase() + f.slice(1)).join("")).join("");
|
|
821
842
|
return l.charAt(0).toLowerCase() + l.slice(1);
|
|
822
|
-
}, _r = (n,
|
|
823
|
-
const l =
|
|
824
|
-
return `${l}${
|
|
843
|
+
}, _r = (n, o, a) => {
|
|
844
|
+
const l = br(o), u = yr(a);
|
|
845
|
+
return `${l}${u}`;
|
|
825
846
|
}, wr = (n) => {
|
|
826
847
|
if (n)
|
|
827
|
-
return (n == null ? void 0 : n.reduce((
|
|
848
|
+
return (n == null ? void 0 : n.reduce((o, a) => (o[a] = {
|
|
828
849
|
query: {
|
|
829
850
|
useInfinite: !0,
|
|
830
851
|
useInfiniteQueryParam: "offset"
|
|
831
852
|
}
|
|
832
|
-
},
|
|
833
|
-
},
|
|
834
|
-
const { input:
|
|
853
|
+
}, o), {})) || {};
|
|
854
|
+
}, Wr = (n) => {
|
|
855
|
+
const { input: o = "./openapi.json", operationsToGenerateInfiniteQueryHook: a = void 0 } = n || {};
|
|
835
856
|
return {
|
|
836
857
|
api: {
|
|
837
858
|
hooks: {
|
|
838
859
|
afterAllFilesWrite: "prettier src/api/ --write"
|
|
839
860
|
},
|
|
840
|
-
input:
|
|
861
|
+
input: o,
|
|
841
862
|
output: {
|
|
842
863
|
client: "react-query",
|
|
843
864
|
mode: "tags-split",
|
|
@@ -852,7 +873,7 @@ const H = pr({
|
|
|
852
873
|
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
853
874
|
},
|
|
854
875
|
operationName: _r,
|
|
855
|
-
...(
|
|
876
|
+
...(a == null ? void 0 : a.length) && { operations: wr(a) },
|
|
856
877
|
query: {
|
|
857
878
|
useQuery: !0
|
|
858
879
|
}
|
|
@@ -871,11 +892,11 @@ export {
|
|
|
871
892
|
Tr as InjectDependenciesProvider,
|
|
872
893
|
kr as MapBoxConfig,
|
|
873
894
|
Ar as MaskTextField,
|
|
874
|
-
|
|
895
|
+
Fr as QueryClientConfigProvider,
|
|
875
896
|
Or as RequireAuth,
|
|
876
897
|
xr as SentryConfig,
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
898
|
+
Wr as getOrvalConfig,
|
|
899
|
+
Lr as useAuth,
|
|
900
|
+
Dr as useInfiniteDataGrid,
|
|
901
|
+
$r as useResponseError
|
|
881
902
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(b,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(b=typeof globalThis<"u"?globalThis:b||self,E(b["@tracktor/shared-module"]={},b.React))})(this,function(b,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 ue;function
|
|
9
|
+
*/var ue;function Le(){if(ue)return W;ue=1;var n=E,o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function s(h,f,C){var y,T={},S=null,O=null;C!==void 0&&(S=""+C),f.key!==void 0&&(S=""+f.key),f.ref!==void 0&&(O=f.ref);for(y in f)l.call(f,y)&&!g.hasOwnProperty(y)&&(T[y]=f[y]);if(h&&h.defaultProps)for(y in f=h.defaultProps,f)T[y]===void 0&&(T[y]=f[y]);return{$$typeof:o,type:h,key:S,ref:O,props:T,_owner:u.current}}return W.Fragment=a,W.jsx=s,W.jsxs=s,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 se;function
|
|
18
|
-
`+ee+e}}var te=!1,X;{var ut=typeof WeakMap=="function"?WeakMap:Map;X=new ut}function
|
|
19
|
-
`),w=
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var se;function Me(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var n=E,o=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),F=Symbol.iterator,D="@@iterator";function U(e){if(e===null||typeof e!="object")return null;var t=F&&e[F]||e[D];return typeof t=="function"?t:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];le("error",e,r)}}function le(e,t,r){{var i=k.ReactDebugCurrentFrame,p=i.getStackAddendum();p!==""&&(t+="%s",r=r.concat([p]));var m=r.map(function(d){return String(d)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var ce=!1,G=!1,et=!1,tt=!1,rt=!1,fe;fe=Symbol.for("react.module.reference");function nt(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===g||rt||e===u||e===C||e===y||tt||e===O||ce||G||et||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===T||e.$$typeof===s||e.$$typeof===h||e.$$typeof===f||e.$$typeof===fe||e.getModuleId!==void 0))}function at(e,t,r){var i=e.displayName;if(i)return i;var p=t.displayName||t.name||"";return p!==""?r+"("+p+")":r}function de(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case a:return"Portal";case g:return"Profiler";case u:return"StrictMode";case C:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var t=e;return de(t)+".Consumer";case s:var r=e;return de(r._context)+".Provider";case f:return at(e,e.render,"ForwardRef");case T:var i=e.displayName||null;return i!==null?i:A(e.type)||"Memo";case S:{var p=e,m=p._payload,d=p._init;try{return A(d(m))}catch{return null}}}return null}var L=Object.assign,Y=0,ve,pe,ge,he,me,Ee,ye;function Re(){}Re.__reactDisabledLog=!0;function ot(){{if(Y===0){ve=console.log,pe=console.info,ge=console.warn,he=console.error,me=console.group,Ee=console.groupCollapsed,ye=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Y++}}function it(){{if(Y--,Y===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:ve}),info:L({},e,{value:pe}),warn:L({},e,{value:ge}),error:L({},e,{value:he}),group:L({},e,{value:me}),groupCollapsed:L({},e,{value:Ee}),groupEnd:L({},e,{value:ye})})}Y<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=k.ReactCurrentDispatcher,ee;function J(e,t,r){{if(ee===void 0)try{throw Error()}catch(p){var i=p.stack.trim().match(/\n( *(at )?)/);ee=i&&i[1]||""}return`
|
|
18
|
+
`+ee+e}}var te=!1,X;{var ut=typeof WeakMap=="function"?WeakMap:Map;X=new ut}function be(e,t){if(!e||te)return"";{var r=X.get(e);if(r!==void 0)return r}var i;te=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=$.current,$.current=null,ot();try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(x){i=x}Reflect.construct(e,[],d)}else{try{d.call()}catch(x){i=x}e.call(d.prototype)}}else{try{throw Error()}catch(x){i=x}e()}}catch(x){if(x&&i&&typeof x.stack=="string"){for(var c=x.stack.split(`
|
|
19
|
+
`),w=i.stack.split(`
|
|
20
|
+
`),R=c.length-1,_=w.length-1;R>=1&&_>=0&&c[R]!==w[_];)_--;for(;R>=1&&_>=0;R--,_--)if(c[R]!==w[_]){if(R!==1||_!==1)do if(R--,_--,_<0||c[R]!==w[_]){var j=`
|
|
21
|
+
`+c[R].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(R>=1&&_>=0);break}}}finally{te=!1,$.current=m,it(),Error.prepareStackTrace=p}var I=e?e.displayName||e.name:"",De=I?J(I):"";return typeof e=="function"&&X.set(e,De),De}function st(e,t,r){return be(e,!1)}function lt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function H(e,t,r){if(e==null)return"";if(typeof e=="function")return be(e,lt(e));if(typeof e=="string")return J(e);switch(e){case C:return J("Suspense");case y:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return st(e.render);case T:return H(e.type,t,r);case S:{var i=e,p=i._payload,m=i._init;try{return H(m(p),t,r)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,_e={},Ce=k.ReactDebugCurrentFrame;function q(e){if(e){var t=e._owner,r=H(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(r)}else Ce.setExtraStackFrame(null)}function ct(e,t,r,i,p){{var m=Function.call.bind(Z);for(var d in e)if(m(e,d)){var c=void 0;try{if(typeof e[d]!="function"){var w=Error((i||"React class")+": "+r+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}c=e[d](t,d,i,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){c=R}c&&!(c instanceof Error)&&(q(p),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",r,d,typeof c),q(null)),c instanceof Error&&!(c.message in _e)&&(_e[c.message]=!0,q(p),v("Failed %s type: %s",r,c.message),q(null))}}}var ft=Array.isArray;function re(e){return ft(e)}function dt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function vt(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Te(e){if(vt(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",dt(e)),we(e)}var z=k.ReactCurrentOwner,pt={key:!0,ref:!0,__self:!0,__source:!0},Oe,Se,ne;ne={};function gt(e){if(Z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function ht(e){if(Z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function mt(e,t){if(typeof e.ref=="string"&&z.current&&t&&z.current.stateNode!==t){var r=A(z.current.type);ne[r]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(z.current.type),e.ref),ne[r]=!0)}}function Et(e,t){{var r=function(){Oe||(Oe=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function yt(e,t){{var r=function(){Se||(Se=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var Rt=function(e,t,r,i,p,m,d){var c={$$typeof:o,type:e,key:t,ref:r,props:d,_owner:m};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function bt(e,t,r,i,p){{var m,d={},c=null,w=null;r!==void 0&&(Te(r),c=""+r),ht(t)&&(Te(t.key),c=""+t.key),gt(t)&&(w=t.ref,mt(t,p));for(m in t)Z.call(t,m)&&!pt.hasOwnProperty(m)&&(d[m]=t[m]);if(e&&e.defaultProps){var R=e.defaultProps;for(m in R)d[m]===void 0&&(d[m]=R[m])}if(c||w){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&Et(d,_),w&&yt(d,_)}return Rt(e,c,w,p,i,z.current,d)}}var ae=k.ReactCurrentOwner,je=k.ReactDebugCurrentFrame;function M(e){if(e){var t=e._owner,r=H(e.type,e._source,t?t.type:null);je.setExtraStackFrame(r)}else je.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Pe(){{if(ae.current){var e=A(ae.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function _t(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),r=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+t+":"+r+"."}return""}}var ke={};function Ct(e){{var t=Pe();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+r+">.")}return t}}function Ae(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ct(t);if(ke[r])return;ke[r]=!0;var
|
|
27
|
+
Check the top-level render call using <`+r+">.")}return t}}function Ae(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=Ct(t);if(ke[r])return;ke[r]=!0;var i="";e&&e._owner&&e._owner!==ae.current&&(i=" It was passed a child from "+A(e._owner.type)+"."),M(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,i),M(null)}}function xe(e,t){{if(typeof e!="object")return;if(re(e))for(var r=0;r<e.length;r++){var i=e[r];ie(i)&&Ae(i,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=U(e);if(typeof p=="function"&&p!==e.entries)for(var m=p.call(e),d;!(d=m.next()).done;)ie(d.value)&&Ae(d.value,t)}}}function wt(e){{var t=e.type;if(t==null||typeof t=="string")return;var r;if(typeof t=="function")r=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===f||t.$$typeof===T))r=t.propTypes;else return;if(r){var i=A(t);ct(r,e.props,"prop",i,e)}else if(t.PropTypes!==void 0&&!oe){oe=!0;var p=A(t);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Tt(e){{for(var t=Object.keys(e.props),r=0;r<t.length;r++){var i=t[r];if(i!=="children"&&i!=="key"){M(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),M(null);break}}e.ref!==null&&(M(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),M(null))}}function Fe(e,t,r,i,p,m){{var d=nt(e);if(!d){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=_t(p);w?c+=w:c+=Pe();var R;e===null?R="null":re(e)?R="array":e!==void 0&&e.$$typeof===o?(R="<"+(A(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):R=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",R,c)}var _=bt(e,t,r,p,m);if(_==null)return _;if(d){var j=t.children;if(j!==void 0)if(i)if(re(j)){for(var I=0;I<j.length;I++)xe(j[I],e);Object.freeze&&Object.freeze(j)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xe(j,e)}return e===l?Tt(_):wt(_),_}}function Ot(e,t,r){return Fe(e,t,r,!0)}function St(e,t,r){return Fe(e,t,r,!1)}var jt=St,Pt=Ot;N.Fragment=l,N.jsx=jt,N.jsxs=Pt}()),N}process.env.NODE_ENV==="production"?K.exports=Le():K.exports=Me();var P=K.exports;const V=E.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Ie=({axios:n,children:o,translate:a,useAuth:l,Outlet:u,Navigate:g,useLocation:s,useGoogleTagManager:h})=>{const f=E.useMemo(()=>({axios:n,Navigate:g,Outlet:u,translate:a,useAuth:l,useGoogleTagManager:h,useLocation:s}),[g,u,n,a,l,h,s]);return P.jsx(V.Provider,{value:f,children:o})},B=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:o="/login",localStorageKey:a="user",redirect401Path:l="/login",...u})=>{var F,D,U,k;const{axios:g=u.axios,useLocation:s=u.useLocation,useAuth:h=u.useAuth,Outlet:f=u.Outlet,Navigate:C=u.Navigate}=E.useContext(V);if(h===void 0)throw new Error(B("useAuth"));if(s===void 0)throw new Error(B("useLocation"));if(f===void 0)throw new Error(B("Outlet"));if(C===void 0)throw new Error(B("Navigate"));const[y,T]=E.useState(null),{isLogged:S}=h(),O=s();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(a),T(l)),Promise.reject(v)})},[g==null?void 0:g.defaults,g==null?void 0:g.interceptors.response,a,l]),S&&!y?P.jsx(E.Suspense,{fallback:n,children:(D=(F=O.state)==null?void 0:F.from)!=null&&D.state&&((k=(U=O.state)==null?void 0:U.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(f,{})}):P.jsx(C,{to:o,state:{from:O},replace:!0})},Q=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ne=({...n})=>{const{useLocation:o=n.useLocation,Outlet:a=n.Outlet,useGoogleTagManager:l=n.useGoogleTagManager}=E.useContext(V);if(o===void 0)throw new Error(Q("useLocation"));if(a===void 0)throw new Error(Q("Outlet"));if(l===void 0)throw new Error(Q("useGoogleTagManager"));const{pathname:u}=o(),{sendEvent:g}=l();return E.useEffect(()=>{g({event:"pageView",pathname:u})},[u,g]),P.jsx(a,{})},Ve=({axios:n,baseURL:o,tokenTypeKey:a="tokenType",userLocalStorageKey:l="user",tokenKey:u="accessToken",postContentType:g="application/json"})=>(E.useLayoutEffect(()=>{if(!n.defaults)return;const s=localStorage.getItem(l),h=s?JSON.parse(s):null,f=h!=null&&h[a]?h[a]:null,C=h!=null&&h[u]?h[u]:null,y=s?`${f} ${C}`:null;n.defaults.baseURL=o,n.defaults.headers.post["Content-Type"]=g,y&&(n.defaults.headers.common.Authorization=y)},[n.defaults,o,g,u,a,l]),null),Ye=({i18n:n,initReactI18next:o,resources:a,LanguageDetector:l})=>(n.use(l).use(o).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:a,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",u=>{document.documentElement.setAttribute("lang",u)}),null),ze=({dsn:n,sentry:o,routingInstrumentationDependencies:a})=>(E.useLayoutEffect(()=>{process.env.NODE_ENV==="production"&&o.init({dsn:n,integrations:[new o.BrowserTracing({routingInstrumentation:o.reactRouterV6Instrumentation(a.useEffect,a.useLocation,a.useNavigationType,a.createRoutesFromChildren,a.matchRoutes)}),new o.Replay],replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,tracesSampleRate:1})},[n,a.createRoutesFromChildren,a.matchRoutes,a.useEffect,a.useLocation,a.useNavigationType,o]),null),Be=({IMaskMixin:n,...o})=>{const a=E.useMemo(()=>n(({TextField:l,...u})=>P.jsx(l,{...u})),[n]);return P.jsx(a,{...o})},Ue=({mapbox:n,accessToken:o})=>(E.useLayoutEffect(()=>{n&&o&&(n.accessToken=o)},[o,n]),null),Ge=({children:n,defaultOptions:o,QueryClient:a,QueryClientProvider:l})=>{const u=new a({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...o}}});return P.jsx(l,{client:u,children:n})},Je=n=>{const{unknownErrorTranslationKey:o="error.unknownError"}=n||{},{translate:a=n==null?void 0:n.translate}=E.useContext(V);return{printError:E.useCallback(u=>{var h,f,C,y,T,S,O,F,D;const g=a?a(o):"Unknown error",{response:s}=u||{};return u!=null&&u.reason?String(u.reason):(h=s==null?void 0:s.data)!=null&&h.reason?String(s.data.reason):(f=s==null?void 0:s.data)!=null&&f.message?String(s.data.message):(y=(C=s==null?void 0:s.data)==null?void 0:C.detail)!=null&&y.length&&Array.isArray((T=s==null?void 0:s.data)==null?void 0:T.detail)&&((O=(S=s==null?void 0:s.data)==null?void 0:S.detail[0])!=null&&O.msg)&&typeof((D=(F=s==null?void 0:s.data)==null?void 0:F.detail[0])==null?void 0:D.msg)=="string"?String(s.data.detail[0].msg):g},[a,o])}},Xe=({data:n,fetchNextPage:o,isFetchingNextPage:a,isInitialLoading:l,isLoading:u,enabled:g=!0})=>{const s=E.useCallback(async f=>{a||!g||await o({pageParam:(f==null?void 0:f.pageParam)||f.visibleRowsCount})},[g,o,a]),h=E.useMemo(()=>{if(n)return n.pages.reduce((f,C)=>[...f,...C],[])},[n]);return{fetchNextPageOnRowsScrollEnd:s,isLoading:a||u,loadingVariant:l?"skeleton":"linear",rows:h}},He=n=>{const o=E.useCallback(({tokenType:l,accessToken:u})=>{n.defaults.headers.common.Authorization=`${l} ${u}`},[n.defaults.headers.common]);return{clearAuthenticationToken:E.useCallback(()=>{n.defaults.headers.common.Authorization=null},[n.defaults.headers.common]),setAuthenticationToken:o}},Ze=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),qe=n=>{const l=n.split("/").filter(u=>u.length>0).map(u=>u.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(f=>f.charAt(0).toUpperCase()+f.slice(1)).join("")).join("");return l.charAt(0).toLowerCase()+l.slice(1)},Ke=(n,o,a)=>{const l=qe(o),u=Ze(a);return`${l}${u}`},Qe=n=>{if(n)return(n==null?void 0:n.reduce((o,a)=>(o[a]={query:{useInfinite:!0,useInfiniteQueryParam:"offset"}},o),{}))||{}},$e=n=>{const{input:o="./openapi.json",operationsToGenerateInfiniteQueryHook:a=void 0}=n||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:o,output:{client:"react-query",mode:"tags-split",override:{header:l=>["Generated by orval 🍺",...l.title?[l.title]:[],...l.description?[l.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:Ke,...(a==null?void 0:a.length)&&{operations:Qe(a)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};b.AxiosConfig=Ve,b.GTMSendPageView=Ne,b.I18nConfig=Ye,b.InjectDependenciesContext=V,b.InjectDependenciesProvider=Ie,b.MapBoxConfig=Ue,b.MaskTextField=Be,b.QueryClientConfigProvider=Ge,b.RequireAuth=We,b.SentryConfig=ze,b.getOrvalConfig=$e,b.useAuth=He,b.useInfiniteDataGrid=Xe,b.useResponseError=Je,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|