@erpp/react-api-cronos-frontend 1.0.30 → 1.0.31

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/index.d.mts CHANGED
@@ -1428,6 +1428,7 @@ interface DashboardGraficaElementoQuery extends BaseQuery {
1428
1428
  interface DashboardGraficaElementoParams extends APIClientParams {
1429
1429
  }
1430
1430
  interface DashboardGraficaElementoTreeParams {
1431
+ dashboard_grafica_grupo_id?: number;
1431
1432
  rol_id?: number;
1432
1433
  orderBy?: string;
1433
1434
  page: number;
@@ -1617,11 +1618,17 @@ declare class DashboardGraficaGrupoEstiloAPI extends APICRUDClientBase<Dashboard
1617
1618
  constructor(params?: DashboardGraficaGrupoEstiloParams);
1618
1619
  }
1619
1620
 
1621
+ interface DashboardGraficaGrupo {
1622
+ titulo: string;
1623
+ json_snapshot_orden: string;
1624
+ }
1620
1625
  interface DashboardGraficaGrupoRolDTO {
1621
1626
  /** @foreignKey (dashboard_grafica_grupo.dashboard_grafica_grupo_id) @maxLength (4) @primaryKey */
1622
1627
  dashboard_grafica_grupo_id: number;
1623
1628
  /** @foreignKey (rol.rol_id) @maxLength (4) @nullable */
1624
1629
  rol_id?: number;
1630
+ /** @exclusivo para consultas */
1631
+ dashboard_grafica_grupo?: DashboardGraficaGrupo;
1625
1632
  }
1626
1633
  interface DashboardGraficaGrupoRolCreateDTO {
1627
1634
  /** @foreignKey (dashboard_grafica_grupo.dashboard_grafica_grupo_id) @maxLength (4) @primaryKey */
package/dist/index.d.ts CHANGED
@@ -1428,6 +1428,7 @@ interface DashboardGraficaElementoQuery extends BaseQuery {
1428
1428
  interface DashboardGraficaElementoParams extends APIClientParams {
1429
1429
  }
1430
1430
  interface DashboardGraficaElementoTreeParams {
1431
+ dashboard_grafica_grupo_id?: number;
1431
1432
  rol_id?: number;
1432
1433
  orderBy?: string;
1433
1434
  page: number;
@@ -1617,11 +1618,17 @@ declare class DashboardGraficaGrupoEstiloAPI extends APICRUDClientBase<Dashboard
1617
1618
  constructor(params?: DashboardGraficaGrupoEstiloParams);
1618
1619
  }
1619
1620
 
1621
+ interface DashboardGraficaGrupo {
1622
+ titulo: string;
1623
+ json_snapshot_orden: string;
1624
+ }
1620
1625
  interface DashboardGraficaGrupoRolDTO {
1621
1626
  /** @foreignKey (dashboard_grafica_grupo.dashboard_grafica_grupo_id) @maxLength (4) @primaryKey */
1622
1627
  dashboard_grafica_grupo_id: number;
1623
1628
  /** @foreignKey (rol.rol_id) @maxLength (4) @nullable */
1624
1629
  rol_id?: number;
1630
+ /** @exclusivo para consultas */
1631
+ dashboard_grafica_grupo?: DashboardGraficaGrupo;
1625
1632
  }
1626
1633
  interface DashboardGraficaGrupoRolCreateDTO {
1627
1634
  /** @foreignKey (dashboard_grafica_grupo.dashboard_grafica_grupo_id) @maxLength (4) @primaryKey */
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t=Object.create,a=Object.defineProperty,s=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,c=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,s)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,h=(e,t)=>{for(var a in t||(t={}))u.call(t,a)&&d(e,a,t[a]);if(i)for(var a of i(t))l.call(t,a)&&d(e,a,t[a]);return e},p=(e,t)=>s(e,o(t)),f=(e,t,s,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of n(t))u.call(e,i)||i===s||a(e,i,{get:()=>t[i],enumerable:!(o=r(t,i))||o.enumerable});return e},I=(e,s,r)=>(r=null!=e?t(c(e)):{},f(!s&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),F={};((e,t)=>{for(var s in t)a(e,s,{get:t[s],enumerable:!0})})(F,{APIFactory:()=>Ct,ApiClientContext:()=>m,createAPIAdeudo:()=>Tt,createAPICatColor:()=>zt,createAPICatColorGrupo:()=>Zt,createAPICatGraficaGrupo:()=>ca,createAPICatRolGrupo:()=>ga,createAPICatTema:()=>wa,createAPIDashboardEstilo:()=>Ta,createAPIDashboardGrafica:()=>za,createAPIDashboardGraficaElemento:()=>es,createAPIDashboardGraficaElementoDetalle:()=>us,createAPIDashboardGraficaElementoEstilo:()=>xs,createAPIDashboardGraficaElementoParametro:()=>Us,createAPIDashboardGraficaGrupo:()=>Es,createAPIDashboardGraficaGrupoEstilo:()=>Hs,createAPIDashboardGraficaGrupoRol:()=>er,createAPIDashboardRuta:()=>ur,createAPIGrafica:()=>xr,createAPIGraficaColor:()=>Ur,createAPIGraficaColorGrupo:()=>Er,createAPIGraficaColorGrupoAsignacion:()=>Hr,createAPIGraficaColorGrupoTipoGrafica:()=>eo,createAPIGraficaParametro:()=>uo,createAPIGraficaParametroDefecto:()=>Co,createAPIGraficaParametroTipo:()=>Po,createAPIRol:()=>So,createAPIRolDashboardRuta:()=>Jo,createAPITipoGrafica:()=>tn,createAPIUsuario:()=>dn,createAPIUsuarioDashboardAcceso:()=>mn,createAPIUsuarioRol:()=>Ln,useCreateAdeudo:()=>Bn,useCreateCatColor:()=>kn,useCreateCatColorGrupo:()=>Kn,useCreateCatGraficaGrupo:()=>ei,useCreateCatRolGrupo:()=>ii,useCreateCatTema:()=>fi,useCreateDashboardEstilo:()=>Gi,useCreateDashboardGrafica:()=>Pi,useCreateDashboardGraficaElemento:()=>Ti,useCreateDashboardGraficaElementoDetalle:()=>qi,useCreateDashboardGraficaElementoEstilo:()=>Wi,useCreateDashboardGraficaElementoParametro:()=>sc,useCreateDashboardGraficaGrupo:()=>lc,useCreateDashboardGraficaGrupoEstilo:()=>gc,useCreateDashboardGraficaGrupoRol:()=>Dc,useCreateDashboardRuta:()=>Mc,useCreateGrafica:()=>$c,useCreateGraficaColor:()=>Hc,useCreateGraficaColorGrupo:()=>Yc,useCreateGraficaColorGrupoAsignacion:()=>ou,useCreateGraficaColorGrupoTipoGrafica:()=>hu,useCreateGraficaParametro:()=>Cu,useCreateGraficaParametroDefecto:()=>wu,useCreateGraficaParametroTipo:()=>Bu,useCreateRol:()=>ku,useCreateRolDashboardRuta:()=>Ku,useCreateTipoGrafica:()=>el,useCreateUsuario:()=>il,useCreateUsuarioDashboardAcceso:()=>fl,useCreateUsuarioRol:()=>Gl,useDeleteAdeudo:()=>Tn,useDeleteCatColor:()=>jn,useDeleteCatColorGrupo:()=>Vn,useDeleteCatGraficaGrupo:()=>ai,useDeleteCatRolGrupo:()=>ui,useDeleteCatTema:()=>Fi,useDeleteDashboardEstilo:()=>_i,useDeleteDashboardGrafica:()=>Ai,useDeleteDashboardGraficaElemento:()=>Si,useDeleteDashboardGraficaElementoDetalle:()=>Hi,useDeleteDashboardGraficaElementoEstilo:()=>Yi,useDeleteDashboardGraficaElementoParametro:()=>oc,useDeleteDashboardGraficaGrupo:()=>hc,useDeleteDashboardGraficaGrupoEstilo:()=>Cc,useDeleteDashboardGraficaGrupoRol:()=>wc,useDeleteDashboardRuta:()=>Bc,useDeleteGrafica:()=>kc,useDeleteGraficaColor:()=>Kc,useDeleteGraficaColorGrupo:()=>eu,useDeleteGraficaColorGrupoAsignacion:()=>iu,useDeleteGraficaColorGrupoTipoGrafica:()=>fu,useDeleteGraficaParametro:()=>Gu,useDeleteGraficaParametroDefecto:()=>Pu,useDeleteGraficaParametroTipo:()=>Tu,useDeleteRol:()=>ju,useDeleteRolDashboardRuta:()=>Vu,useDeleteTipoGrafica:()=>al,useDeleteUsuario:()=>ul,useDeleteUsuarioDashboardAcceso:()=>Fl,useDeleteUsuarioRol:()=>_l,useFetchByIdAdeudo:()=>Mn,useFetchByIdCatColor:()=>$n,useFetchByIdCatColorGrupo:()=>Hn,useFetchByIdCatGraficaGrupo:()=>Yn,useFetchByIdCatRolGrupo:()=>oi,useFetchByIdCatTema:()=>hi,useFetchByIdDashboardEstilo:()=>Ci,useFetchByIdDashboardGrafica:()=>wi,useFetchByIdDashboardGraficaElemento:()=>Bi,useFetchByIdDashboardGraficaElementoDetalle:()=>Ni,useFetchByIdDashboardGraficaElementoEstilo:()=>Qi,useFetchByIdDashboardGraficaElementoParametro:()=>tc,useFetchByIdDashboardGraficaGrupo:()=>cc,useFetchByIdDashboardGraficaGrupoEstilo:()=>Ic,useFetchByIdDashboardGraficaGrupoRol:()=>yc,useFetchByIdDashboardRuta:()=>Lc,useFetchByIdGrafica:()=>Ec,useFetchByIdGraficaColor:()=>qc,useFetchByIdGraficaColorGrupo:()=>Wc,useFetchByIdGraficaColorGrupoAsignacion:()=>su,useFetchByIdGraficaColorGrupoTipoGrafica:()=>lu,useFetchByIdGraficaParametro:()=>gu,useFetchByIdGraficaParametroDefecto:()=>Du,useFetchByIdGraficaParametroTipo:()=>Mu,useFetchByIdRol:()=>$u,useFetchByIdRolDashboardRuta:()=>Hu,useFetchByIdTipoGrafica:()=>Yu,useFetchByIdUsuario:()=>ol,useFetchByIdUsuarioDashboardAcceso:()=>hl,useFetchByIdUsuarioRol:()=>Cl,useFetchListAdeudo:()=>vn,useFetchListCatColor:()=>On,useFetchListCatColorGrupo:()=>Jn,useFetchListCatGraficaGrupo:()=>Zn,useFetchListCatRolGrupo:()=>ni,useFetchListCatTema:()=>pi,useFetchListDashboardEstilo:()=>mi,useFetchListDashboardGrafica:()=>Ui,useFetchListDashboardGraficaElemento:()=>Ri,useFetchListDashboardGraficaElementoDetalle:()=>ji,useFetchListDashboardGraficaElementoEstilo:()=>Vi,useFetchListDashboardGraficaElementoParametro:()=>ac,useFetchListDashboardGraficaGrupo:()=>uc,useFetchListDashboardGraficaGrupoEstilo:()=>Fc,useFetchListDashboardGraficaGrupoRol:()=>_c,useFetchListDashboardRuta:()=>Ac,useFetchListGrafica:()=>Sc,useFetchListGraficaColor:()=>zc,useFetchListGraficaColorGrupo:()=>Xc,useFetchListGraficaColorGrupoAsignacion:()=>ru,useFetchListGraficaColorGrupoTipoGrafica:()=>du,useFetchListGraficaParametro:()=>xu,useFetchListGraficaParametroDefecto:()=>bu,useFetchListGraficaParametroTipo:()=>vu,useFetchListRol:()=>Ou,useFetchListRolDashboardRuta:()=>Ju,useFetchListTipoGrafica:()=>Zu,useFetchListUsuario:()=>nl,useFetchListUsuarioDashboardAcceso:()=>pl,useFetchListUsuarioRol:()=>ml,useFilterMatchAdeudo:()=>En,useFilterMatchCatColor:()=>qn,useFilterMatchCatColorGrupo:()=>Wn,useFilterMatchCatGraficaGrupo:()=>si,useFilterMatchCatRolGrupo:()=>li,useFilterMatchCatTema:()=>gi,useFilterMatchDashboardEstilo:()=>Di,useFilterMatchDashboardGrafica:()=>Mi,useFilterMatchDashboardGraficaElemento:()=>$i,useFilterMatchDashboardGraficaElementoDetalle:()=>Ji,useFilterMatchDashboardGraficaElementoEstilo:()=>Zi,useFilterMatchDashboardGraficaElementoParametro:()=>nc,useFilterMatchDashboardGraficaGrupo:()=>pc,useFilterMatchDashboardGraficaGrupoEstilo:()=>mc,useFilterMatchDashboardGraficaGrupoRol:()=>Uc,useFilterMatchDashboardRuta:()=>Rc,useFilterMatchGrafica:()=>Nc,useFilterMatchGraficaColor:()=>Qc,useFilterMatchGraficaColorGrupo:()=>tu,useFilterMatchGraficaColorGrupoAsignacion:()=>cu,useFilterMatchGraficaColorGrupoTipoGrafica:()=>Iu,useFilterMatchGraficaParametro:()=>yu,useFilterMatchGraficaParametroDefecto:()=>Lu,useFilterMatchGraficaParametroTipo:()=>Eu,useFilterMatchRol:()=>qu,useFilterMatchRolDashboardRuta:()=>Wu,useFilterMatchTipoGrafica:()=>sl,useFilterMatchUsuario:()=>ll,useFilterMatchUsuarioDashboardAcceso:()=>gl,useFilterMatchUsuarioRol:()=>Dl,useGetTreeDashboardGraficaElemento:()=>Oi,useUpdateAdeudo:()=>Rn,useUpdateCatColor:()=>Nn,useUpdateCatColorGrupo:()=>Qn,useUpdateCatGraficaGrupo:()=>ti,useUpdateCatRolGrupo:()=>ci,useUpdateCatTema:()=>Ii,useUpdateDashboardEstilo:()=>yi,useUpdateDashboardGrafica:()=>Li,useUpdateDashboardGraficaElemento:()=>Ei,useUpdateDashboardGraficaElementoDetalle:()=>zi,useUpdateDashboardGraficaElementoEstilo:()=>Xi,useUpdateDashboardGraficaElementoParametro:()=>rc,useUpdateDashboardGraficaGrupo:()=>dc,useUpdateDashboardGraficaGrupoEstilo:()=>xc,useUpdateDashboardGraficaGrupoRol:()=>bc,useUpdateDashboardRuta:()=>vc,useUpdateGrafica:()=>Oc,useUpdateGraficaColor:()=>Jc,useUpdateGraficaColorGrupo:()=>Zc,useUpdateGraficaColorGrupoAsignacion:()=>nu,useUpdateGraficaColorGrupoTipoGrafica:()=>pu,useUpdateGraficaParametro:()=>mu,useUpdateGraficaParametroDefecto:()=>Uu,useUpdateGraficaParametroTipo:()=>Ru,useUpdateRol:()=>Nu,useUpdateRolDashboardRuta:()=>Qu,useUpdateTipoGrafica:()=>tl,useUpdateUsuario:()=>cl,useUpdateUsuarioDashboardAcceso:()=>Il,useUpdateUsuarioRol:()=>yl}),module.exports=(e=F,f(a({},"__esModule",{value:!0}),e));var g=I(require("axios")),x=class{constructor({urlBase:e,getTokenCallback:t}){this._baseURL="",this.createDefaultMethods=e=>({findByFilterMatch:(t={filter:"",pagination:{},orderBy:""})=>e.post("/filter-match",t),get:({id:t,params:a={},config:s={},where:r})=>t?e.get(`/${t}`,h({params:a},s)):e.get("/",h({params:p(h({},a),{where:JSON.stringify(r)})},s)),post:({data:t,config:a})=>e.post("/",t,a),put:({id:t,data:a={},config:s={}})=>t?e.put(`/${t}`,a,s):e.put("/",a,s),delete:({id:t,config:a={},where:s={}})=>t?e.delete(`/${t}`,a):e.delete("/",h({data:{where:s}},a))}),this.subpath=(e,t)=>{if(!e)throw new Error("API subpath must be defined");const a=g.default.create({baseURL:this.api.defaults.baseURL+e,headers:{"Content-Type":"application/json"}});a.interceptors.request.use(e=>(e.headers.Authorization=this.api.defaults.headers.Authorization,e),e=>Promise.reject(e)),a.interceptors.response.use(e=>e,e=>Promise.reject(e));const s=this.createDefaultMethods(a),r=t?t(s,a):{};return h(h({},s),r)},this._baseURL=e,this.getTokenCallback=t,this.api=g.default.create({baseURL:e,headers:{"Content-Type":"application/json"}}),this.api.interceptors.request.use(e=>(e.headers.Authorization=this.getTokenCallback?this.getTokenCallback():null,e),e=>Promise.reject(e)),this.api.interceptors.response.use(e=>e,e=>Promise.reject(e))}setBaseURL(e){this._baseURL=e,this.api&&(this.api.defaults.baseURL=e)}setGetTokenCallback(e){this.getTokenCallback=e,this.api.defaults.headers.Authorization=e?e():null}getAxiosInstance(){return this.api}},C=I(require("axios")),m=class{};m.baseUrl="https://api.ejemplo.com",m.token="TOKEN_GLOBAL_POR_DEFECTO";var G=class{constructor({endpoint:e,client:t}){this.client=C.default.create({baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"}}),this.endpoint=e,t&&(this.client=t)}getAxiosConfig(e){const t=h({},e);return(null==t?void 0:t.where)&&"object"==typeof t.where&&(t.where=JSON.stringify(t.where)),{baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"},params:t}}async getById({id:e,params:t}){try{return(await C.default.get(`${this.endpoint}/${e}`,this.getAxiosConfig(t))).data}catch(t){return console.error(`Error GET ${this.endpoint}/${e}:`,t.message),null}}async create({data:e,params:t}){try{return(await C.default.post(this.endpoint,e,this.getAxiosConfig(t))).data}catch(e){return console.error(`Error POST ${this.endpoint}:`,e.message),null}}async update({id:e,data:t,params:a}){try{return(await C.default.put(`${this.endpoint}/${e}`,t,this.getAxiosConfig(a))).data}catch(t){return console.error(`Error PUT ${this.endpoint}/${e}:`,t.message),null}}async query({params:e}){try{const t=`${this.endpoint}`;return(await C.default.get(t,this.getAxiosConfig(e))).data}catch(e){return console.error(`Error GET ${this.endpoint} con query:`,e.message),null}}async filterMatch({body:e,params:t}){try{const a=`${this.endpoint}/filter-match`;return(await C.default.post(a,e,this.getAxiosConfig(t))).data}catch(e){return console.error(`Error POST ${this.endpoint} filter-match:`,e.message),null}}findByFilterMatch(e){return this.client.post(`${this.endpoint}/filter-match`,e)}buildGETConfig({id:e,params:t,config:a={},where:s}){const r=h(h({},this.getAxiosConfig(t)),a);return e||s&&(r.params=p(h({},r.params),{where:JSON.stringify(s)})),r}get({id:e,params:t,config:a={},where:s}){const r=this.buildGETConfig({id:e,params:t,config:a,where:s});return e?this.client.get(`${this.endpoint}/${e}`,r):this.client.get(`${this.endpoint}`,r)}post({data:e,config:t={}}){return this.client.post(`${this.endpoint}`,e,h(h({},this.getAxiosConfig()),t))}put({id:e,data:t={},config:a={}}){return e?this.client.put(`${this.endpoint}/${e}`,t,h(h({},this.getAxiosConfig()),a)):this.client.put(`${this.endpoint}`,t,h(h({},this.getAxiosConfig()),a))}async delete({id:e,params:t,where:a={},config:s={}}){try{const r=h(h({},this.getAxiosConfig(t)),s);return e?await C.default.delete(`${this.endpoint}/${e}`,r):await C.default.delete(`${this.endpoint}`,p(h({},r),{data:{where:a}})),!0}catch(t){return console.error(`Error DELETE ${this.endpoint}/${e||""}:`,t.message),!1}}},y=class extends G{constructor(e){super({endpoint:"adeudo",client:null==e?void 0:e.axiosInstance})}},_=y,D=class extends G{constructor(e){super({endpoint:"AdeudoPagoResumenMensual",client:null==e?void 0:e.axiosInstance})}},b=class extends G{constructor(e){super({endpoint:"AdeudoResumenMensual",client:null==e?void 0:e.axiosInstance})}},w=class extends G{constructor(e){super({endpoint:"AdeudoResumenTipoSuelo",client:null==e?void 0:e.axiosInstance})}},U=class extends G{constructor(e){super({endpoint:"AdeudoResumenTipoSueloResumen",client:null==e?void 0:e.axiosInstance})}},P=class extends G{constructor(e){super({endpoint:"AdeudosPorPlazaResumen",client:null==e?void 0:e.axiosInstance})}},L=class extends G{constructor(e){super({endpoint:"AdeudoTipoSueloResumenMensual",client:null==e?void 0:e.axiosInstance})}},A=class extends G{constructor(e){super({endpoint:"cat_accion",client:null==e?void 0:e.axiosInstance})}},M=class extends G{constructor(e){super({endpoint:"cat_color",client:null==e?void 0:e.axiosInstance})}},v=M,B=class extends G{constructor(e){super({endpoint:"cat_color_grupo",client:null==e?void 0:e.axiosInstance})}},R=B,T=class extends G{constructor(e){super({endpoint:"cat_concepto_pago",client:null==e?void 0:e.axiosInstance})}},E=class extends G{constructor(e){super({endpoint:"cat_entidad",client:null==e?void 0:e.axiosInstance})}},S=class extends G{constructor(e){super({endpoint:"cat_fecha_agrupacion",client:null==e?void 0:e.axiosInstance})}},$=class extends G{constructor(e){super({endpoint:"cat_grafica_grupo",client:null==e?void 0:e.axiosInstance})}},O=$,k=class extends G{constructor(e){super({endpoint:"cat_plaza",client:null==e?void 0:e.axiosInstance})}},N=class extends G{constructor(e){super({endpoint:"cat_rol_grupo",client:null==e?void 0:e.axiosInstance})}},j=N,q=class extends G{constructor(e){super({endpoint:"cat_tema",client:null==e?void 0:e.axiosInstance})}},z=q,H=class extends G{constructor(e){super({endpoint:"cat_tipo_parametro",client:null==e?void 0:e.axiosInstance})}},J=class extends G{constructor(e){super({endpoint:"cat_tipo_servicio",client:null==e?void 0:e.axiosInstance})}},K=class extends G{constructor(e){super({endpoint:"cat_tipo_suelo",client:null==e?void 0:e.axiosInstance})}},Q=class extends G{constructor(e){super({endpoint:"cat_tipo_tarifa",client:null==e?void 0:e.axiosInstance})}},V=class extends G{constructor(e){super({endpoint:"contribuyente",client:null==e?void 0:e.axiosInstance})}},W=class extends G{constructor(e){super({endpoint:"contribuyente_domicilio",client:null==e?void 0:e.axiosInstance})}},X=class extends G{constructor(e){super({endpoint:"CuentasConAltosMontosResumen",client:null==e?void 0:e.axiosInstance})}},Y=class extends G{constructor(e){super({endpoint:"dashboard_estilo",client:null==e?void 0:e.axiosInstance})}},Z=Y,ee=class extends G{constructor(e){super({endpoint:"dashboard_grafica",client:null==e?void 0:e.axiosInstance})}},te=ee,ae=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento",client:null==e?void 0:e.axiosInstance}),this.tree=async e=>{try{const t=this.buildGETConfig({params:e,where:{rol_id:e.rol_id}});return(await this.client.get(`${this.endpoint}/tree`,t)).data}catch(e){throw e}}}},se=ae,re=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento_detalle",client:null==e?void 0:e.axiosInstance})}},oe=re,ne=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento_estilo",client:null==e?void 0:e.axiosInstance})}},ie=ne,ce=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento_parametro",client:null==e?void 0:e.axiosInstance})}},ue=ce,le=class extends G{constructor(e){super({endpoint:"dashboard_grafica_grupo",client:null==e?void 0:e.axiosInstance})}},de=le,he=class extends G{constructor(e){super({endpoint:"dashboard_grafica_grupo_estilo",client:null==e?void 0:e.axiosInstance})}},pe=he,fe=class extends G{constructor(e){super({endpoint:"dashboard_grafica_grupo_rol",client:null==e?void 0:e.axiosInstance})}},Ie=fe,Fe=I(require("axios")),ge=class{constructor({endpoint:e,client:t}){this.client=Fe.default.create({baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"}}),this.endpoint=e,t&&(this.client=t)}getAxiosConfig(e){return{baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"},params:e}}},xe=class extends ge{async getById({id:e,params:t}){try{return(await Fe.default.get(`${this.endpoint}/${e}`,this.getAxiosConfig(t))).data}catch(t){return console.error(`Error GET ${this.endpoint}/${e}:`,t.message),null}}async getAll({params:e}){try{const t=`${this.endpoint}`;return(await Fe.default.get(t,this.getAxiosConfig(e))).data}catch(e){return console.error(`Error GET ${this.endpoint} all:`,e.message),null}}get({id:e,params:t,config:a={},where:s}){const r=h(h({},this.getAxiosConfig(t)),a);return e?this.client.get(`${this.endpoint}/${e}`,r):(s&&(r.params=p(h({},r.params),{where:JSON.stringify(s)})),this.client.get(`${this.endpoint}`,r))}async query({params:e}){try{const t=`${this.endpoint}`;return(await Fe.default.get(t,this.getAxiosConfig(e))).data}catch(e){return console.error(`Error GET ${this.endpoint} con query:`,e.message),null}}},Ce=class extends G{constructor(e){super({endpoint:"dashboard_ruta",client:null==e?void 0:e.axiosInstance})}get usuario(){const e=`${this.endpoint}/usuario`;return new class extends xe{constructor(t){super({endpoint:e,client:t})}}(this.client)}},me=Ce,Ge=class extends G{constructor(e){super({endpoint:"grafica",client:null==e?void 0:e.axiosInstance})}},ye=Ge,_e=class extends G{constructor(e){super({endpoint:"grafica_agrupacion",client:null==e?void 0:e.axiosInstance})}},De=class extends G{constructor(e){super({endpoint:"grafica_color",client:null==e?void 0:e.axiosInstance})}},be=De,we=class extends G{constructor(e){super({endpoint:"grafica_color_grupo",client:null==e?void 0:e.axiosInstance})}},Ue=we,Pe=class extends G{constructor(e){super({endpoint:"grafica_color_grupo_asignacion",client:null==e?void 0:e.axiosInstance})}},Le=Pe,Ae=class extends G{constructor(e){super({endpoint:"grafica_color_grupo_tipo_grafica",client:null==e?void 0:e.axiosInstance})}},Me=Ae,ve=class extends G{constructor(e){super({endpoint:"grafica_filtro",client:null==e?void 0:e.axiosInstance})}},Be=class extends G{constructor(e){super({endpoint:"grafica_parametro",client:null==e?void 0:e.axiosInstance})}},Re=Be,Te=class extends G{constructor(e){super({endpoint:"grafica_parametro_defecto",client:null==e?void 0:e.axiosInstance})}},Ee=Te,Se=class extends G{constructor(e){super({endpoint:"grafica_parametro_tipo",client:null==e?void 0:e.axiosInstance})}},$e=Se,Oe=class extends G{constructor(e){super({endpoint:"grafica_por_grupo",client:null==e?void 0:e.axiosInstance})}},ke=class extends G{constructor(e){super({endpoint:"grupo_usuario",client:null==e?void 0:e.axiosInstance})}},Ne=class extends G{constructor(e){super({endpoint:"JobAuditLog",client:null==e?void 0:e.axiosInstance})}},je=class extends G{constructor(e){super({endpoint:"modulo",client:null==e?void 0:e.axiosInstance})}},qe=class extends G{constructor(e){super({endpoint:"pagos",client:null==e?void 0:e.axiosInstance})}},ze=class extends G{constructor(e){super({endpoint:"PagosPorColoniasResumen",client:null==e?void 0:e.axiosInstance})}},He=class extends G{constructor(e){super({endpoint:"PagosPorColoniasResumenMensual",client:null==e?void 0:e.axiosInstance})}},Je=class extends G{constructor(e){super({endpoint:"PagosPorTipoServicioMensual",client:null==e?void 0:e.axiosInstance})}},Ke=class extends G{constructor(e){super({endpoint:"PagosPorTipoServicioResumen",client:null==e?void 0:e.axiosInstance})}},Qe=class extends G{constructor(e){super({endpoint:"PagosPorTipoTarifaResumen",client:null==e?void 0:e.axiosInstance})}},Ve=class extends G{constructor(e){super({endpoint:"PagosPorTipoTarifaResumenMensual",client:null==e?void 0:e.axiosInstance})}},We=class extends G{constructor(e){super({endpoint:"PagosResumenMensual",client:null==e?void 0:e.axiosInstance})}},Xe=class extends G{constructor(e){super({endpoint:"permiso_accion_entidad",client:null==e?void 0:e.axiosInstance})}},Ye=class extends G{constructor(e){super({endpoint:"permiso_modulo",client:null==e?void 0:e.axiosInstance})}},Ze=class extends G{constructor(e){super({endpoint:"permiso_submodulo",client:null==e?void 0:e.axiosInstance})}},et=class extends G{constructor(e){super({endpoint:"plazas",client:null==e?void 0:e.axiosInstance})}},tt=class extends G{constructor(e){super({endpoint:"rol",client:null==e?void 0:e.axiosInstance})}},at=tt,st=class extends G{constructor(e){super({endpoint:"rol_dashboard_ruta",client:null==e?void 0:e.axiosInstance})}},rt=st,ot=class extends G{constructor(e){super({endpoint:"rol_grafica",client:null==e?void 0:e.axiosInstance})}},nt=class extends G{constructor(e){super({endpoint:"submodulo",client:null==e?void 0:e.axiosInstance})}},it=class extends G{constructor(e){super({endpoint:"tipo_grafica",client:null==e?void 0:e.axiosInstance})}},ct=it,ut=class extends G{constructor(e){super({endpoint:"tipo_rol",client:null==e?void 0:e.axiosInstance})}},lt=class extends G{constructor(e){super({endpoint:"usuario",client:null==e?void 0:e.axiosInstance})}},dt=lt,ht=class extends G{constructor(e){super({endpoint:"usuario_dashboard_acceso",client:null==e?void 0:e.axiosInstance})}},pt=ht,ft=class extends G{constructor(e){super({endpoint:"usuario_grafica",client:null==e?void 0:e.axiosInstance})}},It=class extends G{constructor(e){super({endpoint:"usuario_grafica_excluida",client:null==e?void 0:e.axiosInstance})}},Ft=class extends G{constructor(e){super({endpoint:"usuario_rol",client:null==e?void 0:e.axiosInstance})}},gt=Ft,xt=class extends G{constructor(e){super({endpoint:"usuario_rol_eliminacion_log",client:null==e?void 0:e.axiosInstance})}},Ct=class{constructor({urlBase:e,getTokenCallback:t}){this.urlBase=e,this.getTokenCallback=t;const a=new x({urlBase:e,getTokenCallback:t}).getAxiosInstance();this.axiosInstance=a,this.adeudo=new y({axiosInstance:a}),this.AdeudoPagoResumenMensual=new D({axiosInstance:a}),this.AdeudoResumenMensual=new b({axiosInstance:a}),this.AdeudoResumenTipoSuelo=new w({axiosInstance:a}),this.AdeudoResumenTipoSueloResumen=new U({axiosInstance:a}),this.AdeudosPorPlazaResumen=new P({axiosInstance:a}),this.AdeudoTipoSueloResumenMensual=new L({axiosInstance:a}),this.cat_accion=new A({axiosInstance:a}),this.cat_color=new M({axiosInstance:a}),this.cat_color_grupo=new B({axiosInstance:a}),this.cat_concepto_pago=new T({axiosInstance:a}),this.cat_entidad=new E({axiosInstance:a}),this.cat_fecha_agrupacion=new S({axiosInstance:a}),this.cat_grafica_grupo=new $({axiosInstance:a}),this.cat_plaza=new k({axiosInstance:a}),this.cat_rol_grupo=new N({axiosInstance:a}),this.cat_tema=new q({axiosInstance:a}),this.cat_tipo_parametro=new H({axiosInstance:a}),this.cat_tipo_servicio=new J({axiosInstance:a}),this.cat_tipo_suelo=new K({axiosInstance:a}),this.cat_tipo_tarifa=new Q({axiosInstance:a}),this.contribuyente=new V({axiosInstance:a}),this.contribuyente_domicilio=new W({axiosInstance:a}),this.CuentasConAltosMontosResumen=new X({axiosInstance:a}),this.dashboard_estilo=new Y({axiosInstance:a}),this.dashboard_grafica=new ee({axiosInstance:a}),this.dashboard_grafica_elemento=new ae({axiosInstance:a}),this.dashboard_grafica_elemento_detalle=new re({axiosInstance:a}),this.dashboard_grafica_elemento_estilo=new ne({axiosInstance:a}),this.dashboard_grafica_elemento_parametro=new ce({axiosInstance:a}),this.dashboard_grafica_grupo=new le({axiosInstance:a}),this.dashboard_grafica_grupo_estilo=new he({axiosInstance:a}),this.dashboard_grafica_grupo_rol=new fe({axiosInstance:a}),this.dashboard_ruta=new Ce({axiosInstance:a}),this.grafica=new Ge({axiosInstance:a}),this.grafica_agrupacion=new _e({axiosInstance:a}),this.grafica_color=new De({axiosInstance:a}),this.grafica_color_grupo=new we({axiosInstance:a}),this.grafica_color_grupo_asignacion=new Pe({axiosInstance:a}),this.grafica_color_grupo_tipo_grafica=new Ae({axiosInstance:a}),this.grafica_filtro=new ve({axiosInstance:a}),this.grafica_parametro=new Be({axiosInstance:a}),this.grafica_parametro_defecto=new Te({axiosInstance:a}),this.grafica_parametro_tipo=new Se({axiosInstance:a}),this.grafica_por_grupo=new Oe({axiosInstance:a}),this.grupo_usuario=new ke({axiosInstance:a}),this.JobAuditLog=new Ne({axiosInstance:a}),this.modulo=new je({axiosInstance:a}),this.pagos=new qe({axiosInstance:a}),this.PagosPorColoniasResumen=new ze({axiosInstance:a}),this.PagosPorColoniasResumenMensual=new He({axiosInstance:a}),this.PagosPorTipoServicioMensual=new Je({axiosInstance:a}),this.PagosPorTipoServicioResumen=new Ke({axiosInstance:a}),this.PagosPorTipoTarifaResumen=new Qe({axiosInstance:a}),this.PagosPorTipoTarifaResumenMensual=new Ve({axiosInstance:a}),this.PagosResumenMensual=new We({axiosInstance:a}),this.permiso_accion_entidad=new Xe({axiosInstance:a}),this.permiso_modulo=new Ye({axiosInstance:a}),this.permiso_submodulo=new Ze({axiosInstance:a}),this.plazas=new et({axiosInstance:a}),this.rol=new tt({axiosInstance:a}),this.rol_dashboard_ruta=new st({axiosInstance:a}),this.rol_grafica=new ot({axiosInstance:a}),this.submodulo=new nt({axiosInstance:a}),this.tipo_grafica=new it({axiosInstance:a}),this.tipo_rol=new ut({axiosInstance:a}),this.usuario=new lt({axiosInstance:a}),this.usuario_dashboard_acceso=new ht({axiosInstance:a}),this.usuario_grafica=new ft({axiosInstance:a}),this.usuario_grafica_excluida=new It({axiosInstance:a}),this.usuario_rol=new Ft({axiosInstance:a}),this.usuario_rol_eliminacion_log=new xt({axiosInstance:a})}getAvailableAPIs(){return Object.entries(this).filter(([e,t])=>"object"==typeof t&&null!==t&&"get"in t).map(([e])=>e)}},mt=require("react"),Gt=I(require("fs")),yt=new class{constructor(){this.handler=null}setHandler(e){this.handler=e}log(e,t){if(this.handler)this.handler(e,t);else if("undefined"!=typeof window&&window.localStorage){const a=JSON.parse(localStorage.getItem("api_error_logs")||"[]");a.push({error:(null==e?void 0:e.message)||String(e),context:t,date:(new Date).toISOString()}),localStorage.setItem("api_error_logs",JSON.stringify(a))}else{const a=`[${(new Date).toISOString()}] ${t||"API"}: ${(null==e?void 0:e.message)||String(e)}\n`;Gt.default.appendFileSync("api_error_logs.txt",a)}}},_t=require("react");function Dt(e,t){switch(t.type){case"FETCH_START":return p(h({},e),{isFetching:!0});case"FETCH_SUCCESS":return p(h({},e),{data:t.payload,error:null,isFetching:!1,isLoading:!1});case"FETCH_ERROR":return p(h({},e),{error:t.payload,isFetching:!1,isLoading:!1});case"PATCH_PAGINATION_SILENT":return p(h({},e),{pagination:h(h({},e.pagination),t.payload)});default:return e}}var bt=e=>(t,a)=>function(e,t,a){var s,r,o;const[n,i]=(0,_t.useReducer)(Dt,function(e){var t,a,s,r,o,n;return{data:null,error:null,isFetching:!1,isLoading:!0,pagination:{limit:null!=(a=null==(t=e.params)?void 0:t.limit)?a:10,page:null!=(r=null==(s=e.params)?void 0:s.page)?r:1,orderBy:null!=(n=null==(o=e.params)?void 0:o.orderBy)?n:""}}}(t)),{data:c,error:u,isFetching:l,isLoading:d,pagination:f}=n,I=(0,_t.useRef)(!1);(0,_t.useEffect)(()=>{var e,a,s,r,o,n;i({type:"PATCH_PAGINATION_SILENT",payload:{limit:null!=(a=null==(e=t.params)?void 0:e.limit)?a:10,page:null!=(r=null==(s=t.params)?void 0:s.page)?r:1,orderBy:null!=(n=null==(o=t.params)?void 0:o.orderBy)?n:""}})},[null==(s=t.params)?void 0:s.limit,null==(r=t.params)?void 0:r.page,null==(o=t.params)?void 0:o.orderBy]);const F=(0,_t.useCallback)(async t=>{i({type:"FETCH_START"});try{const a=await e.query(t);if(!a)throw new Error("No data returned from API");return i({type:"FETCH_SUCCESS",payload:a}),a}catch(e){i({type:"FETCH_ERROR",payload:e}),yt.log(e,"useFetchList")}},[e]),g=(0,_t.useCallback)(async()=>{await F(t)},[F,t]);(0,_t.useEffect)(()=>{(null==a?void 0:a.fetchOnMount)&&(I.current||(I.current=!0,g()))},[g,null==a?void 0:a.fetchOnMount]);const x=(0,_t.useCallback)(async e=>{e<1||(await F({params:p(h({},t.params),{page:e,limit:f.limit})}),i({type:"PATCH_PAGINATION_SILENT",payload:{page:e}}))},[f.limit,t.params,F]),C=(0,_t.useCallback)(async e=>{await F({params:p(h({},t.params),{page:1,limit:e})}),i({type:"PATCH_PAGINATION_SILENT",payload:{limit:e,page:1}})},[t.params,F]),m=(0,_t.useCallback)(()=>{var e;x((null!=(e=f.page)?e:0)+1)},[x,f.page]),G=(0,_t.useCallback)(()=>{var e;const t=(null!=(e=f.page)?e:1)-1;t<1||x(t)},[x,f.page]),y=(0,_t.useCallback)(async({page:e,limit:a,orderBy:s,where:r})=>{var o;await F({params:p(h({},t.params),{page:e,limit:a,orderBy:s,where:null!=r?r:null==(o=t.params)?void 0:o.where})}),i({type:"PATCH_PAGINATION_SILENT",payload:{page:e,limit:a,orderBy:s,where:r}})},[t.params,F]);return{data:c,error:u,isFetching:l,isLoading:d,pagination:f,refetch:g,fetchPage:x,fetchNextPage:m,fetchPreviousPage:G,fetchLimit:C,fetchPagination:y}}(e,t,a);function wt(e){return function(e){return{useFetchById:function(t){const[a,s]=(0,mt.useState)(null),[r,o]=(0,mt.useState)(null),[n,i]=(0,mt.useState)(!1),[c,u]=(0,mt.useState)(!0);return{data:a,error:r,isFetching:n,isLoading:c,refetch:(0,mt.useCallback)(async a=>{i(!0);try{const r=h(h({},t),a),n=await e.getById(r);s(n),o(null)}catch(e){o(e),yt.log(e,"useFetchById")}finally{i(!1),u(!1)}},[JSON.stringify(t)])}},useFetchList:bt(e),useCreate:function(){const[t,a]=(0,mt.useState)(!1),[s,r]=(0,mt.useState)(null),[o,n]=(0,mt.useState)(null);return{mutate:(0,mt.useCallback)(async t=>{a(!0);try{const a=await e.create(t);return n(a),r(null),a}catch(e){throw r(e),yt.log(e,"useCreate"),e}finally{a(!1)}},[]),isLoading:t,error:s,data:o}},useUpdate:function(){const[t,a]=(0,mt.useState)(!1),[s,r]=(0,mt.useState)(null),[o,n]=(0,mt.useState)(null);return{mutate:(0,mt.useCallback)(async t=>{a(!0);try{const a=await e.update(t);return n(a),r(null),a}catch(e){throw r(e),yt.log(e,"useUpdate"),e}finally{a(!1)}},[]),isLoading:t,error:s,data:o}},useDelete:function(){const[t,a]=(0,mt.useState)(!1),[s,r]=(0,mt.useState)(null),[o,n]=(0,mt.useState)(!1);return{mutate:(0,mt.useCallback)(async t=>{a(!0);try{const a=await e.delete(t);return n(a),r(null),a}catch(e){throw r(e),yt.log(e,"useDelete"),e}finally{a(!1)}},[]),isLoading:t,error:s,success:o}},useFilterMatch:function(t){const[a,s]=(0,mt.useState)(null),[r,o]=(0,mt.useState)(null),[n,i]=(0,mt.useState)(!1),[c,u]=(0,mt.useState)(!0);return{data:a,error:r,isFetching:n,isLoading:c,refetch:(0,mt.useCallback)(async()=>{i(!0);try{const a=await e.filterMatch(t);s(a),o(null)}catch(e){o(e),yt.log(e,"useFilterMatch")}finally{i(!1),u(!1)}},[JSON.stringify(t)])}}}}(e)}var Ut=e=>({}),Pt=()=>{const e=new _,t=wt(e),a=Ut(e);return h(h({},t),a)},{useFetchById:Lt,useFetchList:At,useCreate:Mt,useUpdate:vt,useDelete:Bt,useFilterMatch:Rt}=Pt(),Tt=Pt,Et=e=>({}),St=()=>{const e=new v,t=wt(e),a=Et(e);return h(h({},t),a)},{useFetchById:$t,useFetchList:Ot,useCreate:kt,useUpdate:Nt,useDelete:jt,useFilterMatch:qt}=St(),zt=St,Ht=e=>({}),Jt=()=>{const e=new R,t=wt(e),a=Ht(e);return h(h({},t),a)},{useFetchById:Kt,useFetchList:Qt,useCreate:Vt,useUpdate:Wt,useDelete:Xt,useFilterMatch:Yt}=Jt(),Zt=Jt,ea=e=>({}),ta=()=>{const e=new O,t=wt(e),a=ea(e);return h(h({},t),a)},{useFetchById:aa,useFetchList:sa,useCreate:ra,useUpdate:oa,useDelete:na,useFilterMatch:ia}=ta(),ca=ta,ua=e=>({}),la=()=>{const e=new j,t=wt(e),a=ua(e);return h(h({},t),a)},{useFetchById:da,useFetchList:ha,useCreate:pa,useUpdate:fa,useDelete:Ia,useFilterMatch:Fa}=la(),ga=la,xa=e=>({}),Ca=()=>{const e=new z,t=wt(e),a=xa(e);return h(h({},t),a)},{useFetchById:ma,useFetchList:Ga,useCreate:ya,useUpdate:_a,useDelete:Da,useFilterMatch:ba}=Ca(),wa=Ca,Ua=e=>({}),Pa=()=>{const e=new Z,t=wt(e),a=Ua(e);return h(h({},t),a)},{useFetchById:La,useFetchList:Aa,useCreate:Ma,useUpdate:va,useDelete:Ba,useFilterMatch:Ra}=Pa(),Ta=Pa,Ea=e=>({}),Sa=()=>{const e=new te,t=wt(e),a=Ea(e);return h(h({},t),a)},{useFetchById:$a,useFetchList:Oa,useCreate:ka,useUpdate:Na,useDelete:ja,useFilterMatch:qa}=Sa(),za=Sa,Ha=require("react"),Ja=e=>({useGetTree:()=>{const[t,a]=(0,Ha.useState)(null),[s,r]=(0,Ha.useState)(null),[o,n]=(0,Ha.useState)(!1);return{data:t,error:s,isFetching:o,fetchData:(0,Ha.useCallback)(async t=>{n(!0);try{const s=await e.tree(t);a(s),r(null)}catch(e){r(e),console.error("Error fetching dashboardGraficaElemento tree:",e)}finally{n(!1)}},[])}}}),Ka=()=>{const e=new se,t=wt(e),a=Ja(e);return h(h({},t),a)},{useFetchById:Qa,useFetchList:Va,useCreate:Wa,useUpdate:Xa,useDelete:Ya,useFilterMatch:Za}=Ka(),es=Ka,ts=e=>({}),as=()=>{const e=new oe,t=wt(e),a=ts(e);return h(h({},t),a)},{useFetchById:ss,useFetchList:rs,useCreate:os,useUpdate:ns,useDelete:is,useFilterMatch:cs}=as(),us=as,ls=e=>({}),ds=()=>{const e=new ie,t=wt(e),a=ls(e);return h(h({},t),a)},{useFetchById:hs,useFetchList:ps,useCreate:fs,useUpdate:Is,useDelete:Fs,useFilterMatch:gs}=ds(),xs=ds,Cs=e=>({}),ms=()=>{const e=new ue,t=wt(e),a=Cs(e);return h(h({},t),a)},{useFetchById:Gs,useFetchList:ys,useCreate:_s,useUpdate:Ds,useDelete:bs,useFilterMatch:ws}=ms(),Us=ms,Ps=e=>({}),Ls=()=>{const e=new de,t=wt(e),a=Ps(e);return h(h({},t),a)},{useFetchById:As,useFetchList:Ms,useCreate:vs,useUpdate:Bs,useDelete:Rs,useFilterMatch:Ts}=Ls(),Es=Ls,Ss=e=>({}),$s=()=>{const e=new pe,t=wt(e),a=Ss(e);return h(h({},t),a)},{useFetchById:Os,useFetchList:ks,useCreate:Ns,useUpdate:js,useDelete:qs,useFilterMatch:zs}=$s(),Hs=$s,Js=e=>({}),Ks=()=>{const e=new Ie,t=wt(e),a=Js(e);return h(h({},t),a)},{useFetchById:Qs,useFetchList:Vs,useCreate:Ws,useUpdate:Xs,useDelete:Ys,useFilterMatch:Zs}=Ks(),er=Ks,tr=e=>({}),ar=()=>{const e=new me,t=wt(e),a=tr(e);return h(h({},t),a)},{useFetchById:sr,useFetchList:rr,useCreate:or,useUpdate:nr,useDelete:ir,useFilterMatch:cr}=ar(),ur=ar,lr=e=>({}),dr=()=>{const e=new ye,t=wt(e),a=lr(e);return h(h({},t),a)},{useFetchById:hr,useFetchList:pr,useCreate:fr,useUpdate:Ir,useDelete:Fr,useFilterMatch:gr}=dr(),xr=dr,Cr=e=>({}),mr=()=>{const e=new be,t=wt(e),a=Cr(e);return h(h({},t),a)},{useFetchById:Gr,useFetchList:yr,useCreate:_r,useUpdate:Dr,useDelete:br,useFilterMatch:wr}=mr(),Ur=mr,Pr=e=>({}),Lr=()=>{const e=new Ue,t=wt(e),a=Pr(e);return h(h({},t),a)},{useFetchById:Ar,useFetchList:Mr,useCreate:vr,useUpdate:Br,useDelete:Rr,useFilterMatch:Tr}=Lr(),Er=Lr,Sr=e=>({}),$r=()=>{const e=new Le,t=wt(e),a=Sr(e);return h(h({},t),a)},{useFetchById:Or,useFetchList:kr,useCreate:Nr,useUpdate:jr,useDelete:qr,useFilterMatch:zr}=$r(),Hr=$r,Jr=e=>({}),Kr=()=>{const e=new Me,t=wt(e),a=Jr(e);return h(h({},t),a)},{useFetchById:Qr,useFetchList:Vr,useCreate:Wr,useUpdate:Xr,useDelete:Yr,useFilterMatch:Zr}=Kr(),eo=Kr,to=e=>({}),ao=()=>{const e=new Re,t=wt(e),a=to(e);return h(h({},t),a)},{useFetchById:so,useFetchList:ro,useCreate:oo,useUpdate:no,useDelete:io,useFilterMatch:co}=ao(),uo=ao,lo=e=>({}),ho=()=>{const e=new Ee,t=wt(e),a=lo(e);return h(h({},t),a)},{useFetchById:po,useFetchList:fo,useCreate:Io,useUpdate:Fo,useDelete:go,useFilterMatch:xo}=ho(),Co=ho,mo=e=>({}),Go=()=>{const e=new $e,t=wt(e),a=mo(e);return h(h({},t),a)},{useFetchById:yo,useFetchList:_o,useCreate:Do,useUpdate:bo,useDelete:wo,useFilterMatch:Uo}=Go(),Po=Go,Lo=e=>({}),Ao=()=>{const e=new at,t=wt(e),a=Lo(e);return h(h({},t),a)},{useFetchById:Mo,useFetchList:vo,useCreate:Bo,useUpdate:Ro,useDelete:To,useFilterMatch:Eo}=Ao(),So=Ao,$o=e=>({}),Oo=()=>{const e=new rt,t=wt(e),a=$o(e);return h(h({},t),a)},{useFetchById:ko,useFetchList:No,useCreate:jo,useUpdate:qo,useDelete:zo,useFilterMatch:Ho}=Oo(),Jo=Oo,Ko=e=>({}),Qo=()=>{const e=new ct,t=wt(e),a=Ko(e);return h(h({},t),a)},{useFetchById:Vo,useFetchList:Wo,useCreate:Xo,useUpdate:Yo,useDelete:Zo,useFilterMatch:en}=Qo(),tn=Qo,an=e=>({}),sn=()=>{const e=new dt,t=wt(e),a=an(e);return h(h({},t),a)},{useFetchById:rn,useFetchList:on,useCreate:nn,useUpdate:cn,useDelete:un,useFilterMatch:ln}=sn(),dn=sn,hn=e=>({}),pn=()=>{const e=new pt,t=wt(e),a=hn(e);return h(h({},t),a)},{useFetchById:fn,useFetchList:In,useCreate:Fn,useUpdate:gn,useDelete:xn,useFilterMatch:Cn}=pn(),mn=pn,Gn=e=>({}),yn=()=>{const e=new gt,t=wt(e),a=Gn(e);return h(h({},t),a)},{useFetchById:_n,useFetchList:Dn,useCreate:bn,useUpdate:wn,useDelete:Un,useFilterMatch:Pn}=yn(),Ln=yn,An=Tt(),Mn=An.useFetchById,vn=An.useFetchList,Bn=An.useCreate,Rn=An.useUpdate,Tn=An.useDelete,En=An.useFilterMatch,Sn=zt(),$n=Sn.useFetchById,On=Sn.useFetchList,kn=Sn.useCreate,Nn=Sn.useUpdate,jn=Sn.useDelete,qn=Sn.useFilterMatch,zn=Zt(),Hn=zn.useFetchById,Jn=zn.useFetchList,Kn=zn.useCreate,Qn=zn.useUpdate,Vn=zn.useDelete,Wn=zn.useFilterMatch,Xn=ca(),Yn=Xn.useFetchById,Zn=Xn.useFetchList,ei=Xn.useCreate,ti=Xn.useUpdate,ai=Xn.useDelete,si=Xn.useFilterMatch,ri=ga(),oi=ri.useFetchById,ni=ri.useFetchList,ii=ri.useCreate,ci=ri.useUpdate,ui=ri.useDelete,li=ri.useFilterMatch,di=wa(),hi=di.useFetchById,pi=di.useFetchList,fi=di.useCreate,Ii=di.useUpdate,Fi=di.useDelete,gi=di.useFilterMatch,xi=Ta(),Ci=xi.useFetchById,mi=xi.useFetchList,Gi=xi.useCreate,yi=xi.useUpdate,_i=xi.useDelete,Di=xi.useFilterMatch,bi=za(),wi=bi.useFetchById,Ui=bi.useFetchList,Pi=bi.useCreate,Li=bi.useUpdate,Ai=bi.useDelete,Mi=bi.useFilterMatch,vi=es(),Bi=vi.useFetchById,Ri=vi.useFetchList,Ti=vi.useCreate,Ei=vi.useUpdate,Si=vi.useDelete,$i=vi.useFilterMatch,Oi=vi.useGetTree,ki=us(),Ni=ki.useFetchById,ji=ki.useFetchList,qi=ki.useCreate,zi=ki.useUpdate,Hi=ki.useDelete,Ji=ki.useFilterMatch,Ki=xs(),Qi=Ki.useFetchById,Vi=Ki.useFetchList,Wi=Ki.useCreate,Xi=Ki.useUpdate,Yi=Ki.useDelete,Zi=Ki.useFilterMatch,ec=Us(),tc=ec.useFetchById,ac=ec.useFetchList,sc=ec.useCreate,rc=ec.useUpdate,oc=ec.useDelete,nc=ec.useFilterMatch,ic=Es(),cc=ic.useFetchById,uc=ic.useFetchList,lc=ic.useCreate,dc=ic.useUpdate,hc=ic.useDelete,pc=ic.useFilterMatch,fc=Hs(),Ic=fc.useFetchById,Fc=fc.useFetchList,gc=fc.useCreate,xc=fc.useUpdate,Cc=fc.useDelete,mc=fc.useFilterMatch,Gc=er(),yc=Gc.useFetchById,_c=Gc.useFetchList,Dc=Gc.useCreate,bc=Gc.useUpdate,wc=Gc.useDelete,Uc=Gc.useFilterMatch,Pc=ur(),Lc=Pc.useFetchById,Ac=Pc.useFetchList,Mc=Pc.useCreate,vc=Pc.useUpdate,Bc=Pc.useDelete,Rc=Pc.useFilterMatch,Tc=xr(),Ec=Tc.useFetchById,Sc=Tc.useFetchList,$c=Tc.useCreate,Oc=Tc.useUpdate,kc=Tc.useDelete,Nc=Tc.useFilterMatch,jc=Ur(),qc=jc.useFetchById,zc=jc.useFetchList,Hc=jc.useCreate,Jc=jc.useUpdate,Kc=jc.useDelete,Qc=jc.useFilterMatch,Vc=Er(),Wc=Vc.useFetchById,Xc=Vc.useFetchList,Yc=Vc.useCreate,Zc=Vc.useUpdate,eu=Vc.useDelete,tu=Vc.useFilterMatch,au=Hr(),su=au.useFetchById,ru=au.useFetchList,ou=au.useCreate,nu=au.useUpdate,iu=au.useDelete,cu=au.useFilterMatch,uu=eo(),lu=uu.useFetchById,du=uu.useFetchList,hu=uu.useCreate,pu=uu.useUpdate,fu=uu.useDelete,Iu=uu.useFilterMatch,Fu=uo(),gu=Fu.useFetchById,xu=Fu.useFetchList,Cu=Fu.useCreate,mu=Fu.useUpdate,Gu=Fu.useDelete,yu=Fu.useFilterMatch,_u=Co(),Du=_u.useFetchById,bu=_u.useFetchList,wu=_u.useCreate,Uu=_u.useUpdate,Pu=_u.useDelete,Lu=_u.useFilterMatch,Au=Po(),Mu=Au.useFetchById,vu=Au.useFetchList,Bu=Au.useCreate,Ru=Au.useUpdate,Tu=Au.useDelete,Eu=Au.useFilterMatch,Su=So(),$u=Su.useFetchById,Ou=Su.useFetchList,ku=Su.useCreate,Nu=Su.useUpdate,ju=Su.useDelete,qu=Su.useFilterMatch,zu=Jo(),Hu=zu.useFetchById,Ju=zu.useFetchList,Ku=zu.useCreate,Qu=zu.useUpdate,Vu=zu.useDelete,Wu=zu.useFilterMatch,Xu=tn(),Yu=Xu.useFetchById,Zu=Xu.useFetchList,el=Xu.useCreate,tl=Xu.useUpdate,al=Xu.useDelete,sl=Xu.useFilterMatch,rl=dn(),ol=rl.useFetchById,nl=rl.useFetchList,il=rl.useCreate,cl=rl.useUpdate,ul=rl.useDelete,ll=rl.useFilterMatch,dl=mn(),hl=dl.useFetchById,pl=dl.useFetchList,fl=dl.useCreate,Il=dl.useUpdate,Fl=dl.useDelete,gl=dl.useFilterMatch,xl=Ln(),Cl=xl.useFetchById,ml=xl.useFetchList,Gl=xl.useCreate,yl=xl.useUpdate,_l=xl.useDelete,Dl=xl.useFilterMatch;//# sourceMappingURL=index.js.map
1
+ "use strict";var e,t=Object.create,a=Object.defineProperty,s=Object.defineProperties,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,c=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(e,t,s)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,h=(e,t)=>{for(var a in t||(t={}))u.call(t,a)&&d(e,a,t[a]);if(i)for(var a of i(t))l.call(t,a)&&d(e,a,t[a]);return e},p=(e,t)=>s(e,o(t)),f=(e,t,s,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of n(t))u.call(e,i)||i===s||a(e,i,{get:()=>t[i],enumerable:!(o=r(t,i))||o.enumerable});return e},I=(e,s,r)=>(r=null!=e?t(c(e)):{},f(!s&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),F={};((e,t)=>{for(var s in t)a(e,s,{get:t[s],enumerable:!0})})(F,{APIFactory:()=>Ct,ApiClientContext:()=>m,createAPIAdeudo:()=>Tt,createAPICatColor:()=>zt,createAPICatColorGrupo:()=>Zt,createAPICatGraficaGrupo:()=>ca,createAPICatRolGrupo:()=>ga,createAPICatTema:()=>wa,createAPIDashboardEstilo:()=>Ta,createAPIDashboardGrafica:()=>za,createAPIDashboardGraficaElemento:()=>es,createAPIDashboardGraficaElementoDetalle:()=>us,createAPIDashboardGraficaElementoEstilo:()=>xs,createAPIDashboardGraficaElementoParametro:()=>Us,createAPIDashboardGraficaGrupo:()=>Es,createAPIDashboardGraficaGrupoEstilo:()=>Hs,createAPIDashboardGraficaGrupoRol:()=>er,createAPIDashboardRuta:()=>ur,createAPIGrafica:()=>xr,createAPIGraficaColor:()=>Ur,createAPIGraficaColorGrupo:()=>Er,createAPIGraficaColorGrupoAsignacion:()=>Hr,createAPIGraficaColorGrupoTipoGrafica:()=>eo,createAPIGraficaParametro:()=>uo,createAPIGraficaParametroDefecto:()=>Co,createAPIGraficaParametroTipo:()=>Po,createAPIRol:()=>So,createAPIRolDashboardRuta:()=>Jo,createAPITipoGrafica:()=>tn,createAPIUsuario:()=>dn,createAPIUsuarioDashboardAcceso:()=>mn,createAPIUsuarioRol:()=>Ln,useCreateAdeudo:()=>Bn,useCreateCatColor:()=>kn,useCreateCatColorGrupo:()=>Kn,useCreateCatGraficaGrupo:()=>ei,useCreateCatRolGrupo:()=>ii,useCreateCatTema:()=>fi,useCreateDashboardEstilo:()=>Gi,useCreateDashboardGrafica:()=>Pi,useCreateDashboardGraficaElemento:()=>Ti,useCreateDashboardGraficaElementoDetalle:()=>qi,useCreateDashboardGraficaElementoEstilo:()=>Wi,useCreateDashboardGraficaElementoParametro:()=>sc,useCreateDashboardGraficaGrupo:()=>lc,useCreateDashboardGraficaGrupoEstilo:()=>gc,useCreateDashboardGraficaGrupoRol:()=>Dc,useCreateDashboardRuta:()=>Mc,useCreateGrafica:()=>$c,useCreateGraficaColor:()=>Hc,useCreateGraficaColorGrupo:()=>Yc,useCreateGraficaColorGrupoAsignacion:()=>ou,useCreateGraficaColorGrupoTipoGrafica:()=>hu,useCreateGraficaParametro:()=>Cu,useCreateGraficaParametroDefecto:()=>wu,useCreateGraficaParametroTipo:()=>Bu,useCreateRol:()=>ku,useCreateRolDashboardRuta:()=>Ku,useCreateTipoGrafica:()=>el,useCreateUsuario:()=>il,useCreateUsuarioDashboardAcceso:()=>fl,useCreateUsuarioRol:()=>Gl,useDeleteAdeudo:()=>Tn,useDeleteCatColor:()=>jn,useDeleteCatColorGrupo:()=>Vn,useDeleteCatGraficaGrupo:()=>ai,useDeleteCatRolGrupo:()=>ui,useDeleteCatTema:()=>Fi,useDeleteDashboardEstilo:()=>yi,useDeleteDashboardGrafica:()=>Ai,useDeleteDashboardGraficaElemento:()=>Si,useDeleteDashboardGraficaElementoDetalle:()=>Hi,useDeleteDashboardGraficaElementoEstilo:()=>Yi,useDeleteDashboardGraficaElementoParametro:()=>oc,useDeleteDashboardGraficaGrupo:()=>hc,useDeleteDashboardGraficaGrupoEstilo:()=>Cc,useDeleteDashboardGraficaGrupoRol:()=>wc,useDeleteDashboardRuta:()=>Bc,useDeleteGrafica:()=>kc,useDeleteGraficaColor:()=>Kc,useDeleteGraficaColorGrupo:()=>eu,useDeleteGraficaColorGrupoAsignacion:()=>iu,useDeleteGraficaColorGrupoTipoGrafica:()=>fu,useDeleteGraficaParametro:()=>Gu,useDeleteGraficaParametroDefecto:()=>Pu,useDeleteGraficaParametroTipo:()=>Tu,useDeleteRol:()=>ju,useDeleteRolDashboardRuta:()=>Vu,useDeleteTipoGrafica:()=>al,useDeleteUsuario:()=>ul,useDeleteUsuarioDashboardAcceso:()=>Fl,useDeleteUsuarioRol:()=>yl,useFetchByIdAdeudo:()=>Mn,useFetchByIdCatColor:()=>$n,useFetchByIdCatColorGrupo:()=>Hn,useFetchByIdCatGraficaGrupo:()=>Yn,useFetchByIdCatRolGrupo:()=>oi,useFetchByIdCatTema:()=>hi,useFetchByIdDashboardEstilo:()=>Ci,useFetchByIdDashboardGrafica:()=>wi,useFetchByIdDashboardGraficaElemento:()=>Bi,useFetchByIdDashboardGraficaElementoDetalle:()=>Ni,useFetchByIdDashboardGraficaElementoEstilo:()=>Qi,useFetchByIdDashboardGraficaElementoParametro:()=>tc,useFetchByIdDashboardGraficaGrupo:()=>cc,useFetchByIdDashboardGraficaGrupoEstilo:()=>Ic,useFetchByIdDashboardGraficaGrupoRol:()=>_c,useFetchByIdDashboardRuta:()=>Lc,useFetchByIdGrafica:()=>Ec,useFetchByIdGraficaColor:()=>qc,useFetchByIdGraficaColorGrupo:()=>Wc,useFetchByIdGraficaColorGrupoAsignacion:()=>su,useFetchByIdGraficaColorGrupoTipoGrafica:()=>lu,useFetchByIdGraficaParametro:()=>gu,useFetchByIdGraficaParametroDefecto:()=>Du,useFetchByIdGraficaParametroTipo:()=>Mu,useFetchByIdRol:()=>$u,useFetchByIdRolDashboardRuta:()=>Hu,useFetchByIdTipoGrafica:()=>Yu,useFetchByIdUsuario:()=>ol,useFetchByIdUsuarioDashboardAcceso:()=>hl,useFetchByIdUsuarioRol:()=>Cl,useFetchListAdeudo:()=>vn,useFetchListCatColor:()=>On,useFetchListCatColorGrupo:()=>Jn,useFetchListCatGraficaGrupo:()=>Zn,useFetchListCatRolGrupo:()=>ni,useFetchListCatTema:()=>pi,useFetchListDashboardEstilo:()=>mi,useFetchListDashboardGrafica:()=>Ui,useFetchListDashboardGraficaElemento:()=>Ri,useFetchListDashboardGraficaElementoDetalle:()=>ji,useFetchListDashboardGraficaElementoEstilo:()=>Vi,useFetchListDashboardGraficaElementoParametro:()=>ac,useFetchListDashboardGraficaGrupo:()=>uc,useFetchListDashboardGraficaGrupoEstilo:()=>Fc,useFetchListDashboardGraficaGrupoRol:()=>yc,useFetchListDashboardRuta:()=>Ac,useFetchListGrafica:()=>Sc,useFetchListGraficaColor:()=>zc,useFetchListGraficaColorGrupo:()=>Xc,useFetchListGraficaColorGrupoAsignacion:()=>ru,useFetchListGraficaColorGrupoTipoGrafica:()=>du,useFetchListGraficaParametro:()=>xu,useFetchListGraficaParametroDefecto:()=>bu,useFetchListGraficaParametroTipo:()=>vu,useFetchListRol:()=>Ou,useFetchListRolDashboardRuta:()=>Ju,useFetchListTipoGrafica:()=>Zu,useFetchListUsuario:()=>nl,useFetchListUsuarioDashboardAcceso:()=>pl,useFetchListUsuarioRol:()=>ml,useFilterMatchAdeudo:()=>En,useFilterMatchCatColor:()=>qn,useFilterMatchCatColorGrupo:()=>Wn,useFilterMatchCatGraficaGrupo:()=>si,useFilterMatchCatRolGrupo:()=>li,useFilterMatchCatTema:()=>gi,useFilterMatchDashboardEstilo:()=>Di,useFilterMatchDashboardGrafica:()=>Mi,useFilterMatchDashboardGraficaElemento:()=>$i,useFilterMatchDashboardGraficaElementoDetalle:()=>Ji,useFilterMatchDashboardGraficaElementoEstilo:()=>Zi,useFilterMatchDashboardGraficaElementoParametro:()=>nc,useFilterMatchDashboardGraficaGrupo:()=>pc,useFilterMatchDashboardGraficaGrupoEstilo:()=>mc,useFilterMatchDashboardGraficaGrupoRol:()=>Uc,useFilterMatchDashboardRuta:()=>Rc,useFilterMatchGrafica:()=>Nc,useFilterMatchGraficaColor:()=>Qc,useFilterMatchGraficaColorGrupo:()=>tu,useFilterMatchGraficaColorGrupoAsignacion:()=>cu,useFilterMatchGraficaColorGrupoTipoGrafica:()=>Iu,useFilterMatchGraficaParametro:()=>_u,useFilterMatchGraficaParametroDefecto:()=>Lu,useFilterMatchGraficaParametroTipo:()=>Eu,useFilterMatchRol:()=>qu,useFilterMatchRolDashboardRuta:()=>Wu,useFilterMatchTipoGrafica:()=>sl,useFilterMatchUsuario:()=>ll,useFilterMatchUsuarioDashboardAcceso:()=>gl,useFilterMatchUsuarioRol:()=>Dl,useGetTreeDashboardGraficaElemento:()=>Oi,useUpdateAdeudo:()=>Rn,useUpdateCatColor:()=>Nn,useUpdateCatColorGrupo:()=>Qn,useUpdateCatGraficaGrupo:()=>ti,useUpdateCatRolGrupo:()=>ci,useUpdateCatTema:()=>Ii,useUpdateDashboardEstilo:()=>_i,useUpdateDashboardGrafica:()=>Li,useUpdateDashboardGraficaElemento:()=>Ei,useUpdateDashboardGraficaElementoDetalle:()=>zi,useUpdateDashboardGraficaElementoEstilo:()=>Xi,useUpdateDashboardGraficaElementoParametro:()=>rc,useUpdateDashboardGraficaGrupo:()=>dc,useUpdateDashboardGraficaGrupoEstilo:()=>xc,useUpdateDashboardGraficaGrupoRol:()=>bc,useUpdateDashboardRuta:()=>vc,useUpdateGrafica:()=>Oc,useUpdateGraficaColor:()=>Jc,useUpdateGraficaColorGrupo:()=>Zc,useUpdateGraficaColorGrupoAsignacion:()=>nu,useUpdateGraficaColorGrupoTipoGrafica:()=>pu,useUpdateGraficaParametro:()=>mu,useUpdateGraficaParametroDefecto:()=>Uu,useUpdateGraficaParametroTipo:()=>Ru,useUpdateRol:()=>Nu,useUpdateRolDashboardRuta:()=>Qu,useUpdateTipoGrafica:()=>tl,useUpdateUsuario:()=>cl,useUpdateUsuarioDashboardAcceso:()=>Il,useUpdateUsuarioRol:()=>_l}),module.exports=(e=F,f(a({},"__esModule",{value:!0}),e));var g=I(require("axios")),x=class{constructor({urlBase:e,getTokenCallback:t}){this._baseURL="",this.createDefaultMethods=e=>({findByFilterMatch:(t={filter:"",pagination:{},orderBy:""})=>e.post("/filter-match",t),get:({id:t,params:a={},config:s={},where:r})=>t?e.get(`/${t}`,h({params:a},s)):e.get("/",h({params:p(h({},a),{where:JSON.stringify(r)})},s)),post:({data:t,config:a})=>e.post("/",t,a),put:({id:t,data:a={},config:s={}})=>t?e.put(`/${t}`,a,s):e.put("/",a,s),delete:({id:t,config:a={},where:s={}})=>t?e.delete(`/${t}`,a):e.delete("/",h({data:{where:s}},a))}),this.subpath=(e,t)=>{if(!e)throw new Error("API subpath must be defined");const a=g.default.create({baseURL:this.api.defaults.baseURL+e,headers:{"Content-Type":"application/json"}});a.interceptors.request.use(e=>(e.headers.Authorization=this.api.defaults.headers.Authorization,e),e=>Promise.reject(e)),a.interceptors.response.use(e=>e,e=>Promise.reject(e));const s=this.createDefaultMethods(a),r=t?t(s,a):{};return h(h({},s),r)},this._baseURL=e,this.getTokenCallback=t,this.api=g.default.create({baseURL:e,headers:{"Content-Type":"application/json"}}),this.api.interceptors.request.use(e=>(e.headers.Authorization=this.getTokenCallback?this.getTokenCallback():null,e),e=>Promise.reject(e)),this.api.interceptors.response.use(e=>e,e=>Promise.reject(e))}setBaseURL(e){this._baseURL=e,this.api&&(this.api.defaults.baseURL=e)}setGetTokenCallback(e){this.getTokenCallback=e,this.api.defaults.headers.Authorization=e?e():null}getAxiosInstance(){return this.api}},C=I(require("axios")),m=class{};m.baseUrl="https://api.ejemplo.com",m.token="TOKEN_GLOBAL_POR_DEFECTO";var G=class{constructor({endpoint:e,client:t}){this.client=C.default.create({baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"}}),this.endpoint=e,t&&(this.client=t)}getAxiosConfig(e){const t=h({},e);return(null==t?void 0:t.where)&&"object"==typeof t.where&&(t.where=JSON.stringify(t.where)),{baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"},params:t}}async getById({id:e,params:t}){try{return(await C.default.get(`${this.endpoint}/${e}`,this.getAxiosConfig(t))).data}catch(t){return console.error(`Error GET ${this.endpoint}/${e}:`,t.message),null}}async create({data:e,params:t}){try{return(await C.default.post(this.endpoint,e,this.getAxiosConfig(t))).data}catch(e){return console.error(`Error POST ${this.endpoint}:`,e.message),null}}async update({id:e,data:t,params:a}){try{return(await C.default.put(`${this.endpoint}/${e}`,t,this.getAxiosConfig(a))).data}catch(t){return console.error(`Error PUT ${this.endpoint}/${e}:`,t.message),null}}async query({params:e}){try{const t=`${this.endpoint}`;return(await C.default.get(t,this.getAxiosConfig(e))).data}catch(e){return console.error(`Error GET ${this.endpoint} con query:`,e.message),null}}async filterMatch({body:e,params:t}){try{const a=`${this.endpoint}/filter-match`;return(await C.default.post(a,e,this.getAxiosConfig(t))).data}catch(e){return console.error(`Error POST ${this.endpoint} filter-match:`,e.message),null}}findByFilterMatch(e){return this.client.post(`${this.endpoint}/filter-match`,e)}buildGETConfig({id:e,params:t,config:a={},where:s}){const r=h(h({},this.getAxiosConfig(t)),a);return e||s&&(r.params=p(h({},r.params),{where:JSON.stringify(s)})),r}get({id:e,params:t,config:a={},where:s}){const r=this.buildGETConfig({id:e,params:t,config:a,where:s});return e?this.client.get(`${this.endpoint}/${e}`,r):this.client.get(`${this.endpoint}`,r)}post({data:e,config:t={}}){return this.client.post(`${this.endpoint}`,e,h(h({},this.getAxiosConfig()),t))}put({id:e,data:t={},config:a={}}){return e?this.client.put(`${this.endpoint}/${e}`,t,h(h({},this.getAxiosConfig()),a)):this.client.put(`${this.endpoint}`,t,h(h({},this.getAxiosConfig()),a))}async delete({id:e,params:t,where:a={},config:s={}}){try{const r=h(h({},this.getAxiosConfig(t)),s);return e?await C.default.delete(`${this.endpoint}/${e}`,r):await C.default.delete(`${this.endpoint}`,p(h({},r),{data:{where:a}})),!0}catch(t){return console.error(`Error DELETE ${this.endpoint}/${e||""}:`,t.message),!1}}},_=class extends G{constructor(e){super({endpoint:"adeudo",client:null==e?void 0:e.axiosInstance})}},y=_,D=class extends G{constructor(e){super({endpoint:"AdeudoPagoResumenMensual",client:null==e?void 0:e.axiosInstance})}},b=class extends G{constructor(e){super({endpoint:"AdeudoResumenMensual",client:null==e?void 0:e.axiosInstance})}},w=class extends G{constructor(e){super({endpoint:"AdeudoResumenTipoSuelo",client:null==e?void 0:e.axiosInstance})}},U=class extends G{constructor(e){super({endpoint:"AdeudoResumenTipoSueloResumen",client:null==e?void 0:e.axiosInstance})}},P=class extends G{constructor(e){super({endpoint:"AdeudosPorPlazaResumen",client:null==e?void 0:e.axiosInstance})}},L=class extends G{constructor(e){super({endpoint:"AdeudoTipoSueloResumenMensual",client:null==e?void 0:e.axiosInstance})}},A=class extends G{constructor(e){super({endpoint:"cat_accion",client:null==e?void 0:e.axiosInstance})}},M=class extends G{constructor(e){super({endpoint:"cat_color",client:null==e?void 0:e.axiosInstance})}},v=M,B=class extends G{constructor(e){super({endpoint:"cat_color_grupo",client:null==e?void 0:e.axiosInstance})}},R=B,T=class extends G{constructor(e){super({endpoint:"cat_concepto_pago",client:null==e?void 0:e.axiosInstance})}},E=class extends G{constructor(e){super({endpoint:"cat_entidad",client:null==e?void 0:e.axiosInstance})}},S=class extends G{constructor(e){super({endpoint:"cat_fecha_agrupacion",client:null==e?void 0:e.axiosInstance})}},$=class extends G{constructor(e){super({endpoint:"cat_grafica_grupo",client:null==e?void 0:e.axiosInstance})}},O=$,k=class extends G{constructor(e){super({endpoint:"cat_plaza",client:null==e?void 0:e.axiosInstance})}},N=class extends G{constructor(e){super({endpoint:"cat_rol_grupo",client:null==e?void 0:e.axiosInstance})}},j=N,q=class extends G{constructor(e){super({endpoint:"cat_tema",client:null==e?void 0:e.axiosInstance})}},z=q,H=class extends G{constructor(e){super({endpoint:"cat_tipo_parametro",client:null==e?void 0:e.axiosInstance})}},J=class extends G{constructor(e){super({endpoint:"cat_tipo_servicio",client:null==e?void 0:e.axiosInstance})}},K=class extends G{constructor(e){super({endpoint:"cat_tipo_suelo",client:null==e?void 0:e.axiosInstance})}},Q=class extends G{constructor(e){super({endpoint:"cat_tipo_tarifa",client:null==e?void 0:e.axiosInstance})}},V=class extends G{constructor(e){super({endpoint:"contribuyente",client:null==e?void 0:e.axiosInstance})}},W=class extends G{constructor(e){super({endpoint:"contribuyente_domicilio",client:null==e?void 0:e.axiosInstance})}},X=class extends G{constructor(e){super({endpoint:"CuentasConAltosMontosResumen",client:null==e?void 0:e.axiosInstance})}},Y=class extends G{constructor(e){super({endpoint:"dashboard_estilo",client:null==e?void 0:e.axiosInstance})}},Z=Y,ee=class extends G{constructor(e){super({endpoint:"dashboard_grafica",client:null==e?void 0:e.axiosInstance})}},te=ee,ae=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento",client:null==e?void 0:e.axiosInstance}),this.tree=async e=>{try{const t=this.buildGETConfig({params:e,where:{rol_id:e.rol_id,dashboard_grafica_grupo_id:e.dashboard_grafica_grupo_id}});return(await this.client.get(`${this.endpoint}/tree`,t)).data}catch(e){throw e}}}},se=ae,re=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento_detalle",client:null==e?void 0:e.axiosInstance})}},oe=re,ne=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento_estilo",client:null==e?void 0:e.axiosInstance})}},ie=ne,ce=class extends G{constructor(e){super({endpoint:"dashboard_grafica_elemento_parametro",client:null==e?void 0:e.axiosInstance})}},ue=ce,le=class extends G{constructor(e){super({endpoint:"dashboard_grafica_grupo",client:null==e?void 0:e.axiosInstance})}},de=le,he=class extends G{constructor(e){super({endpoint:"dashboard_grafica_grupo_estilo",client:null==e?void 0:e.axiosInstance})}},pe=he,fe=class extends G{constructor(e){super({endpoint:"dashboard_grafica_grupo_rol",client:null==e?void 0:e.axiosInstance})}},Ie=fe,Fe=I(require("axios")),ge=class{constructor({endpoint:e,client:t}){this.client=Fe.default.create({baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"}}),this.endpoint=e,t&&(this.client=t)}getAxiosConfig(e){return{baseURL:m.baseUrl,headers:{Authorization:`${m.token}`,Accept:"application/json"},params:e}}},xe=class extends ge{async getById({id:e,params:t}){try{return(await Fe.default.get(`${this.endpoint}/${e}`,this.getAxiosConfig(t))).data}catch(t){return console.error(`Error GET ${this.endpoint}/${e}:`,t.message),null}}async getAll({params:e}){try{const t=`${this.endpoint}`;return(await Fe.default.get(t,this.getAxiosConfig(e))).data}catch(e){return console.error(`Error GET ${this.endpoint} all:`,e.message),null}}get({id:e,params:t,config:a={},where:s}){const r=h(h({},this.getAxiosConfig(t)),a);return e?this.client.get(`${this.endpoint}/${e}`,r):(s&&(r.params=p(h({},r.params),{where:JSON.stringify(s)})),this.client.get(`${this.endpoint}`,r))}async query({params:e}){try{const t=`${this.endpoint}`;return(await Fe.default.get(t,this.getAxiosConfig(e))).data}catch(e){return console.error(`Error GET ${this.endpoint} con query:`,e.message),null}}},Ce=class extends G{constructor(e){super({endpoint:"dashboard_ruta",client:null==e?void 0:e.axiosInstance})}get usuario(){const e=`${this.endpoint}/usuario`;return new class extends xe{constructor(t){super({endpoint:e,client:t})}}(this.client)}},me=Ce,Ge=class extends G{constructor(e){super({endpoint:"grafica",client:null==e?void 0:e.axiosInstance})}},_e=Ge,ye=class extends G{constructor(e){super({endpoint:"grafica_agrupacion",client:null==e?void 0:e.axiosInstance})}},De=class extends G{constructor(e){super({endpoint:"grafica_color",client:null==e?void 0:e.axiosInstance})}},be=De,we=class extends G{constructor(e){super({endpoint:"grafica_color_grupo",client:null==e?void 0:e.axiosInstance})}},Ue=we,Pe=class extends G{constructor(e){super({endpoint:"grafica_color_grupo_asignacion",client:null==e?void 0:e.axiosInstance})}},Le=Pe,Ae=class extends G{constructor(e){super({endpoint:"grafica_color_grupo_tipo_grafica",client:null==e?void 0:e.axiosInstance})}},Me=Ae,ve=class extends G{constructor(e){super({endpoint:"grafica_filtro",client:null==e?void 0:e.axiosInstance})}},Be=class extends G{constructor(e){super({endpoint:"grafica_parametro",client:null==e?void 0:e.axiosInstance})}},Re=Be,Te=class extends G{constructor(e){super({endpoint:"grafica_parametro_defecto",client:null==e?void 0:e.axiosInstance})}},Ee=Te,Se=class extends G{constructor(e){super({endpoint:"grafica_parametro_tipo",client:null==e?void 0:e.axiosInstance})}},$e=Se,Oe=class extends G{constructor(e){super({endpoint:"grafica_por_grupo",client:null==e?void 0:e.axiosInstance})}},ke=class extends G{constructor(e){super({endpoint:"grupo_usuario",client:null==e?void 0:e.axiosInstance})}},Ne=class extends G{constructor(e){super({endpoint:"JobAuditLog",client:null==e?void 0:e.axiosInstance})}},je=class extends G{constructor(e){super({endpoint:"modulo",client:null==e?void 0:e.axiosInstance})}},qe=class extends G{constructor(e){super({endpoint:"pagos",client:null==e?void 0:e.axiosInstance})}},ze=class extends G{constructor(e){super({endpoint:"PagosPorColoniasResumen",client:null==e?void 0:e.axiosInstance})}},He=class extends G{constructor(e){super({endpoint:"PagosPorColoniasResumenMensual",client:null==e?void 0:e.axiosInstance})}},Je=class extends G{constructor(e){super({endpoint:"PagosPorTipoServicioMensual",client:null==e?void 0:e.axiosInstance})}},Ke=class extends G{constructor(e){super({endpoint:"PagosPorTipoServicioResumen",client:null==e?void 0:e.axiosInstance})}},Qe=class extends G{constructor(e){super({endpoint:"PagosPorTipoTarifaResumen",client:null==e?void 0:e.axiosInstance})}},Ve=class extends G{constructor(e){super({endpoint:"PagosPorTipoTarifaResumenMensual",client:null==e?void 0:e.axiosInstance})}},We=class extends G{constructor(e){super({endpoint:"PagosResumenMensual",client:null==e?void 0:e.axiosInstance})}},Xe=class extends G{constructor(e){super({endpoint:"permiso_accion_entidad",client:null==e?void 0:e.axiosInstance})}},Ye=class extends G{constructor(e){super({endpoint:"permiso_modulo",client:null==e?void 0:e.axiosInstance})}},Ze=class extends G{constructor(e){super({endpoint:"permiso_submodulo",client:null==e?void 0:e.axiosInstance})}},et=class extends G{constructor(e){super({endpoint:"plazas",client:null==e?void 0:e.axiosInstance})}},tt=class extends G{constructor(e){super({endpoint:"rol",client:null==e?void 0:e.axiosInstance})}},at=tt,st=class extends G{constructor(e){super({endpoint:"rol_dashboard_ruta",client:null==e?void 0:e.axiosInstance})}},rt=st,ot=class extends G{constructor(e){super({endpoint:"rol_grafica",client:null==e?void 0:e.axiosInstance})}},nt=class extends G{constructor(e){super({endpoint:"submodulo",client:null==e?void 0:e.axiosInstance})}},it=class extends G{constructor(e){super({endpoint:"tipo_grafica",client:null==e?void 0:e.axiosInstance})}},ct=it,ut=class extends G{constructor(e){super({endpoint:"tipo_rol",client:null==e?void 0:e.axiosInstance})}},lt=class extends G{constructor(e){super({endpoint:"usuario",client:null==e?void 0:e.axiosInstance})}},dt=lt,ht=class extends G{constructor(e){super({endpoint:"usuario_dashboard_acceso",client:null==e?void 0:e.axiosInstance})}},pt=ht,ft=class extends G{constructor(e){super({endpoint:"usuario_grafica",client:null==e?void 0:e.axiosInstance})}},It=class extends G{constructor(e){super({endpoint:"usuario_grafica_excluida",client:null==e?void 0:e.axiosInstance})}},Ft=class extends G{constructor(e){super({endpoint:"usuario_rol",client:null==e?void 0:e.axiosInstance})}},gt=Ft,xt=class extends G{constructor(e){super({endpoint:"usuario_rol_eliminacion_log",client:null==e?void 0:e.axiosInstance})}},Ct=class{constructor({urlBase:e,getTokenCallback:t}){this.urlBase=e,this.getTokenCallback=t;const a=new x({urlBase:e,getTokenCallback:t}).getAxiosInstance();this.axiosInstance=a,this.adeudo=new _({axiosInstance:a}),this.AdeudoPagoResumenMensual=new D({axiosInstance:a}),this.AdeudoResumenMensual=new b({axiosInstance:a}),this.AdeudoResumenTipoSuelo=new w({axiosInstance:a}),this.AdeudoResumenTipoSueloResumen=new U({axiosInstance:a}),this.AdeudosPorPlazaResumen=new P({axiosInstance:a}),this.AdeudoTipoSueloResumenMensual=new L({axiosInstance:a}),this.cat_accion=new A({axiosInstance:a}),this.cat_color=new M({axiosInstance:a}),this.cat_color_grupo=new B({axiosInstance:a}),this.cat_concepto_pago=new T({axiosInstance:a}),this.cat_entidad=new E({axiosInstance:a}),this.cat_fecha_agrupacion=new S({axiosInstance:a}),this.cat_grafica_grupo=new $({axiosInstance:a}),this.cat_plaza=new k({axiosInstance:a}),this.cat_rol_grupo=new N({axiosInstance:a}),this.cat_tema=new q({axiosInstance:a}),this.cat_tipo_parametro=new H({axiosInstance:a}),this.cat_tipo_servicio=new J({axiosInstance:a}),this.cat_tipo_suelo=new K({axiosInstance:a}),this.cat_tipo_tarifa=new Q({axiosInstance:a}),this.contribuyente=new V({axiosInstance:a}),this.contribuyente_domicilio=new W({axiosInstance:a}),this.CuentasConAltosMontosResumen=new X({axiosInstance:a}),this.dashboard_estilo=new Y({axiosInstance:a}),this.dashboard_grafica=new ee({axiosInstance:a}),this.dashboard_grafica_elemento=new ae({axiosInstance:a}),this.dashboard_grafica_elemento_detalle=new re({axiosInstance:a}),this.dashboard_grafica_elemento_estilo=new ne({axiosInstance:a}),this.dashboard_grafica_elemento_parametro=new ce({axiosInstance:a}),this.dashboard_grafica_grupo=new le({axiosInstance:a}),this.dashboard_grafica_grupo_estilo=new he({axiosInstance:a}),this.dashboard_grafica_grupo_rol=new fe({axiosInstance:a}),this.dashboard_ruta=new Ce({axiosInstance:a}),this.grafica=new Ge({axiosInstance:a}),this.grafica_agrupacion=new ye({axiosInstance:a}),this.grafica_color=new De({axiosInstance:a}),this.grafica_color_grupo=new we({axiosInstance:a}),this.grafica_color_grupo_asignacion=new Pe({axiosInstance:a}),this.grafica_color_grupo_tipo_grafica=new Ae({axiosInstance:a}),this.grafica_filtro=new ve({axiosInstance:a}),this.grafica_parametro=new Be({axiosInstance:a}),this.grafica_parametro_defecto=new Te({axiosInstance:a}),this.grafica_parametro_tipo=new Se({axiosInstance:a}),this.grafica_por_grupo=new Oe({axiosInstance:a}),this.grupo_usuario=new ke({axiosInstance:a}),this.JobAuditLog=new Ne({axiosInstance:a}),this.modulo=new je({axiosInstance:a}),this.pagos=new qe({axiosInstance:a}),this.PagosPorColoniasResumen=new ze({axiosInstance:a}),this.PagosPorColoniasResumenMensual=new He({axiosInstance:a}),this.PagosPorTipoServicioMensual=new Je({axiosInstance:a}),this.PagosPorTipoServicioResumen=new Ke({axiosInstance:a}),this.PagosPorTipoTarifaResumen=new Qe({axiosInstance:a}),this.PagosPorTipoTarifaResumenMensual=new Ve({axiosInstance:a}),this.PagosResumenMensual=new We({axiosInstance:a}),this.permiso_accion_entidad=new Xe({axiosInstance:a}),this.permiso_modulo=new Ye({axiosInstance:a}),this.permiso_submodulo=new Ze({axiosInstance:a}),this.plazas=new et({axiosInstance:a}),this.rol=new tt({axiosInstance:a}),this.rol_dashboard_ruta=new st({axiosInstance:a}),this.rol_grafica=new ot({axiosInstance:a}),this.submodulo=new nt({axiosInstance:a}),this.tipo_grafica=new it({axiosInstance:a}),this.tipo_rol=new ut({axiosInstance:a}),this.usuario=new lt({axiosInstance:a}),this.usuario_dashboard_acceso=new ht({axiosInstance:a}),this.usuario_grafica=new ft({axiosInstance:a}),this.usuario_grafica_excluida=new It({axiosInstance:a}),this.usuario_rol=new Ft({axiosInstance:a}),this.usuario_rol_eliminacion_log=new xt({axiosInstance:a})}getAvailableAPIs(){return Object.entries(this).filter(([e,t])=>"object"==typeof t&&null!==t&&"get"in t).map(([e])=>e)}},mt=require("react"),Gt=I(require("fs")),_t=new class{constructor(){this.handler=null}setHandler(e){this.handler=e}log(e,t){if(this.handler)this.handler(e,t);else if("undefined"!=typeof window&&window.localStorage){const a=JSON.parse(localStorage.getItem("api_error_logs")||"[]");a.push({error:(null==e?void 0:e.message)||String(e),context:t,date:(new Date).toISOString()}),localStorage.setItem("api_error_logs",JSON.stringify(a))}else{const a=`[${(new Date).toISOString()}] ${t||"API"}: ${(null==e?void 0:e.message)||String(e)}\n`;Gt.default.appendFileSync("api_error_logs.txt",a)}}},yt=require("react");function Dt(e,t){switch(t.type){case"FETCH_START":return p(h({},e),{isFetching:!0});case"FETCH_SUCCESS":return p(h({},e),{data:t.payload,error:null,isFetching:!1,isLoading:!1});case"FETCH_ERROR":return p(h({},e),{error:t.payload,isFetching:!1,isLoading:!1});case"PATCH_PAGINATION_SILENT":return p(h({},e),{pagination:h(h({},e.pagination),t.payload)});default:return e}}var bt=e=>(t,a)=>function(e,t,a){var s,r,o;const[n,i]=(0,yt.useReducer)(Dt,function(e){var t,a,s,r,o,n;return{data:null,error:null,isFetching:!1,isLoading:!0,pagination:{limit:null!=(a=null==(t=e.params)?void 0:t.limit)?a:10,page:null!=(r=null==(s=e.params)?void 0:s.page)?r:1,orderBy:null!=(n=null==(o=e.params)?void 0:o.orderBy)?n:""}}}(t)),{data:c,error:u,isFetching:l,isLoading:d,pagination:f}=n,I=(0,yt.useRef)(!1);(0,yt.useEffect)(()=>{var e,a,s,r,o,n;i({type:"PATCH_PAGINATION_SILENT",payload:{limit:null!=(a=null==(e=t.params)?void 0:e.limit)?a:10,page:null!=(r=null==(s=t.params)?void 0:s.page)?r:1,orderBy:null!=(n=null==(o=t.params)?void 0:o.orderBy)?n:""}})},[null==(s=t.params)?void 0:s.limit,null==(r=t.params)?void 0:r.page,null==(o=t.params)?void 0:o.orderBy]);const F=(0,yt.useCallback)(async t=>{i({type:"FETCH_START"});try{const a=await e.query(t);if(!a)throw new Error("No data returned from API");return i({type:"FETCH_SUCCESS",payload:a}),a}catch(e){i({type:"FETCH_ERROR",payload:e}),_t.log(e,"useFetchList")}},[e]),g=(0,yt.useCallback)(async()=>{await F(t)},[F,t]);(0,yt.useEffect)(()=>{(null==a?void 0:a.fetchOnMount)&&(I.current||(I.current=!0,g()))},[g,null==a?void 0:a.fetchOnMount]);const x=(0,yt.useCallback)(async e=>{e<1||(await F({params:p(h({},t.params),{page:e,limit:f.limit})}),i({type:"PATCH_PAGINATION_SILENT",payload:{page:e}}))},[f.limit,t.params,F]),C=(0,yt.useCallback)(async e=>{await F({params:p(h({},t.params),{page:1,limit:e})}),i({type:"PATCH_PAGINATION_SILENT",payload:{limit:e,page:1}})},[t.params,F]),m=(0,yt.useCallback)(()=>{var e;x((null!=(e=f.page)?e:0)+1)},[x,f.page]),G=(0,yt.useCallback)(()=>{var e;const t=(null!=(e=f.page)?e:1)-1;t<1||x(t)},[x,f.page]),_=(0,yt.useCallback)(async({page:e,limit:a,orderBy:s,where:r})=>{var o;await F({params:p(h({},t.params),{page:e,limit:a,orderBy:s,where:null!=r?r:null==(o=t.params)?void 0:o.where})}),i({type:"PATCH_PAGINATION_SILENT",payload:{page:e,limit:a,orderBy:s,where:r}})},[t.params,F]);return{data:c,error:u,isFetching:l,isLoading:d,pagination:f,refetch:g,fetchPage:x,fetchNextPage:m,fetchPreviousPage:G,fetchLimit:C,fetchPagination:_}}(e,t,a);function wt(e){return function(e){return{useFetchById:function(t){const[a,s]=(0,mt.useState)(null),[r,o]=(0,mt.useState)(null),[n,i]=(0,mt.useState)(!1),[c,u]=(0,mt.useState)(!0);return{data:a,error:r,isFetching:n,isLoading:c,refetch:(0,mt.useCallback)(async a=>{i(!0);try{const r=h(h({},t),a),n=await e.getById(r);s(n),o(null)}catch(e){o(e),_t.log(e,"useFetchById")}finally{i(!1),u(!1)}},[JSON.stringify(t)])}},useFetchList:bt(e),useCreate:function(){const[t,a]=(0,mt.useState)(!1),[s,r]=(0,mt.useState)(null),[o,n]=(0,mt.useState)(null);return{mutate:(0,mt.useCallback)(async t=>{a(!0);try{const a=await e.create(t);return n(a),r(null),a}catch(e){throw r(e),_t.log(e,"useCreate"),e}finally{a(!1)}},[]),isLoading:t,error:s,data:o}},useUpdate:function(){const[t,a]=(0,mt.useState)(!1),[s,r]=(0,mt.useState)(null),[o,n]=(0,mt.useState)(null);return{mutate:(0,mt.useCallback)(async t=>{a(!0);try{const a=await e.update(t);return n(a),r(null),a}catch(e){throw r(e),_t.log(e,"useUpdate"),e}finally{a(!1)}},[]),isLoading:t,error:s,data:o}},useDelete:function(){const[t,a]=(0,mt.useState)(!1),[s,r]=(0,mt.useState)(null),[o,n]=(0,mt.useState)(!1);return{mutate:(0,mt.useCallback)(async t=>{a(!0);try{const a=await e.delete(t);return n(a),r(null),a}catch(e){throw r(e),_t.log(e,"useDelete"),e}finally{a(!1)}},[]),isLoading:t,error:s,success:o}},useFilterMatch:function(t){const[a,s]=(0,mt.useState)(null),[r,o]=(0,mt.useState)(null),[n,i]=(0,mt.useState)(!1),[c,u]=(0,mt.useState)(!0);return{data:a,error:r,isFetching:n,isLoading:c,refetch:(0,mt.useCallback)(async()=>{i(!0);try{const a=await e.filterMatch(t);s(a),o(null)}catch(e){o(e),_t.log(e,"useFilterMatch")}finally{i(!1),u(!1)}},[JSON.stringify(t)])}}}}(e)}var Ut=e=>({}),Pt=()=>{const e=new y,t=wt(e),a=Ut(e);return h(h({},t),a)},{useFetchById:Lt,useFetchList:At,useCreate:Mt,useUpdate:vt,useDelete:Bt,useFilterMatch:Rt}=Pt(),Tt=Pt,Et=e=>({}),St=()=>{const e=new v,t=wt(e),a=Et(e);return h(h({},t),a)},{useFetchById:$t,useFetchList:Ot,useCreate:kt,useUpdate:Nt,useDelete:jt,useFilterMatch:qt}=St(),zt=St,Ht=e=>({}),Jt=()=>{const e=new R,t=wt(e),a=Ht(e);return h(h({},t),a)},{useFetchById:Kt,useFetchList:Qt,useCreate:Vt,useUpdate:Wt,useDelete:Xt,useFilterMatch:Yt}=Jt(),Zt=Jt,ea=e=>({}),ta=()=>{const e=new O,t=wt(e),a=ea(e);return h(h({},t),a)},{useFetchById:aa,useFetchList:sa,useCreate:ra,useUpdate:oa,useDelete:na,useFilterMatch:ia}=ta(),ca=ta,ua=e=>({}),la=()=>{const e=new j,t=wt(e),a=ua(e);return h(h({},t),a)},{useFetchById:da,useFetchList:ha,useCreate:pa,useUpdate:fa,useDelete:Ia,useFilterMatch:Fa}=la(),ga=la,xa=e=>({}),Ca=()=>{const e=new z,t=wt(e),a=xa(e);return h(h({},t),a)},{useFetchById:ma,useFetchList:Ga,useCreate:_a,useUpdate:ya,useDelete:Da,useFilterMatch:ba}=Ca(),wa=Ca,Ua=e=>({}),Pa=()=>{const e=new Z,t=wt(e),a=Ua(e);return h(h({},t),a)},{useFetchById:La,useFetchList:Aa,useCreate:Ma,useUpdate:va,useDelete:Ba,useFilterMatch:Ra}=Pa(),Ta=Pa,Ea=e=>({}),Sa=()=>{const e=new te,t=wt(e),a=Ea(e);return h(h({},t),a)},{useFetchById:$a,useFetchList:Oa,useCreate:ka,useUpdate:Na,useDelete:ja,useFilterMatch:qa}=Sa(),za=Sa,Ha=require("react"),Ja=e=>({useGetTree:()=>{const[t,a]=(0,Ha.useState)(null),[s,r]=(0,Ha.useState)(null),[o,n]=(0,Ha.useState)(!1);return{data:t,error:s,isFetching:o,fetchData:(0,Ha.useCallback)(async t=>{n(!0);try{const s=await e.tree(t);a(s),r(null)}catch(e){r(e),console.error("Error fetching dashboardGraficaElemento tree:",e)}finally{n(!1)}},[])}}}),Ka=()=>{const e=new se,t=wt(e),a=Ja(e);return h(h({},t),a)},{useFetchById:Qa,useFetchList:Va,useCreate:Wa,useUpdate:Xa,useDelete:Ya,useFilterMatch:Za}=Ka(),es=Ka,ts=e=>({}),as=()=>{const e=new oe,t=wt(e),a=ts(e);return h(h({},t),a)},{useFetchById:ss,useFetchList:rs,useCreate:os,useUpdate:ns,useDelete:is,useFilterMatch:cs}=as(),us=as,ls=e=>({}),ds=()=>{const e=new ie,t=wt(e),a=ls(e);return h(h({},t),a)},{useFetchById:hs,useFetchList:ps,useCreate:fs,useUpdate:Is,useDelete:Fs,useFilterMatch:gs}=ds(),xs=ds,Cs=e=>({}),ms=()=>{const e=new ue,t=wt(e),a=Cs(e);return h(h({},t),a)},{useFetchById:Gs,useFetchList:_s,useCreate:ys,useUpdate:Ds,useDelete:bs,useFilterMatch:ws}=ms(),Us=ms,Ps=e=>({}),Ls=()=>{const e=new de,t=wt(e),a=Ps(e);return h(h({},t),a)},{useFetchById:As,useFetchList:Ms,useCreate:vs,useUpdate:Bs,useDelete:Rs,useFilterMatch:Ts}=Ls(),Es=Ls,Ss=e=>({}),$s=()=>{const e=new pe,t=wt(e),a=Ss(e);return h(h({},t),a)},{useFetchById:Os,useFetchList:ks,useCreate:Ns,useUpdate:js,useDelete:qs,useFilterMatch:zs}=$s(),Hs=$s,Js=e=>({}),Ks=()=>{const e=new Ie,t=wt(e),a=Js(e);return h(h({},t),a)},{useFetchById:Qs,useFetchList:Vs,useCreate:Ws,useUpdate:Xs,useDelete:Ys,useFilterMatch:Zs}=Ks(),er=Ks,tr=e=>({}),ar=()=>{const e=new me,t=wt(e),a=tr(e);return h(h({},t),a)},{useFetchById:sr,useFetchList:rr,useCreate:or,useUpdate:nr,useDelete:ir,useFilterMatch:cr}=ar(),ur=ar,lr=e=>({}),dr=()=>{const e=new _e,t=wt(e),a=lr(e);return h(h({},t),a)},{useFetchById:hr,useFetchList:pr,useCreate:fr,useUpdate:Ir,useDelete:Fr,useFilterMatch:gr}=dr(),xr=dr,Cr=e=>({}),mr=()=>{const e=new be,t=wt(e),a=Cr(e);return h(h({},t),a)},{useFetchById:Gr,useFetchList:_r,useCreate:yr,useUpdate:Dr,useDelete:br,useFilterMatch:wr}=mr(),Ur=mr,Pr=e=>({}),Lr=()=>{const e=new Ue,t=wt(e),a=Pr(e);return h(h({},t),a)},{useFetchById:Ar,useFetchList:Mr,useCreate:vr,useUpdate:Br,useDelete:Rr,useFilterMatch:Tr}=Lr(),Er=Lr,Sr=e=>({}),$r=()=>{const e=new Le,t=wt(e),a=Sr(e);return h(h({},t),a)},{useFetchById:Or,useFetchList:kr,useCreate:Nr,useUpdate:jr,useDelete:qr,useFilterMatch:zr}=$r(),Hr=$r,Jr=e=>({}),Kr=()=>{const e=new Me,t=wt(e),a=Jr(e);return h(h({},t),a)},{useFetchById:Qr,useFetchList:Vr,useCreate:Wr,useUpdate:Xr,useDelete:Yr,useFilterMatch:Zr}=Kr(),eo=Kr,to=e=>({}),ao=()=>{const e=new Re,t=wt(e),a=to(e);return h(h({},t),a)},{useFetchById:so,useFetchList:ro,useCreate:oo,useUpdate:no,useDelete:io,useFilterMatch:co}=ao(),uo=ao,lo=e=>({}),ho=()=>{const e=new Ee,t=wt(e),a=lo(e);return h(h({},t),a)},{useFetchById:po,useFetchList:fo,useCreate:Io,useUpdate:Fo,useDelete:go,useFilterMatch:xo}=ho(),Co=ho,mo=e=>({}),Go=()=>{const e=new $e,t=wt(e),a=mo(e);return h(h({},t),a)},{useFetchById:_o,useFetchList:yo,useCreate:Do,useUpdate:bo,useDelete:wo,useFilterMatch:Uo}=Go(),Po=Go,Lo=e=>({}),Ao=()=>{const e=new at,t=wt(e),a=Lo(e);return h(h({},t),a)},{useFetchById:Mo,useFetchList:vo,useCreate:Bo,useUpdate:Ro,useDelete:To,useFilterMatch:Eo}=Ao(),So=Ao,$o=e=>({}),Oo=()=>{const e=new rt,t=wt(e),a=$o(e);return h(h({},t),a)},{useFetchById:ko,useFetchList:No,useCreate:jo,useUpdate:qo,useDelete:zo,useFilterMatch:Ho}=Oo(),Jo=Oo,Ko=e=>({}),Qo=()=>{const e=new ct,t=wt(e),a=Ko(e);return h(h({},t),a)},{useFetchById:Vo,useFetchList:Wo,useCreate:Xo,useUpdate:Yo,useDelete:Zo,useFilterMatch:en}=Qo(),tn=Qo,an=e=>({}),sn=()=>{const e=new dt,t=wt(e),a=an(e);return h(h({},t),a)},{useFetchById:rn,useFetchList:on,useCreate:nn,useUpdate:cn,useDelete:un,useFilterMatch:ln}=sn(),dn=sn,hn=e=>({}),pn=()=>{const e=new pt,t=wt(e),a=hn(e);return h(h({},t),a)},{useFetchById:fn,useFetchList:In,useCreate:Fn,useUpdate:gn,useDelete:xn,useFilterMatch:Cn}=pn(),mn=pn,Gn=e=>({}),_n=()=>{const e=new gt,t=wt(e),a=Gn(e);return h(h({},t),a)},{useFetchById:yn,useFetchList:Dn,useCreate:bn,useUpdate:wn,useDelete:Un,useFilterMatch:Pn}=_n(),Ln=_n,An=Tt(),Mn=An.useFetchById,vn=An.useFetchList,Bn=An.useCreate,Rn=An.useUpdate,Tn=An.useDelete,En=An.useFilterMatch,Sn=zt(),$n=Sn.useFetchById,On=Sn.useFetchList,kn=Sn.useCreate,Nn=Sn.useUpdate,jn=Sn.useDelete,qn=Sn.useFilterMatch,zn=Zt(),Hn=zn.useFetchById,Jn=zn.useFetchList,Kn=zn.useCreate,Qn=zn.useUpdate,Vn=zn.useDelete,Wn=zn.useFilterMatch,Xn=ca(),Yn=Xn.useFetchById,Zn=Xn.useFetchList,ei=Xn.useCreate,ti=Xn.useUpdate,ai=Xn.useDelete,si=Xn.useFilterMatch,ri=ga(),oi=ri.useFetchById,ni=ri.useFetchList,ii=ri.useCreate,ci=ri.useUpdate,ui=ri.useDelete,li=ri.useFilterMatch,di=wa(),hi=di.useFetchById,pi=di.useFetchList,fi=di.useCreate,Ii=di.useUpdate,Fi=di.useDelete,gi=di.useFilterMatch,xi=Ta(),Ci=xi.useFetchById,mi=xi.useFetchList,Gi=xi.useCreate,_i=xi.useUpdate,yi=xi.useDelete,Di=xi.useFilterMatch,bi=za(),wi=bi.useFetchById,Ui=bi.useFetchList,Pi=bi.useCreate,Li=bi.useUpdate,Ai=bi.useDelete,Mi=bi.useFilterMatch,vi=es(),Bi=vi.useFetchById,Ri=vi.useFetchList,Ti=vi.useCreate,Ei=vi.useUpdate,Si=vi.useDelete,$i=vi.useFilterMatch,Oi=vi.useGetTree,ki=us(),Ni=ki.useFetchById,ji=ki.useFetchList,qi=ki.useCreate,zi=ki.useUpdate,Hi=ki.useDelete,Ji=ki.useFilterMatch,Ki=xs(),Qi=Ki.useFetchById,Vi=Ki.useFetchList,Wi=Ki.useCreate,Xi=Ki.useUpdate,Yi=Ki.useDelete,Zi=Ki.useFilterMatch,ec=Us(),tc=ec.useFetchById,ac=ec.useFetchList,sc=ec.useCreate,rc=ec.useUpdate,oc=ec.useDelete,nc=ec.useFilterMatch,ic=Es(),cc=ic.useFetchById,uc=ic.useFetchList,lc=ic.useCreate,dc=ic.useUpdate,hc=ic.useDelete,pc=ic.useFilterMatch,fc=Hs(),Ic=fc.useFetchById,Fc=fc.useFetchList,gc=fc.useCreate,xc=fc.useUpdate,Cc=fc.useDelete,mc=fc.useFilterMatch,Gc=er(),_c=Gc.useFetchById,yc=Gc.useFetchList,Dc=Gc.useCreate,bc=Gc.useUpdate,wc=Gc.useDelete,Uc=Gc.useFilterMatch,Pc=ur(),Lc=Pc.useFetchById,Ac=Pc.useFetchList,Mc=Pc.useCreate,vc=Pc.useUpdate,Bc=Pc.useDelete,Rc=Pc.useFilterMatch,Tc=xr(),Ec=Tc.useFetchById,Sc=Tc.useFetchList,$c=Tc.useCreate,Oc=Tc.useUpdate,kc=Tc.useDelete,Nc=Tc.useFilterMatch,jc=Ur(),qc=jc.useFetchById,zc=jc.useFetchList,Hc=jc.useCreate,Jc=jc.useUpdate,Kc=jc.useDelete,Qc=jc.useFilterMatch,Vc=Er(),Wc=Vc.useFetchById,Xc=Vc.useFetchList,Yc=Vc.useCreate,Zc=Vc.useUpdate,eu=Vc.useDelete,tu=Vc.useFilterMatch,au=Hr(),su=au.useFetchById,ru=au.useFetchList,ou=au.useCreate,nu=au.useUpdate,iu=au.useDelete,cu=au.useFilterMatch,uu=eo(),lu=uu.useFetchById,du=uu.useFetchList,hu=uu.useCreate,pu=uu.useUpdate,fu=uu.useDelete,Iu=uu.useFilterMatch,Fu=uo(),gu=Fu.useFetchById,xu=Fu.useFetchList,Cu=Fu.useCreate,mu=Fu.useUpdate,Gu=Fu.useDelete,_u=Fu.useFilterMatch,yu=Co(),Du=yu.useFetchById,bu=yu.useFetchList,wu=yu.useCreate,Uu=yu.useUpdate,Pu=yu.useDelete,Lu=yu.useFilterMatch,Au=Po(),Mu=Au.useFetchById,vu=Au.useFetchList,Bu=Au.useCreate,Ru=Au.useUpdate,Tu=Au.useDelete,Eu=Au.useFilterMatch,Su=So(),$u=Su.useFetchById,Ou=Su.useFetchList,ku=Su.useCreate,Nu=Su.useUpdate,ju=Su.useDelete,qu=Su.useFilterMatch,zu=Jo(),Hu=zu.useFetchById,Ju=zu.useFetchList,Ku=zu.useCreate,Qu=zu.useUpdate,Vu=zu.useDelete,Wu=zu.useFilterMatch,Xu=tn(),Yu=Xu.useFetchById,Zu=Xu.useFetchList,el=Xu.useCreate,tl=Xu.useUpdate,al=Xu.useDelete,sl=Xu.useFilterMatch,rl=dn(),ol=rl.useFetchById,nl=rl.useFetchList,il=rl.useCreate,cl=rl.useUpdate,ul=rl.useDelete,ll=rl.useFilterMatch,dl=mn(),hl=dl.useFetchById,pl=dl.useFetchList,fl=dl.useCreate,Il=dl.useUpdate,Fl=dl.useDelete,gl=dl.useFilterMatch,xl=Ln(),Cl=xl.useFetchById,ml=xl.useFetchList,Gl=xl.useCreate,_l=xl.useUpdate,yl=xl.useDelete,Dl=xl.useFilterMatch;//# sourceMappingURL=index.js.map