@tracktor/shared-module 0.23.4 → 1.0.0-beta.0

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