@tracktor/shared-module 0.19.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/dist/hooks/useAdapter/useAdapter.d.ts +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.js +224 -220
- package/dist/main.umd.cjs +9 -9
- package/dist/utils/adapter/distanceAdapter.d.ts +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const useAdapter: () => {
|
|
2
|
-
distanceAdapter: (distance?: string | number | null, metric?: string) => string;
|
|
2
|
+
distanceAdapter: (distance?: string | number | null | undefined, metric?: string) => string;
|
|
3
3
|
filePathAdapter: (href?: string | null | {
|
|
4
4
|
pathname: string;
|
|
5
5
|
origin: string;
|
package/dist/main.d.ts
CHANGED
|
@@ -26,5 +26,7 @@ export { default as useAdapter } from './hooks/useAdapter';
|
|
|
26
26
|
export * from './hooks/useAdapter';
|
|
27
27
|
export { default as getOrvalConfig } from './config/orval';
|
|
28
28
|
export * from './config/orval';
|
|
29
|
+
export { default as distanceAdapter } from './utils/adapter/distanceAdapter';
|
|
30
|
+
export * from './utils/adapter/distanceAdapter';
|
|
29
31
|
export { default as filePathAdapter } from './utils/adapter/filePathAdapter';
|
|
30
32
|
export * from './utils/adapter/filePathAdapter';
|
package/dist/main.js
CHANGED
|
@@ -12,7 +12,7 @@ var ue = { exports: {} }, M = {};
|
|
|
12
12
|
var De;
|
|
13
13
|
function Rr() {
|
|
14
14
|
return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
|
|
15
|
-
var t = Ne,
|
|
15
|
+
var t = Ne, i = Symbol.for("react.element"), o = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), n = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), k = Symbol.iterator, $ = "@@iterator";
|
|
16
16
|
function F(e) {
|
|
17
17
|
if (e === null || typeof e != "object")
|
|
18
18
|
return null;
|
|
@@ -22,17 +22,17 @@ function Rr() {
|
|
|
22
22
|
var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
23
23
|
function b(e) {
|
|
24
24
|
{
|
|
25
|
-
for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0),
|
|
26
|
-
a[
|
|
25
|
+
for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
26
|
+
a[s - 1] = arguments[s];
|
|
27
27
|
_("error", e, a);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
function _(e, r, a) {
|
|
31
31
|
{
|
|
32
|
-
var
|
|
32
|
+
var s = j.ReactDebugCurrentFrame, p = s.getStackAddendum();
|
|
33
33
|
p !== "" && (r += "%s", a = a.concat([p]));
|
|
34
|
-
var g = a.map(function(
|
|
35
|
-
return String(
|
|
34
|
+
var g = a.map(function(d) {
|
|
35
|
+
return String(d);
|
|
36
36
|
});
|
|
37
37
|
g.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, g);
|
|
38
38
|
}
|
|
@@ -40,16 +40,16 @@ function Rr() {
|
|
|
40
40
|
var ce = !1, le = !1, U = !1, We = !1, Me = !1, fe;
|
|
41
41
|
fe = Symbol.for("react.module.reference");
|
|
42
42
|
function Ve(e) {
|
|
43
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
43
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === v || Me || e === c || e === m || e === E || We || e === T || ce || le || U || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === C || e.$$typeof === h || e.$$typeof === n || e.$$typeof === l || // This needs to include all possible module reference object
|
|
44
44
|
// types supported by any Flight configuration anywhere since
|
|
45
45
|
// we don't know which Flight build this will end up being used
|
|
46
46
|
// with.
|
|
47
47
|
e.$$typeof === fe || e.getModuleId !== void 0));
|
|
48
48
|
}
|
|
49
49
|
function Ye(e, r, a) {
|
|
50
|
-
var
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
50
|
+
var s = e.displayName;
|
|
51
|
+
if (s)
|
|
52
|
+
return s;
|
|
53
53
|
var p = r.displayName || r.name || "";
|
|
54
54
|
return p !== "" ? a + "(" + p + ")" : a;
|
|
55
55
|
}
|
|
@@ -64,13 +64,13 @@ function Rr() {
|
|
|
64
64
|
if (typeof e == "string")
|
|
65
65
|
return e;
|
|
66
66
|
switch (e) {
|
|
67
|
-
case
|
|
67
|
+
case u:
|
|
68
68
|
return "Fragment";
|
|
69
69
|
case o:
|
|
70
70
|
return "Portal";
|
|
71
|
-
case
|
|
71
|
+
case v:
|
|
72
72
|
return "Profiler";
|
|
73
|
-
case
|
|
73
|
+
case c:
|
|
74
74
|
return "StrictMode";
|
|
75
75
|
case m:
|
|
76
76
|
return "Suspense";
|
|
@@ -88,12 +88,12 @@ function Rr() {
|
|
|
88
88
|
case l:
|
|
89
89
|
return Ye(e, e.render, "ForwardRef");
|
|
90
90
|
case C:
|
|
91
|
-
var
|
|
92
|
-
return
|
|
91
|
+
var s = e.displayName || null;
|
|
92
|
+
return s !== null ? s : P(e.type) || "Memo";
|
|
93
93
|
case O: {
|
|
94
|
-
var p = e, g = p._payload,
|
|
94
|
+
var p = e, g = p._payload, d = p._init;
|
|
95
95
|
try {
|
|
96
|
-
return P(
|
|
96
|
+
return P(d(g));
|
|
97
97
|
} catch {
|
|
98
98
|
return null;
|
|
99
99
|
}
|
|
@@ -170,8 +170,8 @@ function Rr() {
|
|
|
170
170
|
try {
|
|
171
171
|
throw Error();
|
|
172
172
|
} catch (p) {
|
|
173
|
-
var
|
|
174
|
-
Q =
|
|
173
|
+
var s = p.stack.trim().match(/\n( *(at )?)/);
|
|
174
|
+
Q = s && s[1] || "";
|
|
175
175
|
}
|
|
176
176
|
return `
|
|
177
177
|
` + Q + e;
|
|
@@ -190,7 +190,7 @@ function Rr() {
|
|
|
190
190
|
if (a !== void 0)
|
|
191
191
|
return a;
|
|
192
192
|
}
|
|
193
|
-
var
|
|
193
|
+
var s;
|
|
194
194
|
ee = !0;
|
|
195
195
|
var p = Error.prepareStackTrace;
|
|
196
196
|
Error.prepareStackTrace = void 0;
|
|
@@ -198,49 +198,49 @@ function Rr() {
|
|
|
198
198
|
g = Z.current, Z.current = null, qe();
|
|
199
199
|
try {
|
|
200
200
|
if (r) {
|
|
201
|
-
var
|
|
201
|
+
var d = function() {
|
|
202
202
|
throw Error();
|
|
203
203
|
};
|
|
204
|
-
if (Object.defineProperty(
|
|
204
|
+
if (Object.defineProperty(d.prototype, "props", {
|
|
205
205
|
set: function() {
|
|
206
206
|
throw Error();
|
|
207
207
|
}
|
|
208
208
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
209
209
|
try {
|
|
210
|
-
Reflect.construct(
|
|
210
|
+
Reflect.construct(d, []);
|
|
211
211
|
} catch (A) {
|
|
212
|
-
|
|
212
|
+
s = A;
|
|
213
213
|
}
|
|
214
|
-
Reflect.construct(e, [],
|
|
214
|
+
Reflect.construct(e, [], d);
|
|
215
215
|
} else {
|
|
216
216
|
try {
|
|
217
|
-
|
|
217
|
+
d.call();
|
|
218
218
|
} catch (A) {
|
|
219
|
-
|
|
219
|
+
s = A;
|
|
220
220
|
}
|
|
221
|
-
e.call(
|
|
221
|
+
e.call(d.prototype);
|
|
222
222
|
}
|
|
223
223
|
} else {
|
|
224
224
|
try {
|
|
225
225
|
throw Error();
|
|
226
226
|
} catch (A) {
|
|
227
|
-
|
|
227
|
+
s = A;
|
|
228
228
|
}
|
|
229
229
|
e();
|
|
230
230
|
}
|
|
231
231
|
} catch (A) {
|
|
232
|
-
if (A &&
|
|
233
|
-
for (var
|
|
234
|
-
`), w =
|
|
235
|
-
`), y =
|
|
232
|
+
if (A && s && typeof A.stack == "string") {
|
|
233
|
+
for (var f = A.stack.split(`
|
|
234
|
+
`), w = s.stack.split(`
|
|
235
|
+
`), y = f.length - 1, R = w.length - 1; y >= 1 && R >= 0 && f[y] !== w[R]; )
|
|
236
236
|
R--;
|
|
237
237
|
for (; y >= 1 && R >= 0; y--, R--)
|
|
238
|
-
if (
|
|
238
|
+
if (f[y] !== w[R]) {
|
|
239
239
|
if (y !== 1 || R !== 1)
|
|
240
240
|
do
|
|
241
|
-
if (y--, R--, R < 0 ||
|
|
241
|
+
if (y--, R--, R < 0 || f[y] !== w[R]) {
|
|
242
242
|
var S = `
|
|
243
|
-
` +
|
|
243
|
+
` + f[y].replace(" at new ", " at ");
|
|
244
244
|
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, S), S;
|
|
245
245
|
}
|
|
246
246
|
while (y >= 1 && R >= 0);
|
|
@@ -280,7 +280,7 @@ function Rr() {
|
|
|
280
280
|
case C:
|
|
281
281
|
return G(e.type, r, a);
|
|
282
282
|
case O: {
|
|
283
|
-
var
|
|
283
|
+
var s = e, p = s._payload, g = s._init;
|
|
284
284
|
try {
|
|
285
285
|
return G(g(p), r, a);
|
|
286
286
|
} catch {
|
|
@@ -297,22 +297,22 @@ function Rr() {
|
|
|
297
297
|
} else
|
|
298
298
|
we.setExtraStackFrame(null);
|
|
299
299
|
}
|
|
300
|
-
function Je(e, r, a,
|
|
300
|
+
function Je(e, r, a, s, p) {
|
|
301
301
|
{
|
|
302
302
|
var g = Function.call.bind(J);
|
|
303
|
-
for (var
|
|
304
|
-
if (g(e,
|
|
305
|
-
var
|
|
303
|
+
for (var d in e)
|
|
304
|
+
if (g(e, d)) {
|
|
305
|
+
var f = void 0;
|
|
306
306
|
try {
|
|
307
|
-
if (typeof e[
|
|
308
|
-
var w = Error((
|
|
307
|
+
if (typeof e[d] != "function") {
|
|
308
|
+
var w = Error((s || "React class") + ": " + a + " 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`.");
|
|
309
309
|
throw w.name = "Invariant Violation", w;
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
f = e[d](r, d, s, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
312
312
|
} catch (y) {
|
|
313
|
-
|
|
313
|
+
f = y;
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
f && !(f instanceof Error) && (X(p), b("%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", a, d, typeof f), X(null)), f instanceof Error && !(f.message in _e) && (_e[f.message] = !0, X(p), b("Failed %s type: %s", a, f.message), X(null));
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
@@ -391,51 +391,51 @@ function Rr() {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
var ar = function(e, r, a,
|
|
395
|
-
var
|
|
394
|
+
var ar = function(e, r, a, s, p, g, d) {
|
|
395
|
+
var f = {
|
|
396
396
|
// This tag allows us to uniquely identify this as a React Element
|
|
397
|
-
$$typeof:
|
|
397
|
+
$$typeof: i,
|
|
398
398
|
// Built-in properties that belong on the element
|
|
399
399
|
type: e,
|
|
400
400
|
key: r,
|
|
401
401
|
ref: a,
|
|
402
|
-
props:
|
|
402
|
+
props: d,
|
|
403
403
|
// Record the component responsible for creating this element.
|
|
404
404
|
_owner: g
|
|
405
405
|
};
|
|
406
|
-
return
|
|
406
|
+
return f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
407
407
|
configurable: !1,
|
|
408
408
|
enumerable: !1,
|
|
409
409
|
writable: !0,
|
|
410
410
|
value: !1
|
|
411
|
-
}), Object.defineProperty(
|
|
411
|
+
}), Object.defineProperty(f, "_self", {
|
|
412
412
|
configurable: !1,
|
|
413
413
|
enumerable: !1,
|
|
414
414
|
writable: !1,
|
|
415
|
-
value:
|
|
416
|
-
}), Object.defineProperty(
|
|
415
|
+
value: s
|
|
416
|
+
}), Object.defineProperty(f, "_source", {
|
|
417
417
|
configurable: !1,
|
|
418
418
|
enumerable: !1,
|
|
419
419
|
writable: !1,
|
|
420
420
|
value: p
|
|
421
|
-
}), Object.freeze && (Object.freeze(
|
|
421
|
+
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
422
422
|
};
|
|
423
|
-
function or(e, r, a,
|
|
423
|
+
function or(e, r, a, s, p) {
|
|
424
424
|
{
|
|
425
|
-
var g,
|
|
426
|
-
a !== void 0 && (Te(a),
|
|
425
|
+
var g, d = {}, f = null, w = null;
|
|
426
|
+
a !== void 0 && (Te(a), f = "" + a), er(r) && (Te(r.key), f = "" + r.key), Qe(r) && (w = r.ref, rr(r, p));
|
|
427
427
|
for (g in r)
|
|
428
|
-
J.call(r, g) && !Ze.hasOwnProperty(g) && (
|
|
428
|
+
J.call(r, g) && !Ze.hasOwnProperty(g) && (d[g] = r[g]);
|
|
429
429
|
if (e && e.defaultProps) {
|
|
430
430
|
var y = e.defaultProps;
|
|
431
431
|
for (g in y)
|
|
432
|
-
|
|
432
|
+
d[g] === void 0 && (d[g] = y[g]);
|
|
433
433
|
}
|
|
434
|
-
if (
|
|
434
|
+
if (f || w) {
|
|
435
435
|
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
436
|
-
|
|
436
|
+
f && tr(d, R), w && nr(d, R);
|
|
437
437
|
}
|
|
438
|
-
return ar(e,
|
|
438
|
+
return ar(e, f, w, p, s, W.current, d);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
var ne = j.ReactCurrentOwner, je = j.ReactDebugCurrentFrame;
|
|
@@ -449,7 +449,7 @@ function Rr() {
|
|
|
449
449
|
var ae;
|
|
450
450
|
ae = !1;
|
|
451
451
|
function oe(e) {
|
|
452
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
452
|
+
return typeof e == "object" && e !== null && e.$$typeof === i;
|
|
453
453
|
}
|
|
454
454
|
function Pe() {
|
|
455
455
|
{
|
|
@@ -496,8 +496,8 @@ Check the top-level render call using <` + a + ">.");
|
|
|
496
496
|
if (Ae[a])
|
|
497
497
|
return;
|
|
498
498
|
Ae[a] = !0;
|
|
499
|
-
var
|
|
500
|
-
e && e._owner && e._owner !== ne.current && (
|
|
499
|
+
var s = "";
|
|
500
|
+
e && e._owner && e._owner !== ne.current && (s = " It was passed a child from " + P(e._owner.type) + "."), L(e), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, s), L(null);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
function ke(e, r) {
|
|
@@ -506,16 +506,16 @@ Check the top-level render call using <` + a + ">.");
|
|
|
506
506
|
return;
|
|
507
507
|
if (re(e))
|
|
508
508
|
for (var a = 0; a < e.length; a++) {
|
|
509
|
-
var
|
|
510
|
-
oe(
|
|
509
|
+
var s = e[a];
|
|
510
|
+
oe(s) && xe(s, r);
|
|
511
511
|
}
|
|
512
512
|
else if (oe(e))
|
|
513
513
|
e._store && (e._store.validated = !0);
|
|
514
514
|
else if (e) {
|
|
515
515
|
var p = F(e);
|
|
516
516
|
if (typeof p == "function" && p !== e.entries)
|
|
517
|
-
for (var g = p.call(e),
|
|
518
|
-
oe(
|
|
517
|
+
for (var g = p.call(e), d; !(d = g.next()).done; )
|
|
518
|
+
oe(d.value) && xe(d.value, r);
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
}
|
|
@@ -534,8 +534,8 @@ Check the top-level render call using <` + a + ">.");
|
|
|
534
534
|
else
|
|
535
535
|
return;
|
|
536
536
|
if (a) {
|
|
537
|
-
var
|
|
538
|
-
Je(a, e.props, "prop",
|
|
537
|
+
var s = P(r);
|
|
538
|
+
Je(a, e.props, "prop", s, e);
|
|
539
539
|
} else if (r.PropTypes !== void 0 && !ae) {
|
|
540
540
|
ae = !0;
|
|
541
541
|
var p = P(r);
|
|
@@ -547,33 +547,33 @@ Check the top-level render call using <` + a + ">.");
|
|
|
547
547
|
function cr(e) {
|
|
548
548
|
{
|
|
549
549
|
for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
|
|
550
|
-
var
|
|
551
|
-
if (
|
|
552
|
-
L(e), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
550
|
+
var s = r[a];
|
|
551
|
+
if (s !== "children" && s !== "key") {
|
|
552
|
+
L(e), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), L(null);
|
|
553
553
|
break;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
e.ref !== null && (L(e), b("Invalid attribute `ref` supplied to `React.Fragment`."), L(null));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function $e(e, r, a,
|
|
559
|
+
function $e(e, r, a, s, p, g) {
|
|
560
560
|
{
|
|
561
|
-
var
|
|
562
|
-
if (!
|
|
563
|
-
var
|
|
564
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
561
|
+
var d = Ve(e);
|
|
562
|
+
if (!d) {
|
|
563
|
+
var f = "";
|
|
564
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
565
565
|
var w = ir(p);
|
|
566
|
-
w ?
|
|
566
|
+
w ? f += w : f += Pe();
|
|
567
567
|
var y;
|
|
568
|
-
e === null ? y = "null" : re(e) ? y = "array" : e !== void 0 && e.$$typeof ===
|
|
568
|
+
e === null ? y = "null" : re(e) ? y = "array" : e !== void 0 && e.$$typeof === i ? (y = "<" + (P(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, f);
|
|
569
569
|
}
|
|
570
570
|
var R = or(e, r, a, p, g);
|
|
571
571
|
if (R == null)
|
|
572
572
|
return R;
|
|
573
|
-
if (
|
|
573
|
+
if (d) {
|
|
574
574
|
var S = r.children;
|
|
575
575
|
if (S !== void 0)
|
|
576
|
-
if (
|
|
576
|
+
if (s)
|
|
577
577
|
if (re(S)) {
|
|
578
578
|
for (var I = 0; I < S.length; I++)
|
|
579
579
|
ke(S[I], e);
|
|
@@ -583,7 +583,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
583
583
|
else
|
|
584
584
|
ke(S, e);
|
|
585
585
|
}
|
|
586
|
-
return e ===
|
|
586
|
+
return e === u ? cr(R) : sr(R), R;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
function lr(e, r, a) {
|
|
@@ -593,7 +593,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
593
593
|
return $e(e, r, a, !1);
|
|
594
594
|
}
|
|
595
595
|
var dr = fr, vr = lr;
|
|
596
|
-
M.Fragment =
|
|
596
|
+
M.Fragment = u, M.jsx = dr, M.jsxs = vr;
|
|
597
597
|
}()), M;
|
|
598
598
|
}
|
|
599
599
|
var V = {};
|
|
@@ -611,16 +611,16 @@ function br() {
|
|
|
611
611
|
if (Le)
|
|
612
612
|
return V;
|
|
613
613
|
Le = 1;
|
|
614
|
-
var t = Ne,
|
|
614
|
+
var t = Ne, i = Symbol.for("react.element"), o = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, c = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
615
615
|
function h(n, l, m) {
|
|
616
616
|
var E, C = {}, O = null, T = null;
|
|
617
617
|
m !== void 0 && (O = "" + m), l.key !== void 0 && (O = "" + l.key), l.ref !== void 0 && (T = l.ref);
|
|
618
618
|
for (E in l)
|
|
619
|
-
|
|
619
|
+
u.call(l, E) && !v.hasOwnProperty(E) && (C[E] = l[E]);
|
|
620
620
|
if (n && n.defaultProps)
|
|
621
621
|
for (E in l = n.defaultProps, l)
|
|
622
622
|
C[E] === void 0 && (C[E] = l[E]);
|
|
623
|
-
return { $$typeof:
|
|
623
|
+
return { $$typeof: i, type: n, key: O, ref: T, props: C, _owner: c.current };
|
|
624
624
|
}
|
|
625
625
|
return V.Fragment = o, V.jsx = h, V.jsxs = h, V;
|
|
626
626
|
}
|
|
@@ -635,13 +635,13 @@ const q = pr({
|
|
|
635
635
|
translate: void 0,
|
|
636
636
|
useAuth: void 0,
|
|
637
637
|
useLocation: void 0
|
|
638
|
-
}),
|
|
638
|
+
}), jr = ({
|
|
639
639
|
axios: t,
|
|
640
|
-
children:
|
|
640
|
+
children: i,
|
|
641
641
|
translate: o,
|
|
642
|
-
useAuth:
|
|
643
|
-
Outlet:
|
|
644
|
-
Navigate:
|
|
642
|
+
useAuth: u,
|
|
643
|
+
Outlet: c,
|
|
644
|
+
Navigate: v,
|
|
645
645
|
useLocation: h,
|
|
646
646
|
useGoogleTagManager: n,
|
|
647
647
|
apiURL: l
|
|
@@ -650,30 +650,30 @@ const q = pr({
|
|
|
650
650
|
() => ({
|
|
651
651
|
apiURL: l,
|
|
652
652
|
axios: t,
|
|
653
|
-
Navigate:
|
|
654
|
-
Outlet:
|
|
653
|
+
Navigate: v,
|
|
654
|
+
Outlet: c,
|
|
655
655
|
translate: o,
|
|
656
|
-
useAuth:
|
|
656
|
+
useAuth: u,
|
|
657
657
|
useGoogleTagManager: n,
|
|
658
658
|
useLocation: h
|
|
659
659
|
}),
|
|
660
|
-
[
|
|
660
|
+
[v, c, l, t, o, u, n, h]
|
|
661
661
|
);
|
|
662
|
-
return /* @__PURE__ */ x.jsx(q.Provider, { value: m, children:
|
|
663
|
-
}, H = (t) => `RequireAuth require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,
|
|
662
|
+
return /* @__PURE__ */ x.jsx(q.Provider, { value: m, children: i });
|
|
663
|
+
}, H = (t) => `RequireAuth require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Pr = ({
|
|
664
664
|
Fallback: t,
|
|
665
|
-
loginPath:
|
|
665
|
+
loginPath: i = "/login",
|
|
666
666
|
localStorageKey: o = "user",
|
|
667
|
-
redirect401Path:
|
|
668
|
-
...
|
|
667
|
+
redirect401Path: u = "/login",
|
|
668
|
+
...c
|
|
669
669
|
}) => {
|
|
670
670
|
var $, F, j, b;
|
|
671
671
|
const {
|
|
672
|
-
axios:
|
|
673
|
-
useLocation: h =
|
|
674
|
-
useAuth: n =
|
|
675
|
-
Outlet: l =
|
|
676
|
-
Navigate: m =
|
|
672
|
+
axios: v = c.axios,
|
|
673
|
+
useLocation: h = c.useLocation,
|
|
674
|
+
useAuth: n = c.useAuth,
|
|
675
|
+
Outlet: l = c.Outlet,
|
|
676
|
+
Navigate: m = c.Navigate
|
|
677
677
|
} = K(q);
|
|
678
678
|
if (n === void 0)
|
|
679
679
|
throw new Error(H("useAuth"));
|
|
@@ -685,50 +685,50 @@ const q = pr({
|
|
|
685
685
|
throw new Error(H("Navigate"));
|
|
686
686
|
const [E, C] = gr(null), { isLogged: O } = n(), T = h(), k = mr(!1);
|
|
687
687
|
return hr(() => {
|
|
688
|
-
k.current || (k.current = !0,
|
|
688
|
+
k.current || (k.current = !0, v == null || v.interceptors.response.use(
|
|
689
689
|
(_) => _,
|
|
690
690
|
async (_) => {
|
|
691
691
|
var U;
|
|
692
|
-
return typeof _ == "object" && _ && "response" in _ && _.response && typeof _.response == "object" && "status" in _.response && _.response && typeof _.response == "object" && "status" in _.response && ((U = _ == null ? void 0 : _.response) == null ? void 0 : U.status) === 401 && (
|
|
692
|
+
return typeof _ == "object" && _ && "response" in _ && _.response && typeof _.response == "object" && "status" in _.response && _.response && typeof _.response == "object" && "status" in _.response && ((U = _ == null ? void 0 : _.response) == null ? void 0 : U.status) === 401 && (v.defaults.headers.common.Authorization = null, localStorage.removeItem(o), C(u)), Promise.reject(_);
|
|
693
693
|
}
|
|
694
694
|
));
|
|
695
|
-
}, [
|
|
696
|
-
}, ie = (t) => `GTMSendPageView require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,
|
|
695
|
+
}, [v == null ? void 0 : v.defaults.headers.common, v == null ? void 0 : v.interceptors.response, o, u]), O && !E ? /* @__PURE__ */ x.jsx(Er, { fallback: t, children: (F = ($ = T.state) == null ? void 0 : $.from) != null && F.state && ((b = (j = T.state) == null ? void 0 : j.from) == null ? void 0 : b.pathname) === i ? /* @__PURE__ */ x.jsx(m, { to: T.state.from.state.from.pathname + T.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ x.jsx(l, {}) }) : /* @__PURE__ */ x.jsx(m, { to: i, state: { from: T }, replace: !0 });
|
|
696
|
+
}, ie = (t) => `GTMSendPageView require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Ar = ({ ...t }) => {
|
|
697
697
|
const {
|
|
698
|
-
useLocation:
|
|
698
|
+
useLocation: i = t.useLocation,
|
|
699
699
|
Outlet: o = t.Outlet,
|
|
700
|
-
useGoogleTagManager:
|
|
700
|
+
useGoogleTagManager: u = t.useGoogleTagManager
|
|
701
701
|
} = K(q);
|
|
702
|
-
if (
|
|
702
|
+
if (i === void 0)
|
|
703
703
|
throw new Error(ie("useLocation"));
|
|
704
704
|
if (o === void 0)
|
|
705
705
|
throw new Error(ie("Outlet"));
|
|
706
|
-
if (
|
|
706
|
+
if (u === void 0)
|
|
707
707
|
throw new Error(ie("useGoogleTagManager"));
|
|
708
|
-
const { pathname:
|
|
708
|
+
const { pathname: c } = i(), { sendEvent: v } = u();
|
|
709
709
|
return yr(() => {
|
|
710
|
-
|
|
711
|
-
}, [
|
|
712
|
-
},
|
|
710
|
+
v({ event: "pageView", pathname: c });
|
|
711
|
+
}, [c, v]), /* @__PURE__ */ x.jsx(o, {});
|
|
712
|
+
}, xr = ({
|
|
713
713
|
axios: t,
|
|
714
|
-
baseURL:
|
|
714
|
+
baseURL: i,
|
|
715
715
|
tokenTypeKey: o = "tokenType",
|
|
716
|
-
userLocalStorageKey:
|
|
717
|
-
tokenKey:
|
|
718
|
-
postContentType:
|
|
716
|
+
userLocalStorageKey: u = "user",
|
|
717
|
+
tokenKey: c = "accessToken",
|
|
718
|
+
postContentType: v = "application/json"
|
|
719
719
|
}) => {
|
|
720
720
|
if (!t.defaults)
|
|
721
721
|
return null;
|
|
722
|
-
const h = localStorage.getItem(
|
|
723
|
-
return t.defaults.baseURL =
|
|
724
|
-
},
|
|
722
|
+
const h = localStorage.getItem(u), n = h ? JSON.parse(h) : null, l = n != null && n[o] ? n[o] : null, m = n != null && n[c] ? n[c] : null, E = h ? `${l} ${m}` : null;
|
|
723
|
+
return t.defaults.baseURL = i, t.defaults.headers.post["Content-Type"] = v, E && (t.defaults.headers.common.Authorization = E), null;
|
|
724
|
+
}, kr = ({
|
|
725
725
|
i18n: t,
|
|
726
|
-
debug:
|
|
726
|
+
debug: i,
|
|
727
727
|
initReactI18next: o,
|
|
728
|
-
resources:
|
|
729
|
-
LanguageDetector:
|
|
730
|
-
}) => (t != null && t.isInitialized || (t.use(
|
|
731
|
-
debug:
|
|
728
|
+
resources: u,
|
|
729
|
+
LanguageDetector: c
|
|
730
|
+
}) => (t != null && t.isInitialized || (t.use(c).use(o).init({
|
|
731
|
+
debug: i,
|
|
732
732
|
fallbackLng: "en",
|
|
733
733
|
interpolation: {
|
|
734
734
|
escapeValue: !1
|
|
@@ -738,111 +738,111 @@ const q = pr({
|
|
|
738
738
|
bindI18n: !1,
|
|
739
739
|
useSuspense: !0
|
|
740
740
|
},
|
|
741
|
-
resources:
|
|
741
|
+
resources: u,
|
|
742
742
|
returnNull: !1
|
|
743
743
|
}).then(() => {
|
|
744
744
|
document.documentElement.lang !== t.resolvedLanguage && t.resolvedLanguage && document.documentElement.setAttribute("lang", t.resolvedLanguage);
|
|
745
|
-
}), t.on("languageChanged", (
|
|
746
|
-
document.documentElement.setAttribute("lang",
|
|
747
|
-
})), null),
|
|
745
|
+
}), t.on("languageChanged", (v) => {
|
|
746
|
+
document.documentElement.setAttribute("lang", v);
|
|
747
|
+
})), null), $r = ({
|
|
748
748
|
dsn: t,
|
|
749
|
-
sentry:
|
|
749
|
+
sentry: i,
|
|
750
750
|
integrations: o,
|
|
751
|
-
tracesSampleRate:
|
|
752
|
-
routingInstrumentationDependencies:
|
|
753
|
-
replaysSessionSampleRate:
|
|
751
|
+
tracesSampleRate: u,
|
|
752
|
+
routingInstrumentationDependencies: c,
|
|
753
|
+
replaysSessionSampleRate: v,
|
|
754
754
|
replaysOnErrorSampleRate: h,
|
|
755
755
|
tracePropagationTargets: n,
|
|
756
756
|
ignoreErrors: l,
|
|
757
757
|
debug: m
|
|
758
|
-
}) => (
|
|
758
|
+
}) => (i.isInitialized() || (m || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && i.init({
|
|
759
759
|
debug: m,
|
|
760
760
|
dsn: t,
|
|
761
761
|
ignoreErrors: l || [/Failed to fetch dynamically imported module/],
|
|
762
762
|
integrations: [
|
|
763
|
-
new
|
|
764
|
-
routingInstrumentation:
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
763
|
+
new i.BrowserTracing({
|
|
764
|
+
routingInstrumentation: i.reactRouterV6Instrumentation(
|
|
765
|
+
c.useEffect,
|
|
766
|
+
c.useLocation,
|
|
767
|
+
c.useNavigationType,
|
|
768
|
+
c.createRoutesFromChildren,
|
|
769
|
+
c.matchRoutes
|
|
770
770
|
)
|
|
771
771
|
}),
|
|
772
|
-
|
|
772
|
+
i.replayIntegration(),
|
|
773
773
|
...o || []
|
|
774
774
|
],
|
|
775
775
|
replaysOnErrorSampleRate: h || 1,
|
|
776
|
-
replaysSessionSampleRate:
|
|
776
|
+
replaysSessionSampleRate: v || 0.1,
|
|
777
777
|
tracePropagationTargets: n,
|
|
778
|
-
tracesSampleRate:
|
|
779
|
-
}), null),
|
|
778
|
+
tracesSampleRate: u || 1
|
|
779
|
+
}), null), Fr = ({ IMaskMixin: t, ...i }) => {
|
|
780
780
|
const o = se(
|
|
781
781
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
782
|
-
() => t(({ TextField:
|
|
782
|
+
() => t(({ TextField: u, ...c }) => /* @__PURE__ */ x.jsx(u, { ...c })),
|
|
783
783
|
[t]
|
|
784
784
|
);
|
|
785
|
-
return /* @__PURE__ */ x.jsx(o, { ...
|
|
786
|
-
},
|
|
785
|
+
return /* @__PURE__ */ x.jsx(o, { ...i });
|
|
786
|
+
}, Dr = ({ mapbox: t, accessToken: i }) => (t && i && (t.accessToken = i), null), Lr = ({
|
|
787
787
|
children: t,
|
|
788
|
-
defaultOptions:
|
|
788
|
+
defaultOptions: i,
|
|
789
789
|
QueryClient: o,
|
|
790
|
-
QueryClientProvider:
|
|
790
|
+
QueryClientProvider: u
|
|
791
791
|
}) => {
|
|
792
|
-
const
|
|
792
|
+
const c = new o({
|
|
793
793
|
defaultOptions: {
|
|
794
794
|
queries: {
|
|
795
795
|
refetchOnWindowFocus: !1,
|
|
796
796
|
retry: 3,
|
|
797
|
-
...
|
|
797
|
+
...i
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
800
|
});
|
|
801
|
-
return /* @__PURE__ */ x.jsx(
|
|
802
|
-
},
|
|
803
|
-
const { unknownErrorTranslationKey:
|
|
801
|
+
return /* @__PURE__ */ x.jsx(u, { client: c, children: t });
|
|
802
|
+
}, Ir = (t) => {
|
|
803
|
+
const { unknownErrorTranslationKey: i = "error.unknownError" } = t || {}, { translate: o = t == null ? void 0 : t.translate } = K(q), u = o ? o(i) : "Unknown error", c = Y(
|
|
804
804
|
(h) => {
|
|
805
805
|
var l, m, E, C, O, T, k, $, F;
|
|
806
806
|
const { response: n } = h || {};
|
|
807
|
-
return n != null && n.reason ? String(n.reason) : (l = n == null ? void 0 : n.data) != null && l.reason ? String(n.data.reason) : (m = n == null ? void 0 : n.data) != null && m.message ? String(n.data.message) : (C = (E = n == null ? void 0 : n.data) == null ? void 0 : E.detail) != null && C.length && Array.isArray((O = n == null ? void 0 : n.data) == null ? void 0 : O.detail) && ((k = (T = n == null ? void 0 : n.data) == null ? void 0 : T.detail[0]) != null && k.msg) && typeof ((F = ($ = n == null ? void 0 : n.data) == null ? void 0 : $.detail[0]) == null ? void 0 : F.msg) == "string" ? String(n.data.detail[0].msg) :
|
|
807
|
+
return n != null && n.reason ? String(n.reason) : (l = n == null ? void 0 : n.data) != null && l.reason ? String(n.data.reason) : (m = n == null ? void 0 : n.data) != null && m.message ? String(n.data.message) : (C = (E = n == null ? void 0 : n.data) == null ? void 0 : E.detail) != null && C.length && Array.isArray((O = n == null ? void 0 : n.data) == null ? void 0 : O.detail) && ((k = (T = n == null ? void 0 : n.data) == null ? void 0 : T.detail[0]) != null && k.msg) && typeof ((F = ($ = n == null ? void 0 : n.data) == null ? void 0 : $.detail[0]) == null ? void 0 : F.msg) == "string" ? String(n.data.detail[0].msg) : u;
|
|
808
808
|
},
|
|
809
|
-
[
|
|
810
|
-
),
|
|
809
|
+
[u]
|
|
810
|
+
), v = Y(
|
|
811
811
|
(h) => {
|
|
812
812
|
var l, m, E;
|
|
813
813
|
const { response: n } = h || {};
|
|
814
|
-
return o && (n != null && n.error_code) ? o(n == null ? void 0 : n.error_code) : o && ((l = n == null ? void 0 : n.data) != null && l.error_code) ? o((m = n == null ? void 0 : n.data) == null ? void 0 : m.error_code) : n != null && n.error_code ? String(n == null ? void 0 : n.error_code) : (E = n == null ? void 0 : n.data) != null && E.error_code ? String(n.data.error_code) :
|
|
814
|
+
return o && (n != null && n.error_code) ? o(n == null ? void 0 : n.error_code) : o && ((l = n == null ? void 0 : n.data) != null && l.error_code) ? o((m = n == null ? void 0 : n.data) == null ? void 0 : m.error_code) : n != null && n.error_code ? String(n == null ? void 0 : n.error_code) : (E = n == null ? void 0 : n.data) != null && E.error_code ? String(n.data.error_code) : u;
|
|
815
815
|
},
|
|
816
|
-
[
|
|
816
|
+
[u, o]
|
|
817
817
|
);
|
|
818
|
-
return { printError:
|
|
819
|
-
},
|
|
818
|
+
return { printError: c, printErrorCode: v };
|
|
819
|
+
}, Nr = ({
|
|
820
820
|
data: t,
|
|
821
|
-
fetchNextPage:
|
|
821
|
+
fetchNextPage: i,
|
|
822
822
|
isFetchingNextPage: o,
|
|
823
|
-
isInitialLoading:
|
|
824
|
-
isLoading:
|
|
825
|
-
enabled:
|
|
823
|
+
isInitialLoading: u,
|
|
824
|
+
isLoading: c,
|
|
825
|
+
enabled: v = !0
|
|
826
826
|
}) => {
|
|
827
827
|
const h = Y(
|
|
828
828
|
async (l) => {
|
|
829
|
-
o || !
|
|
829
|
+
o || !v || await i({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
|
|
830
830
|
},
|
|
831
|
-
[
|
|
831
|
+
[v, i, o]
|
|
832
832
|
), n = se(() => {
|
|
833
833
|
if (t)
|
|
834
834
|
return t.pages.reduce((l, m) => [...l, ...m], []);
|
|
835
835
|
}, [t]);
|
|
836
836
|
return {
|
|
837
837
|
fetchNextPageOnRowsScrollEnd: h,
|
|
838
|
-
isLoading: o ||
|
|
839
|
-
loadingVariant:
|
|
838
|
+
isLoading: o || c,
|
|
839
|
+
loadingVariant: u ? "skeleton" : "linear",
|
|
840
840
|
rows: n
|
|
841
841
|
};
|
|
842
|
-
},
|
|
843
|
-
const
|
|
844
|
-
({ tokenType:
|
|
845
|
-
t.defaults.headers.common.Authorization = `${
|
|
842
|
+
}, Wr = (t) => {
|
|
843
|
+
const i = Y(
|
|
844
|
+
({ tokenType: u, accessToken: c }) => {
|
|
845
|
+
t.defaults.headers.common.Authorization = `${u} ${c}`;
|
|
846
846
|
},
|
|
847
847
|
[t.defaults.headers.common]
|
|
848
848
|
);
|
|
@@ -850,56 +850,59 @@ const q = pr({
|
|
|
850
850
|
clearAuthenticationToken: Y(() => {
|
|
851
851
|
t.defaults.headers.common.Authorization = null;
|
|
852
852
|
}, [t.defaults.headers.common]),
|
|
853
|
-
setAuthenticationToken:
|
|
853
|
+
setAuthenticationToken: i
|
|
854
854
|
};
|
|
855
|
-
},
|
|
855
|
+
}, _r = (t, i = "km") => {
|
|
856
|
+
const o = Number(t);
|
|
857
|
+
return Number.isNaN(o) ? `0 ${i}` : `${o.toFixed(2)} ${i}`;
|
|
858
|
+
}, Ie = (t, i) => {
|
|
856
859
|
if (!t)
|
|
857
860
|
return "";
|
|
858
861
|
const o = typeof t == "object" && "pathname" in t ? `${t.origin}${t.pathname}` : t;
|
|
859
|
-
return typeof
|
|
860
|
-
},
|
|
862
|
+
return typeof i == "number" ? `${o.replace("/files", `/thumbs/${i}`)}` : o;
|
|
863
|
+
}, Mr = () => {
|
|
861
864
|
const { apiURL: t } = K(q);
|
|
862
|
-
return {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
const
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
const
|
|
871
|
-
return `${
|
|
872
|
-
},
|
|
865
|
+
return {
|
|
866
|
+
distanceAdapter: _r,
|
|
867
|
+
filePathAdapter: (o, u) => Ie(t && typeof o == "string" ? { origin: t, pathname: o } : o, u)
|
|
868
|
+
};
|
|
869
|
+
}, wr = (t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase(), Cr = (t) => {
|
|
870
|
+
const u = t.split("/").filter((c) => c.length > 0).map((c) => c.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
|
|
871
|
+
return u.charAt(0).toLowerCase() + u.slice(1);
|
|
872
|
+
}, Tr = (t, i, o) => {
|
|
873
|
+
const u = Cr(i), c = wr(o);
|
|
874
|
+
return `${u}${c}`;
|
|
875
|
+
}, Or = (t) => {
|
|
873
876
|
if (t)
|
|
874
|
-
return (t == null ? void 0 : t.reduce((
|
|
877
|
+
return (t == null ? void 0 : t.reduce((i, o) => (i[o] = {
|
|
875
878
|
query: {
|
|
876
879
|
useInfinite: !0,
|
|
877
880
|
useInfiniteQueryParam: "offset"
|
|
878
881
|
}
|
|
879
|
-
},
|
|
880
|
-
},
|
|
881
|
-
const { input:
|
|
882
|
+
}, i), {})) || {};
|
|
883
|
+
}, Vr = (t) => {
|
|
884
|
+
const { input: i = "./openapi.json", operationsToGenerateInfiniteQueryHook: o = void 0 } = t || {};
|
|
882
885
|
return {
|
|
883
886
|
api: {
|
|
884
887
|
hooks: {
|
|
885
888
|
afterAllFilesWrite: "prettier src/api/ --write"
|
|
886
889
|
},
|
|
887
|
-
input:
|
|
890
|
+
input: i,
|
|
888
891
|
output: {
|
|
889
892
|
client: "react-query",
|
|
890
893
|
mode: "tags-split",
|
|
891
894
|
override: {
|
|
892
|
-
header: (
|
|
895
|
+
header: (u) => [
|
|
893
896
|
"Generated by orval 🍺",
|
|
894
|
-
...
|
|
895
|
-
...
|
|
897
|
+
...u.title ? [u.title] : [],
|
|
898
|
+
...u.description ? [u.description] : []
|
|
896
899
|
],
|
|
897
900
|
mutator: {
|
|
898
901
|
name: "axiosCustomInstance",
|
|
899
902
|
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
900
903
|
},
|
|
901
|
-
operationName:
|
|
902
|
-
...(o == null ? void 0 : o.length) && { operations:
|
|
904
|
+
operationName: Tr,
|
|
905
|
+
...(o == null ? void 0 : o.length) && { operations: Or(o) },
|
|
903
906
|
query: {
|
|
904
907
|
useQuery: !0
|
|
905
908
|
}
|
|
@@ -911,20 +914,21 @@ const q = pr({
|
|
|
911
914
|
};
|
|
912
915
|
};
|
|
913
916
|
export {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
+
xr as AxiosConfig,
|
|
918
|
+
Ar as GTMSendPageView,
|
|
919
|
+
kr as I18nConfig,
|
|
917
920
|
q as InjectDependenciesContext,
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
921
|
+
jr as InjectDependenciesProvider,
|
|
922
|
+
Dr as MapBoxConfig,
|
|
923
|
+
Fr as MaskTextField,
|
|
924
|
+
Lr as QueryClientConfigProvider,
|
|
925
|
+
Pr as RequireAuth,
|
|
926
|
+
$r as SentryConfig,
|
|
927
|
+
_r as distanceAdapter,
|
|
924
928
|
Ie as filePathAdapter,
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
929
|
+
Vr as getOrvalConfig,
|
|
930
|
+
Mr as useAdapter,
|
|
931
|
+
Wr as useAuth,
|
|
932
|
+
Nr as useInfiniteDataGrid,
|
|
933
|
+
Ir as useResponseError
|
|
930
934
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -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 ce;function
|
|
10
|
-
`+te+e}}var ne=!1,X;{var
|
|
11
|
-
`),T=
|
|
12
|
-
`),R=
|
|
13
|
-
`+
|
|
9
|
+
*/var ce;function Me(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&function(){var t=h,i=Symbol.for("react.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),n=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),F=Symbol.iterator,I="@@iterator";function L(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[I];return typeof r=="function"?r:null}var k=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];w("error",e,a)}}function w(e,r,a){{var s=k.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(r+="%s",a=a.concat([p]));var g=a.map(function(d){return String(d)});g.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,g)}}var de=!1,ve=!1,J=!1,ar=!1,or=!1,pe;pe=Symbol.for("react.module.reference");function ir(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===v||or||e===c||e===m||e===y||ar||e===S||de||ve||J||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===O||e.$$typeof===E||e.$$typeof===n||e.$$typeof===l||e.$$typeof===pe||e.getModuleId!==void 0))}function ur(e,r,a){var s=e.displayName;if(s)return s;var p=r.displayName||r.name||"";return p!==""?a+"("+p+")":a}function ge(e){return e.displayName||"Context"}function x(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 o:return"Portal";case v:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n:var r=e;return ge(r)+".Consumer";case E:var a=e;return ge(a._context)+".Provider";case l:return ur(e,e.render,"ForwardRef");case O:var s=e.displayName||null;return s!==null?s:x(e.type)||"Memo";case j:{var p=e,g=p._payload,d=p._init;try{return x(d(g))}catch{return null}}}return null}var N=Object.assign,z=0,me,he,Ee,ye,be,Re,_e;function Ce(){}Ce.__reactDisabledLog=!0;function sr(){{if(z===0){me=console.log,he=console.info,Ee=console.warn,ye=console.error,be=console.group,Re=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function cr(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:me}),info:N({},e,{value:he}),warn:N({},e,{value:Ee}),error:N({},e,{value:ye}),group:N({},e,{value:be}),groupCollapsed:N({},e,{value:Re}),groupEnd:N({},e,{value:_e})})}z<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var re=k.ReactCurrentDispatcher,te;function $(e,r,a){{if(te===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);te=s&&s[1]||""}return`
|
|
10
|
+
`+te+e}}var ne=!1,X;{var lr=typeof WeakMap=="function"?WeakMap:Map;X=new lr}function we(e,r){if(!e||ne)return"";{var a=X.get(e);if(a!==void 0)return a}var s;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=re.current,re.current=null,sr();try{if(r){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(D){s=D}Reflect.construct(e,[],d)}else{try{d.call()}catch(D){s=D}e.call(d.prototype)}}else{try{throw Error()}catch(D){s=D}e()}}catch(D){if(D&&s&&typeof D.stack=="string"){for(var f=D.stack.split(`
|
|
11
|
+
`),T=s.stack.split(`
|
|
12
|
+
`),R=f.length-1,_=T.length-1;R>=1&&_>=0&&f[R]!==T[_];)_--;for(;R>=1&&_>=0;R--,_--)if(f[R]!==T[_]){if(R!==1||_!==1)do if(R--,_--,_<0||f[R]!==T[_]){var P=`
|
|
13
|
+
`+f[R].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,P),P}while(R>=1&&_>=0);break}}}finally{ne=!1,re.current=g,cr(),Error.prepareStackTrace=p}var V=e?e.displayName||e.name:"",Ne=V?$(V):"";return typeof e=="function"&&X.set(e,Ne),Ne}function fr(e,r,a){return we(e,!1)}function dr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,a){if(e==null)return"";if(typeof e=="function")return we(e,dr(e));if(typeof e=="string")return $(e);switch(e){case m:return $("Suspense");case y:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return fr(e.render);case O:return H(e.type,r,a);case j:{var s=e,p=s._payload,g=s._init;try{return H(g(p),r,a)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,Te={},Oe=k.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);Oe.setExtraStackFrame(a)}else Oe.setExtraStackFrame(null)}function vr(e,r,a,s,p){{var g=Function.call.bind(K);for(var d in e)if(g(e,d)){var f=void 0;try{if(typeof e[d]!="function"){var T=Error((s||"React class")+": "+a+" 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 T.name="Invariant Violation",T}f=e[d](r,d,s,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){f=R}f&&!(f instanceof Error)&&(Z(p),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",a,d,typeof f),Z(null)),f instanceof Error&&!(f.message in Te)&&(Te[f.message]=!0,Z(p),C("Failed %s type: %s",a,f.message),Z(null))}}}var pr=Array.isArray;function ae(e){return pr(e)}function gr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function mr(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function je(e){if(mr(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gr(e)),Se(e)}var B=k.ReactCurrentOwner,hr={key:!0,ref:!0,__self:!0,__source:!0},Pe,Ae,oe;oe={};function Er(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function yr(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function br(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var a=x(B.current.type);oe[a]||(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',x(B.current.type),e.ref),oe[a]=!0)}}function Rr(e,r){{var a=function(){Pe||(Pe=!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)",r))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function _r(e,r){{var a=function(){Ae||(Ae=!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)",r))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var Cr=function(e,r,a,s,p,g,d){var f={$$typeof:i,type:e,key:r,ref:a,props:d,_owner:g};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function wr(e,r,a,s,p){{var g,d={},f=null,T=null;a!==void 0&&(je(a),f=""+a),yr(r)&&(je(r.key),f=""+r.key),Er(r)&&(T=r.ref,br(r,p));for(g in r)K.call(r,g)&&!hr.hasOwnProperty(g)&&(d[g]=r[g]);if(e&&e.defaultProps){var R=e.defaultProps;for(g in R)d[g]===void 0&&(d[g]=R[g])}if(f||T){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&Rr(d,_),T&&_r(d,_)}return Cr(e,f,T,p,s,B.current,d)}}var ie=k.ReactCurrentOwner,ke=k.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);ke.setExtraStackFrame(a)}else ke.setExtraStackFrame(null)}var ue;ue=!1;function se(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function xe(){{if(ie.current){var e=x(ie.current.type);if(e)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
15
|
+
Check the render method of \``+e+"`."}return""}}function Tr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
|
|
16
16
|
|
|
17
|
-
Check your code at `+r+":"+a+"."}return""}}var
|
|
17
|
+
Check your code at `+r+":"+a+"."}return""}}var De={};function Or(e){{var r=xe();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+a+">.")}return r}}function
|
|
19
|
+
Check the top-level render call using <`+a+">.")}return r}}function Fe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=Or(r);if(De[a])return;De[a]=!0;var s="";e&&e._owner&&e._owner!==ie.current&&(s=" It was passed a child from "+x(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.',a,s),W(null)}}function Ie(e,r){{if(typeof e!="object")return;if(ae(e))for(var a=0;a<e.length;a++){var s=e[a];se(s)&&Fe(s,r)}else if(se(e))e._store&&(e._store.validated=!0);else if(e){var p=L(e);if(typeof p=="function"&&p!==e.entries)for(var g=p.call(e),d;!(d=g.next()).done;)se(d.value)&&Fe(d.value,r)}}}function Sr(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===O))a=r.propTypes;else return;if(a){var s=x(r);vr(a,e.props,"prop",s,e)}else if(r.PropTypes!==void 0&&!ue){ue=!0;var p=x(r);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function jr(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var s=r[a];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 Le(e,r,a,s,p,g){{var d=ir(e);if(!d){var f="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(f+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T=Tr(p);T?f+=T:f+=xe();var R;e===null?R="null":ae(e)?R="array":e!==void 0&&e.$$typeof===i?(R="<"+(x(e.type)||"Unknown")+" />",f=" 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,f)}var _=wr(e,r,a,p,g);if(_==null)return _;if(d){var P=r.children;if(P!==void 0)if(s)if(ae(P)){for(var V=0;V<P.length;V++)Ie(P[V],e);Object.freeze&&Object.freeze(P)}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 Ie(P,e)}return e===u?jr(_):Sr(_),_}}function Pr(e,r,a){return Le(e,r,a,!0)}function Ar(e,r,a){return Le(e,r,a,!1)}var kr=Ar,xr=Pr;Y.Fragment=u,Y.jsx=kr,Y.jsxs=xr}()),Y}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 <`+a+">.")}return r}}function De(e,r){{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 le;function
|
|
27
|
+
*/var le;function We(){if(le)return U;le=1;var t=h,i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,c=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function E(n,l,m){var y,O={},j=null,S=null;m!==void 0&&(j=""+m),l.key!==void 0&&(j=""+l.key),l.ref!==void 0&&(S=l.ref);for(y in l)u.call(l,y)&&!v.hasOwnProperty(y)&&(O[y]=l[y]);if(n&&n.defaultProps)for(y in l=n.defaultProps,l)O[y]===void 0&&(O[y]=l[y]);return{$$typeof:i,type:n,key:j,ref:S,props:O,_owner:c.current}}return U.Fragment=o,U.jsx=E,U.jsxs=E,U}process.env.NODE_ENV==="production"?q.exports=We():q.exports=Me();var A=q.exports;const M=h.createContext({apiURL:void 0,axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Ve=({axios:t,children:i,translate:o,useAuth:u,Outlet:c,Navigate:v,useLocation:E,useGoogleTagManager:n,apiURL:l})=>{const m=h.useMemo(()=>({apiURL:l,axios:t,Navigate:v,Outlet:c,translate:o,useAuth:u,useGoogleTagManager:n,useLocation:E}),[v,c,l,t,o,u,n,E]);return A.jsx(M.Provider,{value:m,children:i})},G=t=>`RequireAuth require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({Fallback:t,loginPath:i="/login",localStorageKey:o="user",redirect401Path:u="/login",...c})=>{var I,L,k,C;const{axios:v=c.axios,useLocation:E=c.useLocation,useAuth:n=c.useAuth,Outlet:l=c.Outlet,Navigate:m=c.Navigate}=h.useContext(M);if(n===void 0)throw new Error(G("useAuth"));if(E===void 0)throw new Error(G("useLocation"));if(l===void 0)throw new Error(G("Outlet"));if(m===void 0)throw new Error(G("Navigate"));const[y,O]=h.useState(null),{isLogged:j}=n(),S=E(),F=h.useRef(!1);return h.useLayoutEffect(()=>{F.current||(F.current=!0,v==null||v.interceptors.response.use(w=>w,async w=>{var J;return typeof w=="object"&&w&&"response"in w&&w.response&&typeof w.response=="object"&&"status"in w.response&&w.response&&typeof w.response=="object"&&"status"in w.response&&((J=w==null?void 0:w.response)==null?void 0:J.status)===401&&(v.defaults.headers.common.Authorization=null,localStorage.removeItem(o),O(u)),Promise.reject(w)}))},[v==null?void 0:v.defaults.headers.common,v==null?void 0:v.interceptors.response,o,u]),j&&!y?A.jsx(h.Suspense,{fallback:t,children:(L=(I=S.state)==null?void 0:I.from)!=null&&L.state&&((C=(k=S.state)==null?void 0:k.from)==null?void 0:C.pathname)===i?A.jsx(m,{to:S.state.from.state.from.pathname+S.state.from.state.from.search,replace:!0}):A.jsx(l,{})}):A.jsx(m,{to:i,state:{from:S},replace:!0})},Q=t=>`GTMSendPageView require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ue=({...t})=>{const{useLocation:i=t.useLocation,Outlet:o=t.Outlet,useGoogleTagManager:u=t.useGoogleTagManager}=h.useContext(M);if(i===void 0)throw new Error(Q("useLocation"));if(o===void 0)throw new Error(Q("Outlet"));if(u===void 0)throw new Error(Q("useGoogleTagManager"));const{pathname:c}=i(),{sendEvent:v}=u();return h.useEffect(()=>{v({event:"pageView",pathname:c})},[c,v]),A.jsx(o,{})},ze=({axios:t,baseURL:i,tokenTypeKey:o="tokenType",userLocalStorageKey:u="user",tokenKey:c="accessToken",postContentType:v="application/json"})=>{if(!t.defaults)return null;const E=localStorage.getItem(u),n=E?JSON.parse(E):null,l=n!=null&&n[o]?n[o]:null,m=n!=null&&n[c]?n[c]:null,y=E?`${l} ${m}`:null;return t.defaults.baseURL=i,t.defaults.headers.post["Content-Type"]=v,y&&(t.defaults.headers.common.Authorization=y),null},Be=({i18n:t,debug:i,initReactI18next:o,resources:u,LanguageDetector:c})=>(t!=null&&t.isInitialized||(t.use(c).use(o).init({debug:i,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:u,returnNull:!1}).then(()=>{document.documentElement.lang!==t.resolvedLanguage&&t.resolvedLanguage&&document.documentElement.setAttribute("lang",t.resolvedLanguage)}),t.on("languageChanged",v=>{document.documentElement.setAttribute("lang",v)})),null),Ge=({dsn:t,sentry:i,integrations:o,tracesSampleRate:u,routingInstrumentationDependencies:c,replaysSessionSampleRate:v,replaysOnErrorSampleRate:E,tracePropagationTargets:n,ignoreErrors:l,debug:m})=>(i.isInitialized()||(m||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&i.init({debug:m,dsn:t,ignoreErrors:l||[/Failed to fetch dynamically imported module/],integrations:[new i.BrowserTracing({routingInstrumentation:i.reactRouterV6Instrumentation(c.useEffect,c.useLocation,c.useNavigationType,c.createRoutesFromChildren,c.matchRoutes)}),i.replayIntegration(),...o||[]],replaysOnErrorSampleRate:E||1,replaysSessionSampleRate:v||.1,tracePropagationTargets:n,tracesSampleRate:u||1}),null),Je=({IMaskMixin:t,...i})=>{const o=h.useMemo(()=>t(({TextField:u,...c})=>A.jsx(u,{...c})),[t]);return A.jsx(o,{...i})},$e=({mapbox:t,accessToken:i})=>(t&&i&&(t.accessToken=i),null),Xe=({children:t,defaultOptions:i,QueryClient:o,QueryClientProvider:u})=>{const c=new o({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...i}}});return A.jsx(u,{client:c,children:t})},He=t=>{const{unknownErrorTranslationKey:i="error.unknownError"}=t||{},{translate:o=t==null?void 0:t.translate}=h.useContext(M),u=o?o(i):"Unknown error",c=h.useCallback(E=>{var l,m,y,O,j,S,F,I,L;const{response:n}=E||{};return n!=null&&n.reason?String(n.reason):(l=n==null?void 0:n.data)!=null&&l.reason?String(n.data.reason):(m=n==null?void 0:n.data)!=null&&m.message?String(n.data.message):(O=(y=n==null?void 0:n.data)==null?void 0:y.detail)!=null&&O.length&&Array.isArray((j=n==null?void 0:n.data)==null?void 0:j.detail)&&((F=(S=n==null?void 0:n.data)==null?void 0:S.detail[0])!=null&&F.msg)&&typeof((L=(I=n==null?void 0:n.data)==null?void 0:I.detail[0])==null?void 0:L.msg)=="string"?String(n.data.detail[0].msg):u},[u]),v=h.useCallback(E=>{var l,m,y;const{response:n}=E||{};return o&&(n!=null&&n.error_code)?o(n==null?void 0:n.error_code):o&&((l=n==null?void 0:n.data)!=null&&l.error_code)?o((m=n==null?void 0:n.data)==null?void 0:m.error_code):n!=null&&n.error_code?String(n==null?void 0:n.error_code):(y=n==null?void 0:n.data)!=null&&y.error_code?String(n.data.error_code):u},[u,o]);return{printError:c,printErrorCode:v}},Ke=({data:t,fetchNextPage:i,isFetchingNextPage:o,isInitialLoading:u,isLoading:c,enabled:v=!0})=>{const E=h.useCallback(async l=>{o||!v||await i({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[v,i,o]),n=h.useMemo(()=>{if(t)return t.pages.reduce((l,m)=>[...l,...m],[])},[t]);return{fetchNextPageOnRowsScrollEnd:E,isLoading:o||c,loadingVariant:u?"skeleton":"linear",rows:n}},Ze=t=>{const i=h.useCallback(({tokenType:u,accessToken:c})=>{t.defaults.headers.common.Authorization=`${u} ${c}`},[t.defaults.headers.common]);return{clearAuthenticationToken:h.useCallback(()=>{t.defaults.headers.common.Authorization=null},[t.defaults.headers.common]),setAuthenticationToken:i}},fe=(t,i="km")=>{const o=Number(t);return Number.isNaN(o)?`0 ${i}`:`${o.toFixed(2)} ${i}`},ee=(t,i)=>{if(!t)return"";const o=typeof t=="object"&&"pathname"in t?`${t.origin}${t.pathname}`:t;return typeof i=="number"?`${o.replace("/files",`/thumbs/${i}`)}`:o},qe=()=>{const{apiURL:t}=h.useContext(M);return{distanceAdapter:fe,filePathAdapter:(o,u)=>ee(t&&typeof o=="string"?{origin:t,pathname:o}:o,u)}},Qe=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),er=t=>{const u=t.split("/").filter(c=>c.length>0).map(c=>c.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},rr=(t,i,o)=>{const u=er(i),c=Qe(o);return`${u}${c}`},tr=t=>{if(t)return(t==null?void 0:t.reduce((i,o)=>(i[o]={query:{useInfinite:!0,useInfiniteQueryParam:"offset"}},i),{}))||{}},nr=t=>{const{input:i="./openapi.json",operationsToGenerateInfiniteQueryHook:o=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:i,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:rr,...(o==null?void 0:o.length)&&{operations:tr(o)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};b.AxiosConfig=ze,b.GTMSendPageView=Ue,b.I18nConfig=Be,b.InjectDependenciesContext=M,b.InjectDependenciesProvider=Ve,b.MapBoxConfig=$e,b.MaskTextField=Je,b.QueryClientConfigProvider=Xe,b.RequireAuth=Ye,b.SentryConfig=Ge,b.distanceAdapter=fe,b.filePathAdapter=ee,b.getOrvalConfig=nr,b.useAdapter=qe,b.useAuth=Ze,b.useInfiniteDataGrid=Ke,b.useResponseError=He,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
|