1"use strict";(self.webpackChunkcov_spectrum_website=self.webpackChunkcov_spectrum_website||[]).push([[1147],{1147:(e,t,o)=>{o.d(t,{D:()=>Sm});var n=o(5817),r=o(9062),l=o(5043),i=o(5173),a=o(579),s=o(3596),c=o(7950),u=o(1908),d=o(1963),p=o(7319),f=o(3972),g=o(9501),m=o(4018);function h(e){return e.substring(2).toLowerCase()}function b(e){const{children:t,disableReactTree:o=!1,mouseEvent:n="onClick",onClickAway:i,touchEvent:a="onTouchEnd"}=e,s=l.useRef(!1),c=l.useRef(null),u=l.useRef(!1),d=l.useRef(!1);l.useEffect((()=>(setTimeout((()=>{u.current=!0}),0),()=>{u.current=!1})),[]);const p=(0,r.aH)((0,r.cJ)(t),c),f=(0,r.cK)((e=>{const t=d.current;d.current=!1;const n=(0,r.cL)(c.current);if(!u.current||!c.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,n))return;if(s.current)return void(s.current=!1);let l;l=e.composedPath?e.composedPath().includes(c.current):!n.documentElement.contains(e.target)||c.current.contains(e.target),!l&&(o||!t)&&i(e)})),g=e=>o=>{d.current=!0;const n=t.props[e];n&&n(o)},m={ref:p};return!1!==a&&(m[a]=g(a)),l.useEffect((()=>{if(!1!==a){const e=h(a),t=(0,r.cL)(c.current),o=()=>{s.current=!0};return t.addEventListener(e,f),t.addEventListener("touchmove",o),()=>{t.removeEventListener(e,f),t.removeEventListener("touchmove",o)}}}),[f,a]),!1!==n&&(m[n]=g(n)),l.useEffect((()=>{if(!1!==n){const e=h(n),t=(0,r.cL)(c.current);return t.addEventListener(e,f),()=>{t.removeEventListener(e,f)}}}),[f,n]),l.cloneElement(t,m)}function v(e){return(0,r.A)("MuiLinearProgress",e)}"production"!==n.p.env.NODE_ENV&&(b.propTypes={children:r.cM.isRequired,disableReactTree:i.bool,mouseEvent:i.oneOf(["onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp",!1]),onClickAway:i.func.isRequired,touchEvent:i.oneOf(["onTouchEnd","onTouchStart",!1])}),"production"!==n.p.env.NODE_ENV&&(b.propTypes=(0,r.c8)(b.propTypes)),(0,r.z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const w=r.cP` 2 0% { 3 left: -35%; 4 right: 100%; 5 } 6 7 60% { 8 left: 100%; 9 right: -90%; 10 } 11 12 100% { 13 left: 100%; 14 right: -90%; 15 } 16`,C="string"!=typeof w?r.cO` 17 animation: ${w} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; 18 `:null,y=r.cP` 19 0% { 20 left: -200%; 21 right: 100%; 22 } 23 24 60% { 25 left: 107%; 26 right: -8%; 27 } 28 29 100% { 30 left: 107%; 31 right: -8%; 32 } 33`,x="string"!=typeof y?r.cO` 34 animation: ${y} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; 35 `:null,R=r.cP` 36 0% { 37 opacity: 1; 38 background-position: 0 -23px; 39 } 40 41 60% { 42 opacity: 0; 43 background-position: 0 -23px; 44 } 45 46 100% { 47 opacity: 1; 48 background-position: -200px -23px; 49 } 50`,S="string"!=typeof R?r.cO` 51 animation: ${R} 3s infinite linear; 52 `:null,I=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,r.be)(e.palette[t].main,.62):(0,r.bf)(e.palette[t].main,.5),M=(0,r.H)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[`color${(0,r.aC)(o.color)}`],t[o.variant]]}})((0,r.J)((e=>{let{theme:t}=e;return{position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(t.palette).filter((0,r.b2)()).map((e=>{let[o]=e;return{props:{color:o},style:{backgroundColor:I(t,o)}}})),{props:e=>{let{ownerState:t}=e;return"inherit"===t.color&&"buffer"!==t.variant},style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}}))),P=(0,r.H)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.dashed,t[`dashedColor${(0,r.aC)(o.color)}`]]}})((0,r.J)((e=>{let{theme:t}=e;return{position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(t.palette).filter((0,r.b2)()).map((e=>{let[o]=e;const n=I(t,o);return{props:{color:o},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}}))]}})),S||{animation:`${R} 3s infinite linear`}),k=(0,r.H)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.bar,t.bar1,t[`barColor${(0,r.aC)(o.color)}`],("indeterminate"===o.variant||"query"===o.variant)&&t.bar1Indeterminate,"determinate"===o.variant&&t.bar1Determinate,"buffer"===o.variant&&t.bar1Buffer]}})((0,r.J)((e=>{let{theme:t}=e;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(t.palette).filter((0,r.b2)()).map((e=>{let[o]=e;return{props:{color:o},style:{backgroundColor:(t.vars||t).palette[o].main}}})),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:{width:"auto"}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:C||{animation:`${w} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}}))),E=(0,r.H)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.bar,t.bar2,t[`barColor${(0,r.aC)(o.color)}`],("indeterminate"===o.variant||"query"===o.variant)&&t.bar2Indeterminate,"buffer"===o.variant&&t.bar2Buffer]}})((0,r.J)((e=>{let{theme:t}=e;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(t.palette).filter((0,r.b2)()).map((e=>{let[o]=e;return{props:{color:o},style:{"--LinearProgressBar2-barColor":(t.vars||t).palette[o].main}}})),{props:e=>{let{ownerState:t}=e;return"buffer"!==t.variant&&"inherit"!==t.color},style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:e=>{let{ownerState:t}=e;return"buffer"!==t.variant&&"inherit"===t.color},style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(t.palette).filter((0,r.b2)()).map((e=>{let[o]=e;return{props:{color:o,variant:"buffer"},style:{backgroundColor:I(t,o),transition:"transform .4s linear"}}})),{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:{width:"auto"}},{props:e=>{let{ownerState:t}=e;return"indeterminate"===t.variant||"query"===t.variant},style:x||{animation:`${y} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}}))),O=l.forwardRef((function(e,t){const o=(0,r.G)({props:e,name:"MuiLinearProgress"}),{className:l,color:i="primary",value:s,valueBuffer:c,variant:u="indeterminate",...d}=o,p={...o,color:i,variant:u},f=(e=>{const{classes:t,variant:o,color:n}=e,l={root:["root",`color${(0,r.aC)(n)}`,o],dashed:["dashed",`dashedColor${(0,r.aC)(n)}`],bar1:["bar","bar1",`barColor${(0,r.aC)(n)}`,("indeterminate"===o||"query"===o)&&"bar1Indeterminate","determinate"===o&&"bar1Determinate","buffer"===o&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==o&&`barColor${(0,r.aC)(n)}`,"buffer"===o&&`color${(0,r.aC)(n)}`,("indeterminate"===o||"query"===o)&&"bar2Indeterminate","buffer"===o&&"bar2Buffer"]};return(0,r.I)(l,v,t)})(p),g=(0,r.cN)(),m={},h={bar1:{},bar2:{}};if("determinate"===u||"buffer"===u)if(void 0!==s){m["aria-valuenow"]=Math.round(s),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let e=s-100;g&&(e=-e),h.bar1.transform=`translateX(${e}%)`}else"production"!==n.p.env.NODE_ENV&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if("buffer"===u)if(void 0!==c){let e=(c||0)-100;g&&(e=-e),h.bar2.transform=`translateX(${e}%)`}else"production"!==n.p.env.NODE_ENV&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return(0,a.jsxs)(M,{className:(0,n.c)(f.root,l),ownerState:p,role:"progressbar",...m,ref:t,...d,children:["buffer"===u?(0,a.jsx)(P,{className:f.dashed,ownerState:p}):null,(0,a.jsx)(k,{className:f.bar1,ownerState:p,style:h.bar1}),"determinate"===u?null:(0,a.jsx)(E,{className:f.bar2,ownerState:p,style:h.bar2})]})}));"production"!==n.p.env.NODE_ENV&&(O.propTypes={classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["inherit","primary","secondary"]),i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),value:i.number,valueBuffer:i.number,variant:i.oneOf(["buffer","determinate","indeterminate","query"])});const T=(0,r.H)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"flex-start"===o.alignItems&&t.alignItemsFlexStart]}})((0,r.J)((e=>{let{theme:t}=e;return{minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}}))),F=l.forwardRef((function(e,t){const o=(0,r.G)({props:e,name:"MuiListItemIcon"}),{className:i,...s}=o,c=l.useContext(r.bc),u={...o,alignItems:c.alignItems},p=(e=>{const{alignItems:t,classes:o}=e;return(0,r.I)({root:["root","flex-start"===t&&"alignItemsFlexStart"]},d.g,o)})(u);
52return(0,a.jsx)(T,{className:(0,n.c)(p.root,i),ownerState:u,ref:t,...s})}));"production"!==n.p.env.NODE_ENV&&(F.propTypes={children:i.node,classes:i.object,className:i.string,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const G=(0,r.H)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{[`& .${d.l.primary}`]:t.primary},{[`& .${d.l.secondary}`]:t.secondary},t.root,o.inset&&t.inset,o.primary&&o.secondary&&t.multiline,o.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${r.cn.root}:where(& .${d.l.primary})`]:{display:"block"},[`.${r.cn.root}:where(& .${d.l.secondary})`]:{display:"block"},variants:[{props:e=>{let{ownerState:t}=e;return t.primary&&t.secondary},style:{marginTop:6,marginBottom:6}},{props:e=>{let{ownerState:t}=e;return t.inset},style:{paddingLeft:56}}]}),D=l.forwardRef((function(e,t){const o=(0,r.G)({props:e,name:"MuiListItemText"}),{children:i,className:s,disableTypography:c=!1,inset:u=!1,primary:p,primaryTypographyProps:f,secondary:g,secondaryTypographyProps:m,slots:h={},slotProps:b={},...v}=o,{dense:w}=l.useContext(r.bc);let C=p??i,y=g;const x={...o,disableTypography:c,inset:u,primary:!!C,secondary:!!y,dense:w},R=(e=>{const{classes:t,inset:o,primary:n,secondary:l,dense:i}=e;return(0,r.I)({root:["root",o&&"inset",i&&"dense",n&&l&&"multiline"],primary:["primary"],secondary:["secondary"]},d.a,t)})(x),S={slots:h,slotProps:{primary:f,secondary:m,...b}},[I,M]=(0,r.b5)("root",{className:(0,n.c)(R.root,s),elementType:G,externalForwardedProps:{...S,...v},ownerState:x,ref:t}),[P,k]=(0,r.b5)("primary",{className:R.primary,elementType:r.T,externalForwardedProps:S,ownerState:x}),[E,O]=(0,r.b5)("secondary",{className:R.secondary,elementType:r.T,externalForwardedProps:S,ownerState:x});return null!=C&&C.type!==r.T&&!c&&(C=(0,a.jsx)(P,{variant:w?"body2":"body1",component:null!=k&&k.variant?void 0:"span",...k,children:C})),null!=y&&y.type!==r.T&&!c&&(y=(0,a.jsx)(E,{variant:"body2",color:"textSecondary",...O,children:y})),(0,a.jsxs)(I,{...M,children:[C,y]})}));"production"!==n.p.env.NODE_ENV&&(D.propTypes={children:i.node,classes:i.object,className:i.string,disableTypography:i.bool,inset:i.bool,primary:i.node,primaryTypographyProps:i.object,secondary:i.node,secondaryTypographyProps:i.object,slotProps:i.shape({primary:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object]),secondary:i.oneOfType([i.func,i.object])}),slots:i.shape({primary:i.elementType,root:i.elementType,secondary:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const H=(0,r.X)((0,a.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),j=(0,r.X)((0,a.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage");function N(e){return(0,r.A)("MuiSkeleton",e)}(0,r.z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const $=r.cP` 53 0% { 54 opacity: 1; 55 } 56 57 50% { 58 opacity: 0.4; 59 } 60 61 100% { 62 opacity: 1; 63 } 64`,L=r.cP` 65 0% { 66 transform: translateX(-100%); 67 } 68 69 50% { 70 /* +0.5s of delay between each loop */ 71 transform: translateX(100%); 72 } 73 74 100% { 75 transform: translateX(100%); 76 } 77`,V="string"!=typeof $?r.cO` 78 animation: ${$} 2s ease-in-out 0.5s infinite; 79 `:null,z="string"!=typeof L?r.cO` 80 &::after { 81 animation: ${L} 2s linear 0.5s infinite; 82 } 83 `:null,A=(0,r.H)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],!1!==o.animation&&t[o.animation],o.hasChildren&&t.withChildren,o.hasChildren&&!o.width&&t.fitContent,o.hasChildren&&!o.height&&t.heightAuto]}})((0,r.J)((e=>{let{theme:t}=e;const o=function(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}(t.shape.borderRadius)||"px",n=function(e){return parseFloat(e)}(t.shape.borderRadius);return{display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,r.K)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${o}/${Math.round(n/.6*10)/10}${o}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:e=>{let{ownerState:t}=e;return t.hasChildren},style:{"& > *":{visibility:"hidden"}}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.width},style:{maxWidth:"fit-content"}},{props:e=>{let{ownerState:t}=e;return t.hasChildren&&!t.height},style:{height:"auto"}},{props:{animation:"pulse"},style:V||{animation:`${$} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(t.vars||t).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:z||{"&::after":{animation:`${L} 2s linear 0.5s infinite`}}}]}}))),B=l.forwardRef((function(e,t){const o=(0,r.G)({props:e,name:"MuiSkeleton"}),{animation:l="pulse",className:i,component:s="span",height:c,style:u,variant:d="text",width:p,...f}=o,g={...o,animation:l,component:s,variant:d,hasChildren:!!f.children},m=(e=>{const{classes:t,variant:o,animation:n,hasChildren:l,width:i,height:a}=e;return(0,r.I)({root:["root",o,n,l&&"withChildren",l&&!i&&"fitContent",l&&!a&&"heightAuto"]},N,t)})(g);return(0,a.jsx)(A,{as:s,ref:t,className:(0,n.c)(m.root,i),ownerState:g,...f,style:{width:p,height:c,...u}})}));function q(e){return(0,r.A)("MuiSwitch",e)}"production"!==n.p.env.NODE_ENV&&(B.propTypes={animation:i.oneOf(["pulse","wave",!1]),children:i.node,classes:i.object,className:i.string,component:i.elementType,height:i.oneOfType([i.number,i.string]),style:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),variant:i.oneOfType([i.oneOf(["circular","rectangular","rounded","text"]),i.string]),width:i.oneOfType([i.number,i.string])});const W=(0,r.z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),_=(0,r.H)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.edge&&t[`edge${(0,r.aC)(o.edge)}`],t[`size${(0,r.aC)(o.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${W.thumb}`]:{width:16,height:16},[`& .${W.switchBase}`]:{padding:4,[`&.${W.checked}`]:{transform:"translateX(16px)"}}}}]}),U=(0,r.H)(u.S,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.switchBase,{[`& .${W.input}`]:t.input},"default"!==o.color&&t[`color${(0,r.aC)(o.color)}`]]}})((0,r.J)((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${"light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${W.checked}`]:{transform:"translateX(20px)"},[`&.${W.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${"light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${W.checked} + .${W.track}`]:{opacity:.5},[`&.${W.disabled} + .${W.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:""+("light"===t.palette.mode?.12:.2)},[`& .${W.input}`]:{left:"-100%",width:"300%"}}})),(0,r.J)((e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,r.K)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter((0,r.b2)(["light"])).map((e=>{let[o]=e;return{props:{color:o},style:{[`&.${W.checked}`]:{color:(t.vars||t).palette[o].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[o].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,r.K)(t.palette[o].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${W.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${o}DisabledColor`]:`${"light"===t.palette.mode?(0,r.be)(t.palette[o].main,.62):(0,r.bf)(t.palette[o].main,.55)}`}},[`&.${W.checked} + .${W.track}`]:{backgroundColor:(t.vars||t).palette[o].main}}}}))]}}))),K=(0,r.H)("span",{name:"MuiSwitch",slot:"Track"})((0,r.J)((e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}
83),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${"light"===t.palette.mode?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:""+("light"===t.palette.mode?.38:.3)}}))),X=(0,r.H)("span",{name:"MuiSwitch",slot:"Thumb"})((0,r.J)((e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}))),Q=l.forwardRef((function(e,t){const o=(0,r.G)({props:e,name:"MuiSwitch"}),{className:l,color:i="primary",edge:s=!1,size:c="medium",sx:u,slots:d={},slotProps:p={},...f}=o,g={...o,color:i,edge:s,size:c},m=(e=>{const{classes:t,edge:o,size:n,color:l,checked:i,disabled:a}=e,s={root:["root",o&&`edge${(0,r.aC)(o)}`,`size${(0,r.aC)(n)}`],switchBase:["switchBase",`color${(0,r.aC)(l)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=(0,r.I)(s,q,t);return{...t,...c}})(g),h={slots:d,slotProps:p},[b,v]=(0,r.b5)("root",{className:(0,n.c)(m.root,l),elementType:_,externalForwardedProps:h,ownerState:g,additionalProps:{sx:u}}),[w,C]=(0,r.b5)("thumb",{className:m.thumb,elementType:X,externalForwardedProps:h,ownerState:g}),y=(0,a.jsx)(w,{...C}),[x,R]=(0,r.b5)("track",{className:m.track,elementType:K,externalForwardedProps:h,ownerState:g});return(0,a.jsxs)(b,{...v,children:[(0,a.jsx)(U,{type:"checkbox",icon:y,checkedIcon:y,ref:t,ownerState:g,...f,classes:{...m,root:m.switchBase},slots:{...d.switchBase&&{root:d.switchBase},...d.input&&{input:d.input}},slotProps:{...p.switchBase&&{root:"function"==typeof p.switchBase?p.switchBase(g):p.switchBase},...p.input&&{input:"function"==typeof p.input?p.input(g):p.input}}}),(0,a.jsx)(x,{...R})]})}));"production"!==n.p.env.NODE_ENV&&(Q.propTypes={checked:i.bool,checkedIcon:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["default","primary","secondary","error","info","success","warning"]),i.string]),defaultChecked:i.bool,disabled:i.bool,disableRipple:i.bool,edge:i.oneOf(["end","start",!1]),icon:i.node,id:i.string,inputProps:i.object,inputRef:r.ba,onChange:i.func,required:i.bool,size:i.oneOfType([i.oneOf(["medium","small"]),i.string]),slotProps:i.shape({input:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object]),switchBase:i.oneOfType([i.func,i.object]),thumb:i.oneOfType([i.func,i.object]),track:i.oneOfType([i.func,i.object])}),slots:i.shape({input:i.elementType,root:i.elementType,switchBase:i.elementType,thumb:i.elementType,track:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),value:i.any});const Y=(0,r.X)((0,a.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),J=(0,r.X)((0,a.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),Z=l.forwardRef((function(e,t){const{backIconButtonProps:o,count:n,disabled:l=!1,getItemAriaLabel:i,nextIconButtonProps:s,onPageChange:c,page:u,rowsPerPage:d,showFirstButton:p,showLastButton:f,slots:g={},slotProps:m={},...h}=e,b=(0,r.cN)(),v=g.firstButton??r.a7,w=g.lastButton??r.a7,C=g.nextButton??r.a7,y=g.previousButton??r.a7,x=g.firstButtonIcon??H,R=g.lastButtonIcon??j,S=g.nextButtonIcon??J,I=g.previousButtonIcon??Y,M=b?w:v,P=b?C:y,k=b?y:C,E=b?v:w,O=b?m.lastButton:m.firstButton,T=b?m.nextButton:m.previousButton,F=b?m.previousButton:m.nextButton,G=b?m.firstButton:m.lastButton;return(0,a.jsxs)("div",{ref:t,...h,children:[p&&(0,a.jsx)(M,{onClick:e=>{c(e,0)},disabled:l||0===u,"aria-label":i("first",u),title:i("first",u),...O,children:b?(0,a.jsx)(R,{...m.lastButtonIcon}):(0,a.jsx)(x,{...m.firstButtonIcon})}),(0,a.jsx)(P,{onClick:e=>{c(e,u-1)},disabled:l||0===u,color:"inherit","aria-label":i("previous",u),title:i("previous",u),...T??o,children:b?(0,a.jsx)(S,{...m.nextButtonIcon}):(0,a.jsx)(I,{...m.previousButtonIcon})}),(0,a.jsx)(k,{onClick:e=>{c(e,u+1)},disabled:l||-1!==n&&u>=Math.ceil(n/d)-1,color:"inherit","aria-label":i("next",u),title:i("next",u),...F??s,children:b?(0,a.jsx)(I,{...m.previousButtonIcon}):(0,a.jsx)(S,{...m.nextButtonIcon})}),f&&(0,a.jsx)(E,{onClick:e=>{c(e,Math.max(0,Math.ceil(n/d)-1))},disabled:l||u>=Math.ceil(n/d)-1,"aria-label":i("last",u),title:i("last",u),...G,children:b?(0,a.jsx)(x,{...m.firstButtonIcon}):(0,a.jsx)(R,{...m.lastButtonIcon})})]})}));function ee(e){return(0,r.A)("MuiTablePagination",e)}"production"!==n.p.env.NODE_ENV&&(Z.propTypes={backIconButtonProps:i.object,count:i.number.isRequired,disabled:i.bool,getItemAriaLabel:i.func.isRequired,nextIconButtonProps:i.object,onPageChange:i.func.isRequired,page:i.number.isRequired,rowsPerPage:i.number.isRequired,showFirstButton:i.bool.isRequired,showLastButton:i.bool.isRequired,slotProps:i.shape({firstButton:i.object,firstButtonIcon:i.object,lastButton:i.object,lastButtonIcon:i.object,nextButton:i.object,nextButtonIcon:i.object,previousButton:i.object,previousButtonIcon:i.object}),slots:i.shape({firstButton:i.elementType,firstButtonIcon:i.elementType,lastButton:i.elementType,lastButtonIcon:i.elementType,nextButton:i.elementType,nextButtonIcon:i.elementType,previousButton:i.elementType,previousButtonIcon:i.elementType})});const te=(0,r.z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var oe;const ne=(0,r.H)(g.b,{name:"MuiTablePagination",slot:"Root"})((0,r.J)((e=>{let{theme:t}=e;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}}))),re=(0,r.H)(r.cR,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${te.actions}`]:t.actions,...t.toolbar})})((0,r.J)((e=>{let{theme:t}=e;return{minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${te.actions}`]:{flexShrink:0,marginLeft:20}}}))),le=(0,r.H)("div",{name:"MuiTablePagination",slot:"Spacer"})({flex:"1 1 100%"}),ie=(0,r.H)("p",{name:"MuiTablePagination",slot:"SelectLabel"})((0,r.J)((e=>{let{theme:t}=e;return{...t.typography.body2,flexShrink:0}}))),ae=(0,r.H)(r.bH,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${te.selectIcon}`]:t.selectIcon,[`& .${te.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${te.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),se=(0,r.H)(d.M,{name:"MuiTablePagination",slot:"MenuItem"})({}),ce=(0,r.H)("p",{name:"MuiTablePagination",slot:"DisplayedRows"})((0,r.J)((e=>{let{theme:t}=e;return{...t.typography.body2,flexShrink:0}})));function ue(e){let{from:t,to:o,count:n}=e;return`${t}\u2013${o} of ${-1!==n?n:`more than ${o}`}`}function de(e){return`Go to ${e} page`}const pe=l.forwardRef((function(e,t){const o=(0,r.G)({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=Z,backIconButtonProps:s,colSpan:c,component:u=g.b,count:d,disabled:p=!1,getItemAriaLabel:f=de,labelDisplayedRows:m=ue,labelRowsPerPage:h="Rows per page:",nextIconButtonProps:b,onPageChange:v,onRowsPerPageChange:w,page:C,rowsPerPage:y,rowsPerPageOptions:x=[10,25,50,100],SelectProps:R={}
83,showFirstButton:S=!1,showLastButton:I=!1,slotProps:M={},slots:P={},...k}=o,E=o,O=(e=>{const{classes:t}=e;return(0,r.I)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},ee,t)})(E),T=(null==M?void 0:M.select)??R,F=T.native?"option":se;let G;(u===g.b||"td"===u)&&(G=c||1e3);const D=(0,r.aI)(T.id),H=(0,r.aI)(T.labelId),j={slots:P,slotProps:M},[N,$]=(0,r.b5)("root",{ref:t,className:O.root,elementType:ne,externalForwardedProps:{...j,component:u,...k},ownerState:E,additionalProps:{colSpan:G}}),[L,V]=(0,r.b5)("toolbar",{className:O.toolbar,elementType:re,externalForwardedProps:j,ownerState:E}),[z,A]=(0,r.b5)("spacer",{className:O.spacer,elementType:le,externalForwardedProps:j,ownerState:E}),[B,q]=(0,r.b5)("selectLabel",{className:O.selectLabel,elementType:ie,externalForwardedProps:j,ownerState:E,additionalProps:{id:H}}),[W,_]=(0,r.b5)("select",{className:O.select,elementType:ae,externalForwardedProps:j,ownerState:E}),[U,K]=(0,r.b5)("menuItem",{className:O.menuItem,elementType:F,externalForwardedProps:j,ownerState:E}),[X,Q]=(0,r.b5)("displayedRows",{className:O.displayedRows,elementType:ce,externalForwardedProps:j,ownerState:E});return(0,a.jsx)(N,{...$,children:(0,a.jsxs)(L,{...V,children:[(0,a.jsx)(z,{...A}),x.length>1&&(0,a.jsx)(B,{...q,children:h}),x.length>1&&(0,a.jsx)(W,{variant:"standard",...!T.variant&&{input:oe||(oe=(0,a.jsx)(r.cQ,{}))},value:y,onChange:w,id:D,labelId:H,...T,classes:{...T.classes,root:(0,n.c)(O.input,O.selectRoot,(T.classes||{}).root),select:(0,n.c)(O.select,(T.classes||{}).select),icon:(0,n.c)(O.selectIcon,(T.classes||{}).icon)},disabled:p,..._,children:x.map((e=>(0,l.createElement)(U,{...K,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e)))}),(0,a.jsx)(X,{...Q,children:m({from:0===d?0:C*y+1,to:-1===d?(C+1)*y:-1===y?d:Math.min(d,(C+1)*y),count:-1===d?-1:d,page:C})}),(0,a.jsx)(i,{className:O.actions,backIconButtonProps:s,count:d,nextIconButtonProps:b,onPageChange:v,page:C,rowsPerPage:y,showFirstButton:S,showLastButton:I,slotProps:M.actions,slots:P.actions,getItemAriaLabel:f,disabled:p})]})})}));"production"!==n.p.env.NODE_ENV&&(pe.propTypes={ActionsComponent:i.elementType,backIconButtonProps:i.object,classes:i.object,colSpan:i.number,component:i.elementType,count:r.c5.isRequired,disabled:i.bool,getItemAriaLabel:i.func,labelDisplayedRows:i.func,labelRowsPerPage:i.node,nextIconButtonProps:i.object,onPageChange:i.func.isRequired,onRowsPerPageChange:i.func,page:(0,r.bg)(r.c5.isRequired,(e=>{const{count:t,page:o,rowsPerPage:n}=e;if(-1===t)return null;const r=Math.max(0,Math.ceil(t/n)-1);return o<0||o>r?new Error(`MUI: The page prop of a TablePagination is out of range (0 to ${r}, but page is ${o}).`):null})),rowsPerPage:r.c5.isRequired,rowsPerPageOptions:i.arrayOf(i.oneOfType([i.number,i.shape({label:i.string.isRequired,value:i.number.isRequired})]).isRequired),SelectProps:i.object,showFirstButton:i.bool,showLastButton:i.bool,slotProps:i.shape({actions:i.shape({firstButton:i.object,firstButtonIcon:i.object,lastButton:i.object,lastButtonIcon:i.object,nextButton:i.object,nextButtonIcon:i.object,previousButton:i.object,previousButtonIcon:i.object}),displayedRows:i.oneOfType([i.func,i.object]),menuItem:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object]),select:i.object,selectLabel:i.oneOfType([i.func,i.object]),spacer:i.oneOfType([i.func,i.object]),toolbar:i.oneOfType([i.func,i.object])}),slots:i.shape({actions:i.shape({firstButton:i.elementType,firstButtonIcon:i.elementType,lastButton:i.elementType,lastButtonIcon:i.elementType,nextButton:i.elementType,nextButtonIcon:i.elementType,previousButton:i.elementType,previousButtonIcon:i.elementType}),displayedRows:i.elementType,menuItem:i.elementType,root:i.elementType,select:i.elementType,selectLabel:i.elementType,spacer:i.elementType,toolbar:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const fe=parseInt(l.version,10),ge=e=>{if(fe>=19){const t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return l.forwardRef(e)},me=r.X,he=me((0,a.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),be=me((0,a.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),ve=me((0,a.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),we=me((0,a.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ce=me((0,a.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),ye=me((0,a.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),xe=me((0,a.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");me((0,a.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),me((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const Re=me((0,a.jsx)("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ColumnIcon"),Se=me((0,a.jsx)("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),Ie=me((0,a.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Me=me((0,a.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),Pe=me((0,a.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),ke=me((0,a.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),Ee=me((0,a.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Oe=me((0,a.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),Te=me((0,a.jsx)("path",{d:"M19 13H5v-2h14v2z"}
83),"Remove"),Fe=me((0,a.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),Ge=me((0,a.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),De=me((0,a.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),He=me((0,a.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),je=me((0,a.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Ne=me((0,a.jsx)("g",{children:(0,a.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),$e=me((0,a.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Clear");me((0,a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const Le=me((0,a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),Ve=me((0,a.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),ze=l.createContext(void 0);function Ae(){const e=l.useContext(ze);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}"production"!==n.p.env.NODE_ENV&&(ze.displayName="GridApiContext");const Be=l.createContext(void 0);"production"!==n.p.env.NODE_ENV&&(Be.displayName="GridRootPropsContext");const qe=()=>{const e=l.useContext(Be);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},We=new TextEncoder;let _e=2048,Ue=new ArrayBuffer(_e),Ke=new Uint8Array(Ue),Xe=new Int32Array(Ue);const Qe=function(e){const t=2*e.length;t>_e&&(_e=t+(4-t%4),Ue=new ArrayBuffer(_e),Ke=new Uint8Array(Ue),Xe=new Int32Array(Ue));const o=We.encodeInto(e,Ke).written,n=0|o;let r=0,l=374761393+(0+n|0)|0;if(n<16)for(;(r+3|0)<n;r=r+4|0)l=Math.imul(0|Ye(l+Math.imul(0|Xe[r],3266489917)|0,17),668265263);else{let e=606290984,t=-2048144777,o=0,i=1640531535;for(;(r+15|0)<n;r=r+16|0)e=Math.imul(0|Ye(e+Math.imul(0|Xe[r+0|0],2246822519)|0,13),2654435761),t=Math.imul(0|Ye(t+Math.imul(0|Xe[r+4|0],2246822519)|0,13),2654435761),o=Math.imul(0|Ye(o+Math.imul(0|Xe[r+8|0],2246822519)|0,13),2654435761),i=Math.imul(0|Ye(i+Math.imul(0|Xe[r+12|0],2246822519)|0,13),2654435761);for(l=(((Ye(e,1)|0+Ye(t,7))+Ye(o,12)|0)+Ye(i,18)|0)+n|0;(r+3|0)<n;r=r+4|0)l=Math.imul(0|Ye(l+Math.imul(0|Xe[r],3266489917)|0,17),668265263)}for(;r<n;r=r+1|0)l=Math.imul(0|Ye(l+Math.imul(0|Ke[r],374761393)|0,11),2654435761);return l=Math.imul(l^l>>>15,2246822519),l=Math.imul(l^l>>>13,3266489917),((l^l>>>16)>>>0).toString()};function Ye(e,t){return e<<t|e>>>32-t}const Je={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=Je.values;return`@media (min-width:${"number"==typeof t[e]?t[e]:e}px)`}},Ze={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},et=function e(t){if("string"==typeof t)return`var(${t})`;const o={};for(const n in t)Object.hasOwn(t,n)&&(o[n]=e(t[n]));return o}(Ze),tt=(0,r.cG)({breakpoints:Je,spacing:function(e,t,o,n){return void 0===e?ot(1):void 0===t?ot(e):void 0===o?ot(e)+" "+ot(t):void 0===n?ot(e)+" "+ot(t)+" "+ot(o):ot(e)+" "+ot(t)+" "+ot(o)+" "+ot(n)},transition:function(e,t){const{duration:o=tt.transitions.duration.base,easing:n=tt.transitions.easing.easeInOut,delay:r=0}=t??{};return e.map((e=>`${e} ${o} ${n} ${r}ms`)).join(", ")},keys:Ze},et);function ot(e){return 0===e?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}function nt(e){return function(e,t){return`rgba(from ${e} r g b / ${t})`}(e,1)}function rt(e){return`${e.fontWeight} ${e.fontSize} / ${e.lineHeight} ${e.fontFamily}`}const lt=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],it=["onRowsPerPageChange","material","disabled"],at=["material"],st=["autoFocus","label","fullWidth","slotProps","className","material"],ct=["material"],ut=["material"],dt=["material"],pt=["material"],ft=["material"],gt=["material"],mt=["material"],ht=["material"],bt=["material","label","className"],vt=["material"],wt=["inert","iconStart","iconEnd","children","material"],Ct=["slotProps","material"],yt=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],xt=["key"],Rt=["inputProps","InputProps","InputLabelProps"],St=["slotProps","material"],It=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],Mt=["native"],Pt=(0,r.H)(r.bN)((e=>{let{theme:t}=e;return{[`&.${r.cX.positionEnd} .${r.cY.sizeSmall}`]:{marginRight:t.spacing(-.75)}}})),kt=(0,r.H)(u.F,{shouldForwardProp:e=>"fullWidth"!==e})((e=>{let{theme:t}=e;return{gap:t.spacing(.5),margin:0,overflow:"hidden",[`& .${u.f.label}`]:{fontSize:t.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]}})),Et=(0,r.H)(m.C,{shouldForwardProp:e=>"density"!==e})((e=>{let{theme:t}=e;return{variants:[{props:{density:"compact"},style:{padding:t.spacing(.5)}}]}})),Ot=(0,r.H)(D)({[`& .${d.l.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),Tt=ge((function(e,t){const{id:o,label:n,labelId:l,material:i,disabled:s,slotProps:c,onChange:u,onKeyDown:d,onOpen:p,onClose:f,size:g,style:m,fullWidth:h}=e,b=(0,r.cH)(e,lt),v={PaperProps:{onKeyDown:d}};return f&&(v.onClose=f),(0,a.jsxs)(r.aR,{size:g,fullWidth:h,style:m,disabled:s,ref:t,children:[(0,a.jsx)(r.b$,{id:l,htmlFor:o,shrink:!0,variant:"outlined",children:n}),(0,a.jsx)(r.bH,(0,r.cG)({id:o,labelId:l,label:n,displayEmpty:!0,onChange:u},b,{variant:"outlined",notched:!0,inputProps:null==c?void 0:c.htmlInput,onOpen:p,MenuProps:v,size:g},i))]})})),Ft=(0,r.H)(pe)((e=>{let{theme:t}=e;return{[`& .${te.selectLabel}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"block"}},[`& .${te.input}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"inline-flex"}}}})),Gt=ge((function(e,t){const{onRowsPerPageChange:o,material:n,disabled:i}=e,s=(0,r.cH)(e,it),c=l.useMemo((()=>
83{if(i)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}}),[i]),u=Ae(),d=qe(),{estimatedRowCount:p}=d;return(0,a.jsx)(Ft,(0,r.cG)({component:"div",onRowsPerPageChange:(0,r.cK)((e=>{null==o||o(Number(e.target.value))})),labelRowsPerPage:u.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:e=>u.current.getLocaleText("paginationDisplayedRows")((0,r.cG)({},e,{estimated:p})),getItemAriaLabel:u.current.getLocaleText("paginationItemAriaLabel")},c,s,n,{ref:t}))})),Dt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,at);return(0,a.jsx)(f.B,(0,r.cG)({},n,o,{ref:t}))})),Ht=ge((function(e,t){const{autoFocus:o,label:i,fullWidth:s,slotProps:c,className:u,material:d}=e,p=(0,r.cH)(e,st),f=l.useRef(null),g=(0,r.aH)(f,t),m=l.useRef(null);return l.useEffect((()=>{var e;if(o){const t=null==(e=f.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else!1===o&&m.current&&m.current.stop({})}),[o]),i?(0,a.jsx)(kt,{className:u,control:(0,a.jsx)(Et,(0,r.cG)({},p,d,{inputProps:null==c?void 0:c.htmlInput,ref:g,touchRippleRef:m})),label:i,fullWidth:s}):(0,a.jsx)(Et,(0,r.cG)({},p,d,{className:(0,n.c)(u,null==d?void 0:d.className),inputProps:null==c?void 0:c.htmlInput,ref:g,touchRippleRef:m}))})),jt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,ct);return(0,a.jsx)(r.C,(0,r.cG)({},n,o,{ref:t}))})),Nt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,ut);return(0,a.jsx)(p.D,(0,r.cG)({},n,o,{ref:t}))})),$t=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,dt);return(0,a.jsx)(O,(0,r.cG)({},n,o,{ref:t}))})),Lt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,pt);return(0,a.jsx)(r.B,(0,r.cG)({},n,o,{ref:t}))})),Vt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,ft);return(0,a.jsx)(r.cU,(0,r.cG)({},n,o,{ref:t}))})),zt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,gt);return(0,a.jsx)(r.a7,(0,r.cG)({},n,o,{ref:t}))})),At=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,mt);return(0,a.jsx)(r.a6,(0,r.cG)({},n,o,{ref:t}))})),Bt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,ht);return(0,a.jsx)(B,(0,r.cG)({},n,o,{ref:t}))})),qt=ge((function(e,t){const{material:o,label:n,className:l}=e,i=(0,r.cH)(e,bt);return n?(0,a.jsx)(kt,{className:l,control:(0,a.jsx)(Q,(0,r.cG)({},i,o,{ref:t})),label:n}):(0,a.jsx)(Q,(0,r.cG)({},i,o,{className:l,ref:t}))})),Wt=ge((function(e,t){const{material:o}=e,n=(0,r.cH)(e,vt);return(0,a.jsx)(r.cT,(0,r.cG)({},n,o,{ref:t}))}));function _t(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return;const{slotProps:o,material:n}=e,l=(0,r.cH)(e,St);t&&(l.startAdornment&&(l.startAdornment=(0,a.jsx)(Pt,{position:"start",children:l.startAdornment})),l.endAdornment&&(l.endAdornment=(0,a.jsx)(Pt,{position:"end",children:l.endAdornment})));for(const r in n)Object.hasOwn(n,r)&&(l[r]=n[r]);return null!=o&&o.htmlInput&&(l.inputProps?l.inputProps=(0,r.cG)({},l.inputProps,null==o?void 0:o.htmlInput):l.inputProps=null==o?void 0:o.htmlInput),l}const Ut={"bottom-start":"top left","bottom-end":"top right"};function Kt(e,t){return function(e,t){return void 0===e.focusTrap?t:(0,a.jsx)(r.cW,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:(0,a.jsx)("div",{tabIndex:-1,children:t})})}(e,function(e,t){return void 0===e.onClickAway?t:(0,a.jsx)(b,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}(e,t))}const Xt={booleanCellTrueIcon:De,booleanCellFalseIcon:Ee,columnMenuIcon:ke,openFilterButtonIcon:Ce,filterPanelDeleteIcon:Ee,columnFilteredIcon:ye,columnSelectorIcon:Re,columnSortedAscendingIcon:he,columnSortedDescendingIcon:be,columnResizeIcon:Se,densityCompactIcon:Ie,densityStandardIcon:Me,densityComfortableIcon:Pe,exportIcon:Ve,moreActionsIcon:He,treeDataCollapseIcon:we,treeDataExpandIcon:ve,groupingCriteriaCollapseIcon:we,groupingCriteriaExpandIcon:ve,detailPanelExpandIcon:Oe,detailPanelCollapseIcon:Te,rowReorderIcon:Ge,quickFilterIcon:xe,quickFilterClearIcon:$e,columnMenuHideIcon:je,columnMenuSortAscendingIcon:he,columnMenuSortDescendingIcon:be,columnMenuUnsortIcon:null,columnMenuFilterIcon:ye,columnMenuManageColumnsIcon:Ne,columnMenuClearIcon:$e,loadIcon:Fe,filterPanelAddIcon:Oe,filterPanelRemoveAllIcon:Le,columnReorderIcon:Ge,menuItemCheckIcon:De},Qt={baseAutocomplete:function(e){const t=qe(),{id:o,multiple:n,freeSolo:l,options:i,getOptionLabel:s,isOptionEqualToValue:c,value:u,onChange:d,label:p,placeholder:f,slotProps:g,material:m}=e,h=(0,r.cH)(e,yt);return(0,a.jsx)(r.cV,(0,r.cG)({id:o,multiple:n,freeSolo:l,options:i,getOptionLabel:s,isOptionEqualToValue:c,value:u,onChange:d,renderTags:(e,t)=>e.map(((e,o)=>{const n=t({index:o}),{key:l}=n,i=(0,r.cH)(n,xt);return(0,a.jsx)(r.cU,(0,r.cG)({variant:"outlined",size:"small",label:"string"==typeof e?e:null==s?void 0:s(e)},i),l)})),renderInput:e=>{var o;const{inputProps:n,InputProps:l,InputLabelProps:i}=e,s=(0,r.cH)(e,Rt);return(0,a.jsx)(r.c,(0,r.cG)({},s,{label:p,placeholder:f,inputProps:n,InputProps:_t(l,!1),InputLabelProps:(0,r.cG)({shrink:!0},i)},null==g?void 0:g.textField,null==(o=t.slotProps)?void 0:o.baseTextField))}},h,m))},baseBadge:Dt,baseCheckbox:Ht,baseChip:Vt,baseCircularProgress:jt,baseDivi
83der:Nt,baseInput:function(e){return(0,a.jsx)(r.cQ,(0,r.cG)({},_t(e)))},baseLinearProgress:$t,baseMenuList:Wt,baseMenuItem:function(e){const{inert:t,iconStart:o,iconEnd:n,children:i,material:s}=e,c=(0,r.cH)(e,wt);return t&&(c.disableRipple=!0),l.createElement(d.M,(0,r.cG)({},c,s),[o&&(0,a.jsx)(F,{children:o},"1"),(0,a.jsx)(Ot,{children:i},"2"),n&&(0,a.jsx)(F,{children:n},"3")])},baseTextField:function(e){const{slotProps:t,material:o}=e,n=(0,r.cH)(e,Ct);return(0,a.jsx)(r.c,(0,r.cG)({variant:"outlined"},n,o,{inputProps:null==t?void 0:t.htmlInput,InputProps:_t(null==t?void 0:t.input),InputLabelProps:(0,r.cG)({shrink:!0},null==t?void 0:t.inputLabel)}))},baseButton:Lt,baseIconButton:zt,baseTooltip:At,basePagination:Gt,basePopper:function(e){const{open:t,children:o,className:n,flip:i,onExited:s,onDidShow:c,onDidHide:u,id:d,target:p,transition:f,placement:g,material:m}=e,h=(0,r.cH)(e,It),b=l.useMemo((()=>{const e=[{name:"preventOverflow",options:{padding:8}}];return i&&e.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(c||u)&&e.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{null==c||c()},effect:()=>()=>{null==u||u()}}),e}),[i,c,u]);let v;if(f){const t=e=>t=>{e&&e(),s&&s(t)};v=n=>{var l;return Kt(e,(0,a.jsx)(r.cZ,(0,r.cG)({},n.TransitionProps,{style:{transformOrigin:Ut[n.placement]},onExited:t(null==(l=n.TransitionProps)?void 0:l.onExited),children:(0,a.jsx)(r.P,{children:o})})))}}else v=Kt(e,o);return(0,a.jsx)(r.cS,(0,r.cG)({id:d,className:n,open:t,anchorEl:p,transition:f,placement:g,modifiers:b},h,m,{children:v}))},baseSelect:Tt,baseSelectOption:function(e){let{native:t}=e,o=(0,r.cH)(e,Mt);return t?(0,a.jsx)("option",(0,r.cG)({},o)):(0,a.jsx)(d.M,(0,r.cG)({},o))},baseSkeleton:Bt,baseSwitch:qt},Yt=(0,r.cG)({},Qt,Xt);var Jt=(e,t,o)=>{if(1===t.length&&t[0]===o){let t=!1;try{const o={};e(o)===o&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(n){({stack:e}=n)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},Zt=(e,t,o)=>{const{memoize:n,memoizeOptions:r}=t,{inputSelectorResults:l,inputSelectorResultsCopy:i}=e,a=n((()=>({})),...r);if(a.apply(null,l)!==a.apply(null,i)){let e;try{throw new Error}catch(s){({stack:e}=s)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:o,firstInputs:l,secondInputs:i,stack:e})}},eo={inputStabilityCheck:"once",identityFunctionCheck:"once"},to=Symbol("NOT_FOUND");var oo=e=>Array.isArray(e)?e:[e];function no(e){const t=Array.isArray(e[0])?e[0]:e;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"expected all items to be functions, instead received the following types: ";if(!e.every((e=>"function"==typeof e))){const o=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${o}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ro(e,t){const o=[],{length:n}=e;for(let r=0;r<n;r++)o.push(e[r].apply(null,t));return o}var lo=(e,t)=>e===t;function io(e,t){const o="object"==typeof t?t:{equalityCheck:t},{equalityCheck:n=lo,maxSize:r=1,resultEqualityCheck:l}=o,i=function(e){return function(t,o){if(null===t||null===o||t.length!==o.length)return!1;const{length:n}=t;for(let r=0;r<n;r++)if(!e(t[r],o[r]))return!1;return!0}}(n);let a=0;const s=r<=1?function(e){let t;return{get:o=>t&&e(t.key,o)?t.value:to,put(e,o){t={key:e,value:o}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(i):function(e,t){let o=[];function n(e){const n=o.findIndex((o=>t(e,o.key)));if(n>-1){const e=o[n];return n>0&&(o.splice(n,1),o.unshift(e)),e.value}return to}return{get:n,put:function(t,r){n(t)===to&&(o.unshift({key:t,value:r}),o.length>e&&o.pop())},getEntries:function(){return o},clear:function(){o=[]}}}(r,i);function c(){let t=s.get(arguments);if(t===to){if(t=e.apply(null,arguments),a++,l){const e=s.getEntries().find((e=>l(e.value,t)));e&&(t=e.value,0!==a&&a--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var ao=typeof WeakRef<"u"?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},so=0,co=1;function uo(){return{s:so,v:void 0,o:null,p:null}}function po(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=uo();const{resultEqualityCheck:n}=t;let r,l=0;function i(){var t;let i=o;const{length:a}=arguments;for(let e=0,o=a;e<o;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=i.o;null===e&&(i.o=e=new WeakMap);const o=e.get(t);void 0===o?(i=uo(),e.set(t,i)):i=o}else{let e=i.p;null===e&&(i.p=e=new Map);const o=e.get(t);void 0===o?(i=uo(),e.set(t,i)):i=o}}const s=i;let c;if(i.s===co)c=i.v;else if(c=e.apply(null,arguments),l++,n){const e=(null==(t=null==r?void 0:r.deref)?void 0:t.call(r))??r;null!=e&&n(e,c)&&(c=e,0!==l&&l--),r="object"==typeof c&&null!==c||"function"==typeof c?new ao(c):c}return s.s=co,s.v=c,c}return i.clearCache=()=>{o=uo(),i.resetResultsCount()},i.resultsCount=()=>l,i.resetResultsCount=()=>{l=0},i}function fo(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];const l="function"==typeof e?{memoize:e,memoizeOptions:o}:e,i=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];let r,i=0,a=0,s={},c=t.pop();"object"==typeof c&&(s=c,c=t.pop()),function(e){if("function"!=typeof e)throw new TypeError(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"expected a function, instead received "+typeof e)}(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...l,...s},{memoize:d,memoizeOptions:p=[],argsMemoize:f=po,argsMemoizeOptions:g=[],devModeChecks:m={}}=u,h=oo(p),b=oo(g),v=no(t),w=d((function(){return i++,c.apply(null,arguments)}),...h);let C=!0;const y=f((function(){a++;const e=ro(v,arguments);if(r=w.apply(null,e),"production"!==n.p.env.NODE_ENV){const{identityFunctionCheck:t,inputStabilityCheck:o}=((e,t)=>{const{identityFunctionCheck:o,inputStabilityCheck:n}={...eo,...t};
83return{identityFunctionCheck:{shouldRun:"always"===o||"once"===o&&e,run:Jt},inputStabilityCheck:{shouldRun:"always"===n||"once"===n&&e,run:Zt}}})(C,m);if(t.shouldRun&&t.run(c,e,r),o.shouldRun){const t=ro(v,arguments);o.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:d,memoizeOptions:h},arguments)}C&&(C=!1)}return r}),...b);return Object.assign(y,{resultFunc:c,memoizedResultFunc:w,dependencies:v,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>r,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:f})};return Object.assign(i,{withTypes:()=>i}),i}var go=fo(po),mo=Object.assign((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:go;!function(e){if("object"!=typeof e)throw new TypeError(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"expected an object, instead received "+typeof e)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const o=Object.keys(e);return t(o.map((t=>e[t])),(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t,n)=>(e[o[n]]=t,e)),{})}))}),{withTypes:()=>mo});const ho=Object.is;function bo(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let o=0,n=0;for(const r in e)if(o+=1,!ho(e[r],t[r])||!(r in t))return!1;for(const r in t)n+=1;return o===n}const vo=new Set;function wo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warning";if("production"===n.p.env.NODE_ENV)return;const o=Array.isArray(e)?e.join("\n"):e;vo.has(o)||(vo.add(o),"error"===t?console.error(o):console.warn(o))}const Co=Object.is,yo=bo,xo=(e,t)=>e===t||e.length===t.length&&e.every(((e,o)=>e===t[o])),Ro=(e,t)=>{let o=Object.is;return t instanceof Array?o=xo:t instanceof Object&&(o=yo),o(e,t)},So=()=>({state:null,equals:null,selector:null,args:void 0}),Io=[],Mo=()=>null,Po=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Co;"production"!==n.p.env.NODE_ENV&&(e.current.state||wo(["MUI X: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]));const a=(0,r.c_)(So),s=null!==a.current.selector,[c,u]=l.useState(s?null:t(e,o));a.current.state=c,a.current.equals=i,a.current.selector=t;const d=a.current.args;if(a.current.args=o,s&&!Ro(d,o)){const t=a.current.selector(e,a.current.args);a.current.equals(a.current.state,t)||(a.current.state=t,u(t))}const p=l.useCallback((()=>(a.current.subscription||(a.current.subscription=e.current.store.subscribe((()=>{const t=a.current.selector(e,a.current.args);a.current.equals(a.current.state,t)||(a.current.state=t,u(t))}))),null)),Io),f=l.useCallback((()=>()=>{a.current.subscription&&(a.current.subscription(),a.current.subscription=void 0)}),Io);return r.c$.useSyncExternalStore(f,p,Mo),c};class ko{constructor(e){this.value=e}deref(){return this.value}}const Eo=(()=>typeof WeakRef>"u"?ko:WeakRef)(),Oo=0;function To(){return{s:Oo,v:void 0,o:null,p:null}}const Fo=fo({memoize:io,memoizeOptions:{maxSize:1,equalityCheck:Object.is},argsMemoize:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=To();const{resultEqualityCheck:n}=t;let r,l=0;function i(){let t=o;const{length:i}=arguments;for(let e=0,o=i;e<o;e+=1){let o=arguments[e];if("function"==typeof o||"object"==typeof o&&null!==o){"current"in o&&"instanceId"in o.current&&(o=o.current.state);let e=t.o;null===e&&(e=new WeakMap,t.o=e);const n=e.get(o);void 0===n?(t=To(),e.set(o,t)):t=n}else{let e=t.p;null===e&&(e=new Map,t.p=e);const n=e.get(o);void 0===n?(t=To(),e.set(o,t)):t=n}}const a=t;let s;if(1===t.s)s=t.v;else if(s=e.apply(null,arguments),l+=1,n){const e=function(e){return e instanceof Eo?e.deref():e}(r);null!=e&&n(e,s)&&(s=e,0!==l&&(l-=1)),r="object"==typeof s&&null!==s||"function"==typeof s?new Eo(s):s}return a.s=1,a.v=s,s}return i.clearCache=()=>{o=To(),i.resetResultsCount()},i.resultsCount=()=>l,i.resetResultsCount=()=>{l=0},i}}),Go=new WeakMap,Do=function(e,t,o,n,r,l){if((arguments.length<=6?0:arguments.length-6)>0)throw new Error("Unsupported number of selectors");let i;if(e&&t&&o&&n&&r&&l)i=(i,a)=>{const s=e(i,a),c=t(i,a),u=o(i,a),d=n(i,a),p=r(i,a);return l(s,c,u,d,p,a)};else if(e&&t&&o&&n&&r)i=(l,i)=>{const a=e(l,i),s=t(l,i),c=o(l,i),u=n(l,i);return r(a,s,c,u,i)};else if(e&&t&&o&&n)i=(r,l)=>{const i=e(r,l),a=t(r,l),s=o(r,l);return n(i,a,s,l)};else if(e&&t&&o)i=(n,r)=>{const l=e(n,r),i=t(n,r);return o(l,i,r)};else{if(!e||!t)throw new Error("Missing arguments");i=(o,n)=>{const r=e(o,n);return t(r,n)}}return i},Ho=e=>(t,o)=>e(t.current.state,o),jo=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(e,o)=>{const n=e.current.instanceId,r=Go.get(n),l=r??new Map,i=l.get(t);if(l&&i){if(!Ro(i.selectorArgs,o)){const n=void 0!==o?[...t.slice(0,t.length-1),()=>o,t[t.length-1]]:t,r=Fo(...n);return r.selectorArgs=o,l.set(t,r),r(e,o)}return i(e,o)}const a=void 0!==o?[...t.slice(0,t.length-1),()=>o,t[t.length-1]]:t,s=Fo(...a);return s.selectorArgs=o,r||Go.set(n,l),l.set(t,s),s(e,o)}},No=Ho((e=>e.dimensions)),$o=Do(No,(e=>e.columnsTotalWidth)),Lo=Do(No,(e=>
83e.rowHeight)),Vo=Do(No,(e=>e.contentSize.height)),zo=Do(No,(e=>e.hasScrollX)),Ao=Do(No,(e=>e.hasScrollY)),Bo=Do(No,(e=>e.columnsTotalWidth<e.viewportOuterSize.width)),qo=Do(No,(e=>e.headerHeight)),Wo=Do(No,(e=>e.groupHeaderHeight));Do(No,(e=>e.headerFilterHeight));const _o=Do(No,(e=>e.hasScrollX?e.scrollbarSize:0)),Uo=Do(No,(e=>e.hasScrollY?e.scrollbarSize:0)),Ko=Do(No,_o,((e,t)=>{const o=e.viewportOuterSize.height-e.minimumSize.height>0;return!(0===t&&!o)}));function Xo(e){return l.memo(e,bo)}const Qo={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search\u2026",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>
831!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:e=>{let{from:t,to:o,count:n,estimated:r}=e;if(!r)return`${t}\u2013${o} of ${-1!==n?n:`more than ${o}`}`;return`${t}\u2013${o} of ${-1!==n?n:r&&r>o?`around ${r}`:`more than ${o}`}`},paginationItemAriaLabel:e=>"first"===e?"Go to first page":"last"===e?"Go to last page":"next"===e?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search f
83ields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt\u2026",promptFieldPlaceholderWithRecording:"Type or record a prompt\u2026",promptFieldPlaceholderListening:"Listening for prompt\u2026",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing\u2026",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>
83`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,o)=>"is any of"===t?`${e} is any of: ${o}`:`${e} ${t} ${o}`,promptChangeFilterDescription:(e,t,o)=>"is any of"===t?`Filter where ${e} is any of: ${o}`:`Filter where ${e} ${t} ${o}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:""}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`};function Yo(e){return(0,r.A)("MuiDataGrid",e)}const Jo=(0,r.z)("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLo
83adingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"]);let Zo=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}({});class en{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,o){this.timeouts||(this.timeouts=new Map);const n=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(o.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(o.cleanupToken,n)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach(((e,t)=>{this.unregister({cleanupToken:t})})),this.timeouts=void 0)}}class tn{constructor(){this.registry=new FinalizationRegistry((e=>{"function"==typeof e&&e()}))}register(e,t,o){this.registry.register(e,t,o)}unregister(e){this.registry.unregister(e)}reset(){}}class on{static create(){return new on}}const nn={current:typeof FinalizationRegistry<"u"?new tn:new en};let rn=0;function ln(e,t,o,n){const r=l.useState(on.create)[0],i=l.useRef(null),a=l.useRef(null);a.current=o;const s=l.useRef(null);if(!i.current&&a.current){const o=(e,t,o)=>{var n;t.defaultMuiPrevented||null==(n=a.current)||n.call(a,e,t,o)};i.current=e.current.subscribeEvent(t,o,n),rn+=1,s.current={cleanupToken:rn},nn.current.register(r,(()=>{var e;null==(e=i.current)||e.call(i),i.current=null,s.current=null}),s.current)}else!a.current&&i.current&&(i.current(),i.current=null,s.current&&(nn.current.unregister(s.current),s.current=null));l.useEffect((()=>{if(!i.current&&a.current){const o=(e,t,o)=>{var n;t.defaultMuiPrevented||null==(n=a.current)||n.call(a,e,t,o)};i.current=e.current.subscribeEvent(t,o,n)}return s.current&&nn.current&&(nn.current.unregister(s.current),s.current=null),()=>{var e;null==(e=i.current)||e.call(i),i.current=null}}),[e,t,n])}const an={isFirst:!0};function sn(e,t,o){ln(e,t,o,an)}const cn={compact:.7,comfortable:1.3,standard:1},un=Ho((e=>e.density)),dn=Do(un,(e=>cn[e]));function pn(e){throw new Error("Failed assertion: should not be rendered")}const fn=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],gn=(0,r.H)(pn,{name:"MuiDataGrid",slot:"EditInputCell"})({font:tt.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),mn=ge(((e,t)=>{const o=qe(),{id:n,value:i,field:s,colDef:c,hasFocus:u,debounceMs:d=200,isProcessingProps:p,onValueChange:f,slotProps:g}=e,m=(0,r.cH)(e,fn),h=Ae(),b=l.useRef(null),[v,w]=l.useState(i),C=(e=>{const{classes:t}=e;return(0,r.I)({root:["editInputCell"]},Yo,t)})(o),y=l.useCallback((async e=>{const t=e.target.value,o=h.current.getColumn(s);let r=t;o.valueParser&&(r=o.valueParser(t,h.current.getRow(n),o,h)),w(r),h.current.setEditCellValue({id:n,field:s,value:r,debounceMs:d,unstable_skipValueParser:!0},e),f&&await f(e,t)}),[h,d,s,n,f]),x=h.current.unstable_getEditCellMeta(n,s);return l.useEffect((()=>{"debouncedSetEditCellValue"!==(null==x?void 0:x.changeReason)&&w(i)}),[x,i]),(0,r.bd)((()=>{u&&b.current.focus()}),[u]),(0,a.jsx)(gn,(0,r.cG)({as:o.slots.baseInput,inputRef:b,className:C.root,ownerState:o,fullWidth:!0,type:"number"===c.type?c.type:"text",value:v??"",onChange:y,endAdornment:p?(0,a.jsx)(o.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},m,null==g?void 0:g.root,{ref:t}))}));"production"!==n.p.env.NODE_ENV&&(mn.propTypes={api:i.object.isRequired,cellMode:i.oneOf(["edit","view"]).isRequired,changeReason:i.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:i.object.isRequired,debounceMs:i.number,field:i.string.isRequired,formattedValue:i.any,hasFocus:i.bool.isRequired,id:i.oneOfType([i.number,i.string]).isRequired,isEditable:i.bool,isProcessingProps:i.bool,isValidating:i.bool,onValueChange:i.func,row:i.any.isRequired,rowNode:i.object.isRequired,slotProps:i.object,tabIndex:i.oneOf([-1,0]).isRequired,value:i.any});const hn=Ho((e=>e.rows)),bn=Do(hn,(e=>e.totalRowCount)),vn=Do(hn,(e=>e.loading)),wn=Do(hn,(e=>e.totalTopLevelRowCount)),Cn=Do(hn,(e=>
83e.dataRowIdToModelLookup));Do(Cn,((e,t)=>e[t]));const yn=Do(hn,(e=>e.tree)),xn=Do(yn,((e,t)=>e[t])),Rn=Do(hn,(e=>e.groupsToFetch)),Sn=Do(hn,(e=>e.groupingName)),In=Do(hn,(e=>e.treeDepths)),Mn=jo(hn,(e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:(t.filter((e=>{let[,t]=e;return t>0})).map((e=>{let[t]=e;return Number(t)})).sort(((e,t)=>t-e))[0]??0)+1})),Pn=Do(hn,(e=>e.dataRowIds)),kn=jo(Pn,Cn,((e,t)=>e.reduce(((e,o)=>(t[o]&&e.push(t[o]),e)),[]))),En=jo(Do(hn,(e=>null==e?void 0:e.additionalRowGroups)),(e=>{var t,o;const n=null==e?void 0:e.pinnedRows;return{bottom:(null==(t=null==n?void 0:n.bottom)?void 0:t.map((e=>({id:e.id,model:e.model??{}}))))??[],top:(null==(o=null==n?void 0:n.top)?void 0:o.map((e=>({id:e.id,model:e.model??{}}))))??[]}})),On=Do(En,(e=>{var t,o;return((null==(t=null==e?void 0:e.top)?void 0:t.length)||0)+((null==(o=null==e?void 0:e.bottom)?void 0:o.length)||0)})),Tn=(e,t)=>t&&e.length>1?("production"!==n.p.env.NODE_ENV&&wo(["MUI X: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the Data Grid, this prop is always `true`."],"error"),[e[0]]):e,Fn=(e,t)=>o=>(0,r.cG)({},o,{sorting:(0,r.cG)({},o.sorting,{sortModel:Tn(e,t)})}),Gn=(e,t)=>{const o=e.map((e=>((e,t)=>{const o=t.current.getColumn(e.field);if(!o||null===e.sort)return null;let n;return n=o.getSortComparator?o.getSortComparator(e.sort):(e=>"desc"===e)(e.sort)?function(){return-1*o.sortComparator(...arguments)}:o.sortComparator,n?{getSortCellParams:e=>({id:e,field:o.field,rowNode:xn(t,e),value:t.current.getCellValue(e,o.field),api:t.current}),comparator:n}:null})(e,t))).filter((e=>!!e));return 0===o.length?null:e=>e.map((e=>({node:e,params:o.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>((e,t,o)=>e.reduce(((e,n,r)=>{if(0!==e)return e;const l=t.params[r],i=o.params[r];return n.comparator(l.value,i.value,l,i)}),0))(o,e,t))).map((e=>e.node.id))},Dn=(e,t)=>{const o=e.indexOf(t);return t&&-1!==o&&o+1!==e.length?e[o+1]:e[0]},Hn=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,jn=new Intl.Collator,Nn=(e,t)=>{const o=Hn(e,t);return null!==o?o:Number(e)-Number(t)},$n=(e,t)=>{const o=Hn(e,t);return null!==o?o:e>t?1:e<t?-1:0},Ln=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function Vn(e){var t,o,n;const{item:i,applyValue:s,type:c,apiRef:u,focusElementRef:d,tabIndex:p,disabled:f,slotProps:g,clearButton:m,headerFilterMenu:h}=e,b=(0,r.cH)(e,Ln),v=null==g?void 0:g.root,w=(0,r.aM)(),[C,y]=l.useState(zn(i.value)),[x,R]=l.useState(!1),S=(0,r.aI)(),I=qe(),M=l.useCallback((e=>{const t=zn(e.target.value);y(t),R(!0),w.start(I.filterDebounceMs,(()=>{const e=(0,r.cG)({},i,{value:"number"!==c||Number.isNaN(Number(t))?t:Number(t),fromInput:S});s(e),R(!1)}))}),[w,I.filterDebounceMs,i,c,S,s]);return l.useEffect((()=>{(i.fromInput!==S||null==i.value)&&y(zn(i.value))}),[S,i]),(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(I.slots.baseTextField,(0,r.cG)({id:S,label:u.current.getLocaleText("filterPanelInputLabel"),placeholder:u.current.getLocaleText("filterPanelInputPlaceholder"),value:C??"",onChange:M,type:c||"text",disabled:f,slotProps:(0,r.cG)({},null==v?void 0:v.slotProps,{input:(0,r.cG)({endAdornment:x?(0,a.jsx)(I.slots.loadIcon,{fontSize:"small",color:"action"}):null},null==(t=null==v?void 0:v.slotProps)?void 0:t.input),htmlInput:(0,r.cG)({tabIndex:p},null==(o=null==v?void 0:v.slotProps)?void 0:o.htmlInput)}),inputRef:d},null==(n=I.slotProps)?void 0:n.baseTextField,b,v)),h,m]})}function zn(e){if(null!=e&&""!==e)return String(e)}function An(e){return"number"==typeof e&&!Number.isNaN(e)}function Bn(e){return"object"==typeof e&&null!==e}function qn(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}"production"!==n.p.env.NODE_ENV&&(Vn.propTypes={apiRef:i.shape({current:i.object.isRequired}).isRequired,applyValue:i.func.isRequired,className:i.string,clearButton:i.node,disabled:i.bool,focusElementRef:i.oneOfType([i.func,i.object]),headerFilterMenu:i.node,inputRef:i.oneOfType([i.func,i.shape({current:(e,t)=>
83null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:i.bool,item:i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any}).isRequired,onBlur:i.func,onFocus:i.func,slotProps:i.object,tabIndex:i.number,type:i.oneOf(["date","datetime-local","number","text"])});const Wn=(e,t,o)=>Math.max(t,Math.min(o,e));function _n(e,t){return Array.from({length:t-e}).map(((t,o)=>e+o))}function Un(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}const Kn=(e,t)=>o=>{e&&t(o)};function Xn(e){const{item:t,applyValue:o,type:n,apiRef:i,focusElementRef:s,slotProps:c}=e,u=(0,r.aI)(),[d,p]=l.useState([]),[f,g]=l.useState(t.value||[]),m=qe();l.useEffect((()=>{const e=t.value??[];g(e.map(String))}),[t.value]);const h=l.useCallback(((e,l)=>{g(l.map(String)),o((0,r.cG)({},t,{value:[...l.map((e=>"number"===n?Number(e):e))]}))}),[o,t,n]),b=l.useCallback(((e,t)=>{p(""===t?[]:[t])}),[p]),v=m.slots.baseAutocomplete;return(0,a.jsx)(v,(0,r.cG)({multiple:!0,freeSolo:!0,options:d,id:u,value:f,onChange:h,onInputChange:b,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:s}}},null==c?void 0:c.root))}"production"!==n.p.env.NODE_ENV&&(Xn.propTypes={apiRef:i.shape({current:i.object.isRequired}).isRequired,applyValue:i.func.isRequired,className:i.string,clearButton:i.node,disabled:i.bool,focusElementRef:i.oneOfType([i.func,i.object]),headerFilterMenu:i.node,inputRef:i.oneOfType([i.func,i.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:i.bool,item:i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any}).isRequired,onBlur:i.func,onFocus:i.func,slotProps:i.object,tabIndex:i.number,type:i.oneOf(["date","datetime-local","number","text"])});var Qn=function(e){return e.Cell="cell",e.Row="row",e}(Qn||{}),Yn=function(e){return e.Edit="edit",e.View="view",e}(Yn||{}),Jn=function(e){return e.Edit="edit",e.View="view",e}(Jn||{}),Zn=function(e){return e.And="and",e.Or="or",e}(Zn||{});class er{constructor(e){this.data=void 0,this.data=e.ids}has(e){return this.data.has(e)}select(e){this.data.add(e)}unselect(e){this.data.delete(e)}}class tr{constructor(e){this.data=void 0,this.data=e.ids}has(e){return!this.data.has(e)}select(e){this.data.delete(e)}unselect(e){this.data.add(e)}}const or=e=>"include"===e.type?new er(e):new tr(e);var nr=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(nr||{}),rr=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(rr||{}),lr=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(lr||{}),ir=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(ir||{});function ar(e){return void 0!==e.field}const sr={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},cr=()=>({items:[],logicOperator:Zn.And,quickFilterValues:[],quickFilterLogicOperator:Zn.And});function ur(e){return{current:e.current.getPublicApi()}}let dr=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const pr={left:[],right:[]},fr=Ho((e=>e.isRtl)),gr=Ho((e=>e.columns)),mr=Do(gr,(e=>e.orderedFields)),hr=Do(gr,(e=>e.lookup)),br=jo(mr,hr,((e,t)=>e.map((e=>t[e])))),vr=Do(gr,(e=>e.columnVisibilityModel)),wr=Do(gr,(e=>e.initialColumnVisibilityModel)),Cr=jo(br,vr,((e,t)=>e.filter((e=>!1!==t[e.field])))),yr=jo(Cr,(e=>e.map((e=>e.field)))),xr=Ho((e=>e.pinnedColumns)),Rr=jo(gr,xr,yr,fr,((e,t,o,n)=>{const r=function(e,t,o){var n,r;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||0===(null==(n=e.left)?void 0:n.length)&&0===(null==(r=e.right)?void 0:r.length))return pr;const l=(e,t)=>
83Array.isArray(e)?e.filter((e=>t.includes(e))):[],i=l(e.left,t),a=t.filter((e=>!i.includes(e))),s=l(e.right,a);return o?{left:s,right:i}:{left:i,right:s}}(t,o,n);return{left:r.left.map((t=>e.lookup[t])),right:r.right.map((t=>e.lookup[t]))}}));const Sr=jo(Cr,(e=>{const t=[];let o=0;for(let n=0;n<e.length;n+=1)t.push(o),o+=e[n].computedWidth;return t})),Ir=jo(br,(e=>e.filter((e=>e.filterable)))),Mr=jo(br,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{}))),Pr=jo(br,(e=>e.some((e=>void 0!==e.colSpan))));let kr;const Er=(e,t)=>{const o=(0,r.cG)({},e);if(null==o.id&&(o.id=Math.round(1e5*Math.random())),null==o.operator){const e=hr(t)[o.field];o.operator=e&&e.filterOperators[0].value}return o},Or=(e,t,o)=>{const l=e.items.length>1;let i;l&&t?("production"!==n.p.env.NODE_ENV&&wo(["MUI X: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the Data Grid, this prop is always `true`."],"error"),i=[e.items[0]]):i=e.items;const a=l&&i.some((e=>null==e.id)),s=i.some((e=>null==e.operator));return"production"!==n.p.env.NODE_ENV&&a&&wo("MUI X: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),"production"!==n.p.env.NODE_ENV&&s&&wo("MUI X: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),s||a?(0,r.cG)({},e,{items:i.map((e=>Er(e,o)))}):e.items!==i?(0,r.cG)({},e,{items:i}):e},Tr=(e,t,o)=>n=>(0,r.cG)({},n,{filterModel:Or(e,t,o)}),Fr=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,Gr=(e,t)=>{var o;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let l;if(n.valueParser){const r=n.valueParser;l=Array.isArray(e.value)?null==(o=e.value)?void 0:o.map((e=>r(e,void 0,n,t))):r(e.value,void 0,n,t)}else l=e.value;const{ignoreDiacritics:i}=t.current.rootProps;i&&(l=Fr(l));const a=(0,r.cG)({},e,{value:l}),s=n.filterOperators;if(null==s||!s.length)throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const c=s.find((e=>e.value===a.operator));if(!c)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${a.operator}'.`);const u=ur(t),d=c.getApplyFilterFn(a,n);return"function"!=typeof d?null:{item:a,fn:e=>{let o=t.current.getRowValue(e,n);return i&&(o=Fr(o)),d(o,e,n,u)}}};let Dr=1;const Hr=(e,t,o)=>{const{items:n}=e,r=n.map((e=>Gr(e,t))).filter((e=>!!e));if(0===r.length)return null;if(o||!function(){if(void 0!==kr)return kr;try{kr=new Function("return true")()}catch{kr=!1}return kr}())return(e,t)=>{const o={};for(let n=0;n<r.length;n+=1){const l=r[n];(!t||t(l.item.field))&&(o[l.item.id]=l.fn(e))}return o};const l=new Function("appliers","row","shouldApplyFilter",`"use strict";\n${r.map(((e,t)=>`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`)).join("\n")}\n\nconst result$$ = {\n${r.map(((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`)).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(Dr)));return Dr+=1,(e,t)=>l(r,e,t)},jr=e=>e.quickFilterExcludeHiddenColumns??!0,Nr=(e,t,o)=>{const n=Hr(e,t,o),r=((e,t)=>{var o;const n=(null==(o=e.quickFilterValues)?void 0:o.filter(Boolean))??[];if(0===n.length)return null;const r=jr(e)?yr(t):mr(t),l=[],{ignoreDiacritics:i}=t.current.rootProps,a=ur(t);return r.forEach((e=>{const o=t.current.getColumn(e),r=null==o?void 0:o.getApplyQuickFilterFn;r&&l.push({column:o,appliers:n.map((e=>{const t=i?Fr(e):e;return{fn:r(t,o,a)}}))})})),function(e,o){const r={};e:for(let s=0;s<n.length;s+=1){const c=n[s];for(let n=0;n<l.length;n+=1){const{column:u,appliers:d}=l[n],{field:p}=u;if(o&&!o(p))continue;const f=d[s];let g=t.current.getRowValue(e,u);if(null!==f.fn&&(i&&(g=Fr(g)),f.fn(g,e,u,a))){r[c]=!0;continue e}}r[c]=!1}return r}})(e,t);return function(e,t,o){o.passingFilterItems=(null==n?void 0:n(e,t))??null,o.passingQuickFilterValues=(null==r?void 0:r(e,t))??null}},$r=e=>null!=e,Lr=(e,t,o,n,r)=>
83{const l=((e,t,o)=>(e.cleanedFilterItems||(e.cleanedFilterItems=o.filter((e=>null!==Gr(e,t)))),e.cleanedFilterItems))(r,n,o.items),i=e.filter($r),a=t.filter($r);if(i.length>0){const e=e=>i.some((t=>t[e.id]));if((o.logicOperator??cr().logicOperator)===Zn.And){if(!l.every(e))return!1}else if(!l.some(e))return!1}if(a.length>0&&null!=o.quickFilterValues){const e=e=>a.some((t=>t[e]));if((o.quickFilterLogicOperator??cr().quickFilterLogicOperator)===Zn.And){if(!o.quickFilterValues.every(e))return!1}else if(!o.quickFilterValues.some(e))return!1}return!0},Vr=(e,t)=>o=>{if(!o.value)return null;const n=e?o.value:o.value.trim(),r=new RegExp(qn(n),"i");return e=>{if(null==e)return t;const o=r.test(String(e));return t?!o:o}},zr=(e,t)=>o=>{if(!o.value)return null;const n=e?o.value:o.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>{if(null==e)return t;const o=0===r.compare(n,e.toString());return t?!o:o}},Ar=e=>()=>t=>{const o=""===t||null==t;return e?!o:o},Br={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const o=Hn(e,t);return null!==o?o:"string"==typeof e?jn.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[{value:"contains",getApplyFilterFn:Vr(e,!1),InputComponent:Vn},{value:"doesNotContain",getApplyFilterFn:Vr(e,!0),InputComponent:Vn},{value:"equals",getApplyFilterFn:zr(e,!1),InputComponent:Vn},{value:"doesNotEqual",getApplyFilterFn:zr(e,!0),InputComponent:Vn},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const o=e?t.value:t.value.trim(),n=new RegExp(`^${qn(o)}.*$`,"i");return e=>null!=e&&n.test(e.toString())},InputComponent:Vn},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const o=e?t.value:t.value.trim(),n=new RegExp(`.*${qn(o)}$`,"i");return e=>null!=e&&n.test(e.toString())},InputComponent:Vn},{value:"isEmpty",getApplyFilterFn:Ar(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:Ar(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const o=e?t.value:t.value.map((e=>e.trim())),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&o.some((t=>0===n.compare(t,e.toString()||"")))},InputComponent:Xn}]}(),renderEditCell:e=>(0,a.jsx)(mn,(0,r.cG)({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(qn(e),"i");return(e,o,n,r)=>{let l=r.current.getRowFormattedValue(o,n);return r.current.ignoreDiacritics&&(l=Fr(l)),null!=l&&t.test(l.toString())}}},qr=l.createContext(void 0);"production"!==n.p.env.NODE_ENV&&(qr.displayName="GridConfigurationContext");const Wr=()=>{const e=l.useContext(qr);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e},_r="MuiDataGridVariables",Ur=l.createContext({className:"unset",tag:(0,a.jsx)("style",{href:"/unset"})});function Kr(){return l.useContext(Ur).className}function Xr(e){const t=Wr(),o=qe(),n=t.hooks.useCSSVariables(),r=l.useMemo((()=>{const e=`${_r}-${n.id}`,t=`.${e}{${function(e){let t="";for(const o in e)Object.hasOwn(e,o)&&(t+=`${o}:${e[o]};`);return t}(n.variables)}}`;return{className:e,tag:(0,a.jsx)("style",{href:`/${e}`,nonce:o.nonce,children:t})}}),[o.nonce,n]);return(0,a.jsx)(Ur.Provider,{value:r,children:e.children})}const Qr=["open","target","onClose","children","position","className","onExited"],Yr=e=>{const{classes:t}=e;return(0,r.I)({root:["menu"]},Yo,t)},Jr=(0,r.H)(pn,{name:"MuiDataGrid",slot:"Menu"})({zIndex:tt.zIndex.menu,[`& .${Jo.menuList}`]:{outline:0}});function Zr(e){var t;const{open:o,target:i,onClose:s,children:c,position:u,className:d,onExited:p}=e,f=(0,r.cH)(e,Qr),g=Ae(),m=qe(),h=Yr(m),b=Kr(),v=l.useRef(null);(0,r.bd)((()=>{var e,t;o?v.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(null==(t=null==(e=v.current)?void 0:e.focus)||t.call(e),v.current=null)}),[o]),l.useEffect((()=>{const e=o?"menuOpen":"menuClose";g.current.publishEvent(e,{target:i})}),[g,o,i]);return(0,a.jsx)(Jr,(0,r.cG)({as:m.slots.basePopper,className:(0,n.c)(h.root,d,b),ownerState:m,open:o,target:i,transition:!0,placement:u,onClickAway:e=>{e.target&&(i===e.target||null!=i&&i.contains(e.target))||s(e)},onExited:p,clickAwayMouseEvent:"onMouseDown"}
83,f,null==(t=m.slotProps)?void 0:t.basePopper,{children:c}))}"production"!==n.p.env.NODE_ENV&&(Zr.propTypes={children:i.node,className:i.string,onClose:i.func.isRequired,onExited:i.func,open:i.bool.isRequired,position:i.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),target:r.d0});const el=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function tl(e){var t;const{colDef:o,id:n,hasFocus:i,tabIndex:s,position:c="bottom-end",focusElementRef:u}=e,d=(0,r.cH)(e,el),[p,f]=l.useState(-1),[g,m]=l.useState(!1),h=Ae(),b=l.useRef(null),v=l.useRef(null),w=l.useRef(!1),C=l.useRef({}),y=(0,r.cN)(),x=(0,r.aI)(),R=(0,r.aI)(),S=qe();if(!(e=>"function"==typeof e.getActions)(o))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const I=o.getActions(h.current.getRowParams(n)),M=I.filter((e=>!e.props.showInMenu)),P=I.filter((e=>e.props.showInMenu)),k=M.length+(P.length?1:0);l.useLayoutEffect((()=>{i||Object.entries(C.current).forEach((e=>{let[t,o]=e;null==o||o.stop({},(()=>{delete C.current[t]}))}))}),[i]),l.useEffect((()=>{p<0||!b.current||p>=b.current.children.length||b.current.children[p].focus({preventScroll:!0})}),[p]),l.useEffect((()=>{i||(f(-1),w.current=!1)}),[i]),l.useImperativeHandle(u,(()=>({focus(){if(!w.current){const e=I.findIndex((e=>!e.props.disabled));f(e)}}})),[I]),l.useEffect((()=>{p>=k&&f(k-1)}),[p,k]);const E=()=>{m(!1)},O=e=>t=>{C.current[e]=t},T=(e,t)=>o=>{f(e),w.current=!0,t&&t(o)};return(0,a.jsxs)("div",(0,r.cG)({role:"menu",ref:b,tabIndex:-1,className:Jo.actionsCell,onKeyDown:e=>{if(k<=1)return;const t=(e,o)=>{var n;if(e<0||e>I.length)return e;const r=("left"===o?-1:1)*(y?-1:1);return null!=(n=I[e+r])&&n.props.disabled?t(e+r,o):e+r};let o=p;"ArrowRight"===e.key?o=t(p,"right"):"ArrowLeft"===e.key&&(o=t(p,"left")),!(o<0||o>=k)&&o!==p&&(e.preventDefault(),e.stopPropagation(),f(o))}},d,{children:[M.map(((e,t)=>l.cloneElement(e,{key:t,touchRippleRef:O(t),onClick:T(t,e.props.onClick),tabIndex:p===t?s:-1}))),P.length>0&&R&&(0,a.jsx)(S.slots.baseIconButton,(0,r.cG)({ref:v,id:R,"aria-label":h.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?x:void 0,role:"menuitem",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),g?E():(m(!0),f(k-1),w.current=!0)},touchRippleRef:O(R),tabIndex:p===M.length?s:-1},null==(t=S.slotProps)?void 0:t.baseIconButton,{children:(0,a.jsx)(S.slots.moreActionsIcon,{fontSize:"small"})})),P.length>0&&(0,a.jsx)(Zr,{open:g,target:v.current,position:c,onClose:E,children:(0,a.jsx)(S.slots.baseMenuList,{id:x,className:Jo.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Escape"].includes(e.key)&&E()},"aria-labelledby":R,autoFocusItem:!0,children:P.map(((e,t)=>l.cloneElement(e,{key:t,closeMenu:E}
83)))})})]}))}"production"!==n.p.env.NODE_ENV&&(tl.propTypes={api:i.object,cellMode:i.oneOf(["edit","view"]).isRequired,colDef:i.object.isRequired,field:i.string.isRequired,focusElementRef:i.oneOfType([i.func,i.shape({current:i.shape({focus:i.func.isRequired})})]),formattedValue:i.any,hasFocus:i.bool.isRequired,id:i.oneOfType([i.number,i.string]).isRequired,isEditable:i.bool,position:i.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),row:i.any.isRequired,rowNode:i.object.isRequired,tabIndex:i.oneOf([-1,0]).isRequired,value:i.any});const ol="actions",nl=(0,r.cG)({},Br,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,a.jsx)(tl,(0,r.cG)({},e)),getApplyQuickFilterFn:()=>null}),rl="auto-generated-group-node-root",ll=Symbol("mui.id_autogenerated");const il=(e,t,o)=>{const n=t?t(e):e.id;return function(e,t){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",arguments.length>2&&void 0!==arguments[2]?arguments[2]:"A row was provided without id in the rows prop:",JSON.stringify(t)].join("\n"))}(n,e,o),n},al=e=>{let{rows:t,getRowId:o,loading:n,rowCount:r}=e;const l={type:"full",rows:[]},i={};for(let a=0;a<t.length;a+=1){const e=t[a],n=il(e,o);i[n]=e,l.rows.push(n)}return{rowsBeforePartialUpdates:t,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,updates:l,dataRowIdToModelLo
83okup:i}},sl=e=>{let{tree:t,rowCountProp:o=0}=e;const n=t[rl];return Math.max(o,n.children.length+(null==n.footerId?0:1))},cl=e=>{let{apiRef:t,rowCountProp:o=0,loadingProp:n,previousTree:l,previousTreeDepths:i,previousGroupsToFetch:a}=e;const s=t.current.caches.rows,{tree:c,treeDepths:u,dataRowIds:d,groupingName:p,groupsToFetch:f=[]}=t.current.applyStrategyProcessor("rowTreeCreation",{previousTree:l,previousTreeDepths:i,updates:s.updates,dataRowIdToModelLookup:s.dataRowIdToModelLookup,previousGroupsToFetch:a}),g=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:c,treeDepths:u,dataRowIds:d,dataRowIdToModelLookup:s.dataRowIdToModelLookup});return t.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,r.cG)({},g,{totalRowCount:Math.max(o,g.dataRowIds.length),totalTopLevelRowCount:sl({tree:g.tree,rowCountProp:o}),groupingName:p,loading:n,groupsToFetch:f})},ul=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,dl=(e,t,o)=>{const n=e[t];if("group"!==n.type)return[];const r=[];for(let l=0;l<n.children.length;l+=1){const t=n.children[l];(!o||!ul(e[t]))&&r.push(t);const i=dl(e,t,o);for(let e=0;e<i.length;e+=1)r.push(i[e])}return!o&&null!=n.footerId&&r.push(n.footerId),r},pl=e=>{let{previousCache:t,getRowId:o,updates:n,groupKeys:l}=e;if("full"===t.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const i=new Map;n.forEach((e=>{const t=il(e,o,"A row was provided without id when calling updateRows():");i.has(t)?i.set(t,(0,r.cG)({},i.get(t),e)):i.set(t,e)}));const a={type:"partial",actions:{insert:[...t.updates.actions.insert??[]],modify:[...t.updates.actions.modify??[]],remove:[...t.updates.actions.remove??[]]},idToActionLookup:(0,r.cG)({},t.updates.idToActionLookup),groupKeys:l},s=(0,r.cG)({}
83,t.dataRowIdToModelLookup),c={insert:{},modify:{},remove:{}};i.forEach(((e,t)=>{const o=a.idToActionLookup[t];if("delete"===e._action){if("remove"===o||!s[t])return;return null!=o&&(c[o][t]=!0),a.actions.remove.push(t),void delete s[t]}const n=s[t];if(n)return"remove"===o?(c.remove[t]=!0,a.actions.modify.push(t)):null==o&&a.actions.modify.push(t),void(s[t]=(0,r.cG)({},n,e));"remove"===o?(c.remove[t]=!0,a.actions.insert.push(t)):null==o&&a.actions.insert.push(t),s[t]=e}));const u=Object.keys(c);for(let r=0;r<u.length;r+=1){const e=u[r],t=c[e];Object.keys(t).length>0&&(a.actions[e]=a.actions[e].filter((e=>!t[e])))}return{dataRowIdToModelLookup:s,updates:a,rowsBeforePartialUpdates:t.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:t.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:t.rowCountPropBeforePartialUpdates}},fl="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function gl(e,t,o){const n=[];return t.forEach((t=>{const l=il(t,o,"A row was provided without id when calling updateRows():"),i=xn(e,l);if("pinnedRow"===(null==i?void 0:i.type)){const o=e.current.caches.pinnedRows,n=o.idLookup[l];n&&(o.idLookup[l]=(0,r.cG)({},n,t))}else n.push(t)})),n}let ml=!1;const hl=(e,t,o)=>"number"==typeof e&&e>0?e:("production"!==n.p.env.NODE_ENV&&!ml&&typeof e<"u"&&null!==e&&(console.warn(o),ml=!0),t),bl=["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),vl=["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),wl="__row_group_by_columns_group__",Cl="__detail_panel_toggle__";let yl=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const xl=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"];function Rl(e){const{value:t,rowNode:o}=e,n=(0,r.cH)(e,xl),i=Ae(),s=qe(),c=(e=>{const{classes:t}=e;return(0,r.I)({root:["booleanCell"]},Yo,t)})({classes:s.classes}),u=Po(i,Mn)>0&&"group"===o.type&&!1===s.treeData,d=l.useMemo((()=>t?s.slots.booleanCellTrueIcon:s.slots.booleanCellFalseIcon),[s.slots.booleanCellFalseIcon,s.slots.booleanCellTrueIcon,t]);return u&&void 0===t?null:(0,a.jsx)(d,(0,r.cG)({fontSize:"small",className:c.root,titleAccess:i.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},n))}"production"!==n.p.env.NODE_ENV&&(Rl.propTypes={api:i.object.isRequired,cellMode:i.oneOf(["edit","view"]).isRequired,colDef:i.object.isRequired,field:i.string.isRequired,focusElementRef:i.oneOfType([i.func,i.shape({current:i.shape({focus:i.func.isRequired})})]),formattedValue:i.any,hasFocus:i.bool.isRequired,hideDescendantCount:i.bool,id:i.oneOfType([i.number,i.string]).isRequired,isEditable:i.bool,row:i.any.isRequired,rowNode:i.object.isRequired,tabIndex:i.oneOf([-1,0]).isRequired,value:i.any});const Sl=l.memo(Rl),Il=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function Ml(e){var t;const{id:o,value:i,field:s,className:c,hasFocus:u,onValueChange:d}=e,p=(0,r.cH)(e,Il),f=Ae(),g=l.useRef(null),m=(0,r.aI)(),[h,b]=l.useState(i),v=qe(),w=(e=>{const{classes:t}=e;return(0,r.I)({root:["editBooleanCell"]},Yo,t)})({classes:v.classes}),C=l.useCallback((async e=>{const t=e.target.checked;d&&await d(e,t),b(t),await f.current.setEditCellValue({id:o,field:s,value:t},e)}),[f,s,o,d]);return l.useEffect((()=>{b(i)}),[i]),(0,r.bd)((()=>{u&&g.current.focus()}),[u]),(0,a.jsx)("label",(0,r.cG)({htmlFor:m,className:(0,n.c)(w.root,c)},p,{children:(0,a.jsx)(v.slots.baseCheckbox,(0,r.cG)({id:m,inputRef:g,checked:!!h,onChange:C,size:"small"},null==(t=v.slotProps)?void 0:t.baseCheckbox))}))}"production"!==n.p.env.NODE_ENV&&(Ml.propTypes={api:i.object.isRequired,cellMode:i.oneOf(["edit","view"]).isRequired,changeReason:i.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:i.object.isRequired,field:i.string.isRequired,formattedValue:i.any,hasFocus:i.bool.isRequired,id:i.oneOfType([i.number,i.string]).isRequired,isEditable:i.bool,isProcessingProps:i.bool,isValidating:i.bool,onValueChange:i.func,row:i.any.isRequired,rowNode:i.object.isRequired,tabIndex:i.oneOf([-1,0]).isRequired,value:i.any});const Pl=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function kl(e){var t,o;const{item:n,applyValue:i,apiRef:s,focusElementRef:c,headerFilterMenu:u,clearButton:d,tabIndex:p,slotProps:f}=e,g=(0,r.cH)(e,Pl),[m,h]=l.useState(El(n.value)),b=qe(),v=(0,r.aI)(),w=(0,r.aI)(),C=(null==(t=b.slotProps)?void 0:t.baseSelect)||{},y=C.native??!1,x=(null==(o=b.slotProps)?void 0:o.baseSelectOption)||{},R=l.useCallback((e=>{const t=El(e.target.value);h(t),i((0,r.cG)({},n,{value:t}))}),[i,n]);l.useEffect((()=>{h(El(n.value))}),[n.value]);const S=(null==f?void 0:f.root.label)??s.current.getLocaleText("filterPanelInputLabel"),I=null==f?void 0:f.root.slotProps;return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsxs)(b.slots.baseSelect,(0,r.cG)({fullWidth:!0,labelId:v,id:w,label:S,value:void 0===m?"":String(m),onChange:R,native:y,slotProps:{htmlInput:(0,r.cG)({ref:c,tabIndex:p},null==I?void 0:I.htmlInput)}},C,g,null==f?void 0:f.root,{children:[(0,a.jsx)(b.slots.baseSelectOption,(0,r.cG)({},x,{native:y,value:"",children:s.current.getLocaleText("filterValueAny")})),(0,a.jsx)(b.slots.baseSelectOption,(0,r.cG)({},x,{native:y,value:"true",children:s.current.getLocaleText("filterValueTrue")})),(0,a.jsx)(b.slots.baseSelectOption,(0,r.cG)({},x,{native:y,value:"false",children:s.current.getLocaleText("filterValueFalse")}))]})),u,d]})}function El(e){return"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0}"production"!==n.p.env.NODE_ENV&&(kl.propTypes={apiRef:i.shape({current:i.object.isRequired}).isRequired,applyValue:i.func.isRequired,className:i.string,clearButton:i.node,disabled:i.bool,focusElementRef:r.ba,headerFilterMenu:i.node,inputRef:i.oneOfType([i.func,i.shape({current:(e,t)=>
83null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:i.bool,item:i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any}).isRequired,onBlur:i.func,onFocus:i.func,slotProps:i.object,tabIndex:i.number});const Ol=(0,r.cG)({},Br,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:e=>e.field!==wl&&ul(e.rowNode)?"":(0,a.jsx)(Sl,(0,r.cG)({},e)),renderEditCell:e=>(0,a.jsx)(Ml,(0,r.cG)({},e)),sortComparator:Nn,valueFormatter:(e,t,o,n)=>e?n.current.getLocaleText("booleanCellTrueLabel"):n.current.getLocaleText("booleanCellFalseLabel"),filterOperators:[{value:"is",getApplyFilterFn:e=>{const t=El(e.value);return void 0===t?null:e=>!!e===t},InputComponent:kl}],getApplyQuickFilterFn:()=>null,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)});function Tl(e){for(const t in e)return!1;return!0}const Fl=Ho((e=>e.sorting)),Gl=Do(Fl,(e=>e.sortedRows)),Dl=jo(Gl,Cn,yn,((e,t,o)=>e.reduce(((e,n)=>{const r=t[n];if(r)e.push({id:n,model:r});else{const t=o[n];t&&ul(t)&&e.push({id:n,model:{[ll]:n}})}return e}),[]))),Hl=Do(Fl,(e=>e.sortModel)),jl=jo(Hl,(e=>e.reduce(((t,o,n)=>(t[o.field]={sortDirection:o.sort,sortIndex:e.length>1?n+1:void 0},t)),{})));jo(Gl,(e=>e.reduce(((e,t,o)=>(e[t]=o,e)),Object.create(null))));const Nl=Ho((e=>e.filter)),$l=Do(Nl,(e=>e.filterModel)),Ll=Do($l,(e=>e.quickFilterValues)),Vl=Ho((e=>e.visibleRowsLookup)),zl=Do(Nl,(e=>e.filteredRowsLookup));Do(Nl,(e=>e.filteredChildrenCountLookup)),Do(Nl,(e=>e.filteredDescendantCountLookup));const Al=jo(Vl,Dl,((e,t)=>Tl(e)?t:t.filter((t=>!1!==e[t.id])))),Bl=jo(Al,(e=>e.map((e=>e.id)))),ql=jo(zl,Dl,((e,t)=>Tl(e)?t:t.filter((t=>!1!==e[t.id])))),Wl=jo(ql,(e=>e.map((e=>e.id))));jo(Bl,yn,((e,t)=>{const o={};let n=0;return e.reduce(((e,r)=>{const l=t[r];return o[l.depth]||(o[l.depth]=0),l.depth>n&&(o[l.depth]=0),n=l.depth,o[l.depth]+=1,e[r]=o[l.depth],e}),{})}));const _l=jo(Al,yn,Mn,((e,t,o)=>o<2?e:e.filter((e=>{var o;return 0===(null==(o=t[e.id])?void 0:o.depth)})))),Ul=Do(Al,(e=>e.length)),Kl=Do(_l,(e=>e.length)),Xl=Do(ql,(e=>e.length));Do(Xl,Kl,((e,t)=>e-t));const Ql=jo($l,hr,((e,t)=>{var o;return null==(o=e.items)?void 0:o.filter((e=>{var o,n;if(!e.field)return!1;const r=t[e.field];if(null==r||!r.filterOperators||0===(null==(o=null==r?void 0:r.filterOperators)?void 0:o.length))return!1;const l=r.filterOperators.find((t=>t.value===e.operator));return!!l&&(!l.InputComponent||null!=e.value&&""!==(null==(n=e.value)?void 0:n.toString()))}))})),Yl=jo(Ql,(e=>e.reduce(((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e)),{}))),Jl=Ho((e=>e.rowSelection)),Zl=jo(Jl,or),ei=Do(Jl,Xl,((e,t)=>"include"===e.type?e.ids.size:t-e.ids.size)),ti=jo(Jl,Cn,Pn,((e,t,o)=>{const n=new Map;if("include"===e.type)for(const r of e.ids)n.set(r,t[r]);else for(let r=0;r<o.length;r+=1){const l=o[r];e.ids.has(l)||n.set(l,t[l])}return n}));function oi(e,t){var o;const n=yn(e),r=Gl(e),l=zl(e),i=n[t];if(!i||"group"!==i.type)return[];const a=[],s=r.findIndex((e=>e===t))+1;for(let c=s;c<r.length&&(null==(o=n[r[c]])?void 0:o.depth)>i.depth;c+=1){const t=r[c];!1!==l[t]&&e.current.isRowSelectable(t)&&a.push(t)}return a}const ni=Do(yn,zl,Zl,((e,t,o,n)=>{let{groupId:r,autoSelectParents:l}=n;const i=e[r];if(!i||"group"!==i.type||o.has(r))return{isIndeterminate:!1,isChecked:o.has(r)};let a=!1,s=!1;const c=n=>{if(!1===t[n]||a&&s)return;const r=e[n];"group"===(null==r?void 0:r.type)&&r.children.forEach(c),o.has(n)?a=!0:s=!0};return c(r),{isIndeterminate:a&&s,isChecked:!!l&&(a&&!s)}}));function ri(e){return e.signature===Zo.DataGrid?e.checkboxSelection&&!0!==e.disableMultipleRowSelection:!e.disableMultipleRowSelection}const li=function(e,t,o,n,r,l){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Zl(e);const a=zl(e),s=new Set([]);if((n||r)&&!1!==a[o]){if(n){const n=t[o];
83"group"===(null==n?void 0:n.type)&&oi(e,o).forEach((e=>{l(e),s.add(e)}))}if(r){const n=e=>{if(!i.has(e)&&!s.has(e))return!1;const o=t[e];return!!o&&("group"!==o.type||o.children.every(n))},r=o=>{const i=((e,t,o)=>{const n=e[o];if(!n)return[];const r=n.parent;return null==r?[]:e[r].children.filter((e=>e!==o&&!1!==t[e]))})(t,a,o);if(0===i.length||i.every(n)){const n=t[o],i=null==n?void 0:n.parent;null!=i&&i!==rl&&e.current.isRowSelectable(i)&&(l(i),s.add(i),r(i))}};r(o)}}},ii=(e,t,o,n,r,l)=>{const i=Zl(e);if((r||n)&&(r&&((e,t)=>{const o=[];let n=t;for(;null!=n&&n!==rl;){const t=e[n];if(!t)return o;o.push(n),n=t.parent}return o})(t,o).forEach((e=>{i.has(e)&&l(e)})),n)){const n=t[o];"group"===(null==n?void 0:n.type)&&oi(e,o).forEach((e=>{l(e)}))}},ai=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],si=ge((function(e,t){var o,n;const{field:i,id:s,rowNode:c,tabIndex:u}=e,d=(0,r.cH)(e,ai),p=Ae(),f=qe(),g=(e=>{const{classes:t}=e;return(0,r.I)({root:["checkboxInput"]},Yo,t)})({classes:f.classes});l.useLayoutEffect((()=>{if(0===u){const e=p.current.getCellElement(s,i);e&&(e.tabIndex=-1)}}),[p,u,s,i]);const m=l.useCallback((e=>{" "===e.key&&e.stopPropagation()}),[]),h=p.current.isRowSelectable(s),{isIndeterminate:b,isChecked:v}=Po(p,ni,{groupId:s,autoSelectParents:(null==(o=f.rowSelectionPropagation)?void 0:o.parents)??!1});if("footer"===c.type||"pinnedRow"===c.type)return null;const w=p.current.getLocaleText(v&&!b?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,a.jsx)(f.slots.baseCheckbox,(0,r.cG)({tabIndex:u,checked:v&&!b,onChange:e=>{const t={value:e.target.checked,id:s};p.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:g.root,slotProps:{htmlInput:{"aria-label":w,name:"select_row"}},onKeyDown:m,indeterminate:b,disabled:!h},null==(n=f.slotProps)?void 0:n.baseCheckbox,d,{ref:t}))}));"production"!==n.p.env.NODE_ENV&&(si.propTypes={api:i.object.isRequired,cellMode:i.oneOf(["edit","view"]).isRequired,colDef:i.object.isRequired,field:i.string.isRequired,focusElementRef:i.oneOfType([i.func,i.shape({current:i.shape({focus:i.func.isRequired})})]),formattedValue:i.any,hasFocus:i.bool.isRequired,id:i.oneOfType([i.number,i.string]).isRequired,isEditable:i.bool,row:i.any.isRequired,rowNode:i.object.isRequired,tabIndex:i.oneOf([-1,0]).isRequired,value:i.any});const ci=si,ui=Ho((e=>e.focus)),di=Do(ui,(e=>e.cell)),pi=Do(ui,(e=>e.columnHeader));Do(ui,(e=>e.columnHeaderFilter));const fi=Do(ui,(e=>e.columnGroupHeader)),gi=Ho((e=>e.tabIndex)),mi=Do(gi,(e=>e.cell)),hi=Do(gi,(e=>e.columnHeader));Do(gi,(e=>e.columnHeaderFilter));const bi=Do(gi,(e=>e.columnGroupHeader)),vi=(e,t,o)=>t>0&&e>0?Math.ceil(e/t):-1===e?o+2:0,wi=e=>({page:0,pageSize:e?0:100}),Ci=(e,t)=>{if(t===Zo.DataGrid&&e>100)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))},yi=Ho((e=>e.pagination)),xi=Do(yi,(e=>e.enabled&&"client"===e.paginationMode)),Ri=Do(yi,(e=>e.paginationModel)),Si=Do(yi,(e=>e.rowCount)),Ii=Do(yi,(e=>e.meta)),Mi=Do(Ri,(e=>e.page)),Pi=Do(Ri,(e=>e.pageSize)),ki=Do(Ri,Si,((e,t)=>vi(t,e.pageSize,e.page))),Ei=jo(xi,Ri,yn,Mn,Al,_l,((e,t,o,n,r,l)=>{var i;if(!e)return null;const a=l.length,s=Math.min(t.pageSize*t.page,a-1),c=-1===t.pageSize?a-1:Math.min(s+t.pageSize-1,a-1);if(-1===s||-1===c)return null;if(n<2)return{firstRowIndex:s,lastRowIndex:c};const u=l[s],d=c-s+1,p=r.findIndex((e=>e.id===u.id));let f=p,g=0;for(;f<r.length&&g<=d;){const e=null==(i=o[r[f].id])?void 0:i.depth;void 0===e?f+=1:((g<d||e>0)&&(f+=1),0===e&&(g+=1))}return{firstRowIndex:p,lastRowIndex:f-1}})),Oi=jo(Al,Ei,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),Ti=jo(Bl,Ei,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),Fi=jo(xi,Ei,Oi,Al,((e,t,o,n)=>e?{rows:o,range:t,rowIdToIndexMap:o.reduce(((e,t,o)=>(e.set(t.id,o),e)),new Map)}:{rows:n,range:0===n.length?null:{firstRowIndex:0,lastRowIndex:n.length-1},rowIdToIndexMap:n.reduce(((e,t,o)=>(e.set(t.id,o),e)),new Map)})),Gi=["field","colDef"],Di=ge((function(e,t){var o;
83const n=(0,r.cH)(e,Gi),[,i]=l.useState(!1),s=Ae(),c=qe(),u=(e=>{const{classes:t}=e;return(0,r.I)({root:["checkboxInput"]},Yo,t)})({classes:c.classes}),d=Po(s,hi),p=Po(s,Jl),f=Po(s,Bl),g=Po(s,Ti),m=l.useMemo((()=>{const e=c.isRowSelectable;if("function"!=typeof e||"exclude"===p.type)return p;const t={type:"include",ids:new Set};for(const o of p.ids)c.keepNonExistentRowsSelected&&t.ids.add(o),s.current.getRow(o)&&e(s.current.getRowParams(o))&&t.ids.add(o);return t}),[s,c.isRowSelectable,c.keepNonExistentRowsSelected,p]),h=l.useMemo((()=>{const e=c.pagination&&c.checkboxSelectionVisibleOnly&&"server"!==c.paginationMode?g:f,t=new Set;for(let o=0;o<e.length;o+=1){const n=e[o];s.current.getRow(n)&&s.current.isRowSelectable(n)&&t.add(n)}return t}),[s,c.pagination,c.paginationMode,c.checkboxSelectionVisibleOnly,g,f]),b=l.useMemo((()=>{const e=or(m);let t=0;for(const o of h)e.has(o)&&(t+=1);return t}),[m,h]),v=l.useMemo((()=>{if(0===m.ids.size)return!1;const e=or(m);for(const t of h)if(!e.has(t))return!0;return!1}),[m,h]),w=b>0,C=null!==d&&d.field===e.field?0:-1;l.useLayoutEffect((()=>{const t=s.current.getColumnHeaderElement(e.field);0===C&&t&&(t.tabIndex=-1)}),[C,s,e.field]);const y=l.useCallback((e=>{" "===e.key&&s.current.publishEvent("headerSelectionCheckboxChange",{value:!w})}),[s,w]),x=l.useCallback((()=>{i((e=>!e))}),[]);l.useEffect((()=>s.current.subscribeEvent("rowSelectionChange",x)),[s,x]);const R=s.current.getLocaleText(w&&!v?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,a.jsx)(c.slots.baseCheckbox,(0,r.cG)({indeterminate:v,checked:w&&!v,onChange:e=>{const t={value:e.target.checked};s.current.publishEvent("headerSelectionCheckboxChange",t)},className:u.root,slotProps:{htmlInput:{"aria-label":R,name:"select_all_rows"}},tabIndex:C,onKeyDown:y,disabled:!ri(c)},null==(o=c.slotProps)?void 0:o.baseCheckbox,n,{ref:t}))}));"production"!==n.p.env.NODE_ENV&&(Di.propTypes={colDef:i.object.isRequired,field:i.string.isRequired});const Hi=Ho(((e,t)=>ll in t?t[ll]:e.props.getRowId?e.props.getRowId(t):t.id)),ji="__check__",Ni=(0,r.cG)({},Ol,{type:"custom",field:ji,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,o,n)=>{const r=Hi(n,t);return n.current.isRowSelected(r)},renderHeader:e=>(0,a.jsx)(Di,(0,r.cG)({},e)),renderCell:e=>(0,a.jsx)(ci,(0,r.cG)({},e))}),$i=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function Li(e,t){if(null==e)return"";const o=new Date(e);return Number.isNaN(o.getTime())?"":"date"===t?o.toISOString().substring(0,10):"datetime-local"===t?(o.setMinutes(o.getMinutes()-o.getTimezoneOffset()),o.toISOString().substring(0,19)):o.toISOString().substring(0,10)}function Vi(e){var t;const{item:o,applyValue:n,type:i,apiRef:s,focusElementRef:c,slotProps:u,headerFilterMenu:d,clearButton:p,tabIndex:f,disabled:g}=e,m=(0,r.cH)(e,$i),h=null==u?void 0:u.root.slotProps,b=(0,r.aM)(),[v,w]=l.useState((()=>Li(o.value,i))),[C,y]=l.useState(!1),x=(0,r.aI)(),R=qe(),S=l.useCallback((e=>{b.clear();const t=e.target.value;w(t),y(!0),b.start(R.filterDebounceMs,(()=>{const e=new Date(t);n((0,r.cG)({},o,{value:Number.isNaN(e.getTime())?void 0:e})),y(!1)}))}),[n,o,R.filterDebounceMs,b]);return l.useEffect((()=>{const e=Li(o.value,i);w(e)}),[o.value,i]),(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(R.slots.baseTextField,(0,r.cG)({fullWidth:!0,id:x,label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),value:v,onChange:S,type:i||"text",disabled:g,inputRef:c,slotProps:(0,r.cG)({},h,{input:(0,r.cG)({endAdornment:C?(0,a.jsx)(R.slots.loadIcon,{fontSize:"small",color:"action"}):null},null==h?void 0:h.input),htmlInput:(0,r.cG)({max:"datetime-local"===i?"9999-12-31T23:59":"9999-12-31",tabIndex:f},null==h?void 0:h.htmlInput)})},null==(t=R.slotProps)?void 0:t.baseTextField,m,null==u?void 0:u.root)),d,p]})}function zi(e,t,o,n){if(!e.value)return null;const r=new Date(e.value);o?r.setSeconds(0,0):(r.setMinutes(r.getMinutes()+r.getTimezoneOffset()),r.setHours(0,0,0,0));const l=r.getTime();return e=>{if(!e)return!1;if(n)return t(e.getTime(),l);const r=new Date(e);return o?r.setSeconds(0,0):r.setHours(0,0,0,0),t(r.getTime(),l)}}"production"!==n.p.env.NODE_ENV&&(Vi.propTypes={apiRef:i.shape({current:i.object.isRequired}).isRequired,applyValue:i.func.isRequired,className:i.string,clearButton:i.node,disabled:i.bool,focusElementRef:i.oneOfType([i.func,i.object]),headerFilterMenu:i.node,inputRef:i.oneOfType([i.func,i.shape({current:(e,t)=>
83null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:i.bool,item:i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any}).isRequired,onBlur:i.func,onFocus:i.func,slotProps:i.object,tabIndex:i.number,type:i.oneOf(["date","datetime-local"])});const Ai=e=>[{value:"is",getApplyFilterFn:t=>zi(t,((e,t)=>e===t),e),InputComponent:Vi,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>zi(t,((e,t)=>e!==t),e),InputComponent:Vi,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>zi(t,((e,t)=>e>t),e),InputComponent:Vi,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>zi(t,((e,t)=>e>=t),e),InputComponent:Vi,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>zi(t,((e,t)=>e<t),e,!e),InputComponent:Vi,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:t=>zi(t,((e,t)=>e<=t),e),InputComponent:Vi,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1}],Bi=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],qi=(0,r.H)(pn)({fontSize:"inherit"});function Wi(e){var t,o;const{id:n,value:i,field:s,colDef:c,hasFocus:u,onValueChange:d,slotProps:p}=e,f=(0,r.cH)(e,Bi),g="dateTime"===c.type,m=Ae(),h=l.useRef(null),b=l.useMemo((()=>{let e,t;return e=null==i?null:i instanceof Date?i:new Date((i??"").toString()),t=null==e||Number.isNaN(e.getTime())?"":new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,g?16:10),{parsed:e,formatted:t}}),[i,g]),[v,w]=l.useState(b),C=qe(),y=(e=>{const{classes:t}=e;return(0,r.I)({root:["editInputCell"]},Yo,t)})({classes:C.classes}),x=l.useCallback((e=>{if(""===e)return null;const[t,o]=e.split("T"),[n,r,l]=t.split("-"),i=new Date;if(i.setFullYear(Number(n),Number(r)-1,Number(l)),i.setHours(0,0,0,0),o){const[e,t]=o.split(":");i.setHours(Number(e),Number(t),0,0)}return i}),[]),R=l.useCallback((async e=>{const t=e.target.value,o=x(t);d&&await d(e,o),w({parsed:o,formatted:t}),m.current.setEditCellValue({id:n,field:s,value:o},e)}),[m,s,n,d,x]);return l.useEffect((()=>{w((e=>{var t,o;return b.parsed!==e.parsed&&(null==(t=b.parsed)?void 0:t.getTime())!==(null==(o=e.parsed)?void 0:o.getTime())?b:e}))}),[b]),(0,r.bd)((()=>{u&&h.current.focus()}),[u]),(0,a.jsx)(qi,(0,r.cG)({as:C.slots.baseInput,inputRef:h,fullWidth:!0,className:y.root,type:g?"datetime-local":"date",value:v.formatted,onChange:R},f,null==p?void 0:p.root,{slotProps:{htmlInput:(0,r.cG)({max:g?"9999-12-31T23:59":"9999-12-31"},null==(o=null==(t=null==p?void 0:p.root)?void 0:t.slotProps)?void 0:o.htmlInput)}}))}"production"!==n.p.env.NODE_ENV&&(Wi.propTypes={api:i.object.isRequired,cellMode:i.oneOf(["edit","view"]).isRequired,changeReason:i.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:i.object.isRequired,field:i.string.isRequired,formattedValue:i.any,hasFocus:i.bool.isRequired,id:i.oneOfType([i.number,i.string]).isRequired,isEditable:i.bool,isProcessingProps:i.bool,isValidating:i.bool,onValueChange:i.func,row:i.any.isRequired,rowNode:i.object.isRequired,slotProps:i.object,tabIndex:i.oneOf([-1,0]).isRequired,value:i.any});const _i=e=>(0,a.jsx)(Wi,(0,r.cG)({},e));function Ui(e){let{value:t,columnType:o,rowId:n,field:r}=e;if(!(t instanceof Date))throw new Error([`MUI X: \`${o}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join("\n"))}const Ki=(0,r.cG)({},Br,{type:"date",sortComparator:$n,valueFormatter:(e,t,o,n)=>{if(!e)return"";return Ui({value:e,columnType:"date",rowId:Hi(n,t),field:o.field}),e.toLocaleDateString()},filterOperators:Ai(),renderEditCell:_i,pastedValueParser:e=>new Date(e)}),Xi=(0,r.cG)({},Br,{type:"dateTime",sortComparator:$n,valueFormatter:(e,t,o,n)=>{if(!e)return"";return Ui({value:e,columnType:"dateTime",rowId:Hi(n,t),field:o.field}
83),e.toLocaleString()},filterOperators:Ai(!0),renderEditCell:_i,pastedValueParser:e=>new Date(e)}),Qi=e=>null==e?null:Number(e),Yi=(0,r.cG)({},Br,{type:"number",align:"right",headerAlign:"right",sortComparator:Nn,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>An(e)?e.toLocaleString():e||"",filterOperators:[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>Qi(t)===e.value,InputComponent:Vn,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>Qi(t)!==e.value,InputComponent:Vn,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Qi(t)>e.value,InputComponent:Vn,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Qi(t)>=e.value,InputComponent:Vn,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Qi(t)<e.value,InputComponent:Vn,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Qi(t)<=e.value,InputComponent:Vn,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:Xn,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:t=>Qi(t)===Qi(e)});function Ji(e){return"singleSelect"===(null==e?void 0:e.type)}function Zi(e,t){if(e)return"function"==typeof e.valueOptions?e.valueOptions((0,r.cG)({field:e.field},t)):e.valueOptions}function ea(e,t,o){if(void 0===t)return;const n=t.find((t=>{const n=o(t);return String(n)===String(e)}));return o(n)}const ta=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function oa(e){var t,o;const n=qe(),{id:i,value:s,field:c,row:u,colDef:d,hasFocus:p,error:f,onValueChange:g,initialOpen:m=n.editMode===Qn.Cell,slotProps:h}=e,b=(0,r.cH)(e,ta),v=Ae(),w=l.useRef(null),C=l.useRef(null),[y,x]=l.useState(m),R=((null==(t=n.slotProps)?void 0:t.baseSelect)||{}).native??!1;if((0,r.bd)((()=>{var e;p&&(null==(e=C.current)||e.focus())}),[p]),!Ji(d))return null;const S=Zi(d,{id:i,row:u});if(!S)return null;const I=d.getOptionValue,M=d.getOptionLabel;return S&&d?(0,a.jsx)(n.slots.baseSelect,(0,r.cG)({ref:w,value:s,onChange:async e=>{if(!Ji(d)||!S)return;x(!1);const t=ea(e.target.value,S,I);g&&await g(e,t),await v.current.setEditCellValue({id:i,field:c,value:t},e)},open:y,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||x(!0)},onClose:(e,t)=>{if(n.editMode!==Qn.Row){if("backdropClick"===t||"Escape"===e.key){const t=v.current.getCellParams(i,c);v.current.publishEvent("cellEditStop",(0,r.cG)({},t,{reason:"Escape"===e.key?rr.escapeKeyDown:rr.cellFocusOut}))}}else x(!1)},error:f,native:R,fullWidth:!0,slotProps:{htmlInput:{ref:C}}},b,null==h?void 0:h.root,null==(o=n.slotProps)?void 0:o.baseSelect,{children:S.map((e=>{var t;const o=I(e);return(0,l.createElement)(n.slots.baseSelectOption,(0,r.cG)({},(null==(t=n.slotProps)?void 0:t.baseSelectOption)||{},{native:R,key:o,value:o}),M(e))}))})):null}"production"!==n.p.env.NODE_ENV&&(oa.propTypes={api:i.object.isRequired,cellMode:i.oneOf(["edit","view"]).isRequired,changeReason:i.oneOf(["debouncedSetEditCellValue","setEditCellValue"]),colDef:i.object.isRequired,field:i.string.isRequired,formattedValue:i.any,hasFocus:i.bool.isRequired,id:i.oneOfType([i.number,i.string]).isRequired,initialOpen:i.bool,isEditable:i.bool,isProcessingProps:i.bool,isValidating:i.bool,onValueChange:i.func,row:i.any.isRequired,rowNode:i.object.isRequired,tabIndex:i.oneOf([-1,0]).isRequired,value:i.any});const na=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],ra=e=>{let{column:t,OptionComponent:o,getOptionLabel:n,getOptionValue:i,isSelectNative:a,baseSelectOptionProps:s}=e;return["",...Zi(t)||[]].map((e=>{const t=i(e);let c=n(e);return""===c&&(c="\u2003"),(0,l.createElement)(o,(0,r.cG)({},s,{native:a,key:t,value:t}),c)}))};function la(e){var t,o,n,i,s;const{item:c,applyValue:u,type:d,apiRef:p,focusElementRef:f,tabIndex:g,clearButton:m,headerFilterMenu:h,slotProps:b}=e,v=(0,r.cH)(e,na),w=c.value??"",C=(0,r.aI)(),y=(0,r.aI)(),x=qe(),R=(null==(o=null==(t=x.slotProps)?void 0:t.baseSelect)?void 0:o.native)??
83!1;let S=null;if(c.field){const e=p.current.getColumn(c.field);Ji(e)&&(S=e)}const I=null==S?void 0:S.getOptionValue,M=null==S?void 0:S.getOptionLabel,P=l.useMemo((()=>Zi(S)),[S]),k=l.useCallback((e=>{let t=e.target.value;t=ea(t,P,I),u((0,r.cG)({},c,{value:t}))}),[P,I,u,c]);if(!Ji(S))return null;const E=(null==b?void 0:b.root.label)??p.current.getLocaleText("filterPanelInputLabel");return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(x.slots.baseSelect,(0,r.cG)({fullWidth:!0,id:C,label:E,labelId:y,value:w,onChange:k,slotProps:{htmlInput:(0,r.cG)({tabIndex:g,ref:f,type:d||"text",placeholder:(null==b?void 0:b.root.placeholder)??p.current.getLocaleText("filterPanelInputPlaceholder")},null==(n=null==b?void 0:b.root.slotProps)?void 0:n.htmlInput)},native:R},null==(i=x.slotProps)?void 0:i.baseSelect,v,null==b?void 0:b.root,{children:ra({column:S,OptionComponent:x.slots.baseSelectOption,getOptionLabel:M,getOptionValue:I,isSelectNative:R,baseSelectOptionProps:null==(s=x.slotProps)?void 0:s.baseSelectOption})})),h,m]})}"production"!==n.p.env.NODE_ENV&&(la.propTypes={apiRef:i.shape({current:i.object.isRequired}).isRequired,applyValue:i.func.isRequired,className:i.string,clearButton:i.node,disabled:i.bool,focusElementRef:i.oneOfType([i.func,i.object]),headerFilterMenu:i.node,inputRef:i.oneOfType([i.func,i.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:i.bool,item:i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any}).isRequired,onBlur:i.func,onFocus:i.func,slotProps:i.object,tabIndex:i.number,type:i.oneOf(["singleSelect"])});const ia=["item","applyValue","type","apiRef","focusElementRef","slotProps"];function aa(e){const{item:t,applyValue:o,type:n,apiRef:i,focusElementRef:s,slotProps:c}=e,u=(0,r.cH)(e,ia),d=(0,r.aI)(),p=qe();let f=null;if(t.field){const e=i.current.getColumn(t.field);Ji(e)&&(f=e)}const g=null==f?void 0:f.getOptionValue,m=null==f?void 0:f.getOptionLabel,h=l.useCallback(((e,t)=>g(e)===g(t)),[g]),b=l.useMemo((()=>Zi(f)||[]),[f]),v=l.useMemo((()=>Array.isArray(t.value)?t.value.reduce(((e,t)=>{const o=b.find((e=>g(e)===t));return null!=o&&e.push(o),e}),[]):[]),[g,t.value,b]),w=l.useCallback(((e,n)=>{o((0,r.cG)({},t,{value:n.map(g)}))}),[o,t,g]),C=p.slots.baseAutocomplete;return(0,a.jsx)(C,(0,r.cG)({multiple:!0,options:b,isOptionEqualToValue:h,id:d,value:v,onChange:w,getOptionLabel:m,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:n||"text",inputRef:s}}},u,null==c?void 0:c.root))}"production"!==n.p.env.NODE_ENV&&(aa.propTypes={apiRef:i.shape({current:i.object.isRequired}).isRequired,applyValue:i.func.isRequired,className:i.string,clearButton:i.node,disabled:i.bool,focusElementRef:i.oneOfType([i.func,i.object]),headerFilterMenu:i.node,inputRef:i.oneOfType([i.func,i.shape({current:(e,t)=>null==e[t]?null:"object"!=typeof e[t]||1!==e[t].nodeType?new Error(`Expected prop '${t}' to be of type Element`):null})]),isFilterActive:i.bool,item:i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any}).isRequired,onBlur:i.func,onFocus:i.func,slotProps:i.object,tabIndex:i.number,type:i.oneOf(["singleSelect"])});const sa=e=>null!=e&&Bn(e)?e.value:e,ca=(0,r.cG)({},Br,{type:"singleSelect",getOptionLabel:e=>Bn(e)?e.label:String(e),getOptionValue:e=>Bn(e)?e.value:e,valueFormatter(e,t,o,n){const r=Hi(n,t);if(!Ji(o))return"";const l=Zi(o,{id:r,row:t});if(null==e)return"";if(!l)return e;if(!(e=>"object"==typeof e[0])(l))return o.getOptionLabel(e);const i=l.find((t=>o.getOptionValue(t)===e));return i?o.getOptionLabel(i):""},renderEditCell:e=>(0,a.jsx)(oa,(0,r.cG)({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>sa(t)===sa(e.value),InputComponent:la},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>sa(t)!==sa(e.value),InputComponent:la},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(sa);return e=>t.includes(sa(e))},InputComponent:aa}],pastedValueParser:(e,t,o)=>{const n=o,r=Zi(n)||[],l=n.getOptionValue;if(r.find((t=>l(t)===e)))return e}}),ua=Ho((e=>e.headerFiltering)),da=Do(ua,(e=>(null==e?void 0:e.enabled)??!1)),pa=Do(ua,(e=>e.editing)),fa=Do(ua,(e=>e.menuOpen)),ga=Ho((e=>e.columnGrouping)),ma=jo(ga,(e=>(null==e?void 0:e.unwrappedGroupingModel)??{})),ha=jo(ga,(e=>(null==e?void 0:e.lookup)??{})),ba=jo(ga,(e=>(null==e?void 0:e.headerStructure)??[])),va=Do(ga,(e=>(null==e?void 0:e.maxDepth)??0)),wa=["maxWidth","minWidth","width","flex"],Ca={string:Br,number:Yi,date:Ki,dateTime:Xi,boolean:Ol,singleSelect:ca,[ol]:nl,custom:Br};const ya=(e,t)=>{const o={};let n=0,l=0;const i=[];e.orderedFields.forEach((t=>{let a=e.lookup[t],s=0,c=!1;!1!==e.columnVisibilityModel[t]&&(a.flex&&a.flex>0?(n+=a.flex,c=!0):s=Wn(a.width||Br.width,a.minWidth||Br.minWidth,a.maxWidth||Br.maxWidth),l+=s),a.computedWidth!==s&&(a=(0,r.cG)({},a,{computedWidth:s})),c&&i.push(a),o[t]=a}));const a=void 0===t?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-l,0);if(n>0&&a>0){const e=function(e){let{initialFreeSpace:t,totalFlexUnits:o,flexColumns:n}=e;const r=new Set(n.map((e=>e.field))),l={all:{},frozenFields:[],freeze:e=>{const t=l.all[e];t&&!0!==t.frozen&&(l.all[e].frozen=!0,l.frozenFields.push(e))}};return function e(){if(l.frozenFields.length===r.size)return;const i={min:{},max:{}};let a=t,s=o,c=0;l.frozenFields.forEach((e=>{a-=l.all[e].computedWidth,s-=l.all[e].flex}));for(let t=0;t<n.length;t+=1){const e=n[t];if(l.all[e.field]&&!0===l.all[e.field].frozen)continue;let o=a/s*e.flex;o<e.minWidth?(c+=e.minWidth-o,o=e.minWidth,i.min[e.field]=!0):o>e.maxWidth&&(c+=e.maxWidth-o,o=e.maxWidth,i.max[e.field]=!0),l.all[e.field]={frozen:!1,computedWidth:o,flex:e.flex}}
83c<0?Object.keys(i.max).forEach((e=>{l.freeze(e)})):c>0?Object.keys(i.min).forEach((e=>{l.freeze(e)})):n.forEach((e=>{let{field:t}=e;l.freeze(t)})),e()}(),l.all}({initialFreeSpace:s,totalFlexUnits:n,flexColumns:i});Object.keys(e).forEach((t=>{o[t].computedWidth=e[t].computedWidth}))}return(0,r.cG)({},e,{lookup:o})};function xa(e){let t=Ca.string;return e&&Ca[e]&&(t=Ca[e]),t}const Ra=e=>{let{apiRef:t,columnsToUpsert:o,initialState:n,columnVisibilityModel:l=vr(t),keepOnlyColumnsToUpsert:i=!1,updateInitialVisibilityModel:a=!1}=e;var s,c;const u=!t.current.state.columns;let d;if(u)d={orderedFields:[],lookup:{},columnVisibilityModel:l,initialColumnVisibilityModel:l};else{const e=gr(t);d={orderedFields:i?[]:[...e.orderedFields],lookup:(0,r.cG)({},e.lookup),columnVisibilityModel:l,initialColumnVisibilityModel:a?l:e.initialColumnVisibilityModel}}let p={};i&&!u&&(p=Object.keys(d.lookup).reduce(((e,t)=>(0,r.cG)({},e,{[t]:!1})),{})),o.forEach((e=>{const{field:t}=e;p[t]=!0;let o=d.lookup[t];null==o?(o=(0,r.cG)({},xa(e.type),{field:t,hasBeenResized:!1}),d.orderedFields.push(t)):i&&d.orderedFields.push(t),o&&o.type!==e.type&&(o=(0,r.cG)({},xa(e.type),{field:t}));let n=o.hasBeenResized;wa.forEach((t=>{void 0!==e[t]&&(n=!0,-1===e[t]&&(e[t]=1/0))})),d.lookup[t]=(0,r.aF)(o,(0,r.cG)({},xa(e.type),e,{hasBeenResized:n}))})),i&&!u&&Object.keys(d.lookup).forEach((e=>{p[e]||delete d.lookup[e]}));const f=((e,t)=>{if(!t)return e;const{orderedFields:o=[],dimensions:n={}}=t,l=Object.keys(n);if(0===l.length&&0===o.length)return e;const i={},a=[];for(let r=0;r<o.length;r+=1){const t=o[r];e.lookup[t]&&(i[t]=!0,a.push(t))}const s=0===a.length?e.orderedFields:[...a,...e.orderedFields.filter((e=>!i[e]))],c=(0,r.cG)({},e.lookup);for(let u=0;u<l.length;u+=1){const e=l[u],t=(0,r.cG)({},c[e],{hasBeenResized:!0});Object.entries(n[e]).forEach((e=>{let[o,n]=e;t[o]=-1===n?1/0:n})),c[e]=t}return(0,r.cG)({},e,{orderedFields:s,lookup:c})})(t.current.unstable_applyPipeProcessors("hydrateColumns",d),n);return ya(f,(null==(c=(s=t.current).getRootDimensions)?void 0:c.call(s))??void 0)};function Sa(e,t){if(t.listView)return 0;const o=dn(e),n=va(e),r=da(e);return Math.floor(t.columnHeaderHeight*o)+Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*o)*n+(r?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*o):0)}const Ia=1,Ma=1.5,Pa=e=>{const{scrollDirection:t,classes:o}=e,n={root:["scrollArea",`scrollArea--${t}`]};return(0,r.I)(n,Yo,o)},ka=(0,s.s)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${Jo["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${Jo["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${Jo["scrollArea--left"]}`]:{left:0},[`&.${Jo["scrollArea--right"]}`]:{right:0}}))),Ea=Do(No,((e,t)=>"left"===t?e.leftPinnedWidth:"right"===t?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0));function Oa(e){const{scrollDirection:t,scrollPosition:o}=e,n=l.useRef(null),i=Ae(),s=(0,r.aM)(),c=Po(i,dn),u=Po(i,$o),d=Po(i,Ea,t),p=()=>{const e=No(i);if("left"===t)return o.current.left>0;if("right"===t){const t=u-e.viewportInnerSize.width;return o.current.left<t}return!1},[f,g]=l.useState(p),m=qe(),h=(0,r.cG)({},m,{scrollDirection:t}),b=Pa(h),v=Sa(i,m),w=Math.floor(m.columnHeaderHeight*c),C={height:w,top:v-w};"left"===t?C.left=d:"right"===t&&(C.right=d);const y=(0,r.cK)((e=>{let r;if(e.preventDefault(),"left"===t)r=e.clientX-n.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI X: Wrong drag direction");r=Math.max(1,e.clientX-n.current.getBoundingClientRect().left)}r=(r-Ia)*Ma+Ia,s.start(0,(()=>{i.current.scroll({left:o.current.left+r,top:o.current.top})}))}));return ln(i,"scrollPositionChange",(()=>{g(p)})),f?(0,a.jsx)(ka,{ref:n,className:b.root,ownerState:h,onDragOver:y,style:C}):null}const Ta=Xo((function(e){const t=Ae(),[o,n]=l.useState(!1);return ln(t,"columnHeaderDragStart",(()=>n(!0))),ln(t,"columnHeaderDragEnd",(()=>n(!1))),o?(0,a.jsx)(Oa,(0,r.cG)({},e)):null})),Fa=l.createContext(void 0);function Ga(){const e=l.useContext(Fa);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}"production"!==n.p.env.NODE_ENV&&(Fa.displayName="GridPrivateApiContext");const Da=()=>{};function Ha(e,t,o){const n=l.useRef(!0);(0,r.bd)((()=>{n.current=!1,e.current.register(o,t)}),[e,o,t]),n.current&&e.current.register(o,t)}function ja(e,t){const o=l.useRef(null);if(o.current)return o.current;const n=e.current.getLogger(t);return o.current=n,n}const Na=(e,t,o,n,r)=>
83{const l=ja(e,"useNativeEventListener");sn(e,"rootMount",(()=>{const e=t();if(e&&o)return l.debug(`Binding native ${o} event`),e.addEventListener(o,n,r),()=>{l.debug(`Clearing native ${o} event`),e.removeEventListener(o,n,r)}}))},$a=e=>{const t=l.useRef(!0);t.current&&(t.current=!1,e())},La=(e,t)=>Fi(e),Va=(e,t)=>Po(e,Fi),za=(typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty").includes("firefox"),Aa=Ho((e=>e.rowsMeta)),Ba=Ho((e=>e.virtualization));Do(Ba,(e=>e.enabled));const qa=Do(Ba,(e=>e.enabledForColumns)),Wa=Do(Ba,(e=>e.enabledForRows)),_a=Do(Ba,(e=>e.renderContext)),Ua=jo((e=>e.current.state.virtualization.renderContext.firstColumnIndex),(e=>e.current.state.virtualization.renderContext.lastColumnIndex),((e,t)=>({firstColumnIndex:e,lastColumnIndex:t}))),Ka={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},Xa=(e,t)=>{const{disableVirtualization:o,autoHeight:n}=t;return(0,r.cG)({},e,{virtualization:{enabled:!o,enabledForColumns:!o,enabledForRows:!o&&!n,renderContext:Ka}})};const Qa=Ho((e=>e.rowSpanning)),Ya=Do(Qa,(e=>e.hiddenCells)),Ja=Do(Qa,(e=>e.spannedCells)),Za=Do(Qa,(e=>e.hiddenCellOriginMap)),es=Ho((e=>e.listViewColumn)),ts=jo(Do(di,_a,Fi,Cr,((e,t,o,n)=>{if(!e)return!1;const r=o.rowIdToIndexMap.get(e.id),l=n.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex((t=>t.field===e.field));return!(void 0!==r&&-1!==l&&r>=t.firstRowIndex&&r<=t.lastRowIndex)})),Cr,Fi,di,((e,t,o,n)=>{if(!e)return null;const l=o.rowIdToIndexMap.get(n.id);if(void 0===l)return null;const i=t.findIndex((e=>e.field===n.field));return-1===i?null:(0,r.cG)({},n,{rowIndex:l,columnIndex:i})}));function os(e,t){return Math.round(e*10**t)/10**t}const ns=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent);var rs=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(rs||{});const ls={top:0,left:0},is=Object.freeze(new Map),as=()=>{var e;const t=Ga(),o=qe(),{listView:n}=o,i=Po(t,(()=>n?[es(t)]:Cr(t))),s=Po(t,Wa)&&!ns,u=Po(t,qa)&&!ns,d=Po(t,En),p=Rr(t),f=n?pr:p,g=d.bottom.length>0,[m,h]=l.useState(is),b=(0,r.cN)(),v=Po(t,Zl),w=Va(t),C=t.current.mainElementRef,y=t.current.virtualScrollerRef,x=t.current.virtualScrollbarVerticalRef,R=t.current.virtualScrollbarHorizontalRef,S=Po(t,Pr),I=l.useRef(!1),M=Po(t,Lo),P=Po(t,Vo),k=Po(t,$o),E=Po(t,ss),O=Po(t,Uo),T=Po(t,Bo),F=l.useRef(null),G=l.useCallback((e=>{if(C.current=e,!e)return;const o=e.getBoundingClientRect();let n={width:os(o.width,1),height:os(o.height,1)};if((!F.current||n.width!==F.current.width&&n.height!==F.current.height)&&(F.current=n,t.current.publishEvent("resize",n)),typeof ResizeObserver>"u")return;const r=new ResizeObserver((e=>{const o=e[0];if(!o)return;const r={width:os(o.contentRect.width,1),height:os(o.contentRect.height,1)};r.width===n.width&&r.height===n.height||(t.current.publishEvent("resize",r),n=r)}));return r.observe(e),fe>=19?()=>{C.current=null,r.disconnect()}:void 0}),[t,C]),D=l.useRef((null==(e=o.initialState)?void 0:e.scroll)??ls),H=l.useRef(!1),j=l.useRef(ls),N=l.useRef(Ka),$=Po(t,_a),L=Po(t,ts),V=(0,r.aM)(),z=l.useRef(void 0),A=(0,r.c_)((()=>((e,t,o,n,r)=>({direction:rs.NONE,buffer:hs(e,rs.NONE,t,o,n,r)}))(b,o.rowBufferPx,o.columnBufferPx,15*M,300))).current,B=l.useCallback((e=>{if(gs(e,t.current.state.virtualization.renderContext))return;const o=e.firstRowIndex!==N.current.firstRowIndex||e.lastRowIndex!==N.current.lastRowIndex;t.current.setState((t=>(0,r.cG)({},t,{virtualization:(0,r.cG)({},t.virtualization,{renderContext:e})}))),No(t).isReady&&o&&(N.current=e,t.current.publishEvent("renderedRowsIntervalChange",e)),j.current=D.current}),[t]),q=(0,r.cK)((()=>{const e=y.current;if(!e)return;const n=No(t),r=Math.ceil(n.minimumSize.height-n.viewportOuterSize.height),l=Math.ceil(n.minimumSize.width-n.viewportInnerSize.width),i={top:Wn(e.scrollTop,0,r),left:b?Wn(e.scrollLeft,-l,0):Wn(e.scrollLeft,0,l)},a=i.left-D.current.left,d=i.top-D.current.top,p=0!==a||0!==d;D.current=i;const f=p?function(e,t){return 0===e&&0===t?rs.NONE:Math.abs(t)>=Math.abs(e)?t>0?rs.DOWN:rs.UP:e>0?rs.RIGHT:rs.LEFT}(a,d):rs.NONE,g=Math.abs(D.current.top-j.current.top),m=Math.abs(D.current.left-j.current.left),h=g>=M||m>=50,v=A.direction!==f;if(!h&&!v)return $;if(v)switch(f){case rs.NONE:case rs.LEFT:case rs.RIGHT:z.current=void 0;break;default:z.current=$}A.direction=f,A.buffer=hs(b,f,o.rowBufferPx,o.columnBufferPx,15*M,300);const w=us(cs(t,o,s,u),D.current,A);return gs(w,$)||(c.flushSync((()=>{B(w)})),V.start(1e3,q)),w})),W=()=>{if(!No(t).isReady&&(s||u))return;const e=us(cs(t,o,s,u),D.current,A);z.current=void 0,B(e)},_=(0,r.cK)((()=>
83{if(H.current)return void(H.current=!1);const e=q();t.current.publishEvent("scrollPositionChange",{top:D.current.top,left:D.current.left,renderContext:e})})),U=(0,r.cK)((e=>{t.current.publishEvent("virtualScrollerWheel",{},e)})),K=(0,r.cK)((e=>{t.current.publishEvent("virtualScrollerTouchMove",{},e)})),X=l.useMemo((()=>({overflowX:!E||n?"hidden":void 0,overflowY:o.autoHeight?"hidden":void 0})),[E,o.autoHeight,n]),Q=l.useMemo((()=>{const e={width:E?k:"auto",flexBasis:P,flexShrink:0};return 0===e.flexBasis&&(e.flexBasis=fl),e}),[k,P,E]),Y=l.useCallback((e=>{e&&t.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:k,contentHeight:P})}),[t,k,P]);return(0,r.bd)((()=>{var e,o;I.current&&(null==(o=(e=t.current).updateRenderContext)||o.call(e))}),[t,u,s]),(0,r.bd)((()=>{n&&(y.current.scrollLeft=0)}),[n,y]),((e,t)=>{const o=l.useRef(!1);(0,r.bd)((()=>o.current||!e?Da:(o.current=!0,t())),[o.current||e])})($!==Ka,(()=>{var e;if(t.current.publishEvent("scrollPositionChange",{top:D.current.top,left:D.current.left,renderContext:$}),I.current=!0,null!=(e=o.initialState)&&e.scroll&&y.current){const e=y.current,{top:n,left:r}=o.initialState.scroll,l={top:!(n>0),left:!(r>0)};if(!l.left&&k&&(e.scrollLeft=r,H.current=!0,l.left=!0),!l.top&&P&&(e.scrollTop=n,H.current=!0,l.top=!0),!l.top||!l.left){const o=t.current.subscribeEvent("virtualScrollerContentSizeChange",(t=>{!l.left&&t.columnsTotalWidth&&(e.scrollLeft=r,H.current=!0,l.left=!0),!l.top&&t.contentHeight&&(e.scrollTop=n,H.current=!0,l.top=!0),l.left&&l.top&&o()}));return o}}})),t.current.register("private",{updateRenderContext:W}),sn(t,"sortedRowsSet",W),sn(t,"paginationModelChange",W),sn(t,"columnsChange",W),{renderContext:$,setPanels:h,getRows:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var n;if(!e.rows&&!w.range)return[];const l=yn(t);let s=$;e.renderContext&&(s=e.renderContext,s.firstColumnIndex=$.firstColumnIndex,s.lastColumnIndex=$.lastColumnIndex);const c=!g&&void 0===e.position||g&&"bottom"===e.position,u=void 0!==e.position;let p;switch(e.position){case"top":p=0;break;case"bottom":p=d.top.length+w.rows.length;break;case void 0:p=d.top.length}const h=e.rows??w.rows,b=s.firstRowIndex,C=Math.min(s.lastRowIndex,h.length),y=e.rows?_n(0,e.rows.length):_n(b,C);let x=-1;!u&&L&&(L.rowIndex<b&&(y.unshift(L.rowIndex),x=L.rowIndex),L.rowIndex>C&&(y.push(L.rowIndex),x=L.rowIndex));const R=[],I=null==(n=o.slotProps)?void 0:n.row,M=Sr(t);return y.forEach((n=>{var d,g,b;const{id:C,model:y}=h[n];if(!l[C])return;const P=((null==(d=null==w?void 0:w.range)?void 0:d.firstRowIndex)||0)+p+n;if(S){const e=f.left.length,o=i.length-f.right.length;t.current.calculateColSpan({rowId:C,minFirstColumn:e,maxLastColumn:o,columns:i}),f.left.length>0&&t.current.calculateColSpan({rowId:C,minFirstColumn:0,maxLastColumn:f.left.length,columns:i}),f.right.length>0&&t.current.calculateColSpan({rowId:C,minFirstColumn:i.length-f.right.length,maxLastColumn:i.length,columns:i})}const E=t.current.rowHasAutoHeight(C)?"auto":t.current.unstable_getRowHeight(C),F=v.has(C)&&t.current.isRowSelectable(C);let G=!1;void 0===e.position&&(G=0===n);let D=!1;const H=n===h.length-1;if(c)if(u)D=H;else{n===w.rows.length-1&&(D=!0)}let j=s;z.current&&n>=z.current.firstRowIndex&&n<z.current.lastRowIndex&&(j=z.current);const N=n===x,$=(null==L?void 0:L.rowIndex)===P,V=ms(M,j,f.left.length),A=H&&"top"===e.position,B=j.firstColumnIndex,q=j.lastColumnIndex;if(R.push((0,a.jsx)(o.slots.row,(0,r.cG)({row:y,rowId:C,index:P,selected:F,offsetLeft:V,columnsTotalWidth:k,rowHeight:E,pinnedColumns:f,visibleColumns:i,firstColumnIndex:B,lastColumnIndex:q,focusedColumnIndex:$?L.columnIndex:void 0,isFirstVisible:G,isLastVisible:D,isNotVisible:N,showBottomBorder:A,scrollbarWidth:O,gridHasFiller:T},I),C)),N)return;const W=m.get(C);W&&R.push(W),void 0===e.position&&H&&R.push(null==(b=(g=t.current).getInfiniteLoadingTriggerElement)?void 0:b.call(g,{lastRowId:C}))})),R},getContainerProps:()=>({ref:G}),getScrollerProps:()=>({ref:y,onScroll:_,onWheel:U,onTouchMove:K,style:X,role:"presentation",tabIndex:za?-1:void 0}),getContentProps:()=>({style:Q,role:"presentation",ref:Y}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:x,scrollPosition:D}),getScrollbarHorizontalProps:()=>({ref:R,scrollPosition:D}),getScrollAreaProps:()=>({scrollPosition:D})}};function ss(e){return e.current.state.dimensions.viewportOuterSize.width>0&&e.current.state.dimensions.columnsTotalWidth>e.current.state.dimensions.viewportOuterSize.width}function cs(e,t,o,n){const r=No(e),l=La(e),i=t.listView?[es(e)]:Cr(e),a=Za(e),s=e.current.state.rows.dataRowIds.at(-1),c=i.at(-1);return{enabledForRows:o,enabledForColumns:n,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:r.leftPinnedWidth,columnsTotalWidth:r.columnsTotalWidth,viewportInnerWidth:r.viewportInnerSize.width,viewportInnerHeight:r.viewportInnerSize.height,lastRowHeight:void 0!==s?e.current.unstable_getRowHeight(s):0,lastColumnWidth:(null==c?void 0:c.computedWidth)??0,rowsMeta:Aa(e),columnPositions:Sr(e),rows:l.rows,range:l.range,pinnedColumns:Rr(e),visibleColumns:i,hiddenCellsOriginMap:a,listView:t.listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function us(e,t,o){const n={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:l,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;
83if(e.enabledForRows){let t=Math.min(ds(e,l,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const o=e.hiddenCellsOriginMap[t];if(o){const e=Math.min(...Object.values(o));t=Math.min(t,e)}const r=e.autoHeight?t+e.rows.length:ds(e,l+e.viewportInnerHeight);n.firstRowIndex=t,n.lastRowIndex=r}if(e.listView)return(0,r.cG)({},n,{lastColumnIndex:1});if(e.enabledForColumns){let t=0,r=e.columnPositions.length,l=!1;const[i,s]=fs({firstIndex:n.firstRowIndex,lastIndex:n.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:o.buffer.rowBefore,bufferAfter:o.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let o=i;o<s&&!l;o+=1){const t=e.rows[o];l=e.apiRef.current.rowHasAutoHeight(t.id)}(!l||e.virtualizeColumnsWithAutoRowHeight)&&(t=ps(a,e.columnPositions,{atStart:!0,lastPosition:e.columnsTotalWidth}),r=ps(a+e.viewportInnerWidth,e.columnPositions)),n.firstColumnIndex=t,n.lastColumnIndex=r}return function(e,t,o){const[n,r]=fs({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:o.buffer.rowBefore,bufferAfter:o.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[l,i]=fs({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:o.buffer.columnBefore,bufferAfter:o.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),a=function(e){let{firstColumnToRender:t,apiRef:o,firstRowToRender:n,lastRowToRender:r,visibleRows:l}=e,i=t,a=!1;for(;!a&&i>=0;){a=!0;for(let e=n;e<r;e+=1)if(l[e]){const t=l[e].id,n=o.current.unstable_getCellColSpanInfo(t,i);if(n&&n.spannedByColSpan&&n.leftVisibleCellIndex<i){i=n.leftVisibleCellIndex,a=!1;break}}}return i}({firstColumnToRender:l,apiRef:e.apiRef,firstRowToRender:n,lastRowToRender:r,visibleRows:e.rows});return{firstRowIndex:n,lastRowIndex:r,firstColumnIndex:a,lastColumnIndex:i}}(e,n,o)}function ds(e,t,o){var n,r;const l=e.apiRef.current.getLastMeasuredRowIndex();let i=l===1/0;null!=(n=e.range)&&n.lastRowIndex&&!i&&(i=l>=e.range.lastRowIndex);const a=Wn(l-((null==(r=e.range)?void 0:r.firstRowIndex)||0),0,e.rowsMeta.positions.length);return i||e.rowsMeta.positions[a]>=t?ps(t,e.rowsMeta.positions,o):function(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,r=1;for(;o<t.length&&Math.abs(t[o])<e;)o+=r,r*=2;return ps(e,t,n,Math.floor(o/2),Math.min(o,t.length))}(t,e.rowsMeta.positions,a,o)}function ps(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length;if(t.length<=0)return-1;if(n>=r)return n;const l=n+Math.floor((r-n)/2),i=t[l];let a;if(null!=o&&o.atStart){a=e-((l===t.length-1?o.lastPosition:t[l+1])-i)<i}else a=e<=i;return a?ps(e,t,o,n,l):ps(e,t,o,l+1,r)}function fs(e){let{firstIndex:t,lastIndex:o,bufferBefore:n,bufferAfter:r,minFirstIndex:l,maxLastIndex:i,positions:a,lastSize:s}=e;const c=a[t]-n,u=a[o]+r,d=ps(c,a,{atStart:!0,lastPosition:a[a.length-1]+s}),p=ps(u,a);return[Wn(d,l,i),Wn(p,l,i)]}function gs(e,t){return e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}function ms(e,t,o){const n=(e[t.firstColumnIndex]??0)-(e[o]??0);return Math.abs(n)}function hs(e,t,o,n,r,l){if(e)switch(t){case rs.LEFT:t=rs.RIGHT;break;case rs.RIGHT:t=rs.LEFT}switch(t){case rs.NONE:return{rowAfter:o,rowBefore:o,columnAfter:n,columnBefore:n};case rs.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:l};case rs.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:l,columnBefore:0};case rs.UP:return{rowAfter:0,rowBefore:r,columnAfter:0,columnBefore:0};case rs.DOWN:return{rowAfter:r,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const bs=(0,s.s)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e&&"right"!==e})((e=>{let{overlayType:t,loadingOverlayVariant:o,right:n}=e;return"skeleton"!==o?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${n}px`,width:0,height:0,zIndex:"loadingOverlay"===t?5:4}:{}})),vs=(0,s.s)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e})({});function ws(e){const t=Ae(),o=qe(),n=Po(t,No);let l=Math.max(n.viewportOuterSize.height-n.topContainerHeight-n.bottomContainerHeight-(n.hasScrollX?n.scrollbarSize:0),0);0===l&&(l=fl);const i=(e=>{const{classes:t}=e;return(0,r.I)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Yo,t)})((0,r.cG)({},e,{classes:o.classes}));return(0,a.jsx)(bs,(0,r.cG)({className:i.root},e,{right:n.columnsTotalWidth-n.viewportOuterSize.width,children:(0,a.jsx)(vs,(0,r.cG)({className:i.inner,style:{height:l,width:n.viewportOuterSize.width}},e))}))}"production"!==n.p.env.NODE_ENV&&(ws.propTypes={loadingOverlayVariant:i.oneOf(["circular-progress","linear-progress","skeleton"]),overlayType:i.oneOf(["loadingOverlay","noResultsOverlay","noRowsOverlay","noColumnsOverlay","emptyPivotOverlay"])});const Cs=Ho((e=>e.pivoting)),ys=Do(Cs,(e=>null==e?void 0:e.active)),xs=new Map,Rs=Do(Cs,(e=>(null==e?void 0:e.initialColumns)||xs));Do(Cs,(e=>null==e?void 0:e.panelOpen));const Ss=Ho((e=>e.columnMenu));const Is=Xo((function(){var e;const t=Ga(),o=qe(),n=Po(t,Cr),l=Po(t,Yl),i=Po(t,jl),s=Po(t,hi),c=Po(t,(()=>null===mi(t))),u=Po(t,bi),d=Po(t,pi),p=Po(t,fi),f=Po(t,va),g=Po(t,Ss),m=Po(t,vr),h=Po(t,ba),b=!(null===u&&null===s&&c),v=t.current.columnHeadersContainerRef;return(0,a.jsx)(o.slots.columnHeaders,(0,r.cG)({ref:v,visibleColumns:n,filterColumnLookup:l,sortColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:u,columnHeaderFocus:d,columnGroupHeaderFocus:p,headerGroupingMaxDepth:f,columnMenuState:g,columnVisibility:m,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:b},null==(e=o.slotProps)?void 0:e.columnHeaders))})),Ms=(0,s.s)("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),Ps=(0,s.s)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:o,loadingOverlayVariant:n,overlayType:r}=e,l="skeleton"===n||"noColumnsOverlay"===r;return[t.main,o.hasPinnedRight&&t["main--hasPinnedRight"],l&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),ks=ge(((e,t)=>{var o;const{ownerState:n}=e,l=qe(),i=Wr().hooks.useGridAriaAttributes();return(0,a.jsxs)(Ps,(0,r.cG)({ownerState:n,className:e.className,tabIndex:-1},i,null==(o=l.slotProps)?void 0:o.main,{ref:t,children:[(0,a.jsx)(Ms,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))})),Es=()=>(0,r.I)({root:["topContainer"]},Yo,{}),Os=(0,s.s)("div")({position:"sticky",zIndex:40,top:0});function Ts(e){const t=Es();return(0,a.jsx)(Os,(0,r.cG)({},e,{className:(0,n.c)(t.root,Jo["container--top"]),role:"presentation"}))}const Fs=(0,s.s)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.virtualScrollerContent,o.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),Gs=ge((function(e,t){var o;const l=qe(),i=!l.autoHeight&&"auto"===(null==(o=e.style)?void 0:o.minHeight),s=((e,t)=>{const{classes:o}=e;return(0,r.I)({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},Yo,o)})(l,i),c={classes:l.classes,overflowedContent:i};return(0,a.jsx)(Fs,(0,r.cG)({},e,{ownerState:c,className:(0,n.c)(s.root,e.className),ref:t}))})),Ds=(0,s.s)("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Hs=(0,s.s)("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:tt.cell.background.pinned}),js=(0,s.s)(Hs)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),Ns=(0,s.s)(Hs)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),$s=(0,s.s)("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});const Ls=Xo((function(e){let{rowsLength:t}=e;const o=Ae(),{viewportOuterSize:n,minimumSize:r,hasScrollX:l,hasScrollY:i,scrollbarSize:s,leftPinnedWidth:c,rightPinnedWidth:u}=Po(o,No),d=l?s:0,p=n.height-r.height>0;return 0!==d||p?(0,a.jsxs)(Ds,{className:Jo.filler,role:"presentation",style:{height:d,"--rowBorderColor":0===t?"transparent":"var(--DataGrid-rowBorderColor)"},children:[c>0&&(0,a.jsx)(js,{className:Jo["filler--pinnedLeft"],style:{width:c}}),(0,a.jsx)($s,{}),u>0&&(0,a.jsx)(Ns,{className:Jo["filler--pinnedRight"],style:{width:u+(i?
83s:0)}})]}):null})),Vs=["className"],zs=(0,s.s)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),As=ge((function(e,t){const{className:o}=e,l=(0,r.cH)(e,Vs),i=Ae(),s=qe(),c=(e=>{const{classes:t}=e;return(0,r.I)({root:["virtualScrollerRenderZone"]},Yo,t)})(s),u=Po(i,(()=>{const e=_a(i);return Aa(i).positions[e.firstRowIndex]??0}));return(0,a.jsx)(zs,(0,r.cG)({className:(0,n.c)(c.root,o),ownerState:s,style:{transform:`translate3d(0, ${u}px, 0)`}},l,{ref:t}))})),Bs={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},qs=Ho((e=>e.editRows)),Ws=Do(qs,((e,t)=>{let{rowId:o,editMode:n}=t;return n===Qn.Row&&!!e[o]})),_s=Do(qs,((e,t)=>{let{rowId:o,field:n}=t;var r;return(null==(r=e[o])?void 0:r[n])??null})),Us=Ho((e=>e.preferencePanel)),Ks=Do(Us,((e,t)=>!(!e.open||e.labelId!==t)));var Xs=function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e}(Xs||{});function Qs(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}class Ys{constructor(e){let{ttl:t=3e5,getKey:o=Qs}=e;this.cache=void 0,this.ttl=void 0,this.getKey=void 0,this.cache={},this.ttl=t,this.getKey=o}set(e,t){const o=this.getKey(e),n=Date.now()+this.ttl;this.cache[o]={value:t,expiry:n}}get(e){const t=this.getKey(e),o=this.cache[t];if(o)return Date.now()>o.expiry?void delete this.cache[t]:o.value}clear(){this.cache={}}}class Js extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridGetRowsError",this.params=e.params,this.cause=e.cause}}class Zs extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridUpdateRowError",this.params=e.params,this.cause=e.cause}}const ec=(0,s.s)("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),tc=(0,s.s)(ec)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),oc=(0,s.s)(ec)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),nc=ge((function(e,t){const o=Ga(),n=qe(),i=l.useRef(!1),s=l.useRef(0),c=l.useRef(null),u=l.useRef(null),d=((e,t)=>{const{classes:o}=e,n={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return(0,r.I)(n,Yo,o)})(n,e.position),p=Po(o,No),f="vertical"===e.position?"height":"width",g="vertical"===e.position?"scrollTop":"scrollLeft",m="vertical"===e.position?"top":"left",h="vertical"===e.position?p.hasScrollX:p.hasScrollY,b=p.minimumSize[f]+(h?p.scrollbarSize:0),v=("vertical"===e.position?p.viewportInnerSize.height:p.viewportOuterSize.width)*(b/p.viewportOuterSize[f]),w=(0,r.cK)((()=>{const t=c.current,o=e.scrollPosition.current;if(!t||o[m]===s.current)return;if(s.current=o[m],i.current)return void(i.current=!1);i.current=!0;const n=o[m]/b;t[g]=n*v})),C=(0,r.cK)((()=>{const e=o.current.virtualScrollerRef.current,t=c.current;if(!t)return;if(i.current)return void(i.current=!1);i.current=!0;const n=t[g]/v;e[g]=n*b}));(0,r.d1)((()=>{const e=o.current.virtualScrollerRef.current,t=c.current,n={passive:!0};return e.addEventListener("scroll",w,n),t.addEventListener("scroll",C,n),()=>{e.removeEventListener("scroll",w,n),t.removeEventListener("scroll",C,n)}})),l.useEffect((()=>{u.current.style.setProperty(f,`${v}px`)}),[v,f]);const y="vertical"===e.position?tc:oc;return(0,a.jsx)(y,{ref:(0,r.aH)(t,c),className:d.root,style:"vertical"===e.position&&n.listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:e=>{e.target.blur()},children:(0,a.jsx)("div",{ref:u,className:d.content})})})),rc=(0,s.s)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.virtualScroller,o.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),lc=e=>e.current.state.dimensions.rightPinnedWidth>0;function ic(e){const t=Ae(),o=qe(),n=Po(t,Ao),l=Po(t,zo),i=Po(t,lc),s=Po(t,Ko),{getOverlay:c,overlaysProps:u}=(()=>{var e,t;const o=Ae(),n=qe(),l=Po(o,bn),i=Po(o,Ul),s=Po(o,On),c=Po(o,Cr),u=0===l&&0===s,d=Po(o,vn),p=Po(o,ys),f=!d&&u,g=!d&&l>0&&0===i,m=!d&&0===c.length;let h=null,b=null;f&&(h="noRowsOverlay"),m&&(h="noColumnsOverlay"),f&&p&&(h="emptyPivotOverlay"),g&&(h="noResultsOverlay"),d&&(h="loadingOverlay",b=(null==(t=null==(e=n.slotProps)?void 0:e.loadingOverlay)?void 0:t[u?"noRowsVariant":"variant"])??(u?"skeleton":"linear-progress"));const v={overlayType:h,loadingOverlayVariant:b};return{getOverlay:()=>{var e,t;if(!h)return null;const o=null==(e=n.slots)?void 0:e[h],l=null==(t=n.slotProps)?void 0:t[h];return(0,a.jsx)(ws,(0,r.cG)({},v,{children:(0,a.jsx)(o,(0,r.cG)({},l))}))},overlaysProps:v}})(),d=(0,r.cG)({classes:o.classes,hasScrollX:l,hasPinnedRight:i},u),p=(e=>{const{classes:t,hasScrollX:o,hasPinnedRight:n,loadingOverlayVariant:l,overlayType:i}=e;return(0,r.I)({root:["main",n&&"main--hasPinnedRight",("skeleton"===l||"noColumnsOverlay"===i)&&"main--hiddenContent"],scroller:["virtualScroller",o&&"virtualScroller--hasScrollX"]},Yo,t)})(d),f=as(),{getContainerProps:g,getScrollerProps:m,getContentProps:h,getRenderZoneProps:b,getScrollbarVerticalProps:v,getScrollbarHorizontalProps:w,getRows:C,getScrollAreaProps:y}=f,x=C();
83return(0,a.jsxs)(ks,(0,r.cG)({className:p.root},g(),{ownerState:d,children:[(0,a.jsx)(Ta,(0,r.cG)({scrollDirection:"left"},y())),(0,a.jsx)(Ta,(0,r.cG)({scrollDirection:"right"},y())),(0,a.jsxs)(rc,(0,r.cG)({className:p.scroller},m(),{ownerState:d,children:[(0,a.jsxs)(Ts,{children:[!o.listView&&(0,a.jsx)(Is,{}),(0,a.jsx)(o.slots.pinnedRows,{position:"top",virtualScroller:f})]}),c(),(0,a.jsx)(Gs,(0,r.cG)({},h(),{children:(0,a.jsxs)(As,(0,r.cG)({},b(),{children:[x,(0,a.jsx)(o.slots.detailPanels,{virtualScroller:f})]}))})),s&&(0,a.jsx)(Ls,{rowsLength:x.length}),(0,a.jsx)(o.slots.bottomContainer,{children:(0,a.jsx)(o.slots.pinnedRows,{position:"bottom",virtualScroller:f})})]})),l&&!o.listView&&(0,a.jsx)(nc,(0,r.cG)({position:"horizontal"},w())),n&&(0,a.jsx)(nc,(0,r.cG)({position:"vertical"},v())),e.children]}))}function ac(){var e;const t=qe();return t.hideFooter?null:(0,a.jsx)(t.slots.footer,(0,r.cG)({},null==(e=t.slotProps)?void 0:e.footer))}let sc;const cc=[e=>e.autoPageSize&&e.autoHeight&&["MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.","You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.","","Please remove one of these two props."].join("\n")||void 0,e=>"client"===e.paginationMode&&null!=e.paginationMeta&&['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.','`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join("\n")||void 0,e=>e.signature===Zo.DataGrid&&"client"===e.paginationMode&&An(e.rowCount)&&['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.','`rowCount` is only meant to be used with `paginationMode="server"`.'].join("\n")||void 0,e=>"server"===e.paginationMode&&null==e.rowCount&&!e.dataSource&&["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`","For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination"].join("\n")||void 0];const uc=(e,t)=>{if(e)if(t){if(e===yl.LEFT)return"right";if(e===yl.RIGHT)return"left"}else{if(e===yl.LEFT)return"left";if(e===yl.RIGHT)return"right"}};function dc(e,t,o,n){const r=uc(o,t);return!r||void 0===n||(e[r]=n),e}const pc=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],fc=["changeReason","unstable_updateV
83alueOnRender"];yl.LEFT,dr.LEFT,yl.RIGHT,dr.RIGHT,yl.NONE,yl.VIRTUAL;let gc=!1;const mc=ge((function(e,t){var o,i,s,c;const{column:u,row:d,rowId:p,rowNode:f,align:g,colIndex:m,width:h,className:b,style:v,colSpan:w,disableDragEvents:C,isNotVisible:y,pinnedOffset:x,pinnedPosition:R,showRightBorder:S,showLeftBorder:I,onClick:M,onDoubleClick:P,onMouseDown:k,onMouseUp:E,onMouseOver:O,onKeyDown:T,onKeyUp:F,onDragEnter:G,onDragOver:D}=e,H=(0,r.cH)(e,pc),j=Ga(),N=qe(),$=(0,r.cN)(),L=u.field,V=Po(j,_s,{rowId:p,field:L}),z=Wr().hooks.useCellAggregationResult(p,L),A=V?Yn.Edit:Yn.View,B=j.current.getCellParamsForRow(p,L,d,{colDef:u,cellMode:A,rowNode:f,tabIndex:Po(j,(()=>{const e=mi(j);return e&&e.field===L&&e.id===p?0:-1})),hasFocus:Po(j,(()=>{const e=di(j);return(null==e?void 0:e.id)===p&&e.field===L}))});B.api=j.current,z&&(B.value=z.value,B.formattedValue=u.valueFormatter?u.valueFormatter(B.value,d,u,j):B.value);const q=Po(j,(()=>j.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:p,field:L}))),W=Po(j,Ya),_=Po(j,Ja),{hasFocus:U,isEditable:K=!1,value:X}=B,Q="actions"===u.type&&(null==(o=u.getActions)?void 0:o.call(u,j.current.getRowParams(p)).some((e=>!e.props.disabled))),Y="view"!==A&&K||Q?-1:B.tabIndex,{classes:J,getCellClassName:Z}=N,ee=[Po(j,(()=>j.current.unstable_applyPipeProcessors("cellClassName",[],{id:p,field:L}).filter(Boolean).join(" ")))];u.cellClassName&&ee.push("function"==typeof u.cellClassName?u.cellClassName(B):u.cellClassName),"flex"===u.display&&ee.push(Jo["cell--flex"]),Z&&ee.push(Z(B));const te=B.formattedValue??X,oe=l.useRef(null),ne=(0,r.aH)(t,oe),re=l.useRef(null),le=N.cellSelection??!1,ie=(e=>{const{align:t,showLeftBorder:o,showRightBorder:n,pinnedPosition:l,isEditable:i,isSelected:a,isSelectionMode:s,classes:c}=e,u={root:["cell",`cell--text${(0,r.aC)(t)}`,a&&"selected",i&&"cell--editable",o&&"cell--withLeftBorder",n&&"cell--withRightBorder",l===yl.LEFT&&"cell--pinnedLeft",l===yl.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return(0,r.I)(u,Yo,c)})({align:g,showLeftBorder:I,showRightBorder:S,isEditable:K,classes:N.classes,pinnedPosition:R,isSelected:q,isSelectionMode:le}),ae=l.useCallback((e=>t=>{const o=j.current.getCellParams(p,L||"");j.current.publishEvent(e,o,t),E&&E(t)}),[j,L,E,p]),se=l.useCallback((e=>t=>{const o=j.current.getCellParams(p,L||"");j.current.publishEvent(e,o,t),k&&k(t)}),[j,L,k,p]),ce=l.useCallback(((e,t)=>o=>{if(!j.current.getRow(p))return;const n=j.current.getCellParams(p,L||"");j.current.publishEvent(e,n,o),t&&t(o)}),[j,L,p]),ue=(null==(i=W[p])?void 0:i[L])??!1,de=(null==(s=_[p])?void 0:s[L])??1,pe=l.useMemo((()=>{if(y)return{padding:0,opacity:0,width:0,height:0,border:0};const e=dc((0,r.cG)({"--width":`${h}px`},v),$,R,x),t=R===yl.LEFT,o=R===yl.RIGHT;return de>1&&(e.height=`calc(var(--height) * ${de})`,e.zIndex=10,(t||o)&&(e.zIndex=40)),e}),[h,y,v,x,R,$,de]);if(l.useEffect((()=>{if(!U||A===Yn.Edit)return;const e=(0,r.cL)(j.current.rootElementRef.current);if(oe.current&&!oe.current.contains(e.activeElement)){const e=oe.current.querySelector('[tabindex="0"]'),t=re.current||e||oe.current;if(void 0===sc&&document.createElement("div").focus({get preventScroll(){return sc=!0,!1}}),sc)t.focus({preventScroll:!0});else{const e=j.current.getScrollPosition();t.focus(),j.current.scroll(e)}}}),[U,A,j]),ue)return(0,a.jsx)("div",{"data-colindex":m,role:"presentation",style:(0,r.cG)({width:"var(--width)"},pe)});let fe,ge,me=H.onFocus;if("test"===n.p.env.NODE_ENV&&null!=(c=N.experimentalFeatures)&&c.warnIfFocusStateIsNotSynced&&(me=e=>{const t=di(j);(null==t?void 0:t.id)!==p||t.field!==L?gc||(console.warn([`MUI X: The cell with id=${p} and field=${L} received focus.`,`According to the state, the focus should be at id=${null==t?void 0:t.id}, field=${null==t?void 0:t.field}.`,"Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.","Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state."].join("\n")),gc=!0):"function"==typeof H.onFocus&&H.onFocus(e)}),null===V&&u.renderCell&&(fe=u.renderCell(B)),null!==V&&u.renderEditCell){const e=j.current.getRowWithUpdatedValues(p,u.field),t=(0,r.cH)(V,fc),o=u.valueFormatter?u.valueFormatter(V.value,e,u,j):B.formattedValue,n=(0,r.cG)({},B,{row:e,formattedValue:o},t);fe=u.renderEditCell(n),ee.push(Jo["cell--editing"]),ee.push(null==J?void 0:J["cell--editing"])}if(void 0===fe){const e=null==te?void 0:te.toString();fe=e,ge=e}l.isValidElement(fe)&&Q&&(fe=l.cloneElement(fe,{focusElementRef:re}));const he=C?null:{onDragEnter:ce("cellDragEnter",G),onDragOver:ce("cellDragOver",D)};return(0,a.jsx)("div",(0,r.cG)({className:(0,n.c)(ie.root,ee,b),role:"gridcell","data-field":L,"data-colindex":m,"aria-colindex":m+1,"aria-colspan":w,"aria-rowspan":de,style:pe,title:ge,tabIndex:Y,onClick:ce("cellClick",M),onDoubleClick:ce("cellDoubleClick",P),onMouseOver:ce("cellMouseOver",O),onMouseDown:se("cellMouseDown"),onMouseUp:ae("cellMouseUp"),onKeyDown:ce("cellKeyDown",T),onKeyUp:ce("cellKeyUp",F)},he,H,{onFocus:me,ref:ne,children:fe}))}));"production"!==n.p.env.NODE_ENV&&(mc.propTypes={align:i.oneOf(["center","left","right"]).isRequired,colIndex:i.number.isRequired,colSpan:i.number,column:i.object.isRequired,disableDragEvents:i.bool,isNotVisible:i.bool.isRequired,pinnedOffset:i.number,pinnedPosition:i.oneOf([0,1,2,3]).isRequired,row:i.object.isRequired,rowId:i.oneOfType([i.number,i.string]).isRequired,rowNode:i.object.isRequired,showLeftBorder:i.bool.isRequired,showRightBorder:i.bool.isRequired,width:i.number.isRequired});const hc=Xo(mc),bc=["field","type","align","width","height","empty","style","className"],vc="1.3em",wc=[40,80],Cc={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},yc=function(e){const t=function(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}(e);return(e,o)=>e+(o-e)*t()}(12345);function xc(e){const{field:t,type:o,align:i,width:s,height:c,empty:u=!1,style:d,className:p}=e,f=(0,r.cH)(e,bc),g=qe(),m=(e=>{const{align:t,classes:o,empty:n}=e,l={root:["cell","cellSkeleton",`cell--text${t?(0,r.aC)(t):"Left"}`,n&&"cellEmpty"]};return(0,r.I)(l,Yo,o)})({classes:g.classes,align:i,empty:u}),h=l.useMemo((()=>
83{if("boolean"===o||"actions"===o)return{variant:"circular",width:vc,height:vc};const[e,t]=o?Cc[o]??wc:wc;return{variant:"text",width:`${Math.round(yc(e,t))}%`,height:"1.2em"}}),[o]);return(0,a.jsx)("div",(0,r.cG)({"data-field":t,className:(0,n.c)(m.root,p),style:(0,r.cG)({height:c,maxWidth:s,minWidth:s},d)},f,{children:!u&&(0,a.jsx)(g.slots.baseSkeleton,(0,r.cG)({},h))}))}"production"!==n.p.env.NODE_ENV&&(xc.propTypes={align:i.string,empty:i.bool,field:i.string,height:i.oneOfType([i.oneOf(["auto"]),i.number]),type:i.oneOf(["actions","boolean","custom","date","dateTime","number","singleSelect","string"]),width:i.oneOfType([i.number,i.string])});const Rc=Xo(xc),Sc={width:3,rx:1.5,x:10.5},Ic=e=>e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||0===e.current.state.dimensions.scrollbarSize),Mc=(0,r.H)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Jo.autoHeight}`]:t.autoHeight},{[`&.${Jo.autosizing}`]:t.autosizing},{[`&.${Jo["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${Jo["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${Jo["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${Jo["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${Jo["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${Jo.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${Jo.actionsCell}`]:t.actionsCell},{[`& .${Jo.booleanCell}`]:t.booleanCell},{[`& .${Jo.cell}`]:t.cell},{[`& .${Jo["cell--editable"]}`]:t["cell--editable"]},{[`& .${Jo["cell--editing"]}`]:t["cell--editing"]},{[`& .${Jo["cell--flex"]}`]:t["cell--flex"]},{[`& .${Jo["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${Jo["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${Jo["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${Jo["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${Jo["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${Jo["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${Jo["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${Jo["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${Jo["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${Jo["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${Jo["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${Jo["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${Jo.cellCheckbox}`]:t.cellCheckbox},{[`& .${Jo.cellEmpty}`]:t.cellEmpty},{[`& .${Jo.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${Jo.cellSkeleton}`]:t.cellSkeleton},{[`& .${Jo.checkboxInput}`]:t.checkboxInput},{[`& .${Jo.columnHeader}`]:t.columnHeader},{[`& .${Jo["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${Jo["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${Jo["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${Jo["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${Jo["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${Jo["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${Jo["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${Jo["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${Jo["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${Jo["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${Jo["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${Jo["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${Jo["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${Jo["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${Jo["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${Jo["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${Jo["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${Jo["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${Jo.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${Jo.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${Jo.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${Jo.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${Jo.columnSeparator}`]:t.columnSeparator},{[`& .${Jo["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${Jo["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${Jo["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${Jo["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${Jo["container--bottom"]}`]:t["container--bottom"]},{[`& .${Jo["container--top"]}`]:t["container--top"]},{[`& .${Jo.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${Jo["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${Jo.editBooleanCell}`]:t.editBooleanCell},{[`& .${Jo.filterIcon}`]:t.filterIcon},{[`& .${Jo["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${Jo["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${Jo["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${Jo.groupingCriteriaCell}`]:t.groupingCriteriaCell}
83,{[`& .${Jo.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${Jo.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${Jo.headerFilterRow}`]:t.headerFilterRow},{[`& .${Jo.iconSeparator}`]:t.iconSeparator},{[`& .${Jo.menuIcon}`]:t.menuIcon},{[`& .${Jo.menuIconButton}`]:t.menuIconButton},{[`& .${Jo.menuList}`]:t.menuList},{[`& .${Jo.menuOpen}`]:t.menuOpen},{[`& .${Jo.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${Jo.pinnedRows}`]:t.pinnedRows},{[`& .${Jo["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${Jo["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${Jo.row}`]:t.row},{[`& .${Jo["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${Jo["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${Jo["row--dragging"]}`]:t["row--dragging"]},{[`& .${Jo["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${Jo["row--editable"]}`]:t["row--editable"]},{[`& .${Jo["row--editing"]}`]:t["row--editing"]},{[`& .${Jo["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${Jo["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${Jo.rowReorderCell}`]:t.rowReorderCell},{[`& .${Jo["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${Jo.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${Jo.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${Jo.rowSkeleton}`]:t.rowSkeleton},{[`& .${Jo.scrollbar}`]:t.scrollbar},{[`& .${Jo["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${Jo["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${Jo.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${Jo["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${Jo["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${Jo["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${Jo["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${Jo.sortIcon}`]:t.sortIcon},{[`& .${Jo.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${Jo.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${Jo.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${Jo.withBorderColor}`]:t.withBorderColor}]})((()=>{const e=Ga(),t=Po(e,Ic),o=tt.colors.background.base,n=tt.header.background.base,r=tt.cell.background.pinned,l=function(e){return Pc(e,1)}(tt.colors.interactive.hover),i=tt.colors.interactive.hoverOpacity,a=tt.colors.interactive.selected,s=tt.colors.interactive.selectedOpacity,c=a,u=`calc(${s} + ${i})`,d=kc(o,l,i),p=kc(o,a,s),f=kc(o,c,u),g=kc(r,l,i),m=kc(r,a,s),h=kc(r,c,u),b=e=>({[`& .${Jo["cell--pinnedLeft"]}, & .${Jo["cell--pinnedRight"]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:kc(e,p,s),"&:hover":{backgroundColor:kc(e,f,u)}}}}),v=b(g),w=b(m),C=b(h),y={backgroundColor:p,"&:hover":{backgroundColor:f,"@media (hover: none)":{backgroundColor:p}}};return{"--unstable_DataGrid-radius":tt.radius.base,"--unstable_DataGrid-headWeight":tt.typography.fontWeight.medium,"--DataGrid-rowBorderColor":tt.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:tt.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:tt.colors.background.base,color:tt.colors.foreground.base,font:tt.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${Jo.main} > *:first-child/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${Jo.autoHeight}`]:{height:"auto"},[`&.${Jo.autosizing}`]:{[`& .${Jo.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${Jo.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${Jo.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${Jo.groupingCriteriaCell}`]:{width:"unset"},[`& .${Jo.treeDataGroupingCell}`]:{width:"unset"}},[`&.${Jo.withSidePanel}`]:{flexDirection:"row"},[`& .${Jo.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${Jo.columnHeader}, & .${Jo.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${Jo.columnHeader}:focus-within, & .${Jo.cell}:focus-within`]:{outline:`solid ${Pc(tt.colors.interactive.focus,.5)} 1px`,outlineOffset:-1},[`& .${Jo.columnHeader}:focus, & .${Jo.cell}:focus`]:{outline:`solid ${tt.colors.interactive.focus} 1px`,outlineOffset:-1},[`& .${Jo.columnHeader}:focus,\n & .${Jo["columnHeader--withLeftBorder"]}
83,\n & .${Jo["columnHeader--withRightBorder"]},\n & .${Jo["columnHeader--siblingFocused"]},\n & .${Jo["virtualScroller--hasScrollX"]} .${Jo["columnHeader--lastUnpinned"]},\n & .${Jo["virtualScroller--hasScrollX"]} .${Jo["columnHeader--last"]}\n `]:{[`& .${Jo.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${Jo["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${Jo["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${Jo["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${Jo["root--noToolbar"]} [aria-rowindex="1"] .${Jo["columnHeader--last"]}`]:{borderTopRightRadius:t?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${Jo.columnHeaderCheckbox}, & .${Jo.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${Jo.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:n},[`& .${Jo["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${Jo["virtualScroller--hasScrollX"]} .${Jo["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${Jo["pivotPanelField--sorted"]} .${Jo.iconButtonContainer},\n & .${Jo["columnHeader--sorted"]} .${Jo.iconButtonContainer},\n & .${Jo["columnHeader--filtered"]} .${Jo.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${Jo.pivotPanelField}:not(.${Jo["pivotPanelField--sorted"]}) .${Jo.sortButton},\n & .${Jo.columnHeader}:not(.${Jo["columnHeader--sorted"]}) .${Jo.sortButton}`]:{opacity:0,transition:tt.transition(["opacity"],{duration:tt.transitions.duration.short})},[`& .${Jo.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:tt.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${Jo.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${Jo["columnHeader--filledGroup"]} .${Jo.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${Jo.sortIcon}, & .${Jo.filterIcon}`]:{fontSize:"inherit"},[`& .${Jo["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${Jo["columnHeader--alignCenter"]} .${Jo.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${Jo["columnHeader--alignRight"]} .${Jo.columnHeaderDraggableContainer}, & .${Jo["columnHeader--alignRight"]} .${Jo.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${Jo["columnHeader--alignCenter"]} .${Jo.menuIcon}`]:{marginLeft:"auto"},[`& .${Jo["columnHeader--alignRight"]} .${Jo.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${Jo["columnHeader--moving"]}`]:{backgroundColor:d},[`& .${Jo["columnHeader--pinnedLeft"]}, & .${Jo["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:tt.header.background.base},[`& .${Jo.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:10,color:tt.colors.border.base},[`& .${Jo.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:n},"@media (hover: hover)":{[`& .${Jo.columnHeader}:hover`]:{[`& .${Jo.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${Jo.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${Jo.columnHeader}:not(.${Jo["columnHeader--sorted"]}):hover .${Jo.sortButton},\n & .${Jo.pivotPanelField}:not(.${Jo["pivotPanelField--sorted"]}):hover .${Jo.sortButton},\n & .${Jo.pivotPanelField}:not(.${Jo["pivotPanelField--sorted"]}) .${Jo.sortButton}:focus-visible`]:{opacity:.5}},"@media (hover: none)":{[`& .${Jo.columnHeader} .${Jo.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${Jo.columnHeader}:focus,\n & .${Jo["columnHeader--siblingFocused"]}`]:{[`.${Jo["columnSeparator--resizable"]}`]:{color:tt.colors.foreground.accent}},[`& .${Jo.pivotPanelField}:not(.${Jo["pivotPanelField--sorted"]}) .${Jo.sortButton}`]:{opacity:.5}},[`& .${Jo["columnSeparator--sideLeft"]}`]:{left:-5},[`& .${Jo["columnSeparator--sideRight"]}`]:{right:-5},[`& .${Jo["columnHeader--withRightBorder"]} .${Jo["columnSeparator--sideLeft"]}`]:{left:-5.5},[`& .${Jo["columnHeader--withRightBorder"]} .${Jo["columnSeparator--sideRight"]}`]:{right:-5.5},[`& .${Jo["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${Jo["columnSeparator--resizing"]}`]:{color:tt.colors.foreground.accent},"@media (hover: none)":{[`& .${Jo.iconSeparator} rect`]:Sc},"@media (hover: hover)":{"&:hover":{color:tt.colors.foreground.accent,[`& .${Jo.iconSeparator} rect`]:Sc}},"& svg":{pointerEvents:"none"}},[`& .${Jo.iconSeparator}`]:{color:"inherit",transition:tt.transition(["color","width"],{duration:tt.transitions.duration.short})},[`& .${Jo.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${Jo.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${Jo.headerFilterRow}`]:{[`& .${Jo.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${Jo["row--borderBottom"]} .${Jo.columnHeader},\n & .${Jo["row--borderBottom"]} .${Jo.filler},\n & .${Jo["row--borderBottom"]} .${Jo.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${Jo["row--borderBottom"]} .${Jo.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${Jo.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${Jo["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:d,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Jo.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":y},[`& .${Jo["container--top"]}, & .${Jo["container--bottom"]}`]:{"[role=row]":{background:tt.colors.background.base}},[`& .${Jo.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",
83whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":y},[`& .${Jo["virtualScrollerContent--overflowed"]} .${Jo["row--lastVisible"]} .${Jo.cell}`]:{borderTopColor:"transparent"},[`& .${Jo.pinnedRows} .${Jo.row}, .${Jo.aggregationRowOverlayWrapper} .${Jo.row}`]:{backgroundColor:r,"&:hover":{backgroundColor:g}},[`& .${Jo["pinnedRows--top"]} :first-of-type`]:{[`& .${Jo.cell}, .${Jo.scrollbarFiller}`]:{borderTop:"none"}},[`&.${Jo["root--disableUserSelection"]} .${Jo.cell}`]:{userSelect:"none"},[`& .${Jo["row--dynamicHeight"]} > .${Jo.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${Jo.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${Jo.cell}.${Jo["cell--selectionMode"]}`]:{cursor:"default"},[`& .${Jo.cell}.${Jo["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:tt.shadows.base,backgroundColor:tt.colors.background.overlay,"&:focus-within":{outline:`1px solid ${tt.colors.interactive.focus}`,outlineOffset:-1}},[`& .${Jo["row--editing"]}`]:{boxShadow:tt.shadows.base},[`& .${Jo["row--editing"]} .${Jo.cell}`]:{boxShadow:"none",backgroundColor:tt.colors.background.overlay},[`& .${Jo.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${Jo.booleanCell}[data-value="true"]`]:{color:tt.colors.foreground.muted},[`& .${Jo.booleanCell}[data-value="false"]`]:{color:tt.colors.foreground.disabled},[`& .${Jo.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:tt.spacing(1)},[`& .${Jo.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:tt.colors.interactive.disabledOpacity},[`& .${Jo["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${Jo.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${Jo.withBorderColor}`]:{borderColor:tt.colors.border.base},[`& .${Jo["cell--withLeftBorder"]}, & .${Jo["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${Jo["cell--withRightBorder"]}, & .${Jo["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${Jo["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${Jo["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${Jo["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${Jo["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${Jo["cell--pinnedLeft"]}, & .${Jo["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:tt.cell.background.pinned,"&.Mui-selected":{backgroundColor:m}},[`& .${Jo.row}`]:{"&:hover":v,"&.Mui-selected":w,"&.Mui-selected:hover":C},[`& .${Jo.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${Jo.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${Jo.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${Jo.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${Jo["columnHeader--dragging"]}, & .${Jo["row--dragging"]}`]:{background:tt.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:tt.colors.interactive.disabledOpacity},[`& .${Jo["row--dragging"]}`]:{background:tt.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:tt.colors.interactive.disabledOpacity,[`& .${Jo.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${Jo.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${Jo.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:tt.spacing(2)},[`& .${Jo.treeDataGroupingCellLoadingContainer}, .${Jo.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${Jo.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${Jo.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:tt.spacing(2)},[`.${Jo.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${Jo["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${Jo["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${Jo["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:tt.cell.background.pinned,position:"sticky",right:0}},[`& .${Jo.filler}`]:{flex:"1 0 auto"},[`& .${Jo["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${Jo["main--hiddenContent"]}`]:{[`& .${Jo.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"}
83,[`& .${Jo["scrollbar--vertical"]}, & .${Jo.pinnedRows}, & .${Jo.virtualScroller} > .${Jo.filler}`]:{display:"none"}}}}));function Pc(e,t){return`rgba(from ${e} r g b / ${t})`}function kc(e,t,o){return`color-mix(in srgb,${e}, ${t} calc(${o} * 100%))`}const Ec=()=>()=>{},Oc=()=>!1,Tc=()=>!0,Fc=l.createContext(void 0);function Gc(){const e=l.useContext(Fc);if(void 0===e)throw new Error("MUI X: Missing context.");return e}function Dc(e){let{children:t}=e;const o=l.useRef(null),n=l.useRef(null),r=l.useRef(null),i=l.useMemo((()=>({columnsPanelTriggerRef:o,filterPanelTriggerRef:n,aiAssistantPanelTriggerRef:r})),[]);return(0,a.jsx)(Fc.Provider,{value:i,children:t})}function Hc(){var e;const t=Ae(),o=Po(t,br),n=qe(),l=Po(t,Us),{columnsPanelTriggerRef:i,filterPanelTriggerRef:s,aiAssistantPanelTriggerRef:c}=Gc(),u=t.current.unstable_applyPipeProcessors("preferencePanel",null,l.openedPanelValue??Xs.filters);let d=null;switch(l.openedPanelValue){case Xs.filters:d=s.current;break;case Xs.columns:d=i.current;break;case Xs.aiAssistant:d=c.current}return(0,a.jsx)(n.slots.panel,(0,r.cG)({id:l.panelId,open:o.length>0&&l.open,"aria-labelledby":l.labelId,target:d,onClose:()=>t.current.hidePreferences()},null==(e=n.slotProps)?void 0:e.panel,{children:u}))}function jc(){var e;const t=qe();return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(Hc,{}),t.showToolbar&&(0,a.jsx)(t.slots.toolbar,(0,r.cG)({},null==(e=t.slotProps)?void 0:e.toolbar))]})}const Nc=["className","children","sidePanel"],$c=ge((function(e,t){const o=qe(),{className:i,children:s,sidePanel:c}=e,u=(0,r.cH)(e,Nc),d=Ga(),p=Po(d,un),f=d.current.rootElementRef,g=l.useCallback((e=>{null!==e&&d.current.publishEvent("rootMount",e)}),[d]),m=(0,r.aH)(f,t,g),h=o,b=((e,t)=>{const{autoHeight:o,classes:n,showCellVerticalBorder:l}=e,i={root:["root",o&&"autoHeight",`root--density${(0,r.aC)(t)}`,null===e.slots.toolbar&&"root--noToolbar","withBorderColor",l&&"withVerticalBorder"]};return(0,r.I)(i,Yo,n)})(h,p),v=l.useContext(Ur);return r.c$.useSyncExternalStore(Ec,Oc,Tc)?null:(0,a.jsxs)(Mc,(0,r.cG)({className:(0,n.c)(b.root,i,v.className,c&&Jo.withSidePanel),ownerState:h},u,{ref:m,children:[(0,a.jsxs)("div",{className:Jo.mainContent,role:"presentation",children:[(0,a.jsx)(jc,{}),(0,a.jsx)(ic,{children:s}),(0,a.jsx)(ac,{})]}),c,v.tag]}))}));"production"!==n.p.env.NODE_ENV&&($c.propTypes={sidePanel:i.node,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Lc=Xo($c),Vc=["className"],zc=(0,s.s)("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),Ac=ge((function(e,t){const{className:o}=e,l=(0,r.cH)(e,Vc),i=qe(),s=(e=>{const{classes:t}=e;return(0,r.I)({root:["footerContainer","withBorderColor"]},Yo,t)})(i);return(0,a.jsx)(zc,(0,r.cG)({className:(0,n.c)(s.root,o),ownerState:i},l,{ref:t}))}));"production"!==n.p.env.NODE_ENV&&(Ac.propTypes={sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Bc=["className"],qc=(0,s.s)("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:tt.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:tt.colors.background.backdrop}),Wc=ge((function(e,t){const{className:o}=e,l=(0,r.cH)(e,Bc),i=qe(),s=(e=>{const{classes:t}=e;return(0,r.I)({root:["overlay"]},Yo,t)})(i);return(0,a.jsx)(qc,(0,r.cG)({className:(0,n.c)(s.root,o),ownerState:i},l,{ref:t}))}));function _c(e,t,o){return"function"==typeof t?t(o,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}):t?(t.props.className&&(o.className=(0,n.c)(t.props.className,o.className)),(t.props.style||o.style)&&(o.style=(0,r.cG)({},o.style,t.props.style)),(t.props.sx||o.sx)&&(o.sx=function(e,t){return e&&t?(Array.isArray(e)?e:[e]).concat(Array.isArray(t)?t:[t]):e||t}(o.sx,t.props.sx)),l.cloneElement(t,o)):l.createElement(e,o)}"production"!==n.p.env.NODE_ENV&&(Wc.propTypes={sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Uc=l.createContext(void 0);const Kc=["render","className"],Xc=(0,s.s)("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:tt.spacing(.25),padding:tt.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${tt.colors.border.base}`}),Qc=ge((function(e,t){const{render:o,className:i}=e,s=(0,r.cH)(e,Kc),c=qe(),u=(e=>{const{classes:t}=e;return(0,r.I)({root:["toolbar"]},Yo,t)})(c),[d,p]=l.useState(null),[f,g]=l.useState([]),m=l.useCallback(((e,t)=>{g((o=>[...o,{id:e,ref:t}]))}),[]),h=l.useCallback((e=>{g((t=>t.filter((t=>
83t.id!==e)))),d===e&&p(null)}),[d]),b=l.useCallback((function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];var n,r;let l=e;const i=f.length;for(let a=0;a<i;a+=1){if(l+=t,l>=i){if(!o)return-1;l=0}else if(l<0){if(!o)return-1;l=i-1}if((null==(n=f[l].ref.current)||!n.disabled)&&"true"!==(null==(r=f[l].ref.current)?void 0:r.ariaDisabled))return l}return-1}),[f]),v=l.useCallback((e=>{var t;if(!d)return;const o=f.findIndex((e=>e.id===d));let n=-1;if("ArrowRight"===e.key?(e.preventDefault(),n=b(o,1)):"ArrowLeft"===e.key?(e.preventDefault(),n=b(o,-1)):"Home"===e.key?(e.preventDefault(),n=b(-1,1,!1)):"End"===e.key&&(e.preventDefault(),n=b(f.length,-1,!1)),n>=0&&n<f.length){const e=f[n];p(e.id),null==(t=e.ref.current)||t.focus()}}),[f,d,b]),w=l.useCallback((e=>{d!==e&&p(e)}),[d]),C=l.useCallback((e=>{var t;const o=f.findIndex((t=>t.id===e)),n=b(o,1);if(n>=0&&n<f.length){const e=f[n];p(e.id),null==(t=e.ref.current)||t.focus()}}),[f,b]),y=l.useMemo((()=>({focusableItemId:d,registerItem:m,unregisterItem:h,onItemKeyDown:v,onItemFocus:w,onItemDisabled:C})),[d,m,h,v,w,C]),x=_c(Xc,o,(0,r.cG)({role:"toolbar","aria-orientation":"horizontal","aria-label":c.label||void 0,className:(0,n.c)(u.root,i)},s,{ref:t}));return l.useEffect((()=>{f.length>0&&p(f[0].id)}),[f]),(0,a.jsx)(Uc.Provider,{value:y,children:x})}));"production"!==n.p.env.NODE_ENV&&(Qc.propTypes={render:i.oneOfType([i.element,i.func])});const Yc=["render","onKeyDown","onFocus","disabled","aria-disabled"],Jc=ge((function(e,t){var o;const{render:n,onKeyDown:i,onFocus:s,disabled:c,"aria-disabled":u}=e,d=(0,r.cH)(e,Yc),p=(0,r.aI)(),f=qe(),g=l.useRef(null),m=(0,r.aH)(g,t),{focusableItemId:h,registerItem:b,unregisterItem:v,onItemKeyDown:w,onItemFocus:C,onItemDisabled:y}=function(){const e=l.useContext(Uc);if(void 0===e)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return e}();l.useEffect((()=>(b(p,g),()=>v(p))),[]);const x=l.useRef(c);l.useEffect((()=>{x.current!==c&&!0===c&&y(p,c),x.current=c}),[c,p,y]);const R=l.useRef(u);l.useEffect((()=>{R.current!==u&&!0===u&&y(p,!0),R.current=u}),[u,p,y]);const S=_c(f.slots.baseIconButton,n,(0,r.cG)({},null==(o=f.slotProps)?void 0:o.baseIconButton,{tabIndex:h===p?0:-1},d,{disabled:c,"aria-disabled":u,onKeyDown:e=>{w(e),null==i||i(e)},onFocus:e=>{C(p),null==s||s(e)},ref:m}));return(0,a.jsx)(l.Fragment,{children:S})}));"production"!==n.p.env.NODE_ENV&&(Jc.propTypes={className:i.string,color:i.oneOf(["default","inherit","primary"]),disabled:i.bool,edge:i.oneOf(["end","start",!1]),id:i.string,label:i.string,render:i.oneOfType([i.element,i.func]),role:i.string,size:i.oneOf(["large","medium","small"]),style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const Zc=l.memo((e=>{var t,o;const{colDef:n,open:i,columnMenuId:s,columnMenuButtonId:c,iconButtonRef:u}=e,d=Ae(),p=qe(),f=(e=>{const{classes:t,open:o}=e;return(0,r.I)({root:["menuIcon",o&&"menuOpen"],button:["menuIconButton"]},Yo,t)})((0,r.cG)({},e,{classes:p.classes})),g=l.useCallback((e=>{e.preventDefault(),e.stopPropagation(),d.current.toggleColumnMenu(n.field)}),[d,n.field]),m=n.headerName??n.field;return(0,a.jsx)("div",{className:f.root,children:(0,a.jsx)(p.slots.baseTooltip,(0,r.cG)({title:d.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},null==(t=p.slotProps)?void 0:t.baseTooltip,{children:(0,a.jsx)(p.slots.baseIconButton,(0,r.cG)({ref:u,tabIndex:-1,className:f.button,"aria-label":d.current.getLocaleText("columnMenuAriaLabel")(m),size:"small",onClick:g,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":i?s:void 0,id:c},null==(o=p.slotProps)?void 0:o.baseIconButton,{children:(0,a.jsx)(p.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})}));function eu(e){let{columnMenuId:t,columnMenuButtonId:o,ContentComponent:n,contentComponentProps:l,field:i,open:s,target:c,onExited:u}=e;const d=Ae(),p=d.current.getColumn(i),f=(0,r.cK)((e=>{e&&(e.stopPropagation(),null!=c&&c.contains(e.target))||d.current.hideColumnMenu()}));return c&&p?(0,a.jsx)(Zr,{position:"bottom-"+("right"===p.align?"start":"end"),open:s,target:c,onClose:f,onExited:u,children:(0,a.jsx)(n,(0,r.cG)({colDef:p,hideMenu:f,o
83pen:s,id:t,labelledby:o},l))}):null}function tu(e,t){return e.closest(`.${t}`)}function ou(e){return e.replace(/["\\]/g,"\\$&")}function nu(e){return`.${Jo.row}[data-id="${ou(String(e))}"]`}function ru(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function lu(e,t){return e.rootElementRef.current.querySelector(`.${Jo[t]}`)}"production"!==n.p.env.NODE_ENV&&(eu.propTypes={columnMenuButtonId:i.string,columnMenuId:i.string,ContentComponent:i.elementType.isRequired,contentComponentProps:i.any,field:i.string.isRequired,onExited:i.func,open:i.bool.isRequired,target:r.d0});const iu=e=>{let{api:t,colIndex:o,position:n,filterFn:r}=e;if(null===o)return[];const l=[];return su(t).forEach((e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${Jo["left"===n?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach((e=>{const t=cu(e);null!==t&&r(t)&&l.push(e)}))})),l};const au=e=>{let{api:t,colIndex:o,position:n,filterFn:r}=e;var l;if(null==(l=t.columnHeadersContainerRef)||!l.current)return[];if(null===o)return[];const i=[];return t.columnHeadersContainerRef.current.querySelectorAll(`.${Jo["left"===n?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach((e=>{const t=cu(e);null!==t&&r(t,e)&&i.push(e)})),i};function su(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${Jo.row}`)}function cu(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const uu=["className","aria-label"],du=(0,s.s)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),pu=ge((function(e,t){const{className:o}=e,l=(0,r.cH)(e,uu),i=qe(),s=(e=>{const{classes:t}=e;return(0,r.I)({root:["columnHeaderTitle"]},Yo,t)})(i);return(0,a.jsx)(du,(0,r.cG)({className:(0,n.c)(s.root,o),ownerState:i},l,{ref:t}))}));function fu(e){var t;const{label:o,description:n}=e,i=qe(),s=l.useRef(null),[c,u]=l.useState(""),d=l.useCallback((()=>{if(!n&&null!=s&&s.current){const e=function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(s.current);u(e?o:"")}}),[n,o]);return(0,a.jsx)(i.slots.baseTooltip,(0,r.cG)({title:n||c},null==(t=i.slotProps)?void 0:t.baseTooltip,{children:(0,a.jsx)(pu,{onMouseOver:d,ref:s,children:o})}))}"production"!==n.p.env.NODE_ENV&&(fu.propTypes={columnWidth:i.number.isRequired,description:i.node,label:i.string.isRequired});const gu=["resizable","resizing","height","side"];var mu=function(e){return e.Left="left",e.Right="right",e}(mu||{});function hu(e){const{height:t,side:o=mu.Right}=e,n=(0,r.cH)(e,gu),i=qe(),s=(e=>{const{resizable:t,resizing:o,classes:n,side:l}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",o&&"columnSeparator--resizing",l&&`columnSeparator--side${(0,r.aC)(l)}`],icon:["iconSeparator"]};return(0,r.I)(i,Yo,n)})((0,r.cG)({},e,{side:o,classes:i.classes})),c=l.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,a.jsx)("div",(0,r.cG)({className:s.root,style:{minHeight:t}},n,{onClick:c,children:(0,a.jsx)(i.slots.columnResizeIcon,{className:s.icon})}))}const bu=l.memo(hu);"production"!==n.p.env.NODE_ENV&&(hu.propTypes={height:i.number.isRequired,resizable:i.bool.isRequired,resizing:i.bool.isRequired,side:i.oneOf(["left","right"])});const vu=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],wu=ge((function(e,t){const{classes:o,colIndex:i,height:s,isResizing:c,sortDirection:u,hasFocus:d,tabIndex:p,separatorSide:f,isDraggable:g,headerComponent:m,description:h,width:b,columnMenuIconButton:v=null,columnMenu:w=null,columnTitleIconButtons:C=null,headerClassName:y,label:x,resizable:R,draggableContainerProps:S,columnHeaderSeparatorProps:I,style:M}=e,P=(0,r.cH)(e,vu),k=Ga(),E=qe(),O=l.useRef(null),T=(0,r.aH)(O,t);let F="none";return null!=u&&(F="asc"===u?"ascending":"descending"),l.useLayoutEffect((()=>{var e;const t=k.current.state.columnMenu;if(d&&!t.open){const t=O.current.querySelector('[tabindex="0"]')||O.current;null==t||t.focus(),null!=(e=k.current.columnHeadersContainerRef)&&e.current&&(k.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[k,d]),(0,a.jsxs)("div",(0,r.cG)({className:(0,n.c)(o.root,y),style:(0,r.cG)({},M,{width:b}),role:"columnheader",tabIndex:p,"aria-colindex":i+1,"aria-sort":F},P,{ref:T,children:[(0,a.jsxs)("div",(0,r.cG)({className:o.draggableContainer,draggable:g,role:"presentation"},S,{children:[(0,a.jsxs)("div",{className:o.titleContainer,role:"presentation",children:[(0,a.jsx)("div",{className:o.titleContainerContent,children:void 0!==m?m:(0,a.jsx)(fu,{label:x,description:h,columnWidth:b})}),C]}),v]})),(0,a.jsx)(bu,(0,r.cG)({resizable:!E.disableColumnResize&&!!R,resizing:c,height:s,side:f},I)),w]}))}));function Cu(e){var t,o,i;const{colDef:s,columnMenuOpen:c,colIndex:u,headerHeight:d,isResizing:p,isLast:f,sortDirection:g,sortIndex:m,filterItemsCounter:h,hasFocus:b,tabIndex:v,disableReorder:w,separatorSide:C,showLeftBorder:y,showRightBorder:x,pinnedPosition:R,pinnedOffset:S}=e,I=Ga(),M=qe(),P=(0,r.cN)(),k=l.useRef(null),E=(0,r.aI)(),O=(0,r.aI)(),T=l.useRef(null),[F,G]=l.useState(c),D=l.useMemo((()=>!M.disableColumnReorder&&!w&&!s.disableReorder),[M.disableColumnReorder,w,s.disableReorder]);let H;s.renderHeader&&(H=s.renderHeader(I.current.getColumnHeaderParams(s.field)));const j=(e=>{const{colDef:t,classes:o,isDragging:n,sortDirection:l,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:c,isLastUnpinned:u,isSiblingFocused:d}=e,p=null!=l,f=null!=s&&s>0,g="number"===t.type,m={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",n&&"columnHeader--moving",p&&"columnHeader--sorted",f&&"columnHeader--filtered",g&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",c===yl.LEFT&&"columnHeader--pinnedLeft",c===yl.RIGHT&&"columnHeader--pinnedRight",u&&"columnHeader--lastUnpinned",d&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,r.I)(m,Yo,o)})((0,r.cG)({},e,{classes:M.classes,showRightBorder:x,showLeftBorder:y})),N=l.useCallback((e=>t=>{ru(t)||I.current.publishEvent(e,I.current.getColumnHeaderParams(s.field),t)}),[I,s.field]),$=l.useMemo((()=>({onClick:N("columnHeaderClick"),onContextMenu:N("columnHeaderContextMenu"),onDoubleClick:N("columnHeaderDoubleClick"),onMouseOver:N("columnHeaderOver"),onMouseOut:N("columnHeaderOut"),onMouseEnter:N("columnHeaderEnter"),onMouseLeave:N("columnHeaderLeave"),onKeyDown:N("columnHeaderKeyDown"),onFocus:N("columnHeaderFocus"),onBlur:N("columnHeaderBlur")})),[N]),L=l.useMemo((()=>D?{onDragStart:N("columnHeaderDragStart"),onDragEnter:N("columnHeaderDragEnter"),onDragOver:N("columnHeaderDragOver"),onDragEnd:N("columnHeaderDragEnd")}:{}),[D,N]),V=l.useMemo((()=>({onMouseDown:N("columnSeparatorMouseDown"),onDoubleClick:N("columnSeparatorDoubleClick")})),[N]);l.useEffect((()=>{F||G(c)}),[F,c]);const z=l.useCallback((()=>{G(!1)}),[]),A=!M.disableColumnMenu&&!s.disableColumnMenu&&(0,a.jsx)(Zc,{colDef:s,columnMenuId:E,columnMenuButtonId:O,open:F,iconButtonRef:T}),B=(0,a.jsx)(eu,{columnMenuId:E,columnMenuButtonId:O,field:s.field,open:c,target:T.current,ContentComponent:M.slots.columnMenu,contentComponentProps:null==(t=M.slotProps)?void 0:t.columnMenu,onExited:z}),q=s.sortingOrder??M.sortingOrder,W=(s.sortable||null!=g)&&!s.hideSortIcons&&!M.disableColumnSorting,_=(0,a.jsxs)(l.Fragment,{children:[!M.disableColumnFilter&&(0,a.jsx)(M.slots.columnHeaderFilterIconButton,(0,r.cG)({field:s.field,counter:h},null==(o=M.slotProps)?void 0:o.columnHeaderFilterIconButton)),W&&(0,a.jsx)(M.slots.columnHeaderSortIcon,(0,r.cG)({field:s.field,direction:g,index:m,sortingOrder:q,disabled:!s.sortable},null==(i=M.slotProps)?void 0:i.columnHeaderSortIcon))]});l.useLayoutEffect((()=>{var e;const t=I.current.state.columnMenu;if(b&&!t.open){const t=k.current.querySelector('[tabindex="0"]')||k.current;null==t||t.focus(),null!=(e=I.current.columnHeadersContainerRef)&&e.current&&(I.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[I,b]);const U="function"==typeof s.headerClassName?s.headerClassName({field:s.field,colDef:s}):s.headerClassName,K=s.headerName??s.field,X=l.useMemo((()=>dc((0,r.cG)({},e.style),P,R,S)),[R,S,e.style,P]);return(0,a.jsx)(wu,(0,r.cG)({ref:k,classes:j,columnMenuOpen:c,colIndex:u,height:d,isResizing:p,sortDirection:g,hasFocus:b,tabIndex:v,separatorSide:C,isDraggable:D,headerComponent:H,description:s.description,elementId:s.field,width:s.computedWidth,columnMenuIconButton:A,columnTitleIconButtons:_,headerClassName:(0,n.c)(U,f&&Jo["columnHeader--last"]),label:K,resizable:!M.disableColumnResize&&!!s.resizable,"data-field":s.field,columnMenu:B,draggableContainerProps:L,columnHeaderSeparatorProps:V,style:X},$))}"production"!==n.p.env.NODE_ENV&&(Cu.propTypes={colDef:i.object.isRequired,colIndex:i.number.isRequired,columnMenuOpen:i.bool.isRequired,disableReorder:i.bool,filterItemsCounter:i.number,hasFocus:i.bool,headerHeight:i.number.isRequired,isDragging:i.bool.isRequired,isLast:i.bool.isRequired,isLastUnpinned:i.bool.isRequired,isResizing:i.bool.isRequired,isSiblingFocused:i.bool.isRequired,pinnedOffset:i.number,pinnedPosition:i.oneOf([0,1,2,3]),separatorSide:i.oneOf(["left","right"]),showLeftBorder:i.bool.isRequired,showRightBorder:i.bool.isRequired,sortDirection:i.oneOf(["asc","desc"]),sortIndex:i.number,style:i.object,tabIndex:i.oneOf([-1,0]).isRequired});const yu=Xo(Cu),xu=["className"],Ru=(0,s.s)("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})((()=>
83({display:"flex",visibility:"hidden",width:0}))),Su=ge((function(e,t){const{className:o}=e,l=(0,r.cH)(e,xu),i=qe(),s=(e=>{const{classes:t}=e;return(0,r.I)({root:["iconButtonContainer"]},Yo,t)})(i);return(0,a.jsx)(Ru,(0,r.cG)({className:(0,n.c)(s.root,o),ownerState:i},l,{ref:t}))})),Iu=["sortingOrder"],Mu=l.memo((function(e){const{sortingOrder:t}=e,o=(0,r.cH)(e,Iu),n=qe(),[l]=t,i="asc"===l?n.slots.columnSortedAscendingIcon:n.slots.columnSortedDescendingIcon;return i?(0,a.jsx)(i,(0,r.cG)({},o)):null})),Pu=["direction","index","sortingOrder","disabled","className"],ku=e=>{const{classes:t}=e;return(0,r.I)({root:["sortButton"],icon:["sortIcon"]},Yo,t)},Eu=(0,s.s)(pn,{name:"MuiDataGrid",slot:"SortButton"})({transition:tt.transition(["opacity"],{duration:tt.transitions.duration.short,easing:tt.transitions.easing.easeInOut})});function Ou(e){var t;const{direction:o,index:i,sortingOrder:s,disabled:c,className:u}=e,d=(0,r.cH)(e,Pu),p=Ae(),f=qe(),g=(0,r.cG)({},e,{classes:f.classes}),m=ku(g),h=function(e,t,o,n){let l;const i={};return"asc"===t?l=e.columnSortedAscendingIcon:"desc"===t?l=e.columnSortedDescendingIcon:(l=Mu,i.sortingOrder=n),l?(0,a.jsx)(l,(0,r.cG)({fontSize:"small",className:o},i)):null}(f.slots,o,m.icon,s);if(!h)return null;const b=(0,a.jsx)(Eu,(0,r.cG)({as:f.slots.baseIconButton,ownerState:g,"aria-label":p.current.getLocaleText("columnHeaderSortIconLabel"),title:p.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:c,className:(0,n.c)(m.root,u)},null==(t=f.slotProps)?void 0:t.baseIconButton,d,{children:h}));return(0,a.jsxs)(l.Fragment,{children:[null!=i&&(0,a.jsx)(f.slots.baseBadge,{badgeContent:i,color:"default",overlap:"circular",children:b}),null==i&&b]})}function Tu(e){return(0,a.jsx)(Su,{children:(0,a.jsx)(Ou,(0,r.cG)({},e,{tabIndex:-1}))})}"production"!==n.p.env.NODE_ENV&&(Ou.propTypes={direction:i.oneOf(["asc","desc"]),disabled:i.bool,field:i.string.isRequired,index:i.number,onClick:i.func,sortingOrder:i.arrayOf(i.oneOf(["asc","desc"])).isRequired});const Fu=l.memo(Tu);"production"!==n.p.env.NODE_ENV&&(Tu.propTypes={className:i.string,color:i.oneOf(["default","inherit","primary"]),direction:i.oneOf(["asc","desc"]),disabled:i.bool,edge:i.oneOf(["end","start",!1]),field:i.string.isRequired,id:i.string,index:i.number,label:i.string,role:i.string,size:i.oneOf(["large","medium","small"]),sortingOrder:i.arrayOf(i.oneOf(["asc","desc"])).isRequired,style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const Gu=e=>{const{classes:t}=e;return(0,r.I)({icon:["filterIcon"]},Yo,t)};function Du(e){return e.counter?(0,a.jsx)(Hu,(0,r.cG)({},e)):null}function Hu(e){var t,o;const{counter:n,field:i,onClick:s}=e,c=Ae(),u=qe(),d=(0,r.cG)({},e,{classes:u.classes}),p=Gu(d),f=(0,r.aI)(),g=Po(c,Ks,f),m=(0,r.aI)(),h=l.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:o}=Us(c);t&&o===Xs.filters?c.current.hideFilterPanel():c.current.showFilterPanel(void 0,m,f),s&&s(c.current.getColumnHeaderParams(i),e)}),[c,i,s,m,f]);if(!n)return null;const b=(0,a.jsx)(u.slots.baseIconButton,(0,r.cG)({id:f,onClick:h,"aria-label":c.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?m:void 0},null==(t=u.slotProps)?void 0:t.baseIconButton,{children:(0,a.jsx)(u.slots.columnFilteredIcon,{className:p.icon,fontSize:"small"})}));return(0,a.jsx)(u.slots.baseTooltip,(0,r.cG)({title:c.current.getLocaleText("columnHeaderFiltersTooltipActive")(n),enterDelay:1e3},null==(o=u.slotProps)?void 0:o.baseTooltip,{children:(0,a.jsxs)(Su,{children:[n>1&&(0,a.jsx)(u.slots.baseBadge,{badgeContent:n,color:"default",children:b}),1===n&&b]})}))}function ju(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}"production"!==n.p.env.NODE_ENV&&(Du.propTypes={counter:i.number,field:i.string.isRequired,onClick:i.func}),"production"!==n.p.env.NODE_ENV&&(Hu.propTypes={counter:i.number,field:i.string.isRequired,onClick:i.func});const Nu=e=>0===e.indexOf("Arrow")||0===e.indexOf("Page")||" "===e||"Home"===e||"End"===e,$u=e=>"Tab"===e||"Escape"===e;function Lu(e){return(e.ctrlKey||e.metaKey)&&"V"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}const Vu=["hideMenu","colDef","id","labelledby","className","children","open"],zu=(0,r.H)(pn)((()=>({minWidth:248}))),Au=ge((function(e,t){const{hideMenu:o,id:i,labelledby:s,className:c,children:u,open:d}=e,p=(0,r.cH)(e,Vu),f=qe(),g=l.useCallback((e=>{"Tab"===e.key&&e.preventDefault(),$u(e.key)&&o(e)}),[o]);return(0,a.jsx)(zu,(0,r.cG)({as:f.slots.baseMenuList,id:i,className:(0,n.c)(Jo.menuList,c),"aria-labelledby":s,onKeyDown:g,autoFocus:d},p,{ref:t,children:u}))}));"production"!==n.p.env.NODE_ENV&&(Au.propTypes={colDef:i.object.isRequired,hideMenu:i.func.isRequired,id:i.string,labelledby:i.string,open:i.bool.isRequired});const Bu=["displayOrder"];function qu(e){const{colDef:t,onClick:o}=e,n=Ae(),r=qe(),i=1===Cr(n).filter((e=>!0!==e.disableColumnMenu)).length,s=l.useCallback((e=>{i||(n.current.setColumnVisibility(t.field,!1),o(e))}),[n,t.field,o,i]);return r.disableColumnSelector||!1===t.hideable?null:(0,a.jsx)(r.slots.baseMenuItem,{onClick:s,disabled:i,iconStart:(0,a.jsx)(r.slots.columnMenuHideIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuHideColumn")})}function Wu(e){const{onClick:t}=e,o=Ae(),n=qe(),r=l.useCallback((e=>{t(e),o.current.showPreferences(Xs.columns)}),[o,t]);return n.disableColumnSelector?null:(0,a.jsx)(n.slots.baseMenuItem,{onClick:r,iconStart:(0,a.jsx)(n.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:o.current.getLocaleText("columnMenuManageColumns")})}function _u(e){return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(qu,(0,r.cG)({},e)),(0,a.jsx)(Wu,(0,r.cG)({},e))]})}function Uu(e){const{colDef:t,onClick:o}=e,n=Ae(),r=qe(),i=l.useCallback((e=>{o(e),n.current.showFilterPanel(t.field)}),[n,t.field,o]);return r.disableColumnFilter||!t.filterable?null:(0,a.jsx)(r.slots.baseMenuItem,{onClick:i,iconStart:(0,a.jsx)(r.slots.columnMenuFilterIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuFilter")})}function Ku(e){const{colDef:t,onClick:o}=e,n=Ae(),r=Po(n,Hl),i=qe(),s=l.useMemo((()=>
83{if(!t)return null;const e=r.find((e=>e.field===t.field));return null==e?void 0:e.sort}),[t,r]),c=t.sortingOrder??i.sortingOrder,u=l.useCallback((e=>{o(e);const r=e.currentTarget.getAttribute("data-value")||null;n.current.sortColumn(t.field,r===s?null:r)}),[n,t,o,s]);if(i.disableColumnSorting||!t||!t.sortable||!c.some((e=>!!e)))return null;const d=e=>{const o=n.current.getLocaleText(e);return"function"==typeof o?o(t):o};return(0,a.jsxs)(l.Fragment,{children:[c.includes("asc")&&"asc"!==s?(0,a.jsx)(i.slots.baseMenuItem,{onClick:u,"data-value":"asc",iconStart:(0,a.jsx)(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:d("columnMenuSortAsc")}):null,c.includes("desc")&&"desc"!==s?(0,a.jsx)(i.slots.baseMenuItem,{onClick:u,"data-value":"desc",iconStart:(0,a.jsx)(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:d("columnMenuSortDesc")}):null,c.includes(null)&&null!=s?(0,a.jsx)(i.slots.baseMenuItem,{onClick:u,iconStart:i.slots.columnMenuUnsortIcon?(0,a.jsx)(i.slots.columnMenuUnsortIcon,{fontSize:"small"}):(0,a.jsx)("span",{}),children:n.current.getLocaleText("columnMenuUnsort")}):null]})}"production"!==n.p.env.NODE_ENV&&(qu.propTypes={colDef:i.object.isRequired,onClick:i.func.isRequired}),"production"!==n.p.env.NODE_ENV&&(Wu.propTypes={colDef:i.object.isRequired,onClick:i.func.isRequired}),"production"!==n.p.env.NODE_ENV&&(_u.propTypes={colDef:i.object.isRequired,onClick:i.func.isRequired}),"production"!==n.p.env.NODE_ENV&&(Uu.propTypes={colDef:i.object.isRequired,onClick:i.func.isRequired}),"production"!==n.p.env.NODE_ENV&&(Ku.propTypes={colDef:i.object.isRequired,onClick:i.func.isRequired});const Xu=["defaultSlots","defaultSlotProps","slots","slotProps"],Qu={columnMenuSortItem:Ku,columnMenuFilterItem:Uu,columnMenuColumnsItem:_u},Yu={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},Ju=ge((function(e,t){const{defaultSlots:o,defaultSlotProps:n,slots:i,slotProps:s}=e,c=(0,r.cH)(e,Xu),u=(e=>{const t=Ga(),o=qe(),{defaultSlots:n,defaultSlotProps:i,slots:a={},slotProps:s={},hideMenu:c,colDef:u,addDividers:d=!0}=e,p=l.useMemo((()=>(0,r.cG)({},n,a)),[n,a]),f=l.useMemo((()=>{if(!s||0===Object.keys(s).length)return i;const e=(0,r.cG)({},s);return Object.entries(i).forEach((t=>{let[o,n]=t;e[o]=(0,r.cG)({},n,s[o]||{})})),e}),[i,s]),g=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),m=l.useMemo((()=>{const e=Object.keys(n);return Object.keys(a).filter((t=>!e.includes(t)))}),[a,n]);return l.useMemo((()=>{const e=Array.from(new Set([...g,...m])).filter((e=>null!=p[e])).sort(((e,t)=>{const o=f[e],n=f[t];return(Number.isFinite(null==o?void 0:o.displayOrder)?o.displayOrder:100)-(Number.isFinite(null==n?void 0:n.displayOrder)?n.displayOrder:100)}));return e.reduce(((t,n,l)=>{let i={colDef:u,onClick:c};const a=f[n];if(a){const e=(0,r.cH)(a,Bu);i=(0,r.cG)({},i,e)}return d&&l!==e.length-1?[...t,[p[n],i],[o.slots.baseDivider,{}]]:[...t,[p[n],i]]}),[])}),[d,u,g,c,p,f,m,o.slots.baseDivider])})((0,r.cG)({},c,{defaultSlots:o,defaultSlotProps:n,slots:i,slotProps:s}));return(0,a.jsx)(Au,(0,r.cG)({},c,{ref:t,children:u.map(((e,t)=>{let[o,n]=e;return(0,a.jsx)(o,(0,r.cG)({},n),t)}))}))}));"production"!==n.p.env.NODE_ENV&&(Ju.propTypes={colDef:i.object.isRequired,defaultSlotProps:i.object.isRequired,defaultSlots:i.object.isRequired,hideMenu:i.func.isRequired,id:i.string,labelledby:i.string,open:i.bool.isRequired,slotProps:i.object,slots:i.object});const Zu=ge((function(e,t){return(0,a.jsx)(Ju,(0,r.cG)({},e,{ref:t,defaultSlots:Qu,defaultSlotProps:Yu}))}));"production"!==n.p.env.NODE_ENV&&(Zu.propTypes={colDef:i.object.isRequired,hideMenu:i.func.isRequired,id:i.string,labelledby:i.string,open:i.bool.isRequired,slotProps:i.object,slots:i.object});const ed=["className"],td=(0,r.H)("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),od=ge((function(e,t){const{className:o}=e,l=(0,r.cH)(e,ed),i=qe(),s=(e=>{const{classes:t}=e;return(0,r.I)({root:["panelWrapper"]},Yo,t)})(i);
83return(0,a.jsx)(td,(0,r.cG)({tabIndex:-1,className:(0,n.c)(s.root,o),ownerState:i},l,{ref:t}))}));const nd=["children","className","classes","onClose"],rd=(0,r.z)("MuiDataGrid",["panel","paper"]),ld=(0,r.H)(pn,{name:"MuiDataGrid",slot:"panel"})({zIndex:tt.zIndex.panel}),id=(0,r.H)("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:tt.colors.background.overlay,borderRadius:tt.radius.base,boxShadow:tt.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${tt.spacing(2)})`,overflow:"auto"}),ad=ge(((e,t)=>{var o;const{children:i,className:s,onClose:c}=e,u=(0,r.cH)(e,nd),d=Ae(),p=qe(),f=rd,[g,m]=l.useState(!1),h=Kr(),b=(0,r.cK)((()=>m(!0))),v=(0,r.cK)((()=>m(!1))),w=(0,r.cK)((()=>{null==c||c()})),C=(0,r.cK)((e=>{"Escape"===e.key&&(null==c||c())})),[y,x]=l.useState(null);return l.useEffect((()=>{var e,t;const o=null==(t=null==(e=d.current.rootElementRef)?void 0:e.current)?void 0:t.querySelector('[data-id="gridPanelAnchor"]');o&&x(o)}),[d]),y?(0,a.jsx)(ld,(0,r.cG)({as:p.slots.basePopper,ownerState:p,placement:"bottom-end",className:(0,n.c)(f.panel,s,h),flip:!0,onDidShow:b,onDidHide:v,onClickAway:w,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},u,null==(o=p.slotProps)?void 0:o.basePopper,{target:e.target??y,ref:t,children:(0,a.jsx)(id,{className:f.paper,ownerState:p,onKeyDown:C,children:g&&i})})):null}));"production"!==n.p.env.NODE_ENV&&(ad.propTypes={children:i.node,classes:i.object,className:i.string,flip:i.bool,id:i.string,onClose:i.func,open:i.bool.isRequired,target:i.any});const sd=["className"],cd=(0,s.s)("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:tt.spacing(2.5,1.5,2,1),gap:tt.spacing(2.5)});function ud(e){const{className:t}=e,o=(0,r.cH)(e,sd),l=qe(),i=(e=>{const{classes:t}=e;return(0,r.I)({root:["panelContent"]},Yo,t)})(l);return(0,a.jsx)(cd,(0,r.cG)({className:(0,n.c)(i.root,t),ownerState:l},o))}"production"!==n.p.env.NODE_ENV&&(ud.propTypes={sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const dd=["className"],pd=(0,r.H)("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:tt.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${tt.colors.border.base}`});function fd(e){const{className:t}=e,o=(0,r.cH)(e,dd),l=qe(),i=(e=>{const{classes:t}=e;return(0,r.I)({root:["panelFooter"]},Yo,t)})(l);return(0,a.jsx)(pd,(0,r.cG)({className:(0,n.c)(i.root,t),ownerState:l},o))}"production"!==n.p.env.NODE_ENV&&(fd.propTypes={sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const gd=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],md=["InputComponentProps"],hd=(0,r.H)("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:tt.spacing(1.5)}),bd=(0,r.H)("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),vd=(0,r.H)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),wd=(0,r.H)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),Cd=(0,r.H)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),yd=(0,r.H)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),xd=e=>e.headerName||e.field,Rd=new Intl.Collator,Sd=ge((function(e,t){var o,i,s,c,u,d,p;const{item:f,hasMultipleFilters:g,deleteFilter:m,applyFilterChanges:h,showMultiFilterOperators:b,disableMultiFilterOperator:v,applyMultiFilterOperatorChanges:w,focusElementRef:C,logicOperators:y=[Zn.And,Zn.Or],columnsSort:x,filterColumns:R,deleteIconProps:S={},logicOperatorInputProps:I={},operatorInputProps:M={},columnInputProps:P={},valueInputProps:k={},readOnly:E}=e,O=(0,r.cH)(e,gd),T=Ae(),F=Po(T,hr),G=Po(T,Ir),D=Po(T,$l),H=(0,r.aI)(),j=(0,r.aI)(),N=(0,r.aI)(),$=(0,r.aI)(),L=qe(),V=(e=>{const{classes:t}=e;return(0,r.I)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterForm
83ColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Yo,t)})(L),z=l.useRef(null),A=l.useRef(null),B=D.logicOperator??Zn.And,q=g&&y.length>0,W=((null==(o=L.slotProps)?void 0:o.baseSelect)||{}).native??!1,_=(null==(i=L.slotProps)?void 0:i.baseSelectOption)||{},{InputComponentProps:U}=k,K=(0,r.cH)(k,md),X=Po(T,ys),Q=Po(T,Rs),{filteredColumns:Y,selectedField:J}=l.useMemo((()=>{let e=f.field;const t=!1===F[f.field].filterable?F[f.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if(X)return{filteredColumns:G.filter((e=>void 0!==Q.get(e.field))),selectedField:e};if(void 0===R||"function"!=typeof R)return{filteredColumns:G,selectedField:e};const o=R({field:f.field,columns:G,currentFilters:(null==D?void 0:D.items)||[]});return{filteredColumns:G.filter((t=>{const n=o.includes(t.field);return t.field===f.field&&!n&&(e=void 0),n})),selectedField:e}}),[f.field,F,X,R,G,null==D?void 0:D.items,Q]),Z=l.useMemo((()=>{switch(x){case"asc":return Y.sort(((e,t)=>Rd.compare(xd(e),xd(t))));case"desc":return Y.sort(((e,t)=>-Rd.compare(xd(e),xd(t))));default:return Y}}),[Y,x]),ee=f.field?T.current.getColumn(f.field):null,te=l.useMemo((()=>{var e;return f.operator&&ee?null==(e=ee.filterOperators)?void 0:e.find((e=>e.value===f.operator)):null}),[f,ee]),oe=l.useCallback((e=>{const t=e.target.value,o=T.current.getColumn(t);if(o.field===ee.field)return;const n=o.filterOperators.find((e=>e.value===f.operator))||o.filterOperators[0];let l=n.InputComponent&&n.InputComponent===(null==te?void 0:te.InputComponent)&&o.type===ee.type?f.value:void 0;if("singleSelect"===o.type&&void 0!==l){const e=o,t=Zi(e);Array.isArray(l)?l=l.filter((o=>void 0!==ea(o,t,null==e?void 0:e.getOptionValue))):void 0===ea(f.value,t,null==e?void 0:e.getOptionValue)&&(l=void 0)}h((0,r.cG)({},f,{field:t,operator:n.value,value:l}))}),[T,h,f,ee,te]),ne=l.useCallback((e=>{const t=e.target.value,o=null==ee?void 0:ee.filterOperators.find((e=>e.value===t)),n=!(null!=o&&o.InputComponent)||(null==o?void 0:o.InputComponent)!==(null==te?void 0:te.InputComponent);h((0,r.cG)({},f,{operator:t,value:n?void 0:f.value}))}),[h,f,ee,te]),re=l.useCallback((e=>{const t=e.target.value===Zn.And.toString()?Zn.And:Zn.Or;w(t)}),[w]);return l.useImperativeHandle(C,(()=>({focus:()=>{var e;null!=te&&te.InputComponent?null==(e=null==z?void 0:z.current)||e.focus():A.current.focus()}})),[te]),(0,a.jsxs)(hd,(0,r.cG)({className:V.root,"data-id":f.id,ownerState:L},O,{ref:t,children:[(0,a.jsx)(bd,(0,r.cG)({},S,{className:(0,n.c)(V.deleteIcon,S.className),ownerState:L,children:(0,a.jsx)(L.slots.baseIconButton,(0,r.cG)({"aria-label":T.current.getLocaleText("filterPanelDeleteIconLabel"),title:T.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{m(f)},size:"small",disabled:E},null==(s=L.slotProps)?void 0:s.baseIconButton,{children:(0,a.jsx)(L.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,a.jsx)(vd,(0,r.cG)({as:L.slots.baseSelect,sx:[q?{display:"flex"}:{display:"none"},b?{visibility:"visible"}:{visibility:"hidden"},I.sx],className:(0,n.c)(V.logicOperatorInput,I.className),ownerState:L},I,{size:"small",slotProps:{htmlInput:{"aria-label":T.current.getLocaleText("filterPanelLogicOperator")}},value:B??"",onChange:re,disabled:!!v||1===y.length,native:W},null==(c=L.slotProps)?void 0:c.baseSelect,{children:y.map((e=>(0,l.createElement)(L.slots.baseSelectOption,(0,r.cG)({},_,{native:W,key:e.toString(),value:e.toString()}),T.current.getLocaleText((e=>{switch(e){case Zn.And:return"filterPanelOperatorAnd";case Zn.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e)))))})),(0,a.jsx)(wd,(0,r.cG)({as:L.slots.baseSelect},P,{className:(0,n.c)(V.columnInput,P.className),ownerState:L,size:"small",labelId:j,id:H,label:T.current.getLocaleText("filterPanelColumns"),value:J??"",onChange:oe,native:W,disabled:E},null==(u=L.slotProps)?void 0:u.baseSelect,{children:Z.map((e=>(0,l.createElement)(L.slots.baseSelectOption,(0,r.cG)({},_,{native:W,key:e.field,value:e.field}),xd(e))))})),(0,a.jsx)(Cd,(0,r.cG)({as:L.slots.baseSelect,size:"small"},M,{className:(0,n.c)(V.operatorInput,M.className),ownerState:L,labelId:$,label:T.current.getLocaleText("filterPanelOperator"),id:N,value:f.operator,onChange:ne,native:W,inputRef:A,disabled:E},null==(d=L.slotProps)?void 0:d.baseSelect,{children:null==(p=null==ee?void 0:ee.filterOperators)?void 0:p.map((e=>(0,l.createElement)(L.slots.baseSelectOption,(0,r.cG)({},_,{native:W,key:e.value,value:e.value}),e.label||T.current.getLocaleText(`filterOperator${(0,r.aC)(e.value)}
83`))))})),(0,a.jsx)(yd,(0,r.cG)({},K,{className:(0,n.c)(V.valueInput,K.className),ownerState:L,children:null!=te&&te.InputComponent?(0,a.jsx)(te.InputComponent,(0,r.cG)({apiRef:T,item:f,applyValue:h,focusElementRef:z,disabled:E,slotProps:{root:{size:"small"}}},te.InputComponentProps,U),f.field):null}))]}))}));"production"!==n.p.env.NODE_ENV&&(Sd.propTypes={applyFilterChanges:i.func.isRequired,applyMultiFilterOperatorChanges:i.func.isRequired,children:i.node,columnInputProps:i.any,columnsSort:i.oneOf(["asc","desc"]),deleteFilter:i.func.isRequired,deleteIconProps:i.any,disableMultiFilterOperator:i.bool,filterColumns:i.func,focusElementRef:i.oneOfType([i.func,i.object]),hasMultipleFilters:i.bool.isRequired,item:i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any}).isRequired,logicOperatorInputProps:i.any,logicOperators:i.arrayOf(i.oneOf(["and","or"]).isRequired),operatorInputProps:i.any,readOnly:i.bool,showMultiFilterOperators:i.bool,valueInputProps:i.any});const Id=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],Md=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),Pd=ge((function(e,t){var o,n;const i=Ae(),s=qe(),c=Po(i,$l),u=Po(i,Ir),d=Po(i,Mr),p=l.useRef(null),f=l.useRef(null),{logicOperators:g=[Zn.And,Zn.Or],columnsSort:m,filterFormProps:h,getColumnForNewFilter:b,disableAddFilterButton:v=!1,disableRemoveAllButton:w=!1}=e,C=(0,r.cH)(e,Id),y=i.current.upsertFilterItem,x=l.useCallback((e=>{i.current.setFilterLogicOperator(e)}),[i]),R=l.useCallback((()=>{let e;if(b&&"function"==typeof b){const t=b({currentFilters:(null==c?void 0:c.items)||[],columns:u});if(null===t)return null;e=u.find((e=>{let{field:o}=e;return o===t}))}else e=u.find((e=>{var t;return null==(t=e.filterOperators)?void 0:t.length}));return e?Md(e):null}),[null==c?void 0:c.items,u,b]),S=l.useCallback((()=>{if(void 0===b||"function"!=typeof b)return R();const e=c.items.length?c.items:[R()].filter(Boolean),t=b({currentFilters:e,columns:u});if(null===t)return null;const o=u.find((e=>{let{field:o}=e;return o===t}));return o?Md(o):null}),[c.items,u,b,R]),I=l.useMemo((()=>c.items.length?c.items:(f.current||(f.current=R()),f.current?[f.current]:[])),[c.items,R]),M=I.length>1,{readOnlyFilters:P,validFilters:k}=l.useMemo((()=>I.reduce(((e,t)=>(d[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e)),{readOnlyFilters:[],validFilters:[]})),[I,d]),E=l.useCallback((()=>{const e=S();e&&i.current.upsertFilterItems([...I,e])}),[i,S,I]),O=l.useCallback((e=>{const t=1===k.length;i.current.deleteFilterItem(e),t&&i.current.hideFilterPanel()}),[i,k.length]),T=l.useCallback((()=>1===k.length&&void 0===k[0].value?(i.current.deleteFilterItem(k[0]),i.current.hideFilterPanel()):i.current.setFilterModel((0,r.cG)({},c,{items:P}),"removeAllFilterItems")),[i,P,c,k]);return l.useEffect((()=>{g.length>0&&c.logicOperator&&!g.includes(c.logicOperator)&&x(g[0])}),[g,x,c.logicOperator]),l.useEffect((()=>{k.length>0&&p.current.focus()}),[k.length]),(0,a.jsxs)(od,(0,r.cG)({},C,{ref:t,children:[(0,a.jsxs)(ud,{children:[P.map(((e,t)=>(0,a.jsx)(Sd,(0,r.cG)({item:e,applyFilterChanges:y,deleteFilter:O,hasMultipleFilters:M,showMultiFilterOperators:t>0,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:g,columnsSort:m},h),null==e.id?t:e.id))),k.map(((e,t)=>(0,a.jsx)(Sd,(0,r.cG)({item:e,applyFilterChanges:y,deleteFilter:O,hasMultipleFilters:M,showMultiFilterOperators:P.length+t>0,disableMultiFilterOperator:P.length+t!==1,applyMultiFilterOperatorChanges:x,focusElementRef:t===k.length-1?p:null,logicOperators:g,columnsSort:m},h),null==e.id?t+P.length:e.id)))]}),s.disableMultipleColumnsFiltering||v&&w?null:(0,a.jsxs)(fd,{children:[v?(0,a.jsx)("span",{}):(0,a.jsx)(s.slots.baseButton,(0,r.cG)({onClick:E,startIcon:(0,a.jsx)(s.slots.filterPanelAddIcon,{})},null==(o=s.slotProps)?void 0:o.baseButton,{children:i.current.getLocaleText("filterPanelAddFilter")})),!w&&k.length>0?(0,a.jsx)(s.slots.baseButton,(0,r.cG)({onClick:T,startIcon:(0,a.jsx)(s.slots.filterPanelRemoveAllIcon,{})},null==(n=s.slotProps)?void 0:n.baseButton,{children:i.current.getLocaleText("filterPanelRemoveAll")})):null]})]}))}));"production"!==n.p.env.NODE_ENV&&(Pd.propTypes={children:i.node,columnsSort:i.oneOf(["asc","desc"]),disableAddFilterButton:i.bool,disableRemoveAllButton:i.bool,filterFormProps:i.shape({columnInputProps:i.any,columnsSort:i.oneOf(["asc","desc"]),deleteIconProps:i.any,filterColumns:i.func,logicOperatorInputProps:i.any,operatorInputProps:i.any,valueInputProps:i.any}
83),getColumnForNewFilter:i.func,logicOperators:i.arrayOf(i.oneOf(["and","or"]).isRequired),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const kd=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,Ed=["children"],Od=(0,r.cP)({from:{opacity:0},to:{opacity:1}}),Td=(0,r.cP)({"from, to":{"--scrollable":'" "'}}),Fd=(0,s.s)("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})` 84 flex: 1; 85 display: flex; 86 flex-direction: column; 87 animation: ${Td}; 88 animation-timeline: --scroll-timeline; 89 animation-fill-mode: none; 90 box-sizing: border-box; 91 overflow: auto; 92 scrollbar-width: thin; 93 scroll-timeline: --scroll-timeline block; 94 95 &::before, 96 &::after { 97 content: ''; 98 flex-shrink: 0; 99 display: block; 100 position: sticky; 101 left: 0; 102 width: 100%; 103 height: 4px; 104 animation: ${Od} linear both; 105 animation-timeline: --scroll-timeline; 106 107 // Custom property toggle trick: 108 // - Detects if the element is scrollable 109 // - https://css-tricks.com/the-css-custom-property-toggle-trick/ 110 --visibility-scrollable: var(--scrollable) visible; 111 --visibility-not-scrollable: hidden; 112 visibility: var(--visibility-scrollable, var(--visibility-not-scrollable)); 113 } 114 115 &::before { 116 top: 0; 117 background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0, transparent 100%); 118 animation-range: 0 4px; 119 } 120 121 &::after { 122 bottom: 0; 123 background: linear-gradient(to top, rgba(0, 0, 0, 0.05) 0, transparent 100%); 124 animation-direction: reverse; 125 animation-range: calc(100% - 4px) 100%; 126 } 127`,Gd=ge((function(e,t){const{children:o}=e,n=(0,r.cH)(e,Ed);return(0,a.jsx)(Fd,(0,r.cG)({},n,{ref:t,children:o}))}));"production"!==n.p.env.NODE_ENV&&(Gd.propTypes={children:i.node});const Dd=new Intl.Collator;function Hd(e){var t,o,n,i;const s=Ae(),c=l.useRef(null),u=Po(s,wr),d=Po(s,vr),p=qe(),[f,g]=l.useState(""),m=(e=>{const{classes:t}=e;return(0,r.I)({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},Yo,t)})(p),h=Po(s,br),b=Po(s,ys),v=Po(s,Rs),w=l.useMemo((()=>b?Array.from(v.values()):h),[b,v,h]),{sort:C,searchPredicate:y=kd,autoFocusSearchField:x=!0,disableShowHideToggle:R=!1,disableResetButton:S=!1,toggleAllMode:I="all",getTogglableColumns:M,searchInputProps:P}=e,k=l.useMemo((()=>((e,t)=>{const o=new Set(Object.keys(e).filter((t=>!1===e[t]))),n=new Set(Object.keys(t).filter((e=>!1===t[e])));if(o.size!==n.size)return!1;let r=!0;return o.forEach((e=>{n.has(e)||(r=!1)})),r})(d,u)),[d,u]),E=l.useMemo((()=>{switch(C){case"asc":return[...w].sort(((e,t)=>Dd.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...w].sort(((e,t)=>-Dd.compare(e.headerName||e.field,t.headerName||t.field)));default:return w}}),[w,C]),O=e=>{const{name:t}=e.target;s.current.setColumnVisibility(t,!1===d[t])},T=l.useMemo((()=>{const e=M?M(E):null,t=e?E.filter((t=>{let{field:o}=t;return e.includes(o)})):E;return f?t.filter((e=>y(e,f.toLowerCase()))):t}),[E,f,y,M]),F=l.useCallback((e=>{const t=vr(s),o=(0,r.cG)({},t),n=M?M(w):null;return("filteredOnly"===I?T:w).forEach((t=>{t.hideable&&(null==n||n.includes(t.field))&&(e?delete o[t.field]:o[t.field]=!1)})),s.current.setColumnVisibilityModel(o)}),[s,w,M,I,T]),G=l.useCallback((e=>{g(e.target.value)}),[]),D=l.useMemo((()=>T.filter((e=>e.hideable))),[T]),H=l.useMemo((()=>D.every((e=>null==d[e.field]||!1!==d[e.field]))),[d,D]),j=l.useMemo((()=>D.every((e=>!1===d[e.field]))),[d,D]),N=l.useRef(null);l.useEffect((()=>{var e;x?null==(e=c.current)||e.focus():N.current&&"function"==typeof N.current.focus&&N.current.focus()}),[x]);let $=!1;const L=e=>!1===$&&!1!==e.hideable&&($=!0,!0),V=l.useCallback((()=>{var e;g(""),null==(e=c.current)||e.focus()}),[]);return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)($d,{className:m.header,ownerState:p,children:(0,a.jsx)(Ld,(0,r.cG)({as:p.slots.baseTextField,ownerState:p,placeholder:s.current.getLocaleText("columnsManagementSearchTitle"),inputRef:c,className:m.searchInput,value:f,onChange:G,size:"small",type:"search",slotProps:{input:{startAdornment:(0,a.jsx)(p.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:(0,a.jsx)(p.slots.baseIconButton,(0,r.cG)({size:"small","aria-label":s.current.getLocaleText("columnsManagementDeleteIconLabel"),style:f?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:V,edge:"end"},null==(t=p.slotProps)?void 0:t.baseIconButton,{children:(0,a.jsx)(p.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":s.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},null==(o=p.slotProps)?void 0:o.baseTextField,P))}),(0,a.jsx)(Nd,{ownerState:p,children:(0,a.jsxs)(jd,{className:m.root,ownerState:p,children:[T.map((e=>{var t;return(0,a.jsx)(p.slots.baseCheckbox,(0,r.cG)({className:m.row,disabled:!1===e.hideable||b,checked:!1!==d[e.field],onClick:O,name:e.field,inputRef:L(e)?N:void 0,label:e.headerName||e.field,density:"compact",fullWidth:!0},null==(t=p.slotProps)?void 0:t.baseCheckbox),e.field)})),0===T.length&&(0,a.jsx)(zd,{ownerState:p,children:s.current.getLocaleText("columnsManagementNoColumns")})]})}),R&&S?null:(0,a.jsxs)(Vd,{ownerState:p,className:m.footer,children:[R?(0,a.jsx)("span",{}):(0,a.jsx)(p.slots.baseCheckbox,(0,r.cG)({disabled:0===D.length||b,checked:H,indeterminate:!H&&!j,onClick:()=>F(!H),name:s.current.getLocaleText("columnsManagementShowHideAllText"),label:s.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},null==(n=p.slotProps)?void 0:n.baseCheckbox)),S?null:(0,a.jsx)(p.slots.baseButton,(0,r.cG)({onClick:()=>s.current.setColumnVisibilityModel(u),disabled:k||b},null==(i=p.slotProps)?void 0:i.baseButton,{children:s.current.getLocaleText("columnsManagementReset")}))]})]})}"production"!==n.p.env.NODE_ENV&&(Hd.propTypes={autoFocusSearchField:i.bool,disableResetButton:i.bool,disableShowHideToggle:i.bool,getTogglableColumns:i.func,searchInputProps:i.object,searchPredicate:i.func,sort:i.oneOf(["asc","desc"]),toggleAllMode:i.oneOf(["all","filteredOnly"])});const jd=(0,r.H)("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:tt.spacing(.5,1.5)}),Nd=(0,r.H)(Gd,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),$d=(0,r.H)("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:tt.spacing(1.5,2),borderBottom:`1px solid ${tt.colors.border.base}`}),Ld=(0,r.H)(pn,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${r.d2.input}::-webkit-search-decoration,\n & .${r.d2.input}::-webkit-search-cancel-button,\n & .${r.d2.input}::-webkit-search-results-button,\n & .${r.d2.input}::-webkit-search-results-decoration`]:{display:"none"}}),Vd=(0,r.H)("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:tt.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${tt.colors.border.base}`}),zd=(0,r.H)("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:tt.spacing(1,0),alignSelf:"center",font:tt.typography.font.body}),Ad=ge((function(e,t){var o,n;const{children:i,slotProps:s={}}=e,c=s.button||{},u=s.tooltip||{},d=Ae(),p=qe(),f=(0,r.aI)(),g=(0,r.aI)(),[m,h]=l.useState(!1),b=l.useRef(null),v=(0,r.aH)(t,b),w=()=>h(!1);return null==i?null:(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(p.slots.baseTooltip,(0,r.cG)({title:d.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},null==(o=p.slotProps)?void 0:o.baseTooltip,u,{children:(0,a.jsx)(p.slots.baseButton,(0,r.cG)({size:"small",startIcon:(0,a.jsx)(p.slots.exportIcon,{}),"aria-expanded":m,"aria-label":d.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":m?g:void 0,id:f},null==(n=p.slotProps)?void 0:n.baseButton,c,{onClick:e=>{var t;h((e=>!e)),null==(t=c.onClick)||t.call(c,e)},ref:v,children:d.current.getLocaleText("toolbarExport")}))})),(0,a.jsx)(Zr,{open:m,target:b.current,onClose:w,position:"bottom-end",children:(0,a.jsx)(p.slots.baseMenuList,{id:g,className:Jo.menuList,"aria-labelledby":f,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),$u(e.key)&&w()},autoFocusItem:m,children:l.Children.map(i,(e=>l.isValidElement(e)?l.cloneElement(e,{hideMenu:w}):e))})})]})}));"production"!==n.p.env.NODE_ENV&&(Ad.propTypes={slotProps:i.object});const Bd=["hideMenu","options"],qd=["hideMenu","options"],Wd=["csvOptions","printOptions","excelOptions"];function _d(e){const t=Ae(),o=qe(),{hideMenu:n,options:l}=e,i=(0,r.cH)(e,Bd);return(0,a.jsx)(o.slots.baseMenuItem,(0,r.cG)({onClick:()=>{t.current.exportDataAsCsv(l),null==n||n()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function Ud(e){const t=Ae(),o=qe(),{hideMenu:n,options:l}=e,i=(0,r.cH)(e,qd);return(0,a.jsx)(o.slots.baseMenuItem,(0,r.cG)({onClick:()=>{t.current.exportDataAsPrint(l),null==n||n()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}"production"!==n.p.env.NODE_ENV&&(_d.propTypes={hideMenu:i.func,options:i.shape({allColumns:i.bool,delimiter:i.string,disableToolbarButton:i.bool,escapeFormulas:i.bool,fields:i.arrayOf(i.string),fileName:i.string,getRowsToExport:i.func,includeColumnGroupsHeaders:i.bool,includeHeaders:i.bool,shouldAppendQuotes:i.bool,utf8WithBom:i.bool})}),"production"!==n.p.env.NODE_ENV&&(Ud.propTypes={hideMenu:i.func,options:i.shape({allColumns:i.bool,bodyClassName:i.string,copyStyles:i.bool,disableToolbarButton:i.bool,fields:i.arrayOf(i.string),fileName:i.string,getRowsToExport:i.func,hideFooter:i.bool,hideToolbar:i.bool,includeCheckboxes:i.bool,pageStyle:i.oneOfType([i.func,i.string])})});const Kd=ge((function(e,t){const o=e,{csvOptions:n={},printOptions:i={},excelOptions:s}=o,c=(0,r.cH)(o,Wd),u=Ae().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:s,csvOptions:n,printOptions:i}).sort(((e,t)=>e.componentName>t.componentName?1:-1));return 0===u.length?null:(0,a.jsx)(Ad,(0,r.cG)({},c,{ref:t,children:u.map(((e,t)=>l.cloneElement(e.component,{key:t}
127)))}))}));function Xd(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let n=0;n<o;n+=1)if(!Xd(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let e=0;e<o.length;e+=1)if(!t.has(o[e][0]))return!1;for(let e=0;e<o.length;e+=1){const n=o[e];if(!Xd(n[1],t.get(n[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let e=0;e<o.length;e+=1)if(!t.has(o[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let n=0;n<o;n+=1)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const o=Object.keys(e),n=o.length;if(n!==Object.keys(t).length)return!1;for(let e=0;e<n;e+=1)if(!Object.prototype.hasOwnProperty.call(t,o[e]))return!1;for(let r=0;r<n;r+=1){const n=o[r];if(!Xd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}"production"!==n.p.env.NODE_ENV&&(Kd.propTypes={csvOptions:i.object,printOptions:i.object,slotProps:i.object});const Qd=l.createContext(void 0);function Yd(){const e=l.useContext(Qd);if(void 0===e)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return e}const Jd=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],Zd=e=>e.split(" ").filter((e=>""!==e)),ep=e=>e.join(" ");function tp(e){const t=qe(),{render:o,className:n,parser:i=Zd,formatter:s=ep,debounceMs:c=t.filterDebounceMs,defaultExpanded:u,expanded:d,onExpandedChange:p}=e,f=(0,r.cH)(e,Jd),g=Ae(),m=l.useRef(null),h=l.useRef(null),b=Po(g,Ll),[v,w]=l.useState(s(b??[])),[C,y]=l.useState(u??v.length>0),x=d??C,R=l.useMemo((()=>({value:v,expanded:x})),[v,x]),S="function"==typeof n?n(R):n,I=l.useRef(null),M=(0,r.aI)(),P=l.useCallback((e=>{p&&p(e),void 0===d&&y(e)}),[p,d]),k=l.useRef(b);l.useEffect((()=>{Xd(k.current,b)||(k.current=b,w((e=>Xd(i(e),b)?e:s(b??[]))))}),[b,s,i]);const E=l.useRef(!0),O=l.useRef(x);l.useEffect((()=>{var e;E.current?E.current=!1:O.current!==x&&(x?requestAnimationFrame((()=>{var e;null==(e=m.current)||e.focus({preventScroll:!0})}
127)):null==(e=h.current)||e.focus({preventScroll:!0}),O.current=x)}),[x]);const T=l.useMemo((()=>(0,r.d3)((e=>{const t=i(e);k.current=t,g.current.setQuickFilterValues(t)}),c)),[g,c,i]);l.useEffect((()=>T.clear),[T]);const F=l.useCallback((e=>{const t=e.target.value;w(t),T(t)}),[T]),G=l.useCallback((()=>{var e;w(""),g.current.setQuickFilterValues([]),null==(e=m.current)||e.focus()}),[g,m]),D=l.useMemo((()=>({controlRef:m,triggerRef:h,state:R,controlId:M,clearValue:G,onValueChange:F,onExpandedChange:P})),[M,R,F,G,P]);(0,r.bd)((()=>{var e;I.current&&h.current&&I.current.style.setProperty("--trigger-width",`${null==(e=h.current)?void 0:e.offsetWidth}px`)}),[]);const H=_c("div",o,(0,r.cG)({className:S},f,{ref:I}),R);return(0,a.jsx)(Qd.Provider,{value:D,children:H})}"production"!==n.p.env.NODE_ENV&&(tp.propTypes={className:i.oneOfType([i.func,i.string]),debounceMs:i.number,defaultExpanded:i.bool,expanded:i.bool,formatter:i.func,onExpandedChange:i.func,parser:i.func,render:i.oneOfType([i.element,i.func])});const op=["render","className","slotProps","onKeyDown","onChange"],np=ge((function(e,t){var o;const{render:n,className:i,slotProps:s,onKeyDown:c,onChange:u}=e,d=(0,r.cH)(e,op),p=qe(),{state:f,controlId:g,controlRef:m,onValueChange:h,onExpandedChange:b,clearValue:v}=Yd(),w="function"==typeof i?i(f):i,C=(0,r.aH)(m,t),y=_c(p.slots.baseTextField,n,(0,r.cG)({},null==(o=p.slotProps)?void 0:o.baseTextField,{slotProps:(0,r.cG)({htmlInput:(0,r.cG)({role:"searchbox",id:g,tabIndex:f.expanded?void 0:-1},null==s?void 0:s.htmlInput,{onBlur:e=>{var t,o;""===f.value&&b(!1),null==(o=null==(t=null==s?void 0:s.htmlInput)?void 0:t.onBlur)||o.call(t,e)}})},s),value:f.value,className:w},d,{onChange:e=>{f.expanded||b(!0),h(e),null==u||u(e)},onKeyDown:e=>{"Escape"===e.key&&(""===f.value?b(!1):v()),null==c||c(e)},ref:C}),f);return(0,a.jsx)(l.Fragment,{children:y})}));"production"!==n.p.env.NODE_ENV&&(np.propTypes={autoComplete:i.string,autoFocus:i.bool,className:i.oneOfType([i.func,i.string]),color:i.oneOf(["error","primary"]),disabled:i.bool,error:i.bool,fullWidth:i.bool,helperText:i.string,id:i.string,inputRef:i.oneOfType([i.func,i.shape({current:i.object})]),label:i.node,multiline:i.bool,placeholder:i.string,render:i.oneOfType([i.element,i.func]),role:i.string,size:i.oneOf(["medium","small"]),slotProps:i.object,style:i.object,tabIndex:i.number,type:i.oneOfType([i.oneOf(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"]),i.object]),value:i.string});const rp=["render","className","onClick"],lp=ge((function(e,t){var o;const{render:n,className:i,onClick:s}=e,c=(0,r.cH)(e,rp),u=qe(),{state:d,clearValue:p}=Yd(),f="function"==typeof i?i(d):i,g=_c(u.slots.baseIconButton,n,(0,r.cG)({},null==(o=u.slotProps)?void 0:o.baseIconButton,{className:f,tabIndex:-1},c,{onClick:e=>{p(),null==s||s(e)},ref:t}),d);return(0,a.jsx)(l.Fragment,{children:g})}));"production"!==n.p.env.NODE_ENV&&(lp.propTypes={className:i.oneOfType([i.func,i.string]),color:i.oneOf(["default","inherit","primary"]),disabled:i.bool,edge:i.oneOf(["end","start",!1]),id:i.string,label:i.string,render:i.oneOfType([i.element,i.func]),role:i.string,size:i.oneOf(["large","medium","small"]),style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const ip=["render","className","onClick"],ap=ge((function(e,t){var o;const{render:n,className:i,onClick:s}=e,c=(0,r.cH)(e,ip),u=qe(),{state:d,controlId:p,onExpandedChange:f,triggerRef:g}=Yd(),m="function"==typeof i?i(d):i,h=(0,r.aH)(g,t),b=_c(u.slots.baseButton,n,(0,r.cG)({},null==(o=u.slotProps)?void 0:o.baseButton,{className:m,"aria-controls":p,"aria-expanded":d.expanded},c,{onClick:e=>{f(!d.expanded),null==s||s(e)},ref:h}),d);return(0,a.jsx)(l.Fragment,{children:b})}));"production"!==n.p.env.NODE_ENV&&(ap.propTypes={className:i.oneOfType([i.func,i.string]),disabled:i.bool,id:i.string,render:i.oneOfType([i.element,i.func]),role:i.string,size:i.oneOf(["large","medium","small"]),startIcon:i.node,style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const sp=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],cp=["ref","slotProps"],up=e=>{const{classes:t}=e;return(0,r.I)({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},Yo,t)},dp=(0,s.s)("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),pp=(0,s.s)(Jc,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})((e=>{let{ownerState:t}=e;return{gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:tt.transition(["opacity"])}})),fp=(0,s.s)((e=>{throw new Error("Failed assertion: should not be rendered")}),{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})((e=>{let{ownerState:t}=e;return{gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:tt.transition(["width","opacity"])}}));function gp(e){const t=Ae(),o=qe(),l={classes:o.classes,expanded:!1},i=up(l),{quickFilterParser:s,quickFilterFormatter:c,debounceMs:u,className:d,slotProps:p}=e,f=(0,r.cH)(e,sp);return(0,a.jsx)(tp,{parser:s,formatter:c,debounceMs:u,render:(e,s)=>{const c=(0,r.cG)({},l,{expanded:s.expanded});return(0,a.jsxs)(dp,(0,r.cG)({},e,{className:(0,n.c)(i.root,d),children:[(0,a.jsx)(ap,{render:e=>(0,a.jsx)(o.slots.baseTooltip,{title:t.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:(0,a.jsx)(pp,(0,r.cG)({className:i.trigger},e,{ownerState:c,color:"default","aria-disabled":s.expanded,children:(0,a.jsx)(o.slots.quickFilterIcon,{fontSize:"small"})}))})}),(0,a.jsx)(np,{render:e=>{var n;let{ref:l,slotProps:s}=e,u=(0,r.cH)(e,cp);return(0,a.jsx)(fp,(0,r.cG)({as:o.slots.baseTextField,className:i.control,ownerState:c,inputRef:l,"aria-label":t.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:t.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:(0,r.cG)({input:(0,r.cG)({startAdornment:(0,a.jsx)(o.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:u.value?(0,a.jsx)(lp,{render:(0,a.jsx)(o.slots.baseIconButton,{size:"small",edge:"end","aria-label":t.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:(0,a.jsx)(o.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},null==s?void 0:s.input)},s)},null==(n=o.slotProps)?void 0:n.baseTextField,u,null==p?void 0:p.root,f))}})]}))}})}"production"!==n.p.env.NODE_ENV&&(gp.propTypes={className:i.string,debounceMs:i.number,quickFilterFormatter:i.func,quickFilterParser:i.func,slotProps:i.object});const mp=["render","className","onClick","onPointerUp"],hp=ge((function(e,t){var o;const{render:n,className:i,onClick:s,onPointerUp:c}=e,u=(0,r.cH)(e,mp),d=qe(),p=(0,r.aI)(),f=(0,r.aI)(),g=Ae(),m=Po(g,Us),h=m.open&&m.openedPanelValue===Xs.filters,b=Po(g,Ql).length,v={open:h,filterCount:b},w="function"==typeof i?i(v):i,{filterPanelTriggerRef:C}=Gc(),y=(0,r.aH)(t,C),x=_c(d.slots.baseButton,n,(0,r.cG)({},null==(o=d.slotProps)?void 0:o.baseButton,{id:p,"aria-haspopup":"true","aria-expanded":h?"true":void 0,"aria-controls":h?f:void 0,onClick:e=>{h?g.current.hidePreferences():g.current.showPreferences(Xs.filters,f,p),null==s||s(e)},onPointerUp:e=>{h&&e.stopPropagation(),null==c||c(e)},className:w},u,{ref:y}),v);return(0,a.jsx)(l.Fragment,{children:x})}));"production"!==n.p.env.NODE_ENV&&(hp.propTypes={className:i.oneOfType([i.func,i.string]),disabled:i.bool,id:i.string,render:i.oneOfType([i.element,i.func]),role:i.string,
127size:i.oneOf(["large","medium","small"]),startIcon:i.node,style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const bp=["render","className","onClick","onPointerUp"],vp=ge((function(e,t){var o;const{render:n,className:i,onClick:s,onPointerUp:c}=e,u=(0,r.cH)(e,bp),d=qe(),p=(0,r.aI)(),f=(0,r.aI)(),g=Ae(),m=Po(g,Us),h=m.open&&m.openedPanelValue===Xs.columns,b={open:h},v="function"==typeof i?i(b):i,{columnsPanelTriggerRef:w}=Gc(),C=(0,r.aH)(t,w),y=_c(d.slots.baseButton,n,(0,r.cG)({},null==(o=d.slotProps)?void 0:o.baseButton,{id:p,"aria-haspopup":"true","aria-expanded":h?"true":void 0,"aria-controls":h?f:void 0,className:v},u,{onPointerUp:e=>{h&&e.stopPropagation(),null==c||c(e)},onClick:e=>{h?g.current.hidePreferences():g.current.showPreferences(Xs.columns,f,p),null==s||s(e)},ref:C}),b);return(0,a.jsx)(l.Fragment,{children:y})}));"production"!==n.p.env.NODE_ENV&&(vp.propTypes={className:i.oneOfType([i.func,i.string]),disabled:i.bool,id:i.string,render:i.oneOfType([i.element,i.func]),role:i.string,size:i.oneOf(["large","medium","small"]),startIcon:i.node,style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const wp=["render","options","onClick"],Cp=ge((function(e,t){var o;const{render:n,options:i,onClick:s}=e,c=(0,r.cH)(e,wp),u=qe(),d=Ae(),p=_c(u.slots.baseButton,n,(0,r.cG)({},null==(o=u.slotProps)?void 0:o.baseButton,{onClick:e=>{d.current.exportDataAsCsv(i),null==s||s(e)}},c,{ref:t}));return(0,a.jsx)(l.Fragment,{children:p})}));"production"!==n.p.env.NODE_ENV&&(Cp.propTypes={className:i.string,disabled:i.bool,id:i.string,options:i.shape({allColumns:i.bool,delimiter:i.string,escapeFormulas:i.bool,fields:i.arrayOf(i.string),fileName:i.string,getRowsToExport:i.func,includeColumnGroupsHeaders:i.bool,includeHeaders:i.bool,shouldAppendQuotes:i.bool,utf8WithBom:i.bool}),render:i.oneOfType([i.element,i.func]),role:i.string,size:i.oneOf(["large","medium","small"]),startIcon:i.node,style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const yp=["render","options","onClick"],xp=ge((function(e,t){var o;const{render:n,options:i,onClick:s}=e,c=(0,r.cH)(e,yp),u=qe(),d=Ae(),p=_c(u.slots.baseButton,n,(0,r.cG)({},null==(o=u.slotProps)?void 0:o.baseButton,{onClick:e=>{d.current.exportDataAsPrint(i),null==s||s(e)}},c,{ref:t}));return(0,a.jsx)(l.Fragment,{children:p})}));"production"!==n.p.env.NODE_ENV&&(xp.propTypes={className:i.string,disabled:i.bool,id:i.string,options:i.shape({allColumns:i.bool,bodyClassName:i.string,copyStyles:i.bool,fields:i.arrayOf(i.string),fileName:i.string,getRowsToExport:i.func,hideFooter:i.bool,hideToolbar:i.bool,includeCheckboxes:i.bool,pageStyle:i.oneOfType([i.func,i.string])}),render:i.oneOfType([i.element,i.func]),role:i.string,size:i.oneOf(["large","medium","small"]),startIcon:i.node,style:i.object,tabIndex:i.number,title:i.string,touchRippleRef:i.any});const Rp=["className"],Sp=["className"],Ip=e=>{const{classes:t}=e;return(0,r.I)({divider:["toolbarDivider"],label:["toolbarLabel"]},Yo,t)},Mp=(0,s.s)(pn,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:tt.spacing(0,.5)}),Pp=(0,s.s)("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:tt.typography.font.large,fontWeight:tt.typography.fontWeight.medium,margin:tt.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function kp(e){const t=(0,r.cH)(e,Rp),o=qe(),n=Ip(o);return(0,a.jsx)(Mp,(0,r.cG)({as:o.slots.baseDivider,orientation:"vertical",className:n.divider},t))}function Ep(e){const t=(0,r.cH)(e,Sp),o=qe(),n=Ip(o);return(0,a.jsx)(Pp,(0,r.cG)({className:n.label},t))}function Op(e){var t,o,n;const{showQuickFilter:i=!0,quickFilterProps:s,csvOptions:c,printOptions:u,additionalItems:d,additionalExportMenuItems:p}=e,f=Ae(),g=qe(),[m,h]=l.useState(!1),b=l.useRef(null),v=(0,r.aI)(),w=(0,r.aI)(),C=!(null!=c&&c.disableToolbarButton)||!(null!=u&&u.disableToolbarButton)||p,y=()=>h(!1);return(0,a.jsxs)(Qc,{children:[g.label&&(0,a.jsx)(Ep,{children:g.label}),!g.disableColumnSelector&&(0,a.jsx)(g.slots.baseTooltip,{title:f.current.getLocaleText("toolbarColumns"),children:(0,a.jsx)(vp,{render:(0,a.jsx)(Jc,{}),children:(0,a.jsx)(g.slots.columnSelectorIcon,{fontSize:"small"})})}),!g.disableColumnFilter&&(0,a.jsx)(g.slots.baseTooltip,{title:f.current.getLocaleText("toolbarFilters"),children:(0,a.jsx)(hp,{render:(e,t)=>(0,a.jsx)(Jc,(0,r.cG)({},e,{color:t.filterCount>0?"primary":"default",children:(0,a.jsx)(g.slots.baseBadge,{badgeContent:t.filterCount,color:"primary",variant:"dot",children:(0,a.jsx)(g.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),d,C&&(!g.disableColumnFilter||!g.disableColumnSelector)&&(0,a.jsx)(kp,{}),C&&(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(g.slots.baseTooltip,{title:f.current.getLocaleText("toolbarExport"),children:(0,a.jsx)(Jc,{ref:b,id:w,"aria-controls":v,"aria-haspopup":"true","aria-expanded":m?"true":void 0,onClick:()=>h(!m),children:(0,a.jsx)(g.slots.exportIcon,{fontSize:"small"})})}),(0,a.jsx)(Zr,{target:b.current,open:m,onClose:y,position:"bottom-end",children:(0,a.jsxs)(g.slots.baseMenuList,(0,r.cG)({id:v,"aria-labelledby":w,autoFocusItem:!0},null==(t=g.slotProps)?void 0:t.baseMenuList,{children:[!(null!=u&&u.disableToolbarButton)&&(0,a.jsx)(xp,{render:(0,a.jsx)(g.slots.baseMenuItem,(0,r.cG)({},null==(o=g.slotProps)?void 0:o.baseMenuItem)),options:u,onClick:y,children:f.current.getLocaleText("toolbarExportPrint")}),!(null!=c&&c.disableToolbarButton)&&(0,a.jsx)(Cp,{render:(0,a.jsx)(g.slots.baseMenuItem,(0,r.cG)({},null==(n=g.slotProps)?void 0:n.baseMenuItem)),options:c,onClick:y,children:f.current.getLocaleText("toolbarExportCSV")}),null==p?void 0:p(y)]}))})]}),i&&(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(kp,{}),(0,a.jsx)(gp,(0,r.cG)({},s))]})]})}"production"!==n.p.env.NODE_ENV&&(kp.propTypes={className:i.string,orientation:i.oneOf(["horizontal","vertical"])}),"production"!==n.p.env.NODE_ENV&&(Op.propTypes={additionalExportMenuItems:i.func,additionalItems:i.node,csvOptions:i.object,printOptions:i.object,quickFilterProps:i.shape({className:i.string,debounceMs:i.number,quickFilterFormatter:i.func,quickFilterParser:i.func,slotProps:i.object}),showQuickFilter:i.bool,slotProps:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Tp=["className","selectedRowCount"],Fp=(0,s.s)("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:tt.spacing(0,2),visibility:"hidden",
127width:0,height:0,[tt.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),Gp=ge((function(e,t){const{className:o,selectedRowCount:l}=e,i=(0,r.cH)(e,Tp),s=Ae(),c=qe(),u=(e=>{const{classes:t}=e;return(0,r.I)({root:["selectedRowCount"]},Yo,t)})(c),d=s.current.getLocaleText("footerRowSelected")(l);return(0,a.jsx)(Fp,(0,r.cG)({className:(0,n.c)(u.root,o),ownerState:c},i,{ref:t,children:d}))}));"production"!==n.p.env.NODE_ENV&&(Gp.propTypes={selectedRowCount:i.number.isRequired,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Dp=ge((function(e,t){var o;const n=Ae(),l=qe(),i=Po(n,wn),s=Po(n,ei),c=Po(n,Kl),u=!l.hideFooterSelectedRowCount&&s>0?(0,a.jsx)(Gp,{selectedRowCount:s}):(0,a.jsx)("div",{}),d=l.hideFooterRowCount||l.pagination?null:(0,a.jsx)(l.slots.footerRowCount,(0,r.cG)({},null==(o=l.slotProps)?void 0:o.footerRowCount,{rowCount:i,visibleRowCount:c})),p=l.pagination&&!l.hideFooterPagination&&l.slots.pagination&&(0,a.jsx)(l.slots.pagination,{});return(0,a.jsxs)(Ac,(0,r.cG)({},e,{ref:t,children:[u,d,p]}))}));"production"!==n.p.env.NODE_ENV&&(Dp.propTypes={sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Hp=(e,t,o,n,r,l)=>{let i;switch(e){case yl.LEFT:i=n[o];break;case yl.RIGHT:i=r-n[o]-t+l;break;default:i=void 0}return i},jp=(e,t,o,n,r)=>{const l=t===o-1;return!(e!==yl.LEFT||!l)||!!n&&(e===yl.LEFT||(e===yl.RIGHT?!l:!l||r))},Np=(e,t)=>e===yl.RIGHT&&0===t,$p={root:Jo.scrollbarFiller,header:Jo["scrollbarFiller--header"],borderTop:Jo["scrollbarFiller--borderTop"],borderBottom:Jo["scrollbarFiller--borderBottom"],pinnedRight:Jo["scrollbarFiller--pinnedRight"]};function Lp(e){let{header:t,borderTop:o=!0,borderBottom:r,pinnedRight:l}=e;return(0,a.jsx)("div",{role:"presentation",className:(0,n.c)($p.root,t&&$p.header,o&&$p.borderTop,r&&$p.borderBottom,l&&$p.pinnedRight)})}const Vp=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],zp=(0,s.s)("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),Ap=e=>parseInt(e.getAttribute("data-colindex"),10),Bp=ge((function(e,t){const o=qe(),{slots:i}=o,s=(0,r.cN)(),c=(e=>{const{classes:t}=e;return(0,r.I)({root:["skeletonLoadingOverlay"]},Yo,t)})({classes:o.classes}),u=l.useRef(null),d=(0,r.aH)(u,t),p=Ae(),f=Po(p,No),g=Po(p,$o),m=Po(p,Sr),h=l.useMemo((()=>m.filter((e=>e<=g)).length),[g,m]),{skeletonRowsCount:b,visibleColumns:v,showFirstRowBorder:w}=e,C=(0,r.cH)(e,Vp),y=Po(p,Cr),x=l.useMemo((()=>y.slice(0,h)),[y,h]),R=Po(p,Rr),S=l.useCallback((e=>-1!==R.left.findIndex((t=>t.field===e))?yl.LEFT:-1!==R.right.findIndex((t=>t.field===e))?yl.RIGHT:void 0),[R.left,R.right]),I=l.useMemo((()=>{const e=[];for(let t=0;t<b;t+=1){const l=[];for(let e=0;e<x.length;e+=1){const c=x[e],u=S(c.field),d=u===yl.LEFT,p=u===yl.RIGHT,g=uc(u,s),h=g?R[g].length:x.length-R.left.length-R.right.length,b=g?R[g].findIndex((e=>e.field===c.field)):e-R.left.length,w=f.hasScrollY?f.scrollbarSize:0,C=dc({},s,u,Hp(u,c.computedWidth,e,m,f.columnsTotalWidth,w)),y=f.columnsTotalWidth<f.viewportOuterSize.width,I=jp(u,b,h,o.showCellVerticalBorder,y),M=Np(u,b),P=e===x.length-1,k=p&&0===b,E=k&&y,O=P&&!k&&y,T=f.viewportOuterSize.width-f.columnsTotalWidth,F=Math.max(0,T),G=(0,a.jsx)(i.skeletonCell,{width:F,empty:!0},`skeleton-filler-column-${t}`),D=P&&0!==w;E&&l.push(G),l.push((0,a.jsx)(i.skeletonCell,{field:c.field,type:c.type,align:c.align,width:"var(--width)",height:f.rowHeight,"data-colindex":e,empty:v&&!v.has(c.field),className:(0,n.c)(d&&Jo["cell--pinnedLeft"],p&&Jo["cell--pinnedRight"],I&&Jo["cell--withRightBorder"],M&&Jo["cell--withLeftBorder"]),style:(0,r.cG)({"--width":`${c.computedWidth}px`},C)},`skeleton-column-${t}-${c.field}`)),O&&l.push(G),D&&l.push((0,a.jsx)(Lp,{pinnedRight:R.right.length>0},`skeleton-scrollbar-filler-${t}`))}e.push((0,a.jsx)("div",{className:(0,n.c)(Jo.row,Jo.rowSkeleton,0===t&&!w&&Jo["row--firstVisible"]),children:l},`skeleton-row-${t}`))}return e}),[b,x,S,s,R,f.hasScrollY,f.scrollbarSize,f.columnsTotalWidth,f.viewportOuterSize.width,f.rowHeight,m,o.showCellVerticalBorder,i,v,w]);return ln(p,"columnResize",(e=>{var t,o,n;const{colDef:r,width:l}=e,i=null==(t=u.current)?void 0:t.querySelectorAll(`[data-field="${ou(r.field)}"]`);if(!i)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const a=x.findIndex((e=>e.field===r.field)),s=S(r.field),c=s===yl.LEFT,d=s===yl.RIGHT,p=getComputedStyle(i[0]).getPropertyValue("--width"),f=parseInt(p,10)-l;
127if(i&&i.forEach((e=>{e.style.setProperty("--width",`${l}px`)})),c){const e=null==(o=u.current)?void 0:o.querySelectorAll(`.${Jo["cell--pinnedLeft"]}`);null==e||e.forEach((e=>{Ap(e)>a&&(e.style.left=parseInt(getComputedStyle(e).left,10)-f+"px")}))}if(d){const e=null==(n=u.current)?void 0:n.querySelectorAll(`.${Jo["cell--pinnedRight"]}`);null==e||e.forEach((e=>{Ap(e)<a&&(e.style.right=`${parseInt(getComputedStyle(e).right,10)+f}px`)}))}})),(0,a.jsx)(zp,(0,r.cG)({className:c.root},C,{ref:d,children:I}))})),qp=ge((function(e,t){const o=Ae(),n=Po(o,No),l=(null==n?void 0:n.viewportInnerSize.height)??0,i=Math.ceil(l/n.rowHeight);return(0,a.jsx)(Bp,(0,r.cG)({},e,{skeletonRowsCount:i,ref:t}))})),Wp=["variant","noRowsVariant","style"],_p={"circular-progress":{component:e=>e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>qp,style:{display:"block"}}},Up=ge((function(e,t){const{variant:o="linear-progress",noRowsVariant:n="skeleton",style:l}=e,i=(0,r.cH)(e,Wp),s=Ae(),c=qe(),u=Po(s,bn),d=_p[0===u?n:o],p=d.component(c);return(0,a.jsx)(Wc,(0,r.cG)({style:(0,r.cG)({},d.style,l)},i,{ref:t,children:(0,a.jsx)(p,{})}))}));"production"!==n.p.env.NODE_ENV&&(Up.propTypes={noRowsVariant:i.oneOf(["circular-progress","linear-progress","skeleton"]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),variant:i.oneOf(["circular-progress","linear-progress","skeleton"])});const Kp=ge((function(e,t){const o=Ae().current.getLocaleText("noRowsLabel");return(0,a.jsx)(Wc,(0,r.cG)({},e,{ref:t,children:o}))}));"production"!==n.p.env.NODE_ENV&&(Kp.propTypes={sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Xp=ge((function(e,t){var o;const n=qe(),l=Ae(),i=Po(l,mr),s=!n.disableColumnSelector&&i.length>0;return(0,a.jsxs)(Wc,(0,r.cG)({},e,{ref:t,children:[l.current.getLocaleText("noColumnsOverlayLabel"),s&&(0,a.jsx)(n.slots.baseButton,(0,r.cG)({size:"small"},null==(o=n.slotProps)?void 0:o.baseButton,{onClick:()=>{l.current.showPreferences(Xs.columns)},children:l.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))}));"production"!==n.p.env.NODE_ENV&&(Xp.propTypes={sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Qp=(0,r.H)(pn)({maxHeight:"calc(100% + 1px)",flexGrow:1});function Yp(){var e;const t=Ae(),o=qe(),r=Po(t,Ri),i=Po(t,Si),s=Po(t,ki),{paginationMode:c,loading:u}=o,d=-1===i&&"server"===c&&u,p=l.useMemo((()=>Math.max(0,s-1)),[s]),f=l.useMemo((()=>-1===i||r.page<=p?r.page:p),[p,r.page,i]),g=l.useCallback((e=>{t.current.setPageSize(e)}
127),[t]),m=l.useCallback(((e,o)=>{t.current.setPage(o)}),[t]),h=e=>{for(let t=0;t<o.pageSizeOptions.length;t+=1){const n=o.pageSizeOptions[t];if("number"==typeof n){if(n===e)return!0}else if(n.value===e)return!0}return!1};if("production"!==n.p.env.NODE_ENV){const t=l.useRef(!1),n=(null==(e=o.paginationModel)?void 0:e.pageSize)??r.pageSize;!t.current&&!o.autoPageSize&&!h(n)&&(console.warn([`MUI X: The page size \`${r.pageSize}\` is not present in the \`pageSizeOptions\`.`,"Add it to show the pagination select."].join("\n")),t.current=!0)}const b=h(r.pageSize)?o.pageSizeOptions:[];return(0,a.jsx)(Qp,{as:o.slots.basePagination,count:i,page:f,rowsPerPageOptions:b,rowsPerPage:r.pageSize,onPageChange:m,onRowsPerPageChange:g,disabled:d})}"production"!==n.p.env.NODE_ENV&&(Yp.propTypes={component:i.elementType});const Jp=["className","rowCount","visibleRowCount"],Zp=(0,s.s)("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:tt.spacing(0,2)}),ef=ge((function(e,t){const{className:o,rowCount:l,visibleRowCount:i}=e,s=(0,r.cH)(e,Jp),c=Ae(),u=qe(),d=(e=>{const{classes:t}=e;return(0,r.I)({root:["rowCount"]},Yo,t)})(u);if(0===l)return null;const p=i<l?c.current.getLocaleText("footerTotalVisibleRows")(i,l):l.toLocaleString();return(0,a.jsxs)(Zp,(0,r.cG)({className:(0,n.c)(d.root,o),ownerState:u},s,{ref:t,children:[c.current.getLocaleText("footerTotalRows")," ",p]}))}));"production"!==n.p.env.NODE_ENV&&(ef.propTypes={rowCount:i.number.isRequired,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),visibleRowCount:i.number.isRequired});const tf=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],of=Do(qs,((e,t)=>!!t&&!!Tl(e))),nf=ge((function(e,t){var o;const{selected:i,rowId:s,row:c,index:u,style:d,rowHeight:p,className:f,visibleColumns:g,pinnedColumns:m,offsetLeft:h,columnsTotalWidth:b,firstColumnIndex:v,lastColumnIndex:w,focusedColumnIndex:C,isFirstVisible:y,isLastVisible:x,isNotVisible:R,showBottomBorder:S,scrollbarWidth:I,gridHasFiller:M,onClick:P,onDoubleClick:k,onMouseEnter:E,onMouseLeave:O,onMouseOut:T,onMouseOver:F}=e,G=(0,r.cH)(e,tf),D=Ga(),H=Wr(),j=l.useRef(null),N=qe(),$=Va(D),L=Po(D,Hl),V=Po(D,Mn),z=Po(D,Sr),A=N.rowReordering,B=Po(D,of,A),q=(0,r.aH)(j,t),W=xn(D,s),_=Po(D,Ws,{rowId:s,editMode:N.editMode}),U=N.editMode===Qn.Row,K=void 0!==C,X=K&&C>=m.left.length&&C<v,Q=K&&C<g.length-m.right.length&&C>=w,Y=function(e,t){return(0,r.I)(t,Yo,e)}(N.classes,{root:["row",i&&"selected",U&&"row--editable",_&&"row--editing",y&&"row--firstVisible",x&&"row--lastVisible",S&&"row--borderBottom","auto"===p&&"row--dynamicHeight"]}),J=H.hooks.useGridRowAriaAttributes();l.useLayoutEffect((()=>{if($.range){const e=D.current.getRowIndexRelativeToVisibleRows(s);void 0!==e&&D.current.unstable_setLastMeasuredRowIndex(e)}if(j.current&&"auto"===p)return D.current.observeRowHeight(j.current,s)}),[D,$.range,p,s]);const Z=l.useCallback(((e,t)=>o=>{ru(o)||D.current.getRow(s)&&(D.current.publishEvent(e,D.current.getRowParams(s),o),t&&t(o))}),[D,s]),ee=l.useCallback((e=>{const t=tu(e.target,Jo.cell),o=null==t?void 0:t.getAttribute("data-field");if(o){if(o===Ni.field||o===Cl||"__reorder__"===o||D.current.getCellMode(s,o)===Yn.Edit)return;const e=D.current.getColumn(o);if((null==e?void 0:e.type)===ol)return}Z("rowClick",P)(e)}),[D,P,Z,s]),{slots:te,slotProps:oe,disableColumnReorder:ne}=N,re=Po(D,(()=>(0,r.cG)({},D.current.getRowHeightEntry(s))),void 0,yo),le=l.useMemo((()=>{if(R)return{opacity:0,width:0,height:0};const e=(0,r.cG)({},d,{maxHeight:"auto"===p?"none":p,minHeight:p,"--height":"number"==typeof p?`${p}px`:p});if(re.spacingTop){e["border"===N.rowSpacingType?"borderTopWidth":"marginTop"]=re.spacingTop}if(re.spacingBottom){const t="border"===N.rowSpacingType?"borderBottomWidth":"marginBottom";let o=e[t];"number"!=typeof o&&(o=parseInt(o||"0",10)),o+=re.spacingBottom,e[t]=o}return e}),[R,p,d,re,N.rowSpacingType]),ie=D.current.unstable_applyPipeProcessors("rowClassName",[],s),ae=J(W,u);if("function"==typeof N.getRowClassName){const e=u-((null==(o=$.range)?void 0:o.firstRowIndex)||0),t=(0,r.cG)({},D.current.getRowParams(s),{isFirstVisible:0===e,isLastVisible:e===$.rows.length-1,indexRelativeToCurrentPage:e});ie.push(N.getRowClassName(t))}const se=function(e,t,o,n){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:yl.NONE;const i=D.current.unstable_getCellColSpanInfo(s,o);if(null!=i&&i.spannedByColSpan)return null;const u=(null==i?void 0:i.cellProps.width)??e.computedWidth,d=(null==i?void 0:i.cellProps.colSpan)??1,f=Hp(l,e.computedWidth,o,z,b,I);if("skeletonRow"===W.type)return(0,a.jsx)(te.skeletonCell,{type:e.type,width:u,height:p,field:e.field,align:e.align},e.field);const g="__reorder__"===e.field,m=!(ne||e.disableReorder),h=B&&!L.length&&V<=1,v=!(m||g&&h),w=l===yl.VIRTUAL,C=Np(l,t),y=jp(l,t,n,N.showCellVerticalBorder,M);return(0,a.jsx)(te.cell,(0,r.cG)({column:e,width:u,rowId:s,align:e.align||"left",colIndex:o,colSpan:d,disableDragEvents:v,isNotVisible:w,pinnedOffset:f,pinnedPosition:l,showLeftBorder:C,showRightBorder:y,row:c,rowNode:W},null==oe?void 0:oe.cell),e.field)},ce=m.left.map(((e,t)=>se(e,t,t,m.left.length,yl.LEFT))),ue=m.right.map(((e,t)=>{const o=g.length-m.right.length+t;return se(e,t,o,m.right.length,yl.RIGHT)})),de=g.length-m.left.length-m.right.length,pe=[];X&&pe.push(se(g[C],C-m.left.length,C,de,yl.VIRTUAL));for(let n=v;n<w;n+=1){const e=g[n],t=n-m.left.length;e&&pe.push(se(e,t,n,de))}Q&&pe.push(se(g[C],C-m.left.length,C,de,yl.VIRTUAL));const fe=c?{onClick:ee,onDoubleClick:Z("rowDoubleClick",k),onMouseEnter:Z("rowMouseEnter",E),onMouseLeave:Z("rowMouseLeave",O),onMouseOut:Z("rowMouseOut",T),onMouseOver:Z("rowMouseOver",F)}:null;return(0,a.jsxs)("div",(0,r.cG)({"data-id":s,"data-rowindex":u,role:"row",className:(0,n.c)(...ie,Y.root,f),style:le},ae,fe,G,{ref:q,children:[ce,(0,a.jsx)("div",{role:"presentation",className:Jo.cellOffsetLeft,style:{width:h}}),pe,(0,a.jsx)("div",{role:"presentation",className:(0,n.c)(Jo.cell,Jo.cellEmpty)}),ue,0!==I&&(0,a.jsx)(Lp,{pinnedRight:m.right.length>0,borderTop:!y})]}))}));"production"!==n.p.env.NODE_ENV&&(nf.propTypes={columnsTotalWidth:i.number.isRequired,firstColumnIndex:i.number.isRequired,focusedColumnIndex:i.number,gridHasFiller:i.bool.isRequired,index:i.number.isRequired,isFirstVisible:i.bool.isRequired,isLastVisible:i.bool.isRequired,isNotVisible:i.bool.isRequired,lastColumnIndex:i.number.isRequired,offsetLeft:i.number.isRequired,onClick:i.func,onDoubleClick:i.func,onMouseEnter:i.func,onMouseLeave:i.func,pinnedColumns:i.object.isRequired,row:i.object.isRequired,rowHeight:i.oneOfType([i.oneOf(["auto"]),i.number]).isRequired,rowId:i.oneOfType([i.number,i.string]).isRequired,scrollbarWidth:i.number.isRequired,selected:i.bool.isRequired,showBottomBorder:i.bool.isRequired,visibleColumns:i.arrayOf(i.object).isRequired});const rf=Xo(nf);function lf(e){let{privateApiRef:t,configuration:o,props:n,children:r}=e;const i=l.useRef(t.current.getPublicApi());return(0,a.jsx)(qr.Provider,{value:o,children:(0,a.jsx)(Be.Provider,{value:n,children:(0,a.jsx)(Fa.Provider,{value:t,children:(0,a.jsx)(ze.Provider,{value:i,children:(0,a.jsx)(Dc,{children:(0,a.jsx)(Xr,{children:r})})})})})})}const af=function(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}()&&null!=window.localStorage.getItem("DEBUG"),sf=()=>{},cf={debug:sf,info:sf,warn:sf,error:sf},uf=["debug","info","warn","error"];function df(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console;const n=uf.indexOf(t);if(-1===n)throw new Error(`MUI X: Log level ${t} not recognized.`);return uf.reduce(((t,r,l)=>(t[r]=l>=n?function(){for(var t=arguments.length,n=new Array(t),l=0;l<t;l++)n[l]=arguments[l];const[i,...a]=n;o[r](`MUI X: ${e} - ${i}`,...a)}:sf,t)),{})}function pf(e){return(pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ff(e){var t=function(e,t){if("object"!=pf(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t);if("object"!=pf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==pf(t)?t:t+""}const gf=function(e,t,o){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const r=l.useRef(null),i=l.useRef(`mui-${Math.round(1e9*Math.random())}`),a=l.useCallback((()=>{r.current=e.current.registerPipeProcessor(t,i.current,o)}),[e,o,t]);$a((()=>{n&&a()}));const s=l.useRef(!0);l.useEffect((()=>(s.current?s.current=!1:n&&a(),()=>{r.current&&(r.current(),r.current=null)})),[a,n])},mf=(e,t,o)=>{const n=l.useRef(null),r=l.useRef(`mui-${Math.round(1e9*Math.random())}`),i=l.useCallback((()=>{n.current=e.current.registerPipeApplier(t,r.current,o)}),[e,o,t]);$a((()=>{i()}));const a=l.useRef(!0);l.useEffect((()=>(a.current?a.current=!1:i(),()=>{n.current&&(n.current(),n.current=null)})),[i])};let hf=function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e}({});const bf=(e,t,o,n)=>{const r=l.useCallback((()=>{e.current.registerStrategyProcessor(t,o,n)}),[e,n,o,t]);$a((()=>{r()}));const i=l.useRef(!0);l.useEffect((()=>{i.current?i.current=!1:r()}),[r])},vf="none",wf={dataSourceRowsUpdate:hf.DataSource,rowTreeCreation:hf.RowTree,filtering:hf.RowTree,sorting:hf.RowTree,visibleRowsLookupCreation:hf.RowTree},Cf=(e,t)=>
127(0,r.cG)({},e,{props:{getRowId:t.getRowId}}),yf=(e,t)=>{(e=>{const t=l.useRef(null),o=l.useRef(null),n=l.useRef(null),r=l.useRef(null),i=l.useRef(null),a=l.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:o,virtualScrollerRef:n,virtualScrollbarVerticalRef:r,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})})(e),((e,t)=>{l.useEffect((()=>{e.current.setState((e=>(0,r.cG)({},e,{props:{getRowId:t.getRowId}})))}),[e,t.getRowId])})(e,t),(e=>{const t=(0,r.cN)();void 0===e.current.state.isRtl&&(e.current.state.isRtl=t);const o=l.useRef(!0);l.useEffect((()=>{o.current?o.current=!1:e.current.setState((e=>(0,r.cG)({},e,{isRtl:t})))}),[e,t])})(e),((e,t)=>{Ha(e,{getLogger:l.useCallback((e=>af?df(e,"debug",t.logger):t.logLevel?df(e,t.logLevel.toString(),t.logger):cf),[t.logLevel,t.logger])},"private")})(e,t),(e=>{const t=l.useRef({}),o=l.useCallback((e=>{t.current[e.stateId]=e}),[]),n=l.useCallback(((o,n)=>{let r;if(r=function(e){return"function"==typeof e}(o)?o(e.current.state):o,e.current.state===r)return!1;const l={current:{state:r}};let i=!1;const a=[];if(Object.keys(t.current).forEach((o=>{const n=t.current[o],r=n.stateSelector(e),s=n.stateSelector(l);s!==r&&(a.push({stateId:n.stateId,hasPropChanged:s!==n.propModel}),void 0!==n.propModel&&s!==n.propModel&&(i=!0))})),a.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${a[0].stateId}, therefore, you're not allowed to update ${a.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(i||(e.current.state=r,e.current.publishEvent("stateChange",r),e.current.store.update(r)),1===a.length){const{stateId:o,hasPropChanged:r}=a[0],s=t.current[o],c=s.stateSelector(l);s.propOnChange&&r&&s.propOnChange(c,{reason:n,api:e.current}),i||e.current.publishEvent(s.changeEvent,c,{reason:n})}return!i}),[e]),i={updateControlState:l.useCallback(((t,o,n)=>e.current.setState((e=>(0,r.cG)({},e,{[t]:o(e[t])})),n)),[e]),registerControlState:o};Ha(e,{setState:n},"public"),Ha(e,i,"private")})(e),(e=>{const t=l.useRef({}),o=l.useRef(!1),n=l.useCallback((e=>{o.current||!e||(o.current=!0,Object.values(e.appliers).forEach((e=>{e()})),o.current=!1)}),[]),i=l.useCallback(((e,o,r)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}});const l=t.current[e];return l.processors.get(o)!==r&&(l.processors.set(o,r),l.processorsAsArray=Array.from(t.current[e].processors.values()),n(l)),()=>{t.current[e].processors.delete(o),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values())}}),[n]),a=l.useCallback(((e,o,n)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[e].appliers[o]=n,()=>{const n=t.current[e].appliers,l=(0,r.cH)(n,[o].map(ff));t.current[e].appliers=l})),[]),s=l.useCallback((e=>{n(t.current[e])}),[n]),c={unstable_applyPipeProcessors:l.useCallback((function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];const[r,l,i]=o;if(!t.current[r])return l;const a=t.current[r].processorsAsArray;let s=l;for(let t=0;t<a.length;t+=1)s=a[t](s,i);return s}),[])};Ha(e,{registerPipeProcessor:i,registerPipeApplier:a,requestPipeProcessorsApplication:s},"private"),Ha(e,c,"public")})(e),(e=>{const t=l.useRef(new Map),o=l.useRef({}),n=l.useCallback(((t,n,l)=>{o.current[n]||(o.current[n]={});const i=o.current[n],a=i[t];return i[t]=l,!a||a===l||t===e.current.getActiveStrategy(wf[n])&&e.current.publishEvent("activeStrategyProcessorChange",n),()=>{const e=o.current[n],l=(0,r.cH)(e,[t].map(ff));o.current[n]=l}}),[e]),i=l.useCallback(((t,n)=>{const r=e.current.getActiveStrategy(wf[t]);if(null==r)throw new Error("Can't apply a strategy processor before defining an active strategy");const l=o.current[t];if(!l||!l[r])throw new Error(`No processor found for processor "${t}" on strategy "${r}"`);return(0,l[r])(n)}),[e]),a=l.useCallback((e=>{const o=Array.from(t.current.entries()).find((t=>{let[,o]=t;return o.group===e&&o.isAvailable()}));return(null==o?void 0:o[0])??vf}),[]),s=l.useCallback(((o,n,r)=>{t.current.set(n,{group:o,isAvailable:r}),e.current.publishEvent("strategyAvailabilityChange")}),[e]);Ha(e,{registerStrategyProcessor:n,applyStrategyProcessor:i,getActiveStrategy:a,setStrategyAvailability:s},"private")})(e),((e,t)=>{const o=l.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.register("public",{getLocaleText:o})})(e,t),e.current.register("private",{rootProps:t})},xf=(e,t,o)=>{const n=l.useRef(!1);n.current||(t.current.state=e(t.current.state,o,t),n.current=!0)};function Rf(e,t){if(null==e)return"";const o="string"==typeof e?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const e=o.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(e[0])?`"'${e}"`:[t.delimiter,"\n","\r",'"'].some((e=>o.includes(e)))?`"${e}"`:e}return o}const Sf=(e,t)=>
127{var o,n;const{csvOptions:r,ignoreValueFormatter:l}=t;let i;if(l){const t=e.colDef.type;i="number"===t?String(e.value):"date"===t||"dateTime"===t?null==(o=e.value)?void 0:o.toISOString():"function"==typeof(null==(n=e.value)?void 0:n.toString)?e.value.toString():e.value}else i=e.formattedValue;return Rf(i,r)};class If{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}function Mf(e){const{columns:t,rowIds:o,csvOptions:r,ignoreValueFormatter:l,apiRef:i}=e,a=o.reduce(((e,o)=>`${e}${(e=>{let{id:t,columns:o,getCellParams:r,csvOptions:l,ignoreValueFormatter:i}=e;const a=new If({csvOptions:l});return o.forEach((e=>{const o=r(t,e.field);"production"!==n.p.env.NODE_ENV&&"[object Object]"===String(o.formattedValue)&&wo(["MUI X: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]),a.addValue(Sf(o,{ignoreValueFormatter:i,csvOptions:l}))})),a.getRowString()})({id:o,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:l,csvOptions:r})}\r\n`),"").trim();if(!r.includeHeaders)return a;const s=t.filter((e=>e.field!==Ni.field)),c=[];if(r.includeColumnGroupsHeaders){const e=i.current.getAllGroupDetails();let t=0;const o=s.reduce(((e,o)=>{const n=i.current.getColumnGroupPath(o.field);return e[o.field]=n,t=Math.max(t,n.length),e}),{});for(let n=0;n<t;n+=1){const t=new If({csvOptions:r,sanitizeCellValue:Rf});c.push(t),s.forEach((r=>{const l=(o[r.field]||[])[n],i=e[l];t.addValue(i?i.headerName||i.groupId:"")}))}}const u=new If({csvOptions:r,sanitizeCellValue:Rf});return s.forEach((e=>{u.addValue(e.headerName||e.field)})),c.push(u),`${c.map((e=>e.getRowString())).join("\r\n")}\r\n${a}`.trim()}function Pf(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const o=document.createRange();o.selectNode(t);const n=window.getSelection();n.removeAllRanges(),n.addRange(o);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const kf=(e,t)=>{const o=t.ignoreValueFormatterDuringExport,n=("object"==typeof o?null==o?void 0:o.clipboardExport:o)||!1,r=t.clipboardCopyCellDelimiter,i=l.useCallback((t=>{if(!function(e){return(e.ctrlKey||e.metaKey)&&"C"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}(t)||function(e){var t;return!!(null!=(t=window.getSelection())&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}(t.target))return;let o="";if(ei(e)>0)o=e.current.getDataAsCsv({includeHeaders:!1,delimiter:r,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=di(e);if(t){const l=e.current.getCellParams(t.id,t.field);o=Sf(l,{csvOptions:{delimiter:r,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:n})}}o=e.current.unstable_applyPipeProcessors("clipboardCopy",o),o&&(function(e){navigator.clipboard?navigator.clipboard.writeText(e).catch((()=>{Pf(e)})):Pf(e)}(o),e.current.publishEvent("clipboardCopy",o))}),[e,n,r]);Na(e,(()=>e.current.rootElementRef.current),"keydown",i),sn(e,"clipboardCopy",t.onClipboardCopy)},Ef=e=>(0,r.cG)({},e,{columnMenu:{open:!1}}),Of=(e,t,o)=>{var n,l,i;const a=Ra({apiRef:o,columnsToUpsert:t.columns,initialState:null==(n=t.initialState)?void 0:n.columns,columnVisibilityModel:t.columnVisibilityModel??(null==(i=null==(l=t.initialState)?void 0:l.columns)?void 0:i.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return(0,r.cG)({},e,{columns:a,pinnedColumns:e.pinnedColumns??pr})};function Tf(e){return t=>(0,r.cG)({},t,{columns:e})}const Ff=(e,t)=>
127{var o;return(0,r.cG)({},e,{density:(null==(o=t.initialState)?void 0:o.density)??t.density??"standard"})};const Gf=e=>{let{apiRef:t,options:o}=e;const n=br(t);return o.fields?o.fields.reduce(((e,t)=>{const o=n.find((e=>e.field===t));return o&&e.push(o),e}),[]):(o.allColumns?n:Cr(t)).filter((e=>!e.disableExport))},Df=e=>{let{apiRef:t}=e;var o,n;const r=Wl(t),l=yn(t),i=ei(t),a=r.filter((e=>"footer"!==l[e].type)),s=En(t),c=(null==(o=null==s?void 0:s.top)?void 0:o.map((e=>e.id)))||[],u=(null==(n=null==s?void 0:s.bottom)?void 0:n.map((e=>e.id)))||[];if(a.unshift(...c),a.push(...u),i>0){const e=ti(t);return a.filter((t=>e.has(t)))}return a},Hf=(e,t)=>{const o=ja(e,"useGridCsvExport"),n=t.ignoreValueFormatterDuringExport,r=("object"==typeof n?null==n?void 0:n.csvExport:n)||!1,i=l.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o.debug("Get data as CSV");return Mf({columns:Gf({apiRef:e,options:t}),rowIds:(t.getRowsToExport??Df)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:r,apiRef:e})}),[o,e,r]),s=l.useCallback((e=>{o.debug("Export data as CSV");const t=i(e);!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"csv";const o=`${arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.title||"untitled"}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=o,n.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI X: exportAs not supported.")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[o,i]);Ha(e,{getDataAsCsv:i,exportDataAsCsv:s},"public");const c=l.useCallback(((e,t)=>{var o;return null!=(o=t.csvOptions)&&o.disableToolbarButton?e:[...e,{component:(0,a.jsx)(_d,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);gf(e,"exportMenu",c)};const jf=(e,t,o)=>{let n=e.paginationModel;const l=e.rowCount,i=(null==o?void 0:o.pageSize)??n.pageSize,a=(null==o?void 0:o.page)??n.page,s=vi(l,i,a);o&&((null==o?void 0:o.page)!==n.page||(null==o?void 0:o.pageSize)!==n.pageSize)&&(n=o);const c=-1===i?0:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 0===t?e:Math.max(Math.min(e,t-1),0)}(n.page,s);return c!==n.page&&(n=(0,r.cG)({},n,{page:c})),Ci(n.pageSize,t),n};const Nf=(e,t)=>{const o=null!==e.current.rootElementRef.current,i=ja(e,"useGridPrintExport"),s=l.useRef(null),c=l.useRef(null),u=l.useRef({}),d=l.useRef([]),p=l.useRef(null);l.useEffect((()=>{s.current=(0,r.cL)(e.current.rootElementRef.current)}),[e,o]);const f=l.useCallback(((t,o,n)=>new Promise((r=>{const l=Gf({apiRef:e,options:{fields:t,allColumns:o}}).map((e=>e.field)),i=br(e),a={};i.forEach((e=>{a[e.field]=l.includes(e.field)})),n&&(a[Ni.field]=!0),e.current.setColumnVisibilityModel(a),r()}))),[e]),g=l.useCallback((t=>{const o=t({apiRef:e}).reduce(((t,o)=>{const n=e.current.getRow(o);return n[ll]||t.push(n),t}),[]);e.current.setRows(o)}),[e]),m=l.useCallback(((o,l)=>{var i,a,c;const u=(0,r.cG)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},l),d=o.contentDocument;if(!d)return;const p=Aa(e),f=e.current.rootElementRef.current,g=f.cloneNode(!0);g.querySelector(`.${Jo.main}`).style.overflow="visible",g.style.contain="size";let m=(null==(i=f.querySelector(`.${Jo.toolbarContainer}`))?void 0:i.offsetHeight)||0,h=(null==(a=f.querySelector(`.${Jo.footerContainer}`))?void 0:a.offsetHeight)||0;const b=g.querySelector(`.${Jo.footerContainer}`);u.hideToolbar&&(null==(c=g.querySelector(`.${Jo.toolbarContainer}`))||c.remove(),m=0),u.hideFooter&&b&&(b.remove(),h=0);const v=p.currentPageTotalHeight+Sa(e,t)+m+h;g.style.height=`${v}px`,g.style.boxSizing="content-box",!u.hideFooter&&b&&(b.style.position="absolute",b.style.width="100%",b.style.top=v-h+"px");const w=document.createElement("div");w.appendChild(g),d.body.style.marginTop="0px",d.body.innerHTML=w.innerHTML;const C="function"==typeof u.pageStyle?u.pageStyle():u.pageStyle;if("string"==typeof C){const e=d.createElement("style");e.appendChild(d.createTextNode(C)),d.head.appendChild(e)}u.bodyClassName&&d.body.classList.add(...u.bodyClassName.split(" "));let y=[];if(u.copyStyles){const e=f.getRootNode();y=function(e,t){const o=[],n=t.querySelectorAll("style, link[rel='stylesheet']");for(let r=0;r<n.length;r+=1){const t=n[r];if("STYLE"===t.tagName){const o=e.createElement(t.tagName),n=t.sheet;if(n){let t="";for(let e=0;e<n.cssRules.length;e+=1)"string"==typeof n.cssRules[e].cssText&&(t+=`${n.cssRules[e].cssText}\r\n`);o.appendChild(e.createTextNode(t)),e.head.appendChild(o)}}else if(t.getAttribute("href")){const n=e.createElement(t.tagName);for(let e=0;e<t.attributes.length;e+=1){const o=t.attributes[e];o&&n.setAttribute(o.nodeName,o.nodeValue||"")}o.push(new Promise((e=>{n.addEventListener("load",(()=>e()))}))),e.head.appendChild(n)}}return o}
127(d,"ShadowRoot"===e.constructor.name?e:s.current)}"test"!==n.p.env.NODE_ENV&&Promise.all(y).then((()=>{o.contentWindow.print()}))}),[e,s,t]),h=l.useCallback((t=>{var o,n;s.current.body.removeChild(t),e.current.restoreState(c.current||{}),null!=(n=null==(o=c.current)?void 0:o.columns)&&n.columnVisibilityModel||e.current.setColumnVisibilityModel(u.current),e.current.setState((e=>(0,r.cG)({},e,{virtualization:p.current}))),e.current.setRows(d.current),c.current=null,u.current={},d.current=[]}),[e]),b={exportDataAsPrint:l.useCallback((async o=>{if(i.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(c.current=e.current.exportState(),u.current=vr(e),d.current=e.current.getSortedRows().filter((e=>!e[ll])),t.pagination){const t={page:0,pageSize:Ul(e)};e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{paginationModel:jf(e.pagination,"DataGridPro",t)})})))}p.current=e.current.state.virtualization,e.current.setState((e=>(0,r.cG)({},e,{virtualization:(0,r.cG)({},e.virtualization,{enabled:!1,enabledForColumns:!1})}))),await f(null==o?void 0:o.fields,null==o?void 0:o.allColumns,null==o?void 0:o.includeCheckboxes),g((null==o?void 0:o.getRowsToExport)??Df),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const l=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==o?void 0:o.fileName);"test"===n.p.env.NODE_ENV?(s.current.body.appendChild(l),m(l,o),h(l)):(l.onload=()=>{m(l,o),l.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&h(l)}))},s.current.body.appendChild(l))}),[t,i,e,m,h,f,g])};Ha(e,b,"public");const v=l.useCallback(((e,t)=>{var o;return null!=(o=t.printOptions)&&o.disableToolbarButton?e:[...e,{component:(0,a.jsx)(Ud,{options:t.printOptions}),componentName:"printExport"}]}),[]);gf(e,"exportMenu",v)},$f=(e,t,o)=>{var n,l;const i=t.filterModel??(null==(l=null==(n=t.initialState)?void 0:n.filter)?void 0:l.filterModel)??cr();return(0,r.cG)({},e,{filter:(0,r.cG)({filterModel:Or(i,t.disableMultipleColumnsFiltering,o)},sr),visibleRowsLookup:{}})},Lf=e=>e.filteredRowsLookup;function Vf(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function zf(){return io(Object.values)}const Af=e=>(0,r.cG)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Bf=e=>{let{currentColIndex:t,firstColIndex:o,lastColIndex:n,isRtl:r}=e;if(r){if(t<n)return t+1}else if(!r&&t>o)return t-1;return null},qf=e=>{let{currentColIndex:t,firstColIndex:o,lastColIndex:n,isRtl:r}=e;if(r){if(t>o)return t-1}else if(!r&&t<n)return t+1;return null};const Wf=jo(Fi,En,((e,t)=>(t.top||[]).concat(e.rows,t.bottom||[]))),_f=(e,t)=>{const o=ja(e,"useGridKeyboardNavigation"),n=(0,r.cN)(),i=t.listView,a=l.useCallback((()=>Wf(e)),[e]),s="DataGrid"!==t.signature&&t.headerFilters,c=l.useCallback((function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"up";const a=Al(e),s=e.current.unstable_getCellColSpanInfo(n,t);s&&s.spannedByColSpan&&("left"===r?t=s.leftVisibleCellIndex:"right"===r&&(t=s.rightVisibleCellIndex));const c=i?es(e).field:yr(e)[t],u=function(e,t,o,n){var r,l;const i=Ya(e);if(null==(r=i[t])||!r[o])return t;const a=Wl(e);let s=a.indexOf(t)+("down"===n?1:-1);for(;s>=0&&s<a.length;){const e=a[s];if(null==(l=i[e])||!l[o])return e;s+="down"===n?1:-1}return t}(e,n,c,l),d=a.findIndex((e=>e.id===u));o.debug(`Navigating to cell row ${d}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:d}),e.current.setCellFocus(u,c)}),[e,o,i]),u=l.useCallback(((t,n)=>{o.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const r=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(r,n)}),[e,o]),d=l.useCallback(((t,n)=>{o.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const r=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(r,n)}),[e,o]),p=l.useCallback(((t,n,r)=>{o.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:l}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(l,n,r)}),[e,o]),f=l.useCallback((e=>{var t;return null==(t=a()[e])?void 0:t.id}),[a]),g=l.useCallback(((t,o)=>{const r=o.currentTarget.querySelector(`.${Jo.columnHeaderTitleContainerContent}`);if(r&&r.contains(o.target)&&t.field!==Ni.field)return;const l=a(),i=e.current.getViewportPageSize(),g=t.field?e.current.getColumnIndex(t.field):0,m=l.length>0?0:null,h=l.length-1,b=Cr(e).length-1,v=va(e);let w=!0;switch(o.key){case"ArrowDown":s?d(g,o):null!==m&&c(g,f(m));break;case"ArrowRight":{const e=qf({currentColIndex:g,firstColIndex:0,lastColIndex:b,isRtl:n});null!==e&&u(e,o);break}case"ArrowLeft":{const e=Bf({currentColIndex:g,firstColIndex:0,lastColIndex:b,isRtl:n});null!==e&&u(e,o);break}case"ArrowUp":v>0&&p(g,v-1,o);break;case"PageDown":null!==m&&null!==h&&c(g,f(Math.min(m+i,h)));break;case"Home":u(0,o);break;case"End":u(b,o);break;case"Enter":(o.ctrlKey||o.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:w=!1}w&&o.preventDefault()}),[e,a,s,d,c,f,n,u,p]),m=l.useCallback(((t,o)=>{const r=pa(e)===t.field,l=fa(e)===t.field;if(r||l||!Nu(o.key))return;const i=a(),s=e.current.getViewportPageSize(),p=t.field?e.current.getColumnIndex(t.field):0,g=i.length-1,m=Cr(e).length-1;let h=!0;switch(o.key){case"ArrowDown":{const e=f(0);null!=e&&c(p,e);break}case"ArrowRight":{const e=qf({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:n});null!==e&&d(e,o);break}case"ArrowLeft":{const r=Bf({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:n});null!==r?d(r,o):e.current.setColumnHeaderFilterFocus(t.field,o);break}case"ArrowUp":u(p,o);break;case"PageDown":null!==g&&c(p,f(Math.min(0+s,g)));break;case"Home":d(0,o);break;case"End":d(m,o);break;case" ":break;default:h=!1}h&&o.preventDefault()}),[e,a,d,n,u,c,f]),h=l.useCallback(((t,o)=>{const n=fi(e);if(null===n)return;const{field:r,depth:l}=n,{fields:i,depth:s,maxDepth:d}=t,g=a(),m=e.current.getViewportPageSize(),h=e.current.getColumnIndex(r),b=r?e.current.getColumnIndex(r):0,v=g.length-1,w=Cr(e).length-1;let C=!0;switch(o.key){case"ArrowDown":s===d-1?u(h,o):p(h,l+1,o);break;case"ArrowUp":s>0&&p(h,l-1,o);break;case"ArrowRight":{const e=i.length-i.indexOf(r)-1;h+e+1<=w&&p(h+e+1,l,o);break}case"ArrowLeft":{const e=i.indexOf(r);h-e-1>=0&&p(h-e-1,l,o);break}case"PageDown":null!==v&&c(b,f(Math.min(0+m,v)));break;case"Home":p(0,l,o);break;case"End":p(w,l,o);break;case" ":break;default:C=!1}C&&o.preventDefault()}),[e,a,u,p,c,f]),b=l.useCallback(((t,o)=>{if(ru(o))return;const r=e.current.getCellParams(t.id,t.field);if(r.cellMode===Yn.Edit||!Nu(o.key)||!e.current.unstable_applyPipeProcessors("canU
127pdateFocus",!0,{event:o,cell:r}))return;const l=a();if(0===l.length)return;const p=e.current.getViewportPageSize(),g=i?()=>0:e.current.getColumnIndex,m=t.field?g(t.field):0,h=l.findIndex((e=>e.id===t.id)),b=l.length-1,v=(i?[es(e)]:Cr(e)).length-1;let w=!0;switch(o.key){case"ArrowDown":h<b&&c(m,f(h+1),n?"right":"left","down");break;case"ArrowUp":h>0?c(m,f(h-1)):s?d(m,o):u(m,o);break;case"ArrowRight":{const e=qf({currentColIndex:m,firstColIndex:0,lastColIndex:v,isRtl:n});null!==e&&c(e,f(h),n?"left":"right");break}case"ArrowLeft":{const e=Bf({currentColIndex:m,firstColIndex:0,lastColIndex:v,isRtl:n});null!==e&&c(e,f(h),n?"right":"left");break}case"Tab":o.shiftKey&&m>0?c(m-1,f(h),"left"):!o.shiftKey&&m<v&&c(m+1,f(h),"right");break;case" ":{if(t.field===Cl)break;const e=t.colDef;if(e&&("__tree_data_group__"===e.field||(e=>e===wl||null!==(e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null})(e))(e.field)))break;!o.shiftKey&&h<b&&c(m,f(Math.min(h+p,b)));break}case"PageDown":h<b&&c(m,f(Math.min(h+p,b)));break;case"PageUp":{const e=Math.max(h-p,0);e!==h&&e>=0?c(m,f(e)):u(m,o);break}case"Home":o.ctrlKey||o.metaKey||o.shiftKey?c(0,f(0)):c(0,f(h));break;case"End":o.ctrlKey||o.metaKey||o.shiftKey?c(v,f(b)):c(v,f(h));break;default:w=!1}w&&o.preventDefault()}),[e,a,n,c,f,s,d,u,i]),v=l.useCallback(((e,t)=>{let{event:o}=t;return" "!==o.key&&e}),[]);gf(e,"canStartEditing",v),ln(e,"columnHeaderKeyDown",g),ln(e,"headerFilterKeyDown",m),ln(e,"columnGroupHeaderKeyDown",h),ln(e,"cellKeyDown",b)},Uf=(e,t)=>{var o,n,l,i,a,s,c;const u=(0,r.cG)({},wi(t.autoPageSize),t.paginationModel??(null==(n=null==(o=t.initialState)?void 0:o.pagination)?void 0:n.paginationModel));Ci(u.pageSize,t.signature);const d=t.rowCount??(null==(i=null==(l=t.initialState)?void 0:l.pagination)?void 0:i.rowCount)??("client"===t.paginationMode?null==(a=e.rows)?void 0:a.totalRowCount:void 0),p=t.paginationMeta??(null==(c=null==(s=t.initialState)?void 0:s.pagination)?void 0:c.meta)??{};return(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{paginationModel:u,rowCount:d,meta:p,enabled:!0===t.pagination,paginationMode:t.paginationMode})})},Kf=(e,t)=>{((e,t)=>{var o,n;const i=ja(e,"useGridPaginationMeta"),a=Po(e,Ii);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:Ii,changeEvent:"paginationMetaChange"});const s={setPaginationMeta:l.useCallback((t=>{a!==t&&(i.debug("Setting 'paginationMeta' to",t),e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{meta:t})}))))}),[e,i,a])};Ha(e,s,"public");const c=l.useCallback(((o,n)=>{var l,i;const a=Ii(e);return n.exportOnlyDirtyModels&&null==t.paginationMeta&&null==(null==(i=null==(l=t.initialState)?void 0:l.pagination)?void 0:i.meta)?o:(0,r.cG)({},o,{pagination:(0,r.cG)({},o.pagination,{meta:a})})}),[e,t.paginationMeta,null==(n=null==(o=t.initialState)?void 0:o.pagination)?void 0:n.meta]),u=l.useCallback(((t,o)=>{var n;const l=null!=(n=o.stateToRestore.pagination)&&n.meta?o.stateToRestore.pagination.meta:Ii(e);return e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{meta:l})}))),t}),[e]);gf(e,"exportState",c),gf(e,"restoreState",u),l.useEffect((()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)}),[e,t.paginationMeta])})(e,t),((e,t)=>{var o,n;const i=ja(e,"useGridPaginationModel"),a=Po(e,dn),s=l.useRef($l(e)),c=Math.floor(t.rowHeight*a);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Ri,changeEvent:"paginationModelChange"});const u=l.useCallback((t=>{const o=Ri(e);t!==o.page&&(i.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:o.pageSize}))}),[e,i]),d=l.useCallback((t=>{const o=Ri(e);t!==o.pageSize&&(i.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:o.page}))}),[e,i]),p=l.useCallback((o=>{const n=Ri(e);o!==n&&(i.debug("Setting 'paginationModel' to",o),e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{paginationModel:jf(e.pagination,t.signature,o)})})),"setPaginationModel"))}),[e,i,t.signature]);Ha(e,{setPage:u,setPageSize:d,setPaginationModel:p},"public");const f=l.useCallback(((o,n)=>{var l,i;const a=Ri(e);return!n.exportOnlyDirtyModels||null!=t.paginationModel||null!=(null==(i=null==(l=t.initialState)?void 0:l.pagination)?void 0:i.paginationModel)||0!==a.page&&a.pageSize!==(e=>
127e?0:100)(t.autoPageSize)?(0,r.cG)({},o,{pagination:(0,r.cG)({},o.pagination,{paginationModel:a})}):o}),[e,t.paginationModel,null==(n=null==(o=t.initialState)?void 0:o.pagination)?void 0:n.paginationModel,t.autoPageSize]),g=l.useCallback(((o,n)=>{var l,i;const a=null!=(l=n.stateToRestore.pagination)&&l.paginationModel?(0,r.cG)({},wi(t.autoPageSize),null==(i=n.stateToRestore.pagination)?void 0:i.paginationModel):Ri(e);return e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{paginationModel:jf(e.pagination,t.signature,a)})})),"stateRestorePreProcessing"),o}),[e,t.autoPageSize,t.signature]);gf(e,"exportState",f),gf(e,"restoreState",g);const m=l.useCallback((()=>{if(!t.autoPageSize)return;const o=e.current.getRootDimensions(),n=Math.floor(o.viewportInnerSize.height/c);e.current.setPageSize(n)}),[e,t.autoPageSize,c]),h=l.useCallback((t=>{if(null==t)return;const o=Ri(e);if(0===o.page)return;const n=ki(e);o.page>n-1&&e.current.setPage(Math.max(0,n-1))}),[e]),b=l.useCallback((()=>{0!==Ri(e).page&&e.current.setPage(0),0!==e.current.getScrollPosition().top&&e.current.scroll({top:0})}),[e]),v=l.useCallback((t=>{const o=(0,r.cG)({},t,{items:Ql(e)});Xd(o,s.current)||(s.current=o,b())}),[e,b]);ln(e,"viewportInnerSizeChange",m),ln(e,"paginationModelChange",(()=>{var t;const o=Ri(e);null!=(t=e.current.virtualScrollerRef)&&t.current&&e.current.scrollToIndexes({rowIndex:o.page*o.pageSize})})),ln(e,"rowCountChange",h),ln(e,"sortModelChange",b),ln(e,"filterModelChange",v);const w=l.useRef(!0);l.useEffect((()=>{w.current?w.current=!1:t.pagination&&e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{paginationModel:jf(e.pagination,t.signature,t.paginationModel)})})))}),[e,t.paginationModel,t.signature,t.pagination]),l.useEffect((()=>{e.current.setState((e=>{const o=!0===t.pagination;return e.pagination.paginationMode===t.paginationMode||e.pagination.enabled===o?e:(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{paginationMode:t.paginationMode,enabled:!0===t.pagination})})}))}),[e,t.paginationMode,t.pagination]),l.useEffect(m,[m])})(e,t),((e,t)=>{var o,n;const i=ja(e,"useGridRowCount"),a=Po(e,Kl),s=Po(e,Si),c=Po(e,Ii),u=Po(e,Ri),d=(0,r.c_)((()=>Ri(e).pageSize));e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Si,changeEvent:"rowCountChange"});const p={setRowCount:l.useCallback((t=>{s!==t&&(i.debug("Setting 'rowCount' to",t),e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{rowCount:t})}))))}),[e,i,s])};Ha(e,p,"public");const f=l.useCallback(((o,n)=>{var l,i;const a=Si(e);return n.exportOnlyDirtyModels&&null==t.rowCount&&null==(null==(i=null==(l=t.initialState)?void 0:l.pagination)?void 0:i.rowCount)?o:(0,r.cG)({},o,{pagination:(0,r.cG)({},o.pagination,{rowCount:a})})}),[e,t.rowCount,null==(n=null==(o=t.initialState)?void 0:o.pagination)?void 0:n.rowCount]),g=l.useCallback(((t,o)=>{var n;const l=null!=(n=o.stateToRestore.pagination)&&n.rowCount?o.stateToRestore.pagination.rowCount:Si(e);return e.current.setState((e=>(0,r.cG)({},e,{pagination:(0,r.cG)({},e.pagination,{rowCount:l})}))),t}),[e]);gf(e,"exportState",f),gf(e,"restoreState",g);const m=l.useCallback((o=>{"client"===t.paginationMode||!d.current||o.pageSize!==d.current&&(d.current=o.pageSize,-1===s&&e.current.setPage(0))}),[t.paginationMode,d,s,e]);ln(e,"paginationModelChange",m),l.useEffect((()=>{"client"===t.paginationMode?e.current.setRowCount(a):null!=t.rowCount&&e.current.setRowCount(t.rowCount)}),[e,t.paginationMode,a,t.rowCount]);const h=!1===c.hasNextPage;l.useEffect((()=>{h&&-1===s&&e.current.setRowCount(u.pageSize*u.page+a)}),[e,a,h,s,u])})(e,t)},Xf=(e,t)=>{var o;return(0,r.cG)({},e,{preferencePanel:(null==(o=t.initialState)?void 0:o.preferencePanel)??{open:!1}})},Qf=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;default:return""}},Yf=["id","field"],Jf=["id","field"],Zf=["id"],eg=["id"],tg=e=>(0,r.cG)({},e,{editRows:{}}),og=(e,t)=>{((e,t)=>{const[o,i]=l.useState({}),a=l.useRef(o),s=l.useRef({}),{processRowUpdate:c,onProcessRowUpdateError:u,cellModesModel:d,onCellModesModelChange:p}=t,f=e=>function(){t.editMode===Qn.Cell&&e(...arguments)},g=l.useCallback(((t,o)=>{const n=e.current.getCellParams(t,o);if(!e.current.isCellEditable(n))throw new Error(`MUI X: The cell with id=${t} and field=${o} is not editable.`)}),[e]),m=l.useCallback(((t,o,n)=>{if(e.current.getCellMode(t,o)!==n)throw new Error(`MUI X: The cell with id=${t} and field=${o} is not in ${n} mode.`)}),[e]),h=l.useCallback(((t,o)=>{if(!t.isEditable||t.cellMode===Yn.Edit)return;const n=(0,r.cG)({},t,{reason:nr.cellDoubleClick});e.current.publishEvent("cellEditStart",n,o)}),[e]),b=l.useCallback(((t,o)=>{if(t.cellMode===Yn.View||e.current.getCellMode(t.id,t.field)===Yn.View)return;const n=(0,r.cG)({},t,{reason:rr.cellFocusOut});e.current.publishEvent("cellEditStop",n,o)}),[e]),v=l.useCallback(((t,o)=>{if(t.cellMode===Yn.Edit){if(229===o.which)return;let n;if("Escape"===o.key?n=rr.escapeKeyDown:"Enter"===o.key?n=rr.enterKeyDown:"Tab"===o.key&&(n=o.shiftKey?rr.shiftTabKeyDown:rr.tabKeyDown,o.preventDefault()),n){const l=(0,r.cG)({},t,{reason:n});e.current.publishEvent("cellEditStop",l,o)}}else if(t.isEditable){let n;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:o,cellParams:t,editMode:"cell"}))return;if(ju(o)?n=nr.printableKeyDown:Lu(o)?n=nr.pasteKeyDown:"Enter"===o.key?n=nr.enterKeyDown:("Backspace"===o.key||"Delete"===o.key)&&(n=nr.deleteKeyDown),n){const l=(0,r.cG)({},t,{reason:n,key:o.key});e.current.publishEvent("cellEditStart",l,o)}}}),[e]),w=l.useCallback((t=>{const{id:o,field:n,reason:r}=t,l={id:o,field:n};(r===nr.printableKeyDown||r===nr.deleteKeyDown||r===nr.pasteKeyDown)&&(l.deleteValue=!0),e.current.startCellEditMode(l)}),[e]),C=l.useCallback((t=>{const{id:o,field:n,reason:r}=t;let l;e.current.runPendingEditCellValueMutation(o,n),r===rr.enterKeyDown?l="below":r===rr.tabKeyDown?l="right":r===rr.shiftTabKeyDown&&(l="left");const i="escapeKeyDown"===r;e.current.stopCellEditMode({id:o,field:n,ignoreModifications:i,cellToFocusAfter:l})}),[e]);var y;ln(e,"cellDoubleClick",f(h)),ln(e,"cellFocusOut",f(b)),ln(e,"cellKeyDown",f(v)),ln(e,"cellEditStart",f(w)),ln(e,"cellEditStop",f(C)),sn(e,"cellEditStart",t.onCellEditStart),sn(e,"cellEditStop",(y=t.onCellEditStop,async function(){var t;if(y){const{id:o,field:n}=arguments.length<=0?void 0:arguments[0];(null==(t=e.current.state.editRows[o][n])?void 0:t.error)||y(...arguments)}}));const x=l.useCallback(((t,o)=>{const n=qs(e);return n[t]&&n[t][o]?Yn.Edit:Yn.View}),[e]),R=(0,r.cK)((o=>{const n=o!==t.cellModesModel;p&&n&&p(o,{api:e.current}),(!t.cellModesModel||!n)&&(i(o),a.current=o,e.current.publishEvent("cellModesModelChange",o))})),S=l.useCallback(((e,t,o)=>{const n=(0,r.cG)({},a.current);if(null!==o)n[e]=(0,r.cG)({},n[e],{[t]:(0,r.cG)({},o)});else{const o=n[e],l=(0,r.cH)(o,[t].map(ff));n[e]=l,0===Object.keys(n[e]).length&&delete n[e]}R(n)}),[R]),I=l.useCallback(((t,o,n)=>{e.current.setState((e=>{const l=(0,r.cG)({},e.editRows);return null!==n?l[t]=(0,r.cG)({},l[t],{[o]:(0,r.cG)({},n)}):(delete l[t][o],0===Object.keys(l[t]).length&&delete l[t]),(0,r.cG)({},e,{editRows:l})}))}),[e]),M=l.useCallback((e=>{const{id:t,field:o}=e,n=(0,r.cH)(e,Yf);g(t,o),m(t,o,Yn.View),S(t,o,(0,r.cG)({mode:Yn.Edit},n))}),[g,m,S]),P=(0,r.cK)((async t=>{const{id:o,field:n,deleteValue:l,initialValue:i}=t,a=e.current.getCellValue(o,n);let s=a;l?s=Qf(e.current.getColumn(n)):i&&(s=i);const c=e.current.getColumn(n),u=!!c.preProcessEditCellProps&&l;let d={value:s,error:!1,isProcessingProps:u};if(I(o,n,d),e.current.setCellFocus(o,n),u&&(d=await Promise.resolve(c.preProcessEditCellProps({id:o,row:e.current.getRow(o),props:d,hasChanged:s!==a})),e.current.getCellMode(o,n)===Yn.Edit)){const t=qs(e);I(o,n,(0,r.cG)({},d,{value:t[o][n].value,isProcessingProps:!1}))}})),k=l.useCallback((e=>{const{id:t,field:o}=e,n=(0,r.cH)(e,Jf);m(t,o,Yn.Edit),S(t,o,(0,r.cG)({mode:Yn.View},n))}),[m,S]),E=(0,r.cK)((async o=>{var r;const{id:l,field:i,ignoreModifications:a,cellToFocusAfter:d="none"}=o;m(l,i,Yn.Edit),e.current.runPendingEditCellValueMutation(l,i);const p=()=>{I(l,i,null),S(l,i,null),"none"!==d&&e.current.moveFocusToRelativeCell(l,i,d)};if(a)return void p();const f=qs(e),{error:g,isProcessingProps:h}=f[l][i],b=e.current.getRow(l);if(g||h)return s.current[l][i].mode=Yn.Edit,void S(l,i,{mode:Yn.Edit});const v=e.current.getRowWithUpdatedValuesFromCellEditing(l,i);if(null!=(r=t.dataSource)&&r.updateRow){if(Xd(b,v))return void p();const t=()=>{s.current[l][i].mode=Yn.Edit,S(l,i,{mode:Yn.Edit})},o={rowId:l,updatedRow:v,previousRow:b};try{await e.current.dataSource.editRow(o),p()}catch{t()}}else if(c){const t=e=>{s.current[l][i].mode=Yn.Edit,S(l,i,{mode:Yn.Edit}),u?u(e):"production"!==n.p.env.NODE_ENV&&wo(["MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/editing/persistence/."],"error")};try{Promise.resolve(c(v,b,{rowId:l})).then((t=>{e.current.updateRows([t]),p()})).catch(t)}catch(w){t(w)}}else e.current.updateRows([v]),p()})),O=l.useCallback((async t=>{var o,n;const{id:l,field:i,value:a,debounceMs:s,unstable_skipValueParser:c}=t;g(l,i),m(l,i,Yn.Edit);const u=e.current.getColumn(i),d=e.current.getRow(l);let p=a;u.valueParser&&!c&&(p=u.valueParser(a,d,u,e));let f=qs(e),h=(0,r.cG)({},f[l][i],{value:p,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(u.preProcessEditCellProps){const e=a!==f[l][i].value;h=(0,r.cG)({},h,{isProcessingProps:!0}),I(l,i,h),h=await Promise.resolve(u.preProcessEditCellProps({id:l,row:d,props:h,hasChanged:e}))}return e.current.getCellMode(l,i)!==Yn.View&&(f=qs(e),h=(0,r.cG)({},h,{isProcessingProps:!1}),h.value=u.preProcessEditCellProps?f[l][i].value:p,I(l,i,h),f=qs(e),!(null!=(n=null==(o=f[l])?void 0:o[i])&&n.error))}),[e,g,m,I]),T=l.useCallback(((t,o)=>{const n=e.current.getColumn(o),l=qs(e),i=e.current.getRow(t);if(!l[t]||!l[t][o])return e.current.getRow(t);const{value:a}=l[t][o];return n.valueSetter?n.valueSetter(a,i,n,e):(0,r.cG)({},i,{[o]:a})}),[e]),F={setCellEditingEditCellValue:O,getRowWithUpdatedValuesFromCellEditing:T};Ha(e,{getCellMode:x,startCellEditMode:M,stopCellEditMode:k},"public"),Ha(e,F,"private"),l.useEffect((()=>{d&&R(d)}),[d,R]),(0,r.bd)((()=>{const t=Cn(e),n=s.current;
127s.current=Un(o),Object.entries(o).forEach((o=>{let[l,i]=o;Object.entries(i).forEach((o=>{let[i,a]=o;var s,c;const u=(null==(c=null==(s=n[l])?void 0:s[i])?void 0:c.mode)||Yn.View,d=t[l]?e.current.getRowId(t[l]):l;a.mode===Yn.Edit&&u===Yn.View?P((0,r.cG)({id:d,field:i},a)):a.mode===Yn.View&&u===Yn.Edit&&E((0,r.cG)({id:d,field:i},a))}))}))}),[e,o,P,E])})(e,t),((e,t)=>{const[o,i]=l.useState({}),a=l.useRef(o),s=l.useRef({}),c=l.useRef({}),u=l.useRef(void 0),d=l.useRef(null),{processRowUpdate:p,onProcessRowUpdateError:f,rowModesModel:g,onRowModesModelChange:m}=t,h=e=>function(){t.editMode===Qn.Row&&e(...arguments)},b=l.useCallback(((t,o)=>{const n=e.current.getCellParams(t,o);if(!e.current.isCellEditable(n))throw new Error(`MUI X: The cell with id=${t} and field=${o} is not editable.`)}),[e]),v=l.useCallback(((t,o)=>{if(e.current.getRowMode(t)!==o)throw new Error(`MUI X: The row with id=${t} is not in ${o} mode.`)}),[e]),w=l.useCallback((t=>{const o=qs(e);return Object.values(o[t]).some((e=>e.error))}),[e]),C=l.useCallback(((t,o)=>{if(!t.isEditable||e.current.getRowMode(t.id)===Jn.Edit)return;const n=e.current.getRowParams(t.id),l=(0,r.cG)({},n,{field:t.field,reason:lr.cellDoubleClick});e.current.publishEvent("rowEditStart",l,o)}),[e]),y=l.useCallback((e=>{d.current=e}),[]),x=l.useCallback(((t,o)=>{t.isEditable&&e.current.getRowMode(t.id)!==Jn.View&&(d.current=null,u.current=setTimeout((()=>{var n;if((null==(n=d.current)?void 0:n.id)!==t.id){if(!e.current.getRow(t.id)||e.current.getRowMode(t.id)===Jn.View||w(t.id))return;const n=e.current.getRowParams(t.id),l=(0,r.cG)({},n,{field:t.field,reason:ir.rowFocusOut});e.current.publishEvent("rowEditStop",l,o)}})))}),[e,w]);l.useEffect((()=>()=>{clearTimeout(u.current)}),[]);const R=l.useCallback(((t,o)=>{if(t.cellMode===Jn.Edit){if(229===o.which)return;let n;if("Escape"===o.key)n=ir.escapeKeyDown;else if("Enter"===o.key)n=ir.enterKeyDown;else if("Tab"===o.key){const r=yr(e).filter((o=>e.current.getColumn(o).type===ol||e.current.isCellEditable(e.current.getCellParams(t.id,o))));if(o.shiftKey?t.field===r[0]&&(n=ir.shiftTabKeyDown):t.field===r[r.length-1]&&(n=ir.tabKeyDown),o.preventDefault(),!n){const n=r.findIndex((e=>e===t.field)),l=r[o.shiftKey?n-1:n+1];e.current.setCellFocus(t.id,l)}}if(n){if(n!==ir.escapeKeyDown&&w(t.id))return;const l=(0,r.cG)({},e.current.getRowParams(t.id),{reason:n,field:t.field});e.current.publishEvent("rowEditStop",l,o)}}else if(t.isEditable){let n;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:o,cellParams:t,editMode:"row"}))return;if(ju(o)||Lu(o)?n=lr.printableKeyDown:"Enter"===o.key?n=lr.enterKeyDown:("Backspace"===o.key||"Delete"===o.key)&&(n=lr.deleteKeyDown),n){const l=e.current.getRowParams(t.id),i=(0,r.cG)({},l,{field:t.field,reason:n});e.current.publishEvent("rowEditStart",i,o)}}}),[e,w]),S=l.useCallback((t=>{const{id:o,field:n,reason:r}=t,l={id:o,fieldToFocus:n};(r===lr.printableKeyDown||r===lr.deleteKeyDown)&&(l.deleteValue=!!n),e.current.startRowEditMode(l)}),[e]),I=l.useCallback((t=>{const{id:o,reason:n,field:r}=t;let l;e.current.runPendingEditCellValueMutation(o),n===ir.enterKeyDown?l="below":n===ir.tabKeyDown?l="right":n===ir.shiftTabKeyDown&&(l="left");const i="escapeKeyDown"===n;e.current.stopRowEditMode({id:o,ignoreModifications:i,field:r,cellToFocusAfter:l})}),[e]);ln(e,"cellDoubleClick",h(C)),ln(e,"cellFocusIn",h(y)),ln(e,"cellFocusOut",h(x)),ln(e,"cellKeyDown",h(R)),ln(e,"rowEditStart",h(S)),ln(e,"rowEditStop",h(I)),sn(e,"rowEditStart",t.onRowEditStart),sn(e,"rowEditStop",t.onRowEditStop);const M=l.useCallback((o=>Ws(e,{rowId:o,editMode:t.editMode})?Jn.Edit:Jn.View),[e,t.editMode]),P=(0,r.cK)((o=>{const n=o!==t.rowModesModel;m&&n&&m(o,{api:e.current}),(!t.rowModesModel||!n)&&(i(o),a.current=o,e.current.publishEvent("rowModesModelChange",o))})),k=l.useCallback(((e,t)=>{const o=(0,r.cG)({},a.current);null!==t?o[e]=(0,r.cG)({},t):delete o[e],P(o)}),[P]),E=l.useCallback(((t,o)=>{e.current.setState((e=>{const n=(0,r.cG)({},e.editRows);return null!==o?n[t]=o:delete n[t],(0,r.cG)({},e,{editRows:n})}))}),[e]),O=l.useCallback(((t,o,n)=>{e.current.setState((e=>{const l=(0,r.cG)({},e.editRows);return null!==n?l[t]=(0,r.cG)({},l[t],{[o]:(0,r.cG)({},n)}):(delete l[t][o],0===Object.keys(l[t]).length&&delete l[t]),(0,r.cG)({},e,{editRows:l})}))}),[e]),T=l.useCallback((e=>{const{id:t}=e,o=(0,r.cH)(e,Zf);v(t,Jn.View),k(t,(0,r.cG)({mode:Jn.Edit},o))}),[v,k]),F=(0,r.cK)((t=>{const{id:o,fieldToFocus:n,deleteValue:l,initialValue:i}=t,a=e.current.getRow(o),s=br(e),u=s.reduce(((t,r)=>{const a=r.field;if(!e.current.getCellParams(o,a).isEditable)return t;const s=e.current.getColumn(a);let c=e.current.getCellValue(o,a);return n===a&&(l||i)&&(l?c=Qf(s):i&&(c=i)),t[a]={value:c,error:!1,isProcessingProps:s.editable&&!!s.preProcessEditCellProps&&l},t}),{});c.current[o]=a,E(o,u),n&&e.current.setCellFocus(o,n),s.filter((e=>
127e.editable&&!!e.preProcessEditCellProps&&l)).forEach((t=>{const n=t.field,s=e.current.getCellValue(o,n),c=l?Qf(t):i??s;Promise.resolve(t.preProcessEditCellProps({id:o,row:a,props:u[n],hasChanged:c!==s})).then((t=>{if(e.current.getRowMode(o)===Jn.Edit){const l=qs(e);O(o,n,(0,r.cG)({},t,{value:l[o][n].value,isProcessingProps:!1}))}}))}))})),G=l.useCallback((e=>{const{id:t}=e,o=(0,r.cH)(e,eg);v(t,Jn.Edit),k(t,(0,r.cG)({mode:Jn.View},o))}),[v,k]),D=(0,r.cK)((async o=>{var r;const{id:l,ignoreModifications:i,field:a,cellToFocusAfter:u="none"}=o;e.current.runPendingEditCellValueMutation(l);const d=()=>{"none"!==u&&a&&e.current.moveFocusToRelativeCell(l,a,u),E(l,null),k(l,null),delete c.current[l]};if(i)return void d();const g=qs(e),m=c.current[l];if(Object.values(g[l]).some((e=>e.isProcessingProps)))return void(s.current[l].mode=Jn.Edit);if(w(l))return s.current[l].mode=Jn.Edit,void k(l,{mode:Jn.Edit});const h=e.current.getRowWithUpdatedValuesFromRowEditing(l);if(null!=(r=t.dataSource)&&r.updateRow){if(Xd(m,h))return void d();const t=()=>{s.current[l].mode=Jn.Edit,k(l,{mode:Jn.Edit})},o={rowId:l,updatedRow:h,previousRow:m};try{await e.current.dataSource.editRow(o),d()}catch{t()}}else if(p){const t=e=>{s.current[l]&&(s.current[l].mode=Jn.Edit,k(l,{mode:Jn.Edit})),f?f(e):"production"!==n.p.env.NODE_ENV&&wo(["MUI X: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, for example `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/editing/persistence/."],"error")};try{Promise.resolve(p(h,m,{rowId:l})).then((t=>{e.current.updateRows([t]),d()})).catch(t)}catch(b){t(b)}}else e.current.updateRows([h]),d()})),H={setRowEditingEditCellValue:l.useCallback((t=>{const{id:o,field:n,value:l,debounceMs:i,unstable_skipValueParser:a}=t;b(o,n);const s=e.current.getColumn(n),c=e.current.getRow(o);let u=l;s.valueParser&&!a&&(u=s.valueParser(l,c,s,e));let d=qs(e),p=(0,r.cG)({},d[o][n],{value:u,changeReason:i?"debouncedSetEditCellValue":"setEditCellValue"});return s.preProcessEditCellProps||O(o,n,p),new Promise((t=>{const l=[];if(s.preProcessEditCellProps){const i=p.value!==d[o][n].value;p=(0,r.cG)({},p,{isProcessingProps:!0}),O(o,n,p);const a=d[o],f=(0,r.cH)(a,[n].map(ff)),g=Promise.resolve(s.preProcessEditCellProps({id:o,row:c,props:p,hasChanged:i,otherFieldsProps:f})).then((l=>{e.current.getRowMode(o)!==Jn.View?(d=qs(e),(l=(0,r.cG)({},l,{isProcessingProps:!1})).value=s.preProcessEditCellProps?d[o][n].value:u,O(o,n,l)):t(!1)}));l.push(g)}Object.entries(d[o]).forEach((i=>{let[a,s]=i;if(a===n)return;const u=e.current.getColumn(a);if(!u.preProcessEditCellProps)return;s=(0,r.cG)({},s,{isProcessingProps:!0}),O(o,a,s),d=qs(e);const p=d[o],f=(0,r.cH)(p,[a].map(ff)),g=Promise.resolve(u.preProcessEditCellProps({id:o,row:c,props:s,hasChanged:!1,otherFieldsProps:f})).then((n=>{e.current.getRowMode(o)!==Jn.View?(n=(0,r.cG)({},n,{isProcessingProps:!1}),O(o,a,n)):t(!1)}));l.push(g)})),Promise.all(l).then((()=>{e.current.getRowMode(o)===Jn.Edit?(d=qs(e),t(!d[o][n].error)):t(!1)}))}))}),[e,b,O]),getRowWithUpdatedValuesFromRowEditing:l.useCallback((t=>{const o=qs(e),n=e.current.getRow(t);if(!o[t])return e.current.getRow(t);let l=(0,r.cG)({},c.current[t],n);return Object.entries(o[t]).forEach((t=>{let[o,n]=t;const r=e.current.getColumn(o);null!=r&&r.valueSetter?l=r.valueSetter(n.value,l,r,e):l[o]=n.value})),l}),[e])};Ha(e,{getRowMode:M,startRowEditMode:T,stopRowEditMode:G},"public"),Ha(e,H,"private"),l.useEffect((()=>{g&&P(g)}),[g,P]),(0,r.bd)((()=>{const t=Cn(e),n=s.current;s.current=Un(o);const l=new Set([...Object.keys(o),...Object.keys(n)]);Array.from(l).forEach((l=>{var i;const a=o[l]??{mode:Jn.View},s=(null==(i=n[l])?void 0:i.mode)||Jn.View,c=t[l]?e.current.getRowId(t[l]):l;a.mode===Jn.Edit&&s===Jn.View?F((0,r.cG)({id:c},a)):a.mode===Jn.View&&s===Jn.Edit&&D((0,r.cG)({id:c},a))}))}),[e,o,F,D])})(e,t);const o=l.useRef({}),{isCellEditable:i}=t,a=l.useCallback((e=>!(ul(e.rowNode)||!e.colDef.editable||!e.colDef.renderEditCell)&&(!i||i(e))),[i]);l.useEffect((()=>{const e=o.current;return()=>{Object.entries(e).forEach((t=>{let[o,n]=t;
127Object.keys(n).forEach((t=>{const[n]=e[o][t];clearTimeout(n),delete e[o][t]}))}))}}),[]);const s=l.useCallback(((e,t)=>{if(o.current[e])if(t){if(o.current[e][t]){const[,n]=o.current[e][t];n()}}else Object.keys(o.current[e]).forEach((t=>{const[,n]=o.current[e][t];n()}))}),[]),c=l.useCallback((n=>{const{id:r,field:l,debounceMs:i}=n;return new Promise((a=>{((e,t,n,r)=>{if(!n)return void r();if(o.current[e]||(o.current[e]={}),o.current[e][t]){const[n]=o.current[e][t];clearTimeout(n)}const l=setTimeout((()=>{r(),delete o.current[e][t]}),n);o.current[e][t]=[l,()=>{const[n]=o.current[e][t];clearTimeout(n),r(),delete o.current[e][t]}]})(r,l,i,(async()=>{const o=t.editMode===Qn.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(r,l)===Yn.Edit){const e=await o(n);a(e)}}))}))}),[e,t.editMode]),u=l.useCallback(((o,n)=>t.editMode===Qn.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(o,n):e.current.getRowWithUpdatedValuesFromRowEditing(o)),[e,t.editMode]),d=l.useCallback(((t,o)=>{var n;return(null==(n=qs(e)[t])?void 0:n[o])??null}),[e]),p={runPendingEditCellValueMutation:s};Ha(e,{isCellEditable:a,setEditCellValue:c,getRowWithUpdatedValues:u,unstable_getEditCellMeta:d},"public"),Ha(e,p,"private")},ng=(e,t,o)=>{const n=!!t.dataSource;return o.current.caches.rows=al({rows:n?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,r.cG)({},e,{rows:cl({apiRef:o,rowCountProp:t.rowCount,loadingProp:!!n||t.loading,previousTree:null,previousTreeDepths:null})})},rg=e=>"full"===e.updates.type?(e=>{const t={[rl]:(0,r.cG)({},{type:"group",id:rl,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null},{children:e})};for(let o=0;o<e.length;o+=1){const n=e[o];t[n]={id:n,depth:0,parent:rl,type:"leaf",groupingKey:null}}return{groupingName:vf,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(e=>{let{previousTree:t,actions:o}=e;const n=(0,r.cG)({},t),l={};for(let r=0;r<o.remove.length;r+=1){const e=o.remove[r];l[e]=!0,delete n[e]}for(let r=0;r<o.insert.length;r+=1){const e=o.insert[r];n[e]={id:e,depth:0,parent:rl,type:"leaf",groupingKey:null}}const i=n[rl];let a=[...i.children,...o.insert];return Object.values(l).length&&(a=a.filter((e=>!l[e]))),n[rl]=(0,r.cG)({},i,{children:a}),{groupingName:vf,tree:n,treeDepths:{0:a.length},dataRowIds:a}})({previousTree:e.previousTree,actions:e.updates.actions});class lg extends Error{}function ig(e,t){var o;const n=l.useCallback((t=>({field:t,colDef:e.current.getColumn(t)})),[e]),r=l.useCallback((t=>{const o=e.current.getRow(t);if(!o)throw new lg(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:o}}),[e]),i=l.useCallback(((t,o,n,r)=>{let{cellMode:l,colDef:i,hasFocus:a,rowNode:s,tabIndex:c}=r;const u=n[o],d=null!=i&&i.valueGetter?i.valueGetter(u,n,i,e):u,p={id:t,field:o,row:n,rowNode:s,colDef:i,cellMode:l,hasFocus:a,tabIndex:c,value:d,formattedValue:d,isEditable:!1,api:e.current};return i&&i.valueFormatter&&(p.formattedValue=i.valueFormatter(d,n,i,e)),p.isEditable=i&&e.current.isCellEditable(p),p}),[e]),a=l.useCallback(((o,n)=>{var r;const l=e.current.getRow(o),i=xn(e,o);if(!l||!i)throw new lg(`No row with id #${o} found`);const a=di(e),s=mi(e),c=e.current.getCellMode(o,n);return e.current.getCellParamsForRow(o,n,l,{colDef:t.listView&&(null==(r=t.listViewColumn)?void 0:r.field)===n?es(e):e.current.getColumn(n),rowNode:i,hasFocus:null!==a&&a.field===n&&a.id===o,tabIndex:s&&s.field===n&&s.id===o?0:-1,cellMode:c})}),[e,t.listView,null==(o=t.listViewColumn)?void 0:o.field]),s=l.useCallback(((t,o)=>{const n=e.current.getColumn(o),r=e.current.getRow(t);if(!r)throw new lg(`No row with id #${t} found`);return n&&n.valueGetter?n.valueGetter(r[n.field],r,n,e):r[o]}),[e]),c=l.useCallback(((t,o)=>((e,t,o)=>{const n=t.field;if(!t||!t.valueGetter)return e[n];const r=e[t.field];return t.valueGetter(r,e,t,o)})(t,o,e)),[e]),u=l.useCallback(((t,o)=>{const n=c(t,o);return o&&o.valueFormatter?o.valueFormatter(n,t,o,e):n}),[e,c]),d=l.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${ou(t)}"]`)}(e.current.rootElementRef.current,t):null),[e]),p=l.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(nu(t))}(e.current.rootElementRef.current,t):null),[e]),f=l.useCallback(((t,o)=>e.current.rootElementRef.current?function(e,t){let{id:o,field:n}=t;const r=`${nu(o)} .${Jo.cell}[data-field="${ou(n)}"]`;return e.querySelector(r)}(e.current.rootElementRef.current,{id:t,field:o}):null),[e]),g={getCellParamsForRow:i};Ha(e,{getCellValue:s,getCellParams:a,getCellElement:f,getRowValue:c,getRowFormattedValue:u,getRowParams:r,getRowElement:p,getColumnHeaderParams:n,getColumnHeaderElement:d},"public"),Ha(e,g,"private")}const ag={type:"include",ids:new Set},sg=(e,t)=>
127(0,r.cG)({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??ag:ag}),cg=(e,t)=>{const o=(e=>{const{classes:t}=e;return l.useMemo((()=>(0,r.I)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},Yo,t)),[t])})({classes:t.classes}),n=l.useCallback((n=>{const l=(0,r.cG)({},Ni,{cellClassName:o.cellCheckbox,headerClassName:o.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),i=t.checkboxSelection,a=null!=n.lookup[ji];return i&&!a?(n.lookup[ji]=l,n.orderedFields=[ji,...n.orderedFields]):!i&&a?(delete n.lookup[ji],n.orderedFields=n.orderedFields.filter((e=>e!==ji))):i&&a&&(n.lookup[ji]=(0,r.cG)({},l,n.lookup[ji])),n}),[e,o,t.checkboxSelection]);gf(e,"hydrateColumns",n)},ug=(e,t)=>{var o,n;const l=t.sortModel??(null==(n=null==(o=t.initialState)?void 0:o.sorting)?void 0:n.sortModel)??[];return(0,r.cG)({},e,{sorting:{sortModel:Tn(l,t.disableMultipleColumnsSorting),sortedRows:[]}})};function dg(e){const{containerSize:t,scrollPosition:o,elementSize:n,elementOffset:r}=e,l=r+n;return n>t?r:l-t>o?l-t:r<o?r:void 0}const pg={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:"\t",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Qn.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"production"===n.p.env.NODE_ENV?"error":"warn",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1},fg={width:0,height:0},gg={isReady:!1,root:fg,viewportOuterSize:fg,viewportInnerSize:fg,contentSize:fg,minimumSize:fg,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},mg=(e,t,o)=>{const n=gg,l=dn(o);return(0,r.cG)({},e,{dimensions:(0,r.cG)({},n,wg(t,o,l,Rr(o)))})},hg=Do(Cr,Sr,((e,t)=>{const o=e.length;return 0===o?0:os(t[o-1]+e[o-1].computedWidth,1)}));function bg(e,t){const o=ja(e,"useResizeContainer"),n=l.useRef(!1),i=l.useRef(fg),a=Po(e,Rr),s=Po(e,dn),c=Po(e,hg),u=l.useRef(!0),{rowHeight:d,headerHeight:p,groupHeaderHeight:f,headerFilterHeight:g,headersTotalHeight:m,leftPinnedWidth:h,rightPinnedWidth:b}=wg(t,e,s,a),v=l.useCallback((()=>No(e)),[e]),w=l.useCallback((t=>{e.current.setState((e=>(0,r.cG)({},e,{dimensions:t}))),e.current.rootElementRef.current&&vg(e.current.rootElementRef.current,No(e))}),[e]),C=l.useCallback((()=>{const o=No(e);if(!o.isReady)return 0;const n=La(e);if(t.getRowHeight){const t=_a(e),o=t.lastRowIndex-t.firstRowIndex;return Math.min(o-1,n.rows.length)}const r=Math.floor(o.viewportInnerSize.height/d);return Math.min(r,n.rows.length)}),[e,t.getRowHeight,d]),y=l.useCallback((()=>{var o,n;if(u.current)return;const l=function(e,t){if(void 0!==t)return t;if(null===e)return 0;const o=Cg.get(e);if(void 0!==o)return o;const n=(0,r.cL)(e).createElement("div");n.style.width="99px",n.style.height="99px",n.style.position="absolute",n.style.overflow="scroll",n.className="scrollDiv",e.appendChild(n);const l=n.offsetWidth-n.clientWidth;return e.removeChild(n),Cg.set(e,l),l}(e.current.mainElementRef.current,t.scrollbarSize),a=Aa(e),s=m+a.pinnedTopRowsTotalHeight,v=a.pinnedBottomRowsTotalHeight,C={width:c,height:os(a.currentPageTotalHeight,1)};let y,x,R=!1,S=!1;if(t.autoHeight)S=!1,R=Math.round(c)>Math.round(i.current.width),y={width:i.current.width,height:s+v+C.height},x={width:Math.max(0,y.width-(S?l:0)),height:Math.max(0,y.height-(R?l:0))};else{y={width:i.current.width,height:i.current.height},x={width:Math.max(0,y.width),height:Math.max(0,y.height-s-v)};const e=C,t=x,o=e.width>
127t.width,n=e.height>t.height;(o||n)&&(S=n,R=e.width+(S?l:0)>t.width,R&&(S=e.height+l>t.height)),S&&(x.width-=l),R&&(x.height-=l)}const I=Math.max(y.width,c+(S?l:0)),M={width:c,height:s+C.height+v},P={isReady:!0,root:i.current,viewportOuterSize:y,viewportInnerSize:x,contentSize:C,minimumSize:M,hasScrollX:R,hasScrollY:S,scrollbarSize:l,headerHeight:p,groupHeaderHeight:f,headerFilterHeight:g,rowWidth:I,rowHeight:d,columnsTotalWidth:c,leftPinnedWidth:h,rightPinnedWidth:b,headersTotalHeight:m,topContainerHeight:s,bottomContainerHeight:v},k=e.current.state.dimensions;Xd(k,P)||(w(P),function(e,t){return e.width===t.width&&e.height===t.height}(P.viewportInnerSize,k.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",P.viewportInnerSize),null==(n=(o=e.current).updateRenderContext)||n.call(o))}),[e,w,t.scrollbarSize,t.autoHeight,d,p,f,g,c,m,h,b]),x=(0,r.cK)(y),R=l.useMemo((()=>t.resizeThrottleMs>0?function(e){let t,o,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;const r=()=>{t=void 0,e(...o)};function l(){for(var e=arguments.length,l=new Array(e),i=0;i<e;i++)l[i]=arguments[i];o=l,void 0===t&&(t=setTimeout(r,n))}return l.clear=()=>{clearTimeout(t),t=void 0},l}((()=>{x(),e.current.publishEvent("debouncedResize",i.current)}),t.resizeThrottleMs):void 0),[e,t.resizeThrottleMs,x]);l.useEffect((()=>null==R?void 0:R.clear),[R]);const S={getRootDimensions:v},I={updateDimensions:y,getViewportPageSize:C};(0,r.bd)(y,[y]),Ha(e,S,"public"),Ha(e,I,"private");const M=l.useCallback((t=>{vg(t,No(e))}),[e]),P=l.useCallback((e=>{if(i.current=e,0===e.height&&!n.current&&!t.autoHeight&&!ns&&(o.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),0===e.width&&!n.current&&!ns&&(o.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),n.current=!0),u.current||!R)return u.current=!1,void y();R()}),[y,t.autoHeight,R,o]);sn(e,"rootMount",M),sn(e,"resize",P),sn(e,"debouncedResize",t.onResize)}function vg(e,t){const o=(t,o)=>e.style.setProperty(t,o);o("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),o("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),o("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),o("--DataGrid-rowWidth",`${t.rowWidth}px`),o("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),o("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),o("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),o("--DataGrid-headerHeight",`${t.headerHeight}px`),o("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),o("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),o("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),o("--height",`${t.rowHeight}px`)}function wg(e,t,o,n){const r=hl(e.rowHeight,pg.rowHeight,bl);return{rowHeight:Math.floor(r*o),headerHeight:Math.floor(e.columnHeaderHeight*o),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*o),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*o),columnsTotalWidth:hg(t),headersTotalHeight:Sa(t,e),leftPinnedWidth:n.left.reduce(((e,t)=>e+t.computedWidth),0),rightPinnedWidth:n.right.reduce(((e,t)=>e+t.computedWidth),0)}}const Cg=new WeakMap;const yg=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},xg=(e,t,o)=>{o.current.caches.rowsMeta={heights:new Map};const n=Lo(o),l=bn(o),i=yi(o),a=Math.min(i.enabled?i.paginationModel.pageSize:l,l);return(0,r.cG)({},e,{rowsMeta:{currentPageTotalHeight:a*n,positions:Array.from({length:a},((e,t)=>t*n)),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})};function Rg(e){const{apiRef:t,lookup:o,columnIndex:n,rowId:r,minFirstColumnIndex:l,maxLastColumnIndex:i,columns:a}=e,s=a.length,c=a[n],u=t.current.getRow(r),d=t.current.getRowValue(u,c),p="function"==typeof c.colSpan?c.colSpan(d,u,c,t):c.colSpan;if(!p||1===p)return Sg(o,r,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let f=c.computedWidth;for(let g=1;g<p;g+=1){const e=n+g;if(e>=l&&e<i){f+=a[e].computedWidth,Sg(o,r,n+g,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(n+p,s-1),leftVisibleCellIndex:n})}Sg(o,r,n,{spannedByColSpan:!1,cellProps:{colSpan:p,width:f}})}return{colSpan:p}}function Sg(e,t,o,n){e[t]||(e[t]={}),e[t][o]=n}const Ig=(e,t,o)=>{if(ar(e)){if(void 0!==o[e.field])throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${o[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(o[e.field]=t)}const{groupId:n,children:r}=e;r.forEach((e=>{Ig(e,[...t,n],o)}))},Mg=e=>{if(!e)return{};const t={};return e.forEach((e=>{Ig(e,[],t)})),t},Pg=(e,t,o)=>{const n=e=>t[e]??[],r=[],l=Math.max(...e.map((e=>n(e).length))),i=(e,t,o)=>Xd(n(e).slice(0,o+1),n(t).slice(0,o+1)),a=(e,t)=>!!(null!=o&&o.left&&o.left.includes(e)&&!o.left.includes(t)||null!=o&&o.right&&!o.right.includes(e)&&o.right.includes(t));for(let s=0;s<l;s+=1){const t=e.reduce(((e,t)=>{const o=n(t)[s]??null;if(0===e.length)return[{columnFields:[t],groupId:o}];const r=e[e.length-1],l=r.columnFields[r.columnFields.length-1];return r.groupId!==o||!i(l,t,s)||a(l,t)?[...e,{columnFields:[t],groupId:o}]:[...e.slice(0,e.length-1),{columnFields:[...r.columnFields,t],groupId:o}]}),[]);
127r.push(t)}return r},kg=["groupId","children"],Eg=e=>{let t={};return e.forEach((e=>{if(ar(e))return;const{groupId:o,children:l}=e,i=(0,r.cH)(e,kg);if(!o)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");"production"!==n.p.env.NODE_ENV&&(l||console.warn(`MUI X: group groupId=${o} has no children.`));const a=(0,r.cG)({},i,{groupId:o}),s=Eg(l);if(void 0!==s[o]||void 0!==t[o])throw new Error(`MUI X: The groupId ${o} is used multiple times in the columnGroupingModel.`);t=(0,r.cG)({},t,s,{[o]:a})})),(0,r.cG)({},t)},Og=(e,t,o)=>{if(!t.columnGroupingModel)return e;const n=mr(o),l=yr(o),i=Eg(t.columnGroupingModel??[]),a=Mg(t.columnGroupingModel??[]),s=Pg(n,a,o.current.state.pinnedColumns??{}),c=0===l.length?0:Math.max(...l.map((e=>{var t;return(null==(t=a[e])?void 0:t.length)??0})));return(0,r.cG)({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:c}})};function Tg(e,t){if(void 0!==t&&e.changedTouches){for(let o=0;o<e.changedTouches.length;o+=1){const n=e.changedTouches[o];if(n.identifier===t)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Fg(e,t,o,n){let r=e;return r+="Right"===n?t-o.left:o.right-t,r}function Gg(e){e.preventDefault(),e.stopImmediatePropagation()}function Dg(e){const t=l.useRef(void 0),o=()=>qa(e),n=Po(e,o);return l.useEffect((()=>{t.current&&!1===n&&(t.current.resolve(),t.current=void 0)})),()=>{if(!t.current){if(!1===o())return Promise.resolve();t.current=function(){let e,t;const o=new Promise(((o,n)=>{e=o,t=n}));return o.resolve=e,o.reject=t,o}()}return t.current}}function Hg(e,t,o){const n={},r=e.current.rootElementRef.current;return r.classList.add(Jo.autosizing),o.forEach((o=>{const r=function(e,t){const o=e.virtualScrollerRef.current;return Array.from(o.querySelectorAll(`:scope > div > div > div > [data-field="${ou(t)}"][role="gridcell"]`))}(e.current,o.field).map((e=>e.getBoundingClientRect().width??0)),l=t.includeOutliers?r:function(e,t){if(e.length<4)return e;const o=e.slice();o.sort(((e,t)=>e-t));const n=o[Math.floor(.25*o.length)],r=o[Math.floor(.75*o.length)-1],l=r-n,i=l<5?5:l*t;return o.filter((e=>e>n-i&&e<r+i))}(r,t.outliersFactor);if(t.includeHeaders){const t=function(e,t){return e.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${ou(t)}"][role="columnheader"]`)}(e.current,o.field);if(t){const e=t.querySelector(`.${Jo.columnHeaderTitle}`),o=t.querySelector(`.${Jo.columnHeaderTitleContainerContent}`),n=t.querySelector(`.${Jo.iconButtonContainer}`),r=t.querySelector(`.${Jo.menuIcon}`),i=e??o,a=window.getComputedStyle(t,null),s=parseInt(a.paddingLeft,10)+parseInt(a.paddingRight,10),c=i.scrollWidth+1+s+((null==n?void 0:n.clientWidth)??0)+((null==r?void 0:r.clientWidth)??0);l.push(c)}}const i=o.minWidth!==-1/0&&void 0!==o.minWidth,a=o.maxWidth!==1/0&&void 0!==o.maxWidth,s=i?o.minWidth:0,c=a?o.maxWidth:1/0,u=0===l.length?0:Math.max(...l);n[o.field]=Wn(u,s,c)})),r.classList.remove(Jo.autosizing),n}const jg=e=>(0,r.cG)({},e,{columnResize:{resizingColumnField:""}});function Ng(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const $g=(e,t)=>{const o=(0,r.cN)(),n=ja(e,"useGridColumnResize"),i=(0,r.c_)(Ng).current,a=l.useRef(null),s=l.useRef(null),c=(0,r.aM)(),u=l.useRef(void 0),d=t=>{var o,r;n.debug(`Updating width to ${t} for col ${i.colDef.field}`);const l=i.columnHeaderElement.offsetWidth,a=t-l,s=t-i.initialColWidth;if(s>0){const t=i.initialTotalWidth+s;null==(r=null==(o=e.current.rootElementRef)?void 0:o.current)||r.style.setProperty("--DataGrid-rowWidth",`${t}px`)}i.colDef.computedWidth=t,i.colDef.width=t,i.colDef.flex=0,i.columnHeaderElement.style.width=`${t}px`;const c=i.headerFilterElement;c&&(c.style.width=`${t}px`),i.groupHeaderElements.forEach((e=>{const o=e;let n;n="1"===o.getAttribute("aria-colspan")?`${t}px`:`${o.offsetWidth+a}px`,o.style.width=n}
127)),i.cellElements.forEach((e=>{const o=e;let n;n="1"===o.getAttribute("aria-colspan")?`${t}px`:`${o.offsetWidth+a}px`,o.style.setProperty("--width",n)}));const u=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,i.colDef.field);u===dr.LEFT&&(Lg(i.fillerLeft,"width",a),i.leftPinnedCellsAfter.forEach((e=>{Lg(e,"left",a)})),i.leftPinnedHeadersAfter.forEach((e=>{Lg(e,"left",a)}))),u===dr.RIGHT&&(Lg(i.fillerRight,"width",a),i.rightPinnedCellsBefore.forEach((e=>{Lg(e,"right",a)})),i.rightPinnedHeadersBefore.forEach((e=>{Lg(e,"right",a)})))},p=t=>{if(w(),i.previousMouseClickEvent){const o=i.previousMouseClickEvent,n=o.timeStamp,r=o.clientX,l=o.clientY;if(t.timeStamp-n<300&&t.clientX===r&&t.clientY===l)return i.previousMouseClickEvent=void 0,void e.current.publishEvent("columnResizeStop",null,t)}if(i.colDef){e.current.setColumnWidth(i.colDef.field,i.colDef.width),n.debug(`Updating col ${i.colDef.field} with new width: ${i.colDef.width}`);const t=gr(e);i.groupHeaderElements.forEach((e=>{const o=function(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}(e),n=e,r=`${o.reduce(((e,o)=>!1!==t.columnVisibilityModel[o]?e+t.lookup[o].computedWidth:e),0)}px`;n.style.width=r}))}c.start(0,(()=>{e.current.publishEvent("columnResizeStop",null,t)}))},f=(t,n,r)=>{var l;const c=e.current.rootElementRef.current;i.initialColWidth=t.computedWidth,i.initialTotalWidth=e.current.getRootDimensions().rowWidth,i.colDef=t,i.columnHeaderElement=function(e,t){return e.querySelector(`[data-field="${ou(t)}"]`)}(e.current.columnHeadersContainerRef.current,t.field);const u=c.querySelector(`.${Jo.headerFilterRow} [data-field="${ou(t.field)}"]`);u&&(i.headerFilterElement=u),i.groupHeaderElements=function(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${ou(t)}-|"]`)??[])}(null==(l=e.current.columnHeadersContainerRef)?void 0:l.current,t.field),i.cellElements=function(e,t){var o;if(!tu(e,Jo.root))throw new Error("MUI X: The root element is not found.");const n=e.getAttribute("aria-colindex");if(!n)return[];const r=Number(n)-1,l=[];return null!=(o=t.virtualScrollerRef)&&o.current?(su(t).forEach((e=>{const o=e.getAttribute("data-id");if(!o)return;let n=r;const i=t.unstable_getCellColSpanInfo(o,r);i&&i.spannedByColSpan&&(n=i.leftVisibleCellIndex);const a=e.querySelector(`[data-colindex="${n}"]`);a&&l.push(a)})),l):[]}(i.columnHeaderElement,e.current),i.fillerLeft=lu(e.current,o?"filler--pinnedRight":"filler--pinnedLeft"),i.fillerRight=lu(e.current,o?"filler--pinnedLeft":"filler--pinnedRight");const d=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,i.colDef.field);i.leftPinnedCellsAfter=d!==dr.LEFT?[]:function(e,t,o){const n=cu(t);return iu({api:e,colIndex:n,position:o?"right":"left",filterFn:e=>o?e<n:e>n})}(e.current,i.columnHeaderElement,o),i.rightPinnedCellsBefore=d!==dr.RIGHT?[]:function(e,t,o){const n=cu(t);return iu({api:e,colIndex:n,position:o?"left":"right",filterFn:e=>o?e>n:e<n})}(e.current,i.columnHeaderElement,o),i.leftPinnedHeadersAfter=d!==dr.LEFT?[]:function(e,t,o){const n=cu(t);return au({api:e,position:o?"right":"left",colIndex:n,filterFn:e=>o?e<n:e>n})}(e.current,i.columnHeaderElement,o),i.rightPinnedHeadersBefore=d!==dr.RIGHT?[]:function(e,t,o){const n=cu(t);return au({api:e,position:o?"left":"right",colIndex:n,filterFn:(e,t)=>!t.classList.contains(Jo["columnHeader--last"])&&(o?e>n:e<n)})}(e.current,i.columnHeaderElement,o),s.current=function(e,t){const o=e.classList.contains(Jo["columnSeparator--sideRight"])?"Right":"Left";return t?function(e){return"Right"===e?"Left":"Right"}(o):o}(n,o),a.current=function(e,t,o){return"Left"===o?e-t.left:t.right-e}(r,i.columnHeaderElement.getBoundingClientRect(),s.current)},g=(0,r.cK)(p),m=(0,r.cK)((t=>{if(0===t.buttons)return void g(t);let o=Fg(a.current,t.clientX,i.columnHeaderElement.getBoundingClientRect(),s.current);o=Wn(o,i.colDef.minWidth,i.colDef.maxWidth),d(o);const n={element:i.columnHeaderElement,colDef:i.colDef,width:o};e.current.publishEvent("columnResize",n,t)})),h=(0,r.cK)((e=>{Tg(e,u.current)&&p(e)})),b=(0,r.cK)((t=>{const o=Tg(t,u.current);if(!o)return;if("mousemove"===t.type&&0===t.buttons)return void h(t);let n=Fg(a.current,o.x,i.columnHeaderElement.getBoundingClientRect(),s.current);
127n=Wn(n,i.colDef.minWidth,i.colDef.maxWidth),d(n);const r={element:i.columnHeaderElement,colDef:i.colDef,width:n};e.current.publishEvent("columnResize",r,t)})),v=(0,r.cK)((t=>{const o=tu(t.target,Jo["columnSeparator--resizable"]);if(!o)return;const l=t.changedTouches[0];null!=l&&(u.current=l.identifier);const i=function(e){return e.getAttribute("data-field")}(tu(t.target,Jo.columnHeader)),a=e.current.getColumn(i);n.debug(`Start Resize on col ${a.field}`),e.current.publishEvent("columnResizeStart",{field:i},t),f(a,o,l.clientX);const s=(0,r.cL)(t.currentTarget);s.addEventListener("touchmove",b),s.addEventListener("touchend",h)})),w=l.useCallback((()=>{const t=(0,r.cL)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",m),t.removeEventListener("mouseup",g),t.removeEventListener("touchmove",b),t.removeEventListener("touchend",h),setTimeout((()=>{t.removeEventListener("click",Gg,!0)}),100),i.columnHeaderElement&&(i.columnHeaderElement.style.pointerEvents="unset")}),[e,i,m,g,b,h]),C=l.useCallback((t=>{let{field:o}=t;e.current.setState((e=>(0,r.cG)({},e,{columnResize:(0,r.cG)({},e.columnResize,{resizingColumnField:o})})))}),[e]),y=l.useCallback((()=>{e.current.setState((e=>(0,r.cG)({},e,{columnResize:(0,r.cG)({},e.columnResize,{resizingColumnField:""})})))}),[e]),x=(0,r.cK)(((t,o)=>{let{colDef:l}=t;if(0!==o.button||!o.currentTarget.classList.contains(Jo["columnSeparator--resizable"]))return;o.preventDefault(),n.debug(`Start Resize on col ${l.field}`),e.current.publishEvent("columnResizeStart",{field:l.field},o),f(l,o.currentTarget,o.clientX);const a=(0,r.cL)(e.current.rootElementRef.current);a.body.style.cursor="col-resize",i.previousMouseClickEvent=o.nativeEvent,a.addEventListener("mousemove",m),a.addEventListener("mouseup",g),a.addEventListener("click",Gg,!0)})),R=(0,r.cK)(((o,n)=>{if(t.disableAutosize||0!==n.button)return;const l=e.current.state.columns.lookup[o.field];!1!==l.resizable&&e.current.autosizeColumns((0,r.cG)({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[l.field]}))})),S=Dg(e),I=l.useRef(!1),M=l.useCallback((async o=>{var n;if(!(null==(n=e.current.rootElementRef)?void 0:n.current)||I.current)return;I.current=!0;const l=gr(e),i=(0,r.cG)({},Bs,o,{columns:(null==o?void 0:o.columns)??l.orderedFields});i.columns=i.columns.filter((e=>!1!==l.columnVisibilityModel[e]));const a=i.columns.map((t=>e.current.state.columns.lookup[t]));try{!t.disableVirtualization&&i.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await S());const o=Hg(e,i,a),n=a.map((e=>(0,r.cG)({},e,{width:o[e.field],computedWidth:o[e.field],flex:0})));if(i.expand){const t=l.orderedFields.map((e=>l.lookup[e])).filter((e=>!1!==l.columnVisibilityModel[e.field])).reduce(((e,t)=>e+(o[t.field]??t.computedWidth??t.width)),0),r=e.current.getRootDimensions().viewportInnerSize.width-t;if(r>0){const e=r/(n.length||1);n.forEach((t=>{t.width+=e,t.computedWidth+=e}))}}
127e.current.updateColumns(n),n.forEach(((t,o)=>{if(t.width!==a[o].width){const o=t.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:o})}}))}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),I.current=!1}}),[e,S,t.disableVirtualization]);l.useEffect((()=>w),[w]),(0,r.d1)((()=>{t.autosizeOnMount&&Promise.resolve().then((()=>{e.current.autosizeColumns(t.autosizeOptions)}))})),Na(e,(()=>{var t;return null==(t=e.current.columnHeadersContainerRef)?void 0:t.current}),"touchstart",v,{passive:!0}),Ha(e,{autosizeColumns:M},"public"),ln(e,"columnResizeStop",y),ln(e,"columnResizeStart",C),ln(e,"columnSeparatorMouseDown",x),ln(e,"columnSeparatorDoubleClick",R),sn(e,"columnResize",t.onColumnResize),sn(e,"columnWidthChange",t.onColumnWidthChange)};function Lg(e,t,o){e&&(e.style[t]=`${parseInt(e.style[t],10)+o}px`)}function Vg(e){return 0!==e.firstRowIndex||0!==e.lastRowIndex}const zg=(e,t,o)=>{if(!e)return null;let n=e[t.field];const r=t.rowSpanValueGetter??t.valueGetter;return r&&(n=r(n,e,t,o)),n},Ag={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},Bg={firstRowIndex:0,lastRowIndex:0},qg=new Set([ji,"__reorder__",Cl]),Wg=(e,t,o,n,l,i,a)=>{const s=i?{}:(0,r.cG)({},e.current.state.rowSpanning.spannedCells),c=i?{}:(0,r.cG)({},e.current.state.rowSpanning.hiddenCells),u=i?{}:(0,r.cG)({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=Bg),t.forEach((t=>{var r;if(!qg.has(t.field)){for(let i=l.firstRowIndex;i<l.lastRowIndex;i+=1){const a=o[i];if(null!=(r=c[a.id])&&r[t.field])continue;const d=zg(a.model,t,e);if(null==d)continue;let p=a.id,f=i,g=0;const m=[];if(i===l.firstRowIndex){let r=i-1,l=o[r];for(;r>=n.firstRowIndex&&l&&zg(l.model,t,e)===d;){const e=o[r+1];c[e.id]?c[e.id][t.field]=!0:c[e.id]={[t.field]:!0},m.push(i),g+=1,p=l.id,f=r,r-=1,l=o[r]}}m.forEach((e=>{u[e]?u[e][t.field]=f:u[e]={[t.field]:f}}));let h=i+1;for(;h<=n.lastRowIndex&&o[h]&&zg(o[h].model,t,e)===d;){const e=o[h];c[e.id]?c[e.id][t.field]=!0:c[e.id]={[t.field]:!0},u[h]?u[h][t.field]=f:u[h]={[t.field]:f},h+=1,g+=1}g>0&&(s[p]?s[p][t.field]=g+1:s[p]={[t.field]:g+1})}a={firstRowIndex:Math.min(a.firstRowIndex,l.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,l.lastRowIndex)}}})),{spannedCells:s,hiddenCells:c,hiddenCellOriginMap:u,processedRange:a}},_g=(e,t)=>{const o=Pn(t).length;if(e.pagination){const e=Pi(t);let n=20;return e>0&&(n=e-1),{firstRowIndex:0,lastRowIndex:Math.min(n,o)}}return{firstRowIndex:0,lastRowIndex:Math.min(20,o)}},Ug=(e,t,o)=>{var n;if(!t.rowSpanning)return(0,r.cG)({},e,{rowSpanning:Ag});const l=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLo
127okup,s=e.columns.lookup,c=!!e.filter.filterModel.items.length||!(null==(n=e.filter.filterModel.quickFilterValues)||!n.length);if(!l.length||!i.length||!a||!s||c)return(0,r.cG)({},e,{rowSpanning:Ag});const u=_g(t,o),d=l.map((e=>({id:e,model:a[e]}))),p=i.map((e=>s[e])),{spannedCells:f,hiddenCells:g,hiddenCellOriginMap:m}=Wg(o,p,d,u,u,!0,Bg);return(0,r.cG)({},e,{rowSpanning:{spannedCells:f,hiddenCells:g,hiddenCellOriginMap:m}})},Kg=(e,t,o)=>(0,r.cG)({},e,{listViewColumn:t.listViewColumn?(0,r.cG)({},t.listViewColumn,{computedWidth:Xg(o)}):void 0});function Xg(e){return No(e).viewportInnerSize.width}const Qg=Do($l,Hl,Ri,((e,t,o)=>({groupKeys:[],paginationModel:o,sortModel:t,filterModel:e,start:o.page*o.pageSize,end:o.page*o.pageSize+o.pageSize-1})));let Yg=function(e){return e.Default="set-new-rows",e.LazyLoading="replace-row-range",e}({});class Jg{constructor(e){this.chunkSize=void 0,this.getCacheKeys=e=>{if(this.chunkSize<1||"number"!=typeof e.start)return[e];const t=[];for(let o=e.start;o<e.end;o+=this.chunkSize){const n=Math.min(o+this.chunkSize-1,e.end);t.push((0,r.cG)({},e,{start:o,end:n}))}return t},this.splitResponse=(e,t)=>{const o=this.getCacheKeys(e),n=new Map;return o.forEach((o=>{var l,i,a,s;const c=o.end===e.end,u=(0,r.cG)({},t,{pageInfo:(0,r.cG)({},t.pageInfo,{hasNextPage:void 0!==(null==(l=t.pageInfo)?void 0:l.hasNextPage)&&!c||(null==(i=t.pageInfo)?void 0:i.hasNextPage),nextCursor:void 0===(null==(a=t.pageInfo)?void 0:a.nextCursor)||c?null==(s=t.pageInfo)?void 0:s.nextCursor:t.rows[o.end+1].id}),rows:"number"!=typeof o.start||"number"!=typeof e.start?t.rows:t.rows.slice(o.start-e.start,o.end-e.start+1)});n.set(o,u)})),n},this.chunkSize=e}}Jg.mergeResponses=e=>1===e.length?e[0]:e.reduce(((e,t)=>({rows:[...e.rows,...t.rows],rowCount:t.rowCount,pageInfo:t.pageInfo})),{rows:[],rowCount:0,pageInfo:{}});const Zg={clear:()=>{},get:()=>{},set:()=>{}};function em(e){return null===e?Zg:e??new Ys(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}const tm=(e,t)=>{const{api:o,strategyProcessor:i,events:a,setStrategyAvailability:s}=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i,a;const s=l.useCallback((()=>{e.current.setStrategyAvailability(hf.DataSource,Yg.Default,t.dataSource?()=>!0:()=>!1)}),[e,t.dataSource]),[c,u]=l.useState(!1),d=Po(e,Ri),p=l.useRef(0),f=t.onDataSourceError,g=(0,r.c_)((()=>{const e=t.pageSizeOptions.map((e=>"number"==typeof e?e:e.value)).sort(((e,t)=>e-t)),o=Math.min(d.pageSize,e[0]);return new Jg(o)})).current,[m,h]=l.useState((()=>em(t.dataSourceCache,o.cacheOptions))),b=l.useCallback((async(l,i)=>{var a,s,u;const d=null==(a=t.dataSource)?void 0:a.getRows;if(!d)return;if(l&&l!==rl&&"DataGrid"!==t.signature)return void(null==(s=o.fetchRowChildren)||s.call(o,[l]));null==(u=o.clearDataSourceState)||u.call(o);const h=(0,r.cG)({},Qg(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),i),b=g.getCacheKeys(h).map((e=>m.get(e)));if(b.every((e=>void 0!==e)))return void e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:Jg.mergeResponses(b),fetchParams:h});(c||0===e.current.getRowsCount())&&e.current.setLoading(!0);const v=p.current+1;p.current=v;try{const t=await d(h);g.splitResponse(h,t).forEach(((e,t)=>m.set(t,e))),p.current===v&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:t,fetchParams:h})}catch(w){p.current===v&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:w,fetchParams:h}),"function"==typeof f?f(new Js({message:null==w?void 0:w.message,params:h,cause:w})):"production"!==n.p.env.NODE_ENV&&wo(["MUI X: A call to `dataSource.getRows()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error"))}finally{c&&p.current===v&&e.current.setLoading(!1)}}),[g,m,e,c,null==(i=t.dataSource)?void 0:i.getRows,f,o,t.signature]),v=l.useCallback((()=>{u(e.current.getActiveStrategy(hf.DataSource)===Yg.Default)}),[e]),w=l.useCallback((t=>{if("error"in t)return void e.current.setRows([]);const{response:o}=t;void 0!==o.rowCount&&e.current.setRowCount(o.rowCount),e.current.setRows(o.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:t.fetchParams,response:o},!0)}),[e]),C=null==(a=t.dataSource)?void 0:a.updateRow,y=o.handleEditRow,x=l.useCallback((async t=>{if(C)try{const o=await C(t);return"function"==typeof y?(y(t,o),o):(e.current.updateNestedRows([o],[]),o&&!Xd(o,t.previousRow)&&e.current.dataSource.cache.clear(),o)}catch(o){throw"function"==typeof f?f(new Zs({message:null==o?void 0:o.message,params:t,cause:o})):"production"!==n.p.env.NODE_ENV&&wo(["MUI X: A call to `dataSource.updateRow()` threw an error which was not handled because `onDataSourceError()` is missing.","To handle the error pass a callback to the `onDataSourceError` prop, for example `<DataGrid onDataSourceError={(error) => ...} />`.","For more detail, see https://mui.com/x/react-data-grid/server-side-data/#error-handling."],"error"),o}}),[e,C,f,y]),R={dataSource:{fetchRows:b,cache:m,editRow:x}},S=l.useMemo((()=>(0,r.d3)(b,0)),[b]),I=l.useRef(!0);return l.useEffect((()=>
127{if(I.current)return void(I.current=!1);if(void 0===t.dataSourceCache)return;const e=em(t.dataSourceCache,o.cacheOptions);h((t=>t!==e?e:t))}),[t.dataSourceCache,o.cacheOptions]),l.useEffect((()=>{t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows())}),[e,t.dataSource]),{api:{public:R},debouncedFetchRows:S,strategyProcessor:{strategyName:Yg.Default,group:"dataSourceRowsUpdate",processor:w},setStrategyAvailability:s,cacheChunkManager:g,cache:m,events:{strategyAvailabilityChange:v,sortModelChange:Kn(c,(()=>S())),filterModelChange:Kn(c,(()=>S())),paginationModelChange:Kn(c,(()=>S()))}}}(e,t);Ha(e,o.public,"public"),bf(e,i.strategyName,i.group,i.processor),Object.entries(a).forEach((t=>{let[o,n]=t;ln(e,o,n)})),l.useEffect((()=>{s()}),[s])},om=(e,t)=>{yf(e,t),cg(e,t),(e=>{bf(e,vf,"rowTreeCreation",rg)})(e),xf(Cf,e,t),xf(sg,e,t),xf(Of,e,t),xf(ng,e,t),xf(Uf,e,t),xf(tg,e,t),xf(Af,e,t),xf(ug,e,t),xf(Xf,e,t),xf($f,e,t),xf(Ug,e,t),xf(Ff,e,t),xf(jg,e,t),xf(Ef,e,t),xf(Og,e,t),xf(Xa,e,t),xf(mg,e,t),xf(xg,e,t),xf(Kg,e,t),_f(e,t),((e,t)=>{var o,n,i,a,s,c,u,d,p;const f=ja(e,"useGridSelection"),g=l.useCallback((e=>function(){t.rowSelection&&e(...arguments)}),[t.rowSelection]),m=t.signature!==Zo.DataGrid&&((null==(o=t.rowSelectionPropagation)?void 0:o.parents)||(null==(n=t.rowSelectionPropagation)?void 0:n.descendants)),h=l.useMemo((()=>t.rowSelectionModel),[t.rowSelectionModel]),b=l.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:h,propOnChange:t.onRowSelectionModelChange,stateSelector:Jl,changeEvent:"rowSelectionChange"});const{checkboxSelection:v,disableRowSelectionOnClick:w,isRowSelectable:C}=t,y=ri(t),x=Po(e,yn),R=Po(e,Mn)>1,S=l.useCallback((t=>{let o=t;const n=b.current??t,r=e.current.isRowSelected(t);if(r){const t=Bl(e),r=t.findIndex((e=>e===n)),l=t.findIndex((e=>e===o));if(r===l)return;o=r>l?t[l+1]:t[l-1]}b.current=t,e.current.selectRowRange({startId:n,endId:o},!r)}),[e]),I=(0,r.cK)((()=>t.pagination&&t.checkboxSelectionVisibleOnly&&"client"===t.paginationMode?Ti(e):Bl(e))),M=l.useCallback(((o,n)=>{if(t.signature===Zo.DataGrid&&!y&&("include"!==o.type||o.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));Jl(e)!==o&&(f.debug("Setting selection model"),e.current.setState((e=>(0,r.cG)({},e,{rowSelection:t.rowSelection?o:ag})),n))}),[e,f,t.rowSelection,t.signature,y]),P=l.useCallback((t=>Zl(e).has(t)),[e]),k=l.useCallback((o=>{if(!1===t.rowSelection||C&&!C(e.current.getRowParams(o)))return!1;const n=xn(e,o);return!("footer"===(null==n?void 0:n.type)||"pinnedRow"===(null==n?void 0:n.type))}),[e,t.rowSelection,C]),E=l.useCallback((()=>ti(e)),[e]),O=l.useCallback((function(o){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var l,i,a,s,c,u;if(e.current.isRowSelectable(o))if(b.current=o,r){f.debug(`Setting selection for row ${o}`);const r={type:"include",ids:new Set},a=e=>{r.ids.add(e)};n&&(a(o),m&&li(e,x,o,(null==(l=t.rowSelectionPropagation)?void 0:l.descendants)??!1,(null==(i=t.rowSelectionPropagation)?void 0:i.parents)??!1,a)),e.current.setRowSelectionModel(r,"singleRowSelection")}else{f.debug(`Toggling selection for row ${o}`);const r=Jl(e),l={type:r.type,ids:new Set(r.ids)},i=or(l);i.unselect(o);const d=e=>{i.select(e)},p=e=>{i.unselect(e)};n?(d(o),m&&li(e,x,o,(null==(a=t.rowSelectionPropagation)?void 0:a.descendants)??!1,(null==(s=t.rowSelectionPropagation)?void 0:s.parents)??!1,d)):m&&ii(e,x,o,(null==(c=t.rowSelectionPropagation)?void 0:c.descendants)??!1,(null==(u=t.rowSelectionPropagation)?void 0:u.parents)??!1,p),("include"===l.type&&l.ids.size<2||y)&&e.current.setRowSelectionModel(l,"singleRowSelection")}}),[e,f,m,x,null==(i=t.rowSelectionPropagation)?void 0:i.descendants,null==(a=t.rowSelectionPropagation)?void 0:a.parents,y]),T=l.useCallback((function(o){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var l,i,a,s,c,u;if(f.debug("Setting selection for several rows"),!1===t.rowSelection)return;const d=new Set;for(let t=0;t<o.length;t+=1){const n=o[t];e.current.isRowSelectable(n)&&d.add(n)}const p=Jl(e);let g;if(r){if(g={type:"include",ids:d},n){const o=or(g);if(m){const n=e=>{o.select(e)};for(const o of d)li(e,x,o,(null==(l=t.rowSelectionPropagation)?void 0:l.desce
127ndants)??!1,(null==(i=t.rowSelectionPropagation)?void 0:i.parents)??!1,n)}}else g.ids=new Set;if(p.type===g.type&&g.ids.size===p.ids.size&&Array.from(g.ids).every((e=>p.ids.has(e))))return}else{g={type:p.type,ids:new Set(p.ids)};const o=or(g),r=e=>{o.select(e)},l=e=>{o.unselect(e)};for(const i of d)n?(o.select(i),m&&li(e,x,i,(null==(a=t.rowSelectionPropagation)?void 0:a.descendants)??!1,(null==(s=t.rowSelectionPropagation)?void 0:s.parents)??!1,r)):(l(i),m&&ii(e,x,i,(null==(c=t.rowSelectionPropagation)?void 0:c.descendants)??!1,(null==(u=t.rowSelectionPropagation)?void 0:u.parents)??!1,l))}("include"===g.type&&g.ids.size<2||y)&&e.current.setRowSelectionModel(g,"multipleRowsSelection")}),[f,m,y,e,x,null==(s=t.rowSelectionPropagation)?void 0:s.descendants,null==(c=t.rowSelectionPropagation)?void 0:c.parents,t.rowSelection]),F=l.useCallback((o=>{var n,r;if(!R||!m||0===o.ids.size&&"include"===o.type)return o;const l={type:o.type,ids:new Set(o.ids)},i=or(l),a=e=>{i.select(e)};for(const s of o.ids)li(e,x,s,(null==(n=t.rowSelectionPropagation)?void 0:n.descendants)??!1,(null==(r=t.rowSelectionPropagation)?void 0:r.parents)??!1,a,i);return l}),[e,x,null==(u=t.rowSelectionPropagation)?void 0:u.descendants,null==(d=t.rowSelectionPropagation)?void 0:d.parents,R,m]),G={selectRows:T,selectRowRange:l.useCallback((function(t){let{startId:o,endId:n}=t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e.current.getRow(o)||!e.current.getRow(n))return;f.debug(`Expanding selection from row ${o} to row ${n}`);const i=Bl(e),a=i.indexOf(o),s=i.indexOf(n),[c,u]=a>s?[s,a]:[a,s],d=i.slice(c,u+1);e.current.selectRows(d,r,l)}),[e,f]),getPropagatedRowSelectionModel:F};Ha(e,{selectRow:O,setRowSelectionModel:M,getSelectedRows:E,isRowSelected:P,isRowSelectable:k},"public"),Ha(e,G,t.signature===Zo.DataGrid?"private":"public");const D=l.useRef(!0),H=l.useCallback((function(){let o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var n,r;if(D.current)return;const l=Jl(e),i=Cn(e),a=zl(e),s=e=>"server"===t.filterMode?!i[e]:!i[e]||!1===a[e],c={type:l.type,ids:new Set(l.ids)},u=or(c);let d=!1;for(const e of l.ids){if(s(e)){if(t.keepNonExistentRowsSelected)continue;u.unselect(e),d=!0;continue}if(null==(n=t.rowSelectionPropagation)||!n.parents)continue;const o=x[e];if("group"===(null==o?void 0:o.type)){if(o.isAutoGenerated){u.unselect(e),d=!0;continue}o.children.every((e=>!1===a[e]))||(u.unselect(e),d=!0)}}const p=R&&(null==(r=t.rowSelectionPropagation)?void 0:r.parents)&&(c.ids.size>0||"exclude"===c.type);if(d||p&&!o)if(p)if("exclude"===c.type){const o=I(),n=[];for(let e=0;e<o.length;e+=1){const r=o[e];(t.keepNonExistentRowsSelected||!s(r))&&u.has(r)&&n.push(r)}e.current.selectRows(n,!0,!0)}else e.current.selectRows(Array.from(c.ids),!0,!0);else e.current.setRowSelectionModel(c,"multipleRowsSelection")}),[e,R,null==(p=t.rowSelectionPropagation)?void 0:p.parents,t.keepNonExistentRowsSelected,t.filterMode,x,I]),j=l.useCallback(((t,o)=>{const n=o.metaKey||o.ctrlKey,r=!v&&!n&&!(e=>!!e.key)(o),l=!y||r,i=e.current.isRowSelected(t),a=ei(e)>1&&l||!i;e.current.selectRow(t,a,l)}),[e,y,v]),N=l.useCallback(((t,o)=>{var n;if(w)return;const r=null==(n=o.target.closest(`.${Jo.cell}`))?void 0:n.getAttribute("data-field");if(r!==Ni.field&&r!==Cl){if(r){const t=e.current.getColumn(r);if((null==t?void 0:t.type)===ol)return}"pinnedRow"!==xn(e,t.id).type&&(o.shiftKey&&y?S(t.id):j(t.id,o))}}),[w,y,e,S,j]),$=l.useCallback(((e,t)=>{var o;y&&t.shiftKey&&(null==(o=window.getSelection())||o.removeAllRanges())}),[y]),L=l.useCallback(((t,o)=>{y&&o.nativeEvent.shiftKey?S(t.id):e.current.selectRow(t.id,t.value,!y)}),[e,S,y]),V=l.useCallback((o=>{const n=$l(e),r=Ll(e),l=n.items.length>0||((null==r?void 0:r.length)||0)>0;t.isRowSelectable||t.checkboxSelectionVisibleOnly||!m||l?e.current.selectRows(I(),o):e.current.setRowSelectionModel({type:o?"exclude":"include",ids:new Set})}),[e,m,I,t.checkboxSelectionVisibleOnly,t.isRowSelectable]),z=l.useCallback((e=>{V(e.value)}),[V]),A=l.useCallback(((t,o)=>{if(e.current.getCellMode(t.id,t.field)!==Yn.Edit&&!ru(o)){if(Nu(o.key)&&o.shiftKey){const n=di(e);if(n&&n.id!==t.id){o.preventDefault();const r=e.current.isRowSelected(n.id);if(!y)return void e.current.selectRow(n.id,!r,!0);const l=e.current.getRowIndexRelativeToVisibleRows(n.id),i=e.current.getRowIndexRelativeToVisibleRows(t.id);let a,s;l>i?r?(a=i,s=l-1):(a=i,s=l):r?(a=l+1,s=i):(a=l,s=i);const c=La(e),u=[];for(let e=a;
127e<=s;e+=1)u.push(c.rows[e].id);return void e.current.selectRows(u,!r)}}if(" "===o.key&&o.shiftKey)return o.preventDefault(),void j(t.id,o);"A"===String.fromCharCode(o.keyCode)&&(o.ctrlKey||o.metaKey)&&(o.preventDefault(),V(!0))}}),[e,y,j,V]),B=(0,r.cK)((()=>{if(!t.rowSelection)return void e.current.setRowSelectionModel(ag);if(void 0===h)return;if(!m||!R||"include"===h.type&&0===h.ids.size)return void e.current.setRowSelectionModel(h);const o=e.current.getPropagatedRowSelectionModel(h);o.type===h.type&&o.ids.size===h.ids.size&&Array.from(h.ids).every((e=>o.ids.has(e)))?e.current.setRowSelectionModel(h):e.current.setRowSelectionModel(o)}));ln(e,"sortedRowsSet",g((()=>H(!0)))),ln(e,"filteredRowsSet",g((()=>H()))),ln(e,"rowClick",g(N)),ln(e,"rowSelectionCheckboxChange",g(L)),ln(e,"headerSelectionCheckboxChange",z),ln(e,"cellMouseDown",g($)),ln(e,"cellKeyDown",g(A)),l.useEffect((()=>{B()}),[e,h,t.rowSelection,B]);const q=null!=h;l.useEffect((()=>{if(q||!t.rowSelection||"function"!=typeof k)return;const o=Jl(e);if("include"!==o.type)return;const n=new Set;for(const e of o.ids)k(e)&&n.add(e);n.size<o.ids.size&&e.current.setRowSelectionModel({type:o.type,ids:n})}),[e,k,q,t.rowSelection]),l.useEffect((()=>{if(!t.rowSelection||q)return;const o=Jl(e);!y&&("include"===o.type&&o.ids.size>1||"exclude"===o.type)&&e.current.setRowSelectionModel(ag)}),[e,y,v,q,t.rowSelection]),l.useEffect((()=>{g(H)}),[H,g]),l.useEffect((()=>{D.current&&(D.current=!1)}),[])})(e,t),function(e,t){var o,n;const i=ja(e,"useGridColumns"),s=l.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:vr,changeEvent:"columnVisibilityModelChange"});const c=l.useCallback((t=>{i.debug("Updating columns state."),e.current.setState(Tf(t)),e.current.publishEvent("columnsChange",t.orderedFields)}),[i,e]),u=l.useCallback((t=>hr(e)[t]),[e]),d=l.useCallback((()=>br(e)),[e]),p=l.useCallback((()=>Cr(e)),[e]),f=l.useCallback((function(t){return(arguments.length>
1271&&void 0!==arguments[1]&&!arguments[1]?br(e):Cr(e)).findIndex((e=>e.field===t))}),[e]),g=l.useCallback((t=>{const o=f(t);return Sr(e)[o]}),[e,f]),m=l.useCallback((t=>{var o,n;vr(e)!==t&&(e.current.setState((o=>(0,r.cG)({},o,{columns:Ra({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),null==(n=(o=e.current).updateRenderContext)||n.call(o))}),[e]),h=l.useCallback((t=>{if(ys(e))return void e.current.updateNonPivotColumns(t);const o=Ra({apiRef:e,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});c(o)}),[e,c]),b=l.useCallback(((t,o)=>{const n=vr(e);if(o!==(n[t]??!0)){const l=(0,r.cG)({},n,{[t]:o});e.current.setColumnVisibilityModel(l)}}),[e]),v=l.useCallback((t=>mr(e).findIndex((e=>e===t))),[e]),w=l.useCallback(((t,o)=>{const n=mr(e),l=v(t);if(l===o)return;i.debug(`Moving column ${t} to index ${o}`);const a=[...n],s=a.splice(l,1)[0];a.splice(o,0,s),c((0,r.cG)({},gr(e),{orderedFields:a}));const u={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:l};e.current.publishEvent("columnIndexChange",u)}),[e,i,c,v]),C=l.useCallback(((t,o)=>{i.debug(`Updating column ${t} width to ${o}`);const n=gr(e),l=n.lookup[t],a=(0,r.cG)({},l,{width:o,hasBeenResized:!0});c(ya((0,r.cG)({},n,{lookup:(0,r.cG)({},n.lookup,{[t]:a})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:a,width:o})}),[e,i,c]),y={setColumnIndex:w};Ha(e,{getColumn:u,getAllColumns:d,getColumnIndex:f,getColumnPosition:g,getVisibleColumns:p,getColumnIndexRelativeToVisibleColumns:v,updateColumns:h,setColumnVisibilityModel:m,setColumnVisibility:b,setColumnWidth:C},"public"),Ha(e,y,t.signature===Zo.DataGrid?"private":"public");const x=l.useCallback(((o,n)=>{var l,i;const a={},s=vr(e);(!n.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys((null==(i=null==(l=t.initialState)?void 0:l.columns)?void 0:i.columnVisibilityModel)??{}).length>0||Object.keys(s).length>0)&&(a.columnVisibilityModel=s),a.orderedFields=mr(e);const c=br(e),u={};return c.forEach((e=>{if(e.hasBeenResized){const t={};wa.forEach((o=>{let n=e[o];n===1/0&&(n=-1),t[o]=n})),u[e.field]=t}})),Object.keys(u).length>0&&(a.dimensions=u),(0,r.cG)({},o,{columns:a})}),[e,t.columnVisibilityModel,null==(o=t.initialState)?void 0:o.columns]),R=l.useCallback(((t,o)=>{var n;const r=null==(n=o.stateToRestore.columns)?void 0:n.columnVisibilityModel,l=o.stateToRestore.columns;if(null==r&&null==l)return t;const i=Ra({apiRef:e,columnsToUpsert:[],initialState:l,columnVisibilityModel:r,keepOnlyColumnsToUpsert:!1});return e.current.setState(Tf(i)),null!=l&&e.current.publishEvent("columnsChange",i.orderedFields),t}),[e]),S=l.useCallback(((e,o)=>{var n;if(o===Xs.columns){const e=t.slots.columnsPanel;return(0,a.jsx)(e,(0,r.cG)({},null==(n=t.slotProps)?void 0:n.columnsPanel))}return e}),[t.slots.columnsPanel,null==(n=t.slotProps)?void 0:n.columnsPanel]),I=l.useCallback((o=>{const n=ys(e);return t.disableColumnSelector||n?o:[...o,"columnMenuColumnsItem"]}),[t.disableColumnSelector,e]);gf(e,"columnMenu",I),gf(e,"exportState",x),gf(e,"restoreState",R),gf(e,"preferencePanel",S);const M=l.useRef(null);ln(e,"viewportInnerSizeChange",(t=>{if(M.current!==t.width){if(M.current=t.width,!Cr(e).some((e=>e.flex&&e.flex>0)))return;c(ya(gr(e),e.current.getRootDimensions()))}}));const P=l.useCallback((()=>{i.info("Columns pipe processing have changed, regenerating the columns");const t=Ra({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});c(t)}),[e,i,c]);mf(e,"hydrateColumns",P);const k=l.useRef(!0);l.useEffect((()=>{if(k.current)return void(k.current=!1);if(i.info(`GridColumns have changed, new length ${t.columns.length}`),s.current===t.columns)return;const o=Ra({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0});s.current=t.columns,c(o)}),[i,e,c,t.columns]),l.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,i,t.columnVisibilityModel])}(e,t),((e,t)=>{if("production"!==n.p.env.NODE_ENV)try{Object.freeze(t.rows)}catch{}const o=ja(e,"useGridRows"),i=l.useRef(Date.now()),a=l.useRef(t.rowCount),s=(0,r.aM)(),c=l.useCallback((t=>{const o=Cn(e)[t];if(o)return o;const n=xn(e,t);return n&&ul(n)?{[ll]:t}:null}),[e]),u=l.useCallback((t=>Hi(e,t)),[e]),d=l.useCallback((o=>{let{cache:n,throttle:l}=o;const a=()=>{i.current=Date.now(),e.current.setState((o=>(0,r.cG)({},o,{rows:cl({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:yn(e),previousTreeDepths:In(e),previousGroupsToFetch:Rn(e)})}))),e.current.publishEvent("rowsSet")};if(s.clear(),e.current.caches.rows=n,!l)return void a();const c=t.throttleRowsMs-(Date.now()-i.current);c>0?s.start(c,a):a()}),[t.throttleRowsMs,t.rowCount,t.loading,e,s]),p=l.useCallback((n=>
127{if(o.debug(`Updating all rows, new length ${n.length}`),ys(e))return void e.current.updateNonPivotRows(n,!1);const r=al({rows:n,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),l=e.current.caches.rows;r.rowsBeforePartialUpdates=l.rowsBeforePartialUpdates,d({cache:r,throttle:!0})}),[o,t.getRowId,t.loading,t.rowCount,d,e]),f=l.useCallback((o=>{if(t.signature===Zo.DataGrid&&o.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(ys(e))return void e.current.updateNonPivotRows(o);const n=gl(e,o,t.getRowId),r=pl({updates:n,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:r,throttle:!0})}),[t.signature,t.getRowId,d,e]),g=l.useCallback(((o,n)=>{const r=gl(e,o,t.getRowId),l=pl({updates:r,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:n??[]});d({cache:l,throttle:!1})}),[t.getRowId,d,e]),m=l.useCallback((t=>{o.debug(`Setting loading to ${t}`),e.current.setState((e=>(0,r.cG)({},e,{rows:(0,r.cG)({},e.rows,{loading:t})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t}),[e,o]),h=l.useCallback((()=>{const t=Pn(e),o=Cn(e);return new Map(t.map((e=>[e,o[e]??{}])))}),[e]),b=l.useCallback((()=>bn(e)),[e]),v=l.useCallback((()=>Pn(e)),[e]),w=l.useCallback((t=>{const{rowIdToIndexMap:o}=La(e);return o.get(t)}),[e]),C=l.useCallback(((t,o)=>{const n=xn(e,t);if(!n)throw new Error(`MUI X: No row with id #${t} found.`);if("group"!==n.type)throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const l=(0,r.cG)({},n,{childrenExpanded:o});e.current.setState((e=>(0,r.cG)({},e,{rows:(0,r.cG)({},e.rows,{tree:(0,r.cG)({},e.rows.tree,{[t]:l})})}))),e.current.publishEvent("rowExpansionChange",l)}),[e]),y=l.useCallback((t=>xn(e,t)??null),[e]),x=l.useCallback((t=>{let{skipAutoGeneratedRows:o=!0,groupId:n,applySorting:r,applyFiltering:l}=t;const i=yn(e);let a;if(r){const t=i[n];if(!t)return[];const r=Gl(e);a=[];const l=r.findIndex((e=>e===n))+1;for(let e=l;e<r.length&&i[r[e]].depth>t.depth;e+=1){const t=r[e];(!o||!ul(i[t]))&&a.push(t)}}else a=dl(i,n,o);if(l){const t=zl(e);a=Tl(t)?a:a.filter((e=>!1!==t[e]))}return a}),[e]),R=l.useCallback(((t,n)=>{const l=xn(e,t);if(!l)throw new Error(`MUI X: No row with id #${t} found.`);if(l.parent!==rl)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if("leaf"!==l.type)throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState((l=>{const i=yn(e)[rl],a=i.children,s=a.findIndex((e=>e===t));if(-1===s||s===n)return l;o.debug(`Moving row ${t} to index ${n}`);const c=[...a];return c.splice(n,0,c.splice(s,1)[0]),(0,r.cG)({},l,{rows:(0,r.cG)({},l.rows,{tree:(0,r.cG)({},l.rows.tree,{[rl]:(0,r.cG)({},i,{children:c})})})})})),e.current.publishEvent("rowsSet")}),[e,o]),S={getRow:c,setLoading:m,getRowId:u,getRowModels:h,getRowsCount:b,getAllRowIds:v,setRows:p,updateRows:f,getRowNode:y,getRowIndexRelativeToVisibleRows:w,unstable_replaceRows:l.useCallback(((o,n)=>{if(t.signature===Zo.DataGrid&&n.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===n.length)return;if(Mn(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const l=(0,r.cG)({},yn(e)),i=(0,r.cG)({},Cn(e)),a=l[rl],s=[...a.children],c=new Set;for(let e=0;e<n.length;e+=1){const r=n[e],a=il(r,t.getRowId,"A row was provided without id when calling replaceRows()."),[u]=s.splice(o+e,1,a);c.has(u)||(delete i[u],delete l[u]);const d={id:a,depth:0,parent:rl,type:"leaf",groupingKey:null};i[a]=r,l[a]=d,c.add(a)}l[rl]=(0,r.cG)({},a,{children:s});const u=s.filter((e=>{var t;return"leaf"===(null==(t=l[e])?void 0:t.type)}));
127e.current.caches.rows.dataRowIdToModelLookup=i,e.current.setState((e=>(0,r.cG)({},e,{rows:(0,r.cG)({},e.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,s.length),dataRowIdToModelLookup:i,dataRowIds:u,tree:l})}))),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId,t.loading,t.rowCount])},I={setRowIndex:R,setRowChildrenExpansion:C,getRowGroupChildren:x},M={updateNestedRows:g},P=l.useCallback((()=>{let n;o.info("Row grouping pre-processing have changed, regenerating the row tree"),n=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,r.cG)({},e.current.caches.rows,{updates:{type:"full",rows:Pn(e)}}):al({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:n,throttle:!1})}),[o,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),k=(0,r.c_)((()=>t.dataSource)),E=l.useCallback((e=>{t.dataSource&&t.dataSource!==k.current?k.current=t.dataSource:"rowTreeCreation"===e&&P()}),[P,k,t.dataSource]),O=l.useCallback((()=>{e.current.getActiveStrategy(hf.RowTree)!==Sn(e)&&P()}),[e,P]);ln(e,"activeStrategyProcessorChange",E),ln(e,"strategyAvailabilityChange",O);const T=l.useCallback((()=>{e.current.setState((o=>{const n=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:yn(e),treeDepths:In(e),dataRowIds:Pn(e),dataRowIdToModelLo
127okup:Cn(e)});return(0,r.cG)({},o,{rows:(0,r.cG)({},o.rows,n,{totalTopLevelRowCount:sl({tree:n.tree,rowCountProp:t.rowCount})})})})),e.current.publishEvent("rowsSet")}),[e,t.rowCount]);mf(e,"hydrateRows",T),Ha(e,S,"public"),Ha(e,I,t.signature===Zo.DataGrid?"private":"public"),Ha(e,M,"private");const F=l.useRef(!0);l.useEffect((()=>{if(F.current)return void(F.current=!1);let n=!1;t.rowCount!==a.current&&(n=!0,a.current=t.rowCount);const l=t.dataSource?kn(e):t.rows,i=e.current.caches.rows.rowsBeforePartialUpdates===l,s=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,c=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;i&&(s||(e.current.setState((e=>(0,r.cG)({},e,{rows:(0,r.cG)({},e.rows,{loading:t.loading})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),c||(e.current.setState((e=>(0,r.cG)({},e,{rows:(0,r.cG)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!n)||(o.debug(`Updating all rows, new length ${null==l?void 0:l.length}`),d({cache:al({rows:l,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))}),[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,o,d,e])})(e,t),((e,t)=>{const o=(0,r.c_)((()=>e.current.state.rowSpanning!==Ag?_g(t,e):Bg)),n=l.useCallback((function(n){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{range:i,rows:a}=La(e,(t.pagination,t.paginationMode));if(null===i||!Vg(n))return;l&&(o.current=Bg);const s=function(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex<t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?{firstRowIndex:e.firstRowIndex,lastRowIndex:t.firstRowIndex-1}:e}({firstRowIndex:n.firstRowIndex,lastRowIndex:Math.min(n.lastRowIndex,i.lastRowIndex+1)},o.current);if(null===s)return;const c=Cr(e),{spannedCells:u,hiddenCells:d,hiddenCellOriginMap:p,processedRange:f}=Wg(e,c,a,i,s,l,o.current);o.current=f;const g=Object.keys(u).length,m=Object.keys(d).length,h=Object.keys(e.current.state.rowSpanning.spannedCells).length,b=Object.keys(e.current.state.rowSpanning.hiddenCells).length;!l&&g===h&&m===b||0===g&&0===h||e.current.setState((e=>(0,r.cG)({},e,{rowSpanning:{spannedCells:u,hiddenCells:d,hiddenCellOriginMap:p}})))}),[e,o,t.pagination,t.paginationMode]),i=l.useCallback((()=>{const t=_a(e);Vg(t)&&n(t,!0)}),[e,n]);ln(e,"renderedRowsIntervalChange",Kn(t.rowSpanning,n)),ln(e,"sortedRowsSet",Kn(t.rowSpanning,i)),ln(e,"paginationModelChange",Kn(t.rowSpanning,i)),ln(e,"filteredRowsSet",Kn(t.rowSpanning,i)),ln(e,"columnsChange",Kn(t.rowSpanning,i)),l.useEffect((()=>{t.rowSpanning?e.current.state.rowSpanning===Ag&&i():e.current.state.rowSpanning!==Ag&&e.current.setState((e=>(0,r.cG)({},e,{rowSpanning:Ag})))}),[e,i,t.rowSpanning])})(e,t),ig(e,t),(e=>{const t=l.useRef({}),o=()=>{t.current={}},n={resetColSpan:o,calculateColSpan:l.useCallback((o=>{let{rowId:n,minFirstColumn:r,maxLastColumn:l,columns:i}=o;for(let a=r;a<l;a+=1){const o=Rg({apiRef:e,lookup:t.current,columnIndex:a,rowId:n,minFirstColumnIndex:r,maxLastColumnIndex:l,columns:i});o.colSpan>1&&(a+=o.colSpan-1)}}),[e])};Ha(e,{unstable_getCellColSpanInfo:(e,o)=>{var n;return null==(n=t.current[e])?void 0:n[o]}},"public"),Ha(e,n,"private"),ln(e,"columnOrderChange",o)})(e),((e,t)=>{const o=l.useCallback((t=>ma(e)[t]??[]),[e]),n=l.useCallback((()=>ha(e)),[e]);Ha(e,{getColumnGroupPath:o,getAllGroupDetails:n},"public");const i=l.useCallback((()=>{const o=Mg(t.columnGroupingModel??[]);e.current.setState((e=>{var t;const n=(null==(t=e.columns)?void 0:t.orderedFields)??[],l=e.pinnedColumns??{},i=Pg(n,o,l);return(0,r.cG)({},e,{columnGrouping:(0,r.cG)({},e.columnGrouping,{headerStructure:i})})}))}),[e,t.columnGroupingModel]),a=l.useCallback((t=>{var o,n;const l=(null==(n=(o=e.current).getPinnedColumns)?void 0:n.call(o))??{},i=mr(e),a=yr(e),s=Eg(t??[]),c=Mg(t??[]),u=Pg(i,c,l),d=0===a.length?0:Math.max(...a.map((e=>{var t;return(null==(t=c[e])?void 0:t.length)??0})));e.current.setState((e=>(0,r.cG)({},e,{columnGrouping:{lookup:s,unwrappedGroupingModel:c,headerStructure:u,maxDepth:d}})))}),[e]);
127ln(e,"columnIndexChange",i),ln(e,"columnsChange",(()=>{a(t.columnGroupingModel)})),ln(e,"columnVisibilityModelChange",(()=>{a(t.columnGroupingModel)})),l.useEffect((()=>{a(t.columnGroupingModel)}),[a,t.columnGroupingModel])})(e,t),og(e,t),((e,t)=>{const o=ja(e,"useGridFocus"),n=l.useRef(null),i=null!==e.current.rootElementRef.current,a=l.useCallback(((t,o)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),o)}),[e]),s=l.useCallback(((t,n)=>{const l=di(e);(null==l?void 0:l.id)===t&&(null==l?void 0:l.field)===n||(e.current.setState((e=>(o.debug(`Focusing on cell with id=${t} and field=${n}`),(0,r.cG)({},e,{tabIndex:{cell:{id:t,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),e.current.getRow(t)&&(l&&a(l,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,n))))}),[e,o,a]),c=l.useCallback((function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=di(e);a(l,n),e.current.setState((e=>(o.debug(`Focusing on column header with colIndex=${t}`),(0,r.cG)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))))}),[e,o,a]),u=l.useCallback((function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=di(e);a(l,n),e.current.setState((e=>(o.debug(`Focusing on column header filter with colIndex=${t}`),(0,r.cG)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}}))))}),[e,o,a]),d=l.useCallback((function(t,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=di(e);l&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(l.id,l.field),n),e.current.setState((e=>(0,r.cG)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:o},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:o},columnHeader:null,columnHeaderFilter:null,cell:null}})))}),[e]),p=l.useCallback((()=>fi(e)),[e]),f=l.useCallback(((o,n,r)=>{let l=e.current.getColumnIndex(n);const i=Cr(e),a=La(e,(t.pagination,t.paginationMode)),s=En(e),c=[].concat(s.top||[],a.rows,s.bottom||[]);let u=c.findIndex((e=>e.id===o));"right"===r?l+=1:"left"===r?l-=1:u+=1,l>=i.length?(u+=1,u<c.length&&(l=0)):l<0&&(u-=1,u>=0&&(l=i.length-1)),u=Wn(u,0,c.length-1);const d=c[u];if(!d)return;const p=e.current.unstable_getCellColSpanInfo(d.id,l);p&&p.spannedByColSpan&&("left"===r||"below"===r?l=p.leftVisibleCellIndex:"right"===r&&(l=p.rightVisibleCellIndex)),l=Wn(l,0,i.length-1);const f=i[l];e.current.setCellFocus(d.id,f.field)}),[e,t.pagination,t.paginationMode]),g=l.useCallback((t=>{let{id:o,field:n}=t;e.current.setCellFocus(o,n)}),[e]),m=l.useCallback(((t,o)=>{"Enter"===o.key||"Tab"===o.key||"Shift"===o.key||Nu(o.key)||e.current.setCellFocus(t.id,t.field)}),[e]),h=l.useCallback(((t,o)=>{let{field:n}=t;o.target===o.currentTarget&&e.current.setColumnHeaderFocus(n,o)}),[e]),b=l.useCallback(((t,o)=>{let{fields:n,depth:r}=t;if(o.target!==o.currentTarget)return;const l=fi(e);null!==l&&l.depth===r&&n.includes(l.field)||e.current.setColumnGroupHeaderFocus(n[0],r,o)}),[e]),v=l.useCallback(((t,n)=>{var l,i;null!=(i=null==(l=n.relatedTarget)?void 0:l.getAttribute("class"))&&i.includes(Jo.columnHeader)||(o.debug("Clearing focus"),e.current.setState((e=>(0,r.cG)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[o,e]),w=l.useCallback((e=>{n.current=e}),[]),C=l.useCallback((t=>{const o=n.current;n.current=null;const l=di(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:o}))return;if(!l)return void(o&&e.current.setCellFocus(o.id,o.field));if((null==o?void 0:o.id)===l.id&&(null==o?void 0:o.field)===l.field)return;const i=e.current.getCellElement(l.id,l.field);null!=i&&i.contains(t.target)||(o?e.current.setCellFocus(o.id,o.field):(e.current.setState((e=>(0,r.cG)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),a(l,t)))}),[e,a]),y=l.useCallback((t=>{if("view"===t.cellMode)return;const o=di(e);((null==o?void 0:o.id)!==t.id||(null==o?void 0:o.field)!==t.field)&&e.current.setCellFocus(t.id,t.field)}),[e]),x=l.useCallback((()=>{const o=di(e);if(o&&!e.current.getRow(o.id)){const n=o.id;let l=null;if(typeof n<"u"){const o=e.current.getRowElement(n),r=null!=o&&o.dataset.rowindex?Number(null==o?void 0:o.dataset.rowindex):0,i=La(e,(t.pagination,t.paginationMode)),a=i.rows[Wn(r,0,i.rows.length-1)];l=(null==a?void 0:a.id)??null}e.current.setState((e=>(0,r.cG)({},e,{focus:{cell:null===l?null:{id:l,field:o.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}}),[e,t.pagination,t.paginationMode]),R=(0,r.cK)((()=>{const o=di(e);if(!o)return;const n=La(e,(t.pagination,t.paginationMode));if(n.rows.find((e=>e.id===o.id)))return;const l=Cr(e);e.current.setState((e=>(0,r.cG)({},e,{tabIndex:{cell:{id:n.rows[0].id,field:l[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}})))}
127)),S={moveFocusToRelativeCell:f,setColumnGroupHeaderFocus:d,getColumnGroupHeaderFocus:p};Ha(e,{setCellFocus:s,setColumnHeaderFocus:c,setColumnHeaderFilterFocus:u},"public"),Ha(e,S,"private"),l.useEffect((()=>{const t=(0,r.cL)(e.current.rootElementRef.current);return t.addEventListener("mouseup",C),()=>{t.removeEventListener("mouseup",C)}}),[e,i,C]),ln(e,"columnHeaderBlur",v),ln(e,"cellDoubleClick",g),ln(e,"cellMouseDown",w),ln(e,"cellKeyDown",m),ln(e,"cellModeChange",y),ln(e,"columnHeaderFocus",h),ln(e,"columnGroupHeaderFocus",b),ln(e,"rowsSet",x),ln(e,"paginationModelChange",R)})(e,t),((e,t)=>{var o;const n=ja(e,"useGridPreferencesPanel"),i=l.useCallback((()=>{e.current.setState((t=>{if(!t.preferencePanel.open)return t;n.debug("Hiding Preferences Panel");const o=Us(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:o.openedPanelValue}),(0,r.cG)({},t,{preferencePanel:{open:!1}})}))}),[e,n]),a=l.useCallback(((t,o,l)=>{n.debug("Opening Preferences Panel"),e.current.setState((e=>(0,r.cG)({},e,{preferencePanel:(0,r.cG)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:o,labelId:l})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t})}),[n,e]);Ha(e,{showPreferences:a,hidePreferences:i},"public");const s=l.useCallback(((o,n)=>{var l;const i=Us(e);return!n.exportOnlyDirtyModels||null!=(null==(l=t.initialState)?void 0:l.preferencePanel)||i.open?(0,r.cG)({},o,{preferencePanel:i}):o}),[e,null==(o=t.initialState)?void 0:o.preferencePanel]),c=l.useCallback(((t,o)=>{const n=o.stateToRestore.preferencePanel;return null!=n&&e.current.setState((e=>(0,r.cG)({},e,{preferencePanel:n}))),t}),[e]);gf(e,"exportState",s),gf(e,"restoreState",c)})(e,t),((e,t)=>{var o,n,i;const s=ja(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:$l,changeEvent:"filterModelChange"});const c=l.useCallback((()=>{e.current.setState((t=>{const o=$l(e),n=e.current.getFilterState(o),l=(0,r.cG)({},t,{filter:(0,r.cG)({},t.filter,n)}),i=Vf(e,l);return(0,r.cG)({},l,{visibleRowsLookup:i})})),e.current.publishEvent("filteredRowsSet")}),[e]),u=l.useCallback(((e,o)=>null==o||!1===o.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[t.disableColumnFilter]),d=l.useCallback((t=>{const o=$l(e),n=[...o.items],l=n.findIndex((e=>e.id===t.id));-1===l?n.push(t):n[l]=t,e.current.setFilterModel((0,r.cG)({},o,{items:n}),"upsertFilterItem")}),[e]),p=l.useCallback((t=>{const o=$l(e),n=[...o.items];t.forEach((e=>{const t=n.findIndex((t=>t.id===e.id));-1===t?n.push(e):n[t]=e})),e.current.setFilterModel((0,r.cG)({},o,{items:n}),"upsertFilterItems")}),[e]),f=l.useCallback((t=>{const o=$l(e),n=o.items.filter((e=>e.id!==t.id));n.length!==o.items.length&&e.current.setFilterModel((0,r.cG)({},o,{items:n}),"deleteFilterItem")}),[e]),g=l.useCallback(((o,n,l)=>{if(s.debug("Displaying filter panel"),o){const n=$l(e),l=n.items.filter((t=>{var o;if(void 0!==t.value)return!(Array.isArray(t.value)&&0===t.value.length);const n=null==(o=e.current.getColumn(t.field).filterOperators)?void 0:o.find((e=>e.value===t.operator));return!(typeof(null==n?void 0:n.requiresFilterValue)>"u"||(null==n?void 0:n.requiresFilterValue))}));let i;const a=l.find((e=>e.field===o)),s=e.current.getColumn(o);i=a?l:t.disableMultipleColumnsFiltering?[Er({field:o,operator:s.filterOperators[0].value},e)]:[...l,Er({field:o,operator:s.filterOperators[0].value},e)],e.current.setFilterModel((0,r.cG)({},n,{items:i}))}e.current.showPreferences(Xs.filters,n,l)}),[e,s,t.disableMultipleColumnsFiltering]),m=l.useCallback((()=>{s.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,s]),h=l.useCallback((t=>{const o=$l(e);o.logicOperator!==t&&e.current.setFilterModel((0,r.cG)({},o,{logicOperator:t}),"changeLogicOperator")}),[e]),b=l.useCallback((t=>{const o=$l(e);Xd(o.quickFilterValues,t)||e.current.setFilterModel((0,r.cG)({},o,{quickFilterValues:[...t]}))}),[e]),v=l.useCallback(((o,n)=>{$l(e)!==o&&(s.debug("Setting filter model"),e.current.updateControlState("filter",Tr(o,t.disableMultipleColumnsFiltering,e),n),e.current.unstable_applyFilters())}),[e,s,t.disableMultipleColumnsFiltering]),w=l.useCallback((o=>{const n=Or(o,t.disableMultipleColumnsFiltering,e),l="client"===t.filterMode?Nr(n,e,t.disableEval):null,i=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:l,filterModel:n??cr()});return(0,r.cG)({},i,{filterModel:n})}),[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),C={setFilterLogicOperator:h,unstable_applyFilters:c,deleteFilterItem:f,upsertFilterItem:d,upsertFilterItems:p,setFilterModel:v,showFilterPanel:g,hideFilterPanel:m,setQuickFilterValues:b,ignoreDiacritics:t.ignoreDiacritics,getFilterState:w};Ha(e,C,"public");const y=l.useCallback(((o,n)=>{var l,i;const a=$l(e);
127return a.items.forEach((e=>{delete e.fromInput})),n.exportOnlyDirtyModels&&null==t.filterModel&&null==(null==(i=null==(l=t.initialState)?void 0:l.filter)?void 0:i.filterModel)&&Xd(a,cr())?o:(0,r.cG)({},o,{filter:{filterModel:a}})}),[e,t.filterModel,null==(n=null==(o=t.initialState)?void 0:o.filter)?void 0:n.filterModel]),x=l.useCallback(((o,n)=>{var l;const i=null==(l=n.stateToRestore.filter)?void 0:l.filterModel;return null==i?o:(e.current.updateControlState("filter",Tr(i,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,r.cG)({},o,{callbacks:[...o.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),R=l.useCallback(((e,o)=>{var n;if(o===Xs.filters){const e=t.slots.filterPanel;return(0,a.jsx)(e,(0,r.cG)({},null==(n=t.slotProps)?void 0:n.filterPanel))}return e}),[t.slots.filterPanel,null==(i=t.slotProps)?void 0:i.filterPanel]),{getRowId:S}=t,I=(0,r.c_)(zf),M=l.useCallback((o=>{var n;if("client"!==t.filterMode||!o.isRowMatchingFilters||!o.filterModel.items.length&&(null==(n=o.filterModel.quickFilterValues)||!n.length))return sr;const r=Cn(e),l={},{isRowMatchingFilters:i}=o,a={},s={passingFilterItems:null,passingQuickFilterValues:null}
127,c=I.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t<c.length;t+=1){const n=c[t],r=S?S(n):n.id;i(n,void 0,s);const u=Lr([s.passingFilterItems],[s.passingQuickFilterValues],o.filterModel,e,a);u||(l[r]=u)}const u="auto-generated-group-footer-root";return r[u]&&(l[u]=!0),{filteredRowsLookup:l,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}}),[e,t.filterMode,S,I]);gf(e,"columnMenu",u),gf(e,"exportState",y),gf(e,"restoreState",x),gf(e,"preferencePanel",R),bf(e,vf,"filtering",M),bf(e,vf,"visibleRowsLookupCreation",Lf);const P=l.useCallback((()=>{s.debug("onColUpdated - GridColumns changed, applying filters");const t=$l(e),o=hr(e),n=t.items.filter((e=>e.field&&o[e.field]));n.length<t.items.length&&e.current.setFilterModel((0,r.cG)({},t,{items:n}))}),[e,s]),k=l.useCallback((t=>{"filtering"===t&&e.current.unstable_applyFilters()}),[e]),E=l.useCallback((()=>{e.current.setState((t=>(0,r.cG)({},t,{visibleRowsLookup:Vf(e,t)})))}),[e]);ln(e,"rowsSet",c),ln(e,"columnsChange",P),ln(e,"activeStrategyProcessorChange",k),ln(e,"rowExpansionChange",E),ln(e,"columnVisibilityModelChange",(()=>{const t=$l(e);t.quickFilterValues&&jr(t)&&e.current.unstable_applyFilters()})),$a((()=>{e.current.unstable_applyFilters()})),(0,r.bd)((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,s,t.filterModel])})(e,t),((e,t)=>{var o,n;const i=ja(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Hl,changeEvent:"sortModelChange"});const a=l.useCallback(((t,o)=>{const n=Hl(e),r=n.findIndex((e=>e.field===t));let l=[...n];return r>-1?null==(null==o?void 0:o.sort)?l.splice(r,1):l.splice(r,1,o):l=[...n,o],l}),[e]),s=l.useCallback(((o,n)=>{const l=Hl(e).find((e=>e.field===o.field));if(l){const e=void 0===n?Dn(o.sortingOrder??t.sortingOrder,l.sort):n;return void 0===e?void 0:(0,r.cG)({},l,{sort:e})}return{field:o.field,sort:void 0===n?Dn(o.sortingOrder??t.sortingOrder):n}}),[e,t.sortingOrder]),c=l.useCallback(((e,o)=>null==o||!1===o.sortable||t.disableColumnSorting?e:(o.sortingOrder||t.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[t.sortingOrder,t.disableColumnSorting]),u=l.useCallback((()=>{e.current.setState((o=>{if("server"===t.sortingMode)return i.debug("Skipping sorting rows as sortingMode = server"),(0,r.cG)({},o,{sorting:(0,r.cG)({},o.sorting,{sortedRows:dl(yn(e),rl,!1)})});const n=Hl(e),l=Gn(n,e),a=e.current.applyStrategyProcessor("sorting",{sortRowList:l});return(0,r.cG)({},o,{sorting:(0,r.cG)({},o.sorting,{sortedRows:a})})})),e.current.publishEvent("sortedRowsSet")}),[e,i,t.sortingMode]),d=l.useCallback((o=>{Hl(e)!==o&&(i.debug("Setting sort model"),e.current.setState(Fn(o,t.disableMultipleColumnsSorting)),e.current.applySorting())}),[e,i,t.disableMultipleColumnsSorting]),p=l.useCallback(((o,n,r)=>{const l=e.current.getColumn(o),i=s(l,n);let c;c=!r||t.disableMultipleColumnsSorting?null==(null==i?void 0:i.sort)?[]:[i]:a(l.field,i),e.current.setSortModel(c)}),[e,a,s,t.disableMultipleColumnsSorting]),f=l.useCallback((()=>Hl(e)),[e]),g=l.useCallback((()=>Dl(e).map((e=>e.model))),[e]),m=l.useCallback((()=>Gl(e)),[e]),h=l.useCallback((t=>e.current.getSortedRowIds()[t]),[e]);Ha(e,{getSortModel:f,getSortedRows:g,getSortedRowIds:m,getRowIdFromRowIndex:h,setSortModel:d,sortColumn:p,applySorting:u},"public");const b=l.useCallback(((o,n)=>{var l,i;const a=Hl(e);return!n.exportOnlyDirtyModels||null!=t.sortModel||null!=(null==(i=null==(l=t.initialState)?void 0:l.sorting)?void 0:i.sortModel)||a.length>0?(0,r.cG)({},o,{sorting:{sortModel:a}}):o}),[e,t.sortModel,null==(n=null==(o=t.initialState)?void 0:o.sorting)?void 0:n.sortModel]),v=l.useCallback(((o,n)=>{var l;const i=null==(l=n.stateToRestore.sorting)?void 0:l.sortModel;return null==i?o:(e.current.setState(Fn(i,t.disableMultipleColumnsSorting)),(0,r.cG)({},o,{callbacks:[...o.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),w=l.useCallback((t=>{const o=yn(e),n=o[rl],r=t.sortRowList?t.sortRowList(n.children.map((e=>o[e]))):[...n.children];return null!=n.footerId&&r.push(n.footerId),r}),[e]);gf(e,"exportState",b),gf(e,"restoreState",v),bf(e,vf,"sorting",w
127);const C=l.useCallback(((e,o)=>{let{field:n,colDef:r}=e;if(!r.sortable||t.disableColumnSorting)return;const l=o.shiftKey||o.metaKey||o.ctrlKey;p(n,void 0,l)}),[p,t.disableColumnSorting]),y=l.useCallback(((e,o)=>{let{field:n,colDef:r}=e;!r.sortable||t.disableColumnSorting||"Enter"===o.key&&!o.ctrlKey&&!o.metaKey&&p(n,void 0,o.shiftKey)}),[p,t.disableColumnSorting]),x=l.useCallback((()=>{const t=Hl(e),o=hr(e);if(t.length>0){const n=t.filter((e=>o[e.field]));n.length<t.length&&e.current.setSortModel(n)}}),[e]),R=l.useCallback((t=>{"sorting"===t&&e.current.applySorting()}),[e]);gf(e,"columnMenu",c),ln(e,"columnHeaderClick",C),ln(e,"columnHeaderKeyDown",y),ln(e,"rowsSet",e.current.applySorting),ln(e,"columnsChange",x),ln(e,"activeStrategyProcessorChange",R),$a((()=>{e.current.applySorting()})),(0,r.bd)((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(e,t),((e,t)=>{var o;const n=ja(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:un,changeEvent:"densityChange"});const i={setDensity:(0,r.cK)((t=>{un(e)!==t&&(n.debug(`Set grid density to ${t}`),e.current.setState((e=>(0,r.cG)({},e,{density:t}))))}))};Ha(e,i,"public");const a=l.useCallback(((o,n)=>{var l;const i=un(e);return n.exportOnlyDirtyModels&&null==t.density&&null==(null==(l=t.initialState)?void 0:l.density)?o:(0,r.cG)({},o,{density:i})}),[e,t.density,null==(o=t.initialState)?void 0:o.density]),s=l.useCallback(((t,o)=>{var n;const l=null!=(n=o.stateToRestore)&&n.density?o.stateToRestore.density:un(e);return e.current.setState((e=>(0,r.cG)({},e,{density:l}))),t}),[e]);gf(e,"exportState",a),gf(e,"restoreState",s),l.useEffect((()=>{t.density&&e.current.setDensity(t.density)}),[e,t.density])})(e,t),$g(e,t),Kf(e,t),((e,t)=>{const{getRowHeight:o,getRowSpacing:n,getEstimatedRowHeight:i}=t,a=e.current.caches.rowsMeta.heights,s=l.useRef(-1),c=l.useRef(!1),u=l.useRef(!1),d=Po(e,dn),p=Va(e),f=Po(e,En),g=Po(e,Lo),m=l.useCallback((t=>{const l=No(e).rowHeight,a=e.current.getRowHeightEntry(t.id);if(o){const e=o((0,r.cG)({},t,{densityFactor:d}));if("auto"===e){if(a.needsFirstMeasurement){const e=i?i((0,r.cG)({},t,{densityFactor:d})):l;a.content=e??l}c.current=!0,a.autoHeight=!0}else a.content=hl(e,l,vl),a.needsFirstMeasurement=!1,a.autoHeight=!1}else a.content=l,a.needsFirstMeasurement=!1;if(n){const o=e.current.getRowIndexRelativeToVisibleRows(t.id),l=n((0,r.cG)({},t,{isFirstVisible:0===o,isLastVisible:o===p.rows.length-1,indexRelativeToCurrentPage:o}));a.spacingTop=l.top??0,a.spacingBottom=l.bottom??0}else a.spacingTop=0,a.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",a,t),a}),[e,p.rows,o,i,g,n,d]),h=l.useCallback((()=>{c.current=!1;const t=f.top.reduce(((e,t)=>{const o=m(t);return e+o.content+o.spacingTop+o.spacingBottom+o.detail}),0),o=f.bottom.reduce(((e,t)=>{const o=m(t);return e+o.content+o.spacingTop+o.spacingBottom+o.detail}),0),n=[],l=p.rows.reduce(((e,t)=>{n.push(e);const o=m(t);return e+(o.content+o.spacingTop+o.spacingBottom+o.detail)}),0);c.current||(s.current=1/0);const i=t!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||o!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||l!==e.current.state.rowsMeta.currentPageTotalHeight,a={currentPageTotalHeight:l,positions:n,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:o};e.current.setState((e=>(0,r.cG)({},e,{rowsMeta:a}))),i&&e.current.updateDimensions(),u.current=!0}),[e,f,p.rows,m]),b=(0,r.c_)((()=>new yg((t=>{var o;for(let n=0;n<t.length;n+=1){const r=t[n],l=r.borderBoxSize&&r.borderBoxSize.length>0?r.borderBoxSize[0].blockSize:r.contentRect.height,i=r.target.__mui_id;if((null==(o=ts(e))?void 0:o.id)===i&&0===l)return;e.current.unstable_storeRowHeightMeasurement(i,l)}u.current||e.current.requestPipeProcessorsApplication("rowHeight")})))).current;mf(e,"rowHeight",h),(0,r.bd)((()=>{h()}),[h]);const v={unstable_getRowHeight:e=>{var t;return(null==(t=a.get(e))?void 0:t.content)??g},unstable_setLastMeasuredRowIndex:e=>{c.current&&e>s.current&&(s.current=e)},unstable_storeRowHeightMeasurement:(t,o)=>{const n=e.current.getRowHeightEntry(t),r=n.content!==o;n.needsFirstMeasurement=!1,n.content=o,u.current&&(u.current=!r)},resetRowHeights:()=>{a.clear(),h()}},w={hydrateRowsMeta:h,observeRowHeight:(e,t)=>
127(e.__mui_id=t,b.observe(e),()=>b.unobserve(e)),rowHasAutoHeight:e=>{var t;return(null==(t=a.get(e))?void 0:t.autoHeight)??!1},getRowHeightEntry:e=>{let t=a.get(e);return void 0===t&&(t={content:g,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},a.set(e,t)),t},getLastMeasuredRowIndex:()=>s.current};Ha(e,v,"public"),Ha(e,w,"private")})(e,t),((e,t)=>{const o=(0,r.cN)(),n=ja(e,"useGridScroll"),i=e.current.columnHeadersContainerRef,a=e.current.virtualScrollerRef,s=Po(e,Al),c=l.useCallback((o=>{var r;const l=No(e),i=bn(e),c=t.listView?[es(e)]:Cr(e);if(null!=o.rowIndex&&0===i||0===c.length)return!1;n.debug(`Scrolling to cell at row ${o.rowIndex}, col: ${o.colIndex} `);let u={};if(void 0!==o.colIndex){const t=Sr(e);let n;if(typeof o.rowIndex<"u"){const t=null==(r=s[o.rowIndex])?void 0:r.id,l=e.current.unstable_getCellColSpanInfo(t,o.colIndex);l&&!l.spannedByColSpan&&(n=l.cellProps.width)}typeof n>"u"&&(n=c[o.colIndex].computedWidth),u.left=dg({containerSize:l.viewportOuterSize.width,scrollPosition:Math.abs(a.current.scrollLeft),elementSize:n,elementOffset:t[o.colIndex]})}if(void 0!==o.rowIndex){const n=Aa(e),r=Mi(e),i=Pi(e),s=t.pagination?o.rowIndex-r*i:o.rowIndex,c=n.positions[s+1]?n.positions[s+1]-n.positions[s]:n.currentPageTotalHeight-n.positions[s];u.top=dg({containerSize:l.viewportInnerSize.height,scrollPosition:a.current.scrollTop,elementSize:c,elementOffset:n.positions[s]})}return u=e.current.unstable_applyPipeProcessors("scrollToIndexes",u,o),(void 0!==typeof u.left||void 0!==typeof u.top)&&(e.current.scroll(u),!0)}),[n,e,a,t.pagination,s,t.listView]),u=l.useCallback((e=>{if(a.current&&void 0!==e.left&&i.current){const t=o?-1:1;i.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,n.debug(`Scrolling left: ${e.left}`)}a.current&&void 0!==e.top&&(a.current.scrollTop=e.top,n.debug(`Scrolling top: ${e.top}`)),n.debug("Scrolling, updating container, and viewport")}),[a,o,i,n]),d=l.useCallback((()=>null!=a&&a.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0}),[a]);Ha(e,{scroll:u,scrollToIndexes:c,getScrollPosition:d},"public")})(e,t),(e=>{const t=ja(e,"useGridColumnMenu"),o=l.useCallback((o=>{const n=Ss(e),l=o;(!0!==n.open||l!==n.field)&&(e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===o?e:(t.debug("Opening Column Menu"),(0,r.cG)({},e,{columnMenu:{open:!0,field:o}})))),e.current.hidePreferences())}),[e,t]),n=l.useCallback((()=>{const o=Ss(e);if(o.field){const t=hr(e),n=vr(e),r=mr(e);let l=o.field;if(t[l]||(l=r[0]),!1===n[l]){const e=r.filter((e=>e===l||!1!==n[e])),t=e.indexOf(l);l=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(l)}const n={open:!1,field:void 0};(n.open!==o.open||n.field!==o.field)&&e.current.setState((e=>(t.debug("Hiding Column Menu"),(0,r.cG)({},e,{columnMenu:n}))))}),[e,t]),i=l.useCallback((r=>{t.debug("Toggle Column Menu");const l=Ss(e);l.open&&l.field===r?n():o(r)}),[e,t,o,n]);Ha(e,{showColumnMenu:o,hideColumnMenu:n,toggleColumnMenu:i},"public"),ln(e,"columnResizeStart",n),ln(e,"virtualScrollerWheel",e.current.hideColumnMenu),ln(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(e),Hf(e,t),Nf(e,t),kf(e,t),bg(e,t),function(e,t){sn(e,"columnHeaderClick",t.onColumnHeaderClick),sn(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),sn(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),sn(e,"columnHeaderOver",t.onColumnHeaderOver),sn(e,"columnHeaderOut",t.onColumnHeaderOut),sn(e,"columnHeaderEnter",t.onColumnHeaderEnter),sn(e,"columnHeaderLeave",t.onColumnHeaderLeave),sn(e,"cellClick",t.onCellClick),sn(e,"cellDoubleClick",t.onCellDoubleClick),sn(e,"cellKeyDown",t.onCellKeyDown),sn(e,"preferencePanelClose",t.onPreferencePanelClose),sn(e,"preferencePanelOpen",t.onPreferencePanelOpen),sn(e,"menuOpen",t.onMenuOpen),sn(e,"menuClose",t.onMenuClose),sn(e,"rowDoubleClick",t.onRowDoubleClick),sn(e,"rowClick",t.onRowClick),sn(e,"stateChange",t.onStateChange)}(e,t),(e=>{const t=l.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.current.unstable_applyPipeProcessors("exportState",{},t)}),[e]),o=l.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()}))}),[e]);Ha(e,{exportState:t,restoreState:o},"public")})(e),function(e,t){const o=o=>{e.current.setState((e=>(0,r.cG)({},e,{virtualization:(0,r.cG)({},e.virtualization,{enabled:o,enabledForColumns:o,enabledForRows:o&&!t.autoHeight})})))};Ha(e,{unstable_setVirtualization:o,unstable_setColumnVirtualization:t=>{e.current.setState((e=>(0,r.cG)({},e,{virtualization:(0,r.cG)({},e.virtualization,{enabledForColumns:t})})))}},"public"),l.useEffect((()=>{o(!t.disableVirtualization)}),[t.disableVirtualization,t.autoHeight])}(e,t),function(e,t){const o=()=>{e.current.setState((t=>t.listViewColumn?(0,r.cG)({},t,{listViewColumn:(0,r.cG)({},t.listViewColumn,{computedWidth:Xg(e)})}):t))},n=l.useRef(null);ln(e,"viewportInnerSizeChange",(e=>{n.current!==e.width&&(n.current=e.width,o())})),ln(e,"columnVisibilityModelChange",o),(0,r.bd)((()=>{const o=t.listViewColumn;o&&e.current.setState((t=>(0,r.cG)({},t,{listViewColumn:(0,r.cG)({},o,{computedWidth:Xg(e)})})))}),[e,t.listViewColumn]),l.useEffect((()=>{t.listView&&!t.listViewColumn&&wo(["MUI X: The `listViewColumn` prop must be set if `listView` is enabled.",'To fix, pass a column definition to the `listViewColumn` prop, e.g. `{ field: "example", renderCell: (params) => <div>{params.row.id}</div> }`.',"For more details, see https://mui.com/x/react-data-grid/list-view/"])}),[t.listView,t.listViewColumn])}(e,t),tm(e,t)};function nm(e){var t;const{groupId:o,width:n,depth:i,maxDepth:s,fields:c,height:u,colIndex:d,hasFocus:p,tabIndex:f,isLastColumn:g,pinnedPosition:m,pinnedOffset:h}
127=e,b=qe(),v=(0,r.cN)(),w=l.useRef(null),C=Ae(),y=Po(C,ha),x=o?y[o]:{},{headerName:R=o??"",description:S="",headerAlign:I}=x;let M;const P=o&&(null==(t=y[o])?void 0:t.renderHeaderGroup),k=l.useMemo((()=>({groupId:o,headerName:R,description:S,depth:i,maxDepth:s,fields:c,colIndex:d,isLastColumn:g})),[o,R,S,i,s,c,d,g]);o&&P&&(M=P(k));const E=(0,r.cG)({},e,{classes:b.classes,headerAlign:I,depth:i,isDragging:!1}),O=R??o,T=(0,r.aI)(),F=null===o?`empty-group-cell-${T}`:o,G=(e=>{const{classes:t,headerAlign:o,isDragging:n,isLastColumn:l,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:c}=e,u={root:["columnHeader","left"===o&&"columnHeader--alignLeft","center"===o&&"columnHeader--alignCenter","right"===o&&"columnHeader--alignRight",n&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",null===s?"columnHeader--emptyGroup":"columnHeader--filledGroup",c===yl.LEFT&&"columnHeader--pinnedLeft",c===yl.RIGHT&&"columnHeader--pinnedRight",l&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,r.I)(u,Yo,t)})(E);l.useLayoutEffect((()=>{if(p){const e=w.current.querySelector('[tabindex="0"]')||w.current;null==e||e.focus()}}),[C,p]);const D=l.useCallback((e=>t=>{ru(t)||C.current.publishEvent(e,k,t)}),[C,k]),H=l.useMemo((()=>({onKeyDown:D("columnGroupHeaderKeyDown"),onFocus:D("columnGroupHeaderFocus"),onBlur:D("columnGroupHeaderBlur")})),[D]),j="function"==typeof x.headerClassName?x.headerClassName(k):x.headerClassName,N=l.useMemo((()=>dc((0,r.cG)({},e.style),v,m,h)),[m,h,e.style,v]);return(0,a.jsx)(wu,(0,r.cG)({ref:w,classes:G,columnMenuOpen:!1,colIndex:d,height:u,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:f,isDraggable:!1,headerComponent:M,headerClassName:j,description:S,elementId:F,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:O,"aria-colspan":c.length,"data-fields":`|-${c.join("-|-")}-|`,style:N},H))}const rm=(0,r.H)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),lm=["className"],im=(0,s.s)("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),am=ge((function(e,t){const{className:o}=e,l=(0,r.cH)(e,lm),i=qe(),s=(e=>{const{classes:t}=e;return(0,r.I)({root:["columnHeaders"]},Yo,t)})(i);return(0,a.jsx)(im,(0,r.cG)({className:(0,n.c)(s.root,o),ownerState:i},l,{role:"presentation",ref:t}))})),sm=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],cm=ge((function(e,t){const{visibleColumns:o,sortColumnLookup:i,filterColumnLookup:s,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:u,columnHeaderFocus:d,columnGroupHeaderFocus:p,headerGroupingMaxDepth:f,columnMenuState:g,columnVisibility:m,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:b}=e,v=(0,r.cH)(e,sm),{getInnerProps:w,getColumnHeadersRow:C,getColumnGroupHeadersRows:y}=(e=>{const{visibleColumns:t,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:c,columnHeaderFocus:u,columnGroupHeaderFocus:d,headerGroupingMaxDepth:p,columnMenuState:f,columnVisibility:g,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:h}=e,[b,v]=l.useState(""),[w,C]=l.useState(""),y=Ga(),x=qe(),R=Po(y,ma),S=Po(y,Sr),I=Po(y,Ua),M=Po(y,Rr),P=Po(y,hr),k=ms(S,I,M.left.length),E=Po(y,$o),O=Po(y,Bo),T=Po(y,qo),F=Po(y,Wo),G=Po(y,Uo),D=l.useCallback((e=>C(e.field)),[]),H=l.useCallback((()=>C("")),[]),j=l.useCallback((e=>v(e.field)),[]),N=l.useCallback((()=>v("")),[]),$=l.useMemo((()=>M.left.length?{firstColumnIndex:0,lastColumnIndex:M.left.length}:null),[M.left.length]),L=l.useMemo((()=>M.right.length?{firstColumnIndex:t.length-M.right.length,lastColumnIndex:t.length}:null),[M.right.length,t.length]);ln(y,"columnResizeStart",D),ln(y,"columnResizeStop",H),ln(y,"columnHeaderDragStart",j),ln(y,"columnHeaderDragEnd",N);const V=e=>{const{renderContext:o=I}=e||{},n=o.firstColumnIndex,r=o.lastColumnIndex;return{renderedColumns:t.slice(n,r),firstColumnToRender:n,lastColumnToRender:r}},z=function(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=(null==e?void 0:e.position)===yl.RIGHT,s=void 0===(null==e?void 0:e.position),c=M.right.length>0&&i||0===M.right.length&&s,u=k-o;return(0,a.jsxs)(l.Fragment,{children:[s&&(0,a.jsx)("div",{role:"presentation",style:{width:u}}),t,s&&(0,a.jsx)("div",{role:"presentation",className:(0,n.c)(Jo.filler,r&&Jo["filler--borderBottom"])}),c&&(0,a.jsx)(Lp,{header:!0,pinnedRight:i,borderBottom:r,borderTop:!1})]})},A=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{renderedColumns:n,firstColumnToRender:l}=V(e),c=[];for(let d=0;d<n.length;d+=1){const p=n[d],g=l+d,m=0===g,v=null!==s&&s.field===p.field||m&&!h?0:-1,C=null!==u&&u.field===p.field,y=f.open&&f.field===p.field,R=null==e?void 0:e.position,I=Hp(R,p.computedWidth,g,S,E,G),P=R===yl.RIGHT?n[d-1]:n[d+1],k=!!P&&null!==u&&u.field===P.field,F=g+1===S.length-M.right.length,D=d,H=n.length,j=Np(R,D),N=jp(R,D,H,x.showColumnVerticalBorder,O);c.push((0,a.jsx)(yu,(0,r.cG)({},o[p.field],{columnMenuOpen:y,filterItemsCounter:i[p.field]&&i[p.field].length,headerHeight:T,isDragging:p.field===b,colDef:p,colIndex:g,isResizing:w===p.field,isLast:g===S.length-1,hasFocus:C,tabIndex:v,pinnedPosition:R,pinnedOffset:I,isLastUnpinned:F,isSiblingFocused:k,showLeftBorder:j,showRightBorder:N},t),p.field))}return z(e,c,0)},B=e=>{let{depth:o,params:n}=e;var l,i;const s=V(n);if(0===s.renderedColumns.length)return null;const{firstColumnToRender:u,lastColumnToRender:f}
127=s,h=m[o],b=t[u].field,v=(null==(l=R[b])?void 0:l[o])??null,w=h.findIndex((e=>{let{groupId:t,columnFields:o}=e;return t===v&&o.includes(b)})),C=t[f-1].field,y=(null==(i=R[C])?void 0:i[o])??null,I=h.findIndex((e=>{let{groupId:t,columnFields:o}=e;return t===y&&o.includes(C)})),M=h.slice(w,I+1).map((e=>(0,r.cG)({},e,{columnFields:e.columnFields.filter((e=>!1!==g[e]))}))).filter((e=>e.columnFields.length>0)),k=M[0].columnFields.indexOf(b),T=M[0].columnFields.slice(0,k).reduce(((e,t)=>e+(P[t].computedWidth??0)),0);let D=u;const H=M.map(((e,t)=>{let{groupId:r,columnFields:l}=e;const i=null!==d&&d.depth===o&&l.includes(d.field),s=null!==c&&c.depth===o&&l.includes(c.field)?0:-1,u={width:l.reduce(((e,t)=>e+P[t].computedWidth),0),fields:l,colIndex:D},f=n.position,g=Hp(f,u.width,D,S,E,G);D+=l.length;let m=t;return f===yl.LEFT&&(m=D-1),(0,a.jsx)(nm,{groupId:r,width:u.width,fields:u.fields,colIndex:u.colIndex,depth:o,isLastColumn:t===M.length-1,maxDepth:p,height:F,hasFocus:i,tabIndex:s,pinnedPosition:f,pinnedOffset:g,showLeftBorder:Np(f,m),showRightBorder:jp(f,m,M.length,x.showColumnVerticalBorder,O)},t)}));return z(n,H,T)};return{renderContext:I,leftRenderContext:$,rightRenderContext:L,pinnedColumns:M,visibleColumns:t,columnPositions:S,getFillers:z,getColumnHeadersRow:()=>(0,a.jsxs)(rm,{role:"row","aria-rowindex":p+1,ownerState:x,className:Jo["row--borderBottom"],style:{height:T},children:[$&&A({position:yl.LEFT,renderContext:$},{disableReorder:!0}),A({renderContext:I}),L&&A({position:yl.RIGHT,renderContext:L},{disableReorder:!0,separatorSide:mu.Left})]}),getColumnsToRender:V,getColumnGroupHeadersRows:()=>{if(0===p)return null;const e=[];for(let t=0;t<p;t+=1)e.push((0,a.jsxs)(rm,{role:"row","aria-rowindex":t+1,ownerState:x,style:{height:F},children:[$&&B({depth:t,params:{position:yl.LEFT,renderContext:$,maxLastColumn:$.lastColumnIndex}}),B({depth:t,params:{renderContext:I}}),L&&B({depth:t,params:{position:yl.RIGHT,renderContext:L,maxLastColumn:L.lastColumnIndex}})]},t));return e},getPinnedCellOffset:Hp,isDragging:!!b,getInnerProps:()=>({role:"rowgroup"})}})({visibleColumns:o,sortColumnLookup:i,filterColumnLookup:s,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:u,columnHeaderFocus:d,columnGroupHeaderFocus:p,headerGroupingMaxDepth:f,columnMenuState:g,columnVisibility:m,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:b});return(0,a.jsxs)(am,(0,r.cG)({},v,w(),{ref:t,children:[y(),C()]}))}));"production"!==n.p.env.NODE_ENV&&(cm.propTypes={columnGroupHeaderFocus:i.shape({depth:i.number.isRequired,field:i.string.isRequired}),columnGroupHeaderTabIndexState:i.shape({depth:i.number.isRequired,field:i.string.isRequired}),columnGroupsHeaderStructure:i.arrayOf(i.arrayOf(i.shape({columnFields:i.arrayOf(i.string).isRequired,groupId:i.string}))).isRequired,columnHeaderFocus:i.shape({field:i.string.isRequired}),columnHeaderTabIndexState:i.shape({field:i.string.isRequired}),columnMenuState:i.shape({field:i.string,open:i.bool.isRequired}).isRequired,columnVisibility:i.object.isRequired,filterColumnLookup:i.object.isRequired,hasOtherElementInTabSequence:i.bool.isRequired,headerGroupingMaxDepth:i.number.isRequired,sortColumnLookup:i.object.isRequired,visibleColumns:i.arrayOf(i.object).isRequired});const um=Xo(cm);const dm=ge((function(e,t){const o=Ae().current.getLocaleText("noResultsOverlayLabel");return(0,a.jsx)(Wc,(0,r.cG)({},e,{ref:t,children:o}))})),pm=(0,s.s)("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});const fm=(0,r.cG)({},Yt,{cell:hc,skeletonCell:Rc,columnHeaderFilterIconButton:Du,columnHeaderSortIcon:Fu,columnMenu:Zu,columnHeaders:um,detailPanels:function(e){return null},bottomContainer:function(e){const t=(0,r.I)({root:["bottomContainer"]},Yo,{});return(0,a.jsx)(pm,(0,r.cG)({},e,{className:(0,n.c)(t.root,Jo["container--bottom"]),role:"presentation"}))},footer:Dp,footerRowCount:ef,toolbar:Op,pinnedRows:function(e){return null},loadingOverlay:Up,noResultsOverlay:dm,noRowsOverlay:Kp,noColumnsOverlay:Xp,pagination:Yp,filterPanel:Pd,columnsPanel:function(e){var t;const o=qe();return(0,a.jsx)(od,(0,r.cG)({},e,{children:(0,a.jsx)(o.slots.columnsManagement,(0,r.cG)({},null==(t=o.slotProps)?void 0:t.columnsManagement))}))},columnsManagement:Hd,panel:ad,row:rf}),gm={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",listView:!1},mm=fm,hm=e=>{const t=(0,r.aL)(),o=l.useMemo((()=>(0,s.g)({props:e,theme:t,name:"MuiDataGrid"})),[t,e]),n=l.useMemo((()=>(0,r.cG)({},Qo,o.localeText)),[o.localeText]),i=l.useMemo((()=>function(e){let{defaultSlots:t,slots:o}=e;const n=o;
127if(!n||0===Object.keys(n).length)return t;const l=(0,r.cG)({},t);return Object.keys(n).forEach((e=>{const t=e;void 0!==n[t]&&(l[t]=n[t])})),l}({defaultSlots:mm,slots:o.slots})),[o.slots]),a=l.useMemo((()=>Object.keys(pg).reduce(((e,t)=>(e[t]=o[t]??pg[t],e)),{})),[o]);return l.useMemo((()=>(0,r.cG)({},o,a,{localeText:n,slots:i},(e=>(0,r.cG)({},gm,e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}))(o))),[o,n,i,a])};class bm{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.events[e];if(r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),o.isFirst?r.highPriority.set(t,!0):r.regular.set(t,!0),"production"!==n.p.env.NODE_ENV){const t=r.highPriority.size+r.regular.size;t>this.maxListeners&&!this.warnOnce&&(this.warnOnce=!0,console.warn([`Possible EventEmitter memory leak detected. ${t} ${e} listeners added.`].join("\n")))}}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e){const t=this.events[e];if(!t)return;const o=Array.from(t.highPriority.keys()),n=Array.from(t.regular.keys());for(var r=arguments.length,l=new Array(r>1?r-1:0),i=1;i<r;i++)l[i-1]=arguments[i];for(let a=o.length-1;a>=0;a-=1){const e=o[a];t.highPriority.has(e)&&e.apply(this,l)}for(let a=0;a<n.length;a+=1){const e=n[a];t.regular.has(e)&&e.apply(this,l)}}once(e,t){const o=this;this.on(e,(function n(){for(var r=arguments.length,l=new Array(r),i=0;i<r;i++)l[i]=arguments[i];o.removeListener(e,n),t.apply(o,l)}))}}class vm{static create(e){return new vm(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}const wm=Symbol("mui.api_private");let Cm=0;function ym(e,t){var o;const n=l.useRef(null),r=l.useRef(null);r.current||(r.current=function(e){var t;const o=null==(t=e.current)?void 0:t[wm];if(o)return o;const n={},r={state:n,store:vm.create(n),instanceId:{id:Cm}};return Cm+=1,r.getPublicApi=()=>e.current,r.register=(t,o)=>{Object.keys(o).forEach((n=>{const l=o[n],i=r[n];if(!0===(null==i?void 0:i.spying)?i.target=l:r[n]=l,"public"===t){const t=e.current,o=t[n];!0===(null==o?void 0:o.spying)?o.target=l:t[n]=l}}))},r.register("private",{caches:{},eventManager:new bm}),r}(n)),n.current||(n.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[wm]:e.current}}(r));const i=l.useCallback((function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];const[l,i,a={}]=o;if(a.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(a)&&a.isPropagationStopped())return;const s=t.signature===Zo.DataGridPro||t.signature===Zo.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,i,a,s)}),[r,t.signature]),a=l.useCallback(((e,t,o)=>{r.current.eventManager.on(e,t,o);const n=r.current;return()=>{n.eventManager.removeListener(e,t)}}),[r]);return Ha(r,{subscribeEvent:a,publishEvent:i},"public"),e&&!(null!=(o=e.current)&&o.state)&&(e.current=n.current),l.useImperativeHandle(e,(()=>n.current),[n]),l.useEffect((()=>{const e=r.current;return()=>{e.publishEvent("unmount")}}),[r]),r}const xm={hooks:{useCSSVariables:function(){const e=(0,r.aL)();return l.useMemo((()=>{const t=Qe(function(e){const t=new WeakSet;return JSON.stringify(e,((e,o)=>{if(null!==o&&"object"==typeof o){if(t.has(o))return null;t.add(o)}return o}))}(e)),o=function(e){var t,o,n,l,i,a;const s=function(e){return e.vars?e.vars.palette.TableCell.border:"light"===e.palette.mode?(0,r.be)((0,r.K)(e.palette.divider,1),.88):(0,r.bf)((0,r.K)(e.palette.divider,1),.68)}(e),c=e.palette.DataGrid,u=(null==c?void 0:c.bg)??(e.vars||e).palette.background.default,d=(null==c?void 0:c.headerBg)??u,p=(null==c?void 0:c.pinnedBg)??u,f=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:(0,r.K)(e.palette.background.default,e.palette.action.disabledOpacity),g="dark"===e.palette.mode?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper,m=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,h=function(e){return e.vars?e.vars.shape.borderRadius:"number"==typeof e.shape.borderRadius?`${e.shape.borderRadius}px`:e.shape.borderRadius}(e),b=(null==(o=null==(t=e.vars)?void 0:t.font)?void 0:o.body2)??rt(e.typography.body2),v=(null==(l=null==(n=e.vars)?void 0:n.font)?void 0:l.caption)??rt(e.typography.caption),w=(null==(a=null==(i=e.vars)?void 0:i.font)?void 0:a.body1)??rt(e.typography.body1),C=tt.keys;return{[C.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[C.colors.border.base]:s,[C.colors.background.base]:u,[C.c
127olors.background.overlay]:g,[C.colors.background.backdrop]:f,[C.colors.foreground.base]:(e.vars||e).palette.text.primary,[C.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[C.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[C.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[C.colors.foreground.error]:(e.vars||e).palette.error.dark,[C.colors.interactive.hover]:(e.vars||e).palette.action.hover,[C.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[C.colors.interactive.focus]:nt((e.vars||e).palette.primary.main),[C.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[C.colors.interactive.disabled]:nt((e.vars||e).palette.action.disabled),[C.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[C.colors.interactive.selected]:m,[C.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[C.header.background.base]:d,[C.cell.background.pinned]:p,[C.radius.base]:h,[C.typography.fontFamily.base]:e.typography.fontFamily,[C.typography.fontWeight.light]:e.typography.fontWeightLight,[C.typography.fontWeight.regular]:e.typography.fontWeightRegular,[C.typography.fontWeight.medium]:e.typography.fontWeightMedium,[C.typography.fontWeight.bold]:e.typography.fontWeightBold,[C.typography.font.body]:b,[C.typography.font.small]:v,[C.typography.font.large]:w,[C.transitions.easing.easeIn]:e.transitions.easing.easeIn,[C.transitions.easing.easeOut]:e.transitions.easing.easeOut,[C.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[C.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[C.transitions.duration.base]:`${e.transitions.duration.short}ms`,[C.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[C.shadows.base]:(e.vars||e).shadows[2],[C.shadows.overlay]:(e.vars||e).shadows[8],[C.zIndex.panel]:(e.vars||e).zIndex.modal,[C.zIndex.menu]:(e.vars||e).zIndex.modal}}(e);return{id:t,variables:o}}),[e])},useGridAriaAttributes:()=>{const e=Ga(),t=qe(),o=Po(e,Cr),n=Po(e,Ul),r=Po(e,va),l=Po(e,On),i=t["aria-label"],a=t["aria-labelledby"];return{role:"grid","aria-label":i||a||!t.label?i:t.label,"aria-labelledby":a,"aria-colcount":o.length,"aria-rowcount":r+1+l+n,"aria-multiselectable":ri(t)}},useGridRowAriaAttributes:()=>{const e=Ga(),t=Po(e,va);return l.useCallback(((o,n)=>{const r={},l=n+t+2;return r["aria-rowindex"]=l,e.current.isRowSelectable(o.id)&&(r["aria-selected"]=e.current.isRowSelected(o.id)),r}),[e,t])},useCellAggregationResult:()=>null}},Rm=ge((function(e,t){var o;const l=hm(e),i=ym(l.apiRef,l);return om(i,l),"production"!==n.p.env.NODE_ENV&&function(e,t){t.forEach((t=>{const o=t(e);o&&wo(o,"error")}))}(l,cc),(0,a.jsx)(lf,{privateApiRef:i,configuration:xm,props:l,children:(0,a.jsx)(Lc,(0,r.cG)({className:l.className,style:l.style,sx:l.sx},null==(o=l.slotProps)?void 0:o.root,{ref:t}))})})),Sm=l.memo(Rm);Rm.propTypes={apiRef:i.shape({current:i.object}),"aria-label":i.string,"aria-labelledby":i.string,autoHeight:i.bool,autoPageSize:i.bool,autosizeOnMount:i.bool,autosizeOptions:i.shape({columns:i.arrayOf(i.string),disableColumnVirtualization:i.bool,expand:i.bool,includeHeaders:i.bool,includeOutliers:i.bool,outliersFactor:i.number}),cellModesModel:i.object,checkboxSelection:i.bool,classes:i.object,className:i.string,clipboardCopyCellDelimiter:i.string,columnBufferPx:i.number,columnGroupHeaderHeight:i.number,columnGroupingModel:i.arrayOf(i.object),columnHeaderHeight:i.number,columns:i.arrayOf(i.object).isRequired,columnVisibilityModel:i.object,dataSource:i.shape({getRows:i.func.isRequired,updateRow:i.func}),dataSourceCache:i.shape({clear:i.func.isRequired,get:i.func.isRequired,set:i.func.isRequired}),density:i.oneOf(["comfortable","compact","standard"]),disableAutosize:i.bool,disableColumnFilter:i.bool,disableColumnMenu:i.bool,disableColumnResize:i.bool,disableColumnSelector:i.bool,disableColumnSorting:i.bool,disableDensitySelector:i.bool,disableEval:i.bool,disableMultipleRowSelection:i.bool,disableRowSelectionOnClick:i.bool,disableVirtualization:i.bool,editMode:i.oneOf(["cell","row"]),estimatedRowCount:i.number,experimentalFeatures:i.shape({warnIfFocusStateIsNotSynced:i.bool}),filterDebounceMs:i.number,filterMode:i.oneOf(["client","server"]),filterModel:i.shape({items:i.arrayOf(i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any})).isRequired,logicOperator:i.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:i.bool,quickFilterLogicOperator:i.oneOf(["and","or"]),quickFilterValues:i.array}),getCellClassName:i.func,getDetailPanelContent:i.func,getEstimatedRowHeight:i.func,getRowClassName:i.func,getRowHeight:i.func,getRowId:i.func,getRowSpacing:i.func,hideFooter:i.bool,hideFooterPagination:i.bool,hideFooterSelectedRowCount:i.bool,ignoreDiacritics:i.bool,ignoreValueFormatterDuringExport:i.oneOfType([i.shape({clipboardExport:i.bool,csvExport:i.bool}),i.bool]),initialState:i.object,isCellEditable:i.func,isRowSelectable:i.func,keepNonExistentRowsSelected:i.bool,label:i.string,loading:i.bool,localeText:i.object,logger:i.shape({debug:i.func.isRequired,error:i.func.isRequired,info:i.func.isRequired,warn:i.func.isRequired}),logLevel:i.oneOf(["debug","error","info","warn",!1]),nonce:i.string,onCellClick:i.func,onCellDoubleClick:i.func,onCellEditStart:i.func,onCellEditStop:i.func,onCellKeyDown:i.func,onCellModesModelChange:i.func,onClipboardCopy:i.func,onColumnHeaderClick:i.func,onColumnHeaderContextMenu:i.func,onColumnHeaderDoubleClick:i.func,onColumnHeaderEnter:i.func,onColumnHeaderLeave:i.func,onColumnHeaderOut:i.func,onColumnHeaderOver:i.func,onColumnOrderChange:i.func,onColumnResize:i.func,onColumnVisibilityModelChange:i.func,onColumnWidthChange:i.func,onDataSourceError:i.func,onDensityChange:i.func,onFilterModelChange:i.func,onMenuClose:i.func,onMenuOpen:i.func,onPaginationMetaChange:i.func,onPaginationModelChange:i.func,onPreferencePanelClose:i.func,onPreferencePanelOpen:i.func,onProcessRowUpdateError:i.func,onResize:i.func,onRowClick:i.func,onRowCountChange:i.func,onRowDoubleClick:i.func,onRowEditStart:i.func,onRowEditStop:i.func,onRowModesModelChange:i.func,onRowSelectionModelChange:i.func,onSortModelChange:i.func,onStateChange:i.func,pageSizeOptions:i.arrayOf(i.oneOfType([i.number,i.shape({label:i.string.isRequired,value:i.number.isRequired})]).isRequired),pagination:i.oneOf([!0]),paginationMeta:i.shape({hasNextPage:i.bool}),paginationMode:i.oneOf(["client","server"]),paginationModel:i.shape({page:i.number.isRequired,pageSize:i.number.isRequired}),processRowUpdate:i.func,resizeThrottleMs:i.number,rowBufferPx:i.number,rowCount:i.number,rowHeight:i.number,rowModesModel:i.object,rows:i.arrayOf(i.object),rowSelection:i.bool,rowSelectionModel:i.shape({ids:i.instanceOf(Set).isRequired,type:i.oneOf(["exclude","include"]).isRequired}),rowSpacingType:i.oneOf(["border","margin"]),rowSpanning:i.bool,scrollbarSize:i.number,showCellVerticalBorder:i.bool,showColumnVerticalBorder:i.bool,showToolbar:i.bool,slotProps:i.object,slots:i.object,sortingMode:i.oneOf(["client","server"]),sortingOrder:i.arrayOf(i.oneOf(["asc","desc"])),sortModel:i.arrayOf(i.shape({field:i.string.isRequired,sort:i.oneOf(["asc","desc"])})),style:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),virtualizeColumnsWithAutoRowHeight:i.bool}},7319:(e,t,o)=>{o.d(t,{D:()=>d});var n=o(5817),r=o(5043),l=o(5173),i=o(9062),a=o(3949),s=o(579);const c=(0,i.H)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.absolute&&t.absolute,t[o.variant],o.light&&t.light,"vertical"===o.orientation&&t.vertical,o.flexItem&&t.flexItem,o.children&&t.withChildren,o.children&&"vertical"===o.orientation&&t.withChildrenVertical,"right"===o.textAlign&&"vertical"!==o.orientation&&t.textAlignRight,"left"===o.textAlign&&"vertical"!==o.orientation&&t.textAlignLeft]}})((0,i.J)((e=>{let{theme:t}=e;return{margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:(0,i.K)(t.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:t.spacing(2),marginRight:t.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:t.spacing(1),marginBottom:t.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:e=>{let{ownerState:t}=e;return!!t.children},style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:e=>{let{ownerState:t}=e;return t.children&&"vertical"!==t.orientation},style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}},{props:e=>{let{ownerState:t}=e;return"vertical"===t.orientation&&t.children},style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}},{props:e=>{let{ownerState:t}=e;return"right"===t.textAlign&&"vertical"!==t.orientation},style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:e=>{let{ownerState:t}=e;return"left"===t.textAlign&&"vertical"!==t.orientation},style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}}))),u=(0,i.H)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.wrapper,"vertical"===o.orientation&&t.wrapperVertical]}})((0,i.J)((e=>{let{theme:t}=e;return{display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`}}]}}))),d=r.forwardRef((function(e,t){const o=(0,i.G)({props:e,name:"MuiDivider"}
127),{absolute:r=!1,children:l,className:d,orientation:p="horizontal",component:f=(l||"vertical"===p?"div":"hr"),flexItem:g=!1,light:m=!1,role:h=("hr"!==f?"separator":void 0),textAlign:b="center",variant:v="fullWidth",...w}=o,C={...o,absolute:r,component:f,flexItem:g,light:m,orientation:p,role:h,textAlign:b,variant:v},y=(e=>{const{absolute:t,children:o,classes:n,flexItem:r,light:l,orientation:s,textAlign:c,variant:u}=e;return(0,i.I)({root:["root",t&&"absolute",u,l&&"light","vertical"===s&&"vertical",r&&"flexItem",o&&"withChildren",o&&"vertical"===s&&"withChildrenVertical","right"===c&&"vertical"!==s&&"textAlignRight","left"===c&&"vertical"!==s&&"textAlignLeft"],wrapper:["wrapper","vertical"===s&&"wrapperVertical"]},a.g,n)})(C);return(0,s.jsx)(c,{as:f,className:(0,n.c)(y.root,d),role:h,ref:t,ownerState:C,"aria-orientation":"separator"!==h||"hr"===f&&"vertical"!==p?void 0:p,...w,children:l?(0,s.jsx)(u,{className:y.wrapper,ownerState:C,children:l}):null})}));d&&(d.muiSkipListHighlight=!0),"production"!==n.p.env.NODE_ENV&&(d.propTypes={absolute:l.bool,children:l.node,classes:l.object,className:l.string,component:l.elementType,flexItem:l.bool,light:l.bool,orientation:l.oneOf(["horizontal","vertical"]),role:l.string,sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),textAlign:l.oneOf(["center","left","right"]),variant:l.oneOfType([l.oneOf(["fullWidth","inset","middle"]),l.string])})},9501:(e,t,o)=>{o.d(t,{T:()=>s,a:()=>c,b:()=>f});var n=o(5817),r=o(5043),l=o(5173),i=o(9062),a=o(579);const s=r.createContext();"production"!==n.p.env.NODE_ENV&&(s.displayName="TableContext");const c=r.createContext();function u(e){return(0,i.A)("MuiTableCell",e)}"production"!==n.p.env.NODE_ENV&&(c.displayName="Tablelvl2Context");const d=(0,i.z)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),p=(0,i.H)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t[`size${(0,i.aC)(o.size)}`],"normal"!==o.padding&&t[`padding${(0,i.aC)(o.padding)}`],"inherit"!==o.align&&t[`align${(0,i.aC)(o.align)}`],o.stickyHeader&&t.stickyHeader]}})((0,i.J)((e=>{let{theme:t}=e;return{...t.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid\n ${"light"===t.palette.mode?(0,i.be)((0,i.K)(t.palette.divider,1),.88):(0,i.bf)((0,i.K)(t.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(t.vars||t).palette.text.primary}},{props:{variant:"footer"},style:{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${d.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:e=>{let{ownerState:t}=e;return t.stickyHeader},style:{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default}}]}}))),f=r.forwardRef((function(e,t){const o=(0,i.G)({props:e,name:"MuiTableCell"}),{align:l="inherit",className:d,component:f,padding:g,scope:m,size:h,sortDirection:b,variant:v,...w}=o,C=r.useContext(s),y=r.useContext(c),x=y&&"head"===y.variant;let R;R=f||(x?"th":"td");let S=m;"td"===R?S=void 0:!S&&x&&(S="col");const I=v||y&&y.variant,M={...o,align:l,component:R,padding:g||(C&&C.padding?C.padding:"normal"),size:h||(C&&C.size?C.size:"medium"),sortDirection:b,stickyHeader:"head"===I&&C&&C.stickyHeader,variant:I},P=(e=>{const{classes:t,variant:o,align:n,padding:r,size:l,stickyHeader:a}=e,s={root:["root",o,a&&"stickyHeader","inherit"!==n&&`align${(0,i.aC)(n)}`,"normal"!==r&&`padding${(0,i.aC)(r)}`,`size${(0,i.aC)(l)}`]};return(0,i.I)(s,u,t)})(M);let k=null;return b&&(k="asc"===b?"ascending":"descending"),(0,a.jsx)(p,{as:R,ref:t,className:(0,n.c)(P.root,d),"aria-sort":k,scope:S,ownerState:M,...w})}));"production"!==n.p.env.NODE_ENV&&(f.propTypes={align:l.oneOf(["center","inherit","justify","left","right"]),children:l.node,classes:l.object,className:l.string,component:l.elementType,padding:l.oneOf(["checkbox","none","normal"]),scope:l.string,size:l.oneOfType([l.oneOf(["medium","small"]),l.string]),sortDirection:l.oneOf(["asc","desc",!1]),sx:l.oneOfType([l.arrayOf(l.oneOfType([l.func,l.object,l.bool])),l.func,l.object]),variant:l.oneOfType([l.oneOf(["body","footer","head"]),l.string])})},3596:(e,t,o)=>{o.d(t,{g:()=>l,s:()=>r});var n=o(9062);const r=(0,n.aE)();function l(e){const{theme:t,name:o,props:r}=e;return t&&t.components&&t.components[o]&&t.components[o].defaultProps?(0,n.aF)(t.components[o].defaultProps,r):r}}}]); 128//# sourceMappingURL=1147.13aca04e.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.