biblio-react 2.0.0-alpha9 → 2.0.0-alpha90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1 @@
1
- import{useContext as e,createContext as n,useMemo as r,useRef as o,useEffect as a,useCallback as t,forwardRef as i,createElement as l,useState as s,Fragment as c,Children as u,cloneElement as d}from"react";import m from"@mui/icons-material/Lock";import p from"@mui/icons-material/VpnLock";import{MenuItem as f,ListItemIcon as g,ListItemText as h,useMediaQuery as v,Typography as b,Box as y,alpha as _,createTheme as C,StyledEngineProvider as k,CardContent as w,CircularProgress as N,Stack as S,Tooltip as x,Collapse as E,List as P,Paper as T}from"@mui/material";import{useTranslate as L,useUserMenu as D,useResourceDefinitions as O,AppBar as A,UserMenu as R,Logout as I,useGetOne as F,useDataProvider as M,useGetList as q,Loading as V,useSafeSetState as B,useNotify as z,Button as j,SaveContextProvider as W,useDeleteWithConfirmController as G,Confirm as U,Form as H,SaveButton as J,useListContext as Y,useRedirect as K,useRefresh as Q,useUnselectAll as Z,useResourceDefinition as $,SimpleList as X,Datagrid as ee,EditButton as ne,TopToolbar as re,ListButton as oe,ShowButton as ae,required as te,minValue as ie,useResourceContext as le,Create as se,useRecordContext as ce,useDelete as ue,useEditController as de,Edit as me,SimpleForm as pe,useSidebarState as fe,MenuItemLink as ge,Menu as he,DashboardMenuItem as ve,Layout as be,sanitizeListRestProps as ye,CreateButton as _e,ExportButton as Ce,useLogin as ke,TextInput as we,PasswordInput as Ne,FieldTitle as Se,useShowController as xe,Show as Ee,TabbedFormView as Pe,defaultTheme as Te,BooleanField as Le,useInput as De,FileInput as Oe,ImageField as Ae,BooleanInput as Re,ReferenceInput as Ie,useChoicesContext as Fe,SelectInput as Me,ReferenceArrayInput as qe,SelectArrayInput as Ve,RadioButtonGroupInput as Be,useRecordSelection as ze,List as je,TextField as We,NumberInput as Ge,DateInput as Ue,DateTimeInput as He,NumberField as Je,DateField as Ye}from"react-admin";import Ke,{string as Qe,func as Ze,any as $e,bool as Xe}from"prop-types";import en from"@mui/icons-material/Add";import nn from"@mui/icons-material/Cancel";import rn from"@mui/icons-material/Delete";import on from"@mui/icons-material/Edit";import an from"@mui/material/Dialog";import tn from"@mui/material/DialogActions";import ln from"@mui/material/DialogContent";import sn from"@mui/material/DialogContentText";import cn from"@mui/material/DialogTitle";import un from"@mui/material/Paper";import{adaptV4Theme as dn,ThemeProvider as mn,alpha as pn}from"@mui/material/styles";import fn from"@mui/material/Typography";import{makeStyles as gn}from"@mui/styles";import{GridOverlay as hn,esES as vn,DataGrid as bn}from"@mui/x-data-grid";import{useFormState as yn,useFormContext as _n}from"react-hook-form";import{useMutation as Cn}from"react-query";import{useDispatch as kn,useSelector as wn}from"react-redux";import Nn from"@mui/material/Divider";import Sn from"@mui/material/Tab";import xn from"@mui/material/Tabs";import En from"@mui/icons-material/ChevronLeft";import{isAfter as Pn}from"date-fns";import Tn from"date-fns/locale/en-US";import Ln from"date-fns/locale/es";import Dn from"@mui/material/IconButton";import On from"@mui/material/Tooltip";import An from"@mui/material/Button";import Rn from"@mui/icons-material/Settings";import In from"@mui/icons-material/ExpandMore";import Fn from"@mui/material/Avatar";import Mn from"@mui/material/Card";import qn from"@mui/material/CardActions";import Vn from"@mui/material/CircularProgress";import Bn from"@mui/material/Menu";import zn from"@mui/material/MenuItem";import jn from"@mui/icons-material/Check";import Wn from"@mui/icons-material/RemoveCircleOutline";import Gn from"@mui/icons-material/Search";import Un from"@mui/icons-material/CheckCircle";import Hn from"@mui/icons-material/ErrorOutline";import Jn from"react-draggable";import{TreeView as Yn}from"devextreme-react";function Kn(){return(Kn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function Qn(e,n){if(null==e)return{};var r,o,a={},t=Object.keys(e);for(o=0;o<t.length;o++)n.indexOf(r=t[o])>=0||(a[r]=e[r]);return a}var Zn;function $n(e){var n=e.pathname,r=void 0===n?"/":n,o=e.search,a=void 0===o?"":o,t=e.hash,i=void 0===t?"":t;return a&&"?"!==a&&(r+="?"===a.charAt(0)?a:"?"+a),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}function Xn(e){var n={};if(e){var r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));var o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}
2
- /**
3
- * React Router v6.3.0
4
- *
5
- * Copyright (c) Remix Software Inc.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE.md file in the root directory of this source tree.
9
- *
10
- * @license MIT
11
- */!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Zn||(Zn={})),process;const er=n(null);"production"!==process.env.NODE_ENV&&(er.displayName="Navigation");const nr=n(null);"production"!==process.env.NODE_ENV&&(nr.displayName="Location");const rr=n({outlet:null,matches:[]});function or(e,n){if(!e)throw new Error(n)}function ar(e,n,r){let o,a="string"==typeof e?Xn(e):e,t=""===e||""===a.pathname?"/":a.pathname;if(null==t)o=r;else{let e=n.length-1;if(t.startsWith("..")){let n=t.split("/");for(;".."===n[0];)n.shift(),e-=1;a.pathname=n.join("/")}o=e>=0?n[e]:"/"}let i=function(e,n){void 0===n&&(n="/");let{pathname:r,search:o="",hash:a=""}="string"==typeof e?Xn(e):e;return{pathname:r?r.startsWith("/")?r:function(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}(r,n):n,search:ir(o),hash:lr(a)}}(a,o);return t&&"/"!==t&&t.endsWith("/")&&!i.pathname.endsWith("/")&&(i.pathname+="/"),i}"production"!==process.env.NODE_ENV&&(rr.displayName="Route");const tr=e=>e.join("/").replace(/\/\/+/g,"/"),ir=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",lr=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function sr(){return null!=e(nr)}function cr(){return sr()||("production"!==process.env.NODE_ENV?or(!1,"useLocation() may be used only in the context of a <Router> component."):or(!1)),e(nr).location}function ur(n){let{matches:o}=e(rr),{pathname:a}=cr(),t=JSON.stringify(o.map(e=>e.pathnameBase));return r(()=>ar(n,JSON.parse(t),a),[n,t,a])}
12
- /**
13
- * React Router DOM v6.3.0
14
- *
15
- * Copyright (c) Remix Software Inc.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE.md file in the root directory of this source tree.
19
- *
20
- * @license MIT
21
- */function dr(){return(dr=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function mr(e,n){if(null==e)return{};var r,o,a={},t=Object.keys(e);for(o=0;o<t.length;o++)n.indexOf(r=t[o])>=0||(a[r]=e[r]);return a}const pr=["onClick","reloadDocument","replace","state","target","to"],fr=["aria-current","caseSensitive","className","end","style","to","children"];process;const gr=i(function(n,r){let{onClick:i,reloadDocument:s,replace:c=!1,state:u,target:d,to:m}=n,p=mr(n,pr),f=function(n){sr()||("production"!==process.env.NODE_ENV?or(!1,"useHref() may be used only in the context of a <Router> component."):or(!1));let{basename:r,navigator:o}=e(er),{hash:a,pathname:t,search:i}=ur(n),l=t;if("/"!==r){let e=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?Xn(e).pathname:e.pathname}(n),o=null!=e&&e.endsWith("/");l="/"===t?r+(o?"/":""):tr([r,t])}return o.createHref({pathname:l,search:i,hash:a})}(m),g=function(n,r){let{target:i,replace:l,state:s}=void 0===r?{}:r,c=function(){sr()||("production"!==process.env.NODE_ENV?or(!1,"useNavigate() may be used only in the context of a <Router> component."):or(!1));let{basename:n,navigator:r}=e(er),{matches:i}=e(rr),{pathname:l}=cr(),s=JSON.stringify(i.map(e=>e.pathnameBase)),c=o(!1);return a(()=>{c.current=!0}),t(function(e,o){if(void 0===o&&(o={}),"production"!==process.env.NODE_ENV&&function(e,n){if(!e){"undefined"!=typeof console&&console.warn(n);try{throw new Error(n)}catch(e){}}}(c.current,"You should call navigate() in a React.useEffect(), not when your component is first rendered."),!c.current)return;if("number"==typeof e)return void r.go(e);let a=ar(e,JSON.parse(s),l);"/"!==n&&(a.pathname=tr([n,a.pathname])),(o.replace?r.replace:r.push)(a,o.state)},[n,r,s,l])}(),u=cr(),d=ur(n);return t(e=>{if(!(0!==e.button||i&&"_self"!==i||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))){e.preventDefault();let r=!!l||$n(u)===$n(d);c(n,{replace:r,state:s})}},[u,c,d,l,s,i,n])}(m,{replace:c,state:u,target:d});return l("a",dr({},p,{href:f,onClick:function(e){i&&i(e),e.defaultPrevented||s||g(e)},ref:r,target:d}))});"production"!==process.env.NODE_ENV&&(gr.displayName="Link"),"production"!==process.env.NODE_ENV&&(i(function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:t=!1,style:i,to:s,children:c}=e,u=mr(e,fr),d=cr(),m=ur(s),p=d.pathname,f=m.pathname;o||(p=p.toLowerCase(),f=f.toLowerCase());let g,h=p===f||!t&&p.startsWith(f)&&"/"===p.charAt(f.length),v=h?r:void 0;g="function"==typeof a?a({isActive:h}):[a,h?"active":null].filter(Boolean).join(" ");let b="function"==typeof i?i({isActive:h}):i;return l(gr,dr({},u,{"aria-current":v,className:g,ref:n,style:b,to:s}),"function"==typeof c?c({isActive:h}):c)}).displayName="NavLink");var hr=i(function(e,n){var r=L(),o=D().onClose,a=O(),t=a.form_59;return[a.form_275?l(f,Kn({component:gr,ref:n},e,{key:"/form_275",to:"/form_275",onClick:o}),l(g,null,l(m,null)),l(h,null,r("pos.change_pin"))):null,t?l(f,Kn({component:gr,ref:n},e,{key:"/form_59",to:"/form_59",onClick:o}),l(g,null,l(p,null)),l(h,null,r("pos.change_password"))):null]}),vr=function(){return l(R,null,l(hr,null),l(I,null))},br=function(e){var n=v(function(e){return e.breakpoints.up("sm")});return l(A,Kn({},e,{color:"secondary",userMenu:l(vr,null)}),l(b,{variant:"h6",color:"inherit",sx:{flex:1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},id:"react-admin-title"}),n&&l(y,{component:"span",sx:{flex:1}}))},yr=function(e,n){return F(e,{id:"-1"},n)},_r=gn(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.mode?"#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.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:_(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"GE"}),Cr=function(){var e=_r();return l(hn,{className:e.rootOverlay},l("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false"},l("g",{fill:"none",fillRule:"evenodd"},l("g",{transform:"translate(24 31.67)"},l("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),l("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"}),l("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"}),l("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"})),l("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"}),l("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)"},l("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),l("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})))),l("div",{className:e.label},"No hay registros"))},kr=function(e,n,r){var o=M(),a=Cn(function(){return o.deleteEtrRow(e,{params:n})},r);return{mutate:a.mutate,isLoading:a.isLoading}},wr=function(e,n,r,o){var a=M(),t=Cn(function(){return a[e](n,{params:r})},o);return{mutate:t.mutate,isLoading:t.isLoading}},Nr=["api","classes","className","confirmTitle","confirmContent","icon","record","redirect","onSuccess","onError","source","camposClaveFila"],Sr=["filterBy","claves","sortModel","columns","reference","allowAdd","allowRemove","etrResource","enableLoad"],xr=gn(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.mode?"#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.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:_(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"EtrGrid"}),Er={marginLeft:"1.6rem",fontWeight:"bold"},Pr=l(rn,null),Tr=function(e){var n=e.confirmTitle,r=void 0===n?"ra.message.delete_title":n,o=e.confirmContent,a=void 0===o?"ra.message.delete_content":o,i=e.icon,s=void 0===i?Pr:i,u=e.record,d=e.redirect,m=void 0!==d&&d,p=e.onSuccess,f=e.onError,g=e.source,h=e.camposClaveFila,v=Qn(e,Nr),b=xr(e),y=z(),_=G({record:u,redirect:m,mutationOptions:{onSuccess:p,onError:f}}),C=_.open,k=_.isLoading,w=_.handleDialogOpen,N=_.handleDialogClose,S=kr(e.resource,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);y("ra.notification.deleted",{type:"info",messageArgs:{smart_count:1}})},onError:function(e){y(e.message,{type:"warning"})}}).mutate,x=Object.keys(u).filter(function(e){return h.split(",").includes(e)}).reduce(function(e,n){return e[n]=u[n],e},{}),E=t(function(e){S({payload:{ge:g,clavesFila:x}})},[u]);return l(c,null,l(j,Kn({key:"button",onClick:w,className:b.deleteButton},v),s),l(U,{isOpen:C,loading:k,title:r,content:a,onConfirm:E,onClose:N}))},Lr=function(e){return l(an,{open:e.open,onClose:e.onClose,fullWidth:!0},l(cn,null,e.labelEstado+" "+e.label),l(sn,null,l(fn,{component:"span",display:"block",variant:"subtitle1",style:Kn({},Er)},e.msgTitle),e.msgDesc),l(H,{resource:e.resource,onSubmit:e.onSubmit,defaultValues:e.defaultValues},e.children))};Lr.propTypes={label:Qe,onClick:Ze,icon:$e,open:Xe,onClose:Ze,labelEstado:Qe,msgTitle:$e,msgDesc:$e,resource:$e,save:Ze,render:Ze};var Dr=function(e){return l(Tr,{api:!0,confirmTitle:"ra.action.delete",source:e.source,record:e.row,resource:e.resource,camposClaveFila:e.camposClaveFila})},Or=function(e){var n=e.resource,r=e.estado,o=e.editors,a=e.recordPadre,t=e.camposClaveFila,i=e.setOpen,s=e.isLoading,m=yn(),p=m.isDirty,f=m.isValid;return l(c,null,l(ln,null,u.map(o,function(e,o){return d(e,{resource:n,estado:r,initialValue:a[e.props.source],fullWidth:!0,disabled:void 0!==e.props.disabled?e.props.disabled:"N"!==r&&-1!==t.indexOf(e.props.source),InputLabelProps:{shrink:!0}})})),l(tn,null,l(J,{disabled:!p||!f}),l(j,{label:"ra.action.cancel",onClick:function(e){i(!1),e.stopPropagation()},disabled:s},l(nn,null))))},Ar=function(e){var n=e.editors,o=e.record,a=e.clavesFila,t=e.camposClaveFila,i=e.resource,s=e.label,u=e.source,d=e.etrResource,m=B(!1),p=m[0],f=m[1],g=yr(d,{enabled:p}).data,h=wr("createEtrRow",i,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);f(!1),y("ra.notification.created",{type:"info"})},onError:function(e){y(e.message,{type:"warning"})}}),v=h.mutate,b=h.isLoading,y=z(),_=L()("ra.action.create"),C=function(e){v({payload:{data:Kn({},e,a),ge:u,camposClaveFila:t,estado:"N"}})},k=r(function(){return{save:C,setOnFailure:function(e){return console.log(e)}}},[C]);return l(c,null,l(j,{onClick:function(e){f(!0),e.stopPropagation()}},l(en,null)),l(W,{value:k},l(Lr,{open:p,onClose:function(e){f(!1),e.stopPropagation()},labelEstado:_,label:s,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:i,onSubmit:C,defaultValues:g},l(Or,{resource:i,estado:"N",editors:n,recordPadre:o,camposClaveFila:t,isLoading:b,setOpen:function(){f(!1)}}))))},Rr=function(e){var n=e.editors,r=e.clavesFila,o=e.camposClaveFila,a=e.resource,t=e.label,i=e.source,s=e.row,u=z(),d=L(),m=B(!1),p=m[0],f=m[1],g=wr("updateEtrRow",a,{},{refresh:!0,onSuccess:function(e){if(e.error)throw new Error(e.error);f(!1),u("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}})},onError:function(e){u(e.message,{type:"warning"})}}),h=g.mutate,v=g.isLoading,b=d("ra.action.edit");return l(c,null,l(j,{onClick:function(e){f(!0),e.stopPropagation()}},l(on,null)),l(Lr,{open:p,onClose:function(e){f(!1),e.stopPropagation()},labelEstado:b,label:t,msgTitle:e.msgTitle,msgDesc:e.msgDesc,resource:a,onSubmit:function(e){h({payload:{data:Kn({},r,e),ge:i,camposClaveFila:o,estado:"M"}})}},l(Or,{resource:a,estado:"M",editors:n,recordPadre:s,camposClaveFila:o,isLoading:v,setOpen:function(){f(!1)}})))},Ir=C(dn({},vn)),Fr=function(e){var n=e.filterBy,o=void 0===n?"":n,a=e.claves,t=e.sortModel,i=e.columns,c=e.reference,u=e.allowAdd,d=void 0===u||u,m=e.allowRemove,p=void 0===m||m,f=e.etrResource,g=e.enableLoad,h=void 0===g||g,v=Qn(e,Sr),b=e.record,y=xr(e),_=s(t)[1],C=t[0],w=C.field,N=C.sort,S=Object.keys(b).filter(function(e){return a.split(",").includes(e)}).reduce(function(e,n){return e[n]=b[n],e},{}),x={};o.split(",").forEach(function(e){e&&(x[e]=[{type:"string",comparison:"eq",value:b[e],field:e}])});var E=q(c,{page:1,perPage:200},{field:w,order:N},x,{enabled:h}),P=E.data,T=E.isLoading,L=r(function(){return P.map(function(e){return e.id})},[P]),D=[d?{field:"BTN",headerName:"",sortable:!1,renderHeader:function(e){return l(Ar,Kn({},v,{etrResource:f,camposClaveFila:a,clavesFila:S,api:e.api}))}}:{}].concat(i,[{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return l(Rr,Kn({},v,{camposClaveFila:a,clavesFila:S,api:e.api,row:e.row}))}},p?{field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return l(Dr,Kn({},v,{camposClaveFila:a,api:e.api,row:e.row}))}}:{}]),O=r(function(){return D},[JSON.stringify(D)]);return T?l(V,null):l(un,{className:y.rootPaper},l(k,{injectFirst:!0},l(mn,{theme:Ir},l(bn,Kn({className:y.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,sortModel:t,rows:L,columns:O,onSortModelChange:function(e){return _(e)},components:{NoRowsOverlay:Cr}},v)))))},Mr=["filterBy","sortModel","columns","reference","filter","enableLoad"],qr=C(dn({},vn)),Vr=function(e){var n=e.filterBy,o=void 0===n?"":n,a=e.sortModel,t=e.columns,i=e.reference,c=e.filter,u=void 0===c?[]:c,d=e.enableLoad,m=void 0===d||d,p=Qn(e,Mr),f=e.record,g=_r(e),h=s(a),v=h[0],b=h[1],y=a[0],_=y.field,C=y.sort,w=r(function(){return[].concat(t)},[JSON.stringify(t)]),N=[];o.split(",").forEach(function(e){e&&N.push({type:"string",comparison:"eq",value:f[e],field:e})});var S=Kn({},N.concat(u)),x=q(i,{page:1,perPage:200},{field:_,order:C},S,{enabled:m}),E=x.data,P=x.isLoading,T=r(function(){return E.map(function(e){return e.id})},[E]);return P?l(V,null):l(un,{className:g.rootPaper},l(k,{injectFirst:!0},l(mn,{theme:qr},l(bn,Kn({className:g.root,disableSelectionOnClick:!0,pageSize:50,hideFooter:!0,rows:T,columns:w,sortModel:v,onSortModelChange:function(e){return b(e)},components:{NoRowsOverlay:Cr}},p)))))},Br=n(),zr=function(e){var n=e.children,o=s(!1),a=o[0],t=o[1],i=r(function(){return{open:a,show:function(){return t(!0)},hide:function(){return t(!1)}}},[a]);return l(Br.Provider,{value:i},n)},jr=function(){return e(Br)},Wr=function(e,n,r,o){return{type:"RELOAD_CB",payload:{id:e,method:n,params:r,callback:o}}},Gr=function(e,n){return{type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:n}}},Ur=function(e,n){return{type:"HIDE_INPUT",payload:{id:e,hidden:n}}},Hr=function(e,n){return{type:"DISABLE_INPUT",payload:{id:e,disabled:n}}},Jr=function(e,n){return{type:"REQUIRE_INPUT",payload:{id:e,required:n}}},Yr=function(){var e=kn();return t(function(n,r,o,a){e(Wr(n,r,o,a))},[e])},Kr=function(){var e=kn();return t(function(n,r){e(Ur(n,r))},[e])},Qr=function(){var e=kn();return t(function(n,r){e(Hr(n,r))},[e])},Zr=function(){var e=kn();return t(function(n,r){e(Jr(n,r))},[e])},$r=function(e,n,r,o){var a=M(),t=Cn(function(){return a.getJson(e,{method:n,params:r})},o);return{mutate:t.mutate,isLoading:t.isLoading}},Xr=function(e){var n=$r(e),r=n.mutate,o=n.isLoading;return[t(function(e,n,o){return r({payload:{params:n,method:e}},{returnPromise:!0,onSuccess:o,onError:o})},[]),o]},eo=function(e){return{}},no=function(e){var n=Y(e),r=z(),o=K(),a=Q(),t=Z(e.resource);return{ajax:Xr(e.resource)[0],data:n,notify:r,redirect:o,refresh:a,unselectAll:t}},ro=function(e){var n=Yr(),r=Kr(),o=Qr(),a=Zr(),t=jr(),i=z(),l=K();return{ajax:Xr(e.resource)[0],notify:i,redirect:l,recargarComboBox:n,progress:t,setHidden:r,setDisable:o,setRequire:a}},oo=function(e){var n=Yr(),r=Kr(),o=Qr(),a=Zr(),t=jr(),i=z(),l=K();return{form:_n(),ajax:Xr(e.resource)[0],notify:i,redirect:l,recargarComboBox:n,progress:t,setHidden:r,setDisable:o,setRequire:a}},ao=["isRowEditable"],to=["isRowEditable","primaryText","secondaryText","desktopSize","onRenderGrilla","onLoadGrilla","hasEdit"],io=function(e,n){return void 0===n||"function"==typeof n&&n(e)},lo=function(e){var n=e.isRowEditable,r=Qn(e,ao);return io(e.record,n)?l(ne,r):null},so=function(e){!function(e){var n=e.onRenderGrilla,r=e.onLoadGrilla,o=Y().isLoading,t=no(e);a(function(){n&&n(t)},[]),a(function(){o||r&&r(t)},[o])}(e);var n=v(function(e){return e.breakpoints.down("md")}),r=$(e).hasEdit,o=e.isRowEditable,t=e.primaryText,i=e.secondaryText,s=e.desktopSize,c=void 0!==s&&s,d=Qn(e,to),m=e.children,p=u.count(e.children),f=t,g=i;return t||(p>=4||p>=3||p>=2?f=function(e){return e[m[0].props.source]+" - "+e[m[1].props.source]}:1===p&&(f=function(e){return e[m[0].props.source]})),i||(p>=4?g=function(e){return e[m[2].props.source]+" - "+e[m[3].props.source]}:p>=3?g=function(e){return e[m[2].props.source]}:p>=2?f=function(e){return e[m[0].props.source]+" - "+e[m[1].props.source]}:1===p&&(f=function(e){return e[m[0].props.source]})),n&&!1===c?l(X,{linkType:function(e){return!(!r||!io(e,o))&&"edit"},primaryText:f,secondaryText:g}):l(ee,d,u.map(m,function(e){return e.props.hidden?null:e}),r&&l(lo,{isRowEditable:o}))},co=["ids"],uo=["filterValues","setFilters","tabs","GridComponent"],mo=function(e){var n=e.filterValues,r=e.setFilters,o=e.tabs,a=o.ids,t=Qn(o,co),i=e.GridComponent,s=void 0===i?so:i,u=Qn(e,uo),d=n.id;return l(c,null,l(xn,{value:d,indicatorColor:"primary",onChange:function(e,o){r(Kn({},n,{id:o}))}},a.map(function(e){return l(Sn,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e})})),l(Nn,null),l(s,Kn({},u,t[d])))},po=["useFormulario"],fo=function(e){var n=e.useFormulario;return{fichaProps:(void 0===n?eo:n)(Qn(e,po))}},go=["className","record","hasEdit","hasShow","hasList","resource","totalPages","showFilter","setSort","setPerPage","perPage","defaultTitle","setPage","setFilters","selectedIds","onUnselectItems","onToggleItem","isLoading","exporter","hideFilter","hasCreate","filterValues","displayedFilters","currentSort"],ho=["children","className","data","hasShow","hasList"],vo=function(e){return e.split("_")[1]},bo=gn(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)}}),yo=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 o=/(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null!==o){var a=new Date(parseInt(o[1],10),parseInt(o[2],10)-1,parseInt(o[3],10));if(!isNaN(a))return a.toString()}},_o=function(e,n){if(!e)return"";var r=e.split(" "),o="";switch(r[1]){case"Jan":o="01";break;case"Feb":o="02";break;case"Mar":o="03";break;case"Apr":o="04";break;case"May":o="05";break;case"Jun":o="06";break;case"Jul":o="07";break;case"Aug":o="08";break;case"Sep":o="09";break;case"Oct":o="10";break;case"Nov":o="11";break;case"Dec":o="12"}return r[2]+"/"+o+"/"+r[3]},Co=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 o=new Date(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),r[4],r[5]);if(!isNaN(o))return o.toString()}},ko=function(e,n){if(!e)return"";var r=e.split(" "),o="";switch(r[1]){case"Jan":o="01";break;case"Feb":o="02";break;case"Mar":o="03";break;case"Apr":o="04";break;case"May":o="05";break;case"Jun":o="06";break;case"Jul":o="07";break;case"Aug":o="08";break;case"Sep":o="09";break;case"Oct":o="10";break;case"Nov":o="11";break;case"Dec":o="12"}return r[2]+"/"+o+"/"+r[3]+" "+r[4].substr(0,5)},wo=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 o=/(\d{2}):(\d{2})/.exec(e);if(null!==o){var a=new Date;return a.setHours(o[0]),a.setMinutes(o[1]),a.toString()}},No=function(e,n){return e?e.split(" ")[4].substring(0,5):""},So=function(e){return l(fn,{variant:"h6",gutterBottom:!0},e.children)},xo=function(e){var n=e.children,r=e.className,o=e.data,a=e.hasShow,t=e.hasList,i=void 0===t||t,s=Qn(e,ho);return l(re,Kn({className:r},Qn(s,go)),n,i&&l(oe,{label:"ra.action.back",icon:l(En,null)}),a&&l(ae,{record:o}))},Eo=te(),Po=[Eo,ie(1)],To={format:"dd/MM/yyyy"},Lo=function(e){return function(n,r){var o=r[e];if(n&&o){var a=new Date(o),t=new Date(n);if(Pn(a,t))return{message:"validation.greater_or_equal",args:{menor:o}}}}},Do=function(e){return void 0===e&&(e="es"),{locale:"en"===e?Tn:Ln}},Oo=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],Ao=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()},Ro=function(e,n){var r=le(),o=F("cb_"+vo(r)+"_"+e,{id:n}),a=o.data;return o.isLoading||o.error?"":(null==a?void 0:a.etiqueta)||""},Io=n({}),Fo=["useFormulario","enableLoad"],Mo=function(e){var n=e.enableLoad,o=void 0===n||n,a=Qn(e,Fo),t=le(e),i=yr(t,{enabled:o}),s=i.data,c=i.isLoading,u=fo(e).fichaProps,d=r(function(){return{estado:"N",initialValues:s,isLoading:c,fichaProps:u}},[s,c,u]);return l(zr,null,l(Io.Provider,{value:d},l(se,Kn({},a,null==u?void 0:u.panel))))};function qo(e){var n,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(r=qo(e[n]))&&(o&&(o+=" "),o+=r);else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Vo(){for(var e,n,r=0,o="";r<arguments.length;)(e=arguments[r++])&&(n=qo(e))&&(o&&(o+=" "),o+=n);return o}Mo.propTypes={useFormulario:Ke.func};var Bo=["classes","filterValues","handleSubmit","invalid","label","pristine","resource","saving","selectedIds","redirect"],zo=["resource","redirect","className","icon","label"],jo=gn(function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:pn(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),Wo=function(e){var n=jo(e),r=L(),o=e.resource,a=e.className,t=e.icon,i=e.label,s=void 0===i?"ra.action.delete":i,c=Qn(e,zo),u=ce(),d=ue(o,{id:u.id}),m=d[0],p=d[1].isLoading;return l(On,{title:r("ra.action.delete")},l(Dn,Kn({disabled:p,onClick:function(){return m()},label:s,className:Vo("ra-delete-button",n.deleteButton,a),key:"button"},Qn(c,Bo),{size:"large"}),t))};Wo.defaultProps={redirect:"list",icon:l(rn,null)};var Go=["useFormulario"],Uo=function(e){var n=Qn(e,Go),o=de(n),a=o.record,t=o.isLoading,i=fo(e).fichaProps,s=r(function(){return{estado:"M",initialValues:a,isLoading:t,fichaProps:i}},[a,t,i]);return l(zr,null,l(Io.Provider,{value:s},l(me,Kn({},n,null==i?void 0:i.panel))))},Ho=gn(function(e){return{button:{margin:e.spacing(1)},input:{display:"none"}}}),Jo=i(function(e,n){var r=e.isOpen,o=e.onConfirm,a=e.onClose,t=e.title,i=e.dialogText,s=e.children,c=e.hasAccept,u=void 0===c||c,d=e.hasCancel,m=void 0===d||d,p=e.isLoading,f=void 0!==p&&p,g=Ho(e),h=function(e){a&&a(e)};return l(an,{ref:n,open:r,fullWidth:!0,onClose:h,"aria-labelledby":"form-dialog-title"},l(cn,{id:"form-dialog-title"},t),l(ln,null,l(sn,null,i),s),(u||m)&&l(tn,null,m&&l(An,{onClick:h,variant:"contained",color:"secondary",className:g.button,disabled:f},"Cancelar"),u&&l(An,{onClick:function(e){o&&o(e)},variant:"contained",color:"primary",className:g.button,disabled:f},"Ok")))}),Yo=["children","className","component","defaultValues","onSubmit","record","resource","reValidateMode","sx","toolbar","validate","resolver","warnWhenUnsavedChanges"],Ko=gn(function(e){return{block:{pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},progress:{position:"absolute",left:"50%",top:"50%"}}}),Qo=function(n){var r=Ko(n),o=jr(),t=le(n),i=e(Io),s=i.estado,c=i.isLoading,u=i.initialValues,d=i.fichaProps,m=oo({resource:t});return a(function(){d.onRenderFicha&&d.onRenderFicha(m,s)},[]),a(function(){c||d.onLoadFicha&&d.onLoadFicha(m,s,u)},[c]),l(w,{className:o.open?r.block:"",sx:n.sx},o.open&&l(N,{className:r.progress,thickness:4,size:50}),l(S,Kn({alignItems:"flex-start"},Qn(n,Yo)),n.children))},Zo=function(n){var r=e(Io),o=r.initialValues,a=r.fichaProps,i=a.onBeforeSubmitFicha,s=a.config,c=void 0===s?{}:s,u=ro(n),d=z(),m=t(function(e){var r=i&&i(Kn({form:{values:e}},u),"N");return"string"==typeof r?void d(r,{type:"warning"}):void 0===r||r?n.onSubmit(e):void 0},[i,u]);return l(H,Kn({},n,c,{onSubmit:m,defaultValues:o}),l(Qo,null))};Zo.propTypes=Kn({},pe.propTypes);var $o=function(e){var n=e.handleToggle,r=e.isOpen,o=e.name,a=e.icon,t=e.children,i=e.dense,s=L(),c=fe()[0],u=l(f,{dense:i,onClick:n},l(g,{sx:{minWidth:5}},r?l(In,null):a),l(b,{variant:"inherit",color:"textSecondary"},s(o)));return l("div",null,c||r?u:l(x,{title:s(o),placement:"right"},u),l(E,{in:r,timeout:"auto",unmountOnExit:!0},l(P,{dense:i,component:"div",disablePadding:!0,sx:{"& a":{transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",paddingLeft:c?4:2}}},t)))},Xo=["items","translate"],ea=function(e){var n=e.dense,r=void 0!==n&&n,o=L(),a=s({mnuPrueba:!1}),t=a[0],i=a[1],c=v(function(e){return e.breakpoints.down("sm")}),u=fe()[0],d=function e(n){var r=n.items,o=n.translate,a=Qn(n,Xo),t=a.state,i=a.handleToggle,s=a.dense;return r&&l("div",null,r.map(function(n){var r=n.name,c=n.menu,u=n.label;return c?l($o,{key:r,name:u,handleToggle:function(){return i(r)},isOpen:t[r],icon:l(Rn,null),dense:s},e(Kn({items:c,translate:o},a))):l(ge,{key:r,to:"/"+r,primaryText:o("resources."+r+".name",{_:u}),dense:s,leftIcon:l(Rn,null)})}))}({items:JSON.parse(localStorage.getItem("menus")),handleToggle:function(e){i(function(n){var r;return Kn({},n,((r={})[e]=!n[e],r))})},state:t,activeClassName:"",iconClass:"",className:"",open:u,dense:r,translate:o});return l(y,{sx:{width:u?230:50,marginTop:1,marginBottom:1,transition:function(e){return e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}}},l(he,null,l(ve,{primaryText:o("ra.page.dashboard")}),d,c&&l(ge,{to:"/configuration",primaryText:o("pos.configuration"),leftIcon:l(Rn,null),dense:r})))},na=function(e){return l(be,Kn({},e,{appBar:br,menu:ea}))},ra=["className","exporter","filters","children","jsBotonGrilla"],oa=function(e){var n=e.className,o=e.exporter,a=e.filters,t=e.children,i=e.jsBotonGrilla,s=Qn(e,ra),c=no(e).utils,m=Y(e),p=le(s),f=$(s).hasCreate,g=m.currentSort,h=m.displayedFilters,v=m.filterValues,b=m.selectedIds,y=m.showFilter,_=m.total,C=Kn({},c,m);return r(function(){return l(re,Kn({className:n},ye(s)),a&&d(a,{resource:p,showFilter:y,displayedFilters:h,filterValues:v,context:"button"}),f&&l(_e,null),!1!==o&&l(Ce,{disabled:0===_,resource:p,sort:g,filterValues:v}),u.map(t,function(e,n){return d(e,{onClick:e.props.options?null:function(n){return i(C,e.key)},options:e.props.options?e.props.options.map(function(e){return Kn({},e,{onClick:function(n){return i(C,e.key)}})}):null})}))},[p,h,v,b,a,_])},aa=gn(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"}}}),ta=function(e){var n=e.loginBackgroundImage,r=e.nameSource,o=void 0===r?"username":r,a=e.passwordSource,t=void 0===a?"password":a,i=s(!1),c=i[0],u=i[1],d=L(),p=d("ra.auth.sign_in"),f=aa({loginBackgroundImage:n,textLength:p.length}),g=z(),h=ke(),v=cr();return l(H,{onSubmit:function(e){u(!0),h(e,v.state?v.state.nextPathname:"/").catch(function(e){u(!1),g("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error",{type:"warning",messageArgs:{_:"string"==typeof e?e:e&&e.message?e.message:void 0}})})},validate:function(e){var n={};return e[o]||(n[o]=d("ra.validation.required")),e[t]||(n[t]=d("ra.validation.required")),n}},l("div",{className:f.main},l(Mn,{className:f.card},l("div",{className:f.avatar},l(Fn,{className:f.avatarIcon},l(m,null))),l("div",{className:f.hint},"Inicio de Sesión"),l("div",{className:f.form},l("div",{className:f.input},l(we,{autoFocus:!0,name:o,label:d("ra.auth.username"),disabled:c})),l("div",{className:f.input},l(Ne,{name:t,label:d("ra.auth.password"),type:"password",disabled:c}))),l(qn,{className:f.actions},l(An,{variant:"contained",type:"submit",color:"primary",disabled:c,fullWidth:!0},c&&l(Vn,{className:f.icon,size:18,thickness:2}),p)))))},ia=["displayedFilters","filterValues","showFilter"],la=["className","options","icon","label","disabled"],sa=gn({root:{display:"inline-block"},paddingRight:{paddingRight:4}}),ca=function(e){var n,r=e.className,a=e.options,t=void 0===a?[]:a,i=e.icon,c=e.label,u=e.disabled,d=Qn(e,la),m=s(!1),p=m[0],f=m[1],g=o(),h=s(0),v=h[0],b=h[1],y=sa(e),_=le(e);return l("div",Kn({className:Vo(y.root,r)},Qn(d,ia)),l(j,{className:"add-filter",label:c,onClick:function(e){e.preventDefault(),f(!0),g.current=e.currentTarget},title:t[v].label,disabled:u},(null===(n=t[v])||void 0===n?void 0:n.icon)||i),l(Bn,{open:p,anchorEl:g.current,onClose:function(e){g.current&&g.current.contains(e.target)||f(!1)}},t.map(function(e,n){return l(zn,{key:e.label,disabled:e.disabled,selected:n===v,onClick:function(r){!function(e,n){b(n),f(!1)}(0,n),e.onClick&&e.onClick(r,n)},resource:_,title:e.label},e.icon,l("span",{className:y.paddingRight}),l(Se,{label:e.label,resource:_}))})))},ua=["fields","className","textAlign","sortable"],da=function(e){var n=e.fields,r=e.className,o=Qn(e,ua),a=n.campos,t=n.separador,i=void 0===t?"":t,s=n.secundario,c=void 0===s?[]:s,u=n.hasSecundario,d=ce(),m=a.map(function(e){return void 0!==d[e]?d[e]:e}).join(""+i);return l(fn,Kn({noWrap:!0,variant:"inherit",className:r},o),m,u&&l(fn,{component:"span",display:"block",color:"textSecondary",variant:"caption"},c.map(function(e){return(e.etiqueta||"---")+": "+(d[e.campo]||"---")}).join(" ")))},ma=["useFormulario"],pa=function(e){var n=Qn(e,ma),o=xe(n),a=o.record,t=o.isLoading,i=fo(e).fichaProps,s=r(function(){return{estado:"M",initialValues:a,isLoading:t,fichaProps:i}},[a,t,i]);return l(zr,null,l(Io.Provider,{value:s},l(Ee,Kn({},n,o,null==i?void 0:i.panel))))},fa=function(n){var r=e(Io),o=r.initialValues,a=r.fichaProps,i=a.onBeforeSubmitFicha,s=a.config,c=void 0===s?{}:s,u=ro(n),d=z(),m=t(function(e){var r=i&&i(Kn({form:{values:e}},u),"N");return"string"==typeof r?void d(r,{type:"warning"}):void 0===r||r?n.onSubmit(e):void 0},[i,u]);return l(H,Kn({},n,c,{onSubmit:m,defaultValues:o}),l(Pe,{component:Qo}))};fa.defaultProps={syncWithLocation:!1};var ga=Kn({},Te,{palette:Kn({},Te.palette,{mode:"dark"}),components:Kn({},Te.components,{RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),ha={__proto__:null,lightTheme:Kn({},Te,{palette:Kn({},Te.palette,{mode:"light"}),components:Kn({},Te.components,{RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),darkTheme:ga},va={ra:{action:{add_filter:"Add filter",add:"Add",back:"Go Back",bulk_actions:"1 item selected |||| %{smart_count} items selected",cancel:"Cancel",clear_input_value:"Clear value",clone:"Clone",confirm:"Confirm",create:"Create",create_item:"Create %{item}",delete:"Delete",edit:"Edit",export:"Export",list:"List",refresh:"Refresh",remove_filter:"Remove this filter",remove:"Remove",save:"Save",search:"Search",select_all:"Select all",select_row:"Select this row",show:"Show",sort:"Sort",undo:"Undo",unselect:"Unselect",expand:"Expand",close:"Close",open_menu:"Open menu",close_menu:"Close menu",update:"Update",move_up:"Move up",move_down:"Move down",open:"Open",toggle_theme:"Toggle Theme"},boolean:{true:"Yes",false:"No",null:" "},page:{create:"Create %{name}",dashboard:"Dashboard",edit:"%{name} #%{id}",error:"Something went wrong",list:"%{name}",loading:"Loading",not_found:"Not Found",show:"%{name} #%{id}",empty:"No %{name} yet.",invite:"Do you want to add one?"},input:{file:{upload_several:"Drop some files to upload, or click to select one.",upload_single:"Drop a file to upload, or click to select it."},image:{upload_several:"Drop some pictures to upload, or click to select one.",upload_single:"Drop a picture to upload, or click to select it."},references:{all_missing:"Unable to find references data.",many_missing:"At least one of the associated references no longer appears to be available.",single_missing:"Associated reference no longer appears to be available."},password:{toggle_visible:"Hide password",toggle_hidden:"Show password"}},message:{about:"About",are_you_sure:"Are you sure?",bulk_delete_content:"Are you sure you want to delete this %{name}? |||| Are you sure you want to delete these %{smart_count} items?",bulk_delete_title:"Delete %{name} |||| Delete %{smart_count} %{name}",bulk_update_content:"Are you sure you want to update this %{name}? |||| Are you sure you want to update these %{smart_count} items?",bulk_update_title:"Update %{name} |||| Update %{smart_count} %{name}",delete_content:"Are you sure you want to delete this item?",delete_title:"Delete %{name} #%{id}",details:"Details",error:"A client error occurred and your request couldn't be completed.",invalid_form:"The form is not valid. Please check for errors",loading:"The page is loading, just a moment please",no:"No",not_found:"Either you typed a wrong URL, or you followed a bad link.",yes:"Yes",unsaved_changes:"Some of your changes weren't saved. Are you sure you want to ignore them?"},navigation:{no_results:"No results found",no_more_results:"The page number %{page} is out of boundaries. Try the previous page.",page_out_of_boundaries:"Page number %{page} out of boundaries",page_out_from_end:"Cannot go after last page",page_out_from_begin:"Cannot go before page 1",page_range_info:"%{offsetBegin}-%{offsetEnd} of %{total}",partial_page_range_info:"%{offsetBegin}-%{offsetEnd} of more than %{offsetEnd}",current_page:"Page %{page}",page:"Go to page %{page}",first:"Go to first page",last:"Go to last page",next:"Go to next page",previous:"Go to previous page",page_rows_per_page:"Rows per page:",skip_nav:"Skip to content"},sort:{sort_by:"Sort by %{field} %{order}",ASC:"ascending",DESC:"descending"},auth:{auth_check_error:"Please login to continue",user_menu:"Profile",username:"Username",password:"Password",sign_in:"Sign in",sign_in_error:"Authentication failed, please retry",logout:"Logout"},notification:{updated:"Element updated |||| %{smart_count} elements updated",created:"Element created",deleted:"Element deleted |||| %{smart_count} elements deleted",bad_item:"Incorrect element",item_doesnt_exist:"Element does not exist",http_error:"Server communication error",data_provider_error:"dataProvider error. Check the console for details.",i18n_error:"Cannot load the translations for the specified language",canceled:"Action cancelled",logged_out:"Your session has ended, please reconnect.",not_authorized:"You're not authorized to access this resource."},validation:{required:"Required",minLength:"Must be %{min} characters at least",maxLength:"Must be %{max} characters or less",minValue:"Must be at least %{min}",maxValue:"Must be %{max} or less",number:"Must be a number",email:"Must be a valid email",oneOf:"Must be one of: %{options}",regex:"Must match a specific format (regexp): %{pattern}"},saved_queries:{label:"Saved queries",query_name:"Query name",new_label:"Save current query...",new_dialog_title:"Save current query as",remove_label:"Remove saved query",remove_label_with_name:'Remove query "%{name}"',remove_dialog_title:"Remove saved query?",remove_message:"Are you sure you want to remove that item from your list of saved queries?",help:"Filter the list and save this query for later"}}};va.ra.page.empty="No records yet";var ba=Kn({},va,{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}"}});const ya={ra:{action:{add:"Añadir",add_filter:"Añadir filtro",back:"Ir atrás",bulk_actions:"1 item seleccionado |||| %{smart_count} items seleccionados",cancel:"Cancelar",clear_input_value:"Limpiar valor",clone:"Clonar",close:"Cerrar",close_menu:"Cerrar menú",confirm:"Confirmar",create:"Crear",create_item:"Crear %{item}",delete:"Eliminar",edit:"Editar",expand:"Expandir",export:"Exportar",list:"Listar",move_up:"Mover arriba",move_down:"Mover abajo",open_menu:"Abrir menú",refresh:"Refrescar",remove:"Borrar",remove_filter:"Borrar filtro",save:"Guardar",search:"Buscar",select_all:"Seleccionar todo",select_row:"Seleccionar esta fila",show:"Mostrar",sort:"Ordenar",undo:"Deshacer",unselect:"Deseleccionar",update:"Actualizar"},auth:{auth_check_error:"Por favor inicie sesión para continuar",logout:"Cerrar Sesión",password:"Contraseña",sign_in:"Acceder",sign_in_error:"La autenticación falló, por favor, vuelva a intentarlo",user_menu:"Perfil",username:"Usuario"},boolean:{true:"Sí",false:"No",null:" "},input:{file:{upload_several:"Arrastre algunos archivos para subir o haga clic para seleccionarlos.",upload_single:"Arrastre un archivo para subir o haga clic para seleccionarlo."},image:{upload_several:"Arrastre algunas imagénes para subir o haga clic para seleccionarlas.",upload_single:"Arrastre alguna imagen para subir o haga clic para seleccionarla."},references:{all_missing:"No se pueden encontrar datos de referencias.",many_missing:"Al menos una de las referencias asociadas parece no estar disponible.",single_missing:"La referencia asociada no parece estar disponible."},password:{toggle_visible:"Ocultar contraseña",toggle_hidden:"Mostrar contraseña"}},message:{about:"Acerca de",are_you_sure:"¿Está seguro?",bulk_delete_content:"¿Seguro que quiere eliminar este %{name}? |||| ¿Seguro que quiere eliminar estos %{smart_count} items?",bulk_delete_title:"Eliminar %{name} |||| Eliminar %{smart_count} %{name} items",bulk_update_content:"¿Seguro que quiere actualizar este %{name}? |||| ¿Seguro que quiere actualizar estos %{smart_count} items?",bulk_update_title:"Actualizar %{name} |||| Actualizar %{smart_count} %{name} items",delete_content:"¿Seguro que quiere eliminar este item?",delete_title:"Eliminar %{name} #%{id}",details:"Detalles",error:"Se produjo un error en el cliente y su solicitud no se pudo completar",invalid_form:"El formulario no es válido. Por favor verifique si hay errores",loading:"La página se está cargando, espere un momento por favor",no:"No",not_found:"O bien escribió una URL incorrecta o siguió un enlace incorrecto.",yes:"Sí",unsaved_changes:"Algunos de sus cambios no se guardaron. ¿Está seguro que quiere ignorarlos?"},navigation:{next:"Siguiente",no_more_results:"El número de página %{page} está fuera de los límites. Pruebe la página anterior.",no_results:"No se han encontrado resultados",page_out_from_begin:"No puede ir antes de la página 1",page_out_from_end:"No puede ir después de la última página",page_out_of_boundaries:"Número de página %{page} fuera de los límites",page_range_info:"%{offsetBegin} - %{offsetEnd} de %{total}",page_rows_per_page:"Filas por página:",prev:"Anterior",skip_nav:"Saltar al contenido"},sort:{sort_by:"Ordenar por %{field} %{order}",ASC:"ascendente",DESC:"descendente"},notification:{bad_item:"Elemento incorrecto",canceled:"Acción cancelada",created:"Elemento creado",data_provider_error:"Error del proveedor de datos. Consulte la consola para más detalles.",deleted:"Elemento borrado |||| %{smart_count} elementos borrados.",http_error:"Error de comunicación con el servidor",item_doesnt_exist:"El elemento no existe",logged_out:"Su sesión ha finalizado, vuelva a conectarse.",updated:"Elemento actualizado |||| %{smart_count} elementos actualizados",i18n_error:"No se pudieron cargar las traducciones para el idioma especificado",not_authorized:"No tiene autorización para acceder a este recurso."},page:{create:"Crear %{name}",dashboard:"Tablero",edit:"%{name} #%{id}",empty:"Sin %{name} todavía.",error:"Algo salió mal",invite:"¿Quiere agregar una?",list:"Lista de %{name}",loading:"Cargando",not_found:"No encontrado",show:"%{name} #%{id}"},validation:{email:"Debe ser un correo electrónico válido",maxLength:"Debe contener %{max} caracteres o menos",maxValue:"Debe ser %{max} o menos",minLength:"Debe contener %{min} caracteres al menos",minValue:"Debe ser al menos %{min}",number:"Debe ser un número",oneOf:"Debe ser uno de: %{options}",regex:"Debe coincidir con un formato específico (regexp): %{pattern}",required:"Requerido"}}};ya.ra.notification.created="Datos guardados correctamente",ya.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",ya.ra.page.dashboard="Inicio",ya.ra.page.empty="Sin registros todavía",ya.ra.page.invite="¿Quiere agregar uno?",ya.ra.page.list="%{name}",ya.ra.page.edit="Editar %{name}",ya.ra.action.back="Volver";var _a=Kn({},ya,{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}"}}),Ca=["hidden"],ka=["hidden","useContenido"],wa=["hidden"],Na=function(n){var r=e(Io),o=r.estado,a=r.isLoading,t=r.fichaProps,i=(void 0===t?{}:t)[n.source],l=void 0===i?{}:i,s=n.hidden,c=void 0!==s&&s,u=Qn(n,Ca),d=l.hidden,m=l.useContenido,p=void 0===m?eo:m,f=Qn(l,ka),g=void 0!==d?d:c,h=p(Kn({},u,{estado:o,hidden:g,isLoading:a},f)),v=h.hidden,b=Qn(h,wa);if(void 0===h)throw new Error("useContenido está devolviendo undefined para el contenido "+n.source+"\n Asegúrese de incluir una instrucción return al final de la función");return{propsContenido:Kn({},u,f,b),hidden:void 0!==v?v:g}},Sa=function(e){var n=Na(e),r=n.propsContenido,o=n.hidden,a=ce(),t=JSON.parse(JSON.stringify(a)),i=t[e.source];return t[e.source]=""!=i&&"0"!=i,!o&&l(Le,Kn({},r,{record:t}))},xa=["onFocus","onChange","onBlur","hidden","disabled","validate"],Ea=["onFocus","onBlur","onChange","hidden","disabled","useContenido","validate"],Pa=["hidden","disabled","onFocus","onChnage","onBlur","validate"],Ta=function(e,n,r){return"string"==typeof(null==r?void 0:r.data)?r.data:void 0},La=function(n){var r=n.source,a=e(Io),t=a.estado,i=a.isLoading,l=a.fichaProps,s=void 0===l?{}:l,c=wn(function(e){var n=e.configInputs?e.configInputs.filter(function(e){return e.id===r}):[];return n[0]?n[0]:null})||{},u=c.disabled,d=c.hidden,m=!0===c.required?Eo:void 0,p=s[r],f=void 0===p?{}:p,g=n.onFocus,h=n.onChange,v=n.onBlur,b=n.hidden,y=void 0!==b&&b,_=n.disabled,C=void 0!==_&&_,k=n.validate,w=Qn(n,xa),N=De(n).field,S=f.onFocus,x=f.onBlur,E=f.onChange,P=f.hidden,T=f.disabled,L=f.useContenido,D=void 0===L?eo:L,O=f.validate,A=Qn(f,Ea),R=void 0!==P?P:y,I=void 0!==T?T:C,F=void 0!==S?S:g,M=void 0!==x?x:v,q=void 0!==E?E:h,V=oo(n),B=D(Kn({},w,{estado:t,hidden:R,isLoading:i,utils:V},A)),z=o(N.value);if(void 0===B)throw new Error("useContenido está devolviendo undefined para el contenido "+r+"\n Asegúrese de incluir una instrucción return al final de la función");var j=B.hidden,W=B.disabled,G=B.onFocus,U=B.onChnage,H=B.onBlur,J=B.validate,Y=Qn(B,Pa),K=G||F,Q=H||M,Z=U||q,$=Kn({},V,{prev:z.current}),X=Array.isArray(k)?k:[k],ee=Array.isArray(O)?O:[O],ne=Array.isArray(J)?J:[J];return{propsContenido:Kn({onFocus:function(e){K&&F(V,t,e),z.current=e.target.value},onBlur:function(e){return Q&&Q($,t,e)},onChange:function(e){return Z&&Z($,t,e)},helperText:!1,validate:[].concat(X,ee,ne,[Ta,m]).filter(function(e){return void 0!==e})},w,A,Y,{disabled:void 0!==u?u:void 0!==W?W:I}),hidden:void 0!==d?d:void 0!==j?j:R}},Da=function(e){var n=La(e);return!n.hidden&&l(Oe,Kn({accept:"",maxSize:5e6},n.propsContenido),l(Ae,{source:"src"}))},Oa=function(e){var n=La(e);return!n.hidden&&l(Re,n.propsContenido)},Aa=["callback"],Ra=["helperText","source","reference"],Ia=["callback"],Fa=function(e){var n=e.callback,r=Qn(e,Aa),o=Fe(),t=o.isLoading,i=o.allChoices;return a(function(){t||"function"==typeof n&&n(Object.values([i]))},[i,n,t]),l(Me,r)},Ma=function(e){var n,r,t=La(e).hidden,i=kn(),s=e.helperText,c=e.source,u=e.reference,d=Qn(e,Ra),m=wn(function(e){var n=e.reload_cb?e.reload_cb.filter(function(e){return e.id===c}):[];return n[0]?n[0]:null}),p=o(m),f=null===m&&p.current?p.current:m;return f&&(n=f.callback,r=Qn(f,Ia)),a(function(){null!==m&&(p.current=m,i(Gr(c)))},[JSON.stringify(m)]),t?null:l(Ie,{reference:u,source:c,perPage:250,filter:r},l(Fa,Kn({},d,{callback:n,helperText:s,optionText:"etiqueta",optionValue:c})))},qa=function(e){var n=La(e);return!n.hidden&&l(Me,n.propsContenido)},Va=function(e){var n=e.title,r=e.source,o=e.src,a=ce(e);return l(Fn,{title:n,src:o+"/"+a[r]})},Ba=["helperText"],za=function(e){var n=La(e),r=n.propsContenido,o=n.hidden,a=r.helperText,t=Qn(r,Ba);return o?null:l(qe,t,l(Ve,{helperText:a,optionText:"etiqueta",optionValue:e.source}))},ja=function(e){var n=La(e);return!n.hidden&&l(Ne,n.propsContenido)},Wa=["helperText"],Ga=function(e){var n=La(e),r=n.propsContenido,o=n.hidden,a=r.helperText,t=Qn(r,Wa);return o?null:l(Ie,t,l(Be,{helperText:a,optionText:"etiqueta",optionValue:e.source}))},Ua=function(e){var n=La(e);return!n.hidden&&l(Be,n.propsContenido)},Ha=gn(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:pn(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),Ja=function(e){return l(Jn,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},l(T,e))},Ya={cursor:"move"},Ka=function(e){var n,r=e.isOpen,o=e.isLoading,a=e.title,i=e.content,s=e.cancel,c=e.confirmColor,u=e.ConfirmIcon,d=e.CancelIcon,m=e.onClose,p=e.onConfirm,f=e.contentResource,g=e.translateOptions,h=void 0===g?{}:g,v=Ha(e),b=L(),y=ze(f)[0],_=t(function(e,n){e.stopPropagation(),p(e,y)},[y,p]),C=t(function(e){e.stopPropagation()},[]);return l(an,{open:r,onClose:m,onClick:C,fullWidth:!0,maxWidth:"lg",PaperComponent:Ja,"aria-labelledby":"draggable-dialog-title"},l(cn,{style:Ya,id:"draggable-dialog-title"},b(a,Kn({_:a},h))),l(ln,{dividers:!0},i),l(tn,null,l(An,{disabled:o,onClick:m},l(d,{className:v.iconPaddingStyle}),b(s,{_:s})),l(An,{disabled:o,onClick:function(e){return _(e,"yes")},className:Vo("ra-confirm",(n={},n[v.confirmWarning]="warning"===c,n[v.confirmPrimary]="primary"===c,n)),autoFocus:!0},l(u,{className:v.iconPaddingStyle}),b("ra.action.confirm"))))};Ka.propTypes={cancel:Ke.string,classes:Ke.object,confirm:Ke.string,confirmColor:Ke.string,ConfirmIcon:Ke.elementType,CancelIcon:Ke.elementType,content:Ke.node.isRequired,isOpen:Ke.bool,isLoading:Ke.bool,onClose:Ke.func.isRequired,onConfirm:Ke.func.isRequired,title:Ke.string.isRequired},Ka.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Un,CancelIcon:Hn,isOpen:!1};var Qa=["disabled","asistant","asistantResource","label","source"],Za=function(){return l(c,null)},$a={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+")"},et=function(e){return e},nt=function(e){var n=e.disabled,r=e.asistant,o=e.asistantResource,a=e.label,i=e.source,u=Qn(e,Qa),d=s(!1),m=d[0],p=d[1],f=_n(),g=t(function(){p(!1)},[p]);return l(c,null,l("div",{style:{display:"flex",alignItems:"center"}},l(we,Kn({initialValue:$a},u,{source:i,label:a,disabled:!0,parse:et,format:Xa,helperText:!1,InputProps:{endAdornment:l(c,null,l(Dn,{onClick:function(e){f.setValue(i,{seleccion:[],all:!1,none:!0})},disabled:n,"aria-label":"Ninguno",size:"small",title:"Ninguno"},l(Wn,null)),l(Dn,{onClick:function(e){f.setValue(i,{seleccion:[],all:!0,none:!1})},disabled:n,"aria-label":"Todos",size:"small",title:"Todos"},l(jn,null)),l(Dn,{onClick:function(e){return p(!0)},disabled:n,"aria-label":"Selección",size:"small",title:"Selección"},l(Gn,null)))}}))),l(Ka,{isOpen:m,title:"Selección de "+a,contentResource:o,content:l(r,{bulkActionButtons:l(Za,null),hasCreate:!1,exporter:!1,resource:o}),onConfirm:function(e,n){p(!1),f.setValue(i,{seleccion:n,all:!1,none:!1})},onClose:g}))},rt=function(e){return l(je,Kn({},e,{hasCreate:!1,exporter:!1,perPage:25,title:" ",bulkActionButtons:l("span",null)}),l(ee,null,l(We,{source:"funced",sortable:!0,label:"Cédula"}),l(We,{source:"funpriape",sortable:!0,label:"Apellido"}),l(We,{source:"funprinom",sortable:!0,label:"Nombre"})))},ot={fillista:"empcod=-1"},at=function(e){var n=s(ot),r=n[0],o=n[1],a=M(),i=t(function(e){o({fillista:e.node.key})},[o]),c=t(function(e){return a.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(function(e){return e.data}).catch(function(){throw new Error("Data Loading Error")})},[a]);return l(y,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},l(y,{flexGrow:1},l(Yn,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:i,createChildren:c})),l(y,{flexGrow:2},l(rt,{resource:"form_224",filter:r})))},tt=gn(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:pn(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),it=function(e){return l(Jn,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},l(T,e))},lt={cursor:"move"},st=function(e){var n,r=e.isOpen,o=e.isLoading,a=e.title,i=e.cancel,s=e.confirmColor,c=e.ConfirmIcon,u=e.CancelIcon,d=e.onClose,m=e.onConfirm,p=e.translateOptions,f=void 0===p?{}:p,g=tt(e),h=L(),v=t(function(e,n){e.stopPropagation(),m(e,n)},[m]),b=t(function(e){e.stopPropagation()},[]);return l(an,{open:r,onClose:d,onClick:b,fullWidth:!0,maxWidth:"lg",PaperComponent:it,"aria-labelledby":"draggable-dialog-title"},l(cn,{style:lt,id:"draggable-dialog-title"},h(a,Kn({_:a},f))),l(ln,{dividers:!0},l(at,null)),l(tn,null,l(An,{disabled:o,onClick:d},l(u,{className:g.iconPaddingStyle}),h(i,{_:i})),l(An,{disabled:o,onClick:function(e){return v(e,"yes")},className:Vo("ra-confirm",(n={},n[g.confirmWarning]="warning"===s,n[g.confirmPrimary]="primary"===s,n)),autoFocus:!0},l(c,{className:g.iconPaddingStyle}),h("ra.action.confirm"))))};st.propTypes={cancel:Ke.string,classes:Ke.object,confirm:Ke.string,confirmColor:Ke.string,ConfirmIcon:Ke.elementType,CancelIcon:Ke.elementType,isOpen:Ke.bool,isLoading:Ke.bool,onClose:Ke.func.isRequired,onConfirm:Ke.func.isRequired,title:Ke.string.isRequired},st.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Un,CancelIcon:Hn,isOpen:!1};var ct=["disabled","asistant","asistantResource","label","source"],ut={seleccion:[],all:!0,none:!1},dt=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},mt=function(e){return e},pt=function(e){var n=e.disabled,r=e.label,o=void 0===r?"Funcionarios":r,a=e.source,i=Qn(e,ct),u=ze("form_224")[0],d=s(!1),m=d[0],p=d[1],f=_n(),g=t(function(){p(!1)},[p]);return l(c,null,l("div",{style:{display:"flex",alignItems:"center"}},l(we,Kn({initialValue:ut},i,{source:a,label:o,disabled:!0,parse:mt,format:dt,helperText:!1,InputProps:{endAdornment:l(c,null,l(Dn,{onClick:function(e){f.setValue(a,{seleccion:[],all:!1,none:!0})},disabled:n,"aria-label":"Ninguno",size:"small",title:"Ninguno"},l(Wn,null)),l(Dn,{onClick:function(e){f.setValue(a,{seleccion:[],all:!0,none:!1})},disabled:n,"aria-label":"Todos",size:"small",title:"Todos"},l(jn,null)),l(Dn,{onClick:function(e){return p(!0)},disabled:n,"aria-label":"Selección",size:"small",title:"Selección"},l(Gn,null)))}}))),l(st,{isOpen:m,title:"Selección de "+o,onConfirm:function(e,n){p(!1),f.setValue(a,{seleccion:u,all:!1,none:!1})},onClose:g}))},ft=function(e){var n=La(e);return!n.hidden&&l(we,Kn({multiline:!0},n.propsContenido))},gt=["tipo"],ht=function(e){var n=e.tipo,r=Qn(e,gt),o=La(r),t=o.propsContenido,i=o.hidden,s=_n(),c=De(e),u=c.field,d=c.fieldState,m="F"===n||"Z"===n;a(function(){t.value&&s.setValue(e.source,t.value)}),a(function(){m&&""!=u.value&&!d.error&&d.isTouched&&t.onBlur()},[u.value]);var p=Kn({},t);return!i&&("N"===n||"D"===n?l(Ge,p):"F"===n?l(Ue,p):"Z"===n?l(He,p):l(we,"H"===n?Kn({},p,{type:"time"}):p))},vt=["tipo","value"],bt=function(e){var n=e.tipo,r=Qn(e,vt),o=Na(r),a=o.hidden,t=Kn({},o.propsContenido);return!a&&("N"===n||"D"===n?l(Je,t):"F"===n?l(Ye,t):"Z"===n?l(Ye,Kn({},t,{showTime:!0})):l(We,t))};export{br as AppBar,Sa as BooleanField,Da as Camino,Oa as CheckBox,Ma as ComboBox,qa as ComboBoxManual,Mo as CreateEtriek,Wo as DeleteButtonNoWarning,Uo as EditEtriek,Fr as EtrGrid,xo as FichaActions,Io as FichaContext,Jo as FormDialog,Zo as FormEtriek,Vr as GE,so as GrillaEtriek,Va as ImageField,na as Layout,oa as ListActionsEtriek,za as ListCheck,ta as Login,ea as Menu,ca as MenuButton,da as MultiTextField,ja as Password,Ga as RadioButton,Ua as RadioButtonManual,So as Separador,pa as ShowEtriek,$o as SubMenu,pt as TBSF,fa as TabbedFormEtriek,mo as TabbedGrillaEtriek,ft as TextArea,ht as TextBox,nt as TextBoxSelection,bt as TextField,Oo as choicesEstado,yo as dateFormat,To as dateFormatOptions,_o as dateParser,Co as dateTimeFormat,ko as dateTimeParser,Gr as deleteRecargarComboBox,Ao as descargarLink,ba as enMessages,_a as esMessages,Lo as etrFechaMayorQue,Eo as etrRequerido,Po as etrRequeridoNumerico,vo as getFormcodFromResource,Do as localeOptions,Wr as recargarComboBox,Hr as setDisableAction,Ur as setHiddenAction,Jr as setRequireAction,ha as themes,wo as timeFormat,No as timeParser,Xr as useAjax,La as useContenidoController,kr as useDeleteRowEtrGrid,Na as useFieldController,jr as useFormProgress,$r as useGetJson,fo as useInitFicha,yr as useNuevo,Ro as useReferenceLabel,wr as useSaveRowEtrGrid,bo as useStylesContenidos,oo as useUtils,no as useUtilsGrilla,ro as useUtilsSubmit};
1
+ import{forwardRef as e,createElement as n,createContext as o,useContext as r,useState as t,useMemo as i,useCallback as a,memo as l,Fragment as s,useEffect as c,Children as u,cloneElement as d,isValidElement as f,useRef as m}from"react";import p from"@mui/icons-material/Lock";import g from"@mui/icons-material/VpnLock";import{MenuItem as v,ListItemIcon as h,ListItemText as b,useMediaQuery as y,Typography as C,Box as x,alpha as T,createTheme as k,StyledEngineProvider as w,Stack as N,Tooltip as R,IconButton as S,ThemeProvider as P,CardContent as F,CircularProgress as M,Collapse as _,List as L,Divider as I,Paper as O}from"@mui/material";import{useTranslate as B,useUserMenu as E,useResourceDefinitions as V,AppBar as A,UserMenu as D,Logout as q,useDataProvider as z,useListContext as W,useNotify as j,useRedirect as G,useRefresh as H,useResourceContext as U,useUnselectAll as J,NumberField as Q,DateField as Y,TextField as Z,ReferenceFieldView as $,useRecordContext as K,ResourceContextProvider as X,useReference as ee,useInput as ne,useGetList as oe,useSafeSetState as re,Button as te,Confirm as ie,Form as ae,SaveButton as le,useCreatePath as se,useResourceDefinition as ce,DatagridRoot as ue,DatagridClasses as de,BulkActionsToolbar as fe,SimpleList as me,useGetOne as pe,TopToolbar as ge,ListButton as ve,ShowButton as he,required as be,minValue as ye,Create as Ce,useDelete as xe,useEditController as Te,Edit as ke,useSaveContext as we,SimpleForm as Ne,useSidebarState as Re,MenuItemLink as Se,Menu as Pe,DashboardMenuItem as Fe,Layout as Me,sanitizeListRestProps as _e,CreateButton as Le,ExportButton as Ie,useLogin as Oe,TextInput as Be,PasswordInput as Ee,FieldTitle as Ve,useShowController as Ae,Show as De,FormTab as qe,getTabbedFormTabFullPath as ze,TabbedFormTabs as We,Toolbar as je,defaultTheme as Ge,BooleanField as He,FileInput as Ue,FileField as Je,BooleanInput as Qe,ReferenceInput as Ye,useChoicesContext as Ze,AutocompleteInput as $e,SelectInput as Ke,ReferenceArrayInput as Xe,SelectArrayInput as en,RadioButtonGroupInput as nn,useRecordSelection as on,List as rn,Datagrid as tn,NumberInput as an,DateInput as ln,DateTimeInput as sn}from"react-admin";import{Link as cn,useLocation as un,matchPath as dn,useResolvedPath as fn,Routes as mn,Route as pn}from"react-router-dom";import gn,{string as vn,func as hn,any as bn,bool as yn}from"prop-types";import Cn from"@mui/icons-material/Add";import xn from"@mui/icons-material/Cancel";import Tn from"@mui/icons-material/Delete";import kn from"@mui/icons-material/Edit";import wn from"@mui/material/Dialog";import Nn from"@mui/material/DialogActions";import Rn from"@mui/material/DialogContent";import Sn from"@mui/material/DialogContentText";import Pn from"@mui/material/DialogTitle";import Fn from"@mui/material/Paper";import{adaptV4Theme as Mn,ThemeProvider as _n,alpha as Ln,styled as In}from"@mui/material/styles";import{makeStyles as On}from"@mui/styles";import{esES as Bn,DataGridPremium as En,useGridApiContext as Vn,useGridApiRef as An,useKeepGroupedColumnsHidden as Dn}from"@mui/x-data-grid-premium";import{useFormContext as qn,useFormState as zn}from"react-hook-form";import{useDispatch as Wn,useSelector as jn}from"react-redux";import{useMutation as Gn}from"react-query";import{GridOverlay as Hn,GridActionsCellItem as Un}from"@mui/x-data-grid";import Jn from"@mui/icons-material/Create";import Qn from"@mui/material/Divider";import Yn from"@mui/material/Tab";import Zn from"@mui/material/Tabs";import $n from"@mui/icons-material/ChevronLeft";import Kn from"@mui/material/Typography";import{isAfter as Xn}from"date-fns";import eo from"date-fns/locale/en-US";import no from"date-fns/locale/es";import oo from"@mui/material/IconButton";import ro from"@mui/material/Tooltip";import to from"@mui/material/Button";import io from"@mui/icons-material/Settings";import ao from"@mui/icons-material/ExpandMore";import lo from"@mui/material/Avatar";import so from"@mui/material/Card";import co from"@mui/material/CardActions";import uo from"@mui/material/CircularProgress";import fo from"@mui/material/Menu";import mo from"@mui/material/MenuItem";import po from"@mui/icons-material/RemoveRedEye";import go from"ra-language-english";import vo from"@blackbox-vision/ra-language-spanish";import ho from"@mui/icons-material/Check";import bo from"@mui/icons-material/RemoveCircleOutline";import yo from"@mui/icons-material/Search";import Co from"@mui/icons-material/CheckCircle";import xo from"@mui/icons-material/ErrorOutline";import To from"react-draggable";import{TreeView as ko}from"devextreme-react";function wo(){return(wo=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e}).apply(this,arguments)}function No(e,n){if(null==e)return{};var o,r,t={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(o=i[r])>=0||(t[o]=e[o]);return t}var Ro=e(function(e,o){var r=B(),t=E().onClose,i=V(),a=i.form_59;return[i.form_275?n(v,wo({component:cn,ref:o},e,{key:"/form_275",to:"/form_275",onClick:t}),n(h,null,n(p,null)),n(b,null,r("pos.change_pin"))):null,a?n(v,wo({component:cn,ref:o},e,{key:"/form_59",to:"/form_59",onClick:t}),n(h,null,n(g,null)),n(b,null,r("pos.change_password"))):null]}),So=function(){return n(D,null,n(Ro,null),n(q,null))},Po=function(e){var o=y(function(e){return e.breakpoints.up("sm")});return n(A,wo({},e,{color:"secondary",userMenu:n(So,null)}),n(C,{variant:"h6",color:"inherit",sx:{flex:1,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},id:"react-admin-title"}),o&&n(x,{component:"span",sx:{flex:1}}))},Fo=o(),Mo=function(e){var o=e.children,r=t(!1),a=r[0],l=r[1],s=i(function(){return{open:a,show:function(){return l(!0)},hide:function(){return l(!1)}}},[a]);return n(Fo.Provider,{value:s},o)},_o=function(){return r(Fo)},Lo=function(e,n,o,r){return{type:"RELOAD_CB",payload:{id:e,method:n,params:o,callback:r}}},Io=function(e,n){return{type:"RELOAD_CB_SUCCESS",payload:{id:e,callback:n}}},Oo=function(e,n){return{type:"HIDE_INPUT",payload:{id:e,hidden:n}}},Bo=function(e,n){return{type:"DISABLE_INPUT",payload:{id:e,disabled:n}}},Eo=function(e,n){return{type:"REQUIRE_INPUT",payload:{id:e,required:n}}},Vo=function(e,n){return{type:"ERROR_INPUT",payload:{id:e,error:n}}},Ao=function(){var e=Wn();return a(function(n,o,r,t){e(Lo(n,o,r,t))},[e])},Do=function(){var e=Wn();return a(function(n,o){e(Oo(n,o))},[e])},qo=function(){var e=Wn();return a(function(n,o){e(Bo(n,o))},[e])},zo=function(){var e=Wn();return a(function(n,o){e(Eo(n,o))},[e])},Wo=function(){var e=Wn();return a(function(n,o){e(Vo(n,o))},[e])},jo=function(e,n){var o=z(),r=Gn(function(n){return o.getJson(e,{method:n.method,params:n.params})},n);return{mutateAsync:r.mutateAsync,isLoading:r.isLoading}},Go=function(e){var n=jo(e),o=n.mutateAsync,r=n.isLoading;return[a(function(e,n,r){return o({method:e,params:n},{onSuccess:r,onError:r})},[]),r]},Ho=function(e){return{}},Uo=function(e){var n=W(e),o=j(),r=G(),t=H(),i=U(e),a=J(i);return{ajax:Go(i)[0],data:n,notify:o,redirect:r,refresh:t,unselectAll:a}},Jo=function(e){var n=Ao(),o=Do(),r=qo(),t=zo(),i=Wo(),a=_o(),l=j(),s=G(),c=U(e);return{ajax:Go(c)[0],notify:l,redirect:s,recargarComboBox:n,progress:a,setHidden:o,setDisable:r,setRequire:t,setError:i,etrs:e.etrs||{}}},Qo=function(e){var n=Ao(),o=Do(),r=qo(),t=zo(),i=Wo(),l=_o(),s=j(),c=G(),u=qn(),d=U(e),f=Go(d),m=e.etrs||{},p=e.asisEtr||{},g=u.trigger;return{form:u,ajax:f[0],notify:s,redirect:c,recargarComboBox:n,progress:l,setHidden:a(function(e,n){o(e,n),setTimeout(function(){g(e)})},[o,g]),setDisable:a(function(e,n){r(e,n),setTimeout(function(){g(e)})},[r,g]),setRequire:a(function(e,n){t(e,n),setTimeout(function(){g(e)})},[t,g]),setError:a(function(e,n){i(e,n),setTimeout(function(){g(e)})},[i,g]),etrs:m,asisEtr:p}},Yo=o({}),Zo=o(void 0),$o=["hidden"],Ko=["hidden","useContenido"],Xo=["hidden"],er=function(e){var n=r(Yo),o=n.estado,t=n.isLoading,i=n.fichaProps,a=(void 0===i?{}:i)[e.source],l=void 0===a?{}:a,s=e.hidden,c=void 0!==s&&s,u=No(e,$o),d=l.hidden,f=l.useContenido,m=void 0===f?Ho:f,p=No(l,Ko),g=void 0!==d?d:c,v=m(wo({},u,{estado:o,hidden:g,isLoading:t},p)),h=v.hidden,b=No(v,Xo);if(void 0===v)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:wo({},u,p,b),hidden:void 0!==h?h:g}},nr=["tipo","value"],or=function(e){var o=e.tipo,r=No(e,nr),t=er(r),i=t.hidden,a=wo({},t.propsContenido);return!i&&("N"===o||"D"===o?n(Q,a):"F"===o?n(Y,a):"Z"===o?n(Y,wo({},a,{showTime:!0})):n(Z,a))},rr=["children","id","record","reference","link","queryOptions"],tr=["source","emptyText"],ir=l($),ar=function(e){var o=e.children,r=e.id,t=e.reference,i=e.queryOptions,a=No(e,rr);return n(X,{value:t},n(ir,wo({reference:t},a,ee({reference:t,id:r,options:i}),{resourceLinkPath:!1}),o))},lr=function(e){var o=e.source,r=e.emptyText,t=No(e,tr),i=K(e),a=i[o],l=B();return null==a?r?n(C,{component:"span",variant:"body2"},r&&l(r,{_:r})):null:n(ar,wo({},t,{emptyText:r,record:i,id:a}))},sr=function(e,o){return function(r){var t;return n(lr,{reference:o,source:e,queryOptions:{meta:{inEtr:!0}},record:(t={},t[e]=r.row[e],t)},n(or,{source:"etiqueta"}))}},cr=function(e){var n=wo({},e);return delete n.id,n},ur=function(e){var n=e.apiRef,o=e.source,r=e.enviarTodo;return a(function(e,t){var i=cr(e),a=n.current.getRowsCount()+1;n.current.updateRows([wo({},i,{id:a})]);var l=r?Array.from(n.current.getRowModels().values(),function(e){return delete e.id,wo({},e,{claveFila:"",estado:"N"})})||[]:t.getValues()[o]||[];r||l.push(wo({},i,{claveFila:"",estado:"N"})),t.setValue(o,l,{shouldDirty:!0})},[n,o])},dr=function(e){var n=e.apiRef,o=e.source,r=e.enviarTodo;return a(function(e,t,i){var a,l=cr(t);n.current.updateRows([wo({},l,{id:e})]);var s=r?Array.from(n.current.getRowModels().values())||[]:i.getValues()[o]||[],c=s.findIndex(function(n){return n.claveFila===e});s[c=-1===c?s.length:c]=wo({},l,{claveFila:e,estado:"N"===(null===(a=s[c])||void 0===a?void 0:a.estado)?"N":"M"}),i.setValue(o,s,{shouldDirty:!0})},[n,o])},fr=function(e){var n=e.apiRef,o=e.source,r=e.enviarTodo;return a(function(e,t){var i=n.current.getRowModels().get(e);n.current.updateRows([{id:e,_action:"delete"}]);var a=r?Array.from(n.current.getRowModels().values())||[]:t.getValues()[o]||[],l=a.findIndex(function(n){return n.claveFila===e});a[l=-1===l?a.length:l]=wo({},i,{estado:"B",claveFila:e}),"number"==typeof e&&a.splice(l,1),t.setValue(o,a,{shouldDirty:!0})},[n,o])},mr=function(e){var n=e.useFormulario(),o=wo({},e,{enviarTodo:n[e.source].enviarTodo});return{addRow:ur(o),editRow:dr(o),deleteRow:fr(o),clear:function(){return e.apiRef.current.getRowsCount()>0&&e.apiRef.current.setRows([])},api:e.apiRef}},pr=On(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.mode?"#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.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:T(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"GE"}),gr=function(){var e=pr();return n(Hn,{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"))},vr=["filterBy","claves","sortModel","columns","reference","allowAdd","allowRemove","enableLoad","apiRef"],hr=On(function(e){return{root:{"& .MuiDataGrid-columnsContainer":{backgroundColor:"light"===e.palette.mode?"#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.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===e.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===e.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===e.palette.mode?"#ffffff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===e.palette.mode?"0.8":"0.08",fill:"light"===e.palette.mode?"#f5f5f5":"#ffffff"}},label:{marginTop:e.spacing(1)},deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:T(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}},{name:"EtrGrid"}),br={},yr=function(e){var o=qn();return n(Zo.Provider,{value:{form:o}},e.children)},Cr=function(e){return n(wn,{open:e.open,onClose:e.onClose,fullWidth:!0},n(Pn,null,e.labelEstado+" "+e.label),n(Sn,{component:"span"},n(ae,{mode:"onBlur",record:br,resource:e.resource,onSubmit:e.onSubmit},n(yr,null,e.children))))};Cr.propTypes={label:vn,onClick:hn,icon:bn,open:yn,onClose:hn,labelEstado:vn,resource:bn,save:hn,render:hn};var xr=function(e){var o=e.form,t=e.resource,i=e.estado,a=e.editors,l=e.recordPadre,f=e.camposClaveFila,m=e.setOpen,p=e.open,g=zn(),v=g.dirtyFields,h=g.isValid,b=r(Yo).fichaProps,y=b[e.source],C=b.etrs,x=r(Zo),T=y.onAfterRenderAsistente,k=Qo({resource:t,etrs:C,asisEtr:x});return c(function(){p&&"function"==typeof T&&T(wo({},k,{form:o}))},[p]),n(s,null,n(Rn,null,n(N,{spacing:4},u.map(a,function(e,n){return d(e,wo({resource:t,estado:i,defaultValue:l[e.props.source]||"",fullWidth:!0,sx:{margin:0},disabled:"N"!==i&&-1!==f.indexOf(e.props.source)},y[e.props.source]))}))),n(Nn,null,n(le,{disabled:0===Object.keys(v).length||!h}),n(te,{label:"ra.action.cancel",onClick:function(e){m(!1),e.stopPropagation()}},n(xn,null))))},Tr=function(e){var o=e.editors,r=e.record,t=e.camposClaveFila,i=e.label,a=e.source,l=e.enviarTodo,c=re(!1),u=c[0],d=c[1],f=U(e),m=qn(),p=Vn(),g=ur({apiRef:p,source:a,enviarTodo:l}),v=B()("ra.action.create");return n(s,null,n(te,{onClick:function(e){d(!0),e.stopPropagation()}},n(Cn,null)),n(Cr,{open:u,onClose:function(e){d(!1),e.stopPropagation()},labelEstado:v,label:i,resource:f,onSubmit:function(e,n){g(e,m),d(!1)}},n(xr,{source:a,form:m,resource:f,estado:"N",editors:o,recordPadre:r||{},camposClaveFila:t,open:u,setOpen:function(){d(!1)}})))},kr=function(e){var o=e.editors,r=e.camposClaveFila,t=e.resource,i=e.label,a=e.source,l=e.row,c=e.enviarTodo,u=B(),d=re(!1),f=d[0],m=d[1],p=Vn(),g=qn(),v=dr({apiRef:p,source:a,enviarTodo:c}),h=u("ra.action.edit");return n(s,null,n(te,{onClick:function(e){m(!0),e.stopPropagation()}},n(kn,null)),n(Cr,{open:f,onClose:function(e){m(!1),e.stopPropagation()},labelEstado:h,label:i,resource:t,onSubmit:function(e,n){v(l.id,e,g),m(!1)}},n(xr,{source:a,form:g,resource:t,estado:"M",editors:o,recordPadre:l,camposClaveFila:r,open:f,setOpen:function(){m(!1)}})))},wr=function(e){var o=e.confirmTitle,r=void 0===o?"ra.message.delete_title":o,t=e.confirmContent,i=void 0===t?"ra.message.delete_content":t,a=e.row,l=e.source,c=e.enviarTodo,u=hr(e),d=re(!1),f=d[0],m=d[1],p=Vn(),g=qn(),v=fr({apiRef:p,source:l,enviarTodo:c});return n(s,null,n(te,{key:"button",onClick:function(e){m(!0),e.stopPropagation()},className:u.deleteButton},n(Tn,null)),n(ie,{isOpen:f,title:r,content:i,onConfirm:function(e){v(a.id,g)},onClose:function(e){m(!1),e.stopPropagation()}}))},Nr=k(Mn({},Bn)),Rr=function(e){var o=e.filterBy,a=void 0===o?"":o,l=e.claves,c=e.sortModel,u=e.columns,d=e.reference,f=e.allowAdd,m=void 0===f||f,p=e.allowRemove,g=void 0===p||p,v=e.enableLoad,h=void 0===v||v,b=e.apiRef,y=No(e,vr),C=t([]),x=C[0],T=C[1],k=K(e),N=ne(wo({defaultValue:""},e)).field,R=hr(e),S=r(Yo),P=S.isLoading,F=S.fichaProps[y.source].enviarTodo,M=void 0!==F&&F,_=t(c),L=_[0],I=_[1],O=c[0],B=O.field,E=O.sort,V={};k&&a.split(",").forEach(function(e){e&&(V[e]=[{type:"string",comparison:"eq",value:k[e],field:e}])});var A=oe(d,{pagination:{page:1,perPage:200},sort:{field:B,order:E},filter:V},{enabled:h&&!P,onSuccess:function(){T(q)}}),D=A.data,q=void 0===D?[]:D,z=A.isLoading,W=[].concat(u,[{field:" ",width:80,headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return n(kr,wo({},y,{enviarTodo:M,camposClaveFila:l,row:e.row}))}}]);m&&W.unshift({field:"BTN",headerName:"",sortable:!1,renderHeader:function(e){return n(Tr,wo({},y,{enviarTodo:M,camposClaveFila:l}))}}),g&&W.push({field:" ",headerName:"",headerAlign:"center",sortable:!1,disableClickEventBubbling:!0,renderCell:function(e){return n(wr,wo({},y,{enviarTodo:M,camposClaveFila:l,row:e.row}))}});var j=i(function(){return W},[JSON.stringify(W)]);return n(Fn,{className:R.rootPaper},n(w,{injectFirst:!0},n(_n,{theme:Nr},n(s,null,n(En,wo({apiRef:b,loading:z||P,className:R.root,disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,rows:x,columns:j,sortModel:L,onSortModelChange:function(e){return I(e)},sortable:!1,resizable:!1,disableReorder:!0,disableExport:!0,filterable:!1,disableColumnMenu:!0,components:{NoRowsOverlay:gr}},y)),n("input",wo({type:"hidden"},N))))))},Sr=["filterBy","sortModel","columns","reference","enableLoad","initialState"],Pr=k(Mn({},Bn)),Fr=function(e){var o=e.filterBy,a=void 0===o?"":o,l=e.sortModel,s=e.columns,c=e.reference,u=e.enableLoad,d=void 0===u||u,f=e.initialState,m=No(e,Sr),p=pr(e),g=r(Yo).isLoading,v=K(),h=t(l),b=h[0],y=h[1],C=l[0],x=C.field,T=C.sort,k=i(function(){return[].concat(s)},[JSON.stringify(s)]),N={};v&&a.split(",").forEach(function(e){e&&(N[e]=[{type:"string",comparison:"eq",value:v[e],field:e}])});var R=oe(c,{pagination:{page:1,perPage:200},sort:{field:x,order:T},filter:N},{enabled:d&&!g}),S=R.data,P=void 0===S?[]:S,F=R.isLoading,M=An(),_=Dn({apiRef:M,initialState:f});return n(Fn,{className:p.rootPaper},n(w,{injectFirst:!0},n(_n,{theme:Pr},n(En,wo({apiRef:M,rows:P,columns:k,loading:F||g,className:p.root,disableRowSelectionOnClick:!0,paginationModel:{page:1,pageSize:50},hideFooter:!0,sortModel:b,onSortModelChange:function(e){return y(e)},components:{NoRowsOverlay:gr},initialState:_},m)))))},Mr=["alignIcon","children","className","disabled","label","color","size","to"],_r=["redirect","replace","state"],Lr=function(e){var o=e.children,r=e.className,t=e.disabled,i=e.label,a=e.color,l=void 0===a?"primary":a,s=e.to,c=No(e,Mr),u=B(),d=i?u(i,{_:i}):void 0,f=Ir(s);return i&&!t?n(R,{title:d},n(S,wo({"aria-label":d,className:r,color:l,size:"large"},c,f),o)):n(S,wo({className:r,color:l,disabled:t,size:"large"},c,f),o)};Lr.propTypes={alignIcon:gn.oneOf(["left","right"]),children:gn.element,className:gn.string,color:gn.oneOfType([gn.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),gn.string]),disabled:gn.bool,label:gn.string,size:gn.oneOf(["small","medium","large"])};var Ir=function(e){if(null!=e){if("string"==typeof e)return{to:e};var n=e.redirect,o=e.replace,r=e.state;return{to:No(e,_r),redirect:n,replace:o,state:r}}},Or=["icon","label","scrollToTop"],Br=function(e){return e.stopPropagation()},Er={true:{_scrollToTop:!0},false:{}},Vr=n(Cn,null),Ar=function(e){var o=e.icon,r=void 0===o?Vr:o,t=e.label,i=void 0===t?"ra.action.create":t,a=e.scrollToTop,l=void 0===a||a,s=No(e,Or),c=U(e),u=K(e),d=se();return n(Lr,wo({component:cn,to:d({type:"create",resource:c}),state:wo({record:u},Er[String(l)]),label:i,onClick:Br},s),r)},Dr=["icon","label","scrollToTop"],qr=function(e){return e.stopPropagation()},zr={true:{_scrollToTop:!0},false:{}},Wr=n(Jn,null),jr=function(e){var o=e.icon,r=void 0===o?Wr:o,t=e.label,i=void 0===t?"ra.action.edit":t,a=e.scrollToTop,l=void 0===a||a,s=No(e,Dr),c=U(e),u=K(e),d=se();return u?n(Lr,wo({component:cn,to:d({type:"edit",resource:c,id:u.id}),state:zr[String(l)],label:i,onClick:qr},s),r):null},Gr=["actionButtons","bulkActionButtons","sx","columns","isRowEditable","primaryText","secondaryText","desktopSize","onRenderGrilla","onLoadGrilla","hasEdit","initialState","convertFilterModelToFilterValues","claveNuevo"],Hr=["handler"],Ur=function(e,n){return void 0===n||"function"==typeof n&&n(e)},Jr=k({},Bn),Qr=new Map([["is","is"],["not","not"],["after","after"],["onOrAfter","onOrAfter"],["before","before"],["onOrBefore","onOrBefore"],["eq","="],["neq","!="],["gt",">"],["gte",">="],["lt","<"],["lte","<="],["contains","contains"],["equals","equals"],["sw","startsWith"],["ew","endsWith"],["isEmpty","isEmpty"],["isNotEmpty","isNotEmpty"],["isAnyOf","isAnyOf"]]),Yr=new Map(Array.from(Qr,function(e){return[e[1],e[0]]})),Zr=function(e){return e.items.reduce(function(e,n){return void 0!==n.field&&n.operator&&(Yr.has(n.operator)?e[n.field+"_"+Yr.get(n.operator)]=n.value:e[n.field]=n.value),e},{})},$r=function(e){var o=e.actionButtons,r=void 0===o?[]:o,t=e.bulkActionButtons,i=e.sx,a=e.columns,l=e.isRowEditable,s=e.hasEdit,c=e.initialState,u=e.convertFilterModelToFilterValues,d=void 0===u?Zr:u,m=e.claveNuevo,p=No(e,Gr),g=Uo(e),v=B(),h=U(e),b=W(),y=b.data,C=void 0===y?[]:y,T=b.isLoading,k=b.selectedIds,w=b.onSelect,N=b.filterValues,R=b.displayedFilters,S=b.setFilters,F=An(),M=Dn({apiRef:F,initialState:wo({},c,{pinnedColumns:{right:["actions"]}})}),_=a.map(function(e,n){return wo({},e,{headerName:""!==e.headerName?v("resources."+h+".fields."+e.field,{_:e.headerName}):e.headerName})}),L=r.length>0||s?_.concat([{field:"actions",type:"actions",width:100,hideable:!1,getActions:function(e){var o,t=F.current.getRowNode(e.id);return e.row.id?[s?n(jr,{record:e.row,disabled:!Ur(e.row,l)}):null].concat(r.map(function(e){var o=e.handler,r=No(e,Hr);return n(Un,wo({showInMenu:!0,onClick:function(e){return"function"==typeof o&&o(g,r.key)}},r))})):-1!==t.children[0].indexOf(m+"=")?[n(Ar,{record:m?(o={},o[m]=t.children[0].split(m+"=")[1].replaceAll("[","").trim().split("AND")[0].trim(),o):void 0})]:[]}}]):_,I=f(t);return n(ue,{sx:i,className:de.root},I?n(fe,{selectedIds:k},t):null,n(x,{sx:{height:"70vh",width:"100%"},className:de.tableWrapper},n(P,{theme:Jr},n(En,wo({columns:L,rows:C,apiRef:F,loading:T,hideFooterSelectedRowCount:!0,hideFooter:!0,disableMultipleRowSelection:!0,checkboxSelection:I,filterMode:"server",onFilterModelChange:function(e){S(wo({},N,d(e)),R)},rowSelectionModel:k,onRowSelectionModelChange:function(e){T||(F.current.isRowSelected(e[0])?w([]):w(e))},isRowSelectable:function(e){return e.row.id},initialState:M},p)))))},Kr=function(e){var o=e.columns,r=e.hasEdit,t=e.isRowEditable,i=e.primaryText,a=e.secondaryText,l=o.length,s=i,c=a;return i||(l>=4?s=function(e){return e[o[0].field]+" - "+e[o[0].field]}:l>=3||l>=2?s=function(e){return e[o[0].field]+" - "+e[o[1].field]}:1===l&&(s=function(e){return e[o[0].field]})),a||(l>=4?c=function(e){return e[o[2].field]+" - "+e[o[3].field]}:l>=3?c=function(e){return e[o[2].field]}:l>=2?s=function(e){return e[o[0].field]+" - "+e[o[1].field]}:1===l&&(s=function(e){return e[o[0].field]})),n(me,{linkType:function(e){return!(!r||!Ur(e,t))&&"edit"},primaryText:s,secondaryText:c,sx:e.sx})},Xr=function(e){var o=y(function(e){return e.breakpoints.down("md")}),r=ce(e).hasEdit;!function(e){var n=e.onRenderGrilla,o=e.onLoadGrilla,r=W().isLoading,t=Uo(e);c(function(){n&&n(t)},[]),c(function(){r||o&&o(t)},[r])}(e);var t=e.desktopSize;return n(o&&!1===(void 0!==t&&t)?Kr:$r,wo({},e,{hasEdit:r}))},et=["ids"],nt=["filterValues","setFilters","tabs","GridComponent"],ot=function(e){var o=e.filterValues,r=e.setFilters,t=e.tabs,i=t.ids,a=No(t,et),l=e.GridComponent,c=void 0===l?Xr:l,u=No(e,nt),d=o.id;return n(s,null,n(Zn,{value:d,indicatorColor:"primary",onChange:function(e,n){r(wo({},o,{id:n}))}},i.map(function(e){return n(Yn,{key:e,label:e.charAt(0).toUpperCase()+e.slice(1),value:e})})),n(Qn,null),n(c,wo({},u,a[d])))},rt=["useFormulario"],tt=function(e){var n=e.useFormulario,o=void 0===n?Ho:n,r=No(e,rt);return{fichaProps:wo({},o(r),{etrs:r.etrs})}},it=function(e,n){return pe(e,{id:"-1"},n)},at=["className","record","hasEdit","hasShow","hasList","resource","totalPages","showFilter","setSort","setPerPage","perPage","defaultTitle","setPage","setFilters","selectedIds","onUnselectItems","onToggleItem","isLoading","exporter","hideFilter","hasCreate","filterValues","displayedFilters","sort"],lt=["children","className","data","hasShow","hasList"],st=function(e){return e.split("_")[1]},ct=On(function(e){var n;return{form:{maxHeight:"70vh",overflow:"auto"},tab:{display:"block",maxHeight:"65vh",overflow:"auto"},contenido:(n={},n[e.breakpoints.up("xs")]={width:"100%"},n[e.breakpoints.up("md")]={width:"12vw","&.MuiAutocomplete-root":{width:"16vw"}},n)}}),ut=/^\d{2}\/\d{2}\/\d{4}$/,dt=function(e){if(!(e instanceof Date)||isNaN(e.getDate()))return"";var n=e.getFullYear().toString(),o=(e.getMonth()+1).toString(),r=e.getDate().toString();return n+"-"+("00"+o).slice(-2)+"-"+("00"+r).slice(-2)},ft=function(e){if(null==e||""===e)return"";if(e instanceof Date)return dt(e);if(ut.test(e)){var n=e.split("/");return n[2]+"-"+n[1]+"-"+n[0]}return dt(new Date(e))},mt=function(e){if(!e)return"";var n=e.split("-");return n[2]+"/"+n[1]+"/"+n[0]},pt=/^\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}$/,gt=function(e){if(null==e||""===e)return"";if(e instanceof Date)return dt(e);if(pt.test(e)){var n=e.split(" "),o=n[0].split("/");return o[2]+"-"+o[1]+"-"+o[0]+" "+n[1]}return dt(new Date(e))},vt=function(e){if(!e)return"";var n=e.split("T"),o=n[0].split("-");return o[2]+"/"+o[1]+"/"+o[0]+" "+n[1]},ht=function(e){if(!e)return"";if(e instanceof Date)return e.toString();if(-1!==e.indexOf(":")){var n=e.split(":"),o=new Date;return o.setHours(n[0]),o.setMinutes(n[1]),o.toString()}var r=/(\d{2}):(\d{2})/.exec(e);if(null!==r){var t=new Date;return t.setHours(r[0]),t.setMinutes(r[1]),t.toString()}},bt=function(e,n){return e?e.split(" ")[4].substring(0,5):""},yt=function(e){return n(Kn,{variant:"h6",gutterBottom:!0},e.children)},Ct=function(e){var o=e.children,r=e.className,t=e.data,i=e.hasShow,a=e.hasList,l=void 0===a||a,s=No(e,lt);return n(ge,wo({className:r},No(s,at)),o,l&&n(ve,{label:"ra.action.back",icon:n($n,null)}),i&&n(he,{record:t}))},xt=be(),Tt=[xt,ye(1)],kt={inputFormat:"dd/MM/yyyy"},wt=function(e){return function(n,o){var r=o[e];if(n&&r){var t=new Date(r.split("/").reverse().join("/")),i=new Date(n.split("/").reverse().join("/"));if(Xn(t,i))return{message:"validation.greater_or_equal",args:{menor:r}}}}},Nt=function(e){return void 0===e&&(e="es"),{locale:"en"===e?eo:no}},Rt=[{id:"1",name:"Aprobado"},{id:"2",name:"Rechazado"},{id:"3",name:"Pendiente"}],St=function(e,n){var o=document.createElement("a");o.style.display="none",document.body.appendChild(o),o.setAttribute("href",e),o.setAttribute("download",n),o.click()},Pt=function(e,n){var o=U(),r=pe("cb_"+st(o)+"_"+e,{id:n}),t=r.data;return r.isLoading||r.error?"":(null==t?void 0:t.etiqueta)||""},Ft=["useFormulario","enableLoad"],Mt=function(e){var o=e.enableLoad,r=void 0===o||o,t=No(e,Ft),a=U(e),l=it(a,{enabled:r}),s=l.data,c=l.isLoading,u=tt(e).fichaProps,d=i(function(){return{estado:"N",initialValues:s,isLoading:c,fichaProps:u}},[s,c,u]);return n(Mo,null,n(Yo.Provider,{value:d},n(Ce,wo({redirect:"list"},t,null==u?void 0:u.panel))))};function _t(e){var n,o,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(o=_t(e[n]))&&(r&&(r+=" "),r+=o);else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Lt(){for(var e,n,o=0,r="";o<arguments.length;)(e=arguments[o++])&&(n=_t(e))&&(r&&(r+=" "),r+=n);return r}Mt.propTypes={useFormulario:gn.func};var It=["classes","filterValues","handleSubmit","invalid","label","pristine","resource","saving","selectedIds","redirect"],Ot=["resource","redirect","className","icon","label"],Bt=On(function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Ln(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),Et=function(e){var o=Bt(e),r=B(),t=e.resource,i=e.className,a=e.icon,l=e.label,s=void 0===l?"ra.action.delete":l,c=No(e,Ot),u=K(),d=xe(t,{id:u.id}),f=d[0],m=d[1].isLoading;return n(ro,{title:r("ra.action.delete")},n(oo,wo({disabled:m,onClick:function(){return f()},label:s,className:Lt("ra-delete-button",o.deleteButton,i),key:"button"},No(c,It),{size:"large"}),a))};Et.defaultProps={redirect:"list",icon:n(Tn,null)};var Vt=["useFormulario","mutationMode"],At=function(e){var n={};for(var o in e)"string"==typeof e[o]&&0===e[o].trim().length||(null==e[o]&&(e[o]=""),n[o]=e[o]);return n},Dt=function(e){var o=e.mutationMode,r=void 0===o?"pessimistic":o,t=No(e,Vt),a=Te(wo({mutationMode:r},t)),l=a.record,s=a.isLoading,c=tt(e).fichaProps,u=i(function(){return{estado:"M",initialValues:l,isLoading:s,fichaProps:c}},[l,s,c]);return n(Mo,null,n(Yo.Provider,{value:u},n(ke,wo({mutationMode:r,transform:At},t,null==c?void 0:c.panel))))},qt=On(function(e){return{button:{margin:e.spacing(1)},input:{display:"none"}}}),zt=e(function(e,o){var r=e.isOpen,t=e.onConfirm,i=e.onClose,a=e.title,l=e.dialogText,s=e.children,c=e.hasAccept,u=void 0===c||c,d=e.hasCancel,f=void 0===d||d,m=e.isLoading,p=void 0!==m&&m,g=qt(e),v=function(e){i&&i(e)};return n(wn,{ref:o,open:r,fullWidth:!0,onClose:v,"aria-labelledby":"form-dialog-title"},n(Pn,{id:"form-dialog-title"},a),n(Rn,null,n(Sn,null,l),s),(u||f)&&n(Nn,null,f&&n(to,{onClick:v,variant:"contained",color:"secondary",className:g.button,disabled:p},"Cancelar"),u&&n(to,{onClick:function(e){t&&t(e)},variant:"contained",color:"primary",className:g.button,disabled:p},"Ok")))}),Wt=On(function(e){return{block:{pointerEvents:"none",backgroundColor:"#ffffff",opacity:.6,position:"relative"},progress:{position:"absolute",left:"50%",top:"50%"}}}),jt=function(e){var o=Wt(e),t=_o(),i=U(e),a=r(Yo),l=a.estado,s=a.isLoading,u=a.initialValues,d=a.fichaProps,f=Qo({resource:i,etrs:d.etrs});return c(function(){d.onRenderFicha&&d.onRenderFicha(f,l)},[]),c(function(){s||d.onLoadFicha&&d.onLoadFicha(f,l,u)},[s]),n(F,{className:t.open?o.block:"",sx:e.sx},t.open&&n(M,{className:o.progress,thickness:4,size:50}),e.children)},Gt=["children"],Ht=function(){},Ut=function(e){var o=e.children,t=No(e,Gt),i=r(Yo),l=i.initialValues,s=i.fichaProps,c=s.onBeforeSubmitFicha,u=s.config,d=void 0===u?{}:u,f=Jo(e),m=j(),p=we().save,g=a(function(e){var n=c&&c(wo({form:{getValues:function(){return e}}},f),"N");return"string"==typeof n?void m(n,{type:"error"}):void 0===n||n?p(e):void 0},[c,m,Ht,p]);return l?n(Ne,wo({onSubmit:"function"==typeof c?g:void 0,defaultValues:l,component:jt,mode:"onBlur"},t,d),o):null};Ut.propTypes=wo({},Ne.propTypes);var Jt=function(e){var o=e.handleToggle,r=e.isOpen,t=e.name,i=e.icon,a=e.children,l=e.dense,s=B(),c=Re()[0],u=n(v,{dense:l,onClick:o},n(h,{sx:{minWidth:5}},r?n(ao,null):i),n(C,{variant:"inherit",color:"textSecondary"},s(t)));return n("div",null,c||r?u:n(R,{title:s(t),placement:"right"},u),n(_,{in:r,timeout:"auto",unmountOnExit:!0},n(L,{dense:l,component:"div",disablePadding:!0,sx:{paddingLeft:e.children.props.children[0].key.startsWith("menu")?4:0,"& a":{transition:"padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",paddingLeft:c?4:2}}},a)))},Qt=["items","translate"],Yt=function(e){var o=e.dense,r=void 0!==o&&o,i=B(),a=t({mnuPrueba:!1}),l=a[0],s=a[1],c=y(function(e){return e.breakpoints.down("sm")}),u=Re()[0],d=function e(o){var r=o.items,t=o.translate,i=No(o,Qt),a=i.state,l=i.handleToggle,s=i.dense;return r&&n("div",null,r.map(function(o){var r=o.name,c=o.menu,u=o.label;return c?n(Jt,{key:r,name:u,handleToggle:function(){return l(r)},isOpen:a[r],icon:n(io,null),dense:s},e(wo({items:c,translate:t},i))):n(Se,{key:r,to:"/"+r,primaryText:t("resources."+r+".name",{_:u}),dense:s,leftIcon:n(io,null)})}))}({items:JSON.parse(localStorage.getItem("menus")),handleToggle:function(e){s(function(n){var o;return wo({},n,((o={})[e]=!n[e],o))})},state:l,activeClassName:"",iconClass:"",className:"",open:u,dense:r,translate:i});return n(x,{sx:{width:u?230:50,marginTop:1,marginBottom:1,transition:function(e){return e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})}}},n(Pe,null,n(Fe,{primaryText:i("ra.page.dashboard")}),d,c&&n(Se,{to:"/configuration",primaryText:i("pos.configuration"),leftIcon:n(io,null),dense:r})))},Zt=function(e){return n(Me,wo({},e,{appBar:Po,menu:Yt}))},$t=["className","exporter","filters","children","hideFilterButton","jsBotonGrilla"],Kt=function(e,n){alert("Falta implementar la función jsBotonGrilla")},Xt=function(e){var o=e.className,r=e.exporter,t=e.filters,a=e.children,l=e.hideFilterButton,s=void 0!==l&&l,c=e.jsBotonGrilla,f=void 0===c?Kt:c,m=No(e,$t),p=Uo(e),g=W(e),v=U(m),h=ce(m).hasCreate,b=g.sort,y=g.displayedFilters,C=g.filterValues,x=g.selectedIds,T=g.showFilter,k=g.total,w=wo({},p,g);return delete m.hasCreate,i(function(){return n(ge,wo({className:o},_e(m)),t&&!s&&d(t,{resource:v,showFilter:T,displayedFilters:y,filterValues:C,context:"button"}),h&&n(Le,null),!1!==r&&n(Ie,{disabled:0===k,resource:v,sort:b,filterValues:C}),u.map(a,function(e,n){return d(e,{onClick:e.props.options?null:function(n){e.props.onClick&&e.props.onClick(n),f(w,e.key)},options:e.props.options?e.props.options.map(function(n){return wo({},n,{onClick:function(o){e.props.onClick&&e.props.onClick(o),f(w,n.key)}})}):null})}))},[v,y,C,x,t,k])},ei=On(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"}}}),ni=function(e){var o=e.loginBackgroundImage,r=e.nameSource,i=void 0===r?"username":r,a=e.passwordSource,l=void 0===a?"password":a,s=t(!1),c=s[0],u=s[1],d=B(),f=d("ra.auth.sign_in"),m=ei({loginBackgroundImage:o,textLength:f.length}),g=j(),v=Oe(),h=un();return n(ae,{onSubmit:function(e){u(!0),v(e,h.state?h.state.nextPathname:"/").catch(function(e){u(!1),g("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error",{type:"error",messageArgs:{_:"string"==typeof e?e:e&&e.message?e.message:void 0}})})},validate:function(e){var n={};return e[i]||(n[i]=d("ra.validation.required")),e[l]||(n[l]=d("ra.validation.required")),n}},n("div",{className:m.main},n(so,{className:m.card},n("div",{className:m.avatar},n(lo,{className:m.avatarIcon},n(p,null))),n("div",{className:m.hint},"Inicio de Sesión"),n("div",{className:m.form},n("div",{className:m.input},n(Be,{autoFocus:!0,name:i,label:d("ra.auth.username"),disabled:c})),n("div",{className:m.input},n(Ee,{name:l,label:d("ra.auth.password"),type:"password",disabled:c}))),n(co,{className:m.actions},n(to,{variant:"contained",type:"submit",color:"primary",disabled:c,fullWidth:!0},c&&n(uo,{className:m.icon,size:18,thickness:2}),f)))))},oi=["displayedFilters","filterValues","showFilter"],ri=["className","options","icon","label","disabled"],ti=On({root:{display:"inline-block"},paddingRight:{paddingRight:4}}),ii=function(e){var o,r=e.className,i=e.options,a=void 0===i?[]:i,l=e.icon,s=e.label,c=e.disabled,u=No(e,ri),d=t(!1),f=d[0],p=d[1],g=m(),v=t(0),h=v[0],b=v[1],y=ti(e),C=U(e);return n("div",wo({className:Lt(y.root,r)},No(u,oi)),n(te,{size:"large",className:"add-filter",label:s,onClick:function(e){e.preventDefault(),p(!0),g.current=e.currentTarget},title:a[h].label,disabled:c},(null===(o=a[h])||void 0===o?void 0:o.icon)||l),n(fo,{open:f,anchorEl:g.current,onClose:function(e){g.current&&g.current.contains(e.target)||p(!1)}},a.map(function(e,o){return n(mo,{key:e.label,disabled:e.disabled,selected:o===h,onClick:function(n){!function(e,n){b(n),p(!1)}(0,o),e.onClick&&e.onClick(n,o)},resource:C,title:e.label},e.icon,n("span",{className:y.paddingRight}),n(Ve,{label:e.label,resource:C}))})))},ai=["fields","className","textAlign","sortable"],li=function(e){var o=e.fields,r=e.className,t=No(e,ai),i=o.campos,a=o.separador,l=void 0===a?"":a,s=o.secundario,c=void 0===s?[]:s,u=o.hasSecundario,d=K(),f=i.map(function(e){return void 0!==d[e]?d[e]:e}).join(""+l);return n(Kn,wo({noWrap:!0,variant:"inherit",className:r},t),f,u&&n(Kn,{component:"span",display:"block",color:"textSecondary",variant:"caption"},c.map(function(e){return(e.etiqueta||"---")+": "+(d[e.campo]||"---")}).join(" ")))},si=["useFormulario"],ci=function(e){var o=No(e,si),r=Ae(o),t=r.record,a=r.isLoading,l=tt(e).fichaProps,s=i(function(){return{estado:"M",initialValues:t,isLoading:a,fichaProps:l}},[t,a,l]);return n(Mo,null,n(Yo.Provider,{value:s},n(De,wo({},o,r,null==l?void 0:l.panel))))},ui=["icon","label","record","resource","scrollToTop"],di=function(e){var o=e.icon,r=void 0===o?mi:o,t=e.label,i=void 0===t?"ra.action.show":t,a=e.scrollToTop,l=void 0===a||a,s=No(e,ui),c=U(e),u=K(e),d=se();return u?n(Lr,wo({component:cn,to:d({type:"show",resource:c,id:u.id}),state:fi[String(l)],label:i,onClick:pi},s),r):null},fi={true:{_scrollToTop:!0},false:{}},mi=n(po,null),pi=function(e){return e.stopPropagation()};di.propTypes={icon:gn.element,label:gn.string,record:gn.any,scrollToTop:gn.bool};var gi=l(di,function(e,n){return e.resource===n.resource&&(e.record&&n.record?e.record.id===n.record.id:e.record==n.record)&&e.label===n.label&&e.disabled===n.disabled}),vi=["children","className","component","formRootPathname","syncWithLocation","tabs","toolbar","onChange"],hi=["record","resource"],bi=["onChange"],yi=["criteriaMode","defaultValues","delayError","formRootPathname","mode","noValidate","onSubmit","record","resolver","reValidateMode","sanitizeEmptyValues","shouldFocusError","shouldUnregister","shouldUseNativeValidation","validate","warnWhenUnsavedChanges"],Ci=function(e){var o=e.children,i=e.className,a=e.component,l=void 0===a?Ti:a,s=e.formRootPathname,c=e.syncWithLocation,m=void 0===c||c,p=e.tabs,g=void 0===p?xi:p,v=e.toolbar,h=void 0===v?ki:v,b=e.onChange,y=No(e,vi),C=un(),x=fn(""),T=U(e),k=t(0),w=k[0],N=k[1],R=r(Yo),S=Qo(wo({},e,{etrs:R.fichaProps.etrs})),P=r(Yo).estado,F=function(e,n){m||(N(n),b&&b(S,P,{newTab:n,prevTab:w,setTab:N},e))},M=function(){return d(g,{onChange:F,syncWithLocation:m,url:s,value:w},o)};return n(wi,wo({className:Lt("tabbed-form",i)},Ni(y)),m?n(mn,null,n(pn,{path:"/*",element:M()})):M(),n(I,null),n(l,null,u.map(o,function(e,n){if(!e)return null;var o=ze(e,n),r=m?!dn(x.pathname+"/"+o,C.pathname):w!==n;return f(e)?d(e,{intent:"content",resource:T,hidden:r,value:m?o:n}):null})),!1!==h?h:null)},xi=n(We,null),Ti=function(e){return n(F,null,e.children)},ki=n(je,null),wi=In("div",{name:"RaTabbedForm",overridesResolver:function(e,n){return n.root}})(function(e){var n;return(n={})["& .MuiTab-root.RaTabbedForm-errorTabButton"]={color:e.theme.palette.error.main},n}),Ni=function(e){return No(e,hi)},Ri=function(e){var o,r,t,i=No(e,bi),a=(o=un(),r=dn(":resource/create/*",o.pathname),t=dn(":resource/:id/*",o.pathname),r?r.pathnameBase:t?t.pathnameBase:"");return n(ae,wo({formRootPathname:a},i),n(Ci,wo({formRootPathname:a},Si(e))))};Ri.Tab=qe;var Si=function(e){return No(e,yi)},Pi=function(){},Fi=function(e){var o=r(Yo),t=o.initialValues,i=o.fichaProps,l=i.onBeforeSubmitFicha,s=i.config,c=void 0===s?{}:s,u=Jo(e),d=j(),f=we().save,m=a(function(e){var n=l&&l(wo({form:{values:e}},u),"N");return"string"==typeof n?void d(n,{type:"error"}):void 0===n||n?f(e):void 0},[l,d,Pi,f]);return t?n(Ri,wo({mode:"onBlur"},e,c,{onSubmit:"function"==typeof l?m:void 0,defaultValues:t,component:jt})):null};Fi.defaultProps={syncWithLocation:!1};var Mi=wo({},Ge,{palette:wo({},Ge.palette,{mode:"dark"}),components:wo({},Ge.components,{MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),_i={__proto__:null,lightTheme:wo({},Ge,{palette:wo({},Ge.palette,{mode:"light"}),components:wo({},Ge.components,{MuiTextField:{defaultProps:{variant:"outlined"}},MuiFormControl:{defaultProps:{variant:"outlined"}},RaSidebar:{root:{drawerPaper:{position:"sticky"}}},RaRichTextInput:{root:{"@global":{".ra-rich-text-input":{"& .ql-editor":{"& p:not(:last-child)":{marginBottom:"0"}}}}}}})}),darkTheme:Mi};go.ra.page.empty="No records yet";var Li=wo({},go,{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}"}});vo.ra.notification.created="Datos guardados correctamente",vo.ra.action.bulk_actions="1 seleccionado |||| %{smart_count} seleccionados",vo.ra.page.dashboard="Inicio",vo.ra.page.empty="Sin registros todavía",vo.ra.page.invite="¿Quiere agregar uno?",vo.ra.page.list="%{name}",vo.ra.page.edit="Editar %{name}",vo.ra.action.back="Volver",vo.ra.message.delete_title="Eliminar",vo.ra.input.file.upload_single="Seleccione o arrastre archivo";var Ii=wo({},vo,{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}"}}),Oi=function(e){var o=er(e),r=o.propsContenido,t=o.hidden,i=K(),a=JSON.parse(JSON.stringify(i)),l=a[e.source];return a[e.source]=""!=l&&"0"!=l,!t&&n(He,wo({},r,{record:a}))},Bi=["onFocus","onChange","onBlur","hidden","disabled","validate"],Ei=["onFocus","onBlur","onChange","hidden","disabled","useContenido","validate"],Vi=["hidden","disabled","onFocus","onChange","onBlur","validate"],Ai=function(e){var n=e.source,o=r(Yo),t=o.estado,i=o.isLoading,a=o.fichaProps,l=void 0===a?{}:a,s=r(Zo),c=void 0!==s,u=jn(function(e){var o=e.configInputs?e.configInputs.filter(function(e){return e.id===n}):[];return o[0]?o[0]:null})||{},d=u.disabled,f=u.hidden,p=u.error,g=!0===u.required?xt:void 0,v="function"==typeof p?p:function(){return p},h=l[n],b=void 0===h?{}:h,y=l.etrs,C=e.onFocus,x=e.onChange,T=e.onBlur,k=e.hidden,w=void 0!==k&&k,N=e.disabled,R=void 0!==N&&N,S=e.validate,P=No(e,Bi),F=ne(e).field,M=b.onFocus,_=b.onBlur,L=b.onChange,I=b.hidden,O=b.disabled,B=b.useContenido,E=void 0===B?Ho:B,V=b.validate,A=No(b,Ei),D=c||void 0===I?w:I,q=c||void 0===O?R:O,z=c||void 0===M?C:M,W=c||void 0===_?T:_,j=c||void 0===L?x:L,G=Qo(wo({},e,{etrs:y,asisEtr:s})),H=E(wo({},P,{estado:t,hidden:D,isLoading:i,utils:G},A)),U=m(F.value);if(void 0===H)throw new Error("useContenido está devolviendo undefined para el contenido "+n+"\n Asegúrese de incluir una instrucción return al final de la función");var J=H.hidden,Q=H.disabled,Y=H.onFocus,Z=H.onChange,$=H.onBlur,K=H.validate,X=No(H,Vi),ee=Y||z,oe=$||W,re=Z||j,te=wo({},G,{prev:U.current}),ie=Array.isArray(S)?S:[S],ae=Array.isArray(V)?V:[V],le=Array.isArray(K)?K:[K];return{propsContenido:wo({sx:{m:1},onFocus:function(e){ee&&z(G,t,e),U.current=e.target.value},onBlur:function(e){return oe&&oe(te,t,e)},onChange:function(e){return re&&re(te,t,e)},helperText:!1,validate:[].concat(ie,ae,le,[g,v]).filter(function(e){return void 0!==e})},P,A,X,{disabled:void 0!==d?d:void 0!==Q?Q:q}),hidden:void 0!==f?f:void 0!==J?J:D}},Di=["options","disabled"],qi=function(e){var o=Ai(e),r=o.propsContenido,t=o.hidden,i=r.options,a=void 0===i?{}:i,l=r.disabled,s=void 0!==l&&l,c=No(r,Di),u=K();return!t&&n(Ue,wo({accept:"",maxSize:5e6},c,{options:wo({disabled:s},a)}),n(Je,{source:r.source,title:"Ver",record:u}))},zi=["sx"],Wi=function(e){var o=Ai(e),r=o.propsContenido,t=r.sx,i=No(r,zi);return!o.hidden&&n(Qe,wo({},i,{sx:wo({},t,{display:"inline-flex",margin:1})}))},ji=["callback","sx","isTC","onChange"],Gi=["callback"],Hi=e(function(e,o){return n(R,wo({ref:o},e))}),Ui=function(e){var o,r=e.callback,t=e.sx,i=e.isTC,a=e.onChange,l=No(e,ji),s=Ze(),u=s.isLoading,d=s.allChoices,f=m(null);return c(function(){u||"function"==typeof r&&r(Object.values([d]))},[d,r,u]),n(Hi,{title:(null===(o=f.current)||void 0===o?void 0:o.value)||"",placement:"top",arrow:!0},n(x,{component:"span",sx:wo(i?{margin:1}:{display:{md:"inline-flex"},margin:1},t)},n($e,wo({size:"small",sx:i?{width:"100% !important"}:{}},l,{onChange:function(e){a({target:{value:e}})},TextFieldProps:{inputRef:f}}))))},Ji=function(e){var o,r,t=Ai(e),i=t.propsContenido,a=t.hidden,l=Wn(),s=e.source,u=e.reference,d=jn(function(e){var n=e.reload_cb?e.reload_cb.filter(function(e){return e.id===s}):[];return n[0]?n[0]:null}),f=m(d),p=null===d&&f.current?f.current:d;return p&&(o=p.callback,r=No(p,Gi)),c(function(){null!==d&&(f.current=d,l(Io(s)))},[JSON.stringify(d)]),a?null:n(Ye,{reference:u,source:s,perPage:500,filter:r},n(Ui,wo({},i,{callback:o,optionText:"etiqueta",optionValue:s})))},Qi=function(e){var o=Ai(e);return!o.hidden&&n(Ke,o.propsContenido)},Yi=function(e){var o=e.title,r=e.source,t=e.src,i=K(e);return n(lo,{title:o,src:t+"/"+i[r]})},Zi=function(e){var o=Ai(e);return o.hidden?null:n(Xe,{source:e.source,reference:e.reference},n(en,wo({},o.propsContenido,{optionText:"etiqueta",optionValue:e.source})))},$i=function(e){var o=Ai(e);return!o.hidden&&n(Ee,o.propsContenido)},Ki=function(e){var o=Ai(e),t=o.propsContenido,i=o.hidden;return r(Yo).isLoading||i?null:n(Ye,{source:e.source,reference:e.reference},n(nn,wo({},t,{optionText:"etiqueta",optionValue:e.source})))},Xi=function(e){var o=Ai(e);return!o.hidden&&n(nn,o.propsContenido)},ea=On(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:Ln(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),na=function(e){return n(To,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},n(O,e))},oa={cursor:"move"},ra=function(e){var o,r=e.isOpen,t=e.isLoading,i=e.title,l=e.content,s=e.cancel,c=e.confirmColor,u=e.ConfirmIcon,d=e.CancelIcon,f=e.onClose,m=e.onConfirm,p=e.contentResource,g=e.translateOptions,v=void 0===g?{}:g,h=ea(e),b=B(),y=on(p)[0],C=a(function(e,n){e.stopPropagation(),m(e,y)},[y,m]),x=a(function(e){e.stopPropagation()},[]);return n(wn,{open:r,onClose:f,onClick:x,fullWidth:!0,maxWidth:"lg",PaperComponent:na,"aria-labelledby":"draggable-dialog-title"},n(Pn,{style:oa,id:"draggable-dialog-title"},b(i,wo({_:i},v))),n(Rn,{dividers:!0},l),n(Nn,null,n(to,{disabled:t,onClick:f},n(d,{className:h.iconPaddingStyle}),b(s,{_:s})),n(to,{disabled:t,onClick:function(e){return C(e,"yes")},className:Lt("ra-confirm",(o={},o[h.confirmWarning]="warning"===c,o[h.confirmPrimary]="primary"===c,o)),autoFocus:!0},n(u,{className:h.iconPaddingStyle}),b("ra.action.confirm"))))};ra.propTypes={cancel:gn.string,classes:gn.object,confirm:gn.string,confirmColor:gn.string,ConfirmIcon:gn.elementType,CancelIcon:gn.elementType,content:gn.node.isRequired,isOpen:gn.bool,isLoading:gn.bool,onClose:gn.func.isRequired,onConfirm:gn.func.isRequired,title:gn.string.isRequired},ra.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Co,CancelIcon:xo,isOpen:!1};var ta=["disabled","asistant","asistantResource","label","source","sx"],ia=function(){return n(s,null)},aa={seleccion:[],all:!0,none:!1},la=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},sa=function(e){return e},ca=function(e){var o=e.disabled,r=e.asistant,i=e.asistantResource,l=e.label,u=e.source,d=e.sx,f=No(e,ta),m=t(!1),p=m[0],g=m[1],v=qn();c(function(){b()},[]);var h=a(function(){g(!1)},[g]),b=function(e){v.setValue(u,{seleccion:[],all:!0,none:!1})};return n(s,null,n(x,{display:"flex",alignItems:"center",sx:wo({},d,{display:"inline-flex",margin:1})},n(Be,wo({defaultValue:aa},f,{source:u,label:l,disabled:!0,parse:sa,format:la,helperText:!1,InputProps:{endAdornment:n(s,null,n(oo,{onClick:function(e){v.setValue(u,{seleccion:[],all:!1,none:!0})},disabled:o,"aria-label":"Ninguno",size:"small",title:"Ninguno"},n(bo,null)),n(oo,{onClick:b,disabled:o,"aria-label":"Todos",size:"small",title:"Todos"},n(ho,null)),n(oo,{onClick:function(e){return g(!0)},disabled:o,"aria-label":"Selección",size:"small",title:"Selección"},n(yo,null)))}}))),n(ra,{isOpen:p,title:"Selección de "+l,contentResource:i,content:n(r,{bulkActionButtons:n(ia,null),hasCreate:!1,exporter:!1,resource:i}),onConfirm:function(e,n){g(!1),v.setValue(u,{seleccion:n,all:!1,none:!1})},onClose:h}))},ua=function(e){return n(rn,wo({},e,{hasCreate:!1,exporter:!1,perPage:50,empty:!1,title:" ",disableSyncWithLocation:!0}),n(tn,{bulkActionButtons:n("span",null)},n(Z,{source:"funced",sortable:!0,label:"Cédula"}),n(Z,{source:"funpriape",sortable:!0,label:"Apellido"}),n(Z,{source:"funprinom",sortable:!0,label:"Nombre"})))},da={fillista:"empcod=-1"},fa=function(e){var o=t(da),r=o[0],i=o[1],l=z(),s=a(function(e){i({fillista:e.node.key})},[i]),c=a(function(e){return l.getChildNodes("form_224",{parentId:e?e.itemData.id:""}).then(function(e){return e.data}).catch(function(){throw new Error("Data Loading Error")})},[l]);return n(x,{display:"flex",flex:1,alignItems:"flex-start",height:"20em"},n(x,{flexGrow:1},n(ko,{id:"funcionarios-treeview",dataStructure:"plain",rootValue:"",onItemClick:s,createChildren:c})),n(x,{flexGrow:2},n(ua,{resource:"form_224",filter:r})))},ma=On(function(e){return{confirmPrimary:{color:e.palette.primary.main},confirmWarning:{color:e.palette.error.main,"&:hover":{backgroundColor:Ln(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}},iconPaddingStyle:{paddingRight:"0.5em"}}},{name:"RaConfirm"}),pa=function(e){return n(To,{handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]'},n(O,e))},ga={cursor:"move"},va=function(e){var o,r=e.isOpen,t=e.isLoading,i=e.title,l=e.cancel,s=e.confirmColor,c=e.ConfirmIcon,u=e.CancelIcon,d=e.onClose,f=e.onConfirm,m=e.translateOptions,p=void 0===m?{}:m,g=ma(e),v=B(),h=a(function(e,n){e.stopPropagation(),f(e,n)},[f]),b=a(function(e){e.stopPropagation()},[]);return n(wn,{open:r,onClose:d,onClick:b,fullWidth:!0,maxWidth:"lg",PaperComponent:pa,"aria-labelledby":"draggable-dialog-title"},n(Pn,{style:ga,id:"draggable-dialog-title"},v(i,wo({_:i},p))),n(Rn,{dividers:!0},n(fa,null)),n(Nn,null,n(to,{disabled:t,onClick:d},n(u,{className:g.iconPaddingStyle}),v(l,{_:l})),n(to,{disabled:t,onClick:function(e){return h(e,"yes")},className:Lt("ra-confirm",(o={},o[g.confirmWarning]="warning"===s,o[g.confirmPrimary]="primary"===s,o)),autoFocus:!0},n(c,{className:g.iconPaddingStyle}),v("ra.action.confirm"))))};va.propTypes={cancel:gn.string,classes:gn.object,confirm:gn.string,confirmColor:gn.string,ConfirmIcon:gn.elementType,CancelIcon:gn.elementType,isOpen:gn.bool,isLoading:gn.bool,onClose:gn.func.isRequired,onConfirm:gn.func.isRequired,title:gn.string.isRequired},va.defaultProps={cancel:"ra.action.cancel",classes:{},confirmColor:"primary",ConfirmIcon:Co,CancelIcon:xo,isOpen:!1};var ha=["disabled","asistant","asistantResource","label","allowNone","source","sx"],ba={seleccion:[],all:!0,none:!1},ya=function(e){return!e||null!=e&&e.all?"Todos":null!=e&&e.none||0===e.seleccion.length?"Ninguno":"Selección ("+e.seleccion.length+")"},Ca=function(e){return e},xa=function(e){var o=e.disabled,r=e.label,i=void 0===r?"Funcionarios":r,l=e.allowNone,u=void 0===l||l,d=e.source,f=e.sx,m=No(e,ha),p=on("form_224")[0],g=t(!1),v=g[0],h=g[1],b=qn();c(function(){C()},[]);var y=a(function(){h(!1)},[h]),C=function(e){b.setValue(d,{seleccion:[],all:!0,none:!1})};return n(s,null,n(x,{display:"flex",alignItems:"center",sx:wo({},f,{display:"inline-flex",margin:1})},n(Be,wo({defaultValue:ba},m,{source:d,label:i,disabled:!0,parse:Ca,format:ya,helperText:!1,InputProps:{endAdornment:n(s,null,u&&n(oo,{onClick:function(e){b.setValue(d,{seleccion:[],all:!1,none:!0})},disabled:o,"aria-label":"Ninguno",size:"small",title:"Ninguno"},n(bo,null)),n(oo,{onClick:C,disabled:o,"aria-label":"Todos",size:"small",title:"Todos"},n(ho,null)),n(oo,{onClick:function(e){return h(!0)},disabled:o,"aria-label":"Selección",size:"small",title:"Selección"},n(yo,null)))}}))),n(va,{isOpen:v,title:"Selección de "+i,onConfirm:function(e,n){h(!1),b.setValue(d,{seleccion:p,all:!1,none:!1})},onClose:y}))},Ta=function(e){var o=Ai(e);return!o.hidden&&n(Be,wo({multiline:!0},o.propsContenido))},ka=["tipo"],wa=function(e){var o=e.tipo,r=No(e,ka),t=Ai(r),i=t.propsContenido,a=t.hidden,l=qn();c(function(){i.value&&l.setValue(e.source,i.value)});var s=wo({},i);return a?null:"N"===o||"D"===o?n(an,s):"F"===o?n(ln,s):"Z"===o?n(sn,s):n(Be,"H"===o?wo({},s,{type:"time"}):s)},Na=function(e){var o=e.source,r=e.label,t=e.sx;return Ai(e).hidden?null:n(x,{sx:wo({},t,{display:"inline-flex",alignItems:"flex-start",marginLeft:1,marginBottom:-1,width:{xs:"100%",md:"calc(24vw + 1em)"}})},n(Be,wo({},e,{label:"",source:o,sx:{flex:1,marginTop:1}})),n(Ji,wo({},e,{source:o,label:r,isTC:!0,sx:{flex:3}})))};export{Po as AppBar,Oi as BooleanField,qi as Camino,Wi as CheckBox,Ji as ComboBox,Qi as ComboBoxManual,Mt as CreateEtriek,Ar as CreateGridButton,Et as DeleteButtonNoWarning,Dt as EditEtriek,jr as EditGridButton,Rr as EtrGrid,Ct as FichaActions,Yo as FichaContext,va as FiltroFuncionarios,zt as FormDialog,Ut as FormEtriek,Fr as GE,Lr as GridButton,Xr as GrillaEtriek,Yi as ImageField,Zt as Layout,Xt as ListActionsEtriek,Zi as ListCheck,ni as Login,Yt as Menu,ii as MenuButton,li as MultiTextField,$i as Password,Ki as RadioButton,Xi as RadioButtonManual,yt as Separador,ci as ShowEtriek,gi as ShowGridButton,Jt as SubMenu,xa as TBSF,Fi as TabbedFormEtriek,ot as TabbedGrillaEtriek,Ta as TextArea,wa as TextBox,ca as TextBoxSelection,Na as TextCombo,or as TextField,Rt as choicesEstado,ft as dateFormat,kt as dateFormatOptions,mt as dateParser,gt as dateTimeFormat,vt as dateTimeParser,Io as deleteRecargarComboBox,St as descargarLink,Li as enMessages,Ii as esMessages,wt as etrFechaMayorQue,xt as etrRequerido,Tt as etrRequeridoNumerico,st as getFormcodFromResource,Nt as localeOptions,Lo as recargarComboBox,sr as renderCellComboBox,Bo as setDisableAction,Vo as setErrorAction,Oo as setHiddenAction,Eo as setRequireAction,_i as themes,ht as timeFormat,bt as timeParser,Go as useAjax,Ai as useContenidoController,mr as useEtrActions,er as useFieldController,_o as useFormProgress,jo as useGetJson,tt as useInitFicha,it as useNuevo,Pt as useReferenceLabel,ct as useStylesContenidos,Qo as useUtils,Uo as useUtilsGrilla,Jo as useUtilsSubmit};