@tracktor/shared-module 0.8.0 → 0.9.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 -4
- package/README.md +5 -0
- package/dist/config/orval.d.ts +8 -0
- package/dist/config/orval.test.d.ts +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +266 -259
- package/dist/main.umd.cjs +10 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
# [Versions](https://github.com/Tracktor/shared-module/releases)
|
|
2
2
|
|
|
3
|
-
## v0.
|
|
4
|
-
- **[feat]** :
|
|
5
|
-
- **[chore]** : Upgrade dependencies
|
|
6
|
-
- **[chore]** : Improve test hook library
|
|
3
|
+
## v0.9.0
|
|
4
|
+
- **[feat]** : Orval config operation name
|
package/README.md
CHANGED
|
@@ -72,3 +72,8 @@ export default App;
|
|
|
72
72
|
|----------------------|---------------------------------------------------------------------------|
|
|
73
73
|
| useResponseError | This hook is used to print error messages from the API |
|
|
74
74
|
| useInfiniteDataGrid | his hook is used to handle the infinite scroll of the DataGrid component. |
|
|
75
|
+
|
|
76
|
+
## Config
|
|
77
|
+
| Module | Description |
|
|
78
|
+
|-----------------------|------------------------------------|
|
|
79
|
+
| getOrvalOperationName | Get config for orval operationName |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/main.d.ts
CHANGED
|
@@ -20,3 +20,5 @@ export { default as useResponseError } from './hooks/useResponseError';
|
|
|
20
20
|
export * from './hooks/useResponseError';
|
|
21
21
|
export { default as useInfiniteDataGrid } from './hooks/useInfiniteDataGrid';
|
|
22
22
|
export * from './hooks/useInfiniteDataGrid';
|
|
23
|
+
export { default as getOrvalOperationName } from './config/orval';
|
|
24
|
+
export * from './config/orval';
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var oe = { exports: {} },
|
|
1
|
+
import $e, { createContext as gr, useMemo as ie, useContext as se, useState as hr, useLayoutEffect as J, Suspense as mr, useEffect as Er, useCallback as Le } from "react";
|
|
2
|
+
var oe = { exports: {} }, W = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,24 +10,24 @@ var oe = { exports: {} }, M = {};
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var Fe;
|
|
13
|
-
function
|
|
13
|
+
function yr() {
|
|
14
14
|
if (Fe)
|
|
15
|
-
return
|
|
15
|
+
return W;
|
|
16
16
|
Fe = 1;
|
|
17
|
-
var n =
|
|
18
|
-
function u(m,
|
|
19
|
-
var b, w = {},
|
|
20
|
-
R !== void 0 && (
|
|
21
|
-
for (b in
|
|
22
|
-
|
|
17
|
+
var n = $e, o = Symbol.for("react.element"), d = Symbol.for("react.fragment"), v = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function u(m, c, R) {
|
|
19
|
+
var b, w = {}, C = null, T = null;
|
|
20
|
+
R !== void 0 && (C = "" + R), c.key !== void 0 && (C = "" + c.key), c.ref !== void 0 && (T = c.ref);
|
|
21
|
+
for (b in c)
|
|
22
|
+
v.call(c, b) && !s.hasOwnProperty(b) && (w[b] = c[b]);
|
|
23
23
|
if (m && m.defaultProps)
|
|
24
|
-
for (b in
|
|
25
|
-
w[b] === void 0 && (w[b] =
|
|
26
|
-
return { $$typeof: o, type: m, key:
|
|
24
|
+
for (b in c = m.defaultProps, c)
|
|
25
|
+
w[b] === void 0 && (w[b] = c[b]);
|
|
26
|
+
return { $$typeof: o, type: m, key: C, ref: T, props: w, _owner: i.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return W.Fragment = d, W.jsx = u, W.jsxs = u, W;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var M = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -38,9 +38,9 @@ var W = {};
|
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
40
|
var Ie;
|
|
41
|
-
function
|
|
41
|
+
function br() {
|
|
42
42
|
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var n =
|
|
43
|
+
var n = $e, o = Symbol.for("react.element"), d = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), m = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), x = Symbol.iterator, A = "@@iterator";
|
|
44
44
|
function Y(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
@@ -48,38 +48,38 @@ function yr() {
|
|
|
48
48
|
return typeof r == "function" ? r : null;
|
|
49
49
|
}
|
|
50
50
|
var S = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
-
function
|
|
51
|
+
function p(e) {
|
|
52
52
|
{
|
|
53
53
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
54
54
|
t[a - 1] = arguments[a];
|
|
55
|
-
|
|
55
|
+
ue("error", e, t);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function ue(e, r, t) {
|
|
59
59
|
{
|
|
60
|
-
var a = S.ReactDebugCurrentFrame,
|
|
61
|
-
|
|
62
|
-
var h = t.map(function(
|
|
63
|
-
return String(
|
|
60
|
+
var a = S.ReactDebugCurrentFrame, g = a.getStackAddendum();
|
|
61
|
+
g !== "" && (r += "%s", t = t.concat([g]));
|
|
62
|
+
var h = t.map(function(f) {
|
|
63
|
+
return String(f);
|
|
64
64
|
});
|
|
65
65
|
h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var le = !1, N = !1, Me = !1,
|
|
68
|
+
var le = !1, N = !1, Me = !1, Ye = !1, Ne = !1, ce;
|
|
69
69
|
ce = Symbol.for("react.module.reference");
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
70
|
+
function Ve(e) {
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === v || e === s || Ne || e === i || e === R || e === b || Ye || e === T || le || N || Me || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === w || e.$$typeof === u || e.$$typeof === m || e.$$typeof === c || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
75
|
e.$$typeof === ce || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Ue(e, r, t) {
|
|
78
78
|
var a = e.displayName;
|
|
79
79
|
if (a)
|
|
80
80
|
return a;
|
|
81
|
-
var
|
|
82
|
-
return
|
|
81
|
+
var g = r.displayName || r.name || "";
|
|
82
|
+
return g !== "" ? t + "(" + g + ")" : t;
|
|
83
83
|
}
|
|
84
84
|
function fe(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
@@ -87,18 +87,18 @@ function yr() {
|
|
|
87
87
|
function j(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
91
91
|
return e.displayName || e.name || null;
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
94
94
|
switch (e) {
|
|
95
|
-
case
|
|
95
|
+
case v:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case d:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case s:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case i:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case R:
|
|
104
104
|
return "Suspense";
|
|
@@ -113,15 +113,15 @@ function yr() {
|
|
|
113
113
|
case u:
|
|
114
114
|
var t = e;
|
|
115
115
|
return fe(t._context) + ".Provider";
|
|
116
|
-
case
|
|
117
|
-
return
|
|
116
|
+
case c:
|
|
117
|
+
return Ue(e, e.render, "ForwardRef");
|
|
118
118
|
case w:
|
|
119
119
|
var a = e.displayName || null;
|
|
120
120
|
return a !== null ? a : j(e.type) || "Memo";
|
|
121
|
-
case
|
|
122
|
-
var
|
|
121
|
+
case C: {
|
|
122
|
+
var g = e, h = g._payload, f = g._init;
|
|
123
123
|
try {
|
|
124
|
-
return j(
|
|
124
|
+
return j(f(h));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,14 +129,14 @@ function yr() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var D = Object.assign,
|
|
132
|
+
var D = Object.assign, $ = 0, de, ve, pe, ge, he, me, Ee;
|
|
133
133
|
function ye() {
|
|
134
134
|
}
|
|
135
135
|
ye.__reactDisabledLog = !0;
|
|
136
|
-
function
|
|
136
|
+
function qe() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
de = console.log, ve = console.info, pe = console.warn, ge = console.error, he = console.group,
|
|
138
|
+
if ($ === 0) {
|
|
139
|
+
de = console.log, ve = console.info, pe = console.warn, ge = console.error, he = console.group, me = console.groupCollapsed, Ee = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -153,12 +153,12 @@ function yr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
$++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Be() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if ($--, $ === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
@@ -181,14 +181,14 @@ function yr() {
|
|
|
181
181
|
value: he
|
|
182
182
|
}),
|
|
183
183
|
groupCollapsed: D({}, e, {
|
|
184
|
-
value:
|
|
184
|
+
value: me
|
|
185
185
|
}),
|
|
186
186
|
groupEnd: D({}, e, {
|
|
187
|
-
value:
|
|
187
|
+
value: Ee
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
$ < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
var K = S.ReactCurrentDispatcher, X;
|
|
@@ -197,8 +197,8 @@ function yr() {
|
|
|
197
197
|
if (X === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var a =
|
|
200
|
+
} catch (g) {
|
|
201
|
+
var a = g.stack.trim().match(/\n( *(at )?)/);
|
|
202
202
|
X = a && a[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
@@ -207,8 +207,8 @@ function yr() {
|
|
|
207
207
|
}
|
|
208
208
|
var Q = !1, U;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
U = new
|
|
210
|
+
var ze = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
U = new ze();
|
|
212
212
|
}
|
|
213
213
|
function be(e, r) {
|
|
214
214
|
if (!e || Q)
|
|
@@ -220,33 +220,33 @@ function yr() {
|
|
|
220
220
|
}
|
|
221
221
|
var a;
|
|
222
222
|
Q = !0;
|
|
223
|
-
var
|
|
223
|
+
var g = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
225
|
var h;
|
|
226
|
-
h = K.current, K.current = null,
|
|
226
|
+
h = K.current, K.current = null, qe();
|
|
227
227
|
try {
|
|
228
228
|
if (r) {
|
|
229
|
-
var
|
|
229
|
+
var f = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(f.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
238
|
+
Reflect.construct(f, []);
|
|
239
239
|
} catch (P) {
|
|
240
240
|
a = P;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], f);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
245
|
+
f.call();
|
|
246
246
|
} catch (P) {
|
|
247
247
|
a = P;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(f.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
@@ -258,25 +258,25 @@ function yr() {
|
|
|
258
258
|
}
|
|
259
259
|
} catch (P) {
|
|
260
260
|
if (P && a && typeof P.stack == "string") {
|
|
261
|
-
for (var
|
|
261
|
+
for (var l = P.stack.split(`
|
|
262
262
|
`), _ = a.stack.split(`
|
|
263
|
-
`), E =
|
|
263
|
+
`), E = l.length - 1, y = _.length - 1; E >= 1 && y >= 0 && l[E] !== _[y]; )
|
|
264
264
|
y--;
|
|
265
265
|
for (; E >= 1 && y >= 0; E--, y--)
|
|
266
|
-
if (
|
|
266
|
+
if (l[E] !== _[y]) {
|
|
267
267
|
if (E !== 1 || y !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (E--, y--, y < 0 ||
|
|
270
|
-
var
|
|
271
|
-
` +
|
|
272
|
-
return e.displayName &&
|
|
269
|
+
if (E--, y--, y < 0 || l[E] !== _[y]) {
|
|
270
|
+
var O = `
|
|
271
|
+
` + l[E].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, O), O;
|
|
273
273
|
}
|
|
274
274
|
while (E >= 1 && y >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
Q = !1, K.current = h,
|
|
279
|
+
Q = !1, K.current = h, Be(), Error.prepareStackTrace = g;
|
|
280
280
|
}
|
|
281
281
|
var I = e ? e.displayName || e.name : "", De = I ? V(I) : "";
|
|
282
282
|
return typeof e == "function" && U.set(e, De), De;
|
|
@@ -284,7 +284,7 @@ function yr() {
|
|
|
284
284
|
function Ge(e, r, t) {
|
|
285
285
|
return be(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Je(e) {
|
|
288
288
|
var r = e.prototype;
|
|
289
289
|
return !!(r && r.isReactComponent);
|
|
290
290
|
}
|
|
@@ -292,7 +292,7 @@ function yr() {
|
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return be(e,
|
|
295
|
+
return be(e, Je(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
297
|
return V(e);
|
|
298
298
|
switch (e) {
|
|
@@ -303,14 +303,14 @@ function yr() {
|
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
306
|
+
case c:
|
|
307
307
|
return Ge(e.render);
|
|
308
308
|
case w:
|
|
309
309
|
return q(e.type, r, t);
|
|
310
|
-
case
|
|
311
|
-
var a = e,
|
|
310
|
+
case C: {
|
|
311
|
+
var a = e, g = a._payload, h = a._init;
|
|
312
312
|
try {
|
|
313
|
-
return q(h(
|
|
313
|
+
return q(h(g), r, t);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
@@ -318,43 +318,43 @@ function yr() {
|
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
320
|
var B = Object.prototype.hasOwnProperty, Re = {}, _e = S.ReactDebugCurrentFrame;
|
|
321
|
-
function
|
|
321
|
+
function z(e) {
|
|
322
322
|
if (e) {
|
|
323
323
|
var r = e._owner, t = q(e.type, e._source, r ? r.type : null);
|
|
324
324
|
_e.setExtraStackFrame(t);
|
|
325
325
|
} else
|
|
326
326
|
_e.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function He(e, r, t, a, g) {
|
|
329
329
|
{
|
|
330
330
|
var h = Function.call.bind(B);
|
|
331
|
-
for (var
|
|
332
|
-
if (h(e,
|
|
333
|
-
var
|
|
331
|
+
for (var f in e)
|
|
332
|
+
if (h(e, f)) {
|
|
333
|
+
var l = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var _ = Error((a || "React class") + ": " + t + " type `" +
|
|
335
|
+
if (typeof e[f] != "function") {
|
|
336
|
+
var _ = Error((a || "React class") + ": " + t + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw _.name = "Invariant Violation", _;
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
l = e[f](r, f, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
340
|
} catch (E) {
|
|
341
|
-
|
|
341
|
+
l = E;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
l && !(l instanceof Error) && (z(g), 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).", a || "React class", t, f, typeof l), z(null)), l instanceof Error && !(l.message in Re) && (Re[l.message] = !0, z(g), p("Failed %s type: %s", t, l.message), z(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
347
|
+
var Ke = Array.isArray;
|
|
348
348
|
function Z(e) {
|
|
349
|
-
return
|
|
349
|
+
return Ke(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Xe(e) {
|
|
352
352
|
{
|
|
353
353
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
354
|
return t;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Qe(e) {
|
|
358
358
|
try {
|
|
359
359
|
return we(e), !1;
|
|
360
360
|
} catch {
|
|
@@ -365,17 +365,17 @@ function yr() {
|
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
367
|
function Te(e) {
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
368
|
+
if (Qe(e))
|
|
369
|
+
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), we(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var L = S.ReactCurrentOwner, Ze = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
376
|
+
}, Ce, Oe, ee;
|
|
377
377
|
ee = {};
|
|
378
|
-
function
|
|
378
|
+
function er(e) {
|
|
379
379
|
if (B.call(e, "ref")) {
|
|
380
380
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
381
|
if (r && r.isReactWarning)
|
|
@@ -383,7 +383,7 @@ function yr() {
|
|
|
383
383
|
}
|
|
384
384
|
return e.ref !== void 0;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function rr(e) {
|
|
387
387
|
if (B.call(e, "key")) {
|
|
388
388
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
389
|
if (r && r.isReactWarning)
|
|
@@ -391,16 +391,16 @@ function yr() {
|
|
|
391
391
|
}
|
|
392
392
|
return e.key !== void 0;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
if (typeof e.ref == "string" &&
|
|
396
|
-
var t = j(
|
|
397
|
-
ee[t] || (
|
|
394
|
+
function tr(e, r) {
|
|
395
|
+
if (typeof e.ref == "string" && L.current && r && L.current.stateNode !== r) {
|
|
396
|
+
var t = j(L.current.type);
|
|
397
|
+
ee[t] || (p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(L.current.type), e.ref), ee[t] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function nr(e, r) {
|
|
401
401
|
{
|
|
402
402
|
var t = function() {
|
|
403
|
-
|
|
403
|
+
Ce || (Ce = !0, p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
404
404
|
};
|
|
405
405
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
406
|
get: t,
|
|
@@ -408,10 +408,10 @@ function yr() {
|
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function ar(e, r) {
|
|
412
412
|
{
|
|
413
413
|
var t = function() {
|
|
414
|
-
|
|
414
|
+
Oe || (Oe = !0, p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
415
415
|
};
|
|
416
416
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
417
|
get: t,
|
|
@@ -419,51 +419,51 @@ function yr() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var
|
|
423
|
-
var
|
|
422
|
+
var or = function(e, r, t, a, g, h, f) {
|
|
423
|
+
var l = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: o,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
429
429
|
ref: t,
|
|
430
|
-
props:
|
|
430
|
+
props: f,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
432
|
_owner: h
|
|
433
433
|
};
|
|
434
|
-
return
|
|
434
|
+
return l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
436
436
|
enumerable: !1,
|
|
437
437
|
writable: !0,
|
|
438
438
|
value: !1
|
|
439
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(l, "_self", {
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
443
|
value: a
|
|
444
|
-
}), Object.defineProperty(
|
|
444
|
+
}), Object.defineProperty(l, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
|
-
value:
|
|
449
|
-
}), Object.freeze && (Object.freeze(
|
|
448
|
+
value: g
|
|
449
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function ir(e, r, t, a, g) {
|
|
452
452
|
{
|
|
453
|
-
var h,
|
|
454
|
-
t !== void 0 && (Te(t),
|
|
453
|
+
var h, f = {}, l = null, _ = null;
|
|
454
|
+
t !== void 0 && (Te(t), l = "" + t), rr(r) && (Te(r.key), l = "" + r.key), er(r) && (_ = r.ref, tr(r, g));
|
|
455
455
|
for (h in r)
|
|
456
|
-
B.call(r, h) && !
|
|
456
|
+
B.call(r, h) && !Ze.hasOwnProperty(h) && (f[h] = r[h]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
458
|
var E = e.defaultProps;
|
|
459
459
|
for (h in E)
|
|
460
|
-
|
|
460
|
+
f[h] === void 0 && (f[h] = E[h]);
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
462
|
+
if (l || _) {
|
|
463
463
|
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
-
|
|
464
|
+
l && nr(f, y), _ && ar(f, y);
|
|
465
465
|
}
|
|
466
|
-
return
|
|
466
|
+
return or(e, l, _, g, a, L.current, f);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
var re = S.ReactCurrentOwner, Se = S.ReactDebugCurrentFrame;
|
|
@@ -491,7 +491,7 @@ Check the render method of \`` + e + "`.";
|
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function sr(e) {
|
|
495
495
|
{
|
|
496
496
|
if (e !== void 0) {
|
|
497
497
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
@@ -525,7 +525,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
525
525
|
return;
|
|
526
526
|
Pe[t] = !0;
|
|
527
527
|
var a = "";
|
|
528
|
-
e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + j(e._owner.type) + "."), F(e),
|
|
528
|
+
e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + j(e._owner.type) + "."), F(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), F(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
function xe(e, r) {
|
|
@@ -540,14 +540,14 @@ Check the top-level render call using <` + t + ">.");
|
|
|
540
540
|
else if (ne(e))
|
|
541
541
|
e._store && (e._store.validated = !0);
|
|
542
542
|
else if (e) {
|
|
543
|
-
var
|
|
544
|
-
if (typeof
|
|
545
|
-
for (var h =
|
|
546
|
-
ne(
|
|
543
|
+
var g = Y(e);
|
|
544
|
+
if (typeof g == "function" && g !== e.entries)
|
|
545
|
+
for (var h = g.call(e), f; !(f = h.next()).done; )
|
|
546
|
+
ne(f.value) && ke(f.value, r);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function lr(e) {
|
|
551
551
|
{
|
|
552
552
|
var r = e.type;
|
|
553
553
|
if (r == null || typeof r == "string")
|
|
@@ -555,7 +555,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
555
555
|
var t;
|
|
556
556
|
if (typeof r == "function")
|
|
557
557
|
t = r.propTypes;
|
|
558
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
558
|
+
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
|
|
559
559
|
// Inner props are checked in the reconciler.
|
|
560
560
|
r.$$typeof === w))
|
|
561
561
|
t = r.propTypes;
|
|
@@ -563,70 +563,70 @@ Check the top-level render call using <` + t + ">.");
|
|
|
563
563
|
return;
|
|
564
564
|
if (t) {
|
|
565
565
|
var a = j(r);
|
|
566
|
-
|
|
566
|
+
He(t, e.props, "prop", a, e);
|
|
567
567
|
} else if (r.PropTypes !== void 0 && !te) {
|
|
568
568
|
te = !0;
|
|
569
|
-
var
|
|
570
|
-
|
|
569
|
+
var g = j(r);
|
|
570
|
+
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", g || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
572
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function cr(e) {
|
|
576
576
|
{
|
|
577
577
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
578
578
|
var a = r[t];
|
|
579
579
|
if (a !== "children" && a !== "key") {
|
|
580
|
-
F(e),
|
|
580
|
+
F(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), F(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
e.ref !== null && (F(e),
|
|
584
|
+
e.ref !== null && (F(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function Ae(e, r, t, a,
|
|
587
|
+
function Ae(e, r, t, a, g, h) {
|
|
588
588
|
{
|
|
589
|
-
var
|
|
590
|
-
if (!
|
|
591
|
-
var
|
|
592
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
593
|
-
var _ =
|
|
594
|
-
_ ?
|
|
589
|
+
var f = Ve(e);
|
|
590
|
+
if (!f) {
|
|
591
|
+
var l = "";
|
|
592
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
593
|
+
var _ = sr(g);
|
|
594
|
+
_ ? l += _ : l += je();
|
|
595
595
|
var E;
|
|
596
|
-
e === null ? E = "null" : Z(e) ? E = "array" : e !== void 0 && e.$$typeof === o ? (E = "<" + (j(e.type) || "Unknown") + " />",
|
|
596
|
+
e === null ? E = "null" : Z(e) ? E = "array" : e !== void 0 && e.$$typeof === o ? (E = "<" + (j(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, l);
|
|
597
597
|
}
|
|
598
|
-
var y =
|
|
598
|
+
var y = ir(e, r, t, g, h);
|
|
599
599
|
if (y == null)
|
|
600
600
|
return y;
|
|
601
|
-
if (
|
|
602
|
-
var
|
|
603
|
-
if (
|
|
601
|
+
if (f) {
|
|
602
|
+
var O = r.children;
|
|
603
|
+
if (O !== void 0)
|
|
604
604
|
if (a)
|
|
605
|
-
if (Z(
|
|
606
|
-
for (var I = 0; I <
|
|
607
|
-
xe(
|
|
608
|
-
Object.freeze && Object.freeze(
|
|
605
|
+
if (Z(O)) {
|
|
606
|
+
for (var I = 0; I < O.length; I++)
|
|
607
|
+
xe(O[I], e);
|
|
608
|
+
Object.freeze && Object.freeze(O);
|
|
609
609
|
} else
|
|
610
|
-
|
|
610
|
+
p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
611
611
|
else
|
|
612
|
-
xe(
|
|
612
|
+
xe(O, e);
|
|
613
613
|
}
|
|
614
|
-
return e ===
|
|
614
|
+
return e === v ? cr(y) : lr(y), y;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function fr(e, r, t) {
|
|
618
618
|
return Ae(e, r, t, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function dr(e, r, t) {
|
|
621
621
|
return Ae(e, r, t, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
623
|
+
var vr = dr, pr = fr;
|
|
624
|
+
M.Fragment = v, M.jsx = vr, M.jsxs = pr;
|
|
625
|
+
}()), M;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ? oe.exports =
|
|
627
|
+
process.env.NODE_ENV === "production" ? oe.exports = yr() : oe.exports = br();
|
|
628
628
|
var k = oe.exports;
|
|
629
|
-
const H =
|
|
629
|
+
const H = gr({
|
|
630
630
|
axios: void 0,
|
|
631
631
|
children: void 0,
|
|
632
632
|
Navigate: void 0,
|
|
@@ -634,102 +634,102 @@ const H = pr({
|
|
|
634
634
|
translate: void 0,
|
|
635
635
|
useAuth: void 0,
|
|
636
636
|
useLocation: void 0
|
|
637
|
-
}),
|
|
637
|
+
}), wr = ({
|
|
638
638
|
axios: n,
|
|
639
639
|
children: o,
|
|
640
|
-
translate:
|
|
641
|
-
useAuth:
|
|
642
|
-
Outlet:
|
|
643
|
-
Navigate:
|
|
640
|
+
translate: d,
|
|
641
|
+
useAuth: v,
|
|
642
|
+
Outlet: i,
|
|
643
|
+
Navigate: s,
|
|
644
644
|
useLocation: u,
|
|
645
645
|
useGoogleTagManager: m
|
|
646
646
|
}) => {
|
|
647
|
-
const
|
|
647
|
+
const c = ie(
|
|
648
648
|
() => ({
|
|
649
649
|
axios: n,
|
|
650
|
-
Navigate:
|
|
651
|
-
Outlet:
|
|
652
|
-
translate:
|
|
653
|
-
useAuth:
|
|
650
|
+
Navigate: s,
|
|
651
|
+
Outlet: i,
|
|
652
|
+
translate: d,
|
|
653
|
+
useAuth: v,
|
|
654
654
|
useGoogleTagManager: m,
|
|
655
655
|
useLocation: u
|
|
656
656
|
}),
|
|
657
|
-
[
|
|
657
|
+
[s, i, n, d, v, m, u]
|
|
658
658
|
);
|
|
659
|
-
return /* @__PURE__ */ k.jsx(H.Provider, { value:
|
|
660
|
-
},
|
|
659
|
+
return /* @__PURE__ */ k.jsx(H.Provider, { value: c, children: o });
|
|
660
|
+
}, G = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Tr = ({
|
|
661
661
|
Fallback: n,
|
|
662
662
|
loginPath: o = "/login",
|
|
663
|
-
localStorageKey:
|
|
664
|
-
redirect401Path:
|
|
665
|
-
...
|
|
663
|
+
localStorageKey: d = "user",
|
|
664
|
+
redirect401Path: v = "/login",
|
|
665
|
+
...i
|
|
666
666
|
}) => {
|
|
667
667
|
var x, A, Y, S;
|
|
668
668
|
const {
|
|
669
|
-
axios:
|
|
670
|
-
useLocation: u =
|
|
671
|
-
useAuth: m =
|
|
672
|
-
Outlet:
|
|
673
|
-
Navigate: R =
|
|
674
|
-
} =
|
|
669
|
+
axios: s = i.axios,
|
|
670
|
+
useLocation: u = i.useLocation,
|
|
671
|
+
useAuth: m = i.useAuth,
|
|
672
|
+
Outlet: c = i.Outlet,
|
|
673
|
+
Navigate: R = i.Navigate
|
|
674
|
+
} = se(H);
|
|
675
675
|
if (m === void 0)
|
|
676
|
-
throw new Error(
|
|
676
|
+
throw new Error(G("useAuth"));
|
|
677
677
|
if (u === void 0)
|
|
678
|
-
throw new Error(
|
|
679
|
-
if (
|
|
680
|
-
throw new Error(
|
|
678
|
+
throw new Error(G("useLocation"));
|
|
679
|
+
if (c === void 0)
|
|
680
|
+
throw new Error(G("Outlet"));
|
|
681
681
|
if (R === void 0)
|
|
682
|
-
throw new Error(
|
|
683
|
-
const [b, w] =
|
|
682
|
+
throw new Error(G("Navigate"));
|
|
683
|
+
const [b, w] = hr(null), { isLogged: C } = m(), T = u();
|
|
684
684
|
return J(() => {
|
|
685
|
-
|
|
686
|
-
(
|
|
687
|
-
async (
|
|
685
|
+
s == null || s.interceptors.response.use(
|
|
686
|
+
(p) => p,
|
|
687
|
+
async (p) => {
|
|
688
688
|
var N;
|
|
689
|
-
return typeof
|
|
689
|
+
return typeof p == "object" && p && "response" in p && p.response && typeof p.response == "object" && "status" in p.response && p.response && typeof p.response == "object" && "status" in p.response && ((N = p == null ? void 0 : p.response) == null ? void 0 : N.status) === 401 && (s.defaults.headers.common.Authorization = null, localStorage.removeItem(d), w(v)), Promise.reject(p);
|
|
690
690
|
}
|
|
691
691
|
);
|
|
692
|
-
}, [
|
|
693
|
-
}, ae = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,
|
|
692
|
+
}, [s == null ? void 0 : s.defaults, s == null ? void 0 : s.interceptors.response, d, v]), C && !b ? /* @__PURE__ */ k.jsx(mr, { fallback: n, children: (A = (x = T.state) == null ? void 0 : x.from) != null && A.state && ((S = (Y = T.state) == null ? void 0 : Y.from) == null ? void 0 : S.pathname) === o ? /* @__PURE__ */ k.jsx(R, { to: T.state.from.state.from.pathname + T.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(c, {}) }) : /* @__PURE__ */ k.jsx(R, { to: o, state: { from: T }, replace: !0 });
|
|
693
|
+
}, ae = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Cr = ({ ...n }) => {
|
|
694
694
|
const {
|
|
695
695
|
useLocation: o = n.useLocation,
|
|
696
|
-
Outlet:
|
|
697
|
-
useGoogleTagManager:
|
|
698
|
-
} =
|
|
696
|
+
Outlet: d = n.Outlet,
|
|
697
|
+
useGoogleTagManager: v = n.useGoogleTagManager
|
|
698
|
+
} = se(H);
|
|
699
699
|
if (o === void 0)
|
|
700
700
|
throw new Error(ae("useLocation"));
|
|
701
|
-
if (
|
|
701
|
+
if (d === void 0)
|
|
702
702
|
throw new Error(ae("Outlet"));
|
|
703
|
-
if (
|
|
703
|
+
if (v === void 0)
|
|
704
704
|
throw new Error(ae("useGoogleTagManager"));
|
|
705
|
-
const { pathname:
|
|
705
|
+
const { pathname: i } = o(), { sendEvent: s } = v();
|
|
706
706
|
return Er(() => {
|
|
707
|
-
|
|
708
|
-
}, [
|
|
709
|
-
},
|
|
707
|
+
s({ event: "pageView", pathname: i });
|
|
708
|
+
}, [i, s]), /* @__PURE__ */ k.jsx(d, {});
|
|
709
|
+
}, Or = ({
|
|
710
710
|
axios: n,
|
|
711
711
|
baseURL: o,
|
|
712
|
-
userLocalStorageKey:
|
|
713
|
-
postContentType:
|
|
712
|
+
userLocalStorageKey: d = "user",
|
|
713
|
+
postContentType: v = "application/json"
|
|
714
714
|
}) => (J(() => {
|
|
715
715
|
if (!n.defaults)
|
|
716
716
|
return;
|
|
717
|
-
const
|
|
718
|
-
n.defaults.baseURL = o, n.defaults.headers.post["Content-Type"] =
|
|
717
|
+
const i = localStorage.getItem(d), s = i ? JSON.parse(i) : null, u = s && typeof s == "object" && "tokenType" in s && s.tokenType ? s.tokenType : null, m = s && typeof s == "object" && "accessToken" in s && s.accessToken ? s.accessToken : null, c = i ? `${u} ${m}` : null;
|
|
718
|
+
n.defaults.baseURL = o, n.defaults.headers.post["Content-Type"] = v, c && (n.defaults.headers.common.Authorization = c);
|
|
719
719
|
}, [
|
|
720
720
|
n.defaults,
|
|
721
721
|
n.defaults.baseURL,
|
|
722
722
|
n.defaults.headers.common,
|
|
723
723
|
n.defaults.headers.post,
|
|
724
724
|
o,
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
]), null),
|
|
725
|
+
v,
|
|
726
|
+
d
|
|
727
|
+
]), null), Sr = ({
|
|
728
728
|
i18n: n,
|
|
729
729
|
initReactI18next: o,
|
|
730
|
-
resources:
|
|
731
|
-
LanguageDetector:
|
|
732
|
-
}) => (n.use(
|
|
730
|
+
resources: d,
|
|
731
|
+
LanguageDetector: v
|
|
732
|
+
}) => (n.use(v).use(o).init({
|
|
733
733
|
debug: !1,
|
|
734
734
|
fallbackLng: "en",
|
|
735
735
|
interpolation: {
|
|
@@ -739,34 +739,34 @@ const H = pr({
|
|
|
739
739
|
react: {
|
|
740
740
|
useSuspense: !0
|
|
741
741
|
},
|
|
742
|
-
resources:
|
|
742
|
+
resources: d,
|
|
743
743
|
returnNull: !1
|
|
744
744
|
}).then(() => {
|
|
745
745
|
document.documentElement.lang !== n.resolvedLanguage && n.resolvedLanguage && document.documentElement.setAttribute("lang", n.resolvedLanguage);
|
|
746
|
-
}), n.on("languageChanged", (
|
|
747
|
-
document.documentElement.setAttribute("lang",
|
|
748
|
-
}), null),
|
|
746
|
+
}), n.on("languageChanged", (i) => {
|
|
747
|
+
document.documentElement.setAttribute("lang", i);
|
|
748
|
+
}), null), jr = ({ dsn: n, sentry: o }) => (J(() => {
|
|
749
749
|
o && process.env.NODE_ENV !== "development" && o.init({
|
|
750
750
|
dsn: n,
|
|
751
751
|
integrations: [new o.BrowserTracing()],
|
|
752
752
|
tracesSampleRate: 1
|
|
753
753
|
});
|
|
754
|
-
}, [n, o]), null),
|
|
755
|
-
const
|
|
754
|
+
}, [n, o]), null), Pr = ({ IMaskMixin: n, ...o }) => {
|
|
755
|
+
const d = ie(
|
|
756
756
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
757
|
-
() => n(({ TextField:
|
|
757
|
+
() => n(({ TextField: v, ...i }) => /* @__PURE__ */ k.jsx(v, { ...i })),
|
|
758
758
|
[n]
|
|
759
759
|
);
|
|
760
|
-
return /* @__PURE__ */ k.jsx(
|
|
761
|
-
},
|
|
760
|
+
return /* @__PURE__ */ k.jsx(d, { ...o });
|
|
761
|
+
}, kr = ({ mapbox: n, accessToken: o }) => (J(() => {
|
|
762
762
|
n && o && (n.accessToken = o);
|
|
763
|
-
}, [o, n]), null),
|
|
763
|
+
}, [o, n]), null), xr = ({
|
|
764
764
|
children: n,
|
|
765
765
|
defaultOptions: o,
|
|
766
|
-
QueryClient:
|
|
767
|
-
QueryClientProvider:
|
|
766
|
+
QueryClient: d,
|
|
767
|
+
QueryClientProvider: v
|
|
768
768
|
}) => {
|
|
769
|
-
const
|
|
769
|
+
const i = new d({
|
|
770
770
|
defaultOptions: {
|
|
771
771
|
queries: {
|
|
772
772
|
refetchOnWindowFocus: !1,
|
|
@@ -775,52 +775,59 @@ const H = pr({
|
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
});
|
|
778
|
-
return /* @__PURE__ */ k.jsx(
|
|
779
|
-
},
|
|
780
|
-
const { unknownErrorTranslationKey: o = "error.unknownError" } = n || {}, { translate:
|
|
781
|
-
return { printError:
|
|
782
|
-
(
|
|
783
|
-
var m,
|
|
784
|
-
const
|
|
785
|
-
return
|
|
778
|
+
return /* @__PURE__ */ k.jsx(v, { client: i, children: n });
|
|
779
|
+
}, Ar = (n) => {
|
|
780
|
+
const { unknownErrorTranslationKey: o = "error.unknownError" } = n || {}, { translate: d = n == null ? void 0 : n.translate } = se(H);
|
|
781
|
+
return { printError: Le(
|
|
782
|
+
(i) => {
|
|
783
|
+
var m, c, R, b, w, C, T, x, A;
|
|
784
|
+
const s = d ? d(o) : "Unknown error", { response: u } = i || {};
|
|
785
|
+
return i != null && i.reason ? String(i.reason) : (m = u == null ? void 0 : u.data) != null && m.reason ? String(u.data.reason) : (c = u == null ? void 0 : u.data) != null && c.message ? String(u.data.message) : (b = (R = u == null ? void 0 : u.data) == null ? void 0 : R.detail) != null && b.length && Array.isArray((w = u == null ? void 0 : u.data) == null ? void 0 : w.detail) && ((T = (C = u == null ? void 0 : u.data) == null ? void 0 : C.detail[0]) != null && T.msg) && typeof ((A = (x = u == null ? void 0 : u.data) == null ? void 0 : x.detail[0]) == null ? void 0 : A.msg) == "string" ? String(u.data.detail[0].msg) : s;
|
|
786
786
|
},
|
|
787
|
-
[
|
|
787
|
+
[d, o]
|
|
788
788
|
) };
|
|
789
|
-
},
|
|
789
|
+
}, Dr = ({
|
|
790
790
|
data: n,
|
|
791
791
|
fetchNextPage: o,
|
|
792
|
-
isFetchingNextPage:
|
|
793
|
-
isInitialLoading:
|
|
794
|
-
isLoading:
|
|
795
|
-
enabled:
|
|
792
|
+
isFetchingNextPage: d,
|
|
793
|
+
isInitialLoading: v,
|
|
794
|
+
isLoading: i,
|
|
795
|
+
enabled: s = !0
|
|
796
796
|
}) => {
|
|
797
|
-
const u =
|
|
798
|
-
async (
|
|
799
|
-
|
|
797
|
+
const u = Le(
|
|
798
|
+
async (c) => {
|
|
799
|
+
d || !s || await o({ pageParam: (c == null ? void 0 : c.pageParam) || c.visibleRowsCount });
|
|
800
800
|
},
|
|
801
|
-
[
|
|
801
|
+
[s, o, d]
|
|
802
802
|
), m = ie(() => {
|
|
803
803
|
if (n)
|
|
804
|
-
return n.pages.reduce((
|
|
804
|
+
return n.pages.reduce((c, R) => [...c, ...R], []);
|
|
805
805
|
}, [n]);
|
|
806
806
|
return {
|
|
807
807
|
fetchNextPageOnRowsScrollEnd: u,
|
|
808
|
-
isLoading:
|
|
809
|
-
loadingVariant:
|
|
808
|
+
isLoading: d || i,
|
|
809
|
+
loadingVariant: v ? "skeleton" : "linear",
|
|
810
810
|
rows: m
|
|
811
811
|
};
|
|
812
|
+
}, We = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), Rr = (n) => {
|
|
813
|
+
const v = n.split("/").filter((i) => i.length > 0).map((i) => i.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((c) => We(c)).join("")).join("");
|
|
814
|
+
return v.charAt(0).toLowerCase() + v.slice(1);
|
|
815
|
+
}, Fr = (n, o, d) => {
|
|
816
|
+
const v = Rr(o), i = We(d);
|
|
817
|
+
return `${v}${i}`;
|
|
812
818
|
};
|
|
813
819
|
export {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
820
|
+
Or as AxiosConfig,
|
|
821
|
+
Cr as GTMSendPageView,
|
|
822
|
+
Sr as I18nConfig,
|
|
817
823
|
H as InjectDependenciesContext,
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
824
|
+
wr as InjectDependenciesProvider,
|
|
825
|
+
kr as MapBoxConfig,
|
|
826
|
+
Pr as MaskTextField,
|
|
827
|
+
xr as QueryClientConfigProvider,
|
|
828
|
+
Tr as RequireAuth,
|
|
829
|
+
jr as SentryConfig,
|
|
830
|
+
Fr as getOrvalOperationName,
|
|
831
|
+
Dr as useInfiniteDataGrid,
|
|
832
|
+
Ar as useResponseError
|
|
826
833
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(R,
|
|
1
|
+
(function(R,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],m):(R=typeof globalThis<"u"?globalThis:R||self,m(R["@tracktor/shared-module"]={},R.React))})(this,function(R,m){"use strict";var Z={exports:{}},W={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var se;function Le(){if(se)return W;se=1;var n=m,o=Symbol.for("react.element"),d=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(E,l,w){var _,C={},S=null,O=null;w!==void 0&&(S=""+w),l.key!==void 0&&(S=""+l.key),l.ref!==void 0&&(O=l.ref);for(_ in l)v.call(l,_)&&!s.hasOwnProperty(_)&&(C[_]=l[_]);if(E&&E.defaultProps)for(_ in l=E.defaultProps,l)C[_]===void 0&&(C[_]=l[_]);return{$$typeof:o,type:E,key:S,ref:O,props:C,_owner:i.current}}return W.Fragment=d,W.jsx=u,W.jsxs=u,W}var N={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+ee+e}}var re=!1,H;{var
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var ue;function Me(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var n=m,o=Symbol.for("react.element"),d=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),E=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var r=D&&e[D]||e[F];return typeof r=="function"?r:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];le("error",e,t)}}function le(e,r,t){{var a=k.ReactDebugCurrentFrame,g=a.getStackAddendum();g!==""&&(r+="%s",t=t.concat([g]));var h=t.map(function(f){return String(f)});h.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,h)}}var fe=!1,z=!1,Ze=!1,qe=!1,$e=!1,de;de=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===v||e===s||$e||e===i||e===w||e===_||qe||e===O||fe||z||Ze||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===C||e.$$typeof===u||e.$$typeof===E||e.$$typeof===l||e.$$typeof===de||e.getModuleId!==void 0))}function rr(e,r,t){var a=e.displayName;if(a)return a;var g=r.displayName||r.name||"";return g!==""?t+"("+g+")":t}function ve(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&p("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 v:return"Fragment";case d:return"Portal";case s:return"Profiler";case i:return"StrictMode";case w:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return ve(r)+".Consumer";case u:var t=e;return ve(t._context)+".Provider";case l:return rr(e,e.render,"ForwardRef");case C:var a=e.displayName||null;return a!==null?a:x(e.type)||"Memo";case S:{var g=e,h=g._payload,f=g._init;try{return x(f(h))}catch{return null}}}return null}var I=Object.assign,V=0,pe,ge,he,me,Ee,ye,be;function Re(){}Re.__reactDisabledLog=!0;function tr(){{if(V===0){pe=console.log,ge=console.info,he=console.warn,me=console.error,Ee=console.group,ye=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function nr(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:pe}),info:I({},e,{value:ge}),warn:I({},e,{value:he}),error:I({},e,{value:me}),group:I({},e,{value:Ee}),groupCollapsed:I({},e,{value:ye}),groupEnd:I({},e,{value:be})})}V<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=k.ReactCurrentDispatcher,ee;function J(e,r,t){{if(ee===void 0)try{throw Error()}catch(g){var a=g.stack.trim().match(/\n( *(at )?)/);ee=a&&a[1]||""}return`
|
|
18
|
+
`+ee+e}}var re=!1,H;{var ar=typeof WeakMap=="function"?WeakMap:Map;H=new ar}function _e(e,r){if(!e||re)return"";{var t=H.get(e);if(t!==void 0)return t}var a;re=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var h;h=$.current,$.current=null,tr();try{if(r){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(A){a=A}Reflect.construct(e,[],f)}else{try{f.call()}catch(A){a=A}e.call(f.prototype)}}else{try{throw Error()}catch(A){a=A}e()}}catch(A){if(A&&a&&typeof A.stack=="string"){for(var c=A.stack.split(`
|
|
19
|
+
`),T=a.stack.split(`
|
|
20
|
+
`),y=c.length-1,b=T.length-1;y>=1&&b>=0&&c[y]!==T[b];)b--;for(;y>=1&&b>=0;y--,b--)if(c[y]!==T[b]){if(y!==1||b!==1)do if(y--,b--,b<0||c[y]!==T[b]){var j=`
|
|
21
|
+
`+c[y].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,j),j}while(y>=1&&b>=0);break}}}finally{re=!1,$.current=h,nr(),Error.prepareStackTrace=g}var M=e?e.displayName||e.name:"",Ie=M?J(M):"";return typeof e=="function"&&H.set(e,Ie),Ie}function or(e,r,t){return _e(e,!1)}function ir(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,ir(e));if(typeof e=="string")return J(e);switch(e){case w:return J("Suspense");case _:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return or(e.render);case C:return K(e.type,r,t);case S:{var a=e,g=a._payload,h=a._init;try{return K(h(g),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,we={},Te=k.ReactDebugCurrentFrame;function Q(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function sr(e,r,t,a,g){{var h=Function.call.bind(X);for(var f in e)if(h(e,f)){var c=void 0;try{if(typeof e[f]!="function"){var T=Error((a||"React class")+": "+t+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}c=e[f](r,f,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){c=y}c&&!(c instanceof Error)&&(Q(g),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).",a||"React class",t,f,typeof c),Q(null)),c instanceof Error&&!(c.message in we)&&(we[c.message]=!0,Q(g),p("Failed %s type: %s",t,c.message),Q(null))}}}var ur=Array.isArray;function te(e){return ur(e)}function cr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function lr(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function Oe(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(e)),Ce(e)}var U=k.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Se,je,ne;ne={};function dr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function vr(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function pr(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=x(U.current.type);ne[t]||(p('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(U.current.type),e.ref),ne[t]=!0)}}function gr(e,r){{var t=function(){Se||(Se=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function hr(e,r){{var t=function(){je||(je=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var mr=function(e,r,t,a,g,h,f){var c={$$typeof:o,type:e,key:r,ref:t,props:f,_owner:h};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function Er(e,r,t,a,g){{var h,f={},c=null,T=null;t!==void 0&&(Oe(t),c=""+t),vr(r)&&(Oe(r.key),c=""+r.key),dr(r)&&(T=r.ref,pr(r,g));for(h in r)X.call(r,h)&&!fr.hasOwnProperty(h)&&(f[h]=r[h]);if(e&&e.defaultProps){var y=e.defaultProps;for(h in y)f[h]===void 0&&(f[h]=y[h])}if(c||T){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&gr(f,b),T&&hr(f,b)}return mr(e,c,T,g,a,U.current,f)}}var ae=k.ReactCurrentOwner,Pe=k.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function ke(){{if(ae.current){var e=x(ae.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function yr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var
|
|
25
|
+
Check your code at `+r+":"+t+"."}return""}}var xe={};function br(e){{var r=ke();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ae(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=br(r);if(xe[t])return;xe[t]=!0;var a="";e&&e._owner&&e._owner!==ae.current&&(a=" It was passed a child from "+x(e._owner.type)+"."),L(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),L(null)}}function De(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var a=e[t];ie(a)&&Ae(a,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var g=G(e);if(typeof g=="function"&&g!==e.entries)for(var h=g.call(e),f;!(f=h.next()).done;)ie(f.value)&&Ae(f.value,r)}}}function Rr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===C))t=r.propTypes;else return;if(t){var a=x(r);sr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var g=x(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _r(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){L(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}function Fe(e,r,t,a,g,h){{var f=er(e);if(!f){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var T=yr(g);T?c+=T:c+=ke();var y;e===null?y="null":te(e)?y="array":e!==void 0&&e.$$typeof===o?(y="<"+(x(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,c)}var b=Er(e,r,t,g,h);if(b==null)return b;if(f){var j=r.children;if(j!==void 0)if(a)if(te(j)){for(var M=0;M<j.length;M++)De(j[M],e);Object.freeze&&Object.freeze(j)}else p("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 De(j,e)}return e===v?_r(b):Rr(b),b}}function wr(e,r,t){return Fe(e,r,t,!0)}function Tr(e,r,t){return Fe(e,r,t,!1)}var Cr=Tr,Or=wr;N.Fragment=v,N.jsx=Cr,N.jsxs=Or}()),N}process.env.NODE_ENV==="production"?Z.exports=Le():Z.exports=Me();var P=Z.exports;const Y=m.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),We=({axios:n,children:o,translate:d,useAuth:v,Outlet:i,Navigate:s,useLocation:u,useGoogleTagManager:E})=>{const l=m.useMemo(()=>({axios:n,Navigate:s,Outlet:i,translate:d,useAuth:v,useGoogleTagManager:E,useLocation:u}),[s,i,n,d,v,E,u]);return P.jsx(Y.Provider,{value:l,children:o})},B=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ne=({Fallback:n,loginPath:o="/login",localStorageKey:d="user",redirect401Path:v="/login",...i})=>{var D,F,G,k;const{axios:s=i.axios,useLocation:u=i.useLocation,useAuth:E=i.useAuth,Outlet:l=i.Outlet,Navigate:w=i.Navigate}=m.useContext(Y);if(E===void 0)throw new Error(B("useAuth"));if(u===void 0)throw new Error(B("useLocation"));if(l===void 0)throw new Error(B("Outlet"));if(w===void 0)throw new Error(B("Navigate"));const[_,C]=m.useState(null),{isLogged:S}=E(),O=u();return m.useLayoutEffect(()=>{s==null||s.interceptors.response.use(p=>p,async p=>{var z;return typeof p=="object"&&p&&"response"in p&&p.response&&typeof p.response=="object"&&"status"in p.response&&p.response&&typeof p.response=="object"&&"status"in p.response&&((z=p==null?void 0:p.response)==null?void 0:z.status)===401&&(s.defaults.headers.common.Authorization=null,localStorage.removeItem(d),C(v)),Promise.reject(p)})},[s==null?void 0:s.defaults,s==null?void 0:s.interceptors.response,d,v]),S&&!_?P.jsx(m.Suspense,{fallback:n,children:(F=(D=O.state)==null?void 0:D.from)!=null&&F.state&&((k=(G=O.state)==null?void 0:G.from)==null?void 0:k.pathname)===o?P.jsx(w,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):P.jsx(l,{})}):P.jsx(w,{to:o,state:{from:O},replace:!0})},q=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({...n})=>{const{useLocation:o=n.useLocation,Outlet:d=n.Outlet,useGoogleTagManager:v=n.useGoogleTagManager}=m.useContext(Y);if(o===void 0)throw new Error(q("useLocation"));if(d===void 0)throw new Error(q("Outlet"));if(v===void 0)throw new Error(q("useGoogleTagManager"));const{pathname:i}=o(),{sendEvent:s}=v();return m.useEffect(()=>{s({event:"pageView",pathname:i})},[i,s]),P.jsx(d,{})},Ve=({axios:n,baseURL:o,userLocalStorageKey:d="user",postContentType:v="application/json"})=>(m.useLayoutEffect(()=>{if(!n.defaults)return;const i=localStorage.getItem(d),s=i?JSON.parse(i):null,u=s&&typeof s=="object"&&"tokenType"in s&&s.tokenType?s.tokenType:null,E=s&&typeof s=="object"&&"accessToken"in s&&s.accessToken?s.accessToken:null,l=i?`${u} ${E}`:null;n.defaults.baseURL=o,n.defaults.headers.post["Content-Type"]=v,l&&(n.defaults.headers.common.Authorization=l)},[n.defaults,n.defaults.baseURL,n.defaults.headers.common,n.defaults.headers.post,o,v,d]),null),Ue=({i18n:n,initReactI18next:o,resources:d,LanguageDetector:v})=>(n.use(v).use(o).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:d,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)}),null),Be=({dsn:n,sentry:o})=>(m.useLayoutEffect(()=>{o&&process.env.NODE_ENV!=="development"&&o.init({dsn:n,integrations:[new o.BrowserTracing],tracesSampleRate:1})},[n,o]),null),Ge=({IMaskMixin:n,...o})=>{const d=m.useMemo(()=>n(({TextField:v,...i})=>P.jsx(v,{...i})),[n]);return P.jsx(d,{...o})},ze=({mapbox:n,accessToken:o})=>(m.useLayoutEffect(()=>{n&&o&&(n.accessToken=o)},[o,n]),null),Je=({children:n,defaultOptions:o,QueryClient:d,QueryClientProvider:v})=>{const i=new d({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...o}}});return P.jsx(v,{client:i,children:n})},He=n=>{const{unknownErrorTranslationKey:o="error.unknownError"}=n||{},{translate:d=n==null?void 0:n.translate}=m.useContext(Y);return{printError:m.useCallback(i=>{var E,l,w,_,C,S,O,D,F;const s=d?d(o):"Unknown error",{response:u}=i||{};return i!=null&&i.reason?String(i.reason):(E=u==null?void 0:u.data)!=null&&E.reason?String(u.data.reason):(l=u==null?void 0:u.data)!=null&&l.message?String(u.data.message):(_=(w=u==null?void 0:u.data)==null?void 0:w.detail)!=null&&_.length&&Array.isArray((C=u==null?void 0:u.data)==null?void 0:C.detail)&&((O=(S=u==null?void 0:u.data)==null?void 0:S.detail[0])!=null&&O.msg)&&typeof((F=(D=u==null?void 0:u.data)==null?void 0:D.detail[0])==null?void 0:F.msg)=="string"?String(u.data.detail[0].msg):s},[d,o])}},Ke=({data:n,fetchNextPage:o,isFetchingNextPage:d,isInitialLoading:v,isLoading:i,enabled:s=!0})=>{const u=m.useCallback(async l=>{d||!s||await o({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[s,o,d]),E=m.useMemo(()=>{if(n)return n.pages.reduce((l,w)=>[...l,...w],[])},[n]);return{fetchNextPageOnRowsScrollEnd:u,isLoading:d||i,loadingVariant:v?"skeleton":"linear",rows:E}},ce=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),Xe=n=>{const v=n.split("/").filter(i=>i.length>0).map(i=>i.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(l=>ce(l)).join("")).join("");return v.charAt(0).toLowerCase()+v.slice(1)},Qe=(n,o,d)=>{const v=Xe(o),i=ce(d);return`${v}${i}`};R.AxiosConfig=Ve,R.GTMSendPageView=Ye,R.I18nConfig=Ue,R.InjectDependenciesContext=Y,R.InjectDependenciesProvider=We,R.MapBoxConfig=ze,R.MaskTextField=Ge,R.QueryClientConfigProvider=Je,R.RequireAuth=Ne,R.SentryConfig=Be,R.getOrvalOperationName=Qe,R.useInfiniteDataGrid=Ke,R.useResponseError=He,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|