@tracktor/shared-module 0.23.4 → 1.0.0-beta.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 +3 -2
- package/README.md +30 -37
- package/dist/components/Utils/AxiosConfig.d.ts +2 -19
- package/dist/components/Utils/DaysJSConfig.d.ts +6 -0
- package/dist/components/Utils/GTMSendPageView.d.ts +1 -17
- package/dist/components/Utils/I18nConfig.d.ts +4 -28
- package/dist/components/Utils/MapBoxConfig.d.ts +2 -8
- package/dist/components/Utils/RequireAuth.d.ts +10 -28
- package/dist/components/Utils/SentryConfig.d.ts +2 -73
- package/dist/config/orval/mutator/axiosCustomInstance.d.ts +1 -1
- package/dist/config/orval/mutator/axiosCustomInstance.ts +0 -1
- package/dist/context/InjectDependenciesProvider.d.ts +3 -54
- package/dist/context/QueryClientConfigProvider.d.ts +4 -11
- package/dist/hooks/useAdapter/useAdapter.d.ts +5 -0
- package/dist/hooks/useAuth/useAuth.d.ts +1 -14
- package/dist/hooks/useResponseError/useResponseError.d.ts +0 -6
- package/dist/main.d.ts +2 -0
- package/dist/main.js +494 -544
- package/dist/main.umd.cjs +10 -10
- package/dist/utils/adapter/dateAdapter.d.ts +8 -0
- package/dist/utils/adapter/filePathAdapter.d.ts +1 -1
- package/dist/utils/adapter/index.d.ts +1 -1
- package/package.json +55 -2
package/dist/main.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import Ne, {
|
|
2
|
-
|
|
1
|
+
import Ne, { useState as br, useRef as Rr, useLayoutEffect as _r, Suspense as Cr, useEffect as Le, createContext as Tr, useMemo as ae, useContext as We, useCallback as te } from "react";
|
|
2
|
+
import k from "axios";
|
|
3
|
+
import { useLocation as oe, Navigate as ke, Outlet as Ye, createRoutesFromChildren as Sr, matchRoutes as wr, useNavigationType as Or } from "react-router-dom";
|
|
4
|
+
import { useGoogleTagManager as xr } from "@tracktor/react-google-tag-manager";
|
|
5
|
+
import I, { t as jr } from "i18next";
|
|
6
|
+
import Pr from "i18next-browser-languagedetector";
|
|
7
|
+
import { initReactI18next as Ar } from "react-i18next";
|
|
8
|
+
import * as re from "@sentry/react";
|
|
9
|
+
import $e from "mapbox-gl";
|
|
10
|
+
import { QueryClientProvider as kr } from "@tanstack/react-query";
|
|
11
|
+
import $r from "dayjs";
|
|
12
|
+
var ne = { exports: {} }, Y = {};
|
|
3
13
|
/**
|
|
4
14
|
* @license React
|
|
5
15
|
* react-jsx-runtime.development.js
|
|
@@ -9,91 +19,91 @@ var ue = { exports: {} }, M = {};
|
|
|
9
19
|
* This source code is licensed under the MIT license found in the
|
|
10
20
|
* LICENSE file in the root directory of this source tree.
|
|
11
21
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
var
|
|
16
|
-
function
|
|
22
|
+
var De;
|
|
23
|
+
function Dr() {
|
|
24
|
+
return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
|
|
25
|
+
var a = Ne, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), h = Symbol.iterator, N = "@@iterator";
|
|
26
|
+
function ue(e) {
|
|
17
27
|
if (e === null || typeof e != "object")
|
|
18
28
|
return null;
|
|
19
|
-
var r =
|
|
29
|
+
var r = h && e[h] || e[N];
|
|
20
30
|
return typeof r == "function" ? r : null;
|
|
21
31
|
}
|
|
22
|
-
var
|
|
23
|
-
function
|
|
32
|
+
var x = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
33
|
+
function C(e) {
|
|
24
34
|
{
|
|
25
|
-
for (var r = arguments.length,
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
36
|
+
t[u - 1] = arguments[u];
|
|
37
|
+
Me("error", e, t);
|
|
28
38
|
}
|
|
29
39
|
}
|
|
30
|
-
function
|
|
40
|
+
function Me(e, r, t) {
|
|
31
41
|
{
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
return String(
|
|
42
|
+
var u = x.ReactDebugCurrentFrame, v = u.getStackAddendum();
|
|
43
|
+
v !== "" && (r += "%s", t = t.concat([v]));
|
|
44
|
+
var p = t.map(function(d) {
|
|
45
|
+
return String(d);
|
|
36
46
|
});
|
|
37
|
-
|
|
47
|
+
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
50
|
+
var Ve = !1, Ue = !1, qe = !1, ze = !1, Be = !1, se;
|
|
51
|
+
se = Symbol.for("react.module.reference");
|
|
52
|
+
function Ge(e) {
|
|
53
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === E || Be || e === m || e === R || e === g || ze || e === O || Ve || Ue || qe || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === _ || e.$$typeof === o || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
|
|
44
54
|
// types supported by any Flight configuration anywhere since
|
|
45
55
|
// we don't know which Flight build this will end up being used
|
|
46
56
|
// with.
|
|
47
|
-
e.$$typeof ===
|
|
57
|
+
e.$$typeof === se || e.getModuleId !== void 0));
|
|
48
58
|
}
|
|
49
|
-
function
|
|
50
|
-
var
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
53
|
-
var
|
|
54
|
-
return
|
|
59
|
+
function Je(e, r, t) {
|
|
60
|
+
var u = e.displayName;
|
|
61
|
+
if (u)
|
|
62
|
+
return u;
|
|
63
|
+
var v = r.displayName || r.name || "";
|
|
64
|
+
return v !== "" ? t + "(" + v + ")" : t;
|
|
55
65
|
}
|
|
56
|
-
function
|
|
66
|
+
function le(e) {
|
|
57
67
|
return e.displayName || "Context";
|
|
58
68
|
}
|
|
59
|
-
function
|
|
69
|
+
function j(e) {
|
|
60
70
|
if (e == null)
|
|
61
71
|
return null;
|
|
62
|
-
if (typeof e.tag == "number" &&
|
|
72
|
+
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")
|
|
63
73
|
return e.displayName || e.name || null;
|
|
64
74
|
if (typeof e == "string")
|
|
65
75
|
return e;
|
|
66
76
|
switch (e) {
|
|
67
|
-
case
|
|
77
|
+
case s:
|
|
68
78
|
return "Fragment";
|
|
69
79
|
case i:
|
|
70
80
|
return "Portal";
|
|
71
|
-
case
|
|
81
|
+
case E:
|
|
72
82
|
return "Profiler";
|
|
73
|
-
case
|
|
83
|
+
case m:
|
|
74
84
|
return "StrictMode";
|
|
75
|
-
case
|
|
85
|
+
case R:
|
|
76
86
|
return "Suspense";
|
|
77
|
-
case
|
|
87
|
+
case g:
|
|
78
88
|
return "SuspenseList";
|
|
79
89
|
}
|
|
80
90
|
if (typeof e == "object")
|
|
81
91
|
switch (e.$$typeof) {
|
|
82
|
-
case
|
|
92
|
+
case c:
|
|
83
93
|
var r = e;
|
|
84
|
-
return
|
|
85
|
-
case
|
|
86
|
-
var
|
|
87
|
-
return
|
|
94
|
+
return le(r) + ".Consumer";
|
|
95
|
+
case o:
|
|
96
|
+
var t = e;
|
|
97
|
+
return le(t._context) + ".Provider";
|
|
88
98
|
case l:
|
|
89
|
-
return
|
|
90
|
-
case
|
|
91
|
-
var
|
|
92
|
-
return
|
|
93
|
-
case
|
|
94
|
-
var
|
|
99
|
+
return Je(e, e.render, "ForwardRef");
|
|
100
|
+
case _:
|
|
101
|
+
var u = e.displayName || null;
|
|
102
|
+
return u !== null ? u : j(e.type) || "Memo";
|
|
103
|
+
case S: {
|
|
104
|
+
var v = e, p = v._payload, d = v._init;
|
|
95
105
|
try {
|
|
96
|
-
return
|
|
106
|
+
return j(d(p));
|
|
97
107
|
} catch {
|
|
98
108
|
return null;
|
|
99
109
|
}
|
|
@@ -101,18 +111,18 @@ function br() {
|
|
|
101
111
|
}
|
|
102
112
|
return null;
|
|
103
113
|
}
|
|
104
|
-
var
|
|
105
|
-
function
|
|
114
|
+
var $ = Object.assign, L = 0, ce, fe, de, ve, pe, me, ge;
|
|
115
|
+
function he() {
|
|
106
116
|
}
|
|
107
|
-
|
|
108
|
-
function
|
|
117
|
+
he.__reactDisabledLog = !0;
|
|
118
|
+
function Xe() {
|
|
109
119
|
{
|
|
110
|
-
if (
|
|
111
|
-
|
|
120
|
+
if (L === 0) {
|
|
121
|
+
ce = console.log, fe = console.info, de = console.warn, ve = console.error, pe = console.group, me = console.groupCollapsed, ge = console.groupEnd;
|
|
112
122
|
var e = {
|
|
113
123
|
configurable: !0,
|
|
114
124
|
enumerable: !0,
|
|
115
|
-
value:
|
|
125
|
+
value: he,
|
|
116
126
|
writable: !0
|
|
117
127
|
};
|
|
118
128
|
Object.defineProperties(console, {
|
|
@@ -125,283 +135,283 @@ function br() {
|
|
|
125
135
|
groupEnd: e
|
|
126
136
|
});
|
|
127
137
|
}
|
|
128
|
-
|
|
138
|
+
L++;
|
|
129
139
|
}
|
|
130
140
|
}
|
|
131
|
-
function
|
|
141
|
+
function He() {
|
|
132
142
|
{
|
|
133
|
-
if (
|
|
143
|
+
if (L--, L === 0) {
|
|
134
144
|
var e = {
|
|
135
145
|
configurable: !0,
|
|
136
146
|
enumerable: !0,
|
|
137
147
|
writable: !0
|
|
138
148
|
};
|
|
139
149
|
Object.defineProperties(console, {
|
|
140
|
-
log:
|
|
141
|
-
value:
|
|
150
|
+
log: $({}, e, {
|
|
151
|
+
value: ce
|
|
142
152
|
}),
|
|
143
|
-
info:
|
|
144
|
-
value:
|
|
153
|
+
info: $({}, e, {
|
|
154
|
+
value: fe
|
|
145
155
|
}),
|
|
146
|
-
warn:
|
|
147
|
-
value:
|
|
156
|
+
warn: $({}, e, {
|
|
157
|
+
value: de
|
|
148
158
|
}),
|
|
149
|
-
error:
|
|
150
|
-
value:
|
|
159
|
+
error: $({}, e, {
|
|
160
|
+
value: ve
|
|
151
161
|
}),
|
|
152
|
-
group:
|
|
153
|
-
value:
|
|
162
|
+
group: $({}, e, {
|
|
163
|
+
value: pe
|
|
154
164
|
}),
|
|
155
|
-
groupCollapsed:
|
|
156
|
-
value:
|
|
165
|
+
groupCollapsed: $({}, e, {
|
|
166
|
+
value: me
|
|
157
167
|
}),
|
|
158
|
-
groupEnd:
|
|
159
|
-
value:
|
|
168
|
+
groupEnd: $({}, e, {
|
|
169
|
+
value: ge
|
|
160
170
|
})
|
|
161
171
|
});
|
|
162
172
|
}
|
|
163
|
-
|
|
173
|
+
L < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
164
174
|
}
|
|
165
175
|
}
|
|
166
|
-
var
|
|
167
|
-
function
|
|
176
|
+
var G = x.ReactCurrentDispatcher, J;
|
|
177
|
+
function V(e, r, t) {
|
|
168
178
|
{
|
|
169
|
-
if (
|
|
179
|
+
if (J === void 0)
|
|
170
180
|
try {
|
|
171
181
|
throw Error();
|
|
172
|
-
} catch (
|
|
173
|
-
var
|
|
174
|
-
|
|
182
|
+
} catch (v) {
|
|
183
|
+
var u = v.stack.trim().match(/\n( *(at )?)/);
|
|
184
|
+
J = u && u[1] || "";
|
|
175
185
|
}
|
|
176
186
|
return `
|
|
177
|
-
` +
|
|
187
|
+
` + J + e;
|
|
178
188
|
}
|
|
179
189
|
}
|
|
180
|
-
var
|
|
190
|
+
var X = !1, U;
|
|
181
191
|
{
|
|
182
|
-
var
|
|
183
|
-
|
|
192
|
+
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
|
|
193
|
+
U = new Ke();
|
|
184
194
|
}
|
|
185
|
-
function
|
|
186
|
-
if (!e ||
|
|
195
|
+
function ye(e, r) {
|
|
196
|
+
if (!e || X)
|
|
187
197
|
return "";
|
|
188
198
|
{
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
return
|
|
199
|
+
var t = U.get(e);
|
|
200
|
+
if (t !== void 0)
|
|
201
|
+
return t;
|
|
192
202
|
}
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
var
|
|
203
|
+
var u;
|
|
204
|
+
X = !0;
|
|
205
|
+
var v = Error.prepareStackTrace;
|
|
196
206
|
Error.prepareStackTrace = void 0;
|
|
197
|
-
var
|
|
198
|
-
|
|
207
|
+
var p;
|
|
208
|
+
p = G.current, G.current = null, Xe();
|
|
199
209
|
try {
|
|
200
210
|
if (r) {
|
|
201
|
-
var
|
|
211
|
+
var d = function() {
|
|
202
212
|
throw Error();
|
|
203
213
|
};
|
|
204
|
-
if (Object.defineProperty(
|
|
214
|
+
if (Object.defineProperty(d.prototype, "props", {
|
|
205
215
|
set: function() {
|
|
206
216
|
throw Error();
|
|
207
217
|
}
|
|
208
218
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
209
219
|
try {
|
|
210
|
-
Reflect.construct(
|
|
211
|
-
} catch (
|
|
212
|
-
|
|
220
|
+
Reflect.construct(d, []);
|
|
221
|
+
} catch (P) {
|
|
222
|
+
u = P;
|
|
213
223
|
}
|
|
214
|
-
Reflect.construct(e, [],
|
|
224
|
+
Reflect.construct(e, [], d);
|
|
215
225
|
} else {
|
|
216
226
|
try {
|
|
217
|
-
|
|
218
|
-
} catch (
|
|
219
|
-
|
|
227
|
+
d.call();
|
|
228
|
+
} catch (P) {
|
|
229
|
+
u = P;
|
|
220
230
|
}
|
|
221
|
-
e.call(
|
|
231
|
+
e.call(d.prototype);
|
|
222
232
|
}
|
|
223
233
|
} else {
|
|
224
234
|
try {
|
|
225
235
|
throw Error();
|
|
226
|
-
} catch (
|
|
227
|
-
|
|
236
|
+
} catch (P) {
|
|
237
|
+
u = P;
|
|
228
238
|
}
|
|
229
239
|
e();
|
|
230
240
|
}
|
|
231
|
-
} catch (
|
|
232
|
-
if (
|
|
233
|
-
for (var f =
|
|
234
|
-
`),
|
|
235
|
-
`), y = f.length - 1, b =
|
|
241
|
+
} catch (P) {
|
|
242
|
+
if (P && u && typeof P.stack == "string") {
|
|
243
|
+
for (var f = P.stack.split(`
|
|
244
|
+
`), T = u.stack.split(`
|
|
245
|
+
`), y = f.length - 1, b = T.length - 1; y >= 1 && b >= 0 && f[y] !== T[b]; )
|
|
236
246
|
b--;
|
|
237
247
|
for (; y >= 1 && b >= 0; y--, b--)
|
|
238
|
-
if (f[y] !==
|
|
248
|
+
if (f[y] !== T[b]) {
|
|
239
249
|
if (y !== 1 || b !== 1)
|
|
240
250
|
do
|
|
241
|
-
if (y--, b--, b < 0 || f[y] !==
|
|
242
|
-
var
|
|
251
|
+
if (y--, b--, b < 0 || f[y] !== T[b]) {
|
|
252
|
+
var w = `
|
|
243
253
|
` + f[y].replace(" at new ", " at ");
|
|
244
|
-
return e.displayName &&
|
|
254
|
+
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, w), w;
|
|
245
255
|
}
|
|
246
256
|
while (y >= 1 && b >= 0);
|
|
247
257
|
break;
|
|
248
258
|
}
|
|
249
259
|
}
|
|
250
260
|
} finally {
|
|
251
|
-
|
|
261
|
+
X = !1, G.current = p, He(), Error.prepareStackTrace = v;
|
|
252
262
|
}
|
|
253
|
-
var
|
|
254
|
-
return typeof e == "function" &&
|
|
263
|
+
var F = e ? e.displayName || e.name : "", Ae = F ? V(F) : "";
|
|
264
|
+
return typeof e == "function" && U.set(e, Ae), Ae;
|
|
255
265
|
}
|
|
256
|
-
function
|
|
257
|
-
return
|
|
266
|
+
function Ze(e, r, t) {
|
|
267
|
+
return ye(e, !1);
|
|
258
268
|
}
|
|
259
|
-
function
|
|
269
|
+
function Qe(e) {
|
|
260
270
|
var r = e.prototype;
|
|
261
271
|
return !!(r && r.isReactComponent);
|
|
262
272
|
}
|
|
263
|
-
function
|
|
273
|
+
function q(e, r, t) {
|
|
264
274
|
if (e == null)
|
|
265
275
|
return "";
|
|
266
276
|
if (typeof e == "function")
|
|
267
|
-
return
|
|
277
|
+
return ye(e, Qe(e));
|
|
268
278
|
if (typeof e == "string")
|
|
269
|
-
return
|
|
279
|
+
return V(e);
|
|
270
280
|
switch (e) {
|
|
271
|
-
case
|
|
272
|
-
return
|
|
273
|
-
case
|
|
274
|
-
return
|
|
281
|
+
case R:
|
|
282
|
+
return V("Suspense");
|
|
283
|
+
case g:
|
|
284
|
+
return V("SuspenseList");
|
|
275
285
|
}
|
|
276
286
|
if (typeof e == "object")
|
|
277
287
|
switch (e.$$typeof) {
|
|
278
288
|
case l:
|
|
279
|
-
return
|
|
280
|
-
case
|
|
281
|
-
return
|
|
282
|
-
case
|
|
283
|
-
var
|
|
289
|
+
return Ze(e.render);
|
|
290
|
+
case _:
|
|
291
|
+
return q(e.type, r, t);
|
|
292
|
+
case S: {
|
|
293
|
+
var u = e, v = u._payload, p = u._init;
|
|
284
294
|
try {
|
|
285
|
-
return
|
|
295
|
+
return q(p(v), r, t);
|
|
286
296
|
} catch {
|
|
287
297
|
}
|
|
288
298
|
}
|
|
289
299
|
}
|
|
290
300
|
return "";
|
|
291
301
|
}
|
|
292
|
-
var
|
|
293
|
-
function
|
|
302
|
+
var z = Object.prototype.hasOwnProperty, Ee = {}, be = x.ReactDebugCurrentFrame;
|
|
303
|
+
function B(e) {
|
|
294
304
|
if (e) {
|
|
295
|
-
var r = e._owner,
|
|
296
|
-
|
|
305
|
+
var r = e._owner, t = q(e.type, e._source, r ? r.type : null);
|
|
306
|
+
be.setExtraStackFrame(t);
|
|
297
307
|
} else
|
|
298
|
-
|
|
308
|
+
be.setExtraStackFrame(null);
|
|
299
309
|
}
|
|
300
|
-
function
|
|
310
|
+
function er(e, r, t, u, v) {
|
|
301
311
|
{
|
|
302
|
-
var
|
|
303
|
-
for (var
|
|
304
|
-
if (
|
|
312
|
+
var p = Function.call.bind(z);
|
|
313
|
+
for (var d in e)
|
|
314
|
+
if (p(e, d)) {
|
|
305
315
|
var f = void 0;
|
|
306
316
|
try {
|
|
307
|
-
if (typeof e[
|
|
308
|
-
var
|
|
309
|
-
throw
|
|
317
|
+
if (typeof e[d] != "function") {
|
|
318
|
+
var T = Error((u || "React class") + ": " + t + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
319
|
+
throw T.name = "Invariant Violation", T;
|
|
310
320
|
}
|
|
311
|
-
f = e[
|
|
321
|
+
f = e[d](r, d, u, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
312
322
|
} catch (y) {
|
|
313
323
|
f = y;
|
|
314
324
|
}
|
|
315
|
-
f && !(f instanceof Error) && (
|
|
325
|
+
f && !(f instanceof Error) && (B(v), 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).", u || "React class", t, d, typeof f), B(null)), f instanceof Error && !(f.message in Ee) && (Ee[f.message] = !0, B(v), C("Failed %s type: %s", t, f.message), B(null));
|
|
316
326
|
}
|
|
317
327
|
}
|
|
318
328
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
321
|
-
return
|
|
329
|
+
var rr = Array.isArray;
|
|
330
|
+
function H(e) {
|
|
331
|
+
return rr(e);
|
|
322
332
|
}
|
|
323
|
-
function
|
|
333
|
+
function tr(e) {
|
|
324
334
|
{
|
|
325
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
|
326
|
-
return
|
|
335
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
336
|
+
return t;
|
|
327
337
|
}
|
|
328
338
|
}
|
|
329
|
-
function
|
|
339
|
+
function nr(e) {
|
|
330
340
|
try {
|
|
331
|
-
return
|
|
341
|
+
return Re(e), !1;
|
|
332
342
|
} catch {
|
|
333
343
|
return !0;
|
|
334
344
|
}
|
|
335
345
|
}
|
|
336
|
-
function
|
|
346
|
+
function Re(e) {
|
|
337
347
|
return "" + e;
|
|
338
348
|
}
|
|
339
|
-
function
|
|
340
|
-
if (
|
|
341
|
-
return
|
|
349
|
+
function _e(e) {
|
|
350
|
+
if (nr(e))
|
|
351
|
+
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(e)), Re(e);
|
|
342
352
|
}
|
|
343
|
-
var W =
|
|
353
|
+
var W = x.ReactCurrentOwner, ar = {
|
|
344
354
|
key: !0,
|
|
345
355
|
ref: !0,
|
|
346
356
|
__self: !0,
|
|
347
357
|
__source: !0
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
function
|
|
351
|
-
if (
|
|
358
|
+
}, Ce, Te, K;
|
|
359
|
+
K = {};
|
|
360
|
+
function or(e) {
|
|
361
|
+
if (z.call(e, "ref")) {
|
|
352
362
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
353
363
|
if (r && r.isReactWarning)
|
|
354
364
|
return !1;
|
|
355
365
|
}
|
|
356
366
|
return e.ref !== void 0;
|
|
357
367
|
}
|
|
358
|
-
function
|
|
359
|
-
if (
|
|
368
|
+
function ir(e) {
|
|
369
|
+
if (z.call(e, "key")) {
|
|
360
370
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
361
371
|
if (r && r.isReactWarning)
|
|
362
372
|
return !1;
|
|
363
373
|
}
|
|
364
374
|
return e.key !== void 0;
|
|
365
375
|
}
|
|
366
|
-
function
|
|
376
|
+
function ur(e, r) {
|
|
367
377
|
if (typeof e.ref == "string" && W.current && r && W.current.stateNode !== r) {
|
|
368
|
-
var
|
|
369
|
-
|
|
378
|
+
var t = j(W.current.type);
|
|
379
|
+
K[t] || (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', j(W.current.type), e.ref), K[t] = !0);
|
|
370
380
|
}
|
|
371
381
|
}
|
|
372
|
-
function
|
|
382
|
+
function sr(e, r) {
|
|
373
383
|
{
|
|
374
|
-
var
|
|
375
|
-
|
|
384
|
+
var t = function() {
|
|
385
|
+
Ce || (Ce = !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));
|
|
376
386
|
};
|
|
377
|
-
|
|
378
|
-
get:
|
|
387
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
388
|
+
get: t,
|
|
379
389
|
configurable: !0
|
|
380
390
|
});
|
|
381
391
|
}
|
|
382
392
|
}
|
|
383
|
-
function
|
|
393
|
+
function lr(e, r) {
|
|
384
394
|
{
|
|
385
|
-
var
|
|
386
|
-
|
|
395
|
+
var t = function() {
|
|
396
|
+
Te || (Te = !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));
|
|
387
397
|
};
|
|
388
|
-
|
|
389
|
-
get:
|
|
398
|
+
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
399
|
+
get: t,
|
|
390
400
|
configurable: !0
|
|
391
401
|
});
|
|
392
402
|
}
|
|
393
403
|
}
|
|
394
|
-
var
|
|
404
|
+
var cr = function(e, r, t, u, v, p, d) {
|
|
395
405
|
var f = {
|
|
396
406
|
// This tag allows us to uniquely identify this as a React Element
|
|
397
|
-
$$typeof:
|
|
407
|
+
$$typeof: n,
|
|
398
408
|
// Built-in properties that belong on the element
|
|
399
409
|
type: e,
|
|
400
410
|
key: r,
|
|
401
|
-
ref:
|
|
402
|
-
props:
|
|
411
|
+
ref: t,
|
|
412
|
+
props: d,
|
|
403
413
|
// Record the component responsible for creating this element.
|
|
404
|
-
_owner:
|
|
414
|
+
_owner: p
|
|
405
415
|
};
|
|
406
416
|
return f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
407
417
|
configurable: !1,
|
|
@@ -412,49 +422,49 @@ function br() {
|
|
|
412
422
|
configurable: !1,
|
|
413
423
|
enumerable: !1,
|
|
414
424
|
writable: !1,
|
|
415
|
-
value:
|
|
425
|
+
value: u
|
|
416
426
|
}), Object.defineProperty(f, "_source", {
|
|
417
427
|
configurable: !1,
|
|
418
428
|
enumerable: !1,
|
|
419
429
|
writable: !1,
|
|
420
|
-
value:
|
|
430
|
+
value: v
|
|
421
431
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
422
432
|
};
|
|
423
|
-
function
|
|
433
|
+
function fr(e, r, t, u, v) {
|
|
424
434
|
{
|
|
425
|
-
var
|
|
426
|
-
|
|
427
|
-
for (
|
|
428
|
-
|
|
435
|
+
var p, d = {}, f = null, T = null;
|
|
436
|
+
t !== void 0 && (_e(t), f = "" + t), ir(r) && (_e(r.key), f = "" + r.key), or(r) && (T = r.ref, ur(r, v));
|
|
437
|
+
for (p in r)
|
|
438
|
+
z.call(r, p) && !ar.hasOwnProperty(p) && (d[p] = r[p]);
|
|
429
439
|
if (e && e.defaultProps) {
|
|
430
440
|
var y = e.defaultProps;
|
|
431
|
-
for (
|
|
432
|
-
|
|
441
|
+
for (p in y)
|
|
442
|
+
d[p] === void 0 && (d[p] = y[p]);
|
|
433
443
|
}
|
|
434
|
-
if (f ||
|
|
444
|
+
if (f || T) {
|
|
435
445
|
var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
436
|
-
f &&
|
|
446
|
+
f && sr(d, b), T && lr(d, b);
|
|
437
447
|
}
|
|
438
|
-
return
|
|
448
|
+
return cr(e, f, T, v, u, W.current, d);
|
|
439
449
|
}
|
|
440
450
|
}
|
|
441
|
-
var
|
|
442
|
-
function
|
|
451
|
+
var Z = x.ReactCurrentOwner, Se = x.ReactDebugCurrentFrame;
|
|
452
|
+
function D(e) {
|
|
443
453
|
if (e) {
|
|
444
|
-
var r = e._owner,
|
|
445
|
-
|
|
454
|
+
var r = e._owner, t = q(e.type, e._source, r ? r.type : null);
|
|
455
|
+
Se.setExtraStackFrame(t);
|
|
446
456
|
} else
|
|
447
|
-
|
|
457
|
+
Se.setExtraStackFrame(null);
|
|
448
458
|
}
|
|
449
|
-
var
|
|
450
|
-
|
|
451
|
-
function
|
|
452
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
459
|
+
var Q;
|
|
460
|
+
Q = !1;
|
|
461
|
+
function ee(e) {
|
|
462
|
+
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
453
463
|
}
|
|
454
|
-
function
|
|
464
|
+
function we() {
|
|
455
465
|
{
|
|
456
|
-
if (
|
|
457
|
-
var e =
|
|
466
|
+
if (Z.current) {
|
|
467
|
+
var e = j(Z.current.type);
|
|
458
468
|
if (e)
|
|
459
469
|
return `
|
|
460
470
|
|
|
@@ -463,26 +473,26 @@ Check the render method of \`` + e + "`.";
|
|
|
463
473
|
return "";
|
|
464
474
|
}
|
|
465
475
|
}
|
|
466
|
-
function
|
|
476
|
+
function dr(e) {
|
|
467
477
|
{
|
|
468
478
|
if (e !== void 0) {
|
|
469
|
-
var r = e.fileName.replace(/^.*[\\\/]/, ""),
|
|
479
|
+
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
470
480
|
return `
|
|
471
481
|
|
|
472
|
-
Check your code at ` + r + ":" +
|
|
482
|
+
Check your code at ` + r + ":" + t + ".";
|
|
473
483
|
}
|
|
474
484
|
return "";
|
|
475
485
|
}
|
|
476
486
|
}
|
|
477
|
-
var
|
|
478
|
-
function
|
|
487
|
+
var Oe = {};
|
|
488
|
+
function vr(e) {
|
|
479
489
|
{
|
|
480
|
-
var r =
|
|
490
|
+
var r = we();
|
|
481
491
|
if (!r) {
|
|
482
|
-
var
|
|
483
|
-
|
|
492
|
+
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
493
|
+
t && (r = `
|
|
484
494
|
|
|
485
|
-
Check the top-level render call using <` +
|
|
495
|
+
Check the top-level render call using <` + t + ">.");
|
|
486
496
|
}
|
|
487
497
|
return r;
|
|
488
498
|
}
|
|
@@ -492,111 +502,111 @@ Check the top-level render call using <` + a + ">.");
|
|
|
492
502
|
if (!e._store || e._store.validated || e.key != null)
|
|
493
503
|
return;
|
|
494
504
|
e._store.validated = !0;
|
|
495
|
-
var
|
|
496
|
-
if (
|
|
505
|
+
var t = vr(r);
|
|
506
|
+
if (Oe[t])
|
|
497
507
|
return;
|
|
498
|
-
|
|
499
|
-
var
|
|
500
|
-
e && e._owner && e._owner !==
|
|
508
|
+
Oe[t] = !0;
|
|
509
|
+
var u = "";
|
|
510
|
+
e && e._owner && e._owner !== Z.current && (u = " It was passed a child from " + j(e._owner.type) + "."), D(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.', t, u), D(null);
|
|
501
511
|
}
|
|
502
512
|
}
|
|
503
|
-
function
|
|
513
|
+
function je(e, r) {
|
|
504
514
|
{
|
|
505
515
|
if (typeof e != "object")
|
|
506
516
|
return;
|
|
507
|
-
if (
|
|
508
|
-
for (var
|
|
509
|
-
var
|
|
510
|
-
|
|
517
|
+
if (H(e))
|
|
518
|
+
for (var t = 0; t < e.length; t++) {
|
|
519
|
+
var u = e[t];
|
|
520
|
+
ee(u) && xe(u, r);
|
|
511
521
|
}
|
|
512
|
-
else if (
|
|
522
|
+
else if (ee(e))
|
|
513
523
|
e._store && (e._store.validated = !0);
|
|
514
524
|
else if (e) {
|
|
515
|
-
var
|
|
516
|
-
if (typeof
|
|
517
|
-
for (var
|
|
518
|
-
|
|
525
|
+
var v = ue(e);
|
|
526
|
+
if (typeof v == "function" && v !== e.entries)
|
|
527
|
+
for (var p = v.call(e), d; !(d = p.next()).done; )
|
|
528
|
+
ee(d.value) && xe(d.value, r);
|
|
519
529
|
}
|
|
520
530
|
}
|
|
521
531
|
}
|
|
522
|
-
function
|
|
532
|
+
function pr(e) {
|
|
523
533
|
{
|
|
524
534
|
var r = e.type;
|
|
525
535
|
if (r == null || typeof r == "string")
|
|
526
536
|
return;
|
|
527
|
-
var
|
|
537
|
+
var t;
|
|
528
538
|
if (typeof r == "function")
|
|
529
|
-
|
|
539
|
+
t = r.propTypes;
|
|
530
540
|
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
531
541
|
// Inner props are checked in the reconciler.
|
|
532
|
-
r.$$typeof ===
|
|
533
|
-
|
|
542
|
+
r.$$typeof === _))
|
|
543
|
+
t = r.propTypes;
|
|
534
544
|
else
|
|
535
545
|
return;
|
|
536
|
-
if (
|
|
537
|
-
var
|
|
538
|
-
|
|
539
|
-
} else if (r.PropTypes !== void 0 && !
|
|
540
|
-
|
|
541
|
-
var
|
|
542
|
-
|
|
546
|
+
if (t) {
|
|
547
|
+
var u = j(r);
|
|
548
|
+
er(t, e.props, "prop", u, e);
|
|
549
|
+
} else if (r.PropTypes !== void 0 && !Q) {
|
|
550
|
+
Q = !0;
|
|
551
|
+
var v = j(r);
|
|
552
|
+
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
543
553
|
}
|
|
544
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
554
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
545
555
|
}
|
|
546
556
|
}
|
|
547
|
-
function
|
|
557
|
+
function mr(e) {
|
|
548
558
|
{
|
|
549
|
-
for (var r = Object.keys(e.props),
|
|
550
|
-
var
|
|
551
|
-
if (
|
|
552
|
-
|
|
559
|
+
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
560
|
+
var u = r[t];
|
|
561
|
+
if (u !== "children" && u !== "key") {
|
|
562
|
+
D(e), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), D(null);
|
|
553
563
|
break;
|
|
554
564
|
}
|
|
555
565
|
}
|
|
556
|
-
e.ref !== null && (
|
|
566
|
+
e.ref !== null && (D(e), C("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
|
|
557
567
|
}
|
|
558
568
|
}
|
|
559
|
-
function
|
|
569
|
+
function Pe(e, r, t, u, v, p) {
|
|
560
570
|
{
|
|
561
|
-
var
|
|
562
|
-
if (!
|
|
571
|
+
var d = Ge(e);
|
|
572
|
+
if (!d) {
|
|
563
573
|
var f = "";
|
|
564
574
|
(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
|
-
var
|
|
566
|
-
|
|
575
|
+
var T = dr(v);
|
|
576
|
+
T ? f += T : f += we();
|
|
567
577
|
var y;
|
|
568
|
-
e === null ? y = "null" :
|
|
578
|
+
e === null ? y = "null" : H(e) ? y = "array" : e !== void 0 && e.$$typeof === n ? (y = "<" + (j(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : y = 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", y, f);
|
|
569
579
|
}
|
|
570
|
-
var b =
|
|
580
|
+
var b = fr(e, r, t, v, p);
|
|
571
581
|
if (b == null)
|
|
572
582
|
return b;
|
|
573
|
-
if (
|
|
574
|
-
var
|
|
575
|
-
if (
|
|
576
|
-
if (
|
|
577
|
-
if (
|
|
578
|
-
for (var
|
|
579
|
-
|
|
580
|
-
Object.freeze && Object.freeze(
|
|
583
|
+
if (d) {
|
|
584
|
+
var w = r.children;
|
|
585
|
+
if (w !== void 0)
|
|
586
|
+
if (u)
|
|
587
|
+
if (H(w)) {
|
|
588
|
+
for (var F = 0; F < w.length; F++)
|
|
589
|
+
je(w[F], e);
|
|
590
|
+
Object.freeze && Object.freeze(w);
|
|
581
591
|
} else
|
|
582
|
-
|
|
592
|
+
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.");
|
|
583
593
|
else
|
|
584
|
-
|
|
594
|
+
je(w, e);
|
|
585
595
|
}
|
|
586
|
-
return e ===
|
|
596
|
+
return e === s ? mr(b) : pr(b), b;
|
|
587
597
|
}
|
|
588
598
|
}
|
|
589
|
-
function
|
|
590
|
-
return
|
|
599
|
+
function gr(e, r, t) {
|
|
600
|
+
return Pe(e, r, t, !0);
|
|
591
601
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
602
|
+
function hr(e, r, t) {
|
|
603
|
+
return Pe(e, r, t, !1);
|
|
594
604
|
}
|
|
595
|
-
var
|
|
596
|
-
|
|
597
|
-
}()),
|
|
605
|
+
var yr = hr, Er = gr;
|
|
606
|
+
Y.Fragment = s, Y.jsx = yr, Y.jsxs = Er;
|
|
607
|
+
}()), Y;
|
|
598
608
|
}
|
|
599
|
-
var
|
|
609
|
+
var M = {};
|
|
600
610
|
/**
|
|
601
611
|
* @license React
|
|
602
612
|
* react-jsx-runtime.production.min.js
|
|
@@ -606,317 +616,255 @@ var V = {};
|
|
|
606
616
|
* This source code is licensed under the MIT license found in the
|
|
607
617
|
* LICENSE file in the root directory of this source tree.
|
|
608
618
|
*/
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
if (
|
|
612
|
-
return
|
|
613
|
-
|
|
614
|
-
var
|
|
615
|
-
function
|
|
616
|
-
var
|
|
617
|
-
|
|
618
|
-
for (
|
|
619
|
-
|
|
620
|
-
if (
|
|
621
|
-
for (
|
|
622
|
-
|
|
623
|
-
return { $$typeof:
|
|
619
|
+
var Fe;
|
|
620
|
+
function Fr() {
|
|
621
|
+
if (Fe)
|
|
622
|
+
return M;
|
|
623
|
+
Fe = 1;
|
|
624
|
+
var a = Ne, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, m = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, E = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
625
|
+
function o(c, l, R) {
|
|
626
|
+
var g, _ = {}, S = null, O = null;
|
|
627
|
+
R !== void 0 && (S = "" + R), l.key !== void 0 && (S = "" + l.key), l.ref !== void 0 && (O = l.ref);
|
|
628
|
+
for (g in l)
|
|
629
|
+
s.call(l, g) && !E.hasOwnProperty(g) && (_[g] = l[g]);
|
|
630
|
+
if (c && c.defaultProps)
|
|
631
|
+
for (g in l = c.defaultProps, l)
|
|
632
|
+
_[g] === void 0 && (_[g] = l[g]);
|
|
633
|
+
return { $$typeof: n, type: c, key: S, ref: O, props: _, _owner: m.current };
|
|
624
634
|
}
|
|
625
|
-
return
|
|
635
|
+
return M.Fragment = i, M.jsx = o, M.jsxs = o, M;
|
|
626
636
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
children: void 0,
|
|
633
|
-
Navigate: void 0,
|
|
634
|
-
Outlet: void 0,
|
|
635
|
-
translate: void 0,
|
|
636
|
-
useAuth: void 0,
|
|
637
|
-
useLocation: void 0
|
|
638
|
-
}), Pr = ({
|
|
639
|
-
axios: t,
|
|
640
|
-
children: o,
|
|
641
|
-
translate: i,
|
|
642
|
-
useAuth: u,
|
|
643
|
-
Outlet: c,
|
|
644
|
-
Navigate: d,
|
|
645
|
-
useLocation: m,
|
|
646
|
-
useGoogleTagManager: n,
|
|
647
|
-
apiURL: l
|
|
648
|
-
}) => {
|
|
649
|
-
const E = se(
|
|
650
|
-
() => ({
|
|
651
|
-
apiURL: l,
|
|
652
|
-
axios: t,
|
|
653
|
-
Navigate: d,
|
|
654
|
-
Outlet: c,
|
|
655
|
-
translate: i,
|
|
656
|
-
useAuth: u,
|
|
657
|
-
useGoogleTagManager: n,
|
|
658
|
-
useLocation: m
|
|
659
|
-
}),
|
|
660
|
-
[d, c, l, t, i, u, n, m]
|
|
661
|
-
);
|
|
662
|
-
return /* @__PURE__ */ x.jsx(q.Provider, { value: E, children: o });
|
|
663
|
-
}, H = (t) => `RequireAuth require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Ar = ({
|
|
664
|
-
Fallback: t,
|
|
665
|
-
loginPath: o = "/login",
|
|
637
|
+
process.env.NODE_ENV === "production" ? ne.exports = Fr() : ne.exports = Dr();
|
|
638
|
+
var A = ne.exports;
|
|
639
|
+
const Qr = ({
|
|
640
|
+
Fallback: a,
|
|
641
|
+
loginPath: n = "/login",
|
|
666
642
|
localStorageKey: i = "user",
|
|
667
|
-
redirect401Path:
|
|
668
|
-
|
|
643
|
+
redirect401Path: s = "/login",
|
|
644
|
+
isLogged: m
|
|
669
645
|
}) => {
|
|
670
|
-
var
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
throw new Error(H("useAuth"));
|
|
680
|
-
if (m === void 0)
|
|
681
|
-
throw new Error(H("useLocation"));
|
|
682
|
-
if (l === void 0)
|
|
683
|
-
throw new Error(H("Outlet"));
|
|
684
|
-
if (E === void 0)
|
|
685
|
-
throw new Error(H("Navigate"));
|
|
686
|
-
const [h, C] = gr(null), { isLogged: O } = n(), T = m(), k = mr(!1);
|
|
687
|
-
return hr(() => {
|
|
688
|
-
k.current || (k.current = !0, d == null || d.interceptors.response.use(
|
|
689
|
-
(_) => _,
|
|
690
|
-
async (_) => {
|
|
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 && (d.defaults.headers.common.Authorization = null, localStorage.removeItem(i), C(u)), Promise.reject(_);
|
|
646
|
+
var R, g, _, S;
|
|
647
|
+
const [E, o] = br(null), c = oe(), l = Rr(!1);
|
|
648
|
+
return _r(() => {
|
|
649
|
+
var O;
|
|
650
|
+
l.current || (l.current = !0, (O = k) == null || O.interceptors.response.use(
|
|
651
|
+
(h) => h,
|
|
652
|
+
async (h) => {
|
|
653
|
+
var x;
|
|
654
|
+
return typeof h == "object" && h && "response" in h && h.response && typeof h.response == "object" && "status" in h.response && h.response && typeof h.response == "object" && "status" in h.response && ((x = h == null ? void 0 : h.response) == null ? void 0 : x.status) === 401 && (k.defaults.headers.common.Authorization = null, localStorage.removeItem(i), o(s)), Promise.reject(h);
|
|
693
655
|
}
|
|
694
656
|
));
|
|
695
|
-
}, [
|
|
696
|
-
},
|
|
697
|
-
const {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
},
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
postContentType: d = "application/json"
|
|
657
|
+
}, [i, s]), m && !E ? /* @__PURE__ */ A.jsx(Cr, { fallback: a, children: (g = (R = c.state) == null ? void 0 : R.from) != null && g.state && ((S = (_ = c.state) == null ? void 0 : _.from) == null ? void 0 : S.pathname) === n ? /* @__PURE__ */ A.jsx(ke, { to: c.state.from.state.from.pathname + c.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ A.jsx(Ye, {}) }) : /* @__PURE__ */ A.jsx(ke, { to: n, state: { from: c }, replace: !0 });
|
|
658
|
+
}, et = () => {
|
|
659
|
+
const { pathname: a } = oe(), { sendEvent: n } = xr();
|
|
660
|
+
return Le(() => {
|
|
661
|
+
n({ event: "pageView", pathname: a });
|
|
662
|
+
}, [a, n]), /* @__PURE__ */ A.jsx(Ye, {});
|
|
663
|
+
}, ie = Tr({
|
|
664
|
+
apiURL: void 0,
|
|
665
|
+
children: void 0
|
|
666
|
+
}), rt = ({ children: a, apiURL: n }) => {
|
|
667
|
+
const i = ae(
|
|
668
|
+
() => ({
|
|
669
|
+
apiURL: n
|
|
670
|
+
}),
|
|
671
|
+
[n]
|
|
672
|
+
);
|
|
673
|
+
return /* @__PURE__ */ A.jsx(ie.Provider, { value: i, children: a });
|
|
674
|
+
}, tt = ({
|
|
675
|
+
tokenTypeKey: a = "tokenType",
|
|
676
|
+
userLocalStorageKey: n = "user",
|
|
677
|
+
tokenKey: i = "accessToken",
|
|
678
|
+
postContentType: s = "application/json",
|
|
679
|
+
...m
|
|
719
680
|
}) => {
|
|
720
|
-
|
|
681
|
+
const { apiURL: E = m.baseURL } = We(ie);
|
|
682
|
+
if (!k.defaults)
|
|
721
683
|
return null;
|
|
722
|
-
const
|
|
723
|
-
return
|
|
724
|
-
},
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
})
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
sentry: o,
|
|
750
|
-
integrations: i,
|
|
751
|
-
tracesSampleRate: u,
|
|
752
|
-
routingInstrumentationDependencies: c,
|
|
753
|
-
replaysSessionSampleRate: d,
|
|
684
|
+
const o = localStorage.getItem(n), c = o ? JSON.parse(o) : null, l = c != null && c[a] ? c[a] : null, R = c != null && c[i] ? c[i] : null, g = o ? `${l} ${R}` : null;
|
|
685
|
+
return k.defaults.baseURL = E, k.defaults.headers.post["Content-Type"] = s, g && (k.defaults.headers.common.Authorization = g), null;
|
|
686
|
+
}, nt = ({ debug: a, resources: n }) => {
|
|
687
|
+
var i;
|
|
688
|
+
return (i = I) != null && i.isInitialized || (I.use(Pr).use(Ar).init({
|
|
689
|
+
debug: a,
|
|
690
|
+
fallbackLng: "en",
|
|
691
|
+
interpolation: {
|
|
692
|
+
escapeValue: !1
|
|
693
|
+
},
|
|
694
|
+
load: "languageOnly",
|
|
695
|
+
react: {
|
|
696
|
+
bindI18n: !1,
|
|
697
|
+
useSuspense: !0
|
|
698
|
+
},
|
|
699
|
+
resources: n,
|
|
700
|
+
returnNull: !1
|
|
701
|
+
}).then(() => {
|
|
702
|
+
document.documentElement.lang !== I.resolvedLanguage && I.resolvedLanguage && document.documentElement.setAttribute("lang", I.resolvedLanguage);
|
|
703
|
+
}), I.on("languageChanged", (s) => {
|
|
704
|
+
document.documentElement.setAttribute("lang", s);
|
|
705
|
+
})), null;
|
|
706
|
+
}, at = ({
|
|
707
|
+
dsn: a,
|
|
708
|
+
integrations: n,
|
|
709
|
+
tracesSampleRate: i,
|
|
710
|
+
replaysSessionSampleRate: s,
|
|
754
711
|
replaysOnErrorSampleRate: m,
|
|
755
|
-
tracePropagationTargets:
|
|
756
|
-
ignoreErrors:
|
|
757
|
-
debug:
|
|
758
|
-
environment:
|
|
759
|
-
}) => (
|
|
760
|
-
debug:
|
|
761
|
-
dsn:
|
|
762
|
-
environment:
|
|
763
|
-
ignoreErrors: [...
|
|
712
|
+
tracePropagationTargets: E,
|
|
713
|
+
ignoreErrors: o,
|
|
714
|
+
debug: c,
|
|
715
|
+
environment: l
|
|
716
|
+
}) => (re.isInitialized() || (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && re.init({
|
|
717
|
+
debug: c,
|
|
718
|
+
dsn: a,
|
|
719
|
+
environment: l || "production",
|
|
720
|
+
ignoreErrors: [...o || [], /dynamically imported module/],
|
|
764
721
|
integrations: [
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
c.matchRoutes
|
|
772
|
-
)
|
|
722
|
+
re.reactRouterV6BrowserTracingIntegration({
|
|
723
|
+
createRoutesFromChildren: Sr,
|
|
724
|
+
matchRoutes: wr,
|
|
725
|
+
useEffect: Le,
|
|
726
|
+
useLocation: oe,
|
|
727
|
+
useNavigationType: Or
|
|
773
728
|
}),
|
|
774
|
-
|
|
775
|
-
...i || []
|
|
729
|
+
...n || []
|
|
776
730
|
],
|
|
777
731
|
replaysOnErrorSampleRate: m || 1,
|
|
778
|
-
replaysSessionSampleRate:
|
|
779
|
-
tracePropagationTargets:
|
|
780
|
-
tracesSampleRate:
|
|
781
|
-
}), null),
|
|
782
|
-
const i =
|
|
732
|
+
replaysSessionSampleRate: s || 0.1,
|
|
733
|
+
tracePropagationTargets: E,
|
|
734
|
+
tracesSampleRate: i || 1
|
|
735
|
+
}), null), ot = ({ IMaskMixin: a, ...n }) => {
|
|
736
|
+
const i = ae(
|
|
783
737
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
784
|
-
() =>
|
|
785
|
-
[
|
|
738
|
+
() => a(({ TextField: s, ...m }) => /* @__PURE__ */ A.jsx(s, { ...m })),
|
|
739
|
+
[a]
|
|
786
740
|
);
|
|
787
|
-
return /* @__PURE__ */
|
|
788
|
-
},
|
|
789
|
-
children:
|
|
790
|
-
defaultQueriesOptions:
|
|
741
|
+
return /* @__PURE__ */ A.jsx(i, { ...n });
|
|
742
|
+
}, it = ({ accessToken: a }) => ($e && a && ($e.accessToken = a), null), ut = ({
|
|
743
|
+
children: a,
|
|
744
|
+
defaultQueriesOptions: n,
|
|
791
745
|
defaultMutationsOptions: i,
|
|
792
|
-
QueryClient:
|
|
793
|
-
QueryClientProvider: c
|
|
746
|
+
QueryClient: s
|
|
794
747
|
}) => {
|
|
795
|
-
const
|
|
748
|
+
const m = new s({
|
|
796
749
|
defaultOptions: {
|
|
797
750
|
mutations: {
|
|
798
751
|
...i
|
|
799
752
|
},
|
|
800
753
|
queries: {
|
|
801
|
-
getNextPageParam: (
|
|
754
|
+
getNextPageParam: (E, o, c) => E.length + (c || 0),
|
|
802
755
|
refetchOnWindowFocus: !1,
|
|
803
756
|
retry: 3,
|
|
804
|
-
...
|
|
757
|
+
...n
|
|
805
758
|
}
|
|
806
759
|
}
|
|
807
760
|
});
|
|
808
|
-
return /* @__PURE__ */
|
|
809
|
-
},
|
|
810
|
-
const { unknownErrorTranslationKey:
|
|
811
|
-
(
|
|
812
|
-
var l,
|
|
813
|
-
const { response:
|
|
814
|
-
return
|
|
761
|
+
return /* @__PURE__ */ A.jsx(kr, { client: m, children: a });
|
|
762
|
+
}, st = (a) => {
|
|
763
|
+
const { unknownErrorTranslationKey: n = "error.unknownError" } = a || {}, i = jr(n), s = te(
|
|
764
|
+
(E) => {
|
|
765
|
+
var c, l, R, g, _, S, O, h, N;
|
|
766
|
+
const { response: o } = E || {};
|
|
767
|
+
return o != null && o.reason ? String(o.reason) : (c = o == null ? void 0 : o.data) != null && c.reason ? String(o.data.reason) : (l = o == null ? void 0 : o.data) != null && l.message ? String(o.data.message) : (g = (R = o == null ? void 0 : o.data) == null ? void 0 : R.detail) != null && g.length && Array.isArray((_ = o == null ? void 0 : o.data) == null ? void 0 : _.detail) && ((O = (S = o == null ? void 0 : o.data) == null ? void 0 : S.detail[0]) != null && O.msg) && typeof ((N = (h = o == null ? void 0 : o.data) == null ? void 0 : h.detail[0]) == null ? void 0 : N.msg) == "string" ? String(o.data.detail[0].msg) : i;
|
|
815
768
|
},
|
|
816
|
-
[
|
|
769
|
+
[i]
|
|
817
770
|
);
|
|
818
|
-
return { getErrorCode:
|
|
819
|
-
var
|
|
820
|
-
const { response:
|
|
821
|
-
return
|
|
822
|
-
}, []), printError:
|
|
823
|
-
},
|
|
824
|
-
data:
|
|
825
|
-
fetchNextPage:
|
|
771
|
+
return { getErrorCode: te((E) => {
|
|
772
|
+
var c, l, R;
|
|
773
|
+
const { response: o } = E || {};
|
|
774
|
+
return o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (c = o == null ? void 0 : o.data) != null && c.error_code ? String((l = o == null ? void 0 : o.data) == null ? void 0 : l.error_code) : o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (R = o == null ? void 0 : o.data) != null && R.error_code ? String(o.data.error_code) : "unknown_error_code";
|
|
775
|
+
}, []), printError: s };
|
|
776
|
+
}, lt = ({
|
|
777
|
+
data: a,
|
|
778
|
+
fetchNextPage: n,
|
|
826
779
|
isFetchingNextPage: i,
|
|
827
|
-
isInitialLoading:
|
|
828
|
-
isLoading:
|
|
829
|
-
enabled:
|
|
780
|
+
isInitialLoading: s,
|
|
781
|
+
isLoading: m,
|
|
782
|
+
enabled: E = !0
|
|
830
783
|
}) => {
|
|
831
|
-
const
|
|
784
|
+
const o = te(
|
|
832
785
|
async (l) => {
|
|
833
|
-
i || !
|
|
834
|
-
},
|
|
835
|
-
[d, o, i]
|
|
836
|
-
), n = se(() => {
|
|
837
|
-
if (t)
|
|
838
|
-
return t.pages.reduce((l, E) => [...l, ...E], []);
|
|
839
|
-
}, [t]);
|
|
840
|
-
return {
|
|
841
|
-
fetchNextPageOnRowsScrollEnd: m,
|
|
842
|
-
isLoading: i || c,
|
|
843
|
-
loadingVariant: u ? "skeleton" : "linear",
|
|
844
|
-
rows: n
|
|
845
|
-
};
|
|
846
|
-
}, Mr = (t) => {
|
|
847
|
-
const o = Y(
|
|
848
|
-
({ tokenType: u, accessToken: c }) => {
|
|
849
|
-
t.defaults.headers.common.Authorization = `${u} ${c}`;
|
|
786
|
+
i || !E || await n({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
|
|
850
787
|
},
|
|
851
|
-
[
|
|
852
|
-
)
|
|
788
|
+
[E, n, i]
|
|
789
|
+
), c = ae(() => {
|
|
790
|
+
if (a)
|
|
791
|
+
return a.pages.reduce((l, R) => [...l, ...R], []);
|
|
792
|
+
}, [a]);
|
|
853
793
|
return {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
794
|
+
fetchNextPageOnRowsScrollEnd: o,
|
|
795
|
+
isLoading: i || m,
|
|
796
|
+
loadingVariant: s ? "skeleton" : "linear",
|
|
797
|
+
rows: c
|
|
858
798
|
};
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
},
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
}
|
|
866
|
-
|
|
799
|
+
}, ct = () => ({
|
|
800
|
+
clearAuthenticationToken: () => {
|
|
801
|
+
k.defaults.headers.common.Authorization = null;
|
|
802
|
+
},
|
|
803
|
+
setAuthenticationToken: ({ tokenType: i, accessToken: s }) => {
|
|
804
|
+
k.defaults.headers.common.Authorization = `${i} ${s}`;
|
|
805
|
+
}
|
|
806
|
+
}), Ir = (a, n = "ddd D MMM YY") => $r(a).format(n), Nr = (a, n = "km") => {
|
|
807
|
+
const i = Number(a);
|
|
808
|
+
return Number.isNaN(i) ? `0 ${n}` : `${i.toFixed(2)} ${n}`;
|
|
809
|
+
}, Lr = (a) => {
|
|
810
|
+
const n = a && typeof a == "object" && "pathname" in a && a.pathname ? a.pathname : a;
|
|
811
|
+
return typeof n == "string" ? n != null && n.startsWith("/") ? n != null && n.startsWith("/files") ? n : `/files${n}` : n != null && n.startsWith("files") ? `/${n}` : n != null && n.startsWith("files") ? `/${n}` : `/files/${n}` : n;
|
|
812
|
+
}, Ie = (a, n) => {
|
|
813
|
+
if (!a)
|
|
867
814
|
return "";
|
|
868
|
-
const i =
|
|
869
|
-
return typeof
|
|
870
|
-
},
|
|
871
|
-
const { apiURL:
|
|
815
|
+
const i = Lr(a), s = typeof a == "object" && "pathname" in a ? `${a.origin}${i}` : a;
|
|
816
|
+
return typeof n == "number" ? `${s.replace("/files", `/thumbs/${n}`)}` : s;
|
|
817
|
+
}, ft = () => {
|
|
818
|
+
const { apiURL: a } = We(ie);
|
|
872
819
|
return {
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
820
|
+
dateAdapter: Ir,
|
|
821
|
+
distanceAdapter: Nr,
|
|
822
|
+
filePathAdapter: (i, s) => Ie(
|
|
823
|
+
a && typeof i == "string" ? {
|
|
824
|
+
origin: a,
|
|
877
825
|
pathname: i
|
|
878
826
|
} : i,
|
|
879
|
-
|
|
827
|
+
s
|
|
880
828
|
)
|
|
881
829
|
};
|
|
882
|
-
},
|
|
883
|
-
const
|
|
884
|
-
return
|
|
885
|
-
},
|
|
886
|
-
const
|
|
887
|
-
return `${
|
|
888
|
-
},
|
|
889
|
-
if (
|
|
890
|
-
return (
|
|
830
|
+
}, Wr = (a) => a.charAt(0).toUpperCase() + a.slice(1).toLowerCase(), Yr = (a) => {
|
|
831
|
+
const s = a.split("/").filter((m) => m.length > 0).map((m) => m.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
|
|
832
|
+
return s.charAt(0).toLowerCase() + s.slice(1);
|
|
833
|
+
}, Mr = (a, n, i) => {
|
|
834
|
+
const s = Yr(n), m = Wr(i);
|
|
835
|
+
return `${s}${m}`;
|
|
836
|
+
}, Vr = (a) => {
|
|
837
|
+
if (a)
|
|
838
|
+
return (a == null ? void 0 : a.reduce((n, i) => (n[i] = {
|
|
891
839
|
query: {
|
|
892
840
|
useInfinite: !0,
|
|
893
841
|
useInfiniteQueryParam: "offset",
|
|
894
842
|
useQuery: !0
|
|
895
843
|
}
|
|
896
|
-
},
|
|
897
|
-
},
|
|
898
|
-
const { input:
|
|
844
|
+
}, n), {})) || {};
|
|
845
|
+
}, dt = (a) => {
|
|
846
|
+
const { input: n = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = a || {};
|
|
899
847
|
return {
|
|
900
848
|
api: {
|
|
901
849
|
hooks: {
|
|
902
850
|
afterAllFilesWrite: "prettier src/api/ --write"
|
|
903
851
|
},
|
|
904
|
-
input:
|
|
852
|
+
input: n,
|
|
905
853
|
output: {
|
|
906
854
|
client: "react-query",
|
|
907
855
|
mode: "tags-split",
|
|
908
856
|
override: {
|
|
909
|
-
header: (
|
|
857
|
+
header: (s) => [
|
|
910
858
|
"Generated by orval 🍺",
|
|
911
|
-
...
|
|
912
|
-
...
|
|
859
|
+
...s.title ? [s.title] : [],
|
|
860
|
+
...s.description ? [s.description] : []
|
|
913
861
|
],
|
|
914
862
|
mutator: {
|
|
915
863
|
name: "axiosCustomInstance",
|
|
916
864
|
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
917
865
|
},
|
|
918
|
-
operationName:
|
|
919
|
-
...(i == null ? void 0 : i.length) && { operations:
|
|
866
|
+
operationName: Mr,
|
|
867
|
+
...(i == null ? void 0 : i.length) && { operations: Vr(i) },
|
|
920
868
|
query: {
|
|
921
869
|
useQuery: !0
|
|
922
870
|
}
|
|
@@ -928,19 +876,21 @@ const q = pr({
|
|
|
928
876
|
};
|
|
929
877
|
};
|
|
930
878
|
export {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
879
|
+
tt as AxiosConfig,
|
|
880
|
+
et as GTMSendPageView,
|
|
881
|
+
nt as I18nConfig,
|
|
882
|
+
ie as InjectDependenciesContext,
|
|
883
|
+
rt as InjectDependenciesProvider,
|
|
884
|
+
it as MapBoxConfig,
|
|
885
|
+
ot as MaskTextField,
|
|
886
|
+
ut as QueryClientConfigProvider,
|
|
887
|
+
Qr as RequireAuth,
|
|
888
|
+
at as SentryConfig,
|
|
889
|
+
Ir as dateAdapter,
|
|
890
|
+
Nr as distanceAdapter,
|
|
891
|
+
dt as getOrvalConfig,
|
|
892
|
+
ft as useAdapter,
|
|
893
|
+
ct as useAuth,
|
|
894
|
+
lt as useInfiniteDataGrid,
|
|
895
|
+
st as useResponseError
|
|
946
896
|
};
|