@tracktor/shared-module 2.0.0-beta.4 → 2.0.0-beta.6

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 CHANGED
@@ -1,4 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/shared-module/releases)
2
2
 
3
- ## v2.0.0-beta.4
3
+ ## v2.0.0-beta.6
4
4
  - **[chore]** : improvement
@@ -25,7 +25,7 @@ export interface InjectDependenciesContextProps {
25
25
  i18next?: any;
26
26
  initReactI18next?: any;
27
27
  languageDetector?: any;
28
- translateFunction?: any;
28
+ translateFunction?: () => {};
29
29
  };
30
30
  reactQuery?: {
31
31
  QueryClientProvider: ({ client, children }: {
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
- import Ne, { createContext as gt, useMemo as se, useContext as k, useState as ht, useRef as yt, useLayoutEffect as We, Suspense as mt, useEffect as Le, useCallback as ue } from "react";
2
- var ce = { exports: {} }, B = {};
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,14 +9,14 @@ 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 $e;
13
- function pt() {
14
- return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
15
- var n = Ne, 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
- function S(e) {
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"), a = 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"), _ = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), P = Symbol.iterator, S = "@@iterator";
16
+ function T(e) {
17
17
  if (e === null || typeof e != "object")
18
18
  return null;
19
- var t = j && e[j] || e[x];
19
+ var t = P && e[P] || e[S];
20
20
  return typeof t == "function" ? t : null;
21
21
  }
22
22
  var D = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -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, le = !1, fe = !1, z;
40
+ var N = !1, W = !1, C = !1, fe = !1, de = !1, z;
41
41
  z = Symbol.for("react.module.reference");
42
- function Ve(e) {
43
- return !!(typeof e == "string" || typeof e == "function" || e === u || e === v || fe || e === f || e === y || e === p || le || 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
42
+ function Le(e) {
43
+ return !!(typeof e == "string" || typeof e == "function" || e === a || e === v || de || e === f || e === y || e === p || fe || e === u || N || W || C || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === _ || 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 Me(e, t, o) {
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 de(e) {
56
+ function ve(e) {
57
57
  return e.displayName || "Context";
58
58
  }
59
59
  function I(e) {
@@ -64,7 +64,7 @@ function pt() {
64
64
  if (typeof e == "string")
65
65
  return e;
66
66
  switch (e) {
67
- case u:
67
+ case a:
68
68
  return "Fragment";
69
69
  case i:
70
70
  return "Portal";
@@ -81,16 +81,16 @@ function pt() {
81
81
  switch (e.$$typeof) {
82
82
  case c:
83
83
  var t = e;
84
- return de(t) + ".Consumer";
84
+ return ve(t) + ".Consumer";
85
85
  case d:
86
86
  var o = e;
87
- return de(o._context) + ".Provider";
87
+ return ve(o._context) + ".Provider";
88
88
  case l:
89
- return Me(e, e.render, "ForwardRef");
90
- case R:
89
+ return Ve(e, e.render, "ForwardRef");
90
+ case _:
91
91
  var s = e.displayName || null;
92
92
  return s !== null ? s : I(e.type) || "Memo";
93
- case a: {
93
+ case R: {
94
94
  var m = e, E = m._payload, h = m._init;
95
95
  try {
96
96
  return I(h(E));
@@ -101,18 +101,18 @@ function pt() {
101
101
  }
102
102
  return null;
103
103
  }
104
- var L = Object.assign, U = 0, ve, ge, he, ye, me, pe, Ee;
105
- function Re() {
104
+ var L = Object.assign, U = 0, ge, he, ye, me, pe, Ee, Re;
105
+ function _e() {
106
106
  }
107
- Re.__reactDisabledLog = !0;
108
- function ze() {
107
+ _e.__reactDisabledLog = !0;
108
+ function Me() {
109
109
  {
110
110
  if (U === 0) {
111
- ve = console.log, ge = console.info, he = console.warn, ye = console.error, me = console.group, pe = console.groupCollapsed, Ee = console.groupEnd;
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: Re,
115
+ value: _e,
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 Ue() {
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: ve
141
+ value: ge
142
142
  }),
143
143
  info: L({}, e, {
144
- value: ge
144
+ value: he
145
145
  }),
146
146
  warn: L({}, e, {
147
- value: he
147
+ value: ye
148
148
  }),
149
149
  error: L({}, e, {
150
- value: ye
150
+ value: me
151
151
  }),
152
152
  group: L({}, e, {
153
- value: me
153
+ value: pe
154
154
  }),
155
155
  groupCollapsed: L({}, e, {
156
- value: pe
156
+ value: Ee
157
157
  }),
158
158
  groupEnd: L({}, e, {
159
- value: Ee
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 Z = D.ReactCurrentDispatcher, ee;
166
+ var ee = D.ReactCurrentDispatcher, te;
167
167
  function J(e, t, o) {
168
168
  {
169
- if (ee === void 0)
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
- ee = s && s[1] || "";
174
+ te = s && s[1] || "";
175
175
  }
176
176
  return `
177
- ` + ee + e;
177
+ ` + te + e;
178
178
  }
179
179
  }
180
- var te = !1, Q;
180
+ var re = !1, Q;
181
181
  {
182
- var qe = typeof WeakMap == "function" ? WeakMap : Map;
183
- Q = new qe();
182
+ var Ue = typeof WeakMap == "function" ? WeakMap : Map;
183
+ Q = new Ue();
184
184
  }
185
185
  function we(e, t) {
186
- if (!e || te)
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
- te = !0;
194
+ re = !0;
195
195
  var m = Error.prepareStackTrace;
196
196
  Error.prepareStackTrace = void 0;
197
197
  var E;
198
- E = Z.current, Z.current = null, ze();
198
+ E = ee.current, ee.current = null, Me();
199
199
  try {
200
200
  if (t) {
201
201
  var h = function() {
@@ -231,32 +231,32 @@ function pt() {
231
231
  } catch ($) {
232
232
  if ($ && s && typeof $.stack == "string") {
233
233
  for (var g = $.stack.split(`
234
- `), P = s.stack.split(`
235
- `), _ = g.length - 1, b = P.length - 1; _ >= 1 && b >= 0 && g[_] !== P[b]; )
236
- b--;
237
- for (; _ >= 1 && b >= 0; _--, b--)
238
- if (g[_] !== P[b]) {
239
- if (_ !== 1 || b !== 1)
234
+ `), x = s.stack.split(`
235
+ `), b = g.length - 1, j = x.length - 1; b >= 1 && j >= 0 && g[b] !== x[j]; )
236
+ j--;
237
+ for (; b >= 1 && j >= 0; b--, j--)
238
+ if (g[b] !== x[j]) {
239
+ if (b !== 1 || j !== 1)
240
240
  do
241
- if (_--, b--, b < 0 || g[_] !== P[b]) {
241
+ if (b--, j--, j < 0 || g[b] !== x[j]) {
242
242
  var O = `
243
- ` + g[_].replace(" at new ", " at ");
243
+ ` + g[b].replace(" at new ", " at ");
244
244
  return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, O), O;
245
245
  }
246
- while (_ >= 1 && b >= 0);
246
+ while (b >= 1 && j >= 0);
247
247
  break;
248
248
  }
249
249
  }
250
250
  } finally {
251
- te = !1, Z.current = E, Ue(), Error.prepareStackTrace = m;
251
+ re = !1, ee.current = E, ze(), Error.prepareStackTrace = m;
252
252
  }
253
- var M = e ? e.displayName || e.name : "", Ie = M ? J(M) : "";
254
- return typeof e == "function" && Q.set(e, Ie), Ie;
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 Be(e, t, o) {
256
+ function qe(e, t, o) {
257
257
  return we(e, !1);
258
258
  }
259
- function Ge(e) {
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 we(e, Ge(e));
267
+ return we(e, Be(e));
268
268
  if (typeof e == "string")
269
269
  return J(e);
270
270
  switch (e) {
@@ -276,10 +276,10 @@ function pt() {
276
276
  if (typeof e == "object")
277
277
  switch (e.$$typeof) {
278
278
  case l:
279
- return Be(e.render);
280
- case R:
279
+ return qe(e.render);
280
+ case _:
281
281
  return X(e.type, t, o);
282
- case a: {
282
+ case R: {
283
283
  var s = e, m = s._payload, E = s._init;
284
284
  try {
285
285
  return X(E(m), t, o);
@@ -289,15 +289,15 @@ function pt() {
289
289
  }
290
290
  return "";
291
291
  }
292
- var H = Object.prototype.hasOwnProperty, _e = {}, be = D.ReactDebugCurrentFrame;
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
- be.setExtraStackFrame(o);
296
+ Ce.setExtraStackFrame(o);
297
297
  } else
298
- be.setExtraStackFrame(null);
298
+ Ce.setExtraStackFrame(null);
299
299
  }
300
- function Je(e, t, o, s, m) {
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)
@@ -305,49 +305,49 @@ function pt() {
305
305
  var g = void 0;
306
306
  try {
307
307
  if (typeof e[h] != "function") {
308
- var P = Error((s || "React class") + ": " + o + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
309
- throw P.name = "Invariant Violation", P;
308
+ var x = Error((s || "React class") + ": " + o + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
309
+ throw x.name = "Invariant Violation", x;
310
310
  }
311
311
  g = e[h](t, h, s, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
312
- } catch (_) {
313
- g = _;
312
+ } catch (b) {
313
+ g = b;
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 _e) && (_e[g.message] = !0, K(m), w("Failed %s type: %s", o, g.message), K(null));
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 Qe = Array.isArray;
320
- function re(e) {
321
- return Qe(e);
319
+ var Je = Array.isArray;
320
+ function ne(e) {
321
+ return Je(e);
322
322
  }
323
- function Xe(e) {
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 He(e) {
329
+ function Xe(e) {
330
330
  try {
331
- return Ce(e), !1;
331
+ return je(e), !1;
332
332
  } catch {
333
333
  return !0;
334
334
  }
335
335
  }
336
- function Ce(e) {
336
+ function je(e) {
337
337
  return "" + e;
338
338
  }
339
- function je(e) {
340
- if (He(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.", Xe(e)), Ce(e);
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, Ke = {
343
+ var q = D.ReactCurrentOwner, He = {
344
344
  key: !0,
345
345
  ref: !0,
346
346
  __self: !0,
347
347
  __source: !0
348
- }, Pe, Te, ne;
349
- ne = {};
350
- function Ze(e) {
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 et(e) {
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 tt(e, t) {
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
- ne[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), ne[o] = !0);
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 rt(e, t) {
372
+ function tt(e, t) {
373
373
  {
374
374
  var o = function() {
375
- Pe || (Pe = !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));
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 nt(e, t) {
383
+ function rt(e, t) {
384
384
  {
385
385
  var o = function() {
386
- Te || (Te = !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));
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 ot = function(e, t, o, s, m, E, h) {
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,41 +420,41 @@ function pt() {
420
420
  value: m
421
421
  }), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
422
422
  };
423
- function it(e, t, o, s, m) {
423
+ function ot(e, t, o, s, m) {
424
424
  {
425
- var E, h = {}, g = null, P = null;
426
- o !== void 0 && (je(o), g = "" + o), et(t) && (je(t.key), g = "" + t.key), Ze(t) && (P = t.ref, tt(t, m));
425
+ var E, h = {}, g = null, x = null;
426
+ o !== void 0 && (Pe(o), g = "" + o), Ze(t) && (Pe(t.key), g = "" + t.key), Ke(t) && (x = t.ref, et(t, m));
427
427
  for (E in t)
428
- H.call(t, E) && !Ke.hasOwnProperty(E) && (h[E] = t[E]);
428
+ H.call(t, E) && !He.hasOwnProperty(E) && (h[E] = t[E]);
429
429
  if (e && e.defaultProps) {
430
- var _ = e.defaultProps;
431
- for (E in _)
432
- h[E] === void 0 && (h[E] = _[E]);
430
+ var b = e.defaultProps;
431
+ for (E in b)
432
+ h[E] === void 0 && (h[E] = b[E]);
433
433
  }
434
- if (g || P) {
435
- var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
436
- g && rt(h, b), P && nt(h, b);
434
+ if (g || x) {
435
+ var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
436
+ g && tt(h, j), x && rt(h, j);
437
437
  }
438
- return ot(e, g, P, m, s, q.current, h);
438
+ return nt(e, g, x, m, s, q.current, h);
439
439
  }
440
440
  }
441
- var oe = D.ReactCurrentOwner, xe = D.ReactDebugCurrentFrame;
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
- xe.setExtraStackFrame(o);
445
+ Se.setExtraStackFrame(o);
446
446
  } else
447
- xe.setExtraStackFrame(null);
447
+ Se.setExtraStackFrame(null);
448
448
  }
449
- var ie;
450
- ie = !1;
451
- function ae(e) {
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 Se() {
454
+ function Oe() {
455
455
  {
456
- if (oe.current) {
457
- var e = I(oe.current.type);
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 at(e) {
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 Oe = {};
478
- function ut(e) {
477
+ var Ae = {};
478
+ function at(e) {
479
479
  {
480
- var t = Se();
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 Ae(e, t) {
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 = ut(t);
496
- if (Oe[o])
495
+ var o = at(t);
496
+ if (Ae[o])
497
497
  return;
498
- Oe[o] = !0;
498
+ Ae[o] = !0;
499
499
  var s = "";
500
- e && e._owner && e._owner !== oe.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);
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 De(e, t) {
503
+ function ke(e, t) {
504
504
  {
505
505
  if (typeof e != "object")
506
506
  return;
507
- if (re(e))
507
+ if (ne(e))
508
508
  for (var o = 0; o < e.length; o++) {
509
509
  var s = e[o];
510
- ae(s) && Ae(s, t);
510
+ ue(s) && De(s, t);
511
511
  }
512
- else if (ae(e))
512
+ else if (ue(e))
513
513
  e._store && (e._store.validated = !0);
514
514
  else if (e) {
515
- var m = S(e);
515
+ var m = T(e);
516
516
  if (typeof m == "function" && m !== e.entries)
517
517
  for (var E = m.call(e), h; !(h = E.next()).done; )
518
- ae(h.value) && Ae(h.value, t);
518
+ ue(h.value) && De(h.value, t);
519
519
  }
520
520
  }
521
521
  }
522
- function ct(e) {
522
+ function ut(e) {
523
523
  {
524
524
  var t = e.type;
525
525
  if (t == null || typeof t == "string")
@@ -529,22 +529,22 @@ Check the top-level render call using <` + o + ">.");
529
529
  o = t.propTypes;
530
530
  else if (typeof t == "object" && (t.$$typeof === l || // Note: Memo only checks outer props here.
531
531
  // Inner props are checked in the reconciler.
532
- t.$$typeof === R))
532
+ t.$$typeof === _))
533
533
  o = t.propTypes;
534
534
  else
535
535
  return;
536
536
  if (o) {
537
537
  var s = I(t);
538
- Je(o, e.props, "prop", s, e);
539
- } else if (t.PropTypes !== void 0 && !ie) {
540
- ie = !0;
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 st(e) {
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 ke(e, t, o, s, m, E) {
559
+ function Ie(e, t, o, s, m, E) {
560
560
  {
561
- var h = Ve(e);
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 = at(m);
566
- P ? g += P : g += Se();
567
- var _;
568
- e === null ? _ = "null" : re(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);
565
+ var x = it(m);
566
+ x ? g += x : g += Oe();
567
+ var b;
568
+ e === null ? b = "null" : ne(e) ? b = "array" : e !== void 0 && e.$$typeof === r ? (b = "<" + (I(e.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : b = 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", b, g);
569
569
  }
570
- var b = it(e, t, o, m, E);
571
- if (b == null)
572
- return b;
570
+ var j = ot(e, t, o, m, E);
571
+ if (j == null)
572
+ return j;
573
573
  if (h) {
574
574
  var O = t.children;
575
575
  if (O !== void 0)
576
576
  if (s)
577
- if (re(O)) {
577
+ if (ne(O)) {
578
578
  for (var M = 0; M < O.length; M++)
579
- De(O[M], e);
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
- De(O, e);
584
+ ke(O, e);
585
585
  }
586
- return e === u ? st(b) : ct(b), b;
586
+ return e === a ? ct(j) : ut(j), j;
587
587
  }
588
588
  }
589
- function lt(e, t, o) {
590
- return ke(e, t, o, !0);
589
+ function st(e, t, o) {
590
+ return Ie(e, t, o, !0);
591
591
  }
592
- function ft(e, t, o) {
593
- return ke(e, t, o, !1);
592
+ function lt(e, t, o) {
593
+ return Ie(e, t, o, !1);
594
594
  }
595
- var dt = ft, vt = lt;
596
- B.Fragment = u, B.jsx = dt, B.jsxs = vt;
595
+ var ft = lt, dt = st;
596
+ B.Fragment = a, B.jsx = ft, B.jsxs = dt;
597
597
  }()), B;
598
598
  }
599
599
  var G = {};
@@ -606,40 +606,40 @@ 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 Fe;
610
- function Et() {
611
- if (Fe)
609
+ var Ye;
610
+ function pt() {
611
+ if (Ye)
612
612
  return G;
613
- Fe = 1;
614
- var n = Ne, 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 };
613
+ Ye = 1;
614
+ var n = We, r = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = 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
- var p, R = {}, a = null, T = null;
617
- y !== void 0 && (a = "" + y), l.key !== void 0 && (a = "" + l.key), l.ref !== void 0 && (T = l.ref);
616
+ var p, _ = {}, R = null, u = null;
617
+ y !== void 0 && (R = "" + y), l.key !== void 0 && (R = "" + l.key), l.ref !== void 0 && (u = l.ref);
618
618
  for (p in l)
619
- u.call(l, p) && !v.hasOwnProperty(p) && (R[p] = l[p]);
619
+ a.call(l, p) && !v.hasOwnProperty(p) && (_[p] = l[p]);
620
620
  if (c && c.defaultProps)
621
621
  for (p in l = c.defaultProps, l)
622
- R[p] === void 0 && (R[p] = l[p]);
623
- return { $$typeof: r, type: c, key: a, ref: T, props: R, _owner: f.current };
622
+ _[p] === void 0 && (_[p] = l[p]);
623
+ return { $$typeof: r, type: c, key: R, ref: u, props: _, _owner: f.current };
624
624
  }
625
625
  return G.Fragment = i, G.jsx = d, G.jsxs = d, G;
626
626
  }
627
- process.env.NODE_ENV === "production" ? ce.exports = Et() : ce.exports = pt();
628
- var F = ce.exports;
629
- const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
630
- const u = se(
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 a = le(
631
631
  () => ({
632
632
  apiURL: r,
633
633
  libraries: i
634
634
  }),
635
635
  [r, i]
636
636
  );
637
- return /* @__PURE__ */ F.jsx(A.Provider, { value: u, children: n });
638
- }, xt = ({
637
+ return /* @__PURE__ */ F.jsx(A.Provider, { value: a, children: n });
638
+ }, Tt = ({
639
639
  Fallback: n,
640
640
  isLogged: r,
641
641
  loginPath: i = "/login",
642
- localStorageKey: u = "user",
642
+ localStorageKey: a = "user",
643
643
  redirect401Path: f = "/login",
644
644
  ...v
645
645
  }) => {
@@ -649,31 +649,31 @@ 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] = ht(null), { useLocation: R, Navigate: a, Outlet: T } = l, j = R(), x = yt(!1), S = typeof r == "function" ? r() : !!r, D = typeof S == "boolean" ? S : S == null ? void 0 : S.isLogged;
653
- return We(() => {
654
- x.current || (x.current = !0, c == null || c.interceptors.response.use(
652
+ const [y, p] = gt(null), { useLocation: _, Navigate: R, Outlet: u } = l, P = _(), S = ht(!1), T = typeof r == "function" ? r() : !!r, D = typeof T == "boolean" ? T : T == null ? void 0 : T.isLogged;
653
+ return Z(() => {
654
+ S.current || (S.current = !0, c == null || c.interceptors.response.use(
655
655
  (C) => C,
656
656
  async (C) => {
657
657
  var z;
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);
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(a), 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(mt, { 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
- }, St = ({ ...n }) => {
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);
661
+ }, [c == null ? void 0 : c.defaults.headers.common, c == null ? void 0 : c.interceptors.response, a, f]), D && !y ? /* @__PURE__ */ F.jsx(yt, { fallback: n, children: (Y = (w = P.state) == null ? void 0 : w.from) != null && Y.state && ((W = (N = P.state) == null ? void 0 : N.from) == null ? void 0 : W.pathname) === i ? /* @__PURE__ */ F.jsx(R, { to: P.state.from.state.from.pathname + P.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ F.jsx(u, {}) }) : /* @__PURE__ */ F.jsx(R, { to: i, state: { from: P }, replace: !0 });
662
+ }, xt = ({ ...n }) => {
663
+ const { libraries: r } = k(A), i = (n == null ? void 0 : n.reactRouter) || (r == null ? void 0 : r.reactRouter), a = (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
- if (u === void 0)
666
+ if (a === void 0)
667
667
  throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
668
- const { useGoogleTagManager: f } = u, { useLocation: v, Outlet: d } = i, { pathname: c } = v(), { sendEvent: l } = f();
669
- return Le(() => {
668
+ const { useGoogleTagManager: f } = a, { useLocation: v, Outlet: d } = i, { pathname: c } = v(), { sendEvent: l } = f();
669
+ return Z(() => {
670
670
  l({ event: "pageView", pathname: c });
671
671
  }, [c, l]), /* @__PURE__ */ F.jsx(d, {});
672
- }, Ot = ({
672
+ }, St = ({
673
673
  tokenTypeKey: n = "tokenType",
674
674
  userLocalStorageKey: r = "user",
675
675
  tokenKey: i = "accessToken",
676
- postContentType: u = "application/json",
676
+ postContentType: a = "application/json",
677
677
  ...f
678
678
  }) => {
679
679
  const { apiURL: v = f.apiURL, libraries: d } = k(A), c = (f == null ? void 0 : f.axios) || (d == null ? void 0 : d.axios);
@@ -681,10 +681,10 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
681
681
  throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
682
682
  if (!c.defaults)
683
683
  return null;
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
- return c.defaults.baseURL = v, c.defaults.headers.post["Content-Type"] = u, a && (c.defaults.headers.common.Authorization = a), null;
686
- }, At = ({ debug: n, resources: r, ...i }) => {
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 || {};
684
+ const l = localStorage.getItem(r), y = l ? JSON.parse(l) : null, p = y != null && y[n] ? y[n] : null, _ = y != null && y[i] ? y[i] : null, R = l ? `${p} ${_}` : null;
685
+ return c.defaults.baseURL = v, c.defaults.headers.post["Content-Type"] = a, R && (c.defaults.headers.common.Authorization = R), null;
686
+ }, Ot = ({ debug: n, resources: r, ...i }) => {
687
+ const { libraries: a } = k(A), f = (i == null ? void 0 : i.i18) || (a == null ? void 0 : a.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.");
690
690
  return v != null && v.isInitialized || (v.use(c).use(d).init({
@@ -705,11 +705,11 @@ 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
- }, Dt = ({
708
+ }, At = ({
709
709
  dsn: n,
710
710
  integrations: r,
711
711
  tracesSampleRate: i,
712
- replaysSessionSampleRate: u,
712
+ replaysSessionSampleRate: a,
713
713
  replaysOnErrorSampleRate: f,
714
714
  tracePropagationTargets: v,
715
715
  ignoreErrors: d,
@@ -717,64 +717,64 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
717
717
  environment: l,
718
718
  ...y
719
719
  }) => {
720
- const { libraries: p } = k(A), R = (y == null ? void 0 : y.sentry) || (p == null ? void 0 : p.sentry), a = (y == null ? void 0 : y.reactRouter) || (p == null ? void 0 : p.reactRouter), { createRoutesFromChildren: T, matchRoutes: j, useLocation: x, useNavigationType: S } = a;
721
- if (R === void 0)
720
+ const { libraries: p } = k(A), _ = (y == null ? void 0 : y.sentry) || (p == null ? void 0 : p.sentry), R = (y == null ? void 0 : y.reactRouter) || (p == null ? void 0 : p.reactRouter), { createRoutesFromChildren: u, matchRoutes: P, useLocation: S, useNavigationType: T } = R;
721
+ if (_ === void 0)
722
722
  throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
723
- if (a === void 0)
723
+ if (R === void 0)
724
724
  throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
725
- return R.isInitialized() || (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && R.init({
725
+ return _.isInitialized() || (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && _.init({
726
726
  debug: c,
727
727
  dsn: n,
728
728
  environment: l || "production",
729
729
  ignoreErrors: [...d || [], /dynamically imported module/],
730
730
  integrations: [
731
- R.reactRouterV6BrowserTracingIntegration({
732
- createRoutesFromChildren: T,
733
- matchRoutes: j,
734
- useEffect: Le,
735
- useLocation: x,
736
- useNavigationType: S
731
+ _.reactRouterV6BrowserTracingIntegration({
732
+ createRoutesFromChildren: u,
733
+ matchRoutes: P,
734
+ useEffect: Z,
735
+ useLocation: S,
736
+ useNavigationType: T
737
737
  }),
738
738
  ...r || []
739
739
  ],
740
740
  replaysOnErrorSampleRate: f || 1,
741
- replaysSessionSampleRate: u || 0.1,
741
+ replaysSessionSampleRate: a || 0.1,
742
742
  tracePropagationTargets: v,
743
743
  tracesSampleRate: i || 1
744
744
  }), null;
745
- }, kt = ({ IMaskMixin: n, ...r }) => {
746
- const i = se(
745
+ }, Dt = ({ IMaskMixin: n, ...r }) => {
746
+ const i = le(
747
747
  // eslint-disable-next-line react/jsx-props-no-spreading
748
- () => n(({ TextField: u, ...f }) => /* @__PURE__ */ F.jsx(u, { ...f })),
748
+ () => n(({ TextField: a, ...f }) => /* @__PURE__ */ F.jsx(a, { ...f })),
749
749
  [n]
750
750
  );
751
751
  return /* @__PURE__ */ F.jsx(i, { ...r });
752
- }, It = ({ accessToken: n, ...r }) => {
753
- const { libraries: i } = k(A), u = (r == null ? void 0 : r.mapbox) || (i == null ? void 0 : i.mapbox);
754
- if (u === void 0)
752
+ }, kt = ({ accessToken: n, ...r }) => {
753
+ const { libraries: i } = k(A), a = (r == null ? void 0 : r.mapbox) || (i == null ? void 0 : i.mapbox);
754
+ if (a === void 0)
755
755
  throw new Error("Mapbox is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
756
- return n && (u.accessToken = n), null;
757
- }, $t = ({ language: n, ...r }) => {
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
- if (u === void 0)
756
+ return n && (a.accessToken = n), null;
757
+ }, It = ({ language: n, ...r }) => {
758
+ const { libraries: i } = k(A), a = (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
+ if (a === void 0)
760
760
  throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
761
- return We(() => {
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";
765
765
  f && f.forEach((l) => {
766
- u.extend(l.default);
767
- }), u.locale(d);
766
+ a.extend(l.default);
767
+ }), a.locale(d);
768
768
  })().then();
769
- }, [u, f, n]), null;
770
- }, Ft = ({
769
+ }, [a, f, n]), null;
770
+ }, $t = ({
771
771
  children: n,
772
772
  defaultQueriesOptions: r,
773
773
  defaultMutationsOptions: i,
774
- ...u
774
+ ...a
775
775
  }) => {
776
776
  var l, y;
777
- const { libraries: f } = k(A), 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);
777
+ const { libraries: f } = k(A), v = (a == null ? void 0 : a.QueryClient) || ((l = f == null ? void 0 : f.reactQuery) == null ? void 0 : l.QueryClient), d = (a == null ? void 0 : a.QueryClientProvider) || ((y = f == null ? void 0 : f.reactQuery) == null ? void 0 : y.QueryClientProvider);
778
778
  if (v === void 0)
779
779
  throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
780
780
  if (d === void 0)
@@ -785,7 +785,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
785
785
  ...i
786
786
  },
787
787
  queries: {
788
- getNextPageParam: (p, R, a) => p.length + (a || 0),
788
+ getNextPageParam: (p, _, R) => p.length + (R || 0),
789
789
  refetchOnWindowFocus: !1,
790
790
  retry: 3,
791
791
  ...r
@@ -793,48 +793,45 @@ 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
- }, Yt = (n) => {
797
- var y, p;
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
- if (i === void 0)
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 = ue(
796
+ }, Ft = (n) => {
797
+ var y, p, _;
798
+ const { libraries: r } = k(A), i = (n == null ? void 0 : n.i18) || (r == null ? void 0 : r.i18), a = ((y = n == null ? void 0 : n.i18) == null ? void 0 : y.translateFunction) || ((p = r == null ? void 0 : r.i18) == null ? void 0 : p.translateFunction), f = ((_ = i == null ? void 0 : i.i18next) == null ? void 0 : _.t) || a || ((R) => R), { unknownErrorTranslationKey: v = "error.unknownError" } = n || {}, d = f(v), c = ce(
802
799
  (R) => {
803
- var T, j, x, S, D, w, Y, N, W;
804
- const { response: a } = R || {};
805
- return a != null && a.reason ? String(a.reason) : (T = a == null ? void 0 : a.data) != null && T.reason ? String(a.data.reason) : (j = a == null ? void 0 : a.data) != null && j.message ? String(a.data.message) : (S = (x = a == null ? void 0 : a.data) == null ? void 0 : x.detail) != null && S.length && Array.isArray((D = a == null ? void 0 : a.data) == null ? void 0 : D.detail) && ((Y = (w = a == null ? void 0 : a.data) == null ? void 0 : w.detail[0]) != null && Y.msg) && typeof ((W = (N = a == null ? void 0 : a.data) == null ? void 0 : N.detail[0]) == null ? void 0 : W.msg) == "string" ? String(a.data.detail[0].msg) : d;
800
+ var P, S, T, D, w, Y, N, W, C;
801
+ const { response: u } = R || {};
802
+ return u != null && u.reason ? String(u.reason) : (P = u == null ? void 0 : u.data) != null && P.reason ? String(u.data.reason) : (S = u == null ? void 0 : u.data) != null && S.message ? String(u.data.message) : (D = (T = u == null ? void 0 : u.data) == null ? void 0 : T.detail) != null && D.length && Array.isArray((w = u == null ? void 0 : u.data) == null ? void 0 : w.detail) && ((N = (Y = u == null ? void 0 : u.data) == null ? void 0 : Y.detail[0]) != null && N.msg) && typeof ((C = (W = u == null ? void 0 : u.data) == null ? void 0 : W.detail[0]) == null ? void 0 : C.msg) == "string" ? String(u.data.detail[0].msg) : d;
806
803
  },
807
804
  [d]
808
805
  );
809
- return { getErrorCode: ue((R) => {
810
- var T, j, x;
811
- const { response: a } = R || {};
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";
806
+ return { getErrorCode: ce((R) => {
807
+ var P, S, T;
808
+ const { response: u } = R || {};
809
+ return u != null && u.error_code ? String(u == null ? void 0 : u.error_code) : (P = u == null ? void 0 : u.data) != null && P.error_code ? String((S = u == null ? void 0 : u.data) == null ? void 0 : S.error_code) : u != null && u.error_code ? String(u == null ? void 0 : u.error_code) : (T = u == null ? void 0 : u.data) != null && T.error_code ? String(u.data.error_code) : "unknown_error_code";
813
810
  }, []), printError: c };
814
- }, Nt = ({
811
+ }, Yt = ({
815
812
  data: n,
816
813
  fetchNextPage: r,
817
814
  isFetchingNextPage: i,
818
- isInitialLoading: u,
815
+ isInitialLoading: a,
819
816
  isLoading: f,
820
817
  enabled: v = !0
821
818
  }) => {
822
- const d = ue(
819
+ const d = ce(
823
820
  async (l) => {
824
821
  i || !v || await r({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
825
822
  },
826
823
  [v, r, i]
827
- ), c = se(() => {
824
+ ), c = le(() => {
828
825
  if (n)
829
826
  return n.pages.reduce((l, y) => [...l, ...y], []);
830
827
  }, [n]);
831
828
  return {
832
829
  fetchNextPageOnRowsScrollEnd: d,
833
830
  isLoading: i || f,
834
- loadingVariant: u ? "skeleton" : "linear",
831
+ loadingVariant: a ? "skeleton" : "linear",
835
832
  rows: c
836
833
  };
837
- }, Wt = (n) => {
834
+ }, Nt = (n) => {
838
835
  const { libraries: r } = k(A), i = (n == null ? void 0 : n.axios) || (r == null ? void 0 : r.axios);
839
836
  if (i === void 0)
840
837
  throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");
@@ -846,27 +843,27 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
846
843
  i.defaults.headers.common.Authorization = `${v} ${d}`;
847
844
  }
848
845
  };
849
- }, Rt = (n, r = "km") => {
846
+ }, Et = (n, r = "km") => {
850
847
  const i = Number(n);
851
848
  return Number.isNaN(i) ? `0 ${r}` : `${i.toFixed(2)} ${r}`;
852
- }, wt = (n) => {
849
+ }, Rt = (n) => {
853
850
  const r = n && typeof n == "object" && "pathname" in n && n.pathname ? n.pathname : n;
854
851
  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
- }, Ye = (n, r) => {
852
+ }, Ne = (n, r) => {
856
853
  if (!n)
857
854
  return "";
858
- const i = wt(n), u = typeof n == "object" && "pathname" in n ? `${n.origin}${i}` : n;
859
- return typeof r == "number" ? `${u.replace("/files", `/thumbs/${r}`)}` : u;
860
- }, Lt = (n) => {
861
- const { apiURL: r, libraries: i } = k(A), u = (n == null ? void 0 : n.dayjs) || (i == null ? void 0 : i.dayjs);
855
+ const i = Rt(n), a = typeof n == "object" && "pathname" in n ? `${n.origin}${i}` : n;
856
+ return typeof r == "number" ? `${a.replace("/files", `/thumbs/${r}`)}` : a;
857
+ }, Wt = (n) => {
858
+ const { apiURL: r, libraries: i } = k(A), a = (n == null ? void 0 : n.dayjs) || (i == null ? void 0 : i.dayjs);
862
859
  return {
863
860
  dateAdapter: (d, c = "ll") => {
864
- if (u === void 0)
861
+ if (a === void 0)
865
862
  throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
866
- return u(d).format(c);
863
+ return a(d).format(c);
867
864
  },
868
- distanceAdapter: Rt,
869
- filePathAdapter: (d, c) => Ye(
865
+ distanceAdapter: Et,
866
+ filePathAdapter: (d, c) => Ne(
870
867
  r && typeof d == "string" ? {
871
868
  origin: r,
872
869
  pathname: d
@@ -874,13 +871,13 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
874
871
  c
875
872
  )
876
873
  };
877
- }, _t = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), bt = (n) => {
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
- return u.charAt(0).toLowerCase() + u.slice(1);
880
- }, Ct = (n, r, i) => {
881
- const u = bt(r), f = _t(i);
882
- return `${u}${f}`;
883
- }, jt = (n) => {
874
+ }, _t = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), wt = (n) => {
875
+ const a = 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("");
876
+ return a.charAt(0).toLowerCase() + a.slice(1);
877
+ }, bt = (n, r, i) => {
878
+ const a = wt(r), f = _t(i);
879
+ return `${a}${f}`;
880
+ }, Ct = (n) => {
884
881
  if (n)
885
882
  return (n == null ? void 0 : n.reduce((r, i) => (r[i] = {
886
883
  query: {
@@ -889,7 +886,7 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
889
886
  useQuery: !0
890
887
  }
891
888
  }, r), {})) || {};
892
- }, Vt = (n) => {
889
+ }, Lt = (n) => {
893
890
  const { input: r = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = n || {};
894
891
  return {
895
892
  api: {
@@ -901,17 +898,17 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
901
898
  client: "react-query",
902
899
  mode: "tags-split",
903
900
  override: {
904
- header: (u) => [
901
+ header: (a) => [
905
902
  "Generated by orval 🍺",
906
- ...u.title ? [u.title] : [],
907
- ...u.description ? [u.description] : []
903
+ ...a.title ? [a.title] : [],
904
+ ...a.description ? [a.description] : []
908
905
  ],
909
906
  mutator: {
910
907
  name: "axiosCustomInstance",
911
908
  path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
912
909
  },
913
- operationName: Ct,
914
- ...(i == null ? void 0 : i.length) && { operations: jt(i) },
910
+ operationName: bt,
911
+ ...(i == null ? void 0 : i.length) && { operations: Ct(i) },
915
912
  query: {
916
913
  useQuery: !0
917
914
  }
@@ -921,24 +918,24 @@ const A = gt({}), Tt = ({ children: n, apiURL: r, libraries: i }) => {
921
918
  }
922
919
  }
923
920
  };
924
- }, Mt = (n, r, i = "ll") => String(n(r).format(i));
921
+ }, Vt = (n, r, i = "ll") => String(n(r).format(i));
925
922
  export {
926
- St as GTMSendPageView,
927
- Ot as InitializeAxiosConfig,
928
- $t as InitializeDaysJSConfig,
929
- At as InitializeI18nConfig,
930
- It as InitializeMapBoxConfig,
931
- Dt as InitializeSentryConfig,
923
+ xt as GTMSendPageView,
924
+ St as InitializeAxiosConfig,
925
+ It as InitializeDaysJSConfig,
926
+ Ot as InitializeI18nConfig,
927
+ kt as InitializeMapBoxConfig,
928
+ At as InitializeSentryConfig,
932
929
  A as InjectDependenciesContext,
933
- Tt as InjectDependenciesProvider,
934
- kt as MaskTextField,
935
- Ft as QueryClientProviderWithConfig,
936
- xt as RequireAuth,
937
- Mt as dateAdapter,
938
- Rt as distanceAdapter,
939
- Vt as getOrvalConfig,
940
- Lt as useAdapter,
941
- Wt as useAuth,
942
- Nt as useInfiniteDataGrid,
943
- Yt as useResponseError
930
+ Pt as InjectDependenciesProvider,
931
+ Dt as MaskTextField,
932
+ $t as QueryClientProviderWithConfig,
933
+ Tt as RequireAuth,
934
+ Vt as dateAdapter,
935
+ Et as distanceAdapter,
936
+ Lt as getOrvalConfig,
937
+ Wt as useAdapter,
938
+ Nt as useAuth,
939
+ Yt as useInfiniteDataGrid,
940
+ Ft as useResponseError
944
941
  };
package/dist/main.umd.cjs CHANGED
@@ -6,17 +6,17 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var se;function Ne(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var n=m,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"),E=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),T=Symbol.iterator,A="@@iterator";function D(e){if(e===null||typeof e!="object")return null;var t=T&&e[T]||e[A];return typeof t=="function"?t:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];N("error",e,o)}}function N(e,t,o){{var s=k.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(t+="%s",o=o.concat([p]));var R=o.map(function(h){return String(h)});R.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,R)}}var L=!1,M=!1,P=!1,ve=!1,ge=!1,J;J=Symbol.for("react.module.reference");function ut(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===v||ge||e===f||e===y||e===E||ve||e===x||L||M||P||typeof e=="object"&&e!==null&&(e.$$typeof===a||e.$$typeof===w||e.$$typeof===d||e.$$typeof===c||e.$$typeof===l||e.$$typeof===J||e.getModuleId!==void 0))}function ct(e,t,o){var s=e.displayName;if(s)return s;var p=t.displayName||t.name||"";return p!==""?o+"("+p+")":o}function he(e){return e.displayName||"Context"}function Y(e){if(e==null)return null;if(typeof e.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case i:return"Portal";case v:return"Profiler";case f:return"StrictMode";case y:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var t=e;return he(t)+".Consumer";case d:var o=e;return he(o._context)+".Provider";case l:return ct(e,e.render,"ForwardRef");case w:var s=e.displayName||null;return s!==null?s:Y(e.type)||"Memo";case a:{var p=e,R=p._payload,h=p._init;try{return Y(h(R))}catch{return null}}}return null}var z=Object.assign,Q=0,ye,me,pe,Ee,Re,we,_e;function Ce(){}Ce.__reactDisabledLog=!0;function st(){{if(Q===0){ye=console.log,me=console.info,pe=console.warn,Ee=console.error,Re=console.group,we=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Q++}}function lt(){{if(Q--,Q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},e,{value:ye}),info:z({},e,{value:me}),warn:z({},e,{value:pe}),error:z({},e,{value:Ee}),group:z({},e,{value:Re}),groupCollapsed:z({},e,{value:we}),groupEnd:z({},e,{value:_e})})}Q<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var te=k.ReactCurrentDispatcher,re;function H(e,t,o){{if(re===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||""}return`
9
+ */var se;function Ne(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var n=m,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=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"),E=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),u=Symbol.for("react.offscreen"),S=Symbol.iterator,D="@@iterator";function x(e){if(e===null||typeof e!="object")return null;var t=S&&e[S]||e[D];return typeof t=="function"?t:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];N("error",e,o)}}function N(e,t,o){{var s=k.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(t+="%s",o=o.concat([p]));var R=o.map(function(h){return String(h)});R.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,R)}}var L=!1,M=!1,P=!1,ve=!1,ge=!1,J;J=Symbol.for("react.module.reference");function ut(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===v||ge||e===f||e===y||e===E||ve||e===u||L||M||P||typeof e=="object"&&e!==null&&(e.$$typeof===w||e.$$typeof===C||e.$$typeof===d||e.$$typeof===c||e.$$typeof===l||e.$$typeof===J||e.getModuleId!==void 0))}function ct(e,t,o){var s=e.displayName;if(s)return s;var p=t.displayName||t.name||"";return p!==""?o+"("+p+")":o}function he(e){return e.displayName||"Context"}function Y(e){if(e==null)return null;if(typeof e.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case i:return"Portal";case v:return"Profiler";case f:return"StrictMode";case y:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var t=e;return he(t)+".Consumer";case d:var o=e;return he(o._context)+".Provider";case l:return ct(e,e.render,"ForwardRef");case C:var s=e.displayName||null;return s!==null?s:Y(e.type)||"Memo";case w:{var p=e,R=p._payload,h=p._init;try{return Y(h(R))}catch{return null}}}return null}var z=Object.assign,Q=0,ye,me,pe,Ee,Re,_e,we;function Ce(){}Ce.__reactDisabledLog=!0;function st(){{if(Q===0){ye=console.log,me=console.info,pe=console.warn,Ee=console.error,Re=console.group,_e=console.groupCollapsed,we=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Q++}}function lt(){{if(Q--,Q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},e,{value:ye}),info:z({},e,{value:me}),warn:z({},e,{value:pe}),error:z({},e,{value:Ee}),group:z({},e,{value:Re}),groupCollapsed:z({},e,{value:_e}),groupEnd:z({},e,{value:we})})}Q<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var te=k.ReactCurrentDispatcher,re;function H(e,t,o){{if(re===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||""}return`
10
10
  `+re+e}}var ne=!1,K;{var ft=typeof WeakMap=="function"?WeakMap:Map;K=new ft}function be(e,t){if(!e||ne)return"";{var o=K.get(e);if(o!==void 0)return o}var s;ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var R;R=te.current,te.current=null,st();try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(W){s=W}Reflect.construct(e,[],h)}else{try{h.call()}catch(W){s=W}e.call(h.prototype)}}else{try{throw Error()}catch(W){s=W}e()}}catch(W){if(W&&s&&typeof W.stack=="string"){for(var g=W.stack.split(`
11
- `),S=s.stack.split(`
12
- `),b=g.length-1,j=S.length-1;b>=1&&j>=0&&g[b]!==S[j];)j--;for(;b>=1&&j>=0;b--,j--)if(g[b]!==S[j]){if(b!==1||j!==1)do if(b--,j--,j<0||g[b]!==S[j]){var I=`
13
- `+g[b].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),typeof e=="function"&&K.set(e,I),I}while(b>=1&&j>=0);break}}}finally{ne=!1,te.current=R,lt(),Error.prepareStackTrace=p}var U=e?e.displayName||e.name:"",We=U?H(U):"";return typeof e=="function"&&K.set(e,We),We}function dt(e,t,o){return be(e,!1)}function vt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Z(e,t,o){if(e==null)return"";if(typeof e=="function")return be(e,vt(e));if(typeof e=="string")return H(e);switch(e){case y:return H("Suspense");case E:return H("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return dt(e.render);case w:return Z(e.type,t,o);case a:{var s=e,p=s._payload,R=s._init;try{return Z(R(p),t,o)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,je={},Pe=k.ReactDebugCurrentFrame;function q(e){if(e){var t=e._owner,o=Z(e.type,e._source,t?t.type:null);Pe.setExtraStackFrame(o)}else Pe.setExtraStackFrame(null)}function gt(e,t,o,s,p){{var R=Function.call.bind($);for(var h in e)if(R(e,h)){var g=void 0;try{if(typeof e[h]!="function"){var S=Error((s||"React class")+": "+o+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}g=e[h](t,h,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){g=b}g&&!(g instanceof Error)&&(q(p),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",o,h,typeof g),q(null)),g instanceof Error&&!(g.message in je)&&(je[g.message]=!0,q(p),C("Failed %s type: %s",o,g.message),q(null))}}}var ht=Array.isArray;function oe(e){return ht(e)}function yt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function mt(e){try{return Te(e),!1}catch{return!0}}function Te(e){return""+e}function Se(e){if(mt(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",yt(e)),Te(e)}var X=k.ReactCurrentOwner,pt={key:!0,ref:!0,__self:!0,__source:!0},xe,Oe,ie;ie={};function Et(e){if($.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Rt(e){if($.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function wt(e,t){if(typeof e.ref=="string"&&X.current&&t&&X.current.stateNode!==t){var o=Y(X.current.type);ie[o]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y(X.current.type),e.ref),ie[o]=!0)}}function _t(e,t){{var o=function(){xe||(xe=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function Ct(e,t){{var o=function(){Oe||(Oe=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var bt=function(e,t,o,s,p,R,h){var g={$$typeof:r,type:e,key:t,ref:o,props:h,_owner:R};return g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(g,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(g,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g};function jt(e,t,o,s,p){{var R,h={},g=null,S=null;o!==void 0&&(Se(o),g=""+o),Rt(t)&&(Se(t.key),g=""+t.key),Et(t)&&(S=t.ref,wt(t,p));for(R in t)$.call(t,R)&&!pt.hasOwnProperty(R)&&(h[R]=t[R]);if(e&&e.defaultProps){var b=e.defaultProps;for(R in b)h[R]===void 0&&(h[R]=b[R])}if(g||S){var j=typeof e=="function"?e.displayName||e.name||"Unknown":e;g&&_t(h,j),S&&Ct(h,j)}return bt(e,g,S,p,s,X.current,h)}}var ae=k.ReactCurrentOwner,Ae=k.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,o=Z(e.type,e._source,t?t.type:null);Ae.setExtraStackFrame(o)}else Ae.setExtraStackFrame(null)}var ue;ue=!1;function ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function De(){{if(ae.current){var e=Y(ae.current.type);if(e)return`
11
+ `),O=s.stack.split(`
12
+ `),j=g.length-1,T=O.length-1;j>=1&&T>=0&&g[j]!==O[T];)T--;for(;j>=1&&T>=0;j--,T--)if(g[j]!==O[T]){if(j!==1||T!==1)do if(j--,T--,T<0||g[j]!==O[T]){var I=`
13
+ `+g[j].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),typeof e=="function"&&K.set(e,I),I}while(j>=1&&T>=0);break}}}finally{ne=!1,te.current=R,lt(),Error.prepareStackTrace=p}var U=e?e.displayName||e.name:"",We=U?H(U):"";return typeof e=="function"&&K.set(e,We),We}function dt(e,t,o){return be(e,!1)}function vt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Z(e,t,o){if(e==null)return"";if(typeof e=="function")return be(e,vt(e));if(typeof e=="string")return H(e);switch(e){case y:return H("Suspense");case E:return H("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return dt(e.render);case C:return Z(e.type,t,o);case w:{var s=e,p=s._payload,R=s._init;try{return Z(R(p),t,o)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,je={},Pe=k.ReactDebugCurrentFrame;function q(e){if(e){var t=e._owner,o=Z(e.type,e._source,t?t.type:null);Pe.setExtraStackFrame(o)}else Pe.setExtraStackFrame(null)}function gt(e,t,o,s,p){{var R=Function.call.bind($);for(var h in e)if(R(e,h)){var g=void 0;try{if(typeof e[h]!="function"){var O=Error((s||"React class")+": "+o+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}g=e[h](t,h,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(j){g=j}g&&!(g instanceof Error)&&(q(p),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",o,h,typeof g),q(null)),g instanceof Error&&!(g.message in je)&&(je[g.message]=!0,q(p),b("Failed %s type: %s",o,g.message),q(null))}}}var ht=Array.isArray;function oe(e){return ht(e)}function yt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function mt(e){try{return Te(e),!1}catch{return!0}}function Te(e){return""+e}function Se(e){if(mt(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",yt(e)),Te(e)}var X=k.ReactCurrentOwner,pt={key:!0,ref:!0,__self:!0,__source:!0},xe,Oe,ie;ie={};function Et(e){if($.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Rt(e){if($.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function _t(e,t){if(typeof e.ref=="string"&&X.current&&t&&X.current.stateNode!==t){var o=Y(X.current.type);ie[o]||(b('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',Y(X.current.type),e.ref),ie[o]=!0)}}function wt(e,t){{var o=function(){xe||(xe=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function Ct(e,t){{var o=function(){Oe||(Oe=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var bt=function(e,t,o,s,p,R,h){var g={$$typeof:r,type:e,key:t,ref:o,props:h,_owner:R};return g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(g,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(g,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g};function jt(e,t,o,s,p){{var R,h={},g=null,O=null;o!==void 0&&(Se(o),g=""+o),Rt(t)&&(Se(t.key),g=""+t.key),Et(t)&&(O=t.ref,_t(t,p));for(R in t)$.call(t,R)&&!pt.hasOwnProperty(R)&&(h[R]=t[R]);if(e&&e.defaultProps){var j=e.defaultProps;for(R in j)h[R]===void 0&&(h[R]=j[R])}if(g||O){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;g&&wt(h,T),O&&Ct(h,T)}return bt(e,g,O,p,s,X.current,h)}}var ae=k.ReactCurrentOwner,Ae=k.ReactDebugCurrentFrame;function V(e){if(e){var t=e._owner,o=Z(e.type,e._source,t?t.type:null);Ae.setExtraStackFrame(o)}else Ae.setExtraStackFrame(null)}var ue;ue=!1;function ce(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function De(){{if(ae.current){var e=Y(ae.current.type);if(e)return`
14
14
 
15
15
  Check the render method of \``+e+"`."}return""}}function Pt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),o=e.lineNumber;return`
16
16
 
17
17
  Check your code at `+t+":"+o+"."}return""}}var Ie={};function Tt(e){{var t=De();if(!t){var o=typeof e=="string"?e:e.displayName||e.name;o&&(t=`
18
18
 
19
- Check the top-level render call using <`+o+">.")}return t}}function ke(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=Tt(t);if(Ie[o])return;Ie[o]=!0;var s="";e&&e._owner&&e._owner!==ae.current&&(s=" It was passed a child from "+Y(e._owner.type)+"."),V(e),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),V(null)}}function Fe(e,t){{if(typeof e!="object")return;if(oe(e))for(var o=0;o<e.length;o++){var s=e[o];ce(s)&&ke(s,t)}else if(ce(e))e._store&&(e._store.validated=!0);else if(e){var p=D(e);if(typeof p=="function"&&p!==e.entries)for(var R=p.call(e),h;!(h=R.next()).done;)ce(h.value)&&ke(h.value,t)}}}function St(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===l||t.$$typeof===w))o=t.propTypes;else return;if(o){var s=Y(t);gt(o,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!ue){ue=!0;var p=Y(t);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var s=t[o];if(s!=="children"&&s!=="key"){V(e),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),V(null);break}}e.ref!==null&&(V(e),C("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}function Ye(e,t,o,s,p,R){{var h=ut(e);if(!h){var g="";(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.");var S=Pt(p);S?g+=S:g+=De();var b;e===null?b="null":oe(e)?b="array":e!==void 0&&e.$$typeof===r?(b="<"+(Y(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):b=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",b,g)}var j=jt(e,t,o,p,R);if(j==null)return j;if(h){var I=t.children;if(I!==void 0)if(s)if(oe(I)){for(var U=0;U<I.length;U++)Fe(I[U],e);Object.freeze&&Object.freeze(I)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fe(I,e)}return e===u?xt(j):St(j),j}}function Ot(e,t,o){return Ye(e,t,o,!0)}function At(e,t,o){return Ye(e,t,o,!1)}var Dt=At,It=Ot;B.Fragment=u,B.jsx=Dt,B.jsxs=It}()),B}var G={};/**
19
+ Check the top-level render call using <`+o+">.")}return t}}function ke(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=Tt(t);if(Ie[o])return;Ie[o]=!0;var s="";e&&e._owner&&e._owner!==ae.current&&(s=" It was passed a child from "+Y(e._owner.type)+"."),V(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),V(null)}}function Fe(e,t){{if(typeof e!="object")return;if(oe(e))for(var o=0;o<e.length;o++){var s=e[o];ce(s)&&ke(s,t)}else if(ce(e))e._store&&(e._store.validated=!0);else if(e){var p=x(e);if(typeof p=="function"&&p!==e.entries)for(var R=p.call(e),h;!(h=R.next()).done;)ce(h.value)&&ke(h.value,t)}}}function St(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===l||t.$$typeof===C))o=t.propTypes;else return;if(o){var s=Y(t);gt(o,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!ue){ue=!0;var p=Y(t);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xt(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var s=t[o];if(s!=="children"&&s!=="key"){V(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),V(null);break}}e.ref!==null&&(V(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}function Ye(e,t,o,s,p,R){{var h=ut(e);if(!h){var g="";(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.");var O=Pt(p);O?g+=O:g+=De();var j;e===null?j="null":oe(e)?j="array":e!==void 0&&e.$$typeof===r?(j="<"+(Y(e.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):j=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,g)}var T=jt(e,t,o,p,R);if(T==null)return T;if(h){var I=t.children;if(I!==void 0)if(s)if(oe(I)){for(var U=0;U<I.length;U++)Fe(I[U],e);Object.freeze&&Object.freeze(I)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fe(I,e)}return e===a?xt(T):St(T),T}}function Ot(e,t,o){return Ye(e,t,o,!0)}function At(e,t,o){return Ye(e,t,o,!1)}var Dt=At,It=Ot;B.Fragment=a,B.jsx=Dt,B.jsxs=It}()),B}var G={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,4 +24,4 @@ Check the top-level render call using <`+o+">.")}return t}}function 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"),a=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,C={},w=null,u=null;y!==void 0&&(w=""+y),l.key!==void 0&&(w=""+l.key),l.ref!==void 0&&(u=l.ref);for(E in l)a.call(l,E)&&!v.hasOwnProperty(E)&&(C[E]=l[E]);if(c&&c.defaultProps)for(E in l=c.defaultProps,l)C[E]===void 0&&(C[E]=l[E]);return{$$typeof:r,type:c,key:w,ref:u,props:C,_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 A=m.createContext({}),Me=({children:n,apiURL:r,libraries:i})=>{const a=m.useMemo(()=>({apiURL:r,libraries:i}),[r,i]);return F.jsx(A.Provider,{value:a,children:n})},ze=({Fallback:n,isLogged:r,loginPath:i="/login",localStorageKey:a="user",redirect401Path:f="/login",...v})=>{var b,N,L,M;const{libraries:d}=m.useContext(A),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:C,Navigate:w,Outlet:u}=l,S=C(),D=m.useRef(!1),x=typeof r=="function"?r():!!r,k=typeof x=="boolean"?x:x==null?void 0:x.isLogged;return m.useEffect(()=>{D.current||(D.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(a),E(f)),Promise.reject(P)}))},[c==null?void 0:c.defaults.headers.common,c==null?void 0:c.interceptors.response,a,f]),k&&!y?F.jsx(m.Suspense,{fallback:n,children:(N=(b=S.state)==null?void 0:b.from)!=null&&N.state&&((M=(L=S.state)==null?void 0:L.from)==null?void 0:M.pathname)===i?F.jsx(w,{to:S.state.from.state.from.pathname+S.state.from.state.from.search,replace:!0}):F.jsx(u,{})}):F.jsx(w,{to:i,state:{from:S},replace:!0})},Ve=({...n})=>{const{libraries:r}=m.useContext(A),i=(n==null?void 0:n.reactRouter)||(r==null?void 0:r.reactRouter),a=(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(a===void 0)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const{useGoogleTagManager:f}=a,{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:a="application/json",...f})=>{const{apiURL:v=f.apiURL,libraries:d}=m.useContext(A),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,C=y!=null&&y[i]?y[i]:null,w=l?`${E} ${C}`:null;return c.defaults.baseURL=v,c.defaults.headers.post["Content-Type"]=a,w&&(c.defaults.headers.common.Authorization=w),null},Be=({debug:n,resources:r,...i})=>{const{libraries:a}=m.useContext(A),f=(i==null?void 0:i.i18)||(a==null?void 0:a.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:a,replaysOnErrorSampleRate:f,tracePropagationTargets:v,ignoreErrors:d,debug:c,environment:l,...y})=>{const{libraries:E}=m.useContext(A),C=(y==null?void 0:y.sentry)||(E==null?void 0:E.sentry),w=(y==null?void 0:y.reactRouter)||(E==null?void 0:E.reactRouter),{createRoutesFromChildren:u,matchRoutes:S,useLocation:D,useNavigationType:x}=w;if(C===void 0)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(w===void 0)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return C.isInitialized()||(c||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&C.init({debug:c,dsn:n,environment:l||"production",ignoreErrors:[...d||[],/dynamically imported module/],integrations:[C.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:u,matchRoutes:S,useEffect:m.useEffect,useLocation:D,useNavigationType:x}),...r||[]],replaysOnErrorSampleRate:f||1,replaysSessionSampleRate:a||.1,tracePropagationTargets:v,tracesSampleRate:i||1}),null},Je=({IMaskMixin:n,...r})=>{const i=m.useMemo(()=>n(({TextField:a,...f})=>F.jsx(a,{...f})),[n]);return F.jsx(i,{...r})},Qe=({accessToken:n,...r})=>{const{libraries:i}=m.useContext(A),a=(r==null?void 0:r.mapbox)||(i==null?void 0:i.mapbox);if(a===void 0)throw new Error("Mapbox is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return n&&(a.accessToken=n),null},Xe=({language:n,...r})=>{const{libraries:i}=m.useContext(A),a=(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(a===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=>{a.extend(l.default)}),a.locale(d)})().then()},[a,f,n]),null},He=({children:n,defaultQueriesOptions:r,defaultMutationsOptions:i,...a})=>{var l,y;const{libraries:f}=m.useContext(A),v=(a==null?void 0:a.QueryClient)||((l=f==null?void 0:f.reactQuery)==null?void 0:l.QueryClient),d=(a==null?void 0:a.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,C,w)=>E.length+(w||0),refetchOnWindowFocus:!1,retry:3,...r}}});return F.jsx(d,{client:c,children:n})},Ke=n=>{var y,E,C;const{libraries:r}=m.useContext(A),i=(n==null?void 0:n.i18)||(r==null?void 0:r.i18),a=((y=n==null?void 0:n.i18)==null?void 0:y.translateFunction)||((E=r==null?void 0:r.i18)==null?void 0:E.translateFunction),f=((C=i==null?void 0:i.i18next)==null?void 0:C.t)||a||(w=>w),{unknownErrorTranslationKey:v="error.unknownError"}=n||{},d=f(v),c=m.useCallback(w=>{var S,D,x,k,b,N,L,M,P;const{response:u}=w||{};return u!=null&&u.reason?String(u.reason):(S=u==null?void 0:u.data)!=null&&S.reason?String(u.data.reason):(D=u==null?void 0:u.data)!=null&&D.message?String(u.data.message):(k=(x=u==null?void 0:u.data)==null?void 0:x.detail)!=null&&k.length&&Array.isArray((b=u==null?void 0:u.data)==null?void 0:b.detail)&&((L=(N=u==null?void 0:u.data)==null?void 0:N.detail[0])!=null&&L.msg)&&typeof((P=(M=u==null?void 0:u.data)==null?void 0:M.detail[0])==null?void 0:P.msg)=="string"?String(u.data.detail[0].msg):d},[d]);return{getErrorCode:m.useCallback(w=>{var S,D,x;const{response:u}=w||{};return u!=null&&u.error_code?String(u==null?void 0:u.error_code):(S=u==null?void 0:u.data)!=null&&S.error_code?String((D=u==null?void 0:u.data)==null?void 0:D.error_code):u!=null&&u.error_code?String(u==null?void 0:u.error_code):(x=u==null?void 0:u.data)!=null&&x.error_code?String(u.data.error_code):"unknown_error_code"},[]),printError:c}},Ze=({data:n,fetchNextPage:r,isFetchingNextPage:i,isInitialLoading:a,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:a?"skeleton":"linear",rows:c}},$e=n=>{const{libraries:r}=m.useContext(A),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),a=typeof n=="object"&&"pathname"in n?`${n.origin}${i}`:n;return typeof r=="number"?`${a.replace("/files",`/thumbs/${r}`)}`:a},et=n=>{const{apiURL:r,libraries:i}=m.useContext(A),a=(n==null?void 0:n.dayjs)||(i==null?void 0:i.dayjs);return{dateAdapter:(d,c="ll")=>{if(a===void 0)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return a(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 a=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 a.charAt(0).toLowerCase()+a.slice(1)},nt=(n,r,i)=>{const a=rt(r),f=tt(i);return`${a}${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:a=>["Generated by orval 🍺",...a.title?[a.title]:[],...a.description?[a.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=A,_.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"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "2.0.0-beta.4",
3
+ "version": "2.0.0-beta.6",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "types": "./dist/main.d.ts",