@tracktor/shared-module 1.0.9 → 1.0.10
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/{en-bFWwYyLH.js → en-E8ST0UOq.js} +1 -1
- package/dist/{fr-WPlDe-ow.js → fr-Iii0rxc-.js} +1 -1
- package/dist/hooks/useResponseError/useResponseError.d.ts +1 -8
- package/dist/{main-YTkqJNOe.js → main-Kjk_MFFV.js} +266 -266
- package/dist/main.js +1 -1
- package/dist/main.umd.cjs +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,17 +11,10 @@ export interface ResponseError {
|
|
|
11
11
|
}[];
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
export interface useResponseErrorParams {
|
|
15
|
-
/**
|
|
16
|
-
* Translation key returned for the unknown error
|
|
17
|
-
*/
|
|
18
|
-
unknownErrorTranslationKey?: string;
|
|
19
|
-
}
|
|
20
14
|
/**
|
|
21
15
|
* This hook is used to print error messages from the API
|
|
22
|
-
* @param params
|
|
23
16
|
*/
|
|
24
|
-
export declare const useResponseError: <T = ResponseError>(
|
|
17
|
+
export declare const useResponseError: <T = ResponseError>() => {
|
|
25
18
|
getErrorCode: (error?: any) => string;
|
|
26
19
|
printError: (error?: any) => string;
|
|
27
20
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import Ie, { useState as Rr, useRef as _r, useEffect as X, Suspense as Cr, createContext as Tr, useMemo as ue, useContext as Ne, useCallback as ie } from "react";
|
|
2
|
-
import
|
|
2
|
+
import D from "axios";
|
|
3
3
|
import { useLocation as le, Navigate as Me, Outlet as We, createRoutesFromChildren as Sr, matchRoutes as wr, useNavigationType as Or } from "react-router-dom";
|
|
4
4
|
import { useGoogleTagManager as xr } from "@tracktor/react-google-tag-manager";
|
|
5
|
-
import I
|
|
6
|
-
import
|
|
7
|
-
import { initReactI18next as
|
|
5
|
+
import I from "i18next";
|
|
6
|
+
import jr from "i18next-browser-languagedetector";
|
|
7
|
+
import { initReactI18next as Pr } from "react-i18next";
|
|
8
8
|
import * as oe from "@sentry/react";
|
|
9
|
-
import
|
|
9
|
+
import Ar from "mapbox-gl";
|
|
10
10
|
import U from "dayjs";
|
|
11
|
-
import { QueryClient as
|
|
12
|
-
var
|
|
13
|
-
function
|
|
11
|
+
import { QueryClient as kr, QueryClientProvider as Dr } from "@tanstack/react-query";
|
|
12
|
+
var $r = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
13
|
+
function Mr(t) {
|
|
14
14
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
15
15
|
}
|
|
16
16
|
var se = { exports: {} }, V = {};
|
|
@@ -24,28 +24,28 @@ var se = { exports: {} }, V = {};
|
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
26
|
var Fe;
|
|
27
|
-
function
|
|
27
|
+
function Fr() {
|
|
28
28
|
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
29
|
-
var t = Ie,
|
|
29
|
+
var t = Ie, a = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), $ = Symbol.iterator, x = "@@iterator";
|
|
30
30
|
function R(e) {
|
|
31
31
|
if (e === null || typeof e != "object")
|
|
32
32
|
return null;
|
|
33
|
-
var r =
|
|
33
|
+
var r = $ && e[$] || e[x];
|
|
34
34
|
return typeof r == "function" ? r : null;
|
|
35
35
|
}
|
|
36
|
-
var
|
|
36
|
+
var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
37
37
|
function _(e) {
|
|
38
38
|
{
|
|
39
|
-
for (var r = arguments.length,
|
|
40
|
-
|
|
41
|
-
F("error", e,
|
|
39
|
+
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
40
|
+
o[u - 1] = arguments[u];
|
|
41
|
+
F("error", e, o);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
function F(e, r,
|
|
44
|
+
function F(e, r, o) {
|
|
45
45
|
{
|
|
46
|
-
var u =
|
|
47
|
-
p !== "" && (r += "%s",
|
|
48
|
-
var m =
|
|
46
|
+
var u = k.ReactDebugCurrentFrame, p = u.getStackAddendum();
|
|
47
|
+
p !== "" && (r += "%s", o = o.concat([p]));
|
|
48
|
+
var m = o.map(function(d) {
|
|
49
49
|
return String(d);
|
|
50
50
|
});
|
|
51
51
|
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
|
|
@@ -54,23 +54,23 @@ function Lr() {
|
|
|
54
54
|
var ze = !1, Ue = !1, qe = !1, Be = !1, Ge = !1, fe;
|
|
55
55
|
fe = Symbol.for("react.module.reference");
|
|
56
56
|
function Je(e) {
|
|
57
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e ===
|
|
57
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === g || Ge || e === n || e === y || e === h || Be || e === O || ze || Ue || qe || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === C || e.$$typeof === v || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
|
|
58
58
|
// types supported by any Flight configuration anywhere since
|
|
59
59
|
// we don't know which Flight build this will end up being used
|
|
60
60
|
// with.
|
|
61
61
|
e.$$typeof === fe || e.getModuleId !== void 0));
|
|
62
62
|
}
|
|
63
|
-
function He(e, r,
|
|
63
|
+
function He(e, r, o) {
|
|
64
64
|
var u = e.displayName;
|
|
65
65
|
if (u)
|
|
66
66
|
return u;
|
|
67
67
|
var p = r.displayName || r.name || "";
|
|
68
|
-
return p !== "" ?
|
|
68
|
+
return p !== "" ? o + "(" + p + ")" : o;
|
|
69
69
|
}
|
|
70
70
|
function de(e) {
|
|
71
71
|
return e.displayName || "Context";
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function j(e) {
|
|
74
74
|
if (e == null)
|
|
75
75
|
return null;
|
|
76
76
|
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -82,11 +82,11 @@ function Lr() {
|
|
|
82
82
|
return "Fragment";
|
|
83
83
|
case i:
|
|
84
84
|
return "Portal";
|
|
85
|
-
case
|
|
85
|
+
case g:
|
|
86
86
|
return "Profiler";
|
|
87
|
-
case
|
|
87
|
+
case n:
|
|
88
88
|
return "StrictMode";
|
|
89
|
-
case
|
|
89
|
+
case y:
|
|
90
90
|
return "Suspense";
|
|
91
91
|
case h:
|
|
92
92
|
return "SuspenseList";
|
|
@@ -96,18 +96,18 @@ function Lr() {
|
|
|
96
96
|
case c:
|
|
97
97
|
var r = e;
|
|
98
98
|
return de(r) + ".Consumer";
|
|
99
|
-
case
|
|
100
|
-
var
|
|
101
|
-
return de(
|
|
99
|
+
case v:
|
|
100
|
+
var o = e;
|
|
101
|
+
return de(o._context) + ".Provider";
|
|
102
102
|
case l:
|
|
103
103
|
return He(e, e.render, "ForwardRef");
|
|
104
104
|
case C:
|
|
105
105
|
var u = e.displayName || null;
|
|
106
|
-
return u !== null ? u :
|
|
106
|
+
return u !== null ? u : j(e.type) || "Memo";
|
|
107
107
|
case T: {
|
|
108
108
|
var p = e, m = p._payload, d = p._init;
|
|
109
109
|
try {
|
|
110
|
-
return
|
|
110
|
+
return j(d(m));
|
|
111
111
|
} catch {
|
|
112
112
|
return null;
|
|
113
113
|
}
|
|
@@ -142,7 +142,7 @@ function Lr() {
|
|
|
142
142
|
N++;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Ze() {
|
|
146
146
|
{
|
|
147
147
|
if (N--, N === 0) {
|
|
148
148
|
var e = {
|
|
@@ -177,39 +177,39 @@ function Lr() {
|
|
|
177
177
|
N < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
var
|
|
181
|
-
function q(e, r,
|
|
180
|
+
var Z = k.ReactCurrentDispatcher, K;
|
|
181
|
+
function q(e, r, o) {
|
|
182
182
|
{
|
|
183
|
-
if (
|
|
183
|
+
if (K === void 0)
|
|
184
184
|
try {
|
|
185
185
|
throw Error();
|
|
186
186
|
} catch (p) {
|
|
187
187
|
var u = p.stack.trim().match(/\n( *(at )?)/);
|
|
188
|
-
|
|
188
|
+
K = u && u[1] || "";
|
|
189
189
|
}
|
|
190
190
|
return `
|
|
191
|
-
` +
|
|
191
|
+
` + K + e;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
var Q = !1, B;
|
|
195
195
|
{
|
|
196
|
-
var
|
|
197
|
-
B = new
|
|
196
|
+
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
|
|
197
|
+
B = new Ke();
|
|
198
198
|
}
|
|
199
199
|
function Re(e, r) {
|
|
200
200
|
if (!e || Q)
|
|
201
201
|
return "";
|
|
202
202
|
{
|
|
203
|
-
var
|
|
204
|
-
if (
|
|
205
|
-
return
|
|
203
|
+
var o = B.get(e);
|
|
204
|
+
if (o !== void 0)
|
|
205
|
+
return o;
|
|
206
206
|
}
|
|
207
207
|
var u;
|
|
208
208
|
Q = !0;
|
|
209
209
|
var p = Error.prepareStackTrace;
|
|
210
210
|
Error.prepareStackTrace = void 0;
|
|
211
211
|
var m;
|
|
212
|
-
m =
|
|
212
|
+
m = Z.current, Z.current = null, Xe();
|
|
213
213
|
try {
|
|
214
214
|
if (r) {
|
|
215
215
|
var d = function() {
|
|
@@ -222,29 +222,29 @@ function Lr() {
|
|
|
222
222
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
223
223
|
try {
|
|
224
224
|
Reflect.construct(d, []);
|
|
225
|
-
} catch (
|
|
226
|
-
u =
|
|
225
|
+
} catch (P) {
|
|
226
|
+
u = P;
|
|
227
227
|
}
|
|
228
228
|
Reflect.construct(e, [], d);
|
|
229
229
|
} else {
|
|
230
230
|
try {
|
|
231
231
|
d.call();
|
|
232
|
-
} catch (
|
|
233
|
-
u =
|
|
232
|
+
} catch (P) {
|
|
233
|
+
u = P;
|
|
234
234
|
}
|
|
235
235
|
e.call(d.prototype);
|
|
236
236
|
}
|
|
237
237
|
} else {
|
|
238
238
|
try {
|
|
239
239
|
throw Error();
|
|
240
|
-
} catch (
|
|
241
|
-
u =
|
|
240
|
+
} catch (P) {
|
|
241
|
+
u = P;
|
|
242
242
|
}
|
|
243
243
|
e();
|
|
244
244
|
}
|
|
245
|
-
} catch (
|
|
246
|
-
if (
|
|
247
|
-
for (var f =
|
|
245
|
+
} catch (P) {
|
|
246
|
+
if (P && u && typeof P.stack == "string") {
|
|
247
|
+
for (var f = P.stack.split(`
|
|
248
248
|
`), S = u.stack.split(`
|
|
249
249
|
`), b = f.length - 1, E = S.length - 1; b >= 1 && E >= 0 && f[b] !== S[E]; )
|
|
250
250
|
E--;
|
|
@@ -253,28 +253,28 @@ function Lr() {
|
|
|
253
253
|
if (b !== 1 || E !== 1)
|
|
254
254
|
do
|
|
255
255
|
if (b--, E--, E < 0 || f[b] !== S[E]) {
|
|
256
|
-
var
|
|
256
|
+
var w = `
|
|
257
257
|
` + f[b].replace(" at new ", " at ");
|
|
258
|
-
return e.displayName &&
|
|
258
|
+
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, w), w;
|
|
259
259
|
}
|
|
260
260
|
while (b >= 1 && E >= 0);
|
|
261
261
|
break;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
} finally {
|
|
265
|
-
Q = !1,
|
|
265
|
+
Q = !1, Z.current = m, Ze(), Error.prepareStackTrace = p;
|
|
266
266
|
}
|
|
267
267
|
var Y = e ? e.displayName || e.name : "", $e = Y ? q(Y) : "";
|
|
268
268
|
return typeof e == "function" && B.set(e, $e), $e;
|
|
269
269
|
}
|
|
270
|
-
function Qe(e, r,
|
|
270
|
+
function Qe(e, r, o) {
|
|
271
271
|
return Re(e, !1);
|
|
272
272
|
}
|
|
273
273
|
function er(e) {
|
|
274
274
|
var r = e.prototype;
|
|
275
275
|
return !!(r && r.isReactComponent);
|
|
276
276
|
}
|
|
277
|
-
function G(e, r,
|
|
277
|
+
function G(e, r, o) {
|
|
278
278
|
if (e == null)
|
|
279
279
|
return "";
|
|
280
280
|
if (typeof e == "function")
|
|
@@ -282,7 +282,7 @@ function Lr() {
|
|
|
282
282
|
if (typeof e == "string")
|
|
283
283
|
return q(e);
|
|
284
284
|
switch (e) {
|
|
285
|
-
case
|
|
285
|
+
case y:
|
|
286
286
|
return q("Suspense");
|
|
287
287
|
case h:
|
|
288
288
|
return q("SuspenseList");
|
|
@@ -292,26 +292,26 @@ function Lr() {
|
|
|
292
292
|
case l:
|
|
293
293
|
return Qe(e.render);
|
|
294
294
|
case C:
|
|
295
|
-
return G(e.type, r,
|
|
295
|
+
return G(e.type, r, o);
|
|
296
296
|
case T: {
|
|
297
297
|
var u = e, p = u._payload, m = u._init;
|
|
298
298
|
try {
|
|
299
|
-
return G(m(p), r,
|
|
299
|
+
return G(m(p), r, o);
|
|
300
300
|
} catch {
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
return "";
|
|
305
305
|
}
|
|
306
|
-
var J = Object.prototype.hasOwnProperty, _e = {}, Ce =
|
|
306
|
+
var J = Object.prototype.hasOwnProperty, _e = {}, Ce = k.ReactDebugCurrentFrame;
|
|
307
307
|
function H(e) {
|
|
308
308
|
if (e) {
|
|
309
|
-
var r = e._owner,
|
|
310
|
-
Ce.setExtraStackFrame(
|
|
309
|
+
var r = e._owner, o = G(e.type, e._source, r ? r.type : null);
|
|
310
|
+
Ce.setExtraStackFrame(o);
|
|
311
311
|
} else
|
|
312
312
|
Ce.setExtraStackFrame(null);
|
|
313
313
|
}
|
|
314
|
-
function rr(e, r,
|
|
314
|
+
function rr(e, r, o, u, p) {
|
|
315
315
|
{
|
|
316
316
|
var m = Function.call.bind(J);
|
|
317
317
|
for (var d in e)
|
|
@@ -319,14 +319,14 @@ function Lr() {
|
|
|
319
319
|
var f = void 0;
|
|
320
320
|
try {
|
|
321
321
|
if (typeof e[d] != "function") {
|
|
322
|
-
var S = Error((u || "React class") + ": " +
|
|
322
|
+
var S = Error((u || "React class") + ": " + o + " 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`.");
|
|
323
323
|
throw S.name = "Invariant Violation", S;
|
|
324
324
|
}
|
|
325
|
-
f = e[d](r, d, u,
|
|
325
|
+
f = e[d](r, d, u, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
326
326
|
} catch (b) {
|
|
327
327
|
f = b;
|
|
328
328
|
}
|
|
329
|
-
f && !(f instanceof Error) && (H(p), _("%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).", u || "React class",
|
|
329
|
+
f && !(f instanceof Error) && (H(p), _("%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).", u || "React class", o, d, typeof f), H(null)), f instanceof Error && !(f.message in _e) && (_e[f.message] = !0, H(p), _("Failed %s type: %s", o, f.message), H(null));
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
}
|
|
@@ -336,8 +336,8 @@ function Lr() {
|
|
|
336
336
|
}
|
|
337
337
|
function nr(e) {
|
|
338
338
|
{
|
|
339
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
|
340
|
-
return
|
|
339
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, o = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
340
|
+
return o;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
function ar(e) {
|
|
@@ -354,7 +354,7 @@ function Lr() {
|
|
|
354
354
|
if (ar(e))
|
|
355
355
|
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), Te(e);
|
|
356
356
|
}
|
|
357
|
-
var W =
|
|
357
|
+
var W = k.ReactCurrentOwner, or = {
|
|
358
358
|
key: !0,
|
|
359
359
|
ref: !0,
|
|
360
360
|
__self: !0,
|
|
@@ -379,40 +379,40 @@ function Lr() {
|
|
|
379
379
|
}
|
|
380
380
|
function ur(e, r) {
|
|
381
381
|
if (typeof e.ref == "string" && W.current && r && W.current.stateNode !== r) {
|
|
382
|
-
var
|
|
383
|
-
re[
|
|
382
|
+
var o = j(W.current.type);
|
|
383
|
+
re[o] || (_('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[o] = !0);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
function lr(e, r) {
|
|
387
387
|
{
|
|
388
|
-
var
|
|
388
|
+
var o = function() {
|
|
389
389
|
we || (we = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
390
390
|
};
|
|
391
|
-
|
|
392
|
-
get:
|
|
391
|
+
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
392
|
+
get: o,
|
|
393
393
|
configurable: !0
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
function cr(e, r) {
|
|
398
398
|
{
|
|
399
|
-
var
|
|
399
|
+
var o = function() {
|
|
400
400
|
Oe || (Oe = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
401
401
|
};
|
|
402
|
-
|
|
403
|
-
get:
|
|
402
|
+
o.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
403
|
+
get: o,
|
|
404
404
|
configurable: !0
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
var fr = function(e, r,
|
|
408
|
+
var fr = function(e, r, o, u, p, m, d) {
|
|
409
409
|
var f = {
|
|
410
410
|
// This tag allows us to uniquely identify this as a React Element
|
|
411
|
-
$$typeof:
|
|
411
|
+
$$typeof: a,
|
|
412
412
|
// Built-in properties that belong on the element
|
|
413
413
|
type: e,
|
|
414
414
|
key: r,
|
|
415
|
-
ref:
|
|
415
|
+
ref: o,
|
|
416
416
|
props: d,
|
|
417
417
|
// Record the component responsible for creating this element.
|
|
418
418
|
_owner: m
|
|
@@ -434,10 +434,10 @@ function Lr() {
|
|
|
434
434
|
value: p
|
|
435
435
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
436
436
|
};
|
|
437
|
-
function dr(e, r,
|
|
437
|
+
function dr(e, r, o, u, p) {
|
|
438
438
|
{
|
|
439
439
|
var m, d = {}, f = null, S = null;
|
|
440
|
-
|
|
440
|
+
o !== void 0 && (Se(o), f = "" + o), sr(r) && (Se(r.key), f = "" + r.key), ir(r) && (S = r.ref, ur(r, p));
|
|
441
441
|
for (m in r)
|
|
442
442
|
J.call(r, m) && !or.hasOwnProperty(m) && (d[m] = r[m]);
|
|
443
443
|
if (e && e.defaultProps) {
|
|
@@ -452,23 +452,23 @@ function Lr() {
|
|
|
452
452
|
return fr(e, f, S, p, u, W.current, d);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
var te =
|
|
455
|
+
var te = k.ReactCurrentOwner, xe = k.ReactDebugCurrentFrame;
|
|
456
456
|
function L(e) {
|
|
457
457
|
if (e) {
|
|
458
|
-
var r = e._owner,
|
|
459
|
-
xe.setExtraStackFrame(
|
|
458
|
+
var r = e._owner, o = G(e.type, e._source, r ? r.type : null);
|
|
459
|
+
xe.setExtraStackFrame(o);
|
|
460
460
|
} else
|
|
461
461
|
xe.setExtraStackFrame(null);
|
|
462
462
|
}
|
|
463
463
|
var ne;
|
|
464
464
|
ne = !1;
|
|
465
465
|
function ae(e) {
|
|
466
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
466
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
467
467
|
}
|
|
468
468
|
function je() {
|
|
469
469
|
{
|
|
470
470
|
if (te.current) {
|
|
471
|
-
var e =
|
|
471
|
+
var e = j(te.current.type);
|
|
472
472
|
if (e)
|
|
473
473
|
return `
|
|
474
474
|
|
|
@@ -480,10 +480,10 @@ Check the render method of \`` + e + "`.";
|
|
|
480
480
|
function pr(e) {
|
|
481
481
|
{
|
|
482
482
|
if (e !== void 0) {
|
|
483
|
-
var r = e.fileName.replace(/^.*[\\\/]/, ""),
|
|
483
|
+
var r = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
|
|
484
484
|
return `
|
|
485
485
|
|
|
486
|
-
Check your code at ` + r + ":" +
|
|
486
|
+
Check your code at ` + r + ":" + o + ".";
|
|
487
487
|
}
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
@@ -493,10 +493,10 @@ Check your code at ` + r + ":" + a + ".";
|
|
|
493
493
|
{
|
|
494
494
|
var r = je();
|
|
495
495
|
if (!r) {
|
|
496
|
-
var
|
|
497
|
-
|
|
496
|
+
var o = typeof e == "string" ? e : e.displayName || e.name;
|
|
497
|
+
o && (r = `
|
|
498
498
|
|
|
499
|
-
Check the top-level render call using <` +
|
|
499
|
+
Check the top-level render call using <` + o + ">.");
|
|
500
500
|
}
|
|
501
501
|
return r;
|
|
502
502
|
}
|
|
@@ -506,12 +506,12 @@ Check the top-level render call using <` + a + ">.");
|
|
|
506
506
|
if (!e._store || e._store.validated || e.key != null)
|
|
507
507
|
return;
|
|
508
508
|
e._store.validated = !0;
|
|
509
|
-
var
|
|
510
|
-
if (Pe[
|
|
509
|
+
var o = vr(r);
|
|
510
|
+
if (Pe[o])
|
|
511
511
|
return;
|
|
512
|
-
Pe[
|
|
512
|
+
Pe[o] = !0;
|
|
513
513
|
var u = "";
|
|
514
|
-
e && e._owner && e._owner !== te.current && (u = " It was passed a child from " +
|
|
514
|
+
e && e._owner && e._owner !== te.current && (u = " It was passed a child from " + j(e._owner.type) + "."), L(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, u), L(null);
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
function ke(e, r) {
|
|
@@ -519,8 +519,8 @@ Check the top-level render call using <` + a + ">.");
|
|
|
519
519
|
if (typeof e != "object")
|
|
520
520
|
return;
|
|
521
521
|
if (ee(e))
|
|
522
|
-
for (var
|
|
523
|
-
var u = e[
|
|
522
|
+
for (var o = 0; o < e.length; o++) {
|
|
523
|
+
var u = e[o];
|
|
524
524
|
ae(u) && Ae(u, r);
|
|
525
525
|
}
|
|
526
526
|
else if (ae(e))
|
|
@@ -538,21 +538,21 @@ Check the top-level render call using <` + a + ">.");
|
|
|
538
538
|
var r = e.type;
|
|
539
539
|
if (r == null || typeof r == "string")
|
|
540
540
|
return;
|
|
541
|
-
var
|
|
541
|
+
var o;
|
|
542
542
|
if (typeof r == "function")
|
|
543
|
-
|
|
543
|
+
o = r.propTypes;
|
|
544
544
|
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
545
545
|
// Inner props are checked in the reconciler.
|
|
546
546
|
r.$$typeof === C))
|
|
547
|
-
|
|
547
|
+
o = r.propTypes;
|
|
548
548
|
else
|
|
549
549
|
return;
|
|
550
|
-
if (
|
|
551
|
-
var u =
|
|
552
|
-
rr(
|
|
550
|
+
if (o) {
|
|
551
|
+
var u = j(r);
|
|
552
|
+
rr(o, e.props, "prop", u, e);
|
|
553
553
|
} else if (r.PropTypes !== void 0 && !ne) {
|
|
554
554
|
ne = !0;
|
|
555
|
-
var p =
|
|
555
|
+
var p = j(r);
|
|
556
556
|
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
|
|
557
557
|
}
|
|
558
558
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -560,8 +560,8 @@ Check the top-level render call using <` + a + ">.");
|
|
|
560
560
|
}
|
|
561
561
|
function gr(e) {
|
|
562
562
|
{
|
|
563
|
-
for (var r = Object.keys(e.props),
|
|
564
|
-
var u = r[
|
|
563
|
+
for (var r = Object.keys(e.props), o = 0; o < r.length; o++) {
|
|
564
|
+
var u = r[o];
|
|
565
565
|
if (u !== "children" && u !== "key") {
|
|
566
566
|
L(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), L(null);
|
|
567
567
|
break;
|
|
@@ -570,7 +570,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
570
570
|
e.ref !== null && (L(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), L(null));
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function De(e, r,
|
|
573
|
+
function De(e, r, o, u, p, m) {
|
|
574
574
|
{
|
|
575
575
|
var d = Je(e);
|
|
576
576
|
if (!d) {
|
|
@@ -579,32 +579,32 @@ Check the top-level render call using <` + a + ">.");
|
|
|
579
579
|
var S = pr(p);
|
|
580
580
|
S ? f += S : f += je();
|
|
581
581
|
var b;
|
|
582
|
-
e === null ? b = "null" : ee(e) ? b = "array" : e !== void 0 && e.$$typeof ===
|
|
582
|
+
e === null ? b = "null" : ee(e) ? b = "array" : e !== void 0 && e.$$typeof === a ? (b = "<" + (j(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, f);
|
|
583
583
|
}
|
|
584
|
-
var E = dr(e, r,
|
|
584
|
+
var E = dr(e, r, o, p, m);
|
|
585
585
|
if (E == null)
|
|
586
586
|
return E;
|
|
587
587
|
if (d) {
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
588
|
+
var w = r.children;
|
|
589
|
+
if (w !== void 0)
|
|
590
590
|
if (u)
|
|
591
|
-
if (ee(
|
|
592
|
-
for (var Y = 0; Y <
|
|
593
|
-
ke(
|
|
594
|
-
Object.freeze && Object.freeze(
|
|
591
|
+
if (ee(w)) {
|
|
592
|
+
for (var Y = 0; Y < w.length; Y++)
|
|
593
|
+
ke(w[Y], e);
|
|
594
|
+
Object.freeze && Object.freeze(w);
|
|
595
595
|
} else
|
|
596
596
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
ke(
|
|
598
|
+
ke(w, e);
|
|
599
599
|
}
|
|
600
600
|
return e === s ? gr(E) : mr(E), E;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
function hr(e, r,
|
|
604
|
-
return De(e, r,
|
|
603
|
+
function hr(e, r, o) {
|
|
604
|
+
return De(e, r, o, !0);
|
|
605
605
|
}
|
|
606
|
-
function yr(e, r,
|
|
607
|
-
return De(e, r,
|
|
606
|
+
function yr(e, r, o) {
|
|
607
|
+
return De(e, r, o, !1);
|
|
608
608
|
}
|
|
609
609
|
var br = yr, Er = hr;
|
|
610
610
|
V.Fragment = s, V.jsx = br, V.jsxs = Er;
|
|
@@ -621,75 +621,75 @@ var z = {};
|
|
|
621
621
|
* LICENSE file in the root directory of this source tree.
|
|
622
622
|
*/
|
|
623
623
|
var Le;
|
|
624
|
-
function
|
|
624
|
+
function Lr() {
|
|
625
625
|
if (Le)
|
|
626
626
|
return z;
|
|
627
627
|
Le = 1;
|
|
628
|
-
var t = Ie,
|
|
629
|
-
function
|
|
630
|
-
var h, C = {}, T = null,
|
|
631
|
-
|
|
628
|
+
var t = Ie, a = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
629
|
+
function v(c, l, y) {
|
|
630
|
+
var h, C = {}, T = null, O = null;
|
|
631
|
+
y !== void 0 && (T = "" + y), l.key !== void 0 && (T = "" + l.key), l.ref !== void 0 && (O = l.ref);
|
|
632
632
|
for (h in l)
|
|
633
|
-
s.call(l, h) && !
|
|
633
|
+
s.call(l, h) && !g.hasOwnProperty(h) && (C[h] = l[h]);
|
|
634
634
|
if (c && c.defaultProps)
|
|
635
635
|
for (h in l = c.defaultProps, l)
|
|
636
636
|
C[h] === void 0 && (C[h] = l[h]);
|
|
637
|
-
return { $$typeof:
|
|
637
|
+
return { $$typeof: a, type: c, key: T, ref: O, props: C, _owner: n.current };
|
|
638
638
|
}
|
|
639
|
-
return z.Fragment = i, z.jsx =
|
|
639
|
+
return z.Fragment = i, z.jsx = v, z.jsxs = v, z;
|
|
640
640
|
}
|
|
641
|
-
process.env.NODE_ENV === "production" ? se.exports =
|
|
642
|
-
var
|
|
643
|
-
const
|
|
641
|
+
process.env.NODE_ENV === "production" ? se.exports = Lr() : se.exports = Fr();
|
|
642
|
+
var A = se.exports;
|
|
643
|
+
const nt = ({
|
|
644
644
|
Fallback: t,
|
|
645
|
-
loginPath:
|
|
645
|
+
loginPath: a = "/login",
|
|
646
646
|
localStorageKey: i = "user",
|
|
647
647
|
redirect401Path: s = "/login",
|
|
648
|
-
isLogged:
|
|
648
|
+
isLogged: n
|
|
649
649
|
}) => {
|
|
650
|
-
var C, T,
|
|
651
|
-
const [
|
|
650
|
+
var C, T, O, $;
|
|
651
|
+
const [g, v] = Rr(null), c = le(), l = _r(!1), y = typeof n == "function" ? n() : !!n, h = typeof y == "boolean" ? y : y == null ? void 0 : y.isLogged;
|
|
652
652
|
return X(() => {
|
|
653
|
-
var
|
|
654
|
-
l.current || (l.current = !0, (
|
|
653
|
+
var x;
|
|
654
|
+
l.current || (l.current = !0, (x = D) == null || x.interceptors.response.use(
|
|
655
655
|
(R) => R,
|
|
656
656
|
async (R) => {
|
|
657
657
|
var F;
|
|
658
|
-
return typeof R == "object" && R && "response" in R && R.response && typeof R.response == "object" && "status" in R.response && R.response && typeof R.response == "object" && "status" in R.response && ((F = R == null ? void 0 : R.response) == null ? void 0 : F.status) === 401 && (
|
|
658
|
+
return typeof R == "object" && R && "response" in R && R.response && typeof R.response == "object" && "status" in R.response && R.response && typeof R.response == "object" && "status" in R.response && ((F = R == null ? void 0 : R.response) == null ? void 0 : F.status) === 401 && (D.defaults.headers.common.Authorization = null, localStorage.removeItem(i), v(s)), Promise.reject(R);
|
|
659
659
|
}
|
|
660
660
|
));
|
|
661
|
-
}, [i, s]), h && !
|
|
662
|
-
},
|
|
663
|
-
const { pathname: t } = le(), { sendEvent:
|
|
661
|
+
}, [i, s]), h && !g ? /* @__PURE__ */ A.jsx(Cr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && (($ = (O = c.state) == null ? void 0 : O.from) == null ? void 0 : $.pathname) === a ? /* @__PURE__ */ A.jsx(Me, { to: c.state.from.state.from.pathname + c.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ A.jsx(We, {}) }) : /* @__PURE__ */ A.jsx(Me, { to: a, state: { from: c }, replace: !0 });
|
|
662
|
+
}, at = () => {
|
|
663
|
+
const { pathname: t } = le(), { sendEvent: a } = xr();
|
|
664
664
|
return X(() => {
|
|
665
|
-
|
|
666
|
-
}, [t,
|
|
665
|
+
a({ event: "pageView", pathname: t });
|
|
666
|
+
}, [t, a]), /* @__PURE__ */ A.jsx(We, {});
|
|
667
667
|
}, ce = Tr({
|
|
668
668
|
apiURL: void 0,
|
|
669
669
|
children: void 0
|
|
670
|
-
}),
|
|
670
|
+
}), ot = ({ children: t, apiURL: a }) => {
|
|
671
671
|
const i = ue(
|
|
672
672
|
() => ({
|
|
673
|
-
apiURL:
|
|
673
|
+
apiURL: a
|
|
674
674
|
}),
|
|
675
|
-
[
|
|
675
|
+
[a]
|
|
676
676
|
);
|
|
677
|
-
return /* @__PURE__ */
|
|
678
|
-
},
|
|
677
|
+
return /* @__PURE__ */ A.jsx(ce.Provider, { value: i, children: t });
|
|
678
|
+
}, it = ({
|
|
679
679
|
tokenTypeKey: t = "tokenType",
|
|
680
|
-
userLocalStorageKey:
|
|
680
|
+
userLocalStorageKey: a = "user",
|
|
681
681
|
tokenKey: i = "accessToken",
|
|
682
682
|
postContentType: s = "application/json",
|
|
683
|
-
...
|
|
683
|
+
...n
|
|
684
684
|
}) => {
|
|
685
|
-
const { apiURL:
|
|
686
|
-
if (
|
|
685
|
+
const { apiURL: g = n.apiURL } = Ne(ce);
|
|
686
|
+
if (!D.defaults)
|
|
687
687
|
return null;
|
|
688
|
-
const
|
|
689
|
-
return
|
|
690
|
-
},
|
|
688
|
+
const v = localStorage.getItem(a), c = v ? JSON.parse(v) : null, l = c != null && c[t] ? c[t] : null, y = c != null && c[i] ? c[i] : null, h = v ? `${l} ${y}` : null;
|
|
689
|
+
return D.defaults.baseURL = g, D.defaults.headers.post["Content-Type"] = s, h && (D.defaults.headers.common.Authorization = h), null;
|
|
690
|
+
}, st = ({ debug: t, resources: a }) => {
|
|
691
691
|
var i;
|
|
692
|
-
return (i = I) != null && i.isInitialized || (I.use(
|
|
692
|
+
return (i = I) != null && i.isInitialized || (I.use(jr).use(Pr).init({
|
|
693
693
|
debug: t,
|
|
694
694
|
fallbackLng: "en",
|
|
695
695
|
interpolation: {
|
|
@@ -700,28 +700,28 @@ const at = ({
|
|
|
700
700
|
bindI18n: !1,
|
|
701
701
|
useSuspense: !0
|
|
702
702
|
},
|
|
703
|
-
resources:
|
|
703
|
+
resources: a,
|
|
704
704
|
returnNull: !1
|
|
705
705
|
}).then(() => {
|
|
706
706
|
document.documentElement.lang !== I.resolvedLanguage && I.resolvedLanguage && document.documentElement.setAttribute("lang", I.resolvedLanguage);
|
|
707
707
|
}), I.on("languageChanged", (s) => {
|
|
708
708
|
document.documentElement.setAttribute("lang", s);
|
|
709
709
|
})), null;
|
|
710
|
-
},
|
|
710
|
+
}, ut = ({
|
|
711
711
|
dsn: t,
|
|
712
|
-
integrations:
|
|
712
|
+
integrations: a,
|
|
713
713
|
tracesSampleRate: i,
|
|
714
714
|
replaysSessionSampleRate: s,
|
|
715
|
-
replaysOnErrorSampleRate:
|
|
716
|
-
tracePropagationTargets:
|
|
717
|
-
ignoreErrors:
|
|
715
|
+
replaysOnErrorSampleRate: n,
|
|
716
|
+
tracePropagationTargets: g,
|
|
717
|
+
ignoreErrors: v,
|
|
718
718
|
debug: c,
|
|
719
719
|
environment: l
|
|
720
720
|
}) => (oe.isInitialized() || (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && oe.init({
|
|
721
721
|
debug: c,
|
|
722
722
|
dsn: t,
|
|
723
723
|
environment: l || "production",
|
|
724
|
-
ignoreErrors: [...
|
|
724
|
+
ignoreErrors: [...v || [], /dynamically imported module/],
|
|
725
725
|
integrations: [
|
|
726
726
|
oe.reactRouterV6BrowserTracingIntegration({
|
|
727
727
|
createRoutesFromChildren: Sr,
|
|
@@ -730,141 +730,141 @@ const at = ({
|
|
|
730
730
|
useLocation: le,
|
|
731
731
|
useNavigationType: Or
|
|
732
732
|
}),
|
|
733
|
-
...
|
|
733
|
+
...a || []
|
|
734
734
|
],
|
|
735
|
-
replaysOnErrorSampleRate:
|
|
735
|
+
replaysOnErrorSampleRate: n || 1,
|
|
736
736
|
replaysSessionSampleRate: s || 0.1,
|
|
737
|
-
tracePropagationTargets:
|
|
737
|
+
tracePropagationTargets: g,
|
|
738
738
|
tracesSampleRate: i || 1
|
|
739
|
-
}), null),
|
|
739
|
+
}), null), lt = ({ IMaskMixin: t, ...a }) => {
|
|
740
740
|
const i = ue(
|
|
741
741
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
742
|
-
() => t(({ TextField: s, ...
|
|
742
|
+
() => t(({ TextField: s, ...n }) => /* @__PURE__ */ A.jsx(s, { ...n })),
|
|
743
743
|
[t]
|
|
744
744
|
);
|
|
745
|
-
return /* @__PURE__ */
|
|
746
|
-
},
|
|
745
|
+
return /* @__PURE__ */ A.jsx(i, { ...a });
|
|
746
|
+
}, ct = ({ accessToken: t }) => (t && (Ar.accessToken = t), null);
|
|
747
747
|
var Ve = { exports: {} };
|
|
748
|
-
(function(t,
|
|
748
|
+
(function(t, a) {
|
|
749
749
|
(function(i, s) {
|
|
750
750
|
t.exports = s();
|
|
751
|
-
})(
|
|
751
|
+
})($r, function() {
|
|
752
752
|
var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
753
|
-
return function(s,
|
|
754
|
-
var
|
|
755
|
-
|
|
753
|
+
return function(s, n, g) {
|
|
754
|
+
var v = n.prototype, c = v.format;
|
|
755
|
+
g.en.formats = i, v.format = function(l) {
|
|
756
756
|
l === void 0 && (l = "YYYY-MM-DDTHH:mm:ssZ");
|
|
757
|
-
var
|
|
758
|
-
return C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(
|
|
759
|
-
var R =
|
|
760
|
-
return
|
|
757
|
+
var y = this.$locale().formats, h = function(C, T) {
|
|
758
|
+
return C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(O, $, x) {
|
|
759
|
+
var R = x && x.toUpperCase();
|
|
760
|
+
return $ || T[x] || i[x] || T[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, _, F) {
|
|
761
761
|
return _ || F.slice(1);
|
|
762
762
|
});
|
|
763
763
|
});
|
|
764
|
-
}(l,
|
|
764
|
+
}(l, y === void 0 ? {} : y);
|
|
765
765
|
return c.call(this, h);
|
|
766
766
|
};
|
|
767
767
|
};
|
|
768
768
|
});
|
|
769
769
|
})(Ve);
|
|
770
|
-
var
|
|
771
|
-
const
|
|
772
|
-
U.extend(
|
|
773
|
-
const
|
|
770
|
+
var Yr = Ve.exports;
|
|
771
|
+
const Ir = /* @__PURE__ */ Mr(Yr);
|
|
772
|
+
U.extend(Ir);
|
|
773
|
+
const ft = ({ language: t }) => (X(() => {
|
|
774
774
|
var i;
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
777
|
-
import("./en-
|
|
778
|
-
U.locale(
|
|
775
|
+
const a = t || ((i = navigator.language) == null ? void 0 : i.slice(0, 2)) || "en";
|
|
776
|
+
if (a === "en") {
|
|
777
|
+
import("./en-E8ST0UOq.js").then((s) => s.e).then(() => {
|
|
778
|
+
U.locale(a);
|
|
779
779
|
});
|
|
780
780
|
return;
|
|
781
781
|
}
|
|
782
|
-
|
|
783
|
-
U.locale(
|
|
782
|
+
a === "fr" && import("./fr-Iii0rxc-.js").then((s) => s.f).then(() => {
|
|
783
|
+
U.locale(a);
|
|
784
784
|
}).catch(() => {
|
|
785
|
-
import("./en-
|
|
785
|
+
import("./en-E8ST0UOq.js").then((s) => s.e).then(() => {
|
|
786
786
|
U.locale("en");
|
|
787
787
|
});
|
|
788
788
|
});
|
|
789
|
-
}, [t]), null),
|
|
789
|
+
}, [t]), null), dt = ({
|
|
790
790
|
children: t,
|
|
791
|
-
defaultQueriesOptions:
|
|
791
|
+
defaultQueriesOptions: a,
|
|
792
792
|
defaultMutationsOptions: i
|
|
793
793
|
}) => {
|
|
794
|
-
const s = new
|
|
794
|
+
const s = new kr({
|
|
795
795
|
defaultOptions: {
|
|
796
796
|
mutations: {
|
|
797
797
|
...i
|
|
798
798
|
},
|
|
799
799
|
queries: {
|
|
800
|
-
getNextPageParam: (
|
|
800
|
+
getNextPageParam: (n, g, v) => n.length + (v || 0),
|
|
801
801
|
refetchOnWindowFocus: !1,
|
|
802
802
|
retry: 3,
|
|
803
|
-
...
|
|
803
|
+
...a
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
});
|
|
807
|
-
return /* @__PURE__ */
|
|
808
|
-
},
|
|
809
|
-
const
|
|
810
|
-
(
|
|
811
|
-
var c, l,
|
|
812
|
-
const { response:
|
|
813
|
-
return
|
|
807
|
+
return /* @__PURE__ */ A.jsx(Dr, { client: s, children: t });
|
|
808
|
+
}, pt = () => {
|
|
809
|
+
const t = navigator.language === "fr" ? "Une erreur est survenue." : "An error occurred.", a = ie(
|
|
810
|
+
(s) => {
|
|
811
|
+
var g, v, c, l, y, h, C, T, O;
|
|
812
|
+
const { response: n } = s || {};
|
|
813
|
+
return n != null && n.reason ? String(n.reason) : (g = n == null ? void 0 : n.data) != null && g.reason ? String(n.data.reason) : (v = n == null ? void 0 : n.data) != null && v.message ? String(n.data.message) : (l = (c = n == null ? void 0 : n.data) == null ? void 0 : c.detail) != null && l.length && Array.isArray((y = n == null ? void 0 : n.data) == null ? void 0 : y.detail) && ((C = (h = n == null ? void 0 : n.data) == null ? void 0 : h.detail[0]) != null && C.msg) && typeof ((O = (T = n == null ? void 0 : n.data) == null ? void 0 : T.detail[0]) == null ? void 0 : O.msg) == "string" ? String(n.data.detail[0].msg) : t;
|
|
814
814
|
},
|
|
815
|
-
[
|
|
815
|
+
[t]
|
|
816
816
|
);
|
|
817
|
-
return { getErrorCode: ie((
|
|
818
|
-
var
|
|
819
|
-
const { response:
|
|
820
|
-
return
|
|
821
|
-
}, []), printError:
|
|
822
|
-
},
|
|
817
|
+
return { getErrorCode: ie((s) => {
|
|
818
|
+
var g, v, c;
|
|
819
|
+
const { response: n } = s || {};
|
|
820
|
+
return n != null && n.error_code ? String(n == null ? void 0 : n.error_code) : (g = n == null ? void 0 : n.data) != null && g.error_code ? String((v = n == null ? void 0 : n.data) == null ? void 0 : v.error_code) : n != null && n.error_code ? String(n == null ? void 0 : n.error_code) : (c = n == null ? void 0 : n.data) != null && c.error_code ? String(n.data.error_code) : "unknown_error_code";
|
|
821
|
+
}, []), printError: a };
|
|
822
|
+
}, vt = ({
|
|
823
823
|
data: t,
|
|
824
|
-
fetchNextPage:
|
|
824
|
+
fetchNextPage: a,
|
|
825
825
|
isFetchingNextPage: i,
|
|
826
826
|
isInitialLoading: s,
|
|
827
|
-
isLoading:
|
|
828
|
-
enabled:
|
|
827
|
+
isLoading: n,
|
|
828
|
+
enabled: g = !0
|
|
829
829
|
}) => {
|
|
830
|
-
const
|
|
830
|
+
const v = ie(
|
|
831
831
|
async (l) => {
|
|
832
|
-
i || !
|
|
832
|
+
i || !g || await a({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
|
|
833
833
|
},
|
|
834
|
-
[
|
|
834
|
+
[g, a, i]
|
|
835
835
|
), c = ue(() => {
|
|
836
836
|
if (t)
|
|
837
|
-
return t.pages.reduce((l,
|
|
837
|
+
return t.pages.reduce((l, y) => [...l, ...y], []);
|
|
838
838
|
}, [t]);
|
|
839
839
|
return {
|
|
840
|
-
fetchNextPageOnRowsScrollEnd:
|
|
841
|
-
isLoading: i ||
|
|
840
|
+
fetchNextPageOnRowsScrollEnd: v,
|
|
841
|
+
isLoading: i || n,
|
|
842
842
|
loadingVariant: s ? "skeleton" : "linear",
|
|
843
843
|
rows: c
|
|
844
844
|
};
|
|
845
|
-
},
|
|
845
|
+
}, mt = () => ({
|
|
846
846
|
clearAuthenticationToken: () => {
|
|
847
|
-
|
|
847
|
+
D.defaults.headers.common.Authorization = null;
|
|
848
848
|
},
|
|
849
849
|
setAuthenticationToken: ({ tokenType: i, accessToken: s }) => {
|
|
850
|
-
|
|
850
|
+
D.defaults.headers.common.Authorization = `${i} ${s}`;
|
|
851
851
|
}
|
|
852
|
-
}),
|
|
852
|
+
}), Nr = (t, a = "ll") => U(t).format(a), Wr = (t, a = "km") => {
|
|
853
853
|
const i = Number(t);
|
|
854
|
-
return Number.isNaN(i) ? `0 ${
|
|
855
|
-
},
|
|
856
|
-
const
|
|
857
|
-
return typeof
|
|
858
|
-
}, Ye = (t,
|
|
854
|
+
return Number.isNaN(i) ? `0 ${a}` : `${i.toFixed(2)} ${a}`;
|
|
855
|
+
}, Vr = (t) => {
|
|
856
|
+
const a = t && typeof t == "object" && "pathname" in t && t.pathname ? t.pathname : t;
|
|
857
|
+
return typeof a == "string" ? a != null && a.startsWith("/") ? a != null && a.startsWith("/files") ? a : `/files${a}` : a != null && a.startsWith("files") ? `/${a}` : a != null && a.startsWith("files") ? `/${a}` : `/files/${a}` : a;
|
|
858
|
+
}, Ye = (t, a) => {
|
|
859
859
|
if (!t)
|
|
860
860
|
return "";
|
|
861
|
-
const i =
|
|
862
|
-
return typeof
|
|
863
|
-
},
|
|
861
|
+
const i = Vr(t), s = typeof t == "object" && "pathname" in t ? `${t.origin}${i}` : t;
|
|
862
|
+
return typeof a == "number" ? `${s.replace("/files", `/thumbs/${a}`)}` : s;
|
|
863
|
+
}, gt = () => {
|
|
864
864
|
const { apiURL: t } = Ne(ce);
|
|
865
865
|
return {
|
|
866
|
-
dateAdapter:
|
|
867
|
-
distanceAdapter:
|
|
866
|
+
dateAdapter: Nr,
|
|
867
|
+
distanceAdapter: Wr,
|
|
868
868
|
filePathAdapter: (i, s) => Ye(
|
|
869
869
|
t && typeof i == "string" ? {
|
|
870
870
|
origin: t,
|
|
@@ -873,29 +873,29 @@ const dt = ({ language: t }) => (X(() => {
|
|
|
873
873
|
s
|
|
874
874
|
)
|
|
875
875
|
};
|
|
876
|
-
},
|
|
877
|
-
const s = t.split("/").filter((
|
|
876
|
+
}, zr = (t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase(), Ur = (t) => {
|
|
877
|
+
const s = t.split("/").filter((n) => n.length > 0).map((n) => n.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
|
|
878
878
|
return s.charAt(0).toLowerCase() + s.slice(1);
|
|
879
|
-
},
|
|
880
|
-
const s =
|
|
881
|
-
return `${s}${
|
|
882
|
-
},
|
|
879
|
+
}, qr = (t, a, i) => {
|
|
880
|
+
const s = Ur(a), n = zr(i);
|
|
881
|
+
return `${s}${n}`;
|
|
882
|
+
}, Br = (t) => {
|
|
883
883
|
if (t)
|
|
884
|
-
return (t == null ? void 0 : t.reduce((
|
|
884
|
+
return (t == null ? void 0 : t.reduce((a, i) => (a[i] = {
|
|
885
885
|
query: {
|
|
886
886
|
useInfinite: !0,
|
|
887
887
|
useInfiniteQueryParam: "offset",
|
|
888
888
|
useQuery: !0
|
|
889
889
|
}
|
|
890
|
-
},
|
|
891
|
-
},
|
|
892
|
-
const { input:
|
|
890
|
+
}, a), {})) || {};
|
|
891
|
+
}, ht = (t) => {
|
|
892
|
+
const { input: a = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = t || {};
|
|
893
893
|
return {
|
|
894
894
|
api: {
|
|
895
895
|
hooks: {
|
|
896
896
|
afterAllFilesWrite: "prettier src/api/ --write"
|
|
897
897
|
},
|
|
898
|
-
input:
|
|
898
|
+
input: a,
|
|
899
899
|
output: {
|
|
900
900
|
client: "react-query",
|
|
901
901
|
mode: "tags-split",
|
|
@@ -909,8 +909,8 @@ const dt = ({ language: t }) => (X(() => {
|
|
|
909
909
|
name: "axiosCustomInstance",
|
|
910
910
|
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
911
911
|
},
|
|
912
|
-
operationName:
|
|
913
|
-
...(i == null ? void 0 : i.length) && { operations:
|
|
912
|
+
operationName: qr,
|
|
913
|
+
...(i == null ? void 0 : i.length) && { operations: Br(i) },
|
|
914
914
|
query: {
|
|
915
915
|
useQuery: !0
|
|
916
916
|
}
|
|
@@ -922,23 +922,23 @@ const dt = ({ language: t }) => (X(() => {
|
|
|
922
922
|
};
|
|
923
923
|
};
|
|
924
924
|
export {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
925
|
+
at as G,
|
|
926
|
+
it as I,
|
|
927
|
+
lt as M,
|
|
928
|
+
dt as Q,
|
|
929
|
+
nt as R,
|
|
930
|
+
st as a,
|
|
931
|
+
ut as b,
|
|
932
|
+
$r as c,
|
|
933
|
+
ct as d,
|
|
934
|
+
ft as e,
|
|
935
|
+
ot as f,
|
|
936
|
+
vt as g,
|
|
937
|
+
mt as h,
|
|
938
|
+
gt as i,
|
|
939
|
+
ht as j,
|
|
940
|
+
Nr as k,
|
|
941
|
+
Wr as l,
|
|
942
942
|
ce as m,
|
|
943
|
-
|
|
943
|
+
pt as u
|
|
944
944
|
};
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as a, I as s, e as n, a as t, d as r, b as o, m as d, f, M as g, Q as I, R as l, k as u, l as C, j as p, i as A, h as c, g as x, u as z } from "./main-
|
|
1
|
+
import { G as a, I as s, e as n, a as t, d as r, b as o, m as d, f, M as g, Q as I, R as l, k as u, l as C, j as p, i as A, h as c, g as x, u as z } from "./main-Kjk_MFFV.js";
|
|
2
2
|
export {
|
|
3
3
|
a as GTMSendPageView,
|
|
4
4
|
s as InitializeAxiosConfig,
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(v,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("axios"),require("react-router-dom"),require("@tracktor/react-google-tag-manager"),require("i18next"),require("i18next-browser-languagedetector"),require("react-i18next"),require("@sentry/react"),require("mapbox-gl"),require("dayjs"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react","axios","react-router-dom","@tracktor/react-google-tag-manager","i18next","i18next-browser-languagedetector","react-i18next","@sentry/react","mapbox-gl","dayjs","@tanstack/react-query"],y):(v=typeof globalThis<"u"?globalThis:v||self,y(v["@tracktor/shared-module"]={},v.React,v.axios,v.reactRouterDom,v.reactGoogleTagManager,v.i18n,v.LanguageDetector,v.reactI18next,v.Sentry,v.mapbox,v.dayjs,v.reactQuery))})(this,function(v,y,M,x,Ue,Y,$e,Be,Ge,Je,N,fe){"use strict";function qe(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const i in r)if(i!=="default"){const u=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(a,i,u.get?u:{enumerable:!0,get:()=>r[i]})}}return a.default=r,Object.freeze(a)}const Q=qe(Ge);var ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var te={exports:{}},V={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -6,17 +6,17 @@
|
|
|
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 de;function Xe(){return de||(de=1,process.env.NODE_ENV!=="production"&&function(){var r=
|
|
10
|
-
`+ae+e}}var oe=!1,H;{var
|
|
9
|
+
*/var de;function Xe(){return de||(de=1,process.env.NODE_ENV!=="production"&&function(){var r=y,a=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),f=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),I=Symbol.iterator,E="@@iterator";function J(e){if(e===null||typeof e!="object")return null;var t=I&&e[I]||e[E];return typeof t=="function"?t:null}var D=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];re("error",e,o)}}function re(e,t,o){{var s=D.ReactDebugCurrentFrame,m=s.getStackAddendum();m!==""&&(t+="%s",o=o.concat([m]));var g=o.map(function(p){return String(p)});g.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,g)}}var Ct=!1,Tt=!1,St=!1,jt=!1,Ot=!1,ye;ye=Symbol.for("react.module.reference");function wt(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===_||Ot||e===n||e===b||e===h||jt||e===P||Ct||Tt||St||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===S||e.$$typeof===l||e.$$typeof===f||e.$$typeof===c||e.$$typeof===ye||e.getModuleId!==void 0))}function Pt(e,t,o){var s=e.displayName;if(s)return s;var m=t.displayName||t.name||"";return m!==""?o+"("+m+")":o}function be(e){return e.displayName||"Context"}function k(e){if(e==null)return null;if(typeof e.tag=="number"&&C("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 u:return"Fragment";case i:return"Portal";case _:return"Profiler";case n:return"StrictMode";case b:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var t=e;return be(t)+".Consumer";case l:var o=e;return be(o._context)+".Provider";case c:return Pt(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:k(e.type)||"Memo";case j:{var m=e,g=m._payload,p=m._init;try{return k(p(g))}catch{return null}}}return null}var F=Object.assign,$=0,Ee,Re,Ce,Te,Se,je,Oe;function we(){}we.__reactDisabledLog=!0;function Mt(){{if($===0){Ee=console.log,Re=console.info,Ce=console.warn,Te=console.error,Se=console.group,je=console.groupCollapsed,Oe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function xt(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:Ee}),info:F({},e,{value:Re}),warn:F({},e,{value:Ce}),error:F({},e,{value:Te}),group:F({},e,{value:Se}),groupCollapsed:F({},e,{value:je}),groupEnd:F({},e,{value:Oe})})}$<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=D.ReactCurrentDispatcher,ae;function q(e,t,o){{if(ae===void 0)try{throw Error()}catch(m){var s=m.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||""}return`
|
|
10
|
+
`+ae+e}}var oe=!1,H;{var At=typeof WeakMap=="function"?WeakMap:Map;H=new At}function Pe(e,t){if(!e||oe)return"";{var o=H.get(e);if(o!==void 0)return o}var s;oe=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=ne.current,ne.current=null,Mt();try{if(t){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(L){s=L}Reflect.construct(e,[],p)}else{try{p.call()}catch(L){s=L}e.call(p.prototype)}}else{try{throw Error()}catch(L){s=L}e()}}catch(L){if(L&&s&&typeof L.stack=="string"){for(var d=L.stack.split(`
|
|
11
11
|
`),O=s.stack.split(`
|
|
12
|
-
`),R=
|
|
13
|
-
`+
|
|
12
|
+
`),R=d.length-1,T=O.length-1;R>=1&&T>=0&&d[R]!==O[T];)T--;for(;R>=1&&T>=0;R--,T--)if(d[R]!==O[T]){if(R!==1||T!==1)do if(R--,T--,T<0||d[R]!==O[T]){var w=`
|
|
13
|
+
`+d[R].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,w),w}while(R>=1&&T>=0);break}}}finally{oe=!1,ne.current=g,xt(),Error.prepareStackTrace=m}var z=e?e.displayName||e.name:"",Ve=z?q(z):"";return typeof e=="function"&&H.set(e,Ve),Ve}function kt(e,t,o){return Pe(e,!1)}function Lt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function X(e,t,o){if(e==null)return"";if(typeof e=="function")return Pe(e,Lt(e));if(typeof e=="string")return q(e);switch(e){case b:return q("Suspense");case h:return q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return kt(e.render);case S:return X(e.type,t,o);case j:{var s=e,m=s._payload,g=s._init;try{return X(g(m),t,o)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Me={},xe=D.ReactDebugCurrentFrame;function K(e){if(e){var t=e._owner,o=X(e.type,e._source,t?t.type:null);xe.setExtraStackFrame(o)}else xe.setExtraStackFrame(null)}function Yt(e,t,o,s,m){{var g=Function.call.bind(Z);for(var p in e)if(g(e,p)){var d=void 0;try{if(typeof e[p]!="function"){var O=Error((s||"React class")+": "+o+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}d=e[p](t,p,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){d=R}d&&!(d instanceof Error)&&(K(m),C("%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).",s||"React class",o,p,typeof d),K(null)),d instanceof Error&&!(d.message in Me)&&(Me[d.message]=!0,K(m),C("Failed %s type: %s",o,d.message),K(null))}}}var Dt=Array.isArray;function ie(e){return Dt(e)}function It(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function Ft(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function ke(e){if(Ft(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",It(e)),Ae(e)}var B=D.ReactCurrentOwner,Nt={key:!0,ref:!0,__self:!0,__source:!0},Le,Ye,ue;ue={};function Wt(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 zt(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 Vt(e,t){if(typeof e.ref=="string"&&B.current&&t&&B.current.stateNode!==t){var o=k(B.current.type);ue[o]||(C('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',k(B.current.type),e.ref),ue[o]=!0)}}function Ut(e,t){{var o=function(){Le||(Le=!0,C("%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))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function $t(e,t){{var o=function(){Ye||(Ye=!0,C("%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))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var Bt=function(e,t,o,s,m,g,p){var d={$$typeof:a,type:e,key:t,ref:o,props:p,_owner:g};return d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(d,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(d,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d};function Gt(e,t,o,s,m){{var g,p={},d=null,O=null;o!==void 0&&(ke(o),d=""+o),zt(t)&&(ke(t.key),d=""+t.key),Wt(t)&&(O=t.ref,Vt(t,m));for(g in t)Z.call(t,g)&&!Nt.hasOwnProperty(g)&&(p[g]=t[g]);if(e&&e.defaultProps){var R=e.defaultProps;for(g in R)p[g]===void 0&&(p[g]=R[g])}if(d||O){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;d&&Ut(p,T),O&&$t(p,T)}return Bt(e,d,O,m,s,B.current,p)}}var se=D.ReactCurrentOwner,De=D.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,o=X(e.type,e._source,t?t.type:null);De.setExtraStackFrame(o)}else De.setExtraStackFrame(null)}var ce;ce=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Ie(){{if(se.current){var e=k(se.current.type);if(e)return`
|
|
14
14
|
|
|
15
15
|
Check the render method of \``+e+"`."}return""}}function Jt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),o=e.lineNumber;return`
|
|
16
16
|
|
|
17
17
|
Check your code at `+t+":"+o+"."}return""}}var Fe={};function qt(e){{var t=Ie();if(!t){var o=typeof e=="string"?e:e.displayName||e.name;o&&(t=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+o+">.")}return t}}function Ne(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=qt(t);if(Fe[o])return;Fe[o]=!0;var s="";e&&e._owner&&e._owner!==se.current&&(s=" It was passed a child from "+
|
|
19
|
+
Check the top-level render call using <`+o+">.")}return t}}function Ne(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=qt(t);if(Fe[o])return;Fe[o]=!0;var s="";e&&e._owner&&e._owner!==se.current&&(s=" It was passed a child from "+k(e._owner.type)+"."),W(e),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),W(null)}}function We(e,t){{if(typeof e!="object")return;if(ie(e))for(var o=0;o<e.length;o++){var s=e[o];le(s)&&Ne(s,t)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var m=J(e);if(typeof m=="function"&&m!==e.entries)for(var g=m.call(e),p;!(p=g.next()).done;)le(p.value)&&Ne(p.value,t)}}}function Ht(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===c||t.$$typeof===S))o=t.propTypes;else return;if(o){var s=k(t);Yt(o,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!ce){ce=!0;var m=k(t);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xt(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var s=t[o];if(s!=="children"&&s!=="key"){W(e),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),W(null);break}}e.ref!==null&&(W(e),C("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function ze(e,t,o,s,m,g){{var p=wt(e);if(!p){var d="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(d+=" 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 O=Jt(m);O?d+=O:d+=Ie();var R;e===null?R="null":ie(e)?R="array":e!==void 0&&e.$$typeof===a?(R="<"+(k(e.type)||"Unknown")+" />",d=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,d)}var T=Gt(e,t,o,m,g);if(T==null)return T;if(p){var w=t.children;if(w!==void 0)if(s)if(ie(w)){for(var z=0;z<w.length;z++)We(w[z],e);Object.freeze&&Object.freeze(w)}else C("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 We(w,e)}return e===u?Xt(T):Ht(T),T}}function Zt(e,t,o){return ze(e,t,o,!0)}function Kt(e,t,o){return ze(e,t,o,!1)}var Qt=Kt,er=Zt;V.Fragment=u,V.jsx=Qt,V.jsxs=er}()),V}var U={};/**
|
|
20
20
|
* @license React
|
|
21
21
|
* react-jsx-runtime.production.min.js
|
|
22
22
|
*
|
|
@@ -24,4 +24,4 @@ Check the top-level render call using <`+o+">.")}return t}}function Ne(e,t){{if(
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license found in the
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var ve;function Ke(){if(ve)return U;ve=1;var r=E,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,p=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,_){var b,S={},j=null,P=null;_!==void 0&&(j=""+_),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(P=c.ref);for(b in c)u.call(c,b)&&!y.hasOwnProperty(b)&&(S[b]=c[b]);if(l&&l.defaultProps)for(b in c=l.defaultProps,c)S[b]===void 0&&(S[b]=c[b]);return{$$typeof:n,type:l,key:j,ref:P,props:S,_owner:p.current}}return U.Fragment=i,U.jsx=a,U.jsxs=a,U}process.env.NODE_ENV==="production"?te.exports=Ke():te.exports=Xe();var L=te.exports;const Ze=({Fallback:r,loginPath:n="/login",localStorageKey:i="user",redirect401Path:u="/login",isLogged:p})=>{var S,j,P,x;const[y,a]=E.useState(null),l=k.useLocation(),c=E.useRef(!1),_=typeof p=="function"?p():!!p,b=typeof _=="boolean"?_:_==null?void 0:_.isLogged;return E.useEffect(()=>{c.current||(c.current=!0,M==null||M.interceptors.response.use(h=>h,async h=>{var C;return typeof h=="object"&&h&&"response"in h&&h.response&&typeof h.response=="object"&&"status"in h.response&&h.response&&typeof h.response=="object"&&"status"in h.response&&((C=h==null?void 0:h.response)==null?void 0:C.status)===401&&(M.defaults.headers.common.Authorization=null,localStorage.removeItem(i),a(u)),Promise.reject(h)}))},[i,u]),b&&!y?L.jsx(E.Suspense,{fallback:r,children:(j=(S=l.state)==null?void 0:S.from)!=null&&j.state&&((x=(P=l.state)==null?void 0:P.from)==null?void 0:x.pathname)===n?L.jsx(k.Navigate,{to:l.state.from.state.from.pathname+l.state.from.state.from.search,replace:!0}):L.jsx(k.Outlet,{})}):L.jsx(k.Navigate,{to:n,state:{from:l},replace:!0})},Qe=()=>{const{pathname:r}=k.useLocation(),{sendEvent:n}=Ue.useGoogleTagManager();return E.useEffect(()=>{n({event:"pageView",pathname:r})},[r,n]),L.jsx(k.Outlet,{})},G=E.createContext({apiURL:void 0,children:void 0}),et=({children:r,apiURL:n})=>{const i=E.useMemo(()=>({apiURL:n}),[n]);return L.jsx(G.Provider,{value:i,children:r})},tt=({tokenTypeKey:r="tokenType",userLocalStorageKey:n="user",tokenKey:i="accessToken",postContentType:u="application/json",...p})=>{const{apiURL:y=p.apiURL}=E.useContext(G);if(!M.defaults)return null;const a=localStorage.getItem(n),l=a?JSON.parse(a):null,c=l!=null&&l[r]?l[r]:null,_=l!=null&&l[i]?l[i]:null,b=a?`${c} ${_}`:null;return M.defaults.baseURL=y,M.defaults.headers.post["Content-Type"]=u,b&&(M.defaults.headers.common.Authorization=b),null},rt=({debug:r,resources:n})=>(A!=null&&A.isInitialized||(A.use($e).use(Be.initReactI18next).init({debug:r,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:n,returnNull:!1}).then(()=>{document.documentElement.lang!==A.resolvedLanguage&&A.resolvedLanguage&&document.documentElement.setAttribute("lang",A.resolvedLanguage)}),A.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),nt=({dsn:r,integrations:n,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:p,tracePropagationTargets:y,ignoreErrors:a,debug:l,environment:c})=>(Q.isInitialized()||(l||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&Q.init({debug:l,dsn:r,environment:c||"production",ignoreErrors:[...a||[],/dynamically imported module/],integrations:[Q.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:k.createRoutesFromChildren,matchRoutes:k.matchRoutes,useEffect:E.useEffect,useLocation:k.useLocation,useNavigationType:k.useNavigationType}),...n||[]],replaysOnErrorSampleRate:p||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:y,tracesSampleRate:i||1}),null),at=({IMaskMixin:r,...n})=>{const i=E.useMemo(()=>r(({TextField:u,...p})=>L.jsx(u,{...p})),[r]);return L.jsx(i,{...n})},ot=({accessToken:r})=>(r&&(Je.accessToken=r),null);var pe={exports:{}};(function(r,n){(function(i,u){r.exports=u()})(ee,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,p,y){var a=p.prototype,l=a.format;y.en.formats=i,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var _=this.$locale().formats,b=function(S,j){return S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,x,h){var J=h&&h.toUpperCase();return x||j[h]||i[h]||j[J].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(I,C,re){return C||re.slice(1)})})}(c,_===void 0?{}:_);return l.call(this,b)}}})})(pe);var it=pe.exports;const ut=He(it);N.extend(ut);const st=({language:r})=>(E.useEffect(()=>{var i;const n=r||((i=navigator.language)==null?void 0:i.slice(0,2))||"en";if(n==="en"){Promise.resolve().then(()=>he).then(()=>{N.locale(n)});return}n==="fr"&&Promise.resolve().then(()=>Rt).then(()=>{N.locale(n)}).catch(()=>{Promise.resolve().then(()=>he).then(()=>{N.locale("en")})})},[r]),null),ct=({children:r,defaultQueriesOptions:n,defaultMutationsOptions:i})=>{const u=new fe.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(p,y,a)=>p.length+(a||0),refetchOnWindowFocus:!1,retry:3,...n}}});return L.jsx(fe.QueryClientProvider,{client:u,children:r})},lt=r=>{const{unknownErrorTranslationKey:n="error.unknownError"}=r||{},i=A.t(n),u=E.useCallback(y=>{var l,c,_,b,S,j,P,x,h;const{response:a}=y||{};return a!=null&&a.reason?String(a.reason):(l=a==null?void 0:a.data)!=null&&l.reason?String(a.data.reason):(c=a==null?void 0:a.data)!=null&&c.message?String(a.data.message):(b=(_=a==null?void 0:a.data)==null?void 0:_.detail)!=null&&b.length&&Array.isArray((S=a==null?void 0:a.data)==null?void 0:S.detail)&&((P=(j=a==null?void 0:a.data)==null?void 0:j.detail[0])!=null&&P.msg)&&typeof((h=(x=a==null?void 0:a.data)==null?void 0:x.detail[0])==null?void 0:h.msg)=="string"?String(a.data.detail[0].msg):i},[i]);return{getErrorCode:E.useCallback(y=>{var l,c,_;const{response:a}=y||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(l=a==null?void 0:a.data)!=null&&l.error_code?String((c=a==null?void 0:a.data)==null?void 0:c.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(_=a==null?void 0:a.data)!=null&&_.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:u}},ft=({data:r,fetchNextPage:n,isFetchingNextPage:i,isInitialLoading:u,isLoading:p,enabled:y=!0})=>{const a=E.useCallback(async c=>{i||!y||await n({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[y,n,i]),l=E.useMemo(()=>{if(r)return r.pages.reduce((c,_)=>[...c,..._],[])},[r]);return{fetchNextPageOnRowsScrollEnd:a,isLoading:i||p,loadingVariant:u?"skeleton":"linear",rows:l}},dt=()=>({clearAuthenticationToken:()=>{M.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:u})=>{M.defaults.headers.common.Authorization=`${i} ${u}`}}),me=(r,n="ll")=>N(r).format(n),ge=(r,n="km")=>{const i=Number(r);return Number.isNaN(i)?`0 ${n}`:`${i.toFixed(2)} ${n}`},vt=r=>{const n=r&&typeof r=="object"&&"pathname"in r&&r.pathname?r.pathname:r;return typeof n=="string"?n!=null&&n.startsWith("/")?n!=null&&n.startsWith("/files")?n:`/files${n}`:n!=null&&n.startsWith("files")?`/${n}`:n!=null&&n.startsWith("files")?`/${n}`:`/files/${n}`:n},_e=(r,n)=>{if(!r)return"";const i=vt(r),u=typeof r=="object"&&"pathname"in r?`${r.origin}${i}`:r;return typeof n=="number"?`${u.replace("/files",`/thumbs/${n}`)}`:u},pt=()=>{const{apiURL:r}=E.useContext(G);return{dateAdapter:me,distanceAdapter:ge,filePathAdapter:(i,u)=>_e(r&&typeof i=="string"?{origin:r,pathname:i}:i,u)}},mt=r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),gt=r=>{const u=r.split("/").filter(p=>p.length>0).map(p=>p.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},_t=(r,n,i)=>{const u=gt(n),p=mt(i);return`${u}${p}`},ht=r=>{if(r)return(r==null?void 0:r.reduce((n,i)=>(n[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},n),{}))||{}},yt=r=>{const{input:n="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=r||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:n,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:_t,...(i==null?void 0:i.length)&&{operations:ht(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var bt={exports:{}};(function(r,n){(function(i,u){r.exports=u()})(ee,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var u=["th","st","nd","rd"],p=i%100;return"["+i+(u[(p-20)%10]||u[p]||u[0])+"]"}}})})(bt);const he=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Et={exports:{}};(function(r,n){(function(i,u){r.exports=u(N)})(ee,function(i){function u(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var p=u(i),y={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return p.default.locale(y,null,!0),y})})(Et);const Rt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));d.GTMSendPageView=Qe,d.InitializeAxiosConfig=tt,d.InitializeDaysJSConfig=st,d.InitializeI18nConfig=rt,d.InitializeMapBoxConfig=ot,d.InitializeSentryConfig=nt,d.InjectDependenciesContext=G,d.InjectDependenciesProvider=et,d.MaskTextField=at,d.QueryClientProviderWithConfig=ct,d.RequireAuth=Ze,d.dateAdapter=me,d.distanceAdapter=ge,d.getOrvalConfig=yt,d.useAdapter=pt,d.useAuth=dt,d.useInfiniteDataGrid=ft,d.useResponseError=lt,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
*/var ve;function Ze(){if(ve)return U;ve=1;var r=y,a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,n=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={key:!0,ref:!0,__self:!0,__source:!0};function l(f,c,b){var h,S={},j=null,P=null;b!==void 0&&(j=""+b),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(P=c.ref);for(h in c)u.call(c,h)&&!_.hasOwnProperty(h)&&(S[h]=c[h]);if(f&&f.defaultProps)for(h in c=f.defaultProps,c)S[h]===void 0&&(S[h]=c[h]);return{$$typeof:a,type:f,key:j,ref:P,props:S,_owner:n.current}}return U.Fragment=i,U.jsx=l,U.jsxs=l,U}process.env.NODE_ENV==="production"?te.exports=Ze():te.exports=Xe();var A=te.exports;const Ke=({Fallback:r,loginPath:a="/login",localStorageKey:i="user",redirect401Path:u="/login",isLogged:n})=>{var S,j,P,I;const[_,l]=y.useState(null),f=x.useLocation(),c=y.useRef(!1),b=typeof n=="function"?n():!!n,h=typeof b=="boolean"?b:b==null?void 0:b.isLogged;return y.useEffect(()=>{c.current||(c.current=!0,M==null||M.interceptors.response.use(E=>E,async E=>{var C;return typeof E=="object"&&E&&"response"in E&&E.response&&typeof E.response=="object"&&"status"in E.response&&E.response&&typeof E.response=="object"&&"status"in E.response&&((C=E==null?void 0:E.response)==null?void 0:C.status)===401&&(M.defaults.headers.common.Authorization=null,localStorage.removeItem(i),l(u)),Promise.reject(E)}))},[i,u]),h&&!_?A.jsx(y.Suspense,{fallback:r,children:(j=(S=f.state)==null?void 0:S.from)!=null&&j.state&&((I=(P=f.state)==null?void 0:P.from)==null?void 0:I.pathname)===a?A.jsx(x.Navigate,{to:f.state.from.state.from.pathname+f.state.from.state.from.search,replace:!0}):A.jsx(x.Outlet,{})}):A.jsx(x.Navigate,{to:a,state:{from:f},replace:!0})},Qe=()=>{const{pathname:r}=x.useLocation(),{sendEvent:a}=Ue.useGoogleTagManager();return y.useEffect(()=>{a({event:"pageView",pathname:r})},[r,a]),A.jsx(x.Outlet,{})},G=y.createContext({apiURL:void 0,children:void 0}),et=({children:r,apiURL:a})=>{const i=y.useMemo(()=>({apiURL:a}),[a]);return A.jsx(G.Provider,{value:i,children:r})},tt=({tokenTypeKey:r="tokenType",userLocalStorageKey:a="user",tokenKey:i="accessToken",postContentType:u="application/json",...n})=>{const{apiURL:_=n.apiURL}=y.useContext(G);if(!M.defaults)return null;const l=localStorage.getItem(a),f=l?JSON.parse(l):null,c=f!=null&&f[r]?f[r]:null,b=f!=null&&f[i]?f[i]:null,h=l?`${c} ${b}`:null;return M.defaults.baseURL=_,M.defaults.headers.post["Content-Type"]=u,h&&(M.defaults.headers.common.Authorization=h),null},rt=({debug:r,resources:a})=>(Y!=null&&Y.isInitialized||(Y.use($e).use(Be.initReactI18next).init({debug:r,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:a,returnNull:!1}).then(()=>{document.documentElement.lang!==Y.resolvedLanguage&&Y.resolvedLanguage&&document.documentElement.setAttribute("lang",Y.resolvedLanguage)}),Y.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),nt=({dsn:r,integrations:a,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:n,tracePropagationTargets:_,ignoreErrors:l,debug:f,environment:c})=>(Q.isInitialized()||(f||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&Q.init({debug:f,dsn:r,environment:c||"production",ignoreErrors:[...l||[],/dynamically imported module/],integrations:[Q.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:x.createRoutesFromChildren,matchRoutes:x.matchRoutes,useEffect:y.useEffect,useLocation:x.useLocation,useNavigationType:x.useNavigationType}),...a||[]],replaysOnErrorSampleRate:n||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:_,tracesSampleRate:i||1}),null),at=({IMaskMixin:r,...a})=>{const i=y.useMemo(()=>r(({TextField:u,...n})=>A.jsx(u,{...n})),[r]);return A.jsx(i,{...a})},ot=({accessToken:r})=>(r&&(Je.accessToken=r),null);var pe={exports:{}};(function(r,a){(function(i,u){r.exports=u()})(ee,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,n,_){var l=n.prototype,f=l.format;_.en.formats=i,l.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var b=this.$locale().formats,h=function(S,j){return S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,I,E){var J=E&&E.toUpperCase();return I||j[E]||i[E]||j[J].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,C,re){return C||re.slice(1)})})}(c,b===void 0?{}:b);return f.call(this,h)}}})})(pe);var it=pe.exports;const ut=He(it);N.extend(ut);const st=({language:r})=>(y.useEffect(()=>{var i;const a=r||((i=navigator.language)==null?void 0:i.slice(0,2))||"en";if(a==="en"){Promise.resolve().then(()=>he).then(()=>{N.locale(a)});return}a==="fr"&&Promise.resolve().then(()=>Rt).then(()=>{N.locale(a)}).catch(()=>{Promise.resolve().then(()=>he).then(()=>{N.locale("en")})})},[r]),null),ct=({children:r,defaultQueriesOptions:a,defaultMutationsOptions:i})=>{const u=new fe.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(n,_,l)=>n.length+(l||0),refetchOnWindowFocus:!1,retry:3,...a}}});return A.jsx(fe.QueryClientProvider,{client:u,children:r})},lt=()=>{const r=navigator.language==="fr"?"Une erreur est survenue.":"An error occurred.",a=y.useCallback(u=>{var _,l,f,c,b,h,S,j,P;const{response:n}=u||{};return n!=null&&n.reason?String(n.reason):(_=n==null?void 0:n.data)!=null&&_.reason?String(n.data.reason):(l=n==null?void 0:n.data)!=null&&l.message?String(n.data.message):(c=(f=n==null?void 0:n.data)==null?void 0:f.detail)!=null&&c.length&&Array.isArray((b=n==null?void 0:n.data)==null?void 0:b.detail)&&((S=(h=n==null?void 0:n.data)==null?void 0:h.detail[0])!=null&&S.msg)&&typeof((P=(j=n==null?void 0:n.data)==null?void 0:j.detail[0])==null?void 0:P.msg)=="string"?String(n.data.detail[0].msg):r},[r]);return{getErrorCode:y.useCallback(u=>{var _,l,f;const{response:n}=u||{};return n!=null&&n.error_code?String(n==null?void 0:n.error_code):(_=n==null?void 0:n.data)!=null&&_.error_code?String((l=n==null?void 0:n.data)==null?void 0:l.error_code):n!=null&&n.error_code?String(n==null?void 0:n.error_code):(f=n==null?void 0:n.data)!=null&&f.error_code?String(n.data.error_code):"unknown_error_code"},[]),printError:a}},ft=({data:r,fetchNextPage:a,isFetchingNextPage:i,isInitialLoading:u,isLoading:n,enabled:_=!0})=>{const l=y.useCallback(async c=>{i||!_||await a({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[_,a,i]),f=y.useMemo(()=>{if(r)return r.pages.reduce((c,b)=>[...c,...b],[])},[r]);return{fetchNextPageOnRowsScrollEnd:l,isLoading:i||n,loadingVariant:u?"skeleton":"linear",rows:f}},dt=()=>({clearAuthenticationToken:()=>{M.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:u})=>{M.defaults.headers.common.Authorization=`${i} ${u}`}}),me=(r,a="ll")=>N(r).format(a),ge=(r,a="km")=>{const i=Number(r);return Number.isNaN(i)?`0 ${a}`:`${i.toFixed(2)} ${a}`},vt=r=>{const a=r&&typeof r=="object"&&"pathname"in r&&r.pathname?r.pathname:r;return typeof a=="string"?a!=null&&a.startsWith("/")?a!=null&&a.startsWith("/files")?a:`/files${a}`:a!=null&&a.startsWith("files")?`/${a}`:a!=null&&a.startsWith("files")?`/${a}`:`/files/${a}`:a},_e=(r,a)=>{if(!r)return"";const i=vt(r),u=typeof r=="object"&&"pathname"in r?`${r.origin}${i}`:r;return typeof a=="number"?`${u.replace("/files",`/thumbs/${a}`)}`:u},pt=()=>{const{apiURL:r}=y.useContext(G);return{dateAdapter:me,distanceAdapter:ge,filePathAdapter:(i,u)=>_e(r&&typeof i=="string"?{origin:r,pathname:i}:i,u)}},mt=r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),gt=r=>{const u=r.split("/").filter(n=>n.length>0).map(n=>n.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},_t=(r,a,i)=>{const u=gt(a),n=mt(i);return`${u}${n}`},ht=r=>{if(r)return(r==null?void 0:r.reduce((a,i)=>(a[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},a),{}))||{}},yt=r=>{const{input:a="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=r||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:a,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:_t,...(i==null?void 0:i.length)&&{operations:ht(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var bt={exports:{}};(function(r,a){(function(i,u){r.exports=u()})(ee,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var u=["th","st","nd","rd"],n=i%100;return"["+i+(u[(n-20)%10]||u[n]||u[0])+"]"}}})})(bt);const he=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Et={exports:{}};(function(r,a){(function(i,u){r.exports=u(N)})(ee,function(i){function u(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var n=u(i),_={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(l){return""+l+(l===1?"er":"")}};return n.default.locale(_,null,!0),_})})(Et);const Rt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));v.GTMSendPageView=Qe,v.InitializeAxiosConfig=tt,v.InitializeDaysJSConfig=st,v.InitializeI18nConfig=rt,v.InitializeMapBoxConfig=ot,v.InitializeSentryConfig=nt,v.InjectDependenciesContext=G,v.InjectDependenciesProvider=et,v.MaskTextField=at,v.QueryClientProviderWithConfig=ct,v.RequireAuth=Ke,v.dateAdapter=me,v.distanceAdapter=ge,v.getOrvalConfig=yt,v.useAdapter=pt,v.useAuth=dt,v.useInfiniteDataGrid=ft,v.useResponseError=lt,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|