@tracktor/shared-module 0.23.1 → 0.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/shared-module/releases)
2
2
 
3
- ## v0.23.1
4
- - **[fix]** : `filePathAdapter` with wrong path
3
+ ## v0.23.2
4
+ - **[fix]** : regex loading dynamically imported module sentry
package/dist/main.js CHANGED
@@ -9,11 +9,11 @@ var ue = { exports: {} }, M = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var De;
12
+ var Fe;
13
13
  function br() {
14
- return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
14
+ return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
15
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"), v = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), n = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), m = 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 F(e) {
16
+ function D(e) {
17
17
  if (e === null || typeof e != "object")
18
18
  return null;
19
19
  var r = k && e[k] || e[$];
@@ -101,7 +101,7 @@ function br() {
101
101
  }
102
102
  return null;
103
103
  }
104
- var D = Object.assign, N = 0, ve, pe, ge, me, he, Ee, ye;
104
+ var F = Object.assign, N = 0, ve, pe, ge, me, he, Ee, ye;
105
105
  function be() {
106
106
  }
107
107
  be.__reactDisabledLog = !0;
@@ -137,25 +137,25 @@ function br() {
137
137
  writable: !0
138
138
  };
139
139
  Object.defineProperties(console, {
140
- log: D({}, e, {
140
+ log: F({}, e, {
141
141
  value: ve
142
142
  }),
143
- info: D({}, e, {
143
+ info: F({}, e, {
144
144
  value: pe
145
145
  }),
146
- warn: D({}, e, {
146
+ warn: F({}, e, {
147
147
  value: ge
148
148
  }),
149
- error: D({}, e, {
149
+ error: F({}, e, {
150
150
  value: me
151
151
  }),
152
- group: D({}, e, {
152
+ group: F({}, e, {
153
153
  value: he
154
154
  }),
155
- groupCollapsed: D({}, e, {
155
+ groupCollapsed: F({}, e, {
156
156
  value: Ee
157
157
  }),
158
- groupEnd: D({}, e, {
158
+ groupEnd: F({}, e, {
159
159
  value: ye
160
160
  })
161
161
  });
@@ -250,8 +250,8 @@ function br() {
250
250
  } finally {
251
251
  ee = !1, Z.current = g, Ue(), Error.prepareStackTrace = p;
252
252
  }
253
- var I = e ? e.displayName || e.name : "", Fe = I ? z(I) : "";
254
- return typeof e == "function" && B.set(e, Fe), Fe;
253
+ var I = e ? e.displayName || e.name : "", De = I ? z(I) : "";
254
+ return typeof e == "function" && B.set(e, De), De;
255
255
  }
256
256
  function Be(e, r, a) {
257
257
  return Re(e, !1);
@@ -512,7 +512,7 @@ Check the top-level render call using <` + a + ">.");
512
512
  else if (oe(e))
513
513
  e._store && (e._store.validated = !0);
514
514
  else if (e) {
515
- var p = F(e);
515
+ var p = D(e);
516
516
  if (typeof p == "function" && p !== e.entries)
517
517
  for (var g = p.call(e), d; !(d = g.next()).done; )
518
518
  oe(d.value) && xe(d.value, r);
@@ -667,7 +667,7 @@ const q = pr({
667
667
  redirect401Path: u = "/login",
668
668
  ...c
669
669
  }) => {
670
- var $, F, j, R;
670
+ var $, D, j, R;
671
671
  const {
672
672
  axios: v = c.axios,
673
673
  useLocation: E = c.useLocation,
@@ -692,7 +692,7 @@ const q = pr({
692
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 && (v.defaults.headers.common.Authorization = null, localStorage.removeItem(i), C(u)), Promise.reject(_);
693
693
  }
694
694
  ));
695
- }, [v == null ? void 0 : v.defaults.headers.common, v == null ? void 0 : v.interceptors.response, i, u]), O && !m ? /* @__PURE__ */ x.jsx(Er, { fallback: t, children: (F = ($ = T.state) == null ? void 0 : $.from) != null && F.state && ((R = (j = T.state) == null ? void 0 : j.from) == null ? void 0 : R.pathname) === o ? /* @__PURE__ */ x.jsx(h, { to: T.state.from.state.from.pathname + T.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ x.jsx(l, {}) }) : /* @__PURE__ */ x.jsx(h, { to: o, state: { from: T }, replace: !0 });
695
+ }, [v == null ? void 0 : v.defaults.headers.common, v == null ? void 0 : v.interceptors.response, i, u]), O && !m ? /* @__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(h, { to: T.state.from.state.from.pathname + T.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ x.jsx(l, {}) }) : /* @__PURE__ */ x.jsx(h, { to: o, state: { from: T }, replace: !0 });
696
696
  }, ie = (t) => `GTMSendPageView require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, xr = ({ ...t }) => {
697
697
  const {
698
698
  useLocation: o = t.useLocation,
@@ -744,7 +744,7 @@ const q = pr({
744
744
  document.documentElement.lang !== t.resolvedLanguage && t.resolvedLanguage && document.documentElement.setAttribute("lang", t.resolvedLanguage);
745
745
  }), t.on("languageChanged", (v) => {
746
746
  document.documentElement.setAttribute("lang", v);
747
- })), null), Fr = ({
747
+ })), null), Dr = ({
748
748
  dsn: t,
749
749
  sentry: o,
750
750
  integrations: i,
@@ -760,7 +760,7 @@ const q = pr({
760
760
  debug: h,
761
761
  dsn: t,
762
762
  environment: m || "production",
763
- ignoreErrors: l || [/Failed to fetch dynamically imported module/],
763
+ ignoreErrors: [...l || [], /dynamically imported module/],
764
764
  integrations: [
765
765
  new o.BrowserTracing({
766
766
  routingInstrumentation: o.reactRouterV6Instrumentation(
@@ -778,7 +778,7 @@ const q = pr({
778
778
  replaysSessionSampleRate: v || 0.1,
779
779
  tracePropagationTargets: n,
780
780
  tracesSampleRate: u || 1
781
- }), null), Dr = ({ IMaskMixin: t, ...o }) => {
781
+ }), null), Fr = ({ IMaskMixin: t, ...o }) => {
782
782
  const i = se(
783
783
  // eslint-disable-next-line react/jsx-props-no-spreading
784
784
  () => t(({ TextField: u, ...c }) => /* @__PURE__ */ x.jsx(u, { ...c })),
@@ -804,9 +804,9 @@ const q = pr({
804
804
  }, Nr = (t) => {
805
805
  const { unknownErrorTranslationKey: o = "error.unknownError" } = t || {}, { translate: i = t == null ? void 0 : t.translate } = K(q), u = i ? i(o) : "Unknown error", c = Y(
806
806
  (E) => {
807
- var l, h, m, C, O, T, k, $, F;
807
+ var l, h, m, C, O, T, k, $, D;
808
808
  const { response: n } = E || {};
809
- return n != null && n.reason ? String(n.reason) : (l = n == null ? void 0 : n.data) != null && l.reason ? String(n.data.reason) : (h = n == null ? void 0 : n.data) != null && h.message ? String(n.data.message) : (C = (m = n == null ? void 0 : n.data) == null ? void 0 : m.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 ((F = ($ = n == null ? void 0 : n.data) == null ? void 0 : $.detail[0]) == null ? void 0 : F.msg) == "string" ? String(n.data.detail[0].msg) : u;
809
+ return n != null && n.reason ? String(n.reason) : (l = n == null ? void 0 : n.data) != null && l.reason ? String(n.data.reason) : (h = n == null ? void 0 : n.data) != null && h.message ? String(n.data.message) : (C = (m = n == null ? void 0 : n.data) == null ? void 0 : m.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;
810
810
  },
811
811
  [u]
812
812
  );
@@ -929,10 +929,10 @@ export {
929
929
  q as InjectDependenciesContext,
930
930
  Pr as InjectDependenciesProvider,
931
931
  Lr as MapBoxConfig,
932
- Dr as MaskTextField,
932
+ Fr as MaskTextField,
933
933
  Ir as QueryClientConfigProvider,
934
934
  Ar as RequireAuth,
935
- Fr as SentryConfig,
935
+ Dr as SentryConfig,
936
936
  Yr as getOrvalConfig,
937
937
  Vr as useAdapter,
938
938
  Mr as useAuth,
package/dist/main.umd.cjs CHANGED
@@ -6,11 +6,11 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var se;function Ne(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var t=E,o=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),n=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),F=Symbol.iterator,I="@@iterator";function L(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[I];return typeof r=="function"?r:null}var k=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];w("error",e,a)}}function w(e,r,a){{var s=k.ReactDebugCurrentFrame,g=s.getStackAddendum();g!==""&&(r+="%s",a=a.concat([g]));var p=a.map(function(d){return String(d)});p.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,p)}}var fe=!1,de=!1,$=!1,or=!1,ir=!1,ve;ve=Symbol.for("react.module.reference");function ur(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===v||ir||e===c||e===m||e===h||or||e===O||fe||de||$||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===S||e.$$typeof===y||e.$$typeof===n||e.$$typeof===l||e.$$typeof===ve||e.getModuleId!==void 0))}function sr(e,r,a){var s=e.displayName;if(s)return s;var g=r.displayName||r.name||"";return g!==""?a+"("+g+")":a}function ge(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case i:return"Portal";case v:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n:var r=e;return ge(r)+".Consumer";case y:var a=e;return ge(a._context)+".Provider";case l:return sr(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:x(e.type)||"Memo";case j:{var g=e,p=g._payload,d=g._init;try{return x(d(p))}catch{return null}}}return null}var N=Object.assign,z=0,pe,he,me,Ee,ye,be,Re;function _e(){}_e.__reactDisabledLog=!0;function cr(){{if(z===0){pe=console.log,he=console.info,me=console.warn,Ee=console.error,ye=console.group,be=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function lr(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:pe}),info:N({},e,{value:he}),warn:N({},e,{value:me}),error:N({},e,{value:Ee}),group:N({},e,{value:ye}),groupCollapsed:N({},e,{value:be}),groupEnd:N({},e,{value:Re})})}z<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=k.ReactCurrentDispatcher,re;function J(e,r,a){{if(re===void 0)try{throw Error()}catch(g){var s=g.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||""}return`
9
+ */var se;function Ne(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var t=E,o=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),n=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),F=Symbol.iterator,I="@@iterator";function L(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[I];return typeof r=="function"?r:null}var k=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];w("error",e,a)}}function w(e,r,a){{var s=k.ReactDebugCurrentFrame,g=s.getStackAddendum();g!==""&&(r+="%s",a=a.concat([g]));var p=a.map(function(d){return String(d)});p.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,p)}}var fe=!1,de=!1,$=!1,or=!1,ir=!1,ve;ve=Symbol.for("react.module.reference");function ur(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===v||ir||e===c||e===h||e===m||or||e===O||fe||de||$||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===S||e.$$typeof===y||e.$$typeof===n||e.$$typeof===l||e.$$typeof===ve||e.getModuleId!==void 0))}function sr(e,r,a){var s=e.displayName;if(s)return s;var g=r.displayName||r.name||"";return g!==""?a+"("+g+")":a}function ge(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case i:return"Portal";case v:return"Profiler";case c:return"StrictMode";case h:return"Suspense";case m:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n:var r=e;return ge(r)+".Consumer";case y:var a=e;return ge(a._context)+".Provider";case l:return sr(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:x(e.type)||"Memo";case j:{var g=e,p=g._payload,d=g._init;try{return x(d(p))}catch{return null}}}return null}var N=Object.assign,z=0,pe,me,he,Ee,ye,be,Re;function _e(){}_e.__reactDisabledLog=!0;function cr(){{if(z===0){pe=console.log,me=console.info,he=console.warn,Ee=console.error,ye=console.group,be=console.groupCollapsed,Re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function lr(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:pe}),info:N({},e,{value:me}),warn:N({},e,{value:he}),error:N({},e,{value:Ee}),group:N({},e,{value:ye}),groupCollapsed:N({},e,{value:be}),groupEnd:N({},e,{value:Re})})}z<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=k.ReactCurrentDispatcher,re;function J(e,r,a){{if(re===void 0)try{throw Error()}catch(g){var s=g.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||""}return`
10
10
  `+re+e}}var te=!1,X;{var fr=typeof WeakMap=="function"?WeakMap:Map;X=new fr}function Ce(e,r){if(!e||te)return"";{var a=X.get(e);if(a!==void 0)return a}var s;te=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=ee.current,ee.current=null,cr();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(D){s=D}Reflect.construct(e,[],d)}else{try{d.call()}catch(D){s=D}e.call(d.prototype)}}else{try{throw Error()}catch(D){s=D}e()}}catch(D){if(D&&s&&typeof D.stack=="string"){for(var f=D.stack.split(`
11
11
  `),T=s.stack.split(`
12
12
  `),R=f.length-1,_=T.length-1;R>=1&&_>=0&&f[R]!==T[_];)_--;for(;R>=1&&_>=0;R--,_--)if(f[R]!==T[_]){if(R!==1||_!==1)do if(R--,_--,_<0||f[R]!==T[_]){var P=`
13
- `+f[R].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,P),P}while(R>=1&&_>=0);break}}}finally{te=!1,ee.current=p,lr(),Error.prepareStackTrace=g}var V=e?e.displayName||e.name:"",Le=V?J(V):"";return typeof e=="function"&&X.set(e,Le),Le}function dr(e,r,a){return Ce(e,!1)}function vr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,a){if(e==null)return"";if(typeof e=="function")return Ce(e,vr(e));if(typeof e=="string")return J(e);switch(e){case m:return J("Suspense");case h:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return dr(e.render);case S:return H(e.type,r,a);case j:{var s=e,g=s._payload,p=s._init;try{return H(p(g),r,a)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,we={},Te=k.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(a)}else Te.setExtraStackFrame(null)}function gr(e,r,a,s,g){{var p=Function.call.bind(K);for(var d in e)if(p(e,d)){var f=void 0;try{if(typeof e[d]!="function"){var T=Error((s||"React class")+": "+a+" 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`.");throw T.name="Invariant Violation",T}f=e[d](r,d,s,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){f=R}f&&!(f instanceof Error)&&(Z(g),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",a,d,typeof f),Z(null)),f instanceof Error&&!(f.message in we)&&(we[f.message]=!0,Z(g),C("Failed %s type: %s",a,f.message),Z(null))}}}var pr=Array.isArray;function ne(e){return pr(e)}function hr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function mr(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function Oe(e){if(mr(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",hr(e)),Se(e)}var B=k.ReactCurrentOwner,Er={key:!0,ref:!0,__self:!0,__source:!0},je,Pe,ae;ae={};function yr(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function br(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Rr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var a=x(B.current.type);ae[a]||(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',x(B.current.type),e.ref),ae[a]=!0)}}function _r(e,r){{var a=function(){je||(je=!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))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function Cr(e,r){{var a=function(){Pe||(Pe=!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))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var wr=function(e,r,a,s,g,p,d){var f={$$typeof:o,type:e,key:r,ref:a,props:d,_owner:p};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Tr(e,r,a,s,g){{var p,d={},f=null,T=null;a!==void 0&&(Oe(a),f=""+a),br(r)&&(Oe(r.key),f=""+r.key),yr(r)&&(T=r.ref,Rr(r,g));for(p in r)K.call(r,p)&&!Er.hasOwnProperty(p)&&(d[p]=r[p]);if(e&&e.defaultProps){var R=e.defaultProps;for(p in R)d[p]===void 0&&(d[p]=R[p])}if(f||T){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&_r(d,_),T&&Cr(d,_)}return wr(e,f,T,g,s,B.current,d)}}var oe=k.ReactCurrentOwner,Ae=k.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(a)}else Ae.setExtraStackFrame(null)}var ie;ie=!1;function ue(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function ke(){{if(oe.current){var e=x(oe.current.type);if(e)return`
13
+ `+f[R].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,P),P}while(R>=1&&_>=0);break}}}finally{te=!1,ee.current=p,lr(),Error.prepareStackTrace=g}var V=e?e.displayName||e.name:"",Le=V?J(V):"";return typeof e=="function"&&X.set(e,Le),Le}function dr(e,r,a){return Ce(e,!1)}function vr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,a){if(e==null)return"";if(typeof e=="function")return Ce(e,vr(e));if(typeof e=="string")return J(e);switch(e){case h:return J("Suspense");case m:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return dr(e.render);case S:return H(e.type,r,a);case j:{var s=e,g=s._payload,p=s._init;try{return H(p(g),r,a)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,we={},Te=k.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(a)}else Te.setExtraStackFrame(null)}function gr(e,r,a,s,g){{var p=Function.call.bind(K);for(var d in e)if(p(e,d)){var f=void 0;try{if(typeof e[d]!="function"){var T=Error((s||"React class")+": "+a+" 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`.");throw T.name="Invariant Violation",T}f=e[d](r,d,s,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){f=R}f&&!(f instanceof Error)&&(Z(g),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",a,d,typeof f),Z(null)),f instanceof Error&&!(f.message in we)&&(we[f.message]=!0,Z(g),C("Failed %s type: %s",a,f.message),Z(null))}}}var pr=Array.isArray;function ne(e){return pr(e)}function mr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function hr(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function Oe(e){if(hr(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",mr(e)),Se(e)}var B=k.ReactCurrentOwner,Er={key:!0,ref:!0,__self:!0,__source:!0},je,Pe,ae;ae={};function yr(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function br(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Rr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var a=x(B.current.type);ae[a]||(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',x(B.current.type),e.ref),ae[a]=!0)}}function _r(e,r){{var a=function(){je||(je=!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))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function Cr(e,r){{var a=function(){Pe||(Pe=!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))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var wr=function(e,r,a,s,g,p,d){var f={$$typeof:o,type:e,key:r,ref:a,props:d,_owner:p};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Tr(e,r,a,s,g){{var p,d={},f=null,T=null;a!==void 0&&(Oe(a),f=""+a),br(r)&&(Oe(r.key),f=""+r.key),yr(r)&&(T=r.ref,Rr(r,g));for(p in r)K.call(r,p)&&!Er.hasOwnProperty(p)&&(d[p]=r[p]);if(e&&e.defaultProps){var R=e.defaultProps;for(p in R)d[p]===void 0&&(d[p]=R[p])}if(f||T){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&_r(d,_),T&&Cr(d,_)}return wr(e,f,T,g,s,B.current,d)}}var oe=k.ReactCurrentOwner,Ae=k.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,a=H(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(a)}else Ae.setExtraStackFrame(null)}var ie;ie=!1;function ue(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function ke(){{if(oe.current){var e=x(oe.current.type);if(e)return`
14
14
 
15
15
  Check the render method of \``+e+"`."}return""}}function Sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
16
16
 
@@ -24,4 +24,4 @@ Check the top-level render call using <`+a+">.")}return r}}function De(e,r){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var ce;function We(){if(ce)return U;ce=1;var t=E,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,v={key:!0,ref:!0,__self:!0,__source:!0};function y(n,l,m){var h,S={},j=null,O=null;m!==void 0&&(j=""+m),l.key!==void 0&&(j=""+l.key),l.ref!==void 0&&(O=l.ref);for(h in l)u.call(l,h)&&!v.hasOwnProperty(h)&&(S[h]=l[h]);if(n&&n.defaultProps)for(h in l=n.defaultProps,l)S[h]===void 0&&(S[h]=l[h]);return{$$typeof:o,type:n,key:j,ref:O,props:S,_owner:c.current}}return U.Fragment=i,U.jsx=y,U.jsxs=y,U}process.env.NODE_ENV==="production"?q.exports=We():q.exports=Ne();var A=q.exports;const W=E.createContext({apiURL:void 0,axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Me=({axios:t,children:o,translate:i,useAuth:u,Outlet:c,Navigate:v,useLocation:y,useGoogleTagManager:n,apiURL:l})=>{const m=E.useMemo(()=>({apiURL:l,axios:t,Navigate:v,Outlet:c,translate:i,useAuth:u,useGoogleTagManager:n,useLocation:y}),[v,c,l,t,i,u,n,y]);return A.jsx(W.Provider,{value:m,children:o})},G=t=>`RequireAuth require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ve=({Fallback:t,loginPath:o="/login",localStorageKey:i="user",redirect401Path:u="/login",...c})=>{var I,L,k,C;const{axios:v=c.axios,useLocation:y=c.useLocation,useAuth:n=c.useAuth,Outlet:l=c.Outlet,Navigate:m=c.Navigate}=E.useContext(W);if(n===void 0)throw new Error(G("useAuth"));if(y===void 0)throw new Error(G("useLocation"));if(l===void 0)throw new Error(G("Outlet"));if(m===void 0)throw new Error(G("Navigate"));const[h,S]=E.useState(null),{isLogged:j}=n(),O=y(),F=E.useRef(!1);return E.useLayoutEffect(()=>{F.current||(F.current=!0,v==null||v.interceptors.response.use(w=>w,async w=>{var $;return typeof w=="object"&&w&&"response"in w&&w.response&&typeof w.response=="object"&&"status"in w.response&&w.response&&typeof w.response=="object"&&"status"in w.response&&(($=w==null?void 0:w.response)==null?void 0:$.status)===401&&(v.defaults.headers.common.Authorization=null,localStorage.removeItem(i),S(u)),Promise.reject(w)}))},[v==null?void 0:v.defaults.headers.common,v==null?void 0:v.interceptors.response,i,u]),j&&!h?A.jsx(E.Suspense,{fallback:t,children:(L=(I=O.state)==null?void 0:I.from)!=null&&L.state&&((C=(k=O.state)==null?void 0:k.from)==null?void 0:C.pathname)===o?A.jsx(m,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):A.jsx(l,{})}):A.jsx(m,{to:o,state:{from:O},replace:!0})},Q=t=>`GTMSendPageView require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({...t})=>{const{useLocation:o=t.useLocation,Outlet:i=t.Outlet,useGoogleTagManager:u=t.useGoogleTagManager}=E.useContext(W);if(o===void 0)throw new Error(Q("useLocation"));if(i===void 0)throw new Error(Q("Outlet"));if(u===void 0)throw new Error(Q("useGoogleTagManager"));const{pathname:c}=o(),{sendEvent:v}=u();return E.useEffect(()=>{v({event:"pageView",pathname:c})},[c,v]),A.jsx(i,{})},Ue=({axios:t,baseURL:o,tokenTypeKey:i="tokenType",userLocalStorageKey:u="user",tokenKey:c="accessToken",postContentType:v="application/json"})=>{if(!t.defaults)return null;const y=localStorage.getItem(u),n=y?JSON.parse(y):null,l=n!=null&&n[i]?n[i]:null,m=n!=null&&n[c]?n[c]:null,h=y?`${l} ${m}`:null;return t.defaults.baseURL=o,t.defaults.headers.post["Content-Type"]=v,h&&(t.defaults.headers.common.Authorization=h),null},ze=({i18n:t,debug:o,initReactI18next:i,resources:u,LanguageDetector:c})=>(t!=null&&t.isInitialized||(t.use(c).use(i).init({debug:o,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:u,returnNull:!1}).then(()=>{document.documentElement.lang!==t.resolvedLanguage&&t.resolvedLanguage&&document.documentElement.setAttribute("lang",t.resolvedLanguage)}),t.on("languageChanged",v=>{document.documentElement.setAttribute("lang",v)})),null),Be=({dsn:t,sentry:o,integrations:i,tracesSampleRate:u,routingInstrumentationDependencies:c,replaysSessionSampleRate:v,replaysOnErrorSampleRate:y,tracePropagationTargets:n,ignoreErrors:l,debug:m,environment:h})=>(o.isInitialized()||(m||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&o.init({debug:m,dsn:t,environment:h||"production",ignoreErrors:l||[/Failed to fetch dynamically imported module/],integrations:[new o.BrowserTracing({routingInstrumentation:o.reactRouterV6Instrumentation(c.useEffect,c.useLocation,c.useNavigationType,c.createRoutesFromChildren,c.matchRoutes)}),o.replayIntegration(),...i||[]],replaysOnErrorSampleRate:y||1,replaysSessionSampleRate:v||.1,tracePropagationTargets:n,tracesSampleRate:u||1}),null),Ge=({IMaskMixin:t,...o})=>{const i=E.useMemo(()=>t(({TextField:u,...c})=>A.jsx(u,{...c})),[t]);return A.jsx(i,{...o})},$e=({mapbox:t,accessToken:o})=>(t&&o&&(t.accessToken=o),null),Je=({children:t,defaultOptions:o,QueryClient:i,QueryClientProvider:u})=>{const c=new i({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...o}}});return A.jsx(u,{client:c,children:t})},Xe=t=>{const{unknownErrorTranslationKey:o="error.unknownError"}=t||{},{translate:i=t==null?void 0:t.translate}=E.useContext(W),u=i?i(o):"Unknown error",c=E.useCallback(y=>{var l,m,h,S,j,O,F,I,L;const{response:n}=y||{};return n!=null&&n.reason?String(n.reason):(l=n==null?void 0:n.data)!=null&&l.reason?String(n.data.reason):(m=n==null?void 0:n.data)!=null&&m.message?String(n.data.message):(S=(h=n==null?void 0:n.data)==null?void 0:h.detail)!=null&&S.length&&Array.isArray((j=n==null?void 0:n.data)==null?void 0:j.detail)&&((F=(O=n==null?void 0:n.data)==null?void 0:O.detail[0])!=null&&F.msg)&&typeof((L=(I=n==null?void 0:n.data)==null?void 0:I.detail[0])==null?void 0:L.msg)=="string"?String(n.data.detail[0].msg):u},[u]);return{getErrorCode:E.useCallback(y=>{var l,m,h;const{response:n}=y||{};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((m=n==null?void 0:n.data)==null?void 0:m.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"},[]),printError:c}},He=({data:t,fetchNextPage:o,isFetchingNextPage:i,isInitialLoading:u,isLoading:c,enabled:v=!0})=>{const y=E.useCallback(async l=>{i||!v||await o({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[v,o,i]),n=E.useMemo(()=>{if(t)return t.pages.reduce((l,m)=>[...l,...m],[])},[t]);return{fetchNextPageOnRowsScrollEnd:y,isLoading:i||c,loadingVariant:u?"skeleton":"linear",rows:n}},Ke=t=>{const o=E.useCallback(({tokenType:u,accessToken:c})=>{t.defaults.headers.common.Authorization=`${u} ${c}`},[t.defaults.headers.common]);return{clearAuthenticationToken:E.useCallback(()=>{t.defaults.headers.common.Authorization=null},[t.defaults.headers.common]),setAuthenticationToken:o}},Ze=(t,o="km")=>{const i=Number(t);return Number.isNaN(i)?`0 ${o}`:`${i.toFixed(2)} ${o}`},qe=t=>{const o=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;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},le=(t,o)=>{if(!t)return"";const i=qe(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${i}`:t;return typeof o=="number"?`${u.replace("/files",`/thumbs/${o}`)}`:u},Qe=()=>{const{apiURL:t}=E.useContext(W);return{distanceAdapter:Ze,filePathAdapter:(i,u)=>le(t&&typeof i=="string"?{origin:t,pathname:i}:i,u)}},er=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),rr=t=>{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("");return u.charAt(0).toLowerCase()+u.slice(1)},tr=(t,o,i)=>{const u=rr(o),c=er(i);return`${u}${c}`},nr=t=>{if(t)return(t==null?void 0:t.reduce((o,i)=>(o[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},o),{}))||{}},ar=t=>{const{input:o="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:o,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:tr,...(i==null?void 0:i.length)&&{operations:nr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};b.AxiosConfig=Ue,b.GTMSendPageView=Ye,b.I18nConfig=ze,b.InjectDependenciesContext=W,b.InjectDependenciesProvider=Me,b.MapBoxConfig=$e,b.MaskTextField=Ge,b.QueryClientConfigProvider=Je,b.RequireAuth=Ve,b.SentryConfig=Be,b.getOrvalConfig=ar,b.useAdapter=Qe,b.useAuth=Ke,b.useInfiniteDataGrid=He,b.useResponseError=Xe,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
27
+ */var ce;function We(){if(ce)return U;ce=1;var t=E,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,v={key:!0,ref:!0,__self:!0,__source:!0};function y(n,l,h){var m,S={},j=null,O=null;h!==void 0&&(j=""+h),l.key!==void 0&&(j=""+l.key),l.ref!==void 0&&(O=l.ref);for(m in l)u.call(l,m)&&!v.hasOwnProperty(m)&&(S[m]=l[m]);if(n&&n.defaultProps)for(m in l=n.defaultProps,l)S[m]===void 0&&(S[m]=l[m]);return{$$typeof:o,type:n,key:j,ref:O,props:S,_owner:c.current}}return U.Fragment=i,U.jsx=y,U.jsxs=y,U}process.env.NODE_ENV==="production"?q.exports=We():q.exports=Ne();var A=q.exports;const W=E.createContext({apiURL:void 0,axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Me=({axios:t,children:o,translate:i,useAuth:u,Outlet:c,Navigate:v,useLocation:y,useGoogleTagManager:n,apiURL:l})=>{const h=E.useMemo(()=>({apiURL:l,axios:t,Navigate:v,Outlet:c,translate:i,useAuth:u,useGoogleTagManager:n,useLocation:y}),[v,c,l,t,i,u,n,y]);return A.jsx(W.Provider,{value:h,children:o})},G=t=>`RequireAuth require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ve=({Fallback:t,loginPath:o="/login",localStorageKey:i="user",redirect401Path:u="/login",...c})=>{var I,L,k,C;const{axios:v=c.axios,useLocation:y=c.useLocation,useAuth:n=c.useAuth,Outlet:l=c.Outlet,Navigate:h=c.Navigate}=E.useContext(W);if(n===void 0)throw new Error(G("useAuth"));if(y===void 0)throw new Error(G("useLocation"));if(l===void 0)throw new Error(G("Outlet"));if(h===void 0)throw new Error(G("Navigate"));const[m,S]=E.useState(null),{isLogged:j}=n(),O=y(),F=E.useRef(!1);return E.useLayoutEffect(()=>{F.current||(F.current=!0,v==null||v.interceptors.response.use(w=>w,async w=>{var $;return typeof w=="object"&&w&&"response"in w&&w.response&&typeof w.response=="object"&&"status"in w.response&&w.response&&typeof w.response=="object"&&"status"in w.response&&(($=w==null?void 0:w.response)==null?void 0:$.status)===401&&(v.defaults.headers.common.Authorization=null,localStorage.removeItem(i),S(u)),Promise.reject(w)}))},[v==null?void 0:v.defaults.headers.common,v==null?void 0:v.interceptors.response,i,u]),j&&!m?A.jsx(E.Suspense,{fallback:t,children:(L=(I=O.state)==null?void 0:I.from)!=null&&L.state&&((C=(k=O.state)==null?void 0:k.from)==null?void 0:C.pathname)===o?A.jsx(h,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):A.jsx(l,{})}):A.jsx(h,{to:o,state:{from:O},replace:!0})},Q=t=>`GTMSendPageView require « ${t} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({...t})=>{const{useLocation:o=t.useLocation,Outlet:i=t.Outlet,useGoogleTagManager:u=t.useGoogleTagManager}=E.useContext(W);if(o===void 0)throw new Error(Q("useLocation"));if(i===void 0)throw new Error(Q("Outlet"));if(u===void 0)throw new Error(Q("useGoogleTagManager"));const{pathname:c}=o(),{sendEvent:v}=u();return E.useEffect(()=>{v({event:"pageView",pathname:c})},[c,v]),A.jsx(i,{})},Ue=({axios:t,baseURL:o,tokenTypeKey:i="tokenType",userLocalStorageKey:u="user",tokenKey:c="accessToken",postContentType:v="application/json"})=>{if(!t.defaults)return null;const y=localStorage.getItem(u),n=y?JSON.parse(y):null,l=n!=null&&n[i]?n[i]:null,h=n!=null&&n[c]?n[c]:null,m=y?`${l} ${h}`:null;return t.defaults.baseURL=o,t.defaults.headers.post["Content-Type"]=v,m&&(t.defaults.headers.common.Authorization=m),null},ze=({i18n:t,debug:o,initReactI18next:i,resources:u,LanguageDetector:c})=>(t!=null&&t.isInitialized||(t.use(c).use(i).init({debug:o,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:u,returnNull:!1}).then(()=>{document.documentElement.lang!==t.resolvedLanguage&&t.resolvedLanguage&&document.documentElement.setAttribute("lang",t.resolvedLanguage)}),t.on("languageChanged",v=>{document.documentElement.setAttribute("lang",v)})),null),Be=({dsn:t,sentry:o,integrations:i,tracesSampleRate:u,routingInstrumentationDependencies:c,replaysSessionSampleRate:v,replaysOnErrorSampleRate:y,tracePropagationTargets:n,ignoreErrors:l,debug:h,environment:m})=>(o.isInitialized()||(h||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&o.init({debug:h,dsn:t,environment:m||"production",ignoreErrors:[...l||[],/dynamically imported module/],integrations:[new o.BrowserTracing({routingInstrumentation:o.reactRouterV6Instrumentation(c.useEffect,c.useLocation,c.useNavigationType,c.createRoutesFromChildren,c.matchRoutes)}),o.replayIntegration(),...i||[]],replaysOnErrorSampleRate:y||1,replaysSessionSampleRate:v||.1,tracePropagationTargets:n,tracesSampleRate:u||1}),null),Ge=({IMaskMixin:t,...o})=>{const i=E.useMemo(()=>t(({TextField:u,...c})=>A.jsx(u,{...c})),[t]);return A.jsx(i,{...o})},$e=({mapbox:t,accessToken:o})=>(t&&o&&(t.accessToken=o),null),Je=({children:t,defaultOptions:o,QueryClient:i,QueryClientProvider:u})=>{const c=new i({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...o}}});return A.jsx(u,{client:c,children:t})},Xe=t=>{const{unknownErrorTranslationKey:o="error.unknownError"}=t||{},{translate:i=t==null?void 0:t.translate}=E.useContext(W),u=i?i(o):"Unknown error",c=E.useCallback(y=>{var l,h,m,S,j,O,F,I,L;const{response:n}=y||{};return n!=null&&n.reason?String(n.reason):(l=n==null?void 0:n.data)!=null&&l.reason?String(n.data.reason):(h=n==null?void 0:n.data)!=null&&h.message?String(n.data.message):(S=(m=n==null?void 0:n.data)==null?void 0:m.detail)!=null&&S.length&&Array.isArray((j=n==null?void 0:n.data)==null?void 0:j.detail)&&((F=(O=n==null?void 0:n.data)==null?void 0:O.detail[0])!=null&&F.msg)&&typeof((L=(I=n==null?void 0:n.data)==null?void 0:I.detail[0])==null?void 0:L.msg)=="string"?String(n.data.detail[0].msg):u},[u]);return{getErrorCode:E.useCallback(y=>{var l,h,m;const{response:n}=y||{};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((h=n==null?void 0:n.data)==null?void 0:h.error_code):n!=null&&n.error_code?String(n==null?void 0:n.error_code):(m=n==null?void 0:n.data)!=null&&m.error_code?String(n.data.error_code):"unknown_error_code"},[]),printError:c}},He=({data:t,fetchNextPage:o,isFetchingNextPage:i,isInitialLoading:u,isLoading:c,enabled:v=!0})=>{const y=E.useCallback(async l=>{i||!v||await o({pageParam:(l==null?void 0:l.pageParam)||l.visibleRowsCount})},[v,o,i]),n=E.useMemo(()=>{if(t)return t.pages.reduce((l,h)=>[...l,...h],[])},[t]);return{fetchNextPageOnRowsScrollEnd:y,isLoading:i||c,loadingVariant:u?"skeleton":"linear",rows:n}},Ke=t=>{const o=E.useCallback(({tokenType:u,accessToken:c})=>{t.defaults.headers.common.Authorization=`${u} ${c}`},[t.defaults.headers.common]);return{clearAuthenticationToken:E.useCallback(()=>{t.defaults.headers.common.Authorization=null},[t.defaults.headers.common]),setAuthenticationToken:o}},Ze=(t,o="km")=>{const i=Number(t);return Number.isNaN(i)?`0 ${o}`:`${i.toFixed(2)} ${o}`},qe=t=>{const o=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;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},le=(t,o)=>{if(!t)return"";const i=qe(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${i}`:t;return typeof o=="number"?`${u.replace("/files",`/thumbs/${o}`)}`:u},Qe=()=>{const{apiURL:t}=E.useContext(W);return{distanceAdapter:Ze,filePathAdapter:(i,u)=>le(t&&typeof i=="string"?{origin:t,pathname:i}:i,u)}},er=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),rr=t=>{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("");return u.charAt(0).toLowerCase()+u.slice(1)},tr=(t,o,i)=>{const u=rr(o),c=er(i);return`${u}${c}`},nr=t=>{if(t)return(t==null?void 0:t.reduce((o,i)=>(o[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},o),{}))||{}},ar=t=>{const{input:o="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:o,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:tr,...(i==null?void 0:i.length)&&{operations:nr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};b.AxiosConfig=Ue,b.GTMSendPageView=Ye,b.I18nConfig=ze,b.InjectDependenciesContext=W,b.InjectDependenciesProvider=Me,b.MapBoxConfig=$e,b.MaskTextField=Ge,b.QueryClientConfigProvider=Je,b.RequireAuth=Ve,b.SentryConfig=Be,b.getOrvalConfig=ar,b.useAdapter=Qe,b.useAuth=Ke,b.useInfiniteDataGrid=He,b.useResponseError=Xe,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "0.23.1",
3
+ "version": "0.23.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "types": "./dist/main.d.ts",