biblio-react 2.0.0-alpha133 → 2.0.0-alpha134

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.
@@ -1,2 +1,2 @@
1
- import e,{forwardRef as t,createElement as o,createContext as n,useContext as i,useState as r,useMemo as a,useCallback as l,Fragment as s,useEffect as c,Children as d,cloneElement as u,isValidElement as m,useRef as p,memo as g}from"react";import f from"@mui/icons-material/Lock";import h from"@mui/icons-material/VpnLock";import{MenuItem as b,ListItemIcon as v,ListItemText as y,useMediaQuery as C,Typography as x,Box as w,alpha as k,createTheme as T,StyledEngineProvider as O,Stack as S,Dialog as R,DialogTitle as E,DialogContent as P,DialogActions as j,Tooltip as _,IconButton as N,ThemeProvider as F,Paper as I,CardContent as M,CircularProgress as L,Collapse as D,List as B,Divider as A,Button as V}from"@mui/material";import{useTranslate as q,useUserMenu as z,useResourceDefinitions as $,AppBar as W,UserMenu as H,Logout as G,useDataProvider as U,useListContext as J,useNotify as Y,useRedirect as Q,useRefresh as Z,useResourceContext as K,useUnselectAll as X,NumberField as ee,DateField as te,TextField as oe,ReferenceField as ne,Button as ie,useRecordContext as re,useInput as ae,useGetList as le,useSafeSetState as se,Confirm as ce,Form as de,SaveButton as ue,useCreatePath as me,useResourceDefinition as pe,DatagridRoot as ge,DatagridClasses as fe,BulkActionsToolbar as he,SimpleList as be,useGetOne as ve,TopToolbar as ye,ListButton as Ce,ShowButton as xe,required as we,minValue as ke,useSaveContext as Te,Create as Oe,useDelete as Se,useEditController as Re,Edit as Ee,SimpleForm as Pe,useSidebarState as je,MenuItemLink as _e,Menu as Ne,DashboardMenuItem as Fe,Layout as Ie,FilterContext as Me,sanitizeListRestProps as Le,FilterButton as De,CreateButton as Be,ExportButton as Ae,useLogin as Ve,TextInput as qe,PasswordInput as ze,FieldTitle as $e,useShowController as We,Show as He,FormTab as Ge,getTabbedFormTabFullPath as Ue,TabbedFormTabs as Je,Toolbar as Ye,defaultTheme as Qe,BooleanField as Ze,ImageInput as Ke,ImageField as Xe,FileInput as et,FileField as tt,BooleanInput as ot,ReferenceInput as nt,useChoicesContext as it,AutocompleteInput as rt,SelectInput as at,ReferenceArrayInput as lt,SelectArrayInput as st,RadioButtonGroupInput as ct,useRecordSelection as dt,List as ut,Datagrid as mt,NumberInput as pt,DateInput as gt,DateTimeInput as ft}from"react-admin";import{Link as ht,useLocation as bt,matchPath as vt,useResolvedPath as yt,Routes as Ct,Route as xt}from"react-router-dom";import{styled as wt,ThemeProvider as kt,alpha as Tt}from"@mui/material/styles";import Ot,{string as St,func as Rt,any as Et,bool as Pt}from"prop-types";import jt from"@mui/icons-material/Add";import _t from"@mui/icons-material/Cancel";import Nt from"@mui/icons-material/Delete";import Ft from"@mui/icons-material/Edit";import It from"@mui/material/Dialog";import Mt from"@mui/material/DialogActions";import Lt from"@mui/material/DialogContent";import Dt from"@mui/material/DialogContentText";import Bt from"@mui/material/DialogTitle";import At from"@mui/material/Paper";import{esES as Vt,DataGridPremium as qt,useGridApiContext as zt,useGridApiRef as $t,useKeepGroupedColumnsHidden as Wt}from"@mui/x-data-grid-premium";import{useFormContext as Ht,useFormState as Gt}from"react-hook-form";import{useDispatch as Ut,useSelector as Jt}from"react-redux";import{useMutation as Yt}from"react-query";import Qt from"@mui/icons-material/Settings";import{GridActionsCellItem as Zt}from"@mui/x-data-grid";import Kt from"@mui/icons-material/Create";import Xt from"@mui/material/Divider";import eo from"@mui/material/Tab";import to from"@mui/material/Tabs";import oo from"@mui/icons-material/ChevronLeft";import no from"@mui/material/Typography";import{isAfter as io}from"date-fns";import ro from"date-fns/locale/en-US";import ao from"date-fns/locale/es";import lo from"@mui/material/IconButton";import so from"@mui/material/Tooltip";import co from"@mui/material/Box";import uo from"@mui/icons-material/ExpandMore";import mo from"@mui/material/Avatar";import po from"@mui/material/Button";import go from"@mui/material/Card";import fo from"@mui/material/CardActions";import ho from"@mui/material/CircularProgress";import bo from"@mui/material/Menu";import vo from"@mui/material/MenuItem";import yo from"@mui/icons-material/RemoveRedEye";import Co from"ra-language-english";import xo from"@blackbox-vision/ra-language-spanish";import wo from"@mui/material/Stack";import{PhotoCamera as ko}from"@mui/icons-material";import To from"@mui/icons-material/AddAPhoto";import Oo from"@mui/icons-material/Check";import So from"@mui/icons-material/RemoveCircleOutline";import Ro from"@mui/icons-material/Search";import Eo from"@mui/icons-material/CheckCircle";import Po from"@mui/icons-material/ErrorOutline";import jo from"react-draggable";import{TreeView as _o}from"devextreme-react";const No=t((e,t)=>{const n=q(),{onClose:i}=z(),r=$(),a=r.form_59;return[r.form_275?o(b,Object.assign({component:ht,ref:t},e,{key:"/form_275",to:"/form_275",onClick:i}),o(v,null,o(f,null)),o(y,null,n("pos.change_pin"))):null,a?o(b,Object.assign({component:ht,ref:t},e,{key:"/form_59",to:"/form_59",onClick:i}),o(v,null,o(h,null)),o(y,null,n("pos.change_password"))):null]}),Fo=()=>o(H,null,o(No,null),o(G,null)),Io=e=>{const t=C(e=>e.breakpoints.up("sm"));return o(W,Object.assign({},e,{color:"secondary",userMenu:o(Fo,null)}),o(x,{variant:"h6",color:"inherit",sx:{flex:1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},id:"react-admin-title"}),t&&o(w,{component:"span",sx:{flex:1}}))},Mo=n(),Lo=({children:e})=>{const[t,n]=r(!1),i=a(()=>({open:t,show:()=>n(!0),hide:()=>n(!1)}),[t]);return o(Mo.Provider,{value:i},e)},Do=()=>i(Mo),Bo=n(),Ao=({children:e})=>{const[t,n]=r(!1),[i,l]=r({}),s=a(()=>({open:t,props:i,show:e=>{l(e),n(!0)},hide:()=>n(!1)}),[t,i]);return o(Bo.Provider,{value:s},e)},Vo=()=>i(Bo),qo=(e,t,o,n)=>({type:"RELOAD_CB",payload:{id:e,method:t,params:o,callback:n}}),zo=(e,t)=>({type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:t}}),$o=(e,t)=>({type:"HIDE_INPUT",payload:{id:e,hidden:t}}),Wo=(e,t)=>({type:"DISABLE_INPUT",payload:{id:e,disabled:t}}),Ho=(e,t)=>({type:"REQUIRE_INPUT",payload:{id:e,required:t}}),Go=(e,t)=>({type:"ERROR_INPUT",payload:{id:e,error:t}}),Uo=()=>{const e=Ut();return l((t,o,n,i)=>{e(qo(t,o,n,i))},[e])},Jo=()=>{const e=Ut();return l((t,o)=>{e($o(t,o))},[e])},Yo=()=>{const e=Ut();return l((t,o)=>{e(Wo(t,o))},[e])},Qo=()=>{const e=Ut();return l((t,o)=>{e(Ho(t,o))},[e])},Zo=()=>{const e=Ut();return l((t,o)=>{e(Go(t,o))},[e])},Ko=(e,t)=>{const o=U(),{mutateAsync:n,isLoading:i}=Yt(t=>{const{method:n,params:i}=t;return o.getJson(e,{method:n,params:i})},t);return{mutateAsync:n,isLoading:i}},Xo=e=>{const{mutateAsync:t,isLoading:o}=Ko(e);return[l((e,o,n)=>t({method:e,params:o},{onSuccess:n,onError:n}),[]),o]},en=e=>({}),tn=e=>{const t=J(e),o=Y(),n=Q(),i=Z(),r=K(e),a=X(r),l=Vo(),s=q(),[c]=Xo(r);return{ajax:c,data:t,notify:o,redirect:n,refresh:i,refetch:t.refetch,unselectAll:a,asistente:l,translate:s}},on=e=>{const t=Uo(),o=Jo(),n=Yo(),i=Qo(),r=Zo(),a=Do(),l=Y(),s=Q(),c=K(e),[d]=Xo(c);return{ajax:d,notify:l,redirect:s,recargarComboBox:t,progress:a,setHidden:o,setDisable:n,setRequire:i,setError:r,etrs:e.etrs||{}}},nn=e=>{const t=Uo(),o=Jo(),n=Yo(),i=Qo(),r=Zo(),a=Do(),s=Y(),c=Q(),d=Ht(),u=K(e),[m]=Xo(u),p=e.etrs||{},g=e.asisEtr||{},{trigger:f}=d;return{form:d,ajax:m,notify:s,redirect:c,recargarComboBox:t,progress:a,setHidden:l((e,t)=>{o(e,t),setTimeout(()=>{f(e)})},[o,f]),setDisable:l((e,t)=>{n(e,t),setTimeout(()=>{f(e)})},[n,f]),setRequire:l((e,t)=>{i(e,t),setTimeout(()=>{f(e)})},[i,f]),setError:l((e,t)=>{r(e,t),setTimeout(()=>{f(e)})},[r,f]),etrs:p,asisEtr:g}},rn=n({}),an=n(void 0),ln=e=>{const{estado:t,isLoading:o,fichaProps:n={}}=i(rn),{[e.source]:r={}}=n,{hidden:a=!1,...l}=e,{hidden:s,useContenido:c=en,...d}=r,u=void 0!==s?s:a,m=c({...l,estado:t,hidden:u,isLoading:o,...d}),{hidden:p,...g}=m;if(void 0===m)throw new Error(`useContenido está devolviendo undefined para el contenido ${e.source}\n Asegúrese de incluir una instrucción return al final de la función`);return{propsContenido:{...l,...d,...g},hidden:void 0!==p?p:u}},sn=e=>{const{tipo:t,...n}=e,{propsContenido:i,hidden:r}=ln(n),a={...i};return!r&&("N"===t||"D"===t?o(ee,a):"F"===t?o(te,a):"Z"===t?o(te,Object.assign({},a,{showTime:!0})):o(oe,a))},cn=(e,t,n)=>i=>o(ne,{reference:n,source:t,queryOptions:{meta:{etr:e}},record:{[t]:i.row[t]}},o(sn,{source:"etiqueta"})),dn=e=>{const t={...e};return delete t.id,t},un=e=>{const{apiRef:t,source:o,enviarTodo:n}=e;return l((e,i)=>{const r=dn(e),a=t.current.getRowsCount()+1;t.current.updateRows([{...r,id:a}]);const l=n?Array.from(t.current.getRowModels().values(),e=>({...e,claveFila:"",estado:"N"}))||[]:i.getValues()[o]||[];n||l.push({...r,claveFila:"",estado:"N"}),i.setValue(o,l,{shouldDirty:!0})},[t,o])},mn=e=>{const{apiRef:t,source:o,enviarTodo:n}=e;return l((e,i,r)=>{var a,l;const s="number"==typeof e?"N":"M",c=dn(i);t.current.updateRows([{...c,id:e}]);const d=n?Array.from(t.current.getRowModels().values(),e=>({...e,estado:s}))||[]:r.getValues()[o]||[];let u=d.findIndex(t=>t.id===e);u=-1===u?d.length:u,d[u]={...c,claveFila:"N"===(null===(a=d[u])||void 0===a?void 0:a.estado)?"":e,estado:"N"===(null===(l=d[u])||void 0===l?void 0:l.estado)?"N":"M"},r.setValue(o,d,{shouldDirty:!0})},[t,o])},pn=e=>{const{apiRef:t,source:o,enviarTodo:n}=e;return l((e,i)=>{const r=t.current.getRowModels().get(e);t.current.updateRows([{id:e,_action:"delete"}]);const a=n?Array.from(t.current.getRowModels().values(),e=>({...e,estado:"B"}))||[]:i.getValues()[o]||[];let l=a.findIndex(t=>t.claveFila===e);l=-1===l?a.length:l,a[l]={...r,estado:"B",claveFila:e},"number"==typeof e&&a.splice(l,1),i.setValue(o,a,{shouldDirty:!0})},[t,o])},gn=e=>{const{[e.source]:t}=e.useFormulario(),o={...e,enviarTodo:!(null==t||!t.enviarTodo)};return{addRow:un(o),editRow:mn(o),deleteRow:pn(o),clear:t=>{e.apiRef.current.setRows([]),t.setValue(e.source,"")},api:e.apiRef}},fn=wt("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===e.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#fff"}})),hn=()=>o(fn,null,o("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false"},o("g",{fill:"none",fillRule:"evenodd"},o("g",{transform:"translate(24 31.67)"},o("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),o("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),o("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),o("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),o("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),o("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)"},o("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),o("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})))),o(w,{sx:{mt:1}},"No hay registros")),bn=wt(ie,{name:"EtrDeleteButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({color:e.palette.primary.main,"&:hover":{backgroundColor:k(e.palette.primary.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}})),vn={},yn=e=>{const t=Ht();return o(an.Provider,{value:{form:t}},e.children)},Cn=e=>o(It,{open:e.open,onClose:e.onClose,fullWidth:!0},o(Bt,null,`${e.labelEstado} ${e.label}`),o(Dt,{component:"span"},o(de,{mode:"onBlur",record:vn,resource:e.resource,onSubmit:e.onSubmit},o(yn,null,e.children))));Cn.propTypes={label:St,onClick:Rt,icon:Et,open:Pt,onClose:Rt,labelEstado:St,resource:Et,save:Rt,render:Rt};const xn=e=>{const{form:t,resource:n,estado:r,editors:a,recordPadre:l,camposClaveFila:m,setOpen:p,open:g}=e,{dirtyFields:f,isValid:h}=Gt(),{fichaProps:{[e.source]:b={},etrs:v}}=i(rn),y=i(an),{onAfterRenderAsistente:C}=b,x=nn({resource:n,etrs:v,asisEtr:y});return c(()=>{g&&"function"==typeof C&&C({...x,form:t})},[g]),o(s,null,o(Lt,null,o(S,{spacing:4},d.map(a,(e,t)=>u(e,{resource:n,estado:r,defaultValue:l[e.props.source]||"",fullWidth:!0,sx:{margin:0},disabled:"N"!==r&&-1!==m.indexOf(e.props.source),...b[e.props.source]})))),o(Mt,null,o(ue,{disabled:0===Object.keys(f).length||!h}),o(ie,{label:"ra.action.cancel",onClick:e=>{p(!1),e.stopPropagation()}},o(_t,null))))},wn=e=>{const{editors:t,record:n,camposClaveFila:i,label:r,source:a,enviarTodo:l}=e,[c,d]=se(!1),u=K(e),m=Ht(),p=zt(),g=un({apiRef:p,source:a,enviarTodo:l}),f=q()("ra.action.create");return o(s,null,o(ie,{onClick:e=>{d(!0),e.stopPropagation()}},o(jt,null)),o(Cn,{open:c,onClose:e=>{d(!1),e.stopPropagation()},labelEstado:f,label:r,resource:u,onSubmit:(e,t)=>{g(e,m),d(!1)}},o(xn,{source:a,form:m,resource:u,estado:"N",editors:t,recordPadre:n||{},camposClaveFila:i,open:c,setOpen:()=>{d(!1)}})))},kn=e=>{const{editors:t,camposClaveFila:n,resource:i,label:r,source:a,row:l,enviarTodo:c}=e,d=q(),[u,m]=se(!1),p=zt(),g=Ht(),f=mn({apiRef:p,source:a,enviarTodo:c}),h=d("ra.action.edit");return o(s,null,o(ie,{onClick:e=>{m(!0),e.stopPropagation()}},o(Ft,null)),o(Cn,{open:u,onClose:e=>{m(!1),e.stopPropagation()},labelEstado:h,label:r,resource:i,onSubmit:(e,t)=>{f(l.id,e,g),m(!1)}},o(xn,{source:a,form:g,resource:i,estado:"M",editors:t,recordPadre:l,camposClaveFila:n,open:u,setOpen:()=>{m(!1)}})))},Tn=e=>{const{confirmTitle:t="ra.message.delete_title",confirmContent:n="ra.message.delete_content",row:i,source:r,enviarTodo:a}=e,[l,c]=se(!1),d=zt(),u=Ht(),m=pn({apiRef:d,source:r,enviarTodo:a});return o(s,null,o(bn,{key:"button",onClick:e=>{c(!0),e.stopPropagation()}},o(Nt,null)),o(ce,{isOpen:l,title:t,content:n,onConfirm:e=>{m(i.id,u)},onClose:e=>{c(!1),e.stopPropagation()}}))},On=T({},Vt),Sn=e=>{const{filterBy:t="",claves:n,sortModel:l,columns:c,reference:d,allowAdd:u=!0,allowRemove:m=!0,enableLoad:p=!0,apiRef:g,...f}=e,[h,b]=r([]),v=re(e),{field:y}=ae({defaultValue:"",...e}),{isLoading:C,fichaProps:{[f.source]:x}}=i(rn),{enviarTodo:w=!1}=x||{},[k,T]=r(l),[{field:S,sort:R}]=l;let E={};v&&t.split(",").forEach(e=>{e&&(E[e]=[{type:"string",comparison:"eq",value:v[e],field:e}])});const{isLoading:P}=le(d,{pagination:{page:1,perPage:200},sort:{field:S,order:R},filter:E},{enabled:p&&!C,onSuccess:e=>{b((null==e?void 0:e.data)||[])}}),j=[...c,{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:e=>o(kn,Object.assign({},f,{enviarTodo:w,camposClaveFila:n,row:e.row}))}];u&&j.unshift({field:"BTN",headerName:"",sortable:!1,renderHeader:e=>o(wn,Object.assign({},f,{enviarTodo:w,camposClaveFila:n}))}),m&&j.push({field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:e=>o(Tn,Object.assign({},f,{enviarTodo:w,camposClaveFila:n,row:e.row}))});const _=a(()=>j,[JSON.stringify(j)]);return o(At,{sx:{width:"100%",height:"40vh",borderRadius:0,marginTop:1}},o(O,{injectFirst:!0},o(kt,{theme:On},o(s,null,o(qt,Object.assign({apiRef:g,loading:P||C,sx:{"& .MuiDataGrid-columnsContainer":{backgroundColor:e=>"light"===e.palette.mode?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,rows:h,columns:_,sortModel:k,onSortModelChange:e=>T(e),sortable:!1,resizable:!1,disableReorder:!0,disableExport:!0,filterable:!1,disableColumnMenu:!0,slots:{noRowsOverlay:hn}},f)),o("input",Object.assign({type:"hidden"},y))))))},Rn=T({},Vt),En=e=>{const{filterBy:t="",sortModel:n,columns:l,reference:s,enableLoad:c=!0,initialState:d,...u}=e,{isLoading:m}=i(rn),p=re(),[g,f]=r(n),[{field:h,sort:b}]=n,v=a(()=>[...l],[JSON.stringify(l)]);let y={};p&&t.split(",").forEach(e=>{e&&(y[e]=[{type:"string",comparison:"eq",value:p[e],field:e}])});const{estado:C,isLoading:x,fichaProps:w={}}=i(rn),k=nn(e),{[e.source]:T={}}=w,{useContenido:S=en,restInitialProps:R}=T,{data:E=[],isLoading:P,refetch:j}=le(s,{pagination:{page:1,perPage:200},sort:{field:h,order:b},filter:y},{enabled:c&&!m}),_=$t(),N=Wt({apiRef:_,initialState:d});return S({...u,estado:C,hidden:e.hidden,isLoading:x,utils:k,...R,refetch:j,apiRef:_}),o(At,{sx:{width:"100%",height:"40vh",borderRadius:0,marginTop:1}},o(O,{injectFirst:!0},o(kt,{theme:Rn},o(qt,Object.assign({apiRef:_,rows:E,columns:v,loading:P||m,sx:{"& .MuiDataGrid-columnsContainer":{backgroundColor:e=>"light"===e.palette.mode?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,sortModel:g,onSortModelChange:e=>f(e),slots:{noRowsOverlay:hn},initialState:N},u)))))},Pn=e=>{const{isLoading:t}=e,n=K(e),i=Vo(),{open:r,hide:a,props:{title:l,controles:c,aceptar:d,tipo:u="form"}}=i;return o(R,{open:r,onClose:()=>a(),fullWidth:!0,maxWidth:"vista"===u?"lg":"sm"},o(E,{id:"draggable-dialog-title"},l),"form"===u?o(de,{resource:n,onSubmit:d},o(P,{dividers:!0},o(S,{spacing:2},c)),o(j,null,o(ie,{label:"ra.action.cancel",disabled:t,onClick:()=>a()},o(_t,null)),o(ue,{disabled:t}))):o(s,null,o(P,{dividers:!0},o(S,{spacing:2},c)),o(j,null,o(ie,{label:"ra.action.cancel",disabled:t,onClick:()=>a()},o(_t,null)))))},jn=e=>{const{alignIcon:t="left",children:n,className:i,disabled:r,label:a,color:l="primary",size:s="small",to:c,...d}=e,u=q(),m=a?u(a,{_:a}):void 0,p=_n(c);return a&&!r?o(_,{title:m},o(N,Object.assign({"aria-label":m,className:i,color:l,size:"large"},d,p),n)):o(N,Object.assign({className:i,color:l,disabled:r,size:"large"},d,p),n)};jn.propTypes={alignIcon:Ot.oneOf(["left","right"]),children:Ot.element,className:Ot.string,color:Ot.oneOfType([Ot.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),Ot.string]),disabled:Ot.bool,label:Ot.string,size:Ot.oneOf(["small","medium","large"])};const _n=e=>{if(null==e)return;if("string"==typeof e)return{to:e};const{redirect:t,replace:o,state:n,...i}=e;return{to:i,redirect:t,replace:o,state:n}},Nn=e=>e.stopPropagation(),Fn={true:{_scrollToTop:!0},false:{}},In=o(jt,null),Mn=e=>{const{icon:t=In,label:n="ra.action.create",scrollToTop:i=!0,...r}=e,a=K(e),l=re(e),s=me();return o(jn,Object.assign({component:ht,to:s({type:"create",resource:a}),state:{record:l,...Fn[String(i)]},label:n,onClick:Nn},r),t)},Ln=e=>e.stopPropagation(),Dn={true:{_scrollToTop:!0},false:{}},Bn=o(Kt,null),An=e=>{const{icon:t=Bn,label:n="ra.action.edit",scrollToTop:i=!0,...r}=e,a=K(e),l=re(e),s=me();return l?o(jn,Object.assign({component:ht,to:s({type:"edit",resource:a,id:l.id}),state:Dn[String(i)],label:n,onClick:Ln},r),t):null},Vn=(e,t)=>void 0===t||"function"==typeof t&&t(e),qn=T({},Vt),zn=new Map([["is","is"],["not","not"],["after","after"],["onOrAfter","onOrAfter"],["before","before"],["onOrBefore","onOrBefore"],["eq","="],["neq","!="],["gt",">"],["gte",">="],["lt","<"],["lte","<="],["contains","contains"],["equals","equals"],["sw","startsWith"],["ew","endsWith"],["isEmpty","isEmpty"],["isNotEmpty","isNotEmpty"],["isAnyOf","isAnyOf"]]),$n=new Map(Array.from(zn,e=>[e[1],e[0]])),Wn=e=>e.items.reduce((e,t)=>(void 0!==t.field&&t.operator&&($n.has(t.operator)?e[`${t.field}_${$n.get(t.operator)}`]=t.value:e[t.field]=t.value),e),{}),Hn=e=>{const{actionButtons:t=[],bulkActionButtons:n,sx:i,columns:r,isRowEditable:a,desktopSize:l=!1,hasEdit:c,initialState:d,convertFilterModelToFilterValues:u=Wn,claveNuevo:p,mobileColumns:g="",...f}=e,h=tn(e),b=q(),v=K(e),{data:y=[],isLoading:C,selectedIds:x,onSelect:k,displayedFilters:T,setFilters:O}=J(),S=$t(),R=Wt({apiRef:S,initialState:{...d,pinnedColumns:{right:["actions"]}}}),E=r.map((e,t)=>({...e,headerName:""!==e.headerName?b(`resources.${v}.fields.${e.field}`,{_:e.headerName}):e.headerName})),P=t.length>0||c?E.concat([{field:"actions",type:"actions",width:100,hideable:!1,getActions:e=>{const n=S.current.getRowNode(e.id);return e.row.id?[...c?[o(An,{record:e.row,disabled:!Vn(e.row,a)})]:[],...t.filter(e=>!!e).map(t=>{const{handler:n,...i}=t;return o(Zt,Object.assign({showInMenu:!0,onClick:t=>"function"==typeof n&&n({...h,record:e.row},i.key)},i))})]:-1!==n.children[0].indexOf(p+"=")?[o(Mn,{record:p?{[p]:n.children[0].split(p+"=")[1].replaceAll("[","").trim().split("AND")[0].trim()}:void 0})]:[]}}]):E,j=m(n);return o(s,null,o(Pn,{isLoading:C}),o(ge,{sx:i,className:fe.root},j?o(he,{selectedIds:x},n):null,o(w,{sx:{height:"70vh",width:"100%"},className:fe.tableWrapper},o(F,{theme:qn},o(qt,Object.assign({sx:{display:"grid",gridTemplateRows:"70vh 1fr auto"},slots:{noRowsOverlay:hn},columns:P,rows:y,apiRef:S,loading:C,hideFooterSelectedRowCount:!0,hideFooter:!0,disableMultipleRowSelection:!0,checkboxSelection:j,filterMode:"server",onFilterModelChange:e=>{O(u(e),T)},rowSelectionModel:x,onRowSelectionModelChange:e=>{C||(S.current.isRowSelected(e[0])?k([]):k(e))},isRowSelectable:e=>e.row.id,initialState:R},f))))))},Gn=e=>{const{sx:t,columns:n,actionButtons:i=[],hasEdit:r,isRowEditable:a,primaryText:l,mobileColumns:c=""}=e;let d=l;const u=tn(e),{isLoading:m}=J();if(!l){const e=c?c.split(",").map(e=>n.find(t=>t.field===e)):n;d=t=>o(I,{variant:"outlined",sx:{pt:2,pb:2,pl:2}},e.map(e=>{const{field:n,headerName:i,valueGetter:r,type:a="string",jsxMobile:l}=e;return o(w,null,l?l(t,e):"boolean"===a?o(w,{component:"span",sx:{color:r({value:t[n]})?"green":"red"}},i):t[n])}),o(w,null,i.filter(e=>!!e).map(e=>{const{key:n,handler:i,icon:r=o(Qt,null),...a}=e;return o(ie,Object.assign({onClick:e=>"function"==typeof i&&i({...u,record:t},n)},a),r)})))}return o(s,null,o(Pn,{isLoading:m}),o(be,{linkType:e=>!(!r||!Vn(e,a))&&"edit",primaryText:d,sx:t}))},Un=e=>{const t=C(e=>e.breakpoints.down("md")),{hasEdit:n}=pe(e);(e=>{const{onRenderGrilla:t,onLoadGrilla:o}=e,{isLoading:n}=J(),i=tn(e);c(()=>{t&&t(i)},[]),c(()=>{n||o&&o(i)},[n])})(e);const{desktopSize:i=!1}=e;return o(Ao,null,o(t&&!1===i?Gn:Hn,Object.assign({},e,{hasEdit:n})))},Jn=e=>{const{filterValues:t,setFilters:n,tabs:{ids:i,...r},GridComponent:a=Un,...l}=e,c=t.id;return o(s,null,o(to,{value:c,indicatorColor:"primary",onChange:(e,o)=>{n({...t,id:o})}},i.map(e=>o(eo,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e}))),o(Xt,null),o(a,Object.assign({},l,r[c])))},Yn=e=>{const{useFormulario:t=en,...o}=e;return{fichaProps:{...t(o),etrs:o.etrs}}},Qn=(e,t)=>ve(e,{id:"-1"},t),Zn=e=>e.split("_")[1],Kn=/^\d{2}\/\d{2}\/\d{4}$/,Xn=e=>{if(!(e instanceof Date)||isNaN(e.getDate()))return"";const t=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),n=e.getDate().toString();return`${t}-${("00"+o).slice(-2)}-${("00"+n).slice(-2)}`},ei=e=>{if(null==e||""===e)return"";if(e instanceof Date)return Xn(e);if(Kn.test(e)){const t=e.split("/");return t[2]+"-"+t[1]+"-"+t[0]}return Xn(new Date(e))},ti=e=>{if(!e)return"";const t=e.split("-");return t[2]+"/"+t[1]+"/"+t[0]},oi=/^\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}$/,ni=e=>{if(null==e||""===e)return"";if(e instanceof Date)return Xn(e);if(oi.test(e)){const t=e.split(" "),o=t[0].split("/");return o[2]+"-"+o[1]+"-"+o[0]+" "+t[1]}return Xn(new Date(e))},ii=e=>{if(!e)return"";const t=e.split("T"),o=t[0].split("-");return o[2]+"/"+o[1]+"/"+o[0]+" "+t[1]},ri=e=>{if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf(":")){const t=e.split(":");let o=new Date;return o.setHours(t[0]),o.setMinutes(t[1]),o.toString()}{const t=/(\d{2}):(\d{2})/.exec(e);if(null===t)return;let o=new Date;return o.setHours(t[0]),o.setMinutes(t[1]),o.toString()}},ai=(e,t)=>e?e.split(" ")[4].substring(0,5):"",li=e=>{const{source:t}=e,n=Jt(e=>{const o=e.configInputs?e.configInputs.filter(e=>e.id===t):[];return o[0]?o[0]:null}),{hidden:i}=n||{};return!i&&o(no,{variant:"h6",gutterBottom:!0,id:e.source},e.children)},si=({children:e,className:t,data:n,hasShow:i,hasList:r=!0,...a})=>o(ye,Object.assign({className:t},(({...e})=>e)(a)),e,r&&o(Ce,{label:"ra.action.back",icon:o(oo,null)}),i&&o(xe,{record:n})),ci=we(),di=[ci,ke(1)],ui={inputFormat:"dd/MM/yyyy"},mi=e=>(t,o)=>{const n=o[e];if(t&&n){const e=new Date(n.split("/").reverse().join("/")),o=new Date(t.split("/").reverse().join("/"));if(io(e,o))return{message:"validation.greater_or_equal",args:{menor:n}}}},pi=(e="es")=>({locale:"en"===e?ro:ao}),gi=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],fi=(e,t)=>{const o=document.createElement("a");o.style.display="none",document.body.appendChild(o),o.setAttribute("href",e),o.setAttribute("download",t),o.click()},hi=e=>{if(!e)return"";const[t,o,n]=e.split("/").map(Number);return new Date(n,o-1,t)},bi=e=>{if(!e)return"";const[t,o]=e.split(" "),[n,i,r]=t.split("/").map(Number),[a,l]=o.split(":").map(Number);return new Date(r,i-1,n,a,l)},vi=e=>e?`${String(e.getDate()).padStart(2,"0")}/${String(e.getMonth()+1).padStart(2,"0")}/${String(e.getFullYear())}`:"",yi=e=>e.toLocaleString("es",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(",",""),Ci=(e,t)=>{const o=K(),{data:n,isLoading:i,error:r}=ve("cb_"+Zn(o)+"_"+e,{id:t});return i||r?"":(null==n?void 0:n.etiqueta)||""},xi={form:"FormEtriek-form",tab:"FormEtriek-tab",contenido:"FormEtriek-contenido"},wi=e=>({["& ."+xi.form]:{maxHeight:"70vh",overflow:"auto"},["& ."+xi.tab]:{display:"block",maxHeight:"65vh",overflow:"auto"},["& ."+xi.contenido]:{[e.breakpoints.up("xs")]:{width:"100%"},[e.breakpoints.up("md")]:{width:"12vw","&.MuiAutocomplete-root":{width:"16vw"}}}}),ki=()=>{},Ti=e=>{const{fichaProps:{onBeforeSubmitFicha:t}}=i(rn),o=on(e),n=Y(),{save:r}=Te(),a=l(async e=>{const i=t&&await t({form:{getValues:()=>e},...o},"N");return"string"==typeof i?void n(i,{type:"error"}):void 0===i||i?r(e):void 0},[t,n,ki,r]);return"function"==typeof t?a:void 0},Oi=e=>{const{useFormulario:t=en,enableLoad:n=!0,...i}=e,r=K(e),{data:l,isLoading:s}=Qn(r,{enabled:n}),{fichaProps:c}=Yn(e),d=a(()=>({estado:"N",initialValues:l,isLoading:s,fichaProps:c}),[l,s,c]);return o(Lo,null,o(rn.Provider,{value:d},o(Oe,Object.assign({redirect:"list"},i,null==c?void 0:c.panel))))};Oi.propTypes={useFormulario:Ot.func};const Si=wt(Oi,{name:"FormEtriek",overridesResolver:(e,t)=>t.root})(({theme:e})=>wi(e));function Ri(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(o=Ri(e[t]))&&(n&&(n+=" "),n+=o);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ei(){for(var e,t,o=0,n="";o<arguments.length;)(e=arguments[o++])&&(t=Ri(e))&&(n&&(n+=" "),n+=t);return n}const Pi=e=>{const t=q(),{resource:n,className:i,icon:r,label:a="ra.action.delete",...l}=e,s=re(),[c,{isLoading:d}]=Se(n,{id:s.id});return o(so,{title:t("ra.action.delete")},o(lo,Object.assign({disabled:d,onClick:()=>c(),label:a,className:Ei("ra-delete-button",i),key:"button"},(({...e})=>e)(l),{size:"large"}),r))};Pi.defaultProps={redirect:"list",icon:o(Nt,null)};const ji=e=>{const t={};for(const o in e)"string"==typeof e[o]&&0===e[o].trim().length||(null==e[o]&&(e[o]=""),t[o]=e[o]);return t},_i=wt(e=>{const{useFormulario:t=en,mutationMode:n="pessimistic",...i}=e,r=Re({mutationMode:n,...i}),{record:l,isLoading:s}=r,{fichaProps:c}=Yn(e),d=a(()=>({estado:"M",initialValues:l,isLoading:s,fichaProps:c}),[l,s,c]);return o(Lo,null,o(rn.Provider,{value:d},o(Ee,Object.assign({mutationMode:n,transform:ji},i,null==c?void 0:c.panel))))},{name:"FormEtriek",overridesResolver:(e,t)=>t.root})(({theme:e})=>wi(e)),Ni=t((e,t)=>{const{isOpen:n,onSubmit:i,onClose:r,title:a,dialogText:l,children:s,hasAccept:c=!0,hasCancel:d=!0,isLoading:u=!1}=e,m=K(e),p=e=>{r&&r(e)};return o(It,{ref:t,open:n,fullWidth:!0,onClose:p,"aria-labelledby":"form-dialog-title"},o(Bt,{id:"form-dialog-title"},a),o(de,{resource:m,onSubmit:i},o(Lt,{dividers:!0},o(Dt,null,l),o(co,{sx:{mt:2}},s)),(c||d)&&o(Mt,null,d&&o(ie,{label:"ra.action.cancel",disabled:u,onClick:e=>p(e)},o(_t,null)),c&&o(ue,{alwaysEnable:!0,label:"Ok",disabled:u}))))}),Fi={},Ii={pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},Mi=e=>{const t=Do(),n=K(e),{estado:r,isLoading:a,initialValues:l,fichaProps:s}=i(rn),d=nn({resource:n,etrs:s.etrs});return c(()=>{s.onRenderFicha&&s.onRenderFicha(d,r)},[]),c(()=>{a||s.onLoadFicha&&s.onLoadFicha(d,r,l)},[a]),o(M,{sx:{...e.sx,...t.open?Ii:Fi}},t.open&&o(L,{sx:{position:"absolute",left:"50%",top:"50%"},thickness:4,size:50}),e.children)},Li=e=>{const{initialValues:t,fichaProps:{config:n={}}}=i(rn),r=Ti(e);return t?o(Pe,Object.assign({mode:"onBlur"},e,{onSubmit:r,defaultValues:t,component:Mi},n)):null};Li.propTypes={...Pe.propTypes};const Di=e=>{const{handleToggle:t,isOpen:n,name:i,icon:r,children:a,dense:l}=e,s=q(),[c]=je(),d=o(b,{dense:l,onClick:t},o(v,{sx:{minWidth:5}},n?o(uo,null):r),o(x,{variant:"inherit",color:"textSecondary"},s(i)));return o("div",null,c||n?d:o(_,{title:s(i),placement:"right"},d),o(D,{in:n,timeout:"auto",unmountOnExit:!0},o(B,{dense:l,component:"div",disablePadding:!0,sx:{paddingLeft:(e.children.props.children[0]?e.children.props.children[0].key:"").startsWith("menu")?2:0,backgroundColor:e=>Tt(e.palette.secondary.light,.24),"& a":{transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",paddingLeft:c?4:2}}},a)))},Bi=e=>{const{items:t,translate:n,...i}=e,{state:r,handleToggle:a,dense:l}=i;return t&&o("div",null,t.map(e=>{const{name:t,menu:s,label:c,icon:d="settings"}=e;return s?o(Di,{key:t,name:c,handleToggle:()=>a(t),isOpen:r[t],icon:o(Qt,null),dense:l},Bi({items:s,translate:n,...i})):o(_e,{key:t,to:"/"+t,primaryText:n(`resources.${t}.name`,{_:c}),dense:l,leftIcon:o(Qt,null)})}))},Ai=({dense:e=!1})=>{const t=q(),[n,i]=r({mnuPrueba:!1}),a=C(e=>e.breakpoints.down("sm")),[l]=je(),s=JSON.parse(localStorage.getItem("menus")),c=Bi({items:s,handleToggle:e=>{i(t=>({...t,[e]:!t[e]}))},state:n,activeClassName:"",iconClass:"",className:"",open:l,dense:e,translate:t});return o(w,{sx:{width:l?230:50,marginTop:1,marginBottom:1,transition:e=>e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}},o(Ne,null,o(Fe,{primaryText:t("ra.page.dashboard")}),c,a&&o(_e,{to:"/configuration",primaryText:t("pos.configuration"),leftIcon:o(Qt,null),dense:e})))};var Vi=e=>o(Ie,Object.assign({},e,{appBar:Io,menu:Ai}));const qi=(e,t)=>{alert("Falta implementar la función jsBotonGrilla")},zi=e=>{const{className:t,filters:n,children:r,hideFilterButton:l=!1,jsBotonGrilla:s=qi,...c}=e,{sort:m,displayedFilters:p,filterValues:g,exporter:f,showFilter:h,total:b}=J(e),v=K(e),{hasCreate:y}=pe(e),C=i(Me)||n,x=J(e),w={...tn(e),...x};return delete c.hasCreate,a(()=>o(ye,Object.assign({className:t},Le(c)),l?null:n?u(n,{resource:v,showFilter:h,displayedFilters:p,filterValues:g,context:"button"}):C&&o(De,null),y&&o(Be,null),!1!==f&&o(Ae,{disabled:0===b,resource:v,sort:m,filterValues:g}),d.map(r,(e,t)=>u(e,{onClick:e.props.options?null:t=>{e.props.onClick&&e.props.onClick(t),s(w,e.key)},options:e.props.options?e.props.options.map(t=>({...t,onClick:o=>{e.props.onClick&&e.props.onClick(o),s(w,t.key)}})):null}))),[v,p,g,n,h,C,b,t,m,l,f,y])},$i=e=>{const{loginBackgroundImage:t,nameSource:n="username",passwordSource:i="password"}=e,[a,l]=r(!1),s=q(),c=s("ra.auth.sign_in"),d=Y(),u=Ve(),m=bt();return o(de,{onSubmit:e=>{l(!0),u(e,m.state?m.state.nextPathname:"/").catch(e=>{l(!1),d("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error",{type:"error",messageArgs:{_:"string"==typeof e?e:e&&e.message?e.message:void 0}})})},validate:e=>{const t={};return e[n]||(t[n]=s("ra.validation.required")),e[i]||(t[i]=s("ra.validation.required")),t}},o(w,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundImage:t,backgroundRepeat:"no-repeat",backgroundSize:"cover"}},o(go,{sx:{minWidth:300,marginTop:"6em"}},o(w,{sx:{margin:"1em",display:"flex",justifyContent:"center"}},o(mo,{sx:{backgroundColor:"secondary.main"}},o(f,null))),o(w,{sx:{marginTop:"1em",marginBottom:"1em",display:"flex",justifyContent:"center",color:"grey.600"}},"Inicio de Sesión"),o(w,{sx:{padding:"0 1em 1em 1em"}},o(w,{sx:{marginTop:0}},o(qe,{autoFocus:!0,fullWidth:!0,name:n,label:s("ra.auth.username"),disabled:a})),o(w,{sx:{marginTop:0}},o(ze,{name:i,label:s("ra.auth.password"),type:"password",disabled:a}))),o(fo,{sx:{padding:"0 1em 1em 1em"}},o(po,{variant:"contained",type:"submit",color:"primary",disabled:a,fullWidth:!0},a&&o(ho,{sx:{position:"absolute"},size:18,thickness:2}),c)))))},Wi=e=>{var t;const{options:n=[],icon:i,label:a,disabled:l,...s}=e,[c,d]=r(!1),u=p(),[m,g]=r(0),f=K(e);return o(w,Object.assign({sx:{display:"inline-block"}},(({...e})=>e)(s)),o(ie,{size:"large",className:"add-filter",label:a,onClick:e=>{e.preventDefault(),d(!0),u.current=e.currentTarget},title:n[m].label,disabled:l},(null===(t=n[m])||void 0===t?void 0:t.icon)||i),o(bo,{open:c,anchorEl:u.current,onClose:e=>{u.current&&u.current.contains(e.target)||d(!1)}},n.map((e,t)=>o(vo,{key:e.label,disabled:e.disabled,selected:t===m,onClick:o=>{((e,t)=>{g(t),d(!1)})(0,t),e.onClick&&e.onClick(o,t)},resource:f,title:e.label},e.icon,o(w,{component:"span",sx:{paddingRight:"4px"}}),o($e,{label:e.label,resource:f})))))},Hi=e=>{const{fields:t,className:n,...i}=e,{campos:r,separador:a="",secundario:l=[],hasSecundario:s}=t,c=re(),d=r.map(e=>void 0!==c[e]?c[e]:e).join(""+a);return o(no,Object.assign({noWrap:!0,variant:"inherit",className:n},i),d,s&&o(no,{component:"span",display:"block",color:"textSecondary",variant:"caption"},l.map(e=>`${e.etiqueta||"---"}: ${c[e.campo]||"---"}`).join(" ")))},Gi=wt(e=>{const{useFormulario:t=en,...n}=e,i=We(n),{record:r,isLoading:l}=i,{fichaProps:s}=Yn(e),c=a(()=>({estado:"M",initialValues:r,isLoading:l,fichaProps:s}),[r,l,s]);return o(Lo,null,o(rn.Provider,{value:c},o(He,Object.assign({},n,i,null==s?void 0:s.panel))))},{name:"FormEtriek",overridesResolver:(e,t)=>t.root})(({theme:e})=>wi(e)),Ui=e=>{const{icon:t=Yi,label:n="ra.action.show",scrollToTop:i=!0,...r}=e,a=K(e),l=re(e),s=me();return l?o(jn,Object.assign({component:ht,to:s({type:"show",resource:a,id:l.id}),state:Ji[String(i)],label:n,onClick:Qi},r),t):null},Ji={true:{_scrollToTop:!0},false:{}},Yi=o(yo,null),Qi=e=>e.stopPropagation();Ui.propTypes={icon:Ot.element,label:Ot.string,record:Ot.any,scrollToTop:Ot.bool};const Zi=g(Ui,(e,t)=>e.resource===t.resource&&(e.record&&t.record?e.record.id===t.record.id:e.record==t.record)&&e.label===t.label&&e.disabled===t.disabled),Ki=e=>{const{children:t,className:n,component:a=er,formRootPathname:l,syncWithLocation:s=!0,tabs:c=Xi,toolbar:p=tr,onChange:g,...f}=e,h=bt(),b=yt(""),v=K(e),[y,C]=r(0),{fichaProps:{etrs:x}}=i(rn),w=nn({...e,etrs:x}),{estado:k}=i(rn),T=(e,t)=>{s||(C(t),g&&g(w,k,{newTab:t,prevTab:y,setTab:C},e))},O=()=>u(c,{onChange:T,syncWithLocation:s,url:l,value:y},t);return o(or,Object.assign({className:Ei("tabbed-form",n)},nr(f)),s?o(Ct,null,o(xt,{path:"/*",element:O()})):O(),o(A,null),o(a,null,d.map(t,(e,t)=>{if(!e)return null;const o=Ue(e,t),n=s?!vt(`${b.pathname}/${o}`,h.pathname):y!==t;return m(e)?u(e,{intent:"content",resource:v,hidden:n,value:s?o:t}):null})),!1!==p?p:null)},Xi=o(Je,null),er=({children:e})=>o(M,null,e),tr=o(Ye,null),or=wt("div",{name:"RaTabbedForm",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"& .MuiTab-root.RaTabbedForm-errorTabButton":{color:e.palette.error.main}})),nr=({...e})=>e,ir=e=>{const{...t}=e,n=(()=>{const e=bt(),t=vt(":resource/create/*",e.pathname),o=vt(":resource/:id/*",e.pathname);return t?t.pathnameBase:o?o.pathnameBase:""})();return o(de,Object.assign({formRootPathname:n},t),o(Ki,Object.assign({formRootPathname:n},rr(e))))};ir.Tab=Ge;const rr=({...e})=>e,ar=e=>{const{initialValues:t,fichaProps:{config:n={}}}=i(rn),r=Ti(e);return t?o(ir,Object.assign({mode:"onBlur"},e,{onSubmit:r,defaultValues:t,component:Mi},n)):null};ar.defaultProps={syncWithLocation:!1};const lr={...Qe,palette:{...Qe.palette,mode:"dark"},components:{...Qe.components,MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}}};var sr={__proto__:null,lightTheme:{...Qe,palette:{...Qe.palette,mode:"light"},components:{...Qe.components,MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}}},darkTheme:lr};Co.ra.page.empty="No records yet";const cr={...Co,from_camera:"From camera",take_foto:"Take photo",login:{id:"ID",hint:"Login",required:"Insert Username or ID",send:"Send",email:"Enter your email address",check_email:"Check your email inbox, we just send you a verification code!",must_enter_credentials:"You must first enter Username or ID",restore_password:"Restore Password",punch_in:"Punch In"},pos:{search:"Search",change_pin:"Change Pin",change_password:"Change Password",configuration:"Configuration",language:"Language",theme:{name:"Theme",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Welcome",subtitle:"Employee Management",aor_button:"Metiri WebSite"}}},validation:{greater_or_equal:"Must be greater than or equal to %{menor}"}};xo.ra.notification.created="Datos guardados correctamente",xo.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",xo.ra.page.dashboard="Inicio",xo.ra.page.empty="Sin registros todavía",xo.ra.page.invite="¿Quiere agregar uno?",xo.ra.page.list="%{name}",xo.ra.page.edit="Editar %{name}",xo.ra.action.back="Volver",xo.ra.message.delete_title="Eliminar",xo.ra.input.file.upload_single="Seleccione o arrastre archivo",xo.ra.input.image.upload_single="Seleccione o arrastre imagen";const dr={...xo,from_camera:"Desde camara",take_foto:"Tomar foto",login:{id:"Cédula",hint:"Inicio de Sesión",required:"Ingrese Usuario o Cédula",email:"Ingrese su email aquí",send:"Enviar",check_email:"Revisa tu correo electrónico, te enviaremos un código de verificación!",must_enter_credentials:"Debe ingresar Nº de Usuario o Cédula y Contraseña primero",restore_password:"Restablecer Contraseña",punch_in:"Generar Marcas"},pos:{search:"Búsqueda",change_pin:"Cambiar Pin",change_password:"Cambiar Contraseña",configuration:"Configuración",language:"Lenguaje",theme:{name:"Tema Visual",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Bienvenid@",subtitle:"Gestión de Funcionarios",aor_button:"Sitio de Metiri"}}},validation:{greater_or_equal:"Debe ser mayor o igual a %{menor}"}},ur=e=>{const{propsContenido:t,hidden:n}=ln(e),i=re(),r=JSON.parse(JSON.stringify(i)),a=r[e.source];return r[e.source]=""!=a&&"0"!=a,!n&&o(Ze,Object.assign({},t,{record:r}))},mr=t=>{const[o,n]=r(!1),[i,a]=r(!1),l=Y(),d=q(),{field:u,sx:m}=t;return c(()=>{o&&(async()=>{let e=null;try{e=await navigator.mediaDevices.getUserMedia({video:!0,audio:!1}),document.getElementById("video").srcObject=e}catch(e){l(e.message,{type:"error"}),n(!1)}})()},[o]),e.createElement(s,null,e.createElement(ce,{isOpen:o,loading:!o,maxWidth:"sm",title:"",content:e.createElement(w,{display:"flex",flexDirection:"column"},e.createElement(V,{variant:"outlined",disableElevation:!0,onClick:()=>{const e=document.getElementById("video"),t=document.getElementById("canvas");t.getContext("2d").drawImage(e,0,0,t.width,t.height),a(!0)},startIcon:e.createElement(ko,null)},d("take_foto")),e.createElement("video",{id:"video",width:"320",height:"240",autoPlay:!0,style:{border:"solid 1px"}}),e.createElement("div",{id:"dataurl-container",style:{border:"dotted 1px",width:320,height:240,marginTop:4}},e.createElement("canvas",{id:"canvas",width:"320",height:"240"}))),onConfirm:e=>{i&&document.getElementById("canvas").toBlob(function(e){const t=document.getElementById("video"),o=document.getElementById(u),i=new DataTransfer;let r=new File([e],u+"-img.jpg",{type:"image/jpeg",lastModified:(new Date).getTime()});i.items.add(r),o.files=i.files,o.dispatchEvent(new Event("change",{bubbles:!0})),t.srcObject.getTracks().forEach(e=>e.stop()),a(!1),n(!1)},"image/jpeg")},onClose:()=>{a(!1),n(!1)}}),e.createElement(so,{title:d("from_camera")},e.createElement(V,{sx:m,onClick:()=>{n(!0)}},e.createElement(To,null))))},pr=e=>{const{source:t}=e,{estado:o,isLoading:n,fichaProps:r={}}=i(rn),a=i(an),l=void 0!==a,s=Jt(e=>{const o=e.configInputs?e.configInputs.filter(e=>e.id===t):[];return o[0]?o[0]:null}),{disabled:c,hidden:d,required:u,error:m}=s||{},g=!0===u?ci:void 0,f="function"==typeof m?m:()=>m,{[t]:h={},etrs:b}=r,{onFocus:v,onChange:y,onBlur:C,hidden:x=!1,disabled:w=!1,validate:k,...T}=e,{field:O}=ae(e),{onFocus:S,onBlur:R,onChange:E,hidden:P,disabled:j,useContenido:_=en,validate:N,...F}=h,I=l||void 0===P?x:P,M=l||void 0===j?w:j,L=l||void 0===S?v:S,D=l||void 0===R?C:R,B=l||void 0===E?y:E,A=nn({...e,etrs:b,asisEtr:a}),V=_({...T,estado:o,hidden:I,isLoading:n,utils:A,...F}),q=p(O.value);if(void 0===V)throw new Error(`useContenido está devolviendo undefined para el contenido ${t}\n Asegúrese de incluir una instrucción return al final de la función`);const{hidden:z,disabled:$,onFocus:W,onChange:H,onBlur:G,validate:U,...J}=V,Y=W||L,Q=G||D,Z=H||B,K={...A,prev:q.current};return{propsContenido:{sx:{mt:1,mb:1,ml:{xs:0,md:1},mr:{xs:0,md:1}},onFocus:e=>{Y&&L(A,o,e),q.current=e.target.value},onBlur:e=>Q&&Q(K,o,e),onChange:e=>Z&&Z(K,o,e),helperText:!1,validate:[...Array.isArray(k)?k:[k],...Array.isArray(N)?N:[N],...Array.isArray(U)?U:[U],g,f].filter(e=>void 0!==e),...T,...F,...J,disabled:void 0!==c?c:void 0!==$?$:M},hidden:void 0!==d?d:void 0!==z?z:I}},gr=(e,t)=>e&&""!==e?"string"==typeof e?{src:`${t}/${e}`}:e instanceof Array?e.map(e=>({src:`${t}/${e}`})):e:void 0,fr=e=>{const{propsContenido:t,hidden:n}=pr(e),i=q(),r=C(e=>e.breakpoints.down("sm")),{options:a={},disabled:l=!1,tipo:s="file",camera:c=!0,prefix:d,...u}=t;return!n&&("image"===s?o(wo,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",divider:o(Xt,{orientation:"vertical",variant:"middle",flexItem:!0})},o(Ke,Object.assign({maxSize:5e6},u,{options:{disabled:l,...a},format:e=>gr(e,d),placeholder:i("ra.input.image.upload_single"),accept:"image/*",inputProps:{capture:"user"}}),o(Xe,{source:"src",title:""})),!r&&o(mr,{sx:{mt:3},field:u.source})):o(wo,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",divider:o(Xt,{orientation:"vertical",variant:"middle",flexItem:!0})},o(et,Object.assign({maxSize:5e6},u,{options:{disabled:l,...a},format:e=>gr(e,d),placeholder:i("ra.input.file.upload_single")}),o(tt,{download:!0,source:"src",title:"Ver adjunto",target:"_blank"})),c&&o(mr,{sx:{mt:3},field:u.source})))},hr=e=>{const{propsContenido:{sx:t,...n},hidden:i}=pr(e);return!i&&o(ot,Object.assign({},n,{sx:{...t,display:"inline-flex",margin:1}}))},br=t((e,t)=>o(_,Object.assign({ref:t},e))),vr=e=>{var t;const{callback:n,sx:i,isTC:r,onChange:a,...l}=e,{isLoading:s,allChoices:d}=it(),u=p(null);return c(()=>{s||"function"==typeof n&&n(Object.values([d]))},[d,n,s]),o(br,{title:(null===(t=u.current)||void 0===t?void 0:t.value)||"",placement:"top",arrow:!0},o(w,{component:"span",sx:r?{margin:1,...i}:{display:{xs:"inherit",md:"inline-flex"},margin:1,...i},width:r?{}:{xs:"100%",md:"auto"}},o(rt,Object.assign({size:"small",sx:r?{width:"100% !important"}:{}},l,{onChange:e=>{a({target:{value:e}})},TextFieldProps:{inputRef:u}}))))},yr=e=>{const{propsContenido:t,hidden:n}=pr(e),i=Ut(),{source:r,reference:a}=e,l=Jt(e=>{const t=e.reload_cb?e.reload_cb.filter(e=>e.id===r):[];return t[0]?t[0]:null}),s=p(l),d=null===l&&s.current?s.current:l;let u,m;if(d){const{callback:e,...t}=d;u=e,m=t}return c(()=>{null!==l&&(s.current=l,i(zo(r)))},[JSON.stringify(l)]),n?null:o(nt,{reference:a,source:r,perPage:500,filter:m},o(vr,Object.assign({},t,{callback:u,optionText:"etiqueta",optionValue:r})))},Cr=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(at,t)},xr=e=>{const{title:t,source:n,src:i}=e,r=re(e);return o(mo,{title:t,src:`${i}/${r[n]}`})},wr=e=>{const{propsContenido:t,hidden:n}=pr(e),{source:i,reference:r}=e;return n?null:o(lt,{source:i,reference:r},o(st,Object.assign({},t,{optionText:"etiqueta",optionValue:e.source})))},kr=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(ze,t)},Tr=e=>{const{propsContenido:t,hidden:n}=pr(e),{isLoading:r}=i(rn),{source:a,reference:l}=e;return r||n?null:o(nt,{source:a,reference:l},o(ct,Object.assign({},t,{optionText:"etiqueta",optionValue:e.source})))},Or=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(ct,t)},Sr=e=>o(jo,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},o(I,e)),Rr={cursor:"move"},Er=e=>{const{isOpen:t,isLoading:n,title:i,content:r,cancel:a,ConfirmIcon:s,CancelIcon:c,onClose:d,onConfirm:u,contentResource:m,translateOptions:p={}}=e,g=q(),[f]=dt(m),h=l((e,t)=>{e.stopPropagation(),u(e,f)},[f,u]),b=l(e=>{e.stopPropagation()},[]);return o(It,{open:t,onClose:d,onClick:b,fullWidth:!0,maxWidth:"lg",PaperComponent:Sr,"aria-labelledby":"draggable-dialog-title"},o(Bt,{style:Rr,id:"draggable-dialog-title"},g(i,{_:i,...p})),o(Lt,{dividers:!0},r),o(Mt,null,o(po,{disabled:n,onClick:d},o(c,{sx:{paddingRight:"0.5em"}}),g(a,{_:a})),o(po,{disabled:n,onClick:e=>h(e,"yes"),autoFocus:!0},o(s,{sx:{paddingRight:"0.5em"}}),g("ra.action.confirm"))))};Er.propTypes={cancel:Ot.string,classes:Ot.object,confirm:Ot.string,confirmColor:Ot.string,ConfirmIcon:Ot.elementType,CancelIcon:Ot.elementType,content:Ot.node.isRequired,isOpen:Ot.bool,isLoading:Ot.bool,onClose:Ot.func.isRequired,onConfirm:Ot.func.isRequired,title:Ot.string.isRequired},Er.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Eo,CancelIcon:Po,isOpen:!1};const Pr=()=>o(s,null),jr={seleccion:[],all:!0,none:!1},_r=e=>!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":`Selección (${e.seleccion.length})`,Nr=e=>e,Fr=e=>{const{disabled:t,asistant:n,asistantResource:i,label:a,source:d,sx:u,...m}=e,[p,g]=r(!1),f=Ht();c(()=>{b()},[]);const h=l(()=>{g(!1)},[g]),b=e=>{f.setValue(d,{seleccion:[],all:!0,none:!1})};return o(s,null,o(w,{display:"flex",alignItems:"center",sx:{...u,display:"inline-flex",margin:1}},o(qe,Object.assign({defaultValue:jr},m,{source:d,label:a,disabled:!0,parse:Nr,format:_r,helperText:!1,InputProps:{endAdornment:o(s,null,o(lo,{onClick:e=>{f.setValue(d,{seleccion:[],all:!1,none:!0})},disabled:t,"aria-label":"Ninguno",size:"small",title:"Ninguno"},o(So,null)),o(lo,{onClick:b,disabled:t,"aria-label":"Todos",size:"small",title:"Todos"},o(Oo,null)),o(lo,{onClick:e=>g(!0),disabled:t,"aria-label":"Selección",size:"small",title:"Selección"},o(Ro,null)))}}))),o(Er,{isOpen:p,title:"Selección de "+a,contentResource:i,content:o(n,{bulkActionButtons:o(Pr,null),hasCreate:!1,exporter:!1,resource:i}),onConfirm:(e,t)=>{g(!1),f.setValue(d,{seleccion:t,all:!1,none:!1})},onClose:h}))},Ir=e=>o(ut,Object.assign({},e,{hasCreate:!1,exporter:!1,perPage:50,empty:!1,title:" ",disableSyncWithLocation:!0}),o(mt,{bulkActionButtons:o("span",null)},o(oe,{source:"funced",sortable:!0,label:"Cédula"}),o(oe,{source:"funpriape",sortable:!0,label:"Apellido"}),o(oe,{source:"funprinom",sortable:!0,label:"Nombre"}))),Mr={fillista:"empcod=-1"},Lr=e=>{const[t,n]=r(Mr),i=U(),a=l(e=>{n({fillista:e.node.key})},[n]),s=l(e=>i.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(e=>e.data).catch(()=>{throw new Error("Data Loading Error")}),[i]);return o(w,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},o(w,{flexGrow:1},o(_o,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:a,createChildren:s})),o(w,{flexGrow:2},o(Ir,{resource:"form_224",filter:t})))},Dr=e=>o(jo,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},o(I,e)),Br={cursor:"move"},Ar=e=>{const{isOpen:t,isLoading:n,title:i,cancel:r,ConfirmIcon:a,CancelIcon:s,onClose:c,onConfirm:d,translateOptions:u={}}=e,m=q(),p=l((e,t)=>{e.stopPropagation(),d(e,t)},[d]),g=l(e=>{e.stopPropagation()},[]);return o(It,{open:t,onClose:c,onClick:g,fullWidth:!0,maxWidth:"lg",PaperComponent:Dr,"aria-labelledby":"draggable-dialog-title"},o(Bt,{style:Br,id:"draggable-dialog-title"},m(i,{_:i,...u})),o(Lt,{dividers:!0},o(Lr,null)),o(Mt,null,o(po,{disabled:n,onClick:c},o(s,{sx:{paddingRight:"0.5em"}}),m(r,{_:r})),o(po,{disabled:n,onClick:e=>p(e,"yes"),autoFocus:!0},o(a,{sx:{paddingRight:"0.5em"}}),m("ra.action.confirm"))))};Ar.propTypes={cancel:Ot.string,classes:Ot.object,confirm:Ot.string,confirmColor:Ot.string,ConfirmIcon:Ot.elementType,CancelIcon:Ot.elementType,isOpen:Ot.bool,isLoading:Ot.bool,onClose:Ot.func.isRequired,onConfirm:Ot.func.isRequired,title:Ot.string.isRequired},Ar.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Eo,CancelIcon:Po,isOpen:!1};const Vr={seleccion:[],all:!0,none:!1},qr=e=>String(e)===e?"Selección (1)":!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":`Selección (${e.seleccion.length})`,zr=e=>e,$r=e=>{const{disabled:t,label:n="Funcionarios",allowNone:i=!0,source:a,sx:d,...u}=e,[m]=dt("form_224"),[p,g]=r(!1),f=Ht();c(()=>{b()},[]);const h=l(()=>{g(!1)},[g]),b=e=>{f.setValue(a,{seleccion:[],all:!0,none:!1})};return o(s,null,o(w,{display:"flex",alignItems:"center",sx:{...d,display:"inline-flex",margin:1}},o(qe,Object.assign({defaultValue:Vr},u,{source:a,label:n,disabled:!0,parse:zr,format:qr,helperText:!1,InputProps:{endAdornment:o(s,null,i&&o(lo,{onClick:e=>{f.setValue(a,{seleccion:[],all:!1,none:!0})},disabled:t,"aria-label":"Ninguno",size:"small",title:"Ninguno"},o(So,null)),o(lo,{onClick:b,disabled:t,"aria-label":"Todos",size:"small",title:"Todos"},o(Oo,null)),o(lo,{onClick:e=>g(!0),disabled:t,"aria-label":"Selección",size:"small",title:"Selección"},o(Ro,null)))}}))),o(Ar,{isOpen:p,title:"Selección de "+n,onConfirm:(e,t)=>{g(!1),f.setValue(a,{seleccion:m,all:!1,none:!1})},onClose:h}))},Wr=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(qe,Object.assign({multiline:!0},t))},Hr=e=>{const{tipo:t,...n}=e,{propsContenido:i,hidden:r}=pr(n),a=Ht();c(()=>{i.value&&a.setValue(e.source,i.value)});const l={...i};return r?null:"N"===t||"D"===t?o(pt,l):"F"===t?o(gt,l):"Z"===t?o(ft,l):o(qe,"H"===t?Object.assign({},l,{type:"time"}):l)},Gr=e=>{const{source:t,label:n,sx:i}=e,{hidden:r}=pr(e);return r?null:o(w,{sx:{...i,display:"inline-flex",alignItems:"flex-start",marginLeft:{md:1},marginBottom:-1,width:{xs:"100%",md:"calc(24vw + 1em)"}}},o(qe,Object.assign({},e,{label:"",source:t,sx:{flex:1,marginTop:1}})),o(yr,Object.assign({},e,{source:t,label:n,isTC:!0,sx:{flex:3}})))};export{Io as AppBar,Pn as Asistente,Vo as AsistenteContext,ur as BooleanField,fr as Camino,hr as CheckBox,yr as ComboBox,Cr as ComboBoxManual,Si as CreateEtriek,Mn as CreateGridButton,Pi as DeleteButtonNoWarning,_i as EditEtriek,An as EditGridButton,Sn as EtrGrid,si as FichaActions,rn as FichaContext,Ar as FiltroFuncionarios,xi as FormClasses,Ni as FormDialog,Li as FormEtriek,En as GE,jn as GridButton,Un as GrillaEtriek,xr as ImageField,Vi as Layout,zi as ListActionsEtriek,wr as ListCheck,$i as Login,Ai as Menu,Wi as MenuButton,Hi as MultiTextField,kr as Password,Tr as RadioButton,Or as RadioButtonManual,li as Separador,Gi as ShowEtriek,Zi as ShowGridButton,Di as SubMenu,$r as TBSF,ar as TabbedFormEtriek,Jn as TabbedGrillaEtriek,Wr as TextArea,Hr as TextBox,Fr as TextBoxSelection,Gr as TextCombo,sn as TextField,gi as choicesEstado,ei as dateFormat,ui as dateFormatOptions,ti as dateParser,ni as dateTimeFormat,ii as dateTimeParser,yi as dateTimeToString,vi as dateToString,zo as deleteRecargarComboBox,fi as descargarLink,cr as enMessages,dr as esMessages,mi as etrFechaMayorQue,ci as etrRequerido,di as etrRequeridoNumerico,Zn as getFormcodFromResource,pi as localeOptions,qo as recargarComboBox,cn as renderCellComboBox,Wo as setDisableAction,Go as setErrorAction,$o as setHiddenAction,Ho as setRequireAction,hi as stringToDate,bi as stringToDateTime,sr as themes,ri as timeFormat,ai as timeParser,Xo as useAjax,pr as useContenidoController,gn as useEtrActions,ln as useFieldController,Do as useFormProgress,Ti as useFormSubmit,Ko as useGetJson,Yn as useInitFicha,Qn as useNuevo,Ci as useReferenceLabel,nn as useUtils,tn as useUtilsGrilla,on as useUtilsSubmit};
1
+ import e,{forwardRef as t,createElement as o,createContext as n,useContext as i,useState as r,useMemo as a,useCallback as l,Fragment as s,useEffect as c,Children as d,cloneElement as u,isValidElement as m,useRef as p,memo as g}from"react";import f from"@mui/icons-material/Lock";import h from"@mui/icons-material/VpnLock";import{MenuItem as b,ListItemIcon as v,ListItemText as y,useMediaQuery as C,Typography as x,Box as w,alpha as k,createTheme as T,StyledEngineProvider as O,Stack as S,Dialog as R,DialogTitle as E,DialogContent as P,DialogActions as j,Tooltip as _,IconButton as N,ThemeProvider as F,Paper as I,CardContent as M,CircularProgress as L,Collapse as D,List as B,Divider as A,Button as V}from"@mui/material";import{useTranslate as q,useUserMenu as z,useResourceDefinitions as $,AppBar as W,UserMenu as H,Logout as G,useDataProvider as U,useListContext as J,useNotify as Y,useRedirect as Q,useRefresh as Z,useResourceContext as K,useUnselectAll as X,NumberField as ee,DateField as te,TextField as oe,ReferenceField as ne,Button as ie,useRecordContext as re,useInput as ae,useGetList as le,useSafeSetState as se,Confirm as ce,Form as de,SaveButton as ue,useCreatePath as me,useResourceDefinition as pe,DatagridRoot as ge,DatagridClasses as fe,BulkActionsToolbar as he,SimpleList as be,useGetOne as ve,TopToolbar as ye,ListButton as Ce,ShowButton as xe,required as we,minValue as ke,useSaveContext as Te,Create as Oe,useDelete as Se,useEditController as Re,Edit as Ee,SimpleForm as Pe,useSidebarState as je,MenuItemLink as _e,Menu as Ne,DashboardMenuItem as Fe,Layout as Ie,FilterContext as Me,sanitizeListRestProps as Le,FilterButton as De,CreateButton as Be,ExportButton as Ae,useLogin as Ve,TextInput as qe,PasswordInput as ze,FieldTitle as $e,useShowController as We,Show as He,FormTab as Ge,getTabbedFormTabFullPath as Ue,TabbedFormTabs as Je,Toolbar as Ye,defaultTheme as Qe,BooleanField as Ze,ImageInput as Ke,ImageField as Xe,FileInput as et,FileField as tt,BooleanInput as ot,ReferenceInput as nt,useChoicesContext as it,AutocompleteInput as rt,SelectInput as at,ReferenceArrayInput as lt,SelectArrayInput as st,RadioButtonGroupInput as ct,useRecordSelection as dt,List as ut,Datagrid as mt,NumberInput as pt,DateInput as gt,DateTimeInput as ft}from"react-admin";import{Link as ht,useLocation as bt,matchPath as vt,useResolvedPath as yt,Routes as Ct,Route as xt}from"react-router-dom";import{styled as wt,ThemeProvider as kt,alpha as Tt}from"@mui/material/styles";import Ot,{string as St,func as Rt,any as Et,bool as Pt}from"prop-types";import jt from"@mui/icons-material/Add";import _t from"@mui/icons-material/Cancel";import Nt from"@mui/icons-material/Delete";import Ft from"@mui/icons-material/Edit";import It from"@mui/material/Dialog";import Mt from"@mui/material/DialogActions";import Lt from"@mui/material/DialogContent";import Dt from"@mui/material/DialogContentText";import Bt from"@mui/material/DialogTitle";import At from"@mui/material/Paper";import{esES as Vt,DataGridPremium as qt,useGridApiContext as zt,useGridApiRef as $t,useKeepGroupedColumnsHidden as Wt}from"@mui/x-data-grid-premium";import{useFormContext as Ht,useFormState as Gt}from"react-hook-form";import{useDispatch as Ut,useSelector as Jt}from"react-redux";import{useMutation as Yt}from"react-query";import Qt from"@mui/icons-material/Settings";import{GridActionsCellItem as Zt}from"@mui/x-data-grid";import Kt from"@mui/icons-material/Create";import Xt from"@mui/material/Divider";import eo from"@mui/material/Tab";import to from"@mui/material/Tabs";import oo from"@mui/icons-material/ChevronLeft";import no from"@mui/material/Typography";import{isAfter as io}from"date-fns";import ro from"date-fns/locale/en-US";import ao from"date-fns/locale/es";import lo from"@mui/material/IconButton";import so from"@mui/material/Tooltip";import co from"@mui/material/Box";import uo from"@mui/icons-material/ExpandMore";import mo from"@mui/material/Avatar";import po from"@mui/material/Button";import go from"@mui/material/Card";import fo from"@mui/material/CardActions";import ho from"@mui/material/CircularProgress";import bo from"@mui/material/Menu";import vo from"@mui/material/MenuItem";import yo from"@mui/icons-material/RemoveRedEye";import Co from"ra-language-english";import xo from"@blackbox-vision/ra-language-spanish";import wo from"@mui/material/Stack";import{PhotoCamera as ko}from"@mui/icons-material";import To from"@mui/icons-material/AddAPhoto";import Oo from"@mui/icons-material/Check";import So from"@mui/icons-material/RemoveCircleOutline";import Ro from"@mui/icons-material/Search";import Eo from"@mui/icons-material/CheckCircle";import Po from"@mui/icons-material/ErrorOutline";import jo from"react-draggable";import{TreeView as _o}from"devextreme-react";const No=t((e,t)=>{const n=q(),{onClose:i}=z(),r=$(),a=r.form_59;return[r.form_275?o(b,Object.assign({component:ht,ref:t},e,{key:"/form_275",to:"/form_275",onClick:i}),o(v,null,o(f,null)),o(y,null,n("pos.change_pin"))):null,a?o(b,Object.assign({component:ht,ref:t},e,{key:"/form_59",to:"/form_59",onClick:i}),o(v,null,o(h,null)),o(y,null,n("pos.change_password"))):null]}),Fo=()=>o(H,null,o(No,null),o(G,null)),Io=e=>{const t=C(e=>e.breakpoints.up("sm"));return o(W,Object.assign({},e,{color:"secondary",userMenu:o(Fo,null)}),o(x,{variant:"h6",color:"inherit",sx:{flex:1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},id:"react-admin-title"}),t&&o(w,{component:"span",sx:{flex:1}}))},Mo=n(),Lo=({children:e})=>{const[t,n]=r(!1),i=a(()=>({open:t,show:()=>n(!0),hide:()=>n(!1)}),[t]);return o(Mo.Provider,{value:i},e)},Do=()=>i(Mo),Bo=n(),Ao=({children:e})=>{const[t,n]=r(!1),[i,l]=r({}),s=a(()=>({open:t,props:i,show:e=>{l(e),n(!0)},hide:()=>n(!1)}),[t,i]);return o(Bo.Provider,{value:s},e)},Vo=()=>i(Bo),qo=(e,t,o,n)=>({type:"RELOAD_CB",payload:{id:e,method:t,params:o,callback:n}}),zo=(e,t)=>({type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:t}}),$o=(e,t)=>({type:"HIDE_INPUT",payload:{id:e,hidden:t}}),Wo=(e,t)=>({type:"DISABLE_INPUT",payload:{id:e,disabled:t}}),Ho=(e,t)=>({type:"REQUIRE_INPUT",payload:{id:e,required:t}}),Go=(e,t)=>({type:"ERROR_INPUT",payload:{id:e,error:t}}),Uo=()=>{const e=Ut();return l((t,o,n,i)=>{e(qo(t,o,n,i))},[e])},Jo=()=>{const e=Ut();return l((t,o)=>{e($o(t,o))},[e])},Yo=()=>{const e=Ut();return l((t,o)=>{e(Wo(t,o))},[e])},Qo=()=>{const e=Ut();return l((t,o)=>{e(Ho(t,o))},[e])},Zo=()=>{const e=Ut();return l((t,o)=>{e(Go(t,o))},[e])},Ko=(e,t)=>{const o=U(),{mutateAsync:n,isLoading:i}=Yt(t=>{const{method:n,params:i}=t;return o.getJson(e,{method:n,params:i})},t);return{mutateAsync:n,isLoading:i}},Xo=e=>{const{mutateAsync:t,isLoading:o}=Ko(e);return[l((e,o,n)=>t({method:e,params:o},{onSuccess:n,onError:n}),[]),o]},en=e=>({}),tn=e=>{const t=J(e),o=Y(),n=Q(),i=Z(),r=K(e),a=X(r),l=Vo(),s=q(),[c]=Xo(r);return{ajax:c,data:t,notify:o,redirect:n,refresh:i,refetch:t.refetch,unselectAll:a,asistente:l,translate:s}},on=e=>{const t=Uo(),o=Jo(),n=Yo(),i=Qo(),r=Zo(),a=Do(),l=Y(),s=Q(),c=K(e),[d]=Xo(c);return{ajax:d,notify:l,redirect:s,recargarComboBox:t,progress:a,setHidden:o,setDisable:n,setRequire:i,setError:r,etrs:e.etrs||{}}},nn=e=>{const t=Uo(),o=Jo(),n=Yo(),i=Qo(),r=Zo(),a=Do(),s=Y(),c=Q(),d=Ht(),u=K(e),[m]=Xo(u),p=e.etrs||{},g=e.asisEtr||{},f=null==d?void 0:d.trigger;return{form:d,ajax:m,notify:s,redirect:c,recargarComboBox:t,progress:a,setHidden:l((e,t)=>{o(e,t),setTimeout(()=>{f(e)})},[o,f]),setDisable:l((e,t)=>{n(e,t),setTimeout(()=>{f(e)})},[n,f]),setRequire:l((e,t)=>{i(e,t),setTimeout(()=>{f(e)})},[i,f]),setError:l((e,t)=>{r(e,t),setTimeout(()=>{f(e)})},[r,f]),etrs:p,asisEtr:g}},rn=n({}),an=n(void 0),ln=e=>{const{estado:t,isLoading:o,fichaProps:n={}}=i(rn),{[e.source]:r={}}=n,{hidden:a=!1,...l}=e,{hidden:s,useContenido:c=en,...d}=r,u=void 0!==s?s:a,m=c({...l,estado:t,hidden:u,isLoading:o,...d}),{hidden:p,...g}=m;if(void 0===m)throw new Error(`useContenido está devolviendo undefined para el contenido ${e.source}\n Asegúrese de incluir una instrucción return al final de la función`);return{propsContenido:{...l,...d,...g},hidden:void 0!==p?p:u}},sn=e=>{const{tipo:t,...n}=e,{propsContenido:i,hidden:r}=ln(n),a={...i};return!r&&("N"===t||"D"===t?o(ee,a):"F"===t?o(te,a):"Z"===t?o(te,Object.assign({},a,{showTime:!0})):o(oe,a))},cn=(e,t,n)=>i=>o(ne,{reference:n,source:t,queryOptions:{meta:{etr:e}},record:{[t]:i.row[t]}},o(sn,{source:"etiqueta"})),dn=e=>{const t={...e};return delete t.id,t},un=e=>{const{apiRef:t,source:o,enviarTodo:n}=e;return l((e,i)=>{const r=dn(e),a=t.current.getRowsCount()+1;t.current.updateRows([{...r,id:a}]);const l=n?Array.from(t.current.getRowModels().values(),e=>({...e,claveFila:"",estado:"N"}))||[]:i.getValues()[o]||[];n||l.push({...r,claveFila:"",estado:"N"}),i.setValue(o,l,{shouldDirty:!0})},[t,o])},mn=e=>{const{apiRef:t,source:o,enviarTodo:n}=e;return l((e,i,r)=>{var a,l;const s="number"==typeof e?"N":"M",c=dn(i);t.current.updateRows([{...c,id:e}]);const d=n?Array.from(t.current.getRowModels().values(),e=>({...e,estado:s}))||[]:r.getValues()[o]||[];let u=d.findIndex(t=>t.id===e);u=-1===u?d.length:u,d[u]={...c,claveFila:"N"===(null===(a=d[u])||void 0===a?void 0:a.estado)?"":e,estado:"N"===(null===(l=d[u])||void 0===l?void 0:l.estado)?"N":"M"},r.setValue(o,d,{shouldDirty:!0})},[t,o])},pn=e=>{const{apiRef:t,source:o,enviarTodo:n}=e;return l((e,i)=>{const r=t.current.getRowModels().get(e);t.current.updateRows([{id:e,_action:"delete"}]);const a=n?Array.from(t.current.getRowModels().values(),e=>({...e,estado:"B"}))||[]:i.getValues()[o]||[];let l=a.findIndex(t=>t.claveFila===e);l=-1===l?a.length:l,a[l]={...r,estado:"B",claveFila:e},"number"==typeof e&&a.splice(l,1),i.setValue(o,a,{shouldDirty:!0})},[t,o])},gn=e=>{const{[e.source]:t}=e.useFormulario(),o={...e,enviarTodo:!(null==t||!t.enviarTodo)};return{addRow:un(o),editRow:mn(o),deleteRow:pn(o),clear:t=>{e.apiRef.current.setRows([]),t.setValue(e.source,"")},api:e.apiRef}},fn=wt("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===e.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#fff"}})),hn=()=>o(fn,null,o("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false"},o("g",{fill:"none",fillRule:"evenodd"},o("g",{transform:"translate(24 31.67)"},o("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),o("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),o("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),o("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),o("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),o("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)"},o("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),o("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})))),o(w,{sx:{mt:1}},"No hay registros")),bn=wt(ie,{name:"EtrDeleteButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({color:e.palette.primary.main,"&:hover":{backgroundColor:k(e.palette.primary.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}})),vn={},yn=e=>{const t=Ht();return o(an.Provider,{value:{form:t}},e.children)},Cn=e=>o(It,{open:e.open,onClose:e.onClose,fullWidth:!0},o(Bt,null,`${e.labelEstado} ${e.label}`),o(Dt,{component:"span"},o(de,{mode:"onBlur",record:vn,resource:e.resource,onSubmit:e.onSubmit},o(yn,null,e.children))));Cn.propTypes={label:St,onClick:Rt,icon:Et,open:Pt,onClose:Rt,labelEstado:St,resource:Et,save:Rt,render:Rt};const xn=e=>{const{form:t,resource:n,estado:r,editors:a,recordPadre:l,camposClaveFila:m,setOpen:p,open:g}=e,{dirtyFields:f,isValid:h}=Gt(),{fichaProps:{[e.source]:b={},etrs:v}}=i(rn),y=i(an),{onAfterRenderAsistente:C}=b,x=nn({resource:n,etrs:v,asisEtr:y});return c(()=>{g&&"function"==typeof C&&C({...x,form:t})},[g]),o(s,null,o(Lt,null,o(S,{spacing:4},d.map(a,(e,t)=>u(e,{resource:n,estado:r,defaultValue:l[e.props.source]||"",fullWidth:!0,sx:{margin:0},disabled:"N"!==r&&-1!==m.indexOf(e.props.source),...b[e.props.source]})))),o(Mt,null,o(ue,{disabled:0===Object.keys(f).length||!h}),o(ie,{label:"ra.action.cancel",onClick:e=>{p(!1),e.stopPropagation()}},o(_t,null))))},wn=e=>{const{editors:t,record:n,camposClaveFila:i,label:r,source:a,enviarTodo:l}=e,[c,d]=se(!1),u=K(e),m=Ht(),p=zt(),g=un({apiRef:p,source:a,enviarTodo:l}),f=q()("ra.action.create");return o(s,null,o(ie,{onClick:e=>{d(!0),e.stopPropagation()}},o(jt,null)),o(Cn,{open:c,onClose:e=>{d(!1),e.stopPropagation()},labelEstado:f,label:r,resource:u,onSubmit:(e,t)=>{g(e,m),d(!1)}},o(xn,{source:a,form:m,resource:u,estado:"N",editors:t,recordPadre:n||{},camposClaveFila:i,open:c,setOpen:()=>{d(!1)}})))},kn=e=>{const{editors:t,camposClaveFila:n,resource:i,label:r,source:a,row:l,enviarTodo:c}=e,d=q(),[u,m]=se(!1),p=zt(),g=Ht(),f=mn({apiRef:p,source:a,enviarTodo:c}),h=d("ra.action.edit");return o(s,null,o(ie,{onClick:e=>{m(!0),e.stopPropagation()}},o(Ft,null)),o(Cn,{open:u,onClose:e=>{m(!1),e.stopPropagation()},labelEstado:h,label:r,resource:i,onSubmit:(e,t)=>{f(l.id,e,g),m(!1)}},o(xn,{source:a,form:g,resource:i,estado:"M",editors:t,recordPadre:l,camposClaveFila:n,open:u,setOpen:()=>{m(!1)}})))},Tn=e=>{const{confirmTitle:t="ra.message.delete_title",confirmContent:n="ra.message.delete_content",row:i,source:r,enviarTodo:a}=e,[l,c]=se(!1),d=zt(),u=Ht(),m=pn({apiRef:d,source:r,enviarTodo:a});return o(s,null,o(bn,{key:"button",onClick:e=>{c(!0),e.stopPropagation()}},o(Nt,null)),o(ce,{isOpen:l,title:t,content:n,onConfirm:e=>{m(i.id,u)},onClose:e=>{c(!1),e.stopPropagation()}}))},On=T({},Vt),Sn=e=>{const{filterBy:t="",claves:n,sortModel:l,columns:c,reference:d,allowAdd:u=!0,allowRemove:m=!0,enableLoad:p=!0,apiRef:g,...f}=e,[h,b]=r([]),v=re(e),{field:y}=ae({defaultValue:"",...e}),{isLoading:C,fichaProps:{[f.source]:x}}=i(rn),{enviarTodo:w=!1}=x||{},[k,T]=r(l),[{field:S,sort:R}]=l;let E={};v&&t.split(",").forEach(e=>{e&&(E[e]=[{type:"string",comparison:"eq",value:v[e],field:e}])});const{isLoading:P}=le(d,{pagination:{page:1,perPage:200},sort:{field:S,order:R},filter:E},{enabled:p&&!C,onSuccess:e=>{b((null==e?void 0:e.data)||[])}}),j=[...c,{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:e=>o(kn,Object.assign({},f,{enviarTodo:w,camposClaveFila:n,row:e.row}))}];u&&j.unshift({field:"BTN",headerName:"",sortable:!1,renderHeader:e=>o(wn,Object.assign({},f,{enviarTodo:w,camposClaveFila:n}))}),m&&j.push({field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:e=>o(Tn,Object.assign({},f,{enviarTodo:w,camposClaveFila:n,row:e.row}))});const _=a(()=>j,[JSON.stringify(j)]);return o(At,{sx:{width:"100%",height:"40vh",borderRadius:0,marginTop:1}},o(O,{injectFirst:!0},o(kt,{theme:On},o(s,null,o(qt,Object.assign({apiRef:g,loading:P||C,sx:{"& .MuiDataGrid-columnsContainer":{backgroundColor:e=>"light"===e.palette.mode?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,rows:h,columns:_,sortModel:k,onSortModelChange:e=>T(e),sortable:!1,resizable:!1,disableReorder:!0,disableExport:!0,filterable:!1,disableColumnMenu:!0,slots:{noRowsOverlay:hn}},f)),o("input",Object.assign({type:"hidden"},y))))))},Rn=T({},Vt),En=e=>{const{filterBy:t="",sortModel:n,columns:l,reference:s,enableLoad:c=!0,initialState:d,...u}=e,{isLoading:m}=i(rn),p=re(),[g,f]=r(n),[{field:h,sort:b}]=n,v=a(()=>[...l],[JSON.stringify(l)]);let y={};p&&t.split(",").forEach(e=>{e&&(y[e]=[{type:"string",comparison:"eq",value:p[e],field:e}])});const{estado:C,isLoading:x,fichaProps:w={}}=i(rn),k=nn(e),{[e.source]:T={}}=w,{useContenido:S=en,restInitialProps:R}=T,{data:E=[],isLoading:P,refetch:j}=le(s,{pagination:{page:1,perPage:200},sort:{field:h,order:b},filter:y},{enabled:c&&!m}),_=$t(),N=Wt({apiRef:_,initialState:d});return S({...u,estado:C,hidden:e.hidden,isLoading:x,utils:k,...R,refetch:j,apiRef:_}),o(At,{sx:{width:"100%",height:"40vh",borderRadius:0,marginTop:1}},o(O,{injectFirst:!0},o(kt,{theme:Rn},o(qt,Object.assign({apiRef:_,rows:E,columns:v,loading:P||m,sx:{"& .MuiDataGrid-columnsContainer":{backgroundColor:e=>"light"===e.palette.mode?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,sortModel:g,onSortModelChange:e=>f(e),slots:{noRowsOverlay:hn},initialState:N},u)))))},Pn=e=>{const{isLoading:t}=e,n=K(e),i=Vo(),{open:r,hide:a,props:{title:l,controles:c,aceptar:d,tipo:u="form"}}=i;return o(R,{open:r,onClose:()=>a(),fullWidth:!0,maxWidth:"vista"===u?"lg":"sm"},o(E,{id:"draggable-dialog-title"},l),"form"===u?o(de,{resource:n,onSubmit:d},o(P,{dividers:!0},o(S,{spacing:2},c)),o(j,null,o(ie,{label:"ra.action.cancel",disabled:t,onClick:()=>a()},o(_t,null)),o(ue,{disabled:t}))):o(s,null,o(P,{dividers:!0},o(S,{spacing:2},c)),o(j,null,o(ie,{label:"ra.action.cancel",disabled:t,onClick:()=>a()},o(_t,null)))))},jn=e=>{const{alignIcon:t="left",children:n,className:i,disabled:r,label:a,color:l="primary",size:s="small",to:c,...d}=e,u=q(),m=a?u(a,{_:a}):void 0,p=_n(c);return a&&!r?o(_,{title:m},o(N,Object.assign({"aria-label":m,className:i,color:l,size:"large"},d,p),n)):o(N,Object.assign({className:i,color:l,disabled:r,size:"large"},d,p),n)};jn.propTypes={alignIcon:Ot.oneOf(["left","right"]),children:Ot.element,className:Ot.string,color:Ot.oneOfType([Ot.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),Ot.string]),disabled:Ot.bool,label:Ot.string,size:Ot.oneOf(["small","medium","large"])};const _n=e=>{if(null==e)return;if("string"==typeof e)return{to:e};const{redirect:t,replace:o,state:n,...i}=e;return{to:i,redirect:t,replace:o,state:n}},Nn=e=>e.stopPropagation(),Fn={true:{_scrollToTop:!0},false:{}},In=o(jt,null),Mn=e=>{const{icon:t=In,label:n="ra.action.create",scrollToTop:i=!0,...r}=e,a=K(e),l=re(e),s=me();return o(jn,Object.assign({component:ht,to:s({type:"create",resource:a}),state:{record:l,...Fn[String(i)]},label:n,onClick:Nn},r),t)},Ln=e=>e.stopPropagation(),Dn={true:{_scrollToTop:!0},false:{}},Bn=o(Kt,null),An=e=>{const{icon:t=Bn,label:n="ra.action.edit",scrollToTop:i=!0,...r}=e,a=K(e),l=re(e),s=me();return l?o(jn,Object.assign({component:ht,to:s({type:"edit",resource:a,id:l.id}),state:Dn[String(i)],label:n,onClick:Ln},r),t):null},Vn=(e,t)=>void 0===t||"function"==typeof t&&t(e),qn=T({},Vt),zn=new Map([["is","is"],["not","not"],["after","after"],["onOrAfter","onOrAfter"],["before","before"],["onOrBefore","onOrBefore"],["eq","="],["neq","!="],["gt",">"],["gte",">="],["lt","<"],["lte","<="],["contains","contains"],["equals","equals"],["sw","startsWith"],["ew","endsWith"],["isEmpty","isEmpty"],["isNotEmpty","isNotEmpty"],["isAnyOf","isAnyOf"]]),$n=new Map(Array.from(zn,e=>[e[1],e[0]])),Wn=e=>e.items.reduce((e,t)=>(void 0!==t.field&&t.operator&&($n.has(t.operator)?e[`${t.field}_${$n.get(t.operator)}`]=t.value:e[t.field]=t.value),e),{}),Hn=e=>{const{actionButtons:t=[],bulkActionButtons:n,sx:i,columns:r,isRowEditable:a,desktopSize:l=!1,hasEdit:c,initialState:d,convertFilterModelToFilterValues:u=Wn,claveNuevo:p,mobileColumns:g="",...f}=e,h=tn(e),b=q(),v=K(e),{data:y=[],isLoading:C,selectedIds:x,onSelect:k,displayedFilters:T,setFilters:O}=J(),S=$t(),R=Wt({apiRef:S,initialState:{...d,pinnedColumns:{right:["actions"]}}}),E=r.map((e,t)=>({...e,headerName:""!==e.headerName?b(`resources.${v}.fields.${e.field}`,{_:e.headerName}):e.headerName})),P=t.length>0||c?E.concat([{field:"actions",type:"actions",width:100,hideable:!1,getActions:e=>{const n=S.current.getRowNode(e.id);return e.row.id?[...c?[o(An,{record:e.row,disabled:!Vn(e.row,a)})]:[],...t.filter(e=>!!e).map(t=>{const{handler:n,...i}=t;return o(Zt,Object.assign({showInMenu:!0,onClick:t=>"function"==typeof n&&n({...h,record:e.row},i.key)},i))})]:-1!==n.children[0].indexOf(p+"=")?[o(Mn,{record:p?{[p]:n.children[0].split(p+"=")[1].replaceAll("[","").trim().split("AND")[0].trim()}:void 0})]:[]}}]):E,j=m(n);return o(s,null,o(Pn,{isLoading:C}),o(ge,{sx:i,className:fe.root},j?o(he,{selectedIds:x},n):null,o(w,{sx:{height:"70vh",width:"100%"},className:fe.tableWrapper},o(F,{theme:qn},o(qt,Object.assign({sx:{display:"grid",gridTemplateRows:"70vh 1fr auto"},slots:{noRowsOverlay:hn},columns:P,rows:y,apiRef:S,loading:C,hideFooterSelectedRowCount:!0,hideFooter:!0,disableMultipleRowSelection:!0,checkboxSelection:j,filterMode:"server",onFilterModelChange:e=>{O(u(e),T)},rowSelectionModel:x,onRowSelectionModelChange:e=>{C||(S.current.isRowSelected(e[0])?k([]):k(e))},isRowSelectable:e=>e.row.id,initialState:R},f))))))},Gn=e=>{const{sx:t,columns:n,actionButtons:i=[],hasEdit:r,isRowEditable:a,primaryText:l,mobileColumns:c=""}=e;let d=l;const u=tn(e),{isLoading:m}=J();if(!l){const e=c?c.split(",").map(e=>n.find(t=>t.field===e)):n;d=t=>o(I,{variant:"outlined",sx:{pt:2,pb:2,pl:2}},e.map(e=>{const{field:n,headerName:i,valueGetter:r,type:a="string",jsxMobile:l}=e;return o(w,null,l?l(t,e):"boolean"===a?o(w,{component:"span",sx:{color:r({value:t[n]})?"green":"red"}},i):t[n])}),o(w,null,i.filter(e=>!!e).map(e=>{const{key:n,handler:i,icon:r=o(Qt,null),...a}=e;return o(ie,Object.assign({onClick:e=>"function"==typeof i&&i({...u,record:t},n)},a),r)})))}return o(s,null,o(Pn,{isLoading:m}),o(be,{linkType:e=>!(!r||!Vn(e,a))&&"edit",primaryText:d,sx:t}))},Un=e=>{const t=C(e=>e.breakpoints.down("md")),{hasEdit:n}=pe(e);(e=>{const{onRenderGrilla:t,onLoadGrilla:o}=e,{isLoading:n}=J(),i=tn(e);c(()=>{t&&t(i)},[]),c(()=>{n||o&&o(i)},[n])})(e);const{desktopSize:i=!1}=e;return o(Ao,null,o(t&&!1===i?Gn:Hn,Object.assign({},e,{hasEdit:n})))},Jn=e=>{const{filterValues:t,setFilters:n,tabs:{ids:i,...r},GridComponent:a=Un,...l}=e,c=t.id;return o(s,null,o(to,{value:c,indicatorColor:"primary",onChange:(e,o)=>{n({...t,id:o})}},i.map(e=>o(eo,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e}))),o(Xt,null),o(a,Object.assign({},l,r[c])))},Yn=e=>{const{useFormulario:t=en,...o}=e;return{fichaProps:{...t(o),etrs:o.etrs}}},Qn=(e,t)=>ve(e,{id:"-1"},t),Zn=e=>e.split("_")[1],Kn=/^\d{2}\/\d{2}\/\d{4}$/,Xn=e=>{if(!(e instanceof Date)||isNaN(e.getDate()))return"";const t=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),n=e.getDate().toString();return`${t}-${("00"+o).slice(-2)}-${("00"+n).slice(-2)}`},ei=e=>{if(null==e||""===e)return"";if(e instanceof Date)return Xn(e);if(Kn.test(e)){const t=e.split("/");return t[2]+"-"+t[1]+"-"+t[0]}return Xn(new Date(e))},ti=e=>{if(!e)return"";const t=e.split("-");return t[2]+"/"+t[1]+"/"+t[0]},oi=/^\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}$/,ni=e=>{if(null==e||""===e)return"";if(e instanceof Date)return Xn(e);if(oi.test(e)){const t=e.split(" "),o=t[0].split("/");return o[2]+"-"+o[1]+"-"+o[0]+" "+t[1]}return Xn(new Date(e))},ii=e=>{if(!e)return"";const t=e.split("T"),o=t[0].split("-");return o[2]+"/"+o[1]+"/"+o[0]+" "+t[1]},ri=e=>{if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf(":")){const t=e.split(":");let o=new Date;return o.setHours(t[0]),o.setMinutes(t[1]),o.toString()}{const t=/(\d{2}):(\d{2})/.exec(e);if(null===t)return;let o=new Date;return o.setHours(t[0]),o.setMinutes(t[1]),o.toString()}},ai=(e,t)=>e?e.split(" ")[4].substring(0,5):"",li=e=>{const{source:t}=e,n=Jt(e=>{const o=e.configInputs?e.configInputs.filter(e=>e.id===t):[];return o[0]?o[0]:null}),{hidden:i}=n||{};return!i&&o(no,{variant:"h6",gutterBottom:!0,id:e.source},e.children)},si=({children:e,className:t,data:n,hasShow:i,hasList:r=!0,...a})=>o(ye,Object.assign({className:t},(({...e})=>e)(a)),e,r&&o(Ce,{label:"ra.action.back",icon:o(oo,null)}),i&&o(xe,{record:n})),ci=we(),di=[ci,ke(1)],ui={inputFormat:"dd/MM/yyyy"},mi=e=>(t,o)=>{const n=o[e];if(t&&n){const e=new Date(n.split("/").reverse().join("/")),o=new Date(t.split("/").reverse().join("/"));if(io(e,o))return{message:"validation.greater_or_equal",args:{menor:n}}}},pi=(e="es")=>({locale:"en"===e?ro:ao}),gi=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],fi=(e,t)=>{const o=document.createElement("a");o.style.display="none",document.body.appendChild(o),o.setAttribute("href",e),o.setAttribute("download",t),o.click()},hi=e=>{if(!e)return"";const[t,o,n]=e.split("/").map(Number);return new Date(n,o-1,t)},bi=e=>{if(!e)return"";const[t,o]=e.split(" "),[n,i,r]=t.split("/").map(Number),[a,l]=o.split(":").map(Number);return new Date(r,i-1,n,a,l)},vi=e=>e?`${String(e.getDate()).padStart(2,"0")}/${String(e.getMonth()+1).padStart(2,"0")}/${String(e.getFullYear())}`:"",yi=e=>e.toLocaleString("es",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(",",""),Ci=(e,t)=>{const o=K(),{data:n,isLoading:i,error:r}=ve("cb_"+Zn(o)+"_"+e,{id:t});return i||r?"":(null==n?void 0:n.etiqueta)||""},xi={form:"FormEtriek-form",tab:"FormEtriek-tab",contenido:"FormEtriek-contenido"},wi=e=>({["& ."+xi.form]:{maxHeight:"70vh",overflow:"auto"},["& ."+xi.tab]:{display:"block",maxHeight:"65vh",overflow:"auto"},["& ."+xi.contenido]:{[e.breakpoints.up("xs")]:{width:"100%"},[e.breakpoints.up("md")]:{width:"12vw","&.MuiAutocomplete-root":{width:"16vw"}}}}),ki=()=>{},Ti=e=>{const{fichaProps:{onBeforeSubmitFicha:t}}=i(rn),o=on(e),n=Y(),{save:r}=Te(),a=l(async e=>{const i=t&&await t({form:{getValues:()=>e},...o},"N");return"string"==typeof i?void n(i,{type:"error"}):void 0===i||i?r(e):void 0},[t,n,ki,r]);return"function"==typeof t?a:void 0},Oi=e=>{const{useFormulario:t=en,enableLoad:n=!0,...i}=e,r=K(e),{data:l,isLoading:s}=Qn(r,{enabled:n}),{fichaProps:c}=Yn(e),d=a(()=>({estado:"N",initialValues:l,isLoading:s,fichaProps:c}),[l,s,c]);return o(Lo,null,o(rn.Provider,{value:d},o(Oe,Object.assign({redirect:"list"},i,null==c?void 0:c.panel))))};Oi.propTypes={useFormulario:Ot.func};const Si=wt(Oi,{name:"FormEtriek",overridesResolver:(e,t)=>t.root})(({theme:e})=>wi(e));function Ri(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(o=Ri(e[t]))&&(n&&(n+=" "),n+=o);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ei(){for(var e,t,o=0,n="";o<arguments.length;)(e=arguments[o++])&&(t=Ri(e))&&(n&&(n+=" "),n+=t);return n}const Pi=e=>{const t=q(),{resource:n,className:i,icon:r,label:a="ra.action.delete",...l}=e,s=re(),[c,{isLoading:d}]=Se(n,{id:s.id});return o(so,{title:t("ra.action.delete")},o(lo,Object.assign({disabled:d,onClick:()=>c(),label:a,className:Ei("ra-delete-button",i),key:"button"},(({...e})=>e)(l),{size:"large"}),r))};Pi.defaultProps={redirect:"list",icon:o(Nt,null)};const ji=e=>{const t={};for(const o in e)"string"==typeof e[o]&&0===e[o].trim().length||(null==e[o]&&(e[o]=""),t[o]=e[o]);return t},_i=wt(e=>{const{useFormulario:t=en,mutationMode:n="pessimistic",...i}=e,r=Re({mutationMode:n,...i}),{record:l,isLoading:s}=r,{fichaProps:c}=Yn(e),d=a(()=>({estado:"M",initialValues:l,isLoading:s,fichaProps:c}),[l,s,c]);return o(Lo,null,o(rn.Provider,{value:d},o(Ee,Object.assign({mutationMode:n,transform:ji},i,null==c?void 0:c.panel))))},{name:"FormEtriek",overridesResolver:(e,t)=>t.root})(({theme:e})=>wi(e)),Ni=t((e,t)=>{const{isOpen:n,onSubmit:i,onClose:r,title:a,dialogText:l,children:s,hasAccept:c=!0,hasCancel:d=!0,isLoading:u=!1}=e,m=K(e),p=e=>{r&&r(e)};return o(It,{ref:t,open:n,fullWidth:!0,onClose:p,"aria-labelledby":"form-dialog-title"},o(Bt,{id:"form-dialog-title"},a),o(de,{resource:m,onSubmit:i},o(Lt,{dividers:!0},o(Dt,null,l),o(co,{sx:{mt:2}},s)),(c||d)&&o(Mt,null,d&&o(ie,{label:"ra.action.cancel",disabled:u,onClick:e=>p(e)},o(_t,null)),c&&o(ue,{alwaysEnable:!0,label:"Ok",disabled:u}))))}),Fi={},Ii={pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},Mi=e=>{const t=Do(),n=K(e),{estado:r,isLoading:a,initialValues:l,fichaProps:s}=i(rn),d=nn({resource:n,etrs:s.etrs});return c(()=>{s.onRenderFicha&&s.onRenderFicha(d,r)},[]),c(()=>{a||s.onLoadFicha&&s.onLoadFicha(d,r,l)},[a]),o(M,{sx:{...e.sx,...t.open?Ii:Fi}},t.open&&o(L,{sx:{position:"absolute",left:"50%",top:"50%"},thickness:4,size:50}),e.children)},Li=e=>{const{initialValues:t,fichaProps:{config:n={}}}=i(rn),r=Ti(e);return t?o(Pe,Object.assign({mode:"onBlur"},e,{onSubmit:r,defaultValues:t,component:Mi},n)):null};Li.propTypes={...Pe.propTypes};const Di=e=>{const{handleToggle:t,isOpen:n,name:i,icon:r,children:a,dense:l}=e,s=q(),[c]=je(),d=o(b,{dense:l,onClick:t},o(v,{sx:{minWidth:5}},n?o(uo,null):r),o(x,{variant:"inherit",color:"textSecondary"},s(i)));return o("div",null,c||n?d:o(_,{title:s(i),placement:"right"},d),o(D,{in:n,timeout:"auto",unmountOnExit:!0},o(B,{dense:l,component:"div",disablePadding:!0,sx:{paddingLeft:(e.children.props.children[0]?e.children.props.children[0].key:"").startsWith("menu")?2:0,backgroundColor:e=>Tt(e.palette.secondary.light,.24),"& a":{transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",paddingLeft:c?4:2}}},a)))},Bi=e=>{const{items:t,translate:n,...i}=e,{state:r,handleToggle:a,dense:l}=i;return t&&o("div",null,t.map(e=>{const{name:t,menu:s,label:c,icon:d="settings"}=e;return s?o(Di,{key:t,name:c,handleToggle:()=>a(t),isOpen:r[t],icon:o(Qt,null),dense:l},Bi({items:s,translate:n,...i})):o(_e,{key:t,to:"/"+t,primaryText:n(`resources.${t}.name`,{_:c}),dense:l,leftIcon:o(Qt,null)})}))},Ai=({dense:e=!1})=>{const t=q(),[n,i]=r({mnuPrueba:!1}),a=C(e=>e.breakpoints.down("sm")),[l]=je(),s=JSON.parse(localStorage.getItem("menus")),c=Bi({items:s,handleToggle:e=>{i(t=>({...t,[e]:!t[e]}))},state:n,activeClassName:"",iconClass:"",className:"",open:l,dense:e,translate:t});return o(w,{sx:{width:l?230:50,marginTop:1,marginBottom:1,transition:e=>e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}},o(Ne,null,o(Fe,{primaryText:t("ra.page.dashboard")}),c,a&&o(_e,{to:"/configuration",primaryText:t("pos.configuration"),leftIcon:o(Qt,null),dense:e})))};var Vi=e=>o(Ie,Object.assign({},e,{appBar:Io,menu:Ai}));const qi=(e,t)=>{alert("Falta implementar la función jsBotonGrilla")},zi=e=>{const{className:t,filters:n,children:r,hideFilterButton:l=!1,jsBotonGrilla:s=qi,...c}=e,{sort:m,displayedFilters:p,filterValues:g,exporter:f,showFilter:h,total:b}=J(e),v=K(e),{hasCreate:y}=pe(e),C=i(Me)||n,x=J(e),w={...tn(e),...x};return delete c.hasCreate,a(()=>o(ye,Object.assign({className:t},Le(c)),l?null:n?u(n,{resource:v,showFilter:h,displayedFilters:p,filterValues:g,context:"button"}):C&&o(De,null),y&&o(Be,null),!1!==f&&o(Ae,{disabled:0===b,resource:v,sort:m,filterValues:g}),d.map(r,(e,t)=>u(e,{onClick:e.props.options?null:t=>{e.props.onClick&&e.props.onClick(t),s(w,e.key)},options:e.props.options?e.props.options.map(t=>({...t,onClick:o=>{e.props.onClick&&e.props.onClick(o),s(w,t.key)}})):null}))),[v,p,g,n,h,C,b,t,m,l,f,y])},$i=e=>{const{loginBackgroundImage:t,nameSource:n="username",passwordSource:i="password"}=e,[a,l]=r(!1),s=q(),c=s("ra.auth.sign_in"),d=Y(),u=Ve(),m=bt();return o(de,{onSubmit:e=>{l(!0),u(e,m.state?m.state.nextPathname:"/").catch(e=>{l(!1),d("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error",{type:"error",messageArgs:{_:"string"==typeof e?e:e&&e.message?e.message:void 0}})})},validate:e=>{const t={};return e[n]||(t[n]=s("ra.validation.required")),e[i]||(t[i]=s("ra.validation.required")),t}},o(w,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundImage:t,backgroundRepeat:"no-repeat",backgroundSize:"cover"}},o(go,{sx:{minWidth:300,marginTop:"6em"}},o(w,{sx:{margin:"1em",display:"flex",justifyContent:"center"}},o(mo,{sx:{backgroundColor:"secondary.main"}},o(f,null))),o(w,{sx:{marginTop:"1em",marginBottom:"1em",display:"flex",justifyContent:"center",color:"grey.600"}},"Inicio de Sesión"),o(w,{sx:{padding:"0 1em 1em 1em"}},o(w,{sx:{marginTop:0}},o(qe,{autoFocus:!0,fullWidth:!0,name:n,label:s("ra.auth.username"),disabled:a})),o(w,{sx:{marginTop:0}},o(ze,{name:i,label:s("ra.auth.password"),type:"password",disabled:a}))),o(fo,{sx:{padding:"0 1em 1em 1em"}},o(po,{variant:"contained",type:"submit",color:"primary",disabled:a,fullWidth:!0},a&&o(ho,{sx:{position:"absolute"},size:18,thickness:2}),c)))))},Wi=e=>{var t;const{options:n=[],icon:i,label:a,disabled:l,...s}=e,[c,d]=r(!1),u=p(),[m,g]=r(0),f=K(e);return o(w,Object.assign({sx:{display:"inline-block"}},(({...e})=>e)(s)),o(ie,{size:"large",className:"add-filter",label:a,onClick:e=>{e.preventDefault(),d(!0),u.current=e.currentTarget},title:n[m].label,disabled:l},(null===(t=n[m])||void 0===t?void 0:t.icon)||i),o(bo,{open:c,anchorEl:u.current,onClose:e=>{u.current&&u.current.contains(e.target)||d(!1)}},n.map((e,t)=>o(vo,{key:e.label,disabled:e.disabled,selected:t===m,onClick:o=>{((e,t)=>{g(t),d(!1)})(0,t),e.onClick&&e.onClick(o,t)},resource:f,title:e.label},e.icon,o(w,{component:"span",sx:{paddingRight:"4px"}}),o($e,{label:e.label,resource:f})))))},Hi=e=>{const{fields:t,className:n,...i}=e,{campos:r,separador:a="",secundario:l=[],hasSecundario:s}=t,c=re(),d=r.map(e=>void 0!==c[e]?c[e]:e).join(""+a);return o(no,Object.assign({noWrap:!0,variant:"inherit",className:n},i),d,s&&o(no,{component:"span",display:"block",color:"textSecondary",variant:"caption"},l.map(e=>`${e.etiqueta||"---"}: ${c[e.campo]||"---"}`).join(" ")))},Gi=wt(e=>{const{useFormulario:t=en,...n}=e,i=We(n),{record:r,isLoading:l}=i,{fichaProps:s}=Yn(e),c=a(()=>({estado:"M",initialValues:r,isLoading:l,fichaProps:s}),[r,l,s]);return o(Lo,null,o(rn.Provider,{value:c},o(He,Object.assign({},n,i,null==s?void 0:s.panel))))},{name:"FormEtriek",overridesResolver:(e,t)=>t.root})(({theme:e})=>wi(e)),Ui=e=>{const{icon:t=Yi,label:n="ra.action.show",scrollToTop:i=!0,...r}=e,a=K(e),l=re(e),s=me();return l?o(jn,Object.assign({component:ht,to:s({type:"show",resource:a,id:l.id}),state:Ji[String(i)],label:n,onClick:Qi},r),t):null},Ji={true:{_scrollToTop:!0},false:{}},Yi=o(yo,null),Qi=e=>e.stopPropagation();Ui.propTypes={icon:Ot.element,label:Ot.string,record:Ot.any,scrollToTop:Ot.bool};const Zi=g(Ui,(e,t)=>e.resource===t.resource&&(e.record&&t.record?e.record.id===t.record.id:e.record==t.record)&&e.label===t.label&&e.disabled===t.disabled),Ki=e=>{const{children:t,className:n,component:a=er,formRootPathname:l,syncWithLocation:s=!0,tabs:c=Xi,toolbar:p=tr,onChange:g,...f}=e,h=bt(),b=yt(""),v=K(e),[y,C]=r(0),{fichaProps:{etrs:x}}=i(rn),w=nn({...e,etrs:x}),{estado:k}=i(rn),T=(e,t)=>{s||(C(t),g&&g(w,k,{newTab:t,prevTab:y,setTab:C},e))},O=()=>u(c,{onChange:T,syncWithLocation:s,url:l,value:y},t);return o(or,Object.assign({className:Ei("tabbed-form",n)},nr(f)),s?o(Ct,null,o(xt,{path:"/*",element:O()})):O(),o(A,null),o(a,null,d.map(t,(e,t)=>{if(!e)return null;const o=Ue(e,t),n=s?!vt(`${b.pathname}/${o}`,h.pathname):y!==t;return m(e)?u(e,{intent:"content",resource:v,hidden:n,value:s?o:t}):null})),!1!==p?p:null)},Xi=o(Je,null),er=({children:e})=>o(M,null,e),tr=o(Ye,null),or=wt("div",{name:"RaTabbedForm",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"& .MuiTab-root.RaTabbedForm-errorTabButton":{color:e.palette.error.main}})),nr=({...e})=>e,ir=e=>{const{...t}=e,n=(()=>{const e=bt(),t=vt(":resource/create/*",e.pathname),o=vt(":resource/:id/*",e.pathname);return t?t.pathnameBase:o?o.pathnameBase:""})();return o(de,Object.assign({formRootPathname:n},t),o(Ki,Object.assign({formRootPathname:n},rr(e))))};ir.Tab=Ge;const rr=({...e})=>e,ar=e=>{const{initialValues:t,fichaProps:{config:n={}}}=i(rn),r=Ti(e);return t?o(ir,Object.assign({mode:"onBlur"},e,{onSubmit:r,defaultValues:t,component:Mi},n)):null};ar.defaultProps={syncWithLocation:!1};const lr={...Qe,palette:{...Qe.palette,mode:"dark"},components:{...Qe.components,MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}}};var sr={__proto__:null,lightTheme:{...Qe,palette:{...Qe.palette,mode:"light"},components:{...Qe.components,MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}}},darkTheme:lr};Co.ra.page.empty="No records yet";const cr={...Co,from_camera:"From camera",take_foto:"Take photo",login:{id:"ID",hint:"Login",required:"Insert Username or ID",send:"Send",email:"Enter your email address",check_email:"Check your email inbox, we just send you a verification code!",must_enter_credentials:"You must first enter Username or ID",restore_password:"Restore Password",punch_in:"Punch In"},pos:{search:"Search",change_pin:"Change Pin",change_password:"Change Password",configuration:"Configuration",language:"Language",theme:{name:"Theme",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Welcome",subtitle:"Employee Management",aor_button:"Metiri WebSite"}}},validation:{greater_or_equal:"Must be greater than or equal to %{menor}"}};xo.ra.notification.created="Datos guardados correctamente",xo.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",xo.ra.page.dashboard="Inicio",xo.ra.page.empty="Sin registros todavía",xo.ra.page.invite="¿Quiere agregar uno?",xo.ra.page.list="%{name}",xo.ra.page.edit="Editar %{name}",xo.ra.action.back="Volver",xo.ra.message.delete_title="Eliminar",xo.ra.input.file.upload_single="Seleccione o arrastre archivo",xo.ra.input.image.upload_single="Seleccione o arrastre imagen";const dr={...xo,from_camera:"Desde camara",take_foto:"Tomar foto",login:{id:"Cédula",hint:"Inicio de Sesión",required:"Ingrese Usuario o Cédula",email:"Ingrese su email aquí",send:"Enviar",check_email:"Revisa tu correo electrónico, te enviaremos un código de verificación!",must_enter_credentials:"Debe ingresar Nº de Usuario o Cédula y Contraseña primero",restore_password:"Restablecer Contraseña",punch_in:"Generar Marcas"},pos:{search:"Búsqueda",change_pin:"Cambiar Pin",change_password:"Cambiar Contraseña",configuration:"Configuración",language:"Lenguaje",theme:{name:"Tema Visual",light:"Light",dark:"Dark"},dashboard:{welcome:{title:"Bienvenid@",subtitle:"Gestión de Funcionarios",aor_button:"Sitio de Metiri"}}},validation:{greater_or_equal:"Debe ser mayor o igual a %{menor}"}},ur=e=>{const{propsContenido:t,hidden:n}=ln(e),i=re(),r=JSON.parse(JSON.stringify(i)),a=r[e.source];return r[e.source]=""!=a&&"0"!=a,!n&&o(Ze,Object.assign({},t,{record:r}))},mr=t=>{const[o,n]=r(!1),[i,a]=r(!1),l=Y(),d=q(),{field:u,sx:m}=t;return c(()=>{o&&(async()=>{let e=null;try{e=await navigator.mediaDevices.getUserMedia({video:!0,audio:!1}),document.getElementById("video").srcObject=e}catch(e){l(e.message,{type:"error"}),n(!1)}})()},[o]),e.createElement(s,null,e.createElement(ce,{isOpen:o,loading:!o,maxWidth:"sm",title:"",content:e.createElement(w,{display:"flex",flexDirection:"column"},e.createElement(V,{variant:"outlined",disableElevation:!0,onClick:()=>{const e=document.getElementById("video"),t=document.getElementById("canvas");t.getContext("2d").drawImage(e,0,0,t.width,t.height),a(!0)},startIcon:e.createElement(ko,null)},d("take_foto")),e.createElement("video",{id:"video",width:"320",height:"240",autoPlay:!0,style:{border:"solid 1px"}}),e.createElement("div",{id:"dataurl-container",style:{border:"dotted 1px",width:320,height:240,marginTop:4}},e.createElement("canvas",{id:"canvas",width:"320",height:"240"}))),onConfirm:e=>{i&&document.getElementById("canvas").toBlob(function(e){const t=document.getElementById("video"),o=document.getElementById(u),i=new DataTransfer;let r=new File([e],u+"-img.jpg",{type:"image/jpeg",lastModified:(new Date).getTime()});i.items.add(r),o.files=i.files,o.dispatchEvent(new Event("change",{bubbles:!0})),t.srcObject.getTracks().forEach(e=>e.stop()),a(!1),n(!1)},"image/jpeg")},onClose:()=>{a(!1),n(!1)}}),e.createElement(so,{title:d("from_camera")},e.createElement(V,{sx:m,onClick:()=>{n(!0)}},e.createElement(To,null))))},pr=e=>{const{source:t}=e,{estado:o,isLoading:n,fichaProps:r={}}=i(rn),a=i(an),l=void 0!==a,s=Jt(e=>{const o=e.configInputs?e.configInputs.filter(e=>e.id===t):[];return o[0]?o[0]:null}),{disabled:c,hidden:d,required:u,error:m}=s||{},g=!0===u?ci:void 0,f="function"==typeof m?m:()=>m,{[t]:h={},etrs:b}=r,{onFocus:v,onChange:y,onBlur:C,hidden:x=!1,disabled:w=!1,validate:k,...T}=e,{field:O}=ae(e),{onFocus:S,onBlur:R,onChange:E,hidden:P,disabled:j,useContenido:_=en,validate:N,...F}=h,I=l||void 0===P?x:P,M=l||void 0===j?w:j,L=l||void 0===S?v:S,D=l||void 0===R?C:R,B=l||void 0===E?y:E,A=nn({...e,etrs:b,asisEtr:a}),V=_({...T,estado:o,hidden:I,isLoading:n,utils:A,...F}),q=p(O.value);if(void 0===V)throw new Error(`useContenido está devolviendo undefined para el contenido ${t}\n Asegúrese de incluir una instrucción return al final de la función`);const{hidden:z,disabled:$,onFocus:W,onChange:H,onBlur:G,validate:U,...J}=V,Y=W||L,Q=G||D,Z=H||B,K={...A,prev:q.current};return{propsContenido:{sx:{mt:1,mb:1,ml:{xs:0,md:1},mr:{xs:0,md:1}},onFocus:e=>{Y&&L(A,o,e),q.current=e.target.value},onBlur:e=>Q&&Q(K,o,e),onChange:e=>Z&&Z(K,o,e),helperText:!1,validate:[...Array.isArray(k)?k:[k],...Array.isArray(N)?N:[N],...Array.isArray(U)?U:[U],g,f].filter(e=>void 0!==e),...T,...F,...J,disabled:void 0!==c?c:void 0!==$?$:M},hidden:void 0!==d?d:void 0!==z?z:I}},gr=(e,t)=>e&&""!==e?"string"==typeof e?{src:`${t}/${e}`}:e instanceof Array?e.map(e=>({src:`${t}/${e}`})):e:void 0,fr=e=>{const{propsContenido:t,hidden:n}=pr(e),i=q(),r=C(e=>e.breakpoints.down("sm")),{options:a={},disabled:l=!1,tipo:s="file",camera:c=!0,prefix:d,...u}=t;return!n&&("image"===s?o(wo,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",divider:o(Xt,{orientation:"vertical",variant:"middle",flexItem:!0})},o(Ke,Object.assign({maxSize:5e6},u,{options:{disabled:l,...a},format:e=>gr(e,d),placeholder:i("ra.input.image.upload_single"),accept:"image/*",inputProps:{capture:"user"}}),o(Xe,{source:"src",title:""})),!r&&o(mr,{sx:{mt:3},field:u.source})):o(wo,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",divider:o(Xt,{orientation:"vertical",variant:"middle",flexItem:!0})},o(et,Object.assign({maxSize:5e6},u,{options:{disabled:l,...a},format:e=>gr(e,d),placeholder:i("ra.input.file.upload_single")}),o(tt,{download:!0,source:"src",title:"Ver adjunto",target:"_blank"})),c&&o(mr,{sx:{mt:3},field:u.source})))},hr=e=>{const{propsContenido:{sx:t,...n},hidden:i}=pr(e);return!i&&o(ot,Object.assign({},n,{sx:{...t,display:"inline-flex",margin:1}}))},br=t((e,t)=>o(_,Object.assign({ref:t},e))),vr=e=>{var t;const{callback:n,sx:i,isTC:r,onChange:a,...l}=e,{isLoading:s,allChoices:d}=it(),u=p(null);return c(()=>{s||"function"==typeof n&&n(Object.values([d]))},[d,n,s]),o(br,{title:(null===(t=u.current)||void 0===t?void 0:t.value)||"",placement:"top",arrow:!0},o(w,{component:"span",sx:r?{margin:1,...i}:{display:{xs:"inherit",md:"inline-flex"},margin:1,...i},width:r?{}:{xs:"100%",md:"auto"}},o(rt,Object.assign({size:"small",sx:r?{width:"100% !important"}:{}},l,{onChange:e=>{a({target:{value:e}})},TextFieldProps:{inputRef:u}}))))},yr=e=>{const{propsContenido:t,hidden:n}=pr(e),i=Ut(),{source:r,reference:a}=e,l=Jt(e=>{const t=e.reload_cb?e.reload_cb.filter(e=>e.id===r):[];return t[0]?t[0]:null}),s=p(l),d=null===l&&s.current?s.current:l;let u,m;if(d){const{callback:e,...t}=d;u=e,m=t}return c(()=>{null!==l&&(s.current=l,i(zo(r)))},[JSON.stringify(l)]),n?null:o(nt,{reference:a,source:r,perPage:500,filter:m},o(vr,Object.assign({},t,{callback:u,optionText:"etiqueta",optionValue:r})))},Cr=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(at,t)},xr=e=>{const{title:t,source:n,src:i}=e,r=re(e);return o(mo,{title:t,src:`${i}/${r[n]}`})},wr=e=>{const{propsContenido:t,hidden:n}=pr(e),{source:i,reference:r}=e;return n?null:o(lt,{source:i,reference:r},o(st,Object.assign({},t,{optionText:"etiqueta",optionValue:e.source})))},kr=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(ze,t)},Tr=e=>{const{propsContenido:t,hidden:n}=pr(e),{isLoading:r}=i(rn),{source:a,reference:l}=e;return r||n?null:o(nt,{source:a,reference:l},o(ct,Object.assign({},t,{optionText:"etiqueta",optionValue:e.source})))},Or=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(ct,t)},Sr=e=>o(jo,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},o(I,e)),Rr={cursor:"move"},Er=e=>{const{isOpen:t,isLoading:n,title:i,content:r,cancel:a,ConfirmIcon:s,CancelIcon:c,onClose:d,onConfirm:u,contentResource:m,translateOptions:p={}}=e,g=q(),[f]=dt(m),h=l((e,t)=>{e.stopPropagation(),u(e,f)},[f,u]),b=l(e=>{e.stopPropagation()},[]);return o(It,{open:t,onClose:d,onClick:b,fullWidth:!0,maxWidth:"lg",PaperComponent:Sr,"aria-labelledby":"draggable-dialog-title"},o(Bt,{style:Rr,id:"draggable-dialog-title"},g(i,{_:i,...p})),o(Lt,{dividers:!0},r),o(Mt,null,o(po,{disabled:n,onClick:d},o(c,{sx:{paddingRight:"0.5em"}}),g(a,{_:a})),o(po,{disabled:n,onClick:e=>h(e,"yes"),autoFocus:!0},o(s,{sx:{paddingRight:"0.5em"}}),g("ra.action.confirm"))))};Er.propTypes={cancel:Ot.string,classes:Ot.object,confirm:Ot.string,confirmColor:Ot.string,ConfirmIcon:Ot.elementType,CancelIcon:Ot.elementType,content:Ot.node.isRequired,isOpen:Ot.bool,isLoading:Ot.bool,onClose:Ot.func.isRequired,onConfirm:Ot.func.isRequired,title:Ot.string.isRequired},Er.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Eo,CancelIcon:Po,isOpen:!1};const Pr=()=>o(s,null),jr={seleccion:[],all:!0,none:!1},_r=e=>!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":`Selección (${e.seleccion.length})`,Nr=e=>e,Fr=e=>{const{disabled:t,asistant:n,asistantResource:i,label:a,source:d,sx:u,...m}=e,[p,g]=r(!1),f=Ht();c(()=>{b()},[]);const h=l(()=>{g(!1)},[g]),b=e=>{f.setValue(d,{seleccion:[],all:!0,none:!1})};return o(s,null,o(w,{display:"flex",alignItems:"center",sx:{...u,display:"inline-flex",margin:1}},o(qe,Object.assign({defaultValue:jr},m,{source:d,label:a,disabled:!0,parse:Nr,format:_r,helperText:!1,InputProps:{endAdornment:o(s,null,o(lo,{onClick:e=>{f.setValue(d,{seleccion:[],all:!1,none:!0})},disabled:t,"aria-label":"Ninguno",size:"small",title:"Ninguno"},o(So,null)),o(lo,{onClick:b,disabled:t,"aria-label":"Todos",size:"small",title:"Todos"},o(Oo,null)),o(lo,{onClick:e=>g(!0),disabled:t,"aria-label":"Selección",size:"small",title:"Selección"},o(Ro,null)))}}))),o(Er,{isOpen:p,title:"Selección de "+a,contentResource:i,content:o(n,{bulkActionButtons:o(Pr,null),hasCreate:!1,exporter:!1,resource:i}),onConfirm:(e,t)=>{g(!1),f.setValue(d,{seleccion:t,all:!1,none:!1})},onClose:h}))},Ir=e=>o(ut,Object.assign({},e,{hasCreate:!1,exporter:!1,perPage:50,empty:!1,title:" ",disableSyncWithLocation:!0}),o(mt,{bulkActionButtons:o("span",null)},o(oe,{source:"funced",sortable:!0,label:"Cédula"}),o(oe,{source:"funpriape",sortable:!0,label:"Apellido"}),o(oe,{source:"funprinom",sortable:!0,label:"Nombre"}))),Mr={fillista:"empcod=-1"},Lr=e=>{const[t,n]=r(Mr),i=U(),a=l(e=>{n({fillista:e.node.key})},[n]),s=l(e=>i.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(e=>e.data).catch(()=>{throw new Error("Data Loading Error")}),[i]);return o(w,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},o(w,{flexGrow:1},o(_o,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:a,createChildren:s})),o(w,{flexGrow:2},o(Ir,{resource:"form_224",filter:t})))},Dr=e=>o(jo,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},o(I,e)),Br={cursor:"move"},Ar=e=>{const{isOpen:t,isLoading:n,title:i,cancel:r,ConfirmIcon:a,CancelIcon:s,onClose:c,onConfirm:d,translateOptions:u={}}=e,m=q(),p=l((e,t)=>{e.stopPropagation(),d(e,t)},[d]),g=l(e=>{e.stopPropagation()},[]);return o(It,{open:t,onClose:c,onClick:g,fullWidth:!0,maxWidth:"lg",PaperComponent:Dr,"aria-labelledby":"draggable-dialog-title"},o(Bt,{style:Br,id:"draggable-dialog-title"},m(i,{_:i,...u})),o(Lt,{dividers:!0},o(Lr,null)),o(Mt,null,o(po,{disabled:n,onClick:c},o(s,{sx:{paddingRight:"0.5em"}}),m(r,{_:r})),o(po,{disabled:n,onClick:e=>p(e,"yes"),autoFocus:!0},o(a,{sx:{paddingRight:"0.5em"}}),m("ra.action.confirm"))))};Ar.propTypes={cancel:Ot.string,classes:Ot.object,confirm:Ot.string,confirmColor:Ot.string,ConfirmIcon:Ot.elementType,CancelIcon:Ot.elementType,isOpen:Ot.bool,isLoading:Ot.bool,onClose:Ot.func.isRequired,onConfirm:Ot.func.isRequired,title:Ot.string.isRequired},Ar.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Eo,CancelIcon:Po,isOpen:!1};const Vr={seleccion:[],all:!0,none:!1},qr=e=>String(e)===e?"Selección (1)":!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":`Selección (${e.seleccion.length})`,zr=e=>e,$r=e=>{const{disabled:t,label:n="Funcionarios",allowNone:i=!0,source:a,sx:d,...u}=e,[m]=dt("form_224"),[p,g]=r(!1),f=Ht();c(()=>{b()},[]);const h=l(()=>{g(!1)},[g]),b=e=>{f.setValue(a,{seleccion:[],all:!0,none:!1})};return o(s,null,o(w,{display:"flex",alignItems:"center",sx:{...d,display:"inline-flex",margin:1}},o(qe,Object.assign({defaultValue:Vr},u,{source:a,label:n,disabled:!0,parse:zr,format:qr,helperText:!1,InputProps:{endAdornment:o(s,null,i&&o(lo,{onClick:e=>{f.setValue(a,{seleccion:[],all:!1,none:!0})},disabled:t,"aria-label":"Ninguno",size:"small",title:"Ninguno"},o(So,null)),o(lo,{onClick:b,disabled:t,"aria-label":"Todos",size:"small",title:"Todos"},o(Oo,null)),o(lo,{onClick:e=>g(!0),disabled:t,"aria-label":"Selección",size:"small",title:"Selección"},o(Ro,null)))}}))),o(Ar,{isOpen:p,title:"Selección de "+n,onConfirm:(e,t)=>{g(!1),f.setValue(a,{seleccion:m,all:!1,none:!1})},onClose:h}))},Wr=e=>{const{propsContenido:t,hidden:n}=pr(e);return!n&&o(qe,Object.assign({multiline:!0},t))},Hr=e=>{const{tipo:t,...n}=e,{propsContenido:i,hidden:r}=pr(n),a=Ht();c(()=>{i.value&&a.setValue(e.source,i.value)});const l={...i};return r?null:"N"===t||"D"===t?o(pt,l):"F"===t?o(gt,l):"Z"===t?o(ft,l):o(qe,"H"===t?Object.assign({},l,{type:"time"}):l)},Gr=e=>{const{source:t,label:n,sx:i}=e,{hidden:r}=pr(e);return r?null:o(w,{sx:{...i,display:"inline-flex",alignItems:"flex-start",marginLeft:{md:1},marginBottom:-1,width:{xs:"100%",md:"calc(24vw + 1em)"}}},o(qe,Object.assign({},e,{label:"",source:t,sx:{flex:1,marginTop:1}})),o(yr,Object.assign({},e,{source:t,label:n,isTC:!0,sx:{flex:3}})))};export{Io as AppBar,Pn as Asistente,Vo as AsistenteContext,ur as BooleanField,fr as Camino,hr as CheckBox,yr as ComboBox,Cr as ComboBoxManual,Si as CreateEtriek,Mn as CreateGridButton,Pi as DeleteButtonNoWarning,_i as EditEtriek,An as EditGridButton,Sn as EtrGrid,si as FichaActions,rn as FichaContext,Ar as FiltroFuncionarios,xi as FormClasses,Ni as FormDialog,Li as FormEtriek,En as GE,jn as GridButton,Un as GrillaEtriek,xr as ImageField,Vi as Layout,zi as ListActionsEtriek,wr as ListCheck,$i as Login,Ai as Menu,Wi as MenuButton,Hi as MultiTextField,kr as Password,Tr as RadioButton,Or as RadioButtonManual,li as Separador,Gi as ShowEtriek,Zi as ShowGridButton,Di as SubMenu,$r as TBSF,ar as TabbedFormEtriek,Jn as TabbedGrillaEtriek,Wr as TextArea,Hr as TextBox,Fr as TextBoxSelection,Gr as TextCombo,sn as TextField,gi as choicesEstado,ei as dateFormat,ui as dateFormatOptions,ti as dateParser,ni as dateTimeFormat,ii as dateTimeParser,yi as dateTimeToString,vi as dateToString,zo as deleteRecargarComboBox,fi as descargarLink,cr as enMessages,dr as esMessages,mi as etrFechaMayorQue,ci as etrRequerido,di as etrRequeridoNumerico,Zn as getFormcodFromResource,pi as localeOptions,qo as recargarComboBox,cn as renderCellComboBox,Wo as setDisableAction,Go as setErrorAction,$o as setHiddenAction,Ho as setRequireAction,hi as stringToDate,bi as stringToDateTime,sr as themes,ri as timeFormat,ai as timeParser,Xo as useAjax,pr as useContenidoController,gn as useEtrActions,ln as useFieldController,Do as useFormProgress,Ti as useFormSubmit,Ko as useGetJson,Yn as useInitFicha,Qn as useNuevo,Ci as useReferenceLabel,nn as useUtils,tn as useUtilsGrilla,on as useUtilsSubmit};
2
2
  //# sourceMappingURL=index.modern.js.map