@tracktor/shared-module 2.0.0-beta.4 → 2.0.0-beta.5
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 +1 -1
- package/dist/main.js +187 -187
- package/dist/main.umd.cjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import We, { createContext as vt, useMemo as le, useContext as k, useState as gt, useRef as ht, useEffect as Z, Suspense as yt, useCallback as ce } from "react";
|
|
2
|
+
var se = { exports: {} }, B = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.development.js
|
|
@@ -9,10 +9,10 @@ var ce = { exports: {} }, B = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
-
var n =
|
|
12
|
+
var Fe;
|
|
13
|
+
function mt() {
|
|
14
|
+
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
15
|
+
var n = We, r = Symbol.for("react.element"), i = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), a = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), j = Symbol.iterator, x = "@@iterator";
|
|
16
16
|
function S(e) {
|
|
17
17
|
if (e === null || typeof e != "object")
|
|
18
18
|
return null;
|
|
@@ -37,23 +37,23 @@ function pt() {
|
|
|
37
37
|
E.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, E);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
var N = !1, W = !1, C = !1,
|
|
40
|
+
var N = !1, W = !1, C = !1, fe = !1, de = !1, z;
|
|
41
41
|
z = Symbol.for("react.module.reference");
|
|
42
|
-
function
|
|
43
|
-
return !!(typeof e == "string" || typeof e == "function" || e === u || e === v ||
|
|
42
|
+
function Le(e) {
|
|
43
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === v || de || e === f || e === y || e === p || fe || e === T || N || W || C || typeof e == "object" && e !== null && (e.$$typeof === a || e.$$typeof === R || e.$$typeof === d || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
|
|
44
44
|
// types supported by any Flight configuration anywhere since
|
|
45
45
|
// we don't know which Flight build this will end up being used
|
|
46
46
|
// with.
|
|
47
47
|
e.$$typeof === z || e.getModuleId !== void 0));
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Ve(e, t, o) {
|
|
50
50
|
var s = e.displayName;
|
|
51
51
|
if (s)
|
|
52
52
|
return s;
|
|
53
53
|
var m = t.displayName || t.name || "";
|
|
54
54
|
return m !== "" ? o + "(" + m + ")" : o;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function ve(e) {
|
|
57
57
|
return e.displayName || "Context";
|
|
58
58
|
}
|
|
59
59
|
function I(e) {
|
|
@@ -81,12 +81,12 @@ function pt() {
|
|
|
81
81
|
switch (e.$$typeof) {
|
|
82
82
|
case c:
|
|
83
83
|
var t = e;
|
|
84
|
-
return
|
|
84
|
+
return ve(t) + ".Consumer";
|
|
85
85
|
case d:
|
|
86
86
|
var o = e;
|
|
87
|
-
return
|
|
87
|
+
return ve(o._context) + ".Provider";
|
|
88
88
|
case l:
|
|
89
|
-
return
|
|
89
|
+
return Ve(e, e.render, "ForwardRef");
|
|
90
90
|
case R:
|
|
91
91
|
var s = e.displayName || null;
|
|
92
92
|
return s !== null ? s : I(e.type) || "Memo";
|
|
@@ -101,18 +101,18 @@ function pt() {
|
|
|
101
101
|
}
|
|
102
102
|
return null;
|
|
103
103
|
}
|
|
104
|
-
var L = Object.assign, U = 0,
|
|
105
|
-
function
|
|
104
|
+
var L = Object.assign, U = 0, ge, he, ye, me, pe, Ee, Re;
|
|
105
|
+
function we() {
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
function
|
|
107
|
+
we.__reactDisabledLog = !0;
|
|
108
|
+
function Me() {
|
|
109
109
|
{
|
|
110
110
|
if (U === 0) {
|
|
111
|
-
|
|
111
|
+
ge = console.log, he = console.info, ye = console.warn, me = console.error, pe = console.group, Ee = console.groupCollapsed, Re = console.groupEnd;
|
|
112
112
|
var e = {
|
|
113
113
|
configurable: !0,
|
|
114
114
|
enumerable: !0,
|
|
115
|
-
value:
|
|
115
|
+
value: we,
|
|
116
116
|
writable: !0
|
|
117
117
|
};
|
|
118
118
|
Object.defineProperties(console, {
|
|
@@ -128,7 +128,7 @@ function pt() {
|
|
|
128
128
|
U++;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function ze() {
|
|
132
132
|
{
|
|
133
133
|
if (U--, U === 0) {
|
|
134
134
|
var e = {
|
|
@@ -138,52 +138,52 @@ function pt() {
|
|
|
138
138
|
};
|
|
139
139
|
Object.defineProperties(console, {
|
|
140
140
|
log: L({}, e, {
|
|
141
|
-
value:
|
|
141
|
+
value: ge
|
|
142
142
|
}),
|
|
143
143
|
info: L({}, e, {
|
|
144
|
-
value:
|
|
144
|
+
value: he
|
|
145
145
|
}),
|
|
146
146
|
warn: L({}, e, {
|
|
147
|
-
value:
|
|
147
|
+
value: ye
|
|
148
148
|
}),
|
|
149
149
|
error: L({}, e, {
|
|
150
|
-
value:
|
|
150
|
+
value: me
|
|
151
151
|
}),
|
|
152
152
|
group: L({}, e, {
|
|
153
|
-
value:
|
|
153
|
+
value: pe
|
|
154
154
|
}),
|
|
155
155
|
groupCollapsed: L({}, e, {
|
|
156
|
-
value:
|
|
156
|
+
value: Ee
|
|
157
157
|
}),
|
|
158
158
|
groupEnd: L({}, e, {
|
|
159
|
-
value:
|
|
159
|
+
value: Re
|
|
160
160
|
})
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
U < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
var
|
|
166
|
+
var ee = D.ReactCurrentDispatcher, te;
|
|
167
167
|
function J(e, t, o) {
|
|
168
168
|
{
|
|
169
|
-
if (
|
|
169
|
+
if (te === void 0)
|
|
170
170
|
try {
|
|
171
171
|
throw Error();
|
|
172
172
|
} catch (m) {
|
|
173
173
|
var s = m.stack.trim().match(/\n( *(at )?)/);
|
|
174
|
-
|
|
174
|
+
te = s && s[1] || "";
|
|
175
175
|
}
|
|
176
176
|
return `
|
|
177
|
-
` +
|
|
177
|
+
` + te + e;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
var
|
|
180
|
+
var re = !1, Q;
|
|
181
181
|
{
|
|
182
|
-
var
|
|
183
|
-
Q = new
|
|
182
|
+
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
183
|
+
Q = new Ue();
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
if (!e ||
|
|
185
|
+
function _e(e, t) {
|
|
186
|
+
if (!e || re)
|
|
187
187
|
return "";
|
|
188
188
|
{
|
|
189
189
|
var o = Q.get(e);
|
|
@@ -191,11 +191,11 @@ function pt() {
|
|
|
191
191
|
return o;
|
|
192
192
|
}
|
|
193
193
|
var s;
|
|
194
|
-
|
|
194
|
+
re = !0;
|
|
195
195
|
var m = Error.prepareStackTrace;
|
|
196
196
|
Error.prepareStackTrace = void 0;
|
|
197
197
|
var E;
|
|
198
|
-
E =
|
|
198
|
+
E = ee.current, ee.current = null, Me();
|
|
199
199
|
try {
|
|
200
200
|
if (t) {
|
|
201
201
|
var h = function() {
|
|
@@ -248,15 +248,15 @@ function pt() {
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
} finally {
|
|
251
|
-
|
|
251
|
+
re = !1, ee.current = E, ze(), Error.prepareStackTrace = m;
|
|
252
252
|
}
|
|
253
|
-
var M = e ? e.displayName || e.name : "",
|
|
254
|
-
return typeof e == "function" && Q.set(e,
|
|
253
|
+
var M = e ? e.displayName || e.name : "", $e = M ? J(M) : "";
|
|
254
|
+
return typeof e == "function" && Q.set(e, $e), $e;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
return
|
|
256
|
+
function qe(e, t, o) {
|
|
257
|
+
return _e(e, !1);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Be(e) {
|
|
260
260
|
var t = e.prototype;
|
|
261
261
|
return !!(t && t.isReactComponent);
|
|
262
262
|
}
|
|
@@ -264,7 +264,7 @@ function pt() {
|
|
|
264
264
|
if (e == null)
|
|
265
265
|
return "";
|
|
266
266
|
if (typeof e == "function")
|
|
267
|
-
return
|
|
267
|
+
return _e(e, Be(e));
|
|
268
268
|
if (typeof e == "string")
|
|
269
269
|
return J(e);
|
|
270
270
|
switch (e) {
|
|
@@ -276,7 +276,7 @@ function pt() {
|
|
|
276
276
|
if (typeof e == "object")
|
|
277
277
|
switch (e.$$typeof) {
|
|
278
278
|
case l:
|
|
279
|
-
return
|
|
279
|
+
return qe(e.render);
|
|
280
280
|
case R:
|
|
281
281
|
return X(e.type, t, o);
|
|
282
282
|
case a: {
|
|
@@ -289,15 +289,15 @@ function pt() {
|
|
|
289
289
|
}
|
|
290
290
|
return "";
|
|
291
291
|
}
|
|
292
|
-
var H = Object.prototype.hasOwnProperty,
|
|
292
|
+
var H = Object.prototype.hasOwnProperty, be = {}, Ce = D.ReactDebugCurrentFrame;
|
|
293
293
|
function K(e) {
|
|
294
294
|
if (e) {
|
|
295
295
|
var t = e._owner, o = X(e.type, e._source, t ? t.type : null);
|
|
296
|
-
|
|
296
|
+
Ce.setExtraStackFrame(o);
|
|
297
297
|
} else
|
|
298
|
-
|
|
298
|
+
Ce.setExtraStackFrame(null);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Ge(e, t, o, s, m) {
|
|
301
301
|
{
|
|
302
302
|
var E = Function.call.bind(H);
|
|
303
303
|
for (var h in e)
|
|
@@ -312,42 +312,42 @@ function pt() {
|
|
|
312
312
|
} catch (_) {
|
|
313
313
|
g = _;
|
|
314
314
|
}
|
|
315
|
-
g && !(g instanceof Error) && (K(m), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", o, h, typeof g), K(null)), g instanceof Error && !(g.message in
|
|
315
|
+
g && !(g instanceof Error) && (K(m), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", o, h, typeof g), K(null)), g instanceof Error && !(g.message in be) && (be[g.message] = !0, K(m), w("Failed %s type: %s", o, g.message), K(null));
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
321
|
-
return
|
|
319
|
+
var Je = Array.isArray;
|
|
320
|
+
function ne(e) {
|
|
321
|
+
return Je(e);
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Qe(e) {
|
|
324
324
|
{
|
|
325
325
|
var t = typeof Symbol == "function" && Symbol.toStringTag, o = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
326
326
|
return o;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Xe(e) {
|
|
330
330
|
try {
|
|
331
|
-
return
|
|
331
|
+
return je(e), !1;
|
|
332
332
|
} catch {
|
|
333
333
|
return !0;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function je(e) {
|
|
337
337
|
return "" + e;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
if (
|
|
341
|
-
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
339
|
+
function Pe(e) {
|
|
340
|
+
if (Xe(e))
|
|
341
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), je(e);
|
|
342
342
|
}
|
|
343
|
-
var q = D.ReactCurrentOwner,
|
|
343
|
+
var q = D.ReactCurrentOwner, He = {
|
|
344
344
|
key: !0,
|
|
345
345
|
ref: !0,
|
|
346
346
|
__self: !0,
|
|
347
347
|
__source: !0
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
function
|
|
348
|
+
}, Te, xe, oe;
|
|
349
|
+
oe = {};
|
|
350
|
+
function Ke(e) {
|
|
351
351
|
if (H.call(e, "ref")) {
|
|
352
352
|
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
353
353
|
if (t && t.isReactWarning)
|
|
@@ -355,7 +355,7 @@ function pt() {
|
|
|
355
355
|
}
|
|
356
356
|
return e.ref !== void 0;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Ze(e) {
|
|
359
359
|
if (H.call(e, "key")) {
|
|
360
360
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
361
361
|
if (t && t.isReactWarning)
|
|
@@ -363,16 +363,16 @@ function pt() {
|
|
|
363
363
|
}
|
|
364
364
|
return e.key !== void 0;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function et(e, t) {
|
|
367
367
|
if (typeof e.ref == "string" && q.current && t && q.current.stateNode !== t) {
|
|
368
368
|
var o = I(q.current.type);
|
|
369
|
-
|
|
369
|
+
oe[o] || (w('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', I(q.current.type), e.ref), oe[o] = !0);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function tt(e, t) {
|
|
373
373
|
{
|
|
374
374
|
var o = function() {
|
|
375
|
-
|
|
375
|
+
Te || (Te = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
376
376
|
};
|
|
377
377
|
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
378
378
|
get: o,
|
|
@@ -380,10 +380,10 @@ function pt() {
|
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function rt(e, t) {
|
|
384
384
|
{
|
|
385
385
|
var o = function() {
|
|
386
|
-
|
|
386
|
+
xe || (xe = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
387
387
|
};
|
|
388
388
|
o.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
389
389
|
get: o,
|
|
@@ -391,7 +391,7 @@ function pt() {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
var
|
|
394
|
+
var nt = function(e, t, o, s, m, E, h) {
|
|
395
395
|
var g = {
|
|
396
396
|
// This tag allows us to uniquely identify this as a React Element
|
|
397
397
|
$$typeof: r,
|
|
@@ -420,12 +420,12 @@ function pt() {
|
|
|
420
420
|
value: m
|
|
421
421
|
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
422
422
|
};
|
|
423
|
-
function
|
|
423
|
+
function ot(e, t, o, s, m) {
|
|
424
424
|
{
|
|
425
425
|
var E, h = {}, g = null, P = null;
|
|
426
|
-
o !== void 0 && (
|
|
426
|
+
o !== void 0 && (Pe(o), g = "" + o), Ze(t) && (Pe(t.key), g = "" + t.key), Ke(t) && (P = t.ref, et(t, m));
|
|
427
427
|
for (E in t)
|
|
428
|
-
H.call(t, E) && !
|
|
428
|
+
H.call(t, E) && !He.hasOwnProperty(E) && (h[E] = t[E]);
|
|
429
429
|
if (e && e.defaultProps) {
|
|
430
430
|
var _ = e.defaultProps;
|
|
431
431
|
for (E in _)
|
|
@@ -433,28 +433,28 @@ function pt() {
|
|
|
433
433
|
}
|
|
434
434
|
if (g || P) {
|
|
435
435
|
var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
436
|
-
g &&
|
|
436
|
+
g && tt(h, b), P && rt(h, b);
|
|
437
437
|
}
|
|
438
|
-
return
|
|
438
|
+
return nt(e, g, P, m, s, q.current, h);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
var
|
|
441
|
+
var ie = D.ReactCurrentOwner, Se = D.ReactDebugCurrentFrame;
|
|
442
442
|
function V(e) {
|
|
443
443
|
if (e) {
|
|
444
444
|
var t = e._owner, o = X(e.type, e._source, t ? t.type : null);
|
|
445
|
-
|
|
445
|
+
Se.setExtraStackFrame(o);
|
|
446
446
|
} else
|
|
447
|
-
|
|
447
|
+
Se.setExtraStackFrame(null);
|
|
448
448
|
}
|
|
449
|
-
var
|
|
450
|
-
|
|
451
|
-
function
|
|
449
|
+
var ae;
|
|
450
|
+
ae = !1;
|
|
451
|
+
function ue(e) {
|
|
452
452
|
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Oe() {
|
|
455
455
|
{
|
|
456
|
-
if (
|
|
457
|
-
var e = I(
|
|
456
|
+
if (ie.current) {
|
|
457
|
+
var e = I(ie.current.type);
|
|
458
458
|
if (e)
|
|
459
459
|
return `
|
|
460
460
|
|
|
@@ -463,7 +463,7 @@ Check the render method of \`` + e + "`.";
|
|
|
463
463
|
return "";
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function it(e) {
|
|
467
467
|
{
|
|
468
468
|
if (e !== void 0) {
|
|
469
469
|
var t = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
|
|
@@ -474,10 +474,10 @@ Check your code at ` + t + ":" + o + ".";
|
|
|
474
474
|
return "";
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
function
|
|
477
|
+
var Ae = {};
|
|
478
|
+
function at(e) {
|
|
479
479
|
{
|
|
480
|
-
var t =
|
|
480
|
+
var t = Oe();
|
|
481
481
|
if (!t) {
|
|
482
482
|
var o = typeof e == "string" ? e : e.displayName || e.name;
|
|
483
483
|
o && (t = `
|
|
@@ -487,39 +487,39 @@ Check the top-level render call using <` + o + ">.");
|
|
|
487
487
|
return t;
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function De(e, t) {
|
|
491
491
|
{
|
|
492
492
|
if (!e._store || e._store.validated || e.key != null)
|
|
493
493
|
return;
|
|
494
494
|
e._store.validated = !0;
|
|
495
|
-
var o =
|
|
496
|
-
if (
|
|
495
|
+
var o = at(t);
|
|
496
|
+
if (Ae[o])
|
|
497
497
|
return;
|
|
498
|
-
|
|
498
|
+
Ae[o] = !0;
|
|
499
499
|
var s = "";
|
|
500
|
-
e && e._owner && e._owner !==
|
|
500
|
+
e && e._owner && e._owner !== ie.current && (s = " It was passed a child from " + I(e._owner.type) + "."), V(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, s), V(null);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function ke(e, t) {
|
|
504
504
|
{
|
|
505
505
|
if (typeof e != "object")
|
|
506
506
|
return;
|
|
507
|
-
if (
|
|
507
|
+
if (ne(e))
|
|
508
508
|
for (var o = 0; o < e.length; o++) {
|
|
509
509
|
var s = e[o];
|
|
510
|
-
|
|
510
|
+
ue(s) && De(s, t);
|
|
511
511
|
}
|
|
512
|
-
else if (
|
|
512
|
+
else if (ue(e))
|
|
513
513
|
e._store && (e._store.validated = !0);
|
|
514
514
|
else if (e) {
|
|
515
515
|
var m = S(e);
|
|
516
516
|
if (typeof m == "function" && m !== e.entries)
|
|
517
517
|
for (var E = m.call(e), h; !(h = E.next()).done; )
|
|
518
|
-
|
|
518
|
+
ue(h.value) && De(h.value, t);
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function ut(e) {
|
|
523
523
|
{
|
|
524
524
|
var t = e.type;
|
|
525
525
|
if (t == null || typeof t == "string")
|
|
@@ -535,16 +535,16 @@ Check the top-level render call using <` + o + ">.");
|
|
|
535
535
|
return;
|
|
536
536
|
if (o) {
|
|
537
537
|
var s = I(t);
|
|
538
|
-
|
|
539
|
-
} else if (t.PropTypes !== void 0 && !
|
|
540
|
-
|
|
538
|
+
Ge(o, e.props, "prop", s, e);
|
|
539
|
+
} else if (t.PropTypes !== void 0 && !ae) {
|
|
540
|
+
ae = !0;
|
|
541
541
|
var m = I(t);
|
|
542
542
|
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
|
|
543
543
|
}
|
|
544
544
|
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function ct(e) {
|
|
548
548
|
{
|
|
549
549
|
for (var t = Object.keys(e.props), o = 0; o < t.length; o++) {
|
|
550
550
|
var s = t[o];
|
|
@@ -556,44 +556,44 @@ Check the top-level render call using <` + o + ">.");
|
|
|
556
556
|
e.ref !== null && (V(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Ie(e, t, o, s, m, E) {
|
|
560
560
|
{
|
|
561
|
-
var h =
|
|
561
|
+
var h = Le(e);
|
|
562
562
|
if (!h) {
|
|
563
563
|
var g = "";
|
|
564
564
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (g += " 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 P =
|
|
566
|
-
P ? g += P : g +=
|
|
565
|
+
var P = it(m);
|
|
566
|
+
P ? g += P : g += Oe();
|
|
567
567
|
var _;
|
|
568
|
-
e === null ? _ = "null" :
|
|
568
|
+
e === null ? _ = "null" : ne(e) ? _ = "array" : e !== void 0 && e.$$typeof === r ? (_ = "<" + (I(e.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, g);
|
|
569
569
|
}
|
|
570
|
-
var b =
|
|
570
|
+
var b = ot(e, t, o, m, E);
|
|
571
571
|
if (b == null)
|
|
572
572
|
return b;
|
|
573
573
|
if (h) {
|
|
574
574
|
var O = t.children;
|
|
575
575
|
if (O !== void 0)
|
|
576
576
|
if (s)
|
|
577
|
-
if (
|
|
577
|
+
if (ne(O)) {
|
|
578
578
|
for (var M = 0; M < O.length; M++)
|
|
579
|
-
|
|
579
|
+
ke(O[M], e);
|
|
580
580
|
Object.freeze && Object.freeze(O);
|
|
581
581
|
} else
|
|
582
582
|
w("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
583
|
else
|
|
584
|
-
|
|
584
|
+
ke(O, e);
|
|
585
585
|
}
|
|
586
|
-
return e === u ?
|
|
586
|
+
return e === u ? ct(b) : ut(b), b;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
return
|
|
589
|
+
function st(e, t, o) {
|
|
590
|
+
return Ie(e, t, o, !0);
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
592
|
+
function lt(e, t, o) {
|
|
593
|
+
return Ie(e, t, o, !1);
|
|
594
594
|
}
|
|
595
|
-
var
|
|
596
|
-
B.Fragment = u, B.jsx =
|
|
595
|
+
var ft = lt, dt = st;
|
|
596
|
+
B.Fragment = u, B.jsx = ft, B.jsxs = dt;
|
|
597
597
|
}()), B;
|
|
598
598
|
}
|
|
599
599
|
var G = {};
|
|
@@ -606,12 +606,12 @@ var G = {};
|
|
|
606
606
|
* This source code is licensed under the MIT license found in the
|
|
607
607
|
* LICENSE file in the root directory of this source tree.
|
|
608
608
|
*/
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
if (
|
|
609
|
+
var Ye;
|
|
610
|
+
function pt() {
|
|
611
|
+
if (Ye)
|
|
612
612
|
return G;
|
|
613
|
-
|
|
614
|
-
var n =
|
|
613
|
+
Ye = 1;
|
|
614
|
+
var n = We, r = Symbol.for("react.element"), i = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, f = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
615
615
|
function d(c, l, y) {
|
|
616
616
|
var p, R = {}, a = null, T = null;
|
|
617
617
|
y !== void 0 && (a = "" + y), l.key !== void 0 && (a = "" + l.key), l.ref !== void 0 && (T = l.ref);
|
|
@@ -624,10 +624,10 @@ function Et() {
|
|
|
624
624
|
}
|
|
625
625
|
return G.Fragment = i, G.jsx = d, G.jsxs = d, G;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var F =
|
|
629
|
-
const A =
|
|
630
|
-
const u =
|
|
627
|
+
process.env.NODE_ENV === "production" ? se.exports = pt() : se.exports = mt();
|
|
628
|
+
var F = se.exports;
|
|
629
|
+
const A = vt({}), Pt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
630
|
+
const u = le(
|
|
631
631
|
() => ({
|
|
632
632
|
apiURL: r,
|
|
633
633
|
libraries: i
|
|
@@ -635,7 +635,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
635
635
|
[r, i]
|
|
636
636
|
);
|
|
637
637
|
return /* @__PURE__ */ F.jsx(A.Provider, { value: u, children: n });
|
|
638
|
-
},
|
|
638
|
+
}, Tt = ({
|
|
639
639
|
Fallback: n,
|
|
640
640
|
isLogged: r,
|
|
641
641
|
loginPath: i = "/login",
|
|
@@ -649,8 +649,8 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
649
649
|
throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
650
650
|
if (c === void 0)
|
|
651
651
|
throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
652
|
-
const [y, p] =
|
|
653
|
-
return
|
|
652
|
+
const [y, p] = gt(null), { useLocation: R, Navigate: a, Outlet: T } = l, j = R(), x = ht(!1), S = typeof r == "function" ? r() : !!r, D = typeof S == "boolean" ? S : S == null ? void 0 : S.isLogged;
|
|
653
|
+
return Z(() => {
|
|
654
654
|
x.current || (x.current = !0, c == null || c.interceptors.response.use(
|
|
655
655
|
(C) => C,
|
|
656
656
|
async (C) => {
|
|
@@ -658,18 +658,18 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
658
658
|
return typeof C == "object" && C && "response" in C && C.response && typeof C.response == "object" && "status" in C.response && C.response && typeof C.response == "object" && "status" in C.response && ((z = C == null ? void 0 : C.response) == null ? void 0 : z.status) === 401 && (c.defaults.headers.common.Authorization = null, localStorage.removeItem(u), p(f)), Promise.reject(C);
|
|
659
659
|
}
|
|
660
660
|
));
|
|
661
|
-
}, [c == null ? void 0 : c.defaults.headers.common, c == null ? void 0 : c.interceptors.response, u, f]), D && !y ? /* @__PURE__ */ F.jsx(
|
|
662
|
-
},
|
|
661
|
+
}, [c == null ? void 0 : c.defaults.headers.common, c == null ? void 0 : c.interceptors.response, u, f]), D && !y ? /* @__PURE__ */ F.jsx(yt, { fallback: n, children: (Y = (w = j.state) == null ? void 0 : w.from) != null && Y.state && ((W = (N = j.state) == null ? void 0 : N.from) == null ? void 0 : W.pathname) === i ? /* @__PURE__ */ F.jsx(a, { to: j.state.from.state.from.pathname + j.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ F.jsx(T, {}) }) : /* @__PURE__ */ F.jsx(a, { to: i, state: { from: j }, replace: !0 });
|
|
662
|
+
}, xt = ({ ...n }) => {
|
|
663
663
|
const { libraries: r } = k(A), i = (n == null ? void 0 : n.reactRouter) || (r == null ? void 0 : r.reactRouter), u = (n == null ? void 0 : n.gtm) || (r == null ? void 0 : r.gtm);
|
|
664
664
|
if (i === void 0)
|
|
665
665
|
throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
666
666
|
if (u === void 0)
|
|
667
667
|
throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
668
668
|
const { useGoogleTagManager: f } = u, { useLocation: v, Outlet: d } = i, { pathname: c } = v(), { sendEvent: l } = f();
|
|
669
|
-
return
|
|
669
|
+
return Z(() => {
|
|
670
670
|
l({ event: "pageView", pathname: c });
|
|
671
671
|
}, [c, l]), /* @__PURE__ */ F.jsx(d, {});
|
|
672
|
-
},
|
|
672
|
+
}, St = ({
|
|
673
673
|
tokenTypeKey: n = "tokenType",
|
|
674
674
|
userLocalStorageKey: r = "user",
|
|
675
675
|
tokenKey: i = "accessToken",
|
|
@@ -683,7 +683,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
683
683
|
return null;
|
|
684
684
|
const l = localStorage.getItem(r), y = l ? JSON.parse(l) : null, p = y != null && y[n] ? y[n] : null, R = y != null && y[i] ? y[i] : null, a = l ? `${p} ${R}` : null;
|
|
685
685
|
return c.defaults.baseURL = v, c.defaults.headers.post["Content-Type"] = u, a && (c.defaults.headers.common.Authorization = a), null;
|
|
686
|
-
},
|
|
686
|
+
}, Ot = ({ debug: n, resources: r, ...i }) => {
|
|
687
687
|
const { libraries: u } = k(A), f = (i == null ? void 0 : i.i18) || (u == null ? void 0 : u.i18), { i18next: v, initReactI18next: d, languageDetector: c } = f || {};
|
|
688
688
|
if (f === void 0)
|
|
689
689
|
throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
@@ -705,7 +705,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
705
705
|
}), v.on("languageChanged", (l) => {
|
|
706
706
|
document.documentElement.setAttribute("lang", l);
|
|
707
707
|
})), null;
|
|
708
|
-
},
|
|
708
|
+
}, At = ({
|
|
709
709
|
dsn: n,
|
|
710
710
|
integrations: r,
|
|
711
711
|
tracesSampleRate: i,
|
|
@@ -731,7 +731,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
731
731
|
R.reactRouterV6BrowserTracingIntegration({
|
|
732
732
|
createRoutesFromChildren: T,
|
|
733
733
|
matchRoutes: j,
|
|
734
|
-
useEffect:
|
|
734
|
+
useEffect: Z,
|
|
735
735
|
useLocation: x,
|
|
736
736
|
useNavigationType: S
|
|
737
737
|
}),
|
|
@@ -742,23 +742,23 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
742
742
|
tracePropagationTargets: v,
|
|
743
743
|
tracesSampleRate: i || 1
|
|
744
744
|
}), null;
|
|
745
|
-
},
|
|
746
|
-
const i =
|
|
745
|
+
}, Dt = ({ IMaskMixin: n, ...r }) => {
|
|
746
|
+
const i = le(
|
|
747
747
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
748
748
|
() => n(({ TextField: u, ...f }) => /* @__PURE__ */ F.jsx(u, { ...f })),
|
|
749
749
|
[n]
|
|
750
750
|
);
|
|
751
751
|
return /* @__PURE__ */ F.jsx(i, { ...r });
|
|
752
|
-
},
|
|
752
|
+
}, kt = ({ accessToken: n, ...r }) => {
|
|
753
753
|
const { libraries: i } = k(A), u = (r == null ? void 0 : r.mapbox) || (i == null ? void 0 : i.mapbox);
|
|
754
754
|
if (u === void 0)
|
|
755
755
|
throw new Error("Mapbox is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
756
756
|
return n && (u.accessToken = n), null;
|
|
757
|
-
},
|
|
757
|
+
}, It = ({ language: n, ...r }) => {
|
|
758
758
|
const { libraries: i } = k(A), u = (r == null ? void 0 : r.dayjs) || (i == null ? void 0 : i.dayjs), f = (r == null ? void 0 : r.dayjsPlugin) || (i == null ? void 0 : i.dayjsPlugin);
|
|
759
759
|
if (u === void 0)
|
|
760
760
|
throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
761
|
-
return
|
|
761
|
+
return Z(() => {
|
|
762
762
|
(async () => {
|
|
763
763
|
var c;
|
|
764
764
|
const d = n || ((c = navigator.language) == null ? void 0 : c.slice(0, 2)) || "en";
|
|
@@ -767,7 +767,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
767
767
|
}), u.locale(d);
|
|
768
768
|
})().then();
|
|
769
769
|
}, [u, f, n]), null;
|
|
770
|
-
},
|
|
770
|
+
}, $t = ({
|
|
771
771
|
children: n,
|
|
772
772
|
defaultQueriesOptions: r,
|
|
773
773
|
defaultMutationsOptions: i,
|
|
@@ -793,12 +793,12 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
793
793
|
}
|
|
794
794
|
});
|
|
795
795
|
return /* @__PURE__ */ F.jsx(d, { client: c, children: n });
|
|
796
|
-
},
|
|
796
|
+
}, Ft = (n) => {
|
|
797
797
|
var y, p;
|
|
798
798
|
const { libraries: r } = k(A), i = (n == null ? void 0 : n.i18) || (r == null ? void 0 : r.i18), u = ((y = n == null ? void 0 : n.i18) == null ? void 0 : y.translateFunction) || ((p = r == null ? void 0 : r.i18) == null ? void 0 : p.translateFunction);
|
|
799
799
|
if (i === void 0)
|
|
800
800
|
throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in params of useResponseError.");
|
|
801
|
-
const f = i.i18next.t || u || ((R) => R), { unknownErrorTranslationKey: v = "error.unknownError" } = n || {}, d = f(v), c =
|
|
801
|
+
const f = i.i18next.t || u || ((R) => R), { unknownErrorTranslationKey: v = "error.unknownError" } = n || {}, d = f(v), c = ce(
|
|
802
802
|
(R) => {
|
|
803
803
|
var T, j, x, S, D, w, Y, N, W;
|
|
804
804
|
const { response: a } = R || {};
|
|
@@ -806,12 +806,12 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
806
806
|
},
|
|
807
807
|
[d]
|
|
808
808
|
);
|
|
809
|
-
return { getErrorCode:
|
|
809
|
+
return { getErrorCode: ce((R) => {
|
|
810
810
|
var T, j, x;
|
|
811
811
|
const { response: a } = R || {};
|
|
812
812
|
return a != null && a.error_code ? String(a == null ? void 0 : a.error_code) : (T = a == null ? void 0 : a.data) != null && T.error_code ? String((j = a == null ? void 0 : a.data) == null ? void 0 : j.error_code) : a != null && a.error_code ? String(a == null ? void 0 : a.error_code) : (x = a == null ? void 0 : a.data) != null && x.error_code ? String(a.data.error_code) : "unknown_error_code";
|
|
813
813
|
}, []), printError: c };
|
|
814
|
-
},
|
|
814
|
+
}, Yt = ({
|
|
815
815
|
data: n,
|
|
816
816
|
fetchNextPage: r,
|
|
817
817
|
isFetchingNextPage: i,
|
|
@@ -819,12 +819,12 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
819
819
|
isLoading: f,
|
|
820
820
|
enabled: v = !0
|
|
821
821
|
}) => {
|
|
822
|
-
const d =
|
|
822
|
+
const d = ce(
|
|
823
823
|
async (l) => {
|
|
824
824
|
i || !v || await r({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
|
|
825
825
|
},
|
|
826
826
|
[v, r, i]
|
|
827
|
-
), c =
|
|
827
|
+
), c = le(() => {
|
|
828
828
|
if (n)
|
|
829
829
|
return n.pages.reduce((l, y) => [...l, ...y], []);
|
|
830
830
|
}, [n]);
|
|
@@ -834,7 +834,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
834
834
|
loadingVariant: u ? "skeleton" : "linear",
|
|
835
835
|
rows: c
|
|
836
836
|
};
|
|
837
|
-
},
|
|
837
|
+
}, Nt = (n) => {
|
|
838
838
|
const { libraries: r } = k(A), i = (n == null ? void 0 : n.axios) || (r == null ? void 0 : r.axios);
|
|
839
839
|
if (i === void 0)
|
|
840
840
|
throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");
|
|
@@ -846,18 +846,18 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
846
846
|
i.defaults.headers.common.Authorization = `${v} ${d}`;
|
|
847
847
|
}
|
|
848
848
|
};
|
|
849
|
-
},
|
|
849
|
+
}, Et = (n, r = "km") => {
|
|
850
850
|
const i = Number(n);
|
|
851
851
|
return Number.isNaN(i) ? `0 ${r}` : `${i.toFixed(2)} ${r}`;
|
|
852
|
-
},
|
|
852
|
+
}, Rt = (n) => {
|
|
853
853
|
const r = n && typeof n == "object" && "pathname" in n && n.pathname ? n.pathname : n;
|
|
854
854
|
return typeof r == "string" ? r != null && r.startsWith("/") ? r != null && r.startsWith("/files") ? r : `/files${r}` : r != null && r.startsWith("files") ? `/${r}` : r != null && r.startsWith("files") ? `/${r}` : `/files/${r}` : r;
|
|
855
|
-
},
|
|
855
|
+
}, Ne = (n, r) => {
|
|
856
856
|
if (!n)
|
|
857
857
|
return "";
|
|
858
|
-
const i =
|
|
858
|
+
const i = Rt(n), u = typeof n == "object" && "pathname" in n ? `${n.origin}${i}` : n;
|
|
859
859
|
return typeof r == "number" ? `${u.replace("/files", `/thumbs/${r}`)}` : u;
|
|
860
|
-
},
|
|
860
|
+
}, Wt = (n) => {
|
|
861
861
|
const { apiURL: r, libraries: i } = k(A), u = (n == null ? void 0 : n.dayjs) || (i == null ? void 0 : i.dayjs);
|
|
862
862
|
return {
|
|
863
863
|
dateAdapter: (d, c = "ll") => {
|
|
@@ -865,8 +865,8 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
865
865
|
throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
866
866
|
return u(d).format(c);
|
|
867
867
|
},
|
|
868
|
-
distanceAdapter:
|
|
869
|
-
filePathAdapter: (d, c) =>
|
|
868
|
+
distanceAdapter: Et,
|
|
869
|
+
filePathAdapter: (d, c) => Ne(
|
|
870
870
|
r && typeof d == "string" ? {
|
|
871
871
|
origin: r,
|
|
872
872
|
pathname: d
|
|
@@ -874,13 +874,13 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
874
874
|
c
|
|
875
875
|
)
|
|
876
876
|
};
|
|
877
|
-
},
|
|
877
|
+
}, wt = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), _t = (n) => {
|
|
878
878
|
const u = n.split("/").filter((f) => f.length > 0).map((f) => f.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
|
|
879
879
|
return u.charAt(0).toLowerCase() + u.slice(1);
|
|
880
|
-
},
|
|
881
|
-
const u =
|
|
880
|
+
}, bt = (n, r, i) => {
|
|
881
|
+
const u = _t(r), f = wt(i);
|
|
882
882
|
return `${u}${f}`;
|
|
883
|
-
},
|
|
883
|
+
}, Ct = (n) => {
|
|
884
884
|
if (n)
|
|
885
885
|
return (n == null ? void 0 : n.reduce((r, i) => (r[i] = {
|
|
886
886
|
query: {
|
|
@@ -889,7 +889,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
889
889
|
useQuery: !0
|
|
890
890
|
}
|
|
891
891
|
}, r), {})) || {};
|
|
892
|
-
},
|
|
892
|
+
}, Lt = (n) => {
|
|
893
893
|
const { input: r = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = n || {};
|
|
894
894
|
return {
|
|
895
895
|
api: {
|
|
@@ -910,8 +910,8 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
910
910
|
name: "axiosCustomInstance",
|
|
911
911
|
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
912
912
|
},
|
|
913
|
-
operationName:
|
|
914
|
-
...(i == null ? void 0 : i.length) && { operations:
|
|
913
|
+
operationName: bt,
|
|
914
|
+
...(i == null ? void 0 : i.length) && { operations: Ct(i) },
|
|
915
915
|
query: {
|
|
916
916
|
useQuery: !0
|
|
917
917
|
}
|
|
@@ -921,24 +921,24 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
|
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
923
|
};
|
|
924
|
-
},
|
|
924
|
+
}, Vt = (n, r, i = "ll") => String(n(r).format(i));
|
|
925
925
|
export {
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
926
|
+
xt as GTMSendPageView,
|
|
927
|
+
St as InitializeAxiosConfig,
|
|
928
|
+
It as InitializeDaysJSConfig,
|
|
929
|
+
Ot as InitializeI18nConfig,
|
|
930
|
+
kt as InitializeMapBoxConfig,
|
|
931
|
+
At as InitializeSentryConfig,
|
|
932
932
|
A as InjectDependenciesContext,
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
933
|
+
Pt as InjectDependenciesProvider,
|
|
934
|
+
Dt as MaskTextField,
|
|
935
|
+
$t as QueryClientProviderWithConfig,
|
|
936
|
+
Tt as RequireAuth,
|
|
937
|
+
Vt as dateAdapter,
|
|
938
|
+
Et as distanceAdapter,
|
|
939
|
+
Lt as getOrvalConfig,
|
|
940
|
+
Wt as useAdapter,
|
|
941
|
+
Nt as useAuth,
|
|
942
|
+
Yt as useInfiniteDataGrid,
|
|
943
|
+
Ft as useResponseError
|
|
944
944
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -24,4 +24,4 @@ Check the top-level render call using <`+o+">.")}return t}}function ke(e,t){{if(
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license found in the
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var le;function Le(){if(le)return G;le=1;var n=m,r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,f=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function d(c,l,y){var E,w={},a=null,x=null;y!==void 0&&(a=""+y),l.key!==void 0&&(a=""+l.key),l.ref!==void 0&&(x=l.ref);for(E in l)u.call(l,E)&&!v.hasOwnProperty(E)&&(w[E]=l[E]);if(c&&c.defaultProps)for(E in l=c.defaultProps,l)w[E]===void 0&&(w[E]=l[E]);return{$$typeof:r,type:c,key:a,ref:x,props:w,_owner:f.current}}return G.Fragment=i,G.jsx=d,G.jsxs=d,G}process.env.NODE_ENV==="production"?ee.exports=Le():ee.exports=Ne();var F=ee.exports;const O=m.createContext({}),Me=({children:n,apiURL:r,libraries:i})=>{const u=m.useMemo(()=>({apiURL:r,libraries:i}),[r,i]);return F.jsx(O.Provider,{value:u,children:n})},ze=({Fallback:n,isLogged:r,loginPath:i="/login",localStorageKey:u="user",redirect401Path:f="/login",...v})=>{var C,N,L,M;const{libraries:d}=m.useContext(O),c=(v==null?void 0:v.axios)||(d==null?void 0:d.axios),l=(v==null?void 0:v.reactRouter)||(d==null?void 0:d.reactRouter);if(l===void 0)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(c===void 0)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const[y,E]=m.useState(null),{useLocation:w,Navigate:a,Outlet:x}=l,T=w(),A=m.useRef(!1),D=typeof r=="function"?r():!!r,k=typeof D=="boolean"?D:D==null?void 0:D.isLogged;return m.useLayoutEffect(()=>{A.current||(A.current=!0,c==null||c.interceptors.response.use(P=>P,async P=>{var J;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&&((J=P==null?void 0:P.response)==null?void 0:J.status)===401&&(c.defaults.headers.common.Authorization=null,localStorage.removeItem(u),E(f)),Promise.reject(P)}))},[c==null?void 0:c.defaults.headers.common,c==null?void 0:c.interceptors.response,u,f]),k&&!y?F.jsx(m.Suspense,{fallback:n,children:(N=(C=T.state)==null?void 0:C.from)!=null&&N.state&&((M=(L=T.state)==null?void 0:L.from)==null?void 0:M.pathname)===i?F.jsx(a,{to:T.state.from.state.from.pathname+T.state.from.state.from.search,replace:!0}):F.jsx(x,{})}):F.jsx(a,{to:i,state:{from:T},replace:!0})},Ve=({...n})=>{const{libraries:r}=m.useContext(O),i=(n==null?void 0:n.reactRouter)||(r==null?void 0:r.reactRouter),u=(n==null?void 0:n.gtm)||(r==null?void 0:r.gtm);if(i===void 0)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(u===void 0)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const{useGoogleTagManager:f}=u,{useLocation:v,Outlet:d}=i,{pathname:c}=v(),{sendEvent:l}=f();return m.useEffect(()=>{l({event:"pageView",pathname:c})},[c,l]),F.jsx(d,{})},Ue=({tokenTypeKey:n="tokenType",userLocalStorageKey:r="user",tokenKey:i="accessToken",postContentType:u="application/json",...f})=>{const{apiURL:v=f.apiURL,libraries:d}=m.useContext(O),c=(f==null?void 0:f.axios)||(d==null?void 0:d.axios);if(c===void 0)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!c.defaults)return null;const l=localStorage.getItem(r),y=l?JSON.parse(l):null,E=y!=null&&y[n]?y[n]:null,w=y!=null&&y[i]?y[i]:null,a=l?`${E} ${w}`:null;return c.defaults.baseURL=v,c.defaults.headers.post["Content-Type"]=u,a&&(c.defaults.headers.common.Authorization=a),null},Be=({debug:n,resources:r,...i})=>{const{libraries:u}=m.useContext(O),f=(i==null?void 0:i.i18)||(u==null?void 0:u.i18),{i18next:v,initReactI18next:d,languageDetector:c}=f||{};if(f===void 0)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return v!=null&&v.isInitialized||(v.use(c).use(d).init({debug:n,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:r,returnNull:!1}).then(()=>{document.documentElement.lang!==v.resolvedLanguage&&v.resolvedLanguage&&document.documentElement.setAttribute("lang",v.resolvedLanguage)}),v.on("languageChanged",l=>{document.documentElement.setAttribute("lang",l)})),null},Ge=({dsn:n,integrations:r,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:f,tracePropagationTargets:v,ignoreErrors:d,debug:c,environment:l,...y})=>{const{libraries:E}=m.useContext(O),w=(y==null?void 0:y.sentry)||(E==null?void 0:E.sentry),a=(y==null?void 0:y.reactRouter)||(E==null?void 0:E.reactRouter),{createRoutesFromChildren:x,matchRoutes:T,useLocation:A,useNavigationType:D}=a;if(w===void 0)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(a===void 0)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return w.isInitialized()||(c||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&w.init({debug:c,dsn:n,environment:l||"production",ignoreErrors:[...d||[],/dynamically imported module/],integrations:[w.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:x,matchRoutes:T,useEffect:m.useEffect,useLocation:A,useNavigationType:D}),...r||[]],replaysOnErrorSampleRate:f||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:v,tracesSampleRate:i||1}),null},Je=({IMaskMixin:n,...r})=>{const i=m.useMemo(()=>n(({TextField:u,...f})=>F.jsx(u,{...f})),[n]);return F.jsx(i,{...r})},Qe=({accessToken:n,...r})=>{const{libraries:i}=m.useContext(O),u=(r==null?void 0:r.mapbox)||(i==null?void 0:i.mapbox);if(u===void 0)throw new Error("Mapbox is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return n&&(u.accessToken=n),null},Xe=({language:n,...r})=>{const{libraries:i}=m.useContext(O),u=(r==null?void 0:r.dayjs)||(i==null?void 0:i.dayjs),f=(r==null?void 0:r.dayjsPlugin)||(i==null?void 0:i.dayjsPlugin);if(u===void 0)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return m.useLayoutEffect(()=>{(async()=>{var c;const d=n||((c=navigator.language)==null?void 0:c.slice(0,2))||"en";f&&f.forEach(l=>{u.extend(l.default)}),u.locale(d)})().then()},[u,f,n]),null},He=({children:n,defaultQueriesOptions:r,defaultMutationsOptions:i,...u})=>{var l,y;const{libraries:f}=m.useContext(O),v=(u==null?void 0:u.QueryClient)||((l=f==null?void 0:f.reactQuery)==null?void 0:l.QueryClient),d=(u==null?void 0:u.QueryClientProvider)||((y=f==null?void 0:f.reactQuery)==null?void 0:y.QueryClientProvider);if(v===void 0)throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(d===void 0)throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const c=new v({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(E,w,a)=>E.length+(a||0),refetchOnWindowFocus:!1,retry:3,...r}}});return F.jsx(d,{client:c,children:n})},Ke=n=>{var y,E;const{libraries:r}=m.useContext(O),i=(n==null?void 0:n.i18)||(r==null?void 0:r.i18),u=((y=n==null?void 0:n.i18)==null?void 0:y.translateFunction)||((E=r==null?void 0:r.i18)==null?void 0:E.translateFunction);if(i===void 0)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in params of useResponseError.");const f=i.i18next.t||u||(w=>w),{unknownErrorTranslationKey:v="error.unknownError"}=n||{},d=f(v),c=m.useCallback(w=>{var x,T,A,D,k,C,N,L,M;const{response:a}=w||{};return a!=null&&a.reason?String(a.reason):(x=a==null?void 0:a.data)!=null&&x.reason?String(a.data.reason):(T=a==null?void 0:a.data)!=null&&T.message?String(a.data.message):(D=(A=a==null?void 0:a.data)==null?void 0:A.detail)!=null&&D.length&&Array.isArray((k=a==null?void 0:a.data)==null?void 0:k.detail)&&((N=(C=a==null?void 0:a.data)==null?void 0:C.detail[0])!=null&&N.msg)&&typeof((M=(L=a==null?void 0:a.data)==null?void 0:L.detail[0])==null?void 0:M.msg)=="string"?String(a.data.detail[0].msg):d},[d]);return{getErrorCode:m.useCallback(w=>{var x,T,A;const{response:a}=w||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(x=a==null?void 0:a.data)!=null&&x.error_code?String((T=a==null?void 0:a.data)==null?void 0:T.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(A=a==null?void 0:a.data)!=null&&A.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:c}},Ze=({data:n,fetchNextPage:r,isFetchingNextPage:i,isInitialLoading:u,isLoading:f,enabled:v=!0})=>{const d=m.useCallback(async l=>{i||!v||await r({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[v,r,i]),c=m.useMemo(()=>{if(n)return n.pages.reduce((l,y)=>[...l,...y],[])},[n]);return{fetchNextPageOnRowsScrollEnd:d,isLoading:i||f,loadingVariant:u?"skeleton":"linear",rows:c}},$e=n=>{const{libraries:r}=m.useContext(O),i=(n==null?void 0:n.axios)||(r==null?void 0:r.axios);if(i===void 0)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");return{clearAuthenticationToken:()=>{i.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:v,accessToken:d})=>{i.defaults.headers.common.Authorization=`${v} ${d}`}}},fe=(n,r="km")=>{const i=Number(n);return Number.isNaN(i)?`0 ${r}`:`${i.toFixed(2)} ${r}`},qe=n=>{const r=n&&typeof n=="object"&&"pathname"in n&&n.pathname?n.pathname:n;return typeof r=="string"?r!=null&&r.startsWith("/")?r!=null&&r.startsWith("/files")?r:`/files${r}`:r!=null&&r.startsWith("files")?`/${r}`:r!=null&&r.startsWith("files")?`/${r}`:`/files/${r}`:r},de=(n,r)=>{if(!n)return"";const i=qe(n),u=typeof n=="object"&&"pathname"in n?`${n.origin}${i}`:n;return typeof r=="number"?`${u.replace("/files",`/thumbs/${r}`)}`:u},et=n=>{const{apiURL:r,libraries:i}=m.useContext(O),u=(n==null?void 0:n.dayjs)||(i==null?void 0:i.dayjs);return{dateAdapter:(d,c="ll")=>{if(u===void 0)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return u(d).format(c)},distanceAdapter:fe,filePathAdapter:(d,c)=>de(r&&typeof d=="string"?{origin:r,pathname:d}:d,c)}},tt=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),rt=n=>{const u=n.split("/").filter(f=>f.length>0).map(f=>f.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},nt=(n,r,i)=>{const u=rt(r),f=tt(i);return`${u}${f}`},ot=n=>{if(n)return(n==null?void 0:n.reduce((r,i)=>(r[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},r),{}))||{}},it=n=>{const{input:r="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=n||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:r,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:nt,...(i==null?void 0:i.length)&&{operations:ot(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}},at=(n,r,i="ll")=>String(n(r).format(i));_.GTMSendPageView=Ve,_.InitializeAxiosConfig=Ue,_.InitializeDaysJSConfig=Xe,_.InitializeI18nConfig=Be,_.InitializeMapBoxConfig=Qe,_.InitializeSentryConfig=Ge,_.InjectDependenciesContext=O,_.InjectDependenciesProvider=Me,_.MaskTextField=Je,_.QueryClientProviderWithConfig=He,_.RequireAuth=ze,_.dateAdapter=at,_.distanceAdapter=fe,_.getOrvalConfig=it,_.useAdapter=et,_.useAuth=$e,_.useInfiniteDataGrid=Ze,_.useResponseError=Ke,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
*/var le;function Le(){if(le)return G;le=1;var n=m,r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,f=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function d(c,l,y){var E,w={},a=null,x=null;y!==void 0&&(a=""+y),l.key!==void 0&&(a=""+l.key),l.ref!==void 0&&(x=l.ref);for(E in l)u.call(l,E)&&!v.hasOwnProperty(E)&&(w[E]=l[E]);if(c&&c.defaultProps)for(E in l=c.defaultProps,l)w[E]===void 0&&(w[E]=l[E]);return{$$typeof:r,type:c,key:a,ref:x,props:w,_owner:f.current}}return G.Fragment=i,G.jsx=d,G.jsxs=d,G}process.env.NODE_ENV==="production"?ee.exports=Le():ee.exports=Ne();var F=ee.exports;const O=m.createContext({}),Me=({children:n,apiURL:r,libraries:i})=>{const u=m.useMemo(()=>({apiURL:r,libraries:i}),[r,i]);return F.jsx(O.Provider,{value:u,children:n})},ze=({Fallback:n,isLogged:r,loginPath:i="/login",localStorageKey:u="user",redirect401Path:f="/login",...v})=>{var C,N,L,M;const{libraries:d}=m.useContext(O),c=(v==null?void 0:v.axios)||(d==null?void 0:d.axios),l=(v==null?void 0:v.reactRouter)||(d==null?void 0:d.reactRouter);if(l===void 0)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(c===void 0)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const[y,E]=m.useState(null),{useLocation:w,Navigate:a,Outlet:x}=l,T=w(),A=m.useRef(!1),D=typeof r=="function"?r():!!r,k=typeof D=="boolean"?D:D==null?void 0:D.isLogged;return m.useEffect(()=>{A.current||(A.current=!0,c==null||c.interceptors.response.use(P=>P,async P=>{var J;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&&((J=P==null?void 0:P.response)==null?void 0:J.status)===401&&(c.defaults.headers.common.Authorization=null,localStorage.removeItem(u),E(f)),Promise.reject(P)}))},[c==null?void 0:c.defaults.headers.common,c==null?void 0:c.interceptors.response,u,f]),k&&!y?F.jsx(m.Suspense,{fallback:n,children:(N=(C=T.state)==null?void 0:C.from)!=null&&N.state&&((M=(L=T.state)==null?void 0:L.from)==null?void 0:M.pathname)===i?F.jsx(a,{to:T.state.from.state.from.pathname+T.state.from.state.from.search,replace:!0}):F.jsx(x,{})}):F.jsx(a,{to:i,state:{from:T},replace:!0})},Ve=({...n})=>{const{libraries:r}=m.useContext(O),i=(n==null?void 0:n.reactRouter)||(r==null?void 0:r.reactRouter),u=(n==null?void 0:n.gtm)||(r==null?void 0:r.gtm);if(i===void 0)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(u===void 0)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const{useGoogleTagManager:f}=u,{useLocation:v,Outlet:d}=i,{pathname:c}=v(),{sendEvent:l}=f();return m.useEffect(()=>{l({event:"pageView",pathname:c})},[c,l]),F.jsx(d,{})},Ue=({tokenTypeKey:n="tokenType",userLocalStorageKey:r="user",tokenKey:i="accessToken",postContentType:u="application/json",...f})=>{const{apiURL:v=f.apiURL,libraries:d}=m.useContext(O),c=(f==null?void 0:f.axios)||(d==null?void 0:d.axios);if(c===void 0)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!c.defaults)return null;const l=localStorage.getItem(r),y=l?JSON.parse(l):null,E=y!=null&&y[n]?y[n]:null,w=y!=null&&y[i]?y[i]:null,a=l?`${E} ${w}`:null;return c.defaults.baseURL=v,c.defaults.headers.post["Content-Type"]=u,a&&(c.defaults.headers.common.Authorization=a),null},Be=({debug:n,resources:r,...i})=>{const{libraries:u}=m.useContext(O),f=(i==null?void 0:i.i18)||(u==null?void 0:u.i18),{i18next:v,initReactI18next:d,languageDetector:c}=f||{};if(f===void 0)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return v!=null&&v.isInitialized||(v.use(c).use(d).init({debug:n,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:r,returnNull:!1}).then(()=>{document.documentElement.lang!==v.resolvedLanguage&&v.resolvedLanguage&&document.documentElement.setAttribute("lang",v.resolvedLanguage)}),v.on("languageChanged",l=>{document.documentElement.setAttribute("lang",l)})),null},Ge=({dsn:n,integrations:r,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:f,tracePropagationTargets:v,ignoreErrors:d,debug:c,environment:l,...y})=>{const{libraries:E}=m.useContext(O),w=(y==null?void 0:y.sentry)||(E==null?void 0:E.sentry),a=(y==null?void 0:y.reactRouter)||(E==null?void 0:E.reactRouter),{createRoutesFromChildren:x,matchRoutes:T,useLocation:A,useNavigationType:D}=a;if(w===void 0)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(a===void 0)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return w.isInitialized()||(c||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&w.init({debug:c,dsn:n,environment:l||"production",ignoreErrors:[...d||[],/dynamically imported module/],integrations:[w.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:x,matchRoutes:T,useEffect:m.useEffect,useLocation:A,useNavigationType:D}),...r||[]],replaysOnErrorSampleRate:f||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:v,tracesSampleRate:i||1}),null},Je=({IMaskMixin:n,...r})=>{const i=m.useMemo(()=>n(({TextField:u,...f})=>F.jsx(u,{...f})),[n]);return F.jsx(i,{...r})},Qe=({accessToken:n,...r})=>{const{libraries:i}=m.useContext(O),u=(r==null?void 0:r.mapbox)||(i==null?void 0:i.mapbox);if(u===void 0)throw new Error("Mapbox is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return n&&(u.accessToken=n),null},Xe=({language:n,...r})=>{const{libraries:i}=m.useContext(O),u=(r==null?void 0:r.dayjs)||(i==null?void 0:i.dayjs),f=(r==null?void 0:r.dayjsPlugin)||(i==null?void 0:i.dayjsPlugin);if(u===void 0)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return m.useEffect(()=>{(async()=>{var c;const d=n||((c=navigator.language)==null?void 0:c.slice(0,2))||"en";f&&f.forEach(l=>{u.extend(l.default)}),u.locale(d)})().then()},[u,f,n]),null},He=({children:n,defaultQueriesOptions:r,defaultMutationsOptions:i,...u})=>{var l,y;const{libraries:f}=m.useContext(O),v=(u==null?void 0:u.QueryClient)||((l=f==null?void 0:f.reactQuery)==null?void 0:l.QueryClient),d=(u==null?void 0:u.QueryClientProvider)||((y=f==null?void 0:f.reactQuery)==null?void 0:y.QueryClientProvider);if(v===void 0)throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(d===void 0)throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const c=new v({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(E,w,a)=>E.length+(a||0),refetchOnWindowFocus:!1,retry:3,...r}}});return F.jsx(d,{client:c,children:n})},Ke=n=>{var y,E;const{libraries:r}=m.useContext(O),i=(n==null?void 0:n.i18)||(r==null?void 0:r.i18),u=((y=n==null?void 0:n.i18)==null?void 0:y.translateFunction)||((E=r==null?void 0:r.i18)==null?void 0:E.translateFunction);if(i===void 0)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in params of useResponseError.");const f=i.i18next.t||u||(w=>w),{unknownErrorTranslationKey:v="error.unknownError"}=n||{},d=f(v),c=m.useCallback(w=>{var x,T,A,D,k,C,N,L,M;const{response:a}=w||{};return a!=null&&a.reason?String(a.reason):(x=a==null?void 0:a.data)!=null&&x.reason?String(a.data.reason):(T=a==null?void 0:a.data)!=null&&T.message?String(a.data.message):(D=(A=a==null?void 0:a.data)==null?void 0:A.detail)!=null&&D.length&&Array.isArray((k=a==null?void 0:a.data)==null?void 0:k.detail)&&((N=(C=a==null?void 0:a.data)==null?void 0:C.detail[0])!=null&&N.msg)&&typeof((M=(L=a==null?void 0:a.data)==null?void 0:L.detail[0])==null?void 0:M.msg)=="string"?String(a.data.detail[0].msg):d},[d]);return{getErrorCode:m.useCallback(w=>{var x,T,A;const{response:a}=w||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(x=a==null?void 0:a.data)!=null&&x.error_code?String((T=a==null?void 0:a.data)==null?void 0:T.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(A=a==null?void 0:a.data)!=null&&A.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:c}},Ze=({data:n,fetchNextPage:r,isFetchingNextPage:i,isInitialLoading:u,isLoading:f,enabled:v=!0})=>{const d=m.useCallback(async l=>{i||!v||await r({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[v,r,i]),c=m.useMemo(()=>{if(n)return n.pages.reduce((l,y)=>[...l,...y],[])},[n]);return{fetchNextPageOnRowsScrollEnd:d,isLoading:i||f,loadingVariant:u?"skeleton":"linear",rows:c}},$e=n=>{const{libraries:r}=m.useContext(O),i=(n==null?void 0:n.axios)||(r==null?void 0:r.axios);if(i===void 0)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");return{clearAuthenticationToken:()=>{i.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:v,accessToken:d})=>{i.defaults.headers.common.Authorization=`${v} ${d}`}}},fe=(n,r="km")=>{const i=Number(n);return Number.isNaN(i)?`0 ${r}`:`${i.toFixed(2)} ${r}`},qe=n=>{const r=n&&typeof n=="object"&&"pathname"in n&&n.pathname?n.pathname:n;return typeof r=="string"?r!=null&&r.startsWith("/")?r!=null&&r.startsWith("/files")?r:`/files${r}`:r!=null&&r.startsWith("files")?`/${r}`:r!=null&&r.startsWith("files")?`/${r}`:`/files/${r}`:r},de=(n,r)=>{if(!n)return"";const i=qe(n),u=typeof n=="object"&&"pathname"in n?`${n.origin}${i}`:n;return typeof r=="number"?`${u.replace("/files",`/thumbs/${r}`)}`:u},et=n=>{const{apiURL:r,libraries:i}=m.useContext(O),u=(n==null?void 0:n.dayjs)||(i==null?void 0:i.dayjs);return{dateAdapter:(d,c="ll")=>{if(u===void 0)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return u(d).format(c)},distanceAdapter:fe,filePathAdapter:(d,c)=>de(r&&typeof d=="string"?{origin:r,pathname:d}:d,c)}},tt=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),rt=n=>{const u=n.split("/").filter(f=>f.length>0).map(f=>f.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},nt=(n,r,i)=>{const u=rt(r),f=tt(i);return`${u}${f}`},ot=n=>{if(n)return(n==null?void 0:n.reduce((r,i)=>(r[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},r),{}))||{}},it=n=>{const{input:r="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=n||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:r,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:nt,...(i==null?void 0:i.length)&&{operations:ot(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}},at=(n,r,i="ll")=>String(n(r).format(i));_.GTMSendPageView=Ve,_.InitializeAxiosConfig=Ue,_.InitializeDaysJSConfig=Xe,_.InitializeI18nConfig=Be,_.InitializeMapBoxConfig=Qe,_.InitializeSentryConfig=Ge,_.InjectDependenciesContext=O,_.InjectDependenciesProvider=Me,_.MaskTextField=Je,_.QueryClientProviderWithConfig=He,_.RequireAuth=ze,_.dateAdapter=at,_.distanceAdapter=fe,_.getOrvalConfig=it,_.useAdapter=et,_.useAuth=$e,_.useInfiniteDataGrid=Ze,_.useResponseError=Ke,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|