Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
22 KiB

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[818],{9297:function(r,e,n){n.d(e,{C:function(){return d},k:function(){return g}});var t=n(5893),o=n(1458),i=n(1496),a=n(7169),c=(0,i.ZP)(o.Z)({height:"1em",borderRadius:a.n_,backgroundColor:a.v9});function l(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var u="AllocationBar",s={barOk:"".concat(u,"-barOk"),barWarning:"".concat(u,"-barWarning"),barAlert:"".concat(u,"-barAlert"),underline:"".concat(u,"-underline")},f=(0,i.ZP)("div")((function(){var r;return l(r={},"& .".concat(s.barOk),{backgroundColor:a.Ej}),l(r,"& .".concat(s.barWarning),{backgroundColor:a.Wd}),l(r,"& .".concat(s.barAlert),{backgroundColor:a.hM}),l(r,"& .".concat(s.underline),{borderRadius:a.n_}),r})),d=function(r){var e=r.allocated;return(0,t.jsxs)(f,{children:[(0,t.jsx)(c,{classes:{bar:e>70?e>90?s.barAlert:s.barWarning:s.barOk},variant:"determinate",value:e}),(0,t.jsx)(o.Z,{className:s.underline,variant:"determinate",value:0})]})};function p(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var b="ProgressBar",m={barOk:"".concat(b,"-barOk"),barInProgress:"".concat(b,"-barInProgress"),underline:"".concat(b,"-underline")},h=(0,i.ZP)("div")((function(){var r;return p(r={},"& .".concat(m.barOk),{backgroundColor:a.Ej}),p(r,"& .".concat(m.barInProgress),{backgroundColor:a.Wd}),p(r,"& .".concat(m.underline),{borderRadius:a.n_}),r})),g=function(r){var e=r.progressPercentage;return(0,t.jsxs)(h,{children:[(0,t.jsx)(c,{classes:{bar:e<100?m.barInProgress:m.barOk},variant:"determinate",value:e}),(0,t.jsx)(o.Z,{className:m.underline,variant:"determinate",value:0})]})}},2349:function(r,e,n){var t=n(5893),o=n(8128),i=n(3631),a=n(7169);function c(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function l(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})))),t.forEach((function(e){c(r,e,n[e])}))}return r}function u(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}e.Z=function(r){var e=r.sx,n=u(r,["sx"]);return(0,t.jsx)(o.Z,l({},n,{sx:l(c({color:a.s7},"&.".concat(i.Z.checked),{color:a.s7}),e)}))}},582:function(r,e,n){var t=n(1496),o=n(7720),i=n(7169),a=(0,t.ZP)(o.Z)({backgroundColor:i.d});e.Z=a},5716:function(r,e,n){n.d(e,{Z:function(){return ir}});var t=n(5893),o=n(1113),i=n(1496),a=n(2293),c=n(7357),l=n(3321),u=n(4799),s=n(7294),f=n(7169),d=[{text:"Files",image:"/pngs/files_on.png",uri:"/../file-manager"},{text:"Tasks",image:"/pngs/tasks_no-jobs_icon.png",uri:"/striker?jobs=true"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/striker?configure=true"},{text:"Striker",image:"/pngs/striker_icon_on.png",uri:"/striker?striker=true"},{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/striker?anvil=true"},{text:"Email",image:"/pngs/email_on.png",uri:"/striker?email=true"},{text:"Logout",image:"/pngs/users_icon_on.png",uri:"/striker?logout=true"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],p={width:"40em",height:"40em"},b=n(7533),m=n(8462),h=n(891),g=n(7720),y=n(5709),v=n(2416);function x(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function j(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})))),t.forEach((function(e){x(r,e,n[e])}))}return r}var w="AnvilDrawer",O={list:"".concat(w,"-list"),divider:"".concat(w,"-divider"),text:"".concat(w,"-text"),dashboardButton:"".concat(w,"-dashboardButton"),dashboardIcon:"".concat(w,"-dashboardIcon")},P=(0,i.ZP)(b.ZP)((function(){var r;return x(r={},"& .".concat(O.list),{width:"200px"}),x(r,"& .".concat(O.divider),{backgroundColor:f.d}),x(r,"& .".concat(O.text),{paddingTop:".5em",paddingLeft:"1.5em"}),x(r,"& .".concat(O.dashboardButton),{paddingLeft:".1em"}),x(r,"& .".concat(O.dashboardIcon),{fontSize:"2.3em",color:f.s7}),r})),Z=function(r){var e=r.open,n=r.setOpen;return(0,t.jsx)(P,{BackdropProps:{invisible:!0},anchor:"left",open:e,onClose:function(){return n(!e)},children:(0,t.jsx)("div",{role:"presentation",children:(0,t.jsxs)(m.Z,{className:O.list,children:[(0,t.jsx)(h.ZP,{button:!0,children:(0,t.jsx)(v.z,{text:"Admin"})}),(0,t.jsx)(g.Z,{className:O.divider}),(0,t.jsx)(h.ZP,{button:!0,component:"a",href:"/index.html",children:(0,t.jsxs)(c.Z,{display:"flex",flexDirection:"row",width:"100%",children:[(0,t.jsx)(c.Z,{className:O.dashboardButton,children:(0,t.jsx)(y.Z,{className:O.dashboardIcon})}),(0,t.jsx)(c.Z,{flexGrow:1,className:O.text,children:(0,t.jsx)(v.Ac,{text:"Dashboard"})})]})}),d.map((function(r){return(0,t.jsx)(h.ZP,{button:!0,component:"a",href:-1!==r.uri.search(/^https?:/)?r.uri:"".concat("/cgi-bin").concat(r.uri),children:(0,t.jsxs)(c.Z,{display:"flex",flexDirection:"row",width:"100%",children:[(0,t.jsx)(c.Z,{children:(0,t.jsx)("img",j({alt:"",src:r.image},p),"icon")}),(0,t.jsx)(c.Z,{flexGrow:1,className:O.text,children:(0,t.jsx)(v.Ac,{text:r.text})})]})},r.image)}))]})})})},k=n(4690),S=n(3144),A=n(2749);function I(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function C(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function E(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})))),t.forEach((function(e){C(r,e,n[e])}))}return r}function M(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}function _(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!==typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,i=[],a=!0,c=!1;try{for(n=n.call(r);!(a=(t=n.next()).done)&&(i.push(t.value),!e||i.length!==e);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(r,e)||function(r,e){if(!r)return;if("string"===typeof r)return I(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var B="1.7em",N={iconProps:{},indicatorProps:{},indicatorTextProps:{},initialIndicatorValue:!1},D="24%",T="50%",R=".1rem",L="0rem",W=(0,s.forwardRef)((function(r,e){var n=r.icon,o=r.iconProps,i=(void 0===o?N.iconProps:o).sx,a=r.indicatorProps,l=(void 0===a?N.indicatorProps:a).sx,u=r.indicatorTextProps,d=(void 0===u?N.indicatorTextProps:u).sx,p=r.initialIndicatorValue,b=void 0===p?N.initialIndicatorValue:p,m=r.sx,h=M(r.iconProps,["sx"]),g=M(r.indicatorProps,["sx"]),y=M(r.indicatorTextProps,["sx"]),x=(0,S.Z)().protect,j=_((0,A.Z)(b,x),2),w=j[0],O=j[1],P=(0,s.useCallback)((function(r,e,n){return(0,t.jsx)(k.Z,E({row:!0},g,{sx:E({backgroundColor:f.Ej,borderColor:f.E5,borderRadius:"50%",borderStyle:"solid",borderWidth:".1em",bottom:n,boxSizing:"content-box",height:0,justifyContent:"center",paddingBottom:e,position:"absolute",right:n,width:e},l),children:r}))}),[l,g]),Z=(0,s.useCallback)((function(r){return(0,t.jsx)(v.Ac,E({},y,{sx:E({fontWeight:"500",paddingTop:"100%"},d),children:r>9?"".concat(9,"+"):r}))}),[d,y]),I=(0,s.useMemo)((function(){var r;if(w){var e,n=D,t=R;Number.isFinite(w)&&(e=Z(w),n=T,t=L),r=P(e,n,t)}return r}),[P,Z,w]);return(0,s.useImperativeHandle)(e,(function(){return{indicate:function(r){return O(r)}}}),[O]),(0,t.jsxs)(c.Z,{sx:E({height:B,width:B,position:"relative"},m),children:[(0,s.createElement)(n,E({},h,{sx:E({height:"100%",width:"100%"},i)})),I]})}));W.defaultProps=N,W.displayName="IconWithIndicator";var F=W,H=n(8333),z=n(2029),U=n(9297),$=n(5741),G=n(6125),V=n(1905);function J(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function K(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!==typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,i=[],a=!0,c=!1;try{for(n=n.call(r);!(a=(t=n.next()).done)&&(i.push(t.value),!e||i.length!==e);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(r,e)||function(r,e){if(!r)return;if("string"===typeof r)return J(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var X="20em",Y={onFetchSuccessAppend:void 0,openInitially:!1,refreshInterval:1e4},q=(0,s.forwardRef)((function(r,e){var n=r.onFetchSuccessAppend,o=r.openInitially,i=void 0===o?Y.openInitially:o,a=r.refreshInterval,c=void 0===a?Y.refreshInterval:a,l=(0,S.Z)().protect,u=K((0,A.Z)({},l),2),f=u[0],d=u[1],p=(0,s.useState)(i),b=p[0],m=p[1],h=(0,s.useState)(),g=h[0],y=h[1],x=(0,s.useMemo)((function(){return Math.floor(Date.now()/1e3)}),[]);(0,V.Z)("".concat(z.Z,"/job?start=").concat(x),{onError:function(){d({})},onSuccess:function(r){d(r),null===n||void 0===n||n.call(null,r)},refreshInterval:c}),(0,s.useImperativeHandle)(e,(function(){return{setAnchor:function(r){return y(r)},setOpen:function(r){return m(r)}}}),[]);var j=(0,s.useMemo)((function(){return(0,t.jsxs)(k.Z,{children:[(0,t.jsx)(G.Z,{scroll:!0,listEmpty:"No currently running and recently completed jobs.",listItems:f,listProps:{sx:{maxHeight:X,width:X}},renderListItem:function(r,e){var n=e.jobName,o=e.jobProgress;return(0,t.jsx)(k.Z,{sm:"row",sx:{width:"97%"},xs:"column",children:(0,t.jsxs)(k.Z,{spacing:0,sx:{width:"inherit"},children:[(0,t.jsx)(v.Ac,{sx:{overflowX:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),(0,t.jsx)(U.k,{progressPercentage:o})]})})}}),(0,t.jsx)($.Z,{href:"cgi-bin/striker?jobs=true",children:"More details"})]})}),[f]);return(0,s.useMemo)((function(){return(0,t.jsx)(H.Z,{anchorEl:g,MenuListProps:{sx:{padding:".8em 1.6em"}},onClose:function(){m(!1),y(void 0)},open:b,variant:"menu",children:j})}),[b,j,g])}));q.defaultProps=Y,q.displayName="JobSummary";var Q=q;function rr(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function er(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})))),t.forEach((function(e){rr(r,e,n[e])}))}return r}var nr="Header",tr={input:"".concat(nr,"-input"),barElement:"".concat(nr,"-barElement"),iconBox:"".concat(nr,"-iconBox"),searchBar:"".concat(nr,"-searchBar"),icons:"".concat(nr,"-icons")},or=(0,i.ZP)(a.Z)((function(r){var e,n=r.theme;return rr(e={paddingTop:n.spacing(.5),paddingBottom:n.spacing(.5),paddingLeft:n.spacing(3),paddingRight:n.spacing(3),borderBottom:"solid 1px",borderBottomColor:f.hM,position:"static"},"& .".concat(tr.input),{height:"2.8em",width:"30vw",backgroundColor:n.palette.secondary.main,borderRadius:f.n_}),rr(e,"& .".concat(tr.barElement),{padding:0}),rr(e,"& .".concat(tr.iconBox),rr({},n.breakpoints.down("sm"),{display:"none"})),rr(e,"& .".concat(tr.searchBar),rr({},n.breakpoints.down("sm"),{flexGrow:1,paddingLeft:"15vw"})),rr(e,"& .".concat(tr.icons),{paddingLeft:".1em",paddingRight:".1em"}),e})),ir=function(){var r=(0,s.useRef)({}),e=(0,s.useRef)({}),n=(0,s.useState)(!1),i=n[0],a=n[1];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(or,{children:(0,t.jsxs)(c.Z,{display:"flex",justifyContent:"space-between",flexDirection:"row",children:[(0,t.jsx)(k.Z,{row:!0,children:(0,t.jsx)(l.Z,{onClick:function(){return a(!i)},children:(0,t.jsx)("img",{alt:"",src:"/pngs/logo.png",width:"160",height:"40"})})}),(0,t.jsxs)(k.Z,{className:tr.iconBox,row:!0,spacing:0,children:[(0,t.jsx)(c.Z,{children:(0,t.jsx)(u.Z,{onClick:function(r){var n,t,o=r.currentTarget;null===(n=e.current.setAnchor)||void 0===n||n.call(null,o),null===(t=e.current.setOpen)||void 0===t||t.call(null,!0)},sx:{color:f.of,padding:"0 .1rem"},children:(0,t.jsx)(F,{icon:o.Z,ref:r})})}),d.map((function(r){return(0,t.jsx)("a",{href:-1!==r.uri.search(/^https?:/)?r.uri:"".concat("/cgi-bin").concat(r.uri),children:(0,t.jsx)("img",er({alt:"",src:r.image},p,{className:tr.icons}),"icon")},r.uri)}))]})]})}),(0,t.jsx)(Z,{open:i,setOpen:a}),(0,t.jsx)(Q,{onFetchSuccessAppend:function(e){var n;null===(n=r.current.indicate)||void 0===n||n.call(null,Object.keys(e).length>0)},ref:e})]})}},5741:function(r,e,n){var t=n(5893),o=n(1714),i=n(122),a=n(7169),c=n(4690);function l(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function u(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})))),t.forEach((function(e){l(r,e,n[e])}))}return r}function s(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}e.Z=function(r){var e=r.children,n=r.sx,l=s(r,["children","sx"]);return(0,t.jsx)(i.Z,u({underline:"hover",variant:"subtitle1"},l,{sx:u({color:a.lD,textDecorationColor:a.s7},n),children:(0,t.jsxs)(c.Z,{row:!0,children:[e,(0,t.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},6125:function(r,e,n){var t=n(5893),o=n(7294),i=n(2428),a=n(6761),c=n(6059),l=n(1797),u=n(7357),s=n(7594),f=n(891),d=n(8462),p=n(5934),b=n(7169),m=n(2349),h=n(582),g=n(4690),y=n(1706),v=n(2416);function x(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function j(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function w(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},t=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})))),t.forEach((function(e){j(r,e,n[e])}))}return r}function O(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}function P(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!==typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,i=[],a=!0,c=!1;try{for(n=n.call(r);!(a=(t=n.next()).done)&&(i.push(t.value),!e||i.length!==e);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(r,e)||k(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(r){return function(r){if(Array.isArray(r))return x(r)}(r)||function(r){if("undefined"!==typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||k(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(r,e){if(r){if("string"===typeof r)return x(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(r,e):void 0}}var S=(0,o.forwardRef)((function(r,e){var n=r.allowCheckAll,x=void 0!==n&&n,j=r.allowEdit,k=void 0!==j&&j,S=r.edit,A=void 0!==S&&S,I=r.flexBoxProps,C=r.header,E=r.headerSpacing,M=void 0===E?".3em":E,_=r.initialCheckAll,B=void 0!==_&&_,N=r.insertHeader,D=void 0===N||N,T=r.listEmpty,R=r.listItemIconMinWidth,L=void 0===R?"56px":R,W=r.listItemKeyPrefix,F=void 0===W?(0,p.Z)():W,H=r.listItemProps,z=(void 0===H?{}:H).sx,U=r.listItems,$=r.listProps,G=(void 0===$?{}:$).sx,V=r.onAdd,J=r.onDelete,K=r.onEdit,X=r.onAllCheckboxChange,Y=r.onItemCheckboxChange,q=r.renderListItem,Q=void 0===q?function(r){return(0,t.jsx)(v.Ac,{children:r})}:q,rr=r.renderListItemCheckboxState,er=r.scroll,nr=void 0!==er&&er,tr=r.allowAddItem,or=void 0===tr?k:tr,ir=r.allowCheckItem,ar=void 0===ir?k:ir,cr=r.allowDelete,lr=void 0===cr?k:cr,ur=r.allowEditItem,sr=void 0===ur?k:ur,fr=O(r.listItemProps,["sx"]),dr=O(r.listProps,["sx"]),pr=(0,o.useState)(B),br=pr[0],mr=pr[1],hr=(0,o.useMemo)((function(){return"calc(".concat(L," - ").concat(M,")")}),[M,L]),gr=(0,o.useMemo)((function(){return or?(0,t.jsx)(y.Z,{onClick:V,size:"small",children:(0,t.jsx)(i.Z,{})}):void 0}),[or,V]),yr=(0,o.useMemo)((function(){return A&&lr?(0,t.jsx)(y.Z,{onClick:J,size:"small",sx:{backgroundColor:b.hM,color:b.s7,"&:hover":{backgroundColor:"".concat(b.hM,"F0")}},children:(0,t.jsx)(a.Z,{})}):void 0}),[lr,A,J]),vr=(0,o.useMemo)((function(){if(sr)return(0,t.jsx)(y.Z,{onClick:K,size:"small",children:A?(0,t.jsx)(c.Z,{sx:{color:b.Ej}}):(0,t.jsx)(l.Z,{})})}),[sr,A,K]),xr=(0,o.useMemo)((function(){var r;return A&&ar&&(r=x?(0,t.jsx)(u.Z,{sx:{minWidth:hr},children:(0,t.jsx)(m.Z,{checked:br,edge:"start",onChange:function(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];var t,o=P(e,2),i=o[1];null===X||void 0===X||(t=X).call.apply(t,[null].concat(Z(e))),mr(i)}})}):(0,t.jsx)(h.Z,{sx:{minWidth:hr}})),r}),[hr,x,ar,br,A,X]),jr=(0,o.useMemo)((function(){return D&&C?(0,t.jsxs)(g.Z,{row:!0,spacing:M,sx:{height:"2.4em"},children:[xr,"string"===typeof C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Ac,{children:C}),(0,t.jsx)(h.Z,{sx:{flexGrow:1}})]}):C,yr,vr,gr]}):C}),[gr,xr,yr,vr,C,M,D]),wr=(0,o.useMemo)((function(){return"string"===typeof T?(0,t.jsx)(v.Ac,{children:T}):T}),[T]),Or=(0,o.useCallback)((function(r,e){return A&&ar?(0,t.jsx)(s.Z,{sx:{minWidth:L},children:(0,t.jsx)(m.Z,{checked:e,edge:"start",onChange:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o;return null===Y||void 0===Y?void 0:(o=Y).call.apply(o,[null,r].concat(Z(n)))}})}):void 0}),[ar,A,L,Y]),Pr=(0,o.useMemo)((function(){var r=wr;if(U){var e=Object.entries(U);e.length>0&&(r=e.map((function(r){var e=P(r,2),n=e[0],t=e[1];return(0,o.createElement)(f.ZP,w({},fr,{key:"".concat(F,"-").concat(n),sx:w({paddingLeft:0,paddingRight:0},z),children:[Or(n,null===rr||void 0===rr?void 0:rr.call(null,n,t)),Q(n,t)]}))})))}return r}),[wr,Or,F,U,z,Q,rr,fr]),Zr=(0,o.useMemo)((function(){return nr?{maxHeight:"100%",overflowY:"scroll"}:void 0}),[nr]);return(0,o.useImperativeHandle)(e,(function(){return{setCheckAll:function(r){return mr(r)}}}),[]),(0,t.jsxs)(g.Z,w({spacing:0},I,{children:[jr,(0,t.jsx)(d.Z,w({},dr,{sx:w({paddingBottom:0,paddingTop:0},Zr,G),children:Pr}))]}))}));S.displayName="List",e.Z=S},3144:function(r,e,n){var t=n(7294);function o(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function i(r){return function(r){if(Array.isArray(r))return o(r)}(r)||function(r){if("undefined"!==typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,e){if(!r)return;if("string"===typeof r)return o(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(r,e)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.Z=function(){var r=(0,t.useRef)(!0);return(0,t.useEffect)((function(){return function(){r.current=!1}}),[]),{protect:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];return r.current?e.apply(void 0,i(t)):void 0}}}},2749:function(r,e,n){var t=n(7294);function o(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function i(r){return function(r){if(Array.isArray(r))return o(r)}(r)||function(r){if("undefined"!==typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,e){if(!r)return;if("string"===typeof r)return o(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(r,e)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.Z=function(r,e){var n=(0,t.useState)(r),o=n[0],a=n[1];return[o,function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];return e.apply(void 0,[a].concat(i(n)))}]}}}]);