1"use strict";(self.webpackChunkzoning=self.webpackChunkzoning||[]).push([[276],{1364:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",o=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),o&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),o&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,o,n,l){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(i[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&i[u[0]]||(void 0!==l&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=l),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),t.push(u))}},t}},2155:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var o="";r.supports&&(o+="@supports (".concat(r.supports,") {")),r.media&&(o+="@media ".concat(r.media," {"));var n=void 0!==r.layer;n&&(o+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),o+=r.css,n&&(o+="}"),r.media&&(o+="}"),r.supports&&(o+="}");var l=r.sourceMap;l&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2276:(e,t,r)=>{r.d(t,{DataGrid:()=>Mm});var o=r(6186),n=r.n(o),l=r(2155),i=r.n(l),a=r(7433),s=r.n(a),c=r(8626),u=r.n(c),d=r(8990),p=r.n(d),f=r(9827),g=r.n(f),h=r(2542),m={};m.styleTagTransform=g(),m.setAttributes=u(),m.insert=s().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=p(),n()(h.A,m),h.A&&h.A.locals&&h.A.locals;var b=r(4180),w=r(7810),C=r(5826);const v=parseInt(w.version,10),y=e=>{if(v>=19){const t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return w.forwardRef(e)};var x=r(6887),S=r(4164),A=r(3058),R=r(3514),M=r(1870);const I=Object.is;function P(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let r=0,o=0;for(const o in e){if(r+=1,!I(e[o],t[o]))return!1;if(!(o in t))return!1}for(const e in t)o+=1;return r===o}function k(e){return w.memo(e,P)}var E=r(6551),F=r(3200),D=r(3152);function T(e){return(0,F.Ay)("MuiDataGrid",e)}const H=(0,D.A)("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--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","filterForm
1ColumnInput","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--beingDragged","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowReorderIcon","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea--up","scrollArea--down","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--pinnedRight","scrollShadow","scrollShadow--vertical","scrollShadow--horizontal","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","groupingCriteriaCellLoadingContainer","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"]),O={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=O.values;return`@media (min-width:${"number"==typeof t[e]?t[e]:e}px)`}},$={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"}},z=function e(t){if("string"==typeof t)return`var(${t})`;const r={};for(const o in t)Object.hasOwn(t,o)&&(r[o]=e(t[o]));return r}($),L=(0,b.A)({breakpoints:O,spacing:function(e,t,r,o){return void 0===e?j(1):void 0===t?j(e):void 0===r?j(e)+" "+j(t):void 0===o?j(e)+" "+j(t)+" "+j(r):j(e)+" "+j(t)+" "+j(r)+" "+j(o)},transition:function(e,t){const{duration:r=L.transitions.duration.base,easing:o=L.transitions.easing.easeInOut,delay:n=0}=t??{};return e.map(e=>`${e} ${r} ${o} ${n}ms`).join(", ")},keys:$},z);function j(e){return 0===e?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}new Set;var N=r(422),V=r(4570);const B=Object.is,G=P,W=(e,t)=>e===t||e.length===t.length&&e.every((e,r)=>e===t[r]),U=()=>
1({state:null,equals:null,selector:null,args:void 0}),K=[],q=()=>null;function _(e,t,r=void 0,o=B){e.current.state;const n=(0,V.A)(U),l=null!==n.current.selector,[i,a]=w.useState(l?null:t(e,r));n.current.state=i,n.current.equals=o,n.current.selector=t;const s=n.current.args;if(n.current.args=r,l&&!((e,t)=>{let r=Object.is;return t instanceof Array?r=W:t instanceof Object&&(r=G),r(e,t)})(s,r)){const t=n.current.selector(e,n.current.args);n.current.equals(n.current.state,t)||(n.current.state=t,a(t))}const c=w.useCallback(()=>(n.current.subscription||(n.current.subscription=e.current.store.subscribe(()=>{const t=n.current.selector(e,n.current.args);n.current.equals(n.current.state,t)||(n.current.state=t,a(t))})),null),K),u=w.useCallback(()=>(n.current.subscription||c(),()=>{n.current.subscription&&(n.current.subscription(),n.current.subscription=void 0)}),K);return(0,N.useSyncExternalStore)(u,c,q),i}const X=w.createContext(void 0);function Y(){const e=w.useContext(X);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}const Q={width:3,rx:1.5,x:10.5},Z=e=>e.current.state.dimensions.isReady?e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||0===e.current.state.dimensions.scrollbarSize):0===e.current.state.dimensions.scrollbarSize,J=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${H.autoHeight}`]:t.autoHeight},{[`&.${H.autosizing}`]:t.autosizing},{[`&.${H["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${H["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${H["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${H["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${H["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${H.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${H.actionsCell}`]:t.actionsCell},{[`& .${H.booleanCell}`]:t.booleanCell},{[`& .${H.cell}`]:t.cell},{[`& .${H["cell--editable"]}`]:t["cell--editable"]},{[`& .${H["cell--editing"]}`]:t["cell--editing"]},{[`& .${H["cell--flex"]}`]:t["cell--flex"]},{[`& .${H["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${H["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${H["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${H["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${H["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${H["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${H["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${H["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${H["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${H["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${H["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${H["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${H.cellCheckbox}`]:t.cellCheckbox},{[`& .${H.cellEmpty}`]:t.cellEmpty},{[`& .${H.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${H.cellSkeleton}`]:t.cellSkeleton},{[`& .${H.checkboxInput}`]:t.checkboxInput},{[`& .${H.columnHeader}`]:t.columnHeader},{[`& .${H["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${H["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${H["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${H["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${H["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${H["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${H["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${H["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${H["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${H["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${H["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${H["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${H["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${H["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${H["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${H["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${H["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${H.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${H.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${H.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${H.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${H.columnSeparator}`]:t.columnSeparator},{[`& .${H["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${H["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${H["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${H["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${H["container--bottom"]}`]:t["container--bottom"]},{[`& .${H["container--top"]}`]:t["container--top"]},{[`& .${H.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${H["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${H.editBooleanCell}`]:t.editBooleanCell},{[`& .${H.filterIcon}`]:t.filterIcon},{[`& .${H["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${H["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${H["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${H.groupingCriteriaCell}`]:t.groupingCriteriaCell}
1,{[`& .${H.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${H.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${H.headerFilterRow}`]:t.headerFilterRow},{[`& .${H.iconSeparator}`]:t.iconSeparator},{[`& .${H.menuIcon}`]:t.menuIcon},{[`& .${H.menuIconButton}`]:t.menuIconButton},{[`& .${H.menuList}`]:t.menuList},{[`& .${H.menuOpen}`]:t.menuOpen},{[`& .${H.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${H.pinnedRows}`]:t.pinnedRows},{[`& .${H["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${H["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${H.row}`]:t.row},{[`& .${H["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${H["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${H["row--dragging"]}`]:t["row--dragging"]},{[`& .${H["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${H["row--editable"]}`]:t["row--editable"]},{[`& .${H["row--editing"]}`]:t["row--editing"]},{[`& .${H["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${H["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${H.rowReorderCell}`]:t.rowReorderCell},{[`& .${H["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${H.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${H.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${H.rowSkeleton}`]:t.rowSkeleton},{[`& .${H.scrollbar}`]:t.scrollbar},{[`& .${H["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${H["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${H.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${H["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${H.sortIcon}`]:t.sortIcon},{[`& .${H.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${H.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${H.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${H.withBorderColor}`]:t.withBorderColor},{[`& .${H["row--beingDragged"]}`]:t["row--beingDragged"]}]})(()=>{const e=_(Y(),Z),t=L.colors.background.base,r=L.header.background.base,o=L.cell.background.pinned,n=ee(L.colors.interactive.hover,1),l=L.colors.interactive.hoverOpacity,i=L.colors.interactive.selected,a=L.colors.interactive.selectedOpacity,s=i,c=`calc(${a} + ${l})`,u=te(t,n,l),d=te(t,i,a),p=te(t,s,c),f=te(o,n,l),g=te(o,i,a),h=te(o,s,c),m=e=>({[`& .${H["cell--pinnedLeft"]}, & .${H["cell--pinnedRight"]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:te(e,d,a),"&:hover":{backgroundColor:te(e,p,c)}}}}),b=m(f),w=m(g),C=m(h),v={backgroundColor:d,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:d}}};return{"--unstable_DataGrid-radius":L.radius.base,"--unstable_DataGrid-headWeight":L.typography.fontWeight.medium,"--DataGrid-rowBorderColor":L.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:L.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:L.colors.background.base,color:L.colors.foreground.base,font:L.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${H.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)"},[`&.${H.autoHeight}`]:{height:"auto"},[`&.${H.autosizing}`]:{[`& .${H.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${H.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${H.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${H.groupingCriteriaCell}`]:{width:"unset"},[`& .${H.treeDataGroupingCell}`]:{width:"unset"}},[`&.${H.withSidePanel}`]:{flexDirection:"row"},[`& .${H.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${H.columnHeader}, & .${H.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${H.columnHeader}:focus-within, & .${H.cell}:focus-within`]:{outline:`solid ${ee(L.colors.interactive.focus,.5)} 1px`,outlineOffset:-1},[`& .${H.columnHeader}:focus, & .${H.cell}:focus`]:{outline:`solid ${L.colors.interactive.focus} 1px`,outlineOffset:-1},[`& .${H.columnHeader}:focus,\n & .${H["columnHeader--withLeftBorder"]}
1,\n & .${H["columnHeader--withRightBorder"]},\n & .${H["columnHeader--siblingFocused"]}\n `]:{[`& .${H.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${H["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${H["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${H["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${H["root--noToolbar"]} [aria-rowindex="1"] .${H["columnHeader--last"]}`]:{borderTopRightRadius:e?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${H.columnHeaderCheckbox}, & .${H.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${H.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:r},[`& .${H.columnHeader} .${H.sortButton}`]:{backgroundColor:L.header.background.base},[`& .${H["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${H["virtualScroller--hasScrollX"]} .${H["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${H["pivotPanelField--sorted"]} .${H.iconButtonContainer},\n & .${H["columnHeader--sorted"]} .${H.iconButtonContainer},\n & .${H["columnHeader--filtered"]} .${H.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${H.pivotPanelField}:not(.${H["pivotPanelField--sorted"]}) .${H.sortButton},\n & .${H.columnHeader}:not(.${H["columnHeader--sorted"]}) .${H.sortButton}`]:{opacity:0,transition:L.transition(["opacity"],{duration:L.transitions.duration.short})},[`& .${H.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:L.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${H.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${H["columnHeader--filledGroup"]} .${H.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${H.sortIcon}, & .${H.filterIcon}`]:{fontSize:"inherit"},[`& .${H["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${H["columnHeader--alignCenter"]} .${H.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${H["columnHeader--alignRight"]} .${H.columnHeaderDraggableContainer}, & .${H["columnHeader--alignRight"]} .${H.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${H["columnHeader--alignCenter"]} .${H.menuIcon}`]:{marginLeft:"auto"},[`& .${H["columnHeader--alignRight"]} .${H.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${H["columnHeader--moving"]}`]:{backgroundColor:u},[`& .${H["columnHeader--pinnedLeft"]}, & .${H["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:L.header.background.base},[`& .${H.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:10,color:L.colors.border.base},[`& .${H.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:r},"@media (hover: hover)":{[`& .${H.columnHeader}:hover`]:{[`& .${H.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${H.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${H.columnHeader}:not(.${H["columnHeader--sorted"]}):hover .${H.sortButton},\n & .${H.pivotPanelField}:not(.${H["pivotPanelField--sorted"]}):hover .${H.sortButton},\n & .${H.pivotPanelField}:not(.${H["pivotPanelField--sorted"]}) .${H.sortButton}:focus-visible`]:{opacity:1},[`& .${H.columnHeader}:not(.${H["columnHeader--sorted"]}):hover .${H.sortButton} > *,\n & .${H.pivotPanelField}:not(.${H["pivotPanelField--sorted"]}):hover .${H.sortButton} > *,\n & .${H.pivotPanelField}:not(.${H["pivotPanelField--sorted"]}) .${H.sortButton}:focus-visible > *`]:{opacity:.78},[`& .${H.pivotPanelFieldActionContainer} button:hover`]:{backgroundColor:L.colors.background.base}},"@media (hover: none)":{[`& .${H.columnHeader} .${H.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${H.columnHeader}:focus,\n & .${H["columnHeader--siblingFocused"]}`]:{[`.${H["columnSeparator--resizable"]}`]:{color:L.colors.foreground.accent}},[`& .${H.pivotPanelField}:not(.${H["pivotPanelField--sorted"]}) .${H.sortButton}`]:{opacity:.78}},[`& .${H["columnHeader--withLeftBorder"]} .${H["columnSeparator--sideLeft"]}:not(.${H["columnSeparator--resizable"]}), & .${H["columnHeader--withRightBorder"]} .${H["columnSeparator--sideRight"]}
1:not(.${H["columnSeparator--resizable"]})`]:{display:"none"},[`& .${H["columnSeparator--sideLeft"]}`]:{left:-5},[`& .${H["columnSeparator--sideRight"]}`]:{right:-5},[`& .${H["columnHeader--withRightBorder"]} .${H["columnSeparator--sideLeft"]}`]:{left:-5.5},[`& .${H["columnHeader--withRightBorder"]} .${H["columnSeparator--sideRight"]}`]:{right:-5.5},[`& .${H["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${H["columnSeparator--resizing"]}`]:{color:L.colors.foreground.accent},"@media (hover: none)":{[`& .${H.iconSeparator} rect`]:Q},"@media (hover: hover)":{"&:hover":{color:L.colors.foreground.accent,[`& .${H.iconSeparator} rect`]:Q}},"& svg":{pointerEvents:"none"}},[`& .${H.iconSeparator}`]:{color:"inherit",transition:L.transition(["color","width"],{duration:L.transitions.duration.short})},[`& .${H.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${H.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${H.headerFilterRow}`]:{[`& .${H.columnHeader}, & .${H.scrollbarFiller}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${H["row--borderBottom"]} .${H.columnHeader},\n & .${H["row--borderBottom"]} .${H.filler},\n & .${H["row--borderBottom"]} .${H.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${H["row--borderBottom"]} .${H.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${H.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${H["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:u,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${H.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":v,position:"relative"},[`& .${H.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",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":v},[`& .${H["virtualScrollerContent--overflowed"]} .${H["row--lastVisible"]} .${H.cell}`]:{borderTopColor:"transparent"},[`& .${H.pinnedRows} .${H.row}, .${H.aggregationRowOverlayWrapper} .${H.row}`]:{backgroundColor:o,"&:hover":{backgroundColor:f}},[`& .${H["pinnedRows--top"]} :first-of-type`]:{[`& .${H.cell}, .${H.scrollbarFiller}`]:{borderTop:"none"}},[`&.${H["root--disableUserSelection"]}`]:{userSelect:"none"},[`& .${H["row--dynamicHeight"]} > .${H.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${H.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${H.cell}.${H["cell--selectionMode"]}`]:{cursor:"default"},[`& .${H.cell}.${H["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:L.shadows.base,backgroundColor:L.colors.background.overlay,"&:focus-within":{outline:`1px solid ${L.colors.interactive.focus}`,outlineOffset:-1}},[`& .${H["cell--editing"]}`]:{"& .MuiInputBase-root":{height:"100%"}},[`& .${H["row--editing"]}`]:{boxShadow:L.shadows.base},[`& .${H["row--editing"]} .${H.cell}`]:{boxShadow:"none",backgroundColor:L.colors.background.overlay},[`& .${H.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${H.booleanCell}[data-value="true"]`]:{color:L.colors.foreground.muted},[`& .${H.booleanCell}[data-value="false"]`]:{color:L.colors.foreground.disabled},[`& .${H.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:L.spacing(1)},[`& .${H.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:L.colors.interactive.disabledOpacity},[`& .${H["rowReorderCell--draggable"]}`]:{cursor:"grab",opacity:1},[`& .${H.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${H.withBorderColor}`]:{borderColor:L.colors.border.base},[`& .${H["cell--withLeftBorder"]}, & .${H["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${H["cell--withRightBorder"]}, & .${H["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${H["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${H["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${H["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${H["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${H["cell--pinnedLeft"]}, & .${H["cell--pinnedRight"]}
1`]:{position:"sticky",zIndex:30,background:L.cell.background.pinned,"&.Mui-selected":{backgroundColor:g}},[`& .${H.row}`]:{"&:hover":b,"&.Mui-selected":w,"&.Mui-selected:hover":C},[`& .${H.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${H.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${H.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${H.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${H["columnHeader--dragging"]}`]:{background:L.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:L.colors.interactive.disabledOpacity},[`& .${H["row--dragging"]}`]:{background:L.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",border:"1px solid var(--DataGrid-rowBorderColor)",color:L.colors.foreground.base,transform:"translateZ(0)",[`& .${H.rowReorderCellPlaceholder}`]:{padding:"0 6px",display:"flex"}},[`& .${H.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${H.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:L.spacing(2)},[`& .${H.treeDataGroupingCellLoadingContainer}, .${H.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${H.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${H.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:L.spacing(2)},[`& .${H.columnHeaders} .${H.scrollbarFiller}`]:{backgroundColor:r},[`.${H.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",backgroundColor:r,[`&.${H["scrollbarFiller--pinnedRight"]}`]:{position:"sticky",zIndex:40,right:0}},[`& .${H.filler}`]:{flex:"1 0 auto"},[`& .${H["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${H.columnHeaders} .${H.filler}`]:{backgroundColor:r},[`& .${H["main--hiddenContent"]}`]:{[`& .${H.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${H.pinnedRows}`]:{display:"none"}},[`& .${H["row--beingDragged"]}`]:{color:L.colors.foreground.disabled,"&:hover":{backgroundColor:"transparent"}}}});function ee(e,t){return`rgba(from ${e} r g b / ${t})`}function te(e,t,r){return`color-mix(in srgb,${e}, ${t} calc(${r} * 100%))`}const re=w.createContext(void 0),oe=()=>{const e=w.useContext(re);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},ne=w.createContext(void 0),le=()=>{const e=w.useContext(ne);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};var ie=r(4922);const ae=w.createContext({className:"unset",tag:(0,ie.jsx)("style",{href:"/unset"})});function se(){return w.useContext(ae).className}function ce(e){const t=le(),r=oe(),o=t.hooks.useCSSVariables(),n=w.useMemo(()=>{const e=`MuiDataGridVariables-${o.id}`,t=`.${e}{${function(e){let t="";for(const r in e)Object.hasOwn(e,r)&&void 0!==e[r]&&(t+=`${r}:${e[r]};`);return t}(o.variables)}}`;return{className:e,tag:(0,ie.jsx)("style",{href:`/${e}`,nonce:r.nonce,children:t})}},[r.nonce,o]);return(0,ie.jsx)(ae.Provider,{value:n,children:e.children})}var ue=r(5508);const de=(0,ue.Ad)({memoize:ue.i5,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),pe=(e,t,r,o,n,l,i,a,...s)=>{if(s.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&r&&o&&n&&l&&i&&a)c=(s,c,u,d)=>{const p=e(s,c,u,d),f=t(s,c,u,d),g=r(s,c,u,d),h=o(s,c,u,d),m=n(s,c,u,d),b=l(s,c,u,d),w=i(s,c,u,d);return a(p,f,g,h,m,b,w,c,u,d)};else if(e&&t&&r&&o&&n&&l&&i)c=(a,s,c,u)=>{const d=e(a,s,c,u),p=t(a,s,c,u),f=r(a,s,c,u),g=o(a,s,c,u),h=n(a,s,c,u),m=l(a,s,c,u);return i(d,p,f,g,h,m,s,c,u)};else if(e&&t&&r&&o&&n&&l)c=(i,a,s,c)=>{const u=e(i,a,s,c),d=t(i,a,s,c),p=r(i,a,s,c),f=o(i,a,s,c),g=n(i,a,s,c);return l(u,d,p,f,g,a,s,c)};else if(e&&t&&r&&o&&n)c=(l,i,a,s)=>{const c=e(l,i,a,s),u=t(l,i,a,s),d=r(l,i,a,s),p=o(l,i,a,s);return n(c,u,d,p,i,a,s)};else if(e&&t&&r&&o)c=(n,l,i,a)=>{const s=e(n,l,i,a),c=t(n,l,i,a),u=r(n,l,i,a);return o(s,c,u,l,i,a)};else if(e&&t&&r)c=(o,n,l,i)=>{const a=e(o,n,l,i),s=t(o,n,l,i);return r(a,s,n,l,i)};else if(e&&t)c=(r,o,n,l)=>{const i=e(r,o,n,l);return t(i,o,n,l)};else{if(!e)throw new Error("Missing arguments");c=e}return c},fe=(...e)=>{const t=new WeakMap;let r=1;const o=e[e.length-1],n=e.length-1||1,l=Math.max(o.length-n,0);if(l>3)throw new Error("Unsupported number of arguments");return(n,i,a,s)=>{let c=n.__cacheKey__;
1c||(c={id:r},n.__cacheKey__=c,r+=1);let u=t.get(c);if(!u){const r=1===e.length?[e=>e,o]:e;let n=e;const i=[void 0,void 0,void 0];switch(l){case 0:break;case 1:n=[...r.slice(0,-1),()=>i[0],o];break;case 2:n=[...r.slice(0,-1),()=>i[0],()=>i[1],o];break;case 3:n=[...r.slice(0,-1),()=>i[0],()=>i[1],()=>i[2],o];break;default:throw new Error("Unsupported number of arguments")}u=de(...n),u.selectorArgs=i,t.set(c,u)}switch(l){case 3:u.selectorArgs[2]=s;case 2:u.selectorArgs[1]=a;case 1:u.selectorArgs[0]=i}switch(l){case 0:return u(n);case 1:return u(n,i);case 2:return u(n,i,a);case 3:return u(n,i,a,s);default:throw new Error("unreachable")}}},ge=(...e)=>{const t=pe(...e);return(e,r,o,n)=>t(be(e),r,o,n)},he=(...e)=>{const t=fe(...e);return(e,r,o,n)=>t(be(e),r,o,n)},me=e=>(t,r)=>e(be(t),r);function be(e){return"current"in e?e.current.state:e}const we={compact:.7,comfortable:1.3,standard:1},Ce=me(e=>e.density),ve=ge(Ce,e=>we[e]),ye=()=>()=>{},xe=()=>!1,Se=()=>!0;let Ae=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const Re={left:[],right:[]},Me=me(e=>e.isRtl),Ie=me(e=>e.props.listView??!1),Pe=me(e=>e.listViewColumn),ke=me(e=>e.columns),Ee=ge(ke,e=>e.orderedFields),Fe=ge(ke,e=>e.lookup),De=he(Ee,Fe,(e,t)=>e.map(e=>t[e])),Te=ge(ke,e=>e.columnVisibilityModel),He=ge(ke,e=>e.initialColumnVisibilityModel),Oe=he(De,Te,Ie,Pe,(e,t,r,o)=>r&&o?[o]:e.filter(e=>!1!==t[e.field])),$e=he(Oe,e=>e.map(e=>e.field)),ze=me(e=>e.pinnedColumns),Le=(he(ze,Ee,Me,(e,t,r)=>je(e,t,r)),he(ke,ze,$e,Me,Ie,(e,t,r,o,n)=>{if(n)return Re;const l=je(t,r,o);return{left:l.left.map(t=>e.lookup[t]),right:l.right.map(t=>e.lookup[t])}}));function je(e,t,r){if(!Array.isArray(e.left)&&!Array.isArray(e.right))return Re;if(0===e.left?.length&&0===e.right?.length)return Re;const o=(e,t)=>Array.isArray(e)?e.filter(e=>t.includes(e)):[],n=o(e.left,t),l=t.filter(e=>!n.includes(e)),i=o(e.right,l);return r?{left:i,right:n}:{left:n,right:i}}const Ne=he(Oe,e=>{const t=[];let r=0;for(let o=0;o<e.length;o+=1)t.push(r),r+=e[o].computedWidth;return t}),Ve=he(De,e=>e.filter(e=>e.filterable)),Be=he(De,e=>e.reduce((e,t)=>(t.filterable&&(e[t.field]=t),e),{})),Ge=he(De,e=>e.some(e=>void 0!==e.colSpan)),We=me(e=>e.preferencePanel),Ue=ge(We,(e,t)=>!(!e.open||e.labelId!==t));var Ke=function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e}(Ke||{});const qe=w.createContext(void 0);function _e(){const e=w.useContext(qe);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}const Xe=w.createContext(void 0);function Ye(){const e=w.useContext(Xe);if(void 0===e)throw new Error("MUI X: Missing context.");return e}function Qe({children:e}){const t=w.useRef(null),r=w.useRef(null),o=w.useRef(null),n=w.useMemo(()=>({columnsPanelTriggerRef:t,filterPanelTriggerRef:r,aiAssistantPanelTriggerRef:o}),[]);return(0,ie.jsx)(Xe.Provider,{value:n,children:e})}function Ze(){const e=_e(),t=_(e,De),r=oe(),o=_(e,We),{columnsPanelTriggerRef:n,filterPanelTriggerRef:l,aiAssistantPanelTriggerRef:i}=Ye(),a=e.current.unstable_applyPipeProcessors("preferencePanel",null,o.openedPanelValue??Ke.filters);let s=null;switch(o.openedPanelValue){case Ke.filters:s=l.current;break;case Ke.columns:s=n.current;break;case Ke.aiAssistant:s=i.current}return(0,ie.jsx)(r.slots.panel,(0,b.A)({id:o.panelId,open:t.length>0&&o.open,"aria-labelledby":o.labelId,target:s,onClose:()=>e.current.hidePreferences()},r.slotProps?.panel,{children:a}))}function Je(){const e=oe();return(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(Ze,{}),e.showToolbar&&(0,ie.jsx)(e.slots.toolbar,(0,b.A)({},e.slotProps?.toolbar))]})}var et=r(1452);const tt=me(e=>e.dimensions),rt=ge(tt,e=>e.columnsTotalWidth),ot=ge(tt,e=>e.rowHeight),nt=(ge(tt,e=>e.contentSize.height),ge(tt,e=>e.hasScrollX)),lt=ge(tt,e=>e.hasScrollY),it=ge(tt,e=>e.columnsTotalWidth<e.viewportOuterSize.width),at=ge(tt,e=>e.headerHeight),st=ge(tt,e=>e.groupHeaderHeight),ct=(ge(tt,e=>e.headerFilterHeight),ge(tt,e=>e.hasScrollX?e.scrollbarSize:0)),ut=ge(tt,e=>e.hasScrollY?e.scrollbarSize:0),dt=ge(tt,ct,(e,t)=>{const r=e.viewportOuterSize.height-e.minimumSize.height>0;return!(0===t&&!r)}),pt=me(e=>
1e.rows),ft=ge(pt,e=>e.totalRowCount),gt=ge(pt,e=>e.loading),ht=ge(pt,e=>e.totalTopLevelRowCount),mt=ge(pt,e=>e.dataRowIdToModelLookup),bt=(ge(mt,(e,t)=>e[t]),ge(pt,e=>e.tree)),wt=ge(bt,(e,t)=>e[t]),Ct=ge(pt,e=>e.groupsToFetch),vt=ge(pt,e=>e.groupingName),yt=ge(pt,e=>e.treeDepths),xt=he(pt,e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:(t.filter(([,e])=>e>0).map(([e])=>Number(e)).sort((e,t)=>t-e)[0]??0)+1}),St=ge(pt,e=>e.dataRowIds),At=he(St,mt,(e,t)=>e.reduce((e,r)=>t[r]?(e.push(t[r]),e):e,[])),Rt=he(ge(pt,e=>e?.additionalRowGroups),e=>{const t=e?.pinnedRows;return{bottom:t?.bottom?.map(e=>({id:e.id,model:e.model??{}}))??[],top:t?.top?.map(e=>({id:e.id,model:e.model??{}}))??[]}}),Mt=ge(Rt,e=>(e?.top?.length||0)+(e?.bottom?.length||0));var It=r(1026);class Pt{timeouts=(()=>new Map)();cleanupTimeout=1e3;constructor(e=1e3){this.cleanupTimeout=e}register(e,t,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{"function"==typeof t&&t(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}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 kt{registry=(()=>new FinalizationRegistry(e=>{"function"==typeof e&&e()}))();register(e,t,r){this.registry.register(e,t,r)}unregister(e){this.registry.unregister(e)}reset(){}}class Et{static create(){return new Et}}const Ft={current:"undefined"!=typeof FinalizationRegistry?new kt:new Pt};let Dt=0;function Tt(e,t,r,o){const n=w.useState(Et.create)[0],l=w.useRef(null),i=w.useRef(null);i.current=r;const a=w.useRef(null);if(!l.current&&i.current){const r=(e,t,r)=>{t&&!t.defaultMuiPrevented&&i.current?.(e,t,r)};l.current=e.current.subscribeEvent(t,r,o),Dt+=1,a.current={cleanupToken:Dt},Ft.current.register(n,()=>{l.current?.(),l.current=null,a.current=null},a.current)}else!i.current&&l.current&&(l.current(),l.current=null,a.current&&(Ft.current.unregister(a.current),a.current=null));w.useEffect(()=>{if(!l.current&&i.current){const r=(e,t,r)=>{t&&!t.defaultMuiPrevented&&i.current?.(e,t,r)};l.current=e.current.subscribeEvent(t,r,o)}return a.current&&Ft.current&&(Ft.current.unregister(a.current),a.current=null),()=>{l.current?.(),l.current=null}},[e,t,o])}const Ht={isFirst:!0};function Ot(e,t,r){Tt(e,t,r,Ht)}var $t=r(4250),zt=r(594),Lt=r(6820);function jt(e){throw new Error("Failed assertion: should not be rendered")}const Nt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],Vt=(0,E.Ay)(jt,{name:"MuiDataGrid",slot:"EditInputCell"})({font:L.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),Bt=y((e,t)=>{const r=oe(),{id:o,value:n,field:l,colDef:i,hasFocus:a,debounceMs:s=200,isProcessingProps:c,onValueChange:u,slotProps:d}=e,p=(0,x.A)(e,Nt),f=_e(),g=w.useRef(null),[h,m]=w.useState(n),C=(e=>{const{classes:t}=e;return(0,M.A)({root:["editInputCell"]},T,t)})(r),v=w.useCallback(async e=>{const t=e.target.value,r=f.current.getColumn(l);let n=t;r.valueParser&&(n=r.valueParser(t,f.current.getRow(o),r,f)),m(n),f.current.setEditCellValue({id:o,field:l,value:n,debounceMs:s,unstable_skipValueParser:!0},e),u&&await u(e,t)},[f,s,l,o,u]),y=f.current.unstable_getEditCellMeta(o,l);return w.useEffect(()=>{"debouncedSetEditCellValue"!==y?.changeReason&&m(n)},[y,n]),(0,Lt.A)(()=>{a&&g.current.focus()},[a]),(0,ie.jsx)(Vt,(0,b.A)({as:r.slots.baseInput,inputRef:g,className:C.root,ownerState:r,fullWidth:!0,type:"number"===i.type?i.type:"text",value:h??"",onChange:v,endAdornment:c?(0,ie.jsx)(r.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},p,d?.root,{ref:t}))}),Gt=(e,t)=>t&&e.length>1?[e[0]]:e,Wt=(e,t)=>r=>(0,b.A)({},r,{sorting:(0,b.A)({},r.sorting,{sortModel:Gt(e,t)})}),Ut=(e,t)=>{const r=e.indexOf(t);return t&&-1!==r&&r+1!==e.length?e[r+1]:e[0]},Kt=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,qt=new Intl.Collator,_t=(e,t)=>{const r=Kt(e,t);return null!==r?r:Number(e)-Number(t)},Xt=(e,t)=>
1{const r=Kt(e,t);return null!==r?r:e>t?1:e<t?-1:0};var Yt=r(5648);const Qt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function Zt(e){const{item:t,applyValue:r,type:o,apiRef:n,focusElementRef:l,tabIndex:i,disabled:a,slotProps:s,clearButton:c,headerFilterMenu:u}=e,d=(0,x.A)(e,Qt),p=s?.root,f=(0,$t.A)(),[g,h]=w.useState(Jt(t.value)),[m,C]=w.useState(!1),v=(0,Yt.A)(),y=oe(),S=w.useCallback(e=>{const n=Jt(e.target.value);h(n),C(!0),f.start(y.filterDebounceMs,()=>{const e=(0,b.A)({},t,{value:"number"!==o||Number.isNaN(Number(n))?n:Number(n),fromInput:v});r(e),C(!1)})},[f,y.filterDebounceMs,t,o,v,r]);return w.useEffect(()=>{t.fromInput===v&&null!=t.value||h(Jt(t.value))},[v,t]),(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(y.slots.baseTextField,(0,b.A)({id:v,label:n.current.getLocaleText("filterPanelInputLabel"),placeholder:n.current.getLocaleText("filterPanelInputPlaceholder"),value:g??"",onChange:S,type:o||"text",disabled:a,slotProps:(0,b.A)({},p?.slotProps,{input:(0,b.A)({endAdornment:m?(0,ie.jsx)(y.slots.loadIcon,{fontSize:"small",color:"action"}):null},p?.slotProps?.input),htmlInput:(0,b.A)({tabIndex:i},p?.slotProps?.htmlInput)}),inputRef:l},y.slotProps?.baseTextField,d,p)),u,c]})}function Jt(e){if(null!=e&&""!==e)return String(e)}function er(e){return"object"==typeof e&&null!==e}function tr(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const rr=(e,t,r)=>
1Math.max(t,Math.min(r,e));function or(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}const nr=(e,t)=>r=>{e&&t(r)};function lr(e){const{item:t,applyValue:r,type:o,apiRef:n,focusElementRef:l,slotProps:i}=e,a=(0,Yt.A)(),[s,c]=w.useState([]),[u,d]=w.useState(t.value||[]),p=oe();w.useEffect(()=>{const e=t.value??[];d(e.map(String))},[t.value]);const f=w.useCallback((e,n)=>{d(n.map(String)),r((0,b.A)({},t,{value:[...n.map(e=>"number"===o?Number(e):e)]}))},[r,t,o]),g=w.useCallback((e,t)=>{c(""===t?[]:[t])},[c]),h=p.slots.baseAutocomplete;return(0,ie.jsx)(h,(0,b.A)({multiple:!0,freeSolo:!0,options:s,id:a,value:u,onChange:f,onInputChange:g,label:n.current.getLocaleText("filterPanelInputLabel"),placeholder:n.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:o||"text",inputRef:l}}},i?.root))}var ir=function(e){return e.And="and",e.Or="or",e}(ir||{});const ar={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},sr=()=>({items:[],logicOperator:ir.And,quickFilterValues:[],quickFilterLogicOperator:ir.And});function cr(e){return{current:e.current.getPublicApi()}}let ur;const dr=(e,t)=>{const r=(0,b.A)({},e);if(null==r.id&&(r.id=Math.round(1e5*Math.random())),null==r.operator){const e=Fe(t)[r.field];r.operator=e&&e.filterOperators[0].value}return r},pr=(e,t,r)=>{const o=e.items.length>1;let n;n=o&&t?[e.items[0]]:e.items;const l=o&&n.some(e=>null==e.id);return n.some(e=>null==e.operator)||l?(0,b.A)({},e,{items:n.map(e=>dr(e,r))}):e.items!==n?(0,b.A)({},e,{items:n}):e},fr=(e,t,r)=>o=>(0,b.A)({},o,{filterModel:pr(e,t,r)}),gr=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,hr=(e,t,r)=>{if(!e.field||!e.operator)return null;const o=r.current.getColumn(e.field);if(!o)return null;let n;if(o.valueParser){const t=o.valueParser;n=Array.isArray(e.value)?e.value?.map(e=>t(e,void 0,o,r)):t(e.value,void 0,o,r)}else n=e.value;const{ignoreDiacritics:l}=r.current.rootProps;l&&(n=gr(n));const i=(0,b.A)({},e,{value:n}),a=o.filterOperators;if(!a?.length)throw new Error(`MUI X: No filter operators found for column '${o.field}'.`);const s=a.find(e=>e.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${o.field}' and operator value '${i.operator}'.`);const c=cr(r),u=s.getApplyFilterFn(i,o);return"function"!=typeof u?null:{item:i,fn:e=>{let r=t(e,o);return l&&(r=gr(r)),u(r,e,o,c)}}};let mr=1;const br=e=>e.quickFilterExcludeHiddenColumns??!0,wr=(e,t,r,o)=>{const n=((e,t,r,o)=>{const{items:n}=e,l=n.map(e=>hr(e,t,r)).filter(e=>!!e);if(0===l.length)return null;if(o||!function(){if(void 0!==ur)return ur;try{ur=new Function("return true")()}catch(e){ur=!1}return ur}())return(e,t)=>{const r={};for(let o=0;o<l.length;o+=1){const n=l[o];t&&!t(n.item.field)||(r[n.item.id]=n.fn(e))}return r};const i=new Function("appliers","row","shouldApplyFilter",`"use strict";\n${l.map((e,t)=>`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`).join("\n")}\n\nconst result$$ = {\n${l.map((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(mr)));return mr+=1,(e,t)=>i(l,e,t)})(e,t,r,o),l=((e,t,r)=>{const o=e.quickFilterValues?.filter(Boolean)??[];if(0===o.length)return null;const n=Ee(r),l=Te(r);let i;i=br(e)?n.filter(e=>!1!==l[e]):n;const a=[],{ignoreDiacritics:s}=r.current.rootProps,c=cr(r);return i.forEach(e=>{const t=r.current.getColumn(e),n=t?.getApplyQuickFilterFn;n&&a.push({column:t,appliers:o.map(e=>{const r=s?gr(e):e;return{fn:n(r,t,c)}})})}),function(e,r){const n={};e:for(let l=0;l<o.length;l+=1){const i=o[l];for(let o=0;o<a.length;o+=1){const{column:u,appliers:d}=a[o],{field:p}=u;if(r&&!r(p))continue;const f=d[l];let g=t(e,u);if(null!==f.fn&&(s&&(g=gr(g)),f.fn(g,e,u,c))){n[i]=!0;continue e}}n[i]=!1}return n}})(e,t,r);return function(e,t,r){r.passingFilterItems=n?.(e,t)??null,r.passingQuickFilterValues=l?.(e,t)??null}},Cr=e=>null!=e,vr=(e,t,r,o,n,l)=>{const i=((e,t,r,o)=>(e.cleanedFilterItems||(e.cleanedFilterItems=o.filter(e=>null!==hr(e,t,r))),e.cleanedFilterItems))(l,o,n,r.items),a=e.filter(Cr),s=t.filter(Cr);if(a.length>0){const e=e=>a.some(t=>t[e.id]);if((r.logicOperator??sr().logicOperator)===ir.And){if(!i.every(e))return!1}else if(!i.some(e))return!1}if(s.length>0&&null!=r.quickFilterValues){const e=e=>s.some(t=>t[e]);if((r.quickFilterLogicOperator??sr().quickFilterLogicOperator)===ir.And){if(!r.quickFilterValues.every(e))return!1}else if(!r.quickFilterValues.some(e))return!1}return!0},yr=(e,t)=>
1r=>{if(!r.value)return null;const o=e?r.value:r.value.trim(),n=new RegExp(tr(o),"i");return e=>{if(null==e)return t;const r=n.test(String(e));return t?!r:r}},xr=(e,t)=>r=>{if(!r.value)return null;const o=e?r.value:r.value.trim(),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>{if(null==e)return t;const r=0===n.compare(o,e.toString());return t?!r:r}},Sr=e=>()=>t=>{const r=""===t||null==t;return e?!r:r},Ar={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,chartable:!0,editable:!1,sortComparator:(e,t)=>{const r=Kt(e,t);return null!==r?r:"string"==typeof e?qt.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:yr(e,!1),InputComponent:Zt},{value:"doesNotContain",getApplyFilterFn:yr(e,!0),InputComponent:Zt},{value:"equals",getApplyFilterFn:xr(e,!1),InputComponent:Zt},{value:"doesNotEqual",getApplyFilterFn:xr(e,!0),InputComponent:Zt},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),o=new RegExp(`^${tr(r)}.*$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Zt},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),o=new RegExp(`.*${tr(r)}$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Zt},{value:"isEmpty",getApplyFilterFn:Sr(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:Sr(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const r=e?t.value:t.value.map(e=>e.trim()),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&r.some(t=>0===o.compare(t,e.toString()||""))},InputComponent:lr}])(),renderEditCell:e=>(0,ie.jsx)(Bt,(0,b.A)({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(tr(e),"i");return(e,r,o,n)=>{let l=n.current.getRowFormattedValue(r,o);return n.current.ignoreDiacritics&&(l=gr(l)),null!=l&&t.test(l.toString())}}},Rr=e=>null==e?null:Number(e),Mr=(0,b.A)({},Ar,{type:"number",align:"right",headerAlign:"right",sortComparator:_t,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)?e.toLocaleString():e||"",filterOperators:[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>Rr(t)===e.value,InputComponent:Zt,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>Rr(t)!==e.value,InputComponent:Zt,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Rr(t)>e.value,InputComponent:Zt,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Rr(t)>=e.value,InputComponent:Zt,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Rr(t)<e.value,InputComponent:Zt,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Rr(t)<=e.value,InputComponent:Zt,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=>
1null!=t&&e.value.includes(Number(t)):null,InputComponent:lr,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:t=>Rr(t)===Rr(e)}),Ir=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function Pr(e,t){if(null==e)return"";const r=new Date(e);return Number.isNaN(r.getTime())?"":"date"===t?r.toISOString().substring(0,10):"datetime-local"===t?(r.setMinutes(r.getMinutes()-r.getTimezoneOffset()),r.toISOString().substring(0,19)):r.toISOString().substring(0,10)}function kr(e){const{item:t,applyValue:r,type:o,apiRef:n,focusElementRef:l,slotProps:i,headerFilterMenu:a,clearButton:s,tabIndex:c,disabled:u}=e,d=(0,x.A)(e,Ir),p=i?.root.slotProps,f=(0,$t.A)(),[g,h]=w.useState(()=>Pr(t.value,o)),[m,C]=w.useState(!1),v=(0,Yt.A)(),y=oe(),S=w.useCallback(e=>{f.clear();const o=e.target.value;h(o),C(!0),f.start(y.filterDebounceMs,()=>{const e=new Date(o);r((0,b.A)({},t,{value:Number.isNaN(e.getTime())?void 0:e})),C(!1)})},[r,t,y.filterDebounceMs,f]);return w.useEffect(()=>{const e=Pr(t.value,o);h(e)},[t.value,o]),(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(y.slots.baseTextField,(0,b.A)({fullWidth:!0,id:v,label:n.current.getLocaleText("filterPanelInputLabel"),placeholder:n.current.getLocaleText("filterPanelInputPlaceholder"),value:g,onChange:S,type:o||"text",disabled:u,inputRef:l,slotProps:(0,b.A)({},p,{input:(0,b.A)({endAdornment:m?(0,ie.jsx)(y.slots.loadIcon,{fontSize:"small",color:"action"}):null},p?.input),htmlInput:(0,b.A)({max:"datetime-local"===o?"9999-12-31T23:59":"9999-12-31",tabIndex:c},p?.htmlInput)})},y.slotProps?.baseTextField,d,i?.root)),a,s]})}function Er(e,t,r,o){if(!e.value)return null;const n=new Date(e.value);r?n.setSeconds(0,0):(n.setMinutes(n.getMinutes()+n.getTimezoneOffset()),n.setHours(0,0,0,0));const l=n.getTime();return e=>{if(!e)return!1;if(o)return t(e.getTime(),l);const n=new Date(e);return r?n.setSeconds(0,0):n.setHours(0,0,0,0),t(n.getTime(),l)}}const Fr=e=>[{value:"is",getApplyFilterFn:t=>Er(t,(e,t)=>e===t,e),InputComponent:kr,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>Er(t,(e,t)=>e!==t,e),InputComponent:kr,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>Er(t,(e,t)=>e>t,e),InputComponent:kr,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>Er(t,(e,t)=>e>=t,e),InputComponent:kr,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>Er(t,(e,t)=>e<t,e,!e),InputComponent:kr,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:t=>Er(t,(e,t)=>e<=t,e),InputComponent:kr,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1}],Dr=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],Tr=(0,E.Ay)(jt)({fontSize:"inherit"});function Hr(e){const{id:t,value:r,field:o,colDef:n,hasFocus:l,onValueChange:i,slotProps:a}=e,s=(0,x.A)(e,Dr),c="dateTime"===n.type,u=_e(),d=w.useRef(null),p=w.useMemo(()=>{let e,t;return e=null==r?null:r instanceof Date?r:new Date((r??"").toString()),t=null==e||Number.isNaN(e.getTime())?"":new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,c?16:10),{parsed:e,formatted:t}},[r,c]),[f,g]=w.useState(p),h=oe(),m=(e=>{const{classes:t}=e;return(0,M.A)({root:["editInputCell"]},T,t)})({classes:h.classes}),C=w.useCallback(e=>{if(""===e)return null;const[t,r]=e.split("T"),[o,n,l]=t.split("-"),i=new Date;if(i.setFullYear(Number(o),Number(n)-1,Number(l)),i.setHours(0,0,0,0),r){const[e,t]=r.split(":");i.setHours(Number(e),Number(t),0,0)}return i},[]),v=w.useCallback(async e=>{const r=e.target.value,n=C(r);i&&await i(e,n),g({parsed:n,formatted:r}),u.current.setEditCellValue({id:t,field:o,value:n},e)},[u,o,t,i,C]);return w.useEffect(()=>{g(e=>p.parsed!==e.parsed&&p.parsed?.getTime()!==e.parsed?.getTime()?p:e)},[p]),(0,Lt.A)(()=>{l&&d.current.focus()},[l]),(0,ie.jsx)(Tr,(0,b.A)({as:h.slots.baseInput,inputRef:d,fullWidth:!0,className:m.root,type:c?"datetime-local":"date",value:f.formatted,onChange:v},s,a?.root,{slotProps:{htmlInput:(0,b.A)({max:c?"9999-12-31T23:59":"9999-12-31"},a?.root?.slotProps?.htmlInput)}}))}const Or=e=>(0,ie.jsx)(Hr,(0,b.A)({},e)),$r="auto-generated-group-node-root",zr=Symbol("mui.id_autogenerated"),Lr=(e,t,r)=>{const o=t?t(e):e.id;return function(e,t,r="A row was provided without id in the rows prop:"){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.",r,JSON.stringify(t)].join("\n"))}(o,e,r),o},jr=(e,t,r)=>{const o=t.field;if(!t||!t.valueGetter)return e[o];const n=e[t.field];return t.valueGetter(n,e,t,r)},Nr=({rows:e,getRowId:t,loading:r,rowCount:o})=>{const n={type:"full",rows:[]},l={};for(let r=0;r<e.length;r+=1){const o=e[r],i=Lr(o,t);l[i]=o,n.rows.push(i)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:o,updates:n,dataRowIdToModelLo
1okup:l}},Vr=({tree:e,rowCountProp:t=0})=>{const r=e[$r];return Math.max(t,r.children.length+(null==r.footerId?0:1))},Br=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:o,previousTreeDepths:n,previousGroupsToFetch:l})=>{const i=e.current.caches.rows,{tree:a,treeDepths:s,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:n,updates:i.updates,dataRowIdToModelLookup:i.dataRowIdToModelLookup,previousGroupsToFetch:l}),p=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:a,treeDepths:s,dataRowIds:c,dataRowIdToModelLookup:i.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,b.A)({},p,{totalRowCount:Math.max(t,p.dataRowIds.length),totalTopLevelRowCount:Vr({tree:p.tree,rowCountProp:t}),groupingName:u,loading:r,groupsToFetch:d})},Gr=e=>zr in e,Wr=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,Ur=(e,t,r,o)=>{const n=e[t];if("group"!==n.type)return[];const l=[];for(let t=0;t<n.children.length;t+=1){const i=n.children[t];if(r&&Wr(e[i])||l.push(i),o)continue;const a=Ur(e,i,r,o);for(let e=0;e<a.length;e+=1)l.push(a[e])}return r||null==n.footerId||l.push(n.footerId),l},Kr=({previousCache:e,getRowId:t,updates:r,groupKeys:o})=>{if("full"===e.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const n=new Map;r.forEach(e=>{const r=Lr(e,t,"A row was provided without id when calling updateRows():");n.has(r)?n.set(r,(0,b.A)({},n.get(r),e)):n.set(r,e)});const l={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:(0,b.A)({},e.updates.idToActionLookup),groupKeys:o},i=(0,b.A)({}
1,e.dataRowIdToModelLookup),a={insert:{},modify:{},remove:{}};n.forEach((e,t)=>{const r=l.idToActionLookup[t];if("delete"===e._action){if("remove"===r||!i[t])return;return null!=r&&(a[r][t]=!0),l.actions.remove.push(t),void delete i[t]}const o=i[t];if(o)return"remove"===r?(a.remove[t]=!0,l.actions.modify.push(t)):null==r&&l.actions.modify.push(t),void(i[t]=(0,b.A)({},o,e));"remove"===r?(a.remove[t]=!0,l.actions.insert.push(t)):null==r&&l.actions.insert.push(t),i[t]=e});const s=Object.keys(a);for(let e=0;e<s.length;e+=1){const t=s[e],r=a[t];Object.keys(r).length>0&&(l.actions[t]=l.actions[t].filter(e=>!r[e]))}return{dataRowIdToModelLookup:i,updates:l,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},qr="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function _r(e,t,r){const o=[];return t.forEach(t=>{const n=Lr(t,r,"A row was provided without id when calling updateRows():"),l=wt(e,n);if("pinnedRow"===l?.type){const r=e.current.caches.pinnedRows,o=r.idLookup[n];o&&(r.idLookup[n]=(0,b.A)({},o,t))}else o.push(t)}),o}const Xr=(e,t,r)=>"number"==typeof e&&e>0?e:t,Yr=(["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),me((e,t)=>zr in t?t[zr]:e.props.getRowId?e.props.getRowId(t):t.id)),Qr=me(e=>e.props.isRowSelectable);function Zr({value:e,columnType:t,rowId:r,field:o}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${o}".`].join("\n"))}const Jr=(0,b.A)({},Ar,{type:"date",sortComparator:Xt,valueFormatter:(e,t,r,o)=>{if(!e)return"";const n=Yr(o,t);return!Gr(t)||e instanceof Date?(Zr({value:e,columnType:"date",rowId:n,field:r.field}),e.toLocaleDateString()):e},filterOperators:Fr(),renderEditCell:Or,pastedValueParser:e=>new Date(e)}),eo=(0,b.A)({},Ar,{type:"dateTime",sortComparator:Xt,valueFormatter:(e,t,r,o)=>{if(!e)return"";const n=Yr(o,t);return!Gr(t)||e instanceof Date?(Zr({value:e,columnType:"dateTime",rowId:n,field:r.field}),e.toLocaleString()):e},filterOperators:Fr(!0),renderEditCell:Or,pastedValueParser:e=>new Date(e)}),to="__row_group_by_columns_group__",ro="__detail_panel_toggle__";let oo=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 no=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"];function lo(e){const{value:t,rowNode:r}=e,o=(0,x.A)(e,no),n=_e(),l=oe(),i=(e=>{const{classes:t}=e;return(0,M.A)({root:["booleanCell"]},T,t)})({classes:l.classes}),a=_(n,xt)>0&&"group"===r.type&&!1===l.treeData,s=w.useMemo(()=>t?l.slots.booleanCellTrueIcon:l.slots.booleanCellFalseIcon,[l.slots.booleanCellFalseIcon,l.slots.booleanCellTrueIcon,t]);return a&&void 0===t?null:(0,ie.jsx)(s,(0,b.A)({fontSize:"small",className:i.root,titleAccess:n.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},o))}const io=w.memo(lo),ao=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function so(e){const{id:t,value:r,field:o,className:n,hasFocus:l,onValueChange:i}=e,a=(0,x.A)(e,ao),s=_e(),c=w.useRef(null),u=(0,Yt.A)(),[d,p]=w.useState(r),f=oe(),g=(e=>{const{classes:t}=e;return(0,M.A)({root:["editBooleanCell"]},T,t)})({classes:f.classes}),h=w.useCallback(async e=>{const r=e.target.checked;i&&await i(e,r),p(r),await s.current.setEditCellValue({id:t,field:o,value:r},e)},[s,o,t,i]);return w.useEffect(()=>{p(r)},[r]),(0,Lt.A)(()=>{l&&c.current.focus()},[l]),(0,ie.jsx)("label",(0,b.A)({htmlFor:u,className:(0,S.A)(g.root,n)},a,{children:(0,ie.jsx)(f.slots.baseCheckbox,(0,b.A)({id:u,inputRef:c,checked:Boolean(d),onChange:h,size:"small"},f.slotProps?.baseCheckbox))}))}const co=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function uo(e){return"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0}const po=(0,b.A)({},Ar,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:e=>e.field!==to&&Wr(e.rowNode)?"":(0,ie.jsx)(io,(0,b.A)({},e)),renderEditCell:e=>(0,ie.jsx)(so,(0,b.A)({},e)),sortComparator:_t,valueFormatter:(e,t,r,o)=>e?o.current.getLocaleText("booleanCellTrueLabel"):o.current.getLocaleText("booleanCellFalseLabel"),filterOperators:[{value:"is",getApplyFilterFn:e=>{const t=uo(e.value);return void 0===t?null:e=>Boolean(e)===t},InputComponent:function(e){const{item:t,applyValue:r,apiRef:o,focusElementRef:n,headerFilterMenu:l,clearButton:i,tabIndex:a,slotProps:s}=e,c=(0,x.A)(e,co),[u,d]=w.useState(uo(t.value)),p=oe(),f=(0,Yt.A)(),g=(0,Yt.A)(),h=p.slotProps?.baseSelect||{},m=h.native??!1,C=p.slotProps?.baseSelectOption||{},v=w.useCallback(e=>{const o=uo(e.target.value);d(o),r((0,b.A)({},t,{value:o}))},[r,t]);w.useEffect(()=>{d(uo(t.value))},[t.value]);const y=s?.root.label??o.current.getLocaleText("filterPanelInputLabel"),S=s?.root.slotProps;return(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsxs)(p.slots.baseSelect,(0,b.A)({fullWidth:!0,labelId:f,id:g,label:y,value:void 0===u?"":String(u),onChange:v,native:m,slotProps:{htmlInput:(0,b.A)({ref:n,tabIndex:a},S?.htmlInput)}},h,c,s?.root,{children:[(0,ie.jsx)(p.slots.baseSelectOption,(0,b.A)({},C,{native:m,value:"",children:o.current.getLocaleText("filterValueAny")})),(0,ie.jsx)(p.slots.baseSelectOption,(0,b.A)({},C,{native:m,value:"true",children:o.current.getLocaleText("filterValueTrue")})),(0,ie.jsx)(p.slots.baseSelectOption,(0,b.A)({},C,{native:m,value:"false",children:o.current.getLocaleText("filterValueFalse")}))]})),l,i]})}}],getApplyQuickFilterFn:()=>
1null,aggregable:!1,chartable:!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)});var fo=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(fo||{}),go=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(go||{}),ho=function(e){return e.Cell="cell",e.Row="row",e}(ho||{}),mo=function(e){return e.Edit="edit",e.View="view",e}(mo||{}),bo=function(e){return e.Edit="edit",e.View="view",e}(bo||{});function wo(e){return"singleSelect"===e?.type}function Co(e,t){if(e)return"function"==typeof e.valueOptions?e.valueOptions((0,b.A)({field:e.field},t)):e.valueOptions}function vo(e,t,r){if(void 0===t)return;const o=t.find(t=>{const o=r(t);return String(o)===String(e)});return r(o)}const yo=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function xo(e){const t=oe(),{id:r,value:o,field:n,row:l,colDef:i,hasFocus:a,error:s,onValueChange:c,initialOpen:u=t.editMode===ho.Cell,slotProps:d}=e,p=(0,x.A)(e,yo),f=_e(),g=w.useRef(null),h=w.useRef(null),[m,C]=w.useState(u),v=(t.slotProps?.baseSelect||{}).native??!1;if((0,Lt.A)(()=>{a&&h.current?.focus()},[a]),!wo(i))return null;const y=Co(i,{id:r,row:l});if(!y)return null;const S=i.getOptionValue,A=i.getOptionLabel;return y&&i?(0,ie.jsx)(t.slots.baseSelect,(0,b.A)({ref:g,value:o,onChange:async e=>{if(!wo(i)||!y)return;C(!1);const t=vo(e.target.value,y,S);c&&await c(e,t),await f.current.setEditCellValue({id:r,field:n,value:t},e)},open:m,onOpen:e=>{(function(e){return"key"in e&&!!e.key})(e)&&"Enter"===e.key||C(!0)},onClose:(e,o)=>{if(t.editMode!==ho.Row){if("backdropClick"===o||"Escape"===e.key){const t=f.current.getCellParams(r,n);f.current.publishEvent("cellEditStop",(0,b.A)({},t,{reason:"Escape"===e.key?go.escapeKeyDown:go.cellFocusOut}))}}else C(!1)},error:s,native:v,fullWidth:!0,slotProps:{htmlInput:{ref:h}}},p,d?.root,t.slotProps?.baseSelect,{children:y.map(e=>{const r=S(e);return(0,w.createElement)(t.slots.baseSelectOption,(0,b.A)({},t.slotProps?.baseSelectOption||{},{native:v,key:r,value:r}),A(e))})})):null}const So=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],Ao=({column:e,OptionComponent:t,getOptionLabel:r,getOptionValue:o,isSelectNative:n,baseSelectOptionProps:l})=>["",...Co(e)||[]].map(e=>{const i=o(e);let a=r(e);return""===a&&(a=" "),(0,w.createElement)(t,(0,b.A)({},l,{native:n,key:i,value:i}),a)});function Ro(e){const{item:t,applyValue:r,type:o,apiRef:n,focusElementRef:l,tabIndex:i,clearButton:a,headerFilterMenu:s,slotProps:c}=e,u=(0,x.A)(e,So),d=t.value??"",p=(0,Yt.A)(),f=(0,Yt.A)(),g=oe(),h=g.slotProps?.baseSelect?.native??!1,m=n.current.getColumn(t.field),C=m.getOptionValue,v=m.getOptionLabel,y=w.useMemo(()=>Co(m),[m]),S=w.useCallback(e=>{let o=e.target.value;o=vo(o,y,C),r((0,b.A)({},t,{value:o}))},[y,C,r,t]);if(!m||!wo(m))return null;const A=c?.root.label??n.current.getLocaleText("filterPanelInputLabel");return(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(g.slots.baseSelect,(0,b.A)({fullWidth:!0,id:p,label:A,labelId:f,value:d,onChange:S,slotProps:{htmlInput:(0,b.A)({tabIndex:i,ref:l,type:o||"text",placeholder:c?.root.placeholder??n.current.getLocaleText("filterPanelInputPlaceholder")},c?.root.slotProps?.htmlInput)},native:h},g.slotProps?.baseSelect,u,c?.root,{children:Ao({column:m,OptionComponent:g.slots.baseSelectOption,getOptionLabel:v,getOptionValue:C,isSelectNative:h,baseSelectOptionProps:g.slotProps?.baseSelectOption})})),s,a]})}const Mo=["item","applyValue","type","apiRef","focusElementRef","slotProps"];const Io=e=>null!=e&&er(e)?e.value:e,Po=(0,b.A)({},Ar,{type:"singleSelect",getOptionLabel:e=>er(e)?e.label:String(e),getOptionValue:e=>er(e)?e.value:e,valueFormatter(e,t,r,o){const n=Yr(o,t);if(!wo(r))return"";const l=Co(r,{id:n,row:t});if(null==e)return"";if(!l)return e;if(!(e=>"object"==typeof e[0])(l))return r.getOptionLabel(e);const i=l.find(t=>r.getOptionValue(t)===e);return i?r.getOptionLabel(i):""},renderEditCell:e=>(0,ie.jsx)(xo,(0,b.A)({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>Io(t)===Io(e.value),InputComponent:Ro},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>Io(t)!==Io(e.value),InputComponent:Ro},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(Io);return e=>t.includes(Io(e))},InputComponent:function(e){const{item:t,applyValue:r,type:o,apiRef:n,focusElementRef:l,slotProps:i}=e,a=(0,x.A)(e,Mo),s=(0,Yt.A)(),c=oe(),u=n.current.getColumn(t.field),d=u.getOptionValue,p=u.getOptionLabel,f
1=w.useCallback((e,t)=>d(e)===d(t),[d]),g=w.useMemo(()=>Co(u)||[],[u]),h=w.useMemo(()=>Array.isArray(t.value)?t.value.reduce((e,t)=>{const r=g.find(e=>d(e)===t);return null!=r&&e.push(r),e},[]):[],[d,t.value,g]),m=w.useCallback((e,o)=>{r((0,b.A)({},t,{value:o.map(d)}))},[r,t,d]);if(!u||!wo(u))return null;const C=c.slots.baseAutocomplete;return(0,ie.jsx)(C,(0,b.A)({multiple:!0,options:g,isOptionEqualToValue:f,id:s,value:h,onChange:m,getOptionLabel:p,label:n.current.getLocaleText("filterPanelInputLabel"),placeholder:n.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:o||"text",inputRef:l}}},a,i?.root))}}],pastedValueParser:(e,t,r)=>{const o=r,n=Co(o)||[],l=o.getOptionValue;if(n.find(t=>l(t)===e))return e}});var ko=r(3879);function Eo(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const Fo=e=>0===e.indexOf("Arrow")||0===e.indexOf("Page")||" "===e||"Home"===e||"End"===e,Do=e=>"Tab"===e||"Escape"===e;function To(e){return(e.ctrlKey||e.metaKey)&&"V"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}const Ho=["open","target","onClose","children","position","className","onExited"],Oo=(0,E.Ay)(jt,{name:"MuiDataGrid",slot:"Menu"})({zIndex:L.zIndex.menu,[`& .${H.menuList}`]:{outline:0}});function $o(e){const{open:t,target:r,onClose:o,children:n,position:l,className:i,onExited:a}=e,s=(0,x.A)(e,Ho),c=_e(),u=oe(),d=(e=>{const{classes:t}=e;return(0,M.A)({root:["menu"]},T,t)})(u),p=se(),f=w.useRef(null);return(0,Lt.A)(()=>{t?f.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(f.current?.focus?.(),f.current=null)},[t]),w.useEffect(()=>{const e=t?"menuOpen":"menuClose";c.current.publishEvent(e,{target:r})},[c,t,r]),(0,ie.jsx)(Oo,(0,b.A)({as:u.slots.basePopper,className:(0,S.A)(d.root,i,p),ownerState:u,open:t,target:r,transition:!0,placement:l,onClickAway:e=>{e.target&&(r===e.target||r?.contains(e.target))||o(e)},onExited:a,clickAwayMouseEvent:"onMouseDown",onKeyDown:e=>{Do(e.key)&&o(e)}},s,u.slotProps?.basePopper,{children:n}))}const zo=["label","icon","showInMenu","onClick"],Lo=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],jo=y((e,t)=>{const r=oe();if(!e.showInMenu){const{label:o,icon:n,onClick:l}=e,i=(0,x.A)(e,zo),a=e=>{l?.(e)};return(0,ie.jsx)(r.slots.baseIconButton,(0,b.A)({size:"small",role:"menuitem","aria-label":o},i,{onClick:a},r.slotProps?.baseIconButton,{ref:t,children:w.cloneElement(n,{fontSize:"small"})}))}const{label:o,icon:n,onClick:l,closeMenuOnClick:i=!0,closeMenu:a}=e,s=(0,x.A)(e,Lo);return(0,ie.jsx)(r.slots.baseMenuItem,(0,b.A)({ref:t},s,{onClick:e=>{l?.(e),i&&a?.()},iconStart:n,children:o}))}),No=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","children","suppressChildrenValidation"];function Vo(e){const{hasFocus:t,tabIndex:r,position:o="bottom-end",children:n,suppressChildrenValidation:l}=e,i=(0,x.A)(e,No),[a,s]=w.useState(-1),[c,u]=w.useState(!1),d=_e(),p=w.useRef(null),f=w.useRef(null),g=w.useRef(!1),h=w.useRef({}),m=(0,ko.I)(),C=(0,Yt.A)(),v=(0,Yt.A)(),y=oe(),S=[];w.Children.forEach(n,e=>{w.isValidElement(e)&&(e.type===w.Fragment?w.Children.forEach(e.props.children,e=>{w.isValidElement(e)&&S.push(e)}):e.type===jo||l?S.push(e):"function"==typeof e.type?e.type.name:e.type)});const A=S.filter(e=>!e.props.showInMenu),R=S.filter(e=>e.props.showInMenu),M=A.length+(R.length?1:0);w.useLayoutEffect(()=>{t||Object.entries(h.current).forEach(([e,t])=>{t?.stop({},()=>{delete h.current[e]})})},[t]),w.useEffect(()=>{a<0||!p.current||a>=p.current.children.length||p.current.children[a].focus({preventScroll:!0})},[a]);const I=S.findIndex(e=>!e.props.disabled);w.useEffect(()=>{t&&-1===a&&s(I),t||(s(-1),g.current=!1)},[t,a,I]),w.useEffect(()=>{a>=M&&s(M-1)},[a,M]);const P=()=>{u(!1)},k=e=>t=>{h.current[e]=t},E=(e,t)=>r=>{s(e),g.current=!0,t&&t(r)},F=M>0?{role:"menu",onKeyDown:e=>{if(M<=1)return;const t=(e,r)=>{if(e<0||e>S.length)return e;const o=("left"===r?-1:1)*(m?-1:1);return S[e+o]?.props.disabled?t(e+o,r):e+o};let r=a;"ArrowRight"===e.key?r=t(a,"right"):"ArrowLeft"===e.key&&(r=t(a,"left")),r<0||r>=M||r!==a&&(e.preventDefault(),e.stopPropagation(),s(r))}}:void 0;
1return(0,ie.jsxs)("div",(0,b.A)({ref:p,tabIndex:-1,className:H.actionsCell},F,i,{children:[A.map((e,t)=>w.cloneElement(e,{key:t,touchRippleRef:k(t),onClick:E(t,e.props.onClick),tabIndex:a===t?r:-1})),R.length>0&&v&&(0,ie.jsx)(y.slots.baseIconButton,(0,b.A)({ref:f,id:v,"aria-label":d.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?C:void 0,role:"menuitem",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),c?P():(u(!0),s(M-1),g.current=!0)},touchRippleRef:k(v),tabIndex:a===A.length?r:-1},y.slotProps?.baseIconButton,{children:(0,ie.jsx)(y.slots.moreActionsIcon,{fontSize:"small"})})),R.length>0&&(0,ie.jsx)($o,{open:c,target:f.current,position:o,onClose:P,children:(0,ie.jsx)(y.slots.baseMenuList,{id:C,className:H.menuList,"aria-labelledby":v,autoFocusItem:!0,children:R.map((e,t)=>w.cloneElement(e,{key:t,closeMenu:P}))})})]}))}function Bo(e){const{colDef:t,id:r}=e,o=_e();if(!(e=>"function"==typeof e.getActions)(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const n=t.getActions(o.current.getRowParams(r));return(0,ie.jsx)(Vo,(0,b.A)({suppressChildrenValidation:!0},e,{children:n}))}const Go="actions",Wo=(0,b.A)({},Ar,{sortable:!1,filterable:!1,aggregable:!1,chartable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,ie.jsx)(Bo,(0,b.A)({},e)),getApplyQuickFilterFn:()=>null}),Uo=me(e=>e.headerFiltering),Ko=ge(Uo,e=>e?.enabled??!1),qo=ge(Uo,e=>e.editing),_o=ge(Uo,e=>e.menuOpen),Xo=me(e=>e.columnGrouping),Yo=he(Xo,e=>e?.unwrappedGroupingModel??{}),Qo=he(Xo,e=>e?.lookup??{}),Zo=he(Xo,e=>e?.headerStructure??[]),Jo=ge(Xo,e=>e?.maxDepth??0),en=["maxWidth","minWidth","width","flex"],tn={string:Ar,number:Mr,date:Jr,dateTime:eo,boolean:po,singleSelect:Po,[Go]:Wo,custom:Ar},rn=(e,t)=>{const r={};let o=0,n=0;const l=[];e.orderedFields.forEach(t=>{let i=e.lookup[t],a=0,s=!1;!1!==e.columnVisibilityModel[t]&&(i.flex&&i.flex>0?(o+=i.flex,s=!0):a=rr(i.width||Ar.width,i.minWidth||Ar.minWidth,i.maxWidth||Ar.maxWidth),n+=a),i.computedWidth!==a&&(i=(0,b.A)({},i,{computedWidth:a})),s&&l.push(i),r[t]=i});const i=void 0===t?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),a=Math.max(i-n,0);if(o>0&&i>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:r}){const o=new Set(r.map(e=>e.field)),n={all:{},frozenFields:[],freeze:e=>{const t=n.all[e];t&&!0!==t.frozen&&(n.all[e].frozen=!0,n.frozenFields.push(e))}};return function l(){if(n.frozenFields.length===o.size)return;const i={min:{},max:{}};let a=e,s=t,c=0;n.frozenFields.forEach(e=>{a-=n.all[e].computedWidth,s-=n.all[e].flex});for(let e=0;e<r.length;e+=1){const t=r[e];if(n.all[t.field]&&!0===n.all[t.field].frozen)continue;let o=a/s*t.flex;o<t.minWidth?(c+=t.minWidth-o,o=t.minWidth,i.min[t.field]=!0):o>t.maxWidth&&(c+=t.maxWidth-o,o=t.maxWidth,i.max[t.field]=!0),n.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}c<0?Object.keys(i.max).forEach(e=>{n.freeze(e)}):c>0?Object.keys(i.min).forEach(e=>{n.freeze(e)}):r.forEach(({field:e})=>{n.freeze(e)}),l()}(),n.all}({initialFreeSpace:a,totalFlexUnits:o,flexColumns:l});Object.keys(e).forEach(t=>{r[t]=(0,b.A)({},r[t],{computedWidth:e[t].computedWidth})})}return(0,b.A)({},e,{lookup:r})};function on(e){let t=tn.string;return e&&tn[e]&&(t=tn[e]),t}const nn=({apiRef:e,columnsToUpsert:t,initialState:r,columnVisibilityModel:o=Te(e),keepOnlyColumnsToUpsert:n=!1,updateInitialVisibilityModel:l=!1})=>{const i=!e.current.state.columns;let a;if(i)a={orderedFields:[],lookup:{},columnVisibilityModel:o,initialColumnVisibilityModel:o};else{const t=ke(e);a={orderedFields:n?[]:[...t.orderedFields],lookup:(0,b.A)({},t.lookup),columnVisibilityModel:o,initialColumnVisibilityModel:l?o:t.initialColumnVisibilityModel}}const s={};if(n&&!i)for(const e in a.lookup)Object.prototype.hasOwnProperty.call(a.lookup,e)&&(s[e]=!1);const c={};t.forEach(e=>{const{field:t}=e;c[t]=!0,s[t]=!0;let r=a.lookup[t];null==r?(r=(0,b.A)({},on(e.type),{field:t,hasBeenResized:!1}),a.orderedFields.push(t)):n&&a.orderedFields.push(t),r&&r.type!==e.type&&(r=(0,b.A)({},on(e.type),{field:t}));let o=r.hasBeenResized;
1en.forEach(t=>{void 0!==e[t]&&(o=!0,-1===e[t]&&(e[t]=1/0))}),a.lookup[t]=(0,zt.A)(r,(0,b.A)({},on(e.type),e,{hasBeenResized:o}))}),n&&!i&&Object.keys(a.lookup).forEach(e=>{s[e]||delete a.lookup[e]});const u=((e,t)=>{if(!t)return e;const{orderedFields:r=[],dimensions:o={}}=t,n=Object.keys(o);if(0===n.length&&0===r.length)return e;const l={},i=[];for(let t=0;t<r.length;t+=1){const o=r[t];e.lookup[o]&&(l[o]=!0,i.push(o))}const a=0===i.length?e.orderedFields:[...i,...e.orderedFields.filter(e=>!l[e])],s=(0,b.A)({},e.lookup);for(let e=0;e<n.length;e+=1){const t=n[e],r=(0,b.A)({},s[t],{hasBeenResized:!0});Object.entries(o[t]).forEach(([e,t])=>{r[e]=-1===t?1/0:t}),s[t]=r}return(0,b.A)({},e,{orderedFields:a,lookup:s})})(e.current.unstable_applyPipeProcessors("hydrateColumns",a),r);return rn(u,e.current.getRootDimensions?.()??void 0)};function ln(e,t){if(t.listView)return 0;const r=ve(e),o=Jo(e),n=Ko(e);return Math.floor(t.columnHeaderHeight*r)+Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*r)*o+(n?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*r):0)}const an=me(e=>e.rowsMeta),sn=(0,et.A)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${H["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${H["scrollArea--right"]}`]:t["scrollArea--right"]},{[`&.${H["scrollArea--up"]}`]:t["scrollArea--up"]},{[`&.${H["scrollArea--down"]}`]:t["scrollArea--down"]},t.scrollArea]})(()=>({position:"absolute",zIndex:101,[`&.${H["scrollArea--left"]}`]:{top:0,left:0,width:20,bottom:0},[`&.${H["scrollArea--right"]}`]:{top:0,right:0,width:20,bottom:0},[`&.${H["scrollArea--up"]}`]:{top:0,left:0,right:0,height:20},[`&.${H["scrollArea--down"]}`]:{bottom:0,left:0,right:0,height:20}})),cn=ge(tt,(e,t)=>"left"===t?e.leftPinnedWidth:"right"===t?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0);function un(e){const{scrollDirection:t,scrollPosition:r}=e,o=w.useRef(null),n=_e(),l=(0,$t.A)(),i=_(n,ve),a=_(n,rt),s=_(n,cn,t),c=oe(),u=ln(n,c),d=Math.floor(c.columnHeaderHeight*i),p=(0,b.A)({height:d,top:u-d},"left"===t?{left:s}:{},"right"===t?{right:s}:{}),f=(0,It.A)(e=>{let i;if(e.preventDefault(),"left"===t)i=e.clientX-o.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI X: Wrong drag direction");i=Math.max(1,e.clientX-o.current.getBoundingClientRect().left)}i=1.5*(i-1)+1,l.start(0,()=>{n.current.scroll({left:r.current.left+i,top:r.current.top})})});return(0,ie.jsx)(pn,(0,b.A)({},e,{ref:o,getCanScrollMore:()=>{const e=tt(n);if("left"===t)return r.current.left>0;if("right"===t){const t=a-e.viewportInnerSize.width;return r.current.left<t}return!1},style:p,handleDragOver:f}))}function dn(e){const{scrollDirection:t,scrollPosition:r}=e,o=w.useRef(null),n=_e(),l=(0,$t.A)(),i=_(n,an),a=oe(),s=ln(n,a),c={top:"up"===t?s:void 0,bottom:"down"===t?0:void 0},u=(0,It.A)(e=>{let i;if(e.preventDefault(),"up"===t)i=e.clientY-o.current.getBoundingClientRect().bottom;else{if("down"!==t)throw new Error("MUI X: Wrong drag direction");i=Math.max(1,e.clientY-o.current.getBoundingClientRect().top)}i=1.5*(i-1)+1,l.start(0,()=>{n.current.scroll({left:r.current.left,top:r.current.top+i})})});return(0,ie.jsx)(pn,(0,b.A)({},e,{ref:o,getCanScrollMore:()=>{const e=tt(n);if("up"===t)return r.current.top>0;if("down"===t){const t=(i.currentPageTotalHeight||0)-e.viewportInnerSize.height-(e.hasScrollX?e.scrollbarSize:0);return r.current.top<t}return!1},style:c,handleDragOver:u}))}const pn=y(function(e,t){const{scrollDirection:r,getCanScrollMore:o,style:n,handleDragOver:l}=e,i=_e(),[a,s]=w.useState(o),c=oe(),u=(0,b.A)({},c,{scrollDirection:r}),d=(e=>{const{scrollDirection:t,classes:r}=e,o={root:["scrollArea",`scrollArea--${t}`]};return(0,M.A)(o,T,r)})(u);return Tt(i,"scrollPositionChange",()=>{s(o)}),a?(0,ie.jsx)(sn,{ref:t,className:d.root,ownerState:u,onDragOver:l,style:n}):null}),fn=k(function(e){const t=_e(),[r,o]=w.useState("none");return Tt(t,"columnHeaderDragStart",()=>o("horizontal")),Tt(t,"columnHeaderDragEnd",()=>o("none")),Tt(t,"rowDragStart",()=>o("vertical")),Tt(t,"rowDragEnd",()=>o("none")),"none"===r?null:"horizontal"===r?(0,ie.jsx)(un,(0,b.A)({},e)):(0,ie.jsx)(dn,(0,b.A)({},e))});function gn(e){for(const t in e)return!1;return!0}const hn=me(e=>e.sorting),mn=ge(hn,e=>e.sortedRows),bn=he(mn,mt,bt,(e,t,r)=>e.reduce((e,o)=>{const n=t[o];if(n)e.push({id:o,model:n});else{const t=r[o];t&&Wr(t)&&e.push({id:o,model:{[zr]:o}})}return e},[])),wn=ge(hn,e=>e.sortModel),Cn=he(wn,e=>e.reduce((t,r,o)=>(t[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},t),{})),vn=(he(mn,e=>e.reduce((e,t,r)=>(e[t]=r,e),Object.create(null))),me(e=>e.filter)),yn=ge(vn,e=>e.filterModel),xn=ge(yn,e=>e.quickFilterValues),Sn=me(e=>e.visibleRowsLookup),An=ge(vn,e=>e.filteredRowsLookup),Rn=(ge(vn,e=>e.filteredChildrenCountLookup),ge(vn,e=>e.filteredDescendantCountLookup),he(Sn,bn,(e,t)=>gn(e)?t:t.filter(t=>!1!==e[t.id]))),Mn=he(Rn,e=>e.map(e=>e.id)),In=he(An,bn,(e,t)=>gn(e)?t:t.filter(t=>!1!==e[t.id])),Pn=he(In,e=>e.map(e=>e.id)),kn=(he(Mn,bt,(e,t)=>{const r={};let o=0;return e.reduce((e,n)=>{const l=t[n];return r[l.depth]||(r[l.depth]=0),l.depth>o&&(r[l.depth]=0),o=l.depth,r[l.depth]+=1,e[n]=r[l.depth],e},{})}),ge(he(In,bt,xt,(e,t,r)=>r<2?[e]:e.reduce((e,r)=>{const o=t[r.id]?.depth;return void 0===o||(e[o]||(e[o]=[]),e[o].push(r)),e},[[]])),e=>e[0]??[])),En=ge(Rn,e=>e.length),Fn=ge(kn,e=>e.length),Dn=ge(In,e=>e.length),Tn=(ge(Dn,Fn,(e,t)=>e-t),he(yn,Fe,(e,t)=>e.items?.filter(e=>{if(!e.field)return!1;const r=t[e.field];if(!r?.filterOperators||0===r?.filterOperators?.length)return!1;const o=r.filterOperators.find(t=>t.value===e.operator);return!!o&&(!o.InputComponent||null!=e.value&&""!==e.value?.toString())}))),Hn=he(Tn,e=>e.reduce((e,t)=>
1(e[t.field]?e[t.field].push(t):e[t.field]=[t],e),{})),On=he(Mn,e=>e.reduce((e,t,r)=>(e[t]=r,e),Object.create(null))),$n=me(e=>e.pivoting),zn=ge($n,e=>e?.active),Ln=new Map,jn=ge($n,e=>e?.initialColumns||Ln),Nn=(e,t)=>{const r=_(e,ft),o=_(e,En),n=_(e,Mt),l=_(e,Oe),i=0===r&&0===n,a=_(e,gt),s=_(e,zn),c=!a&&i,u=!a&&r>0&&0===o;let d=null,p=null;return c&&(d="noRowsOverlay"),!a&&0===l.length&&(d="noColumnsOverlay"),c&&s&&(d="emptyPivotOverlay"),u&&(d="noResultsOverlay"),a&&(d="loadingOverlay",p=t.slotProps?.loadingOverlay?.[i?"noRowsVariant":"variant"]??(i?"skeleton":"linear-progress")),{overlayType:d,loadingOverlayVariant:p}},Vn=me(e=>e.focus),Bn=ge(Vn,e=>e.cell),Gn=ge(Vn,e=>e.columnHeader),Wn=(ge(Vn,e=>e.columnHeaderFilter),ge(Vn,e=>e.columnGroupHeader)),Un=me(e=>e.tabIndex),Kn=ge(Un,e=>e.cell),qn=ge(Un,e=>e.columnHeader),_n=(ge(Un,e=>e.columnHeaderFilter),ge(Un,e=>e.columnGroupHeader)),Xn=me(e=>e.columnMenu),Yn=k(function(){const e=Y(),t=oe(),r=_(e,Oe),o=_(e,Hn),n=_(e,Cn),l=_(e,qn),i=_(e,()=>null===Kn(e)),a=_(e,_n),s=_(e,Gn),c=_(e,Wn),u=_(e,Jo),d=_(e,Xn),p=_(e,Te),f=_(e,Zo),g=!(null===a&&null===l&&i),h=e.current.columnHeadersContainerRef;return(0,ie.jsx)(t.slots.columnHeaders,(0,b.A)({ref:h,visibleColumns:r,filterColumnLookup:o,sortColumnLookup:n,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:a,columnHeaderFocus:s,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:p,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:g},t.slotProps?.columnHeaders))}),Qn=(0,et.A)("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),Zn=(0,et.A)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:r,loadingOverlayVariant:o,overlayType:n}=e,l="skeleton"===o||"noColumnsOverlay"===n;return[t.main,r.hasPinnedRight&&t["main--hasPinnedRight"],l&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),Jn=y((e,t)=>{const{ownerState:r}=e,o=oe(),n=le().hooks.useGridAriaAttributes();return(0,ie.jsxs)(Zn,(0,b.A)({ownerState:r,className:e.className,tabIndex:-1},n,o.slotProps?.main,{ref:t,children:[(0,ie.jsx)(Qn,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),el=(0,et.A)("div")({position:"sticky",zIndex:40,top:0});function tl(e){const t=(0,M.A)({root:["topContainer"]},T,{});return(0,ie.jsx)(el,(0,b.A)({},e,{className:(0,S.A)(t.root,H["container--top"]),role:"presentation"}))}const rl=(0,et.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.virtualScrollerContent,r.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),ol=y(function(e,t){const r=oe(),o=!r.autoHeight&&"auto"===e.style?.minHeight,n=((e,t)=>{const{classes:r}=e,o={root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]};return(0,M.A)(o,T,r)})(r,o),l={classes:r.classes,overflowedContent:o};return(0,ie.jsx)(rl,(0,b.A)({},e,{ownerState:l,className:(0,S.A)(n.root,e.className),ref:t}))}),nl=(0,et.A)("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),ll=(0,et.A)("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:L.cell.background.pinned}),il=(0,et.A)(ll)({left:0}),al=(0,et.A)(ll)({right:0}),sl=(0,et.A)("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"}),cl=k(function({rowsLength:e}){const t=_e(),{viewportOuterSize:r,minimumSize:o,hasScrollX:n,hasScrollY:l,scrollbarSize:i,leftPinnedWidth:a,rightPinnedWidth:s}=_(t,tt),c=n?i:0,u=r.height-o.height>0;return 0!==c||u?(0,ie.jsxs)(nl,{className:H.filler,role:"presentation",style:{height:c,"--rowBorderColor":0===e?"transparent":"var(--DataGrid-rowBorderColor)"},children:[a>0&&(0,ie.jsx)(il,{className:H["filler--pinnedLeft"],style:{width:a}}),(0,ie.jsx)(sl,{}),s>0&&(0,ie.jsx)(al,{className:H["filler--pinnedRight"],style:{width:s+(l?i:0)}})]}):null}),ul=["className"],dl=(0,et.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),pl=y(function(e,t){const{className:r}=e,o=(0,x.A)(e,ul),n=Y(),l=oe(),i=(e=>{const{classes:t}=e;return(0,M.A)({root:["virtualScrollerRenderZone"]},T,t)})(l),a=n.current.virtualizer.api.getters.getOffsetTop();return(0,ie.jsx)(dl,(0,b.A)({className:(0,S.A)(i.root,r),ownerState:l,style:{transform:`translate3d(0, ${a}
1px, 0)`}},o,{ref:t}))});var fl=r(4864);const gl="calc(max(var(--DataGrid-scrollbarSize), 14px))",hl=(0,et.A)("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":gl}),ml=(0,et.A)(hl)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-headersTotalHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-headersTotalHeight)",right:0}),bl=(0,et.A)(hl)({width:"calc(var(--DataGrid-hasScrollX) * (100% - var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:0}),wl=(0,et.A)(hl)({width:"var(--size)",height:"var(--size)",right:0,bottom:0,overflow:"scroll","@media print":{display:"none"}}),Cl=y(function(e,t){const r=Y(),o=oe(),n=w.useRef(!1),l=w.useRef(0),i=w.useRef(null),a=((e,t)=>{const{classes:r}=e,o={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return(0,M.A)(o,T,r)})(o,e.position),s=_(r,tt),c="vertical"===e.position?"height":"width",u="vertical"===e.position?"scrollTop":"scrollLeft",d="vertical"===e.position?"top":"left",p="horizontal"===e.position?s.minimumSize.width:s.minimumSize.height-s.headersTotalHeight,f=(0,It.A)(()=>{const t=i.current,r=e.scrollPosition.current;t&&r[d]!==l.current&&(l.current=r[d],n.current?n.current=!1:(n.current=!0,t[u]=e.scrollPosition.current[d]))}),g=(0,It.A)(()=>{const e=r.current.virtualScrollerRef.current,t=i.current;t&&(n.current?n.current=!1:(n.current=!0,e[u]=t[u]))});(0,fl.A)(()=>{const e=r.current.virtualScrollerRef.current,t=i.current,o={passive:!0};return e.addEventListener("scroll",f,o),t.addEventListener("scroll",g,o),()=>{e.removeEventListener("scroll",f,o),t.removeEventListener("scroll",g,o)}});const h="vertical"===e.position?ml:bl,m=w.useMemo(()=>({[c]:`${p}px`}),[c,p]);return(0,ie.jsx)(h,{ref:(0,A.A)(t,i),className:a.root,tabIndex:-1,"aria-hidden":"true",onFocus:e=>{e.target.blur()},children:(0,ie.jsx)("div",{className:a.content,style:m})})}),vl=(0,et.A)("div",{name:"MuiDataGrid",slot:"ScrollShadow",overridesResolver:(e,t)=>[t.root,t[e.position]]})(({theme:e})=>({position:"absolute",inset:0,pointerEvents:"none",transition:L.transition(["box-shadow"],{duration:L.transitions.duration.short}),"--length":"dark"===e.palette.mode?"8px":"6px","--length-inverse":"calc(var(--length) * -1)","--opacity":"dark"===e.palette.mode?"0.7":"0.18","--blur":"var(--length)","--spread":"calc(var(--length) * -1)","--color":"0, 0, 0","--color-start":"rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))","--color-end":"rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))",variants:[{props:{position:"vertical"},style:{top:"var(--DataGrid-topContainerHeight)",bottom:"calc(var(--DataGrid-bottomContainerHeight) + var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))",boxShadow:"inset 0 var(--length) var(--blur) var(--spread) var(--color-start), inset 0 var(--length-inverse) var(--blur) var(--spread) var(--color-end)"}},{props:{position:"horizontal"},style:{left:"var(--DataGrid-leftPinnedWidth)",right:"calc(var(--DataGrid-rightPinnedWidth) + var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",boxShadow:"inset var(--length) 0 var(--blur) var(--spread) var(--color-start), inset var(--length-inverse) 0 var(--blur) var(--spread) var(--color-end)"}}]}));function yl(e){const{position:t}=e,r={classes:oe().classes,position:t},o=(e=>{const{classes:t,position:r}=e,o={root:["scrollShadow",`scrollShadow--${r}`]};return(0,M.A)(o,T,t)})(r),n=w.useRef(null),l=Y(),i=_(l,nt),a=_(l,lt),s=_(l,Rt),c=_(l,ze),u="vertical"===t?a&&s?.bottom?.length>0:i&&void 0!==c?.right?.length&&c?.right?.length>0,d=(0,ko.I)(),p=w.useCallback(e=>{if(!n.current)return;const r=Math.abs(Math.round(e)),o=tt(l),i=Math.round(o.contentSize["vertical"===t?"height":"width"]-o.viewportInnerSize["vertical"===t?"height":"width"]),a="vertical"===t?s?.top?.length>0:void 0!==c?.left?.length&&c?.left?.length>0,u="vertical"===t?s?.bottom?.length>0:void 0!==c?.right?.length&&c?.right?.length>0,p=d?r<i:r>0,f=d?r>0:r<i;n.current.style.setProperty("--hasScrollStart",a&&p?"1":"0"),n.current.style.setProperty("--hasScrollEnd",u&&f?"1":"0")},[s,c,d,t,l]);return Tt(l,"scrollPositionChange",e=>{p(e["vertical"===t?"top":"left"])}),Tt(l,"columnResizeStop",()=>{"horizontal"===t&&p(l.current.virtualScrollerRef?.current?.scrollLeft||0)}),w.useEffect(()=>{p(("horizontal"===t?l.current.virtualScrollerRef?.current?.scrollLeft:l.current.virtualScrollerRef?.current?.scrollTop)??0)},[p,l,t]),(0,ie.jsx)(vl,{className:o.root,ownerState:r,ref:n,style:{"--hasScrollStart":0,"--hasScrollEnd":u?"1":"0"}})}const xl=(0,et.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e&&"right"!==e})(({overlayType:e,loadingOverlayVariant:t,right:r})=>"skeleton"!==t?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${r}px`,width:0,height:0,zIndex:"loadingOverlay"===e?5:4}:{}),Sl=(0,et.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e})({});function Al(e){const t=_e(),r=oe(),o=_(t,tt);let n=Math.max(o.viewportOuterSize.height-o.topContainerHeight-o.bottomContainerHeight-(o.hasScrollX?o.scrollbarSize:0),0);0===n&&(n=qr);const l=(e=>{const{classes:t}=e;return(0,M.A)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},T,t)})((0,b.A)({},e,{classes:r.classes}));return(0,ie.jsx)(xl,(0,b.A)({className:l.root},e,{right:o.columnsTotalWidth-o.viewportOuterSize.width,children:(0,ie.jsx)(Sl,(0,b.A)({className:l.inner,style:{height:n,width:o.viewportOuterSize.width}},e))}))}function Rl(e,t){return Math.round(e*10**t)/10**t}const Ml=()=>{};function Il(e,t,r){const o=(0,V.A)(Pl,{store:e,selector:t}).current;o.effect=r,(0,fl.A)(o.onMount)}function Pl(e){const{store:t,selector:r}=e;let o=r(t.state);const n={effect:Ml,dispose:null,subscribe:()=>{n.dispose??=t.subscribe(e=>{const t=r(e);if(!Object.is(o,t)){const e=o;o=t,n.effect(e,t)}})},onMount:()=>(n.subscribe(),()=>{n.dispose?.(),n.dispose=null})};return n.subscribe(),n}class kl{static create(e){return new kl(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}
1subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){this.state=e,this.updateTick+=1;const t=this.updateTick,r=this.listeners.values();let o;for(;o=r.next(),!o.done;){if(t!==this.updateTick)return;(0,o.value)(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState((0,b.A)({},this.state,e))}set(e,t){Object.is(this.state[e],t)||this.setState((0,b.A)({},this.state,{[e]:t}))}}const El={initialize:function(e){return{colspanMap:new Map}},use:function(e,t,r){const o=t.colspan?.getColspan,n=(0,It.A)(o?(t,r,n,l)=>{for(let i=r;i<n;i+=1){const a=Fl(e.state.colspanMap,i,t,r,n,l,o);a.colSpan>1&&(i+=a.colSpan-1)}}:()=>{});return r.calculateColSpan=n,{resetColSpan:()=>{e.state.colspanMap=new Map},getCellColSpanInfo:(t,r)=>e.state.colspanMap.get(t)?.[r],calculateColSpan:n}},selectors:{}};function Fl(e,t,r,o,n,l,i){const a=l.length,s=l[t],c=i(r,s,t);if(!c||1===c)return Dl(e,r,t,{spannedByColSpan:!1,cellProps:{colSpan:1,width:s.computedWidth}}),{colSpan:1};let u=s.computedWidth;for(let i=1;i<c;i+=1){const s=t+i;s>=o&&s<n&&(u+=l[s].computedWidth,Dl(e,r,t+i,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(t+c,a-1),leftVisibleCellIndex:t})),Dl(e,r,t,{spannedByColSpan:!1,cellProps:{colSpan:c,width:u}})}return{colSpan:c}}function Dl(e,t,r,o){let n=e.get(t);n||(n={},e.set(t,n)),n[r]=o}var Tl=r(9712);function Hl(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 r=e.length;if(r!==t.length)return!1;for(let o=0;o<r;o+=1)if(!Hl(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;for(let e=0;e<r.length;e+=1){const o=r[e];if(!Hl(o[1],t.get(o[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const r=e.length;if(r!==t.length)return!1;for(let o=0;o<r;o+=1)if(e[o]!==t[o])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 r=Object.keys(e),o=r.length;if(o!==Object.keys(t).length)return!1;for(let e=0;e<o;e+=1)if(!Object.prototype.hasOwnProperty.call(t,r[e]))return!1;for(let n=0;n<o;n+=1){const o=r[n];if(!Hl(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}var Ol=r(664);function $l(e,t,r,o,n){return(0,Ol.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,r,o,n))}const zl={EMPTY:{width:0,height:0},equals:(e,t)=>e.width===t.width&&e.height===t.height},Ll={EMPTY:{top:[],bottom:[]}},jl={EMPTY:{left:[],right:[]}};let Nl=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}({});(Nl||(Nl={})).forDelta=function(e,t){return 0===e&&0===t?Nl.NONE:Math.abs(t)>=Math.abs(e)?t>0?Nl.DOWN:Nl.UP:e>0?Nl.RIGHT:Nl.LEFT};const Vl={isReady:!1,root:zl.EMPTY,viewportOuterSize:zl.EMPTY,viewportInnerSize:zl.EMPTY,contentSize:zl.EMPTY,minimumSize:zl.EMPTY,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,topContainerHeight:0,bottomContainerHeight:0},Bl={rootSize:e=>e.rootSize,dimensions:e=>e.dimensions,rowHeight:e=>e.dimensions.rowHeight,contentHeight:e=>e.dimensions.contentSize.height,rowsMeta:e=>e.rowsMeta,columnPositions:fe((e,t)=>{const r=[];let o=0;for(let e=0;e<t.length;e+=1)r.push(o),o+=t[e].computedWidth;return r}),needsHorizontalScrollbar:e=>e.dimensions.viewportOuterSize.width>0&&e.dimensions.columnsTotalWidth>e.dimensions.viewportOuterSize.width},Gl={initialize:function(e){const t=(0,b.A)({},Vl,e.dimensions),{rowCount:r}=e,{rowHeight:o}=t,n={currentPageTotalHeight:r*o,positions:Array.from({length:r},(e,t)=>t*o),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0},l=new Map;return{rootSize:zl.EMPTY,dimensions:t,rowsMeta:n,rowHeights:l}},use:function(e,t,r){const o=w.useRef(!0),{refs:n,dimensions:{rowHeight:l,columnsTotalWidth:i,leftPinnedWidth:a,rightPinnedWidth:s,topPinnedHeight:c,bottomPinnedHeight:u},onResize:d}=t,p=w.useCallback(r=>
1{if(r&&(o.current=!1),o.current)return;const p=n.container.current,f=Bl.rootSize(e.state),g=Bl.rowsMeta(e.state),h=function(e,t){if(void 0!==t)return t;if(null===e)return 0;const r=Wl.get(e);if(void 0!==r)return r;const o=(0,Tl.A)(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const n=o.offsetWidth-o.clientWidth;return e.removeChild(o),Wl.set(e,n),n}(p,t.dimensions.scrollbarSize),m=c+g.pinnedTopRowsTotalHeight,b=u+g.pinnedBottomRowsTotalHeight,w={width:i,height:Rl(g.currentPageTotalHeight,1)};let C,v,y=!1,x=!1;if(t.autoHeight)x=!1,y=Math.round(i)>Math.round(f.width),C={width:f.width,height:m+b+w.height},v={width:Math.max(0,C.width-(x?h:0)),height:Math.max(0,C.height-(y?h:0))};else{C={width:f.width,height:f.height},v={width:Math.max(0,C.width),height:Math.max(0,C.height-m-b)};const e=w,t=v,r=e.width>t.width,o=e.height>t.height;(r||o)&&(x=o,y=e.width+(x?h:0)>t.width,y&&(x=e.height+h>t.height)),x&&(v.width-=h),y&&(v.height-=h)}t.disableHorizontalScroll&&(y=!1),t.disableVerticalScroll&&(x=!1);const S=Math.max(C.width,i+(x?h:0)),A={isReady:!0,root:f,viewportOuterSize:C,viewportInnerSize:v,contentSize:w,minimumSize:{width:i,height:m+w.height+b},hasScrollX:y,hasScrollY:x,scrollbarSize:h,rowWidth:S,rowHeight:l,columnsTotalWidth:i,leftPinnedWidth:a,rightPinnedWidth:s,topContainerHeight:m,bottomContainerHeight:b};Hl(e.state.dimensions,A)||(e.update({dimensions:A}),d?.(A.root))},[e,n.container,t.dimensions.scrollbarSize,t.autoHeight,t.disableHorizontalScroll,t.disableVerticalScroll,d,l,i,a,s,c,u]),{resizeThrottleMs:f}=t,g=(0,It.A)(p),h=w.useMemo(()=>f>0?function(e,t=166){let r,o;const n=()=>{r=void 0,e(...o)};function l(...e){o=e,void 0===r&&(r=setTimeout(n,t))}return l.clear=()=>{clearTimeout(r),r=void 0},l}(g,f):void 0,[f,g]);w.useEffect(()=>h?.clear,[h]),(0,Lt.A)(p,[p]);const m=function(e,t,r){const o=e.state.rowHeights,{rows:n,getRowHeight:l,getRowSpacing:i,getEstimatedRowHeight:a}=t,s=w.useRef(-1),c=w.useRef(!1),u=w.useRef(!1),d=t.pinnedRows,p=$l(e,Bl.rowHeight),f=(0,It.A)(t=>{let r=o.get(t);return void 0===r&&(r={content:e.state.dimensions.rowHeight,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},o.set(t,r)),r}),{applyRowHeight:g}=t,h=w.useCallback(t=>{const r=Bl.dimensions(e.state),o=r.rowHeight,n=f(t.id);if(l){const e=l(t);if("auto"===e){if(n.needsFirstMeasurement){const e=a?a(t):o;n.content=e??o}c.current=!0,n.autoHeight=!0}else n.content=e??r.rowHeight,n.needsFirstMeasurement=!1,n.autoHeight=!1}else n.content=o,n.needsFirstMeasurement=!1;if(i){const e=i(t);n.spacingTop=e.top??0,n.spacingBottom=e.bottom??0}else n.spacingTop=0,n.spacingBottom=0;return g?.(n,t),n},[e,l,f,a,p,i,g]),m=w.useCallback(()=>{c.current=!1;const t=d?.top.reduce((e,t)=>{const r=h(t);return e+r.content+r.spacingTop+r.spacingBottom+r.detail},0)??0,o=d?.bottom.reduce((e,t)=>{const r=h(t);return e+r.content+r.spacingTop+r.spacingBottom+r.detail},0)??0,l=[],i=n.reduce((e,t)=>{l.push(e);const r=h(t);return e+(r.content+r.spacingTop+r.spacingBottom+r.detail)},0);c.current||(s.current=1/0);const a=t!==e.state.rowsMeta.pinnedTopRowsTotalHeight||o!==e.state.rowsMeta.pinnedBottomRowsTotalHeight||i!==e.state.rowsMeta.currentPageTotalHeight,p={currentPageTotalHeight:i,positions:l,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:o};e.set("rowsMeta",p),a&&r(),u.current=!0},[e,d,n,h,r]),b=(0,It.A)(m),C=(e,t)=>{const r=f(e),o=r.content!==t;r.needsFirstMeasurement=!1,r.content=t,u.current&&=!o},v=(0,V.A)(()=>"undefined"==typeof ResizeObserver?void 0:new ResizeObserver(e=>{for(let r=0;r<e.length;r+=1){const o=e[r],n=o.borderBoxSize&&o.borderBoxSize.length>0?o.borderBoxSize[0].blockSize:o.contentRect.height,l=o.target.__mui_id,i=t.focusedVirtualCell?.()?.id;if(i===l&&0===n)return;C(l,n)}u.current||requestAnimationFrame(()=>{b()})})).current;return(0,Lt.A)(()=>{m()},[m]),{getRowHeight:t=>o.get(t)?.content??Bl.rowHeight(e.state),setLastMeasuredRowIndex:e=>{c.current&&e>s.current&&(s.current=e)},storeRowHeightMeasurement:C,hydrateRowsMeta:m,observeRowHeight:(e,t)=>
1(e.__mui_id=t,v?.observe(e),()=>v?.unobserve(e)),rowHasAutoHeight:e=>o.get(e)?.autoHeight??!1,getRowHeightEntry:f,getLastMeasuredRowIndex:()=>s.current,resetRowHeights:()=>{o.clear(),m()}}}(e,t,p);return{updateDimensions:p,debouncedUpdateDimensions:h,rowsMeta:m}},selectors:Bl},Wl=new WeakMap;var Ul=r(2483);const Kl=("undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"empty").includes("firefox"),ql="undefined"!=typeof window&&/jsdom|HappyDOM/.test(window.navigator.userAgent),_l=()=>{},Xl=(e,t,r)=>Math.max(t,Math.min(r,e)),Yl={top:0,left:0},Ql=Object.freeze(new Map),Zl={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},Jl={store:pe(e=>e.virtualization),renderContext:pe(e=>e.virtualization.renderContext),enabledForRows:pe(e=>e.virtualization.enabledForRows),enabledForColumns:pe(e=>e.virtualization.enabledForColumns)},ei={initialize:function(e){return{virtualization:(0,b.A)({enabled:!ql,enabledForRows:!ql,enabledForColumns:!ql,renderContext:Zl},e.initialState?.virtualization),getters:null}},use:function(e,t,r){const{refs:o,dimensions:{rowHeight:n,columnsTotalWidth:l},virtualization:{isRtl:i=!1,rowBufferPx:a=150,columnBufferPx:s=150},colspan:c,initialState:u,rows:d,range:p,columns:f,pinnedRows:g=Ll.EMPTY,pinnedColumns:h=jl.EMPTY,minimalContentHeight:m,autoHeight:C,onWheel:y,onTouchMove:x,onRenderContextChange:S,onScrollChange:A,scrollReset:R,renderRow:M,renderInfiniteLoadingTrigger:I}=t,P=$l(e,Gl.selectors.needsHorizontalScrollbar),k=g.bottom.length>0,[E,F]=w.useState(Ql),D=w.useRef(!1),T=w.useRef(!1),H=$l(e,Jl.renderContext),O=$l(e,Jl.enabledForRows),$=$l(e,Jl.enabledForColumns),z=$l(e,Gl.selectors.rowsMeta),L=$l(e,Gl.selectors.contentHeight),j=w.useRef(u?.scroll??Yl),N=w.useRef(!1),B=w.useRef(Yl),G=w.useRef(Zl),W=(0,$t.A)(),U=w.useRef(void 0),K=(0,V.A)(()=>function(e,t,r,o){return{direction:Nl.NONE,buffer:si(e,Nl.NONE,t,r,o,300)}}(i,a,s,15*n)).current,q=w.useCallback(t=>{ii(t,e.state.virtualization.renderContext)||e.set("virtualization",(0,b.A)({},e.state.virtualization,{renderContext:t}));const r=Gl.selectors.dimensions(e.state).isReady,o=t.firstRowIndex!==G.current.firstRowIndex||t.lastRowIndex!==G.current.lastRowIndex;r&&o&&(G.current=t,S?.(t)),B.current=j.current},[e,S]),_=(0,It.A)(()=>{const l=o.scroller.current;if(!l)return;const c=Gl.selectors.dimensions(e.state),u=Math.ceil(c.contentSize.height-c.viewportInnerSize.height),d=Math.ceil(c.contentSize.width-c.viewportInnerSize.width),p={top:Xl(l.scrollTop,0,u),left:i?Xl(l.scrollLeft,-Math.abs(d),0):Xl(l.scrollLeft,0,d)},f=p.left-j.current.left,g=p.top-j.current.top,h=0!==f||0!==g;j.current=p;const m=h?Nl.forDelta(f,g):Nl.NONE,b=Math.abs(j.current.top-B.current.top),w=Math.abs(j.current.left-B.current.left),C=b>=n||w>=50,v=K.direction!==m;if(!C&&!v)return H;if(v)switch(m){case Nl.NONE:case Nl.LEFT:case Nl.RIGHT:U.current=void 0;break;default:U.current=H}K.direction=m,K.buffer=si(i,m,a,s,15*n,300);const y=ri(ti(e,t,r,O,$),j.current,K);return ii(y,H)||(Ul.flushSync(()=>{q(y)}),W.start(1e3,_)),y}),X=()=>{if(!Gl.selectors.dimensions(e.state).isReady&&(O||$))return;const o=ri(ti(e,t,r,O,$),j.current,K);U.current=void 0,q(o)},Y=(0,It.A)(X);Il(e,Gl.selectors.dimensions,(e,t)=>{t.isReady&&X()}),(0,Lt.A)(()=>{D.current&&(X(),D.current=!1)});const Q=(0,It.A)(()=>{if(N.current)return void(N.current=!1);const e=_();e&&A?.(j.current,e)}),Z=w.useMemo(()=>({overflowX:P?void 0:"hidden",overflowY:C?"hidden":void 0}),[P,C]),J=w.useMemo(()=>{const e={width:P?l:"auto",flexBasis:L,flexShrink:0};return 0===e.flexBasis&&(e.flexBasis=m),e},[l,L,P,m]),ee=w.useRef(null),te=w.useCallback(e=>{e&&ee.current?.(l,L)},[l,L]);(0,Lt.A)(()=>{T.current&&Y()},[$,O,Y]),(0,Lt.A)(()=>{o.scroller.current&&(o.scroller.current.scrollLeft=0)},[o.scroller,R]),(e=>{const t=w.useRef(!1);(0,Lt.A)(()=>t.current||!e?_l:(t.current=!0,(()=>{if(A?.(j.current,H),T.current=!0,u?.scroll&&o.scroller.current){const e=o.scroller.current,{top:t,left:r}=u.scroll,n={top:!(t>0),left:!(r>0)};!n.left&&l&&(e.scrollLeft=r,n.left=!0,N.current=!0),!n.top&&L&&(e.scrollTop=t,N.current=!0),n.top&&n.left||(ee.current=(o,l)=>{!n.left&&o&&(e.scrollLeft=r,n.left=!0,N.current=!0),!n.top&&l&&(e.scrollTop=t,n.top=!0,N.current=!0),n.left&&n.top&&(ee.current=null)})}})()),[t.current||e])})(H!==Zl),Il(e,Gl.selectors.dimensions,X);const re=e=>t=>{t&&o[e].current!==t&&(o[e].current=t)},oe=w.useRef(!0),ne=w.useRef(void 0),le=(0,It.A)(t=>{if(!t)return void ne.current?.();o.container.current=t;const n=function(e,t,r){if(!e)return;const o=e.getBoundingClientRect(),n={width:Rl(o.width,1),height:Rl(o.height,1)};if(t.state.rootSize!==zl.EMPTY&&zl.equals(n,t.state.rootSize)||r(n),"undefined"==typeof ResizeObserver)return;const l=new ResizeObserver(([e])=>{if(!e)return;const o={width:Rl(e.contentRect.width,1),height:Rl(e.contentRect.height,1)};zl.equals(o,t.state.rootSize)||r(o)});return l.observe(e),()=>{l.disconnect()}}(t,e,t=>{0===t.width&&0===t.height&&0!==e.state.rootSize.height&&0!==e.state.rootSize.width||(e.state.rootSize=t,oe.current||!r.debouncedUpdateDimensions?(r.updateDimensions(oe.current),oe.current=!1):r.debouncedUpdateDimensions())});return ne.current=()=>{n?.(),o.container.current=null},v>=19?ne.current:void 0}),ie=w.useRef(void 0),ae=(0,It.A)(e=>{if(!e)return void ie.current?.();ie.current?.(),o.scroller.current=e;const t={passive:!0};return e.addEventListener("scroll",Q,t),e.addEventListener("wheel",y,t),e.addEventListener("touchmove",x,t),ie.current=()=>{e.removeEventListener("scroll",Q,t),e.removeEventListener("wheel",y,t),e.removeEventListener("touchmove",x,t),o.scroller.current=null},v>=19?ie.current:void 0}),se=(0,It.A)(re("scrollbarVertical")),ce=(0,It.A)(re("scrollbarHorizontal"));return{getters:{setPanels:F,getOffsetTop:()=>z.positions[H.firstRowIndex]??0,getRows:(o={},n)=>{if(!o.rows&&!p)return[];let i=H;o.renderContext&&(i=o.renderContext,i.firstColumnIndex=H.firstColumnIndex,i.lastColumnIndex=H.lastColumnIndex);const a=!k&&void 0===o.position||k&&"bottom"===o.position,s=void 0!==o.position;let u;switch(o.position){case"top":u=0;break;case"bottom":u=g.top.length+d.length;break;default:u=g.top.length}const m=o.rows??d,b=i.firstRowIndex,w=Math.min(i.lastRowIndex,m.length),C=o.rows?ci(0,o.rows.length):ci(b,w);let v=-1;const y=t.focusedVirtualCell?.();!s&&y&&(y.rowIndex<b&&(C.unshift(y.rowIndex),v=y.rowIndex),y.rowIndex>w&&(C.push(y.rowIndex),v=y.rowIndex));const x=[],S=Gl.selectors.columnPositions(e.state,f);
1return C.forEach(e=>{const{id:t,model:g}=m[e];if(n&&!n[t])return;const b=(p?.firstRowIndex||0)+u+e;if(c?.enabled){const e=h.left.length,o=f.length-h.right.length;r.calculateColSpan(t,e,o,f),h.left.length>0&&r.calculateColSpan(t,0,h.left.length,f),h.right.length>0&&r.calculateColSpan(t,f.length-h.right.length,f.length,f)}const w=r.rowsMeta.rowHasAutoHeight(t)?"auto":r.rowsMeta.getRowHeight(t);let C=!1;void 0===o.position&&(C=0===e);let A=!1;const R=e===m.length-1;a&&(s?A=R:e===d.length-1&&(A=!0));let P=i;U.current&&e>=U.current.firstRowIndex&&e<U.current.lastRowIndex&&(P=U.current);const k=e===v,F=y?.rowIndex===b,D=ai(S,P,h.left.length),T=R&&"top"===o.position,H=P.firstColumnIndex,O=P.lastColumnIndex;if(x.push(M({id:t,model:g,rowIndex:b,offsetLeft:D,columnsTotalWidth:l,baseRowHeight:w,firstColumnIndex:H,lastColumnIndex:O,focusedColumnIndex:F?y.columnIndex:void 0,isFirstVisible:C,isLastVisible:A,isVirtualFocusRow:k,showBottomBorder:T})),k)return;const $=E.get(t);$&&x.push($),void 0===o.position&&R&&x.push(I(t))}),x},rows:t.rows,getContainerProps:()=>({ref:le}),getScrollerProps:()=>({ref:ae,style:Z,role:"presentation",tabIndex:Kl?-1:void 0}),getContentProps:()=>({ref:te,style:J,role:"presentation"}),getScrollbarVerticalProps:()=>({ref:se,scrollPosition:j}),getScrollbarHorizontalProps:()=>({ref:ce,scrollPosition:j}),getScrollAreaProps:()=>({scrollPosition:j})},useVirtualization:()=>$l(e,e=>e),setPanels:F,forceUpdateRenderContext:X,scheduleUpdateRenderContext:()=>{D.current=!0},getCellColSpanInfo:()=>{throw new Error("Unimplemented: colspan feature is required")},calculateColSpan:()=>{throw new Error("Unimplemented: colspan feature is required")},getHiddenCellsOrigin:()=>{throw new Error("Unimplemented: rowspan feature is required")}}},selectors:Jl};function ti(e,t,r,o,n){const l=Gl.selectors.dimensions(e.state),i=t.rows,a=t.range,s=t.columns,c=r.getHiddenCellsOrigin(),u=t.rows.at(-1)?.id,d=s.at(-1);return{api:r,enabledForRows:o,enabledForColumns:n,autoHeight:t.autoHeight,rowBufferPx:t.virtualization.rowBufferPx,columnBufferPx:t.virtualization.columnBufferPx,leftPinnedWidth:l.leftPinnedWidth,columnsTotalWidth:l.columnsTotalWidth,viewportInnerWidth:l.viewportInnerSize.width,viewportInnerHeight:l.viewportInnerSize.height,lastRowHeight:void 0!==u?r.rowsMeta.getRowHeight(u):0,lastColumnWidth:d?.computedWidth??0,rowsMeta:Gl.selectors.rowsMeta(e.state),columnPositions:Gl.selectors.columnPositions(e.state,t.columns),rows:i,range:a,pinnedColumns:t.pinnedColumns,columns:s,hiddenCellsOriginMap:c,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function ri(e,t,r){const o={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.columns.length},{top:n,left:l}=t,i=Math.abs(l)+e.leftPinnedWidth;if(e.enabledForRows){let t=Math.min(oi(e,n,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const r=e.hiddenCellsOriginMap[t];if(r){const e=Math.min(...Object.values(r));t=Math.min(t,e)}const l=e.autoHeight?t+e.rows.length:oi(e,n+e.viewportInnerHeight);o.firstRowIndex=t,o.lastRowIndex=l}if(e.enabledForColumns){let t=0,n=e.columnPositions.length,l=!1;const[a,s]=li({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let t=a;t<s&&!l;t+=1){const r=e.rows[t];l=e.api.rowsMeta.rowHasAutoHeight(r.id)}l&&!e.virtualizeColumnsWithAutoRowHeight||(t=ni(i,e.columnPositions,{atStart:!0,lastPosition:e.columnsTotalWidth}),n=ni(i+e.viewportInnerWidth,e.columnPositions)),o.firstColumnIndex=t,o.lastColumnIndex=n}const a=function(e,t,r){const[o,n]=li({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:r.buffer.rowBefore,bufferAfter:r.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[l,i]=li({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns?.left.length??0,maxLastIndex:e.columns.length-(e.pinnedColumns?.right.length??0),bufferBefore:r.buffer.columnBefore,bufferAfter:r.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),a=function({api:e,firstColumnToRender:t,firstRowToRender:r,lastRowToRender:o,visibleRows:n}){let l=t,i=!1;for(;!i&&l>=0;){i=!0;for(let t=r;t<o;t+=1)if(n[t]){const r=n[t].id,o=e.getCellColSpanInfo(r,l);if(o&&o.spannedByColSpan&&o.leftVisibleCellIndex<l){l=o.leftVisibleCellIndex,i=!1;break}}}return l}({api:e.api,firstColumnToRender:l,firstRowToRender:o,lastRowToRender:n,visibleRows:e.rows});return{firstRowIndex:o,lastRowIndex:n,firstColumnIndex:a,lastColumnIndex:i}}(e,o,r);return a}function oi(e,t,r){const o=e.api.rowsMeta.getLastMeasuredRowIndex();let n=o===1/0;e.range?.lastRowIndex&&!n&&(n=o>=e.range.lastRowIndex);const l=Xl(o-(e.range?.firstRowIndex||0),0,e.rowsMeta.positions.length);return n||e.rowsMeta.positions[l]>=t?ni(t,e.rowsMeta.positions,r):function(e,t,r,o){let n=1;for(;r<t.length&&Math.abs(t[r])<e;)r+=n,n*=2;return ni(e,t,o,Math.floor(r/2),Math.min(r,t.length))}(t,e.rowsMeta.positions,l,r)}function ni(e,t,r=void 0,o=0,n=t.length){if(t.length<=0)return-1;if(o>=n)return o;const l=o+Math.floor((n-o)/2),i=t[l];let a;return a=r?.atStart?e-((l===t.length-1?r.lastPosition:t[l+1])-i)<i:e<=i,a?ni(e,t,r,o,l):ni(e,t,r,l+1,n)}function li({firstIndex:e,lastIndex:t,bufferBefore:r,bufferAfter:o,minFirstIndex:n,maxLastIndex:l,positions:i,lastSize:a}){const s=i[e]-r,c=i[t]+o,u=ni(s,i,{atStart:!0,lastPosition:i[i.length-1]+a}),d=ni(c,i);
1return[Xl(u,n,l),Xl(d,n,l)]}function ii(e,t){return e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}function ai(e,t,r){const o=(e[t.firstColumnIndex]??0)-(e[r]??0);return Math.abs(o)}function si(e,t,r,o,n,l){if(e)switch(t){case Nl.LEFT:t=Nl.RIGHT;break;case Nl.RIGHT:t=Nl.LEFT}switch(t){case Nl.NONE:return{rowAfter:r,rowBefore:r,columnAfter:o,columnBefore:o};case Nl.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:l};case Nl.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:l,columnBefore:0};case Nl.UP:return{rowAfter:0,rowBefore:n,columnAfter:0,columnBefore:0};case Nl.DOWN:return{rowAfter:n,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}function ci(e,t){return Array.from({length:t-e}).map((t,r)=>e+r)}const ui={initialize:function(e){return{}},use:function(e,t,r){return{getViewportPageSize:()=>{const r=Gl.selectors.dimensions(e.state);if(!r.isReady)return 0;if(t.getRowHeight){const r=ei.selectors.renderContext(e.state),o=r.lastRowIndex-r.firstRowIndex;return Math.min(o-1,t.rows.length)}const o=Math.floor(r.viewportInnerSize.height/r.rowHeight);return Math.min(o,t.rows.length)}}},selectors:{}},di={firstRowIndex:0,lastRowIndex:0},pi={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},fi={state:e=>e.rowSpanning,hiddenCells:e=>e.rowSpanning.caches.hiddenCells,spannedCells:e=>e.rowSpanning.caches.spannedCells,hiddenCellsOriginMap:e=>e.rowSpanning.caches.hiddenCellOriginMap},gi={initialize:function(e){return{rowSpanning:e.initialState?.rowSpanning??{caches:pi,processedRange:di}}},use:function(e,t,r){return{getHiddenCellsOrigin:()=>fi.hiddenCellsOriginMap(e.state)}},selectors:fi},hi=[Gl,ei,El,gi,ui];function mi(e){const t=w.useRef(!0);t.current&&(t.current=!1,e())}let bi=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}({});const wi=(e,t,r)=>t>0&&e>0?Math.ceil(e/t):-1===e?r+2:0,Ci=e=>({page:0,pageSize:e?0:100}),vi=(e,t)=>{if(t===bi.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=me(e=>e.pagination),xi=ge(yi,e=>e.enabled&&"client"===e.paginationMode),Si=ge(yi,e=>e.paginationModel),Ai=ge(yi,e=>e.rowCount),Ri=ge(yi,e=>e.meta),Mi=ge(Si,e=>e.page),Ii=ge(Si,e=>e.pageSize),Pi=ge(Si,Ai,(e,t)=>wi(t,e.pageSize,e.page)),ki=he(xi,Si,bt,xt,Rn,kn,(e,t,r,o,n,l)=>{if(!e)return null;const i=l.length,a=Math.min(t.pageSize*t.page,i-1),s=-1===t.pageSize?i-1:Math.min(a+t.pageSize-1,i-1);if(-1===a||-1===s)return null;if(o<2)return{firstRowIndex:a,lastRowIndex:s};const c=l[a],u=s-a+1,d=n.findIndex(e=>e.id===c.id);let p=d,f=0;for(;p<n.length&&f<=u;){const e=n[p],t=r[e.id]?.depth;void 0===t?p+=1:((f<u||t>0)&&(p+=1),0===t&&(f+=1))}return{firstRowIndex:d,lastRowIndex:p-1}}),Ei=he(Rn,ki,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Fi=he(Mn,ki,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),Di=he(xi,ki,Ei,Rn,(e,t,r,o)=>e?{rows:r,range:t,rowIdToIndexMap:r.reduce((e,t,r)=>(e.set(t.id,r),e),new Map)}:{rows:o,range:0===o.length?null:{firstRowIndex:0,lastRowIndex:o.length-1},rowIdToIndexMap:o.reduce((e,t,r)=>(e.set(t.id,r),e),new Map)}),Ti=(e,t)=>Di(e),Hi=(e,t)=>_(e,Di),Oi=me(e=>e.virtualization),$i=(ge(Oi,e=>e.enabled),ge(Oi,e=>e.enabledForColumns)),zi=(ge(Oi,e=>e.enabledForRows),ge(Oi,e=>e.renderContext)),Li=he(me(e=>e.virtualization.renderContext.firstColumnIndex),me(e=>e.virtualization.renderContext.lastColumnIndex),(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),ji=he(ge(Bn,zi,Di,Oe,(e,t,r,o)=>{if(!e)return!1;const n=r.rowIdToIndexMap.get(e.id),l=o.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex(t=>t.field===e.field);return!(void 0!==n&&-1!==l&&n>=t.firstRowIndex&&n<=t.lastRowIndex)}),Oe,Di,Bn,(e,t,r,o)=>{if(!e)return null;const n=r.rowIdToIndexMap.get(o.id);if(void 0===n)return null;const l=t.findIndex(e=>e.field===o.field);return-1===l?null:(0,b.A)({},o,{rowIndex:n,columnIndex:l})});class Ni{constructor(e){this.data=e.ids}has(e){return this.data.has(e)}select(e){this.data.add(e)}unselect(e){this.data.delete(e)}}class Vi{constructor(e){this.data=e.ids}has(e){return!this.data.has(e)}select(e){this.data.delete(e)}unselect(e){this.data.add(e)}}const Bi=e=>"include"===e.type?new Ni(e):new Vi(e),Gi=me(e=>
1e.rowSelection),Wi=he(Gi,Bi),Ui=ge(Gi,Dn,(e,t)=>"include"===e.type?e.ids.size:t-e.ids.size),Ki=he(Gi,mt,St,(e,t,r)=>{const o=new Map;if("include"===e.type)for(const r of e.ids)o.set(r,t[r]);else for(let n=0;n<r.length;n+=1){const l=r[n];e.ids.has(l)||o.set(l,t[l])}return o}),qi={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:"\t",columnBufferPx:150,columnFilterDebounceMs: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,disableRowSelectionExcludeModel:!1,disableVirtualization:!1,editMode:ho.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:"error",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,tabNavigation:"none"};function _i(e,t,r){const o=w.useRef(!0);(0,Lt.A)(()=>{o.current=!1,e.current.register(r,t)},[e,r,t]),o.current&&e.current.register(r,t)}const Xi=(e,t,r)=>{const o=w.useRef(null),n=w.useRef(`mui-${Math.round(1e9*Math.random())}`),l=w.useCallback(()=>{o.current=e.current.registerPipeApplier(t,n.current,r)},[e,r,t]);mi(()=>{l()});const i=w.useRef(!0);w.useEffect(()=>(i.current?i.current=!1:l(),()=>{o.current&&(o.current(),o.current=null)}),[l])},Yi=(e,t,r)=>{const o=ot(r),n=ft(r),l=yi(r),i=Math.min(l.enabled?l.paginationModel.pageSize:n,n);return(0,b.A)({},e,{rowsMeta:{currentPageTotalHeight:i*o,positions:Array.from({length:i},(e,t)=>t*o),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})},Qi=ge(Oe,Ne,(e,t)=>{const r=e.length;return 0===r?0:Rl(t[r-1]+e[r-1].computedWidth,1)}),Zi=()=>(0,ue.i5)((e,t,r,o,n)=>(0,b.A)({},e,{headerHeight:t,groupHeaderHeight:r,headerFilterHeight:o,headersTotalHeight:n}),{maxSize:1});const Ji=(0,et.A)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.virtualScroller,r.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}),ea=e=>e.current.state.dimensions.rightPinnedWidth>0;function ta(e){const t=Y(),r=oe(),o=_(t,lt),n=_(t,nt),l=_(t,ea),i=_(t,dt),{overlayType:a,loadingOverlayVariant:s}=Nn(t,r),c=r.slots?.[a],u={classes:r.classes,hasScrollX:n,hasPinnedRight:l,overlayType:a,loadingOverlayVariant:s},d=(e=>{const{classes:t,hasScrollX:r,hasPinnedRight:o,loadingOverlayVariant:n,overlayType:l}=e,i={root:["main",o&&"main--hasPinnedRight",("skeleton"===n||"noColumnsOverlay"===l)&&"main--hiddenContent"],scroller:["virtualScroller",r&&"virtualScroller--hasScrollX"]};return(0,M.A)(i,T,t)})(u),p=function(){const e=(0,ko.I)(),t=oe(),r=Y(),{listView:o}=t,n=_(r,Oe),l=_(r,Rt),i=Le(r),a=_(r,Wi),s=w.useCallback(e=>a.has(e)&&r.current.isRowSelectable(e),[a,r]),c=Hi(r),u=_(r,Ge),d=_(r,ut),p=_(r,it),{autoHeight:f}=t,g=o,h=_(r,ve),m=Xr(t.rowHeight,qi.rowHeight),C=Math.floor(m*h),v=Math.floor(t.columnHeaderHeight*h),y=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*h),x=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*h),S=_(r,Qi),A=ln(r,t),R=i.left.reduce((e,t)=>e+t.computedWidth,0),M=i.right.reduce((e,t)=>e+t.computedWidth,0),I=Nn(r,t),P={rowHeight:C,headerHeight:v,columnsTotalWidth:S,leftPinnedWidth:R,rightPinnedWidth:M,topPinnedHeight:A,bottomPinnedHeight:0,scrollbarSize:t.scrollbarSize},k=(0,V.A)(Zi).current,E=_(r,ft),F=_(r,yi),D=Math.min(F.enabled?F.paginationModel.pageSize:E,E),{getRowHeight:T,getEstimatedRowHeight:H,getRowSpacing:O}=t,$=t.slots.row,z=t.slotProps?.row,L=(_(r,ji),(e=>{const t=(0,V.A)(()=>new kl(hi.map(t=>t.initialize(e)).reduce((e,t)=>
1Object.assign(e,t),{}))).current,r={};for(const o of hi)Object.assign(r,o.use(t,e,r));return{store:t,api:r}})({refs:{container:r.current.mainElementRef,scroller:r.current.virtualScrollerRef,scrollbarVertical:r.current.virtualScrollbarVerticalRef,scrollbarHorizontal:r.current.virtualScrollbarHorizontalRef},dimensions:P,virtualization:{isRtl:e,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx},colspan:{enabled:u,getColspan:w.useCallback((e,t)=>{if("function"==typeof t.colSpan){const o=r.current.getRow(e),n=r.current.getRowValue(o,t);return t.colSpan(n,o,t,r)??0}return t.colSpan??1},[r])},initialState:{scroll:t.initialState?.scroll,rowSpanning:r.current.state.rowSpanning,virtualization:r.current.state.virtualization},rows:c.rows,range:c.range,rowCount:D,columns:n,pinnedRows:l,pinnedColumns:i,autoHeight:f,disableHorizontalScroll:o,disableVerticalScroll:"noColumnsOverlay"===I.overlayType||"skeleton"===I.loadingOverlayVariant,minimalContentHeight:qr,getRowHeight:w.useMemo(()=>{if(T)return e=>T((0,b.A)({},e,{densityFactor:h}))},[T,h]),getEstimatedRowHeight:w.useMemo(()=>H?e=>H((0,b.A)({},e,{densityFactor:h})):void 0,[H,h]),getRowSpacing:w.useMemo(()=>O?e=>{const t=c.rowIdToIndexMap.get(e.id)??-1,o={isFirstVisible:0===t,isLastVisible:t===c.rows.length-1,indexRelativeToCurrentPage:t};return O((0,b.A)({},e,o,{indexRelativeToCurrentPage:r.current.getRowIndexRelativeToVisibleRows(e.id)}))}:void 0,[r,O,c.rows,c.rowIdToIndexMap]),applyRowHeight:(0,It.A)((e,t)=>r.current.unstable_applyPipeProcessors("rowHeight",e,t)),virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight,focusedVirtualCell:(0,It.A)(()=>ji(r)),resizeThrottleMs:t.resizeThrottleMs,onResize:(0,It.A)(e=>r.current.publishEvent("resize",e)),onWheel:(0,It.A)(e=>{r.current.publishEvent("virtualScrollerWheel",{},e)}),onTouchMove:(0,It.A)(e=>{r.current.publishEvent("virtualScrollerTouchMove",{},e)}),onRenderContextChange:(0,It.A)(e=>{r.current.publishEvent("renderedRowsIntervalChange",e)}),onScrollChange:w.useCallback((e,t)=>{r.current.publishEvent("scrollPositionChange",{top:e.top,left:e.left,renderContext:t})},[r]),scrollReset:g,renderRow:w.useCallback(e=>(0,ie.jsx)($,(0,b.A)({row:e.model,rowId:e.id,index:e.rowIndex,selected:s(e.id),offsetLeft:e.offsetLeft,columnsTotalWidth:S,rowHeight:e.baseRowHeight,pinnedColumns:i,visibleColumns:n,firstColumnIndex:e.firstColumnIndex,lastColumnIndex:e.lastColumnIndex,focusedColumnIndex:e.focusedColumnIndex,isFirstVisible:e.isFirstVisible,isLastVisible:e.isLastVisible,isNotVisible:e.isVirtualFocusRow,showBottomBorder:e.showBottomBorder,scrollbarWidth:d,gridHasFiller:p},z),e.id),[S,p,s,i,$,z,d,n]),renderInfiniteLoadingTrigger:w.useCallback(e=>r.current.getInfiniteLoadingTriggerElement?.({lastRowId:e}),[r])}));return mi(()=>{r.current.store.state.dimensions=k(L.store.state.dimensions,v,y,x,A),r.current.store.state.rowsMeta=L.store.state.rowsMeta,r.current.store.state.virtualization=L.store.state.virtualization}),Il(L.store,Gl.selectors.dimensions,(e,t)=>{t.isReady&&r.current.setState(e=>(0,b.A)({},e,{dimensions:k(t,v,y,x,A)}))}),Il(L.store,Gl.selectors.rowsMeta,(e,t)=>{t!==r.current.state.rowsMeta&&r.current.setState(e=>(0,b.A)({},e,{rowsMeta:t}))}),Il(L.store,ei.selectors.store,(e,t)=>{t.renderContext!==Zl&&t!==r.current.state.virtualization&&r.current.setState(e=>(0,b.A)({},e,{virtualization:t}))}),r.current.register("private",{virtualizer:L}),(e=>{const t=e.current.virtualizer,{getRowHeight:r,setLastMeasuredRowIndex:o,storeRowHeightMeasurement:n,resetRowHeights:l,hydrateRowsMeta:i,observeRowHeight:a,rowHasAutoHeight:s,getRowHeightEntry:c,getLastMeasuredRowIndex:u}=t.api.rowsMeta;Xi(e,"rowHeight",i);const d={hydrateRowsMeta:i,observeRowHeight:a,rowHasAutoHeight:s,getRowHeightEntry:c,getLastMeasuredRowIndex:u};_i(e,{unstable_getRowHeight:r,unstable_setLastMeasuredRowIndex:o,unstable_storeRowHeightMeasurement:n,resetRowHeights:l},"public"),_i(e,d,"private")})(r),L}().api.getters,{getContainerProps:f,getScrollerProps:g,getContentProps:h,getScrollbarVerticalProps:m,getScrollbarHorizontalProps:C,getRows:v,getScrollAreaProps:y}=p,x=v(void 0,bt(t));return(0,ie.jsxs)(Jn,(0,b.A)({className:d.root},f(),{ownerState:u,children:[(0,ie.jsx)(fn,(0,b.A)({scrollDirection:"left"},y())),(0,ie.jsx)(fn,(0,b.A)({scrollDirection:"right"},y())),(0,ie.jsx)(fn,(0,b.A)({scrollDirection:"up"},y())),(0,ie.jsx)(fn,(0,b.A)({scrollDirection:"down"},y())),(0,ie.jsxs)(Ji,(0,b.A)({className:d.scroller},g(),{ownerState:u,children:[(0,ie.jsxs)(tl,{children:[!r.listView&&(0,ie.jsx)(Yn,{}),(0,ie.jsx)(r.slots.pinnedRows,{position:"top",virtualScroller:p})]}),a&&(0,ie.jsx)(Al,{overlayType:a,loadingOverlayVariant:s,children:(0,ie.jsx)(c,(0,b.A)({},r.slotProps?.[a]))}),(0,ie.jsx)(ol,(0,b.A)({},h(),{children:(0,ie.jsxs)(pl,{role:"rowgroup",children:[x,(0,ie.jsx)(r.slots.detailPanels,{virtualScroller:p})]})})),i&&(0,ie.jsx)(cl,{rowsLength:x.length}),(0,ie.jsx)(r.slots.bottomContainer,{children:(0,ie.jsx)(r.slots.pinnedRows,{position:"bottom",virtualScroller:p})})]})),n&&(0,ie.jsxs)(w.Fragment,{children:[r.pinnedColumnsSectionSeparator?.endsWith("shadow")&&(0,ie.jsx)(yl,{position:"horizontal"}),(0,ie.jsx)(Cl,(0,b.A)({position:"horizontal"},C()))]}),o&&(0,ie.jsxs)(w.Fragment,{children:[r.pinnedRowsSectionSeparator?.endsWith("shadow")&&(0,ie.jsx)(yl,{position:"vertical"}),(0,ie.jsx)(Cl,(0,b.A)({position:"vertical"},m()))]}),n&&o&&(0,ie.jsx)(wl,{"aria-hidden":"true"}),e.children]}))}function ra(){const e=oe();return e.hideFooter?null:(0,ie.jsx)(e.slots.footer,(0,b.A)({},e.slotProps?.footer))}const oa=["className","children","sidePanel"],na=y(function(e,t){const r=oe(),{className:o,children:n,sidePanel:l}=e,i=(0,x.A)(e,oa),a=Y(),s=_(a,Ce),c=a.current.rootElementRef,u=w.useCallback(e=>{null!==e&&a.current.publishEvent("rootMount",e)},[a]),d=(0,A.A)(c,t,u),p=r,f=((e,t)=>{const{autoHeight:r,classes:o,showCellVerticalBorder:n}=e,l={root:["root",r&&"autoHeight",`root--density${(0,R.A)(t)}`,null===e.slots.toolbar&&"root--noToolbar","withBorderColor",n&&"withVerticalBorder"]};return(0,M.A)(l,T,o)})(p,s),g=w.useContext(ae);return(0,N.useSyncExternalStore)(ye,xe,Se)?null:(0,ie.jsxs)(J,(0,b.A)({className:(0,S.A)(f.root,o,g.className,l&&H.withSidePanel),ownerState:p},i,{ref:d,children:[(0,ie.jsxs)("div",{className:H.mainContent,role:"presentation",children:[(0,ie.jsx)(Je,{}),(0,ie.jsx)(ta,{children:n}),(0,ie.jsx)(ra,{})]}),l,g.tag]}))}),la=k(na);function ia(e,t){const r=bt(e),o=mn(e),n=An(e),l=r[t];if(!l||"group"!==l.type)return[];const i=[];for(let a=o.findIndex(e=>e===t)+1;a<o.length&&r[o[a]]?.depth>l.depth;a+=1){const t=o[a];!1!==n[t]&&e.current.isRowSelectable(t)&&i.push(t)}return i}const aa=ge(De,bt,An,Wi,mt,Qr,(e,t,r,o,n,l,{groupId:i,autoSelectParents:a})=>{const s=t[i],c={id:i,row:n[i],columns:e};let u=!0;if("function"==typeof l&&(u=l(c)),!s||"group"!==s.type||o.has(i))return{isIndeterminate:!1,isChecked:o.has(i),isSelectable:u};let d=!1,p=!1;const f=e=>{if(!1===r[e]||d&&p)return;const n=t[e];
1"group"===n?.type&&n.children.forEach(f),o.has(e)?d=!0:p=!0};return f(i),{isIndeterminate:d&&p,isChecked:!!a&&d&&!p,isSelectable:u}});function sa(e){return e.signature===bi.DataGrid?e.checkboxSelection&&!0!==e.disableMultipleRowSelection:!e.disableMultipleRowSelection}const ca=(e,t,r,o,n,l,i=Wi(e))=>{const a=An(e),s=new Set([]);if((o||n)&&!1!==a[r]){if(o){const o=t[r];"group"===o?.type&&ia(e,r).forEach(e=>{l(e),s.add(e)})}if(n){const o=e=>{if(!i.has(e)&&!s.has(e))return!1;const r=t[e];return!!r&&("group"!==r.type||r.children.every(o))},n=r=>{const i=((e,t,r)=>{const o=e[r];if(!o)return[];const n=o.parent;return null==n?[]:e[n].children.filter(e=>e!==r&&!1!==t[e])})(t,a,r);if(0===i.length||i.every(o)){const o=t[r],i=o?.parent;null!=i&&i!==$r&&e.current.isRowSelectable(i)&&(l(i),s.add(i),n(i))}},c=t[r];if(!c||c.parent===$r)return;n(r)}}},ua=(e,t,r,o,n,l)=>{const i=Wi(e);if(n||o){if(n){const e=((e,t)=>{const r=[];let o=t;for(;null!=o&&o!==$r;){const t=e[o];if(!t)return r;r.push(o),o=t.parent}return r})(t,r);e.forEach(e=>{i.has(e)&&l(e)})}if(o){const o=t[r];"group"===o?.type&&ia(e,r).forEach(e=>{l(e)})}}};function da({privateApiRef:e,configuration:t,props:r,children:o}){const n=w.useRef(e.current.getPublicApi());return(0,ie.jsx)(ne.Provider,{value:t,children:(0,ie.jsx)(re.Provider,{value:r,children:(0,ie.jsx)(X.Provider,{value:e,children:(0,ie.jsx)(qe.Provider,{value:n,children:(0,ie.jsx)(Qe,{children:(0,ie.jsx)(ce,{children:o})})})})})})}const pa=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(e){return!1}}()&&null!=window.localStorage.getItem("DEBUG"),fa=()=>{},ga={debug:fa,info:fa,warn:fa,error:fa},ha=["debug","info","warn","error"];function ma(e,t,r=console){const o=ha.indexOf(t);if(-1===o)throw new Error(`MUI X: Log level ${t} not recognized.`);return ha.reduce((t,n,l)=>(t[n]=l>=o?(...t)=>{const[o,...l]=t;r[n](`MUI X: ${e} - ${o}`,...l)}:fa,t),{})}function ba(e){return ba="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},ba(e)}function wa(e){var t=function(e){if("object"!=ba(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ba(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ba(t)?t:t+""}let Ca=function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e}({});const va="none",ya={dataSourceRowsUpdate:Ca.DataSource,rowTreeCreation:Ca.RowTree,filtering:Ca.RowTree,sorting:Ca.RowTree,visibleRowsLookupCreation:Ca.RowTree},xa=(e,t)=>(0,b.A)({},e,{props:{listView:t.listView,getRowId:t.getRowId,isCellEditable:t.isCellEditable}}),Sa=(e,t,r,o)=>{const n=w.useRef(o),l=w.useRef(!1);o!==n.current&&(l.current=!1,n.current=o),l.current||(t.current.state=e(t.current.state,r,t),l.current=!0)};function Aa(e,t){const r=w.useRef(null);if(r.current)return r.current;const o=e.current.getLogger(t);return r.current=o,o}const Ra=(e,t,r,o,n)=>{const l=Aa(e,"useNativeEventListener");Ot(e,"rootMount",()=>{const e=t();if(e&&r)return l.debug(`Binding native ${r} event`),e.addEventListener(r,o,n),()=>{l.debug(`Clearing native ${r} event`),e.removeEventListener(r,o,n)}})},Ma=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],Ia=y(function(e,t){const{field:r,id:o,rowNode:n,tabIndex:l}=e,i=(0,x.A)(e,Ma),a=_e(),s=oe(),c=(e=>{const{classes:t}=e;return(0,M.A)({root:["checkboxInput"]},T,t)})({classes:s.classes}),{isIndeterminate:u,isChecked:d,isSelectable:p}=_(a,aa,{groupId:o,autoSelectParents:s.rowSelectionPropagation?.parents??!1}),f=!p;w.useLayoutEffect(()=>{if(0===l){const e=a.current.getCellElement(o,r);e&&(e.tabIndex=-1)}},[a,l,o,r]);const g=(0,It.A)(e=>{" "===e.key&&e.stopPropagation()}),h=(0,It.A)(e=>{f&&e.preventDefault()}),m=(0,It.A)(()=>{});if("footer"===n.type||"pinnedRow"===n.type)return null;const C=a.current.getLocaleText(d&&!u?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,ie.jsx)(s.slots.baseCheckbox,(0,b.A)({tabIndex:l,checked:d&&!u,onCh
1ange:e=>{if(f)return;const t={value:e.target.checked,id:o};a.current.publishEvent("rowSelectionCheckboxChange",t,e)},onClick:h,onMouseDown:m,className:(0,S.A)(c.root,f&&"Mui-disabled"),material:{disableRipple:f},slotProps:{htmlInput:{"aria-disabled":f||void 0,"aria-label":C,name:"select_row"}},onKeyDown:g,indeterminate:u},s.slotProps?.baseCheckbox,i,{ref:t}))}),Pa=Ia,ka=["field","colDef"],Ea=y(function(e,t){const r=(0,x.A)(e,ka),[,o]=w.useState(!1),n=_e(),l=oe(),i=(e=>{const{classes:t}=e;return(0,M.A)({root:["checkboxInput"]},T,t)})({classes:l.classes}),a=_(n,qn),s=_(n,Gi),c=_(n,Mn),u=_(n,Fi),d=w.useMemo(()=>{const e=l.isRowSelectable;if("function"!=typeof e)return s;if("exclude"===s.type)return s;const t={type:"include",ids:new Set};for(const r of s.ids)l.keepNonExistentRowsSelected&&t.ids.add(r),n.current.getRow(r)&&e(n.current.getRowParams(r))&&t.ids.add(r);return t},[n,l.isRowSelectable,l.keepNonExistentRowsSelected,s]),p=w.useMemo(()=>{const e=l.pagination&&l.checkboxSelectionVisibleOnly&&"server"!==l.paginationMode?u:c,t=new Set;for(let r=0;r<e.length;r+=1){const o=e[r];n.current.getRow(o)&&n.current.isRowSelectable(o)&&t.add(o)}return t},[n,l.pagination,l.paginationMode,l.checkboxSelectionVisibleOnly,u,c]),f=w.useMemo(()=>{const e=Bi(d);let t=0;for(const r of p)e.has(r)&&(t+=1);return t},[d,p]),g=w.useMemo(()=>{if(0===f)return!1;const e=Bi(d);for(const t of p)if(!e.has(t))return!0;return!1},[f,d,p]),h=f>0,m=null!==a&&a.field===e.field?0:-1;w.useLayoutEffect(()=>{const t=n.current.getColumnHeaderElement(e.field);0===m&&t&&(t.tabIndex=-1)},[m,n,e.field]);const C=w.useCallback(e=>{" "===e.key&&n.current.publishEvent("headerSelectionCheckboxChange",{value:!h})},[n,h]),v=w.useCallback(()=>{o(e=>!e)},[]);w.useEffect(()=>n.current.subscribeEvent("rowSelectionChange",v),[n,v]);const y=n.current.getLocaleText(h&&!g?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,ie.jsx)(l.slots.baseCheckbox,(0,b.A)({indeterminate:g,checked:h&&!g,onChange:e=>{const t={value:e.target.checked};n.current.publishEvent("headerSelectionCheckboxChange",t)},className:i.root,slotProps:{htmlInput:{"aria-label":y,name:"select_all_rows"}},tabIndex:m,onKeyDown:C,disabled:!sa(l)},l.slotProps?.baseCheckbox,r,{ref:t}))}),Fa="__check__",Da=(0,b.A)({},po,{type:"custom",field:Fa,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,chartable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,r,o)=>{const n=Yr(o,t);return o.current.isRowSelected(n)},rowSpanValueGetter:(e,t,r,o)=>Yr(o,t),renderHeader:e=>(0,ie.jsx)(Ea,(0,b.A)({},e)),renderCell:e=>(0,ie.jsx)(Pa,(0,b.A)({},e))});function Ta(e,t){if(null==e)return"";const r="string"==typeof e?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const e=r.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(e[0])?`"'${e}"`:[t.delimiter,"\n","\r",'"'].some(e=>r.includes(e))?`"${e}"`:e}return r}const Ha=(e,t)=>{const{csvOptions:r,ignoreValueFormatter:o}=t;let n;if(o){const t=e.colDef.type;n="number"===t?String(e.value):"date"===t||"dateTime"===t?e.value?.toISOString():"function"==typeof e.value?.toString?e.value.toString():e.value}else n=e.formattedValue;return Ta(n,r)};class Oa{rowString="";isEmpty=!0;constructor(e){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 $a(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 r=document.createRange();r.selectNode(t);const o=window.getSelection();o.removeAllRanges(),o.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const za=e=>(0,b.A)({},e,{columnMenu:{open:!1}}),La=(e,t,r,o=!0)=>{const n=w.useRef(null),l=w.useRef(`mui-${Math.round(1e9*Math.random())}`),i=w.useCallback(()=>{n.current=e.current.registerPipeProcessor(t,l.current,r)},[e,r,t]);mi(()=>{o&&i()});const a=w.useRef(!0);w.useEffect(()=>(a.current?a.current=!1:o&&i(),()=>{n.current&&(n.current(),n.current=null)}),[i,o])},ja=(e,t,r)=>{r.current.caches.columns={lastColumnsProp:t.columns};const o=nn({apiRef:r,columnsToUpsert:t.columns,initialState:t.initialState?.columns,columnVisibilityModel:t.columnVisibilityModel??t.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0});return(0,b.A)({},e,{columns:o,pinnedColumns:e.pinnedColumns??Re})};const Na=(e,t)=>(0,b.A)({},e,{density:t.initialState?.density??t.density??"standard"}),Va=({apiRef:e,options:t})=>{const r=De(e);
1return t.fields?t.fields.reduce((e,t)=>{const o=r.find(e=>e.field===t);return o&&e.push(o),e},[]):(t.allColumns?r:Oe(e)).filter(e=>!0!==e.disableExport)},Ba=({apiRef:e})=>{const t=Pn(e),r=bt(e),o=Ui(e),n=t.filter(e=>"footer"!==r[e].type),l=Rt(e),i=l?.top?.map(e=>e.id)||[],a=l?.bottom?.map(e=>e.id)||[];if(n.unshift(...i),n.push(...a),o>0){const t=Ki(e);return n.filter(e=>t.has(e))}return n},Ga=y(function(e,t){const{children:r,slotProps:o={}}=e,n=o.button||{},l=o.tooltip||{},i=_e(),a=oe(),s=(0,Yt.A)(),c=(0,Yt.A)(),[u,d]=w.useState(!1),p=w.useRef(null),f=(0,A.A)(t,p),g=()=>d(!1);return null==r?null:(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(a.slots.baseTooltip,(0,b.A)({title:i.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},a.slotProps?.baseTooltip,l,{children:(0,ie.jsx)(a.slots.baseButton,(0,b.A)({size:"small",startIcon:(0,ie.jsx)(a.slots.exportIcon,{}),"aria-expanded":u,"aria-label":i.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":u?c:void 0,id:s},a.slotProps?.baseButton,n,{onClick:e=>{d(e=>!e),n.onClick?.(e)},ref:f,children:i.current.getLocaleText("toolbarExport")}))})),(0,ie.jsx)($o,{open:u,target:p.current,onClose:g,position:"bottom-end",children:(0,ie.jsx)(a.slots.baseMenuList,{id:c,className:H.menuList,"aria-labelledby":s,autoFocusItem:u,children:w.Children.map(r,e=>w.isValidElement(e)?w.cloneElement(e,{hideMenu:g}):e)})})]})}),Wa=["hideMenu","options"],Ua=["hideMenu","options"],Ka=["csvOptions","printOptions","excelOptions"];function qa(e){const t=_e(),r=oe(),{hideMenu:o,options:n}=e,l=(0,x.A)(e,Wa);return(0,ie.jsx)(r.slots.baseMenuItem,(0,b.A)({onClick:()=>{t.current.exportDataAsCsv(n),o?.()}},l,{children:t.current.getLocaleText("toolbarExportCSV")}))}function _a(e){const t=_e(),r=oe(),{hideMenu:o,options:n}=e,l=(0,x.A)(e,Ua);return(0,ie.jsx)(r.slots.baseMenuItem,(0,b.A)({onClick:()=>{t.current.exportDataAsPrint(n),o?.()}},l,{children:t.current.getLocaleText("toolbarExportPrint")}))}y(function(e,t){const r=e,{csvOptions:o={},printOptions:n={},excelOptions:l}=r,i=(0,x.A)(r,Ka),a=_e().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:l,csvOptions:o,printOptions:n}).sort((e,t)=>e.componentName>t.componentName?1:-1);return 0===a.length?null:(0,ie.jsx)(Ga,(0,b.A)({},i,{ref:t,children:a.map((e,t)=>w.cloneElement(e.component,{key:t}))}))});const Xa=(e,t)=>{const r=Aa(e,"useGridCsvExport"),o=t.ignoreValueFormatterDuringExport,n=("object"==typeof o?o?.csvExport:o)||!1,l=w.useCallback((t={})=>(r.debug("Get data as CSV"),function(e){const{columns:t,rowIds:r,csvOptions:o,ignoreValueFormatter:n,apiRef:l}=e,i=r.reduce((e,r)=>`${e}${(({id:e,columns:t,getCellParams:r,csvOptions:o,ignoreValueFormatter:n})=>{const l=new Oa({csvOptions:o});return t.forEach(t=>{const i=r(e,t.field);String(i.formattedValue),l.addValue(Ha(i,{ignoreValueFormatter:n,csvOptions:o}))}),l.getRowString()})({id:r,columns:t,getCellParams:l.current.getCellParams,ignoreValueFormatter:n,csvOptions:o})}\r\n`,"").trim();if(!o.includeHeaders)return i;const a=t.filter(e=>e.field!==Da.field),s=[];if(o.includeColumnGroupsHeaders){const e=l.current.getAllGroupDetails();let t=0;const r=a.reduce((e,r)=>{const o=l.current.getColumnGroupPath(r.field);return e[r.field]=o,t=Math.max(t,o.length),e},{});for(let n=0;n<t;n+=1){const t=new Oa({csvOptions:o,sanitizeCellValue:Ta});s.push(t),a.forEach(o=>{const l=(r[o.field]||[])[n],i=e[l];t.addValue(i?i.headerName||i.groupId:"")})}}const c=new Oa({csvOptions:o,sanitizeCellValue:Ta});return a.forEach(e=>{c.addValue(e.headerName||e.field)}),s.push(c),`${s.map(e=>e.getRowString()).join("\r\n")}\r\n${i}`.trim()}({columns:Va({apiRef:e,options:t}),rowIds:(t.getRowsToExport??Ba)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:n,apiRef:e})),[r,e,n]),i=w.useCallback(e=>{r.debug("Export data as CSV");const t=l(e);!function(e,t="csv",r=document.title||"untitled"){const o=`${r}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),r=document.createElement("a");return r.href=t,r.download=o,r.click(),void setTimeout(()=>{URL.revokeObjectURL(t)})}throw new Error("MUI X: exportAs not supported.")}(new Blob([e?.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",e?.fileName)},[r,l]);_i(e,{getDataAsCsv:l,exportDataAsCsv:i},"public");const a=w.useCallback((e,t)=>t.csvOptions?.disableToolbarButton?e:[...e,{component:(0,ie.jsx)(qa,{options:t.csvOptions}),componentName:"csvExport"}],[]);La(e,"exportMenu",a)};var Ya=r(6488);const Qa=(e,t,r)=>{let o=e.paginationModel;const n=e.rowCount,l=r?.pageSize??o.pageSize,i=r?.page??o.page,a=wi(n,l,i);!r||r?.page===o.page&&r?.pageSize===o.pageSize||(o=r);const s=-1===l?0:((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(o.page,a);return s!==o.page&&(o=(0,b.A)({},o,{page:s})),vi(o.pageSize,t),o},Za=(e,t,r,o)=>{const n=w.useCallback(()=>{e.current.registerStrategyProcessor(t,r,o)},[e,o,r,t]);mi(()=>{n()});const l=w.useRef(!0);w.useEffect(()=>{l.current?l.current=!1:n()},[n])},Ja=(e,t,r)=>{const o=t.filterModel??t.initialState?.filter?.filterModel??sr();return(0,b.A)({},e,{filter:(0,b.A)({filterModel:pr(o,t.disableMultipleColumnsFiltering,r)},ar),visibleRowsLookup:{}})},es=e=>e.filteredRowsLookup;function ts(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function rs(){return(0,ue.i5)(Object.values)}const os=e=>(0,b.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}});function ns(e,t){return e.closest(`.${t}`)}function ls(e){return e.replace(/["\\]/g,"\\$&")}function is(e){return`.${H.row}[data-id="${ls(String(e))}"]`}function as(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function ss(e,t){return e.rootElementRef.current.querySelector(`.${H[t]}`)}const cs=({api:e,colIndex:t,position:r,filterFn:o})=>{if(null===t)return[];const n=[];
1return ds(e).forEach(e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${H["left"===r?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(e=>{const t=ps(e);null!==t&&o(t)&&n.push(e)})}),n},us=({api:e,colIndex:t,position:r,filterFn:o})=>{if(!e.columnHeadersContainerRef?.current)return[];if(null===t)return[];const n=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${H["left"===r?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(e=>{const t=ps(e);null!==t&&o(t,e)&&n.push(e)}),n};function ds(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${H.row}`)}function ps(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const fs=({currentColIndex:e,firstColIndex:t,lastColIndex:r,isRtl:o})=>{if(o){if(e<r)return e+1}else if(!o&&e>t)return e-1;return null},gs=({currentColIndex:e,firstColIndex:t,lastColIndex:r,isRtl:o})=>{if(o){if(e>t)return e-1}else if(!o&&e<r)return e+1;return null},hs=he(Di,Rt,(e,t)=>(t.top||[]).concat(e.rows,t.bottom||[])),ms=(e,t)=>{const r=(0,b.A)({},Ci(t.autoPageSize),t.paginationModel??t.initialState?.pagination?.paginationModel);vi(r.pageSize,t.signature);const o=t.rowCount??t.initialState?.pagination?.rowCount??("client"===t.paginationMode?e.rows?.totalRowCount:void 0),n=t.paginationMeta??t.initialState?.pagination?.meta??{};return(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{paginationModel:r,rowCount:o,meta:n,enabled:!0===t.pagination,paginationMode:t.paginationMode})})},bs=(e,t)=>(0,b.A)({},e,{preferencePanel:t.initialState?.preferencePanel??{open:!1}}),ws=me(e=>e.editRows),Cs=ge(ws,(e,{rowId:t,editMode:r})=>r===ho.Row&&Boolean(e[t])),vs=ge(ws,(e,{rowId:t,field:r})=>e[t]?.[r]??null),ys=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;default:return""}},xs=["id","field"],Ss=["id","field"];var As=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(As||{}),Rs=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Rs||{});const Ms=["id"],Is=["id"],Ps=e=>(0,b.A)({},e,{editRows:{}}),ks=(e,t,r)=>{const o=!!t.dataSource;return r.current.caches.rows=Nr({rows:o?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,b.A)({},e,{rows:Br({apiRef:r,rowCountProp:t.rowCount,loadingProp:!!o||t.loading,previousTree:null,previousTreeDepths:null})})},Es=e=>"full"===e.updates.type?(e=>{const t={[$r]:(0,b.A)({},{type:"group",id:$r,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null},{children:e})};for(let r=0;r<e.length;r+=1){const o=e[r];t[o]={id:o,depth:0,parent:$r,type:"leaf",groupingKey:null}}return{groupingName:va,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(({previousTree:e,actions:t})=>{const r=(0,b.A)({},e),o={};for(let e=0;e<t.remove.length;e+=1){const n=t.remove[e];o[n]=!0,delete r[n]}for(let e=0;e<t.insert.length;e+=1){const o=t.insert[e];r[o]={id:o,depth:0,parent:$r,type:"leaf",groupingKey:null}}const n=r[$r];let l=[...n.children,...t.insert];return Object.values(o).length&&(l=l.filter(e=>!o[e])),r[$r]=(0,b.A)({},n,{children:l}),{groupingName:va,tree:r,treeDepths:{0:l.length},dataRowIds:l}})({previousTree:e.previousTree,actions:e.updates.actions});class Fs extends Error{}const Ds={type:"include",ids:new Set},Ts=(e,t)=>(0,b.A)({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??Ds:Ds}),Hs=(e,t)=>{const r=t.sortModel??t.initialState?.sorting?.sortModel??[];return(0,b.A)({},e,{sorting:{sortModel:Gt(r,t.disableMultipleColumnsSorting),sortedRows:[]}})};function Os(e){const{containerSize:t,scrollPosition:r,elementSize:o,elementOffset:n}=e,l=n+o;return o>t?n:l-t>r?l-t:n<r?n:void 0}const $s={width:0,height:0},zs={isReady:!1,root:$s,viewportOuterSize:$s,viewportInnerSize:$s,contentSize:$s,minimumSize:$s,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},Ls=(e,t,r)=>{const o=zs,n=ve(r),l=(0,b.A)({},o,function(e,t,r,o){const n=Xr(e.rowHeight,qi.rowHeight);return{rowHeight:Math.floor(n*r),headerHeight:Math.floor(e.columnHeaderHeight*r),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*r),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*r),columnsTotalWidth:js(t),headersTotalHeight:ln(t,e),leftPinnedWidth:o.left.reduce((e,t)=>
1e+t.computedWidth,0),rightPinnedWidth:o.right.reduce((e,t)=>e+t.computedWidth,0)}}(t,r,n,Le(r)));return r.current.store.state.dimensions=l,(0,b.A)({},e,{dimensions:l})},js=ge(Oe,Ne,(e,t)=>{const r=e.length;return 0===r?0:Rl(t[r-1]+e[r-1].computedWidth,1)});function Ns(e,t){const r=(t,r)=>e.style.setProperty(t,r);r("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),r("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),r("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),r("--DataGrid-rowWidth",`${t.rowWidth}px`),r("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),r("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),r("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),r("--DataGrid-headerHeight",`${t.headerHeight}px`),r("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),r("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),r("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),r("--height",`${t.rowHeight}px`)}function Vs(e){return void 0!==e.field}const Bs=["groupId","children"],Gs=e=>{const t={};for(let r=0;r<e.length;r+=1){const o=e[r];if(Vs(o))continue;const{groupId:n,children:l}=o,i=(0,x.A)(o,Bs);if(!n)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=(0,b.A)({},i,{groupId:n}),s=Gs(l);if(void 0!==s[n]||void 0!==t[n])throw new Error(`MUI X: The groupId ${n} is used multiple times in the columnGroupingModel.`);Object.assign(t,s),t[n]=a}return t},Ws=(e,t,r)=>{if(Vs(e)){if(void 0!==r[e.field])throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${r[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(r[e.field]=t)}const{groupId:o,children:n}=e;n.forEach(e=>{Ws(e,[...t,o],r)})},Us=e=>{if(!e)return{};const t={};return e.forEach(e=>{Ws(e,[],t)}),t},Ks=(e,t,r)=>{const o=e=>t[e]??[],n=[],l=Math.max(0,...e.map(e=>o(e).length)),i=(e,t,r)=>{const n=o(e),l=o(t);for(let e=0;e<=r;e+=1)if(n[e]!==l[e])return!1;return!0},a=(e,t)=>{const o=r?.left,n=r?.right,l=!!o?.includes(e),i=!!o?.includes(t),a=!!n?.includes(e),s=!!n?.includes(t);return l!==i||a!==s};for(let t=0;t<l;t+=1){const r=[];for(let n=0;n<e.length;n+=1){const l=e[n],s=o(l)[t]??null;if(0===r.length){r.push({columnFields:[l],groupId:s});continue}const c=r[r.length-1],u=c.columnFields[c.columnFields.length-1];c.groupId!==s||!i(u,l,t)||a(u,l)?r.push({columnFields:[l],groupId:s}):c.columnFields.push(l)}n.push(r)}return n},qs=(e,t,r)=>{if(r.current.caches.columnGrouping={lastColumnGroupingModel:t.columnGroupingModel},!t.columnGroupingModel)return(0,b.A)({},e,{columnGrouping:void 0});const o=Ee(r),n=$e(r),l=Gs(t.columnGroupingModel??[]),i=Us(t.columnGroupingModel??[]),a=Ks(o,i,r.current.state.pinnedColumns??{}),s=0===n.length?0:Math.max(...n.map(e=>i[e]?.length??0));return(0,b.A)({},e,{columnGrouping:{lookup:l,unwrappedGroupingModel:i,headerStructure:a,maxDepth:s}})},_s=!("undefined"!=typeof window&&/jsdom|HappyDOM/.test(window.navigator.userAgent)),Xs=(e,t)=>{const{disableVirtualization:r,autoHeight:o}=t,n={enabled:!r&&_s,enabledForColumns:!r&&_s,enabledForRows:!r&&!o&&_s,renderContext:Zl};return(0,b.A)({},e,{virtualization:n})},Ys={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0};function Qs(e,t){if(void 0!==t&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){const o=e.changedTouches[r];if(o.identifier===t)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Zs(e,t,r,o){let n=e;return n+="Right"===o?t-r.left:r.right-t,Math.round(n)}function Js(e,t){return t===Ae.LEFT?e?"--DataGrid-rightPinnedWidth":"--DataGrid-leftPinnedWidth":e?"--DataGrid-leftPinnedWidth":"--DataGrid-rightPinnedWidth"}function ec(e,t,r){return r===Ae.LEFT?t?e.rightPinnedWidth:e.leftPinnedWidth:t?e.leftPinnedWidth:e.rightPinnedWidth}function tc(e){e.preventDefault(),e.stopImmediatePropagation()}const rc=e=>(0,b.A)({},e,{columnResize:{resizingColumnField:""}});function oc(){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 nc=(e,t)=>{const r=(0,ko.I)(),o=Aa(e,"useGridColumnResize"),n=(0,V.A)(oc).current,l=w.useRef(null),i=w.useRef(null),a=(0,$t.A)(),s=w.useRef(void 0),c=t=>
1{o.debug(`Updating width to ${t} for col ${n.colDef.field}`);const l=n.columnHeaderElement.offsetWidth,i=t-l,a=t-n.initialColWidth;if(a>0){const t=n.initialTotalWidth+a;e.current.rootElementRef?.current?.style.setProperty("--DataGrid-rowWidth",`${t}px`)}n.colDef.computedWidth=t,n.colDef.width=t,n.colDef.flex=0,n.columnHeaderElement.style.width=`${t}px`;const s=n.headerFilterElement;s&&(s.style.width=`${t}px`),n.groupHeaderElements.forEach(e=>{const r=e;let o;o="1"===r.getAttribute("aria-colspan")?`${t}px`:`${r.offsetWidth+i}px`,r.style.width=o}),n.cellElements.forEach(e=>{const r=e;let o;o="1"===r.getAttribute("aria-colspan")?`${t}px`:`${r.offsetWidth+i}px`,r.style.setProperty("--width",o)});const c=tt(e),u=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,n.colDef.field);u===Ae.LEFT&&(lc(n.fillerLeft,"width",i),n.leftPinnedCellsAfter.forEach(e=>{lc(e,"left",i)}),n.leftPinnedHeadersAfter.forEach(e=>{lc(e,"left",i)}),e.current.rootElementRef?.current?.style.setProperty(Js(r,u),`${ec(c,r,u)+a}px`)),u===Ae.RIGHT&&(lc(n.fillerRight,"width",i),n.rightPinnedCellsBefore.forEach(e=>{lc(e,"right",i)}),n.rightPinnedHeadersBefore.forEach(e=>{lc(e,"right",i)}),e.current.rootElementRef?.current?.style.setProperty(Js(r,u),`${ec(c,r,u)+a}px`))},u=t=>{if(C(),n.previousMouseClickEvent){const r=n.previousMouseClickEvent,o=r.timeStamp,l=r.clientX,i=r.clientY;if(t.timeStamp-o<300&&t.clientX===l&&t.clientY===i)return n.previousMouseClickEvent=void 0,void e.current.publishEvent("columnResizeStop",null,t)}if(n.colDef){e.current.setColumnWidth(n.colDef.field,n.colDef.width),o.debug(`Updating col ${n.colDef.field} with new width: ${n.colDef.width}`);const t=ke(e);n.groupHeaderElements.forEach(e=>{const r=e,o=`${e.getAttribute("data-fields").slice(2,-2).split("-|-").reduce((e,r)=>!1!==t.columnVisibilityModel[r]?e+t.lookup[r].computedWidth:e,0)}px`;r.style.width=o})}a.start(0,()=>{e.current.publishEvent("columnResizeStop",null,t)})},d=(t,o,a)=>{const s=e.current.rootElementRef.current;var c,u;n.initialColWidth=t.computedWidth,n.initialTotalWidth=e.current.getRootDimensions().rowWidth,n.colDef=t,n.columnHeaderElement=(c=e.current.columnHeadersContainerRef.current,u=t.field,c.querySelector(`[data-field="${ls(u)}"]`));const d=s.querySelector(`.${H.headerFilterRow} [data-field="${ls(t.field)}"]`);d&&(n.headerFilterElement=d),n.groupHeaderElements=function(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${ls(t)}-|"]`)??[])}(e.current.columnHeadersContainerRef?.current,t.field),n.cellElements=function(e,t){if(!ns(e,H.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,n=[];return t.virtualScrollerRef?.current?(ds(t).forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;let l=o;const i=t.unstable_getCellColSpanInfo(r,o);i&&i.spannedByColSpan&&(l=i.leftVisibleCellIndex);const a=e.querySelector(`[data-colindex="${l}"]`);a&&n.push(a)}),n):[]}(n.columnHeaderElement,e.current),n.fillerLeft=ss(e.current,r?"filler--pinnedRight":"filler--pinnedLeft"),n.fillerRight=ss(e.current,r?"filler--pinnedLeft":"filler--pinnedRight");const p=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,n.colDef.field);n.leftPinnedCellsAfter=p!==Ae.LEFT?[]:function(e,t,r){const o=ps(t);return cs({api:e,colIndex:o,position:r?"right":"left",filterFn:e=>r?e<o:e>o})}(e.current,n.columnHeaderElement,r),n.rightPinnedCellsBefore=p!==Ae.RIGHT?[]:function(e,t,r){const o=ps(t);return cs({api:e,colIndex:o,position:r?"left":"right",filterFn:e=>r?e>o:e<o})}(e.current,n.columnHeaderElement,r),n.leftPinnedHeadersAfter=p!==Ae.LEFT?[]:function(e,t,r){const o=ps(t);return us({api:e,position:r?"right":"left",colIndex:o,filterFn:e=>r?e<o:e>o})}(e.current,n.columnHeaderElement,r),n.rightPinnedHeadersBefore=p!==Ae.RIGHT?[]:function(e,t,r){const o=ps(t);return us({api:e,position:r?"left":"right",colIndex:o,filterFn:(e,t)=>!t.classList.contains(H["columnHeader--last"])&&(r?e>o:e<o)})}(e.current,n.columnHeaderElement,r),i.current=function(e,t){const r=e.classList.contains(H["columnSeparator--sideRight"])?"Right":"Left";return t?function(e){return"Right"===e?"Left":"Right"}(r):r}(o,r),l.current=function(e,t,r){return"Left"===r?e-t.left:t.right-e}(a,n.columnHeaderElement.getBoundingClientRect(),i.current)},p=(0,It.A)(u),f=(0,It.A)(t=>{if(0===t.buttons)return void p(t);let r=Zs(l.current,t.clientX,n.columnHeaderElement.getBoundingClientRect(),i.current);r=rr(r,n.colDef.minWidth,n.colDef.maxWidth),c(r);const o={element:n.columnHeaderElement,colDef:n.colDef,width:r};e.current.publishEvent("columnResize",o,t)}),g=(0,It.A)(e=>{Qs(e,s.current)&&u(e)}),h=(0,It.A)(t=>{const r=Qs(t,s.current);if(!r)return;if("mousemove"===t.type&&0===t.buttons)return void g(t);let o=Zs(l.current,r.x,n.columnHeaderElement.getBoundingClientRect(),i.current);o=rr(o,n.colDef.minWidth,n.colDef.maxWidth),c(o);const a={element:n.columnHeaderElement,colDef:n.colDef,width:o};e.current.publishEvent("columnResize",a,t)}),m=(0,It.A)(t=>{const r=ns(t.target,H["columnSeparator--resizable"]);if(!r)return;const n=t.changedTouches[0];null!=n&&(s.current=n.identifier);const l=ns(t.target,H.columnHeader).getAttribute("data-field"),i=e.current.getColumn(l);o.debug(`Start Resize on col ${i.field}`),e.current.publishEvent("columnResizeStart",{field:l},t),d(i,r,n.clientX);const a=(0,Tl.A)(t.currentTarget);a.addEventListener("touchmove",h),a.addEventListener("touchend",g)}),C=w.useCallback(()=>{const t=(0,Tl.A)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",f),t.removeEventListener("mouseup",p),t.removeEventListener("touchmove",h),t.removeEventListener("touchend",g),setTimeout(()=>{t.removeEventListener("click",tc,!0)},100),n.columnHeaderElement&&(n.columnHeaderElement.style.pointerEvents="unset")},[e,n,f,p,h,g]),v=w.useCallback(({field:t})=>{e.current.setState(e=>(0,b.A)({},e,{columnResize:(0,b.A)({},e.columnResize,{resizingColumnField:t})}))},[e]),y=w.useCallback(()=>{e.current.setState(e=>(0,b.A)({},e,{columnResize:(0,b.A)({},e.columnResize,{resizingColumnField:""})}))},[e]),x=(0,It.A)(({colDef:t},r)=>{if(0!==r.button)return;if(!r.currentTarget.classList.contains(H["columnSeparator--resizable"]))return;r.preventDefault(),o.debug(`Start Resize on col ${t.field}`),e.current.publishEvent("columnResizeStart",{field:t.field},r),d(t,r.currentTarget,r.clientX);const l=(0,Tl.A)(e.current.rootElementRef.current);l.body.style.cursor="col-resize",n.previousMouseClickEvent=r.nativeEvent,l.addEventListener("mousemove",f),l.addEventListener("mouseup",p),l.addEventListener("click",tc,!0)}),S=(0,It.A)((r,o)=>{if(t.disableAutosize)return;if(0!==o.button)return;const n=e.current.state.columns.lookup[r.field];!1!==n.resizable&&e.current.autosizeColumns((0,b.A)({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[n.field]}))}),A=function(e){const t=w.useRef(void 0),r=()=>$i(e),o=_(e,r);return w.useEffect(()=>{t.current&&!1===o&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(!1===r())return Promise.resolve();t.current=function(){let e,t;const r=new Promise((r,o)=>{e=r,t=o});return r.resolve=e,r.reject=t,r}()}return t.current}}(e),R=w.useRef(!1),M=w.useCallback(async r=>{const o=e.current.rootElementRef?.current;if(!o)return;if(R.current)return;R.current=!0;const n=ke(e),l=(0,b.A)({},Ys,r,{columns:r?.columns??n.orderedFields});l.columns=l.columns.filter(e=>!1!==n.columnVisibilityModel[e]);const i=l.columns.map(t=>e.current.state.columns.lookup[t]);try{!t.disableVirtualization&&l.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await A());const r=function(e,t,r){const o={},n=e.current.rootElementRef.current;return n.classList.add(H.autosizing),r.forEach(r=>{const n=function(e,t){const r=e.virtualScrollerRef.current;return Array.from(r.querySelectorAll(`:scope > div > div > div > [data-field="${ls(t)}"][role="gridcell"]`))}(e.current,r.field),l=n.map(e=>e.getBoundingClientRect().width??0),i=t.includeOutliers?l:function(e,t){if(e.length<4)return e;const r=e.slice();r.sort((e,t)=>
1e-t);const o=r[Math.floor(.25*r.length)],n=r[Math.floor(.75*r.length)-1],l=n-o,i=l<5?5:l*t;return r.filter(e=>e>o-i&&e<n+i)}(l,t.outliersFactor);if(t.includeHeaders){const t=(a=e.current,s=r.field,a.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${ls(s)}"][role="columnheader"]`));if(t){const e=t.querySelector(`.${H.columnHeaderTitle}`),r=t.querySelector(`.${H.columnHeaderTitleContainerContent}`),o=t.querySelector(`.${H.iconButtonContainer}`),n=t.querySelector(`.${H.menuIcon}`),l=e??r,a=window.getComputedStyle(t,null),s=parseInt(a.paddingLeft,10)+parseInt(a.paddingRight,10),c=l.scrollWidth+1+s+(o?.clientWidth??0)+(n?.clientWidth??0);i.push(c)}}var a,s;const c=r.minWidth!==-1/0&&void 0!==r.minWidth,u=r.maxWidth!==1/0&&void 0!==r.maxWidth,d=c?r.minWidth:0,p=u?r.maxWidth:1/0,f=0===i.length?0:Math.max(...i);o[r.field]=rr(f,d,p)}),n.classList.remove(H.autosizing),o}(e,l,i),o=i.map(e=>(0,b.A)({},e,{width:r[e.field],computedWidth:r[e.field],flex:0}));if(l.expand){const t=n.orderedFields.map(e=>n.lookup[e]).filter(e=>!1!==n.columnVisibilityModel[e.field]).reduce((e,t)=>e+(r[t.field]??t.computedWidth??t.width),0),l=e.current.getRootDimensions().viewportInnerSize.width-t;if(l>0){const e=l/(o.length||1);o.forEach(t=>{t.width+=e,t.computedWidth+=e})}}e.current.updateColumns(o),o.forEach((t,r)=>{if(t.width!==i[r].width){const r=t.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:r})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),R.current=!1}},[e,A,t.disableVirtualization]);w.useEffect(()=>C,[C]),(0,fl.A)(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),Ra(e,()=>e.current.columnHeadersContainerRef?.current,"touchstart",m,{passive:!0}),_i(e,{autosizeColumns:M},"public"),Tt(e,"columnResizeStop",y),Tt(e,"columnResizeStart",v),Tt(e,"columnSeparatorMouseDown",x),Tt(e,"columnSeparatorDoubleClick",S),Ot(e,"columnResize",t.onColumnResize),Ot(e,"columnWidthChange",t.onColumnWidthChange)};function lc(e,t,r){e&&(e.style[t]=`${Math.round(parseFloat(e.style[t]))+r}px`)}function ic(e){return 0!==e.firstRowIndex||0!==e.lastRowIndex}const ac=(e,t,r)=>{if(!e)return null;const o=e[t.field];return t.rowSpanValueGetter?t.rowSpanValueGetter(o,e,t,r):jr(e,t,r)},sc={caches:{spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},processedRange:{firstRowIndex:0,lastRowIndex:0}},cc=e=>(0,b.A)({},e,{rowSpanning:sc}),uc=(e,t,r)=>(0,b.A)({},e,{listViewColumn:t.listViewColumn?(0,b.A)({},t.listViewColumn,{computedWidth:dc(r)}):void 0});function dc(e){return tt(e).viewportInnerSize.width}const pc=ge(yn,wn,Si,(e,t,r)=>({groupKeys:[],paginationModel:r,sortModel:t,filterModel:e,start:r.page*r.pageSize,end:r.page*r.pageSize+r.pageSize-1}));let fc=function(e){return e.Default="set-flat-rows",e.LazyLoading="replace-row-range",e.GroupedData="set-grouped-rows",e}({});class gc{constructor(e){this.chunkSize=e}getCacheKeys=e=>{if(this.chunkSize<1||"number"!=typeof e.start)return[e];const t=[];for(let r=e.start;r<=e.end;r+=this.chunkSize){const o=Math.min(r+this.chunkSize-1,e.end);t.push((0,b.A)({},e,{start:r,end:o}))}return t};splitResponse=(e,t)=>{const r=this.getCacheKeys(e);if(1===r.length)return new Map([[e,t]]);const o=new Map;return r.forEach(r=>{const n=r.end===e.end,l=(0,b.A)({},t,{pageInfo:(0,b.A)({},t.pageInfo,{hasNextPage:void 0!==t.pageInfo?.hasNextPage&&!n||t.pageInfo?.hasNextPage,nextCursor:void 0===t.pageInfo?.nextCursor||n?t.pageInfo?.nextCursor:t.rows[r.end+1].id}),rows:"number"!=typeof r.start||"number"!=typeof e.start?t.rows:t.rows.slice(r.start-e.start,r.end-e.start+1)});o.set(r,l)}),o};static mergeResponses=e=>1===e.length?e[0]:e.reduce((e,t)=>(0,b.A)({},t,{rows:[...e.rows,...t.rows]}),{rows:[],rowCount:0,pageInfo:{}})}function hc(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}class mc{constructor({ttl:e=3e5,getKey:t=hc}){this.cache={},this.ttl=e,this.getKey=t}set(e,t){const r=this.getKey(e),o=Date.now()+this.ttl;this.cache[r]={value:t,expiry:o}}get(e){const t=this.getKey(e),r=this.cache[t];if(r){if(!(Date.now()>r.expiry))return r.value;delete this.cache[t]}}clear(){this.cache={}}}
1class bc extends Error{constructor(e){super(e.message),this.name="GridGetRowsError",this.params=e.params,this.cause=e.cause}}class wc extends Error{constructor(e){super(e.message),this.name="GridUpdateRowError",this.params=e.params,this.cause=e.cause}}const Cc=["skipCache","keepChildrenExpanded"],vc={clear:()=>{},get:()=>{},set:()=>{}};function yc(e,t={}){return null===e?vc:e??new mc(t)}const xc=(e,t,r)=>{((e,t)=>{(e=>{const t=w.useRef(null),r=w.useRef(null),o=w.useRef(null),n=w.useRef(null),l=w.useRef(null),i=w.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:r,virtualScrollerRef:o,virtualScrollbarVerticalRef:n,virtualScrollbarHorizontalRef:l,columnHeadersContainerRef:i})})(e),((e,t)=>{const r=w.useRef(!0);w.useEffect(()=>{r.current?r.current=!1:e.current.setState(e=>(0,b.A)({},e,{props:{listView:t.listView,getRowId:t.getRowId,isCellEditable:t.isCellEditable,isRowSelectable:t.isRowSelectable}}))},[e,t.listView,t.getRowId,t.isCellEditable,t.isRowSelectable])})(e,t),(e=>{const t=(0,ko.I)();void 0===e.current.state.isRtl&&(e.current.state.isRtl=t);const r=w.useRef(!0);w.useEffect(()=>{r.current?r.current=!1:e.current.setState(e=>(0,b.A)({},e,{isRtl:t}))},[e,t])})(e),((e,t)=>{_i(e,{getLogger:w.useCallback(e=>pa?ma(e,"debug",t.logger):t.logLevel?ma(e,t.logLevel.toString(),t.logger):ga,[t.logLevel,t.logger])},"private")})(e,t),(e=>{const t=w.useRef({}),r=w.useCallback(e=>{t.current[e.stateId]=e},[]),o=w.useCallback((r,o)=>{let n;if(n="function"==typeof r?r(e.current.state):r,e.current.state===n)return!1;const l={current:{state:n}};let i=!1;const a=[];if(Object.keys(t.current).forEach(r=>{const o=t.current[r],n=o.stateSelector(e),s=o.stateSelector(l);s!==n&&(a.push({stateId:o.stateId,hasPropChanged:s!==o.propModel}),void 0!==o.propModel&&s!==o.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=n,e.current.publishEvent("stateChange",n),e.current.store.update(n)),1===a.length){const{stateId:r,hasPropChanged:n}=a[0],s=t.current[r],c=s.stateSelector(l);s.propOnChange&&n&&s.propOnChange(c,{reason:o,api:e.current}),i||e.current.publishEvent(s.changeEvent,c,{reason:o})}return!i},[e]),n={updateControlState:w.useCallback((t,r,o)=>e.current.setState(e=>(0,b.A)({},e,{[t]:r(e[t])}),o),[e]),registerControlState:r};_i(e,{setState:o},"public"),_i(e,n,"private")})(e),(e=>{const t=w.useRef({}),r=w.useRef(!1),o=w.useCallback(e=>{!r.current&&e&&(r.current=!0,Object.values(e.appliers).forEach(e=>{e()}),r.current=!1)},[]),n=w.useCallback((e,r,o)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1});const n=t.current[e];return n.processors.get(r)!==o&&(n.processors.set(r,o),n.processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>null!==e),n.processorsUpdated=!0),()=>{t.current[e].processors.set(r,null),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values()).filter(e=>null!==e)}},[]),l=w.useCallback((e,r,o)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1}),t.current[e].appliers[r]=o,()=>{const o=t.current[e].appliers,n=(0,x.A)(o,[r].map(wa));t.current[e].appliers=n}),[]),i=w.useCallback(e=>{o(t.current[e])},[o]),a=w.useCallback(()=>{for(const e in t.current){if(!Object.prototype.hasOwnProperty.call(t.current,e))continue;const r=t.current[e];r.processorsUpdated&&(r.processorsUpdated=!1,o(r))}},[o]),s={unstable_applyPipeProcessors:w.useCallback((...e)=>{const[r,o,n]=e;if(!t.current[r])return o;const l=t.current[r].processorsAsArray;let i=o;for(let e=0;e<l.length;e+=1)i=l[e](i,n);return i},[])};_i(e,{registerPipeProcessor:n,registerPipeApplier:l,requestPipeProcessorsApplication:i,runAppliersForPendingProcessors:a},"private"),_i(e,s,"public")})(e),(e=>{const t=w.useRef(new Map),r=w.useRef({}),o=w.useCallback((t,o,n)=>{const l=()=>{const e=r.current[o],n=(0,x.A)(e,[t].map(wa));r.current[o]=n};r.current[o]||(r.current[o]={});const i=r.current[o],a=i[t];return i[t]=n,a&&a!==n?(t===e.current.getActiveStrategy(ya[o])&&e.current.publishEvent("activeStrategyProcessorChange",o),l):l},[e]),n=w.useCallback((t,o)=>{const n=e.current.getActiveStrategy(ya[t]);if(null==n)throw new Error("Can't apply a strategy processor before defining an active strategy");const l=r.current[t];if(!l||!l[n])throw new Error(`No processor found for processor "${t}" on strategy "${n}"`);return(0,l[n])(o)},[e]),l=w.useCallback(e=>{const r=Array.from(t.current.entries()).find(([,t])=>t.group===e&&t.isAvailable());return r?.[0]??va},[]),i=w.useCallback((r,o,n)=>{t.current.set(o,{group:r,isAvailable:n}),e.current.publishEvent("strategyAvailabilityChange")},[e]);_i(e,{registerStrategyProcessor:o,applyStrategyProcessor:n,getActiveStrategy:l,setStrategyAvailability:i},"private")})(e),((e,t)=>{const r=w.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:r})})(e,t),e.current.register("private",{rootProps:t})})(e,t),((e,t)=>{const r=(e=>{const{classes:t}=e;return w.useMemo(()=>
1(0,M.A)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},T,t),[t])})({classes:t.classes}),o=w.useCallback(o=>{const n=(0,b.A)({},Da,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),l=t.checkboxSelection,i=null!=o.lookup[Fa];return l&&!i?(o.lookup[Fa]=n,o.orderedFields=[Fa,...o.orderedFields]):!l&&i?(delete o.lookup[Fa],o.orderedFields=o.orderedFields.filter(e=>e!==Fa)):l&&i&&(o.lookup[Fa]=(0,b.A)({},n,o.lookup[Fa]),t.columns.some(e=>e.field===Fa)||(o.orderedFields=[Fa,...o.orderedFields.filter(e=>e!==Fa)])),o},[e,r,t.columns,t.checkboxSelection]);La(e,"hydrateColumns",o)})(e,t),(e=>{Za(e,va,"rowTreeCreation",Es)})(e),Sa(xa,e,t),Sa(Ts,e,t),Sa(ja,e,t),Sa(ks,e,t),Sa(ms,e,t),Sa(Ps,e,t),Sa(os,e,t),Sa(Hs,e,t),Sa(bs,e,t),Sa(Ja,e,t),Sa(cc,e,t),Sa(Na,e,t),Sa(rc,e,t),Sa(za,e,t),Sa(qs,e,t),Sa(Xs,e,t),Sa(Ls,e,t),Sa(Yi,e,t),Sa(uc,e,t),((e,t)=>{const r=Aa(e,"useGridKeyboardNavigation"),o=(0,ko.I)(),n=w.useCallback(()=>hs(e),[e]),l="DataGrid"!==t.signature&&t.headerFilters,i=w.useCallback((t,o,n="left",l="up")=>{const i=Rn(e),a=e.current.unstable_getCellColSpanInfo(o,t);a&&a.spannedByColSpan&&("left"===n?t=a.leftVisibleCellIndex:"right"===n&&(t=a.rightVisibleCellIndex));const s=$e(e)[t],c=function(e,t,r,o){const n=gi.selectors.hiddenCells(e.current.virtualizer.store.state);if(!n[t]?.[r])return t;const l=Pn(e);let i=l.indexOf(t)+("down"===o?1:-1);for(;i>=0&&i<l.length;){const e=l[i];if(!n[e]?.[r])return e;i+="down"===o?1:-1}return t}(e,o,t,l),u=i.findIndex(e=>e.id===c);r.debug(`Navigating to cell row ${u}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:u}),e.current.setCellFocus(c,s)},[e,r]),a=w.useCallback((t,o)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const n=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(n,o)},[e,r]),s=w.useCallback((t,o)=>{r.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const n=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(n,o)},[e,r]),c=w.useCallback((t,o,n)=>{r.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:l}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(l,o,n)},[e,r]),u=w.useCallback(e=>n()[e]?.id,[n]),d=w.useCallback((r,d)=>{const p=d.currentTarget.querySelector(`.${H.columnHeaderTitleContainerContent}`);if(p&&p.contains(d.target)&&r.field!==Da.field)return;if(!Fo(d.key)&&"Tab"!==d.key)return;if("Tab"===d.key&&("none"===t.tabNavigation||"content"===t.tabNavigation&&d.shiftKey))return;const f=n(),g=e.current.getViewportPageSize(),h=r.field?e.current.getColumnIndex(r.field):0,m=f.length>0?0:null,b=f.length>0?f.length-1:null,w=Math.max(0,Oe(e).length-1),C=Jo(e);let v=!0;if("Tab"!==d.key||"content"!==t.tabNavigation||d.shiftKey){switch(d.key){case"ArrowDown":l?s(h,d):null!==m&&i(h,u(m));break;case"ArrowRight":{const e=gs({currentColIndex:h,firstColIndex:0,lastColIndex:w,isRtl:o});null!==e&&a(e,d);break}case"ArrowLeft":{const e=fs({currentColIndex:h,firstColIndex:0,lastColIndex:w,isRtl:o});null!==e&&a(e,d);break}case"ArrowUp":C>0&&c(h,C-1,d);break;case"PageDown":null!==m&&null!==b&&i(h,u(Math.min(m+g,b)));break;case"Home":a(0,d);break;case"End":a(w,d);break;case"Enter":(d.ctrlKey||d.metaKey)&&e.current.toggleColumnMenu(r.field);break;case"Tab":d.shiftKey?0===h?C>0?c(w,C-1,d):v=!1:a(h-1,d):h===w?l?s(0,d):"all"===t.tabNavigation&&null!==m?i(0,u(m)):v=!1:a(h+1,d);break;case" ":break;default:v=!1}v&&d.preventDefault()}else null!==m&&(i(0,u(m)),d.preventDefault())},[e,t.tabNavigation,n,l,s,i,u,o,a,c]),p=w.useCallback((r,l)=>{const c=qo(e)===r.field;if(_o(e)===r.field||c&&"Tab"!==l.key)return;if(!Fo(l.key)&&"Tab"!==l.key)return;if("Tab"===l.key&&("none"===t.tabNavigation||"content"===t.tabNavigation&&l.shiftKey))return;const d=n(),p=e.current.getViewportPageSize(),f=r.field?e.current.getColumnIndex(r.field):0,g=d.length>0?0:null,h=d.length>0?d.length-1:null,m=Math.max(0,Oe(e).length-1);let b=!0;
1if("Tab"!==l.key||"content"!==t.tabNavigation||l.shiftKey){switch(l.key){case"ArrowDown":null!==g&&i(f,u(g));break;case"ArrowRight":{const e=gs({currentColIndex:f,firstColIndex:0,lastColIndex:m,isRtl:o});null!==e&&s(e,l);break}case"ArrowLeft":{const t=fs({currentColIndex:f,firstColIndex:0,lastColIndex:m,isRtl:o});null!==t?s(t,l):e.current.setColumnHeaderFilterFocus(r.field,l);break}case"ArrowUp":a(f,l);break;case"PageDown":null!==g&&null!==h&&i(f,u(Math.min(g+p,h)));break;case"Home":s(0,l);break;case"End":s(m,l);break;case"Tab":l.shiftKey?0===f?a(m,l):s(f-1,l):f===m?"all"===t.tabNavigation&&null!==g?i(0,u(g)):b=!1:s(f+1,l);break;case" ":break;default:b=!1}b&&l.preventDefault()}else null!==g&&(i(0,u(g)),l.preventDefault())},[e,t.tabNavigation,n,s,o,a,i,u]),f=w.useCallback((r,o)=>{const l=Wn(e);if(null===l)return;const{field:s,depth:d}=l,{fields:p,depth:f,maxDepth:g}=r;if(!Fo(o.key)&&"Tab"!==o.key)return;if("Tab"===o.key&&("none"===t.tabNavigation||"content"===t.tabNavigation&&o.shiftKey))return;const h=n(),m=e.current.getViewportPageSize(),b=e.current.getColumnIndex(s),w=s?e.current.getColumnIndex(s):0,C=h.length>0?0:null,v=h.length>0?h.length-1:null,y=Math.max(0,Oe(e).length-1);let x=!0;if("Tab"!==o.key||"content"!==t.tabNavigation||o.shiftKey){switch(o.key){case"ArrowDown":f===g-1?a(b,o):c(b,d+1,o);break;case"ArrowUp":f>0&&c(b,d-1,o);break;case"ArrowRight":{const e=p.length-p.indexOf(s)-1;b+e+1<=y&&c(b+e+1,d,o);break}case"ArrowLeft":{const e=p.indexOf(s);b-e-1>=0&&c(b-e-1,d,o);break}case"PageDown":null!==C&&null!==v&&i(w,u(Math.min(C+m,v)));break;case"Home":c(0,d,o);break;case"End":c(y,d,o);break;case"Tab":if(o.shiftKey){const e=b-p.indexOf(s)-1;e<0?0===f?x=!1:c(y,d-1,o):c(e,d,o)}else{const e=b+(p.length-p.indexOf(s)-1)+1;e>y&&f===g-1?a(0,o):e>y?c(0,d+1,o):c(e,d,o)}break;case" ":break;default:x=!1}x&&o.preventDefault()}else null!==C&&(i(0,u(C)),o.preventDefault())},[e,t.tabNavigation,n,a,c,i,u]),g=w.useCallback((r,c)=>{if(as(c))return;const d=e.current.getCellParams(r.id,r.field);if(d.cellMode===mo.Edit||!Fo(c.key)&&"Tab"!==c.key)return;if("Tab"===c.key&&("none"===t.tabNavigation||"header"===t.tabNavigation&&!c.shiftKey))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:c,cell:d}))return;const p=n();if(0===p.length)return;const f=l?s:a,g=e.current.getViewportPageSize(),h=r.field?e.current.getColumnIndex(r.field):0,m=p.findIndex(e=>e.id===r.id),b=p.length-1,w=Math.max(0,Oe(e).length-1);let C=!0;if("Tab"===c.key&&"header"===t.tabNavigation&&c.shiftKey)return f(w,c),void c.preventDefault();switch(c.key){case"ArrowDown":m<b&&i(h,u(m+1),o?"right":"left","down");break;case"ArrowUp":m>0?i(h,u(m-1)):f(h,c);break;case"ArrowRight":{const e=gs({currentColIndex:h,firstColIndex:0,lastColIndex:w,isRtl:o});null!==e&&i(e,u(m),o?"left":"right");break}case"ArrowLeft":{const e=fs({currentColIndex:h,firstColIndex:0,lastColIndex:w,isRtl:o});null!==e&&i(e,u(m),o?"right":"left");break}case"Tab":c.shiftKey?0===h&&0===m?"all"===t.tabNavigation?f(w,c):C=!1:0===h?i(w,u(m-1)):i(h-1,u(m),"left"):h===w?m!==b?i(0,u(m+1)):C=!1:i(h+1,u(m),"right");break;case" ":{if(r.field===ro)break;const e=r.colDef;if(e&&("__tree_data_group__"===e.field||(v=e.field)===to||null!==(e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null})(v)))break;!c.shiftKey&&m<b&&i(h,u(Math.min(m+g,b)));break}case"PageDown":m<b&&i(h,u(Math.min(m+g,b)));break;case"PageUp":{const e=Math.max(m-g,0);e!==m&&e>=0?i(h,u(e)):a(h,c);break}case"Home":c.ctrlKey||c.metaKey||c.shiftKey?i(0,u(0)):i(0,u(m));break;case"End":c.ctrlKey||c.metaKey||c.shiftKey?i(w,u(b)):i(w,u(m));break;default:C=!1}var v;C&&c.preventDefault()},[e,t.tabNavigation,n,o,i,u,l,s,a]),h=w.useCallback((e,{event:t})=>" "!==t.key&&e,[]);La(e,"canStartEditing",h),Tt(e,"columnHeaderKeyDown",d),Tt(e,"headerFilterKeyDown",p),Tt(e,"columnGroupHeaderKeyDown",f),Tt(e,"cellKeyDown",g)})(e,t),((e,t)=>{const r=Aa(e,"useGridSelection"),o=w.useCallback(e=>(...r)=>{t.rowSelection&&e(...r)},[t.rowSelection]),n=_(e,xt)>1,l=t.signature!==bi.DataGrid&&(t.rowSelectionPropagation?.parents||t.rowSelectionPropagation?.desce
1ndants)&&n,i=w.useMemo(()=>t.rowSelectionModel,[t.rowSelectionModel]),a=w.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:Gi,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:c,isRowSelectable:u}=t,d=sa(t),p=w.useCallback(t=>{let r=t;const o=a.current??t,n=e.current.isRowSelected(t);if(n){const t=Mn(e),n=t.findIndex(e=>e===o),l=t.findIndex(e=>e===r);if(n===l)return;r=n>l?t[l+1]:t[l-1]}a.current=t,e.current.selectRowRange({startId:o,endId:r},!n)},[e]),f=(0,It.A)(()=>t.pagination&&t.checkboxSelectionVisibleOnly&&"client"===t.paginationMode?Fi(e):Mn(e)),g=w.useCallback((o,n)=>{if(t.signature===bi.DataGrid&&!d&&("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"));if(Gi(e)!==o){if(r.debug("Setting selection model"),null!==a.current){const e=o.ids.has(a.current);("include"===o.type&&!e||"exclude"===o.type&&e)&&(a.current=null)}e.current.setState(e=>(0,b.A)({},e,{rowSelection:t.rowSelection?o:Ds}),n)}},[e,r,t.rowSelection,t.signature,d]),h=w.useCallback(t=>Wi(e).has(t),[e]),m=w.useCallback(r=>{if(!1===t.rowSelection)return!1;if(u&&!u(e.current.getRowParams(r)))return!1;const o=wt(e,r);return"footer"!==o?.type&&"pinnedRow"!==o?.type},[e,t.rowSelection,u]),C=w.useCallback(()=>Ki(e),[e]),v=w.useCallback((o,n=!0,i=!1)=>{if(!e.current.isRowSelectable(o))return;const s=bt(e);if(a.current=n?o:null,i){r.debug(`Setting selection for row ${o}`);const i={type:"include",ids:new Set},a=e=>{i.ids.add(e)};n&&(a(o),l&&ca(e,s,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,a)),e.current.setRowSelectionModel(i,"singleRowSelection")}else{r.debug(`Toggling selection for row ${o}`);const i=Gi(e),a={type:i.type,ids:new Set(i.ids)},c=Bi(a);c.unselect(o);const u=e=>{c.select(e)},p=e=>{c.unselect(e)};n?(u(o),l&&ca(e,s,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,u)):l&&ua(e,s,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,p),("include"===a.type&&a.ids.size<2||d)&&e.current.setRowSelectionModel(a,"singleRowSelection")}},[e,r,l,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,d]),y=w.useCallback((o,n=!0,i=!1)=>{if(r.debug("Setting selection for several rows"),!1===t.rowSelection)return;const a=bt(e),s=new Set;for(let t=0;t<o.length;t+=1){const r=o[t];e.current.isRowSelectable(r)&&s.add(r)}const c=Gi(e);let u;if(i){if(u={type:"include",ids:s},n){const r=Bi(u);if(l){const o=e=>{r.select(e)};for(const r of s)ca(e,a,r,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,o)}}else u.ids=new Set;if(c.type===u.type&&u.ids.size===c.ids.size&&Array.from(u.ids).every(e=>c.ids.has(e)))return}else{u={type:c.type,ids:new Set(c.ids)};const r=Bi(u),o=e=>{r.select(e)},i=e=>{r.unselect(e)};for(const c of s)n?(r.select(c),l&&ca(e,a,c,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,o)):(i(c),l&&ua(e,a,c,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,i))}("include"===u.type&&u.ids.size<2||d)&&e.current.setRowSelectionModel(u,"multipleRowsSelection")},[r,l,d,e,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,t.rowSelection]),x=w.useCallback(r=>{if(!n||!l||"exclude"===r.type||0===r.ids.size&&"include"===r.type)return r;const o={type:r.type,ids:new Set(r.ids)},i=bt(e),a=Bi(o),s=e=>{a.select(e)};for(const o of r.ids)ca(e,i,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,s,a);return o},[e,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,n,l]),S={selectRows:y,selectRowRange:w.useCallback(({startId:t,endId:o},n=!0,l=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(o))return;r.debug(`Expanding selection from row ${t} to row ${o}`);const i=Mn(e),a=i.indexOf(t),s=i.indexOf(o),[c,u]=a>s?[s,a]:[a,s],d=i.slice(c,u+1);e.current.selectRows(d,n,l)},[e,r]),getPropagatedRowSelectionModel:x};_i(e,{selectRow:v,setRowSelectionModel:g,getSelectedRows:C,isRowSelected:h,isRowSelectable:m},"public"),_i(e,S,t.signature===bi.DataGrid?"private":"public");const A=w.useRef(!0),R=w.useCallback((r=!1)=>
1{if(A.current)return;const o=Gi(e),l=mt(e),i=bt(e),a=An(e),s=e=>"server"===t.filterMode?!l[e]:!i[e]||!1===a[e],c={type:o.type,ids:new Set(o.ids)},u=Bi(c);let d=!1;for(const e of o.ids){if(s(e)){if(t.keepNonExistentRowsSelected)continue;u.unselect(e),d=!0;continue}if(!t.rowSelectionPropagation?.parents)continue;const r=i[e];if("group"===r?.type){if(r.isAutoGenerated){u.unselect(e),d=!0;continue}r.children.every(e=>!1===a[e])||(u.unselect(e),d=!0)}}const p=n&&t.rowSelectionPropagation?.parents&&(c.ids.size>0||"exclude"===c.type);if(d||p&&!r)if(p)if("exclude"===c.type){const r=f(),o=[];for(let e=0;e<r.length;e+=1){const n=r[e];!t.keepNonExistentRowsSelected&&s(n)||!u.has(n)||o.push(n)}e.current.selectRows(o,!0,!0)}else e.current.selectRows(Array.from(c.ids),!0,!0);else e.current.setRowSelectionModel(c,"multipleRowsSelection")},[e,n,t.rowSelectionPropagation?.parents,t.keepNonExistentRowsSelected,t.filterMode,f]),M=w.useCallback((t,r)=>{const o=r.metaKey||r.ctrlKey,n=!s&&!o&&!(e=>!!e.key)(r),l=!d||n,i=e.current.isRowSelected(t),a=Ui(e)>1&&l||!i;e.current.selectRow(t,a,l)},[e,d,s]),I=w.useCallback((t,r)=>{if(c)return;const o=r.target.closest(`.${H.cell}`)?.getAttribute("data-field");if(o!==Da.field&&o!==ro){if(o){const t=e.current.getColumn(o);if(t?.type===Go)return}"pinnedRow"!==wt(e,t.id).type&&(r.shiftKey&&d?p(t.id):M(t.id,r))}},[c,d,e,p,M]),P=w.useCallback((e,t)=>{d&&t.shiftKey&&window.getSelection()?.removeAllRanges()},[d]),k=w.useCallback((t,r)=>{d&&r.nativeEvent.shiftKey?p(t.id):e.current.selectRow(t.id,t.value,!d)},[e,p,d]),E=w.useCallback(r=>{const o=yn(e),l=xn(e),i=o.items.length>0||l?.some(e=>e.length);t.isRowSelectable||t.checkboxSelectionVisibleOnly||n&&!t.rowSelectionPropagation?.descendants||i||t.disableRowSelectionExcludeModel?e.current.selectRows(f(),r):e.current.setRowSelectionModel({type:r?"exclude":"include",ids:new Set},"multipleRowsSelection")},[e,f,t.checkboxSelectionVisibleOnly,t.isRowSelectable,t.rowSelectionPropagation?.descendants,t.disableRowSelectionExcludeModel,n]),F=w.useCallback(e=>{E(e.value)},[E]),D=w.useCallback((t,r)=>{if(e.current.getCellMode(t.id,t.field)!==mo.Edit&&!as(r)){if(Fo(r.key)&&r.shiftKey){const o=Bn(e);if(o&&o.id!==t.id){r.preventDefault();const n=e.current.isRowSelected(o.id);if(!d)return void e.current.selectRow(o.id,!n,!0);const l=e.current.getRowIndexRelativeToVisibleRows(o.id),i=e.current.getRowIndexRelativeToVisibleRows(t.id);let a,s;l>i?n?(a=i,s=l-1):(a=i,s=l):n?(a=l+1,s=i):(a=l,s=i);const c=Ti(e),u=[];for(let e=a;e<=s;e+=1)u.push(c.rows[e].id);return void e.current.selectRows(u,!n)}}if(" "===r.key&&r.shiftKey)return r.preventDefault(),void M(t.id,r);"A"===String.fromCharCode(r.keyCode)&&(r.ctrlKey||r.metaKey)&&(r.preventDefault(),d&&E(!0))}},[e,d,M,E]),T=(0,It.A)(()=>{if(!t.rowSelection)return void e.current.setRowSelectionModel(Ds);if(void 0===i)return;if(!l||!n||"include"===i.type&&0===i.ids.size)return void e.current.setRowSelectionModel(i);const r=e.current.getPropagatedRowSelectionModel(i);r.type===i.type&&r.ids.size===i.ids.size&&Array.from(i.ids).every(e=>r.ids.has(e))?e.current.setRowSelectionModel(i):e.current.setRowSelectionModel(r)});Tt(e,"filteredRowsSet",o(()=>R())),Tt(e,"rowClick",o(I)),Tt(e,"rowSelectionCheckboxChange",o(k)),Tt(e,"headerSelectionCheckboxChange",F),Tt(e,"cellMouseDown",o(P)),Tt(e,"cellKeyDown",o(D)),w.useEffect(()=>{T()},[e,i,t.rowSelection,T]);const O=null!=i;w.useEffect(()=>{if(O||!t.rowSelection||"function"!=typeof m)return;const r=Gi(e);if("include"!==r.type)return;const o=new Set;for(const e of r.ids)m(e)&&o.add(e);o.size<r.ids.size&&e.current.setRowSelectionModel({type:r.type,ids:o})},[e,m,O,t.rowSelection]),w.useEffect(()=>{if(!t.rowSelection||O)return;const r=Gi(e);!d&&("include"===r.type&&r.ids.size>1||"exclude"===r.type)&&e.current.setRowSelectionModel(Ds)},[e,d,s,O,t.rowSelection]),w.useEffect(()=>{o(R)},[R,o]),w.useEffect(()=>{A.current&&(A.current=!1)},[])})(e,t),function(e,t){const r=Aa(e,"useGridColumns");e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Te,changeEvent:"columnVisibilityModelChange"});const o=w.useCallback(t=>{r.debug("Updating columns state."),e.current.setState(function(e){return t=>(0,b.A)({},t,{columns:e})}(t)),e.current.publishEvent("columnsChange",t.orderedFields)},[r,e]),n=w.useCallback(t=>Fe(e)[t],[e]),l=w.useCallback(()=>De(e),[e]),i=w.useCallback(()=>Oe(e),[e]),a=w.useCallback((t,r=!0)=>(r?Oe(e):De(e)).findIndex(e=>e.field===t),[e]),s=w.useCallback(t=>{const r=a(t);return Ne(e)[r]},[e,a]),c=w.useCallback(t=>{Te(e)!==t&&(e.current.setState(r=>(0,b.A)({},r,{columns:nn({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})})),e.current.updateRenderContext?.())},[e]),u=w.useCallback(t=>{let r=t;if(zn(e)){const o=[],n=[],l=jn(e);
1if(t.forEach(e=>{l.has(e.field)?o.push(e):n.push(e)}),o.length>0&&e.current.updateNonPivotColumns(o),0===n.length)return;r=n}const n=nn({apiRef:e,columnsToUpsert:r,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});o(n)},[e,o]),d=w.useCallback((t,r)=>{const o=Te(e);if(r!==(o[t]??!0)){const n=(0,b.A)({},o,{[t]:r});e.current.setColumnVisibilityModel(n)}},[e]),p=w.useCallback(t=>Ee(e).findIndex(e=>e===t),[e]),f=w.useCallback((t,n)=>{const l=Ee(e),i=p(t);if(i===n)return;r.debug(`Moving column ${t} to index ${n}`);const a=[...l],s=a.splice(i,1)[0];a.splice(n,0,s),o((0,b.A)({},ke(e),{orderedFields:a}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:i};e.current.publishEvent("columnIndexChange",c)},[e,r,o,p]),g=w.useCallback((t,n)=>{r.debug(`Updating column ${t} width to ${n}`);const l=ke(e),i=l.lookup[t],a=(0,b.A)({},i,{width:n,hasBeenResized:!0});o(rn((0,b.A)({},l,{lookup:(0,b.A)({},l.lookup,{[t]:a})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:a,width:n})},[e,r,o]),h={setColumnIndex:f};_i(e,{getColumn:n,getAllColumns:l,getColumnIndex:a,getColumnPosition:s,getVisibleColumns:i,getColumnIndexRelativeToVisibleColumns:p,updateColumns:u,setColumnVisibilityModel:c,setColumnVisibility:d,setColumnWidth:g},"public"),_i(e,h,t.signature===bi.DataGrid?"private":"public");const m=w.useCallback((r,o)=>{const n={},l=Te(e);(!o.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(t.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(l).length>0)&&(n.columnVisibilityModel=l),n.orderedFields=Ee(e);const i=De(e),a={};return i.forEach(e=>{if(e.hasBeenResized){const t={};en.forEach(r=>{let o=e[r];o===1/0&&(o=-1),t[r]=o}),a[e.field]=t}}),Object.keys(a).length>0&&(n.dimensions=a),(0,b.A)({},r,{columns:n})},[e,t.columnVisibilityModel,t.initialState?.columns]),C=w.useCallback((t,r)=>{const o=r.stateToRestore.columns,n=o?.columnVisibilityModel;if(null==o)return t;const l=nn({apiRef:e,columnsToUpsert:[],initialState:o,columnVisibilityModel:n,keepOnlyColumnsToUpsert:!1});return null!=o&&e.current.setState(e=>(0,b.A)({},e,{columns:(0,b.A)({},e.columns,{lookup:l.lookup,orderedFields:l.orderedFields,initialColumnVisibilityModel:l.initialColumnVisibilityModel})})),null!=n&&e.current.setState(e=>(0,b.A)({},e,{columns:(0,b.A)({},e.columns,{columnVisibilityModel:n})})),null!=o&&e.current.publishEvent("columnsChange",l.orderedFields),t},[e]),v=w.useCallback((e,r)=>{if(r===Ke.columns){const e=t.slots.columnsPanel;return(0,ie.jsx)(e,(0,b.A)({},t.slotProps?.columnsPanel))}return e},[t.slots.columnsPanel,t.slotProps?.columnsPanel]),y=w.useCallback(r=>{const o=zn(e);return t.disableColumnSelector||o?r:[...r,"columnMenuColumnsItem"]},[t.disableColumnSelector,e]);La(e,"columnMenu",y),La(e,"exportState",m),La(e,"restoreState",C),La(e,"preferencePanel",v);const x=w.useRef(null);Tt(e,"viewportInnerSizeChange",t=>{if(x.current!==t.width){if(x.current=t.width,!Oe(e).some(e=>e.flex&&e.flex>0))return;o(rn(ke(e),e.current.getRootDimensions()))}});const S=w.useCallback(()=>{r.info("Columns pipe processing have changed, regenerating the columns");const t=nn({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(t)},[e,r,o]);Xi(e,"hydrateColumns",S),w.useEffect(()=>{if(e.current.caches.columns.lastColumnsProp===t.columns)return;e.current.caches.columns.lastColumnsProp=t.columns,r.info(`GridColumns have changed, new length ${t.columns.length}`);const n=nn({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0,columnVisibilityModel:t.columnVisibilityModel});o(n)},[r,e,o,t.columns,t.columnVisibilityModel]),w.useEffect(()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,r,t.columnVisibilityModel])}(e,t),((e,t,r)=>{const o=Aa(e,"useGridRows"),n=w.useRef(Date.now()),l=w.useRef(t.rowCount),i=(0,$t.A)(),{setRowIndex:a,setRowPosition:s}=r.hooks.useGridRowsOverridableMethods(e,t),c=w.useCallback(t=>{const r=mt(e)[t];if(r)return r;const o=wt(e,t);return o&&Wr(o)?{[zr]:t}:null},[e]),u=w.useCallback(t=>
1Yr(e,t),[e]),d=w.useCallback(({cache:r,throttle:o})=>{const l=()=>{n.current=Date.now(),e.current.setState(r=>(0,b.A)({},r,{rows:Br({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:bt(e),previousTreeDepths:yt(e),previousGroupsToFetch:Ct(e)})})),e.current.publishEvent("rowsSet")};if(i.clear(),e.current.caches.rows=r,!o)return void l();const a=t.throttleRowsMs-(Date.now()-n.current);a>0?i.start(a,l):l()},[t.throttleRowsMs,t.rowCount,t.loading,e,i]),p=w.useCallback(r=>{if(o.debug(`Updating all rows, new length ${r.length}`),!t.dataSource&&zn(e))return void e.current.updateNonPivotRows(r,!1);const n=Nr({rows:r,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),l=e.current.caches.rows;n.rowsBeforePartialUpdates=l.rowsBeforePartialUpdates,d({cache:n,throttle:!0})},[o,t.getRowId,t.dataSource,t.loading,t.rowCount,d,e]),f=w.useCallback(r=>{if(t.signature===bi.DataGrid&&r.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(!t.dataSource&&zn(e))return void e.current.updateNonPivotRows(r);const o=_r(e,r,t.getRowId),n=Kr({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:n,throttle:!0})},[t.signature,t.dataSource,t.getRowId,d,e]),g=w.useCallback((r,o)=>{const n=_r(e,r,t.getRowId),l=Kr({updates:n,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:o??[]});d({cache:l,throttle:!1})},[t.getRowId,d,e]),h=w.useCallback(t=>{o.debug(`Setting loading to ${t}`),e.current.setState(e=>(0,b.A)({},e,{rows:(0,b.A)({},e.rows,{loading:t})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t},[e,o]),m=w.useCallback(()=>{const t=St(e),r=mt(e);return new Map(t.map(e=>[e,r[e]??{}]))},[e]),C=w.useCallback(()=>ft(e),[e]),v=w.useCallback(()=>St(e),[e]),y=w.useCallback(t=>{const{rowIdToIndexMap:r}=Ti(e);return r.get(t)},[e]),x=w.useCallback((t,r)=>{const o=wt(e,t);if(!o)throw new Error(`MUI X: No row with id #${t} found.`);if("group"!==o.type)throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const n=(0,b.A)({},o,{childrenExpanded:r});e.current.setState(e=>(0,b.A)({},e,{rows:(0,b.A)({},e.rows,{tree:(0,b.A)({},e.rows.tree,{[t]:n})})})),e.current.publishEvent("rowExpansionChange",n)},[e]),S=w.useCallback(()=>{const t=(0,b.A)({},bt(e)),r=e=>{const o=t[e];"group"===o?.type&&(t[e]=(0,b.A)({},o,{childrenExpanded:!0}),o.children.forEach(r))};r($r),e.current.setState(e=>(0,b.A)({},e,{rows:(0,b.A)({},e.rows,{tree:t})})),e.current.publishEvent("rowExpansionChange",t[$r])},[e]),A=w.useCallback(()=>{const t=(0,b.A)({},bt(e)),r=e=>{const o=t[e];"group"===o?.type&&(t[e]=(0,b.A)({},o,{childrenExpanded:!1}),o.children.forEach(r))};r($r),e.current.setState(e=>(0,b.A)({},e,{rows:(0,b.A)({},e.rows,{tree:t})})),e.current.publishEvent("rowExpansionChange",t[$r])},[e]),R=w.useCallback(t=>wt(e,t)??null,[e]),M=w.useCallback(({skipAutoGeneratedRows:t=!0,groupId:r,applySorting:o,applyFiltering:n,directChildrenOnly:l=!1})=>{const i=bt(e);let a;if(o){const o=i[r];if(!o)return[];const n=mn(e);a=[];for(let e=n.findIndex(e=>e===r)+1;e<n.length&&(l?i[n[e]].depth===o.depth+1:i[n[e]].depth>o.depth);e+=1){const r=n[e];t&&Wr(i[r])||a.push(r)}}else a=Ur(i,r,t,l);if(n){const t=An(e);a=gn(t)?a:a.filter(e=>!1!==t[e])}return a},[e]),I={getRow:c,setLoading:h,getRowId:u,getRowModels:m,getRowsCount:C,getAllRowIds:v,setRows:p,updateRows:f,getRowNode:R,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:w.useCallback((r,o)=>{if(t.signature===bi.DataGrid&&o.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===o.length)return;if(xt(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const n=(0,b.A)({},bt(e)),l=(0,b.A)({},mt(e)),i=n[$r],a=[...i.children],s=new Set;for(let e=0;e<o.length;
1e+=1){const i=o[e],c=Lr(i,t.getRowId,"A row was provided without id when calling replaceRows()."),[u]=a.splice(r+e,1,c);s.has(u)||(delete l[u],delete n[u]);const d={id:c,depth:0,parent:$r,type:"leaf",groupingKey:null};l[c]=i,n[c]=d,s.add(c)}n[$r]=(0,b.A)({},i,{children:a});const c=a.filter(e=>"leaf"===n[e]?.type);e.current.caches.rows.dataRowIdToModelLookup=l,e.current.setState(e=>(0,b.A)({},e,{rows:(0,b.A)({},e.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,a.length),dataRowIdToModelLookup:l,dataRowIds:c,tree:n})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId,t.loading,t.rowCount])},P={setRowIndex:a,setRowPosition:s,setRowChildrenExpansion:x,getRowGroupChildren:M,expandAllRows:S,collapseAllRows:A},k={updateNestedRows:g},E=w.useCallback(()=>{let r;o.info("Row grouping pre-processing have changed, regenerating the row tree"),r=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,b.A)({},e.current.caches.rows,{updates:{type:"full",rows:St(e)}}):Nr({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:r,throttle:!1})},[o,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),F=(0,V.A)(()=>t.dataSource),D=w.useCallback(e=>{t.dataSource&&t.dataSource!==F.current?F.current=t.dataSource:"rowTreeCreation"===e&&E()},[E,F,t.dataSource]),T=w.useCallback(()=>{e.current.getActiveStrategy(Ca.RowTree)!==vt(e)&&E()},[e,E]);Tt(e,"activeStrategyProcessorChange",D),Tt(e,"strategyAvailabilityChange",T);const H=w.useCallback(()=>{e.current.setState(r=>{const o=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:bt(e),treeDepths:yt(e),dataRowIds:St(e),dataRowIdToModelLo
1okup:mt(e)});return(0,b.A)({},r,{rows:(0,b.A)({},r.rows,o,{totalTopLevelRowCount:Vr({tree:o.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet")},[e,t.rowCount]);Xi(e,"hydrateRows",H),_i(e,I,"public"),_i(e,P,t.signature===bi.DataGrid?"private":"public"),_i(e,k,"private");const O=w.useRef(!0);w.useEffect(()=>{if(O.current)return void(O.current=!1);let r=!1;t.rowCount!==l.current&&(r=!0,l.current=t.rowCount);const n=t.dataSource?At(e):t.rows,i=e.current.caches.rows.rowsBeforePartialUpdates===n,a=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,s=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;i&&(a||(e.current.setState(e=>(0,b.A)({},e,{rows:(0,b.A)({},e.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),s||(e.current.setState(e=>(0,b.A)({},e,{rows:(0,b.A)({},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),!r)||(o.debug(`Updating all rows, new length ${n?.length}`),d({cache:Nr({rows:n,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,r),((e,t)=>{const r=w.useCallback((t,r=!1)=>{const o=e.current.virtualizer.store,{range:n,rows:l}=Ti(e);if(r&&o.set("rowSpanning",sc),null===n||!ic(t))return;const i=r?sc:gi.selectors.state(o.state),a=(s={firstRowIndex:t.firstRowIndex,lastRowIndex:Math.min(t.lastRowIndex,n.lastRowIndex-n.firstRowIndex+1)},c=i.processedRange,s.firstRowIndex>=c.firstRowIndex&&s.lastRowIndex<=c.lastRowIndex?null:s.firstRowIndex>=c.firstRowIndex&&s.lastRowIndex>c.lastRowIndex?{firstRowIndex:c.lastRowIndex,lastRowIndex:s.lastRowIndex}:s.firstRowIndex<c.firstRowIndex&&s.lastRowIndex<=c.lastRowIndex?{firstRowIndex:s.firstRowIndex,lastRowIndex:c.firstRowIndex-1}:s);var s,c;if(null===a)return;const u=Oe(e),d=((e,t,r,o,n,l)=>{const i=e.current.virtualizer,a=l?sc:gi.selectors.state(i.store.state),s=(0,b.A)({},a.caches.spannedCells),c=(0,b.A)({},a.caches.hiddenCells),u=(0,b.A)({},a.caches.hiddenCellOriginMap),d={firstRowIndex:Math.min(a.processedRange.firstRowIndex,n.firstRowIndex),lastRowIndex:Math.max(a.processedRange.lastRowIndex,n.lastRowIndex)};return t.forEach((t,l)=>{for(let i=n.firstRowIndex;i<n.lastRowIndex;i+=1){const a=r[i];if(c[a.id]?.[l])continue;const d=ac(a.model,t,e);if(null==d)continue;let p=a.id,f=i,g=0;const h=[];if(i===n.firstRowIndex){let n=i-1,a=r[n];for(;n>=o.firstRowIndex&&a&&ac(a.model,t,e)===d;){const e=r[n+1];c[e.id]?c[e.id][l]=!0:c[e.id]={[l]:!0},h.push(i),g+=1,p=a.id,f=n,n-=1,a=r[n]}}h.forEach(e=>{u[e]?u[e][l]=f:u[e]={[l]:f}});let m=i+1;for(;m<=o.lastRowIndex&&r[m]&&ac(r[m].model,t,e)===d;){const e=r[m];c[e.id]?c[e.id][l]=!0:c[e.id]={[l]:!0},u[m]?u[m][l]=f:u[m]={[l]:f},m+=1,g+=1}g>0&&(s[p]?s[p][l]=g+1:s[p]={[l]:g+1})}}),{caches:{spannedCells:s,hiddenCells:c,hiddenCellOriginMap:u},processedRange:d}})(e,u,l,n,a,r),p=Object.keys(d.caches.spannedCells).length,f=Object.keys(d.caches.hiddenCells).length,g=Object.keys(i.caches.spannedCells).length,h=Object.keys(i.caches.hiddenCells).length;(r||p!==g||f!==h)&&(0!==p||0!==g)&&o.set("rowSpanning",d)},[e]),{schedule:o,cancel:n}=function(e){const t=w.useRef(null),r=w.useCallback((...r)=>{t.current||queueMicrotask(()=>{t.current&&t.current()}),t.current=()=>{t.current=null,e(...r)}},[e]);return w.useLayoutEffect(()=>{t.current&&t.current()}),{schedule:r,cancel:()=>!!t.current&&(t.current=null,!0)}}(r),l=w.useCallback(()=>{const t=zi(e);ic(t)&&o(t,!0)},[e,o]);Tt(e,"renderedRowsIntervalChange",nr(t.rowSpanning,e=>{const t=n();r(e,t)})),Tt(e,"sortedRowsSet",nr(t.rowSpanning,l)),Tt(e,"paginationModelChange",nr(t.rowSpanning,l)),Tt(e,"filteredRowsSet",nr(t.rowSpanning,l)),Tt(e,"columnsChange",nr(t.rowSpanning,l)),w.useEffect(()=>{const o=e.current.virtualizer?.store;o&&(t.rowSpanning?o.state.rowSpanning===sc&&r(zi(e)):o.state.rowSpanning!==sc&&o.set("rowSpanning",sc))},[e,t.rowSpanning,r])})(e,t),function(e,t,r){const o=w.useCallback(t=>({field:t,colDef:e.current.getColumn(t)}),[e]),n=w.useCallback(t=>{const r=e.current.getRow(t);if(!r)throw new Fs(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:r}},[e]),l=w.useCallback((t,r,o,{cellMode:n,colDef:l,hasFocus:i,rowNode:a,tabIndex:s,value:c,formattedValue:u})=>{const d={id:t,field:r,row:o,rowNode:a,colDef:l,cellMode:n,hasFocus:i,tabIndex:s,value:void 0!==c?c:e.current.getRowValue(o,l),formattedValue:void 0!==u?u:e.current.getRowFormattedValue(o,l),isEditable:!1,api:e.current};return d.isEditable=l&&e.current.isCellEditable(d),d},[e]),i=w.useCallback((r,o)=>{const n=e.current.getRow(r),l=wt(e,r);if(!n||!l)throw new Fs(`No row with id #${r} found`);const i=Bn(e),a=Kn(e),s=e.current.getCellMode(r,o);return e.current.getCellParamsForRow(r,o,n,{colDef:t.listView&&t.listViewColumn?.field===o?Pe(e):e.current.getColumn(o),rowNode:l,hasFocus:null!==i&&i.field===o&&i.id===r,tabIndex:a&&a.field===o&&a.id===r?0:-1,cellMode:s})},[e,t.listView,t.listViewColumn?.field]),a=w.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${ls(t)}"]`)}(e.current.rootElementRef.current,t):null,[e]),s=w.useCallback(t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(is(t))}(e.current.rootElementRef.current,t):null,[e]),c=w.useCallback((t,r)=>e.current.rootElementRef.current?function(e,{id:t,field:r}){const o=`${is(t)} .${H.cell}[data-field="${ls(r)}"]`;return e.querySelector(o)}(e.current.rootElementRef.current,{id:t,field:r}):null,[e]),u=r.hooks.useGridParamsOverridableMethods(e),d={getCellValue:u.getCellValue,getCellParams:i,getCellElement:c,getRowValue:u.getRowValue,getRowFormattedValue:u.getRowFormattedValue,getRowParams:n,getRowElement:s,getColumnHeaderParams:o,getColumnHeaderElement:a},p={getCellParamsForRow:l};_i(e,d,"public"),_i(e,p,"private")}
1(e,t,r),(e=>{const t=()=>e.current.virtualizer.api.resetColSpan(),r={unstable_getCellColSpanInfo:(...t)=>e.current.virtualizer.api.getCellColSpanInfo(...t)},o={resetColSpan:t,calculateColSpan:(...t)=>{e.current.virtualizer.api.calculateColSpan(...t)}};_i(e,r,"public"),_i(e,o,"private"),Tt(e,"columnOrderChange",t)})(e),((e,t)=>{const r=w.useCallback(t=>Yo(e)[t]??[],[e]),o=w.useCallback(()=>Qo(e),[e]);_i(e,{getColumnGroupPath:r,getAllGroupDetails:o},"public");const n=w.useCallback(()=>{const r=Us(t.columnGroupingModel??[]);e.current.setState(e=>{const t=e.columns?.orderedFields??[],o=e.pinnedColumns??{},n=Ks(t,r,o);return(0,b.A)({},e,{columnGrouping:(0,b.A)({},e.columnGrouping,{headerStructure:n})})})},[e,t.columnGroupingModel]),l=w.useCallback(t=>{if(!t&&!e.current.caches.columnGrouping.lastColumnGroupingModel)return;e.current.caches.columnGrouping.lastColumnGroupingModel=t;const r=e.current.getPinnedColumns?.()??{},o=Ee(e),n=$e(e),l=Gs(t??[]),i=Us(t??[]),a=Ks(o,i,r),s=0===n.length?0:Math.max(...n.map(e=>i[e]?.length??0));e.current.setState(e=>(0,b.A)({},e,{columnGrouping:{lookup:l,unwrappedGroupingModel:i,headerStructure:a,maxDepth:s}}))},[e]);Tt(e,"columnIndexChange",n),Tt(e,"columnsChange",()=>{l(t.columnGroupingModel)}),Tt(e,"columnVisibilityModelChange",()=>{l(t.columnGroupingModel)}),w.useEffect(()=>{t.columnGroupingModel!==e.current.caches.columnGrouping.lastColumnGroupingModel&&l(t.columnGroupingModel)},[e,l,t.columnGroupingModel])})(e,t),((e,t,r)=>{((e,t)=>{const[r,o]=w.useState({}),n=w.useRef(r),l=w.useRef({}),{processRowUpdate:i,onProcessRowUpdateError:a,cellModesModel:s,onCellModesModelChange:c}=t,u=e=>(...r)=>{t.editMode===ho.Cell&&e(...r)},d=w.useCallback((t,r)=>{const o=e.current.getCellParams(t,r);if(!e.current.isCellEditable(o))throw new Error(`MUI X: The cell with id=${t} and field=${r} is not editable.`)},[e]),p=w.useCallback((t,r,o)=>{if(e.current.getCellMode(t,r)!==o)throw new Error(`MUI X: The cell with id=${t} and field=${r} is not in ${o} mode.`)},[e]),f=w.useCallback((t,r)=>{if(!t.isEditable)return;if(t.cellMode===mo.Edit)return;const o=(0,b.A)({},t,{reason:fo.cellDoubleClick});e.current.publishEvent("cellEditStart",o,r)},[e]),g=w.useCallback((t,r)=>{if(t.cellMode===mo.View)return;if(e.current.getCellMode(t.id,t.field)===mo.View)return;const o=(0,b.A)({},t,{reason:go.cellFocusOut});e.current.publishEvent("cellEditStop",o,r)},[e]),h=w.useCallback((t,r)=>{if(t.cellMode===mo.Edit){if(229===r.which)return;let o;if("Escape"===r.key?o=go.escapeKeyDown:"Enter"===r.key?o=go.enterKeyDown:"Tab"===r.key&&(o=r.shiftKey?go.shiftTabKeyDown:go.tabKeyDown,r.preventDefault()),o){const n=(0,b.A)({},t,{reason:o});e.current.publishEvent("cellEditStop",n,r)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"cell"}))return;if(Eo(r)?o=fo.printableKeyDown:To(r)?o=fo.pasteKeyDown:"Enter"===r.key?o=fo.enterKeyDown:"Backspace"!==r.key&&"Delete"!==r.key||(o=fo.deleteKeyDown),o){const n=(0,b.A)({},t,{reason:o,key:r.key});e.current.publishEvent("cellEditStart",n,r)}}},[e]),m=w.useCallback(t=>{const{id:r,field:o,reason:n}=t,l={id:r,field:o};n!==fo.printableKeyDown&&n!==fo.deleteKeyDown&&n!==fo.pasteKeyDown||(l.deleteValue=!0),e.current.startCellEditMode(l)},[e]),C=w.useCallback(t=>{const{id:r,field:o,reason:n}=t;let l;e.current.runPendingEditCellValueMutation(r,o),n===go.enterKeyDown?l="below":n===go.tabKeyDown?l="right":n===go.shiftTabKeyDown&&(l="left");const i="escapeKeyDown"===n;e.current.stopCellEditMode({id:r,field:o,ignoreModifications:i,cellToFocusAfter:l})},[e]);var v;Tt(e,"cellDoubleClick",u(f)),Tt(e,"cellFocusOut",u(g)),Tt(e,"cellKeyDown",u(h)),Tt(e,"cellEditStart",u(m)),Tt(e,"cellEditStop",u(C)),Ot(e,"cellEditStart",t.onCellEditStart),Ot(e,"cellEditStop",(v=t.onCellEditStop,async(...t)=>{if(v){const{id:r,field:o}=t[0],n=e.current.state.editRows,l=n[r][o]?.error;l||v(...t)}}));const y=w.useCallback((t,r)=>{const o=ws(e);return o[t]&&o[t][r]?mo.Edit:mo.View},[e]),S=(0,It.A)(r=>{const l=r!==t.cellModesModel;c&&l&&c(r,{api:e.current}),t.cellModesModel&&l||(o(r),n.current=r,e.current.publishEvent("cellModesModelChange",r))}),A=w.useCallback((e,t,r)=>{const o=(0,b.A)({},n.current);if(null!==r)o[e]=(0,b.A)({},o[e],{[t]:(0,b.A)({},r)});else{const r=o[e],n=(0,x.A)(r,[t].map(wa));o[e]=n,0===Object.keys(o[e]).length&&delete o[e]}S(o)},[S]),R=w.useCallback((t,r,o)=>{e.current.setState(e=>{const n=(0,b.A)({},e.editRows);return null!==o?n[t]=(0,b.A)({},n[t],{[r]:(0,b.A)({},o)}):(delete n[t][r],0===Object.keys(n[t]).length&&delete n[t]),(0,b.A)({},e,{editRows:n})})},[e]),M=w.useCallback(e=>{const{id:t,field:r}=e,o=(0,x.A)(e,xs);d(t,r),p(t,r,mo.View),A(t,r,(0,b.A)({mode:mo.Edit},o))},[d,p,A]),I=(0,It.A)(async t=>{const{id:r,field:o,deleteValue:n,initialValue:l}=t,i=e.current.getCellValue(r,o);let a=i;n?a=ys(e.current.getColumn(o)):l&&(a=l);const s=e.current.getColumn(o),c=!!s.preProcessEditCellProps&&n;let u={value:a,error:!1,isProcessingProps:c};if(R(r,o,u),e.current.setCellFocus(r,o),c&&(u=await Promise.resolve(s.preProcessEditCellProps({id:r,row:e.current.getRow(r),props:u,hasChanged:a!==i})),e.current.getCellMode(r,o)===mo.Edit)){const t=ws(e);R(r,o,(0,b.A)({},u,{value:t[r][o].value,isProcessingProps:!1}))}}),P=w.useCallback(e=>{const{id:t,field:r}=e,o=(0,x.A)(e,Ss);p(t,r,mo.Edit),A(t,r,(0,b.A)({mode:mo.View},o))},[p,A]),k=(0,It.A)(async r=>{const{id:o,field:n,ignoreModifications:s,cellToFocusAfter:c="none"}=r;p(o,n,mo.Edit),e.current.runPendingEditCellValueMutation(o,n);const u=()=>{R(o,n,null),A(o,n,null),"none"!==c&&e.current.moveFocusToRelativeCell(o,n,c)};if(s)return void u();const d=ws(e),{error:f,isProcessingProps:g}=d[o][n],h=e.current.getRow(o);if(f||g)return l.current[o][n].mode=mo.Edit,void A(o,n,{mode:mo.Edit});const m=e.current.getRowWithUpdatedValuesFromCellEditing(o,n);if(t.dataSource?.updateRow){if(Hl(h,m))return void u();const t=()=>{l.current[o][n].mode=mo.Edit,A(o,n,{mode:mo.Edit})},r={rowId:o,updatedRow:m,previousRow:h};try{await e.current.dataSource.editRow(r),u()}catch{t()}}else if(i){const t=e=>{l.current[o][n].mode=mo.Edit,A(o,n,{mode:mo.Edit}),a&&a(e)};try{Promise.resolve(i(m,h,{rowId:o})).then(t=>{e.current.updateRows([t]),u()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([m]),u()}),E={setCellEditingEditCellValue:w.useCallback(async t=>{const{id:r,field:o,value:n,debounceMs:l,unstable_skipValueParser:i}=t;d(r,o),p(r,o,mo.Edit);const a=e.current.getColumn(o),s=e.current.getRow(r);let c=n;a.valueParser&&!i&&(c=a.valueParser(n,s,a,e));let u=ws(e),f=(0,b.A)({},u[r][o],{value:c,changeReason:l?"debouncedSetEditCellValue":"setEditCellValue"});if(a.preProcessEditCellProps){const e=n!==u[r][o].value;f=(0,b.A)({},f,{isProcessingProps:!0}),R(r,o,f),f=await Promise.resolve(a.preProcessEditCellProps({id:r,row:s,props:f,hasChanged:e}))}return e.current.getCellMode(r,o)!==mo.View&&(u=ws(e),f=(0,b.A)({},f,{isProcessingProps:!1}),f.value=a.preProcessEditCellProps?u[r][o].value:c,R(r,o,f),u=ws(e),!u[r]?.[o]?.error)},[e,d,p,R]),getRowWithUpdatedValuesFromCellEditing:w.useCallback((t,r)=>{const o=e.current.getColumn(r),n=ws(e),l=e.current.getRow(t);if(!n[t]||!n[t][r])return e.current.getRow(t);const{value:i}=n[t][r];return o.valueSetter?o.valueSetter(i,l,o,e):(0,b.A)({},l,{[r]:i})},[e])};_i(e,{getCellMode:y,startCellEditMode:M,stopCellEditMode:P},"public"),_i(e,E,"private"),w.useEffect(()=>{s&&S(s)},[s,S]),(0,Lt.A)(()=>{const t=mt(e),o=l.current;l.current=or(r),Object.entries(r).forEach(([r,n])=>
1{Object.entries(n).forEach(([n,l])=>{const i=o[r]?.[n]?.mode||mo.View,a=t[r]?e.current.getRowId(t[r]):r;l.mode===mo.Edit&&i===mo.View?I((0,b.A)({id:a,field:n},l)):l.mode===mo.View&&i===mo.Edit&&k((0,b.A)({id:a,field:n},l))})})},[e,r,I,k])})(e,t),((e,t)=>{const[r,o]=w.useState({}),n=w.useRef(r),l=w.useRef({}),i=w.useRef({}),a=w.useRef(void 0),s=w.useRef(null),{processRowUpdate:c,onProcessRowUpdateError:u,rowModesModel:d,onRowModesModelChange:p}=t,f=e=>(...r)=>{t.editMode===ho.Row&&e(...r)},g=w.useCallback((t,r)=>{const o=e.current.getCellParams(t,r);if(!e.current.isCellEditable(o))throw new Error(`MUI X: The cell with id=${t} and field=${r} is not editable.`)},[e]),h=w.useCallback((t,r)=>{if(e.current.getRowMode(t)!==r)throw new Error(`MUI X: The row with id=${t} is not in ${r} mode.`)},[e]),m=w.useCallback(t=>{const r=ws(e);return Object.values(r[t]).some(e=>e.error)},[e]),C=w.useCallback((t,r)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===bo.Edit)return;const o=e.current.getRowParams(t.id),n=(0,b.A)({},o,{field:t.field,reason:As.cellDoubleClick});e.current.publishEvent("rowEditStart",n,r)},[e]),v=w.useCallback(e=>{s.current=e},[]),y=w.useCallback((t,r)=>{t.isEditable&&e.current.getRowMode(t.id)!==bo.View&&(s.current=null,a.current=setTimeout(()=>{if(s.current?.id!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===bo.View)return;if(m(t.id))return;const o=e.current.getRowParams(t.id),n=(0,b.A)({},o,{field:t.field,reason:Rs.rowFocusOut});e.current.publishEvent("rowEditStop",n,r)}}))},[e,m]);w.useEffect(()=>()=>{clearTimeout(a.current)},[]);const S=w.useCallback((t,r)=>{if(t.cellMode===bo.Edit){if(229===r.which)return;let o;if("Escape"===r.key)o=Rs.escapeKeyDown;else if("Enter"===r.key)o=Rs.enterKeyDown;else if("Tab"===r.key){const n=$e(e).filter(r=>e.current.getColumn(r).type===Go||e.current.isCellEditable(e.current.getCellParams(t.id,r)));if(r.shiftKey?t.field===n[0]&&(o=Rs.shiftTabKeyDown):t.field===n[n.length-1]&&(o=Rs.tabKeyDown),r.preventDefault(),!o){const o=n.findIndex(e=>e===t.field),l=n[r.shiftKey?o-1:o+1];e.current.setCellFocus(t.id,l)}}if(o){if(o!==Rs.escapeKeyDown&&m(t.id))return;const n=(0,b.A)({},e.current.getRowParams(t.id),{reason:o,field:t.field});e.current.publishEvent("rowEditStop",n,r)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:r,cellParams:t,editMode:"row"}))return;if(Eo(r)||To(r)?o=As.printableKeyDown:"Enter"===r.key?o=As.enterKeyDown:"Backspace"!==r.key&&"Delete"!==r.key||(o=As.deleteKeyDown),o){const n=e.current.getRowParams(t.id),l=(0,b.A)({},n,{field:t.field,reason:o});e.current.publishEvent("rowEditStart",l,r)}}},[e,m]),A=w.useCallback(t=>{const{id:r,field:o,reason:n}=t,l={id:r,fieldToFocus:o};n!==As.printableKeyDown&&n!==As.deleteKeyDown||(l.deleteValue=!!o),e.current.startRowEditMode(l)},[e]),R=w.useCallback(t=>{const{id:r,reason:o,field:n}=t;let l;e.current.runPendingEditCellValueMutation(r),o===Rs.enterKeyDown?l="below":o===Rs.tabKeyDown?l="right":o===Rs.shiftTabKeyDown&&(l="left");const i="escapeKeyDown"===o;e.current.stopRowEditMode({id:r,ignoreModifications:i,field:n,cellToFocusAfter:l})},[e]);Tt(e,"cellDoubleClick",f(C)),Tt(e,"cellFocusIn",f(v)),Tt(e,"cellFocusOut",f(y)),Tt(e,"cellKeyDown",f(S)),Tt(e,"rowEditStart",f(A)),Tt(e,"rowEditStop",f(R)),Ot(e,"rowEditStart",t.onRowEditStart),Ot(e,"rowEditStop",t.onRowEditStop);const M=w.useCallback(r=>Cs(e,{rowId:r,editMode:t.editMode})?bo.Edit:bo.View,[e,t.editMode]),I=(0,It.A)(r=>{const l=r!==t.rowModesModel;p&&l&&p(r,{api:e.current}),t.rowModesModel&&l||(o(r),n.current=r,e.current.publishEvent("rowModesModelChange",r))}),P=w.useCallback((e,t)=>{const r=(0,b.A)({},n.current);null!==t?r[e]=(0,b.A)({},t):delete r[e],I(r)},[I]),k=w.useCallback((t,r)=>{e.current.setState(e=>{const o=(0,b.A)({},e.editRows);return null!==r?o[t]=r:delete o[t],(0,b.A)({},e,{editRows:o})})},[e]),E=w.useCallback((t,r,o)=>{e.current.setState(e=>{const n=(0,b.A)({},e.editRows);return null!==o?n[t]=(0,b.A)({},n[t],{[r]:(0,b.A)({},o)}):(delete n[t][r],0===Object.keys(n[t]).length&&delete n[t]),(0,b.A)({},e,{editRows:n})})},[e]),F=w.useCallback(e=>{const{id:t}=e,r=(0,x.A)(e,Ms);h(t,bo.View),P(t,(0,b.A)({mode:bo.Edit},r))},[h,P]),D=(0,It.A)(t=>{const{id:r,fieldToFocus:o,deleteValue:n,initialValue:l}=t,a=e.current.getRow(r),s=De(e),c=s.reduce((t,i)=>{const a=i.field;if(!e.current.getCellParams(r,a).isEditable)return t;const s=e.current.getColumn(a);let c=e.current.getCellValue(r,a);return o===a&&(n||l)&&(n?c=ys(s):l&&(c=l)),t[a]={value:c,error:!1,isProcessingProps:s.editable&&!!s.preProcessEditCellProps&&n},t},{});i.current[r]=a,k(r,c),o&&e.current.setCellFocus(r,o),s.filter(t=>e.current.getCellParams(r,t.field).isEditable&&t.editable&&!!t.preProcessEditCellProps&&n).forEac
1h(t=>{const o=t.field,i=e.current.getCellValue(r,o),s=n?ys(t):l??i;Promise.resolve(t.preProcessEditCellProps({id:r,row:a,props:c[o],hasChanged:s!==i})).then(t=>{if(e.current.getRowMode(r)===bo.Edit){const n=ws(e);E(r,o,(0,b.A)({},t,{value:n[r][o].value,isProcessingProps:!1}))}})})}),T=w.useCallback(e=>{const{id:t}=e,r=(0,x.A)(e,Is);h(t,bo.Edit),P(t,(0,b.A)({mode:bo.View},r))},[h,P]),H=(0,It.A)(async r=>{const{id:o,ignoreModifications:n,field:a,cellToFocusAfter:s="none"}=r;e.current.runPendingEditCellValueMutation(o);const d=()=>{"none"!==s&&a&&e.current.moveFocusToRelativeCell(o,a,s),k(o,null),P(o,null),delete i.current[o]};if(n)return void d();const p=ws(e),f=i.current[o];if(Object.values(p[o]).some(e=>e.isProcessingProps))return void(l.current[o].mode=bo.Edit);if(m(o))return l.current[o].mode=bo.Edit,void P(o,{mode:bo.Edit});const g=e.current.getRowWithUpdatedValuesFromRowEditing(o);if(t.dataSource?.updateRow){if(Hl(f,g))return void d();const t=()=>{l.current[o].mode=bo.Edit,P(o,{mode:bo.Edit})},r={rowId:o,updatedRow:g,previousRow:f};try{await e.current.dataSource.editRow(r),d()}catch{t()}}else if(c){const t=e=>{l.current[o]&&(l.current[o].mode=bo.Edit,P(o,{mode:bo.Edit})),u&&u(e)};try{Promise.resolve(c(g,f,{rowId:o})).then(t=>{e.current.updateRows([t]),d()}).catch(t)}catch(e){t(e)}}else e.current.updateRows([g]),d()}),O={setRowEditingEditCellValue:w.useCallback(t=>{const{id:r,field:o,value:n,debounceMs:l,unstable_skipValueParser:i}=t;g(r,o);const a=e.current.getColumn(o),s=e.current.getRow(r);let c=n;a.valueParser&&!i&&(c=a.valueParser(n,s,a,e));let u=ws(e),d=(0,b.A)({},u[r][o],{value:c,changeReason:l?"debouncedSetEditCellValue":"setEditCellValue"});return a.preProcessEditCellProps||E(r,o,d),new Promise(t=>{const n=[];if(a.preProcessEditCellProps){const l=d.value!==u[r][o].value;d=(0,b.A)({},d,{isProcessingProps:!0}),E(r,o,d);const i=u[r],p=(0,x.A)(i,[o].map(wa)),f=Promise.resolve(a.preProcessEditCellProps({id:r,row:s,props:d,hasChanged:l,otherFieldsProps:p})).then(n=>{e.current.getRowMode(r)!==bo.View?(u=ws(e),(n=(0,b.A)({},n,{isProcessingProps:!1})).value=a.preProcessEditCellProps?u[r][o].value:c,E(r,o,n)):t(!1)});n.push(f)}Object.entries(u[r]).forEach(([l,i])=>{if(l===o)return;const a=e.current.getColumn(l);if(!a.preProcessEditCellProps)return;i=(0,b.A)({},i,{isProcessingProps:!0}),E(r,l,i),u=ws(e);const c=u[r],d=(0,x.A)(c,[l].map(wa)),p=Promise.resolve(a.preProcessEditCellProps({id:r,row:s,props:i,hasChanged:!1,otherFieldsProps:d})).then(o=>{e.current.getRowMode(r)!==bo.View?(o=(0,b.A)({},o,{isProcessingProps:!1}),E(r,l,o)):t(!1)});n.push(p)}),Promise.all(n).then(()=>{e.current.getRowMode(r)===bo.Edit?(u=ws(e),t(!u[r][o].error)):t(!1)})})},[e,g,E]),getRowWithUpdatedValuesFromRowEditing:w.useCallback(t=>{const r=ws(e),o=e.current.getRow(t);if(!r[t])return e.current.getRow(t);let n=(0,b.A)({},i.current[t],o);return Object.entries(r[t]).forEach(([t,r])=>{const o=e.current.getColumn(t);o?.valueSetter?n=o.valueSetter(r.value,n,o,e):n[t]=r.value}),n},[e])};_i(e,{getRowMode:M,startRowEditMode:F,stopRowEditMode:T},"public"),_i(e,O,"private"),w.useEffect(()=>{d&&I(d)},[d,I]),(0,Lt.A)(()=>{const t=mt(e),o=l.current;l.current=or(r);const n=new Set([...Object.keys(r),...Object.keys(o)]);Array.from(n).forEach(n=>{const l=r[n]??{mode:bo.View},i=o[n]?.mode||bo.View,a=t[n]?e.current.getRowId(t[n]):n;l.mode===bo.Edit&&i===bo.View?D((0,b.A)({id:a},l)):l.mode===bo.View&&i===bo.Edit&&H((0,b.A)({id:a},l))})},[e,r,D,H])})(e,t);const o=w.useRef({}),{isCellEditable:n}=t,l=r.hooks.useIsCellEditable(e,t),i=w.useCallback(e=>!!l(e)&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!n||n(e)),[n,l]);w.useEffect(()=>{const e=o.current;return()=>{Object.entries(e).forEach(([t,r])=>{Object.keys(r).forEach(r=>{const[o]=e[t][r];clearTimeout(o),delete e[t][r]})})}},[]);const a=w.useCallback((e,t)=>{if(o.current[e])if(t){if(o.current[e][t]){const[,r]=o.current[e][t];r()}}else Object.keys(o.current[e]).forEach(t=>{const[,r]=o.current[e][t];r()})},[]),s=w.useCallback(r=>{const{id:n,field:l,debounceMs:i}=r;return new Promise(a=>{((e,t,r,n)=>{if(!r)return void n();if(o.current[e]||(o.current[e]={}),o.current[e][t]){const[r]=o.current[e][t];clearTimeout(r)}const l=setTimeout(()=>{n(),delete o.current[e][t]},r);o.current[e][t]=[l,()=>{const[r]=o.current[e][t];clearTimeout(r),n(),delete o.current[e][t]}]})(n,l,i,async()=>{const o=t.editMode===ho.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(n,l)===mo.Edit){const e=await o(r);a(e)}})})},[e,t.editMode]),c=w.useCallback((r,o)=>t.editMode===ho.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(r,o):e.current.getRowWithUpdatedValuesFromRowEditing(r),[e,t.editMode]),u=w.useCallback((t,r)=>{const o=ws(e);return o[t]?.[r]??null},[e]),d={runPendingEditCellValueMutation:a};_i(e,{isCellEditable:i,setEditCellValue:s,getRowWithUpdatedValues:c,unstable_getEditCellMeta:u},"public"),_i(e,d,"private")}
1)(e,t,r),((e,t)=>{const r=Aa(e,"useGridFocus"),o=w.useRef(null),n=null!==e.current.rootElementRef.current,l=w.useCallback((t,r)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),r)},[e]),i=w.useCallback((t,o)=>{const n=Bn(e);n?.id===t&&n?.field===o||(e.current.setState(e=>(r.debug(`Focusing on cell with id=${t} and field=${o}`),(0,b.A)({},e,{tabIndex:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.getRow(t)&&(n&&l(n,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,o))))},[e,r,l]),a=w.useCallback((t,o={})=>{const n=Bn(e);l(n,o),e.current.setState(e=>(r.debug(`Focusing on column header with colIndex=${t}`),(0,b.A)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[e,r,l]),s=w.useCallback((t,o={})=>{const n=Bn(e);l(n,o),e.current.setState(e=>(r.debug(`Focusing on column header filter with colIndex=${t}`),(0,b.A)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))},[e,r,l]),c=w.useCallback((t,r,o={})=>{const n=Bn(e);n&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(n.id,n.field),o),e.current.setState(e=>(0,b.A)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:r},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[e]),u=w.useCallback(()=>Wn(e),[e]),d=w.useCallback((r,o,n)=>{let l=e.current.getColumnIndex(o);const i=Oe(e),a=Ti(e,(t.pagination,t.paginationMode)),s=Rt(e),c=[].concat(s.top||[],a.rows,s.bottom||[]);let u=c.findIndex(e=>e.id===r);"right"===n?l+=1:"left"===n?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=rr(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"===n||"below"===n?l=p.leftVisibleCellIndex:"right"===n&&(l=p.rightVisibleCellIndex)),l=rr(l,0,i.length-1);const f=i[l];e.current.setCellFocus(d.id,f.field)},[e,t.pagination,t.paginationMode]),p=w.useCallback(({id:t,field:r})=>{e.current.setCellFocus(t,r)},[e]),f=w.useCallback((t,r)=>{"Enter"===r.key||"Tab"===r.key||"Shift"===r.key||Fo(r.key)||e.current.setCellFocus(t.id,t.field)},[e]),g=w.useCallback(({field:t},r)=>{r.target===r.currentTarget&&e.current.setColumnHeaderFocus(t,r)},[e]),h=w.useCallback(({fields:t,depth:r},o)=>
1{if(o.target!==o.currentTarget)return;const n=Wn(e);null!==n&&n.depth===r&&t.includes(n.field)||e.current.setColumnGroupHeaderFocus(t[0],r,o)},[e]),m=w.useCallback((t,o)=>{o.relatedTarget?.getAttribute("class")?.includes(H.columnHeader)||(r.debug("Clearing focus"),e.current.setState(e=>(0,b.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[r,e]),C=w.useCallback(e=>{o.current=e},[]),v=w.useCallback(t=>{const r=o.current;o.current=null;const n=Bn(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:r}))return;if(!n)return void(r&&e.current.setCellFocus(r.id,r.field));if(r?.id===n.id&&r?.field===n.field)return;const i=e.current.getCellElement(n.id,n.field);i?.contains(t.target)||(r?e.current.setCellFocus(r.id,r.field):(e.current.setState(e=>(0,b.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),l(n,t)))},[e,l]),y=w.useCallback(t=>{if("view"===t.cellMode)return;const r=Bn(e);r?.id===t.id&&r?.field===t.field||e.current.setCellFocus(t.id,t.field)},[e]),x=w.useCallback(()=>{const r=Bn(e);if(r&&!e.current.getRow(r.id)){const o=r.id;let n=null;if(void 0!==o){const r=e.current.getRowElement(o),l=r?.dataset.rowindex?Number(r?.dataset.rowindex):0,i=Ti(e,(t.pagination,t.paginationMode)),a=i.rows[rr(l,0,i.rows.length-1)];n=a?.id??null}e.current.setState(e=>(0,b.A)({},e,{focus:{cell:null===n?null:{id:n,field:r.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),S=w.useMemo(()=>
1(0,Ya.A)(x,0),[x]),A=(0,It.A)(()=>{const r=Bn(e);if(!r)return;const o=Ti(e,(t.pagination,t.paginationMode));if(o.rows.find(e=>e.id===r.id)||0===o.rows.length)return;const n=Oe(e);e.current.setState(e=>(0,b.A)({},e,{tabIndex:{cell:{id:o.rows[0].id,field:n[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),R={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};_i(e,{setCellFocus:i,setColumnHeaderFocus:a,setColumnHeaderFilterFocus:s},"public"),_i(e,R,"private"),w.useEffect(()=>{const t=(0,Tl.A)(e.current.rootElementRef.current);return t.addEventListener("mouseup",v),()=>{t.removeEventListener("mouseup",v)}},[e,n,v]),Tt(e,"columnHeaderBlur",m),Tt(e,"cellDoubleClick",p),Tt(e,"cellMouseDown",C),Tt(e,"cellKeyDown",f),Tt(e,"cellModeChange",y),Tt(e,"columnHeaderFocus",g),Tt(e,"columnGroupHeaderFocus",h),Tt(e,"rowsSet",S),Tt(e,"paginationModelChange",A)})(e,t),((e,t)=>{const r=Aa(e,"useGridPreferencesPanel"),o=w.useCallback(()=>{e.current.setState(t=>{if(!t.preferencePanel.open)return t;r.debug("Hiding Preferences Panel");const o=We(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:o.openedPanelValue}),(0,b.A)({},t,{preferencePanel:{open:!1}})})},[e,r]),n=w.useCallback((t,o,n)=>{r.debug("Opening Preferences Panel"),e.current.setState(e=>(0,b.A)({},e,{preferencePanel:(0,b.A)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:o,labelId:n})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t})},[r,e]);_i(e,{showPreferences:n,hidePreferences:o},"public");const l=w.useCallback((r,o)=>{const n=We(e);return!o.exportOnlyDirtyModels||null!=t.initialState?.preferencePanel||n.open?(0,b.A)({},r,{preferencePanel:n}):r},[e,t.initialState?.preferencePanel]),i=w.useCallback((t,r)=>{const o=r.stateToRestore.preferencePanel;return null!=o&&e.current.setState(e=>(0,b.A)({},e,{preferencePanel:o})),t},[e]);La(e,"exportState",l),La(e,"restoreState",i)})(e,t),((e,t,r)=>{const o=Aa(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:yn,changeEvent:"filterModelChange"});const n=w.useCallback(()=>{e.current.setState(t=>{const r=yn(e),o=e.current.getFilterState(r),n=(0,b.A)({},t,{filter:(0,b.A)({},t.filter,o)}),l=ts(e,n);return(0,b.A)({},n,{visibleRowsLookup:l})}),e.current.publishEvent("filteredRowsSet")},[e]),l=w.useCallback((e,r)=>null==r||!1===r.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"],[t.disableColumnFilter]),i=w.useCallback(t=>{const r=yn(e),o=[...r.items],n=o.findIndex(e=>e.id===t.id);-1===n?o.push(t):o[n]=t,e.current.setFilterModel((0,b.A)({},r,{items:o}),"upsertFilterItem")},[e]),a=w.useCallback(t=>{const r=yn(e),o=[...r.items];t.forEach(e=>{const t=o.findIndex(t=>t.id===e.id);-1===t?o.push(e):o[t]=e}),e.current.setFilterModel((0,b.A)({},r,{items:o}),"upsertFilterItems")},[e]),s=w.useCallback(t=>{const r=yn(e),o=r.items.filter(e=>e.id!==t.id);o.length!==r.items.length&&e.current.setFilterModel((0,b.A)({},r,{items:o}),"deleteFilterItem")},[e]),c=w.useCallback((r,n,l)=>{if(o.debug("Displaying filter panel"),r){const o=yn(e),n=o.items.filter(t=>{if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const r=e.current.getColumn(t.field),o=r.filterOperators?.find(e=>e.value===t.operator);return!(void 0===o?.requiresFilterValue||o?.requiresFilterValue)});let l;const i=n.find(e=>e.field===r),a=e.current.getColumn(r);l=i?n:t.disableMultipleColumnsFiltering?[dr({field:r,operator:a.filterOperators[0].value},e)]:[...n,dr({field:r,operator:a.filterOperators[0].value},e)],e.current.setFilterModel((0,b.A)({},o,{items:l}))}e.current.showPreferences(Ke.filters,n,l)},[e,o,t.disableMultipleColumnsFiltering]),u=w.useCallback(()=>{o.debug("Hiding filter panel"),e.current.hidePreferences()},[e,o]),d=w.useCallback(t=>{const r=yn(e);r.logicOperator!==t&&e.current.setFilterModel((0,b.A)({},r,{logicOperator:t}),"changeLogicOperator")},[e]),p=w.useCallback(t=>{const r=yn(e);Hl(r.quickFilterValues,t)||e.current.setFilterModel((0,b.A)({},r,{quickFilterValues:[...t]}))},[e]),f=w.useCallback((r,n)=>{yn(e)!==r&&(o.debug("Setting filter model"),e.current.updateControlState("filter",fr(r,t.disableMultipleColumnsFiltering,e),n),e.current.unstable_applyFilters())},[e,o,t.disableMultipleColumnsFiltering]),g=w.useCallback(o=>{const n=pr(o,t.disableMultipleColumnsFiltering,e),l=r.hooks.useFilterValueGetter(e,t),i="client"===t.filterMode?wr(n,l,e,t.disableEval):null,a=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:i,filterModel:n??sr(),filterValueGetter:l});return(0,b.A)({},a,{filterModel:n})},[e,r.hooks,t]),h={setFilterLogicOperator:d,unstable_applyFilters:n,deleteFilterItem:s,upsertFilterItem:i,upsertFilterItems:a,setFilterModel:f,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:p,ignoreDiacritics:t.ignoreDiacritics,getFilterState:g};_i(e,h,"public");const m=w.useCallback((r,o)=>{const n=yn(e);
1return n.items.forEach(e=>{delete e.fromInput}),o.exportOnlyDirtyModels&&null==t.filterModel&&null==t.initialState?.filter?.filterModel&&Hl(n,sr())?r:(0,b.A)({},r,{filter:{filterModel:n}})},[e,t.filterModel,t.initialState?.filter?.filterModel]),C=w.useCallback((r,o)=>{const n=o.stateToRestore.filter?.filterModel;return null==n?r:(e.current.updateControlState("filter",fr(n,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,b.A)({},r,{callbacks:[...r.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),v=w.useCallback((e,r)=>{if(r===Ke.filters){const e=t.slots.filterPanel;return(0,ie.jsx)(e,(0,b.A)({},t.slotProps?.filterPanel))}return e},[t.slots.filterPanel,t.slotProps?.filterPanel]),{getRowId:y}=t,x=(0,V.A)(rs),S=w.useCallback(r=>{if("client"!==t.filterMode||!r.isRowMatchingFilters||!r.filterModel.items.length&&!r.filterModel.quickFilterValues?.length)return ar;const o=mt(e),n={},{isRowMatchingFilters:l}=r,i={},a={passingFilterItems:null,passingQuickFilterValues:null},s=x.current(e.current.state.rows.dataRowIdToModelLo
1okup);for(let t=0;t<s.length;t+=1){const o=s[t],c=y?y(o):o.id;l(o,void 0,a);const u=vr([a.passingFilterItems],[a.passingQuickFilterValues],r.filterModel,r.filterValueGetter,e,i);u||(n[c]=u)}const c="auto-generated-group-footer-root";return o[c]&&(n[c]=!0),{filteredRowsLookup:n,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}},[e,t.filterMode,y,x]);La(e,"columnMenu",l),La(e,"exportState",m),La(e,"restoreState",C),La(e,"preferencePanel",v),Za(e,va,"filtering",S),Za(e,va,"visibleRowsLookupCreation",es);const A=w.useCallback(()=>{o.debug("onColUpdated - GridColumns changed, applying filters");const t=yn(e),r=Fe(e),n=t.items.filter(e=>e.field&&r[e.field]);n.length<t.items.length&&e.current.setFilterModel((0,b.A)({},t,{items:n}))},[e,o]),R=w.useCallback(t=>{"filtering"===t&&e.current.unstable_applyFilters()},[e]),M=w.useCallback(()=>{e.current.setState(t=>(0,b.A)({},t,{visibleRowsLookup:ts(e,t)}))},[e]);Tt(e,"rowsSet",n),Tt(e,"columnsChange",A),Tt(e,"activeStrategyProcessorChange",R),Tt(e,"rowExpansionChange",M),Tt(e,"columnVisibilityModelChange",()=>{const t=yn(e);t.quickFilterValues?.length&&br(t)&&n()}),mi(()=>{"DataGrid"===t.signature&&n()}),(0,Lt.A)(()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)},[e,o,t.filterModel])})(e,t,r),((e,t)=>{const r=Aa(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:wn,changeEvent:"sortModelChange"});const o=w.useCallback((t,r)=>{const o=wn(e),n=o.findIndex(e=>e.field===t);let l=[...o];return n>-1?null==r?.sort?l.splice(n,1):l.splice(n,1,r):l=[...o,r],l},[e]),n=w.useCallback((r,o)=>{const n=wn(e).find(e=>e.field===r.field);if(n){const e=void 0===o?Ut(r.sortingOrder??t.sortingOrder,n.sort):o;return void 0===e?void 0:(0,b.A)({},n,{sort:e})}return{field:r.field,sort:void 0===o?Ut(r.sortingOrder??t.sortingOrder):o}},[e,t.sortingOrder]),l=w.useCallback((e,r)=>null==r||!1===r.sortable||t.disableColumnSorting?e:(r.sortingOrder||t.sortingOrder).some(e=>!!e)?[...e,"columnMenuSortItem"]:e,[t.sortingOrder,t.disableColumnSorting]),i=w.useCallback(()=>{e.current.setState(o=>{if("server"===t.sortingMode)return r.debug("Skipping sorting rows as sortingMode = server"),(0,b.A)({},o,{sorting:(0,b.A)({},o.sorting,{sortedRows:Ur(bt(e),$r,!1)})});const n=((e,t)=>{const r=e.map(e=>((e,t)=>{const r=t.current.getColumn(e.field);if(!r||null===e.sort)return null;let o;return o=r.getSortComparator?r.getSortComparator(e.sort):"desc"===e.sort?(...e)=>-1*r.sortComparator(...e):r.sortComparator,o?{getSortCellParams:e=>({id:e,field:r.field,rowNode:wt(t,e),value:t.current.getCellValue(e,r.field),api:t.current}),comparator:o}:null})(e,t)).filter(e=>!!e);return 0===r.length?null:e=>e.map(e=>({node:e,params:r.map(t=>t.getSortCellParams(e.id))})).sort((e,t)=>{return o=e,n=t,r.reduce((e,t,r)=>{if(0!==e)return e;const l=o.params[r],i=n.params[r];return t.comparator(l.value,i.value,l,i)},0);var o,n}).map(e=>e.node.id)})(wn(e),e),l=e.current.applyStrategyProcessor("sorting",{sortRowList:n});return(0,b.A)({},o,{sorting:(0,b.A)({},o.sorting,{sortedRows:l})})}),e.current.publishEvent("sortedRowsSet")},[e,r,t.sortingMode]),a=w.useCallback(o=>{wn(e)!==o&&(r.debug("Setting sort model"),e.current.setState(Wt(o,t.disableMultipleColumnsSorting)),e.current.applySorting())},[e,r,t.disableMultipleColumnsSorting]),s=w.useCallback((r,l,i)=>{const a=e.current.getColumn(r),s=n(a,l);let c;c=!i||t.disableMultipleColumnsSorting?null==s?.sort?[]:[s]:o(a.field,s),e.current.setSortModel(c)},[e,o,n,t.disableMultipleColumnsSorting]),c=w.useCallback(()=>wn(e),[e]),u=w.useCallback(()=>bn(e).map(e=>e.model),[e]),d=w.useCallback(()=>mn(e),[e]),p=w.useCallback(t=>e.current.getSortedRowIds()[t],[e]);_i(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:p,setSortModel:a,sortColumn:s,applySorting:i},"public");const f=w.useCallback((r,o)=>{const n=wn(e);return!o.exportOnlyDirtyModels||null!=t.sortModel||null!=t.initialState?.sorting?.sortModel||n.length>0?(0,b.A)({},r,{sorting:{sortModel:n}}):r},[e,t.sortModel,t.initialState?.sorting?.sortModel]),g=w.useCallback((r,o)=>{const n=o.stateToRestore.sorting?.sortModel;return null==n?r:(e.current.setState(Wt(n,t.disableMultipleColumnsSorting)),(0,b.A)({},r,{callbacks:[...r.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),h=w.useCallback(t=>{const r=bt(e),o=r[$r],n=t.sortRowList?t.sortRowList(o.children.map(e=>r[e])):[...o.children];return null!=o.footerId&&n.push(o.footerId),n},[e]);La(e,"exportState",f),La(e,"restoreState",g),Za(e,va,"sorting",h);const m=w.useCallback(({field:e,colDef:r},o)=>
1{if(!r.sortable||t.disableColumnSorting)return;const n="always"===t.multipleColumnsSortingMode||o.shiftKey||o.metaKey||o.ctrlKey;s(e,void 0,n)},[s,t.disableColumnSorting,t.multipleColumnsSortingMode]),C=w.useCallback(({field:e,colDef:r},o)=>{r.sortable&&!t.disableColumnSorting&&("Enter"!==o.key||o.ctrlKey||o.metaKey||s(e,void 0,"always"===t.multipleColumnsSortingMode||o.shiftKey))},[s,t.disableColumnSorting,t.multipleColumnsSortingMode]),v=w.useCallback(()=>{const t=wn(e),r=Fe(e);if(t.length>0){const o=t.filter(e=>r[e.field]);o.length<t.length&&e.current.setSortModel(o)}},[e]),y=w.useCallback(t=>{"sorting"===t&&e.current.applySorting()},[e]);La(e,"columnMenu",l),Tt(e,"columnHeaderClick",m),Tt(e,"columnHeaderKeyDown",C),Tt(e,"rowsSet",e.current.applySorting),Tt(e,"columnsChange",v),Tt(e,"activeStrategyProcessorChange",y),mi(()=>{"DataGrid"===t.signature&&e.current.applySorting()}),(0,Lt.A)(()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])})(e,t),((e,t)=>{const r=Aa(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Ce,changeEvent:"densityChange"});const o=(0,It.A)(t=>{Ce(e)!==t&&(r.debug(`Set grid density to ${t}`),e.current.setState(e=>(0,b.A)({},e,{density:t})))});_i(e,{setDensity:o},"public");const n=w.useCallback((r,o)=>{const n=Ce(e);return o.exportOnlyDirtyModels&&null==t.density&&null==t.initialState?.density?r:(0,b.A)({},r,{density:n})},[e,t.density,t.initialState?.density]),l=w.useCallback((t,r)=>{const o=r.stateToRestore?.density?r.stateToRestore.density:Ce(e);return e.current.setState(e=>(0,b.A)({},e,{density:o})),t},[e]);La(e,"exportState",n),La(e,"restoreState",l),w.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])})(e,t),nc(e,t),((e,t)=>{((e,t)=>{const r=Aa(e,"useGridPaginationMeta");e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:Ri,changeEvent:"paginationMetaChange"});const o=w.useCallback(t=>{Ri(e)!==t&&(r.debug("Setting 'paginationMeta' to",t),e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{meta:t})})))},[e,r]);_i(e,{setPaginationMeta:o},"public");const n=w.useCallback((r,o)=>{const n=Ri(e);return o.exportOnlyDirtyModels&&null==t.paginationMeta&&null==t.initialState?.pagination?.meta?r:(0,b.A)({},r,{pagination:(0,b.A)({},r.pagination,{meta:n})})},[e,t.paginationMeta,t.initialState?.pagination?.meta]),l=w.useCallback((t,r)=>{const o=r.stateToRestore.pagination?.meta?r.stateToRestore.pagination.meta:Ri(e);return e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{meta:o})})),t},[e]);La(e,"exportState",n),La(e,"restoreState",l),w.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])})(e,t),((e,t)=>{const r=Aa(e,"useGridPaginationModel"),o=_(e,ve),n=w.useRef(yn(e)),l=Math.floor(t.rowHeight*o);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Si,changeEvent:"paginationModelChange"});const i=w.useCallback(t=>{const o=Si(e);t!==o.page&&(r.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:o.pageSize}))},[e,r]),a=w.useMemo(()=>(0,Ya.A)(i,0),[i]),s=w.useCallback(t=>{const o=Si(e);t!==o.pageSize&&(r.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:o.page}))},[e,r]),c=w.useCallback(o=>{const n=Si(e);o!==n&&(r.debug("Setting 'paginationModel' to",o),e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{paginationModel:Qa(e.pagination,t.signature,o)})}),"setPaginationModel"))},[e,r,t.signature]);_i(e,{setPage:i,setPageSize:s,setPaginationModel:c},"public");const u=w.useCallback((r,o)=>{const n=Si(e);return!o.exportOnlyDirtyModels||null!=t.paginationModel||null!=t.initialState?.pagination?.paginationModel||0!==n.page&&n.pageSize!==(t.autoPageSize?0:100)?(0,b.A)({},r,{pagination:(0,b.A)({},r.pagination,{paginationModel:n})}):r},[e,t.paginationModel,t.initialState?.pagination?.paginationModel,t.autoPageSize]),d=w.useCallback((r,o)=>{const n=o.stateToRestore.pagination?.paginationModel?(0,b.A)({},Ci(t.autoPageSize),o.stateToRestore.pagination?.paginationModel):Si(e);return e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{paginationModel:Qa(e.pagination,t.signature,n)})}),"stateRestorePreProcessing"),r},[e,t.autoPageSize,t.signature]);La(e,"exportState",u),La(e,"restoreState",d);const p=w.useCallback(()=>
1{if(!t.autoPageSize)return;const r=e.current.getRootDimensions(),o=Math.max(1,Math.floor(r.viewportInnerSize.height/l));e.current.setPageSize(o)},[e,t.autoPageSize,l]),f=w.useCallback(t=>{if(null==t)return;const r=Si(e);if(0===r.page)return;const o=Pi(e);r.page>o-1&&queueMicrotask(()=>{a(Math.max(0,o-1))})},[e,a]),g=w.useCallback(()=>{0!==Si(e).page&&a(0),0!==e.current.getScrollPosition().top&&e.current.scroll({top:0})},[e,a]),h=w.useMemo(()=>(0,Ya.A)(g,0),[g]),m=w.useCallback(t=>{const r=(0,b.A)({},t,{items:Tn(e)});Hl(r,n.current)||(n.current=r,h())},[e,h]);Tt(e,"viewportInnerSizeChange",p),Tt(e,"paginationModelChange",()=>{const t=Si(e);e.current.virtualScrollerRef?.current&&e.current.scrollToIndexes({rowIndex:t.page*t.pageSize})}),Tt(e,"rowCountChange",f),Tt(e,"sortModelChange",h),Tt(e,"filterModelChange",m);const C=w.useRef(!0);w.useEffect(()=>{C.current?C.current=!1:t.pagination&&e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{paginationModel:Qa(e.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.signature,t.pagination]),w.useEffect(()=>{e.current.setState(e=>{const r=!0===t.pagination;return e.pagination.paginationMode===t.paginationMode&&e.pagination.enabled===r?e:(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{paginationMode:t.paginationMode,enabled:r})})})},[e,t.paginationMode,t.pagination]),w.useEffect(p,[p])})(e,t),((e,t)=>{const r=Aa(e,"useGridRowCount"),o=(0,V.A)(()=>Si(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Ai,changeEvent:"rowCountChange"});const n=w.useCallback(t=>{Ai(e)!==t&&(r.debug("Setting 'rowCount' to",t),e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{rowCount:t})})))},[e,r]);_i(e,{setRowCount:n},"public");const l=w.useCallback((r,o)=>{const n=Ai(e);return o.exportOnlyDirtyModels&&null==t.rowCount&&null==t.initialState?.pagination?.rowCount?r:(0,b.A)({},r,{pagination:(0,b.A)({},r.pagination,{rowCount:n})})},[e,t.rowCount,t.initialState?.pagination?.rowCount]),i=w.useCallback((t,r)=>{const o=r.stateToRestore.pagination?.rowCount?r.stateToRestore.pagination.rowCount:Ai(e);return e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{rowCount:o})})),t},[e]);La(e,"exportState",l),La(e,"restoreState",i);const a=w.useCallback(r=>{"client"!==t.paginationMode&&o.current&&r.pageSize!==o.current&&(o.current=r.pageSize,-1===Ai(e)&&e.current.setPage(0))},[t.paginationMode,o,e]);Tt(e,"paginationModelChange",a),w.useEffect(()=>{"server"===t.paginationMode&&null!=t.rowCount&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,t.rowCount]),Il(e.current.store,()=>!(!1!==Ri(e).hasNextPage)||("client"===t.paginationMode?Fn(e):void 0),(t,r)=>{if(!0===r&&-1!==Ai(e)){const t=Fn(e),r=Si(e);e.current.setRowCount(r.pageSize*r.page+t)}else"number"==typeof r&&e.current.setRowCount(r)}),w.useEffect(()=>{"client"===t.paginationMode&&e.current.setRowCount(Fn(e))},[e,t.paginationMode])})(e,t)})(e,t),((e,t)=>{const r=(0,ko.I)(),o=Aa(e,"useGridScroll"),n=e.current.columnHeadersContainerRef,l=e.current.virtualScrollerRef,i=w.useCallback(r=>{const n=tt(e),i=ft(e),a=Oe(e);if(null!=r.rowIndex&&0===i||0===a.length)return!1;o.debug(`Scrolling to cell at row ${r.rowIndex}, col: ${r.colIndex} `);let s={};if(void 0!==r.colIndex){const t=Ne(e);let o;if(void 0!==r.rowIndex){const t=Rn(e),n=t[r.rowIndex]?.id,l=e.current.unstable_getCellColSpanInfo(n,r.colIndex);l&&!l.spannedByColSpan&&(o=l.cellProps.width)}void 0===o&&(o=a[r.colIndex].computedWidth),s.left=Os({containerSize:n.viewportOuterSize.width,scrollPosition:Math.abs(l.current.scrollLeft),elementSize:o,elementOffset:t[r.colIndex]})}if(void 0!==r.rowIndex){const o=an(e),i=Mi(e),a=Ii(e),c=t.pagination?r.rowIndex-i*a:r.rowIndex,u=o.positions[c+1]?o.positions[c+1]-o.positions[c]:o.currentPageTotalHeight-o.positions[c];s.top=Os({containerSize:n.viewportInnerSize.height,scrollPosition:l.current.scrollTop,elementSize:u,elementOffset:o.positions[c]})}return s=e.current.unstable_applyPipeProcessors("scrollToIndexes",s,r),(void 0!==s.left||void 0!==s.top)&&(e.current.scroll(s),!0)},[o,e,l,t.pagination]),a=w.useCallback(e=>{if(l.current&&void 0!==e.left&&n.current){const t=r?-1:1;n.current.scrollLeft=e.left,l.current.scrollLeft=t*e.left,o.debug(`Scrolling left: ${e.left}`)}l.current&&void 0!==e.top&&(l.current.scrollTop=e.top,o.debug(`Scrolling top: ${e.top}`)),o.debug("Scrolling, updating container, and viewport")},[l,r,n,o]),s=w.useCallback(()=>l?.current?{top:l.current.scrollTop,left:l.current.scrollLeft}:{top:0,left:0},[l]);_i(e,{scroll:a,scrollToIndexes:i,getScrollPosition:s},"public")})(e,t),(e=>{const t=Aa(e,"useGridColumnMenu"),r=w.useRef({}),o=w.useCallback(()=>{r.current.wheel?.(),r.current.touchMove?.()},[]),n=w.useCallback(()=>{o(),r.current.wheel=e.current.subscribeEvent("virtualScrollerWheel",e.current.hideColumnMenu),r.current.touchMove=e.current.subscribeEvent("virtualScrollerTouchMove",e.current.hideColumnMenu)},[e,o]),l=w.useCallback(r=>{const o=Xn(e),l=r;(!0!==o.open||l!==o.field)&&(e.current.setState(e=>e.columnMenu.open&&e.columnMenu.field===r?e:(t.debug("Opening Column Menu"),n(),(0,b.A)({},e,{columnMenu:{open:!0,field:r}}))),e.current.hidePreferences())},[e,t,n]),i=w.useCallback(()=>{const r=Xn(e);if(r.field){const t=Fe(e),o=Te(e),n=Ee(e);let l=r.field;if(t[l]||(l=n[0]),!1===o[l]){const e=n.filter(e=>e===l||!1!==o[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!==r.open||n.field!==r.field)&&e.current.setState(e=>(t.debug("Hiding Column Menu"),o(),(0,b.A)({},e,{columnMenu:n})))},[e,t,o]),a=w.useCallback(r=>{t.debug("Toggle Column Menu");const o=Xn(e);o.open&&o.field===r?i():l(r)},[e,t,l,i]);_i(e,{showColumnMenu:l,hideColumnMenu:i,toggleColumnMenu:a},"public"),Tt(e,"columnResizeStart",i)})(e),Xa(e,t),((e,t)=>{const r=null!==e.current.rootElementRef.current,o=Aa(e,"useGridPrintExport"),n=w.useRef(null),l=w.useRef(null),i=w.useRef({}),a=w.useRef([]),s=w.useRef(null);
1w.useEffect(()=>{n.current=(0,Tl.A)(e.current.rootElementRef.current)},[e,r]);const c=w.useCallback((t,r,o)=>new Promise(n=>{const l=Va({apiRef:e,options:{fields:t,allColumns:r}}).map(e=>e.field),i=De(e),a={};i.forEach(e=>{a[e.field]=l.includes(e.field)}),o&&(a[Da.field]=!0),e.current.setColumnVisibilityModel(a),n()}),[e]),u=w.useCallback(t=>{const r=t({apiRef:e}).reduce((t,r)=>{const o=e.current.getRow(r);return o[zr]||t.push(o),t},[]);e.current.setRows(r)},[e]),d=w.useCallback((t,r)=>{const o=(0,b.A)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},r),l=t.contentDocument;if(!l)return;const i=e.current.rootElementRef.current,a=i.cloneNode(!0),s=a.querySelector(`.${H.virtualScrollerContent}`);if(a.querySelector(`.${H.main}`).style.overflow="visible",a.querySelector(`.${H.virtualScrollerRenderZone}`).style.position="static",s.style.flexBasis="auto",a.querySelector(`.${H["scrollbar--vertical"]}`)?.remove(),!(s.nextSibling instanceof HTMLElement&&s.nextSibling.classList.contains(H.filler))){const e=document.createElement("div");e.style.height=gl,s.insertAdjacentElement("afterend",e)}const c=a.querySelector(`.${H.footerContainer}`);o.hideToolbar&&a.querySelector(`.${H.toolbar}`)?.remove(),o.hideFooter&&c&&c.remove(),a.style.height="auto",a.style.boxSizing="content-box",!o.hideFooter&&c&&(c.style.width="100%");const u=document.createElement("div");u.appendChild(a),l.body.style.marginTop="0px",l.body.innerHTML=u.innerHTML;const d="function"==typeof o.pageStyle?o.pageStyle():o.pageStyle;if("string"==typeof d){const e=l.createElement("style");e.appendChild(l.createTextNode(d)),l.head.appendChild(e)}o.bodyClassName&&l.body.classList.add(...o.bodyClassName.split(" "));let p=[];if(o.copyStyles){const e=i.getRootNode();p=function(e,t){const r=[],o=t.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t<o.length;t+=1){const n=o[t],l=e.createElement(n.tagName);if("STYLE"===n.tagName){const t=n.sheet;if(t){let r="";for(let e=0;e<t.cssRules.length;e+=1)"string"==typeof t.cssRules[e].cssText&&(r+=`${t.cssRules[e].cssText}\r\n`);l.appendChild(e.createTextNode(r))}}else if(n.getAttribute("href")){for(let e=0;e<n.attributes.length;e+=1){const t=n.attributes[e];t&&l.setAttribute(t.nodeName,t.nodeValue||"")}r.push(new Promise(e=>{l.addEventListener("load",()=>e())}))}e.head.appendChild(l)}return r}(l,"ShadowRoot"===e.constructor.name?e:n.current)}Promise.all(p).then(()=>{t.contentWindow.print()})},[e,n]),p=w.useCallback(t=>{n.current.body.removeChild(t),e.current.restoreState(l.current||{}),l.current?.columns?.columnVisibilityModel||e.current.setColumnVisibilityModel(i.current),e.current.setState(e=>(0,b.A)({},e,{virtualization:s.current})),e.current.setRows(a.current),l.current=null,i.current={},a.current=[]},[e]),f=w.useCallback(async r=>{if(o.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(l.current=e.current.exportState(),i.current=Te(e),a.current=e.current.getSortedRows().filter(e=>!e[zr]),t.pagination){const t={page:0,pageSize:En(e)};e.current.setState(e=>(0,b.A)({},e,{pagination:(0,b.A)({},e.pagination,{paginationModel:Qa(e.pagination,"DataGridPro",t)})}))}s.current=e.current.state.virtualization,e.current.unstable_setVirtualization(!1),await c(r?.fields,r?.allColumns,r?.includeCheckboxes),u(r?.getRowsToExport??Ba),await new Promise(e=>{requestAnimationFrame(()=>{e()})});const f=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}(r?.fileName);f.onload=()=>{d(f,r),f.contentWindow.matchMedia("print").addEventListener("change",e=>{!1===e.matches&&p(f)})},n.current.body.appendChild(f)},[t,o,e,d,p,c,u]);_i(e,{exportDataAsPrint:f},"public");const g=w.useCallback((e,t)=>t.printOptions?.disableToolbarButton?e:[...e,{component:(0,ie.jsx)(_a,{options:t.printOptions}),componentName:"printExport"}],[]);La(e,"exportMenu",g)})(e,t),((e,t)=>{const r=t.ignoreValueFormatterDuringExport,o=("object"==typeof r?r?.clipboardExport:r)||!1,n=t.clipboardCopyCellDelimiter,l=w.useCallback(t=>{if(!function(e){return(e.ctrlKey||e.metaKey)&&"C"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}(t))return;if(r=t.target,window.getSelection()?.toString()||r&&(r.selectionEnd||0)-(r.selectionStart||0)>0)return;var r;let l="";if(Ui(e)>0)l=e.current.getDataAsCsv({includeHeaders:!1,delimiter:n,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=Bn(e);if(t){const r=e.current.getCellParams(t.id,t.field);l=Ha(r,{csvOptions:{delimiter:n,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:o})}}var i;l=e.current.unstable_applyPipeProcessors("clipboardCopy",l),l&&(i=l,navigator.clipboard?navigator.clipboard.writeText(i).catch(()=>{$a(i)}):$a(i),e.current.publishEvent("clipboardCopy",l))},[e,o,n]);Ra(e,()=>e.current.rootElementRef.current,"keydown",l),Ot(e,"clipboardCopy",t.onClipboardCopy)})(e,t),function(e,t){const r=w.useCallback(()=>tt(e),[e]),o={updateDimensions:()=>e.current.virtualizer.api.updateDimensions(),getViewportPageSize:()=>e.current.virtualizer.api.getViewportPageSize()};_i(e,{getRootDimensions:r},"public"),_i(e,o,"private"),Ot(e,"rootMount",t=>{Ns(t,tt(e))}),Ot(e,"debouncedResize",t.onResize),Il(e.current.store,e=>e.dimensions,(t,r)=>{var o,n;r.isReady&&(e.current.rootElementRef.current&&Ns(e.current.rootElementRef.current,r),o=r.viewportInnerSize,n=t.viewportInnerSize,(o.width!==n.width||o.height!==n.height)&&e.current.publishEvent("viewportInnerSizeChange",r.viewportInnerSize),e.current.publishEvent("debouncedResize",r.root))})}(e,t),function(e,t){Ot(e,"columnHeaderClick",t.onColumnHeaderClick),Ot(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),Ot(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),Ot(e,"columnHeaderOver",t.onColumnHeaderOver),Ot(e,"columnHeaderOut",t.onColumnHeaderOut),Ot(e,"columnHeaderEnter",t.onColumnHeaderEnter),Ot(e,"columnHeaderLeave",t.onColumnHeaderLeave),Ot(e,"cellClick",t.onCellClick),Ot(e,"cellDoubleClick",t.onCellDoubleClick),Ot(e,"cellKeyDown",t.onCellKeyDown),Ot(e,"preferencePanelClose",t.onPreferencePanelClose),Ot(e,"preferencePanelOpen",t.onPreferencePanelOpen),Ot(e,"menuOpen",t.onMenuOpen),Ot(e,"menuClose",t.onMenuClose),Ot(e,"rowDoubleClick",t.onRowDoubleClick),Ot(e,"rowClick",t.onRowClick),Ot(e,"stateChange",t.onStateChange)}(e,t),(e=>{const t=w.useCallback((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t),[e]),r=w.useCallback(t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}
1).callbacks.forEach(e=>{e()})},[e]);_i(e,{exportState:t,restoreState:r},"public")})(e),function(e,t){const{autoHeight:r,disableVirtualization:o}=t,n=t=>{const{virtualizer:o}=e.current;t&&=_s;const n=o.store.getSnapshot();n.virtualization.enabled===t&&n.virtualization.enabledForRows===t&&n.virtualization.enabledForColumns===t||o.store.set("virtualization",(0,b.A)({},o.store.state.virtualization,{enabled:t,enabledForColumns:t,enabledForRows:t&&!r}))};_i(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:t=>{const{virtualizer:r}=e.current;t&&=_s,r.store.getSnapshot().virtualization.enabledForColumns!==t&&r.store.set("virtualization",(0,b.A)({},r.store.state.virtualization,{enabledForColumns:t}))}},"public");const l=()=>{const{virtualizer:t}=e.current;t?.api.scheduleUpdateRenderContext()};e.current.register("private",{updateRenderContext:l}),Ot(e,"sortedRowsSet",l),Ot(e,"paginationModelChange",l),Ot(e,"columnsChange",l),w.useEffect(()=>{e.current.virtualizer&&n(!t.disableVirtualization)},[e,o,r])}(e,t),function(e,t){const r=()=>{e.current.setState(t=>t.listViewColumn?(0,b.A)({},t,{listViewColumn:(0,b.A)({},t.listViewColumn,{computedWidth:dc(e)})}):t)},o=w.useRef(null);Tt(e,"viewportInnerSizeChange",e=>{o.current!==e.width&&(o.current=e.width,r())}),Tt(e,"columnVisibilityModelChange",r),(0,Lt.A)(()=>{const r=t.listViewColumn;r&&e.current.setState(t=>(0,b.A)({},t,{listViewColumn:(0,b.A)({},r,{computedWidth:dc(e)})}))},[e,t.listViewColumn]),w.useEffect(()=>{t.listView&&t.listViewColumn},[t.listView,t.listViewColumn])}(e,t),((e,t)=>{const{api:r,strategyProcessor:o,events:n,setStrategyAvailability:l}=((e,t,r={})=>{const o=w.useCallback(()=>{e.current.setStrategyAvailability(Ca.DataSource,fc.Default,t.dataSource?()=>!0:()=>!1)},[e,t.dataSource]),[n,l]=w.useState(e.current.getActiveStrategy(Ca.DataSource)),i=w.useMemo(()=>n===fc.Default||n===fc.GroupedData,[n]),a=_(e,Si),s=w.useRef(0),c=t.onDataSourceError,u=(0,V.A)(()=>{if(!t.pagination)return new gc(a.pageSize);const e=t.pageSizeOptions.map(e=>"number"==typeof e?e:e.value).sort((e,t)=>e-t),r=Math.min(a.pageSize,e[0]);return new gc(r)}).current,[d,p]=w.useState(()=>yc(t.dataSourceCache,r.cacheOptions)),f=w.useCallback(async(o,n)=>{const l=t.dataSource?.getRows;if(!l)return;if(o&&o!==$r&&"DataGrid"!==t.signature)return void r.fetchRowChildren?.([o]);r.clearDataSourceState?.();const a=n||{},{skipCache:p,keepChildrenExpanded:f}=a,g=(0,x.A)(a,Cc),h=(0,b.A)({},pc(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),g),m=u.getCacheKeys(h).map(e=>d.get(e));if(!p&&m.every(e=>void 0!==e))return void e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:gc.mergeResponses(m),fetchParams:h,options:{skipCache:p,keepChildrenExpanded:f}});(i||0===e.current.getRowsCount())&&e.current.setLoading(!0);const w=s.current+1;s.current=w;try{const t=await l(h);u.splitResponse(h,t).forEach((e,t)=>d.set(t,e)),s.current===w&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:t,fetchParams:h,options:{skipCache:p,keepChildrenExpanded:f}})}catch(t){s.current===w&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:t,fetchParams:h,options:{skipCache:p,keepChildrenExpanded:f}}),"function"==typeof c&&c(new bc({message:t?.message,params:h,cause:t})))}finally{i&&s.current===w&&e.current.setLoading(!1)}},[u,d,e,i,t.dataSource?.getRows,c,r,t.signature]),g=w.useCallback(()=>{l(e.current.getActiveStrategy(Ca.DataSource))},[e]),h=w.useCallback(t=>{if("error"in t)return void e.current.setRows([]);const{response:r}=t;void 0!==r.rowCount&&e.current.setRowCount(r.rowCount),e.current.setRows(r.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:t.fetchParams,response:r},!0)},[e]),m=t.dataSource?.updateRow,C=r.handleEditRow,v=w.useCallback(async t=>{if(m)try{const r=await m(t);return"function"==typeof C?(C(t,r),r):(r&&!Hl(r,t.previousRow)&&e.current.dataSource.cache.clear(),e.current.updateNestedRows([r],[]),r)}catch(e){throw"function"==typeof c&&c(new wc({message:e?.message,params:t,cause:e})),e}},[e,m,c,C]),y={dataSource:{fetchRows:f,cache:d,editRow:v}},S=w.useMemo(()=>(0,Ya.A)(f,0),[f]),A=w.useRef(!0);return w.useEffect(()=>{if(A.current)return void(A.current=!1);if(void 0===t.dataSourceCache)return;const e=yc(t.dataSourceCache,r.cacheOptions);p(t=>t!==e?e:t)},[t.dataSourceCache,r.cacheOptions]),w.useEffect(()=>{if(n===fc.Default||n===fc.LazyLoading||n===fc.GroupedData)return t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows()),()=>{s.current+=1}},[e,t.dataSource,n]),{api:{public:y},debouncedFetchRows:S,strategyProcessor:{strategyName:fc.Default,group:"dataSourceRowsUpdate",processor:h},setStrategyAvailability:o,cacheChunkManager:u,cache:d,events:{strategyAvailabilityChange:g,sortModelChange:nr(i,()=>S()),filterModelChange:nr(i,()=>S()),paginationModelChange:nr(i,()=>S())}}})(e,t);_i(e,r.public,"public"),Za(e,o.strategyName,o.group,o.processor),Object.entries(n).forEac
1h(([t,r])=>{Tt(e,t,r)}),w.useEffect(()=>{l()},[l])})(e,t),mi(()=>{e.current.runAppliersForPendingProcessors()}),w.useEffect(()=>{e.current.runAppliersForPendingProcessors()})};var Sc=r(9552),Ac=r(2323);const Rc={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…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarCharts:"Charts",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",columnMenuManageCharts:"Manage charts",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>
1`${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:({from:e,to:t,count:r,estimated:o})=>o?`${e}–${t} of ${-1!==r?r:o&&o>t?`around ${o}`:`more than ${t}`}`:`${e}–${t} of ${-1!==r?r:`more than ${t}`}`,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",aggregationFunctionLabelNone:"none",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
1ields",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)",chartsNoCharts:"There are no charts available",chartsChartNotSelected:"Select a chart type to configure its options",chartsTabChart:"Chart",chartsTabFields:"Fields",chartsTabCustomize:"Customize",chartsCloseButton:"Close charts configuration",chartsSyncButtonLabel:"Sync chart",chartsSearchPlaceholder:"Search fields",chartsSearchLabel:"Search fields",chartsSearchClear:"Clear search",chartsNoFields:"No fields",chartsFieldBlocked:"This field cannot be added to any section",chartsCategories:"Categories",chartsSeries:"Series",chartsMenuAddToDimensions:e=>`Add to ${e}`,chartsMenuAddToValues:e=>`Add to ${e}`,chartsMenuMoveUp:"Move up",chartsMenuMoveDown:"Move down",chartsMenuMoveToTop:"Move to top",chartsMenuMoveToBottom:"Move to bottom",chartsMenuOptions:"Field options",chartsMenuRemove:"Remove",chartsDragToDimensions:e=>`Drag here to use column as ${e}`,chartsDragToValues:e=>`Drag here to use column as ${e}`,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…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>
1`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,r)=>"is any of"===t?`${e} is any of: ${r}`:`${e} ${t} ${r}`,promptChangeFilterDescription:(e,t,r)=>"is any of"===t?`Filter where ${e} is any of: ${r}`:`Filter where ${e} ${t} ${r}`,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})`,promptChangeChartsLabel:(e,t)=>`Dimensions (${e}), Values (${t})`},Mc=["field","type","align","width","height","empty","style","className"],Ic="1.3em",Pc=[40,80],kc={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},Ec=function(){const e=(t=12345,()=>{let e=t+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var t;return(t,r)=>t+(r-t)*e()}(),Fc=k(function(e){const{field:t,type:r,align:o,width:n,height:l,empty:i=!1,style:a,className:s}=e,c=(0,x.A)(e,Mc),u=oe(),d=(e=>{const{align:t,classes:r,empty:o}=e,n={root:["cell","cellSkeleton",`cell--text${t?(0,R.A)(t):"Left"}`,o&&"cellEmpty"]};return(0,M.A)(n,T,r)})({classes:u.classes,align:o,empty:i}),p=w.useMemo(()=>{if("boolean"===r||"actions"===r)return{variant:"circular",width:Ic,height:Ic};const[e,t]=r?kc[r]??Pc:Pc;return{variant:"text",width:`${Math.round(Ec(e,t))}%`,height:"1.2em"}},[r]);return(0,ie.jsx)("div",(0,b.A)({"data-field":t,className:(0,S.A)(d.root,s),style:(0,b.A)({height:l,maxWidth:n,minWidth:n},a)},c,{children:!i&&(0,ie.jsx)(u.slots.baseSkeleton,(0,b.A)({},p))}))}),Dc=["className"],Tc=(0,et.A)("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})(()=>({display:"flex",visibility:"hidden",width:0})),Hc=y(function(e,t){const{className:r}=e,o=(0,x.A)(e,Dc),n=oe(),l=(e=>{const{classes:t}=e;return(0,M.A)({root:["iconButtonContainer"]},T,t)})(n);return(0,ie.jsx)(Tc,(0,b.A)({className:(0,S.A)(l.root,r),ownerState:n},o,{ref:t}))});function Oc(e){const{counter:t,field:r,onClick:o}=e,n=_e(),l=oe(),i=(e=>{const{classes:t}=e;return(0,M.A)({icon:["filterIcon"]},T,t)})((0,b.A)({},e,{classes:l.classes})),a=(0,Yt.A)(),s=_(n,Ue,a),c=(0,Yt.A)(),u=w.useCallback(e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:l}=We(n);t&&l===Ke.filters?n.current.hideFilterPanel():n.current.showFilterPanel(void 0,c,a),o&&o(n.current.getColumnHeaderParams(r),e)},[n,r,o,c,a]);if(!t)return null;const d=(0,ie.jsx)(l.slots.baseIconButton,(0,b.A)({id:a,onClick:u,"aria-label":n.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":s,"aria-controls":s?c:void 0},l.slotProps?.baseIconButton,{children:(0,ie.jsx)(l.slots.columnFilteredIcon,{className:i.icon,fontSize:"small"})}));return(0,ie.jsx)(l.slots.baseTooltip,(0,b.A)({title:n.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},l.slotProps?.baseTooltip,{children:(0,ie.jsxs)(Hc,{children:[t>1&&(0,ie.jsx)(l.slots.baseBadge,{badgeContent:t,color:"default",children:d}),1===t&&d]})}))}const $c=["direction","index","sortingOrder","disabled","className"],zc=(0,et.A)(jt,{name:"MuiDataGrid",slot:"SortButton"})({transition:L.transition(["opacity"],{duration:L.transitions.duration.short,easing:L.transitions.easing.easeInOut})});function Lc(e){const{direction:t,index:r,sortingOrder:o,disabled:n,className:l}=e,i=(0,x.A)(e,$c),a=_e(),s=oe(),c=(0,b.A)({},e,{classes:s.classes}),u=(e=>{const{classes:t}=e;return(0,M.A)({root:["sortButton"],icon:["sortIcon"]},T,t)})(c),d=function(e,t,r,o){let n;const l={};return"asc"===t?n=e.columnSortedAscendingIcon:"desc"===t?n=e.columnSortedDescendingIcon:(n=e.columnUnsortedIcon,l.sortingOrder=o),n?(0,ie.jsx)(n,(0,b.A)({fontSize:"small",className:r},l)):null}(s.slots,t,u.icon,o);if(!d)return null;const p=(0,ie.jsx)(zc,(0,b.A)({as:s.slots.baseIconButton,ownerState:c,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:n,className:(0,S.A)(u.root,l)},s.slotProps?.baseIconButton,i,{children:d}));return(0,ie.jsxs)(w.Fragment,{children:[null!=r&&(0,ie.jsx)(s.slots.baseBadge,{badgeContent:r,color:"default",overlap:"circular",children:p}),null==r&&p]})}function jc(e){return(0,ie.jsx)(Hc,{children:(0,ie.jsx)(Lc,(0,b.A)({},e,{tabIndex:-1}))})}const Nc=w.memo(jc),Vc=["className","selectedRowCount"],Bc=(0,et.A)("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:L.spacing(0,2),visibility:"hidden",
1width:0,height:0,[L.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),Gc=y(function(e,t){const{className:r,selectedRowCount:o}=e,n=(0,x.A)(e,Vc),l=_e(),i=oe(),a=(e=>{const{classes:t}=e;return(0,M.A)({root:["selectedRowCount"]},T,t)})(i),s=l.current.getLocaleText("footerRowSelected")(o);return(0,ie.jsx)(Bc,(0,b.A)({className:(0,S.A)(a.root,r),ownerState:i},n,{ref:t,children:s}))}),Wc=["className"],Uc=(0,et.A)("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),Kc=y(function(e,t){const{className:r}=e,o=(0,x.A)(e,Wc),n=oe(),l=(e=>{const{classes:t}=e;return(0,M.A)({root:["footerContainer","withBorderColor"]},T,t)})(n);return(0,ie.jsx)(Uc,(0,b.A)({className:(0,S.A)(l.root,r),ownerState:n},o,{ref:t}))}),qc=y(function(e,t){const r=_e(),o=oe(),n=_(r,ht),l=_(r,Ui),i=_(r,Fn),a=!o.hideFooterSelectedRowCount&&l>0?(0,ie.jsx)(Gc,{selectedRowCount:l}):(0,ie.jsx)("div",{}),s=o.hideFooterRowCount||o.pagination?null:(0,ie.jsx)(o.slots.footerRowCount,(0,b.A)({},o.slotProps?.footerRowCount,{rowCount:n,visibleRowCount:i})),c=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&(0,ie.jsx)(o.slots.pagination,(0,b.A)({},o.slotProps?.pagination));return(0,ie.jsxs)(Kc,(0,b.A)({},e,{ref:t,children:[a,s,c]}))}),_c=["className","rowCount","visibleRowCount"],Xc=(0,et.A)("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:L.spacing(0,2)}),Yc=y(function(e,t){const{className:r,rowCount:o,visibleRowCount:n}=e,l=(0,x.A)(e,_c),i=_e(),a=oe(),s=(e=>{const{classes:t}=e;return(0,M.A)({root:["rowCount"]},T,t)})(a);if(0===o)return null;const c=n<o?i.current.getLocaleText("footerTotalVisibleRows")(n,o):o.toLocaleString();return(0,ie.jsxs)(Xc,(0,b.A)({className:(0,S.A)(s.root,r),ownerState:a},l,{ref:t,children:[i.current.getLocaleText("footerTotalRows")," ",c]}))}),Qc=["className"],Zc=(0,et.A)("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:L.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:L.colors.background.backdrop}),Jc=y(function(e,t){const{className:r}=e,o=(0,x.A)(e,Qc),n=oe(),l=(e=>{const{classes:t}=e;return(0,M.A)({root:["overlay"]},T,t)})(n);return(0,ie.jsx)(Zc,(0,b.A)({className:(0,S.A)(l.root,r),ownerState:n},o,{ref:t}))}),eu=(e,t,r,o,n,l)=>{let i;switch(e){case oo.LEFT:i=o[r];break;case oo.RIGHT:i=n-o[r]-t+l;break;default:i=void 0}return Number.isNaN(i)&&(i=void 0),i},tu=(e,t,r,o,n,l)=>{const i=t===r-1;return!(!l?.startsWith("border")||e!==oo.LEFT||!i)||!!o&&(e===oo.LEFT||(e===oo.RIGHT?!i:!i||n))},ru=(e,t,r,o)=>o?.startsWith("border")?e===oo.RIGHT&&0===t:r&&e===oo.RIGHT&&0===t,ou=(e,t)=>{if(e)if(t){if(e===oo.LEFT)return"right";if(e===oo.RIGHT)return"left"}else{if(e===oo.LEFT)return"left";if(e===oo.RIGHT)return"right"}};function nu(e,t,r,o){const n=ou(r,t);return n&&void 0!==o?(e[n]=o,e):e}const lu=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],iu=(0,et.A)("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),au=e=>parseInt(e.getAttribute("data-colindex"),10),su=y(function(e,t){const r=oe(),{slots:o}=r,n=(0,ko.I)(),l=(e=>{const{classes:t}=e;return(0,M.A)({root:["skeletonLoadingOverlay"]},T,t)})({classes:r.classes}),i=w.useRef(null),a=(0,A.A)(i,t),s=_e(),c=_(s,tt),u=_(s,rt),d=_(s,Ne),p=w.useMemo(()=>d.filter(e=>e<=u).length,[u,d]),{skeletonRowsCount:f,visibleColumns:g,showFirstRowBorder:h}=e,m=(0,x.A)(e,lu),C=_(s,Oe),v=w.useMemo(()=>C.slice(0,p),[C,p]),y=_(s,Le),R=w.useCallback(e=>-1!==y.left.findIndex(t=>t.field===e)?oo.LEFT:-1!==y.right.findIndex(t=>t.field===e)?oo.RIGHT:void 0,[y.left,y.right]),I=w.useMemo(()=>{const e=[];for(let t=0;t<f;t+=1){const l=[];for(let e=0;e<v.length;e+=1){const i=v[e],a=R(i.field),s=a===oo.LEFT,u=a===oo.RIGHT,p=ou(a,n),f=p?y[p].length:v.length-y.left.length-y.right.length,h=p?y[p].findIndex(e=>e.field===i.field):e-y.left.length,m=c.hasScrollY?c.scrollbarSize:0,w=nu({}
1,n,a,eu(a,i.computedWidth,e,d,c.columnsTotalWidth,m)),C=c.columnsTotalWidth<c.viewportOuterSize.width,x=tu(a,h,f,r.showCellVerticalBorder,C,r.pinnedColumnsSectionSeparator),A=ru(a,h,r.showCellVerticalBorder,r.pinnedColumnsSectionSeparator),M=u&&0===h,I=M&&C,P=e===v.length-1&&!M&&C,k=c.viewportOuterSize.width-c.columnsTotalWidth,E=Math.max(0,k),F=(0,ie.jsx)(o.skeletonCell,{width:E,empty:!0},`skeleton-filler-column-${t}`);I&&l.push(F),l.push((0,ie.jsx)(o.skeletonCell,{field:i.field,type:i.type,align:i.align,width:"var(--width)",height:c.rowHeight,"data-colindex":e,empty:g&&!g.has(i.field),className:(0,S.A)(s&&H["cell--pinnedLeft"],u&&H["cell--pinnedRight"],x&&H["cell--withRightBorder"],A&&H["cell--withLeftBorder"]),style:(0,b.A)({"--width":`${i.computedWidth}px`},w)},`skeleton-column-${t}-${i.field}`)),P&&l.push(F)}e.push((0,ie.jsx)("div",{className:(0,S.A)(H.row,H.rowSkeleton,0===t&&!h&&H["row--firstVisible"]),children:l},`skeleton-row-${t}`))}return e},[f,v,R,n,y,c.hasScrollY,c.scrollbarSize,c.columnsTotalWidth,c.viewportOuterSize.width,c.rowHeight,d,r.showCellVerticalBorder,r.pinnedColumnsSectionSeparator,o,g,h]);return Tt(s,"columnResize",e=>{const{colDef:t,width:r}=e,o=i.current?.querySelectorAll(`[data-field="${ls(t.field)}"]`);if(!o)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const n=v.findIndex(e=>e.field===t.field),l=R(t.field),a=l===oo.LEFT,s=l===oo.RIGHT,c=getComputedStyle(o[0]).getPropertyValue("--width"),u=parseInt(c,10)-r;if(o&&o.forEach(e=>{e.style.setProperty("--width",`${r}px`)}),a){const e=i.current?.querySelectorAll(`.${H["cell--pinnedLeft"]}`);e?.forEach(e=>{au(e)>n&&(e.style.left=parseInt(getComputedStyle(e).left,10)-u+"px")})}if(s){const e=i.current?.querySelectorAll(`.${H["cell--pinnedRight"]}`);e?.forEach(e=>{au(e)<n&&(e.style.right=`${parseInt(getComputedStyle(e).right,10)+u}px`)})}}),(0,ie.jsx)(iu,(0,b.A)({className:l.root},m,{ref:a,children:I}))}),cu=y(function(e,t){const r=_(_e(),tt),o=r?.viewportInnerSize.height??0,n=Math.ceil(o/r.rowHeight);return(0,ie.jsx)(su,(0,b.A)({},e,{skeletonRowsCount:n,ref:t}))}),uu=["variant","noRowsVariant","style"],du={"circular-progress":{component:e=>e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>cu,style:{display:"block"}}},pu=y(function(e,t){const{variant:r="linear-progress",noRowsVariant:o="skeleton",style:n}=e,l=(0,x.A)(e,uu),i=_e(),a=oe(),s=_(i,ft),c=du[0===s?o:r],u=c.component(a);return(0,ie.jsx)(Jc,(0,b.A)({style:(0,b.A)({},c.style,n)},l,{ref:t,children:(0,ie.jsx)(u,{})}))}),fu=y(function(e,t){const r=_e().current.getLocaleText("noRowsLabel");return(0,ie.jsx)(Jc,(0,b.A)({},e,{ref:t,children:r}))}),gu=y(function(e,t){const r=oe(),o=_e(),n=_(o,Ee),l=!r.disableColumnSelector&&n.length>0;return(0,ie.jsxs)(Jc,(0,b.A)({},e,{ref:t,children:[o.current.getLocaleText("noColumnsOverlayLabel"),l&&(0,ie.jsx)(r.slots.baseButton,(0,b.A)({size:"small"},r.slotProps?.baseButton,{onClick:()=>{o.current.showPreferences(Ke.columns)},children:o.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))}),hu=(0,E.Ay)(jt)({maxHeight:"calc(100% + 1px)",flexGrow:1}),mu=["className"],bu=(0,et.A)("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:L.spacing(2.5,1.5,2,1),gap:L.spacing(2.5)});function wu(e){const{className:t}=e,r=(0,x.A)(e,mu),o=oe(),n=(e=>{const{classes:t}=e;return(0,M.A)({root:["panelContent"]},T,t)})(o);return(0,ie.jsx)(bu,(0,b.A)({className:(0,S.A)(n.root,t),ownerState:o},r))}const Cu=["className"],vu=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:L.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${L.colors.border.base}`});function yu(e){const{className:t}=e,r=(0,x.A)(e,Cu),o=oe(),n=(e=>{const{classes:t}=e;return(0,M.A)({root:["panelFooter"]},T,t)})(o);return(0,ie.jsx)(vu,(0,b.A)({className:(0,S.A)(n.root,t),ownerState:o},r))}const xu=["className"],Su=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),Au=y(function(e,t){const{className:r}=e,o=(0,x.A)(e,xu),n=oe(),l=(e=>{const{classes:t}=e;return(0,M.A)({root:["panelWrapper"]},T,t)})(n);
1return(0,ie.jsx)(Su,(0,b.A)({tabIndex:-1,className:(0,S.A)(l.root,r),ownerState:n},o,{ref:t}))}),Ru=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],Mu=["InputComponentProps"],Iu=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:L.spacing(1.5)}),Pu=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),ku=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),Eu=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),Fu=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),Du=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),Tu=e=>e.headerName||e.field,Hu=new Intl.Collator,Ou=y(function(e,t){const{item:r,hasMultipleFilters:o,deleteFilter:n,applyFilterChanges:l,showMultiFilterOperators:i,disableMultiFilterOperator:a,applyMultiFilterOperatorChanges:s,focusElementRef:c,logicOperators:u=[ir.And,ir.Or],columnsSort:d,filterColumns:p,deleteIconProps:f={},logicOperatorInputProps:g={},operatorInputProps:h={},columnInputProps:m={},valueInputProps:C={},readOnly:v}=e,y=(0,x.A)(e,Ru),A=_e(),I=_(A,Fe),P=_(A,Ve),k=_(A,yn),E=(0,Yt.A)(),F=(0,Yt.A)(),D=(0,Yt.A)(),H=(0,Yt.A)(),O=oe(),$=(e=>{const{classes:t}=e;return(0,M.A)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},T,t)})(O),z=w.useRef(null),L=w.useRef(null),j=k.logicOperator??ir.And,N=o&&u.length>0,V=(O.slotProps?.baseSelect||{}).native??!1,B=O.slotProps?.baseSelectOption||{},{InputComponentProps:G}=C,W=(0,x.A)(C,Mu),U=_(A,zn),K=_(A,jn),{filteredColumns:q,selectedField:X}=w.useMemo(()=>{let e=r.field;const t=!1===I[r.field].filterable?I[r.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if(U)return{filteredColumns:P.filter(e=>void 0!==K.get(e.field)),selectedField:e};if(void 0===p||"function"!=typeof p)return{filteredColumns:P,selectedField:e};const o=p({field:r.field,columns:P,currentFilters:k?.items||[]});return{filteredColumns:P.filter(t=>{const n=o.includes(t.field);return t.field!==r.field||n||(e=void 0),n}),selectedField:e}},[r.field,I,U,p,P,k?.items,K]),Y=w.useMemo(()=>{switch(d){case"asc":return q.sort((e,t)=>Hu.compare(Tu(e),Tu(t)));case"desc":return q.sort((e,t)=>-Hu.compare(Tu(e),Tu(t)));default:return q}},[q,d]),Q=r.field?A.current.getColumn(r.field):null,Z=w.useMemo(()=>r.operator&&Q?Q.filterOperators?.find(e=>e.value===r.operator):null,[r,Q]),J=w.useCallback(e=>{const t=e.target.value,o=A.current.getColumn(t);if(o.field===Q.field)return;const n=o.filterOperators.find(e=>e.value===r.operator)||o.filterOperators[0];let i=n.InputComponent&&n.InputComponent===Z?.InputComponent&&o.type===Q.type?r.value:void 0;if("singleSelect"===o.type&&void 0!==i){const e=o,t=Co(e);Array.isArray(i)?i=i.filter(r=>void 0!==vo(r,t,e?.getOptionValue)):void 0===vo(r.value,t,e?.getOptionValue)&&(i=void 0)}l((0,b.A)({},r,{field:t,operator:n.value,value:i}))},[A,l,r,Q,Z]),ee=w.useCallback(e=>{const t=e.target.value,o=Q?.filterOperators.find(e=>e.value===t),n=!o?.InputComponent||o?.InputComponent!==Z?.InputComponent;l((0,b.A)({},r,{operator:t,value:n?void 0:r.value}))},[l,r,Q,Z]),te=w.useCallback(e=>{const t=e.target.value===ir.And.toString()?ir.And:ir.Or;s(t)},[s]);return w.useImperativeHandle(c,()=>({focus:()=>{Z?.InputComponent?z?.current?.focus():L.current.focus()}}),[Z]),(0,ie.jsxs)(Iu,(0,b.A)({className:$.root,"data-id":r.id,ownerState:O},y,{ref:t,children:[(0,ie.jsx)(Pu,(0,b.A)({},f,{className:(0,S.A)($.deleteIcon,f.className),ownerState:O,children:(0,ie.jsx)(O.slots.baseIconButton,(0,b.A)({"aria-label":A.current.getLocaleText("filterPanelDeleteIconLabel"),title:A.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{n(r)},size:"small",disabled:v},O.slotProps?.baseIconButton,{children:(0,ie.jsx)(O.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,ie.jsx)(ku,(0,b.A)({as:O.slots.baseSelect,sx:[N?{display:"flex"}:{display:"none"},i?{visibility:"visible"}:{visibility:"hidden"},g.sx],className:(0,S.A)($.logicOperatorInput,g.className),ownerState:O},g,{size:"small",slotProps:{htmlInput:{"aria-label":A.current.getLocaleText("filterPanelLogicOperator")}},value:j??"",onChange:te,disabled:!!a||1===u.length,native:V},O.slotProps?.baseSelect,{children:u.map(e=>(0,w.createElement)(O.slots.baseSelectOption,(0,b.A)({},B,{native:V,key:e.toString(),value:e.toString()}),A.current.getLocaleText((e=>{switch(e){case ir.And:return"filterPanelOperatorAnd";case ir.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e))))})),(0,ie.jsx)(Eu,(0,b.A)({as:O.slots.baseSelect},m,{className:(0,S.A)($.columnInput,m.className),ownerState:O,size:"small",labelId:F,id:E,label:A.current.getLocaleText("filterPanelColumns"),value:X??"",onChange:J,native:V,disabled:v},O.slotProps?.baseSelect,{children:Y.map(e=>(0,w.createElement)(O.slots.baseSelectOption,(0,b.A)({},B,{native:V,key:e.field,value:e.field}),Tu(e)))})),(0,ie.jsx)(Fu,(0,b.A)({as:O.slots.baseSelect,size:"small"},h,{className:(0,S.A)($.operatorInput,h.className),ownerState:O,labelId:H,label:A.current.getLocaleText("filterPanelOperator"),id:D,value:r.operator,onChange:ee,native:V,inputRef:L,disabled:v},O.slotProps?.baseSelect,{children:Q?.filterOperators?.map(e=>(0,w.createElement)(O.slots.baseSelectOption,(0,b.A)({},B,{native:V,key:e.value,value:e.value}),e.label||A.current.getLocaleText(`filterOperator${(0,R.A)(e.value)}`)))})),(0,ie.jsx)(Du,(0,b.A)({},W,{className:(0,S.A)($.valueInput,W.className),ownerState:O,children:Z?.InputComponent?(0,ie.jsx)(Z.InputComponent,(0,b.A)({apiRef:A,item:r,applyValue:l,focusElementRef:z,disabled:v,slotProps:{root:{size:"small"}}},Z.InputComponentProps,G),r.field):null}))]}))}),$u=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],zu=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),Lu=y(function(e,t){const r=_e(),o=oe(),n=_(r,yn),l=_(r,Ve),i=_(r,Be),a=w.useRef(null),s=w.useRef(null),{logicOperators:c=[ir.And,ir.Or],columnsSort:u,f
1ilterFormProps:d,getColumnForNewFilter:p,disableAddFilterButton:f=!1,disableRemoveAllButton:g=!1}=e,h=(0,x.A)(e,$u),m=r.current.upsertFilterItem,C=w.useCallback(e=>{r.current.setFilterLogicOperator(e)},[r]),v=w.useCallback(()=>{let e;if(p&&"function"==typeof p){const t=p({currentFilters:n?.items||[],columns:l});if(null===t)return null;e=l.find(({field:e})=>e===t)}else e=l.find(e=>e.filterOperators?.length);return e?zu(e):null},[n?.items,l,p]),y=w.useCallback(()=>{if(void 0===p||"function"!=typeof p)return v();const e=n.items.length?n.items:[v()].filter(Boolean),t=p({currentFilters:e,columns:l});if(null===t)return null;const r=l.find(({field:e})=>e===t);return r?zu(r):null},[n.items,l,p,v]),S=w.useMemo(()=>n.items.length?n.items:(s.current||(s.current=v()),s.current?[s.current]:[]),[n.items,v]),A=S.length>1,{readOnlyFilters:R,validFilters:M}=w.useMemo(()=>S.reduce((e,t)=>(i[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e),{readOnlyFilters:[],validFilters:[]}),[S,i]),I=w.useCallback(()=>{const e=y();e&&r.current.upsertFilterItems([...S,e])},[r,y,S]),P=w.useCallback(e=>{const t=1===M.length;r.current.deleteFilterItem(e),t&&r.current.hideFilterPanel()},[r,M.length]),k=w.useCallback(()=>1===M.length&&void 0===M[0].value?(r.current.deleteFilterItem(M[0]),r.current.hideFilterPanel()):r.current.setFilterModel((0,b.A)({},n,{items:R}),"removeAllFilterItems"),[r,R,n,M]);return w.useEffect(()=>{c.length>0&&n.logicOperator&&!c.includes(n.logicOperator)&&C(c[0])},[c,C,n.logicOperator]),w.useEffect(()=>{M.length>0&&a.current.focus()},[M.length]),(0,ie.jsxs)(Au,(0,b.A)({},h,{ref:t,children:[(0,ie.jsxs)(wu,{children:[R.map((e,t)=>(0,ie.jsx)(Ou,(0,b.A)({item:e,applyFilterChanges:m,deleteFilter:P,hasMultipleFilters:A,showMultiFilterOperators:t>0,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:C,focusElementRef:null,readOnly:!0,logicOperators:c,columnsSort:u},d),null==e.id?t:e.id)),M.map((e,t)=>(0,ie.jsx)(Ou,(0,b.A)({item:e,applyFilterChanges:m,deleteFilter:P,hasMultipleFilters:A,showMultiFilterOperators:R.length+t>0,disableMultiFilterOperator:R.length+t!==1,applyMultiFilterOperatorChanges:C,focusElementRef:t===M.length-1?a:null,logicOperators:c,columnsSort:u},d),null==e.id?t+R.length:e.id))]}),o.disableMultipleColumnsFiltering||f&&g?null:(0,ie.jsxs)(yu,{children:[f?(0,ie.jsx)("span",{}):(0,ie.jsx)(o.slots.baseButton,(0,b.A)({onClick:I,startIcon:(0,ie.jsx)(o.slots.filterPanelAddIcon,{})},o.slotProps?.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!g&&M.length>0?(0,ie.jsx)(o.slots.baseButton,(0,b.A)({onClick:k,startIcon:(0,ie.jsx)(o.slots.filterPanelRemoveAllIcon,{})},o.slotProps?.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]})]}))});var ju=r(2462);const Nu=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;var Vu=r(519);const Bu=["children"],Gu=(0,Vu.i7)({from:{opacity:0}
1,to:{opacity:1}}),Wu=(0,Vu.i7)({"from, to":{"--scrollable":'" "'}}),Uu=(0,et.A)("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})` 2 flex: 1; 3 display: flex; 4 flex-direction: column; 5 animation: ${Wu}; 6 animation-timeline: --scroll-timeline; 7 animation-fill-mode: none; 8 box-sizing: border-box; 9 overflow: auto; 10 scrollbar-width: thin; 11 scroll-timeline: --scroll-timeline block; 12 13 &::before, 14 &::after { 15 content: ''; 16 flex-shrink: 0; 17 display: block; 18 position: sticky; 19 left: 0; 20 width: 100%; 21 height: 4px; 22 animation: ${Gu} linear both; 23 animation-timeline: --scroll-timeline; 24 25 // Custom property toggle trick: 26 // - Detects if the element is scrollable 27 // - https://css-tricks.com/the-css-custom-property-toggle-trick/ 28 --visibility-scrollable: var(--scrollable) visible; 29 --visibility-not-scrollable: hidden; 30 visibility: var(--visibility-scrollable, var(--visibility-not-scrollable)); 31 } 32 33 &::before { 34 top: 0; 35 background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0, transparent 100%); 36 animation-range: 0 4px; 37 } 38 39 &::after { 40 bottom: 0; 41 background: linear-gradient(to top, rgba(0, 0, 0, 0.05) 0, transparent 100%); 42 animation-direction: reverse; 43 animation-range: calc(100% - 4px) 100%; 44 } 45`,Ku=y(function(e,t){const{children:r}=e,o=(0,x.A)(e,Bu);return(0,ie.jsx)(Uu,(0,b.A)({},o,{ref:t,children:r}))}),qu=new Intl.Collator,_u=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:L.spacing(.5,1.5)}),Xu=(0,E.Ay)(Ku,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),Yu=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:L.spacing(1.5,2),borderBottom:`1px solid ${L.colors.border.base}`}),Qu=(0,E.Ay)(jt,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${ju.A.input}::-webkit-search-decoration,\n & .${ju.A.input}::-webkit-search-cancel-button,\n & .${ju.A.input}::-webkit-search-results-button,\n & .${ju.A.input}::-webkit-search-results-decoration`]:{display:"none"}}),Zu=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:L.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${L.colors.border.base}`}),Ju=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:L.spacing(1,0),alignSelf:"center",font:L.typography.font.body}),ed=(0,E.Ay)(jt,{name:"MuiDataGrid",slot:"ColumnsManagementRow"})({}),td=["children","className","classes","onClose"],rd=(0,D.A)("MuiDataGrid",["panel","paper"]),od=(0,E.Ay)(jt,{name:"MuiDataGrid",slot:"panel"})({zIndex:L.zIndex.panel}),nd=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:L.colors.background.overlay,borderRadius:L.radius.base,boxShadow:L.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${L.spacing(2)})`,overflow:"auto"}),ld=y((e,t)=>{const{children:r,className:o,onClose:n}=e,l=(0,x.A)(e,td),i=_e(),a=oe(),s=rd,[c,u]=w.useState(!1),d=se(),p=(0,It.A)(()=>u(!0)),f=(0,It.A)(()=>u(!1)),g=(0,It.A)(()=>{n?.()}),h=(0,It.A)(e=>{"Escape"===e.key&&n?.()}),[m,C]=w.useState(null);return w.useEffect(()=>{const e=i.current.rootElementRef?.current?.querySelector('[data-id="gridPanelAnchor"]');e&&C(e)},[i]),m?(0,ie.jsx)(od,(0,b.A)({as:a.slots.basePopper,ownerState:a,placement:"bottom-end",className:(0,S.A)(s.panel,o,d),flip:!0,onDidShow:p,onDidHide:f,onClickAway:g,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},l,a.slotProps?.basePopper,{target:e.target??m,ref:t,children:(0,ie.jsx)(nd,{className:s.paper,ownerState:a,onKeyDown:h,children:c&&r})})):null}),id=me(e=>e.rowReorder),ad=ge(id,e=>e?.isActive??!1),sd=ge(id,e=>e?.dropTarget??{rowId:null,position:null}),cd=(ge(sd,e=>e.rowId??null),ge(sd,(e,t)=>e.rowId===t?e.position:null));ge(id,e=>e?.draggedRowId??null);var ud=r(3900),dd=r(1476);const pd=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"RowDragOverlay",shouldForwardProp:e=>(0,dd.MC)(e)&&"action"!==e})(({theme:e,action:t})=>(0,b.A)({position:"absolute",left:0,right:0,top:0,bottom:0,pointerEvents:"none",zIndex:1},"above"===t&&{"&::before":{pointerEvents:"none",content:'""',position:"absolute",top:0,left:0,right:0,height:"2px",backgroundColor:(e.vars||e).palette.primary.main}},"below"===t&&{"&::after":{pointerEvents:"none",content:'""',position:"absolute",bottom:"-2px",left:0,right:0,height:"2px",backgroundColor:(e.vars||e).palette.primary.main}},"inside"===t&&{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.1)`:(0,ud.X4)(e.palette.primary.main,.1)})),fd=w.memo(function(e){const{rowId:t,className:r}=e,o=_(Y(),cd,t);return o?(0,ie.jsx)(pd,{action:o,className:r}):null}),gd=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNot
45Visible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],hd=ge(ws,(e,{rowReordering:t,treeData:r})=>!(!t||r)&&!!gn(e)),md=y(function(e,t){const{selected:r,rowId:o,row:n,index:l,style:i,rowHeight:a,className:s,visibleColumns:c,pinnedColumns:u,offsetLeft:d,columnsTotalWidth:p,firstColumnIndex:f,lastColumnIndex:g,focusedColumnIndex:h,isFirstVisible:m,isLastVisible:C,isNotVisible:v,showBottomBorder:y,scrollbarWidth:R,gridHasFiller:I,onClick:P,onDoubleClick:k,onMouseEnter:E,onMouseLeave:F,onMouseOut:D,onMouseOver:O}=e,$=(0,x.A)(e,gd),z=Y(),L=le(),j=w.useRef(null),N=oe(),V=Hi(z),B=_(z,wn),W=_(z,Ne),U=N.rowReordering,K=N.treeData,q=_(z,hd,{rowReordering:U,treeData:K}),X=_(z,ad),Q=(0,A.A)(j,t),Z=wt(z,o),J=_(z,Cs,{rowId:o,editMode:N.editMode}),ee=N.editMode===ho.Row,te=void 0!==h,re=te&&h>=u.left.length&&h<f,ne=te&&h<c.length-u.right.length&&h>=g,ae=function(e,t){return(0,M.A)(t,T,e)}(N.classes,{root:["row",r&&"selected",ee&&"row--editable",J&&"row--editing",m&&"row--firstVisible",C&&"row--lastVisible",y&&"row--borderBottom","auto"===a&&"row--dynamicHeight"]}),se=L.hooks.useGridRowAriaAttributes();w.useLayoutEffect(()=>{if(V.range){const e=z.current.getRowIndexRelativeToVisibleRows(o);void 0!==e&&z.current.unstable_setLastMeasuredRowIndex(e)}if(j.current&&"auto"===a)return z.current.observeRowHeight(j.current,o)},[z,V.range,a,o]);const ce=w.useCallback((e,t)=>r=>{as(r)||z.current.getRow(o)&&(z.current.publishEvent(e,z.current.getRowParams(o),r),t&&t(r))},[z,o]),ue=w.useCallback(e=>{const t=ns(e.target,H.cell),r=t?.getAttribute("data-field");if(r){if(r===Da.field)return;if(r===ro)return;if("__reorder__"===r)return;if(z.current.getCellMode(o,r)===mo.Edit)return;const e=z.current.getColumn(r);if(e?.type===Go)return}ce("rowClick",P)(e)},[z,P,ce,o]),{slots:de,slotProps:pe,disableColumnReorder:fe}=N,ge=_(z,()=>(0,b.A)({},z.current.getRowHeightEntry(o)),void 0,G),he=w.useMemo(()=>{if(v)return{opacity:0,width:0,height:0};const e=(0,b.A)({},i,{maxHeight:"auto"===a?"none":a,minHeight:a,"--height":"number"==typeof a?`${a}px`:a});if(ge.spacingTop&&(e["border"===N.rowSpacingType?"borderTopWidth":"marginTop"]=ge.spacingTop),ge.spacingBottom){const t="border"===N.rowSpacingType?"borderBottomWidth":"marginBottom";let r=e[t];"number"!=typeof r&&(r=parseInt(r||"0",10)),r+=ge.spacingBottom,e[t]=r}return e},[v,a,i,ge.spacingTop,ge.spacingBottom,N.rowSpacingType]);if(!Z)return null;const me=z.current.unstable_applyPipeProcessors("rowClassName",[],o),be=se(Z,l);if("function"==typeof N.getRowClassName){const e=l-(V.range?.firstRowIndex||0),t=(0,b.A)({},z.current.getRowParams(o),{isFirstVisible:0===e,isLastVisible:e===V.rows.length-1,indexRelativeToCurrentPage:e});me.push(N.getRowClassName(t))}const we=(e,t,r,l,i=oo.NONE)=>{const s=z.current.unstable_getCellColSpanInfo(o,r);if(s?.spannedByColSpan)return null;const c=s?.cellProps.width??e.computedWidth,u=s?.cellProps.colSpan??1,d=eu(i,e.computedWidth,r,W,p,R);if("skeletonRow"===Z.type)return(0,ie.jsx)(de.skeletonCell,{type:e.type,width:c,height:a,field:e.field,align:e.align},e.field);const f="__reorder__"===e.field,g=!(fe||e.disableReorder),h=q&&!B.length,m=!(g||f&&h||X),w=i===oo.VIRTUAL,C=ru(i,t,N.showCellVerticalBorder,N.pinnedColumnsSectionSeparator),v=tu(i,t,l,N.showCellVerticalBorder,I,N.pinnedColumnsSectionSeparator);return(0,ie.jsx)(de.cell,(0,b.A)({column:e,width:c,rowId:o,align:e.align||"left",colIndex:r,colSpan:u,disableDragEvents:m,isNotVisible:w,pinnedOffset:d,pinnedPosition:i,showLeftBorder:C,showRightBorder:v,row:n,rowNode:Z},pe?.cell),e.field)},Ce=u.left.map((e,t)=>we(e,t,t,u.left.length,oo.LEFT)),ve=u.right.map((e,t)=>{const r=c.length-u.right.length+t;return we(e,t,r,u.right.length,oo.RIGHT)}),ye=c.length-u.left.length-u.right.length,xe=[];re&&xe.push(we(c[h],h-u.left.length,h,ye,oo.VIRTUAL));for(let e=f;e<g;e+=1){const t=c[e],r=e-u.left.length;t&&xe.push(we(t,r,e,ye))}ne&&xe.push(we(c[h],h-u.left.length,h,ye,oo.VIRTUAL));const Se=n?{onClick:ue,onDoubleClick:ce("rowDoubleClick",k),onMouseEnter:ce("rowMouseEnter",E),onMouseLeave:ce("rowMouseLeave",F),onMouseOut:ce("rowMouseOut",D),onMouseOver:ce("rowMouseOver",O)}:null;return(0,ie.jsxs)("div",(0,b.A)({"data-id":o,"data-rowindex":l,role:"row",className:(0,S.A)(...me,ae.root,s),style:he},be,Se,$,{ref:Q,children:[Ce,(0,ie.jsx)("div",{role:"presentation",className:H.cellOffsetLeft,style:{width:d}}),xe,(0,ie.jsx)("div",{role:"presentation",className:(0,S.A)(H.cell,H.cellEmpty)}),ve,(0,ie.jsx)(fd,{rowId:o})]}))}),bd=k(md);let wd;function Cd(){return void 0===wd&&document.createElement("div").focus({get preventScroll(){return wd=!0,!1}}),wd}const vd=["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"],yd=["changeReason","unstable_updateV
45alueOnRender"];oo.LEFT,Ae.LEFT,oo.RIGHT,Ae.RIGHT,oo.NONE,oo.VIRTUAL;const xd=y(function(e,t){const{column:r,row:o,rowId:n,rowNode:l,align:i,colIndex:a,width:s,className:c,style:u,colSpan:d,disableDragEvents:p,isNotVisible:f,pinnedOffset:g,pinnedPosition:h,showRightBorder:m,showLeftBorder:C,onClick:v,onDoubleClick:y,onMouseDown:I,onMouseUp:P,onMouseOver:k,onKeyDown:E,onKeyUp:F,onDragEnter:D,onDragOver:O}=e,$=(0,x.A)(e,vd),z=Y(),L=oe(),j=(0,ko.I)(),N=r.field,V=_(z,vs,{rowId:n,field:N}),B=le().hooks.useCellAggregationResult(n,N),G=V?mo.Edit:mo.View,{value:W,formattedValue:U}=B||{},K=z.current.getCellParamsForRow(n,N,o,{colDef:r,cellMode:G,rowNode:l,tabIndex:_(z,()=>{const e=Kn(z);return e&&e.field===N&&e.id===n?0:-1}),hasFocus:_(z,()=>{const e=Bn(z);return e?.id===n&&e.field===N}),value:W,formattedValue:U});K.api=z.current,_(z,()=>z.current.isCellEditable(K));const q=_(z,()=>z.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:n,field:N})),X=z.current.virtualizer.store,Q=$l(X,gi.selectors.hiddenCells),Z=$l(X,gi.selectors.spannedCells),{hasFocus:J,isEditable:ee=!1,value:te}=K,re="view"!==G&&ee||"actions"===r.type?-1:K.tabIndex,{classes:ne,getCellClassName:ae}=L,se=[_(z,()=>z.current.unstable_applyPipeProcessors("cellClassName",[],{id:n,field:N}).filter(Boolean).join(" "))];r.cellClassName&&se.push("function"==typeof r.cellClassName?r.cellClassName(K):r.cellClassName),"flex"===r.display&&se.push(H["cell--flex"]),ae&&se.push(ae(K));const ce=K.formattedValue??te,ue=w.useRef(null),de=(0,A.A)(t,ue),pe=L.cellSelection??!1,fe=(e=>{const{align:t,showLeftBorder:r,showRightBorder:o,pinnedPosition:n,isEditable:l,isSelected:i,isSelectionMode:a,classes:s}=e,c={root:["cell",`cell--text${(0,R.A)(t)}`,i&&"selected",l&&"cell--editable",r&&"cell--withLeftBorder",o&&"cell--withRightBorder",n===oo.LEFT&&"cell--pinnedLeft",n===oo.RIGHT&&"cell--pinnedRight",a&&!l&&"cell--selectionMode"]};return(0,M.A)(c,T,s)})({align:i,showLeftBorder:C,showRightBorder:m,isEditable:ee,classes:L.classes,pinnedPosition:h,isSelected:q,isSelectionMode:pe}),ge=w.useCallback(e=>t=>{const r=z.current.getCellParams(n,N||"");z.current.publishEvent(e,r,t),P&&P(t)},[z,N,P,n]),he=w.useCallback(e=>t=>{const r=z.current.getCellParams(n,N||"");z.current.publishEvent(e,r,t),I&&I(t)},[z,N,I,n]),me=w.useCallback((e,t)=>r=>{if(!z.current.getRow(n))return;const o=z.current.getCellParams(n,N||"");z.current.publishEvent(e,o,r),t&&t(r)},[z,N,n]),be=Q[n]?.[a]??!1,we=Z[n]?.[a]??1,Ce=w.useMemo(()=>{if(f)return{padding:0,opacity:0,width:0,height:0,border:0};const e=nu((0,b.A)({"--width":`${s}px`},u),j,h,g),t=h===oo.LEFT,r=h===oo.RIGHT;return we>1&&(e.height=`calc(var(--height) * ${we})`,e.zIndex=10,(t||r)&&(e.zIndex=40)),e},[s,f,u,g,h,j,we]);if((0,Lt.A)(()=>{if(!J||G===mo.Edit)return;const e=(0,Tl.A)(z.current.rootElementRef.current);if(ue.current&&!ue.current.contains(e.activeElement)){const e=ue.current.querySelector('[tabindex="0"]')||ue.current;if(Cd())e.focus({preventScroll:!0});else{const t=z.current.getScrollPosition();e.focus(),z.current.scroll(t)}}},[J,G,z]),be)return(0,ie.jsx)("div",{"data-colindex":a,role:"presentation",style:(0,b.A)({width:"var(--width)"},Ce)});let ve,ye,xe=$.onFocus;if(null===V&&r.renderCell&&(ve=r.renderCell(K)),null!==V&&r.renderEditCell){const e=z.current.getRowWithUpdatedValues(n,r.field),t=(0,x.A)(V,yd),o=r.valueFormatter?r.valueFormatter(V.value,e,r,z):K.formattedValue,l=(0,b.A)({},K,{row:e,formattedValue:o},t);ve=r.renderEditCell(l),se.push(H["cell--editing"]),se.push(ne?.["cell--editing"])}if(void 0===ve){const e=ce?.toString();ve=e,ye=e}const Se=p?null:{onDragEnter:me("cellDragEnter",D),onDragOver:me("cellDragOver",O)};return(0,ie.jsx)("div",(0,b.A)({className:(0,S.A)(fe.root,se,c),role:"gridcell","data-field":N,"data-colindex":a,"aria-colindex":a+1,"aria-colspan":d,"aria-rowspan":we,style:Ce,title:ye,tabIndex:re,onClick:me("cellClick",v),onDoubleClick:me("cellDoubleClick",y),onMouseOver:me("cellMouseOver",k),onMouseDown:he("cellMouseDown"),onMouseUp:ge("cellMouseUp"),onKeyDown:me("cellKeyDown",E),onKeyUp:me("cellKeyUp",F)},Se,$,{onFocus:xe,ref:de,children:ve}))}),Sd=k(xd),Ad=w.memo(e=>{const{colDef:t,open:r,columnMenuId:o,columnMenuButtonId:n,iconButtonRef:l}=e,i=_e(),a=oe(),s=(e=>{const{classes:t,open:r}=e,o={root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]};return(0,M.A)(o,T,t)})((0,b.A)({},e,{classes:a.classes})),c=w.useCallback(e=>{e.preventDefault(),e.stopPropagation(),i.current.toggleColumnMenu(t.field)},[i,t.field]),u=t.headerName??t.field;return(0,ie.jsx)("div",{className:s.root,children:(0,ie.jsx)(a.slots.baseTooltip,(0,b.A)({title:i.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},a.slotProps?.baseTooltip,{children:(0,ie.jsx)(a.slots.baseIconButton,(0,b.A)({ref:l,tabIndex:-1,
45className:s.button,"aria-label":i.current.getLocaleText("columnMenuAriaLabel")(u),size:"small",onClick:c,"aria-haspopup":"menu","aria-expanded":r,"aria-controls":r?o:void 0,id:n},a.slotProps?.baseIconButton,{children:(0,ie.jsx)(a.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function Rd({columnMenuId:e,columnMenuButtonId:t,ContentComponent:r,contentComponentProps:o,field:n,open:l,target:i,onExited:a}){const s=_e(),c=s.current.getColumn(n),u=(0,It.A)(e=>{e&&(e.stopPropagation(),i?.contains(e.target))||s.current.hideColumnMenu()});return i&&c?(0,ie.jsx)($o,{position:"bottom-"+("right"===c.align?"start":"end"),open:l,target:i,onClose:u,onExited:a,children:(0,ie.jsx)(r,(0,b.A)({colDef:c,hideMenu:u,open:l,id:e,labelledby:t},o))}):null}const Md=["className","aria-label"],Id=(0,et.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),Pd=y(function(e,t){const{className:r}=e,o=(0,x.A)(e,Md),n=oe(),l=(e=>{const{classes:t}=e;return(0,M.A)({root:["columnHeaderTitle"]},T,t)})(n);return(0,ie.jsx)(Id,(0,b.A)({className:(0,S.A)(l.root,r),ownerState:n},o,{ref:t}))});function kd(e){const{label:t,description:r}=e,o=oe(),n=w.useRef(null),[l,i]=w.useState(""),a=w.useCallback(()=>{if(!r&&n?.current){const r=(e=n.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;i(r?t:"")}var e},[r,t]);return(0,ie.jsx)(o.slots.baseTooltip,(0,b.A)({title:r||l},o.slotProps?.baseTooltip,{children:(0,ie.jsx)(Pd,{onMouseOver:a,ref:n,children:t})}))}const Ed=["resizable","resizing","height","side"];var Fd=function(e){return e.Left="left",e.Right="right",e}(Fd||{});function Dd(e){const{height:t,side:r=Fd.Right}=e,o=(0,x.A)(e,Ed),n=oe(),l=(e=>{const{resizable:t,resizing:r,classes:o,side:n}=e,l={root:["columnSeparator",t&&"columnSeparator--resizable",r&&"columnSeparator--resizing",n&&`columnSeparator--side${(0,R.A)(n)}`],icon:["iconSeparator"]};return(0,M.A)(l,T,o)})((0,b.A)({},e,{side:r,classes:n.classes})),i=w.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);return(0,ie.jsx)("div",(0,b.A)({className:l.root,style:{minHeight:t}},o,{onClick:i,children:(0,ie.jsx)(n.slots.columnResizeIcon,{className:l.icon})}))}const Td=w.memo(Dd),Hd=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],Od=y(function(e,t){const{classes:r,colIndex:o,height:n,isResizing:l,sortDirection:i,tabIndex:a,separatorSide:s,isDraggable:c,headerComponent:u,description:d,width:p,columnMenuIconButton:f=null,columnMenu:g=null,columnTitleIconButtons:h=null,headerClassName:m,label:C,resizable:v,draggableContainerProps:y,columnHeaderSeparatorProps:R,style:M}=e,I=(0,x.A)(e,Hd),P=oe(),k=w.useRef(null),E=(0,A.A)(k,t);let F="none";return null!=i&&(F="asc"===i?"ascending":"descending"),(0,ie.jsxs)("div",(0,b.A)({className:(0,S.A)(r.root,m),style:(0,b.A)({},M,{width:p}),role:"columnheader",tabIndex:a,"aria-colindex":o+1,"aria-sort":F},I,{ref:E,children:[(0,ie.jsxs)("div",(0,b.A)({className:r.draggableContainer,draggable:c,role:"presentation"},y,{children:[(0,ie.jsxs)("div",{className:r.titleContainer,role:"presentation",children:[(0,ie.jsx)("div",{className:r.titleContainerContent,children:void 0!==u?u:(0,ie.jsx)(kd,{label:C,description:d,columnWidth:p})}),h]}),f]})),(0,ie.jsx)(Td,(0,b.A)({resizable:!P.disableColumnResize&&!!v,resizing:l,height:n,side:s},R)),g]}))}),$d=k(function(e){const{colDef:t,columnMenuOpen:r,colIndex:o,headerHeight:n,isResizing:l,isLast:i,sortDirection:a,sortIndex:s,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:p,separatorSide:f,showLeftBorder:g,showRightBorder:h,pinnedPosition:m,pinnedOffset:C}=e,v=Y(),y=oe(),x=(0,ko.I)(),A=w.useRef(null),R=(0,Yt.A)(),I=(0,Yt.A)(),P=w.useRef(null),[k,E]=w.useState(r),F=!y.disableColumnReorder&&!p&&
45!t.disableReorder;let D;t.renderHeader&&(D=t.renderHeader(v.current.getColumnHeaderParams(t.field)));const O=(e=>{const{disableColumnSorting:t}=oe(),{colDef:r,classes:o,isDragging:n,sortDirection:l,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:c,isSiblingFocused:u}=e,d=r.sortable&&!t,p=null!=l,f=null!=s&&s>0,g="number"===r.type,h={root:["columnHeader","left"===r.headerAlign&&"columnHeader--alignLeft","center"===r.headerAlign&&"columnHeader--alignCenter","right"===r.headerAlign&&"columnHeader--alignRight",d&&"columnHeader--sortable",n&&"columnHeader--moving",p&&"columnHeader--sorted",f&&"columnHeader--filtered",g&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",c===oo.LEFT&&"columnHeader--pinnedLeft",c===oo.RIGHT&&"columnHeader--pinnedRight",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,M.A)(h,T,o)})((0,b.A)({},e,{classes:y.classes,showRightBorder:h,showLeftBorder:g})),$=w.useCallback(e=>r=>{as(r)||v.current.publishEvent(e,v.current.getColumnHeaderParams(t.field),r)},[v,t.field]),z=w.useMemo(()=>({onClick:$("columnHeaderClick"),onContextMenu:$("columnHeaderContextMenu"),onDoubleClick:$("columnHeaderDoubleClick"),onMouseOver:$("columnHeaderOver"),onMouseOut:$("columnHeaderOut"),onMouseEnter:$("columnHeaderEnter"),onMouseLeave:$("columnHeaderLeave"),onKeyDown:$("columnHeaderKeyDown"),onFocus:$("columnHeaderFocus"),onBlur:$("columnHeaderBlur")}),[$]),L=w.useMemo(()=>F?{onDragStart:$("columnHeaderDragStart"),onDragEnter:$("columnHeaderDragEnter"),onDragOver:$("columnHeaderDragOver"),onDragEndCapture:$("columnHeaderDragEnd")}:{},[F,$]),j=w.useMemo(()=>({onMouseDown:$("columnSeparatorMouseDown"),onDoubleClick:$("columnSeparatorDoubleClick")}),[$]);w.useEffect(()=>{!k&&r&&E(r)},[k,r]);const N=w.useCallback(()=>{E(!1)},[]),V=!y.disableColumnMenu&&!t.disableColumnMenu&&(0,ie.jsx)(Ad,{colDef:t,columnMenuId:R,columnMenuButtonId:I,open:k,iconButtonRef:P}),B=(0,ie.jsx)(Rd,{columnMenuId:R,columnMenuButtonId:I,field:t.field,open:r,target:P.current,ContentComponent:y.slots.columnMenu,contentComponentProps:y.slotProps?.columnMenu,onExited:N}),G=t.sortingOrder??y.sortingOrder,W=(t.sortable||null!=a)&&!t.hideSortIcons&&!y.disableColumnSorting,U=(0,ie.jsxs)(w.Fragment,{children:[!y.disableColumnFilter&&(0,ie.jsx)(y.slots.columnHeaderFilterIconButton,(0,b.A)({field:t.field,counter:c},y.slotProps?.columnHeaderFilterIconButton)),W&&(0,ie.jsx)(y.slots.columnHeaderSortIcon,(0,b.A)({field:t.field,direction:a,index:s,sortingOrder:G,disabled:!t.sortable},y.slotProps?.columnHeaderSortIcon))]});w.useLayoutEffect(()=>{const e=v.current.state.columnMenu;if(u&&!e.open){const e=A.current.querySelector('[tabindex="0"]')||A.current;if(!e)return;if(Cd())e.focus({preventScroll:!0});else{const t=v.current.getScrollPosition();e.focus(),v.current.scroll(t)}}},[v,u]);const K="function"==typeof t.headerClassName?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,q=t.headerName??t.field,_=w.useMemo(()=>nu((0,b.A)({},e.style),x,m,C),[m,C,e.style,x]);return(0,ie.jsx)(Od,(0,b.A)({ref:A,classes:O,columnMenuOpen:r,colIndex:o,height:n,isResizing:l,sortDirection:a,hasFocus:u,tabIndex:d,separatorSide:f,isDraggable:F,headerComponent:D,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:V,columnTitleIconButtons:U,headerClassName:(0,S.A)(K,i&&H["columnHeader--last"]),label:q,resizable:!y.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:B,draggableContainerProps:L,columnHeaderSeparatorProps:j,style:_},z))});function zd(e){const{groupId:t,width:r,depth:o,maxDepth:n,fields:l,height:i,colIndex:a,hasFocus:s,tabIndex:c,isLastColumn:u,pinnedPosition:d,pinnedOffset:p}=e,f=oe(),g=(0,ko.I)(),h=w.useRef(null),m=_e(),C=_(m,Qo),v=t?C[t]:{},{headerName:y=t??"",description:x="",headerAlign:S}=v;let A;const R=t&&C[t]?.renderHeaderGroup,I=w.useMemo(()=>({groupId:t,headerName:y,description:x,depth:o,maxDepth:n,fields:l,colIndex:a,isLastColumn:u}),[t,y,x,o,n,l,a,u]);t&&R&&(A=R(I));const P=(0,b.A)({},e,{classes:f.classes,headerAlign:S,depth:o,isDragging:!1}),k=y??t,E=(0,Yt.A)(),F=null===t?`empty-group-cell-${E}`:t,D=(e=>{const{classes:t,headerAlign:r,isDragging:o,isLastColumn:n,showLeftBorder:l,showRightBorder:i,groupId:a,pinnedPosition:s}=e,c={root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",o&&"columnHeader--moving",i&&"columnHeader--withRightBorder",l&&"columnHeader--withLeftBorder","withBorderColor",null===a?"columnHeader--emptyGroup":"columnHeader--filledGroup",s===oo.LEFT&&"columnHeader--pinnedLeft",s===oo.RIGHT&&"columnHeader--pinnedRight",n&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,M.A)(c,T,t)})(P);w.useLayoutEffect(()=>{if(s){const e=h.current.querySelector('[tabindex="0"]')||h.current;if(!e)return;if(Cd())e.focus({preventScroll:!0});else{const t=m.current.getScrollPosition();e.focus(),m.current.scroll(t)}}},[m,s]);const H=w.useCallback(e=>t=>{as(t)||m.current.publishEvent(e,I,t)},[m,I]),O=w.useMemo(()=>({onKeyDown:H("columnGroupHeaderKeyDown"),onFocus:H("columnGroupHeaderFocus"),onBlur:H("columnGroupHeaderBlur")}),[H]),$="function"==typeof v.headerClassName?v.headerClassName(I):v.headerClassName,z=w.useMemo(()=>nu((0,b.A)({},e.style),g,d,p),[d,p,e.style,g]);return(0,ie.jsx)(Od,(0,b.A)({ref:h,classes:D,columnMenuOpen:!1,colIndex:a,height:i,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:A,headerClassName:$,description:x,elementId:F,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:k,"aria-colspan":l.length,"data-fields":`|-${l.join("-|-")}-|`,style:z},O))}const Ld={root:H.scrollbarFiller,pinnedRight:H["scrollbarFiller--pinnedRight"]};
45function jd({pinnedRight:e}){return(0,ie.jsx)("div",{role:"presentation",className:(0,S.A)(Ld.root,e&&Ld.pinnedRight)})}const Nd=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),Vd=["className"],Bd=(0,et.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),Gd=y(function(e,t){const{className:r}=e,o=(0,x.A)(e,Vd),n=oe(),l=(e=>{const{classes:t}=e;return(0,M.A)({root:["columnHeaders"]},T,t)})(n);return(0,ie.jsx)(Bd,(0,b.A)({className:(0,S.A)(l.root,r),ownerState:n},o,{role:"presentation",ref:t}))}),Wd=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],Ud=k(y(function(e,t){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:n,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:c,columnMenuState:u,columnVisibility:d,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:f}=e,g=(0,x.A)(e,Wd),{getInnerProps:h,getColumnHeadersRow:m,getColumnGroupHeadersRows:C}=(e=>{const{visibleColumns:t,sortColumnLookup:r,filterColumnLookup:o,columnHeaderTabIndexState:n,columnGroupHeaderTabIndexState:l,columnHeaderFocus:i,columnGroupHeaderFocus:a,headerGroupingMaxDepth:s,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:p}=e,[f,g]=w.useState(""),[h,m]=w.useState(""),C=Y(),v=oe(),y=_(C,Yo),x=_(C,Ne),A=_(C,Li),R=_(C,Le),M=_(C,Fe),I=ai(x,A,R.left.length),P=_(C,rt),k=_(C,it),E=_(C,at),F=_(C,st),D=_(C,ut),T=w.useCallback(e=>m(e.field),[]),O=w.useCallback(()=>m(""),[]),$=w.useCallback(e=>g(e.field),[]),z=w.useCallback(()=>g(""),[]),L=w.useMemo(()=>R.left.length?{firstColumnIndex:0,lastColumnIndex:R.left.length}:null,[R.left.length]),j=w.useMemo(()=>R.right.length?{firstColumnIndex:t.length-R.right.length,lastColumnIndex:t.length}:null,[R.right.length,t.length]);Tt(C,"columnResizeStart",T),Tt(C,"columnResizeStop",O),Tt(C,"columnHeaderDragStart",$),Tt(C,"columnHeaderDragEndNative",z);const N=e=>{const{renderContext:r=A}=e||{},o=r.firstColumnIndex,n=Math.min(r.lastColumnIndex,t.length);return{renderedColumns:t.slice(o,n),firstColumnToRender:o,lastColumnToRender:n}},V=(e,t,r,o=!1)=>{const n=e?.position===oo.RIGHT,l=void 0===e?.position,i=R.right.length>0&&n||0===R.right.length&&l,a=I-r;return(0,ie.jsxs)(w.Fragment,{children:[l&&(0,ie.jsx)("div",{role:"presentation",style:{width:a}}),t,l&&(0,ie.jsx)("div",{role:"presentation",className:(0,S.A)(H.filler,o&&H["filler--borderBottom"])}),i&&(0,ie.jsx)(jd,{pinnedRight:n})]})},B=(e,t={})=>{const{renderedColumns:l,firstColumnToRender:a}=N(e),s=[];for(let u=0;u<l.length;u+=1){const d=l[u],g=a+u,m=0===g,w=null!==n&&n.field===d.field||m&&!p?0:-1,C=null!==i&&i.field===d.field,y=c.open&&c.field===d.field,S=e?.position,A=eu(S,d.computedWidth,g,x,P,D),R=S===oo.RIGHT?l[u-1]:l[u+1],M=!!R&&null!==i&&i.field===R.field,I=u,F=l.length,T=ru(S,I,v.showColumnVerticalBorder,v.pinnedColumnsSectionSeparator),H=tu(S,I,F,v.showColumnVerticalBorder,k,v.pinnedColumnsSectionSeparator);s.push((0,ie.jsx)($d,(0,b.A)({},r[d.field],{columnMenuOpen:y,filterItemsCounter:o[d.field]&&o[d.field].length,headerHeight:E,isDragging:d.field===f,colDef:d,colIndex:g,isResizing:h===d.field,isLast:g===x.length-1,hasFocus:C,tabIndex:w,pinnedPosition:S,pinnedOffset:A,isSiblingFocused:M,showLeftBorder:T,showRightBorder:H},t),d.field))}return V(e,s,0)},G=({depth:e,params:r})=>{const o=N(r);if(0===o.renderedColumns.length)return null;const{firstColumnToRender:n,lastColumnToRender:i}=o,c=d[e],p=t[n].field,f=y[p]?.[e]??null,g=c.findIndex(({groupId:e,columnFields:t})=>e===f&&t.includes(p)),h=t[i-1].field,m=y[h]?.[e]??null,w=c.findIndex(({groupId:e,columnFields:t})=>e===m&&t.includes(h)),C=c.slice(g,w+1).map(e=>(0,b.A)({},e,{columnFields:e.columnFields.filter(e=>!1!==u[e])})).filter(e=>e.columnFields.length>0),S=C[0].columnFields.indexOf(p),A=C[0].columnFields.slice(0,S).reduce((e,t)=>
45e+(M[t].computedWidth??0),0);let R=n;const I=C.map(({groupId:t,columnFields:o},n)=>{const i=null!==a&&a.depth===e&&o.includes(a.field),c=null!==l&&l.depth===e&&o.includes(l.field)?0:-1,u={groupId:t,width:o.reduce((e,t)=>e+M[t].computedWidth,0),fields:o,colIndex:R,hasFocus:i,tabIndex:c},d=r.position,p=eu(d,u.width,R,x,P,D);R+=o.length;let f=n;return d===oo.LEFT&&(f=R-1),(0,ie.jsx)(zd,{groupId:t,width:u.width,fields:u.fields,colIndex:u.colIndex,depth:e,isLastColumn:n===C.length-1,maxDepth:s,height:F,hasFocus:i,tabIndex:c,pinnedPosition:d,pinnedOffset:p,showLeftBorder:ru(d,f,v.showColumnVerticalBorder,v.pinnedColumnsSectionSeparator),showRightBorder:tu(d,f,C.length,v.showColumnVerticalBorder,k,v.pinnedColumnsSectionSeparator)},n)});return V(r,I,A)};return{renderContext:A,leftRenderContext:L,rightRenderContext:j,pinnedColumns:R,visibleColumns:t,columnPositions:x,getFillers:V,getColumnHeadersRow:()=>(0,ie.jsxs)(Nd,{role:"row","aria-rowindex":s+1,ownerState:v,className:H["row--borderBottom"],style:{height:E},children:[L&&B({position:oo.LEFT,renderContext:L},{disableReorder:!0}),B({renderContext:A}),j&&B({position:oo.RIGHT,renderContext:j},{disableReorder:!0,separatorSide:Fd.Left})]}),getColumnsToRender:N,getColumnGroupHeadersRows:()=>{if(0===s)return null;const e=[];for(let t=0;t<s;t+=1)e.push((0,ie.jsxs)(Nd,{role:"row","aria-rowindex":t+1,ownerState:v,style:{height:F},children:[L&&G({depth:t,params:{position:oo.LEFT,renderContext:L,maxLastColumn:L.lastColumnIndex}}),G({depth:t,params:{renderContext:A}}),j&&G({depth:t,params:{position:oo.RIGHT,renderContext:j,maxLastColumn:j.lastColumnIndex}})]},t));return e},getPinnedCellOffset:eu,isDragging:!!f,getInnerProps:()=>({role:"rowgroup"})}})({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:n,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:c,columnMenuState:u,columnVisibility:d,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:f});return(0,ie.jsxs)(Gd,(0,b.A)({},g,h(),{ref:t,children:[C(),m()]}))})),Kd=["displayOrder"],qd=["hideMenu","colDef","id","labelledby","className","children","open"],_d=(0,E.Ay)(jt)(()=>({minWidth:248}));function Xd(e){e.currentTarget.contains(e.target)&&e.stopPropagation()}const Yd=y(function(e,t){const{hideMenu:r,id:o,labelledby:n,className:l,children:i,open:a}=e,s=(0,x.A)(e,qd),c=oe(),u=w.useCallback(e=>{"Tab"===e.key&&e.preventDefault(),Do(e.key)&&r(e)},[r]);return(0,ie.jsx)(_d,(0,b.A)({as:c.slots.baseMenuList,id:o,className:(0,S.A)(H.menuList,l),"aria-labelledby":n,onKeyDown:u,onWheel:Xd,onTouchMove:Xd,autoFocus:a},s,{ref:t,children:i}))});function Qd(e){const{colDef:t,onClick:r}
45=e,o=_e(),n=oe(),l=1===Oe(o).filter(e=>!0!==e.disableColumnMenu).length,i=w.useCallback(e=>{l||(o.current.setColumnVisibility(t.field,!1),r(e))},[o,t.field,r,l]);return n.disableColumnSelector||!1===t.hideable?null:(0,ie.jsx)(n.slots.baseMenuItem,{onClick:i,disabled:l,iconStart:(0,ie.jsx)(n.slots.columnMenuHideIcon,{fontSize:"small"}),children:o.current.getLocaleText("columnMenuHideColumn")})}function Zd(e){const{onClick:t}=e,r=_e(),o=oe(),n=w.useCallback(e=>{t(e),r.current.showPreferences(Ke.columns)},[r,t]);return o.disableColumnSelector?null:(0,ie.jsx)(o.slots.baseMenuItem,{onClick:n,iconStart:(0,ie.jsx)(o.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuManageColumns")})}const Jd=["defaultSlots","defaultSlotProps","slots","slotProps"],ep={columnMenuSortItem:function(e){const{colDef:t,onClick:r}=e,o=_e(),n=_(o,wn),l=oe(),i=w.useMemo(()=>{if(!t)return null;const e=n.find(e=>e.field===t.field);return e?.sort},[t,n]),a=t.sortingOrder??l.sortingOrder,s=w.useCallback(e=>{r(e);const n=e.currentTarget.getAttribute("data-value")||null,a="always"===l.multipleColumnsSortingMode;o.current.sortColumn(t.field,n===i?null:n,a)},[o,t,r,i,l.multipleColumnsSortingMode]);if(l.disableColumnSorting||!t||!t.sortable||!a.some(e=>!!e))return null;const c=e=>{const r=o.current.getLocaleText(e);return"function"==typeof r?r(t):r};return(0,ie.jsxs)(w.Fragment,{children:[a.includes("asc")&&"asc"!==i?(0,ie.jsx)(l.slots.baseMenuItem,{onClick:s,"data-value":"asc",iconStart:(0,ie.jsx)(l.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:c("columnMenuSortAsc")}):null,a.includes("desc")&&"desc"!==i?(0,ie.jsx)(l.slots.baseMenuItem,{onClick:s,"data-value":"desc",iconStart:(0,ie.jsx)(l.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:c("columnMenuSortDesc")}):null,a.includes(null)&&null!=i?(0,ie.jsx)(l.slots.baseMenuItem,{onClick:s,iconStart:l.slots.columnMenuUnsortIcon?(0,ie.jsx)(l.slots.columnMenuUnsortIcon,{fontSize:"small"}):(0,ie.jsx)("span",{}),children:o.current.getLocaleText("columnMenuUnsort")}):null]})},columnMenuFilterItem:function(e){const{colDef:t,onClick:r}
45=e,o=_e(),n=oe(),l=w.useCallback(e=>{r(e),o.current.showFilterPanel(t.field)},[o,t.field,r]);return n.disableColumnFilter||!t.filterable?null:(0,ie.jsx)(n.slots.baseMenuItem,{onClick:l,iconStart:(0,ie.jsx)(n.slots.columnMenuFilterIcon,{fontSize:"small"}),children:o.current.getLocaleText("columnMenuFilter")})},columnMenuColumnsItem:function(e){return(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(Qd,(0,b.A)({},e)),(0,ie.jsx)(Zd,(0,b.A)({},e))]})}},tp={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},rp=y(function(e,t){const{defaultSlots:r,defaultSlotProps:o,slots:n,slotProps:l}=e,i=(0,x.A)(e,Jd),a=(e=>{const t=Y(),r=oe(),{defaultSlots:o,defaultSlotProps:n,slots:l={},slotProps:i={},hideMenu:a,colDef:s,addDividers:c=!0}=e,u=w.useMemo(()=>(0,b.A)({},o,l),[o,l]),d=w.useMemo(()=>{if(!i||0===Object.keys(i).length)return n;const e=(0,b.A)({},i);return Object.entries(n).forEach(([t,r])=>{e[t]=(0,b.A)({},r,i[t]||{})}),e},[n,i]),p=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),f=w.useMemo(()=>{const e=Object.keys(o);return Object.keys(l).filter(t=>!e.includes(t))},[l,o]);return w.useMemo(()=>{const e=Array.from(new Set([...p,...f])).filter(e=>null!=u[e]).sort((e,t)=>{const r=d[e],o=d[t];return(Number.isFinite(r?.displayOrder)?r.displayOrder:100)-(Number.isFinite(o?.displayOrder)?o.displayOrder:100)});return e.reduce((t,o,n)=>{let l={colDef:s,onClick:a};const i=d[o];if(i){const e=(0,x.A)(i,Kd);l=(0,b.A)({},l,e)}return c&&n!==e.length-1?[...t,[u[o],l],[r.slots.baseDivider,{}]]:[...t,[u[o],l]]},[])},[c,s,p,a,u,d,f,r.slots.baseDivider])})((0,b.A)({},i,{defaultSlots:r,defaultSlotProps:o,slots:n,slotProps:l}));return(0,ie.jsx)(Yd,(0,b.A)({},i,{ref:t,children:a.map(([e,t],r)=>(0,ie.jsx)(e,(0,b.A)({},t),r))}))}),op=y(function(e,t){return(0,ie.jsx)(rp,(0,b.A)({},e,{ref:t,defaultSlots:ep,defaultSlotProps:tp}))}),np=y(function(e,t){const r=_e().current.getLocaleText("noResultsOverlayLabel");return(0,ie.jsx)(Jc,(0,b.A)({},e,{ref:t,children:r}))});var lp=r(2226),ip=r(5838);var ap=r(1978),sp=r(3245),cp=r(3166),up=r(8115);function dp(e){return(0,F.Ay)("MuiBadge",e)}const pp=(0,D.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var fp=r(6178);const gp=(0,E.Ay)("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),hp=(0,E.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;
45return[t.badge,t[r.variant],t[`anchorOrigin${(0,up.A)(r.anchorOrigin.vertical)}${(0,up.A)(r.anchorOrigin.horizontal)}${(0,up.A)(r.overlap)}`],"default"!==r.color&&t[`color${(0,up.A)(r.color)}`],r.invisible&&t.invisible]}})((0,ap.A)(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter((0,sp.A)(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${pp.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function mp(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const bp=w.forwardRef(function(e,t){const r=(0,cp.b)({props:e,name:"MuiBadge"}),{anchorOrigin:o,className:n,classes:l,component:i,components:a={},componentsProps:s={},children:c,overlap:u="rectangular",color:d="default",invisible:p=!1,max:f=99,badgeContent:g,slots:h,slotProps:m,showZero:b=!1,variant:w="standard",...C}=r,{badgeContent:v,invisible:y,max:x,displayValue:A}=function(e){const{badgeContent:t,invisible:r=!1,max:o=99,showZero:n=!1}=e,l=(0,ip.A)({badgeContent:t,max:o});let i=r;!1!==r||0!==t||n||(i=!0);const{badgeContent:a,max:s=o}=i?l:e;return{badgeContent:a,invisible:i,max:s,displayValue:a&&Number(a)>s?`${s}+`:a}}({max:f,invisible:p,badgeContent:g,showZero:b}),R=(0,ip.A)({anchorOrigin:mp(o),color:d,overlap:u,variant:w,badgeContent:g}),I=y||null==v&&"dot"!==w,{color:P=d,overlap:k=u,anchorOrigin:E,variant:F=w}=I?R:r,D=mp(E),T="dot"!==F?A:void 0,H={...r,badgeContent:v,invisible:I,max:x,displayValue:T,showZero:b,anchorOrigin:D,color:P,overlap:k,variant:F}
45,O=(e=>{const{color:t,anchorOrigin:r,invisible:o,overlap:n,variant:l,classes:i={}}=e,a={root:["root"],badge:["badge",l,o&&"invisible",`anchorOrigin${(0,up.A)(r.vertical)}${(0,up.A)(r.horizontal)}`,`anchorOrigin${(0,up.A)(r.vertical)}${(0,up.A)(r.horizontal)}${(0,up.A)(n)}`,`overlap${(0,up.A)(n)}`,"default"!==t&&`color${(0,up.A)(t)}`]};return(0,M.A)(a,dp,i)})(H),$={slots:{root:h?.root??a.Root,badge:h?.badge??a.Badge},slotProps:{root:m?.root??s.root,badge:m?.badge??s.badge}},[z,L]=(0,fp.A)("root",{elementType:gp,externalForwardedProps:{...$,...C},ownerState:H,className:(0,S.A)(O.root,n),ref:t,additionalProps:{as:i}}),[j,N]=(0,fp.A)("badge",{elementType:hp,externalForwardedProps:$,ownerState:H,className:O.badge});return(0,ie.jsxs)(z,{...L,children:[c,(0,ie.jsx)(j,{...N,children:T})]})}),wp=bp;var Cp=r(4964),vp=r(9253),yp=r(4097),xp=r(9e3),Sp=r(8483),Ap=r(8637);function Rp(e){return(0,F.Ay)("MuiLinearProgress",e)}(0,D.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const Mp=Vu.i7` 46 0% { 47 left: -35%; 48 right: 100%; 49 } 50 51 60% { 52 left: 100%; 53 right: -90%; 54 } 55 56 100% { 57 left: 100%; 58 right: -90%; 59 } 60`,Ip="string"!=typeof Mp?Vu.AH` 61 animation: ${Mp} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; 62 `:null,Pp=Vu.i7` 63 0% { 64 left: -200%; 65 right: 100%; 66 } 67 68 60% { 69 left: 107%; 70 right: -8%; 71 } 72 73 100% { 74 left: 107%; 75 right: -8%; 76 } 77`,kp="string"!=typeof Pp?Vu.AH` 78 animation: ${Pp} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; 79 `:null,Ep=Vu.i7` 80 0% { 81 opacity: 1; 82 background-position: 0 -23px; 83 } 84 85 60% { 86 opacity: 0; 87 background-position: 0 -23px; 88 } 89 90 100% { 91 opacity: 1; 92 background-position: -200px -23px; 93 } 94`,Fp="string"!=typeof Ep?Vu.AH` 95 animation: ${Ep} 3s infinite linear; 96 `:null,Dp=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),Tp=(0,E.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,up.A)(r.color)}`],t[r.variant]]}})((0,ap.A)(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter((0,sp.A)()).map(([t])=>({props:{color:t},style:{backgroundColor:Dp(e,t)}})),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.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)"}}]}))),Hp=(0,E.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.dashed,t[`dashedColor${(0,up.A)(r.color)}`]]}})((0,ap.A)(({theme:e})=>({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(e.palette).filter((0,sp.A)()).map(([t])=>{const r=Dp(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`}}})]})),Fp||{animation:`${Ep} 3s infinite linear`}),Op=(0,E.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t.bar1,t[`barColor${(0,up.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar1Indeterminate,"determinate"===r.variant&&t.bar1Determinate,"buffer"===r.variant&&t.bar1Buffer]}})((0,ap.A)(({theme:e})=>({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(e.palette).filter((0,sp.A)()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:Ip||{animation:`${Mp} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),$p=(0,E.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t.bar2,t[`barColor${(0,up.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar2Indeterminate,"buffer"===r.variant&&t.bar2Buffer]}})((0,ap.A)(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter((0,sp.A)()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter((0,sp.A)()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:Dp(e,t),transition:"transform .4s linear"}})),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:kp||{animation:`${Pp} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),zp=w.forwardRef(function(e,t){const r=(0,cp.b)({props:e,name:"MuiLinearProgress"}),{className:o,color:n="primary",value:l,valueBuffer:i,variant:a="indeterminate",...s}=r,c={...r,color:n,variant:a},u=(e=>{const{classes:t,variant:r,color:o}=e,n={root:["root",`color${(0,up.A)(o)}`,r],dashed:["dashed",`dashedColor${(0,up.A)(o)}`],bar1:["bar","bar1",`barColor${(0,up.A)(o)}`,("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==r&&`barColor${(0,up.A)(o)}`,"buffer"===r&&`color${(0,up.A)(o)}`,("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return(0,M.A)(n,Rp,t)})(c),d=(0,ko.I)(),p={},f={bar1:{},bar2:{}};if(("determinate"===a||"buffer"===a)&&void 0!==l){p["aria-valuenow"]=Math.round(l),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let e=l-100;d&&(e=-e),f.bar1.transform=`translateX(${e}%)`}if("buffer"===a&&void 0!==i){let e=(i||0)-100;d&&(e=-e),f.bar2.transform=`translateX(${e}%)`}return(0,ie.jsxs)(Tp,{className:(0,S.A)(u.root,o),ownerState:c,role:"progressbar",...p,ref:t,...s,children:["buffer"===a?(0,ie.jsx)(Hp,{className:u.dashed,ownerState:c}):null,(0,ie.jsx)(Op,{className:u.bar1,ownerState:c,style:f.bar1}),"determinate"===a?null:(0,ie.jsx)($p,{className:u.bar2,ownerState:c,style:f.bar2})]})}),Lp=zp;var jp=r(9842),Np=r(6526),Vp=r(1764),Bp=r(6625),Gp=r(5101),Wp=r(7156),Up=r(8892),Kp=r(6808),qp=r(9498),_p=r(2763),Xp=r(6142),Yp=r(5201),Qp=r(9918),Zp=r(2180),Jp=r(2094),ef=r(1396),tf=r(7895),rf
96=r(3333),of=r(6436),nf=r(4700),lf=r(3527),af=r(3738);const sf=(0,af.A)((0,ie.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),cf=(0,af.A)((0,ie.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage");function uf(e){return(0,F.Ay)("MuiTablePaginationActions",e)}(0,D.A)("MuiTablePaginationActions",["root"]);const df=(0,E.Ay)("div",{name:"MuiTablePaginationActions",slot:"Root"})({}),pf=w.forwardRef(function(e,t){const r=(0,cp.b)({props:e,name:"MuiTablePaginationActions"}),{backIconButtonProps:o,className:n,count:l,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:c,page:u,rowsPerPage:d,showFirstButton:p,showLastButton:f,slots:g={},slotProps:h={},...m}=r,b=(0,ko.I)(),w=(e=>{const{classes:t}=e;return(0,M.A)({root:["root"]},uf,t)})(r),C=g.firstButton??Zp.A,v=g.lastButton??Zp.A,y=g.nextButton??Zp.A,x=g.previousButton??Zp.A,A=g.firstButtonIcon??cf,R=g.lastButtonIcon??sf,I=g.nextButtonIcon??lf.A,P=g.previousButtonIcon??nf.A,k=b?v:C,E=b?y:x,F=b?x:y,D=b?C:v,T=b?h.lastButton:h.firstButton,H=b?h.nextButton:h.previousButton,O=b?h.previousButton:h.nextButton,$=b?h.firstButton:h.lastButton;return(0,ie.jsxs)(df,{ref:t,className:(0,S.A)(w.root,n),...m,children:[p&&(0,ie.jsx)(k,{onClick:e=>{c(e,0)},disabled:i||0===u,"aria-label":a("first",u),title:a("first",u),...T,children:b?(0,ie.jsx)(R,{...h.lastButtonIcon}):(0,ie.jsx)(A,{...h.firstButtonIcon})}),(0,ie.jsx)(E,{onClick:e=>{c(e,u-1)},disabled:i||0===u,color:"inherit","aria-label":a("previous",u),title:a("previous",u),...H??o,children:b?(0,ie.jsx)(I,{...h.nextButtonIcon}):(0,ie.jsx)(P,{...h.previousButtonIcon})}),(0,ie.jsx)(F,{onClick:e=>{c(e,u+1)},disabled:i||-1!==l&&u>=Math.ceil(l/d)-1,color:"inherit","aria-label":a("next",u),title:a("next",u),...O??s,children:b?(0,ie.jsx)(P,{...h.previousButtonIcon}):(0,ie.jsx)(I,{...h.nextButtonIcon})}),f&&(0,ie.jsx)(D,{onClick:e=>{c(e,Math.max(0,Math.ceil(l/d)-1))},disabled:i||u>=Math.ceil(l/d)-1,"aria-label":a("last",u),title:a("last",u),...$,children:b?(0,ie.jsx)(A,{...h.firstButtonIcon}):(0,ie.jsx)(R,{...h.lastButtonIcon})})]})}),ff=pf;var gf=r(7143);function hf(e){return(0,F.Ay)("MuiTablePagination",e)}const mf=(0,D.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var bf;const wf=(0,E.Ay)(rf.A,{name:"MuiTablePagination",slot:"Root"})((0,ap.A)(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),Cf=(0,E.Ay)(of.A,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${mf.actions}`]:t.actions,...t.toolbar})})((0,ap.A)(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${mf.actions}`]:{flexShrink:0,marginLeft:20}}))),vf=(0,E.Ay)("div",{name:"MuiTablePagination",slot:"Spacer"})({flex:"1 1 100%"}),yf=(0,E.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel"})((0,ap.A)(({theme:e})=>({...e.typography.body2,flexShrink:0}))),xf=(0,E.Ay)(_p.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${mf.selectIcon}`]:t.selectIcon,[`& .${mf.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${mf.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Sf=(0,E.Ay)(Gp.A,{name:"MuiTablePagination",slot:"MenuItem"})({}),Af=(0,E.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows"})((0,ap.A)(({theme:e})=>({...e.typography.body2,flexShrink:0})));function Rf({from:e,to:t,count:r}){return`${e}–${t} of ${-1!==r?r:`more than ${t}`}`}function Mf(e){return`Go to ${e} page`}const If=w.forwardRef(function(e,t){const r=(0,cp.b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:o=ff,backIconButtonProps:n,colSpan:l,component:i=rf.A,count:a,disabled:s=!1,getItemAriaLabel:c=Mf,labelDisplayedRows:u=Rf,labelRowsPerPage:d="Rows per page:",nextIconButtonProps:p,onPageChange:f,onRowsPerPageChange:g,page:h,rowsPerPage:m,rowsPerPageOptions:b=[10,25,50,100],SelectProps:C={}
96,showFirstButton:v=!1,showLastButton:y=!1,slotProps:x={},slots:A={},...R}=r,I=r,P=(e=>{const{classes:t}=e;return(0,M.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},hf,t)})(I),k=x?.select??C,E=k.native?"option":Sf;let F;i!==rf.A&&"td"!==i||(F=l||1e3);const D=(0,gf.A)(k.id),T=(0,gf.A)(k.labelId),H={slots:A,slotProps:x},[O,$]=(0,fp.A)("root",{ref:t,className:P.root,elementType:wf,externalForwardedProps:{...H,component:i,...R},ownerState:I,additionalProps:{colSpan:F}}),[z,L]=(0,fp.A)("toolbar",{className:P.toolbar,elementType:Cf,externalForwardedProps:H,ownerState:I}),[j,N]=(0,fp.A)("spacer",{className:P.spacer,elementType:vf,externalForwardedProps:H,ownerState:I}),[V,B]=(0,fp.A)("selectLabel",{className:P.selectLabel,elementType:yf,externalForwardedProps:H,ownerState:I,additionalProps:{id:T}}),[G,W]=(0,fp.A)("select",{className:P.select,elementType:xf,externalForwardedProps:H,ownerState:I}),[U,K]=(0,fp.A)("menuItem",{className:P.menuItem,elementType:E,externalForwardedProps:H,ownerState:I}),[q,_]=(0,fp.A)("displayedRows",{className:P.displayedRows,elementType:Af,externalForwardedProps:H,ownerState:I});return(0,ie.jsx)(O,{...$,children:(0,ie.jsxs)(z,{...L,children:[(0,ie.jsx)(j,{...N}),b.length>1&&(0,ie.jsx)(V,{...B,children:d}),b.length>1&&(0,ie.jsx)(G,{variant:"standard",...!k.variant&&{input:bf||(bf=(0,ie.jsx)(Sp.Ay,{}))},value:m,onChange:g,id:D,labelId:T,...k,classes:{...k.classes,root:(0,S.A)(P.input,P.selectRoot,(k.classes||{}).root),select:(0,S.A)(P.select,(k.classes||{}).select),icon:(0,S.A)(P.selectIcon,(k.classes||{}).icon)},disabled:s,...W,children:b.map(e=>(0,w.createElement)(U,{...K,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e))}),(0,ie.jsx)(q,{..._,children:u({from:0===a?0:h*m+1,to:-1===a?(h+1)*m:-1===m?a:Math.min(a,(h+1)*m),count:-1===a?-1:a,page:h})}),(0,ie.jsx)(o,{className:P.actions,backIconButtonProps:n,count:a,nextIconButtonProps:p,onPageChange:f,page:h,rowsPerPage:m,showFirstButton:v,showLastButton:y,slotProps:x.actions,slots:A.actions,getItemAriaLabel:c,disabled:s})]})})}),Pf=If;var kf=r(642),Ef=r(5572),Ff=r(5912),Df=r(8667),Tf=r(5018);function Hf(e){return(0,F.Ay)("MuiSkeleton",e)}(0,D.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const Of=Vu.i7` 97 0% { 98 opacity: 1; 99 } 100 101 50% { 102 opacity: 0.4; 103 } 104 105 100% { 106 opacity: 1; 107 } 108`,$f=Vu.i7` 109 0% { 110 transform: translateX(-100%); 111 } 112 113 50% { 114 /* +0.5s of delay between each loop */ 115 transform: translateX(100%); 116 } 117 118 100% { 119 transform: translateX(100%); 120 } 121`,zf="string"!=typeof Of?Vu.AH` 122 animation: ${Of} 2s ease-in-out 0.5s infinite; 123 `:null,Lf="string"!=typeof $f?Vu.AH` 124 &::after { 125 animation: ${$f} 2s linear 0.5s infinite; 126 } 127 `:null,jf=(0,E.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!1!==r.animation&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})((0,ap.A)(({theme:e})=>{const t=(n=e.shape.borderRadius,String(n).match(/[\d.\-+]*\s*(.*)/)[1]||""||"px"),r=(o=e.shape.borderRadius,parseFloat(o));var o,n;return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:e.alpha(e.palette.text.primary,"light"===e.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:`${r}${t}/${Math.round(r/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:zf||{animation:`${Of} 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 ${(e.vars||e).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:Lf||{"&::after":{animation:`${$f} 2s linear 0.5s infinite`}}}]}})),Nf=w.forwardRef(function(e,t){const r=(0,cp.b)({props:e,name:"MuiSkeleton"}),{animation:o="pulse",className:n,component:l="span",height:i,style:a,variant:s="text",width:c,...u}=r,d={...r,animation:o,component:l,variant:s,hasChildren:Boolean(u.children)},p=(e=>{const{classes:t,variant:r,animation:o,hasChildren:n,width:l,height:i}=e,a={root:["root",r,o,n&&"withChildren",n&&!l&&"fitContent",n&&!i&&"heightAuto"]};return(0,M.A)(a,Hf,t)})(d);return(0,ie.jsx)(jf,{as:l,ref:t,className:(0,S.A)(p.root,n),ownerState:d,...u,style:{width:c,height:i,...a}})}),Vf=Nf;var Bf=r(1580),Gf=r(5501),Wf=r(6242);const Uf=af.A,Kf=Uf((0,ie.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),qf=Uf((0,ie.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),_f=Uf((0,ie.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),Xf=Uf((0,ie.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Yf=Uf((0,ie.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Qf=Uf((0,ie.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"),Zf=Uf((0,ie.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"),Jf=(Uf((0,ie.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),Uf((0,ie.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"),Uf((0,ie.jsx)("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ColumnIcon")),eg=Uf((0,ie.jsx)("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),tg=Uf((0,ie.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),rg=Uf((0,ie.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),og=Uf((0,ie.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),ng=Uf((0,ie.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"),lg=Uf((0,ie.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"),ig=Uf((0,ie.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),ag=Uf((0,ie.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),sg=Uf((0,ie.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"),cg=Uf((0,ie.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"),ug=Uf((0,ie.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),dg=Uf((0,ie.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"),pg=Uf((0,ie.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"),fg=Uf((0,ie.jsx)("g",{children:(0,ie.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),gg=Uf((0,ie.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"),hg=(Uf((0,ie.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"),Uf((0,ie.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")),mg=Uf((0,ie.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),bg=["sortingOrder"],wg=w.memo(function(e){const{sortingOrder:t}=e,r=(0,x.A)(e,bg),o=oe(),[n]=t,l="asc"===n?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return l?(0,ie.jsx)(l,(0,b.A)({},r)):null}),Cg=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],vg=["onRowsPerPageChange","material","disabled"],yg=["material"],xg=["autoFocus","label","fullWidth","slotProps","className","material"],Sg=["material"],Ag=["material"],Rg=["material"],Mg=["material"],Ig=["material"],Pg=["material"],kg=["material"],Eg=["material"],Fg=["material"],Dg=["material","label","className"],Tg=["material"],Hg=["inert","iconStart","iconEnd","children","material"],Og=["slotProps","material"],$g=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],zg=["key"],Lg=["inputProps","InputProps","InputLabelProps"],jg=["slotProps","material"],Ng=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],Vg=["native"],Bg=["children","value","active"],Gg=["items","value","material"],Wg=(0,E.Ay)(Jp.A)(({theme:e})=>({[`&.${ef.A.positionEnd} .${Qp.A.sizeSmall}`]:{marginRight:e.spacing(-.75)}})),Ug=(0,E.Ay)(Kp.A,{shouldForwardProp:e=>"fullWidth"!==e})(({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:"hidden",[`& .${qp.A.label}`]:{fontSize:e.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),Kg=(0,E.Ay)(Cp.A,{shouldForwardProp:e=>"density"!==e})(({theme:e})=>({variants:[{props:{density:"compact"},style:{padding:e.spacing(.5)}}]})),qg=(0,E.Ay)(Np.A)({[`& .${Vp.A.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),_g=y(function(e,t){const{id:r,label:o,labelId:n,material:l,disabled:i,slotProps:a,onChange:s,onKeyDown:c,onOpen:u,onClose:d,size:p,style:f,fullWidth:g}=e,h=(0,x.A)(e,Cg),m={PaperProps:{onKeyDown:c}};return d&&(m.onClose=d),(0,ie.jsxs)(Up.A,{size:p,fullWidth:g,style:f,disabled:i,ref:t,children:[(0,ie.jsx)(Tf.A,{id:n,htmlFor:r,shrink:!0,variant:"outlined",children:o}),(0,ie.jsx)(_p.A,(0,b.A)({id:r,labelId:n,label:o,displayEmpty:!0,onChange:s,variant:"outlined"},h,{notched:!0,inputProps:a?.htmlInput,onOpen:u,MenuProps:m,size:p},l))]})}),Xg=(0,E.Ay)(Pf)(({theme:e})=>({[`& .${mf.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${mf.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),Yg=y(function(e,t){const{onRowsPerPageChange:r,material:o,disabled:n}=e,l=(0,x.A)(e,vg),i=w.useMemo(()=>
127{if(n)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}},[n]),a=_e(),s=oe(),{estimatedRowCount:c}=s;return(0,ie.jsx)(Xg,(0,b.A)({component:"div",onRowsPerPageChange:(0,It.A)(e=>{r?.(Number(e.target.value))}),labelRowsPerPage:a.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:e=>a.current.getLocaleText("paginationDisplayedRows")((0,b.A)({},e,{estimated:c})),getItemAriaLabel:a.current.getLocaleText("paginationItemAriaLabel")},i,l,o,{ref:t}))}),Qg=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,yg);return(0,ie.jsx)(wp,(0,b.A)({},o,r,{ref:t}))}),Zg=y(function(e,t){const{autoFocus:r,label:o,fullWidth:n,slotProps:l,className:i,material:a}=e,s=(0,x.A)(e,xg),c=w.useRef(null),u=(0,A.A)(c,t),d=w.useRef(null);return w.useEffect(()=>{if(r){const e=c.current?.querySelector("input");e?.focus({preventScroll:!0})}else!1===r&&d.current&&d.current.stop({})},[r]),o?(0,ie.jsx)(Ug,{className:i,control:(0,ie.jsx)(Kg,(0,b.A)({},s,a,{inputProps:l?.htmlInput,ref:u,touchRippleRef:d})),label:o,fullWidth:n}):(0,ie.jsx)(Kg,(0,b.A)({},s,a,{className:(0,S.A)(i,a?.className),inputProps:l?.htmlInput,ref:u,touchRippleRef:d}))}),Jg=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Sg);return(0,ie.jsx)(yp.A,(0,b.A)({},o,r,{ref:t}))}),eh=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Ag);return(0,ie.jsx)(xp.A,(0,b.A)({},o,r,{ref:t}))}),th=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Rg);return(0,ie.jsx)(Lp,(0,b.A)({},o,r,{ref:t}))}),rh=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Mg);return(0,ie.jsx)(Yp.A,(0,b.A)({},o,r,{ref:t}))}),oh=(0,E.Ay)(Wf.A)(({theme:e})=>({gap:e.spacing(1),border:0})),nh=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Ig);return(0,ie.jsx)(oh,(0,b.A)({size:"small",color:"primary"},o,r,{ref:t}))}),lh=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Pg);return(0,ie.jsx)(vp.A,(0,b.A)({},o,r,{ref:t}))}),ih=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,kg);return(0,ie.jsx)(Zp.A,(0,b.A)({},o,r,{ref:t}))}),ah=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Eg);return(0,ie.jsx)(tf.A,(0,b.A)({},o,r,{ref:t}))}),sh=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Fg);return(0,ie.jsx)(Vf,(0,b.A)({},o,r,{ref:t}))}),ch=y(function(e,t){const{material:r,label:o,className:n}=e,l=(0,x.A)(e,Dg);return o?(0,ie.jsx)(Ug,{className:n,control:(0,ie.jsx)(Xp.A,(0,b.A)({},l,r,{ref:t})),label:o}):(0,ie.jsx)(Xp.A,(0,b.A)({},l,r,{className:n,ref:t}))}),uh=y(function(e,t){const{material:r}=e,o=(0,x.A)(e,Tg);return(0,ie.jsx)(Bp.A,(0,b.A)({},o,r,{ref:t}))});function dh(e,t=!0){if(!e)return;const{slotProps:r,material:o}=e,n=(0,x.A)(e,jg);t&&(n.startAdornment&&(n.startAdornment=(0,ie.jsx)(Wg,{position:"start",children:n.startAdornment})),n.endAdornment&&(n.endAdornment=(0,ie.jsx)(Wg,{position:"end",children:n.endAdornment})));for(const e in o)Object.hasOwn(o,e)&&(n[e]=o[e]);return r?.htmlInput&&(n.inputProps?n.inputProps=(0,b.A)({},n.inputProps,r?.htmlInput):n.inputProps=r?.htmlInput),n}const ph={"bottom-start":"top left","bottom-end":"top right"};function fh(e,t){return function(e,t){return void 0===e.focusTrap?t:(0,ie.jsx)(Ap.A,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:(0,ie.jsx)("div",{tabIndex:-1,children:t})})}(e,function(e,t){return void 0===e.onClickAway?t:(0,ie.jsx)(Ef.x,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}(e,t))}const gh=(0,E.Ay)(Bf.A,{name:"MuiDataGrid",slot:"Tabs"})(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`})),hh=(0,E.Ay)(Gf.A,{name:"MuiDataGrid",slot:"Tab"})({flex:1,minWidth:"fit-content"}),mh=(0,E.Ay)("div",{name:"MuiDataGrid",slot:"TabPanel"})({flex:1,display:"flex",flexDirection:"column",overflow:"hidden"});function bh(e){const{children:t,active:r}=e,o=(0,x.A)(e,Bg);return(0,ie.jsx)(mh,(0,b.A)({role:"tabpanel",style:{display:r?"flex":"none"}},o,{children:t}))}const wh={booleanCellTrueIcon:ug,booleanCellFalseIcon:lg,columnMenuIcon:ng,openFilterButtonIcon:Yf,filterPanelDeleteIcon:lg,columnFilteredIcon:Qf,columnSelectorIcon:Jf,columnUnsortedIcon:wg,columnSortedAscendingIcon:Kf,columnSortedDescendingIcon:qf,columnResizeIcon:eg,densityCompactIcon:tg,densityStandardIcon:rg,densityComfortableIcon:og,exportIcon:mg,moreActionsIcon:dg,treeDataCollapseIcon:Xf,treeDataExpandIcon:_f,groupingCriteriaCollapseIcon:Xf,groupingCriteriaExpandIcon:_f,detailPanelExpandIcon:ig,detailPanelCollapseIcon:ag,rowReorderIcon:cg,quickFilterIcon:Zf,quickFilterClearIcon:gg,columnMenuHideIcon:pg,columnMenuSortAscendingIcon:Kf,columnMenuSortDescendingIcon:qf,columnMenuUnsortIcon:null,columnMenuFilterIcon:Qf,columnMenuManageColumnsIcon:fg,columnMenuClearIcon:gg,loadIcon:sg,filterPanelAddIcon:ig,filterPanelRemoveAllIcon:hg,columnReorderIcon:cg,menuItemCheckIcon:ug},Ch={baseAutocomplete:function(e){const t=oe(),{id:r,multiple:o,freeSolo:n,options:l,getOptionLabel:i,isOptionEqualToValue:a,value:s,onChange:c,label:u,placeholder:d,slotProps:p,material:f}=e,g=(0,x.A)(e,$g);return(0,ie.jsx)(lp.A,(0,b.A)({id:r,multiple:o,freeSolo:n,options:l,getOptionLabel:i,isOptionEqualToValue:a,value:s,onChange:c,renderTags:(e,t)=>e.map((e,r)=>{const o=t({index:r}),{key:n}=o,l=(0,x.A)(o,zg);return(0,ie.jsx)(vp.A,(0,b.A)({variant:"outlined",size:"small",label:"string"==typeof e?e:i?.(e)},l),n)}),renderInput:e=>{const{inputProps:r,InputProps:o,InputLabelProps:n}=e,l=(0,x.A)(e,Lg);return(0,ie.jsx)(Wp.A,(0,b.A)({},l,{label:u,placeholder:d,inputProps:r,InputProps:dh(o,!1),InputLabelProps:(0,b.A)({shrink:!0},n)},p?.textField,t.slotProps?.baseTextField))}},g,f))},baseBadge:Qg,baseCheckbox:Zg,baseChip:lh,baseCircularProgress:Jg,baseDivi
127der:eh,baseInput:function(e){return(0,ie.jsx)(Sp.Ay,(0,b.A)({},dh(e)))},baseLinearProgress:th,baseMenuList:uh,baseMenuItem:function(e){const{inert:t,iconStart:r,iconEnd:o,children:n,material:l}=e,i=(0,x.A)(e,Hg);return t&&(i.disableRipple=!0),w.createElement(Gp.A,(0,b.A)({},i,l),[r&&(0,ie.jsx)(jp.A,{children:r},"1"),(0,ie.jsx)(qg,{children:n},"2"),o&&(0,ie.jsx)(jp.A,{children:o},"3")])},baseTextField:function(e){const{slotProps:t,material:r}=e,o=(0,x.A)(e,Og);return(0,ie.jsx)(Wp.A,(0,b.A)({variant:"outlined"},o,r,{inputProps:t?.htmlInput,InputProps:dh(t?.input),InputLabelProps:(0,b.A)({shrink:!0},t?.inputLabel)}))},baseButton:rh,baseIconButton:ih,baseToggleButton:nh,baseTooltip:ah,baseTabs:function(e){let{items:t,value:r,material:o}=e,n=(0,x.A)(e,Gg);const l=(0,Yt.A)(),i=`${l}-tab-${r}`,a=`${l}-tabpanel-${r}`;return(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(gh,(0,b.A)({},n,{value:r,variant:"scrollable",scrollButtons:"auto"},o,{children:t.map(e=>(0,ie.jsx)(hh,{value:e.value,label:e.label,id:i,"aria-controls":a},e.value))})),t.map(e=>(0,ie.jsx)(bh,{value:e.value,active:r===e.value,id:a,"aria-labelledby":i,children:e.children},e.value))]})},basePagination:Yg,basePopper:function(e){const{open:t,children:r,className:o,flip:n,onExited:l,onDidShow:i,onDidHide:a,id:s,target:c,transition:u,placement:d,material:p}=e,f=(0,x.A)(e,Ng),g=w.useMemo(()=>{const e=[{name:"preventOverflow",options:{padding:8}}];return n&&e.push({name:"flip",enabled:!0}),(i||a)&&e.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{i?.()},effect:()=>()=>{a?.()}}),e},[n,i,a]);let h;if(u){const t=e=>t=>{e&&e(),l&&l(t)};h=o=>fh(e,(0,ie.jsx)(Ff.A,(0,b.A)({},o.TransitionProps,{style:{transformOrigin:ph[o.placement]},onExited:t(o.TransitionProps?.onExited),children:(0,ie.jsx)(Df.A,{children:r})})))}else h=fh(e,r);return(0,ie.jsx)(kf.A,(0,b.A)({id:s,className:o,open:t,anchorEl:c,transition:u,placement:d,modifiers:g},f,p,{children:h}))},baseSelect:_g,baseSelectOption:function(e){let{native:t}=e,r=(0,x.A)(e,Vg);return t?(0,ie.jsx)("option",(0,b.A)({},r)):(0,ie.jsx)(Gp.A,(0,b.A)({},r))},baseSkeleton:sh,baseSwitch:ch},vh=(0,b.A)({},Ch,wh),yh=(0,et.A)("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function xh(e,t,r,o={}){return"function"==typeof t?t(r,o):t?(t.props.className&&(r.className=(n=t.props.className,l=r.className,n&&l?`${n} ${l}`:n||l)),(t.props.style||r.style)&&(r.style=(0,b.A)({},r.style,t.props.style)),w.cloneElement(t,r)):w.createElement(e,r);var n,l}const Sh=w.createContext(void 0);function Ah(e,t){if(!e.ref.current||!t.ref.current)return 0;const r=e.ref.current.compareDocumentPosition(t.ref.current);return r?r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}const Rh=["render","className"],Mh=(0,et.A)("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:"0 1 1px",display:"flex",alignItems:"center",justifyContent:"end",gap:L.spacing(.25),padding:L.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${L.colors.border.base}`}),Ih=y(function(e,t){const{render:r,className:o}=e,n=(0,x.A)(e,Rh),l=oe(),i=(e=>{const{classes:t}=e;return(0,M.A)({root:["toolbar"]},T,t)})(l),[a,s]=w.useState(null),[c,u]=w.useState([]),d=w.useCallback(()=>c.sort(Ah),[c]),p=w.useCallback((e,t,r=!0)=>{let o=e;const n=d(),l=n.length;for(let e=0;e<l;e+=1){if(o+=t,o>=l){if(!r)return-1;o=0}else if(o<0){if(!r)return-1;o=l-1}if(!n[o].ref.current?.disabled&&"true"!==n[o].ref.current?.ariaDisabled)return o}return-1},[d]),f=w.useCallback((e,t)=>{u(r=>[...r,{id:e,ref:t}])},[]),g=w.useCallback(e=>{u(t=>t.filter(t=>t.id!==e))},[]),h=w.useCallback(e=>{if(!a)return;const t=d(),r=t.findIndex(e=>e.id===a);let o=-1;if("ArrowRight"===e.key?(e.preventDefault(),o=p(r,1)):"ArrowLeft"===e.key?(e.preventDefault(),o=p(r,-1)):"Home"===e.key?(e.preventDefault(),o=p(-1,1,!1)):"End"===e.key&&(e.preventDefault(),o=p(t.length,-1,!1)),o>=0&&o<t.length){const e=t[o];s(e.id),e.ref.current?.focus()}},[d,a,p]),m=w.useCallback(e=>{a!==e&&s(e)},[a,s]),C=w.useCallback(e=>{const t=d(),r=t.findIndex(t=>t.id===e),o=p(r,1);if(o>=0&&o<t.length){const e=t[o];s(e.id),e.ref.current?.focus()}},[d,p]);w.useEffect(()=>{const e=d();if(e.length>0){if(!a)return void s(e[0].id);const t=e.findIndex(e=>e.id===a);if(e[t]){if(-1===t){const r=e[t];r&&(s(r.id),r.ref.current?.focus())}}else{const t=e[e.length-1];t&&(s(t.id),t.ref.current?.focus())}}},[d,p]);const v=w.useMemo(()=>({focusableItemId:a,registerItem:f,unregisterItem:g,onItemKeyDown:h,onItemFocus:m,onItemDisabled:C}),[a,f,g,h,m,C]),y=xh(Mh,r,(0,b.A)({role:"toolbar","aria-orientation":"horizontal","aria-label":l.label||void 0,className:(0,S.A)(i.root,o)},n,{ref:t}));return(0,ie.jsx)(Sh.Provider,{value:v,children:y})}),Ph=["render","onKeyDown","onFocus","disabled","aria-disabled"],kh=y(function(e,t){const{render:r,onKeyDown:o,onFocus:n,disabled:l,"aria-disabled":i}=e,a=(0,x.A)(e,Ph),s=(0,Yt.A)(),c=oe(),u=w.useRef(null),d=(0,A.A)(u,t),{focusableItemId:p,registerItem:f,unregisterItem:g,onItemKeyDown:h,onItemFocus:m,onItemDisabled:C}=function(){const e=w.useContext(Sh);if(void 0===e)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return e}();w.useEffect(()=>(f(s,u),()=>g(s)),[]);const v=w.useRef(l);w.useEffect(()=>{v.current!==l&&!0===l&&C(s,l),v.current=l},[l,s,C]);const y=w.useRef(i);w.useEffect(()=>{y.current!==i&&!0===i&&C(s,!0),y.current=i},[i,s,C]);const S=xh(c.slots.baseIconButton,r,(0,b.A)({},c.slotProps?.baseIconButton,{tabIndex:p===s?0:-1},a,{disabled:l,"aria-disabled":i,onKeyDown:e=>{h(e),o?.(e)},onFocus:e=>{m(s),n?.(e)},ref:d}));return(0,ie.jsx)(w.Fragment,{children:S})}),Eh=["render","className","onClick","onPointerUp"],Fh=y(function(e,t){const{render:r,className:o,onClick:n,onPointerUp:l}=e,i=(0,x.A)(e,Eh),a=oe(),s=(0,Yt.A)(),c=(0,Yt.A)(),u=_e(),d=_(u,We),p=d.open&&d.openedPanelValue===Ke.filters,f=_(u,Tn).length,g={open:p,filterCount:f},h="function"==typeof o?o(g):o,{filterPanelTriggerRef:m}=Ye(),C=(0,A.A)(t,m),v=xh(a.slots.baseButton,r,(0,b.A)({},a.slotProps?.baseButton,{id:s,"aria-haspopup":"true","aria-expanded":p?"true":void 0,"aria-controls":p?c:void 0,onClick:e=>{p?u.current.hidePreferences():u.current.showPreferences(Ke.filters,c,s),n?.(e)},onPointerUp:e=>{p&&e.stopPropagation(),l?.(e)},className:h},i,{ref:C}),g);return(0,ie.jsx)(w.Fragment,{children:v})}),Dh=["render","className","onClick","onPointerUp"],Th=y(function(e,t){const{render:r,className:o,onClick:n,onPointerUp:l}
127=e,i=(0,x.A)(e,Dh),a=oe(),s=(0,Yt.A)(),c=(0,Yt.A)(),u=_e(),d=_(u,We),p=d.open&&d.openedPanelValue===Ke.columns,f={open:p},g="function"==typeof o?o(f):o,{columnsPanelTriggerRef:h}=Ye(),m=(0,A.A)(t,h),C=xh(a.slots.baseButton,r,(0,b.A)({},a.slotProps?.baseButton,{id:s,"aria-haspopup":"true","aria-expanded":p?"true":void 0,"aria-controls":p?c:void 0,className:g},i,{onPointerUp:e=>{p&&e.stopPropagation(),l?.(e)},onClick:e=>{p?u.current.hidePreferences():u.current.showPreferences(Ke.columns,c,s),n?.(e)},ref:m}),f);return(0,ie.jsx)(w.Fragment,{children:C})}),Hh=["render","options","onClick"],Oh=y(function(e,t){const{render:r,options:o,onClick:n}=e,l=(0,x.A)(e,Hh),i=oe(),a=_e(),s=xh(i.slots.baseButton,r,(0,b.A)({},i.slotProps?.baseButton,{onClick:e=>{a.current.exportDataAsPrint(o),n?.(e)}},l,{ref:t}));return(0,ie.jsx)(w.Fragment,{children:s})}),$h=["render","options","onClick"],zh=y(function(e,t){const{render:r,options:o,onClick:n}=e,l=(0,x.A)(e,$h),i=oe(),a=_e(),s=xh(i.slots.baseButton,r,(0,b.A)({},i.slotProps?.baseButton,{onClick:e=>{a.current.exportDataAsCsv(o),n?.(e)}},l,{ref:t}));return(0,ie.jsx)(w.Fragment,{children:s})}),Lh=w.createContext(void 0);function jh(){const e=w.useContext(Lh);if(void 0===e)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return e}const Nh=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],Vh=e=>e.split(" ").filter(e=>""!==e),Bh=e=>e.join(" ");function Gh(e){const t=oe(),{render:r,className:o,parser:n=Vh,formatter:l=Bh,debounceMs:i=t.filterDebounceMs,defaultExpanded:a,expanded:s,onExpandedChange:c}=e,u=(0,x.A)(e,Nh),d=_e(),p=w.useRef(null),f=w.useRef(null),g=_(d,xn),[h,m]=w.useState(l(g??[])),[C,v]=w.useState(a??h.length>0),y=s??C,S=w.useMemo(()=>({value:h,expanded:y}),[h,y]),A="function"==typeof o?o(S):o,R=w.useRef(null),M=(0,Yt.A)(),I=w.useCallback(e=>{c&&c(e),void 0===s&&v(e)},[c,s]),P=w.useRef(g);w.useEffect(()=>{Hl(P.current,g)||(P.current=g,m(e=>Hl(n(e),g)?e:l(g??[])))},[g,l,n]);const k=w.useRef(!0),E=w.useRef(y);w.useEffect(()=>{k.current?k.current=!1:E.current!==y&&(y?requestAnimationFrame(()=>{p.current?.focus({preventScroll:!0})}):f.current?.focus({preventScroll:!0}),E.current=y)},[y]);const F=w.useMemo(()=>(0,Ya.A)(e=>{const t=n(e);P.current=t,d.current.setQuickFilterValues(t)},i),[d,i,n]);w.useEffect(()=>F.clear,[F]);const D=w.useCallback(e=>{const t=e.target.value;m(t),F(t)},[F]),T=w.useCallback(()=>{m(""),d.current.setQuickFilterValues([]),p.current?.focus()},[d,p]),H=w.useMemo(()=>({controlRef:p,triggerRef:f,state:S,controlId:M,clearValue:T,onValueChange:D,onExpandedChange:I}),[M,S,D,T,I]);(0,Lt.A)(()=>{R.current&&f.current&&R.current.style.setProperty("--trigger-width",`${f.current?.offsetWidth}px`)},[]);const O=xh("div",r,(0,b.A)({className:A},u,{ref:R}),S);return(0,ie.jsx)(Lh.Provider,{value:H,children:O})}const Wh=["render","className","onClick"],Uh=y(function(e,t){const{render:r,className:o,onClick:n}=e,l=(0,x.A)(e,Wh),i=oe(),{state:a,controlId:s,onExpandedChange:c,triggerRef:u}=jh(),d="function"==typeof o?o(a):o,p=(0,A.A)(u,t),f=xh(i.slots.baseButton,r,(0,b.A)({},i.slotProps?.baseButton,{className:d,"aria-controls":s,"aria-expanded":a.expanded},l,{onClick:e=>{c(!a.expanded),n?.(e)},ref:p}),a);return(0,ie.jsx)(w.Fragment,{children:f})}),Kh=["render","className","slotProps","onKeyDown","onChange"],qh=y(function(e,t){const{render:r,className:o,slotProps:n,onKeyDown:l,onChange:i}=e,a=(0,x.A)(e,Kh),s=oe(),{state:c,controlId:u,controlRef:d,onValueChange:p,onExpandedChange:f,clearValue:g}=jh(),h="function"==typeof o?o(c):o,m=(0,A.A)(d,t),C=xh(s.slots.baseTextField,r,(0,b.A)({},s.slotProps?.baseTextField,{slotProps:(0,b.A)({htmlInput:(0,b.A)({role:"searchbox",id:u,tabIndex:c.exp
127anded?void 0:-1},n?.htmlInput,{onBlur:e=>{""===c.value&&f(!1),n?.htmlInput?.onBlur?.(e)}})},n),value:c.value,className:h},a,{onChange:e=>{c.expanded||f(!0),p(e),i?.(e)},onKeyDown:e=>{"Escape"===e.key&&(""===c.value?f(!1):g()),l?.(e)},ref:m}),c);return(0,ie.jsx)(w.Fragment,{children:C})}),_h=["render","className","onClick"],Xh=y(function(e,t){const{render:r,className:o,onClick:n}=e,l=(0,x.A)(e,_h),i=oe(),{state:a,clearValue:s}=jh(),c="function"==typeof o?o(a):o,u=xh(i.slots.baseIconButton,r,(0,b.A)({},i.slotProps?.baseIconButton,{className:c,tabIndex:-1},l,{onClick:e=>{s(),n?.(e)},ref:t}),a);return(0,ie.jsx)(w.Fragment,{children:u})}),Yh=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],Qh=["ref","slotProps"],Zh=(0,et.A)("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),Jh=(0,et.A)(kh,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})(({ownerState:e})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:e.expanded?0:1,pointerEvents:e.expanded?"none":"auto",transition:L.transition(["opacity"])})),em=(0,et.A)(e=>{throw new Error("Failed assertion: should not be rendered")},{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})(({ownerState:e})=>({gridArea:"1 / 1",overflowX:"clip",width:e.expanded?260:"var(--trigger-width)",opacity:e.expanded?1:0,transition:L.transition(["width","opacity"])}));function tm(e){const t=_e(),r=oe(),o={classes:r.classes,expanded:!1},n=(e=>{const{classes:t}=e;return(0,M.A)({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},T,t)})(o),{quickFilterParser:l,quickFilterFormatter:i,debounceMs:a,className:s,slotProps:c}=e,u=(0,x.A)(e,Yh);return(0,ie.jsx)(Gh,{parser:l,formatter:i,debounceMs:a,render:(e,l)=>{const i=(0,b.A)({},o,{expanded:l.expanded});return(0,ie.jsxs)(Zh,(0,b.A)({},e,{className:(0,S.A)(n.root,s),children:[(0,ie.jsx)(Uh,{render:e=>(0,ie.jsx)(r.slots.baseTooltip,{title:t.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:(0,ie.jsx)(Jh,(0,b.A)({className:n.trigger},e,{ownerState:i,color:"default","aria-disabled":l.expanded,children:(0,ie.jsx)(r.slots.quickFilterIcon,{fontSize:"small"})}))})}),(0,ie.jsx)(qh,{render:e=>{let{ref:o,slotProps:l}=e,a=(0,x.A)(e,Qh);return(0,ie.jsx)(em,(0,b.A)({as:r.slots.baseTextField,className:n.control,ownerState:i,inputRef:o,"aria-label":t.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:t.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:(0,b.A)({input:(0,b.A)({startAdornment:(0,ie.jsx)(r.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:a.value?(0,ie.jsx)(Xh,{render:(0,ie.jsx)(r.slots.baseIconButton,{size:"small",edge:"end","aria-label":t.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:(0,ie.jsx)(r.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},l?.input)},l)},r.slotProps?.baseTextField,a,c?.root,u))}})]}))}})}const rm=["className"],om=["className"],nm=["showQuickFilter","quickFilterProps","csvOptions","printOptions","additionalItems","additionalExportMenuItems"],lm=e=>{const{classes:t}=e;return(0,M.A)({divider:["toolbarDivider"],label:["toolbarLabel"]},T,t)},im=(0,et.A)(jt,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:L.spacing(0,.5)}),am=(0,et.A)("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:L.typography.font.large,fontWeight:L.typography.fontWeight.medium,margin:L.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function sm(e){const t=(0,x.A)(e,rm),r=oe(),o=lm(r);return(0,ie.jsx)(im,(0,b.A)({as:r.slots.baseDivider,orientation:"vertical",className:o.divider},t))}function cm(e){const t=(0,x.A)(e,om),r=oe(),o=lm(r);return(0,ie.jsx)(am,(0,b.A)({className:o.label},t))}const um=(0,b.A)({},vh,{cell:Sd,skeletonCell:Fc,columnHeaderFilterIconButton:function(e){return e.counter?(0,ie.jsx)(Oc,(0,b.A)({},e)):null},columnHeaderSortIcon:Nc,columnMenu:op,columnHeaders:Ud,detailPanels:function(e){return null},bottomContainer:function(e){const t=(0,M.A)({root:["bottomContainer"]},T,{});return(0,ie.jsx)(yh,(0,b.A)({},e,{className:(0,S.A)(t.root,H["container--bottom"]),role:"presentation"}))},footer:qc,footerRowCount:Yc,toolbar:function(e){const{showQuickFilter:t=!0,quickFilterProps:r,csvOptions:o,printOptions:n,additionalItems:l,additionalExportMenuItems:i}=e,a=(0,x.A)(e,nm),s=_e(),c=oe(),[u,d]=w.useState(!1),p=w.useRef(null),f=(0,Yt.A)(),g=(0,Yt.A)(),h=!o?.disableToolbarButton||!n?.disableToolbarButton||i,m=()=>d(!1);return(0,ie.jsxs)(Ih,(0,b.A)({},a,{children:[c.label&&(0,ie.jsx)(cm,{children:c.label}),!c.disableColumnSelector&&(0,ie.jsx)(c.slots.baseTooltip,{title:s.current.getLocaleText("toolbarColumns"),children:(0,ie.jsx)(Th,{render:(0,ie.jsx)(kh,{}),children:(0,ie.jsx)(c.slots.columnSelectorIcon,{fontSize:"small"})})}),!c.disableColumnFilter&&(0,ie.jsx)(c.slots.baseTooltip,{title:s.current.getLocaleText("toolbarFilters"),children:(0,ie.jsx)(Fh,{render:(e,t)=>(0,ie.jsx)(kh,(0,b.A)({},e,{color:t.filterCount>0?"primary":"default",children:(0,ie.jsx)(c.slots.baseBadge,{badgeContent:t.filterCount,color:"primary",variant:"dot",children:(0,ie.jsx)(c.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),l,h&&(!c.disableColumnFilter||!c.disableColumnSelector)&&(0,ie.jsx)(sm,{}),h&&(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(c.slots.baseTooltip,{title:s.current.getLocaleText("toolbarExport"),disableInteractive:u,children:(0,ie.jsx)(kh,{ref:p,id:g,"aria-controls":f,"aria-haspopup":"true","aria-expanded":u?"true":void 0,onClick:()=>d(!u),children:(0,ie.jsx)(c.slots.exportIcon,{fontSize:"small"})})}),(0,ie.jsx)($o,{target:p.current,open:u,onClose:m,position:"bottom-end",children:(0,ie.jsxs)(c.slots.baseMenuList,(0,b.A)({id:f,"aria-labelledby":g,autoF
127ocusItem:!0},c.slotProps?.baseMenuList,{children:[!n?.disableToolbarButton&&(0,ie.jsx)(Oh,{render:(0,ie.jsx)(c.slots.baseMenuItem,(0,b.A)({},c.slotProps?.baseMenuItem)),options:n,onClick:m,children:s.current.getLocaleText("toolbarExportPrint")}),!o?.disableToolbarButton&&(0,ie.jsx)(zh,{render:(0,ie.jsx)(c.slots.baseMenuItem,(0,b.A)({},c.slotProps?.baseMenuItem)),options:o,onClick:m,children:s.current.getLocaleText("toolbarExportCSV")}),i?.(m)]}))})]}),t&&(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(sm,{}),(0,ie.jsx)(tm,(0,b.A)({},r))]})]}))},pinnedRows:function(e){return null},loadingOverlay:pu,noResultsOverlay:np,noRowsOverlay:fu,noColumnsOverlay:gu,pagination:function(){const e=_e(),t=oe(),r=_(e,Si),o=_(e,Ai),n=_(e,Pi),{paginationMode:l,loading:i}=t,a=-1===o&&"server"===l&&i,s=w.useMemo(()=>Math.max(0,n-1),[n]),c=w.useMemo(()=>-1===o||r.page<=s?r.page:s,[s,r.page,o]),u=w.useCallback(t=>{e.current.setPageSize(t)},[e]),d=w.useCallback((t,r)=>{e.current.setPage(r)},[e]),p=(e=>{for(let r=0;r<t.pageSizeOptions.length;r+=1){const o=t.pageSizeOptions[r];if("number"==typeof o){if(o===e)return!0}else if(o.value===e)return!0}return!1})(r.pageSize)?t.pageSizeOptions:[];return(0,ie.jsx)(hu,(0,b.A)({as:t.slots.basePagination,count:o,page:c,rowsPerPageOptions:p,rowsPerPage:r.pageSize,onPageChange:d,onRowsPerPageChange:u,disabled:a},t.slotProps?.basePagination))},filterPanel:Lu,columnsPanel:function(e){const t=oe();return(0,ie.jsx)(Au,(0,b.A)({},e,{children:(0,ie.jsx)(t.slots.columnsManagement,(0,b.A)({},t.slotProps?.columnsManagement))}))},columnsManagement:function(e){const t=_e(),r=w.useRef(null),o=_(t,He),n=_(t,Te),l=oe(),[i,a]=w.useState(""),s=(e=>{const{classes:t}=e;return(0,M.A)({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},T,t)})(l),c=_(t,De),u=_(t,zn),d=_(t,jn),p=w.useMemo(()=>u?Array.from(d.values()):c,[u,d,c]),{sort:f,searchPredicate:g=Nu,autoFocusSearchField:h=!0,disableShowHideToggle:m=!1,disableResetButton:C=!1,toggleAllMode:v="all",getTogglableColumns:y,searchInputProps:x,searchDebounceMs:S=l.columnFilterDebounceMs}=e,A=w.useMemo(()=>(0,Ya.A)(e=>{a(e)},S??150),[S]),R=w.useMemo(()=>((e,t)=>{const r=new Set(Object.keys(e).filter(t=>!1===e[t])),o=new Set(Object.keys(t).filter(e=>!1===t[e]));if(r.size!==o.size)return!1;let n=!0;return r.forEach(e=>{o.has(e)||(n=!1)}),n})(n,o),[n,o]),I=w.useMemo(()=>{switch(f){case"asc":return[...p].sort((e,t)=>qu.compare(e.headerName||e.field,t.headerName||t.field));case"desc":return[...p].sort((e,t)=>-qu.compare(e.headerName||e.field,t.headerName||t.field));default:return p}},[p,f]),P=e=>{const{name:r}=e.target;t.current.setColumnVisibility(r,!1===n[r])},k=w.useMemo(()=>{const e=y?y(I):null,t=e?I.filter(({field:t})=>e.includes(t)):I;return i?t.filter(e=>g(e,i.toLowerCase())):t},[I,i,g,y]),E=w.useCallback(e=>{const r=Te(t),o=(0,b.A)({},r),n=y?y(p):null;return("filteredOnly"===v?k:p).forEach(t=>{t.hideable&&(null==n||n.includes(t.field))&&(e?delete o[t.field]:o[t.field]=!1)}),t.current.setColumnVisibilityModel(o)},[t,p,y,v,k]),F=w.useCallback(e=>{A(e.target.value)},[A]),D=w.useMemo(()=>k.filter(e=>e.hideable),[k]),H=w.useMemo(()=>D.every(e=>null==n[e.field]||!1!==n[e.field]),[n,D]),O=w.useMemo(()=>D.every(e=>!1===n[e.field]),[n,D]),$=w.useRef(null);w.useEffect(()=>{h?r.current?.focus():$.current&&"function"==typeof $.current.focus&&$.current.focus()},[h]);let z=!1;const L=e=>!1===z&&!1!==e.hideable&&(z=!0,!0),j=w.useCallback(()=>{a(""),r.current&&(r.current.value="",r.current.focus())},[]);return(0,ie.jsxs)(w.Fragment,{children:[(0,ie.jsx)(Yu,{className:s.header,ownerState:l,children:(0,ie.jsx)(Qu,(0,b.A)({as:l.slots.baseTextField,ownerState:l,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:r,className:s.searchInput,onChange:F,size:"small",type:"search",slotProps:{input:{startAdornment:(0,ie.jsx)(l.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:(0,ie.jsx)(l.slots.baseIconButton,(0,b.A)({size:"small","aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),style:i?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:j,edge:"end"},l.slotProps?.baseIconButton,{children:(0,ie.jsx)(l.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},l.slotProps?.baseTextField,x))}),(0,ie.jsx)(Xu,{ownerState:l,children:(0,ie.jsxs)(_u,{className:s.root,ownerState:l,children:[k.map(e=>(0,ie.jsx)(ed,(0,b.A)({as:l.slots.baseCheckbox,className:s.row,disabled:!1===e.hideable||u,checked:!1!==n[e.field],onChange:P,name:e.field,inputRef:L(e)?$:void 0,label:e.headerName||e.field,density:"compact",fullWidth:!0},l.slotProps?.baseCheckbox),e.field)),0===k.length&&(0,ie.jsx)(Ju,{ownerState:l,children:t.current.getLocaleText("columnsManagementNoColumns")})]})}),m&&C?null:(0,ie.jsxs)(Zu,{ownerState:l,className:s.footer,children:[m?(0,ie.jsx)("span",{}):(0,ie.jsx)(l.slots.baseCheckbox,(0,b.A)({disabled:0===D.length||u,checked:H,indeterminate:!H&&!O,onChange:()=>E(!H),name:t.current.getLocaleText("columnsManagementShowHideAllText"),label:t.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},l.slotProps?.baseCheckbox)),C?null:(0,ie.jsx)(l.slots.baseButton,(0,b.A)({onClick:()=>t.current.setColumnVisibilityModel(o),disabled:R||u},l.slotProps?.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]})]})},panel:ld,row:bd}),dm={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",listView:!1},pm=um,fm=new TextEncoder;let gm=2048,hm=new ArrayBuffer(gm),mm=new Uint8Array(hm),bm=new Int32Array(hm);function wm(e,t){return e<<t|e>>>32-t}function Cm(e){return function(e){return`rgba(from ${e} r g b / 1)`}(e)}function vm(e){if(!e)return;const t="number"==typeof e.fontSize?`${e.fontSize}px`:e.fontSize;return`${e.fontWeight} ${t} / ${e.lineHeight} ${e.fontFamily}`}class ym{maxListeners=20;warnOnce=!1;events={};on(e,t,r={}){let o=this.events[e];o||(o={highPriority:new Map,regular:new Map},this.events[e]=o),r.isFirst?o.highPriority.set(t,!0):o.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const r=this.events[e];if(!r)return;const o=Array.from(r.highPriority.keys()),n=Array.from(r.regular.keys());for(let e=o.length-1;e>=0;e-=1){const n=o[e];r.highPriority.has(n)&&n.apply(this,t)}for(let e=0;e<n.length;e+=1){const o=n[e];r.regular.has(o)&&o.apply(this,t)}}once(e,t){const r=this;this.on(e,function o(...n){r.removeListener(e,o),t.apply(r,n)})}}const xm=Symbol("mui.api_private");let Sm=0;const Am={hooks:{useCSSVariables:function(){const e=(0,Sc.A)();return w.useMemo(()=>{const t=function(e){const t=2*e.length;t>gm&&(gm=t+(4-t%4),hm=new ArrayBuffer(gm),mm=new Uint8Array(hm),bm=new Int32Array(hm));const r=0|fm.encodeInto(e,mm).written;let o=0,n=374761393+(0+r|0)|0;if(r<16)for(;(o+3|0)<r;
127o=o+4|0)n=Math.imul(0|wm(n+Math.imul(0|bm[o],3266489917)|0,17),668265263);else{let e=606290984,t=-2048144777,l=0,i=1640531535;for(;(o+15|0)<r;o=o+16|0)e=Math.imul(0|wm(e+Math.imul(0|bm[o+0|0],2246822519)|0,13),2654435761),t=Math.imul(0|wm(t+Math.imul(0|bm[o+4|0],2246822519)|0,13),2654435761),l=Math.imul(0|wm(l+Math.imul(0|bm[o+8|0],2246822519)|0,13),2654435761),i=Math.imul(0|wm(i+Math.imul(0|bm[o+12|0],2246822519)|0,13),2654435761);for(n=(((wm(e,1)|0+wm(t,7)|0)+wm(l,12)|0)+wm(i,18)|0)+r|0;(o+3|0)<r;o=o+4|0)n=Math.imul(0|wm(n+Math.imul(0|bm[o],3266489917)|0,17),668265263)}for(;o<r;o=o+1|0)n=Math.imul(0|wm(n+Math.imul(0|mm[o],374761393)|0,11),2654435761);return n=Math.imul(n^n>>>15,2246822519),n=Math.imul(n^n>>>13,3266489917),((n^n>>>16)>>>0).toString()}(function(e){const t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("undefined"!=typeof window&&r===window||"undefined"!=typeof document&&r===document)return r.toString();if(null!==r&&"object"==typeof r){if(w.isValidElement(r))return null;if(t.has(r))return null;t.add(r)}return r})}(e)),r=function(e){const t=function(e){return e.vars?e.vars.palette.TableCell.border:"light"===e.palette.mode?(0,ud.a)((0,ud.X4)(e.palette.divider,1),.88):(0,ud.e$)((0,ud.X4)(e.palette.divider,1),.68)}(e),r=(e.vars||e).palette.DataGrid,o=r?.bg??("dark"===e.palette.mode?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper),n=r?.headerBg??o,l=r?.pinnedBg??o,i=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:(0,ud.X4)(e.palette.background.default,e.palette.action.disabledOpacity),a="dark"===e.palette.mode?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 90%, #fff)`:(e.vars||e).palette.background.paper,s=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,c=function(e){return e.vars?e.vars.shape.borderRadius:"number"==typeof e.shape.borderRadius?`${e.shape.borderRadius}px`:e.shape.borderRadius}(e),u=e.vars?.font?.body2??vm(e.typography.body2),d=e.vars?.font?.caption??vm(e.typography.caption),p=e.vars?.font?.body1??vm(e.typography.body1),f=L.keys;return{[f.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[f.colors.border.base]:t,[f.colors.background.base]:o,[f.colors.background.overlay]:a,[f.colors.background.backdrop]:i,[f.colors.foreground.base]:(e.vars||e).palette.text.primary,[f.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[f.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[f.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[f.colors.foreground.error]:(e.vars||e).palette.error.dark,[f.colors.interactive.hover]:(e.vars||e).palette.action.hover,[f.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[f.colors.interactive.focus]:Cm((e.vars||e).palette.primary.main),[f.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[f.colors.interactive.disabled]:Cm((e.vars||e).palette.action.disabled),[f.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[f.colors.interactive.selected]:s,[f.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[f.header.background.base]:n,[f.cell.background.pinned]:l,[f.radius.base]:c,[f.typography.fontFamily.base]:e.typography.fontFamily,[f.typography.fontWeight.light]:e.typography.fontWeightLight,[f.typography.fontWeight.regular]:e.typography.fontWeightRegular,[f.typography.fontWeight.medium]:e.typography.fontWeightMedium,[f.typography.fontWeight.bold]:e.typography.fontWeightBold,[f.typography.font.body]:u,[f.typography.font.small]:d,[f.typography.font.large]:p,[f.transitions.easing.easeIn]:e.transitions.easing.easeIn,[f.transitions.easing.easeOut]:e.transitions.easing.easeOut,[f.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[f.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[f.transitions.duration.base]:`${e.transitions.duration.short}ms`,[f.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[f.shadows.base]:(e.vars||e).shadows[2],[f.shadows.overlay]:(e.vars||e).shadows[8],[f.zIndex.panel]:(e.vars||e).zIndex.modal,[f.zIndex.menu]:(e.vars||e).zIndex.modal}}(e);return{id:t,variables:r}},[e])},useGridAriaAttributes:()=>{const e=Y(),t=oe(),r=_(e,Oe),o=_(e,En),n=_(e,Jo),l=_(e,Mt),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":r.length,"aria-rowcount":n+1+l+o,"aria-multiselectable":sa(t)}},useGridRowAriaAttributes:()=>{const e=Y(),t=_(e,Jo);return w.useCallback((r,o)=>{const n={},l=o+t+2;return n["aria-rowindex"]=l,r&&e.current.isRowSelectable(r.id)&&(n["aria-selected"]=e.current.isRowSelected(r.id)),n},[e,t])},useGridRowsOverridableMethods:e=>{const t=w.useCallback((t,r,o)=>{const n=wt(e,t),l=wt(e,r);if(!n)throw new Error(`MUI X: No row with id #${t} found.`);if(!l)throw new Error(`MUI X: No row with id #${r} found.`);if("leaf"!==n.type)throw new Error("MUI X: The row reordering does not support reordering of footer or grouping rows.");if("inside"===o)throw new Error("MUI X: The 'inside' position is only supported for tree data. Use 'above' or 'below' for flat data.");const i=On(e),a=i[r];if(void 0===a)throw new Error(`MUI X: Target row with id #${r} not found in current view.`);const s=i[t];if(void 0===s)throw new Error(`MUI X: Source row with id #${t} not found in current view.`);let c;c="up"==(a<s?"up":"down")?"above"===o?a:a+1:"above"===o?a-1:a,c!==s&&(e.current.setState(t=>{const r=bt(e)[$r],o=[...r.children];return o.splice(c,0,o.splice(s,1)[0]),(0,b.A)({},t,{rows:(0,b.A)({},t.rows,{tree:(0,b.A)({},t.rows.tree,{[$r]:(0,b.A)({},r,{children:o})})})})}),e.current.publishEvent("rowsSet"))},[e]);return{setRowIndex:w.useCallback((t,r)=>{const o=wt(e,t);if(!o)throw new Error(`MUI X: No row with id #${t} found.`);if("leaf"!==o.type)throw new Error("MUI X: The row reordering does not support reordering of footer or grouping rows.");e.current.setState(o=>{const n=bt(e)[$r],l=n.children,i=l.findIndex(e=>e===t);if(-1===i||i===r)return o;const a=[...l];return a.splice(r,0,a.splice(i,1)[0]),(0,b.A)({},o,{rows:(0,b.A)({},o.rows,{tree:(0,b.A)({},o.rows.tree,{[$r]:(0,b.A)({},n,{children:a})})})})}),e.current.publishEvent("rowsSet")},[e]),setRowPosition:t}},useGridParamsOverridableMethods:e=>{const t=w.useCallback((t,r)=>{const o=e.current.getColumn(r),n=e.current.getRow(t);if(!n)throw new Error(`No row with id #${t} found`);return o&&o.valueGetter?o.valueGetter(n[o.field],n,o,e):n[r]},[e]),r=w.useCallback((t,r)=>jr(t,r,e),[e]),o=w.useCallback((t,o)=>{const n=r(t,o);return o&&o.valueFormatter?o.valueFormatter(n,t,o,e):n},[e,r]);return{getCellValue:t,getRowValue:r,getRowFormattedValue:o}},useIsCellEditable:()=>w.useCallback(e=>!Wr(e.rowNode),[]),useCellAggregationResult:()=>null,useFilterValueGetter:e=>e.current.getRowValue}},Rm=function(e,t){const r=(e=>{const t=(0,Sc.A)(),r=w.useMemo(()=>(0,Ac.A)({props:e,theme:t,name:"MuiDataGrid"}),[t,e]),o=w.useMemo(()=>(0,b.A)({},Rc,r.localeText),[r.localeText]),n=w.useMemo(()=>function({defaultSlots:e,slots:t}){const r=t;if(!r||0===Object.keys(r).length)return e;const o=(0,b.A)({},e);
127return Object.keys(r).forEach(e=>{const t=e;void 0!==r[t]&&(o[t]=r[t])}),o}({defaultSlots:pm,slots:r.slots}),[r.slots]),l=w.useMemo(()=>Object.keys(qi).reduce((e,t)=>(e[t]=r[t]??qi[t],e),{}),[r]);return w.useMemo(()=>(0,b.A)({},r,l,{localeText:o,slots:n},(e=>(0,b.A)({},dm,e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}))(r)),[r,o,n,l])})(e),o=function(e,t){const r=w.useRef(null),o=w.useRef(null);o.current||(o.current=function(e){const t=e.current?.[xm];if(t)return t;const r={},o={state:r,store:kl.create(r),instanceId:{id:Sm}};return Sm+=1,o.getPublicApi=()=>e.current,o.register=(t,r)=>{Object.keys(r).forEach(n=>{const l=r[n],i=o[n];if(!0===i?.spying?i.target=l:o[n]=l,"public"===t){const t=e.current,r=t[n];!0===r?.spying?r.target=l:t[n]=l}})},o.register("private",{caches:{},eventManager:new ym}),o}(r)),r.current||(r.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[xm]:e.current}}(o));const n=w.useCallback((...e)=>{const[r,n,l={}]=e;if(l.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(l)&&l.isPropagationStopped())return;const i=t.signature===bi.DataGridPro||t.signature===bi.DataGridPremium?{api:o.current.getPublicApi()}:{};o.current.eventManager.emit(r,n,l,i)},[o,t.signature]),l=w.useCallback((e,t,r)=>{o.current.eventManager.on(e,t,r);const n=o.current;return()=>{n.eventManager.removeListener(e,t)}},[o]);return _i(o,{subscribeEvent:l,publishEvent:n},"public"),e&&!e.current?.state&&(e.current=r.current),w.useImperativeHandle(e,()=>r.current,[r]),w.useEffect(()=>{const e=o.current;return()=>{e.publishEvent("unmount")}},[o]),o}(r.apiRef,r);return xc(o,r,Am),(0,ie.jsx)(da,{privateApiRef:o,configuration:Am,props:r,children:(0,ie.jsx)(la,(0,b.A)({className:r.className,style:r.style,sx:r.sx},r.slotProps?.root,{ref:t}))})},Mm=w.memo(y(Rm));Rm.propTypes={apiRef:C.shape({current:C.object}),"aria-label":C.string,"aria-labelledby":C.string,autoHeight:C.bool,autoPageSize:C.bool,autosizeOnMount:C.bool,autosizeOptions:C.shape({columns:C.arrayOf(C.string),disableColumnVirtualization:C.bool,expand:C.bool,includeHeaders:C.bool,includeOutliers:C.bool,outliersFactor:C.number}),cellModesModel:C.object,checkboxSelection:C.bool,classes:C.object,className:C.string,clipboardCopyCellDelimiter:C.string,columnBufferPx:C.number,columnFilterDebounceMs:C.number,columnGroupHeaderHeight:C.number,columnGroupingModel:C.arrayOf(C.object),columnHeaderHeight:C.number,columns:C.arrayOf(C.object).isRequired,columnVisibilityModel:C.object,dataSource:C.shape({getRows:C.func.isRequired,updateRow:C.func}),dataSourceCache:C.shape({clear:C.func.isRequired,get:C.func.isRequired,set:C.func.isRequired}),density:C.oneOf(["comfortable","compact","standard"]),disableAutosize:C.bool,disableColumnFilter:C.bool,disableColumnMenu:C.bool,disableColumnResize:C.bool,disableColumnSelector:C.bool,disableColumnSorting:C.bool,disableDensitySelector:C.bool,disableEval:C.bool,disableMultipleRowSelection:C.bool,disableRowSelectionExcludeModel:C.bool,disableRowSelectionOnClick:C.bool,disableVirtualization:C.bool,editMode:C.oneOf(["cell","row"]),estimatedRowCount:C.number,experimentalFeatures:C.shape({warnIfFocusStateIsNotSynced:C.bool}),filterDebounceMs:C.number,filterMode:C.oneOf(["client","server"]),filterModel:C.shape({items:C.arrayOf(C.shape({field:C.string.isRequired,id:C.oneOfType([C.number,C.string]),operator:C.string.isRequired,value:C.any})).isRequired,logicOperator:C.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:C.bool,quickFilterLogicOperator:C.oneOf(["and","or"]),quickFilterValues:C.array}),getCellClassName:C.func,getDetailPanelContent:C.func,getEstimatedRowHeight:C.func,getRowClassName:C.func,getRowHeight:C.func,getRowId:C.func,getRowSpacing:C.func,hideFooter:C.bool,hideFooterPagination:C.bool,hideFooterSelectedRowCount:C.bool,ignoreDiacritics:C.bool,ignoreValueFormatterDuringExport:C.oneOfType([C.shape({clipboardExport:C.bool,csvExport:C.bool}),C.bool]),initialState:C.object,isCellEditable:C.func,isRowSelectable:C.func,keepNonExistentRowsSelected:C.bool,label:C.string,loading:C.bool,localeText:C.object,logger:C.shape({debug:C.func.isRequired,error:C.func.isRequired,info:C.func.isRequired,warn:C.func.isRequired}),logLevel:C.oneOf(["debug","error","info","warn",!1]),nonce:C.string,onCellClick:C.func,onCellDoubleClick:C.func,onCellEditStart:C.func,onCellEditStop:C.func,onCellKeyDown:C.func,onCellModesModelChange:C.func,onClipboardCopy:C.func,onColumnHeaderClick:C.func,onColumnHeaderContextMenu:C.func,onColumnHeaderDoubleClick:C.func,onColumnHeaderEnter:C.func,onColumnHeaderLeave:C.func,onColumnHeaderOut:C.func,onColumnHeaderOver:C.func,onColumnOrderChange:C.func,onColumnResize:C.func,onColumnVisibilityModelChange:C.func,onColumnWidthChange:C.func,onDataSourceError:C.func,onDensityChange:C.func,onFilterModelChange:C.func,onMenuClose:C.func,onMenuOpen:C.func,onPaginationMetaChange:C.func,onPaginationModelChange:C.func,onPreferencePanelClose:C.func,onPreferencePanelOpen:C.func,onProcessRowUpdateError:C.func,onResize:C.func,onRowClick:C.func,onRowCountChange:C.func,onRowDoubleClick:C.func,onRowEditStart:C.func,onRowEditStop:C.func,onRowModesModelChange:C.func,onRowSelectionModelChange:C.func,onSortModelChange:C.func,onStateChange:C.func,pageSizeOptions:C.arrayOf(C.oneOfType([C.number,C.shape({label:C.string.isRequired,value:C.number.isRequired})]).isRequired),pagination:C.oneOf([!0]),paginationMeta:C.shape({hasNextPage:C.bool}),paginationMode:C.oneOf(["client","server"]),paginationModel:C.shape({page:C.number.isRequired,pageSize:C.number.isRequired}),processRowUpdate:C.func,resizeThrottleMs:C.number,rowBufferPx:C.number,rowCount:C.number,rowHeight:C.number,rowModesModel:C.object,rows:C.arrayOf(C.object),rowSelection:C.bool,rowSelectionModel:C.shape({ids:C.instanceOf(Set).isRequired,type:C.oneOf(["exclude","include"]).isRequired}),rowSpacingType:C.oneOf(["border","margin"]),rowSpanning:C.bool,scrollbarSize:C.number,showCellVerticalBorder:C.bool,showColumnVerticalBorder:C.bool,showToolbar:C.bool,slotProps:C.object,slots:C.object,sortingMode:C.oneOf(["client","server"]),sortingOrder:C.arrayOf(C.oneOf(["asc","desc"])),sortModel:C.arrayOf(C.shape({field:C.string.isRequired,sort:C.oneOf(["asc","desc"])})),style:C.object,sx:C.oneOfType([C.arrayOf(C.oneOfType([C.func,C.object,C.bool])),C.func,C.object]),virtualizeColumnsWithAutoRowHeight:C.bool}},2379:e=>{e.exports=function(e){return e[1]}},2542:(e,t,r)=>{r.d(t,{A:()=>a});var o=r(2379),n=r.n(o),l=r(1364),i=r.n(l)()(n());
vendor: 1,891 bytes, line 127
127i.push([e.id,"/* Placeholder file to ensure CSS imports are working */\n\n.mcsRjyasmPt2sa3k7oqA {\n display: block;\n}\n",""]),i.locals={MuiDataGrid:"mcsRjyasmPt2sa3k7oqA"};const a=i},6186:e=>{var t=[];function r(e){for(var r=-1,o=0;o<t.length;o++)if(t[o].identifier===e){r=o;break}return r}function o(e,o){for(var l={},i=[],a=0;a<e.length;a++){var s=e[a],c=o.base?s[0]+o.base:s[0],u=l[c]||0,d="".concat(c," ").concat(u);l[c]=u+1;var p=r(d),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var g=n(f,o);o.byIndex=a,t.splice(a,0,{identifier:d,updater:g,references:1})}i.push(d)}return i}function n(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,n){var l=o(e=e||[],n=n||{});return function(e){e=e||[];for(var i=0;i<l.length;i++){var a=r(l[i]);t[a].references--}for(var s=o(e,n),c=0;c<l.length;c++){var u=r(l[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}l=s}}},7433:e=>{var t={};e.exports=function(e,r){var o=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(r)}},8626:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},8990:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},9827:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}}]);
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.