biblio-react 1.7.16 → 1.7.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -0
- package/package.json +94 -94
package/dist/index.modern.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{forwardRef as e,createElement as n,useRef as r,useState as a,useEffect as t,useMemo as o,Fragment as i,Children as l,cloneElement as s,useCallback as c,createContext as u,useContext as d,isValidElement as m}from"react";import p from"@material-ui/icons/Lock";import f from"@material-ui/icons/VpnLock";import{useTranslate as g,MenuItemLink as h,AppBar as v,UserMenu as b,useGetOne as y,useMutation as C,useVersion as k,useGetList as N,Loading as S,useSafeSetState as P,useNotify as x,Button as T,SaveContextProvider as w,SaveButton as I,useDeleteWithConfirmController as R,Confirm as F,FormWithRedirect as O,useListContext as _,useRedirect as E,useRefresh as D,useUnselectAll as M,useResourceDefinition as L,SimpleList as B,Datagrid as V,EditButton as A,TopToolbar as q,ListButton as W,ShowButton as z,required as j,minValue as G,useResourceContext as H,Create as J,useDelete as U,useEditController as Z,Edit as Q,Notification as Y,CardContentInner as K,SimpleFormView as X,SimpleForm as $,Menu as ee,DashboardMenuItem as ne,defaultTheme as re,Layout as ae,Sidebar as te,sanitizeListRestProps as oe,CreateButton as ie,ExportButton as le,useLogin as se,FieldTitle as ce,useShowController as ue,Show as de,getTabFullPath as me,escapePath as pe,TabbedFormTabs as fe,Toolbar as ge,BooleanField as he,useInput as ve,useRecordContext as be,FileInput as ye,FileField as Ce,BooleanInput as ke,ReferenceInput as Ne,Labeled as Se,LinearProgress as Pe,SelectInput as xe,ReferenceArrayInput as Te,SelectArrayInput as we,PasswordInput as Ie,RadioButtonGroupInput as Re,TextInput as Fe,useDataProvider as Oe,List as _e,TextField as Ee,NumberInput as De,NumberField as Me,DateField as Le}from"react-admin";import{useSelector as Be,useDispatch as Ve}from"react-redux";import Ae,{string as qe,func as We,any as ze,bool as je}from"prop-types";import{alpha as Ge,createTheme as He,ThemeProvider as Je,useMediaQuery as Ue,CircularProgress as Ze,Divider as Qe,Paper as Ye,Box as Ke}from"@material-ui/core";import Xe from"@material-ui/core/Dialog";import $e from"@material-ui/core/DialogActions";import en from"@material-ui/core/DialogContent";import nn from"@material-ui/core/DialogContentText";import rn from"@material-ui/core/DialogTitle";import an from"@material-ui/core/Paper";import{makeStyles as tn,alpha as on,createTheme as ln}from"@material-ui/core/styles";import sn from"@material-ui/core/Typography";import{GridOverlay as cn,esES as un,DataGrid as dn}from"@material-ui/data-grid";import mn from"@material-ui/icons/Add";import pn from"@material-ui/icons/Cancel";import fn from"@material-ui/icons/Delete";import gn from"@material-ui/icons/Edit";import hn from"@material-ui/core/TableContainer";import{useForm as vn,Form as bn,Field as yn}from"react-final-form";import Cn from"@material-ui/core/Divider";import kn from"@material-ui/core/Tab";import Nn from"@material-ui/core/Tabs";import Sn from"@material-ui/core/styles/makeStyles";import Pn from"@material-ui/icons/ChevronLeft";import xn from"date-fns/locale/en-US";import Tn from"date-fns/locale/es";import wn from"moment";import In from"@material-ui/core/IconButton";import Rn from"@material-ui/core/Tooltip";import Fn from"classnames";import On from"@material-ui/core/Button";import _n from"@material-ui/icons/Settings";import En from"@material-ui/core/Collapse";import Dn from"@material-ui/core/List";import Mn from"@material-ui/core/ListItemIcon";import Ln from"@material-ui/core/MenuItem";import Bn from"@material-ui/icons/ExpandMore";import Vn from"@material-ui/core/Avatar";import An from"@material-ui/core/Card";import qn from"@material-ui/core/CardActions";import Wn from"@material-ui/core/CircularProgress";import zn from"@material-ui/core/TextField";import{ThemeProvider as jn}from"@material-ui/styles";import{useLocation as Gn,useRouteMatch as Hn,Route as Jn}from"react-router-dom";import Un from"@material-ui/core/Menu";import Zn from"ra-language-english";import Qn from"@blackbox-vision/ra-language-spanish";import Yn from"@material-ui/icons/Check";import Kn from"@material-ui/icons/RemoveCircleOutline";import Xn from"@material-ui/icons/Search";import $n from"@material-ui/icons/CheckCircle";import er from"@material-ui/icons/ErrorOutline";import nr from"react-draggable";import{TreeView as rr}from"devextreme-react";import{KeyboardDateInput as ar,KeyboardDateTimeInput as tr}from"react-admin-date-inputs";function or(){return(or=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function ir(e,n){if(null==e)return{};var r,a,t={},o=Object.keys(e);for(a=0;a<o.length;a++)n.indexOf(r=o[a])>=0||(t[r]=e[r]);return t}var lr=e(function(e,r){var a=g(),t=Be(function(e){return[e.admin.resources.form_275?1:0,e.admin.resources.form_59?1:0]}),o=t[1];return[t[0]?n(h,{ref:r,key:"/form_275",to:"/form_275",primaryText:a("pos.change_pin"),leftIcon:n(p,null),onClick:e.onClick}):null,o?n(h,{ref:r,key:"/form_59",to:"/form_59",primaryText:a("pos.change_password"),leftIcon:n(f,null),onClick:e.onClick}):null]}),sr=function(e){return n(b,e,n(lr,null))},cr=function(e){return n(v,or({},e,{elevation:1,userMenu:n(sr,null)}))},ur=function(e,n){return y(e,"-1",n)},dr=tn(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.type?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},header:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.light},rootPaper:{width:"100%",height:"40vh",borderRadius:0,marginTop:e.spacing(1)},rootOverlay:{flexDirection:"column","& .ant-empty-img-1":{fill:"light"===e.palette.type?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.type?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.type?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.type?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.type?"0.8":"0.08",fill:"light"===e.palette.type?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Ge(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"GE"}),mr=function(){var e=dr();return n(cn,{className:e.rootOverlay},n("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false"},n("g",{fill:"none",fillRule:"evenodd"},n("g",{transform:"translate(24 31.67)"},n("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),n("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"}),n("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"}),n("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"})),n("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"}),n("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)"},n("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),n("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})))),n("div",{className:e.label},"No hay registros"))},pr=function(e,n,r){return C({type:"deleteEtrRow",resource:e,payload:{params:n}},r)},fr=function(e,n,r,a){return C({type:e,resource:n,payload:{params:r}},a)},gr=["api","basePath","classes","className","confirmTitle","confirmContent","icon","record","redirect","onSuccess","onFailure","source","camposClaveFila"],hr=["filterBy","claves","sortModel","columns","reference","allowAdd","allowRemove","etrResource","enableLoad"],vr=tn(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.type?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},header:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.light},rootPaper:{width:"100%",height:"40vh",borderRadius:0,marginTop:e.spacing(1)},rootOverlay:{flexDirection:"column","& .ant-empty-img-1":{fill:"light"===e.palette.type?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.type?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.type?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.type?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.type?"0.8":"0.08",fill:"light"===e.palette.type?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Ge(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"EtrGrid"}),br={marginLeft:"1.6rem",fontWeight:"bold"},yr=n(fn,null),Cr=function(e){var r=e.basePath,a=e.confirmTitle,t=void 0===a?"ra.message.delete_title":a,o=e.confirmContent,l=void 0===o?"ra.message.delete_content":o,s=e.icon,u=void 0===s?yr:s,d=e.record,m=e.redirect,p=void 0!==m&&m,f=e.onSuccess,g=e.onFailure,h=e.source,v=e.camposClaveFila,b=ir(e,gr),y=vr(e),C=x(),k=R({record:d,redirect:p,basePath:r,onSuccess:f,onFailure:g}),N=k.open,S=k.loading,P=k.handleDialogOpen,w=k.handleDialogClose,I=pr(e.resource,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);C("ra.notification.deleted","info",{smart_count:1})},onFailure:function(e){C(e.message,"warning")}})[0],O=Object.keys(d).filter(function(e){return v.split(",").includes(e)}).reduce(function(e,n){return e[n]=d[n],e},{}),_=c(function(e){I({payload:{ge:h,clavesFila:O}})},[d]);return n(i,null,n(T,or({key:"button",onClick:P,className:y.deleteButton},b),u),n(F,{isOpen:N,loading:S,title:t,content:l,onConfirm:_,onClose:w}))},kr=function(e){return n(Xe,{open:e.open,onClose:e.onClose,fullWidth:!0},n(rn,null,e.labelEstado+" "+e.label),n(nn,null,n(sn,{component:"span",display:"block",variant:"subtitle1",style:or({},br)},e.msgTitle),e.msgDesc),n(O,{resource:e.resource,save:e.save,render:e.render,initialValues:e.initialValues}))};kr.propTypes={label:qe,onClick:We,icon:ze,open:je,onClose:We,labelEstado:qe,msgTitle:ze,msgDesc:ze,resource:ze,save:We,render:We};var Nr=function(e){return n(Cr,{api:!0,confirmTitle:"ra.action.delete",source:e.source,record:e.row,resource:e.resource,camposClaveFila:e.camposClaveFila})},Sr=function(e){var r=e.editors,a=e.record,t=e.clavesFila,c=e.camposClaveFila,u=e.resource,d=e.label,m=e.source,p=e.etrResource,f=P(!1),h=f[0],v=f[1],b=ur(p,{enabled:h}).data,y=fr("createEtrRow",u,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);v(!1),N("ra.notification.created","info")},onFailure:function(e){N(e.message,"warning")}}),C=y[0],k=y[1].loading,N=x(),S=g()("ra.action.create"),R=function(e){C({payload:{data:or({},e,t),ge:m,camposClaveFila:c,estado:"N"}})},F=o(function(){return{save:R,setOnFailure:function(e){return console.log(e)}}},[R]);return n(i,null,n(T,{onClick:function(e){v(!0),e.stopPropagation()}},n(mn,null)),n(w,{value:F},n(kr,{open:h,onClose:function(e){v(!1),e.stopPropagation()},labelEstado:S,label:d,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:u,save:R,initialValues:b,render:function(e){var t=e.handleSubmitWithRedirect,o=e.pristine,c=e.saving;return n(i,null,n(en,null,l.map(r,function(e,n){return s(e,{resource:u,estado:"N",initialValue:a[e.props.source],fullWidth:!0,disabled:void 0!==e.props.disabled&&e.props.disabled,InputLabelProps:{shrink:!0}})})),n($e,null,n(I,{handleSubmitWithRedirect:t,pristine:o,saving:c,disabled:k}),n(T,{label:"ra.action.cancel",onClick:function(e){v(!1),e.stopPropagation()},disabled:k},n(pn,null))))}})))},Pr=function(e){var r=e.editors,a=e.clavesFila,t=e.camposClaveFila,o=e.resource,c=e.label,u=e.source,d=e.row,m=x(),p=g(),f=P(!1),h=f[0],v=f[1],b=fr("updateEtrRow",o,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);v(!1),m("ra.notification.updated","info",{smart_count:1})},onFailure:function(e){m(e.message,"warning")}}),y=b[0],C=b[1].loading,k=p("ra.action.edit");return n(i,null,n(T,{onClick:function(e){v(!0),e.stopPropagation()}},n(gn,null)),n(kr,{open:h,onClose:function(e){v(!1),e.stopPropagation()},labelEstado:k,label:c,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:o,save:function(e){y({payload:{data:or({},a,e),ge:u,camposClaveFila:t,estado:"M"}})},render:function(e){var a=e.handleSubmitWithRedirect,c=e.pristine,u=e.saving;return n(i,null,n(en,null,l.map(r,function(e,n){return s(e,{resource:o,estado:"M",initialValue:d[e.props.source],fullWidth:!0,disabled:-1!=t.indexOf(e.props.source),InputLabelProps:{shrink:!0}})})),n($e,null,n(I,{handleSubmitWithRedirect:a,pristine:c,saving:u,disabled:C}),n(T,{label:"ra.action.cancel",onClick:function(e){v(!1),e.stopPropagation()},disabled:C},n(pn,null))))}}))},xr=He({},un),Tr=function(e){var i=e.filterBy,l=void 0===i?"":i,s=e.claves,c=e.sortModel,u=e.columns,d=e.reference,m=e.allowAdd,p=void 0===m||m,f=e.allowRemove,g=void 0===f||f,h=e.etrResource,v=e.enableLoad,b=void 0===v||v,y=ir(e,hr),C=e.record,P=r(!1),x=vr(e),T=k(),w=a(c)[1],I=c[0],R=I.field,F=I.sort;t(function(){P.current=!0},[T]);var O=Object.keys(C).filter(function(e){return s.split(",").includes(e)}).reduce(function(e,n){return e[n]=C[n],e},{}),_={};l.split(",").forEach(function(e){e&&(_[e]=[{type:"string",comparison:"eq",value:C[e],field:e}])});var E=N(d,{page:1,perPage:200},{field:R,order:F},_,{enabled:b&&P.current}),D=E.data,M=E.ids,L=E.loading,B=o(function(){return M.map(function(e){return D[e]})},[M,D]),V=[p?{field:"BTN",headerName:"",sortable:!1,renderHeader:function(e){return n(Sr,or({},y,{etrResource:h,camposClaveFila:s,clavesFila:O,api:e.api}))}}:{}].concat(u,[{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return n(Pr,or({},y,{camposClaveFila:s,clavesFila:O,api:e.api,row:e.row}))}},g?{field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return n(Nr,or({},y,{camposClaveFila:s,api:e.api,row:e.row}))}}:{}]),A=o(function(){return V},[JSON.stringify(V)]);return L?n(S,null):n(an,{className:x.rootPaper},n(Je,{theme:xr},n(dn,or({className:x.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,sortModel:c,rows:B,columns:A,onSortModelChange:function(e){return w(e)},components:{NoRowsOverlay:mr}},y))))},wr=["filterBy","sortModel","columns","reference","filter","enableLoad"],Ir=He({},un),Rr=function(e){var i=e.filterBy,l=void 0===i?"":i,s=e.sortModel,c=e.columns,u=e.reference,d=e.filter,m=void 0===d?[]:d,p=e.enableLoad,f=void 0===p||p,g=ir(e,wr),h=e.record,v=r(!1),b=dr(e),y=k(),C=a(s),P=C[0],x=C[1],T=s[0],w=T.field,I=T.sort,R=o(function(){return[].concat(c)},[JSON.stringify(c)]);t(function(){v.current=!0},[y]);var F=[];l.split(",").forEach(function(e){e&&F.push({type:"string",comparison:"eq",value:h[e],field:e})});var O=or({},F.concat(m)),_=N(u,{page:1,perPage:200},{field:w,order:I},O,{enabled:f&&v.current}),E=_.data,D=_.ids,M=_.loading,L=o(function(){return D.map(function(e){return E[e]})},[D,E]);return M?n(S,null):n(an,{className:b.rootPaper},n(Je,{theme:Ir},n(dn,or({className:b.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,rows:L,columns:R,sortModel:P,onSortModelChange:function(e){return x(e)},components:{NoRowsOverlay:mr}},g))))},Fr=u(),Or=function(e){var r=e.children,t=a(!1),i=t[0],l=t[1],s=o(function(){return{open:i,show:function(){return l(!0)},hide:function(){return l(!1)}}},[i]);return n(Fr.Provider,{value:s},r)},_r=function(){return d(Fr)},Er=function(e,n,r,a){return{type:"RELOAD_CB",payload:{id:e,method:n,params:r,callback:a}}},Dr=function(e,n){return{type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:n}}},Mr=function(e,n){return{type:"HIDE_INPUT",payload:{id:e,hidden:n}}},Lr=function(e,n){return{type:"DISABLE_INPUT",payload:{id:e,disabled:n}}},Br=function(e,n){return{type:"REQUIRE_INPUT",payload:{id:e,required:n}}},Vr=function(){var e=Ve();return c(function(n,r,a,t){e(Er(n,r,a,t))},[e])},Ar=function(){var e=Ve();return c(function(n,r){e(Mr(n,r))},[e])},qr=function(){var e=Ve();return c(function(n,r){e(Lr(n,r))},[e])},Wr=function(){var e=Ve();return c(function(n,r){e(Br(n,r))},[e])},zr=function(e,n,r,a){return C({type:"getJson",resource:e,payload:{method:n,params:r}},a)},jr=function(e){var n=zr(e),r=n[0],a=n[1].loading;return[c(function(e,n,a){return r({payload:{params:n,method:e}},{returnPromise:!0,onSuccess:a,onFailure:a})},[]),a]},Gr=function(e){return{}},Hr=function(e){var n=_(e),r=x(),a=E(),t=D(),o=M(e.resource);return{ajax:jr(e.resource)[0],data:n,notify:r,redirect:a,refresh:t,unselectAll:o}},Jr=function(e){var n=Vr(),r=Ar(),a=qr(),t=Wr(),o=_r(),i=x(),l=E();return{ajax:jr(e.resource)[0],notify:i,redirect:l,recargarComboBox:n,progress:o,setHidden:r,setDisable:a,setRequire:t}},Ur=function(e){var n=Vr(),r=Ar(),a=qr(),t=Wr(),o=_r(),i=x(),l=E();return{form:vn(),ajax:jr(e.resource)[0],notify:i,redirect:l,recargarComboBox:n,progress:o,setHidden:r,setDisable:a,setRequire:t}},Zr=["isRowEditable"],Qr=["isRowEditable","primaryText","secondaryText","desktopSize","onRenderGrilla","onLoadGrilla","hasEdit"],Yr=tn(function(e){return{container:{maxHeight:"70vh"},rowOdd:{backgroundColor:e.palette.action.hover}}},{name:"GrillaEtriek"}),Kr=function(e,n){return void 0===n||"function"==typeof n&&n(e)},Xr=function(e){var r=e.isRowEditable,a=ir(e,Zr);return Kr(e.record,r)?n(A,a):null},$r=function(e){!function(e){var n=e.onRenderGrilla,r=e.onLoadGrilla,a=k(),o=Hr(e);t(function(){n&&n(o)},[]),t(function(){r&&r(o)},[a])}(e);var r=Ue(function(e){return e.breakpoints.down("sm")}),a=Yr(e),o=L(e).hasEdit,i=e.isRowEditable,s=e.primaryText,c=e.secondaryText,u=e.desktopSize,d=void 0!==u&&u,m=ir(e,Qr),p=e.children,f=l.count(e.children),g=s,h=c;return s||(f>=4||f>=3||f>=2?g=function(e){return e[p[0].props.source]+" - "+e[p[1].props.source]}:1==f&&(g=function(e){return e[p[0].props.source]})),c||(f>=4?h=function(e){return e[p[2].props.source]+" - "+e[p[3].props.source]}:f>=3?h=function(e){return e[p[2].props.source]}:f>=2?g=function(e){return e[p[0].props.source]+" - "+e[p[1].props.source]}:1==f&&(g=function(e){return e[p[0].props.source]})),r&&!1===d?n(B,{linkType:function(e){return!(!o||!Kr(e,i))&&"edit"},primaryText:g,secondaryText:h}):n(hn,{className:a.container},n(V,or({stickyHeader:!0},m),l.map(p,function(e){return e.props.hidden?null:e}),o&&n(Xr,{isRowEditable:i})))},ea=["ids"],na=["filterValues","setFilters","tabs","GridComponent"],ra=function(e){var r=e.filterValues,a=e.setFilters,t=e.tabs,o=t.ids,l=ir(t,ea),s=e.GridComponent,c=void 0===s?$r:s,u=ir(e,na),d=r.id;return n(i,null,n(Nn,{value:d,indicatorColor:"primary",onChange:function(e,n){a(or({},r,{id:n}))}},o.map(function(e){return n(kn,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e})})),n(Cn,null),n(c,or({},u,l[d])))},aa=["useFormulario"],ta=function(e){var n=e.useFormulario;return{fichaProps:(void 0===n?Gr:n)(ir(e,aa))}},oa=["basePath","className","record","hasEdit","hasShow","hasList","resource","totalPages","showFilter","setSort","setPerPage","perPage","defaultTitle","setPage","setFilters","selectedIds","onUnselectItems","onToggleItem","loaded","loading","exporter","hideFilter","hasCreate","filterValues","displayedFilters","currentSort"],ia=["children","basePath","className","data","hasShow","hasList"],la=function(e){return e.split("_")[1]},sa=Sn(function(e){var n;return{form:{maxHeight:"70vh",overflow:"auto"},tab:{display:"block",maxHeight:"65vh",overflow:"auto"},contenido:(n={},n[e.breakpoints.up("md")]={width:"20vw"},n)}}),ca=function(e,n){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf("/")){var r=e.split("/");return new Date(parseInt(r[2],10),parseInt(r[1],10)-1,parseInt(r[0],10)).toString()}var a=/(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null!==a){var t=new Date(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10));if(!isNaN(t))return t.toString()}},ua=function(e,n){if(!e)return"";var r=e.split(" "),a="";switch(r[1]){case"Jan":a="01";break;case"Feb":a="02";break;case"Mar":a="03";break;case"Apr":a="04";break;case"May":a="05";break;case"Jun":a="06";break;case"Jul":a="07";break;case"Aug":a="08";break;case"Sep":a="09";break;case"Oct":a="10";break;case"Nov":a="11";break;case"Dec":a="12"}return r[2]+"/"+a+"/"+r[3]},da=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf("/")){var n=e.split("/");return new Date(parseInt(n[2].substr(0,4),10),parseInt(n[1],10)-1,parseInt(n[0],10),n[2].substr(5,2),n[2].substr(8,2)).toString()}var r=/(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})/.exec(e);if(null!==r){var a=new Date(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),r[4],r[5]);if(!isNaN(a))return a.toString()}},ma=function(e,n){if(!e)return"";var r=e.split(" "),a="";switch(r[1]){case"Jan":a="01";break;case"Feb":a="02";break;case"Mar":a="03";break;case"Apr":a="04";break;case"May":a="05";break;case"Jun":a="06";break;case"Jul":a="07";break;case"Aug":a="08";break;case"Sep":a="09";break;case"Oct":a="10";break;case"Nov":a="11";break;case"Dec":a="12"}return r[2]+"/"+a+"/"+r[3]+" "+r[4].substr(0,5)},pa=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf(":")){var n=e.split(":"),r=new Date;return r.setHours(n[0]),r.setMinutes(n[1]),r.toString()}var a=/(\d{2}):(\d{2})/.exec(e);if(null!==a){var t=new Date;return t.setHours(a[0]),t.setMinutes(a[1]),t.toString()}},fa=function(e,n){return e?e.split(" ")[4].substr(0,5):""},ga=function(e){return n(sn,{variant:"h6",gutterBottom:!0},e.children)},ha=function(e){var r=e.children,a=e.basePath,t=e.className,o=e.data,i=e.hasShow,l=e.hasList,s=void 0===l||l,c=ir(e,ia);return n(q,or({className:t},ir(c,oa)),r,s&&n(W,{label:"ra.action.back",basePath:a,icon:n(Pn,null)}),i&&n(z,{basePath:a,record:o}))},va=j(),ba=[va,G(1)],ya={format:"dd/MM/yyyy"},Ca=function(e){return function(n,r){var a=r[e];if(n&&a){var t=a.split("/").reverse().join("/"),o=n.split("/").reverse().join("/");if(wn(t).isAfter(o))return{message:"validation.greater_or_equal",args:{menor:a}}}}},ka=function(e){return void 0===e&&(e="es"),{locale:"en"==e?xn:Tn}},Na=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],Sa=function(e,n){var r=document.createElement("a");r.style.display="none",document.body.appendChild(r),r.setAttribute("href",e),r.setAttribute("download",n),r.click()},Pa=function(e,n){var r=H();return Be(function(a){var t;return(null===(t=a.admin.resources["cb_"+la(r)+"_"+e].data[n])||void 0===t?void 0:t.etiqueta)||""})},xa=u({}),Ta=["useFormulario","enableLoad"],wa=function(e){var r=e.enableLoad,a=void 0===r||r,t=ir(e,Ta),i=H(e),l=ur(i,{enabled:a}),s=l.data,c=l.loading,u=ta(e).fichaProps,d=o(function(){return{estado:"N",initialValues:s,loading:c,fichaProps:u}},[s,c,u]);return n(Or,null,n(xa.Provider,{value:d},n(J,or({},t,null==u?void 0:u.panel))))};wa.propTypes={useFormulario:Ae.func};var Ia=["basePath","classes","filterValues","handleSubmit","handleSubmitWithRedirect","invalid","label","pristine","resource","saving","selectedIds","submitOnEnter","redirect"],Ra=["resource","record","basePath","redirect","className","icon","label"],Fa=tn(function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:on(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),Oa=function(e){var r=Fa(e),a=g(),t=e.resource,o=e.record,i=e.className,l=e.icon,s=e.label,c=void 0===s?"ra.action.delete":s,u=ir(e,Ra),d=U(t,o.id),m=d[0],p=d[1].loading;return n(Rn,{title:a("ra.action.delete")},n(In,or({disabled:p,onClick:m,label:c,className:Fn("ra-delete-button",r.deleteButton,i),key:"button"},ir(u,Ia)),l))};Oa.defaultProps={redirect:"list",icon:n(fn,null)};var _a=["useFormulario"],Ea=function(e){var r=ir(e,_a),a=Z(r),t=a.record,i=a.loading,l=ta(e).fichaProps,s=o(function(){return{estado:"M",initialValues:t,loading:i,fichaProps:l}},[t,i,l]);return n(Or,null,n(xa.Provider,{value:s},n(Q,or({},r,null==l?void 0:l.panel))))},Da=tn(function(e){return{snackbarContent:{whiteSpace:"pre-wrap"}}}),Ma=function(e){var r=Da(e);return n(Y,or({},e,{className:r.snackbarContent}))},La=Sn(function(e){return{button:{margin:e.spacing(1)},input:{display:"none"}}}),Ba=e(function(e,r){var a=e.isOpen,t=e.onConfirm,o=e.onClose,i=e.title,l=e.dialogText,s=e.children,c=e.hasAccept,u=void 0===c||c,d=e.hasCancel,m=void 0===d||d,p=e.loading,f=void 0!==p&&p,g=La(e),h=function(e){o&&o(e)};return n(Xe,{ref:r,open:a,fullWidth:!0,onClose:h,"aria-labelledby":"form-dialog-title"},n(rn,{id:"form-dialog-title"},i),n(en,null,n(nn,null,l),s),(u||m)&&n($e,null,m&&n(On,{onClick:h,variant:"contained",color:"secondary",className:g.button,disabled:f},"Cancelar"),u&&n(On,{onClick:function(e){t&&t(e)},variant:"contained",color:"primary",className:g.button,disabled:f},"Ok")))}),Va=tn(function(e){return{block:{pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},progress:{position:"absolute",left:"50%",top:"50%"}}}),Aa=function(e){var r=Va(e),a=_r(),o=H(e),i=d(xa),l=i.estado,s=i.loading,c=i.initialValues,u=i.fichaProps,m=Ur({resource:o});return t(function(){u.onRenderFicha&&u.onRenderFicha(m,l)},[]),t(function(){s||u.onLoadFicha&&u.onLoadFicha(m,l,c)},[s]),n(K,{className:a.open?r.block:""},a.open&&n(Ze,{className:r.progress,thickness:4,size:50}),e.children)},qa=function(e){return n(Aa,e)},Wa=["mutators"],za={setError:function(e,n){n.fields[e[0]].data=e[1]}},ja=function(e){var r=d(xa),a=r.initialValues,t=r.fichaProps,o=t.onBeforeSubmitFicha,i=t.config,l=(i=void 0===i?{}:i).mutators,s=void 0===l?{}:l,u=ir(i,Wa),m=s===za?s:or({},za,s),p=Jr(e),f=x(),g=c(function(n,r,a){var t=o&&o(or({form:{values:n}},p),"N");return"string"==typeof t?void f(t,"warning"):void 0===t||t?e.save(n,r,a):void 0},[o,p]);return n(O,or({},e,u,{save:g,mutators:m,initialValues:a,render:function(e){return n(X,or({component:qa},e))}}))};ja.propTypes=or({},$.propTypes),ja.defaultProps={margin:"normal",variant:"outlined"};var Ga=tn(function(e){return{icon:{minWidth:e.spacing(5)},sidebarIsOpen:{paddingLeft:25,transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},sidebarIsClosed:{paddingLeft:0,transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"}}}),Ha=function(e){var r=e.handleToggle,a=e.sidebarIsOpen,t=e.isOpen,o=e.name,l=e.icon,s=e.children,c=e.dense,u=g(),d=Ga(),m=n(Ln,{dense:c,button:!0,onClick:r},n(Mn,{className:d.icon},t?n(Bn,null):l),n(sn,{variant:"inherit",color:"textSecondary"},u(o)));return n(i,null,a||t?m:n(Rn,{title:u(o),placement:"right"},m),n(En,{in:t,timeout:"auto",unmountOnExit:!0},n(Dn,{dense:c,component:"div",disablePadding:!0,className:a?d.sidebarIsOpen:d.sidebarIsClosed},s),n(Cn,null)))},Ja=["items","translate"],Ua={marginTop:"1.5em"},Za=function(e){var r=e.onMenuClick,t=e.dense,o=e.logout,l=g(),s=a({mnuPrueba:!1}),c=s[0],u=s[1],d=Ue(function(e){return e.breakpoints.down("sm")}),m=Ue(function(e){return e.breakpoints.down("xs")}),p=Be(function(e){return e.admin.ui.sidebarOpen}),f=function e(r){var a=r.items,t=r.translate,o=ir(r,Ja),l=o.state,s=o.onMenuClick,c=o.handleToggle,u=o.dense,d=o.open;return a&&n(i,null,a.map(function(r){var a=r.name,i=r.menu,m=r.label;return i?n(Ha,{key:a,name:m,handleToggle:function(){return c(a)},isOpen:l[a],sidebarIsOpen:d,icon:n(_n,null),dense:u},e(or({items:i,translate:t},o))):n(h,{key:a,to:"/"+a,primaryText:t("resources."+a+".name",{_:m}),onClick:s,sidebarIsOpen:d,dense:u,leftIcon:n(_n,null)})}))}({items:JSON.parse(localStorage.getItem("menus")),handleToggle:function(e){u(function(n){var r;return or({},n,((r={})[e]=!n[e],r))})},state:c,activeClassName:"",iconClass:"",className:"",open:p,dense:t,onMenuClick:r,translate:l});return n(ee,{style:Ua},n(ne,{primaryText:l("ra.page.dashboard"),onClick:r,sidebarIsOpen:p}),f,m&&n(h,{to:"/configuration",primaryText:l("pos.configuration"),leftIcon:n(_n,null),onClick:r,sidebarIsOpen:p,dense:t}),m&&o,!m&&d&&o)},Qa=or({},re);Qa.palette.type="dark",Qa.overrides.RaSidebar={drawerPaper:{position:"sticky"}},Qa.overrides.RaRichTextInput={"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}};var Ya=or({},re);Ya.palette.type="light",Ya.overrides.RaSidebar={drawerPaper:{position:"sticky"}},Ya.overrides.RaRichTextInput={"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}};var Ka={__proto__:null,lightTheme:Ya,darkTheme:Qa},Xa=["apiFolder"],$a=function(e){return n(te,e)},et=function(e){var r=ir(e,Xa),a=Be(function(e){return"dark"===e.theme?Qa:Ya});return n(ae,or({},r,{appBar:cr,sidebar:$a,menu:Za,theme:a,notification:Ma}))},nt=["className","exporter","filters","children","jsBotonGrilla"],rt=function(e){var r=e.className,a=e.exporter,t=e.filters,i=e.children,c=e.jsBotonGrilla,u=ir(e,nt),d=Hr(e),m=_(e),p=H(u),f=L(u).hasCreate,g=m.currentSort,h=m.displayedFilters,v=m.filterValues,b=m.basePath,y=m.selectedIds,C=m.showFilter,k=m.total,N=or({},d,m);return o(function(){return n(q,or({className:r},oe(u)),t&&s(t,{resource:p,showFilter:C,displayedFilters:h,filterValues:v,context:"button"}),f&&n(ie,{basePath:b}),!1!==a&&n(le,{disabled:0===k,resource:p,sort:g,filterValues:v}),l.map(i,function(e,n){return s(e,{onClick:e.props.options?null:function(n){return c(N,e.key)},options:e.props.options?e.props.options.map(function(e){return or({},e,{onClick:function(n){return c(N,e.key)}})}):null})}))},[p,h,v,y,t,k])},at=["meta","input","render"],tt=tn(function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundImage:function(e){return e.loginBackgroundImage},backgroundRepeat:"no-repeat",backgroundSize:"cover"},card:{minWidth:300,marginTop:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},avatarIcon:{backgroundColor:e.palette.secondary.main},icon:function(n){return{position:"absolute",left:e.spacing(14-Math.ceil(n.textLength/2)-1)}},hint:{marginTop:"1em",display:"flex",justifyContent:"center",color:e.palette.grey[500]},form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},actions:{padding:"0 1em 1em 1em"}}}),ot=function(e){var r=e.meta,a=(r=void 0===r?{touched:!1,error:void 0}:r).touched,t=r.error,o=or({},e.input),i=ir(e,at);return n(zn,or({error:!(!a||!t),helperText:a&&t},o,i,{fullWidth:!0}))},it=function(e){var r=e.loginBackgroundImage,t=e.nameSource,o=void 0===t?"username":t,i=e.passwordSource,l=void 0===i?"password":i,s=a(!1),c=s[0],u=s[1],d=g(),m=d("ra.auth.sign_in"),f=tt({loginBackgroundImage:r,textLength:m.length}),h=x(),v=se(),b=Gn();return n(bn,{onSubmit:function(e){u(!0),v(e,b.state?b.state.nextPathname:"/").catch(function(e){u(!1),h("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error","warning")})},validate:function(e){var n={};return e[o]||(n[o]=d("ra.validation.required")),e[l]||(n[l]=d("ra.validation.required")),n},render:function(e){return n("form",{onSubmit:e.handleSubmit},n("div",{className:f.main},n(An,{className:f.card},n("div",{className:f.avatar},n(Vn,{className:f.avatarIcon},n(p,null))),n("div",{className:f.hint},"Inicio de Sesión"),n("div",{className:f.form},n("div",{className:f.input},n(yn,{autoFocus:!0,name:o,component:ot,label:d("ra.auth.username"),disabled:c})),n("div",{className:f.input},n(yn,{name:l,component:ot,label:d("ra.auth.password"),type:"password",disabled:c}))),n(qn,{className:f.actions},n(On,{variant:"contained",type:"submit",color:"primary",disabled:c,fullWidth:!0},c&&n(Wn,{className:f.icon,size:18,thickness:2}),m))),n(Y,null)))}})},lt=function(e){return n(jn,{theme:ln(Ya)},n(it,e))},st=["displayedFilters","filterValues","showFilter"],ct=["className","options","icon","label","disabled"],ut=tn({root:{display:"inline-block"},paddingRight:{paddingRight:4}}),dt=function(e){var t,o=e.className,i=e.options,l=void 0===i?[]:i,s=e.icon,c=e.label,u=e.disabled,d=ir(e,ct),m=a(!1),p=m[0],f=m[1],g=r(),h=a(0),v=h[0],b=h[1],y=ut(e),C=H(e);return n("div",or({className:Fn(y.root,o)},ir(d,st)),n(T,{className:"add-filter",label:c,onClick:function(e){e.preventDefault(),f(!0),g.current=e.currentTarget},title:l[v].label,disabled:u},(null===(t=l[v])||void 0===t?void 0:t.icon)||s),n(Un,{open:p,anchorEl:g.current,onClose:function(e){g.current&&g.current.contains(e.target)||f(!1)}},l.map(function(e,r){return n(Ln,{key:e.label,disabled:e.disabled,selected:r===v,onClick:function(n){!function(e,n){b(n),f(!1)}(0,r),e.onClick&&e.onClick(n,r)},resource:C,title:e.label},e.icon,n("span",{className:y.paddingRight}),n(ce,{label:e.label,resource:C}))})))},mt=["fields","className","basePath","record","textAlign","sortable"],pt=function(e){var r=e.fields,a=e.className,t=e.record,o=ir(e,mt),i=r.separador,l=void 0===i?"":i,s=r.secundario,c=void 0===s?[]:s,u=r.hasSecundario,d=r.campos.map(function(e){return void 0!==t[e]?t[e]:e}).join(""+l);return n(sn,or({noWrap:!0,variant:"inherit",className:a},o),d,u&&n(sn,{component:"span",display:"block",color:"textSecondary",variant:"caption"},c.map(function(e){return(e.etiqueta||"---")+": "+(t[e.campo]||"---")}).join(" ")))},ft=["useFormulario"],gt=function(e){var r=ir(e,ft),a=ue(r),t=a.record,i=a.loading,l=ta(e).fichaProps,s=o(function(){return{estado:"M",initialValues:t,loading:i,fichaProps:l}},[t,i,l]);return n(Or,null,n(xa.Provider,{value:s},n(de,or({},r,a,null==l?void 0:l.panel))))},ht=["basePath","children","className","classes","component","form","handleSubmit","handleSubmitWithRedirect","invalid","mutationMode","pristine","record","redirect","resource","saving","submitOnEnter","syncWithLocation","tabs","toolbar","undoable","variant","margin"],vt=["active","dirty","dirtyFields","dirtyFieldsSinceLastSubmit","dirtySinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","modified","modifiedSinceLastSubmit","save","submitError","submitErrors","submitFailed","submitSucceeded","submitting","touched","valid","validating","values","visited","__versions"],bt=["mutators"],yt=function(e){var r=e.basePath,t=e.children,o=e.className,i=e.component,c=e.handleSubmit,u=e.handleSubmitWithRedirect,d=e.invalid,p=e.mutationMode,f=e.pristine,g=e.record,h=e.redirect,v=e.resource,b=e.saving,y=e.submitOnEnter,C=e.syncWithLocation,k=void 0===C||C,N=e.tabs,S=e.toolbar,P=e.undoable,x=e.variant,T=e.margin,w=ir(e,ht),I=Ct(e),R=Hn(),F=Gn(),O=R?R.url:F.pathname,_=a(0),E=_[0],D=_[1];return n("form",or({className:Fn("tabbed-form",o)},kt(w)),s(N,{classes:I,url:O,syncWithLocation:k,onChange:function(e,n){k||D(n)},value:E},t),n(Qe,null),n(i,{className:I.content},l.map(t,function(e,a){if(e){var t=me(e,a,O);return n(Jn,{exact:!0,path:pe(t)},function(n){return m(e)?s(e,{intent:"content",classes:I,resource:v,record:g,basePath:r,hidden:k?!n.match:E!==a,variant:e.props.variant||x,margin:e.props.margin||T,value:k?t:a}):null})}})),S&&s(S,{basePath:r,className:"toolbar",handleSubmitWithRedirect:u,handleSubmit:c,invalid:d,mutationMode:p,pristine:f,record:g,redirect:h,resource:v,saving:b,submitOnEnter:y,undoable:P}))},Ct=tn(function(e){return{errorTabButton:{color:e.palette.error.main},content:{paddingTop:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}},{name:"RaTabbedForm"});yt.defaultProps={submitOnEnter:!0,tabs:n(fe,null),toolbar:n(ge,null),component:function(e){return n("div",{className:e.className},e.children)}};var kt=function(e){return ir(e,vt)},Nt={setError:function(e,n){n.fields[e[0]].data=e[1]}},St=function(e){var r=d(xa),a=r.initialValues,t=r.fichaProps,o=t.onBeforeSubmitFicha,i=t.config,l=(i=void 0===i?{}:i).mutators,s=void 0===l?{}:l,u=ir(i,bt),m=s===Nt?s:or({},Nt,s),p=Jr(e),f=x(),g=c(function(n,r,a){var t=o&&o(or({form:{values:n}},p),"N");return"string"==typeof t?void f(t,"warning"):void 0===t||t?e.save(n,r,a):void 0},[o,p]);return n(O,or({},e,u,{save:g,mutators:m,initialValues:a,render:function(e){return n(yt,or({component:qa},e))}}))};St.defaultProps={margin:"normal",variant:"outlined",syncWithLocation:!1},Zn.ra.page.empty="No records yet";var Pt=or({},Zn,{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}"}});Qn.ra.notification.created="Datos guardados correctamente",Qn.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",Qn.ra.page.dashboard="Inicio",Qn.ra.page.empty="Sin registros todavía",Qn.ra.page.invite="¿Quiere agregar uno?",Qn.ra.page.list="%{name}",Qn.ra.page.edit="Editar %{name}",Qn.ra.action.back="Volver";var xt=or({},Qn,{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}"}}),Tt=["hidden"],wt=["hidden","useContenido"],It=["hidden"],Rt=function(e){var n=d(xa),r=n.estado,a=n.loading,t=n.fichaProps,o=(void 0===t?{}:t)[e.source],i=void 0===o?{}:o,l=e.hidden,s=void 0!==l&&l,c=ir(e,Tt),u=i.hidden,m=i.useContenido,p=void 0===m?Gr:m,f=ir(i,wt),g=void 0!==u?u:s,h=p(or({},c,{estado:r,hidden:g,loading:a},f)),v=h.hidden,b=ir(h,It);if(void 0===h)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:or({},c,f,b),hidden:void 0!==v?v:g}},Ft=function(e){var r=Rt(e),a=r.propsContenido,t=r.hidden,o=JSON.parse(JSON.stringify(e.record)),i=o[e.source];return o[e.source]=""!=i&&"0"!=i,!t&&n(he,or({},a,{record:o}))},Ot=["onFocus","onChange","onBlur","hidden","disabled","validate"],_t=["onFocus","onBlur","onChange","hidden","disabled","useContenido","validate"],Et=["hidden","disabled","onFocus","onChnage","onBlur","validate"],Dt=function(e,n,r){return"string"==typeof(null==r?void 0:r.data)?r.data:void 0},Mt=function(e){var n=d(xa),a=n.estado,t=n.loading,o=n.fichaProps,i=void 0===o?{}:o,l=Be(function(n){var r=n.configInputs?n.configInputs.filter(function(n){return n.id===e.source}):[];return r[0]?r[0]:null})||{},s=l.disabled,c=l.hidden,u=!0===l.required?va:void 0,m=i[e.source],p=void 0===m?{}:m,f=e.onFocus,g=e.onChange,h=e.onBlur,v=e.hidden,b=void 0!==v&&v,y=e.disabled,C=void 0!==y&&y,k=e.validate,N=ir(e,Ot),S=ve({source:e.source}).input,P=p.onFocus,x=p.onBlur,T=p.onChange,w=p.hidden,I=p.disabled,R=p.useContenido,F=void 0===R?Gr:R,O=p.validate,_=ir(p,_t),E=void 0!==w?w:b,D=void 0!==I?I:C,M=void 0!==P?P:f,L=void 0!==x?x:h,B=void 0!==T?T:g,V=Ur(e),A=F(or({},N,{estado:a,hidden:E,loading:t,utils:V},_)),q=r(S.value);if(void 0===A)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");var W=A.hidden,z=A.disabled,j=A.onFocus,G=A.onChnage,H=A.onBlur,J=A.validate,U=ir(A,Et),Z=j||M,Q=H||L,Y=G||B,K=or({},V,{prev:q.current}),X=Array.isArray(k)?k:[k],$=Array.isArray(O)?O:[O],ee=Array.isArray(J)?J:[J];return{propsContenido:or({onFocus:function(e){Z&&M(V,a,e),q.current=e.target.value},onBlur:function(e){return Q&&Q(K,a,e)},onChange:function(e){return Y&&Y(K,a,e)},helperText:!1,validate:[].concat(X,$,ee,[Dt,u]).filter(function(e){return void 0!==e})},N,_,U,{disabled:void 0!==s?s:void 0!==z?z:D}),hidden:void 0!==c?c:void 0!==W?W:E}},Lt=function(e){var r=Mt(e),a=r.propsContenido,t=r.hidden,o=be();return!t&&n(ye,or({accept:"",maxSize:5e6},a),n(Ce,{source:a.source,title:"Ver",record:o}))},Bt=function(e){var r=Mt(e);return!r.hidden&&n(ke,r.propsContenido)},Vt=["callback"],At=["helperText"],qt=["callback"],Wt=function(e){var r=e.callback,a=ir(e,Vt),o=_(a),i=o.data,l=o.loading;return t(function(){l||"function"==typeof r&&r(Object.values(i))},[i]),n(xe,a)},zt=function(e){var a,o,i=Mt(e),l=i.propsContenido,s=i.hidden,c=r(!1),u=Ve(),d=k(),m=l.helperText,p=ir(l,At),f=Be(function(n){var r=n.reload_cb?n.reload_cb.filter(function(n){return n.id===e.source}):[];return r[0]?r[0]:null}),g=r(f),h=null===f&&g.current?g.current:f;return h&&(a=h.callback,o=ir(h,qt)),t(function(){null!==f&&(g.current=f,u(Dr(e.source)))},[JSON.stringify(f)]),t(function(){c.current=!0},[d]),c.current?!s&&n(Ne,or({},p,{perPage:250,filter:o}),n(Wt,{callback:a,helperText:m,optionText:"etiqueta",optionValue:e.source})):n(Se,{id:e.id,label:e.label,source:e.source,resource:e.resource,className:e.className,isRequired:e.isRequired,meta:e.meta,input:e.input,margin:e.margin},n(Pe,{timeout:1}))},jt=function(e){var r=Mt(e);return!r.hidden&&n(xe,r.propsContenido)},Gt=function(e){var r=e.title,a=e.source,t=e.src,o=be(e);return n(Vn,{title:r,src:t+"/"+o[a]})},Ht=["helperText"],Jt=function(e){var a=Mt(e),o=a.propsContenido,i=a.hidden,l=r(!1),s=k(),c=o.helperText,u=ir(o,Ht);return t(function(){l.current=!0},[s]),l.current?!i&&n(Te,u,n(we,{helperText:c,optionText:"etiqueta",optionValue:e.source})):n(Se,{id:e.id,label:e.label,source:e.source,resource:e.resource,className:e.className,isRequired:e.isRequired,meta:e.meta,input:e.input,margin:e.margin},n(Pe,{timeout:1}))},Ut=function(e){var r=Mt(e);return!r.hidden&&n(Ie,r.propsContenido)},Zt=["helperText"],Qt=function(e){var a=Mt(e),o=a.propsContenido,i=a.hidden,l=r(!1),s=k(),c=o.helperText,u=ir(o,Zt);return t(function(){l.current=!0},[s]),l.current?!i&&n(Ne,u,n(Re,{helperText:c,optionText:"etiqueta",optionValue:e.source})):n(Se,{id:e.id,label:e.label,source:e.source,resource:e.resource,className:e.className,isRequired:e.isRequired,meta:e.meta,input:e.input},n(Pe,null))},Yt=function(e){var r=Mt(e);return!r.hidden&&n(Re,r.propsContenido)},Kt=tn(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:on(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),Xt=function(e){return n(nr,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},n(Ye,e))},$t={cursor:"move"},eo=function(e){var r,a=e.isOpen,t=e.loading,o=e.title,i=e.content,l=e.cancel,s=e.confirmColor,u=e.ConfirmIcon,d=e.CancelIcon,m=e.onClose,p=e.onConfirm,f=e.contentResource,h=e.translateOptions,v=void 0===h?{}:h,b=Kt(e),y=g(),C=Be(function(e){return e.admin.resources[f].list.selectedIds}),k=c(function(e,n){e.stopPropagation(),p(e,C)},[C,p]),N=c(function(e){e.stopPropagation()},[]);return n(Xe,{open:a,onClose:m,onClick:N,fullWidth:!0,maxWidth:"lg",PaperComponent:Xt,"aria-labelledby":"draggable-dialog-title"},n(rn,{style:$t,id:"draggable-dialog-title"},y(o,or({_:o},v))),n(en,{dividers:!0},i),n($e,null,n(On,{disabled:t,onClick:m},n(d,{className:b.iconPaddingStyle}),y(l,{_:l})),n(On,{disabled:t,onClick:function(e){return k(e,"yes")},className:Fn("ra-confirm",(r={},r[b.confirmWarning]="warning"===s,r[b.confirmPrimary]="primary"===s,r)),autoFocus:!0},n(u,{className:b.iconPaddingStyle}),y("ra.action.confirm"))))};eo.propTypes={cancel:Ae.string,classes:Ae.object,confirm:Ae.string,confirmColor:Ae.string,ConfirmIcon:Ae.elementType,CancelIcon:Ae.elementType,content:Ae.node.isRequired,isOpen:Ae.bool,loading:Ae.bool,onClose:Ae.func.isRequired,onConfirm:Ae.func.isRequired,title:Ae.string.isRequired},eo.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:$n,CancelIcon:er,isOpen:!1};var no=["disabled","asistant","asistantResource","label","source"],ro=function(){return n(i,null)},ao={seleccion:[],all:!0,none:!1},to=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},oo=function(e){return e},io=function(e){var r=e.disabled,t=e.asistant,o=e.asistantResource,l=e.label,s=e.source,u=ir(e,no),d=a(!1),m=d[0],p=d[1],f=vn(),g=c(function(){p(!1)},[p]);return n(i,null,n("div",{style:{display:"flex",alignItems:"center"}},n(Fe,or({initialValue:ao},u,{source:s,label:l,disabled:!0,parse:oo,format:to,helperText:!1,InputProps:{endAdornment:n(i,null,n(In,{onClick:function(e){f.change(s,{seleccion:[],all:!1,none:!0})},disabled:r,"aria-label":"Ninguno",size:"small",title:"Ninguno"},n(Kn,null)),n(In,{onClick:function(e){f.change(s,{seleccion:[],all:!0,none:!1})},disabled:r,"aria-label":"Todos",size:"small",title:"Todos"},n(Yn,null)),n(In,{onClick:function(e){return p(!0)},disabled:r,"aria-label":"Selección",size:"small",title:"Selección"},n(Xn,null)))}}))),n(eo,{isOpen:m,title:"Selección de "+l,contentResource:o,content:n(t,{bulkActionButtons:n(ro,null),hasCreate:!1,exporter:!1,resource:o,basePath:"/"+o}),onConfirm:function(e,n){p(!1),f.change(s,{seleccion:n,all:!1,none:!1})},onClose:g}))},lo=function(e){return n(_e,or({},e,{hasCreate:!1,exporter:!1,perPage:25,title:" ",bulkActionButtons:n("span",null)}),n(V,null,n(Ee,{source:"funced",sortable:!0,label:"Cédula"}),n(Ee,{source:"funpriape",sortable:!0,label:"Apellido"}),n(Ee,{source:"funprinom",sortable:!0,label:"Nombre"})))},so={fillista:"empcod=-1"},co=function(e){var r=a(so),t=r[0],o=r[1],i=Oe(),l=c(function(e){o({fillista:e.node.key})},[o]),s=c(function(e){return i.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(function(e){return e.data}).catch(function(){throw new Error("Data Loading Error")})},[i]);return n(Ke,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},n(Ke,{flexGrow:1},n(rr,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:l,createChildren:s})),n(Ke,{flexGrow:2},n(lo,{resource:"form_224",basePath:"/form_224",filter:t})))},uo=tn(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:on(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),mo=function(e){return n(nr,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},n(Ye,e))},po={cursor:"move"},fo=function(e){var r,a=e.isOpen,t=e.loading,o=e.title,i=e.cancel,l=e.confirmColor,s=e.ConfirmIcon,u=e.CancelIcon,d=e.onClose,m=e.onConfirm,p=e.translateOptions,f=void 0===p?{}:p,h=uo(e),v=g(),b=c(function(e,n){e.stopPropagation(),m(e,n)},[m]),y=c(function(e){e.stopPropagation()},[]);return n(Xe,{open:a,onClose:d,onClick:y,fullWidth:!0,maxWidth:"lg",PaperComponent:mo,"aria-labelledby":"draggable-dialog-title"},n(rn,{style:po,id:"draggable-dialog-title"},v(o,or({_:o},f))),n(en,{dividers:!0},n(co,null)),n($e,null,n(On,{disabled:t,onClick:d},n(u,{className:h.iconPaddingStyle}),v(i,{_:i})),n(On,{disabled:t,onClick:function(e){return b(e,"yes")},className:Fn("ra-confirm",(r={},r[h.confirmWarning]="warning"===l,r[h.confirmPrimary]="primary"===l,r)),autoFocus:!0},n(s,{className:h.iconPaddingStyle}),v("ra.action.confirm"))))};fo.propTypes={cancel:Ae.string,classes:Ae.object,confirm:Ae.string,confirmColor:Ae.string,ConfirmIcon:Ae.elementType,CancelIcon:Ae.elementType,isOpen:Ae.bool,loading:Ae.bool,onClose:Ae.func.isRequired,onConfirm:Ae.func.isRequired,title:Ae.string.isRequired},fo.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:$n,CancelIcon:er,isOpen:!1};var go=["disabled","asistant","asistantResource","label","source"],ho={seleccion:[],all:!0,none:!1},vo=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},bo=function(e){return e},yo=function(e){var r=e.disabled,t=e.label,o=void 0===t?"Funcionarios":t,l=e.source,s=ir(e,go),u=Be(function(e){return e.admin.resources.form_224.list.selectedIds}),d=a(!1),m=d[0],p=d[1],f=vn(),g=c(function(){p(!1)},[p]);return n(i,null,n("div",{style:{display:"flex",alignItems:"center"}},n(Fe,or({initialValue:ho},s,{source:l,label:o,disabled:!0,parse:bo,format:vo,helperText:!1,InputProps:{endAdornment:n(i,null,n(In,{onClick:function(e){f.change(l,{seleccion:[],all:!1,none:!0})},disabled:r,"aria-label":"Ninguno",size:"small",title:"Ninguno"},n(Kn,null)),n(In,{onClick:function(e){f.change(l,{seleccion:[],all:!0,none:!1})},disabled:r,"aria-label":"Todos",size:"small",title:"Todos"},n(Yn,null)),n(In,{onClick:function(e){return p(!0)},disabled:r,"aria-label":"Selección",size:"small",title:"Selección"},n(Xn,null)))}}))),n(fo,{isOpen:m,title:"Selección de "+o,onConfirm:function(e,n){p(!1),f.change(l,{seleccion:u,all:!1,none:!1})},onClose:g}))},Co=function(e){var r=Mt(e);return!r.hidden&&n(Fe,or({multiline:!0},r.propsContenido))},ko=["tipo"],No=function(e){var r=e.tipo,a=ir(e,ko),o=Mt(a),i=o.propsContenido,l=o.hidden,s=vn(),c=ve({source:e.source}),u=c.input,d=c.meta,m="F"===r||"Z"===r;t(function(){i.value&&(s.change(e.source,i.value),e.disabled&&s.blur(e.source))}),t(function(){m&&""!=u.value&&d.valid&&d.modified&&!d.active&&i.onBlur()},[u.value]);var p=or({},i);return!l&&("N"===r||"D"===r?n(De,p):"F"===r?n(ar,p):"Z"===r?n(tr,p):n(Fe,"H"===r?or({},p,{type:"time"}):p))},So=["tipo","value"],Po=function(e){var r=e.tipo,a=ir(e,So),t=Rt(a),o=t.hidden,i=or({},t.propsContenido);return!o&&("N"===r||"D"===r?n(Me,i):"F"===r?n(Le,i):"Z"===r?n(Le,or({},i,{showTime:!0})):n(Ee,i))};export{cr as AppBar,Ft as BooleanField,Lt as Camino,Bt as CheckBox,zt as ComboBox,jt as ComboBoxManual,wa as CreateEtriek,Oa as DeleteButtonNoWarning,Ea as EditEtriek,Tr as EtrGrid,Ma as EtriekNotification,ha as FichaActions,xa as FichaContext,Ba as FormDialog,ja as FormEtriek,Rr as GE,$r as GrillaEtriek,Gt as ImageField,et as Layout,rt as ListActionsEtriek,Jt as ListCheck,lt as Login,Za as Menu,dt as MenuButton,pt as MultiTextField,Ut as Password,Qt as RadioButton,Yt as RadioButtonManual,ga as Separador,gt as ShowEtriek,Ha as SubMenu,yo as TBSF,St as TabbedFormEtriek,ra as TabbedGrillaEtriek,Co as TextArea,No as TextBox,io as TextBoxSelection,Po as TextField,Na as choicesEstado,ca as dateFormat,ya as dateFormatOptions,ua as dateParser,da as dateTimeFormat,ma as dateTimeParser,Dr as deleteRecargarComboBox,Sa as descargarLink,Pt as enMessages,xt as esMessages,Ca as etrFechaMayorQue,va as etrRequerido,ba as etrRequeridoNumerico,la as getFormcodFromResource,ka as localeOptions,Er as recargarComboBox,Lr as setDisableAction,Mr as setHiddenAction,Br as setRequireAction,Ka as themes,pa as timeFormat,fa as timeParser,jr as useAjax,Mt as useContenidoController,pr as useDeleteRowEtrGrid,Rt as useFieldController,_r as useFormProgress,zr as useGetJson,ta as useInitFicha,ur as useNuevo,Pa as useReferenceLabel,fr as useSaveRowEtrGrid,sa as useStylesContenidos,Ur as useUtils,Hr as useUtilsGrilla,Jr as useUtilsSubmit};
|
|
1
|
+
import{forwardRef as e,createElement as r,useRef as n,useState as t,useEffect as o,useMemo as a,Fragment as i,Children as l,cloneElement as s,useCallback as c,createContext as u,useContext as d,isValidElement as m}from"react";import p from"@material-ui/icons/Lock";import f from"@material-ui/icons/VpnLock";import{useTranslate as g,MenuItemLink as h,AppBar as v,UserMenu as b,useGetOne as y,useMutation as C,useVersion as k,useGetList as N,Loading as S,useSafeSetState as x,useNotify as P,Button as T,SaveContextProvider as w,SaveButton as I,useDeleteWithConfirmController as R,Confirm as F,FormWithRedirect as O,useListContext as _,useRedirect as E,useRefresh as D,useUnselectAll as M,useResourceDefinition as B,SimpleList as L,Datagrid as V,EditButton as A,TopToolbar as q,ListButton as W,ShowButton as z,required as j,minValue as G,useResourceContext as H,Create as J,useDelete as U,useEditController as Z,Edit as Q,Notification as Y,CardContentInner as K,SimpleFormView as X,SimpleForm as $,Menu as ee,DashboardMenuItem as re,defaultTheme as ne,Layout as te,Sidebar as oe,sanitizeListRestProps as ae,CreateButton as ie,ExportButton as le,useLogin as se,FieldTitle as ce,useShowController as ue,Show as de,getTabFullPath as me,escapePath as pe,TabbedFormTabs as fe,Toolbar as ge,BooleanField as he,useInput as ve,useRecordContext as be,FileInput as ye,FileField as Ce,BooleanInput as ke,ReferenceInput as Ne,Labeled as Se,LinearProgress as xe,SelectInput as Pe,ReferenceArrayInput as Te,SelectArrayInput as we,PasswordInput as Ie,RadioButtonGroupInput as Re,TextInput as Fe,useDataProvider as Oe,List as _e,TextField as Ee,NumberInput as De,NumberField as Me,DateField as Be}from"react-admin";import{useSelector as Le,useDispatch as Ve}from"react-redux";import Ae,{string as qe,func as We,any as ze,bool as je}from"prop-types";import{alpha as Ge,createTheme as He,ThemeProvider as Je,useMediaQuery as Ue,CircularProgress as Ze,Button as Qe,Menu as Ye,MenuItem as Ke,Divider as Xe,Paper as $e,Box as er}from"@material-ui/core";import rr from"@material-ui/core/Dialog";import nr from"@material-ui/core/DialogActions";import tr from"@material-ui/core/DialogContent";import or from"@material-ui/core/DialogContentText";import ar from"@material-ui/core/DialogTitle";import ir from"@material-ui/core/Paper";import{makeStyles as lr,alpha as sr,createTheme as cr}from"@material-ui/core/styles";import ur from"@material-ui/core/Typography";import{GridOverlay as dr,esES as mr,DataGrid as pr}from"@material-ui/data-grid";import fr from"@material-ui/icons/Add";import gr from"@material-ui/icons/Cancel";import hr from"@material-ui/icons/Delete";import vr from"@material-ui/icons/Edit";import br from"@material-ui/core/TableContainer";import{useForm as yr,Form as Cr,Field as kr}from"react-final-form";import Nr from"@material-ui/core/Divider";import Sr from"@material-ui/core/Tab";import xr from"@material-ui/core/Tabs";import Pr from"@material-ui/core/styles/makeStyles";import Tr from"@material-ui/icons/ChevronLeft";import wr from"date-fns/locale/en-US";import Ir from"date-fns/locale/es";import Rr from"moment";import Fr from"@material-ui/core/IconButton";import Or from"@material-ui/core/Tooltip";import _r from"classnames";import Er from"@material-ui/core/Button";import Dr from"@material-ui/icons/Settings";import Mr from"@material-ui/core/Collapse";import Br from"@material-ui/core/List";import Lr from"@material-ui/core/ListItemIcon";import Vr from"@material-ui/core/MenuItem";import Ar from"@material-ui/icons/ExpandMore";import qr from"@material-ui/icons/GridOn";import Wr from"@material-ui/icons/PictureAsPdf";import zr from"@material-ui/icons/GetApp";import jr from"@material-ui/core/Avatar";import Gr from"@material-ui/core/Card";import Hr from"@material-ui/core/CardActions";import Jr from"@material-ui/core/CircularProgress";import Ur from"@material-ui/core/TextField";import{ThemeProvider as Zr}from"@material-ui/styles";import{useLocation as Qr,useRouteMatch as Yr,Route as Kr}from"react-router-dom";import Xr from"@material-ui/core/Menu";import $r from"ra-language-english";import en from"@blackbox-vision/ra-language-spanish";import rn from"@material-ui/icons/Check";import nn from"@material-ui/icons/RemoveCircleOutline";import tn from"@material-ui/icons/Search";import on from"@material-ui/icons/CheckCircle";import an from"@material-ui/icons/ErrorOutline";import ln from"react-draggable";import{TreeView as sn}from"devextreme-react";import{KeyboardDateInput as cn,KeyboardDateTimeInput as un}from"react-admin-date-inputs";function dn(){return(dn=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}function mn(e,r){if(null==e)return{};var n,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)r.indexOf(n=a[t])>=0||(o[n]=e[n]);return o}var pn=e(function(e,n){var t=g(),o=Le(function(e){return[e.admin.resources.form_275?1:0,e.admin.resources.form_59?1:0]}),a=o[1];return[o[0]?r(h,{ref:n,key:"/form_275",to:"/form_275",primaryText:t("pos.change_pin"),leftIcon:r(p,null),onClick:e.onClick}):null,a?r(h,{ref:n,key:"/form_59",to:"/form_59",primaryText:t("pos.change_password"),leftIcon:r(f,null),onClick:e.onClick}):null]}),fn=function(e){return r(b,e,r(pn,null))},gn=function(e){return r(v,dn({},e,{elevation:1,userMenu:r(fn,null)}))},hn=function(e,r){return y(e,"-1",r)},vn=lr(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.type?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},header:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.light},rootPaper:{width:"100%",height:"40vh",borderRadius:0,marginTop:e.spacing(1)},rootOverlay:{flexDirection:"column","& .ant-empty-img-1":{fill:"light"===e.palette.type?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.type?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.type?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.type?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.type?"0.8":"0.08",fill:"light"===e.palette.type?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Ge(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"GE"}),bn=function(){var e=vn();return r(dr,{className:e.rootOverlay},r("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false"},r("g",{fill:"none",fillRule:"evenodd"},r("g",{transform:"translate(24 31.67)"},r("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),r("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"}),r("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"}),r("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"})),r("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"}),r("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)"},r("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),r("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})))),r("div",{className:e.label},"No hay registros"))},yn=function(e,r,n){return C({type:"deleteEtrRow",resource:e,payload:{params:r}},n)},Cn=function(e,r,n,t){return C({type:e,resource:r,payload:{params:n}},t)},kn=["api","basePath","classes","className","confirmTitle","confirmContent","icon","record","redirect","onSuccess","onFailure","source","camposClaveFila"],Nn=["filterBy","claves","sortModel","columns","reference","allowAdd","allowRemove","etrResource","enableLoad"],Sn=lr(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.type?"#fafafa":"#1d1d1d"},"& .MuiDataGrid-iconSeparator":{display:"none"}},header:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.light},rootPaper:{width:"100%",height:"40vh",borderRadius:0,marginTop:e.spacing(1)},rootOverlay:{flexDirection:"column","& .ant-empty-img-1":{fill:"light"===e.palette.type?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.type?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.type?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.type?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.type?"0.8":"0.08",fill:"light"===e.palette.type?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Ge(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"EtrGrid"}),xn={marginLeft:"1.6rem",fontWeight:"bold"},Pn=r(hr,null),Tn=function(e){var n=e.basePath,t=e.confirmTitle,o=void 0===t?"ra.message.delete_title":t,a=e.confirmContent,l=void 0===a?"ra.message.delete_content":a,s=e.icon,u=void 0===s?Pn:s,d=e.record,m=e.redirect,p=void 0!==m&&m,f=e.onSuccess,g=e.onFailure,h=e.source,v=e.camposClaveFila,b=mn(e,kn),y=Sn(e),C=P(),k=R({record:d,redirect:p,basePath:n,onSuccess:f,onFailure:g}),N=k.open,S=k.loading,x=k.handleDialogOpen,w=k.handleDialogClose,I=yn(e.resource,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);C("ra.notification.deleted","info",{smart_count:1})},onFailure:function(e){C(e.message,"warning")}})[0],O=Object.keys(d).filter(function(e){return v.split(",").includes(e)}).reduce(function(e,r){return e[r]=d[r],e},{}),_=c(function(e){I({payload:{ge:h,clavesFila:O}})},[d]);return r(i,null,r(T,dn({key:"button",onClick:x,className:y.deleteButton},b),u),r(F,{isOpen:N,loading:S,title:o,content:l,onConfirm:_,onClose:w}))},wn=function(e){return r(rr,{open:e.open,onClose:e.onClose,fullWidth:!0},r(ar,null,e.labelEstado+" "+e.label),r(or,null,r(ur,{component:"span",display:"block",variant:"subtitle1",style:dn({},xn)},e.msgTitle),e.msgDesc),r(O,{resource:e.resource,save:e.save,render:e.render,initialValues:e.initialValues}))};wn.propTypes={label:qe,onClick:We,icon:ze,open:je,onClose:We,labelEstado:qe,msgTitle:ze,msgDesc:ze,resource:ze,save:We,render:We};var In=function(e){return r(Tn,{api:!0,confirmTitle:"ra.action.delete",source:e.source,record:e.row,resource:e.resource,camposClaveFila:e.camposClaveFila})},Rn=function(e){var n=e.editors,t=e.record,o=e.clavesFila,c=e.camposClaveFila,u=e.resource,d=e.label,m=e.source,p=e.etrResource,f=x(!1),h=f[0],v=f[1],b=hn(p,{enabled:h}).data,y=Cn("createEtrRow",u,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);v(!1),N("ra.notification.created","info")},onFailure:function(e){N(e.message,"warning")}}),C=y[0],k=y[1].loading,N=P(),S=g()("ra.action.create"),R=function(e){C({payload:{data:dn({},e,o),ge:m,camposClaveFila:c,estado:"N"}})},F=a(function(){return{save:R,setOnFailure:function(e){return console.log(e)}}},[R]);return r(i,null,r(T,{onClick:function(e){v(!0),e.stopPropagation()}},r(fr,null)),r(w,{value:F},r(wn,{open:h,onClose:function(e){v(!1),e.stopPropagation()},labelEstado:S,label:d,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:u,save:R,initialValues:b,render:function(e){var o=e.handleSubmitWithRedirect,a=e.pristine,c=e.saving;return r(i,null,r(tr,null,l.map(n,function(e,r){return s(e,{resource:u,estado:"N",initialValue:t[e.props.source],fullWidth:!0,disabled:void 0!==e.props.disabled&&e.props.disabled,InputLabelProps:{shrink:!0}})})),r(nr,null,r(I,{handleSubmitWithRedirect:o,pristine:a,saving:c,disabled:k}),r(T,{label:"ra.action.cancel",onClick:function(e){v(!1),e.stopPropagation()},disabled:k},r(gr,null))))}})))},Fn=function(e){var n=e.editors,t=e.clavesFila,o=e.camposClaveFila,a=e.resource,c=e.label,u=e.source,d=e.row,m=P(),p=g(),f=x(!1),h=f[0],v=f[1],b=Cn("updateEtrRow",a,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);v(!1),m("ra.notification.updated","info",{smart_count:1})},onFailure:function(e){m(e.message,"warning")}}),y=b[0],C=b[1].loading,k=p("ra.action.edit");return r(i,null,r(T,{onClick:function(e){v(!0),e.stopPropagation()}},r(vr,null)),r(wn,{open:h,onClose:function(e){v(!1),e.stopPropagation()},labelEstado:k,label:c,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:a,save:function(e){y({payload:{data:dn({},t,e),ge:u,camposClaveFila:o,estado:"M"}})},render:function(e){var t=e.handleSubmitWithRedirect,c=e.pristine,u=e.saving;return r(i,null,r(tr,null,l.map(n,function(e,r){return s(e,{resource:a,estado:"M",initialValue:d[e.props.source],fullWidth:!0,disabled:-1!=o.indexOf(e.props.source),InputLabelProps:{shrink:!0}})})),r(nr,null,r(I,{handleSubmitWithRedirect:t,pristine:c,saving:u,disabled:C}),r(T,{label:"ra.action.cancel",onClick:function(e){v(!1),e.stopPropagation()},disabled:C},r(gr,null))))}}))},On=He({},mr),_n=function(e){var i=e.filterBy,l=void 0===i?"":i,s=e.claves,c=e.sortModel,u=e.columns,d=e.reference,m=e.allowAdd,p=void 0===m||m,f=e.allowRemove,g=void 0===f||f,h=e.etrResource,v=e.enableLoad,b=void 0===v||v,y=mn(e,Nn),C=e.record,x=n(!1),P=Sn(e),T=k(),w=t(c)[1],I=c[0],R=I.field,F=I.sort;o(function(){x.current=!0},[T]);var O=Object.keys(C).filter(function(e){return s.split(",").includes(e)}).reduce(function(e,r){return e[r]=C[r],e},{}),_={};l.split(",").forEach(function(e){e&&(_[e]=[{type:"string",comparison:"eq",value:C[e],field:e}])});var E=N(d,{page:1,perPage:200},{field:R,order:F},_,{enabled:b&&x.current}),D=E.data,M=E.ids,B=E.loading,L=a(function(){return M.map(function(e){return D[e]})},[M,D]),V=[p?{field:"BTN",headerName:"",sortable:!1,renderHeader:function(e){return r(Rn,dn({},y,{etrResource:h,camposClaveFila:s,clavesFila:O,api:e.api}))}}:{}].concat(u,[{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return r(Fn,dn({},y,{camposClaveFila:s,clavesFila:O,api:e.api,row:e.row}))}},g?{field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return r(In,dn({},y,{camposClaveFila:s,api:e.api,row:e.row}))}}:{}]),A=a(function(){return V},[JSON.stringify(V)]);return B?r(S,null):r(ir,{className:P.rootPaper},r(Je,{theme:On},r(pr,dn({className:P.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,sortModel:c,rows:L,columns:A,onSortModelChange:function(e){return w(e)},components:{NoRowsOverlay:bn}},y))))},En=["filterBy","sortModel","columns","reference","filter","enableLoad"],Dn=He({},mr),Mn=function(e){var i=e.filterBy,l=void 0===i?"":i,s=e.sortModel,c=e.columns,u=e.reference,d=e.filter,m=void 0===d?[]:d,p=e.enableLoad,f=void 0===p||p,g=mn(e,En),h=e.record,v=n(!1),b=vn(e),y=k(),C=t(s),x=C[0],P=C[1],T=s[0],w=T.field,I=T.sort,R=a(function(){return[].concat(c)},[JSON.stringify(c)]);o(function(){v.current=!0},[y]);var F=[];l.split(",").forEach(function(e){e&&F.push({type:"string",comparison:"eq",value:h[e],field:e})});var O=dn({},F.concat(m)),_=N(u,{page:1,perPage:200},{field:w,order:I},O,{enabled:f&&v.current}),E=_.data,D=_.ids,M=_.loading,B=a(function(){return D.map(function(e){return E[e]})},[D,E]);return M?r(S,null):r(ir,{className:b.rootPaper},r(Je,{theme:Dn},r(pr,dn({className:b.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,rows:B,columns:R,sortModel:x,onSortModelChange:function(e){return P(e)},components:{NoRowsOverlay:bn}},g))))},Bn=u(),Ln=function(e){var n=e.children,o=t(!1),i=o[0],l=o[1],s=a(function(){return{open:i,show:function(){return l(!0)},hide:function(){return l(!1)}}},[i]);return r(Bn.Provider,{value:s},n)},Vn=function(){return d(Bn)},An=function(e,r,n,t){return{type:"RELOAD_CB",payload:{id:e,method:r,params:n,callback:t}}},qn=function(e,r){return{type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:r}}},Wn=function(e,r){return{type:"HIDE_INPUT",payload:{id:e,hidden:r}}},zn=function(e,r){return{type:"DISABLE_INPUT",payload:{id:e,disabled:r}}},jn=function(e,r){return{type:"REQUIRE_INPUT",payload:{id:e,required:r}}},Gn=function(){var e=Ve();return c(function(r,n,t,o){e(An(r,n,t,o))},[e])},Hn=function(){var e=Ve();return c(function(r,n){e(Wn(r,n))},[e])},Jn=function(){var e=Ve();return c(function(r,n){e(zn(r,n))},[e])},Un=function(){var e=Ve();return c(function(r,n){e(jn(r,n))},[e])},Zn=function(e,r,n,t){return C({type:"getJson",resource:e,payload:{method:r,params:n}},t)},Qn=function(e){var r=Zn(e),n=r[0],t=r[1].loading;return[c(function(e,r,t){return n({payload:{params:r,method:e}},{returnPromise:!0,onSuccess:t,onFailure:t})},[]),t]},Yn=function(e){return{}},Kn=function(e){var r=_(e),n=P(),t=E(),o=D(),a=M(e.resource);return{ajax:Qn(e.resource)[0],data:r,notify:n,redirect:t,refresh:o,unselectAll:a}},Xn=function(e){var r=Gn(),n=Hn(),t=Jn(),o=Un(),a=Vn(),i=P(),l=E();return{ajax:Qn(e.resource)[0],notify:i,redirect:l,recargarComboBox:r,progress:a,setHidden:n,setDisable:t,setRequire:o}},$n=function(e){var r=Gn(),n=Hn(),t=Jn(),o=Un(),a=Vn(),i=P(),l=E();return{form:yr(),ajax:Qn(e.resource)[0],notify:i,redirect:l,recargarComboBox:r,progress:a,setHidden:n,setDisable:t,setRequire:o}},et=["isRowEditable"],rt=["isRowEditable","primaryText","secondaryText","desktopSize","onRenderGrilla","onLoadGrilla","hasEdit"],nt=lr(function(e){return{container:{maxHeight:"70vh"},rowOdd:{backgroundColor:e.palette.action.hover}}},{name:"GrillaEtriek"}),tt=function(e,r){return void 0===r||"function"==typeof r&&r(e)},ot=function(e){var n=e.isRowEditable,t=mn(e,et);return tt(e.record,n)?r(A,t):null},at=function(e){!function(e){var r=e.onRenderGrilla,n=e.onLoadGrilla,t=k(),a=Kn(e);o(function(){r&&r(a)},[]),o(function(){n&&n(a)},[t])}(e);var n=Ue(function(e){return e.breakpoints.down("sm")}),t=nt(e),a=B(e).hasEdit,i=e.isRowEditable,s=e.primaryText,c=e.secondaryText,u=e.desktopSize,d=void 0!==u&&u,m=mn(e,rt),p=e.children,f=l.count(e.children),g=s,h=c;return s||(f>=4||f>=3||f>=2?g=function(e){return e[p[0].props.source]+" - "+e[p[1].props.source]}:1==f&&(g=function(e){return e[p[0].props.source]})),c||(f>=4?h=function(e){return e[p[2].props.source]+" - "+e[p[3].props.source]}:f>=3?h=function(e){return e[p[2].props.source]}:f>=2?g=function(e){return e[p[0].props.source]+" - "+e[p[1].props.source]}:1==f&&(g=function(e){return e[p[0].props.source]})),n&&!1===d?r(L,{linkType:function(e){return!(!a||!tt(e,i))&&"edit"},primaryText:g,secondaryText:h}):r(br,{className:t.container},r(V,dn({stickyHeader:!0},m),l.map(p,function(e){return e.props.hidden?null:e}),a&&r(ot,{isRowEditable:i})))},it=["ids"],lt=["filterValues","setFilters","tabs","GridComponent"],st=function(e){var n=e.filterValues,t=e.setFilters,o=e.tabs,a=o.ids,l=mn(o,it),s=e.GridComponent,c=void 0===s?at:s,u=mn(e,lt),d=n.id;return r(i,null,r(xr,{value:d,indicatorColor:"primary",onChange:function(e,r){t(dn({},n,{id:r}))}},a.map(function(e){return r(Sr,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e})})),r(Nr,null),r(c,dn({},u,l[d])))},ct=["useFormulario"],ut=function(e){var r=e.useFormulario;return{fichaProps:(void 0===r?Yn:r)(mn(e,ct))}},dt=["basePath","className","record","hasEdit","hasShow","hasList","resource","totalPages","showFilter","setSort","setPerPage","perPage","defaultTitle","setPage","setFilters","selectedIds","onUnselectItems","onToggleItem","loaded","loading","exporter","hideFilter","hasCreate","filterValues","displayedFilters","currentSort"],mt=["children","basePath","className","data","hasShow","hasList"],pt=function(e){return e.split("_")[1]},ft=Pr(function(e){var r;return{form:{maxHeight:"70vh",overflow:"auto"},tab:{display:"block",maxHeight:"65vh",overflow:"auto"},contenido:(r={},r[e.breakpoints.up("md")]={width:"20vw"},r)}}),gt=function(e,r){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf("/")){var n=e.split("/");return new Date(parseInt(n[2],10),parseInt(n[1],10)-1,parseInt(n[0],10)).toString()}var t=/(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null!==t){var o=new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10));if(!isNaN(o))return o.toString()}},ht=function(e,r){if(!e)return"";var n=e.split(" "),t="";switch(n[1]){case"Jan":t="01";break;case"Feb":t="02";break;case"Mar":t="03";break;case"Apr":t="04";break;case"May":t="05";break;case"Jun":t="06";break;case"Jul":t="07";break;case"Aug":t="08";break;case"Sep":t="09";break;case"Oct":t="10";break;case"Nov":t="11";break;case"Dec":t="12"}return n[2]+"/"+t+"/"+n[3]},vt=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf("/")){var r=e.split("/");return new Date(parseInt(r[2].substr(0,4),10),parseInt(r[1],10)-1,parseInt(r[0],10),r[2].substr(5,2),r[2].substr(8,2)).toString()}var n=/(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})/.exec(e);if(null!==n){var t=new Date(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),n[4],n[5]);if(!isNaN(t))return t.toString()}},bt=function(e,r){if(!e)return"";var n=e.split(" "),t="";switch(n[1]){case"Jan":t="01";break;case"Feb":t="02";break;case"Mar":t="03";break;case"Apr":t="04";break;case"May":t="05";break;case"Jun":t="06";break;case"Jul":t="07";break;case"Aug":t="08";break;case"Sep":t="09";break;case"Oct":t="10";break;case"Nov":t="11";break;case"Dec":t="12"}return n[2]+"/"+t+"/"+n[3]+" "+n[4].substr(0,5)},yt=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf(":")){var r=e.split(":"),n=new Date;return n.setHours(r[0]),n.setMinutes(r[1]),n.toString()}var t=/(\d{2}):(\d{2})/.exec(e);if(null!==t){var o=new Date;return o.setHours(t[0]),o.setMinutes(t[1]),o.toString()}},Ct=function(e,r){return e?e.split(" ")[4].substr(0,5):""},kt=function(e){return r(ur,{variant:"h6",gutterBottom:!0},e.children)},Nt=function(e){var n=e.children,t=e.basePath,o=e.className,a=e.data,i=e.hasShow,l=e.hasList,s=void 0===l||l,c=mn(e,mt);return r(q,dn({className:o},mn(c,dt)),n,s&&r(W,{label:"ra.action.back",basePath:t,icon:r(Tr,null)}),i&&r(z,{basePath:t,record:a}))},St=j(),xt=[St,G(1)],Pt={format:"dd/MM/yyyy"},Tt=function(e){return function(r,n){var t=n[e];if(r&&t){var o=t.split("/").reverse().join("/"),a=r.split("/").reverse().join("/");if(Rr(o).isAfter(a))return{message:"validation.greater_or_equal",args:{menor:t}}}}},wt=function(e){return void 0===e&&(e="es"),{locale:"en"==e?wr:Ir}},It=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],Rt=function(e,r){var n=document.createElement("a");n.style.display="none",document.body.appendChild(n),n.setAttribute("href",e),n.setAttribute("download",r),n.click()},Ft=function(e,r){var n=H();return Le(function(t){var o;return(null===(o=t.admin.resources["cb_"+pt(n)+"_"+e].data[r])||void 0===o?void 0:o.etiqueta)||""})},Ot=u({}),_t=["useFormulario","enableLoad"],Et=function(e){var n=e.enableLoad,t=void 0===n||n,o=mn(e,_t),i=H(e),l=hn(i,{enabled:t}),s=l.data,c=l.loading,u=ut(e).fichaProps,d=a(function(){return{estado:"N",initialValues:s,loading:c,fichaProps:u}},[s,c,u]);return r(Ln,null,r(Ot.Provider,{value:d},r(J,dn({},o,null==u?void 0:u.panel))))};Et.propTypes={useFormulario:Ae.func};var Dt=["basePath","classes","filterValues","handleSubmit","handleSubmitWithRedirect","invalid","label","pristine","resource","saving","selectedIds","submitOnEnter","redirect"],Mt=["resource","record","basePath","redirect","className","icon","label"],Bt=lr(function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:sr(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),Lt=function(e){var n=Bt(e),t=g(),o=e.resource,a=e.record,i=e.className,l=e.icon,s=e.label,c=void 0===s?"ra.action.delete":s,u=mn(e,Mt),d=U(o,a.id),m=d[0],p=d[1].loading;return r(Or,{title:t("ra.action.delete")},r(Fr,dn({disabled:p,onClick:m,label:c,className:_r("ra-delete-button",n.deleteButton,i),key:"button"},mn(u,Dt)),l))};Lt.defaultProps={redirect:"list",icon:r(hr,null)};var Vt=["useFormulario"],At=function(e){var n=mn(e,Vt),t=Z(n),o=t.record,i=t.loading,l=ut(e).fichaProps,s=a(function(){return{estado:"M",initialValues:o,loading:i,fichaProps:l}},[o,i,l]);return r(Ln,null,r(Ot.Provider,{value:s},r(Q,dn({},n,null==l?void 0:l.panel))))},qt=lr(function(e){return{snackbarContent:{whiteSpace:"pre-wrap"}}}),Wt=function(e){var n=qt(e);return r(Y,dn({},e,{className:n.snackbarContent}))},zt=Pr(function(e){return{button:{margin:e.spacing(1)},input:{display:"none"}}}),jt=e(function(e,n){var t=e.isOpen,o=e.onConfirm,a=e.onClose,i=e.title,l=e.dialogText,s=e.children,c=e.hasAccept,u=void 0===c||c,d=e.hasCancel,m=void 0===d||d,p=e.loading,f=void 0!==p&&p,g=zt(e),h=function(e){a&&a(e)};return r(rr,{ref:n,open:t,fullWidth:!0,onClose:h,"aria-labelledby":"form-dialog-title"},r(ar,{id:"form-dialog-title"},i),r(tr,null,r(or,null,l),s),(u||m)&&r(nr,null,m&&r(Er,{onClick:h,variant:"contained",color:"secondary",className:g.button,disabled:f},"Cancelar"),u&&r(Er,{onClick:function(e){o&&o(e)},variant:"contained",color:"primary",className:g.button,disabled:f},"Ok")))}),Gt=lr(function(e){return{block:{pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},progress:{position:"absolute",left:"50%",top:"50%"}}}),Ht=function(e){var n=Gt(e),t=Vn(),a=H(e),i=d(Ot),l=i.estado,s=i.loading,c=i.initialValues,u=i.fichaProps,m=$n({resource:a});return o(function(){u.onRenderFicha&&u.onRenderFicha(m,l)},[]),o(function(){s||u.onLoadFicha&&u.onLoadFicha(m,l,c)},[s]),r(K,{className:t.open?n.block:""},t.open&&r(Ze,{className:n.progress,thickness:4,size:50}),e.children)},Jt=function(e){return r(Ht,e)},Ut=["mutators"],Zt={setError:function(e,r){r.fields[e[0]].data=e[1]}},Qt=function(e){var n=d(Ot),t=n.initialValues,o=n.fichaProps,a=o.onBeforeSubmitFicha,i=o.config,l=(i=void 0===i?{}:i).mutators,s=void 0===l?{}:l,u=mn(i,Ut),m=s===Zt?s:dn({},Zt,s),p=Xn(e),f=P(),g=c(function(r,n,t){var o=a&&a(dn({form:{values:r}},p),"N");return"string"==typeof o?void f(o,"warning"):void 0===o||o?e.save(r,n,t):void 0},[a,p]);return r(O,dn({},e,u,{save:g,mutators:m,initialValues:t,render:function(e){return r(X,dn({component:Jt},e))}}))};Qt.propTypes=dn({},$.propTypes),Qt.defaultProps={margin:"normal",variant:"outlined"};var Yt=lr(function(e){return{icon:{minWidth:e.spacing(5)},sidebarIsOpen:{paddingLeft:25,transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},sidebarIsClosed:{paddingLeft:0,transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"}}}),Kt=function(e){var n=e.handleToggle,t=e.sidebarIsOpen,o=e.isOpen,a=e.name,l=e.icon,s=e.children,c=e.dense,u=g(),d=Yt(),m=r(Vr,{dense:c,button:!0,onClick:n},r(Lr,{className:d.icon},o?r(Ar,null):l),r(ur,{variant:"inherit",color:"textSecondary"},u(a)));return r(i,null,t||o?m:r(Or,{title:u(a),placement:"right"},m),r(Mr,{in:o,timeout:"auto",unmountOnExit:!0},r(Br,{dense:c,component:"div",disablePadding:!0,className:t?d.sidebarIsOpen:d.sidebarIsClosed},s),r(Nr,null)))},Xt=["items","translate"],$t={marginTop:"1.5em"},eo=function(e){var n=e.onMenuClick,o=e.dense,a=e.logout,l=g(),s=t({mnuPrueba:!1}),c=s[0],u=s[1],d=Ue(function(e){return e.breakpoints.down("sm")}),m=Ue(function(e){return e.breakpoints.down("xs")}),p=Le(function(e){return e.admin.ui.sidebarOpen}),f=function e(n){var t=n.items,o=n.translate,a=mn(n,Xt),l=a.state,s=a.onMenuClick,c=a.handleToggle,u=a.dense,d=a.open;return t&&r(i,null,t.map(function(n){var t=n.name,i=n.menu,m=n.label;return i?r(Kt,{key:t,name:m,handleToggle:function(){return c(t)},isOpen:l[t],sidebarIsOpen:d,icon:r(Dr,null),dense:u},e(dn({items:i,translate:o},a))):r(h,{key:t,to:"/"+t,primaryText:o("resources."+t+".name",{_:m}),onClick:s,sidebarIsOpen:d,dense:u,leftIcon:r(Dr,null)})}))}({items:JSON.parse(localStorage.getItem("menus")),handleToggle:function(e){u(function(r){var n;return dn({},r,((n={})[e]=!r[e],n))})},state:c,activeClassName:"",iconClass:"",className:"",open:p,dense:o,onMenuClick:n,translate:l});return r(ee,{style:$t},r(re,{primaryText:l("ra.page.dashboard"),onClick:n,sidebarIsOpen:p}),f,m&&r(h,{to:"/configuration",primaryText:l("pos.configuration"),leftIcon:r(Dr,null),onClick:n,sidebarIsOpen:p,dense:o}),m&&a,!m&&d&&a)},ro=dn({},ne);ro.palette.type="dark",ro.overrides.RaSidebar={drawerPaper:{position:"sticky"}},ro.overrides.RaRichTextInput={"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}};var no=dn({},ne);no.palette.type="light",no.overrides.RaSidebar={drawerPaper:{position:"sticky"}},no.overrides.RaRichTextInput={"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}};var to={__proto__:null,lightTheme:no,darkTheme:ro},oo=["apiFolder"],ao=function(e){return r(oe,e)},io=function(e){var n=mn(e,oo),t=Le(function(e){return"dark"===e.theme?ro:no});return r(te,dn({},n,{appBar:gn,sidebar:ao,menu:eo,theme:t,notification:Wt}))},lo=["className","exporter","exporters","filters","children","jsBotonGrilla"],so=function(e){var o=e.resource,a=e.currentSort,i=e.filterValues,l=e.exporters,s=e.total,c=t(!1),u=c[0],d=c[1],m=n(),p=Ue(function(e){return e.breakpoints.down("sm")}),f=function(){d(!1)};return r("div",null,r(Qe,{size:p?"large":"small",onClick:function(e){e.preventDefault(),d(!0),m.current=e.currentTarget},startIcon:r(zr,{color:"primary"}),"aria-haspopup":"true"},p?"":"Exportar"),r(Ye,{open:u,anchorEl:m.current,onClose:f},r(Ke,{exporter:l[0],label:"Csv",component:le,onClick:f,disabled:0===s,resource:o,sort:a,filterValues:i,icon:r(qr,{color:"primary"}),style:{display:"flex",fontSize:"0.8125rem"}}),r(Ke,{exporter:l[1],label:"Pdf",component:le,onClick:f,disabled:0===s,resource:o,sort:a,filterValues:i,icon:r(Wr,{color:"primary"}),style:{display:"flex",fontSize:"0.8125rem"}})))},co=function(e){var n=e.className,t=e.exporter,o=e.exporters,i=e.filters,c=e.children,u=e.jsBotonGrilla,d=mn(e,lo),m=Kn(e),p=_(e),f=H(d),g=B(d).hasCreate,h=p.currentSort,v=p.displayedFilters,b=p.filterValues,y=p.basePath,C=p.selectedIds,k=p.showFilter,N=p.total,S=dn({},m,p);return a(function(){return r(q,dn({className:n},ae(d)),i&&s(i,{resource:f,showFilter:k,displayedFilters:v,filterValues:b,context:"button"}),g&&r(ie,{basePath:y}),!1!==t&&r(le,{disabled:0===N,resource:f,sort:h,filterValues:b}),o?r(so,{exporters:o,resource:f,currentSort:h,filterValues:b,total:N}):null,l.map(c,function(e,r){return s(e,{onClick:e.props.options?null:function(r){return u(S,e.key)},options:e.props.options?e.props.options.map(function(e){return dn({},e,{onClick:function(r){return u(S,e.key)}})}):null})}))},[f,v,b,C,i,N])},uo=["meta","input","render"],mo=lr(function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundImage:function(e){return e.loginBackgroundImage},backgroundRepeat:"no-repeat",backgroundSize:"cover"},card:{minWidth:300,marginTop:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},avatarIcon:{backgroundColor:e.palette.secondary.main},icon:function(r){return{position:"absolute",left:e.spacing(14-Math.ceil(r.textLength/2)-1)}},hint:{marginTop:"1em",display:"flex",justifyContent:"center",color:e.palette.grey[500]},form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},actions:{padding:"0 1em 1em 1em"}}}),po=function(e){var n=e.meta,t=(n=void 0===n?{touched:!1,error:void 0}:n).touched,o=n.error,a=dn({},e.input),i=mn(e,uo);return r(Ur,dn({error:!(!t||!o),helperText:t&&o},a,i,{fullWidth:!0}))},fo=function(e){var n=e.loginBackgroundImage,o=e.nameSource,a=void 0===o?"username":o,i=e.passwordSource,l=void 0===i?"password":i,s=t(!1),c=s[0],u=s[1],d=g(),m=d("ra.auth.sign_in"),f=mo({loginBackgroundImage:n,textLength:m.length}),h=P(),v=se(),b=Qr();return r(Cr,{onSubmit:function(e){u(!0),v(e,b.state?b.state.nextPathname:"/").catch(function(e){u(!1),h("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error","warning")})},validate:function(e){var r={};return e[a]||(r[a]=d("ra.validation.required")),e[l]||(r[l]=d("ra.validation.required")),r},render:function(e){return r("form",{onSubmit:e.handleSubmit},r("div",{className:f.main},r(Gr,{className:f.card},r("div",{className:f.avatar},r(jr,{className:f.avatarIcon},r(p,null))),r("div",{className:f.hint},"Inicio de Sesión"),r("div",{className:f.form},r("div",{className:f.input},r(kr,{autoFocus:!0,name:a,component:po,label:d("ra.auth.username"),disabled:c})),r("div",{className:f.input},r(kr,{name:l,component:po,label:d("ra.auth.password"),type:"password",disabled:c}))),r(Hr,{className:f.actions},r(Er,{variant:"contained",type:"submit",color:"primary",disabled:c,fullWidth:!0},c&&r(Jr,{className:f.icon,size:18,thickness:2}),m))),r(Y,null)))}})},go=function(e){return r(Zr,{theme:cr(no)},r(fo,e))},ho=["displayedFilters","filterValues","showFilter"],vo=["className","options","icon","label","disabled"],bo=lr({root:{display:"inline-block"},paddingRight:{paddingRight:4}}),yo=function(e){var o,a=e.className,i=e.options,l=void 0===i?[]:i,s=e.icon,c=e.label,u=e.disabled,d=mn(e,vo),m=t(!1),p=m[0],f=m[1],g=n(),h=t(0),v=h[0],b=h[1],y=bo(e),C=H(e);return r("div",dn({className:_r(y.root,a)},mn(d,ho)),r(T,{className:"add-filter",label:c,onClick:function(e){e.preventDefault(),f(!0),g.current=e.currentTarget},title:l[v].label,disabled:u},(null===(o=l[v])||void 0===o?void 0:o.icon)||s),r(Xr,{open:p,anchorEl:g.current,onClose:function(e){g.current&&g.current.contains(e.target)||f(!1)}},l.map(function(e,n){return r(Vr,{key:e.label,disabled:e.disabled,selected:n===v,onClick:function(r){!function(e,r){b(r),f(!1)}(0,n),e.onClick&&e.onClick(r,n)},resource:C,title:e.label},e.icon,r("span",{className:y.paddingRight}),r(ce,{label:e.label,resource:C}))})))},Co=["fields","className","basePath","record","textAlign","sortable"],ko=function(e){var n=e.fields,t=e.className,o=e.record,a=mn(e,Co),i=n.separador,l=void 0===i?"":i,s=n.secundario,c=void 0===s?[]:s,u=n.hasSecundario,d=n.campos.map(function(e){return void 0!==o[e]?o[e]:e}).join(""+l);return r(ur,dn({noWrap:!0,variant:"inherit",className:t},a),d,u&&r(ur,{component:"span",display:"block",color:"textSecondary",variant:"caption"},c.map(function(e){return(e.etiqueta||"---")+": "+(o[e.campo]||"---")}).join(" ")))},No=["useFormulario"],So=function(e){var n=mn(e,No),t=ue(n),o=t.record,i=t.loading,l=ut(e).fichaProps,s=a(function(){return{estado:"M",initialValues:o,loading:i,fichaProps:l}},[o,i,l]);return r(Ln,null,r(Ot.Provider,{value:s},r(de,dn({},n,t,null==l?void 0:l.panel))))},xo=["basePath","children","className","classes","component","form","handleSubmit","handleSubmitWithRedirect","invalid","mutationMode","pristine","record","redirect","resource","saving","submitOnEnter","syncWithLocation","tabs","toolbar","undoable","variant","margin"],Po=["active","dirty","dirtyFields","dirtyFieldsSinceLastSubmit","dirtySinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","modified","modifiedSinceLastSubmit","save","submitError","submitErrors","submitFailed","submitSucceeded","submitting","touched","valid","validating","values","visited","__versions"],To=["mutators"],wo=function(e){var n=e.basePath,o=e.children,a=e.className,i=e.component,c=e.handleSubmit,u=e.handleSubmitWithRedirect,d=e.invalid,p=e.mutationMode,f=e.pristine,g=e.record,h=e.redirect,v=e.resource,b=e.saving,y=e.submitOnEnter,C=e.syncWithLocation,k=void 0===C||C,N=e.tabs,S=e.toolbar,x=e.undoable,P=e.variant,T=e.margin,w=mn(e,xo),I=Io(e),R=Yr(),F=Qr(),O=R?R.url:F.pathname,_=t(0),E=_[0],D=_[1];return r("form",dn({className:_r("tabbed-form",a)},Ro(w)),s(N,{classes:I,url:O,syncWithLocation:k,onChange:function(e,r){k||D(r)},value:E},o),r(Xe,null),r(i,{className:I.content},l.map(o,function(e,t){if(e){var o=me(e,t,O);return r(Kr,{exact:!0,path:pe(o)},function(r){return m(e)?s(e,{intent:"content",classes:I,resource:v,record:g,basePath:n,hidden:k?!r.match:E!==t,variant:e.props.variant||P,margin:e.props.margin||T,value:k?o:t}):null})}})),S&&s(S,{basePath:n,className:"toolbar",handleSubmitWithRedirect:u,handleSubmit:c,invalid:d,mutationMode:p,pristine:f,record:g,redirect:h,resource:v,saving:b,submitOnEnter:y,undoable:x}))},Io=lr(function(e){return{errorTabButton:{color:e.palette.error.main},content:{paddingTop:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}}},{name:"RaTabbedForm"});wo.defaultProps={submitOnEnter:!0,tabs:r(fe,null),toolbar:r(ge,null),component:function(e){return r("div",{className:e.className},e.children)}};var Ro=function(e){return mn(e,Po)},Fo={setError:function(e,r){r.fields[e[0]].data=e[1]}},Oo=function(e){var n=d(Ot),t=n.initialValues,o=n.fichaProps,a=o.onBeforeSubmitFicha,i=o.config,l=(i=void 0===i?{}:i).mutators,s=void 0===l?{}:l,u=mn(i,To),m=s===Fo?s:dn({},Fo,s),p=Xn(e),f=P(),g=c(function(r,n,t){var o=a&&a(dn({form:{values:r}},p),"N");return"string"==typeof o?void f(o,"warning"):void 0===o||o?e.save(r,n,t):void 0},[a,p]);return r(O,dn({},e,u,{save:g,mutators:m,initialValues:t,render:function(e){return r(wo,dn({component:Jt},e))}}))};Oo.defaultProps={margin:"normal",variant:"outlined",syncWithLocation:!1},$r.ra.page.empty="No records yet";var _o=dn({},$r,{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}"}});en.ra.notification.created="Datos guardados correctamente",en.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",en.ra.page.dashboard="Inicio",en.ra.page.empty="Sin registros todavía",en.ra.page.invite="¿Quiere agregar uno?",en.ra.page.list="%{name}",en.ra.page.edit="Editar %{name}",en.ra.action.back="Volver";var Eo=dn({},en,{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}"}}),Do=["hidden"],Mo=["hidden","useContenido"],Bo=["hidden"],Lo=function(e){var r=d(Ot),n=r.estado,t=r.loading,o=r.fichaProps,a=(void 0===o?{}:o)[e.source],i=void 0===a?{}:a,l=e.hidden,s=void 0!==l&&l,c=mn(e,Do),u=i.hidden,m=i.useContenido,p=void 0===m?Yn:m,f=mn(i,Mo),g=void 0!==u?u:s,h=p(dn({},c,{estado:n,hidden:g,loading:t},f)),v=h.hidden,b=mn(h,Bo);if(void 0===h)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:dn({},c,f,b),hidden:void 0!==v?v:g}},Vo=function(e){var n=Lo(e),t=n.propsContenido,o=n.hidden,a=JSON.parse(JSON.stringify(e.record)),i=a[e.source];return a[e.source]=""!=i&&"0"!=i,!o&&r(he,dn({},t,{record:a}))},Ao=["onFocus","onChange","onBlur","hidden","disabled","validate"],qo=["onFocus","onBlur","onChange","hidden","disabled","useContenido","validate"],Wo=["hidden","disabled","onFocus","onChnage","onBlur","validate"],zo=function(e,r,n){return"string"==typeof(null==n?void 0:n.data)?n.data:void 0},jo=function(e){var r=d(Ot),t=r.estado,o=r.loading,a=r.fichaProps,i=void 0===a?{}:a,l=Le(function(r){var n=r.configInputs?r.configInputs.filter(function(r){return r.id===e.source}):[];return n[0]?n[0]:null})||{},s=l.disabled,c=l.hidden,u=!0===l.required?St:void 0,m=i[e.source],p=void 0===m?{}:m,f=e.onFocus,g=e.onChange,h=e.onBlur,v=e.hidden,b=void 0!==v&&v,y=e.disabled,C=void 0!==y&&y,k=e.validate,N=mn(e,Ao),S=ve({source:e.source}).input,x=p.onFocus,P=p.onBlur,T=p.onChange,w=p.hidden,I=p.disabled,R=p.useContenido,F=void 0===R?Yn:R,O=p.validate,_=mn(p,qo),E=void 0!==w?w:b,D=void 0!==I?I:C,M=void 0!==x?x:f,B=void 0!==P?P:h,L=void 0!==T?T:g,V=$n(e),A=F(dn({},N,{estado:t,hidden:E,loading:o,utils:V},_)),q=n(S.value);if(void 0===A)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");var W=A.hidden,z=A.disabled,j=A.onFocus,G=A.onChnage,H=A.onBlur,J=A.validate,U=mn(A,Wo),Z=j||M,Q=H||B,Y=G||L,K=dn({},V,{prev:q.current}),X=Array.isArray(k)?k:[k],$=Array.isArray(O)?O:[O],ee=Array.isArray(J)?J:[J];return{propsContenido:dn({onFocus:function(e){Z&&M(V,t,e),q.current=e.target.value},onBlur:function(e){return Q&&Q(K,t,e)},onChange:function(e){return Y&&Y(K,t,e)},helperText:!1,validate:[].concat(X,$,ee,[zo,u]).filter(function(e){return void 0!==e})},N,_,U,{disabled:void 0!==s?s:void 0!==z?z:D}),hidden:void 0!==c?c:void 0!==W?W:E}},Go=function(e){var n=jo(e),t=n.propsContenido,o=n.hidden,a=be();return!o&&r(ye,dn({accept:"",maxSize:5e6},t),r(Ce,{source:t.source,title:"Ver",record:a}))},Ho=function(e){var n=jo(e);return!n.hidden&&r(ke,n.propsContenido)},Jo=["callback"],Uo=["helperText"],Zo=["callback"],Qo=function(e){var n=e.callback,t=mn(e,Jo),a=_(t),i=a.data,l=a.loading;return o(function(){l||"function"==typeof n&&n(Object.values(i))},[i]),r(Pe,t)},Yo=function(e){var t,a,i=jo(e),l=i.propsContenido,s=i.hidden,c=n(!1),u=Ve(),d=k(),m=l.helperText,p=mn(l,Uo),f=Le(function(r){var n=r.reload_cb?r.reload_cb.filter(function(r){return r.id===e.source}):[];return n[0]?n[0]:null}),g=n(f),h=null===f&&g.current?g.current:f;return h&&(t=h.callback,a=mn(h,Zo)),o(function(){null!==f&&(g.current=f,u(qn(e.source)))},[JSON.stringify(f)]),o(function(){c.current=!0},[d]),c.current?!s&&r(Ne,dn({},p,{perPage:250,filter:a}),r(Qo,{callback:t,helperText:m,optionText:"etiqueta",optionValue:e.source})):r(Se,{id:e.id,label:e.label,source:e.source,resource:e.resource,className:e.className,isRequired:e.isRequired,meta:e.meta,input:e.input,margin:e.margin},r(xe,{timeout:1}))},Ko=function(e){var n=jo(e);return!n.hidden&&r(Pe,n.propsContenido)},Xo=function(e){var n=e.title,t=e.source,o=e.src,a=be(e);return r(jr,{title:n,src:o+"/"+a[t]})},$o=["helperText"],ea=function(e){var t=jo(e),a=t.propsContenido,i=t.hidden,l=n(!1),s=k(),c=a.helperText,u=mn(a,$o);return o(function(){l.current=!0},[s]),l.current?!i&&r(Te,u,r(we,{helperText:c,optionText:"etiqueta",optionValue:e.source})):r(Se,{id:e.id,label:e.label,source:e.source,resource:e.resource,className:e.className,isRequired:e.isRequired,meta:e.meta,input:e.input,margin:e.margin},r(xe,{timeout:1}))},ra=function(e){var n=jo(e);return!n.hidden&&r(Ie,n.propsContenido)},na=["helperText"],ta=function(e){var t=jo(e),a=t.propsContenido,i=t.hidden,l=n(!1),s=k(),c=a.helperText,u=mn(a,na);return o(function(){l.current=!0},[s]),l.current?!i&&r(Ne,u,r(Re,{helperText:c,optionText:"etiqueta",optionValue:e.source})):r(Se,{id:e.id,label:e.label,source:e.source,resource:e.resource,className:e.className,isRequired:e.isRequired,meta:e.meta,input:e.input},r(xe,null))},oa=function(e){var n=jo(e);return!n.hidden&&r(Re,n.propsContenido)},aa=lr(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:sr(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),ia=function(e){return r(ln,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},r($e,e))},la={cursor:"move"},sa=function(e){var n,t=e.isOpen,o=e.loading,a=e.title,i=e.content,l=e.cancel,s=e.confirmColor,u=e.ConfirmIcon,d=e.CancelIcon,m=e.onClose,p=e.onConfirm,f=e.contentResource,h=e.translateOptions,v=void 0===h?{}:h,b=aa(e),y=g(),C=Le(function(e){return e.admin.resources[f].list.selectedIds}),k=c(function(e,r){e.stopPropagation(),p(e,C)},[C,p]),N=c(function(e){e.stopPropagation()},[]);return r(rr,{open:t,onClose:m,onClick:N,fullWidth:!0,maxWidth:"lg",PaperComponent:ia,"aria-labelledby":"draggable-dialog-title"},r(ar,{style:la,id:"draggable-dialog-title"},y(a,dn({_:a},v))),r(tr,{dividers:!0},i),r(nr,null,r(Er,{disabled:o,onClick:m},r(d,{className:b.iconPaddingStyle}),y(l,{_:l})),r(Er,{disabled:o,onClick:function(e){return k(e,"yes")},className:_r("ra-confirm",(n={},n[b.confirmWarning]="warning"===s,n[b.confirmPrimary]="primary"===s,n)),autoFocus:!0},r(u,{className:b.iconPaddingStyle}),y("ra.action.confirm"))))};sa.propTypes={cancel:Ae.string,classes:Ae.object,confirm:Ae.string,confirmColor:Ae.string,ConfirmIcon:Ae.elementType,CancelIcon:Ae.elementType,content:Ae.node.isRequired,isOpen:Ae.bool,loading:Ae.bool,onClose:Ae.func.isRequired,onConfirm:Ae.func.isRequired,title:Ae.string.isRequired},sa.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:on,CancelIcon:an,isOpen:!1};var ca=["disabled","asistant","asistantResource","label","source"],ua=function(){return r(i,null)},da={seleccion:[],all:!0,none:!1},ma=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},pa=function(e){return e},fa=function(e){var n=e.disabled,o=e.asistant,a=e.asistantResource,l=e.label,s=e.source,u=mn(e,ca),d=t(!1),m=d[0],p=d[1],f=yr(),g=c(function(){p(!1)},[p]);return r(i,null,r("div",{style:{display:"flex",alignItems:"center"}},r(Fe,dn({initialValue:da},u,{source:s,label:l,disabled:!0,parse:pa,format:ma,helperText:!1,InputProps:{endAdornment:r(i,null,r(Fr,{onClick:function(e){f.change(s,{seleccion:[],all:!1,none:!0})},disabled:n,"aria-label":"Ninguno",size:"small",title:"Ninguno"},r(nn,null)),r(Fr,{onClick:function(e){f.change(s,{seleccion:[],all:!0,none:!1})},disabled:n,"aria-label":"Todos",size:"small",title:"Todos"},r(rn,null)),r(Fr,{onClick:function(e){return p(!0)},disabled:n,"aria-label":"Selección",size:"small",title:"Selección"},r(tn,null)))}}))),r(sa,{isOpen:m,title:"Selección de "+l,contentResource:a,content:r(o,{bulkActionButtons:r(ua,null),hasCreate:!1,exporter:!1,resource:a,basePath:"/"+a}),onConfirm:function(e,r){p(!1),f.change(s,{seleccion:r,all:!1,none:!1})},onClose:g}))},ga=function(e){return r(_e,dn({},e,{hasCreate:!1,exporter:!1,perPage:25,title:" ",bulkActionButtons:r("span",null)}),r(V,null,r(Ee,{source:"funced",sortable:!0,label:"Cédula"}),r(Ee,{source:"funpriape",sortable:!0,label:"Apellido"}),r(Ee,{source:"funprinom",sortable:!0,label:"Nombre"})))},ha={fillista:"empcod=-1"},va=function(e){var n=t(ha),o=n[0],a=n[1],i=Oe(),l=c(function(e){a({fillista:e.node.key})},[a]),s=c(function(e){return i.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(function(e){return e.data}).catch(function(){throw new Error("Data Loading Error")})},[i]);return r(er,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},r(er,{flexGrow:1},r(sn,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:l,createChildren:s})),r(er,{flexGrow:2},r(ga,{resource:"form_224",basePath:"/form_224",filter:o})))},ba=lr(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:sr(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),ya=function(e){return r(ln,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},r($e,e))},Ca={cursor:"move"},ka=function(e){var n,t=e.isOpen,o=e.loading,a=e.title,i=e.cancel,l=e.confirmColor,s=e.ConfirmIcon,u=e.CancelIcon,d=e.onClose,m=e.onConfirm,p=e.translateOptions,f=void 0===p?{}:p,h=ba(e),v=g(),b=c(function(e,r){e.stopPropagation(),m(e,r)},[m]),y=c(function(e){e.stopPropagation()},[]);return r(rr,{open:t,onClose:d,onClick:y,fullWidth:!0,maxWidth:"lg",PaperComponent:ya,"aria-labelledby":"draggable-dialog-title"},r(ar,{style:Ca,id:"draggable-dialog-title"},v(a,dn({_:a},f))),r(tr,{dividers:!0},r(va,null)),r(nr,null,r(Er,{disabled:o,onClick:d},r(u,{className:h.iconPaddingStyle}),v(i,{_:i})),r(Er,{disabled:o,onClick:function(e){return b(e,"yes")},className:_r("ra-confirm",(n={},n[h.confirmWarning]="warning"===l,n[h.confirmPrimary]="primary"===l,n)),autoFocus:!0},r(s,{className:h.iconPaddingStyle}),v("ra.action.confirm"))))};ka.propTypes={cancel:Ae.string,classes:Ae.object,confirm:Ae.string,confirmColor:Ae.string,ConfirmIcon:Ae.elementType,CancelIcon:Ae.elementType,isOpen:Ae.bool,loading:Ae.bool,onClose:Ae.func.isRequired,onConfirm:Ae.func.isRequired,title:Ae.string.isRequired},ka.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:on,CancelIcon:an,isOpen:!1};var Na=["disabled","asistant","asistantResource","label","source"],Sa={seleccion:[],all:!0,none:!1},xa=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},Pa=function(e){return e},Ta=function(e){var n=e.disabled,o=e.label,a=void 0===o?"Funcionarios":o,l=e.source,s=mn(e,Na),u=Le(function(e){return e.admin.resources.form_224.list.selectedIds}),d=t(!1),m=d[0],p=d[1],f=yr(),g=c(function(){p(!1)},[p]);return r(i,null,r("div",{style:{display:"flex",alignItems:"center"}},r(Fe,dn({initialValue:Sa},s,{source:l,label:a,disabled:!0,parse:Pa,format:xa,helperText:!1,InputProps:{endAdornment:r(i,null,r(Fr,{onClick:function(e){f.change(l,{seleccion:[],all:!1,none:!0})},disabled:n,"aria-label":"Ninguno",size:"small",title:"Ninguno"},r(nn,null)),r(Fr,{onClick:function(e){f.change(l,{seleccion:[],all:!0,none:!1})},disabled:n,"aria-label":"Todos",size:"small",title:"Todos"},r(rn,null)),r(Fr,{onClick:function(e){return p(!0)},disabled:n,"aria-label":"Selección",size:"small",title:"Selección"},r(tn,null)))}}))),r(ka,{isOpen:m,title:"Selección de "+a,onConfirm:function(e,r){p(!1),f.change(l,{seleccion:u,all:!1,none:!1})},onClose:g}))},wa=function(e){var n=jo(e);return!n.hidden&&r(Fe,dn({multiline:!0},n.propsContenido))},Ia=["tipo"],Ra=function(e){var n=e.tipo,t=mn(e,Ia),a=jo(t),i=a.propsContenido,l=a.hidden,s=yr(),c=ve({source:e.source}),u=c.input,d=c.meta,m="F"===n||"Z"===n;o(function(){i.value&&(s.change(e.source,i.value),e.disabled&&s.blur(e.source))}),o(function(){m&&""!=u.value&&d.valid&&d.modified&&!d.active&&i.onBlur()},[u.value]);var p=dn({},i);return!l&&("N"===n||"D"===n?r(De,p):"F"===n?r(cn,p):"Z"===n?r(un,p):r(Fe,"H"===n?dn({},p,{type:"time"}):p))},Fa=["tipo","value"],Oa=function(e){var n=e.tipo,t=mn(e,Fa),o=Lo(t),a=o.hidden,i=dn({},o.propsContenido);return!a&&("N"===n||"D"===n?r(Me,i):"F"===n?r(Be,i):"Z"===n?r(Be,dn({},i,{showTime:!0})):r(Ee,i))};export{gn as AppBar,Vo as BooleanField,Go as Camino,Ho as CheckBox,Yo as ComboBox,Ko as ComboBoxManual,Et as CreateEtriek,Lt as DeleteButtonNoWarning,At as EditEtriek,_n as EtrGrid,Wt as EtriekNotification,Nt as FichaActions,Ot as FichaContext,jt as FormDialog,Qt as FormEtriek,Mn as GE,at as GrillaEtriek,Xo as ImageField,io as Layout,co as ListActionsEtriek,ea as ListCheck,go as Login,eo as Menu,yo as MenuButton,ko as MultiTextField,ra as Password,ta as RadioButton,oa as RadioButtonManual,kt as Separador,So as ShowEtriek,Kt as SubMenu,Ta as TBSF,Oo as TabbedFormEtriek,st as TabbedGrillaEtriek,wa as TextArea,Ra as TextBox,fa as TextBoxSelection,Oa as TextField,It as choicesEstado,gt as dateFormat,Pt as dateFormatOptions,ht as dateParser,vt as dateTimeFormat,bt as dateTimeParser,qn as deleteRecargarComboBox,Rt as descargarLink,_o as enMessages,Eo as esMessages,Tt as etrFechaMayorQue,St as etrRequerido,xt as etrRequeridoNumerico,pt as getFormcodFromResource,wt as localeOptions,An as recargarComboBox,zn as setDisableAction,Wn as setHiddenAction,jn as setRequireAction,to as themes,yt as timeFormat,Ct as timeParser,Qn as useAjax,jo as useContenidoController,yn as useDeleteRowEtrGrid,Lo as useFieldController,Vn as useFormProgress,Zn as useGetJson,ut as useInitFicha,hn as useNuevo,Ft as useReferenceLabel,Cn as useSaveRowEtrGrid,ft as useStylesContenidos,$n as useUtils,Kn as useUtilsGrilla,Xn as useUtilsSubmit};
|