@tracktor/shared-module 0.8.0 → 0.9.0

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